dorkos 0.125.0 → 0.125.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.
- package/dist/bin/cli.js +27 -15
- package/dist/browser/native/package-manifest.json +1 -1
- package/dist/browser/source-manifest.json +1 -1
- package/dist/client/assets/{AboutPage-GdrU2Z3k.js → AboutPage-BqGlH1pd.js} +1 -1
- package/dist/client/assets/{ActivityErrorState-D1T74VJE.js → ActivityErrorState-C4hqCedX.js} +1 -1
- package/dist/client/assets/{ActivityPage-7GXGUwd1.js → ActivityPage-frpyizcK.js} +1 -1
- package/dist/client/assets/{ActivityRow-C-8dACWp.js → ActivityRow-DB9c3g1G.js} +1 -1
- package/dist/client/assets/{AdapterIcon-CRRs6yil.js → AdapterIcon-CEHkdca8.js} +1 -1
- package/dist/client/assets/{AdapterSetupWizard-K6DsejqG.js → AdapterSetupWizard-DLJMkb-u.js} +1 -1
- package/dist/client/assets/{AgentOptionRow-CF5XZmBx.js → AgentOptionRow-D-QjHi5k.js} +1 -1
- package/dist/client/assets/{AgentPicker-BXes2ymU.js → AgentPicker-DoGucmqI.js} +1 -1
- package/dist/client/assets/{AgentRequestCard-BuXVpWfb.js → AgentRequestCard--9GA9ymH.js} +1 -1
- package/dist/client/assets/{AppearancePage-DoqoCU4j.js → AppearancePage-NHNiZrtY.js} +1 -1
- package/dist/client/assets/{ApplyToOverridesDialog-By8jgPX3.js → ApplyToOverridesDialog-Clo55n6V.js} +1 -1
- package/dist/client/assets/{AttentionSignalRow-CgGyTDmT.js → AttentionSignalRow-BOpClaCD.js} +1 -1
- package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-BzDxZ-G5.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-D9Tm8ual.js} +1 -1
- package/dist/client/assets/{BindingDialog-BXfjFGvP.js → BindingDialog-DZcTXLE8.js} +1 -1
- package/dist/client/assets/{BlintzCanvas-C-dobEns.js → BlintzCanvas-DzjdPTlx.js} +3 -3
- package/dist/client/assets/{CanvasCsvContent-ClMFJX7T.js → CanvasCsvContent-xYUrbFeA.js} +1 -1
- package/dist/client/assets/{CanvasFileContent-BoDE2jjA.js → CanvasFileContent-D6fTvMea.js} +2 -2
- package/dist/client/assets/{CanvasModel3dContent-fnWc0B7B.js → CanvasModel3dContent-DEassnBV.js} +2 -2
- package/dist/client/assets/{ChannelComposer-DIRPjyyf.js → ChannelComposer-CutghXOq.js} +3 -3
- package/dist/client/assets/{ChatAppsOff-DlCWmwEz.js → ChatAppsOff-C00Nl_w6.js} +1 -1
- package/dist/client/assets/{CodeMirrorDiff-COsbYyNC.js → CodeMirrorDiff-JYxkSqFi.js} +1 -1
- package/dist/client/assets/{CodeMirrorEditor-n3l14rY7.js → CodeMirrorEditor-CVXZ9B5S.js} +1 -1
- package/dist/client/assets/{CommitmentList-S2O_hvwR.js → CommitmentList-CcCSwcZ8.js} +1 -1
- package/dist/client/assets/{CommitmentsPage-COOCQFpL.js → CommitmentsPage-BrDbzpyR.js} +1 -1
- package/dist/client/assets/{ComputerResourceView-PA9T4FZP.js → ComputerResourceView-BlLvMt1I.js} +1 -1
- package/dist/client/assets/{ComputerViewer-CnYUWQBS.js → ComputerViewer-B8SWICbj.js} +1 -1
- package/dist/client/assets/{ConnectionAccessLists-C1ZJtNl-.js → ConnectionAccessLists-Bsb-t24W.js} +1 -1
- package/dist/client/assets/{ConnectionsPage-BBpWiN4-.js → ConnectionsPage-RAhWxuWU.js} +1 -1
- package/dist/client/assets/{ConventionPage-sa0Yn2uq.js → ConventionPage-CNij_BXA.js} +1 -1
- package/dist/client/assets/{ExtensionPageRoute-BztrmZNp.js → ExtensionPageRoute-BsGqTcyI.js} +1 -1
- package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-CJrqr29-.js → FloatingTanStackRouterDevtools-CqogiFob-eQVA1bL6.js} +1 -1
- package/dist/client/assets/HandlePage-XG5mP_e9.js +1 -0
- package/dist/client/assets/{HeartbeatPage-BkyUpdZt.js → HeartbeatPage-D0tKoR6G.js} +1 -1
- package/dist/client/assets/{KeyEntry-DAMr1NNY.js → KeyEntry-CSmznLcG.js} +1 -1
- package/dist/client/assets/{LexicalField-Cnzrh08A.js → LexicalField-gYKPjFfN.js} +1 -1
- package/dist/client/assets/{ManagesPage-EAbQtygH.js → ManagesPage-BF6MFrsv.js} +1 -1
- package/dist/client/assets/{Marketplace-BfADALGd.js → Marketplace-BWDlXgwH.js} +1 -1
- package/dist/client/assets/{MarketplaceSourcesView-u1WKUk-p.js → MarketplaceSourcesView-BhKzgkiO.js} +1 -1
- package/dist/client/assets/{McpAppFrame-Cz-Ttlqr.js → McpAppFrame-BotrzoHd.js} +1 -1
- package/dist/client/assets/{McpSigninBody-CkOBUhOz.js → McpSigninBody-CdeX_lYs.js} +1 -1
- package/dist/client/assets/{Model3dViewer-CvLaSO7V.js → Model3dViewer-KHktOpbD.js} +1 -1
- package/dist/client/assets/NamePage-Cdd9-mZg.js +1 -0
- package/dist/client/assets/{NewDirectMessageMenu-Be_4mBPd.js → NewDirectMessageMenu-CuvKJEDY.js} +1 -1
- package/dist/client/assets/{NotificationsPage-GCk9gfsW.js → NotificationsPage-DWcgfZJD.js} +1 -1
- package/dist/client/assets/{OpenMeshSwitch-BBzgYSUc.js → OpenMeshSwitch-DdJ7g4yD.js} +1 -1
- package/dist/client/assets/{OperatorIdentityForm-ZAbJ4FJn.js → OperatorIdentityForm-7FUOEWw_.js} +1 -1
- package/dist/client/assets/{PermissionHistory-DgmFpdJK.js → PermissionHistory-CgQhZrvg.js} +1 -1
- package/dist/client/assets/{PermissionsPage-DHFt_34a.js → PermissionsPage-CK34y1VF.js} +1 -1
- package/dist/client/assets/{PersonalityPopover-CobRy95S.js → PersonalityPopover-3BA36sB0.js} +1 -1
- package/dist/client/assets/PhotoPage-DFic-gDH.js +1 -0
- package/dist/client/assets/{PreviewRefusedNotice-Ux5sq2Om.js → PreviewRefusedNotice-CnqAE9sr.js} +1 -1
- package/dist/client/assets/{ProfileFields-kBzeRPfc.js → ProfileFields-CIbISW83.js} +1 -1
- package/dist/client/assets/{ProfilePanelContainer-CREt4ZC3.js → ProfilePanelContainer-DPDHtTbI.js} +1 -1
- package/dist/client/assets/{ProfileRolePicker-hQbo8P6M.js → ProfileRolePicker-83GFtm2P.js} +1 -1
- package/dist/client/assets/{PromptSuggestionChips-CmW1lIso.js → PromptSuggestionChips-B9chKG4w.js} +1 -1
- package/dist/client/assets/{ReportsToPopover-Dpa-_NsO.js → ReportsToPopover-DUv03JZP.js} +1 -1
- package/dist/client/assets/{RoomSurface-BQhgKnIE.js → RoomSurface-Bq6Slne3.js} +1 -1
- package/dist/client/assets/{RoomsPage-BHUDRYzJ.js → RoomsPage-BKxzz-nN.js} +1 -1
- package/dist/client/assets/{RunsOnPopover-bGZ6VJoF.js → RunsOnPopover-BIdmMhs9.js} +1 -1
- package/dist/client/assets/{RuntimeConnectFlow-DN2ElvcH.js → RuntimeConnectFlow-IaRVgmqH.js} +1 -1
- package/dist/client/assets/{RuntimeSetupDialog-CUFie4LV.js → RuntimeSetupDialog-Er-lzjmK.js} +1 -1
- package/dist/client/assets/{SeenDevices-D_FnsL7V.js → SeenDevices-9quCcdUW.js} +1 -1
- package/dist/client/assets/{SessionsPage-1uOPUCP9.js → SessionsPage-CGic5VaN.js} +1 -1
- package/dist/client/assets/{SettingsDialog-AbwEHDG8.js → SettingsDialog-BZ58IaK1.js} +1 -1
- package/dist/client/assets/{SkillsPage-BEobBuAr.js → SkillsPage-VRYwez5T.js} +1 -1
- package/dist/client/assets/{TaskDialogWrapper-BAFSmT-z.js → TaskDialogWrapper-C9LMV8oe.js} +1 -1
- package/dist/client/assets/{TasksEmptyState-BFw2ODM-.js → TasksEmptyState-CagC0LAa.js} +1 -1
- package/dist/client/assets/{TasksPage-C0CMgSFx.js → TasksPage-3gkHB1Pv.js} +1 -1
- package/dist/client/assets/{TeamComputerEntry-BpjxLA1n.js → TeamComputerEntry-BD89Y5e6.js} +1 -1
- package/dist/client/assets/{ToolsPage-dx-rQ2F1.js → ToolsPage-Ds6LwY79.js} +1 -1
- package/dist/client/assets/{TopologyGraph-LpxkBhGK.js → TopologyGraph-CiZ2ACcQ.js} +1 -1
- package/dist/client/assets/{TourHost--UYZoKlJ.js → TourHost-BISNaEzZ.js} +1 -1
- package/dist/client/assets/{UnlinkDialog-BN2odbqD.js → UnlinkDialog-DTuXHNsi.js} +1 -1
- package/dist/client/assets/{UnreadDivider-LbVIAoxM.js → UnreadDivider-l_VZ7ECn.js} +1 -1
- package/dist/client/assets/{WidgetErrorCard-CAUx4KUI.js → WidgetErrorCard-I8WiJv2g.js} +1 -1
- package/dist/client/assets/{WorkView-DVx4WoVI.js → WorkView-_wehEEl-.js} +3 -3
- package/dist/client/assets/_shell-BLcPeb8K.js +80 -0
- package/dist/client/assets/{_shell._home-uuqgFA3M.js → _shell._home-CcRH-M-A.js} +1 -1
- package/dist/client/assets/{_shell._home.activity-CiMsy7bF.js → _shell._home.activity-cR24Vr9Q.js} +1 -1
- package/dist/client/assets/{_shell._home.index-0Zm5q3-G.js → _shell._home.index-agU2ItcI.js} +1 -1
- package/dist/client/assets/{_shell._home.tasks-BClPai4g.js → _shell._home.tasks-BDR9JTj3.js} +1 -1
- package/dist/client/assets/{_shell._home.workspaces-DH4BgLT0.js → _shell._home.workspaces-B4nlcACK.js} +1 -1
- package/dist/client/assets/{_shell.channels-BGXkXPhY.js → _shell.channels-B7lTxkqM.js} +1 -1
- package/dist/client/assets/{_shell.connections-BwjXkgi1.js → _shell.connections-CWQYcH58.js} +1 -1
- package/dist/client/assets/{_shell.feedback-requests-j7gTBF5b.js → _shell.feedback-requests-BkgHtyZr.js} +1 -1
- package/dist/client/assets/_shell.marketplace-BMqwT9qX.js +1 -0
- package/dist/client/assets/_shell.marketplace_.sources-pXGa7Cqb.js +1 -0
- package/dist/client/assets/_shell.session-CmoE1W38.js +1 -0
- package/dist/client/assets/{_shell.team-BgJu1gDa.js → _shell.team-CTIVEpZQ.js} +3 -3
- package/dist/client/assets/{_shell.threads-C1IJJzcf.js → _shell.threads-ClWYrnld.js} +1 -1
- package/dist/client/assets/_shell.x._extensionId-BiXilrSW.js +1 -0
- package/dist/client/assets/_shell.x._extensionId_._-BiXilrSW.js +1 -0
- package/dist/client/assets/{abnfDiagram-WEYOIA3C-BuEHMh0D.js → abnfDiagram-WEYOIA3C-0-Mx5lSG.js} +1 -1
- package/dist/client/assets/{access-copy-BZNjpw9v.js → access-copy-Cj31J6PU.js} +1 -1
- package/dist/client/assets/{arc-BbGU9Ctb.js → arc-DVmpcNHP.js} +1 -1
- package/dist/client/assets/{architectureDiagram-ZHVYKT53-CdRG5sTM.js → architectureDiagram-ZHVYKT53-BZhMXbuC.js} +1 -1
- package/dist/client/assets/{banner-C7kHJJGz.js → banner-Ctq7kvQ0.js} +1 -1
- package/dist/client/assets/{blockDiagram-RJAE7QA3-CBQ6YXoI.js → blockDiagram-RJAE7QA3-Ctmof3-7.js} +1 -1
- package/dist/client/assets/{c4Diagram-XDPPPE54-DavNcKCF.js → c4Diagram-XDPPPE54-BPglmQhG.js} +1 -1
- package/dist/client/assets/{card-D4ek-VvX.js → card-DI7YtQh3.js} +1 -1
- package/dist/client/assets/channel-A2WD4smw.js +1 -0
- package/dist/client/assets/{chunk-2E7WHVMD-ClO15ze9.js → chunk-2E7WHVMD-DIK6CHka.js} +1 -1
- package/dist/client/assets/{chunk-2Q5K7J3B-DsLDzf_i.js → chunk-2Q5K7J3B-C3uATYd9.js} +1 -1
- package/dist/client/assets/{chunk-4EMNKR2T-D20fXIIK.js → chunk-4EMNKR2T-Dl3iYXVl.js} +1 -1
- package/dist/client/assets/{chunk-55XCU76K-no_S5sRX.js → chunk-55XCU76K-BJF-Hcs9.js} +1 -1
- package/dist/client/assets/{chunk-5VM5RSS4-D5xWEZ2p.js → chunk-5VM5RSS4-Cju3BnqQ.js} +1 -1
- package/dist/client/assets/{chunk-JWPE2WC7-CnsdZOv0.js → chunk-JWPE2WC7-v1omZzgE.js} +1 -1
- package/dist/client/assets/{chunk-VQ5W62QI-DxYg8tsH.js → chunk-VQ5W62QI-2HqA3jPL.js} +1 -1
- package/dist/client/assets/{chunk-XXDRQBXY-7CQ-MKdC.js → chunk-XXDRQBXY-RDXwFs9Z.js} +1 -1
- package/dist/client/assets/{chunk-ZCHMQSOR-Ca7Jh42b.js → chunk-ZCHMQSOR-DhQsY-OT.js} +2 -2
- package/dist/client/assets/{classDiagram-v2-4MYWR3UA-BvZXavcI.js → classDiagram-v2-4MYWR3UA-DC5N-GDk.js} +1 -1
- package/dist/client/assets/{command-srO4Wv-5.js → command-DpK0GpDM.js} +1 -1
- package/dist/client/assets/{cose-bilkent-JH36ORCC-1NCiJaHv.js → cose-bilkent-JH36ORCC-BriFsb6c.js} +1 -1
- package/dist/client/assets/{cpu-CFIu4JtK.js → cpu-DzCUBK-1.js} +1 -1
- package/dist/client/assets/{cynefin-EF2NZ3EQ-DgZeohG3.js → cynefin-EF2NZ3EQ-cj34OpiI.js} +1 -1
- package/dist/client/assets/{cynefinDiagram-WF24UDRP-MQB2xbJK.js → cynefinDiagram-WF24UDRP-DvAggKpl.js} +1 -1
- package/dist/client/assets/{dagre-NK4GIZVX-BFHk_Y44.js → dagre-NK4GIZVX-BskSpt7C.js} +1 -1
- package/dist/client/assets/{diagram-CBK3MWTC-CloEvZfp.js → diagram-CBK3MWTC-C6BZljcO.js} +1 -1
- package/dist/client/assets/{diagram-I5XIIV2D-9nzUtfKI.js → diagram-I5XIIV2D--4FPRmBZ.js} +1 -1
- package/dist/client/assets/{diagram-ODIL2UCW-DVdnelgu.js → diagram-ODIL2UCW-kZxp81Fr.js} +1 -1
- package/dist/client/assets/{diagram-PFBEJUXE-tTEeiAHa.js → diagram-PFBEJUXE-BSXBAffS.js} +1 -1
- package/dist/client/assets/{diagram-RJA3I4VV-QFehV9_1.js → diagram-RJA3I4VV-DLDPF6FG.js} +1 -1
- package/dist/client/assets/{diagram-TYUNFSNR-CYU5li-4.js → diagram-TYUNFSNR-CoU2knZy.js} +1 -1
- package/dist/client/assets/{ebnfDiagram-V4P3TTPT-Cn040Beg.js → ebnfDiagram-V4P3TTPT-C77T1UPB.js} +1 -1
- package/dist/client/assets/{elk-QONTBCTQ-tBbnwcb3.js → elk-QONTBCTQ-UFXrlbAn.js} +1 -1
- package/dist/client/assets/{empty-state-Bxfi7_ss.js → empty-state-aNwJA6H8.js} +1 -1
- package/dist/client/assets/{erDiagram-KYQIGQAA-DAA0fFlD.js → erDiagram-KYQIGQAA-CyLB8fKu.js} +1 -1
- package/dist/client/assets/{execution-config-afKaYukD.js → execution-config-D7JzMYC2.js} +1 -1
- package/dist/client/assets/{file-C-ooqbRY.js → file-bSD5jgk_.js} +1 -1
- package/dist/client/assets/{file-exclamation-point-BWWgLsMF.js → file-exclamation-point-BcCIL-rE.js} +1 -1
- package/dist/client/assets/{file-text-BJt8biPY.js → file-text-DTvj1wzM.js} +1 -1
- package/dist/client/assets/{find-latest-widget-fence-DPQimlUD.js → find-latest-widget-fence-D01ENK2h.js} +1 -1
- package/dist/client/assets/{flowDiagram-IUGLLWBU-vYI6TodS.js → flowDiagram-IUGLLWBU-qmnUF-Ak.js} +1 -1
- package/dist/client/assets/{form-LJ2Rf9ny.js → form-C_yPntkz.js} +1 -1
- package/dist/client/assets/{format-cron-DrUISrHj.js → format-cron-DUPWkOrW.js} +1 -1
- package/dist/client/assets/{ganttDiagram-R7GPNTJY-DLYpSX7r.js → ganttDiagram-R7GPNTJY-CBzoqGuU.js} +1 -1
- package/dist/client/assets/{git-branch-D5xr7U5P.js → git-branch-ClXAt1_G.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PDYL7XHY-DNIbVOaY.js → gitGraphDiagram-PDYL7XHY-DMh_n1S2.js} +1 -1
- package/dist/client/assets/{graph-DNjxkUSL.js → graph-BgkuepqW.js} +1 -1
- package/dist/client/assets/{heart-DnR_GX4I.js → heart-BrjEmIsl.js} +1 -1
- package/dist/client/assets/{highlighted-body-KPVGNVTW-L_Jd2uei.js → highlighted-body-KPVGNVTW-DlHNVEaV.js} +1 -1
- package/dist/client/assets/{image-lightbox-DZIhMyF3.js → image-lightbox-BtzkRztd.js} +1 -1
- package/dist/client/assets/{image-off-DdvvVxmq.js → image-off-4yaoLh32.js} +1 -1
- package/dist/client/assets/{index-B0jt7Nng.js → index-6yT0Qr0s.js} +1 -1
- package/dist/client/assets/{index-Ixk2o7yl.js → index-A_qzw4D8.js} +1 -1
- package/dist/client/assets/{index-adYd35CJ.js → index-Adjbt_HC.js} +1 -1
- package/dist/client/assets/{index-CXWlrRzK.js → index-B-X82FND.js} +1 -1
- package/dist/client/assets/{index-BzKkoaB1.js → index-BMCDckcY.js} +1 -1
- package/dist/client/assets/index-BOuCpkRb.js +1 -0
- package/dist/client/assets/{index-DTuNXPGU.js → index-BUkUamu4.js} +1 -1
- package/dist/client/assets/index-BVq1p60h.js +1 -0
- package/dist/client/assets/{index-By8pKNSM.js → index-BXtagrMY.js} +1 -1
- package/dist/client/assets/{index-CQ2atcs_.js → index-BeVLPg9t.js} +1 -1
- package/dist/client/assets/{index-ld6lMfGU.js → index-Bgg4cW4L.js} +1 -1
- package/dist/client/assets/{index-Ba9q2CoQ.js → index-BqHUbNdh.js} +1 -1
- package/dist/client/assets/{index-DqCxUalt.js → index-BtG4vr8c.js} +1 -1
- package/dist/client/assets/{index-BsHyymmC.js → index-C0LPB1iH.js} +1 -1
- package/dist/client/assets/{index-CDo6TA8n.js → index-CJhmUsIv.js} +1 -1
- package/dist/client/assets/{index-a6ojvFqI.js → index-CMLDdOez.js} +1 -1
- package/dist/client/assets/{index-D-Q7CW4p.js → index-CNV11SW6.js} +1 -1
- package/dist/client/assets/{index-9GoQjBFo.js → index-CNiC7KUz.js} +1 -1
- package/dist/client/assets/{index-By-VWzSF.js → index-CSyZb1X9.js} +1 -1
- package/dist/client/assets/{index-B1gC3xYN.js → index-CThGpHO2.js} +1 -1
- package/dist/client/assets/{index-uIonuakd.js → index-C_H6ZIel.js} +1 -1
- package/dist/client/assets/{index-ANmu61E0.js → index-C_xSr5lb.js} +1 -1
- package/dist/client/assets/{index-r0stHl-2.js → index-Cefoks17.js} +1 -1
- package/dist/client/assets/{index-DKTd8X7n.js → index-CjUfPyOM.js} +261 -261
- package/dist/client/assets/{index-DXWsH2Ep.js → index-Ckut3u-d.js} +1 -1
- package/dist/client/assets/{index-BFecX5dC.js → index-CrQWuUpr.js} +1 -1
- package/dist/client/assets/{index-xfRcAp50.js → index-CyfSPJ1D.js} +1 -1
- package/dist/client/assets/{index-CSqz4B0v.js → index-D0yajRDv.js} +1 -1
- package/dist/client/assets/index-D2ZFfqZZ.css +1 -0
- package/dist/client/assets/{index-ZYbeRA5f.js → index-DB2t3GUm.js} +3 -3
- package/dist/client/assets/{index-Bri5bZfv.js → index-DFWrO42z.js} +1 -1
- package/dist/client/assets/{index-BqKjnd_r.js → index-DGdKO24t.js} +1 -1
- package/dist/client/assets/{index-5hCWBj-r.js → index-DQ9ppIWv.js} +1 -1
- package/dist/client/assets/{index-DjFFFMc-.js → index-DX546SK5.js} +2 -2
- package/dist/client/assets/{index-Blhsfk7u.js → index-DXalAOXT.js} +1 -1
- package/dist/client/assets/{index-CDGWl8qL.js → index-DZ1BC5JW.js} +1 -1
- package/dist/client/assets/{index-BAIKz_P0.js → index-DgxXSEmR.js} +1 -1
- package/dist/client/assets/{index-BsmR2hi4.js → index-Dj4I8KcL.js} +3 -3
- package/dist/client/assets/{index-Bpwvxz0c.js → index-DrnHzrt4.js} +1 -1
- package/dist/client/assets/{index-CLQIvYHP.js → index-FhmSwVD0.js} +1 -1
- package/dist/client/assets/{index-BWQfqbbe.js → index-WkQdt6Zo.js} +1 -1
- package/dist/client/assets/{index-BYeyKNKj.js → index-WxG6nG96.js} +1 -1
- package/dist/client/assets/{index-D0ujPZdD.js → index-f1W4Bd4W.js} +1 -1
- package/dist/client/assets/{index-B2wx4J9U.js → index-qdygDruh.js} +1 -1
- package/dist/client/assets/{index-CLbs0fcq.js → index-t-NyR7HD.js} +1 -1
- package/dist/client/assets/{index.esm-j5KQ_b6S.js → index.esm-Bb3LMu5X.js} +1 -1
- package/dist/client/assets/{infoDiagram-MVDRKAX5-DjvSkTas.js → infoDiagram-MVDRKAX5-DbU4eDjZ.js} +1 -1
- package/dist/client/assets/{inline-code-DlVYFFW7.js → inline-code-DwFNff3_.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-HPEHV2GE-BBivrI5n.js → ishikawaDiagram-HPEHV2GE-DmHmF-HT.js} +1 -1
- package/dist/client/assets/{journeyDiagram-BOSHW7O7-DKdhbtdx.js → journeyDiagram-BOSHW7O7-DsjOeP3J.js} +1 -1
- package/dist/client/assets/{kanban-definition-FNSA4HC5-CkgAodR5.js → kanban-definition-FNSA4HC5-ByQ1WGy2.js} +1 -1
- package/dist/client/assets/{layers-CzyhuVSM.js → layers-DFZUUHM5.js} +1 -1
- package/dist/client/assets/{lightbulb-DwGE7s99.js → lightbulb-Bbgsejp1.js} +1 -1
- package/dist/client/assets/{link-2-CljREnN9.js → link-2-xieOmwOK.js} +1 -1
- package/dist/client/assets/{list-runtime-types-D5ZO30FL.js → list-runtime-types-B0CSonAi.js} +1 -1
- package/dist/client/assets/{markdown-content-CN_dGlgE.js → markdown-content-ysBIqFAg.js} +1 -1
- package/dist/client/assets/{mention-pill-C6OT4gx4.js → mention-pill-Daeu1X92.js} +1 -1
- package/dist/client/assets/{mermaid.core-DNuzxE7q.js → mermaid.core-B1mQMOXd.js} +4 -4
- package/dist/client/assets/{message-square-off-DlkAPJdd.js → message-square-off-D9hm8WNH.js} +1 -1
- package/dist/client/assets/{mindmap-definition-6OY57UG3-f9ygKKO1.js → mindmap-definition-6OY57UG3-CoP-DGm1.js} +1 -1
- package/dist/client/assets/{more-details-DRPervoL.js → more-details-DHCpYDi7.js} +1 -1
- package/dist/client/assets/{owner-notice-C-Q9ySA7.js → owner-notice-Crxco7HN.js} +1 -1
- package/dist/client/assets/{package-BVNiaGrb.js → package-CD8xq7hk.js} +1 -1
- package/dist/client/assets/{page-container-D03bhclt.js → page-container-B9sDc2wq.js} +1 -1
- package/dist/client/assets/{pane-resize-handle-CZ9rHhNr.js → pane-resize-handle-DOchpdJ6.js} +1 -1
- package/dist/client/assets/{paperclip-DQQVX5tJ.js → paperclip-CzhXW5qi.js} +1 -1
- package/dist/client/assets/{path-input-CQ16nhYd.js → path-input-Z2p922fj.js} +1 -1
- package/dist/client/assets/{pegDiagram-ECIUJNBX-CZ_YkcKh.js → pegDiagram-ECIUJNBX-TEsMAO1a.js} +1 -1
- package/dist/client/assets/{pieDiagram-GNMPY74T-DLHSPEH7.js → pieDiagram-GNMPY74T-CMIDIiMP.js} +1 -1
- package/dist/client/assets/{plug-CadJyjTp.js → plug-BEp9Ly3k.js} +1 -1
- package/dist/client/assets/{primer-trigger-DH4xfrlM.js → primer-trigger-4qUY83SX.js} +1 -1
- package/dist/client/assets/{profile-errors-DSnHlauU.js → profile-errors-CezsKqhA.js} +1 -1
- package/dist/client/assets/{progress-BB97hlmb.js → progress-eQl1UvNz.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-D57K4MC3-BWcUu48x.js → quadrantDiagram-D57K4MC3-DXjohzOz.js} +1 -1
- package/dist/client/assets/{query-error-state-B456s96E.js → query-error-state-COuKRlU0.js} +1 -1
- package/dist/client/assets/{radio-DrpN3x3S.js → radio-Cdnkcg1w.js} +1 -1
- package/dist/client/assets/{railroadDiagram-Y72NRBL7-C2VRM83h.js → railroadDiagram-Y72NRBL7-BojgH6Hw.js} +1 -1
- package/dist/client/assets/registry-BSucT23N.js +1 -0
- package/dist/client/assets/{relay-trace-schemas-BYCaGsVJ.js → relay-trace-schemas-XcVQg5Fa.js} +1 -1
- package/dist/client/assets/{repeat-DPzic7-j.js → repeat-wB31CP7I.js} +1 -1
- package/dist/client/assets/{requirementDiagram-EQYSW5RA-B1bpdcM7.js → requirementDiagram-EQYSW5RA-Gojbrcvg.js} +1 -1
- package/dist/client/assets/{room-files-source-aN4p_kDV.js → room-files-source-DXKpm43a.js} +1 -1
- package/dist/client/assets/{rotate-ccw-clock-gqBy98sI.js → rotate-ccw-clock-LSKKAcnR.js} +1 -1
- package/dist/client/assets/{rotate-cw-mHsqEte-.js → rotate-cw-scTEKxeZ.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-SY24JHO5-QCGTTh9k.js → sankeyDiagram-SY24JHO5-QS71aycL.js} +1 -1
- package/dist/client/assets/{scroll-area-DVd6ctli.js → scroll-area-BNFXgTKM.js} +1 -1
- package/dist/client/assets/{search-x-CzgTzL0z.js → search-x-Cjf0n9z7.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-BLEHNHQU-kiR1gX_u.js → sequenceDiagram-BLEHNHQU-Beg7mj69.js} +1 -1
- package/dist/client/assets/{shield-x-Btfd3Xnx.js → shield-x-Dr4BZfo_.js} +1 -1
- package/dist/client/assets/{signed-in-gS3tMpTW.js → signed-in-L9MLqTuc.js} +1 -1
- package/dist/client/assets/{sizeCapture-INFHLROL-Da56aMj0.js → sizeCapture-INFHLROL-3Oo1KjRp.js} +1 -1
- package/dist/client/assets/{soul-file-C7zd1yXt.js → soul-file-CxpOawh5.js} +1 -1
- package/dist/client/assets/{stateDiagram-v2-A6IESKWZ-BZ3qlQWl.js → stateDiagram-v2-A6IESKWZ-DFYIDQ6C.js} +1 -1
- package/dist/client/assets/{swimlanes-B3ENRKFQ-B-wp91_T.js → swimlanes-B3ENRKFQ-BUgKOOrv.js} +1 -1
- package/dist/client/assets/swimlanesDiagram-AYQRV4AK-Bqjv1MSj.js +8 -0
- package/dist/client/assets/{table-BIdFvzBs.js → table-B0LsKsEv.js} +1 -1
- package/dist/client/assets/{timeline-definition-JXYKGLGB-CQojjy-8.js → timeline-definition-JXYKGLGB-BsPZ0P_8.js} +1 -1
- package/dist/client/assets/{trust-posture-DszobEjt.js → trust-posture-Cm7OhCEx.js} +1 -1
- package/dist/client/assets/{unplug-xlfZ61jC.js → unplug-DLA7Ib_s.js} +1 -1
- package/dist/client/assets/{unverified-catalog-notice-DymrAwtm.js → unverified-catalog-notice-CxBO_pta.js} +1 -1
- package/dist/client/assets/{use-adapter-catalog-CytBTafV.js → use-adapter-catalog-C333Z2Q6.js} +1 -1
- package/dist/client/assets/{use-bindings-BPNK3sUh.js → use-bindings-Bu4yLLR5.js} +1 -1
- package/dist/client/assets/{use-composer-prefs-DMQT0qiv.js → use-composer-prefs-BnjCX9pM.js} +1 -1
- package/dist/client/assets/{use-connector-management-PDVdWccW.js → use-connector-management-Bo6wOJQS.js} +1 -1
- package/dist/client/assets/{use-deep-link-scroll-CwapSmGj.js → use-deep-link-scroll-D867V6rs.js} +1 -1
- package/dist/client/assets/{use-delete-binding-CgTwS83G.js → use-delete-binding-DKObM-zT.js} +1 -1
- package/dist/client/assets/{use-dev-links-BoZCIc4h.js → use-dev-links-C0Zc30aj.js} +1 -1
- package/dist/client/assets/{use-direct-message-panel-Cs4I6669.js → use-direct-message-panel-DNWtQq4B.js} +1 -1
- package/dist/client/assets/{use-external-adapter-catalog-PBrsasQ8.js → use-external-adapter-catalog-Bv5rDkX4.js} +1 -1
- package/dist/client/assets/{use-full-activity-feed-C2seN-V1.js → use-full-activity-feed-CFUj0qCS.js} +1 -1
- package/dist/client/assets/use-is-below-desktop-BUS7OPGv.js +1 -0
- package/dist/client/assets/use-is-hub-CFhvDMHt.js +1 -0
- package/dist/client/assets/{use-local-browser-CF0uGQ6e.js → use-local-browser-BeZjn0gA.js} +1 -1
- package/dist/client/assets/{use-mesh-topology-CnCeK4gS.js → use-mesh-topology-DurMpvjU.js} +1 -1
- package/dist/client/assets/{use-mounted-ref-BtAb14HI.js → use-mounted-ref-CBSuPNPv.js} +1 -1
- package/dist/client/assets/{use-notification-prefs-B8LHpZTt.js → use-notification-prefs-b8iKvzB4.js} +1 -1
- package/dist/client/assets/{use-panel-tab-placements-DOXj0Pii.js → use-panel-tab-placements-BcKEux1G.js} +1 -1
- package/dist/client/assets/use-pending-read-BBBAnUYu.js +1 -0
- package/dist/client/assets/{use-personality-commit-YV9FVC-a.js → use-personality-commit-u3kQ6h3H.js} +1 -1
- package/dist/client/assets/{use-promo-activation-CjtGhz_3.js → use-promo-activation-C8_cGmEW.js} +1 -1
- package/dist/client/assets/{use-promo-dismissals-4rbLgSDG.js → use-promo-dismissals-B3VuaQCf.js} +1 -1
- package/dist/client/assets/{use-pulse-freshness-CGqANpVO.js → use-pulse-freshness-CSWQ0TZS.js} +1 -1
- package/dist/client/assets/{use-relay-config-CvU_70WJ.js → use-relay-config-BA6c0FMB.js} +1 -1
- package/dist/client/assets/{use-room-follow-claim-Doq_lWjk.js → use-room-follow-claim-BV-MtDQ5.js} +1 -1
- package/dist/client/assets/{use-room-sessions-CoEIaBRt.js → use-room-sessions-W62Zl72O.js} +1 -1
- package/dist/client/assets/{use-roving-tab-list-BzsrpjWV.js → use-roving-tab-list-CMITzUHu.js} +1 -1
- package/dist/client/assets/{use-session-canvas-DQ9ND8il.js → use-session-canvas-u63m2mYH.js} +3 -3
- package/dist/client/assets/{use-status-budget-AnHroEO0.js → use-status-budget-CbmPFvpQ.js} +1 -1
- package/dist/client/assets/{use-unclaimed-chats-DzOLK27i.js → use-unclaimed-chats-D7SEUfiO.js} +1 -1
- package/dist/client/assets/use-update-config-Dfd7KMde.js +1 -0
- package/dist/client/assets/{useMutationState-BAU_J-u3.js → useMutationState-rOg4bnKv.js} +1 -1
- package/dist/client/assets/{usecaseDiagram-WPOLBNNX-BrHN0c6G.js → usecaseDiagram-WPOLBNNX-C-w0e-nv.js} +1 -1
- package/dist/client/assets/{vennDiagram-Q3Y3IDCW-CbeP0Pbp.js → vennDiagram-Q3Y3IDCW-BNm2WXT5.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-IVAIDKWA-mn5ebFhs.js → wardleyDiagram-IVAIDKWA-BFyFLiir.js} +1 -1
- package/dist/client/assets/{xychartDiagram-4URNHDU4-C8fXRQEv.js → xychartDiagram-4URNHDU4-BKxZlnEx.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/index.js +278 -101
- package/dist/server/index.js.map +2 -2
- package/package.json +4 -4
- package/dist/client/assets/HandlePage-tZidnrlt.js +0 -1
- package/dist/client/assets/NamePage-BS-oN_Hi.js +0 -1
- package/dist/client/assets/PhotoPage-BmFypD13.js +0 -1
- package/dist/client/assets/_shell-D7Jp6t6_.js +0 -80
- package/dist/client/assets/_shell.marketplace-6JRXJ9gt.js +0 -1
- package/dist/client/assets/_shell.marketplace_.sources-DriHXfBM.js +0 -1
- package/dist/client/assets/_shell.session-BXSWGdwi.js +0 -1
- package/dist/client/assets/_shell.x._extensionId-BNgicBXG.js +0 -1
- package/dist/client/assets/_shell.x._extensionId_._-BNgicBXG.js +0 -1
- package/dist/client/assets/channel-ClNeQ2PQ.js +0 -1
- package/dist/client/assets/index-5eNHb7up.js +0 -1
- package/dist/client/assets/index-D1kQ19Gb.css +0 -1
- package/dist/client/assets/index-DHi8-3w0.js +0 -1
- package/dist/client/assets/registry-DRvQ3ChB.js +0 -1
- package/dist/client/assets/swimlanesDiagram-AYQRV4AK-Drg_8k1s.js +0 -8
- package/dist/client/assets/use-is-below-desktop-pvzUlnxh.js +0 -1
- package/dist/client/assets/use-is-hub-CvEPWuj0.js +0 -1
- package/dist/client/assets/use-pending-read-DBaC7e8N.js +0 -1
- package/dist/client/assets/use-update-config-NRkQbxae.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{mz as HFn,R as qFn,r as cn,j as le,ez as Nhn,ji as zFn,k5 as UFn,ib as XFn,mA as KFn,ar as fN,by as Tge,B as Sge,aj as Dhn,G as i2,aS as Ige,b9 as Pge,b8 as WFn,_ as oN,f as VFn,iP as QFn,X as YFn,bx as ZFn,mB as eBn,eS as $ln,eR as nBn,ai as tBn,eP as Fln,ap as iBn,mC as rBn,ad as cBn,aw as uBn,ii as oBn,bX as AX,ff as sBn,x as Bln,ig as fBn,hM as lBn,fX as hBn,fY as aBn,fZ as dBn,f_ as bBn,f$ as wBn,g0 as gBn,g1 as pBn,g2 as mBn,ht as vBn}from"./index-DKTd8X7n.js";import{s as B0,g as Lhn,j as Oge,T as fge,k as lge,t as yBn}from"./transform-BqqRT-Iy.js";import{i as hge}from"./value-wA6veExk.js";import{H as $X}from"./_shell.team-BgJu1gDa.js";import{H as kBn}from"./heart-DnR_GX4I.js";import{a as age,A as jBn}from"./AdapterIcon-CRRs6yil.js";import"./relay-trace-schemas-BYCaGsVJ.js";import{d as EBn,c as ABn,a as MBn,B as CBn}from"./BindingDialog-BXfjFGvP.js";import{s as xBn}from"./session-strategy-labels-C7Wduch3.js";import{c as MX}from"./_commonjs-dynamic-modules-TDtrdbi3.js";import{u as TBn}from"./use-mesh-topology-CnCeK4gS.js";import{E as SBn}from"./empty-state-Bxfi7_ss.js";import{Q as Rln}from"./query-error-state-B456s96E.js";import{u as IBn}from"./use-bindings-BPNK3sUh.js";import{u as PBn}from"./use-delete-binding-CgTwS83G.js";import{u as OBn}from"./use-relay-config-CvU_70WJ.js";import"./use-pending-read-DBaC7e8N.js";import"./search-x-CzgTzL0z.js";import"./scroll-area-DVd6ctli.js";import"./OpenMeshSwitch-BBzgYSUc.js";import"./table-BIdFvzBs.js";import"./use-is-hub-CvEPWuj0.js";import"./page-container-D03bhclt.js";import"./profile-errors-DSnHlauU.js";import"./CommitmentList-S2O_hvwR.js";import"./TeamComputerEntry-BpjxLA1n.js";import"./ComputerViewer-CnYUWQBS.js";import"./form-LJ2Rf9ny.js";import"./use-adapter-catalog-CytBTafV.js";import"./trust-posture-DszobEjt.js";function Xf(p){if(typeof p=="string"||typeof p=="number")return""+p;let E="";if(Array.isArray(p))for(let P=0,N;P<p.length;P++)(N=Xf(p[P]))!==""&&(E+=(E&&" ")+N);else for(let P in p)p[P]&&(E+=(E&&" ")+P);return E}function NBn(p){let E;for(;E=p.sourceEvent;)p=E;return p}function e2(p,E){if(p=NBn(p),E===void 0&&(E=p.currentTarget),E){var P=E.ownerSVGElement||E;if(P.createSVGPoint){var N=P.createSVGPoint();return N.x=p.clientX,N.y=p.clientY,N=N.matrixTransform(E.getScreenCTM().inverse()),[N.x,N.y]}if(E.getBoundingClientRect){var D=E.getBoundingClientRect();return[p.clientX-D.left-E.clientLeft,p.clientY-D.top-E.clientTop]}}return[p.pageX,p.pageY]}const DBn={passive:!1},lN={capture:!0,passive:!1};function dge(p){p.stopImmediatePropagation()}function IA(p){p.preventDefault(),p.stopImmediatePropagation()}function $hn(p){var E=p.document.documentElement,P=B0(p).on("dragstart.drag",IA,lN);"onselectstart"in E?P.on("selectstart.drag",IA,lN):(E.__noselect=E.style.MozUserSelect,E.style.MozUserSelect="none")}function Fhn(p,E){var P=p.document.documentElement,N=B0(p).on("dragstart.drag",null);E&&(N.on("click.drag",IA,lN),setTimeout(function(){N.on("click.drag",null)},0)),"onselectstart"in P?N.on("selectstart.drag",null):(P.style.MozUserSelect=P.__noselect,delete P.__noselect)}const CX=p=>()=>p;function kge(p,{sourceEvent:E,subject:P,target:N,identifier:D,active:$,x:v,y:q,dx:te,dy:ie,dispatch:pe}){Object.defineProperties(this,{type:{value:p,enumerable:!0,configurable:!0},sourceEvent:{value:E,enumerable:!0,configurable:!0},subject:{value:P,enumerable:!0,configurable:!0},target:{value:N,enumerable:!0,configurable:!0},identifier:{value:D,enumerable:!0,configurable:!0},active:{value:$,enumerable:!0,configurable:!0},x:{value:v,enumerable:!0,configurable:!0},y:{value:q,enumerable:!0,configurable:!0},dx:{value:te,enumerable:!0,configurable:!0},dy:{value:ie,enumerable:!0,configurable:!0},_:{value:pe}})}kge.prototype.on=function(){var p=this._.on.apply(this._,arguments);return p===this._?this:p};function LBn(p){return!p.ctrlKey&&!p.button}function $Bn(){return this.parentNode}function FBn(p,E){return E??{x:p.x,y:p.y}}function BBn(){return navigator.maxTouchPoints||"ontouchstart"in this}function Bhn(){var p=LBn,E=$Bn,P=FBn,N=BBn,D={},$=Lhn("start","drag","end"),v=0,q,te,ie,pe,oe=0;function z(Ce){Ce.on("mousedown.drag",ne).filter(N).on("touchstart.drag",Ee).on("touchmove.drag",re,DBn).on("touchend.drag touchcancel.drag",we).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function ne(Ce,Qe){if(!(pe||!p.call(this,Ce,Qe))){var Xe=ee(this,E.call(this,Ce,Qe),Ce,Qe,"mouse");Xe&&(B0(Ce.view).on("mousemove.drag",Z,lN).on("mouseup.drag",U,lN),$hn(Ce.view),dge(Ce),ie=!1,q=Ce.clientX,te=Ce.clientY,Xe("start",Ce))}}function Z(Ce){if(IA(Ce),!ie){var Qe=Ce.clientX-q,Xe=Ce.clientY-te;ie=Qe*Qe+Xe*Xe>oe}D.mouse("drag",Ce)}function U(Ce){B0(Ce.view).on("mousemove.drag mouseup.drag",null),Fhn(Ce.view,ie),IA(Ce),D.mouse("end",Ce)}function Ee(Ce,Qe){if(p.call(this,Ce,Qe)){var Xe=Ce.changedTouches,Ze=E.call(this,Ce,Qe),vn=Xe.length,jn,et;for(jn=0;jn<vn;++jn)(et=ee(this,Ze,Ce,Qe,Xe[jn].identifier,Xe[jn]))&&(dge(Ce),et("start",Ce,Xe[jn]))}}function re(Ce){var Qe=Ce.changedTouches,Xe=Qe.length,Ze,vn;for(Ze=0;Ze<Xe;++Ze)(vn=D[Qe[Ze].identifier])&&(IA(Ce),vn("drag",Ce,Qe[Ze]))}function we(Ce){var Qe=Ce.changedTouches,Xe=Qe.length,Ze,vn;for(pe&&clearTimeout(pe),pe=setTimeout(function(){pe=null},500),Ze=0;Ze<Xe;++Ze)(vn=D[Qe[Ze].identifier])&&(dge(Ce),vn("end",Ce,Qe[Ze]))}function ee(Ce,Qe,Xe,Ze,vn,jn){var et=$.copy(),Dn=e2(jn||Xe,Qe),Kn,_,je;if((je=P.call(Ce,new kge("beforestart",{sourceEvent:Xe,target:z,identifier:vn,active:v,x:Dn[0],y:Dn[1],dx:0,dy:0,dispatch:et}),Ze))!=null)return Kn=je.x-Dn[0]||0,_=je.y-Dn[1]||0,function rn(sn,Sn,Bn){var dn=Dn,Jn;switch(sn){case"start":D[vn]=rn,Jn=v++;break;case"end":delete D[vn],--v;case"drag":Dn=e2(Bn||Sn,Qe),Jn=v;break}et.call(sn,Ce,new kge(sn,{sourceEvent:Sn,subject:je,target:z,identifier:vn,active:Jn,x:Dn[0]+Kn,y:Dn[1]+_,dx:Dn[0]-dn[0],dy:Dn[1]-dn[1],dispatch:et}),Ze)}}return z.filter=function(Ce){return arguments.length?(p=typeof Ce=="function"?Ce:CX(!!Ce),z):p},z.container=function(Ce){return arguments.length?(E=typeof Ce=="function"?Ce:CX(Ce),z):E},z.subject=function(Ce){return arguments.length?(P=typeof Ce=="function"?Ce:CX(Ce),z):P},z.touchable=function(Ce){return arguments.length?(N=typeof Ce=="function"?Ce:CX(!!Ce),z):N},z.on=function(){var Ce=$.on.apply($,arguments);return Ce===$?z:Ce},z.clickDistance=function(Ce){return arguments.length?(oe=(Ce=+Ce)*Ce,z):Math.sqrt(oe)},z}var RBn=1e-12;function _ln(p){return((p=Math.exp(p))+1/p)/2}function _Bn(p){return((p=Math.exp(p))-1/p)/2}function JBn(p){return((p=Math.exp(2*p))-1)/(p+1)}const NX=(function p(E,P,N){function D($,v){var q=$[0],te=$[1],ie=$[2],pe=v[0],oe=v[1],z=v[2],ne=pe-q,Z=oe-te,U=ne*ne+Z*Z,Ee,re;if(U<RBn)re=Math.log(z/ie)/E,Ee=function(Ze){return[q+Ze*ne,te+Ze*Z,ie*Math.exp(E*Ze*re)]};else{var we=Math.sqrt(U),ee=(z*z-ie*ie+N*U)/(2*ie*P*we),Ce=(z*z-ie*ie-N*U)/(2*z*P*we),Qe=Math.log(Math.sqrt(ee*ee+1)-ee),Xe=Math.log(Math.sqrt(Ce*Ce+1)-Ce);re=(Xe-Qe)/E,Ee=function(Ze){var vn=Ze*re,jn=_ln(Qe),et=ie/(P*we)*(jn*JBn(E*vn+Qe)-_Bn(Qe));return[q+et*ne,te+et*Z,ie*jn/_ln(E*vn+Qe)]}}return Ee.duration=re*1e3*E/Math.SQRT2,Ee}return D.rho=function($){var v=Math.max(.001,+$),q=v*v,te=q*q;return p(v,q,te)},D})(Math.SQRT2,2,4),xX=p=>()=>p;function GBn(p,{sourceEvent:E,target:P,transform:N,dispatch:D}){Object.defineProperties(this,{type:{value:p,enumerable:!0,configurable:!0},sourceEvent:{value:E,enumerable:!0,configurable:!0},target:{value:P,enumerable:!0,configurable:!0},transform:{value:N,enumerable:!0,configurable:!0},_:{value:D}})}function bge(p){p.stopImmediatePropagation()}function uN(p){p.preventDefault(),p.stopImmediatePropagation()}function HBn(p){return(!p.ctrlKey||p.type==="wheel")&&!p.button}function qBn(){var p=this;return p instanceof SVGElement?(p=p.ownerSVGElement||p,p.hasAttribute("viewBox")?(p=p.viewBox.baseVal,[[p.x,p.y],[p.x+p.width,p.y+p.height]]):[[0,0],[p.width.baseVal.value,p.height.baseVal.value]]):[[0,0],[p.clientWidth,p.clientHeight]]}function Jln(){return this.__zoom||Oge}function zBn(p){return-p.deltaY*(p.deltaMode===1?.05:p.deltaMode?1:.002)*(p.ctrlKey?10:1)}function UBn(){return navigator.maxTouchPoints||"ontouchstart"in this}function XBn(p,E,P){var N=p.invertX(E[0][0])-P[0][0],D=p.invertX(E[1][0])-P[1][0],$=p.invertY(E[0][1])-P[0][1],v=p.invertY(E[1][1])-P[1][1];return p.translate(D>N?(N+D)/2:Math.min(0,N)||Math.max(0,D),v>$?($+v)/2:Math.min(0,$)||Math.max(0,v))}function Rhn(){var p=HBn,E=qBn,P=XBn,N=zBn,D=UBn,$=[0,1/0],v=[[-1/0,-1/0],[1/0,1/0]],q=250,te=NX,ie=Lhn("start","zoom","end"),pe,oe,z,ne=500,Z=150,U=0,Ee=10;function re(je){je.property("__zoom",Jln).on("wheel.zoom",vn,{passive:!1}).on("mousedown.zoom",jn).on("dblclick.zoom",et).filter(D).on("touchstart.zoom",Dn).on("touchmove.zoom",Kn).on("touchend.zoom touchcancel.zoom",_).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}re.transform=function(je,rn,sn,Sn){var Bn=je.selection?je.selection():je;Bn.property("__zoom",Jln),je!==Bn?Qe(je,rn,sn,Sn):Bn.interrupt().each(function(){Xe(this,arguments).event(Sn).start().zoom(null,typeof rn=="function"?rn.apply(this,arguments):rn).end()})},re.scaleBy=function(je,rn,sn,Sn){re.scaleTo(je,function(){var Bn=this.__zoom.k,dn=typeof rn=="function"?rn.apply(this,arguments):rn;return Bn*dn},sn,Sn)},re.scaleTo=function(je,rn,sn,Sn){re.transform(je,function(){var Bn=E.apply(this,arguments),dn=this.__zoom,Jn=sn==null?Ce(Bn):typeof sn=="function"?sn.apply(this,arguments):sn,Nn=dn.invert(Jn),qn=typeof rn=="function"?rn.apply(this,arguments):rn;return P(ee(we(dn,qn),Jn,Nn),Bn,v)},sn,Sn)},re.translateBy=function(je,rn,sn,Sn){re.transform(je,function(){return P(this.__zoom.translate(typeof rn=="function"?rn.apply(this,arguments):rn,typeof sn=="function"?sn.apply(this,arguments):sn),E.apply(this,arguments),v)},null,Sn)},re.translateTo=function(je,rn,sn,Sn,Bn){re.transform(je,function(){var dn=E.apply(this,arguments),Jn=this.__zoom,Nn=Sn==null?Ce(dn):typeof Sn=="function"?Sn.apply(this,arguments):Sn;return P(Oge.translate(Nn[0],Nn[1]).scale(Jn.k).translate(typeof rn=="function"?-rn.apply(this,arguments):-rn,typeof sn=="function"?-sn.apply(this,arguments):-sn),dn,v)},Sn,Bn)};function we(je,rn){return rn=Math.max($[0],Math.min($[1],rn)),rn===je.k?je:new fge(rn,je.x,je.y)}function ee(je,rn,sn){var Sn=rn[0]-sn[0]*je.k,Bn=rn[1]-sn[1]*je.k;return Sn===je.x&&Bn===je.y?je:new fge(je.k,Sn,Bn)}function Ce(je){return[(+je[0][0]+ +je[1][0])/2,(+je[0][1]+ +je[1][1])/2]}function Qe(je,rn,sn,Sn){je.on("start.zoom",function(){Xe(this,arguments).event(Sn).start()}).on("interrupt.zoom end.zoom",function(){Xe(this,arguments).event(Sn).end()}).tween("zoom",function(){var Bn=this,dn=arguments,Jn=Xe(Bn,dn).event(Sn),Nn=E.apply(Bn,dn),qn=sn==null?Ce(Nn):typeof sn=="function"?sn.apply(Bn,dn):sn,Jt=Math.max(Nn[1][0]-Nn[0][0],Nn[1][1]-Nn[0][1]),Xt=Bn.__zoom,Oi=typeof rn=="function"?rn.apply(Bn,dn):rn,gr=te(Xt.invert(qn).concat(Jt/Xt.k),Oi.invert(qn).concat(Jt/Oi.k));return function(Ki){if(Ki===1)Ki=Oi;else{var Wn=gr(Ki),ei=Jt/Wn[2];Ki=new fge(ei,qn[0]-Wn[0]*ei,qn[1]-Wn[1]*ei)}Jn.zoom(null,Ki)}})}function Xe(je,rn,sn){return!sn&&je.__zooming||new Ze(je,rn)}function Ze(je,rn){this.that=je,this.args=rn,this.active=0,this.sourceEvent=null,this.extent=E.apply(je,rn),this.taps=0}Ze.prototype={event:function(je){return je&&(this.sourceEvent=je),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(je,rn){return this.mouse&&je!=="mouse"&&(this.mouse[1]=rn.invert(this.mouse[0])),this.touch0&&je!=="touch"&&(this.touch0[1]=rn.invert(this.touch0[0])),this.touch1&&je!=="touch"&&(this.touch1[1]=rn.invert(this.touch1[0])),this.that.__zoom=rn,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(je){var rn=B0(this.that).datum();ie.call(je,this.that,new GBn(je,{sourceEvent:this.sourceEvent,target:re,transform:this.that.__zoom,dispatch:ie}),rn)}};function vn(je,...rn){if(!p.apply(this,arguments))return;var sn=Xe(this,rn).event(je),Sn=this.__zoom,Bn=Math.max($[0],Math.min($[1],Sn.k*Math.pow(2,N.apply(this,arguments)))),dn=e2(je);if(sn.wheel)(sn.mouse[0][0]!==dn[0]||sn.mouse[0][1]!==dn[1])&&(sn.mouse[1]=Sn.invert(sn.mouse[0]=dn)),clearTimeout(sn.wheel);else{if(Sn.k===Bn)return;sn.mouse=[dn,Sn.invert(dn)],lge(this),sn.start()}uN(je),sn.wheel=setTimeout(Jn,Z),sn.zoom("mouse",P(ee(we(Sn,Bn),sn.mouse[0],sn.mouse[1]),sn.extent,v));function Jn(){sn.wheel=null,sn.end()}}function jn(je,...rn){if(z||!p.apply(this,arguments))return;var sn=je.currentTarget,Sn=Xe(this,rn,!0).event(je),Bn=B0(je.view).on("mousemove.zoom",qn,!0).on("mouseup.zoom",Jt,!0),dn=e2(je,sn),Jn=je.clientX,Nn=je.clientY;$hn(je.view),bge(je),Sn.mouse=[dn,this.__zoom.invert(dn)],lge(this),Sn.start();function qn(Xt){if(uN(Xt),!Sn.moved){var Oi=Xt.clientX-Jn,gr=Xt.clientY-Nn;Sn.moved=Oi*Oi+gr*gr>U}Sn.event(Xt).zoom("mouse",P(ee(Sn.that.__zoom,Sn.mouse[0]=e2(Xt,sn),Sn.mouse[1]),Sn.extent,v))}function Jt(Xt){Bn.on("mousemove.zoom mouseup.zoom",null),Fhn(Xt.view,Sn.moved),uN(Xt),Sn.event(Xt).end()}}function et(je,...rn){if(p.apply(this,arguments)){var sn=this.__zoom,Sn=e2(je.changedTouches?je.changedTouches[0]:je,this),Bn=sn.invert(Sn),dn=sn.k*(je.shiftKey?.5:2),Jn=P(ee(we(sn,dn),Sn,Bn),E.apply(this,rn),v);uN(je),q>0?B0(this).transition().duration(q).call(Qe,Jn,Sn,je):B0(this).call(re.transform,Jn,Sn,je)}}function Dn(je,...rn){if(p.apply(this,arguments)){var sn=je.touches,Sn=sn.length,Bn=Xe(this,rn,je.changedTouches.length===Sn).event(je),dn,Jn,Nn,qn;for(bge(je),Jn=0;Jn<Sn;++Jn)Nn=sn[Jn],qn=e2(Nn,this),qn=[qn,this.__zoom.invert(qn),Nn.identifier],Bn.touch0?!Bn.touch1&&Bn.touch0[2]!==qn[2]&&(Bn.touch1=qn,Bn.taps=0):(Bn.touch0=qn,dn=!0,Bn.taps=1+!!pe);pe&&(pe=clearTimeout(pe)),dn&&(Bn.taps<2&&(oe=qn[0],pe=setTimeout(function(){pe=null},ne)),lge(this),Bn.start())}}function Kn(je,...rn){if(this.__zooming){var sn=Xe(this,rn).event(je),Sn=je.changedTouches,Bn=Sn.length,dn,Jn,Nn,qn;for(uN(je),dn=0;dn<Bn;++dn)Jn=Sn[dn],Nn=e2(Jn,this),sn.touch0&&sn.touch0[2]===Jn.identifier?sn.touch0[0]=Nn:sn.touch1&&sn.touch1[2]===Jn.identifier&&(sn.touch1[0]=Nn);if(Jn=sn.that.__zoom,sn.touch1){var Jt=sn.touch0[0],Xt=sn.touch0[1],Oi=sn.touch1[0],gr=sn.touch1[1],Ki=(Ki=Oi[0]-Jt[0])*Ki+(Ki=Oi[1]-Jt[1])*Ki,Wn=(Wn=gr[0]-Xt[0])*Wn+(Wn=gr[1]-Xt[1])*Wn;Jn=we(Jn,Math.sqrt(Ki/Wn)),Nn=[(Jt[0]+Oi[0])/2,(Jt[1]+Oi[1])/2],qn=[(Xt[0]+gr[0])/2,(Xt[1]+gr[1])/2]}else if(sn.touch0)Nn=sn.touch0[0],qn=sn.touch0[1];else return;sn.zoom("touch",P(ee(Jn,Nn,qn),sn.extent,v))}}function _(je,...rn){if(this.__zooming){var sn=Xe(this,rn).event(je),Sn=je.changedTouches,Bn=Sn.length,dn,Jn;for(bge(je),z&&clearTimeout(z),z=setTimeout(function(){z=null},ne),dn=0;dn<Bn;++dn)Jn=Sn[dn],sn.touch0&&sn.touch0[2]===Jn.identifier?delete sn.touch0:sn.touch1&&sn.touch1[2]===Jn.identifier&&delete sn.touch1;if(sn.touch1&&!sn.touch0&&(sn.touch0=sn.touch1,delete sn.touch1),sn.touch0)sn.touch0[1]=this.__zoom.invert(sn.touch0[0]);else if(sn.end(),sn.taps===2&&(Jn=e2(Jn,this),Math.hypot(oe[0]-Jn[0],oe[1]-Jn[1])<Ee)){var Nn=B0(this).on("dblclick.zoom");Nn&&Nn.apply(this,arguments)}}}return re.wheelDelta=function(je){return arguments.length?(N=typeof je=="function"?je:xX(+je),re):N},re.filter=function(je){return arguments.length?(p=typeof je=="function"?je:xX(!!je),re):p},re.touchable=function(je){return arguments.length?(D=typeof je=="function"?je:xX(!!je),re):D},re.extent=function(je){return arguments.length?(E=typeof je=="function"?je:xX([[+je[0][0],+je[0][1]],[+je[1][0],+je[1][1]]]),re):E},re.scaleExtent=function(je){return arguments.length?($[0]=+je[0],$[1]=+je[1],re):[$[0],$[1]]},re.translateExtent=function(je){return arguments.length?(v[0][0]=+je[0][0],v[1][0]=+je[1][0],v[0][1]=+je[0][1],v[1][1]=+je[1][1],re):[[v[0][0],v[0][1]],[v[1][0],v[1][1]]]},re.constrain=function(je){return arguments.length?(P=je,re):P},re.duration=function(je){return arguments.length?(q=+je,re):q},re.interpolate=function(je){return arguments.length?(te=je,re):te},re.on=function(){var je=ie.on.apply(ie,arguments);return je===ie?re:je},re.clickDistance=function(je){return arguments.length?(U=(je=+je)*je,re):Math.sqrt(U)},re.tapDistance=function(je){return arguments.length?(Ee=+je,re):Ee},re}const r2={error001:(p="react")=>`Seems like you have not used ${p==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${p}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:p=>`Node type "${p}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:p=>`The old edge with id=${p} does not exist.`,error009:p=>`Marker type "${p}" doesn't exist.`,error008:(p,{id:E,sourceHandle:P,targetHandle:N})=>`Couldn't create edge for ${p} handle id: "${p==="source"?P:N}", edge id: ${E}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:p=>`Edge type "${p}" not found. Using fallback type "default".`,error012:p=>`Node with id "${p}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(p="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${p}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:p=>`Edge with id "${p}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},hN=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],_hn=["Enter"," ","Escape"],Jhn={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:p,x:E,y:P})=>`Moved selected node ${p}. New position, x: ${E}, y: ${P}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var PA;(function(p){p.Strict="strict",p.Loose="loose"})(PA||(PA={}));var nk;(function(p){p.Free="free",p.Vertical="vertical",p.Horizontal="horizontal"})(nk||(nk={}));var aN;(function(p){p.Partial="partial",p.Full="full"})(aN||(aN={}));const Ghn={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var z5;(function(p){p.Bezier="default",p.Straight="straight",p.Step="step",p.SmoothStep="smoothstep",p.SimpleBezier="simplebezier"})(z5||(z5={}));var dN;(function(p){p.Arrow="arrow",p.ArrowClosed="arrowclosed"})(dN||(dN={}));var ji;(function(p){p.Left="left",p.Top="top",p.Right="right",p.Bottom="bottom"})(ji||(ji={}));const Gln={[ji.Left]:ji.Right,[ji.Right]:ji.Left,[ji.Top]:ji.Bottom,[ji.Bottom]:ji.Top},Hhn=p=>!!p&&typeof p=="object"&&"id"in p&&"source"in p&&"target"in p,KBn=p=>!!p&&typeof p=="object"&&"id"in p&&"position"in p&&!("source"in p)&&!("target"in p),Nge=p=>!!p&&typeof p=="object"&&"id"in p&&"internals"in p&&!("source"in p)&&!("target"in p),pN=(p,E=[0,0])=>{const{width:P,height:N}=c2(p),D=p.origin??E,$=P*D[0],v=N*D[1];return{x:p.position.x-$,y:p.position.y-v}},WBn=(p,E={nodeOrigin:[0,0]})=>{if(p.length===0)return{x:0,y:0,width:0,height:0};let P=!1;const N=p.reduce((D,$)=>{const v=typeof $=="string";let q=!E.nodeLookup&&!v?$:void 0;return E.nodeLookup&&(q=v?E.nodeLookup.get($):Nge($)?$:E.nodeLookup.get($.id)),q?(P=!0,JX(D,FX(q,E.nodeOrigin))):D},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return P?GX(N):{x:0,y:0,width:0,height:0}},LA=(p,E={})=>{let P={x:1/0,y:1/0,x2:-1/0,y2:-1/0},N=!1;return p.forEach(D=>{(E.filter===void 0||E.filter(D))&&(P=JX(P,FX(D)),N=!0)}),N?GX(P):{x:0,y:0,width:0,height:0}},Dge=(p,E,[P,N,D]=[0,0,1],$=!1,v=!1)=>{const q=(E.x-P)/D,te=(E.y-N)/D,ie=E.width/D,pe=E.height/D,oe=[];for(const z of p.values()){const{measured:ne,selectable:Z=!0,hidden:U=!1}=z;if(v&&!Z||U)continue;const Ee=ne.width??z.width??z.initialWidth??0,re=ne.height??z.height??z.initialHeight??0,{x:we,y:ee}=z.internals.positionAbsolute,Ce=Xhn(q,te,ie,pe,we,ee,Ee,re),Qe=Ee*re,Xe=$&&Ce>0;(!z.internals.handleBounds||Xe||Ce>=Qe||z.dragging)&&oe.push(z)}return oe},VBn=(p,E)=>{const P=new Set;return p.forEach(N=>{P.add(N.id)}),E.filter(N=>P.has(N.source)||P.has(N.target))};function QBn(p,E){const P=new Map,N=E!=null&&E.nodes?new Set(E.nodes.map(D=>D.id)):null;return p.forEach(D=>{let $;if(E!=null&&E.includeHiddenNodes){const{width:v,height:q}=c2(D);$=v>0&&q>0}else $=!!(D.measured.width&&D.measured.height&&!D.hidden);$&&(!N||N.has(D.id))&&P.set(D.id,D)}),P}async function YBn({nodes:p,width:E,height:P,panZoom:N,minZoom:D,maxZoom:$},v){if(p.size===0)return!0;const q=QBn(p,v),te=LA(q),ie=$ge(te,E,P,(v==null?void 0:v.minZoom)??D,(v==null?void 0:v.maxZoom)??$,(v==null?void 0:v.padding)??.1);return await N.setViewport(ie,{duration:v==null?void 0:v.duration,ease:v==null?void 0:v.ease,interpolate:v==null?void 0:v.interpolate}),!0}function qhn({nodeId:p,nextPosition:E,nodeLookup:P,nodeOrigin:N=[0,0],nodeExtent:D,onError:$}){const v=P.get(p),q=v.parentId?P.get(v.parentId):void 0,{x:te,y:ie}=q?q.internals.positionAbsolute:{x:0,y:0},pe=v.origin??N;let oe=v.extent||D;if(v.extent==="parent"&&!v.expandParent)if(!q)$==null||$("005",r2.error005());else{const{width:ne,height:Z}=c2(q);ne&&Z&&(oe=[[te,ie],[te+ne,ie+Z]])}else q&&ik(v.extent)&&(oe=[[v.extent[0][0]+te,v.extent[0][1]+ie],[v.extent[1][0]+te,v.extent[1][1]+ie]]);const z=ik(oe)?tk(E,oe,v.measured):E;return(v.measured.width===void 0||v.measured.height===void 0)&&($==null||$("015",r2.error015())),{position:{x:z.x-te+(v.measured.width??0)*pe[0],y:z.y-ie+(v.measured.height??0)*pe[1]},positionAbsolute:z}}async function ZBn({nodesToRemove:p=[],edgesToRemove:E=[],nodes:P,edges:N,onBeforeDelete:D}){const $=new Set(p.map(z=>z.id)),v=[];for(const z of P){if(z.deletable===!1)continue;const ne=$.has(z.id),Z=!ne&&z.parentId&&v.find(U=>U.id===z.parentId);(ne||Z)&&v.push(z)}const q=new Set(E.map(z=>z.id)),te=N.filter(z=>z.deletable!==!1),pe=VBn(v,te);for(const z of te)q.has(z.id)&&!pe.find(Z=>Z.id===z.id)&&pe.push(z);if(!D)return{edges:pe,nodes:v};const oe=await D({nodes:v,edges:pe});return typeof oe=="boolean"?oe?{edges:pe,nodes:v}:{edges:[],nodes:[]}:oe}const OA=(p,E=0,P=1)=>Math.min(Math.max(p,E),P),tk=(p={x:0,y:0},E,P)=>({x:OA(p.x,E[0][0],E[1][0]-((P==null?void 0:P.width)??0)),y:OA(p.y,E[0][1],E[1][1]-((P==null?void 0:P.height)??0))});function zhn(p,E,P){const{width:N,height:D}=c2(P),{x:$,y:v}=P.internals.positionAbsolute;return tk(p,[[$,v],[$+N,v+D]],E)}const Hln=(p,E,P)=>p<E?OA(Math.abs(p-E),1,E)/E:p>P?-OA(Math.abs(p-P),1,E)/E:0,Lge=(p,E,P=15,N=40)=>{const D=Hln(p.x,N,E.width-N)*P,$=Hln(p.y,N,E.height-N)*P;return[D,$]},JX=(p,E)=>({x:Math.min(p.x,E.x),y:Math.min(p.y,E.y),x2:Math.max(p.x2,E.x2),y2:Math.max(p.y2,E.y2)}),jge=({x:p,y:E,width:P,height:N})=>({x:p,y:E,x2:p+P,y2:E+N}),GX=({x:p,y:E,x2:P,y2:N})=>({x:p,y:E,width:P-p,height:N-E}),bN=(p,E=[0,0])=>{var D,$;const{x:P,y:N}=Nge(p)?p.internals.positionAbsolute:pN(p,E);return{x:P,y:N,width:((D=p.measured)==null?void 0:D.width)??p.width??p.initialWidth??0,height:(($=p.measured)==null?void 0:$.height)??p.height??p.initialHeight??0}},FX=(p,E=[0,0])=>{var D,$;const{x:P,y:N}=Nge(p)?p.internals.positionAbsolute:pN(p,E);return{x:P,y:N,x2:P+(((D=p.measured)==null?void 0:D.width)??p.width??p.initialWidth??0),y2:N+((($=p.measured)==null?void 0:$.height)??p.height??p.initialHeight??0)}},Uhn=(p,E)=>GX(JX(jge(p),jge(E))),Xhn=(p,E,P,N,D,$,v,q)=>{const te=Math.max(0,Math.min(p+P,D+v)-Math.max(p,D)),ie=Math.max(0,Math.min(E+N,$+q)-Math.max(E,$));return Math.ceil(te*ie)},BX=(p,E)=>Xhn(p.x,p.y,p.width,p.height,E.x,E.y,E.width,E.height),qln=p=>n2(p.width)&&n2(p.height)&&n2(p.x)&&n2(p.y),n2=p=>!isNaN(p)&&isFinite(p),Khn=(p,E)=>(P,N)=>{},mN=(p,E=[1,1])=>({x:E[0]*Math.round(p.x/E[0]),y:E[1]*Math.round(p.y/E[1])}),vN=({x:p,y:E},[P,N,D],$=!1,v=[1,1])=>{const q={x:(p-P)/D,y:(E-N)/D};return $?mN(q,v):q},NA=({x:p,y:E},[P,N,D])=>({x:p*D+P,y:E*D+N});function TA(p,E){if(typeof p=="number")return Math.floor((E-E/(1+p))*.5);if(typeof p=="string"&&p.endsWith("px")){const P=parseFloat(p);if(!Number.isNaN(P))return Math.floor(P)}if(typeof p=="string"&&p.endsWith("%")){const P=parseFloat(p);if(!Number.isNaN(P))return Math.floor(E*P*.01)}return console.error(`The padding value "${p}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function eRn(p,E,P){if(typeof p=="string"||typeof p=="number"){const N=TA(p,P),D=TA(p,E);return{top:N,right:D,bottom:N,left:D,x:D*2,y:N*2}}if(typeof p=="object"){const N=TA(p.top??p.y??0,P),D=TA(p.bottom??p.y??0,P),$=TA(p.left??p.x??0,E),v=TA(p.right??p.x??0,E);return{top:N,right:v,bottom:D,left:$,x:$+v,y:N+D}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function nRn(p,E,P,N,D,$){const{x:v,y:q}=NA(p,[E,P,N]),{x:te,y:ie}=NA({x:p.x+p.width,y:p.y+p.height},[E,P,N]),pe=D-te,oe=$-ie;return{left:Math.floor(v),top:Math.floor(q),right:Math.floor(pe),bottom:Math.floor(oe)}}const $ge=(p,E,P,N,D,$)=>{const v=eRn($,E,P),q=(E-v.x)/p.width,te=(P-v.y)/p.height,ie=Math.min(q,te),pe=OA(ie,N,D),oe=p.x+p.width/2,z=p.y+p.height/2,ne=E/2-oe*pe,Z=P/2-z*pe,U=nRn(p,ne,Z,pe,E,P),Ee={left:Math.min(U.left-v.left,0),top:Math.min(U.top-v.top,0),right:Math.min(U.right-v.right,0),bottom:Math.min(U.bottom-v.bottom,0)};return{x:ne-Ee.left+Ee.right,y:Z-Ee.top+Ee.bottom,zoom:pe}},wN=()=>{var p;return typeof navigator<"u"&&((p=navigator==null?void 0:navigator.userAgent)==null?void 0:p.indexOf("Mac"))>=0};function ik(p){return p!=null&&p!=="parent"}function c2(p){var E,P;return{width:((E=p.measured)==null?void 0:E.width)??p.width??p.initialWidth??0,height:((P=p.measured)==null?void 0:P.height)??p.height??p.initialHeight??0}}function Whn(p){var E,P;return(((E=p.measured)==null?void 0:E.width)??p.width??p.initialWidth)!==void 0&&(((P=p.measured)==null?void 0:P.height)??p.height??p.initialHeight)!==void 0}function Vhn(p,E={width:0,height:0},P,N,D){const $={...p},v=N.get(P);if(v){const q=v.origin||D;$.x+=v.internals.positionAbsolute.x-(E.width??0)*q[0],$.y+=v.internals.positionAbsolute.y-(E.height??0)*q[1]}return $}function zln(p,E){if(p.size!==E.size)return!1;for(const P of p)if(!E.has(P))return!1;return!0}function tRn(){let p,E;return{promise:new Promise((N,D)=>{p=N,E=D}),resolve:p,reject:E}}function iRn(p){return{...Jhn,...p||{}}}function Qhn(p){return p===null?null:p?"valid":"invalid"}function sN(p,{snapGrid:E=[0,0],snapToGrid:P=!1,transform:N,containerBounds:D}){const{x:$,y:v}=t2(p),q=vN({x:$-((D==null?void 0:D.left)??0),y:v-((D==null?void 0:D.top)??0)},N),{x:te,y:ie}=P?mN(q,E):q;return{xSnapped:te,ySnapped:ie,...q}}const Fge=p=>({width:p.offsetWidth,height:p.offsetHeight}),Yhn=p=>{var E;return((E=p==null?void 0:p.getRootNode)==null?void 0:E.call(p))||(window==null?void 0:window.document)},rRn=["INPUT","SELECT","TEXTAREA"];function Zhn(p){var N,D;const E=((D=(N=p.composedPath)==null?void 0:N.call(p))==null?void 0:D[0])||p.target;return(E==null?void 0:E.nodeType)!==1?!1:rRn.includes(E.nodeName)||E.hasAttribute("contenteditable")||!!E.closest(".nokey")}const ean=p=>"clientX"in p,t2=(p,E)=>{var $,v;const P=ean(p),N=P?p.clientX:($=p.touches)==null?void 0:$[0].clientX,D=P?p.clientY:(v=p.touches)==null?void 0:v[0].clientY;return{x:N-((E==null?void 0:E.left)??0),y:D-((E==null?void 0:E.top)??0)}},Uln=(p,E,P,N,D)=>{const $=E.querySelectorAll(`.${p}`);return!$||!$.length?null:Array.from($).map(v=>{const q=v.getBoundingClientRect();return{id:v.getAttribute("data-handleid"),type:p,nodeId:D,position:v.getAttribute("data-handlepos"),x:(q.left-P.left)/N,y:(q.top-P.top)/N,...Fge(v)}})};function nan({sourceX:p,sourceY:E,targetX:P,targetY:N,sourceControlX:D,sourceControlY:$,targetControlX:v,targetControlY:q}){const te=p*.125+D*.375+v*.375+P*.125,ie=E*.125+$*.375+q*.375+N*.125,pe=Math.abs(te-p),oe=Math.abs(ie-E);return[te,ie,pe,oe]}function TX(p,E){return p>=0?.5*p:E*25*Math.sqrt(-p)}function Xln({pos:p,x1:E,y1:P,x2:N,y2:D,c:$}){switch(p){case ji.Left:return[E-TX(E-N,$),P];case ji.Right:return[E+TX(N-E,$),P];case ji.Top:return[E,P-TX(P-D,$)];case ji.Bottom:return[E,P+TX(D-P,$)]}}function yN({sourceX:p,sourceY:E,sourcePosition:P=ji.Bottom,targetX:N,targetY:D,targetPosition:$=ji.Top,curvature:v=.25}){const[q,te]=Xln({pos:P,x1:p,y1:E,x2:N,y2:D,c:v}),[ie,pe]=Xln({pos:$,x1:N,y1:D,x2:p,y2:E,c:v}),[oe,z,ne,Z]=nan({sourceX:p,sourceY:E,targetX:N,targetY:D,sourceControlX:q,sourceControlY:te,targetControlX:ie,targetControlY:pe});return[`M${p},${E} C${q},${te} ${ie},${pe} ${N},${D}`,oe,z,ne,Z]}function tan({sourceX:p,sourceY:E,targetX:P,targetY:N}){const D=Math.abs(P-p)/2,$=P<p?P+D:P-D,v=Math.abs(N-E)/2,q=N<E?N+v:N-v;return[$,q,D,v]}function cRn({sourceNode:p,targetNode:E,selected:P=!1,zIndex:N=0,elevateOnSelect:D=!1,zIndexMode:$="basic"}){if($==="manual")return N;const v=D&&P?N+1e3:N,q=Math.max(p.parentId||D&&p.selected?p.internals.z:0,E.parentId||D&&E.selected?E.internals.z:0);return v+q}function uRn({sourceNode:p,targetNode:E,width:P,height:N,transform:D}){const $=JX(FX(p),FX(E));$.x===$.x2&&($.x2+=1),$.y===$.y2&&($.y2+=1);const v={x:-D[0]/D[2],y:-D[1]/D[2],width:P/D[2],height:N/D[2]};return BX(v,GX($))>0}const oRn=({source:p,sourceHandle:E,target:P,targetHandle:N})=>`xy-edge__${p}${E||""}-${P}${N||""}`,sRn=(p,E)=>E.some(P=>P.source===p.source&&P.target===p.target&&(P.sourceHandle===p.sourceHandle||!P.sourceHandle&&!p.sourceHandle)&&(P.targetHandle===p.targetHandle||!P.targetHandle&&!p.targetHandle)),fRn=(p,E,P={})=>{var $;if(!p.source||!p.target)return($=P.onError)==null||$.call(P,"006",r2.error006()),E;const N=P.getEdgeId||oRn;let D;return Hhn(p)?D={...p}:D={...p,id:N(p)},sRn(D,E)?E:(D.sourceHandle===null&&delete D.sourceHandle,D.targetHandle===null&&delete D.targetHandle,E.concat(D))};function ian({sourceX:p,sourceY:E,targetX:P,targetY:N}){const[D,$,v,q]=tan({sourceX:p,sourceY:E,targetX:P,targetY:N});return[`M ${p},${E}L ${P},${N}`,D,$,v,q]}const Kln={[ji.Left]:{x:-1,y:0},[ji.Right]:{x:1,y:0},[ji.Top]:{x:0,y:-1},[ji.Bottom]:{x:0,y:1}},lRn=({source:p,sourcePosition:E=ji.Bottom,target:P})=>E===ji.Left||E===ji.Right?p.x<P.x?{x:1,y:0}:{x:-1,y:0}:p.y<P.y?{x:0,y:1}:{x:0,y:-1},Wln=(p,E)=>Math.sqrt(Math.pow(E.x-p.x,2)+Math.pow(E.y-p.y,2));function hRn({source:p,sourcePosition:E=ji.Bottom,target:P,targetPosition:N=ji.Top,center:D,offset:$,stepPosition:v}){const q=Kln[E],te=Kln[N],ie={x:p.x+q.x*$,y:p.y+q.y*$},pe={x:P.x+te.x*$,y:P.y+te.y*$},oe=lRn({source:ie,sourcePosition:E,target:pe}),z=oe.x!==0?"x":"y",ne=oe[z];let Z=[],U,Ee;const re={x:0,y:0},we={x:0,y:0},[,,ee,Ce]=tan({sourceX:p.x,sourceY:p.y,targetX:P.x,targetY:P.y});if(q[z]*te[z]===-1){z==="x"?(U=D.x??ie.x+(pe.x-ie.x)*v,Ee=D.y??(ie.y+pe.y)/2):(U=D.x??(ie.x+pe.x)/2,Ee=D.y??ie.y+(pe.y-ie.y)*v);const vn=[{x:U,y:ie.y},{x:U,y:pe.y}],jn=[{x:ie.x,y:Ee},{x:pe.x,y:Ee}];q[z]===ne?Z=z==="x"?vn:jn:Z=z==="x"?jn:vn}else{const vn=[{x:ie.x,y:pe.y}],jn=[{x:pe.x,y:ie.y}];if(z==="x"?Z=q.x===ne?jn:vn:Z=q.y===ne?vn:jn,E===N){const je=Math.abs(p[z]-P[z]);if(je<=$){const rn=Math.min($-1,$-je);q[z]===ne?re[z]=(ie[z]>p[z]?-1:1)*rn:we[z]=(pe[z]>P[z]?-1:1)*rn}}if(E!==N){const je=z==="x"?"y":"x",rn=q[z]===te[je],sn=ie[je]>pe[je],Sn=ie[je]<pe[je];(q[z]===1&&(!rn&&sn||rn&&Sn)||q[z]!==1&&(!rn&&Sn||rn&&sn))&&(Z=z==="x"?vn:jn)}const et={x:ie.x+re.x,y:ie.y+re.y},Dn={x:pe.x+we.x,y:pe.y+we.y},Kn=Math.max(Math.abs(et.x-Z[0].x),Math.abs(Dn.x-Z[0].x)),_=Math.max(Math.abs(et.y-Z[0].y),Math.abs(Dn.y-Z[0].y));Kn>=_?(U=(et.x+Dn.x)/2,Ee=Z[0].y):(U=Z[0].x,Ee=(et.y+Dn.y)/2)}const Qe={x:ie.x+re.x,y:ie.y+re.y},Xe={x:pe.x+we.x,y:pe.y+we.y};return[[p,...Qe.x!==Z[0].x||Qe.y!==Z[0].y?[Qe]:[],...Z,...Xe.x!==Z[Z.length-1].x||Xe.y!==Z[Z.length-1].y?[Xe]:[],P],U,Ee,ee,Ce]}function aRn(p,E,P,N){const D=Math.min(Wln(p,E)/2,Wln(E,P)/2,N),{x:$,y:v}=E;if(p.x===$&&$===P.x||p.y===v&&v===P.y)return`L${$} ${v}`;if(p.y===v){const ie=p.x<P.x?-1:1,pe=p.y<P.y?1:-1;return`L ${$+D*ie},${v}Q ${$},${v} ${$},${v+D*pe}`}const q=p.x<P.x?1:-1,te=p.y<P.y?-1:1;return`L ${$},${v+D*te}Q ${$},${v} ${$+D*q},${v}`}function Ege({sourceX:p,sourceY:E,sourcePosition:P=ji.Bottom,targetX:N,targetY:D,targetPosition:$=ji.Top,borderRadius:v=5,centerX:q,centerY:te,offset:ie=20,stepPosition:pe=.5}){const[oe,z,ne,Z,U]=hRn({source:{x:p,y:E},sourcePosition:P,target:{x:N,y:D},targetPosition:$,center:{x:q,y:te},offset:ie,stepPosition:pe});let Ee=`M${oe[0].x} ${oe[0].y}`;for(let re=1;re<oe.length-1;re++)Ee+=aRn(oe[re-1],oe[re],oe[re+1],v);return Ee+=`L${oe[oe.length-1].x} ${oe[oe.length-1].y}`,[Ee,z,ne,Z,U]}function Vln(p){var E;return p&&!!(p.internals.handleBounds||(E=p.handles)!=null&&E.length)&&!!(p.measured.width||p.width||p.initialWidth)}function dRn(p){var oe;const{sourceNode:E,targetNode:P}=p;if(!Vln(E)||!Vln(P))return null;const N=E.internals.handleBounds||Qln(E.handles),D=P.internals.handleBounds||Qln(P.handles),$=Yln((N==null?void 0:N.source)??[],p.sourceHandle),v=Yln(p.connectionMode===PA.Strict?(D==null?void 0:D.target)??[]:((D==null?void 0:D.target)??[]).concat((D==null?void 0:D.source)??[]),p.targetHandle);if(!$||!v)return(oe=p.onError)==null||oe.call(p,"008",r2.error008($?"target":"source",{id:p.id,sourceHandle:p.sourceHandle,targetHandle:p.targetHandle})),null;const q=($==null?void 0:$.position)||ji.Bottom,te=(v==null?void 0:v.position)||ji.Top,ie=rk(E,$,q),pe=rk(P,v,te);return{sourceX:ie.x,sourceY:ie.y,targetX:pe.x,targetY:pe.y,sourcePosition:q,targetPosition:te}}function Qln(p){if(!p)return null;const E=[],P=[];for(const N of p)N.width=N.width??1,N.height=N.height??1,N.type==="source"?E.push(N):N.type==="target"&&P.push(N);return{source:E,target:P}}function rk(p,E,P=ji.Left,N=!1){const D=((E==null?void 0:E.x)??0)+p.internals.positionAbsolute.x,$=((E==null?void 0:E.y)??0)+p.internals.positionAbsolute.y,{width:v,height:q}=E??c2(p);if(N)return{x:D+v/2,y:$+q/2};switch((E==null?void 0:E.position)??P){case ji.Top:return{x:D+v/2,y:$};case ji.Right:return{x:D+v,y:$+q/2};case ji.Bottom:return{x:D+v/2,y:$+q};case ji.Left:return{x:D,y:$+q/2}}}function Yln(p,E){return p&&(E?p.find(P=>P.id===E):p[0])||null}function Age(p,E){return p?typeof p=="string"?p:`${E?`${E}__`:""}${Object.keys(p).sort().map(N=>`${N}=${p[N]}`).join("&")}`:""}function bRn(p,{id:E,defaultColor:P,defaultMarkerStart:N,defaultMarkerEnd:D}){const $=new Set;return p.reduce((v,q)=>([q.markerStart||N,q.markerEnd||D].forEach(te=>{if(te&&typeof te=="object"){const ie=Age(te,E);$.has(ie)||(v.push({id:ie,color:te.color||P,...te}),$.add(ie))}}),v),[]).sort((v,q)=>v.id.localeCompare(q.id))}function wRn(p,E,P,N,D){let $=.5;D==="start"?$=0:D==="end"&&($=1);let v=[(p.x+p.width*$)*E.zoom+E.x,p.y*E.zoom+E.y-N],q=[-100*$,-100];switch(P){case ji.Right:v=[(p.x+p.width)*E.zoom+E.x+N,(p.y+p.height*$)*E.zoom+E.y],q=[0,-100*$];break;case ji.Bottom:v[1]=(p.y+p.height)*E.zoom+E.y+N,q[1]=0;break;case ji.Left:v=[p.x*E.zoom+E.x-N,(p.y+p.height*$)*E.zoom+E.y],q=[-100,-100*$];break}return`translate(${v[0]}px, ${v[1]}px) translate(${q[0]}%, ${q[1]}%)`}const ran=1e3,gRn=10,Bge={nodeOrigin:[0,0],nodeExtent:hN,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},pRn={...Bge,checkEquality:!0};function Rge(p,E){const P={...p};for(const N in E)E[N]!==void 0&&(P[N]=E[N]);return P}function mRn(p,E,P){const N=Rge(Bge,P);for(const D of p.values())if(D.parentId)Jge(D,p,E,N);else{const $=pN(D,N.nodeOrigin),v=ik(D.extent)?D.extent:N.nodeExtent,q=tk($,v,c2(D));D.internals.positionAbsolute=q}}function vRn(p,E){if(!p.handles)return p.measured?E==null?void 0:E.internals.handleBounds:void 0;const P=[],N=[];for(const D of p.handles){const $={id:D.id,width:D.width??1,height:D.height??1,nodeId:p.id,x:D.x,y:D.y,position:D.position,type:D.type};D.type==="source"?P.push($):D.type==="target"&&N.push($)}return{source:P,target:N}}function _ge(p){return p==="manual"}function Mge(p,E,P,N={}){var pe,oe;const D=Rge(pRn,N),$={i:0},v=new Map(E),q=D!=null&&D.elevateNodesOnSelect&&!_ge(D.zIndexMode)?ran:0;let te=p.length>0,ie=!1;E.clear(),P.clear();for(const z of p){let ne=v.get(z.id);if(D.checkEquality&&z===(ne==null?void 0:ne.internals.userNode))E.set(z.id,ne);else{const Z=pN(z,D.nodeOrigin),U=ik(z.extent)?z.extent:D.nodeExtent,Ee=tk(Z,U,c2(z));ne={...D.defaults,...z,measured:{width:(pe=z.measured)==null?void 0:pe.width,height:(oe=z.measured)==null?void 0:oe.height},internals:{positionAbsolute:Ee,handleBounds:vRn(z,ne),z:can(z,q,D.zIndexMode),userNode:z}},E.set(z.id,ne)}(ne.measured===void 0||ne.measured.width===void 0||ne.measured.height===void 0)&&!ne.hidden&&(te=!1),z.parentId&&Jge(ne,E,P,N,$),ie||(ie=z.selected??!1)}return{nodesInitialized:te,hasSelectedNodes:ie}}function yRn(p,E){if(!p.parentId)return;const P=E.get(p.parentId);P?P.set(p.id,p):E.set(p.parentId,new Map([[p.id,p]]))}function Jge(p,E,P,N,D){const{elevateNodesOnSelect:$,nodeOrigin:v,nodeExtent:q,zIndexMode:te}=Rge(Bge,N),ie=p.parentId,pe=E.get(ie);if(!pe){console.warn(`Parent node ${ie} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}yRn(p,P),D&&!pe.parentId&&pe.internals.rootParentIndex===void 0&&te==="auto"&&(pe.internals.rootParentIndex=++D.i,pe.internals.z=pe.internals.z+D.i*gRn),D&&pe.internals.rootParentIndex!==void 0&&(D.i=pe.internals.rootParentIndex);const oe=$&&!_ge(te)?ran:0,{x:z,y:ne,z:Z}=kRn(p,pe,v,q,oe,te),{positionAbsolute:U}=p.internals,Ee=z!==U.x||ne!==U.y;(Ee||Z!==p.internals.z)&&E.set(p.id,{...p,internals:{...p.internals,positionAbsolute:Ee?{x:z,y:ne}:U,z:Z}})}function can(p,E,P){const N=n2(p.zIndex)?p.zIndex:0;return _ge(P)?N:N+(p.selected?E:0)}function kRn(p,E,P,N,D,$){const{x:v,y:q}=E.internals.positionAbsolute,te=c2(p),ie=pN(p,P),pe=ik(p.extent)?tk(ie,p.extent,te):ie;let oe=tk({x:v+pe.x,y:q+pe.y},N,te);p.extent==="parent"&&(oe=zhn(oe,te,E));const z=can(p,D,$),ne=E.internals.z??0;return{x:oe.x,y:oe.y,z:ne>=z?ne+1:z}}function Gge(p,E,P,N=[0,0]){var v;const D=[],$=new Map;for(const q of p){const te=E.get(q.parentId);if(!te)continue;const ie=((v=$.get(q.parentId))==null?void 0:v.expandedRect)??bN(te),pe=Uhn(ie,q.rect);$.set(q.parentId,{expandedRect:pe,parent:te})}return $.size>0&&$.forEach(({expandedRect:q,parent:te},ie)=>{var ee;const pe=te.internals.positionAbsolute,oe=c2(te),z=te.origin??N,ne=q.x<pe.x?Math.round(Math.abs(pe.x-q.x)):0,Z=q.y<pe.y?Math.round(Math.abs(pe.y-q.y)):0,U=Math.max(oe.width,Math.round(q.width)),Ee=Math.max(oe.height,Math.round(q.height)),re=(U-oe.width)*z[0],we=(Ee-oe.height)*z[1];(ne>0||Z>0||re||we)&&(D.push({id:ie,type:"position",position:{x:te.position.x-ne+re,y:te.position.y-Z+we}}),(ee=P.get(ie))==null||ee.forEach(Ce=>{p.some(Qe=>Qe.id===Ce.id)||D.push({id:Ce.id,type:"position",position:{x:Ce.position.x+ne,y:Ce.position.y+Z}})})),(oe.width<q.width||oe.height<q.height||ne||Z)&&D.push({id:ie,type:"dimensions",setAttributes:!0,dimensions:{width:U+(ne?z[0]*ne-re:0),height:Ee+(Z?z[1]*Z-we:0)}})}),D}function jRn(p,E,P,N,D,$,v){const q=N==null?void 0:N.querySelector(".xyflow__viewport");let te=!1;if(!q)return{changes:[],updatedInternals:te};const ie=[],pe=window.getComputedStyle(q),{m22:oe}=new window.DOMMatrixReadOnly(pe.transform),z=[];for(const ne of p.values()){const Z=E.get(ne.id);if(!Z)continue;if(Z.hidden){E.set(Z.id,{...Z,internals:{...Z.internals,handleBounds:void 0}}),te=!0;continue}const U=Fge(ne.nodeElement),Ee=Z.measured.width!==U.width||Z.measured.height!==U.height;if(!!(U.width&&U.height&&(Ee||!Z.internals.handleBounds||ne.force))){const we=ne.nodeElement.getBoundingClientRect(),ee=ik(Z.extent)?Z.extent:$;let{positionAbsolute:Ce}=Z.internals;if(Z.parentId&&Z.extent==="parent"){const Xe=E.get(Z.parentId);Xe&&(Ce=zhn(Ce,U,Xe))}else ee&&(Ce=tk(Ce,ee,U));const Qe={...Z,measured:U,internals:{...Z.internals,positionAbsolute:Ce,handleBounds:{source:Uln("source",ne.nodeElement,we,oe,Z.id),target:Uln("target",ne.nodeElement,we,oe,Z.id)}}};E.set(Z.id,Qe),Z.parentId&&Jge(Qe,E,P,{nodeOrigin:D,zIndexMode:v}),te=!0,Ee&&(ie.push({id:Z.id,type:"dimensions",dimensions:U}),Z.expandParent&&Z.parentId&&z.push({id:Z.id,parentId:Z.parentId,rect:bN(Qe,D)}))}}if(z.length>0){const ne=Gge(z,E,P,D);ie.push(...ne)}return{changes:ie,updatedInternals:te}}async function ERn({delta:p,panZoom:E,transform:P,translateExtent:N,width:D,height:$}){if(!E||!p.x&&!p.y)return!1;const v=await E.setViewportConstrained({x:P[0]+p.x,y:P[1]+p.y,zoom:P[2]},[[0,0],[D,$]],N);return!!v&&(v.x!==P[0]||v.y!==P[1]||v.k!==P[2])}function Zln(p,E,P,N,D,$){let v=D;const q=N.get(v)||new Map;N.set(v,q.set(P,E)),v=`${D}-${p}`;const te=N.get(v)||new Map;if(N.set(v,te.set(P,E)),$){v=`${D}-${p}-${$}`;const ie=N.get(v)||new Map;N.set(v,ie.set(P,E))}}function uan(p,E,P){p.clear(),E.clear();for(const N of P){const{source:D,target:$,sourceHandle:v=null,targetHandle:q=null}=N,te={edgeId:N.id,source:D,target:$,sourceHandle:v,targetHandle:q},ie=`${D}-${v}--${$}-${q}`,pe=`${$}-${q}--${D}-${v}`;Zln("source",te,pe,p,D,v),Zln("target",te,ie,p,$,q),E.set(N.id,N)}}function oan(p,E){if(!p.parentId)return!1;const P=E.get(p.parentId);return P?P.selected?!0:oan(P,E):!1}function ehn(p,E,P){var D;let N=p;do{if((D=N==null?void 0:N.matches)!=null&&D.call(N,E))return!0;if(N===P)return!1;N=N==null?void 0:N.parentElement}while(N);return!1}function ARn(p,E,P,N){const D=new Map;for(const[$,v]of p)if((v.selected||v.id===N)&&(!v.parentId||!oan(v,p))&&(v.draggable||E&&typeof v.draggable>"u")){const q=p.get($);q&&D.set($,{id:$,position:q.position||{x:0,y:0},distance:{x:P.x-q.internals.positionAbsolute.x,y:P.y-q.internals.positionAbsolute.y},extent:q.extent,parentId:q.parentId,origin:q.origin,expandParent:q.expandParent,internals:{positionAbsolute:q.internals.positionAbsolute||{x:0,y:0}},measured:{width:q.measured.width??0,height:q.measured.height??0}})}return D}function wge({nodeId:p,dragItems:E,nodeLookup:P,dragging:N=!0}){var v,q,te;const D=[];for(const[ie,pe]of E){const oe=(v=P.get(ie))==null?void 0:v.internals.userNode;oe&&D.push({...oe,position:pe.position,dragging:N})}if(!p)return[D[0],D];const $=(q=P.get(p))==null?void 0:q.internals.userNode;return[$?{...$,position:((te=E.get(p))==null?void 0:te.position)||$.position,dragging:N}:D[0],D]}function MRn({dragItems:p,snapGrid:E,x:P,y:N}){const D=p.values().next().value;if(!D)return null;const $={x:P-D.distance.x,y:N-D.distance.y},v=mN($,E);return{x:v.x-$.x,y:v.y-$.y}}function CRn({onNodeMouseDown:p,getStoreItems:E,onDragStart:P,onDrag:N,onDragStop:D}){let $={x:null,y:null},v=0,q=new Map,te=!1,ie={x:0,y:0},pe=null,oe=!1,z=null,ne=!1,Z=!1,U=null;function Ee({noDragClassName:we,handleSelector:ee,domNode:Ce,isSelectable:Qe,nodeId:Xe,nodeClickDistance:Ze=0}){z=B0(Ce);function vn({x:Kn,y:_}){const{nodeLookup:je,nodeExtent:rn,snapGrid:sn,snapToGrid:Sn,nodeOrigin:Bn,onNodeDrag:dn,onSelectionDrag:Jn,onError:Nn,updateNodePositions:qn}=E();$={x:Kn,y:_};let Jt=!1;const Xt=q.size>1,Oi=Xt&&rn?jge(LA(q)):null,gr=Xt&&Sn?MRn({dragItems:q,snapGrid:sn,x:Kn,y:_}):null;for(const[Ki,Wn]of q){if(!je.has(Ki))continue;let ei={x:Kn-Wn.distance.x,y:_-Wn.distance.y};Sn&&(ei=gr?{x:Math.round(ei.x+gr.x),y:Math.round(ei.y+gr.y)}:mN(ei,sn));let rr=null;if(Xt&&rn&&!Wn.extent&&Oi){const{positionAbsolute:sr}=Wn.internals,ri=sr.x-Oi.x+rn[0][0],ai=sr.x+Wn.measured.width-Oi.x2+rn[1][0],Mc=sr.y-Oi.y+rn[0][1],ku=sr.y+Wn.measured.height-Oi.y2+rn[1][1];rr=[[ri,Mc],[ai,ku]]}const{position:cr,positionAbsolute:_i}=qhn({nodeId:Ki,nextPosition:ei,nodeLookup:je,nodeExtent:rr||rn,nodeOrigin:Bn,onError:Nn});Jt=Jt||Wn.position.x!==cr.x||Wn.position.y!==cr.y,Wn.position=cr,Wn.internals.positionAbsolute=_i}if(Z=Z||Jt,!!Jt&&(qn(q,!0),U&&(N||dn||!Xe&&Jn))){const[Ki,Wn]=wge({nodeId:Xe,dragItems:q,nodeLookup:je});N==null||N(U,q,Ki,Wn),dn==null||dn(U,Ki,Wn),Xe||Jn==null||Jn(U,Wn)}}async function jn(){if(!pe)return;const{transform:Kn,panBy:_,autoPanSpeed:je,autoPanOnNodeDrag:rn}=E();if(!rn){te=!1,cancelAnimationFrame(v);return}const[sn,Sn]=Lge(ie,pe,je);(sn!==0||Sn!==0)&&($.x=($.x??0)-sn/Kn[2],$.y=($.y??0)-Sn/Kn[2],await _({x:sn,y:Sn})&&vn($)),v=requestAnimationFrame(jn)}function et(Kn){var Xt;const{nodeLookup:_,multiSelectionActive:je,nodesDraggable:rn,transform:sn,snapGrid:Sn,snapToGrid:Bn,selectNodesOnDrag:dn,onNodeDragStart:Jn,onSelectionDragStart:Nn,unselectNodesAndEdges:qn}=E();oe=!0,(!dn||!Qe)&&!je&&Xe&&((Xt=_.get(Xe))!=null&&Xt.selected||qn()),Qe&&dn&&Xe&&(p==null||p(Xe));const Jt=sN(Kn.sourceEvent,{transform:sn,snapGrid:Sn,snapToGrid:Bn,containerBounds:pe});if($=Jt,q=ARn(_,rn,Jt,Xe),q.size>0&&(P||Jn||!Xe&&Nn)){const[Oi,gr]=wge({nodeId:Xe,dragItems:q,nodeLookup:_});P==null||P(Kn.sourceEvent,q,Oi,gr),Jn==null||Jn(Kn.sourceEvent,Oi,gr),Xe||Nn==null||Nn(Kn.sourceEvent,gr)}}const Dn=Bhn().clickDistance(Ze).on("start",Kn=>{const{domNode:_,nodeDragThreshold:je,transform:rn,snapGrid:sn,snapToGrid:Sn}=E();pe=(_==null?void 0:_.getBoundingClientRect())||null,ne=!1,Z=!1,U=Kn.sourceEvent,je===0&&et(Kn),$=sN(Kn.sourceEvent,{transform:rn,snapGrid:sn,snapToGrid:Sn,containerBounds:pe}),ie=t2(Kn.sourceEvent,pe)}).on("drag",Kn=>{const{autoPanOnNodeDrag:_,transform:je,snapGrid:rn,snapToGrid:sn,nodeDragThreshold:Sn,nodeLookup:Bn}=E(),dn=sN(Kn.sourceEvent,{transform:je,snapGrid:rn,snapToGrid:sn,containerBounds:pe});if(U=Kn.sourceEvent,(Kn.sourceEvent.type==="touchmove"&&Kn.sourceEvent.touches.length>1||Xe&&!Bn.has(Xe))&&(ne=!0),!ne){if(!te&&_&&oe&&(te=!0,jn()),!oe){const Jn=t2(Kn.sourceEvent,pe),Nn=Jn.x-ie.x,qn=Jn.y-ie.y;Math.sqrt(Nn*Nn+qn*qn)>Sn&&et(Kn)}($.x!==dn.xSnapped||$.y!==dn.ySnapped)&&q&&oe&&(ie=t2(Kn.sourceEvent,pe),vn(dn))}}).on("end",Kn=>{if(!oe||ne){ne&&q.size>0&&E().updateNodePositions(q,!1);return}if(te=!1,oe=!1,cancelAnimationFrame(v),q.size>0){const{nodeLookup:_,updateNodePositions:je,onNodeDragStop:rn,onSelectionDragStop:sn}=E();if(Z&&(je(q,!1),Z=!1),D||rn||!Xe&&sn){const[Sn,Bn]=wge({nodeId:Xe,dragItems:q,nodeLookup:_,dragging:!1});D==null||D(Kn.sourceEvent,q,Sn,Bn),rn==null||rn(Kn.sourceEvent,Sn,Bn),Xe||sn==null||sn(Kn.sourceEvent,Bn)}}}).filter(Kn=>{const _=Kn.target;return!Kn.button&&(!we||!ehn(_,`.${we}`,Ce))&&(!ee||ehn(_,ee,Ce))});z.call(Dn)}function re(){z==null||z.on(".drag",null)}return{update:Ee,destroy:re}}function xRn(p,E,P){const N=[],D={x:p.x-P,y:p.y-P,width:P*2,height:P*2};for(const $ of E.values())BX(D,bN($))>0&&N.push($);return N}const TRn=250;function SRn(p,E,P,N){var q,te;let D=[],$=1/0;const v=xRn(p,P,E+TRn);for(const ie of v){const pe=[...((q=ie.internals.handleBounds)==null?void 0:q.source)??[],...((te=ie.internals.handleBounds)==null?void 0:te.target)??[]];for(const oe of pe){if(N.nodeId===oe.nodeId&&N.type===oe.type&&N.id===oe.id)continue;const{x:z,y:ne}=rk(ie,oe,oe.position,!0),Z=Math.sqrt(Math.pow(z-p.x,2)+Math.pow(ne-p.y,2));Z>E||(Z<$?(D=[{...oe,x:z,y:ne}],$=Z):Z===$&&D.push({...oe,x:z,y:ne}))}}if(!D.length)return null;if(D.length>1){const ie=N.type==="source"?"target":"source";return D.find(pe=>pe.type===ie)??D[0]}return D[0]}function san(p,E,P,N,D,$=!1){var ie,pe,oe;const v=N.get(p);if(!v)return null;const q=D==="strict"?(ie=v.internals.handleBounds)==null?void 0:ie[E]:[...((pe=v.internals.handleBounds)==null?void 0:pe.source)??[],...((oe=v.internals.handleBounds)==null?void 0:oe.target)??[]],te=(P?q==null?void 0:q.find(z=>z.id===P):q==null?void 0:q[0])??null;return te&&$?{...te,...rk(v,te,te.position,!0)}:te}function fan(p,E){return p||(E!=null&&E.classList.contains("target")?"target":E!=null&&E.classList.contains("source")?"source":null)}function IRn(p,E){let P=null;return E?P=!0:p&&!E&&(P=!1),P}const lan=()=>!0;function PRn(p,{connectionMode:E,connectionRadius:P,handleId:N,nodeId:D,edgeUpdaterType:$,isTarget:v,domNode:q,nodeLookup:te,lib:ie,autoPanOnConnect:pe,flowId:oe,panBy:z,cancelConnection:ne,onConnectStart:Z,onConnect:U,onConnectEnd:Ee,isValidConnection:re=lan,onReconnectEnd:we,updateConnection:ee,getTransform:Ce,getFromHandle:Qe,autoPanSpeed:Xe,dragThreshold:Ze=1,handleDomNode:vn}){const jn=Yhn(p.target);let et=0,Dn;const{x:Kn,y:_}=t2(p),je=fan($,vn),rn=q==null?void 0:q.getBoundingClientRect();let sn=!1;if(!rn||!je)return;const Sn=san(D,je,N,te,E);if(!Sn)return;let Bn=t2(p,rn),dn=!1,Jn=null,Nn=!1,qn=null;function Jt(){if(!pe||!rn)return;const[cr,_i]=Lge(Bn,rn,Xe);z({x:cr,y:_i}),et=requestAnimationFrame(Jt)}const Xt={...Sn,nodeId:D,type:je,position:Sn.position},Oi=te.get(D);let Ki={inProgress:!0,isValid:null,from:rk(Oi,Xt,ji.Left,!0),fromHandle:Xt,fromPosition:Xt.position,fromNode:Oi,to:Bn,toHandle:null,toPosition:Gln[Xt.position],toNode:null,pointer:Bn};function Wn(){sn=!0,ee(Ki),Z==null||Z(p,{nodeId:D,handleId:N,handleType:je})}Ze===0&&Wn();function ei(cr){if(!sn){const{x:ku,y:ic}=t2(cr),Sa=ku-Kn,ph=ic-_;if(!(Sa*Sa+ph*ph>Ze*Ze))return;Wn()}if(!Qe()||!Xt){rr(cr);return}const _i=Ce();Bn=t2(cr,rn),Dn=SRn(vN(Bn,_i,!1,[1,1]),P,te,Xt),dn||(Jt(),dn=!0);const sr=han(cr,{handle:Dn,connectionMode:E,fromNodeId:D,fromHandleId:N,fromType:v?"target":"source",isValidConnection:re,doc:jn,lib:ie,flowId:oe,nodeLookup:te});qn=sr.handleDomNode,Jn=sr.connection,Nn=IRn(!!Dn,sr.isValid);const ri=te.get(D),ai=ri?rk(ri,Xt,ji.Left,!0):Ki.from,Mc={...Ki,from:ai,isValid:Nn,to:sr.toHandle&&Nn?NA({x:sr.toHandle.x,y:sr.toHandle.y},_i):Bn,toHandle:sr.toHandle,toPosition:Nn&&sr.toHandle?sr.toHandle.position:Gln[Xt.position],toNode:sr.toHandle?te.get(sr.toHandle.nodeId):null,pointer:Bn};ee(Mc),Ki=Mc}function rr(cr){if(!("touches"in cr&&cr.touches.length>0)){if(sn){(Dn||qn)&&Jn&&Nn&&(U==null||U(Jn));const{inProgress:_i,...sr}=Ki,ri={...sr,toPosition:Ki.toHandle?Ki.toPosition:null};Ee==null||Ee(cr,ri),$&&(we==null||we(cr,ri))}ne(),cancelAnimationFrame(et),dn=!1,Nn=!1,Jn=null,qn=null,jn.removeEventListener("mousemove",ei),jn.removeEventListener("mouseup",rr),jn.removeEventListener("touchmove",ei),jn.removeEventListener("touchend",rr)}}jn.addEventListener("mousemove",ei),jn.addEventListener("mouseup",rr),jn.addEventListener("touchmove",ei),jn.addEventListener("touchend",rr)}function han(p,{handle:E,connectionMode:P,fromNodeId:N,fromHandleId:D,fromType:$,doc:v,lib:q,flowId:te,isValidConnection:ie=lan,nodeLookup:pe}){const oe=$==="target",z=E?v.querySelector(`.${q}-flow__handle[data-id="${te}-${E==null?void 0:E.nodeId}-${E==null?void 0:E.id}-${E==null?void 0:E.type}"]`):null,{x:ne,y:Z}=t2(p),U=v.elementFromPoint(ne,Z),Ee=U!=null&&U.classList.contains(`${q}-flow__handle`)?U:z,re={handleDomNode:Ee,isValid:!1,connection:null,toHandle:null};if(Ee){const we=fan(void 0,Ee),ee=Ee.getAttribute("data-nodeid"),Ce=Ee.getAttribute("data-handleid"),Qe=Ee.classList.contains("connectable"),Xe=Ee.classList.contains("connectableend");if(!ee||!we)return re;const Ze={source:oe?ee:N,sourceHandle:oe?Ce:D,target:oe?N:ee,targetHandle:oe?D:Ce};re.connection=Ze;const jn=Qe&&Xe&&(P===PA.Strict?oe&&we==="source"||!oe&&we==="target":ee!==N||Ce!==D);re.isValid=jn&&ie(Ze),re.toHandle=san(ee,we,Ce,pe,P,!0)}return re}const Cge={onPointerDown:PRn,isValid:han};function ORn({domNode:p,panZoom:E,getTransform:P,getViewScale:N}){const D=B0(p);function $({translateExtent:q,width:te,height:ie,zoomStep:pe=1,pannable:oe=!0,zoomable:z=!0,inversePan:ne=!1}){const Z=ee=>{if(ee.sourceEvent.type!=="wheel"||!E)return;const Ce=P(),Qe=ee.sourceEvent.ctrlKey&&wN()?10:1,Xe=-ee.sourceEvent.deltaY*(ee.sourceEvent.deltaMode===1?.05:ee.sourceEvent.deltaMode?1:.002)*pe,Ze=Ce[2]*Math.pow(2,Xe*Qe);E.scaleTo(Ze)};let U=[0,0];const Ee=ee=>{(ee.sourceEvent.type==="mousedown"||ee.sourceEvent.type==="touchstart")&&(U=[ee.sourceEvent.clientX??ee.sourceEvent.touches[0].clientX,ee.sourceEvent.clientY??ee.sourceEvent.touches[0].clientY])},re=ee=>{const Ce=P();if(ee.sourceEvent.type!=="mousemove"&&ee.sourceEvent.type!=="touchmove"||!E)return;const Qe=[ee.sourceEvent.clientX??ee.sourceEvent.touches[0].clientX,ee.sourceEvent.clientY??ee.sourceEvent.touches[0].clientY],Xe=[Qe[0]-U[0],Qe[1]-U[1]];U=Qe;const Ze=N()*Math.max(Ce[2],Math.log(Ce[2]))*(ne?-1:1),vn={x:Ce[0]-Xe[0]*Ze,y:Ce[1]-Xe[1]*Ze},jn=[[0,0],[te,ie]];E.setViewportConstrained({x:vn.x,y:vn.y,zoom:Ce[2]},jn,q)},we=Rhn().on("start",Ee).on("zoom",oe?re:null).on("zoom.wheel",z?Z:null);D.call(we,{})}function v(){D.on("zoom",null)}return{update:$,destroy:v,pointer:e2}}const HX=p=>({x:p.x,y:p.y,zoom:p.k}),gge=({x:p,y:E,zoom:P})=>Oge.translate(p,E).scale(P),q5=(p,E)=>p.target.closest(`.${E}`),aan=(p,E)=>E===2&&Array.isArray(p)&&p.includes(2),NRn=p=>((p*=2)<=1?p*p*p:(p-=2)*p*p+2)/2,pge=(p,E=0,P=NRn,N=()=>{})=>{const D=typeof E=="number"&&E>0;return D||N(),D?p.transition().duration(E).ease(P).on("end",N):p},dan=p=>{const E=p.ctrlKey&&wN()?10:1;return-p.deltaY*(p.deltaMode===1?.05:p.deltaMode?1:.002)*E};function DRn({zoomPanValues:p,noWheelClassName:E,d3Selection:P,d3Zoom:N,panOnScrollMode:D,panOnScrollSpeed:$,zoomOnPinch:v,onPanZoomStart:q,onPanZoom:te,onPanZoomEnd:ie}){return pe=>{if(q5(pe,E))return pe.ctrlKey&&pe.preventDefault(),!1;pe.preventDefault(),pe.stopImmediatePropagation();const oe=P.property("__zoom").k||1;if(pe.ctrlKey&&v){const Ee=e2(pe),re=dan(pe),we=oe*Math.pow(2,re);N.scaleTo(P,we,Ee,pe);return}const z=pe.deltaMode===1?20:1;let ne=D===nk.Vertical?0:pe.deltaX*z,Z=D===nk.Horizontal?0:pe.deltaY*z;!wN()&&pe.shiftKey&&D!==nk.Vertical&&(ne=pe.deltaY*z,Z=0),N.translateBy(P,-(ne/oe)*$,-(Z/oe)*$,{internal:!0});const U=HX(P.property("__zoom"));clearTimeout(p.panScrollTimeout),p.isPanScrolling?te==null||te(pe,U):(p.isPanScrolling=!0,q==null||q(pe,U)),p.panScrollTimeout=setTimeout(()=>{ie==null||ie(pe,U),p.isPanScrolling=!1},150)}}function LRn({noWheelClassName:p,preventScrolling:E,d3ZoomHandler:P}){return function(N,D){const $=N.type==="wheel",v=!E&&$&&!N.ctrlKey,q=q5(N,p);if(N.ctrlKey&&$&&q&&N.preventDefault(),v||q)return null;N.preventDefault(),P.call(this,N,D)}}function $Rn({zoomPanValues:p,onDraggingChange:E,onPanZoomStart:P}){return N=>{var $,v,q;if(($=N.sourceEvent)!=null&&$.internal)return;const D=HX(N.transform);p.mouseButton=((v=N.sourceEvent)==null?void 0:v.button)||0,p.isZoomingOrPanning=!0,p.prevViewport=D,((q=N.sourceEvent)==null?void 0:q.type)==="mousedown"&&E(!0),P&&(P==null||P(N.sourceEvent,D))}}function FRn({zoomPanValues:p,panOnDrag:E,onPaneContextMenu:P,onTransformChange:N,onPanZoom:D}){return $=>{var v,q;p.usedRightMouseButton=!!(P&&aan(E,p.mouseButton??0)),(v=$.sourceEvent)!=null&&v.sync||N([$.transform.x,$.transform.y,$.transform.k]),D&&!((q=$.sourceEvent)!=null&&q.internal)&&(D==null||D($.sourceEvent,HX($.transform)))}}function BRn({zoomPanValues:p,panOnDrag:E,panOnScroll:P,onDraggingChange:N,onPanZoomEnd:D,onPaneContextMenu:$}){return v=>{var q;if(!((q=v.sourceEvent)!=null&&q.internal)&&(p.isZoomingOrPanning=!1,$&&aan(E,p.mouseButton??0)&&!p.usedRightMouseButton&&v.sourceEvent&&$(v.sourceEvent),p.usedRightMouseButton=!1,N(!1),D)){const te=HX(v.transform);p.prevViewport=te,clearTimeout(p.timerId),p.timerId=setTimeout(()=>{D==null||D(v.sourceEvent,te)},P?150:0)}}}function RRn({panActivationKeyPressed:p,zoomActivationKeyPressed:E,zoomOnScroll:P,zoomOnPinch:N,panOnDrag:D,panOnScroll:$,zoomOnDoubleClick:v,userSelectionActive:q,noWheelClassName:te,noPanClassName:ie,lib:pe,connectionInProgress:oe}){return z=>{var re;const ne=E||P,Z=N&&z.ctrlKey,U=z.type==="wheel";if(z.button===1&&z.type==="mousedown"&&(q5(z,`${pe}-flow__node`)||q5(z,`${pe}-flow__edge`)||q5(z,`${pe}-flow__selection`)||q5(z,`${pe}-flow__nodesselection`)))return!0;if(!D&&!ne&&!$&&!v&&!N||q||oe&&!U||q5(z,te)&&U||q5(z,ie)&&(!U||$&&U&&!E)||!N&&z.ctrlKey&&U)return!1;if(!N&&z.type==="touchstart"&&((re=z.touches)==null?void 0:re.length)>1)return z.preventDefault(),!1;if(!ne&&!$&&!Z&&U||!D&&(z.type==="mousedown"||z.type==="touchstart")||Array.isArray(D)&&!D.includes(z.button)&&z.type==="mousedown")return!1;const Ee=Array.isArray(D)&&D.includes(z.button)||!z.button||z.button<=1;return(!z.ctrlKey||U||p)&&Ee}}function _Rn({domNode:p,minZoom:E,maxZoom:P,translateExtent:N,viewport:D,onPanZoom:$,onPanZoomStart:v,onPanZoomEnd:q,onDraggingChange:te}){const ie={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},pe=p.getBoundingClientRect();let oe=[[0,0],[pe.width,pe.height]];const z=typeof ResizeObserver<"u"?new ResizeObserver(_=>{const je=_[0];je&&(oe=[[0,0],[je.contentRect.width,je.contentRect.height]])}):null;z==null||z.observe(p);const ne=Rhn().extent(()=>oe).scaleExtent([E,P]).translateExtent(N),Z=B0(p).call(ne);Ce({x:D.x,y:D.y,zoom:OA(D.zoom,E,P)},[[0,0],[pe.width,pe.height]],N);const U=Z.on("wheel.zoom"),Ee=Z.on("dblclick.zoom");ne.wheelDelta(dan);async function re(_,je){return Z?new Promise(rn=>{ne==null||ne.interpolate((je==null?void 0:je.interpolate)==="linear"?hge:NX).transform(pge(Z,je==null?void 0:je.duration,je==null?void 0:je.ease,()=>rn(!0)),_)}):!1}function we({noWheelClassName:_,noPanClassName:je,onPaneContextMenu:rn,userSelectionActive:sn,panOnScroll:Sn,panOnDrag:Bn,panOnScrollMode:dn,panOnScrollSpeed:Jn,preventScrolling:Nn,zoomOnPinch:qn,zoomOnScroll:Jt,zoomOnDoubleClick:Xt,panActivationKeyPressed:Oi=!1,zoomActivationKeyPressed:gr,lib:Ki,onTransformChange:Wn,connectionInProgress:ei,paneClickDistance:rr,selectionOnDrag:cr}){sn&&!ie.isZoomingOrPanning&&ee();const _i=Sn&&!gr&&!sn;ne.clickDistance(cr?1/0:!n2(rr)||rr<0?0:rr);const sr=_i?DRn({zoomPanValues:ie,noWheelClassName:_,d3Selection:Z,d3Zoom:ne,panOnScrollMode:dn,panOnScrollSpeed:Jn,zoomOnPinch:qn,onPanZoomStart:v,onPanZoom:$,onPanZoomEnd:q}):LRn({noWheelClassName:_,preventScrolling:Nn,d3ZoomHandler:U});Z.on("wheel.zoom",sr,{passive:!1});const ri=$Rn({zoomPanValues:ie,onDraggingChange:te,onPanZoomStart:v});ne.on("start",ri);const ai=FRn({zoomPanValues:ie,panOnDrag:Bn,onPaneContextMenu:!!rn,onPanZoom:$,onTransformChange:Wn});ne.on("zoom",ai);const Mc=BRn({zoomPanValues:ie,panOnDrag:Bn,panOnScroll:Sn,onPaneContextMenu:rn,onPanZoomEnd:q,onDraggingChange:te});ne.on("end",Mc);const ku=RRn({panActivationKeyPressed:Oi,zoomActivationKeyPressed:gr,panOnDrag:Bn,zoomOnScroll:Jt,panOnScroll:Sn,zoomOnDoubleClick:Xt,zoomOnPinch:qn,userSelectionActive:sn,noPanClassName:je,noWheelClassName:_,lib:Ki,connectionInProgress:ei});ne.filter(ku),Xt?Z.on("dblclick.zoom",Ee):Z.on("dblclick.zoom",null)}function ee(){ne.on("zoom",null)}async function Ce(_,je,rn){const sn=gge(_),Sn=ne==null?void 0:ne.constrain()(sn,je,rn);return Sn&&await re(Sn),Sn}async function Qe(_,je){const rn=gge(_);return await re(rn,je),rn}function Xe(_){if(Z){const je=gge(_),rn=Z.property("__zoom");(rn.k!==_.zoom||rn.x!==_.x||rn.y!==_.y)&&(ne==null||ne.transform(Z,je,null,{sync:!0}))}}function Ze(){const _=Z?yBn(Z.node()):{x:0,y:0,k:1};return{x:_.x,y:_.y,zoom:_.k}}async function vn(_,je){return Z?new Promise(rn=>{ne==null||ne.interpolate((je==null?void 0:je.interpolate)==="linear"?hge:NX).scaleTo(pge(Z,je==null?void 0:je.duration,je==null?void 0:je.ease,()=>rn(!0)),_)}):!1}async function jn(_,je){return Z?new Promise(rn=>{ne==null||ne.interpolate((je==null?void 0:je.interpolate)==="linear"?hge:NX).scaleBy(pge(Z,je==null?void 0:je.duration,je==null?void 0:je.ease,()=>rn(!0)),_)}):!1}function et(_){ne==null||ne.scaleExtent(_)}function Dn(_){ne==null||ne.translateExtent(_)}function Kn(_){const je=!n2(_)||_<0?0:_;ne==null||ne.clickDistance(je)}return{update:we,destroy:ee,setViewport:Qe,setViewportConstrained:Ce,getViewport:Ze,scaleTo:vn,scaleBy:jn,setScaleExtent:et,setTranslateExtent:Dn,syncViewport:Xe,setClickDistance:Kn}}var DA;(function(p){p.Line="line",p.Handle="handle"})(DA||(DA={}));function JRn({width:p,prevWidth:E,height:P,prevHeight:N,affectsX:D,affectsY:$}){const v=p-E,q=P-N,te=[v>0?1:v<0?-1:0,q>0?1:q<0?-1:0];return v&&D&&(te[0]=te[0]*-1),q&&$&&(te[1]=te[1]*-1),te}function nhn(p){const E=p.includes("right")||p.includes("left"),P=p.includes("bottom")||p.includes("top"),N=p.includes("left"),D=p.includes("top");return{isHorizontal:E,isVertical:P,affectsX:N,affectsY:D}}function G5(p,E){return Math.max(0,E-p)}function H5(p,E){return Math.max(0,p-E)}function SX(p,E,P){return Math.max(0,E-p,p-P)}function thn(p,E){return p?!E:E}function GRn(p,E,P,N,D,$,v,q){let{affectsX:te,affectsY:ie}=E;const{isHorizontal:pe,isVertical:oe}=E,z=pe&&oe,{xSnapped:ne,ySnapped:Z}=P,{minWidth:U,maxWidth:Ee,minHeight:re,maxHeight:we}=N,{x:ee,y:Ce,width:Qe,height:Xe,aspectRatio:Ze}=p;let vn=Math.floor(pe?ne-p.pointerX:0),jn=Math.floor(oe?Z-p.pointerY:0);const et=Qe+(te?-vn:vn),Dn=Xe+(ie?-jn:jn),Kn=-$[0]*Qe,_=-$[1]*Xe;let je=SX(et,U,Ee),rn=SX(Dn,re,we);if(v){let Bn=0,dn=0;te&&vn<0?Bn=G5(ee+vn+Kn,v[0][0]):!te&&vn>0&&(Bn=H5(ee+et+Kn,v[1][0])),ie&&jn<0?dn=G5(Ce+jn+_,v[0][1]):!ie&&jn>0&&(dn=H5(Ce+Dn+_,v[1][1])),je=Math.max(je,Bn),rn=Math.max(rn,dn)}if(q){let Bn=0,dn=0;te&&vn>0?Bn=H5(ee+vn,q[0][0]):!te&&vn<0&&(Bn=G5(ee+et,q[1][0])),ie&&jn>0?dn=H5(Ce+jn,q[0][1]):!ie&&jn<0&&(dn=G5(Ce+Dn,q[1][1])),je=Math.max(je,Bn),rn=Math.max(rn,dn)}if(D){if(pe){const Bn=SX(et/Ze,re,we)*Ze;if(je=Math.max(je,Bn),v){let dn=0;!te&&!ie||te&&!ie&&z?dn=H5(Ce+_+et/Ze,v[1][1])*Ze:dn=G5(Ce+_+(te?vn:-vn)/Ze,v[0][1])*Ze,je=Math.max(je,dn)}if(q){let dn=0;!te&&!ie||te&&!ie&&z?dn=G5(Ce+et/Ze,q[1][1])*Ze:dn=H5(Ce+(te?vn:-vn)/Ze,q[0][1])*Ze,je=Math.max(je,dn)}}if(oe){const Bn=SX(Dn*Ze,U,Ee)/Ze;if(rn=Math.max(rn,Bn),v){let dn=0;!te&&!ie||ie&&!te&&z?dn=H5(ee+Dn*Ze+Kn,v[1][0])/Ze:dn=G5(ee+(ie?jn:-jn)*Ze+Kn,v[0][0])/Ze,rn=Math.max(rn,dn)}if(q){let dn=0;!te&&!ie||ie&&!te&&z?dn=G5(ee+Dn*Ze,q[1][0])/Ze:dn=H5(ee+(ie?jn:-jn)*Ze,q[0][0])/Ze,rn=Math.max(rn,dn)}}}jn=jn+(jn<0?rn:-rn),vn=vn+(vn<0?je:-je),D&&(z?et>Dn*Ze?jn=(thn(te,ie)?-vn:vn)/Ze:vn=(thn(te,ie)?-jn:jn)*Ze:pe?(jn=vn/Ze,ie=te):(vn=jn*Ze,te=ie));const sn=te?ee+vn:ee,Sn=ie?Ce+jn:Ce;return{width:Qe+(te?-vn:vn),height:Xe+(ie?-jn:jn),x:$[0]*vn*(te?-1:1)+sn,y:$[1]*jn*(ie?-1:1)+Sn}}const ban={width:0,height:0,x:0,y:0},HRn={...ban,pointerX:0,pointerY:0,aspectRatio:1};function qRn(p,E,P){const N=E.position.x+p.position.x,D=E.position.y+p.position.y,$=p.measured.width??0,v=p.measured.height??0,q=P[0]*$,te=P[1]*v;return[[N-q,D-te],[N+$-q,D+v-te]]}function zRn({domNode:p,nodeId:E,getStoreItems:P,onChange:N,onEnd:D}){const $=B0(p);let v={controlDirection:nhn("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function q({controlPosition:ie,boundaries:pe,keepAspectRatio:oe,resizeDirection:z,onResizeStart:ne,onResize:Z,onResizeEnd:U,shouldResize:Ee}){let re={...ban},we={...HRn};v={boundaries:pe,resizeDirection:z,keepAspectRatio:oe,controlDirection:nhn(ie)};let ee,Ce=null,Qe=[],Xe,Ze,vn;const jn=Bhn().on("start",et=>{const{nodeLookup:Dn,transform:Kn,snapGrid:_,snapToGrid:je,nodeOrigin:rn,paneDomNode:sn}=P();if(ee=Dn.get(E),!ee)return;Ce=(sn==null?void 0:sn.getBoundingClientRect())??null;const{xSnapped:Sn,ySnapped:Bn}=sN(et.sourceEvent,{transform:Kn,snapGrid:_,snapToGrid:je,containerBounds:Ce});re={width:ee.measured.width??0,height:ee.measured.height??0,x:ee.position.x??0,y:ee.position.y??0},we={...re,pointerX:Sn,pointerY:Bn,aspectRatio:re.width/re.height},Xe=void 0,Ze=ik(ee.extent)?ee.extent:void 0,ee.parentId&&(ee.extent==="parent"||ee.expandParent)&&(Xe=Dn.get(ee.parentId)),Xe&&ee.extent==="parent"&&(Ze=[[0,0],[Xe.measured.width,Xe.measured.height]]),Qe=[],vn=void 0;for(const[dn,Jn]of Dn)if(Jn.parentId===E&&(Qe.push({id:dn,position:{...Jn.position},extent:Jn.extent}),Jn.extent==="parent"||Jn.expandParent)){const Nn=qRn(Jn,ee,Jn.origin??rn);vn?vn=[[Math.min(Nn[0][0],vn[0][0]),Math.min(Nn[0][1],vn[0][1])],[Math.max(Nn[1][0],vn[1][0]),Math.max(Nn[1][1],vn[1][1])]]:vn=Nn}ne==null||ne(et,{...re})}).on("drag",et=>{const{transform:Dn,snapGrid:Kn,snapToGrid:_,nodeOrigin:je}=P(),rn=sN(et.sourceEvent,{transform:Dn,snapGrid:Kn,snapToGrid:_,containerBounds:Ce}),sn=[];if(!ee)return;const{x:Sn,y:Bn,width:dn,height:Jn}=re,Nn={},qn=ee.origin??je,{width:Jt,height:Xt,x:Oi,y:gr}=GRn(we,v.controlDirection,rn,v.boundaries,v.keepAspectRatio,qn,Ze,vn),Ki=Jt!==dn,Wn=Xt!==Jn,ei=Oi!==Sn&&Ki,rr=gr!==Bn&&Wn;if(!ei&&!rr&&!Ki&&!Wn)return;const cr={prevValues:{...re},startX:we.x,startY:we.y,childNodes:Qe.map(ai=>({...ai,position:{...ai.position}}))};if((ei||rr||qn[0]===1||qn[1]===1)&&(Nn.x=ei?Oi:re.x,Nn.y=rr?gr:re.y,re.x=Nn.x,re.y=Nn.y,Qe.length>0)){const ai=Oi-Sn,Mc=gr-Bn;for(const ku of Qe)ku.position={x:ku.position.x-ai+qn[0]*(Jt-dn),y:ku.position.y-Mc+qn[1]*(Xt-Jn)},sn.push(ku)}if((Ki||Wn)&&(Nn.width=Ki&&(!v.resizeDirection||v.resizeDirection==="horizontal")?Jt:re.width,Nn.height=Wn&&(!v.resizeDirection||v.resizeDirection==="vertical")?Xt:re.height,re.width=Nn.width,re.height=Nn.height),Xe&&ee.expandParent){const ai=qn[0]*(Nn.width??0);Nn.x&&Nn.x<ai&&(re.x=ai,we.x=we.x-(Nn.x-ai));const Mc=qn[1]*(Nn.height??0);Nn.y&&Nn.y<Mc&&(re.y=Mc,we.y=we.y-(Nn.y-Mc))}const _i=JRn({width:re.width,prevWidth:dn,height:re.height,prevHeight:Jn,affectsX:v.controlDirection.affectsX,affectsY:v.controlDirection.affectsY}),sr={...re,direction:_i};if((Ee==null?void 0:Ee(et,sr))===!1){re=cr.prevValues,we.x=cr.startX,we.y=cr.startY,Qe.forEach((ai,Mc)=>{ai.position=cr.childNodes[Mc].position});return}Z==null||Z(et,sr),N(Nn,sn)}).on("end",et=>{U==null||U(et,{...re}),D==null||D({...re})});$.call(jn)}function te(){$.on(".drag",null)}return{update:q,destroy:te}}const URn={},ihn=p=>{let E;const P=new Set,N=(pe,oe)=>{const z=typeof pe=="function"?pe(E):pe;if(!Object.is(z,E)){const ne=E;E=oe??(typeof z!="object"||z===null)?z:Object.assign({},E,z),P.forEach(Z=>Z(E,ne))}},D=()=>E,te={setState:N,getState:D,getInitialState:()=>ie,subscribe:pe=>(P.add(pe),()=>P.delete(pe)),destroy:()=>{(URn?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),P.clear()}},ie=E=p(N,D,te);return te},XRn=p=>p?ihn(p):ihn,{useDebugValue:KRn}=qFn,{useSyncExternalStoreWithSelector:WRn}=HFn,VRn=p=>p;function wan(p,E=VRn,P){const N=WRn(p.subscribe,p.getState,p.getServerState||p.getInitialState,E,P);return KRn(N),N}const rhn=(p,E)=>{const P=XRn(p),N=(D,$=E)=>wan(P,D,$);return Object.assign(N,P),N},QRn=(p,E)=>p?rhn(p,E):rhn;function Cs(p,E){if(Object.is(p,E))return!0;if(typeof p!="object"||p===null||typeof E!="object"||E===null)return!1;if(p instanceof Map&&E instanceof Map){if(p.size!==E.size)return!1;for(const[N,D]of p)if(!Object.is(D,E.get(N)))return!1;return!0}if(p instanceof Set&&E instanceof Set){if(p.size!==E.size)return!1;for(const N of p)if(!E.has(N))return!1;return!0}const P=Object.keys(p);if(P.length!==Object.keys(E).length)return!1;for(const N of P)if(!Object.prototype.hasOwnProperty.call(E,N)||!Object.is(p[N],E[N]))return!1;return!0}const qX=cn.createContext(null),YRn=qX.Provider,gan=r2.error001("react");function Sc(p,E){const P=cn.useContext(qX);if(P===null)throw new Error(gan);return wan(P,p,E)}function cs(){const p=cn.useContext(qX);if(p===null)throw new Error(gan);return cn.useMemo(()=>({getState:p.getState,setState:p.setState,subscribe:p.subscribe}),[p])}const chn={display:"none"},ZRn={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},pan="react-flow__node-desc",man="react-flow__edge-desc",e_n="react-flow__aria-live",n_n=p=>p.ariaLiveMessage,t_n=p=>p.ariaLabelConfig;function i_n({rfId:p}){const E=Sc(n_n);return le.jsx("div",{id:`${e_n}-${p}`,"aria-live":"assertive","aria-atomic":"true",style:ZRn,children:E})}function r_n({rfId:p,disableKeyboardA11y:E}){const P=Sc(t_n);return le.jsxs(le.Fragment,{children:[le.jsx("div",{id:`${pan}-${p}`,style:chn,children:E?P["node.a11yDescription.default"]:P["node.a11yDescription.keyboardDisabled"]}),le.jsx("div",{id:`${man}-${p}`,style:chn,children:P["edge.a11yDescription.default"]}),!E&&le.jsx(i_n,{rfId:p})]})}const kN=cn.forwardRef(({position:p="top-left",children:E,className:P,style:N,...D},$)=>{const v=`${p}`.split("-");return le.jsx("div",{className:Xf(["react-flow__panel",P,...v]),style:N,ref:$,...D,children:E})});kN.displayName="Panel";const uhn="https://reactflow.dev?utm_source=attribution";function c_n({proOptions:p,position:E="bottom-right"}){return cn.useEffect(()=>{},[]),p!=null&&p.hideAttribution?null:le.jsx(kN,{position:E,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${uhn}`,children:le.jsx("a",{href:uhn,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const u_n=p=>{const E=[],P=[];for(const[,N]of p.nodeLookup)N.selected&&E.push(N.internals.userNode);for(const[,N]of p.edgeLookup)N.selected&&P.push(N);return{selectedNodes:E,selectedEdges:P}},IX=p=>p.id;function o_n(p,E){return Cs(p.selectedNodes.map(IX),E.selectedNodes.map(IX))&&Cs(p.selectedEdges.map(IX),E.selectedEdges.map(IX))}function s_n({onSelectionChange:p}){const E=cs(),{selectedNodes:P,selectedEdges:N}=Sc(u_n,o_n);return cn.useEffect(()=>{const D={nodes:P,edges:N};p==null||p(D),E.getState().onSelectionChangeHandlers.forEach($=>$(D))},[P,N,p]),null}const f_n=p=>!!p.onSelectionChangeHandlers;function l_n({onSelectionChange:p}){const E=Sc(f_n);return p||E?le.jsx(s_n,{onSelectionChange:p}):null}const van=[0,0],h_n={x:0,y:0,zoom:1},a_n=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],ohn=[...a_n,"rfId"],d_n=p=>({setNodes:p.setNodes,setEdges:p.setEdges,setMinZoom:p.setMinZoom,setMaxZoom:p.setMaxZoom,setTranslateExtent:p.setTranslateExtent,setNodeExtent:p.setNodeExtent,reset:p.reset,setDefaultNodesAndEdges:p.setDefaultNodesAndEdges}),shn={translateExtent:hN,nodeOrigin:van,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function b_n(p){const{setNodes:E,setEdges:P,setMinZoom:N,setMaxZoom:D,setTranslateExtent:$,setNodeExtent:v,reset:q,setDefaultNodesAndEdges:te}=Sc(d_n,Cs),ie=cs();cn.useEffect(()=>(te(p.defaultNodes,p.defaultEdges),()=>{pe.current=shn,q()}),[]);const pe=cn.useRef(shn);return cn.useEffect(()=>{for(const oe of ohn){const z=p[oe],ne=pe.current[oe];z!==ne&&(typeof p[oe]>"u"||(oe==="nodes"?E(z):oe==="edges"?P(z):oe==="minZoom"?N(z):oe==="maxZoom"?D(z):oe==="translateExtent"?$(z):oe==="nodeExtent"?v(z):oe==="ariaLabelConfig"?ie.setState({ariaLabelConfig:iRn(z)}):oe==="fitView"?ie.setState({fitViewQueued:z}):oe==="fitViewOptions"?ie.setState({fitViewOptions:z}):ie.setState({[oe]:z})))}pe.current=p},ohn.map(oe=>p[oe])),null}function fhn(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function w_n(p){var N;const[E,P]=cn.useState(p==="system"?null:p);return cn.useEffect(()=>{if(p!=="system"){P(p);return}const D=fhn(),$=()=>P(D!=null&&D.matches?"dark":"light");return $(),D==null||D.addEventListener("change",$),()=>{D==null||D.removeEventListener("change",$)}},[p]),E!==null?E:(N=fhn())!=null&&N.matches?"dark":"light"}const lhn=typeof document<"u"?document:null;function gN(p=null,E={target:lhn,actInsideInputWithModifier:!0}){const[P,N]=cn.useState(!1),D=cn.useRef(!1),$=cn.useRef(new Set([])),[v,q]=cn.useMemo(()=>{if(p!==null){const ie=(Array.isArray(p)?p:[p]).filter(oe=>typeof oe=="string").map(oe=>oe.replace(/\+/g,`
|
|
1
|
+
import{mz as HFn,R as qFn,r as cn,j as le,ez as Nhn,ji as zFn,k5 as UFn,ib as XFn,mA as KFn,ar as fN,by as Tge,B as Sge,aj as Dhn,G as i2,aS as Ige,b9 as Pge,b8 as WFn,_ as oN,f as VFn,iP as QFn,X as YFn,bx as ZFn,mB as eBn,eS as $ln,eR as nBn,ai as tBn,eP as Fln,ap as iBn,mC as rBn,ad as cBn,aw as uBn,ii as oBn,bX as AX,ff as sBn,x as Bln,ig as fBn,hM as lBn,fX as hBn,fY as aBn,fZ as dBn,f_ as bBn,f$ as wBn,g0 as gBn,g1 as pBn,g2 as mBn,ht as vBn}from"./index-CjUfPyOM.js";import{s as B0,g as Lhn,j as Oge,T as fge,k as lge,t as yBn}from"./transform-BqqRT-Iy.js";import{i as hge}from"./value-wA6veExk.js";import{H as $X}from"./_shell.team-CTIVEpZQ.js";import{H as kBn}from"./heart-BrjEmIsl.js";import{a as age,A as jBn}from"./AdapterIcon-CEHkdca8.js";import"./relay-trace-schemas-XcVQg5Fa.js";import{d as EBn,c as ABn,a as MBn,B as CBn}from"./BindingDialog-DZcTXLE8.js";import{s as xBn}from"./session-strategy-labels-C7Wduch3.js";import{c as MX}from"./_commonjs-dynamic-modules-TDtrdbi3.js";import{u as TBn}from"./use-mesh-topology-DurMpvjU.js";import{E as SBn}from"./empty-state-aNwJA6H8.js";import{Q as Rln}from"./query-error-state-COuKRlU0.js";import{u as IBn}from"./use-bindings-Bu4yLLR5.js";import{u as PBn}from"./use-delete-binding-DKObM-zT.js";import{u as OBn}from"./use-relay-config-BA6c0FMB.js";import"./use-pending-read-BBBAnUYu.js";import"./search-x-Cjf0n9z7.js";import"./scroll-area-BNFXgTKM.js";import"./OpenMeshSwitch-DdJ7g4yD.js";import"./table-B0LsKsEv.js";import"./use-is-hub-CFhvDMHt.js";import"./page-container-B9sDc2wq.js";import"./profile-errors-CezsKqhA.js";import"./CommitmentList-CcCSwcZ8.js";import"./TeamComputerEntry-BD89Y5e6.js";import"./ComputerViewer-B8SWICbj.js";import"./form-C_yPntkz.js";import"./use-adapter-catalog-C333Z2Q6.js";import"./trust-posture-Cm7OhCEx.js";function Xf(p){if(typeof p=="string"||typeof p=="number")return""+p;let E="";if(Array.isArray(p))for(let P=0,N;P<p.length;P++)(N=Xf(p[P]))!==""&&(E+=(E&&" ")+N);else for(let P in p)p[P]&&(E+=(E&&" ")+P);return E}function NBn(p){let E;for(;E=p.sourceEvent;)p=E;return p}function e2(p,E){if(p=NBn(p),E===void 0&&(E=p.currentTarget),E){var P=E.ownerSVGElement||E;if(P.createSVGPoint){var N=P.createSVGPoint();return N.x=p.clientX,N.y=p.clientY,N=N.matrixTransform(E.getScreenCTM().inverse()),[N.x,N.y]}if(E.getBoundingClientRect){var D=E.getBoundingClientRect();return[p.clientX-D.left-E.clientLeft,p.clientY-D.top-E.clientTop]}}return[p.pageX,p.pageY]}const DBn={passive:!1},lN={capture:!0,passive:!1};function dge(p){p.stopImmediatePropagation()}function IA(p){p.preventDefault(),p.stopImmediatePropagation()}function $hn(p){var E=p.document.documentElement,P=B0(p).on("dragstart.drag",IA,lN);"onselectstart"in E?P.on("selectstart.drag",IA,lN):(E.__noselect=E.style.MozUserSelect,E.style.MozUserSelect="none")}function Fhn(p,E){var P=p.document.documentElement,N=B0(p).on("dragstart.drag",null);E&&(N.on("click.drag",IA,lN),setTimeout(function(){N.on("click.drag",null)},0)),"onselectstart"in P?N.on("selectstart.drag",null):(P.style.MozUserSelect=P.__noselect,delete P.__noselect)}const CX=p=>()=>p;function kge(p,{sourceEvent:E,subject:P,target:N,identifier:D,active:$,x:v,y:q,dx:te,dy:ie,dispatch:pe}){Object.defineProperties(this,{type:{value:p,enumerable:!0,configurable:!0},sourceEvent:{value:E,enumerable:!0,configurable:!0},subject:{value:P,enumerable:!0,configurable:!0},target:{value:N,enumerable:!0,configurable:!0},identifier:{value:D,enumerable:!0,configurable:!0},active:{value:$,enumerable:!0,configurable:!0},x:{value:v,enumerable:!0,configurable:!0},y:{value:q,enumerable:!0,configurable:!0},dx:{value:te,enumerable:!0,configurable:!0},dy:{value:ie,enumerable:!0,configurable:!0},_:{value:pe}})}kge.prototype.on=function(){var p=this._.on.apply(this._,arguments);return p===this._?this:p};function LBn(p){return!p.ctrlKey&&!p.button}function $Bn(){return this.parentNode}function FBn(p,E){return E??{x:p.x,y:p.y}}function BBn(){return navigator.maxTouchPoints||"ontouchstart"in this}function Bhn(){var p=LBn,E=$Bn,P=FBn,N=BBn,D={},$=Lhn("start","drag","end"),v=0,q,te,ie,pe,oe=0;function z(Ce){Ce.on("mousedown.drag",ne).filter(N).on("touchstart.drag",Ee).on("touchmove.drag",re,DBn).on("touchend.drag touchcancel.drag",we).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function ne(Ce,Qe){if(!(pe||!p.call(this,Ce,Qe))){var Xe=ee(this,E.call(this,Ce,Qe),Ce,Qe,"mouse");Xe&&(B0(Ce.view).on("mousemove.drag",Z,lN).on("mouseup.drag",U,lN),$hn(Ce.view),dge(Ce),ie=!1,q=Ce.clientX,te=Ce.clientY,Xe("start",Ce))}}function Z(Ce){if(IA(Ce),!ie){var Qe=Ce.clientX-q,Xe=Ce.clientY-te;ie=Qe*Qe+Xe*Xe>oe}D.mouse("drag",Ce)}function U(Ce){B0(Ce.view).on("mousemove.drag mouseup.drag",null),Fhn(Ce.view,ie),IA(Ce),D.mouse("end",Ce)}function Ee(Ce,Qe){if(p.call(this,Ce,Qe)){var Xe=Ce.changedTouches,Ze=E.call(this,Ce,Qe),vn=Xe.length,jn,et;for(jn=0;jn<vn;++jn)(et=ee(this,Ze,Ce,Qe,Xe[jn].identifier,Xe[jn]))&&(dge(Ce),et("start",Ce,Xe[jn]))}}function re(Ce){var Qe=Ce.changedTouches,Xe=Qe.length,Ze,vn;for(Ze=0;Ze<Xe;++Ze)(vn=D[Qe[Ze].identifier])&&(IA(Ce),vn("drag",Ce,Qe[Ze]))}function we(Ce){var Qe=Ce.changedTouches,Xe=Qe.length,Ze,vn;for(pe&&clearTimeout(pe),pe=setTimeout(function(){pe=null},500),Ze=0;Ze<Xe;++Ze)(vn=D[Qe[Ze].identifier])&&(dge(Ce),vn("end",Ce,Qe[Ze]))}function ee(Ce,Qe,Xe,Ze,vn,jn){var et=$.copy(),Dn=e2(jn||Xe,Qe),Kn,_,je;if((je=P.call(Ce,new kge("beforestart",{sourceEvent:Xe,target:z,identifier:vn,active:v,x:Dn[0],y:Dn[1],dx:0,dy:0,dispatch:et}),Ze))!=null)return Kn=je.x-Dn[0]||0,_=je.y-Dn[1]||0,function rn(sn,Sn,Bn){var dn=Dn,Jn;switch(sn){case"start":D[vn]=rn,Jn=v++;break;case"end":delete D[vn],--v;case"drag":Dn=e2(Bn||Sn,Qe),Jn=v;break}et.call(sn,Ce,new kge(sn,{sourceEvent:Sn,subject:je,target:z,identifier:vn,active:Jn,x:Dn[0]+Kn,y:Dn[1]+_,dx:Dn[0]-dn[0],dy:Dn[1]-dn[1],dispatch:et}),Ze)}}return z.filter=function(Ce){return arguments.length?(p=typeof Ce=="function"?Ce:CX(!!Ce),z):p},z.container=function(Ce){return arguments.length?(E=typeof Ce=="function"?Ce:CX(Ce),z):E},z.subject=function(Ce){return arguments.length?(P=typeof Ce=="function"?Ce:CX(Ce),z):P},z.touchable=function(Ce){return arguments.length?(N=typeof Ce=="function"?Ce:CX(!!Ce),z):N},z.on=function(){var Ce=$.on.apply($,arguments);return Ce===$?z:Ce},z.clickDistance=function(Ce){return arguments.length?(oe=(Ce=+Ce)*Ce,z):Math.sqrt(oe)},z}var RBn=1e-12;function _ln(p){return((p=Math.exp(p))+1/p)/2}function _Bn(p){return((p=Math.exp(p))-1/p)/2}function JBn(p){return((p=Math.exp(2*p))-1)/(p+1)}const NX=(function p(E,P,N){function D($,v){var q=$[0],te=$[1],ie=$[2],pe=v[0],oe=v[1],z=v[2],ne=pe-q,Z=oe-te,U=ne*ne+Z*Z,Ee,re;if(U<RBn)re=Math.log(z/ie)/E,Ee=function(Ze){return[q+Ze*ne,te+Ze*Z,ie*Math.exp(E*Ze*re)]};else{var we=Math.sqrt(U),ee=(z*z-ie*ie+N*U)/(2*ie*P*we),Ce=(z*z-ie*ie-N*U)/(2*z*P*we),Qe=Math.log(Math.sqrt(ee*ee+1)-ee),Xe=Math.log(Math.sqrt(Ce*Ce+1)-Ce);re=(Xe-Qe)/E,Ee=function(Ze){var vn=Ze*re,jn=_ln(Qe),et=ie/(P*we)*(jn*JBn(E*vn+Qe)-_Bn(Qe));return[q+et*ne,te+et*Z,ie*jn/_ln(E*vn+Qe)]}}return Ee.duration=re*1e3*E/Math.SQRT2,Ee}return D.rho=function($){var v=Math.max(.001,+$),q=v*v,te=q*q;return p(v,q,te)},D})(Math.SQRT2,2,4),xX=p=>()=>p;function GBn(p,{sourceEvent:E,target:P,transform:N,dispatch:D}){Object.defineProperties(this,{type:{value:p,enumerable:!0,configurable:!0},sourceEvent:{value:E,enumerable:!0,configurable:!0},target:{value:P,enumerable:!0,configurable:!0},transform:{value:N,enumerable:!0,configurable:!0},_:{value:D}})}function bge(p){p.stopImmediatePropagation()}function uN(p){p.preventDefault(),p.stopImmediatePropagation()}function HBn(p){return(!p.ctrlKey||p.type==="wheel")&&!p.button}function qBn(){var p=this;return p instanceof SVGElement?(p=p.ownerSVGElement||p,p.hasAttribute("viewBox")?(p=p.viewBox.baseVal,[[p.x,p.y],[p.x+p.width,p.y+p.height]]):[[0,0],[p.width.baseVal.value,p.height.baseVal.value]]):[[0,0],[p.clientWidth,p.clientHeight]]}function Jln(){return this.__zoom||Oge}function zBn(p){return-p.deltaY*(p.deltaMode===1?.05:p.deltaMode?1:.002)*(p.ctrlKey?10:1)}function UBn(){return navigator.maxTouchPoints||"ontouchstart"in this}function XBn(p,E,P){var N=p.invertX(E[0][0])-P[0][0],D=p.invertX(E[1][0])-P[1][0],$=p.invertY(E[0][1])-P[0][1],v=p.invertY(E[1][1])-P[1][1];return p.translate(D>N?(N+D)/2:Math.min(0,N)||Math.max(0,D),v>$?($+v)/2:Math.min(0,$)||Math.max(0,v))}function Rhn(){var p=HBn,E=qBn,P=XBn,N=zBn,D=UBn,$=[0,1/0],v=[[-1/0,-1/0],[1/0,1/0]],q=250,te=NX,ie=Lhn("start","zoom","end"),pe,oe,z,ne=500,Z=150,U=0,Ee=10;function re(je){je.property("__zoom",Jln).on("wheel.zoom",vn,{passive:!1}).on("mousedown.zoom",jn).on("dblclick.zoom",et).filter(D).on("touchstart.zoom",Dn).on("touchmove.zoom",Kn).on("touchend.zoom touchcancel.zoom",_).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}re.transform=function(je,rn,sn,Sn){var Bn=je.selection?je.selection():je;Bn.property("__zoom",Jln),je!==Bn?Qe(je,rn,sn,Sn):Bn.interrupt().each(function(){Xe(this,arguments).event(Sn).start().zoom(null,typeof rn=="function"?rn.apply(this,arguments):rn).end()})},re.scaleBy=function(je,rn,sn,Sn){re.scaleTo(je,function(){var Bn=this.__zoom.k,dn=typeof rn=="function"?rn.apply(this,arguments):rn;return Bn*dn},sn,Sn)},re.scaleTo=function(je,rn,sn,Sn){re.transform(je,function(){var Bn=E.apply(this,arguments),dn=this.__zoom,Jn=sn==null?Ce(Bn):typeof sn=="function"?sn.apply(this,arguments):sn,Nn=dn.invert(Jn),qn=typeof rn=="function"?rn.apply(this,arguments):rn;return P(ee(we(dn,qn),Jn,Nn),Bn,v)},sn,Sn)},re.translateBy=function(je,rn,sn,Sn){re.transform(je,function(){return P(this.__zoom.translate(typeof rn=="function"?rn.apply(this,arguments):rn,typeof sn=="function"?sn.apply(this,arguments):sn),E.apply(this,arguments),v)},null,Sn)},re.translateTo=function(je,rn,sn,Sn,Bn){re.transform(je,function(){var dn=E.apply(this,arguments),Jn=this.__zoom,Nn=Sn==null?Ce(dn):typeof Sn=="function"?Sn.apply(this,arguments):Sn;return P(Oge.translate(Nn[0],Nn[1]).scale(Jn.k).translate(typeof rn=="function"?-rn.apply(this,arguments):-rn,typeof sn=="function"?-sn.apply(this,arguments):-sn),dn,v)},Sn,Bn)};function we(je,rn){return rn=Math.max($[0],Math.min($[1],rn)),rn===je.k?je:new fge(rn,je.x,je.y)}function ee(je,rn,sn){var Sn=rn[0]-sn[0]*je.k,Bn=rn[1]-sn[1]*je.k;return Sn===je.x&&Bn===je.y?je:new fge(je.k,Sn,Bn)}function Ce(je){return[(+je[0][0]+ +je[1][0])/2,(+je[0][1]+ +je[1][1])/2]}function Qe(je,rn,sn,Sn){je.on("start.zoom",function(){Xe(this,arguments).event(Sn).start()}).on("interrupt.zoom end.zoom",function(){Xe(this,arguments).event(Sn).end()}).tween("zoom",function(){var Bn=this,dn=arguments,Jn=Xe(Bn,dn).event(Sn),Nn=E.apply(Bn,dn),qn=sn==null?Ce(Nn):typeof sn=="function"?sn.apply(Bn,dn):sn,Jt=Math.max(Nn[1][0]-Nn[0][0],Nn[1][1]-Nn[0][1]),Xt=Bn.__zoom,Oi=typeof rn=="function"?rn.apply(Bn,dn):rn,gr=te(Xt.invert(qn).concat(Jt/Xt.k),Oi.invert(qn).concat(Jt/Oi.k));return function(Ki){if(Ki===1)Ki=Oi;else{var Wn=gr(Ki),ei=Jt/Wn[2];Ki=new fge(ei,qn[0]-Wn[0]*ei,qn[1]-Wn[1]*ei)}Jn.zoom(null,Ki)}})}function Xe(je,rn,sn){return!sn&&je.__zooming||new Ze(je,rn)}function Ze(je,rn){this.that=je,this.args=rn,this.active=0,this.sourceEvent=null,this.extent=E.apply(je,rn),this.taps=0}Ze.prototype={event:function(je){return je&&(this.sourceEvent=je),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(je,rn){return this.mouse&&je!=="mouse"&&(this.mouse[1]=rn.invert(this.mouse[0])),this.touch0&&je!=="touch"&&(this.touch0[1]=rn.invert(this.touch0[0])),this.touch1&&je!=="touch"&&(this.touch1[1]=rn.invert(this.touch1[0])),this.that.__zoom=rn,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(je){var rn=B0(this.that).datum();ie.call(je,this.that,new GBn(je,{sourceEvent:this.sourceEvent,target:re,transform:this.that.__zoom,dispatch:ie}),rn)}};function vn(je,...rn){if(!p.apply(this,arguments))return;var sn=Xe(this,rn).event(je),Sn=this.__zoom,Bn=Math.max($[0],Math.min($[1],Sn.k*Math.pow(2,N.apply(this,arguments)))),dn=e2(je);if(sn.wheel)(sn.mouse[0][0]!==dn[0]||sn.mouse[0][1]!==dn[1])&&(sn.mouse[1]=Sn.invert(sn.mouse[0]=dn)),clearTimeout(sn.wheel);else{if(Sn.k===Bn)return;sn.mouse=[dn,Sn.invert(dn)],lge(this),sn.start()}uN(je),sn.wheel=setTimeout(Jn,Z),sn.zoom("mouse",P(ee(we(Sn,Bn),sn.mouse[0],sn.mouse[1]),sn.extent,v));function Jn(){sn.wheel=null,sn.end()}}function jn(je,...rn){if(z||!p.apply(this,arguments))return;var sn=je.currentTarget,Sn=Xe(this,rn,!0).event(je),Bn=B0(je.view).on("mousemove.zoom",qn,!0).on("mouseup.zoom",Jt,!0),dn=e2(je,sn),Jn=je.clientX,Nn=je.clientY;$hn(je.view),bge(je),Sn.mouse=[dn,this.__zoom.invert(dn)],lge(this),Sn.start();function qn(Xt){if(uN(Xt),!Sn.moved){var Oi=Xt.clientX-Jn,gr=Xt.clientY-Nn;Sn.moved=Oi*Oi+gr*gr>U}Sn.event(Xt).zoom("mouse",P(ee(Sn.that.__zoom,Sn.mouse[0]=e2(Xt,sn),Sn.mouse[1]),Sn.extent,v))}function Jt(Xt){Bn.on("mousemove.zoom mouseup.zoom",null),Fhn(Xt.view,Sn.moved),uN(Xt),Sn.event(Xt).end()}}function et(je,...rn){if(p.apply(this,arguments)){var sn=this.__zoom,Sn=e2(je.changedTouches?je.changedTouches[0]:je,this),Bn=sn.invert(Sn),dn=sn.k*(je.shiftKey?.5:2),Jn=P(ee(we(sn,dn),Sn,Bn),E.apply(this,rn),v);uN(je),q>0?B0(this).transition().duration(q).call(Qe,Jn,Sn,je):B0(this).call(re.transform,Jn,Sn,je)}}function Dn(je,...rn){if(p.apply(this,arguments)){var sn=je.touches,Sn=sn.length,Bn=Xe(this,rn,je.changedTouches.length===Sn).event(je),dn,Jn,Nn,qn;for(bge(je),Jn=0;Jn<Sn;++Jn)Nn=sn[Jn],qn=e2(Nn,this),qn=[qn,this.__zoom.invert(qn),Nn.identifier],Bn.touch0?!Bn.touch1&&Bn.touch0[2]!==qn[2]&&(Bn.touch1=qn,Bn.taps=0):(Bn.touch0=qn,dn=!0,Bn.taps=1+!!pe);pe&&(pe=clearTimeout(pe)),dn&&(Bn.taps<2&&(oe=qn[0],pe=setTimeout(function(){pe=null},ne)),lge(this),Bn.start())}}function Kn(je,...rn){if(this.__zooming){var sn=Xe(this,rn).event(je),Sn=je.changedTouches,Bn=Sn.length,dn,Jn,Nn,qn;for(uN(je),dn=0;dn<Bn;++dn)Jn=Sn[dn],Nn=e2(Jn,this),sn.touch0&&sn.touch0[2]===Jn.identifier?sn.touch0[0]=Nn:sn.touch1&&sn.touch1[2]===Jn.identifier&&(sn.touch1[0]=Nn);if(Jn=sn.that.__zoom,sn.touch1){var Jt=sn.touch0[0],Xt=sn.touch0[1],Oi=sn.touch1[0],gr=sn.touch1[1],Ki=(Ki=Oi[0]-Jt[0])*Ki+(Ki=Oi[1]-Jt[1])*Ki,Wn=(Wn=gr[0]-Xt[0])*Wn+(Wn=gr[1]-Xt[1])*Wn;Jn=we(Jn,Math.sqrt(Ki/Wn)),Nn=[(Jt[0]+Oi[0])/2,(Jt[1]+Oi[1])/2],qn=[(Xt[0]+gr[0])/2,(Xt[1]+gr[1])/2]}else if(sn.touch0)Nn=sn.touch0[0],qn=sn.touch0[1];else return;sn.zoom("touch",P(ee(Jn,Nn,qn),sn.extent,v))}}function _(je,...rn){if(this.__zooming){var sn=Xe(this,rn).event(je),Sn=je.changedTouches,Bn=Sn.length,dn,Jn;for(bge(je),z&&clearTimeout(z),z=setTimeout(function(){z=null},ne),dn=0;dn<Bn;++dn)Jn=Sn[dn],sn.touch0&&sn.touch0[2]===Jn.identifier?delete sn.touch0:sn.touch1&&sn.touch1[2]===Jn.identifier&&delete sn.touch1;if(sn.touch1&&!sn.touch0&&(sn.touch0=sn.touch1,delete sn.touch1),sn.touch0)sn.touch0[1]=this.__zoom.invert(sn.touch0[0]);else if(sn.end(),sn.taps===2&&(Jn=e2(Jn,this),Math.hypot(oe[0]-Jn[0],oe[1]-Jn[1])<Ee)){var Nn=B0(this).on("dblclick.zoom");Nn&&Nn.apply(this,arguments)}}}return re.wheelDelta=function(je){return arguments.length?(N=typeof je=="function"?je:xX(+je),re):N},re.filter=function(je){return arguments.length?(p=typeof je=="function"?je:xX(!!je),re):p},re.touchable=function(je){return arguments.length?(D=typeof je=="function"?je:xX(!!je),re):D},re.extent=function(je){return arguments.length?(E=typeof je=="function"?je:xX([[+je[0][0],+je[0][1]],[+je[1][0],+je[1][1]]]),re):E},re.scaleExtent=function(je){return arguments.length?($[0]=+je[0],$[1]=+je[1],re):[$[0],$[1]]},re.translateExtent=function(je){return arguments.length?(v[0][0]=+je[0][0],v[1][0]=+je[1][0],v[0][1]=+je[0][1],v[1][1]=+je[1][1],re):[[v[0][0],v[0][1]],[v[1][0],v[1][1]]]},re.constrain=function(je){return arguments.length?(P=je,re):P},re.duration=function(je){return arguments.length?(q=+je,re):q},re.interpolate=function(je){return arguments.length?(te=je,re):te},re.on=function(){var je=ie.on.apply(ie,arguments);return je===ie?re:je},re.clickDistance=function(je){return arguments.length?(U=(je=+je)*je,re):Math.sqrt(U)},re.tapDistance=function(je){return arguments.length?(Ee=+je,re):Ee},re}const r2={error001:(p="react")=>`Seems like you have not used ${p==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${p}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:p=>`Node type "${p}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:p=>`The old edge with id=${p} does not exist.`,error009:p=>`Marker type "${p}" doesn't exist.`,error008:(p,{id:E,sourceHandle:P,targetHandle:N})=>`Couldn't create edge for ${p} handle id: "${p==="source"?P:N}", edge id: ${E}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:p=>`Edge type "${p}" not found. Using fallback type "default".`,error012:p=>`Node with id "${p}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(p="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${p}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:p=>`Edge with id "${p}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},hN=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],_hn=["Enter"," ","Escape"],Jhn={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:p,x:E,y:P})=>`Moved selected node ${p}. New position, x: ${E}, y: ${P}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var PA;(function(p){p.Strict="strict",p.Loose="loose"})(PA||(PA={}));var nk;(function(p){p.Free="free",p.Vertical="vertical",p.Horizontal="horizontal"})(nk||(nk={}));var aN;(function(p){p.Partial="partial",p.Full="full"})(aN||(aN={}));const Ghn={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var z5;(function(p){p.Bezier="default",p.Straight="straight",p.Step="step",p.SmoothStep="smoothstep",p.SimpleBezier="simplebezier"})(z5||(z5={}));var dN;(function(p){p.Arrow="arrow",p.ArrowClosed="arrowclosed"})(dN||(dN={}));var ji;(function(p){p.Left="left",p.Top="top",p.Right="right",p.Bottom="bottom"})(ji||(ji={}));const Gln={[ji.Left]:ji.Right,[ji.Right]:ji.Left,[ji.Top]:ji.Bottom,[ji.Bottom]:ji.Top},Hhn=p=>!!p&&typeof p=="object"&&"id"in p&&"source"in p&&"target"in p,KBn=p=>!!p&&typeof p=="object"&&"id"in p&&"position"in p&&!("source"in p)&&!("target"in p),Nge=p=>!!p&&typeof p=="object"&&"id"in p&&"internals"in p&&!("source"in p)&&!("target"in p),pN=(p,E=[0,0])=>{const{width:P,height:N}=c2(p),D=p.origin??E,$=P*D[0],v=N*D[1];return{x:p.position.x-$,y:p.position.y-v}},WBn=(p,E={nodeOrigin:[0,0]})=>{if(p.length===0)return{x:0,y:0,width:0,height:0};let P=!1;const N=p.reduce((D,$)=>{const v=typeof $=="string";let q=!E.nodeLookup&&!v?$:void 0;return E.nodeLookup&&(q=v?E.nodeLookup.get($):Nge($)?$:E.nodeLookup.get($.id)),q?(P=!0,JX(D,FX(q,E.nodeOrigin))):D},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return P?GX(N):{x:0,y:0,width:0,height:0}},LA=(p,E={})=>{let P={x:1/0,y:1/0,x2:-1/0,y2:-1/0},N=!1;return p.forEach(D=>{(E.filter===void 0||E.filter(D))&&(P=JX(P,FX(D)),N=!0)}),N?GX(P):{x:0,y:0,width:0,height:0}},Dge=(p,E,[P,N,D]=[0,0,1],$=!1,v=!1)=>{const q=(E.x-P)/D,te=(E.y-N)/D,ie=E.width/D,pe=E.height/D,oe=[];for(const z of p.values()){const{measured:ne,selectable:Z=!0,hidden:U=!1}=z;if(v&&!Z||U)continue;const Ee=ne.width??z.width??z.initialWidth??0,re=ne.height??z.height??z.initialHeight??0,{x:we,y:ee}=z.internals.positionAbsolute,Ce=Xhn(q,te,ie,pe,we,ee,Ee,re),Qe=Ee*re,Xe=$&&Ce>0;(!z.internals.handleBounds||Xe||Ce>=Qe||z.dragging)&&oe.push(z)}return oe},VBn=(p,E)=>{const P=new Set;return p.forEach(N=>{P.add(N.id)}),E.filter(N=>P.has(N.source)||P.has(N.target))};function QBn(p,E){const P=new Map,N=E!=null&&E.nodes?new Set(E.nodes.map(D=>D.id)):null;return p.forEach(D=>{let $;if(E!=null&&E.includeHiddenNodes){const{width:v,height:q}=c2(D);$=v>0&&q>0}else $=!!(D.measured.width&&D.measured.height&&!D.hidden);$&&(!N||N.has(D.id))&&P.set(D.id,D)}),P}async function YBn({nodes:p,width:E,height:P,panZoom:N,minZoom:D,maxZoom:$},v){if(p.size===0)return!0;const q=QBn(p,v),te=LA(q),ie=$ge(te,E,P,(v==null?void 0:v.minZoom)??D,(v==null?void 0:v.maxZoom)??$,(v==null?void 0:v.padding)??.1);return await N.setViewport(ie,{duration:v==null?void 0:v.duration,ease:v==null?void 0:v.ease,interpolate:v==null?void 0:v.interpolate}),!0}function qhn({nodeId:p,nextPosition:E,nodeLookup:P,nodeOrigin:N=[0,0],nodeExtent:D,onError:$}){const v=P.get(p),q=v.parentId?P.get(v.parentId):void 0,{x:te,y:ie}=q?q.internals.positionAbsolute:{x:0,y:0},pe=v.origin??N;let oe=v.extent||D;if(v.extent==="parent"&&!v.expandParent)if(!q)$==null||$("005",r2.error005());else{const{width:ne,height:Z}=c2(q);ne&&Z&&(oe=[[te,ie],[te+ne,ie+Z]])}else q&&ik(v.extent)&&(oe=[[v.extent[0][0]+te,v.extent[0][1]+ie],[v.extent[1][0]+te,v.extent[1][1]+ie]]);const z=ik(oe)?tk(E,oe,v.measured):E;return(v.measured.width===void 0||v.measured.height===void 0)&&($==null||$("015",r2.error015())),{position:{x:z.x-te+(v.measured.width??0)*pe[0],y:z.y-ie+(v.measured.height??0)*pe[1]},positionAbsolute:z}}async function ZBn({nodesToRemove:p=[],edgesToRemove:E=[],nodes:P,edges:N,onBeforeDelete:D}){const $=new Set(p.map(z=>z.id)),v=[];for(const z of P){if(z.deletable===!1)continue;const ne=$.has(z.id),Z=!ne&&z.parentId&&v.find(U=>U.id===z.parentId);(ne||Z)&&v.push(z)}const q=new Set(E.map(z=>z.id)),te=N.filter(z=>z.deletable!==!1),pe=VBn(v,te);for(const z of te)q.has(z.id)&&!pe.find(Z=>Z.id===z.id)&&pe.push(z);if(!D)return{edges:pe,nodes:v};const oe=await D({nodes:v,edges:pe});return typeof oe=="boolean"?oe?{edges:pe,nodes:v}:{edges:[],nodes:[]}:oe}const OA=(p,E=0,P=1)=>Math.min(Math.max(p,E),P),tk=(p={x:0,y:0},E,P)=>({x:OA(p.x,E[0][0],E[1][0]-((P==null?void 0:P.width)??0)),y:OA(p.y,E[0][1],E[1][1]-((P==null?void 0:P.height)??0))});function zhn(p,E,P){const{width:N,height:D}=c2(P),{x:$,y:v}=P.internals.positionAbsolute;return tk(p,[[$,v],[$+N,v+D]],E)}const Hln=(p,E,P)=>p<E?OA(Math.abs(p-E),1,E)/E:p>P?-OA(Math.abs(p-P),1,E)/E:0,Lge=(p,E,P=15,N=40)=>{const D=Hln(p.x,N,E.width-N)*P,$=Hln(p.y,N,E.height-N)*P;return[D,$]},JX=(p,E)=>({x:Math.min(p.x,E.x),y:Math.min(p.y,E.y),x2:Math.max(p.x2,E.x2),y2:Math.max(p.y2,E.y2)}),jge=({x:p,y:E,width:P,height:N})=>({x:p,y:E,x2:p+P,y2:E+N}),GX=({x:p,y:E,x2:P,y2:N})=>({x:p,y:E,width:P-p,height:N-E}),bN=(p,E=[0,0])=>{var D,$;const{x:P,y:N}=Nge(p)?p.internals.positionAbsolute:pN(p,E);return{x:P,y:N,width:((D=p.measured)==null?void 0:D.width)??p.width??p.initialWidth??0,height:(($=p.measured)==null?void 0:$.height)??p.height??p.initialHeight??0}},FX=(p,E=[0,0])=>{var D,$;const{x:P,y:N}=Nge(p)?p.internals.positionAbsolute:pN(p,E);return{x:P,y:N,x2:P+(((D=p.measured)==null?void 0:D.width)??p.width??p.initialWidth??0),y2:N+((($=p.measured)==null?void 0:$.height)??p.height??p.initialHeight??0)}},Uhn=(p,E)=>GX(JX(jge(p),jge(E))),Xhn=(p,E,P,N,D,$,v,q)=>{const te=Math.max(0,Math.min(p+P,D+v)-Math.max(p,D)),ie=Math.max(0,Math.min(E+N,$+q)-Math.max(E,$));return Math.ceil(te*ie)},BX=(p,E)=>Xhn(p.x,p.y,p.width,p.height,E.x,E.y,E.width,E.height),qln=p=>n2(p.width)&&n2(p.height)&&n2(p.x)&&n2(p.y),n2=p=>!isNaN(p)&&isFinite(p),Khn=(p,E)=>(P,N)=>{},mN=(p,E=[1,1])=>({x:E[0]*Math.round(p.x/E[0]),y:E[1]*Math.round(p.y/E[1])}),vN=({x:p,y:E},[P,N,D],$=!1,v=[1,1])=>{const q={x:(p-P)/D,y:(E-N)/D};return $?mN(q,v):q},NA=({x:p,y:E},[P,N,D])=>({x:p*D+P,y:E*D+N});function TA(p,E){if(typeof p=="number")return Math.floor((E-E/(1+p))*.5);if(typeof p=="string"&&p.endsWith("px")){const P=parseFloat(p);if(!Number.isNaN(P))return Math.floor(P)}if(typeof p=="string"&&p.endsWith("%")){const P=parseFloat(p);if(!Number.isNaN(P))return Math.floor(E*P*.01)}return console.error(`The padding value "${p}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function eRn(p,E,P){if(typeof p=="string"||typeof p=="number"){const N=TA(p,P),D=TA(p,E);return{top:N,right:D,bottom:N,left:D,x:D*2,y:N*2}}if(typeof p=="object"){const N=TA(p.top??p.y??0,P),D=TA(p.bottom??p.y??0,P),$=TA(p.left??p.x??0,E),v=TA(p.right??p.x??0,E);return{top:N,right:v,bottom:D,left:$,x:$+v,y:N+D}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function nRn(p,E,P,N,D,$){const{x:v,y:q}=NA(p,[E,P,N]),{x:te,y:ie}=NA({x:p.x+p.width,y:p.y+p.height},[E,P,N]),pe=D-te,oe=$-ie;return{left:Math.floor(v),top:Math.floor(q),right:Math.floor(pe),bottom:Math.floor(oe)}}const $ge=(p,E,P,N,D,$)=>{const v=eRn($,E,P),q=(E-v.x)/p.width,te=(P-v.y)/p.height,ie=Math.min(q,te),pe=OA(ie,N,D),oe=p.x+p.width/2,z=p.y+p.height/2,ne=E/2-oe*pe,Z=P/2-z*pe,U=nRn(p,ne,Z,pe,E,P),Ee={left:Math.min(U.left-v.left,0),top:Math.min(U.top-v.top,0),right:Math.min(U.right-v.right,0),bottom:Math.min(U.bottom-v.bottom,0)};return{x:ne-Ee.left+Ee.right,y:Z-Ee.top+Ee.bottom,zoom:pe}},wN=()=>{var p;return typeof navigator<"u"&&((p=navigator==null?void 0:navigator.userAgent)==null?void 0:p.indexOf("Mac"))>=0};function ik(p){return p!=null&&p!=="parent"}function c2(p){var E,P;return{width:((E=p.measured)==null?void 0:E.width)??p.width??p.initialWidth??0,height:((P=p.measured)==null?void 0:P.height)??p.height??p.initialHeight??0}}function Whn(p){var E,P;return(((E=p.measured)==null?void 0:E.width)??p.width??p.initialWidth)!==void 0&&(((P=p.measured)==null?void 0:P.height)??p.height??p.initialHeight)!==void 0}function Vhn(p,E={width:0,height:0},P,N,D){const $={...p},v=N.get(P);if(v){const q=v.origin||D;$.x+=v.internals.positionAbsolute.x-(E.width??0)*q[0],$.y+=v.internals.positionAbsolute.y-(E.height??0)*q[1]}return $}function zln(p,E){if(p.size!==E.size)return!1;for(const P of p)if(!E.has(P))return!1;return!0}function tRn(){let p,E;return{promise:new Promise((N,D)=>{p=N,E=D}),resolve:p,reject:E}}function iRn(p){return{...Jhn,...p||{}}}function Qhn(p){return p===null?null:p?"valid":"invalid"}function sN(p,{snapGrid:E=[0,0],snapToGrid:P=!1,transform:N,containerBounds:D}){const{x:$,y:v}=t2(p),q=vN({x:$-((D==null?void 0:D.left)??0),y:v-((D==null?void 0:D.top)??0)},N),{x:te,y:ie}=P?mN(q,E):q;return{xSnapped:te,ySnapped:ie,...q}}const Fge=p=>({width:p.offsetWidth,height:p.offsetHeight}),Yhn=p=>{var E;return((E=p==null?void 0:p.getRootNode)==null?void 0:E.call(p))||(window==null?void 0:window.document)},rRn=["INPUT","SELECT","TEXTAREA"];function Zhn(p){var N,D;const E=((D=(N=p.composedPath)==null?void 0:N.call(p))==null?void 0:D[0])||p.target;return(E==null?void 0:E.nodeType)!==1?!1:rRn.includes(E.nodeName)||E.hasAttribute("contenteditable")||!!E.closest(".nokey")}const ean=p=>"clientX"in p,t2=(p,E)=>{var $,v;const P=ean(p),N=P?p.clientX:($=p.touches)==null?void 0:$[0].clientX,D=P?p.clientY:(v=p.touches)==null?void 0:v[0].clientY;return{x:N-((E==null?void 0:E.left)??0),y:D-((E==null?void 0:E.top)??0)}},Uln=(p,E,P,N,D)=>{const $=E.querySelectorAll(`.${p}`);return!$||!$.length?null:Array.from($).map(v=>{const q=v.getBoundingClientRect();return{id:v.getAttribute("data-handleid"),type:p,nodeId:D,position:v.getAttribute("data-handlepos"),x:(q.left-P.left)/N,y:(q.top-P.top)/N,...Fge(v)}})};function nan({sourceX:p,sourceY:E,targetX:P,targetY:N,sourceControlX:D,sourceControlY:$,targetControlX:v,targetControlY:q}){const te=p*.125+D*.375+v*.375+P*.125,ie=E*.125+$*.375+q*.375+N*.125,pe=Math.abs(te-p),oe=Math.abs(ie-E);return[te,ie,pe,oe]}function TX(p,E){return p>=0?.5*p:E*25*Math.sqrt(-p)}function Xln({pos:p,x1:E,y1:P,x2:N,y2:D,c:$}){switch(p){case ji.Left:return[E-TX(E-N,$),P];case ji.Right:return[E+TX(N-E,$),P];case ji.Top:return[E,P-TX(P-D,$)];case ji.Bottom:return[E,P+TX(D-P,$)]}}function yN({sourceX:p,sourceY:E,sourcePosition:P=ji.Bottom,targetX:N,targetY:D,targetPosition:$=ji.Top,curvature:v=.25}){const[q,te]=Xln({pos:P,x1:p,y1:E,x2:N,y2:D,c:v}),[ie,pe]=Xln({pos:$,x1:N,y1:D,x2:p,y2:E,c:v}),[oe,z,ne,Z]=nan({sourceX:p,sourceY:E,targetX:N,targetY:D,sourceControlX:q,sourceControlY:te,targetControlX:ie,targetControlY:pe});return[`M${p},${E} C${q},${te} ${ie},${pe} ${N},${D}`,oe,z,ne,Z]}function tan({sourceX:p,sourceY:E,targetX:P,targetY:N}){const D=Math.abs(P-p)/2,$=P<p?P+D:P-D,v=Math.abs(N-E)/2,q=N<E?N+v:N-v;return[$,q,D,v]}function cRn({sourceNode:p,targetNode:E,selected:P=!1,zIndex:N=0,elevateOnSelect:D=!1,zIndexMode:$="basic"}){if($==="manual")return N;const v=D&&P?N+1e3:N,q=Math.max(p.parentId||D&&p.selected?p.internals.z:0,E.parentId||D&&E.selected?E.internals.z:0);return v+q}function uRn({sourceNode:p,targetNode:E,width:P,height:N,transform:D}){const $=JX(FX(p),FX(E));$.x===$.x2&&($.x2+=1),$.y===$.y2&&($.y2+=1);const v={x:-D[0]/D[2],y:-D[1]/D[2],width:P/D[2],height:N/D[2]};return BX(v,GX($))>0}const oRn=({source:p,sourceHandle:E,target:P,targetHandle:N})=>`xy-edge__${p}${E||""}-${P}${N||""}`,sRn=(p,E)=>E.some(P=>P.source===p.source&&P.target===p.target&&(P.sourceHandle===p.sourceHandle||!P.sourceHandle&&!p.sourceHandle)&&(P.targetHandle===p.targetHandle||!P.targetHandle&&!p.targetHandle)),fRn=(p,E,P={})=>{var $;if(!p.source||!p.target)return($=P.onError)==null||$.call(P,"006",r2.error006()),E;const N=P.getEdgeId||oRn;let D;return Hhn(p)?D={...p}:D={...p,id:N(p)},sRn(D,E)?E:(D.sourceHandle===null&&delete D.sourceHandle,D.targetHandle===null&&delete D.targetHandle,E.concat(D))};function ian({sourceX:p,sourceY:E,targetX:P,targetY:N}){const[D,$,v,q]=tan({sourceX:p,sourceY:E,targetX:P,targetY:N});return[`M ${p},${E}L ${P},${N}`,D,$,v,q]}const Kln={[ji.Left]:{x:-1,y:0},[ji.Right]:{x:1,y:0},[ji.Top]:{x:0,y:-1},[ji.Bottom]:{x:0,y:1}},lRn=({source:p,sourcePosition:E=ji.Bottom,target:P})=>E===ji.Left||E===ji.Right?p.x<P.x?{x:1,y:0}:{x:-1,y:0}:p.y<P.y?{x:0,y:1}:{x:0,y:-1},Wln=(p,E)=>Math.sqrt(Math.pow(E.x-p.x,2)+Math.pow(E.y-p.y,2));function hRn({source:p,sourcePosition:E=ji.Bottom,target:P,targetPosition:N=ji.Top,center:D,offset:$,stepPosition:v}){const q=Kln[E],te=Kln[N],ie={x:p.x+q.x*$,y:p.y+q.y*$},pe={x:P.x+te.x*$,y:P.y+te.y*$},oe=lRn({source:ie,sourcePosition:E,target:pe}),z=oe.x!==0?"x":"y",ne=oe[z];let Z=[],U,Ee;const re={x:0,y:0},we={x:0,y:0},[,,ee,Ce]=tan({sourceX:p.x,sourceY:p.y,targetX:P.x,targetY:P.y});if(q[z]*te[z]===-1){z==="x"?(U=D.x??ie.x+(pe.x-ie.x)*v,Ee=D.y??(ie.y+pe.y)/2):(U=D.x??(ie.x+pe.x)/2,Ee=D.y??ie.y+(pe.y-ie.y)*v);const vn=[{x:U,y:ie.y},{x:U,y:pe.y}],jn=[{x:ie.x,y:Ee},{x:pe.x,y:Ee}];q[z]===ne?Z=z==="x"?vn:jn:Z=z==="x"?jn:vn}else{const vn=[{x:ie.x,y:pe.y}],jn=[{x:pe.x,y:ie.y}];if(z==="x"?Z=q.x===ne?jn:vn:Z=q.y===ne?vn:jn,E===N){const je=Math.abs(p[z]-P[z]);if(je<=$){const rn=Math.min($-1,$-je);q[z]===ne?re[z]=(ie[z]>p[z]?-1:1)*rn:we[z]=(pe[z]>P[z]?-1:1)*rn}}if(E!==N){const je=z==="x"?"y":"x",rn=q[z]===te[je],sn=ie[je]>pe[je],Sn=ie[je]<pe[je];(q[z]===1&&(!rn&&sn||rn&&Sn)||q[z]!==1&&(!rn&&Sn||rn&&sn))&&(Z=z==="x"?vn:jn)}const et={x:ie.x+re.x,y:ie.y+re.y},Dn={x:pe.x+we.x,y:pe.y+we.y},Kn=Math.max(Math.abs(et.x-Z[0].x),Math.abs(Dn.x-Z[0].x)),_=Math.max(Math.abs(et.y-Z[0].y),Math.abs(Dn.y-Z[0].y));Kn>=_?(U=(et.x+Dn.x)/2,Ee=Z[0].y):(U=Z[0].x,Ee=(et.y+Dn.y)/2)}const Qe={x:ie.x+re.x,y:ie.y+re.y},Xe={x:pe.x+we.x,y:pe.y+we.y};return[[p,...Qe.x!==Z[0].x||Qe.y!==Z[0].y?[Qe]:[],...Z,...Xe.x!==Z[Z.length-1].x||Xe.y!==Z[Z.length-1].y?[Xe]:[],P],U,Ee,ee,Ce]}function aRn(p,E,P,N){const D=Math.min(Wln(p,E)/2,Wln(E,P)/2,N),{x:$,y:v}=E;if(p.x===$&&$===P.x||p.y===v&&v===P.y)return`L${$} ${v}`;if(p.y===v){const ie=p.x<P.x?-1:1,pe=p.y<P.y?1:-1;return`L ${$+D*ie},${v}Q ${$},${v} ${$},${v+D*pe}`}const q=p.x<P.x?1:-1,te=p.y<P.y?-1:1;return`L ${$},${v+D*te}Q ${$},${v} ${$+D*q},${v}`}function Ege({sourceX:p,sourceY:E,sourcePosition:P=ji.Bottom,targetX:N,targetY:D,targetPosition:$=ji.Top,borderRadius:v=5,centerX:q,centerY:te,offset:ie=20,stepPosition:pe=.5}){const[oe,z,ne,Z,U]=hRn({source:{x:p,y:E},sourcePosition:P,target:{x:N,y:D},targetPosition:$,center:{x:q,y:te},offset:ie,stepPosition:pe});let Ee=`M${oe[0].x} ${oe[0].y}`;for(let re=1;re<oe.length-1;re++)Ee+=aRn(oe[re-1],oe[re],oe[re+1],v);return Ee+=`L${oe[oe.length-1].x} ${oe[oe.length-1].y}`,[Ee,z,ne,Z,U]}function Vln(p){var E;return p&&!!(p.internals.handleBounds||(E=p.handles)!=null&&E.length)&&!!(p.measured.width||p.width||p.initialWidth)}function dRn(p){var oe;const{sourceNode:E,targetNode:P}=p;if(!Vln(E)||!Vln(P))return null;const N=E.internals.handleBounds||Qln(E.handles),D=P.internals.handleBounds||Qln(P.handles),$=Yln((N==null?void 0:N.source)??[],p.sourceHandle),v=Yln(p.connectionMode===PA.Strict?(D==null?void 0:D.target)??[]:((D==null?void 0:D.target)??[]).concat((D==null?void 0:D.source)??[]),p.targetHandle);if(!$||!v)return(oe=p.onError)==null||oe.call(p,"008",r2.error008($?"target":"source",{id:p.id,sourceHandle:p.sourceHandle,targetHandle:p.targetHandle})),null;const q=($==null?void 0:$.position)||ji.Bottom,te=(v==null?void 0:v.position)||ji.Top,ie=rk(E,$,q),pe=rk(P,v,te);return{sourceX:ie.x,sourceY:ie.y,targetX:pe.x,targetY:pe.y,sourcePosition:q,targetPosition:te}}function Qln(p){if(!p)return null;const E=[],P=[];for(const N of p)N.width=N.width??1,N.height=N.height??1,N.type==="source"?E.push(N):N.type==="target"&&P.push(N);return{source:E,target:P}}function rk(p,E,P=ji.Left,N=!1){const D=((E==null?void 0:E.x)??0)+p.internals.positionAbsolute.x,$=((E==null?void 0:E.y)??0)+p.internals.positionAbsolute.y,{width:v,height:q}=E??c2(p);if(N)return{x:D+v/2,y:$+q/2};switch((E==null?void 0:E.position)??P){case ji.Top:return{x:D+v/2,y:$};case ji.Right:return{x:D+v,y:$+q/2};case ji.Bottom:return{x:D+v/2,y:$+q};case ji.Left:return{x:D,y:$+q/2}}}function Yln(p,E){return p&&(E?p.find(P=>P.id===E):p[0])||null}function Age(p,E){return p?typeof p=="string"?p:`${E?`${E}__`:""}${Object.keys(p).sort().map(N=>`${N}=${p[N]}`).join("&")}`:""}function bRn(p,{id:E,defaultColor:P,defaultMarkerStart:N,defaultMarkerEnd:D}){const $=new Set;return p.reduce((v,q)=>([q.markerStart||N,q.markerEnd||D].forEach(te=>{if(te&&typeof te=="object"){const ie=Age(te,E);$.has(ie)||(v.push({id:ie,color:te.color||P,...te}),$.add(ie))}}),v),[]).sort((v,q)=>v.id.localeCompare(q.id))}function wRn(p,E,P,N,D){let $=.5;D==="start"?$=0:D==="end"&&($=1);let v=[(p.x+p.width*$)*E.zoom+E.x,p.y*E.zoom+E.y-N],q=[-100*$,-100];switch(P){case ji.Right:v=[(p.x+p.width)*E.zoom+E.x+N,(p.y+p.height*$)*E.zoom+E.y],q=[0,-100*$];break;case ji.Bottom:v[1]=(p.y+p.height)*E.zoom+E.y+N,q[1]=0;break;case ji.Left:v=[p.x*E.zoom+E.x-N,(p.y+p.height*$)*E.zoom+E.y],q=[-100,-100*$];break}return`translate(${v[0]}px, ${v[1]}px) translate(${q[0]}%, ${q[1]}%)`}const ran=1e3,gRn=10,Bge={nodeOrigin:[0,0],nodeExtent:hN,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},pRn={...Bge,checkEquality:!0};function Rge(p,E){const P={...p};for(const N in E)E[N]!==void 0&&(P[N]=E[N]);return P}function mRn(p,E,P){const N=Rge(Bge,P);for(const D of p.values())if(D.parentId)Jge(D,p,E,N);else{const $=pN(D,N.nodeOrigin),v=ik(D.extent)?D.extent:N.nodeExtent,q=tk($,v,c2(D));D.internals.positionAbsolute=q}}function vRn(p,E){if(!p.handles)return p.measured?E==null?void 0:E.internals.handleBounds:void 0;const P=[],N=[];for(const D of p.handles){const $={id:D.id,width:D.width??1,height:D.height??1,nodeId:p.id,x:D.x,y:D.y,position:D.position,type:D.type};D.type==="source"?P.push($):D.type==="target"&&N.push($)}return{source:P,target:N}}function _ge(p){return p==="manual"}function Mge(p,E,P,N={}){var pe,oe;const D=Rge(pRn,N),$={i:0},v=new Map(E),q=D!=null&&D.elevateNodesOnSelect&&!_ge(D.zIndexMode)?ran:0;let te=p.length>0,ie=!1;E.clear(),P.clear();for(const z of p){let ne=v.get(z.id);if(D.checkEquality&&z===(ne==null?void 0:ne.internals.userNode))E.set(z.id,ne);else{const Z=pN(z,D.nodeOrigin),U=ik(z.extent)?z.extent:D.nodeExtent,Ee=tk(Z,U,c2(z));ne={...D.defaults,...z,measured:{width:(pe=z.measured)==null?void 0:pe.width,height:(oe=z.measured)==null?void 0:oe.height},internals:{positionAbsolute:Ee,handleBounds:vRn(z,ne),z:can(z,q,D.zIndexMode),userNode:z}},E.set(z.id,ne)}(ne.measured===void 0||ne.measured.width===void 0||ne.measured.height===void 0)&&!ne.hidden&&(te=!1),z.parentId&&Jge(ne,E,P,N,$),ie||(ie=z.selected??!1)}return{nodesInitialized:te,hasSelectedNodes:ie}}function yRn(p,E){if(!p.parentId)return;const P=E.get(p.parentId);P?P.set(p.id,p):E.set(p.parentId,new Map([[p.id,p]]))}function Jge(p,E,P,N,D){const{elevateNodesOnSelect:$,nodeOrigin:v,nodeExtent:q,zIndexMode:te}=Rge(Bge,N),ie=p.parentId,pe=E.get(ie);if(!pe){console.warn(`Parent node ${ie} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}yRn(p,P),D&&!pe.parentId&&pe.internals.rootParentIndex===void 0&&te==="auto"&&(pe.internals.rootParentIndex=++D.i,pe.internals.z=pe.internals.z+D.i*gRn),D&&pe.internals.rootParentIndex!==void 0&&(D.i=pe.internals.rootParentIndex);const oe=$&&!_ge(te)?ran:0,{x:z,y:ne,z:Z}=kRn(p,pe,v,q,oe,te),{positionAbsolute:U}=p.internals,Ee=z!==U.x||ne!==U.y;(Ee||Z!==p.internals.z)&&E.set(p.id,{...p,internals:{...p.internals,positionAbsolute:Ee?{x:z,y:ne}:U,z:Z}})}function can(p,E,P){const N=n2(p.zIndex)?p.zIndex:0;return _ge(P)?N:N+(p.selected?E:0)}function kRn(p,E,P,N,D,$){const{x:v,y:q}=E.internals.positionAbsolute,te=c2(p),ie=pN(p,P),pe=ik(p.extent)?tk(ie,p.extent,te):ie;let oe=tk({x:v+pe.x,y:q+pe.y},N,te);p.extent==="parent"&&(oe=zhn(oe,te,E));const z=can(p,D,$),ne=E.internals.z??0;return{x:oe.x,y:oe.y,z:ne>=z?ne+1:z}}function Gge(p,E,P,N=[0,0]){var v;const D=[],$=new Map;for(const q of p){const te=E.get(q.parentId);if(!te)continue;const ie=((v=$.get(q.parentId))==null?void 0:v.expandedRect)??bN(te),pe=Uhn(ie,q.rect);$.set(q.parentId,{expandedRect:pe,parent:te})}return $.size>0&&$.forEach(({expandedRect:q,parent:te},ie)=>{var ee;const pe=te.internals.positionAbsolute,oe=c2(te),z=te.origin??N,ne=q.x<pe.x?Math.round(Math.abs(pe.x-q.x)):0,Z=q.y<pe.y?Math.round(Math.abs(pe.y-q.y)):0,U=Math.max(oe.width,Math.round(q.width)),Ee=Math.max(oe.height,Math.round(q.height)),re=(U-oe.width)*z[0],we=(Ee-oe.height)*z[1];(ne>0||Z>0||re||we)&&(D.push({id:ie,type:"position",position:{x:te.position.x-ne+re,y:te.position.y-Z+we}}),(ee=P.get(ie))==null||ee.forEach(Ce=>{p.some(Qe=>Qe.id===Ce.id)||D.push({id:Ce.id,type:"position",position:{x:Ce.position.x+ne,y:Ce.position.y+Z}})})),(oe.width<q.width||oe.height<q.height||ne||Z)&&D.push({id:ie,type:"dimensions",setAttributes:!0,dimensions:{width:U+(ne?z[0]*ne-re:0),height:Ee+(Z?z[1]*Z-we:0)}})}),D}function jRn(p,E,P,N,D,$,v){const q=N==null?void 0:N.querySelector(".xyflow__viewport");let te=!1;if(!q)return{changes:[],updatedInternals:te};const ie=[],pe=window.getComputedStyle(q),{m22:oe}=new window.DOMMatrixReadOnly(pe.transform),z=[];for(const ne of p.values()){const Z=E.get(ne.id);if(!Z)continue;if(Z.hidden){E.set(Z.id,{...Z,internals:{...Z.internals,handleBounds:void 0}}),te=!0;continue}const U=Fge(ne.nodeElement),Ee=Z.measured.width!==U.width||Z.measured.height!==U.height;if(!!(U.width&&U.height&&(Ee||!Z.internals.handleBounds||ne.force))){const we=ne.nodeElement.getBoundingClientRect(),ee=ik(Z.extent)?Z.extent:$;let{positionAbsolute:Ce}=Z.internals;if(Z.parentId&&Z.extent==="parent"){const Xe=E.get(Z.parentId);Xe&&(Ce=zhn(Ce,U,Xe))}else ee&&(Ce=tk(Ce,ee,U));const Qe={...Z,measured:U,internals:{...Z.internals,positionAbsolute:Ce,handleBounds:{source:Uln("source",ne.nodeElement,we,oe,Z.id),target:Uln("target",ne.nodeElement,we,oe,Z.id)}}};E.set(Z.id,Qe),Z.parentId&&Jge(Qe,E,P,{nodeOrigin:D,zIndexMode:v}),te=!0,Ee&&(ie.push({id:Z.id,type:"dimensions",dimensions:U}),Z.expandParent&&Z.parentId&&z.push({id:Z.id,parentId:Z.parentId,rect:bN(Qe,D)}))}}if(z.length>0){const ne=Gge(z,E,P,D);ie.push(...ne)}return{changes:ie,updatedInternals:te}}async function ERn({delta:p,panZoom:E,transform:P,translateExtent:N,width:D,height:$}){if(!E||!p.x&&!p.y)return!1;const v=await E.setViewportConstrained({x:P[0]+p.x,y:P[1]+p.y,zoom:P[2]},[[0,0],[D,$]],N);return!!v&&(v.x!==P[0]||v.y!==P[1]||v.k!==P[2])}function Zln(p,E,P,N,D,$){let v=D;const q=N.get(v)||new Map;N.set(v,q.set(P,E)),v=`${D}-${p}`;const te=N.get(v)||new Map;if(N.set(v,te.set(P,E)),$){v=`${D}-${p}-${$}`;const ie=N.get(v)||new Map;N.set(v,ie.set(P,E))}}function uan(p,E,P){p.clear(),E.clear();for(const N of P){const{source:D,target:$,sourceHandle:v=null,targetHandle:q=null}=N,te={edgeId:N.id,source:D,target:$,sourceHandle:v,targetHandle:q},ie=`${D}-${v}--${$}-${q}`,pe=`${$}-${q}--${D}-${v}`;Zln("source",te,pe,p,D,v),Zln("target",te,ie,p,$,q),E.set(N.id,N)}}function oan(p,E){if(!p.parentId)return!1;const P=E.get(p.parentId);return P?P.selected?!0:oan(P,E):!1}function ehn(p,E,P){var D;let N=p;do{if((D=N==null?void 0:N.matches)!=null&&D.call(N,E))return!0;if(N===P)return!1;N=N==null?void 0:N.parentElement}while(N);return!1}function ARn(p,E,P,N){const D=new Map;for(const[$,v]of p)if((v.selected||v.id===N)&&(!v.parentId||!oan(v,p))&&(v.draggable||E&&typeof v.draggable>"u")){const q=p.get($);q&&D.set($,{id:$,position:q.position||{x:0,y:0},distance:{x:P.x-q.internals.positionAbsolute.x,y:P.y-q.internals.positionAbsolute.y},extent:q.extent,parentId:q.parentId,origin:q.origin,expandParent:q.expandParent,internals:{positionAbsolute:q.internals.positionAbsolute||{x:0,y:0}},measured:{width:q.measured.width??0,height:q.measured.height??0}})}return D}function wge({nodeId:p,dragItems:E,nodeLookup:P,dragging:N=!0}){var v,q,te;const D=[];for(const[ie,pe]of E){const oe=(v=P.get(ie))==null?void 0:v.internals.userNode;oe&&D.push({...oe,position:pe.position,dragging:N})}if(!p)return[D[0],D];const $=(q=P.get(p))==null?void 0:q.internals.userNode;return[$?{...$,position:((te=E.get(p))==null?void 0:te.position)||$.position,dragging:N}:D[0],D]}function MRn({dragItems:p,snapGrid:E,x:P,y:N}){const D=p.values().next().value;if(!D)return null;const $={x:P-D.distance.x,y:N-D.distance.y},v=mN($,E);return{x:v.x-$.x,y:v.y-$.y}}function CRn({onNodeMouseDown:p,getStoreItems:E,onDragStart:P,onDrag:N,onDragStop:D}){let $={x:null,y:null},v=0,q=new Map,te=!1,ie={x:0,y:0},pe=null,oe=!1,z=null,ne=!1,Z=!1,U=null;function Ee({noDragClassName:we,handleSelector:ee,domNode:Ce,isSelectable:Qe,nodeId:Xe,nodeClickDistance:Ze=0}){z=B0(Ce);function vn({x:Kn,y:_}){const{nodeLookup:je,nodeExtent:rn,snapGrid:sn,snapToGrid:Sn,nodeOrigin:Bn,onNodeDrag:dn,onSelectionDrag:Jn,onError:Nn,updateNodePositions:qn}=E();$={x:Kn,y:_};let Jt=!1;const Xt=q.size>1,Oi=Xt&&rn?jge(LA(q)):null,gr=Xt&&Sn?MRn({dragItems:q,snapGrid:sn,x:Kn,y:_}):null;for(const[Ki,Wn]of q){if(!je.has(Ki))continue;let ei={x:Kn-Wn.distance.x,y:_-Wn.distance.y};Sn&&(ei=gr?{x:Math.round(ei.x+gr.x),y:Math.round(ei.y+gr.y)}:mN(ei,sn));let rr=null;if(Xt&&rn&&!Wn.extent&&Oi){const{positionAbsolute:sr}=Wn.internals,ri=sr.x-Oi.x+rn[0][0],ai=sr.x+Wn.measured.width-Oi.x2+rn[1][0],Mc=sr.y-Oi.y+rn[0][1],ku=sr.y+Wn.measured.height-Oi.y2+rn[1][1];rr=[[ri,Mc],[ai,ku]]}const{position:cr,positionAbsolute:_i}=qhn({nodeId:Ki,nextPosition:ei,nodeLookup:je,nodeExtent:rr||rn,nodeOrigin:Bn,onError:Nn});Jt=Jt||Wn.position.x!==cr.x||Wn.position.y!==cr.y,Wn.position=cr,Wn.internals.positionAbsolute=_i}if(Z=Z||Jt,!!Jt&&(qn(q,!0),U&&(N||dn||!Xe&&Jn))){const[Ki,Wn]=wge({nodeId:Xe,dragItems:q,nodeLookup:je});N==null||N(U,q,Ki,Wn),dn==null||dn(U,Ki,Wn),Xe||Jn==null||Jn(U,Wn)}}async function jn(){if(!pe)return;const{transform:Kn,panBy:_,autoPanSpeed:je,autoPanOnNodeDrag:rn}=E();if(!rn){te=!1,cancelAnimationFrame(v);return}const[sn,Sn]=Lge(ie,pe,je);(sn!==0||Sn!==0)&&($.x=($.x??0)-sn/Kn[2],$.y=($.y??0)-Sn/Kn[2],await _({x:sn,y:Sn})&&vn($)),v=requestAnimationFrame(jn)}function et(Kn){var Xt;const{nodeLookup:_,multiSelectionActive:je,nodesDraggable:rn,transform:sn,snapGrid:Sn,snapToGrid:Bn,selectNodesOnDrag:dn,onNodeDragStart:Jn,onSelectionDragStart:Nn,unselectNodesAndEdges:qn}=E();oe=!0,(!dn||!Qe)&&!je&&Xe&&((Xt=_.get(Xe))!=null&&Xt.selected||qn()),Qe&&dn&&Xe&&(p==null||p(Xe));const Jt=sN(Kn.sourceEvent,{transform:sn,snapGrid:Sn,snapToGrid:Bn,containerBounds:pe});if($=Jt,q=ARn(_,rn,Jt,Xe),q.size>0&&(P||Jn||!Xe&&Nn)){const[Oi,gr]=wge({nodeId:Xe,dragItems:q,nodeLookup:_});P==null||P(Kn.sourceEvent,q,Oi,gr),Jn==null||Jn(Kn.sourceEvent,Oi,gr),Xe||Nn==null||Nn(Kn.sourceEvent,gr)}}const Dn=Bhn().clickDistance(Ze).on("start",Kn=>{const{domNode:_,nodeDragThreshold:je,transform:rn,snapGrid:sn,snapToGrid:Sn}=E();pe=(_==null?void 0:_.getBoundingClientRect())||null,ne=!1,Z=!1,U=Kn.sourceEvent,je===0&&et(Kn),$=sN(Kn.sourceEvent,{transform:rn,snapGrid:sn,snapToGrid:Sn,containerBounds:pe}),ie=t2(Kn.sourceEvent,pe)}).on("drag",Kn=>{const{autoPanOnNodeDrag:_,transform:je,snapGrid:rn,snapToGrid:sn,nodeDragThreshold:Sn,nodeLookup:Bn}=E(),dn=sN(Kn.sourceEvent,{transform:je,snapGrid:rn,snapToGrid:sn,containerBounds:pe});if(U=Kn.sourceEvent,(Kn.sourceEvent.type==="touchmove"&&Kn.sourceEvent.touches.length>1||Xe&&!Bn.has(Xe))&&(ne=!0),!ne){if(!te&&_&&oe&&(te=!0,jn()),!oe){const Jn=t2(Kn.sourceEvent,pe),Nn=Jn.x-ie.x,qn=Jn.y-ie.y;Math.sqrt(Nn*Nn+qn*qn)>Sn&&et(Kn)}($.x!==dn.xSnapped||$.y!==dn.ySnapped)&&q&&oe&&(ie=t2(Kn.sourceEvent,pe),vn(dn))}}).on("end",Kn=>{if(!oe||ne){ne&&q.size>0&&E().updateNodePositions(q,!1);return}if(te=!1,oe=!1,cancelAnimationFrame(v),q.size>0){const{nodeLookup:_,updateNodePositions:je,onNodeDragStop:rn,onSelectionDragStop:sn}=E();if(Z&&(je(q,!1),Z=!1),D||rn||!Xe&&sn){const[Sn,Bn]=wge({nodeId:Xe,dragItems:q,nodeLookup:_,dragging:!1});D==null||D(Kn.sourceEvent,q,Sn,Bn),rn==null||rn(Kn.sourceEvent,Sn,Bn),Xe||sn==null||sn(Kn.sourceEvent,Bn)}}}).filter(Kn=>{const _=Kn.target;return!Kn.button&&(!we||!ehn(_,`.${we}`,Ce))&&(!ee||ehn(_,ee,Ce))});z.call(Dn)}function re(){z==null||z.on(".drag",null)}return{update:Ee,destroy:re}}function xRn(p,E,P){const N=[],D={x:p.x-P,y:p.y-P,width:P*2,height:P*2};for(const $ of E.values())BX(D,bN($))>0&&N.push($);return N}const TRn=250;function SRn(p,E,P,N){var q,te;let D=[],$=1/0;const v=xRn(p,P,E+TRn);for(const ie of v){const pe=[...((q=ie.internals.handleBounds)==null?void 0:q.source)??[],...((te=ie.internals.handleBounds)==null?void 0:te.target)??[]];for(const oe of pe){if(N.nodeId===oe.nodeId&&N.type===oe.type&&N.id===oe.id)continue;const{x:z,y:ne}=rk(ie,oe,oe.position,!0),Z=Math.sqrt(Math.pow(z-p.x,2)+Math.pow(ne-p.y,2));Z>E||(Z<$?(D=[{...oe,x:z,y:ne}],$=Z):Z===$&&D.push({...oe,x:z,y:ne}))}}if(!D.length)return null;if(D.length>1){const ie=N.type==="source"?"target":"source";return D.find(pe=>pe.type===ie)??D[0]}return D[0]}function san(p,E,P,N,D,$=!1){var ie,pe,oe;const v=N.get(p);if(!v)return null;const q=D==="strict"?(ie=v.internals.handleBounds)==null?void 0:ie[E]:[...((pe=v.internals.handleBounds)==null?void 0:pe.source)??[],...((oe=v.internals.handleBounds)==null?void 0:oe.target)??[]],te=(P?q==null?void 0:q.find(z=>z.id===P):q==null?void 0:q[0])??null;return te&&$?{...te,...rk(v,te,te.position,!0)}:te}function fan(p,E){return p||(E!=null&&E.classList.contains("target")?"target":E!=null&&E.classList.contains("source")?"source":null)}function IRn(p,E){let P=null;return E?P=!0:p&&!E&&(P=!1),P}const lan=()=>!0;function PRn(p,{connectionMode:E,connectionRadius:P,handleId:N,nodeId:D,edgeUpdaterType:$,isTarget:v,domNode:q,nodeLookup:te,lib:ie,autoPanOnConnect:pe,flowId:oe,panBy:z,cancelConnection:ne,onConnectStart:Z,onConnect:U,onConnectEnd:Ee,isValidConnection:re=lan,onReconnectEnd:we,updateConnection:ee,getTransform:Ce,getFromHandle:Qe,autoPanSpeed:Xe,dragThreshold:Ze=1,handleDomNode:vn}){const jn=Yhn(p.target);let et=0,Dn;const{x:Kn,y:_}=t2(p),je=fan($,vn),rn=q==null?void 0:q.getBoundingClientRect();let sn=!1;if(!rn||!je)return;const Sn=san(D,je,N,te,E);if(!Sn)return;let Bn=t2(p,rn),dn=!1,Jn=null,Nn=!1,qn=null;function Jt(){if(!pe||!rn)return;const[cr,_i]=Lge(Bn,rn,Xe);z({x:cr,y:_i}),et=requestAnimationFrame(Jt)}const Xt={...Sn,nodeId:D,type:je,position:Sn.position},Oi=te.get(D);let Ki={inProgress:!0,isValid:null,from:rk(Oi,Xt,ji.Left,!0),fromHandle:Xt,fromPosition:Xt.position,fromNode:Oi,to:Bn,toHandle:null,toPosition:Gln[Xt.position],toNode:null,pointer:Bn};function Wn(){sn=!0,ee(Ki),Z==null||Z(p,{nodeId:D,handleId:N,handleType:je})}Ze===0&&Wn();function ei(cr){if(!sn){const{x:ku,y:ic}=t2(cr),Sa=ku-Kn,ph=ic-_;if(!(Sa*Sa+ph*ph>Ze*Ze))return;Wn()}if(!Qe()||!Xt){rr(cr);return}const _i=Ce();Bn=t2(cr,rn),Dn=SRn(vN(Bn,_i,!1,[1,1]),P,te,Xt),dn||(Jt(),dn=!0);const sr=han(cr,{handle:Dn,connectionMode:E,fromNodeId:D,fromHandleId:N,fromType:v?"target":"source",isValidConnection:re,doc:jn,lib:ie,flowId:oe,nodeLookup:te});qn=sr.handleDomNode,Jn=sr.connection,Nn=IRn(!!Dn,sr.isValid);const ri=te.get(D),ai=ri?rk(ri,Xt,ji.Left,!0):Ki.from,Mc={...Ki,from:ai,isValid:Nn,to:sr.toHandle&&Nn?NA({x:sr.toHandle.x,y:sr.toHandle.y},_i):Bn,toHandle:sr.toHandle,toPosition:Nn&&sr.toHandle?sr.toHandle.position:Gln[Xt.position],toNode:sr.toHandle?te.get(sr.toHandle.nodeId):null,pointer:Bn};ee(Mc),Ki=Mc}function rr(cr){if(!("touches"in cr&&cr.touches.length>0)){if(sn){(Dn||qn)&&Jn&&Nn&&(U==null||U(Jn));const{inProgress:_i,...sr}=Ki,ri={...sr,toPosition:Ki.toHandle?Ki.toPosition:null};Ee==null||Ee(cr,ri),$&&(we==null||we(cr,ri))}ne(),cancelAnimationFrame(et),dn=!1,Nn=!1,Jn=null,qn=null,jn.removeEventListener("mousemove",ei),jn.removeEventListener("mouseup",rr),jn.removeEventListener("touchmove",ei),jn.removeEventListener("touchend",rr)}}jn.addEventListener("mousemove",ei),jn.addEventListener("mouseup",rr),jn.addEventListener("touchmove",ei),jn.addEventListener("touchend",rr)}function han(p,{handle:E,connectionMode:P,fromNodeId:N,fromHandleId:D,fromType:$,doc:v,lib:q,flowId:te,isValidConnection:ie=lan,nodeLookup:pe}){const oe=$==="target",z=E?v.querySelector(`.${q}-flow__handle[data-id="${te}-${E==null?void 0:E.nodeId}-${E==null?void 0:E.id}-${E==null?void 0:E.type}"]`):null,{x:ne,y:Z}=t2(p),U=v.elementFromPoint(ne,Z),Ee=U!=null&&U.classList.contains(`${q}-flow__handle`)?U:z,re={handleDomNode:Ee,isValid:!1,connection:null,toHandle:null};if(Ee){const we=fan(void 0,Ee),ee=Ee.getAttribute("data-nodeid"),Ce=Ee.getAttribute("data-handleid"),Qe=Ee.classList.contains("connectable"),Xe=Ee.classList.contains("connectableend");if(!ee||!we)return re;const Ze={source:oe?ee:N,sourceHandle:oe?Ce:D,target:oe?N:ee,targetHandle:oe?D:Ce};re.connection=Ze;const jn=Qe&&Xe&&(P===PA.Strict?oe&&we==="source"||!oe&&we==="target":ee!==N||Ce!==D);re.isValid=jn&&ie(Ze),re.toHandle=san(ee,we,Ce,pe,P,!0)}return re}const Cge={onPointerDown:PRn,isValid:han};function ORn({domNode:p,panZoom:E,getTransform:P,getViewScale:N}){const D=B0(p);function $({translateExtent:q,width:te,height:ie,zoomStep:pe=1,pannable:oe=!0,zoomable:z=!0,inversePan:ne=!1}){const Z=ee=>{if(ee.sourceEvent.type!=="wheel"||!E)return;const Ce=P(),Qe=ee.sourceEvent.ctrlKey&&wN()?10:1,Xe=-ee.sourceEvent.deltaY*(ee.sourceEvent.deltaMode===1?.05:ee.sourceEvent.deltaMode?1:.002)*pe,Ze=Ce[2]*Math.pow(2,Xe*Qe);E.scaleTo(Ze)};let U=[0,0];const Ee=ee=>{(ee.sourceEvent.type==="mousedown"||ee.sourceEvent.type==="touchstart")&&(U=[ee.sourceEvent.clientX??ee.sourceEvent.touches[0].clientX,ee.sourceEvent.clientY??ee.sourceEvent.touches[0].clientY])},re=ee=>{const Ce=P();if(ee.sourceEvent.type!=="mousemove"&&ee.sourceEvent.type!=="touchmove"||!E)return;const Qe=[ee.sourceEvent.clientX??ee.sourceEvent.touches[0].clientX,ee.sourceEvent.clientY??ee.sourceEvent.touches[0].clientY],Xe=[Qe[0]-U[0],Qe[1]-U[1]];U=Qe;const Ze=N()*Math.max(Ce[2],Math.log(Ce[2]))*(ne?-1:1),vn={x:Ce[0]-Xe[0]*Ze,y:Ce[1]-Xe[1]*Ze},jn=[[0,0],[te,ie]];E.setViewportConstrained({x:vn.x,y:vn.y,zoom:Ce[2]},jn,q)},we=Rhn().on("start",Ee).on("zoom",oe?re:null).on("zoom.wheel",z?Z:null);D.call(we,{})}function v(){D.on("zoom",null)}return{update:$,destroy:v,pointer:e2}}const HX=p=>({x:p.x,y:p.y,zoom:p.k}),gge=({x:p,y:E,zoom:P})=>Oge.translate(p,E).scale(P),q5=(p,E)=>p.target.closest(`.${E}`),aan=(p,E)=>E===2&&Array.isArray(p)&&p.includes(2),NRn=p=>((p*=2)<=1?p*p*p:(p-=2)*p*p+2)/2,pge=(p,E=0,P=NRn,N=()=>{})=>{const D=typeof E=="number"&&E>0;return D||N(),D?p.transition().duration(E).ease(P).on("end",N):p},dan=p=>{const E=p.ctrlKey&&wN()?10:1;return-p.deltaY*(p.deltaMode===1?.05:p.deltaMode?1:.002)*E};function DRn({zoomPanValues:p,noWheelClassName:E,d3Selection:P,d3Zoom:N,panOnScrollMode:D,panOnScrollSpeed:$,zoomOnPinch:v,onPanZoomStart:q,onPanZoom:te,onPanZoomEnd:ie}){return pe=>{if(q5(pe,E))return pe.ctrlKey&&pe.preventDefault(),!1;pe.preventDefault(),pe.stopImmediatePropagation();const oe=P.property("__zoom").k||1;if(pe.ctrlKey&&v){const Ee=e2(pe),re=dan(pe),we=oe*Math.pow(2,re);N.scaleTo(P,we,Ee,pe);return}const z=pe.deltaMode===1?20:1;let ne=D===nk.Vertical?0:pe.deltaX*z,Z=D===nk.Horizontal?0:pe.deltaY*z;!wN()&&pe.shiftKey&&D!==nk.Vertical&&(ne=pe.deltaY*z,Z=0),N.translateBy(P,-(ne/oe)*$,-(Z/oe)*$,{internal:!0});const U=HX(P.property("__zoom"));clearTimeout(p.panScrollTimeout),p.isPanScrolling?te==null||te(pe,U):(p.isPanScrolling=!0,q==null||q(pe,U)),p.panScrollTimeout=setTimeout(()=>{ie==null||ie(pe,U),p.isPanScrolling=!1},150)}}function LRn({noWheelClassName:p,preventScrolling:E,d3ZoomHandler:P}){return function(N,D){const $=N.type==="wheel",v=!E&&$&&!N.ctrlKey,q=q5(N,p);if(N.ctrlKey&&$&&q&&N.preventDefault(),v||q)return null;N.preventDefault(),P.call(this,N,D)}}function $Rn({zoomPanValues:p,onDraggingChange:E,onPanZoomStart:P}){return N=>{var $,v,q;if(($=N.sourceEvent)!=null&&$.internal)return;const D=HX(N.transform);p.mouseButton=((v=N.sourceEvent)==null?void 0:v.button)||0,p.isZoomingOrPanning=!0,p.prevViewport=D,((q=N.sourceEvent)==null?void 0:q.type)==="mousedown"&&E(!0),P&&(P==null||P(N.sourceEvent,D))}}function FRn({zoomPanValues:p,panOnDrag:E,onPaneContextMenu:P,onTransformChange:N,onPanZoom:D}){return $=>{var v,q;p.usedRightMouseButton=!!(P&&aan(E,p.mouseButton??0)),(v=$.sourceEvent)!=null&&v.sync||N([$.transform.x,$.transform.y,$.transform.k]),D&&!((q=$.sourceEvent)!=null&&q.internal)&&(D==null||D($.sourceEvent,HX($.transform)))}}function BRn({zoomPanValues:p,panOnDrag:E,panOnScroll:P,onDraggingChange:N,onPanZoomEnd:D,onPaneContextMenu:$}){return v=>{var q;if(!((q=v.sourceEvent)!=null&&q.internal)&&(p.isZoomingOrPanning=!1,$&&aan(E,p.mouseButton??0)&&!p.usedRightMouseButton&&v.sourceEvent&&$(v.sourceEvent),p.usedRightMouseButton=!1,N(!1),D)){const te=HX(v.transform);p.prevViewport=te,clearTimeout(p.timerId),p.timerId=setTimeout(()=>{D==null||D(v.sourceEvent,te)},P?150:0)}}}function RRn({panActivationKeyPressed:p,zoomActivationKeyPressed:E,zoomOnScroll:P,zoomOnPinch:N,panOnDrag:D,panOnScroll:$,zoomOnDoubleClick:v,userSelectionActive:q,noWheelClassName:te,noPanClassName:ie,lib:pe,connectionInProgress:oe}){return z=>{var re;const ne=E||P,Z=N&&z.ctrlKey,U=z.type==="wheel";if(z.button===1&&z.type==="mousedown"&&(q5(z,`${pe}-flow__node`)||q5(z,`${pe}-flow__edge`)||q5(z,`${pe}-flow__selection`)||q5(z,`${pe}-flow__nodesselection`)))return!0;if(!D&&!ne&&!$&&!v&&!N||q||oe&&!U||q5(z,te)&&U||q5(z,ie)&&(!U||$&&U&&!E)||!N&&z.ctrlKey&&U)return!1;if(!N&&z.type==="touchstart"&&((re=z.touches)==null?void 0:re.length)>1)return z.preventDefault(),!1;if(!ne&&!$&&!Z&&U||!D&&(z.type==="mousedown"||z.type==="touchstart")||Array.isArray(D)&&!D.includes(z.button)&&z.type==="mousedown")return!1;const Ee=Array.isArray(D)&&D.includes(z.button)||!z.button||z.button<=1;return(!z.ctrlKey||U||p)&&Ee}}function _Rn({domNode:p,minZoom:E,maxZoom:P,translateExtent:N,viewport:D,onPanZoom:$,onPanZoomStart:v,onPanZoomEnd:q,onDraggingChange:te}){const ie={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},pe=p.getBoundingClientRect();let oe=[[0,0],[pe.width,pe.height]];const z=typeof ResizeObserver<"u"?new ResizeObserver(_=>{const je=_[0];je&&(oe=[[0,0],[je.contentRect.width,je.contentRect.height]])}):null;z==null||z.observe(p);const ne=Rhn().extent(()=>oe).scaleExtent([E,P]).translateExtent(N),Z=B0(p).call(ne);Ce({x:D.x,y:D.y,zoom:OA(D.zoom,E,P)},[[0,0],[pe.width,pe.height]],N);const U=Z.on("wheel.zoom"),Ee=Z.on("dblclick.zoom");ne.wheelDelta(dan);async function re(_,je){return Z?new Promise(rn=>{ne==null||ne.interpolate((je==null?void 0:je.interpolate)==="linear"?hge:NX).transform(pge(Z,je==null?void 0:je.duration,je==null?void 0:je.ease,()=>rn(!0)),_)}):!1}function we({noWheelClassName:_,noPanClassName:je,onPaneContextMenu:rn,userSelectionActive:sn,panOnScroll:Sn,panOnDrag:Bn,panOnScrollMode:dn,panOnScrollSpeed:Jn,preventScrolling:Nn,zoomOnPinch:qn,zoomOnScroll:Jt,zoomOnDoubleClick:Xt,panActivationKeyPressed:Oi=!1,zoomActivationKeyPressed:gr,lib:Ki,onTransformChange:Wn,connectionInProgress:ei,paneClickDistance:rr,selectionOnDrag:cr}){sn&&!ie.isZoomingOrPanning&&ee();const _i=Sn&&!gr&&!sn;ne.clickDistance(cr?1/0:!n2(rr)||rr<0?0:rr);const sr=_i?DRn({zoomPanValues:ie,noWheelClassName:_,d3Selection:Z,d3Zoom:ne,panOnScrollMode:dn,panOnScrollSpeed:Jn,zoomOnPinch:qn,onPanZoomStart:v,onPanZoom:$,onPanZoomEnd:q}):LRn({noWheelClassName:_,preventScrolling:Nn,d3ZoomHandler:U});Z.on("wheel.zoom",sr,{passive:!1});const ri=$Rn({zoomPanValues:ie,onDraggingChange:te,onPanZoomStart:v});ne.on("start",ri);const ai=FRn({zoomPanValues:ie,panOnDrag:Bn,onPaneContextMenu:!!rn,onPanZoom:$,onTransformChange:Wn});ne.on("zoom",ai);const Mc=BRn({zoomPanValues:ie,panOnDrag:Bn,panOnScroll:Sn,onPaneContextMenu:rn,onPanZoomEnd:q,onDraggingChange:te});ne.on("end",Mc);const ku=RRn({panActivationKeyPressed:Oi,zoomActivationKeyPressed:gr,panOnDrag:Bn,zoomOnScroll:Jt,panOnScroll:Sn,zoomOnDoubleClick:Xt,zoomOnPinch:qn,userSelectionActive:sn,noPanClassName:je,noWheelClassName:_,lib:Ki,connectionInProgress:ei});ne.filter(ku),Xt?Z.on("dblclick.zoom",Ee):Z.on("dblclick.zoom",null)}function ee(){ne.on("zoom",null)}async function Ce(_,je,rn){const sn=gge(_),Sn=ne==null?void 0:ne.constrain()(sn,je,rn);return Sn&&await re(Sn),Sn}async function Qe(_,je){const rn=gge(_);return await re(rn,je),rn}function Xe(_){if(Z){const je=gge(_),rn=Z.property("__zoom");(rn.k!==_.zoom||rn.x!==_.x||rn.y!==_.y)&&(ne==null||ne.transform(Z,je,null,{sync:!0}))}}function Ze(){const _=Z?yBn(Z.node()):{x:0,y:0,k:1};return{x:_.x,y:_.y,zoom:_.k}}async function vn(_,je){return Z?new Promise(rn=>{ne==null||ne.interpolate((je==null?void 0:je.interpolate)==="linear"?hge:NX).scaleTo(pge(Z,je==null?void 0:je.duration,je==null?void 0:je.ease,()=>rn(!0)),_)}):!1}async function jn(_,je){return Z?new Promise(rn=>{ne==null||ne.interpolate((je==null?void 0:je.interpolate)==="linear"?hge:NX).scaleBy(pge(Z,je==null?void 0:je.duration,je==null?void 0:je.ease,()=>rn(!0)),_)}):!1}function et(_){ne==null||ne.scaleExtent(_)}function Dn(_){ne==null||ne.translateExtent(_)}function Kn(_){const je=!n2(_)||_<0?0:_;ne==null||ne.clickDistance(je)}return{update:we,destroy:ee,setViewport:Qe,setViewportConstrained:Ce,getViewport:Ze,scaleTo:vn,scaleBy:jn,setScaleExtent:et,setTranslateExtent:Dn,syncViewport:Xe,setClickDistance:Kn}}var DA;(function(p){p.Line="line",p.Handle="handle"})(DA||(DA={}));function JRn({width:p,prevWidth:E,height:P,prevHeight:N,affectsX:D,affectsY:$}){const v=p-E,q=P-N,te=[v>0?1:v<0?-1:0,q>0?1:q<0?-1:0];return v&&D&&(te[0]=te[0]*-1),q&&$&&(te[1]=te[1]*-1),te}function nhn(p){const E=p.includes("right")||p.includes("left"),P=p.includes("bottom")||p.includes("top"),N=p.includes("left"),D=p.includes("top");return{isHorizontal:E,isVertical:P,affectsX:N,affectsY:D}}function G5(p,E){return Math.max(0,E-p)}function H5(p,E){return Math.max(0,p-E)}function SX(p,E,P){return Math.max(0,E-p,p-P)}function thn(p,E){return p?!E:E}function GRn(p,E,P,N,D,$,v,q){let{affectsX:te,affectsY:ie}=E;const{isHorizontal:pe,isVertical:oe}=E,z=pe&&oe,{xSnapped:ne,ySnapped:Z}=P,{minWidth:U,maxWidth:Ee,minHeight:re,maxHeight:we}=N,{x:ee,y:Ce,width:Qe,height:Xe,aspectRatio:Ze}=p;let vn=Math.floor(pe?ne-p.pointerX:0),jn=Math.floor(oe?Z-p.pointerY:0);const et=Qe+(te?-vn:vn),Dn=Xe+(ie?-jn:jn),Kn=-$[0]*Qe,_=-$[1]*Xe;let je=SX(et,U,Ee),rn=SX(Dn,re,we);if(v){let Bn=0,dn=0;te&&vn<0?Bn=G5(ee+vn+Kn,v[0][0]):!te&&vn>0&&(Bn=H5(ee+et+Kn,v[1][0])),ie&&jn<0?dn=G5(Ce+jn+_,v[0][1]):!ie&&jn>0&&(dn=H5(Ce+Dn+_,v[1][1])),je=Math.max(je,Bn),rn=Math.max(rn,dn)}if(q){let Bn=0,dn=0;te&&vn>0?Bn=H5(ee+vn,q[0][0]):!te&&vn<0&&(Bn=G5(ee+et,q[1][0])),ie&&jn>0?dn=H5(Ce+jn,q[0][1]):!ie&&jn<0&&(dn=G5(Ce+Dn,q[1][1])),je=Math.max(je,Bn),rn=Math.max(rn,dn)}if(D){if(pe){const Bn=SX(et/Ze,re,we)*Ze;if(je=Math.max(je,Bn),v){let dn=0;!te&&!ie||te&&!ie&&z?dn=H5(Ce+_+et/Ze,v[1][1])*Ze:dn=G5(Ce+_+(te?vn:-vn)/Ze,v[0][1])*Ze,je=Math.max(je,dn)}if(q){let dn=0;!te&&!ie||te&&!ie&&z?dn=G5(Ce+et/Ze,q[1][1])*Ze:dn=H5(Ce+(te?vn:-vn)/Ze,q[0][1])*Ze,je=Math.max(je,dn)}}if(oe){const Bn=SX(Dn*Ze,U,Ee)/Ze;if(rn=Math.max(rn,Bn),v){let dn=0;!te&&!ie||ie&&!te&&z?dn=H5(ee+Dn*Ze+Kn,v[1][0])/Ze:dn=G5(ee+(ie?jn:-jn)*Ze+Kn,v[0][0])/Ze,rn=Math.max(rn,dn)}if(q){let dn=0;!te&&!ie||ie&&!te&&z?dn=G5(ee+Dn*Ze,q[1][0])/Ze:dn=H5(ee+(ie?jn:-jn)*Ze,q[0][0])/Ze,rn=Math.max(rn,dn)}}}jn=jn+(jn<0?rn:-rn),vn=vn+(vn<0?je:-je),D&&(z?et>Dn*Ze?jn=(thn(te,ie)?-vn:vn)/Ze:vn=(thn(te,ie)?-jn:jn)*Ze:pe?(jn=vn/Ze,ie=te):(vn=jn*Ze,te=ie));const sn=te?ee+vn:ee,Sn=ie?Ce+jn:Ce;return{width:Qe+(te?-vn:vn),height:Xe+(ie?-jn:jn),x:$[0]*vn*(te?-1:1)+sn,y:$[1]*jn*(ie?-1:1)+Sn}}const ban={width:0,height:0,x:0,y:0},HRn={...ban,pointerX:0,pointerY:0,aspectRatio:1};function qRn(p,E,P){const N=E.position.x+p.position.x,D=E.position.y+p.position.y,$=p.measured.width??0,v=p.measured.height??0,q=P[0]*$,te=P[1]*v;return[[N-q,D-te],[N+$-q,D+v-te]]}function zRn({domNode:p,nodeId:E,getStoreItems:P,onChange:N,onEnd:D}){const $=B0(p);let v={controlDirection:nhn("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function q({controlPosition:ie,boundaries:pe,keepAspectRatio:oe,resizeDirection:z,onResizeStart:ne,onResize:Z,onResizeEnd:U,shouldResize:Ee}){let re={...ban},we={...HRn};v={boundaries:pe,resizeDirection:z,keepAspectRatio:oe,controlDirection:nhn(ie)};let ee,Ce=null,Qe=[],Xe,Ze,vn;const jn=Bhn().on("start",et=>{const{nodeLookup:Dn,transform:Kn,snapGrid:_,snapToGrid:je,nodeOrigin:rn,paneDomNode:sn}=P();if(ee=Dn.get(E),!ee)return;Ce=(sn==null?void 0:sn.getBoundingClientRect())??null;const{xSnapped:Sn,ySnapped:Bn}=sN(et.sourceEvent,{transform:Kn,snapGrid:_,snapToGrid:je,containerBounds:Ce});re={width:ee.measured.width??0,height:ee.measured.height??0,x:ee.position.x??0,y:ee.position.y??0},we={...re,pointerX:Sn,pointerY:Bn,aspectRatio:re.width/re.height},Xe=void 0,Ze=ik(ee.extent)?ee.extent:void 0,ee.parentId&&(ee.extent==="parent"||ee.expandParent)&&(Xe=Dn.get(ee.parentId)),Xe&&ee.extent==="parent"&&(Ze=[[0,0],[Xe.measured.width,Xe.measured.height]]),Qe=[],vn=void 0;for(const[dn,Jn]of Dn)if(Jn.parentId===E&&(Qe.push({id:dn,position:{...Jn.position},extent:Jn.extent}),Jn.extent==="parent"||Jn.expandParent)){const Nn=qRn(Jn,ee,Jn.origin??rn);vn?vn=[[Math.min(Nn[0][0],vn[0][0]),Math.min(Nn[0][1],vn[0][1])],[Math.max(Nn[1][0],vn[1][0]),Math.max(Nn[1][1],vn[1][1])]]:vn=Nn}ne==null||ne(et,{...re})}).on("drag",et=>{const{transform:Dn,snapGrid:Kn,snapToGrid:_,nodeOrigin:je}=P(),rn=sN(et.sourceEvent,{transform:Dn,snapGrid:Kn,snapToGrid:_,containerBounds:Ce}),sn=[];if(!ee)return;const{x:Sn,y:Bn,width:dn,height:Jn}=re,Nn={},qn=ee.origin??je,{width:Jt,height:Xt,x:Oi,y:gr}=GRn(we,v.controlDirection,rn,v.boundaries,v.keepAspectRatio,qn,Ze,vn),Ki=Jt!==dn,Wn=Xt!==Jn,ei=Oi!==Sn&&Ki,rr=gr!==Bn&&Wn;if(!ei&&!rr&&!Ki&&!Wn)return;const cr={prevValues:{...re},startX:we.x,startY:we.y,childNodes:Qe.map(ai=>({...ai,position:{...ai.position}}))};if((ei||rr||qn[0]===1||qn[1]===1)&&(Nn.x=ei?Oi:re.x,Nn.y=rr?gr:re.y,re.x=Nn.x,re.y=Nn.y,Qe.length>0)){const ai=Oi-Sn,Mc=gr-Bn;for(const ku of Qe)ku.position={x:ku.position.x-ai+qn[0]*(Jt-dn),y:ku.position.y-Mc+qn[1]*(Xt-Jn)},sn.push(ku)}if((Ki||Wn)&&(Nn.width=Ki&&(!v.resizeDirection||v.resizeDirection==="horizontal")?Jt:re.width,Nn.height=Wn&&(!v.resizeDirection||v.resizeDirection==="vertical")?Xt:re.height,re.width=Nn.width,re.height=Nn.height),Xe&&ee.expandParent){const ai=qn[0]*(Nn.width??0);Nn.x&&Nn.x<ai&&(re.x=ai,we.x=we.x-(Nn.x-ai));const Mc=qn[1]*(Nn.height??0);Nn.y&&Nn.y<Mc&&(re.y=Mc,we.y=we.y-(Nn.y-Mc))}const _i=JRn({width:re.width,prevWidth:dn,height:re.height,prevHeight:Jn,affectsX:v.controlDirection.affectsX,affectsY:v.controlDirection.affectsY}),sr={...re,direction:_i};if((Ee==null?void 0:Ee(et,sr))===!1){re=cr.prevValues,we.x=cr.startX,we.y=cr.startY,Qe.forEach((ai,Mc)=>{ai.position=cr.childNodes[Mc].position});return}Z==null||Z(et,sr),N(Nn,sn)}).on("end",et=>{U==null||U(et,{...re}),D==null||D({...re})});$.call(jn)}function te(){$.on(".drag",null)}return{update:q,destroy:te}}const URn={},ihn=p=>{let E;const P=new Set,N=(pe,oe)=>{const z=typeof pe=="function"?pe(E):pe;if(!Object.is(z,E)){const ne=E;E=oe??(typeof z!="object"||z===null)?z:Object.assign({},E,z),P.forEach(Z=>Z(E,ne))}},D=()=>E,te={setState:N,getState:D,getInitialState:()=>ie,subscribe:pe=>(P.add(pe),()=>P.delete(pe)),destroy:()=>{(URn?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),P.clear()}},ie=E=p(N,D,te);return te},XRn=p=>p?ihn(p):ihn,{useDebugValue:KRn}=qFn,{useSyncExternalStoreWithSelector:WRn}=HFn,VRn=p=>p;function wan(p,E=VRn,P){const N=WRn(p.subscribe,p.getState,p.getServerState||p.getInitialState,E,P);return KRn(N),N}const rhn=(p,E)=>{const P=XRn(p),N=(D,$=E)=>wan(P,D,$);return Object.assign(N,P),N},QRn=(p,E)=>p?rhn(p,E):rhn;function Cs(p,E){if(Object.is(p,E))return!0;if(typeof p!="object"||p===null||typeof E!="object"||E===null)return!1;if(p instanceof Map&&E instanceof Map){if(p.size!==E.size)return!1;for(const[N,D]of p)if(!Object.is(D,E.get(N)))return!1;return!0}if(p instanceof Set&&E instanceof Set){if(p.size!==E.size)return!1;for(const N of p)if(!E.has(N))return!1;return!0}const P=Object.keys(p);if(P.length!==Object.keys(E).length)return!1;for(const N of P)if(!Object.prototype.hasOwnProperty.call(E,N)||!Object.is(p[N],E[N]))return!1;return!0}const qX=cn.createContext(null),YRn=qX.Provider,gan=r2.error001("react");function Sc(p,E){const P=cn.useContext(qX);if(P===null)throw new Error(gan);return wan(P,p,E)}function cs(){const p=cn.useContext(qX);if(p===null)throw new Error(gan);return cn.useMemo(()=>({getState:p.getState,setState:p.setState,subscribe:p.subscribe}),[p])}const chn={display:"none"},ZRn={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},pan="react-flow__node-desc",man="react-flow__edge-desc",e_n="react-flow__aria-live",n_n=p=>p.ariaLiveMessage,t_n=p=>p.ariaLabelConfig;function i_n({rfId:p}){const E=Sc(n_n);return le.jsx("div",{id:`${e_n}-${p}`,"aria-live":"assertive","aria-atomic":"true",style:ZRn,children:E})}function r_n({rfId:p,disableKeyboardA11y:E}){const P=Sc(t_n);return le.jsxs(le.Fragment,{children:[le.jsx("div",{id:`${pan}-${p}`,style:chn,children:E?P["node.a11yDescription.default"]:P["node.a11yDescription.keyboardDisabled"]}),le.jsx("div",{id:`${man}-${p}`,style:chn,children:P["edge.a11yDescription.default"]}),!E&&le.jsx(i_n,{rfId:p})]})}const kN=cn.forwardRef(({position:p="top-left",children:E,className:P,style:N,...D},$)=>{const v=`${p}`.split("-");return le.jsx("div",{className:Xf(["react-flow__panel",P,...v]),style:N,ref:$,...D,children:E})});kN.displayName="Panel";const uhn="https://reactflow.dev?utm_source=attribution";function c_n({proOptions:p,position:E="bottom-right"}){return cn.useEffect(()=>{},[]),p!=null&&p.hideAttribution?null:le.jsx(kN,{position:E,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${uhn}`,children:le.jsx("a",{href:uhn,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const u_n=p=>{const E=[],P=[];for(const[,N]of p.nodeLookup)N.selected&&E.push(N.internals.userNode);for(const[,N]of p.edgeLookup)N.selected&&P.push(N);return{selectedNodes:E,selectedEdges:P}},IX=p=>p.id;function o_n(p,E){return Cs(p.selectedNodes.map(IX),E.selectedNodes.map(IX))&&Cs(p.selectedEdges.map(IX),E.selectedEdges.map(IX))}function s_n({onSelectionChange:p}){const E=cs(),{selectedNodes:P,selectedEdges:N}=Sc(u_n,o_n);return cn.useEffect(()=>{const D={nodes:P,edges:N};p==null||p(D),E.getState().onSelectionChangeHandlers.forEach($=>$(D))},[P,N,p]),null}const f_n=p=>!!p.onSelectionChangeHandlers;function l_n({onSelectionChange:p}){const E=Sc(f_n);return p||E?le.jsx(s_n,{onSelectionChange:p}):null}const van=[0,0],h_n={x:0,y:0,zoom:1},a_n=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],ohn=[...a_n,"rfId"],d_n=p=>({setNodes:p.setNodes,setEdges:p.setEdges,setMinZoom:p.setMinZoom,setMaxZoom:p.setMaxZoom,setTranslateExtent:p.setTranslateExtent,setNodeExtent:p.setNodeExtent,reset:p.reset,setDefaultNodesAndEdges:p.setDefaultNodesAndEdges}),shn={translateExtent:hN,nodeOrigin:van,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function b_n(p){const{setNodes:E,setEdges:P,setMinZoom:N,setMaxZoom:D,setTranslateExtent:$,setNodeExtent:v,reset:q,setDefaultNodesAndEdges:te}=Sc(d_n,Cs),ie=cs();cn.useEffect(()=>(te(p.defaultNodes,p.defaultEdges),()=>{pe.current=shn,q()}),[]);const pe=cn.useRef(shn);return cn.useEffect(()=>{for(const oe of ohn){const z=p[oe],ne=pe.current[oe];z!==ne&&(typeof p[oe]>"u"||(oe==="nodes"?E(z):oe==="edges"?P(z):oe==="minZoom"?N(z):oe==="maxZoom"?D(z):oe==="translateExtent"?$(z):oe==="nodeExtent"?v(z):oe==="ariaLabelConfig"?ie.setState({ariaLabelConfig:iRn(z)}):oe==="fitView"?ie.setState({fitViewQueued:z}):oe==="fitViewOptions"?ie.setState({fitViewOptions:z}):ie.setState({[oe]:z})))}pe.current=p},ohn.map(oe=>p[oe])),null}function fhn(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function w_n(p){var N;const[E,P]=cn.useState(p==="system"?null:p);return cn.useEffect(()=>{if(p!=="system"){P(p);return}const D=fhn(),$=()=>P(D!=null&&D.matches?"dark":"light");return $(),D==null||D.addEventListener("change",$),()=>{D==null||D.removeEventListener("change",$)}},[p]),E!==null?E:(N=fhn())!=null&&N.matches?"dark":"light"}const lhn=typeof document<"u"?document:null;function gN(p=null,E={target:lhn,actInsideInputWithModifier:!0}){const[P,N]=cn.useState(!1),D=cn.useRef(!1),$=cn.useRef(new Set([])),[v,q]=cn.useMemo(()=>{if(p!==null){const ie=(Array.isArray(p)?p:[p]).filter(oe=>typeof oe=="string").map(oe=>oe.replace(/\+/g,`
|
|
2
2
|
`).replace(`
|
|
3
3
|
|
|
4
4
|
`,`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,R as b,j as L,B as ve,G as Ue,iO as Ce,ad as Ze,ez as Qe,ea as U,l as X,iP as Xe,a1 as Je,a3 as et,a2 as tt,au as me,a4 as nt,eL as rt,eM as ot,bf as it,a$ as st,cQ as at,cj as lt,eT as ct,aY as ge}from"./index-DKTd8X7n.js";import{D as z}from"./dorkbot-templates-8Yu9POWJ.js";import{u as ut}from"./use-relay-config-CvU_70WJ.js";import{u as ft}from"./use-external-adapter-catalog-PBrsasQ8.js";var dt={attributes:!0,characterData:!0,subtree:!0,childList:!0};function ht(e,t,n=dt){d.useEffect(()=>{if(e.current){const r=new MutationObserver(t);return r.observe(e.current,n),()=>{r.disconnect()}}},[t,n])}var Le=(function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(o,s){return o[0]===n?(r=s,!0):!1}),r}return(function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),o=this.__entries__[r];return o&&o[1]},t.prototype.set=function(n,r){var o=e(this.__entries__,n);~o?this.__entries__[o][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,o=e(r,n);~o&&r.splice(o,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var o=0,s=this.__entries__;o<s.length;o++){var i=s[o];n.call(r,i[1],i[0])}},t})()})(),ue=typeof window<"u"&&typeof document<"u"&&window.document===document,te=(function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()})(),pt=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(te):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),vt=2;function mt(e,t){var n=!1,r=!1,o=0;function s(){n&&(n=!1,e()),r&&a()}function i(){pt(s)}function a(){var c=Date.now();if(n){if(c-o<vt)return;r=!0}else n=!0,r=!1,setTimeout(i,t);o=c}return a}var gt=20,bt=["top","right","bottom","left","width","height","size","weight"],yt=typeof MutationObserver<"u",wt=(function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=mt(this.refresh.bind(this),gt)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,r=n.indexOf(t);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!ue||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),yt?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!ue||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,o=bt.some(function(s){return!!~r.indexOf(s)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e})(),Me=(function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e}),q=(function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||te}),Te=ie(0,0,0,0);function ne(e){return parseFloat(e)||0}function be(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,o){var s=e["border-"+o+"-width"];return r+ne(s)},0)}function _t(e){for(var t=["top","right","bottom","left"],n={},r=0,o=t;r<o.length;r++){var s=o[r],i=e["padding-"+s];n[s]=ne(i)}return n}function Et(e){var t=e.getBBox();return ie(0,0,t.width,t.height)}function Ot(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Te;var r=q(e).getComputedStyle(e),o=_t(r),s=o.left+o.right,i=o.top+o.bottom,a=ne(r.width),c=ne(r.height);if(r.boxSizing==="border-box"&&(Math.round(a+s)!==t&&(a-=be(r,"left","right")+s),Math.round(c+i)!==n&&(c-=be(r,"top","bottom")+i)),!Rt(e)){var u=Math.round(a+s)-t,l=Math.round(c+i)-n;Math.abs(u)!==1&&(a-=u),Math.abs(l)!==1&&(c-=l)}return ie(o.left,o.top,a,c)}var xt=(function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof q(e).SVGGraphicsElement}:function(e){return e instanceof q(e).SVGElement&&typeof e.getBBox=="function"}})();function Rt(e){return e===q(e).document.documentElement}function St(e){return ue?xt(e)?Et(e):Ot(e):Te}function kt(e){var t=e.x,n=e.y,r=e.width,o=e.height,s=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,i=Object.create(s.prototype);return Me(i,{x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:o+n,left:t}),i}function ie(e,t,n,r){return{x:e,y:t,width:n,height:r}}var Ct=(function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ie(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=St(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e})(),Lt=(function(){function e(t,n){var r=kt(n);Me(this,{target:t,contentRect:r})}return e})(),Mt=(function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new Le,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof q(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new Ct(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof q(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new Lt(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e})(),Ae=typeof WeakMap<"u"?new WeakMap:new Le,Ie=(function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=wt.getInstance(),r=new Mt(t,n,this);Ae.set(this,r)}return e})();["observe","unobserve","disconnect"].forEach(function(e){Ie.prototype[e]=function(){var t;return(t=Ae.get(this))[e].apply(t,arguments)}});var Tt=(function(){return typeof te.ResizeObserver<"u"?te.ResizeObserver:Ie})(),At=({mutationObservables:e,resizeObservables:t,refresh:n})=>{const[r,o]=d.useState(0),s=d.useRef(document.documentElement||document.body);function i(c){const u=Array.from(c);for(const l of u)if(e){if(!l.attributes)continue;e.find(v=>l.matches(v))&&n(!0)}}function a(c){const u=Array.from(c);for(const l of u)if(t){if(!l.attributes)continue;t.find(v=>l.matches(v))&&o(r+1)}}return ht(s,c=>{for(const u of c)u.addedNodes.length!==0&&(i(u.addedNodes),a(u.addedNodes)),u.removedNodes.length!==0&&(i(u.removedNodes),a(u.removedNodes))},{childList:!0,subtree:!0}),d.useEffect(()=>{if(!t)return;const c=new Tt(()=>{n()});for(const u of t){const l=document.querySelector(u);l&&c.observe(l)}return()=>{c.disconnect()}},[t,r]),null},It=At;function ee(e){let t=Pe;return e&&(t=e.getBoundingClientRect()),t}function Pt(e,t){const[n,r]=d.useState(Pe),o=d.useCallback(()=>{e!=null&&e.current&&r(ee(e==null?void 0:e.current))},[e==null?void 0:e.current]);return d.useEffect(()=>(o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)),[e==null?void 0:e.current,t]),n}var Pe={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0};function Dt(e,t){return new Promise(n=>{if(!(e instanceof Element))throw new TypeError("Argument 1 must be an Element");let r=0,o=null;const s=Object.assign({behavior:"smooth"},t);e.scrollIntoView(s),requestAnimationFrame(i);function i(){const a=e==null?void 0:e.getBoundingClientRect().top;if(a===o){if(r++>2)return n(null)}else r=0,o=a;requestAnimationFrame(i)}})}function J(e){return e<0?0:e}function Ht(e){return typeof e=="object"&&e!==null?{thresholdX:e.x||0,thresholdY:e.y||0}:{thresholdX:e||0,thresholdY:e||0}}function se(){const e=Math.max(document.documentElement.clientWidth,window.innerWidth||0),t=Math.max(document.documentElement.clientHeight,window.innerHeight||0);return{w:e,h:t}}function Nt({top:e,right:t,bottom:n,left:r,threshold:o}){const{w:s,h:i}=se(),{thresholdX:a,thresholdY:c}=Ht(o);return e<0&&n-e>i?!0:e>=0+c&&r>=0+a&&n<=i-c&&t<=s-a}var ye=(e,t)=>e>t,we=(e,t)=>e>t;function jt(e,t=[]){const n=(r,o)=>t.includes(r)?1:t.includes(o)?-1:0;return Object.keys(e).map(r=>({position:r,value:e[r]})).sort((r,o)=>o.value-r.value).sort((r,o)=>n(r.position,o.position)).filter(r=>r.value>0).map(r=>r.position)}var ce=10;function fe(e=ce){return Array.isArray(e)?e.length===1?[e[0],e[0],e[0],e[0]]:e.length===2?[e[1],e[0],e[1],e[0]]:e.length===3?[e[0],e[1],e[2],e[1]]:e.length>3?[e[0],e[1],e[2],e[3]]:[ce,ce]:[e,e,e,e]}var $t={maskWrapper:()=>({opacity:.7,left:0,top:0,position:"fixed",zIndex:99999,pointerEvents:"none",color:"#000"}),svgWrapper:({windowWidth:e,windowHeight:t,wpt:n,wpl:r})=>({width:e,height:t,left:Number(r),top:Number(n),position:"fixed"}),maskArea:({x:e,y:t,width:n,height:r})=>({x:e,y:t,width:n,height:r,fill:"black",rx:0}),maskRect:({windowWidth:e,windowHeight:t,maskID:n})=>({x:0,y:0,width:e,height:t,fill:"currentColor",mask:`url(#${n})`}),clickArea:({windowWidth:e,windowHeight:t,clipID:n})=>({x:0,y:0,width:e,height:t,fill:"currentcolor",pointerEvents:"auto",clipPath:`url(#${n})`}),highlightedArea:({x:e,y:t,width:n,height:r})=>({x:e,y:t,width:n,height:r,pointerEvents:"auto",fill:"transparent",display:"none"})};function zt(e){return(t,n)=>{const r=$t[t](n),o=e[t];return o?o(r,n):r}}var Ft=({padding:e=10,wrapperPadding:t=0,onClick:n,onClickHighlighted:r,styles:o={},sizes:s,className:i,highlightedAreaClassName:a,maskId:c,clipId:u})=>{const l=c||_e("mask__"),f=u||_e("clip__"),v=zt(o),[g,_,O,y]=fe(e),[p,E,x,k]=fe(t),{w:h,h:T}=se(),M=J((s==null?void 0:s.width)+y+_),C=J((s==null?void 0:s.height)+g+O),w=J((s==null?void 0:s.top)-g-p),R=J((s==null?void 0:s.left)-y-k),A=h-k-E,S=T-p-x,j=v("maskArea",{x:R,y:w,width:M,height:C}),$=v("highlightedArea",{x:R,y:w,width:M,height:C});return b.createElement("div",{style:v("maskWrapper",{}),onClick:n,className:i},b.createElement("svg",{width:A,height:S,xmlns:"http://www.w3.org/2000/svg",style:v("svgWrapper",{windowWidth:A,windowHeight:S,wpt:p,wpl:k})},b.createElement("defs",null,b.createElement("mask",{id:l},b.createElement("rect",{x:0,y:0,width:A,height:S,fill:"white"}),b.createElement("rect",{style:j,rx:j.rx?1:void 0})),b.createElement("clipPath",{id:f},b.createElement("polygon",{points:`0 0, 0 ${S}, ${R} ${S}, ${R} ${w}, ${R+M} ${w}, ${R+M} ${w+C}, ${R} ${w+C}, ${R} ${S}, ${A} ${S}, ${A} 0`}))),b.createElement("rect",{style:v("maskRect",{windowWidth:A,windowHeight:S,maskID:l})}),b.createElement("rect",{style:v("clickArea",{windowWidth:A,windowHeight:S,top:w,left:R,width:M,height:C,clipID:f})}),b.createElement("rect",{style:$,className:a,onClick:r,rx:$.rx?1:void 0})))},Vt=Ft;function _e(e){return e+Math.random().toString(36).substring(2,16)}var Wt=Object.defineProperty,re=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,Ee=(e,t,n)=>t in e?Wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oe=(e,t)=>{for(var n in t||(t={}))De.call(t,n)&&Ee(e,n,t[n]);if(re)for(var n of re(t))He.call(t,n)&&Ee(e,n,t[n]);return e},qt=(e,t)=>{var n={};for(var r in e)De.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&re)for(var r of re(e))t.indexOf(r)<0&&He.call(e,r)&&(n[r]=e[r]);return n},Bt={popover:()=>({position:"fixed",maxWidth:353,backgroundColor:"#fff",padding:"24px 30px",boxShadow:"0 0.5em 3em rgba(0, 0, 0, 0.3)",color:"inherit",zIndex:1e5,transition:"transform 0.3s",top:0,left:0})};function Gt(e){return(t,n)=>{const r=Bt[t](n),o=e[t];return o?o(r,n):r}}var Kt=e=>{var t=e,{children:n,position:r="bottom",padding:o=10,styles:s={},sizes:i,refresher:a}=t,c=qt(t,["children","position","padding","styles","sizes","refresher"]);const u=d.useRef(null),l=d.useRef(""),f=d.useRef(""),v=d.useRef(""),{w:g,h:_}=se(),O=Gt(s),y=Pt(u,a),{width:p,height:E}=y,[x,k,h,T]=fe(o),M=(i==null?void 0:i.left)-T,C=(i==null?void 0:i.top)-x,w=(i==null?void 0:i.right)+k,R=(i==null?void 0:i.bottom)+h,A=r&&typeof r=="function"?r({width:p,height:E,windowWidth:g,windowHeight:_,top:C,left:M,right:w,bottom:R,x:i.x,y:i.y},y):r,S={left:M,right:g-w,top:C,bottom:_-R},j=(I,D,H)=>{switch(I){case"top":return S.top>E+h;case"right":return D?!1:S.right>p+T;case"bottom":return H?!1:S.bottom>E+x;case"left":return S.left>p+k;default:return!1}},$=(I,D,H)=>{const m=jt(S,H?["right","left"]:D?["top","bottom"]:[]);for(let N=0;N<m.length;N++)if(j(m[N],D,H))return l.current=m[N],I[m[N]];return l.current="center",I.center},G=(I=>{if(Array.isArray(I)){const V=ye(I[0],g),le=we(I[1],_);return l.current="custom",[V?g/2-p/2:I[0],le?_/2-E/2:I[1]]}const D=ye(M+p,g),H=we(R+E,_),m=D?Math.min(M,g-p):Math.max(M,0),N=H?E>S.bottom?Math.max(R-E,0):Math.max(C,0):C;H&&E>S.bottom?f.current="bottom":f.current="top",D?v.current="left":v.current="right";const K={top:[m-T,C-E-h],right:[w+T,N-x],bottom:[m-T,R+x],left:[M-p-k,N-x],center:[g/2-p/2,_/2-E/2]};return I==="center"||j(I,D,H)&&!D&&!H?(l.current=I,K[I]):$(K,D,H)})(A);return b.createElement("div",Oe({className:"reactour__popover",style:Oe({transform:`translate(${Math.round(G[0])}px, ${Math.round(G[1])}px)`},O("popover",{position:l.current,verticalAlign:f.current,horizontalAlign:v.current,helperRect:y,targetRect:i})),ref:u},c),n)},Yt=Kt,Ut=Object.defineProperty,Zt=Object.defineProperties,Qt=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,xe=(e,t,n)=>t in e?Ut(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t)=>{for(var n in t||(t={}))Ne.call(t,n)&&xe(e,n,t[n]);if(oe)for(var n of oe(t))je.call(t,n)&&xe(e,n,t[n]);return e},he=(e,t)=>Zt(e,Qt(t)),Z=(e,t)=>{var n={};for(var r in e)Ne.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&oe)for(var r of oe(e))t.indexOf(r)<0&&je.call(e,r)&&(n[r]=e[r]);return n},Xt={bottom:0,height:0,left:0,right:0,top:0,width:0,windowWidth:0,windowHeight:0,x:0,y:0};function Jt(e,t={block:"center",behavior:"smooth",inViewThreshold:0}){const[n,r]=d.useState(!1),[o,s]=d.useState(!1),[i,a]=d.useState(!1),[c,u]=d.useState(null),[l,f]=d.useState(Xt),v=(e==null?void 0:e.selector)instanceof Element?e==null?void 0:e.selector:document.querySelector(e==null?void 0:e.selector),g=d.useCallback(()=>{const O=Re(v,e==null?void 0:e.highlightedSelectors,e==null?void 0:e.bypassElem),{hasHighligtedElems:y}=O,p=Z(O,["hasHighligtedElems"]);Object.entries(l).some(([E,x])=>p[E]!==x)&&f(p)},[v,e==null?void 0:e.highlightedSelectors,l]);d.useEffect(()=>(g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)),[v,e==null?void 0:e.highlightedSelectors,c]),d.useEffect(()=>{!Nt(he(P({},l),{threshold:t.inViewThreshold}))&&v&&(r(!0),Dt(v,t).then(()=>{o||u(Date.now())}).finally(()=>{r(!1)}))},[l]);const _=d.useCallback(()=>{s(!0);const O=Re(v,e==null?void 0:e.highlightedSelectors,e==null?void 0:e.bypassElem),{hasHighligtedElems:y}=O,p=Z(O,["hasHighligtedElems"]);a(y),f(p),s(!1)},[v,e==null?void 0:e.highlightedSelectors,l]);return{sizes:l,transition:n,target:v,observableRefresher:_,isHighlightingObserved:i}}function Re(e,t=[],n=!0){let r=!1;const{w:o,h:s}=se();if(!t)return he(P({},ee(e)),{windowWidth:o,windowHeight:s,hasHighligtedElems:!1});let i=ee(e),a={bottom:0,height:0,left:o,right:0,top:s,width:0};for(const u of t){const l=document.querySelector(u);if(!l||l.style.display==="none"||l.style.visibility==="hidden")continue;const f=ee(l);r=!0,n||!e?(f.top<a.top&&(a.top=f.top),f.right>a.right&&(a.right=f.right),f.bottom>a.bottom&&(a.bottom=f.bottom),f.left<a.left&&(a.left=f.left),a.width=a.right-a.left,a.height=a.bottom-a.top):(f.top<i.top&&(i.top=f.top),f.right>i.right&&(i.right=f.right),f.bottom>i.bottom&&(i.bottom=f.bottom),f.left<i.left&&(i.left=f.left),i.width=i.right-i.left,i.height=i.bottom-i.top)}const c=n||!e?a.width>0&&a.height>0:!1;return{left:(c?a:i).left,top:(c?a:i).top,right:(c?a:i).right,bottom:(c?a:i).bottom,width:(c?a:i).width,height:(c?a:i).height,windowWidth:o,windowHeight:s,hasHighligtedElems:r,x:i.x,y:i.y}}var en=({disableKeyboardNavigation:e,setCurrentStep:t,currentStep:n,setIsOpen:r,stepsLength:o,disable:s,rtl:i,clickProps:a,keyboardHandler:c})=>{function u(l){if(l.stopPropagation(),e===!0||s)return;let f,v,g;e&&(f=e.includes("esc"),v=e.includes("right"),g=e.includes("left"));function _(){t(Math.min(n+1,o-1))}function O(){t(Math.max(n-1,0))}c&&typeof c=="function"?c(l,a,{isEscDisabled:f,isRightDisabled:v,isLeftDisabled:g}):(l.keyCode===27&&!f&&(l.preventDefault(),r(!1)),l.keyCode===39&&!v&&(l.preventDefault(),i?O():_()),l.keyCode===37&&!g&&(l.preventDefault(),i?_():O()))}return d.useEffect(()=>(window.addEventListener("keydown",u,!1),()=>{window.removeEventListener("keydown",u)}),[s,t,n]),null},tn=en,nn={badge:()=>({position:"absolute",fontFamily:"monospace",background:"var(--reactour-accent,#007aff)",height:"1.875em",lineHeight:2,paddingLeft:"0.8125em",paddingRight:"0.8125em",fontSize:"1em",borderRadius:"1.625em",color:"white",textAlign:"center",boxShadow:"0 0.25em 0.5em rgba(0, 0, 0, 0.3)",top:"-0.8125em",left:"-0.8125em"}),controls:()=>({display:"flex",marginTop:24,alignItems:"center",justifyContent:"space-between"}),navigation:()=>({counterReset:"dot",display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"}),button:({disabled:e})=>({display:"block",padding:0,border:0,background:"none",cursor:e?"not-allowed":"pointer"}),arrow:({disabled:e})=>({color:e?"#caccce":"#646464",width:16,height:12,flex:"0 0 16px"}),dot:({current:e,disabled:t,showNumber:n})=>({counterIncrement:"dot",width:8,height:8,border:e?"0":"1px solid #caccce",borderRadius:"100%",padding:0,display:"block",margin:4,transition:"opacity 0.3s, transform 0.3s",cursor:t?"not-allowed":"pointer",transform:`scale(${e?1.25:1})`,color:e?"var(--reactour-accent, #007aff)":"#caccce",background:e?"var(--reactour-accent, #007aff)":"none"}),close:({disabled:e})=>({position:"absolute",top:22,right:22,width:9,height:9,"--rt-close-btn":e?"#caccce":"#5e5e5e","--rt-close-btn-disabled":e?"#caccce":"#000"}),svg:()=>({display:"block"})};function ae(e){return(t,n)=>{const r=nn[t](n),o=e[t];return o?o(r,n):r}}var rn=({styles:e={},children:t})=>{const n=ae(e);return b.createElement("span",{style:n("badge",{})},t)},on=rn,sn=e=>{var t=e,{styles:n={},onClick:r,disabled:o}=t,s=Z(t,["styles","onClick","disabled"]);const i=ae(n);return b.createElement("button",P({className:"reactour__close-button",style:P(P({},i("button",{})),i("close",{disabled:o})),onClick:r},s),b.createElement("svg",{viewBox:"0 0 9.1 9.1","aria-hidden":!0,role:"presentation",style:P({},i("svg",{}))},b.createElement("path",{fill:"currentColor",d:"M5.9 4.5l2.8-2.8c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0L4.5 3.1 1.7.3C1.3-.1.7-.1.3.3c-.4.4-.4 1 0 1.4l2.8 2.8L.3 7.4c-.4.4-.4 1 0 1.4.2.2.4.3.7.3s.5-.1.7-.3L4.5 6l2.8 2.8c.3.2.5.3.8.3s.5-.1.7-.3c.4-.4.4-1 0-1.4L5.9 4.5z"})))},an=sn,ln=({content:e,setCurrentStep:t,transition:n,isHighlightingObserved:r,currentStep:o,setIsOpen:s})=>typeof e=="function"?e({setCurrentStep:t,transition:n,isHighlightingObserved:r,currentStep:o,setIsOpen:s}):e,cn=ln,un=({styles:e={},steps:t,setCurrentStep:n,currentStep:r,setIsOpen:o,nextButton:s,prevButton:i,disableDots:a,hideDots:c,hideButtons:u,disableAll:l,rtl:f,Arrow:v=$e})=>{const g=t.length,_=ae(e),O=({onClick:y,kind:p="next",children:E,hideArrow:x})=>{function k(){l||(y&&typeof y=="function"?y():n(p==="next"?Math.min(r+1,g-1):Math.max(r-1,0)))}return b.createElement("button",{style:_("button",{kind:p,disabled:l||(p==="next"?g-1===r:r===0)}),onClick:k,"aria-label":`Go to ${p} step`},x?null:b.createElement(v,{styles:e,inverted:f?p==="prev":p==="next",disabled:l||(p==="next"?g-1===r:r===0)}),E)};return b.createElement("div",{style:_("controls",{}),dir:f?"rtl":"ltr"},u?null:i&&typeof i=="function"?i({Button:O,setCurrentStep:n,currentStep:r,stepsLength:g,setIsOpen:o,steps:t}):b.createElement(O,{kind:"prev"}),c?null:b.createElement("div",{style:_("navigation",{})},Array.from({length:g},(y,p)=>p).map(y=>{var p;return b.createElement("button",{style:_("dot",{current:y===r,disabled:a||l}),onClick:()=>{!a&&!l&&n(y)},key:`navigation_dot_${y}`,"aria-label":((p=t[y])==null?void 0:p.navDotAriaLabel)||`Go to step ${y+1}`})})),u?null:s&&typeof s=="function"?s({Button:O,setCurrentStep:n,currentStep:r,stepsLength:g,setIsOpen:o,steps:t}):b.createElement(O,null))},fn=un,$e=({styles:e={},inverted:t=!1,disabled:n})=>{const r=ae(e);return b.createElement("svg",{viewBox:"0 0 18.4 14.4",style:r("arrow",{inverted:t,disabled:n})},b.createElement("path",{d:t?"M17 7.2H1M10.8 1L17 7.2l-6.2 6.2":"M1.4 7.2h16M7.6 1L1.4 7.2l6.2 6.2",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeMiterlimit:"10"}))},dn={Badge:on,Close:an,Content:cn,Navigation:fn,Arrow:$e},hn=e=>P(P({},dn),e),pn=({styles:e,components:t={},badgeContent:n,accessibilityOptions:r,disabledActions:o,onClickClose:s,steps:i,setCurrentStep:a,currentStep:c,transition:u,isHighlightingObserved:l,setIsOpen:f,nextButton:v,prevButton:g,disableDotsNavigation:_,rtl:O,showPrevNextButtons:y=!0,showCloseButton:p=!0,showNavigation:E=!0,showBadge:x=!0,showDots:k=!0,meta:h,setMeta:T,setSteps:M})=>{const C=i[c],{Badge:w,Close:R,Content:A,Navigation:S,Arrow:j}=hn(t),$=n&&typeof n=="function"?n({currentStep:c,totalSteps:i.length,transition:u}):c+1;function B(){o||(s&&typeof s=="function"?s({setCurrentStep:a,setIsOpen:f,currentStep:c,steps:i,meta:h,setMeta:T,setSteps:M}):f(!1))}return b.createElement(b.Fragment,null,x?b.createElement(w,{styles:e},$):null,p?b.createElement(R,{styles:e,"aria-label":r==null?void 0:r.closeButtonAriaLabel,disabled:o,onClick:B}):null,b.createElement(A,{content:C==null?void 0:C.content,setCurrentStep:a,currentStep:c,transition:u,isHighlightingObserved:l,setIsOpen:f}),E?b.createElement(S,{setCurrentStep:a,currentStep:c,setIsOpen:f,steps:i,styles:e,"aria-hidden":!(r!=null&&r.showNavigationScreenReaders),nextButton:v,prevButton:g,disableDots:_,hideButtons:!y,hideDots:!k,disableAll:o,rtl:O,Arrow:j}):null)},vn=pn,mn=e=>{var t=e,{currentStep:n,setCurrentStep:r,setIsOpen:o,steps:s=[],setSteps:i,styles:a={},scrollSmooth:c,afterOpen:u,beforeClose:l,padding:f=10,position:v,onClickMask:g,onClickHighlighted:_,keyboardHandler:O,className:y="reactour__popover",maskClassName:p="reactour__mask",highlightedMaskClassName:E,clipId:x,maskId:k,disableInteraction:h,disableKeyboardNavigation:T,inViewThreshold:M,disabledActions:C,setDisabledActions:w,disableWhenSelectorFalsy:R,rtl:A,accessibilityOptions:S={closeButtonAriaLabel:"Close Tour",showNavigationScreenReaders:!0},ContentComponent:j,Wrapper:$,meta:B,setMeta:G,onTransition:I=()=>"center"}=t,D=Z(t,["currentStep","setCurrentStep","setIsOpen","steps","setSteps","styles","scrollSmooth","afterOpen","beforeClose","padding","position","onClickMask","onClickHighlighted","keyboardHandler","className","maskClassName","highlightedMaskClassName","clipId","maskId","disableInteraction","disableKeyboardNavigation","inViewThreshold","disabledActions","setDisabledActions","disableWhenSelectorFalsy","rtl","accessibilityOptions","ContentComponent","Wrapper","meta","setMeta","onTransition"]),H;const m=s[n],N=P(P({},a),m==null?void 0:m.styles),{sizes:K,transition:V,observableRefresher:le,isHighlightingObserved:pe,target:W}=Jt(m,{block:"center",behavior:c?"smooth":"auto",inViewThreshold:M});d.useEffect(()=>(u&&typeof u=="function"&&u(W),()=>{l&&typeof l=="function"&&l(W)}),[]);const{maskPadding:Ve,popoverPadding:We,wrapperPadding:qe}=bn((H=m==null?void 0:m.padding)!=null?H:f),Q={setCurrentStep:r,setIsOpen:o,currentStep:n,setSteps:i,steps:s,setMeta:G,meta:B};function Be(){C||(g&&typeof g=="function"?g(Q):o(!1))}const Ge=typeof(m==null?void 0:m.stepInteraction)=="boolean"?!(m!=null&&m.stepInteraction):h?typeof h=="boolean"?h:h(Q):!1;d.useEffect(()=>(m!=null&&m.action&&typeof(m==null?void 0:m.action)=="function"&&(m==null||m.action(W)),(m==null?void 0:m.disableActions)!==void 0&&w(m==null?void 0:m.disableActions),()=>{m!=null&&m.actionAfter&&typeof(m==null?void 0:m.actionAfter)=="function"&&(m==null||m.actionAfter(W))}),[m]);const Ke=V?I:m!=null&&m.position?m==null?void 0:m.position:v,Ye=$||b.Fragment;return m?b.createElement(Ye,null,b.createElement(It,{mutationObservables:m==null?void 0:m.mutationObservables,resizeObservables:m==null?void 0:m.resizeObservables,refresh:le}),b.createElement(tn,{setCurrentStep:r,currentStep:n,setIsOpen:o,stepsLength:s.length,disableKeyboardNavigation:T,disable:C,rtl:A,clickProps:Q,keyboardHandler:O}),(!R||W)&&b.createElement(Vt,{sizes:V?yn:K,onClick:Be,styles:P({highlightedArea:Y=>he(P({},Y),{display:Ge?"block":"none"})},N),padding:V?0:Ve,highlightedAreaClassName:E,className:p,onClickHighlighted:Y=>{Y.preventDefault(),Y.stopPropagation(),_&&_(Y,Q)},wrapperPadding:qe,clipId:x,maskId:k}),(!R||W)&&b.createElement(Yt,{sizes:K,styles:N,position:Ke,padding:We,"aria-labelledby":S==null?void 0:S.ariaLabelledBy,className:y,refresher:n},j?b.createElement(j,P({styles:N,setCurrentStep:r,currentStep:n,setIsOpen:o,steps:s,accessibilityOptions:S,disabledActions:C,transition:V,isHighlightingObserved:pe,rtl:A},D)):b.createElement(vn,P({styles:N,setCurrentStep:r,currentStep:n,setIsOpen:o,steps:s,setSteps:i,accessibilityOptions:S,disabledActions:C,transition:V,isHighlightingObserved:pe,rtl:A,meta:B,setMeta:G},D)))):null},gn=mn;function bn(e){return typeof e=="object"&&e!==null?{maskPadding:e.mask,popoverPadding:e.popover,wrapperPadding:e.wrapper}:{maskPadding:e,popoverPadding:e,wrapperPadding:0}}var yn={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0},wn={isOpen:!1,setIsOpen:()=>!1,currentStep:0,setCurrentStep:()=>0,steps:[],setSteps:()=>[],setMeta:()=>"",disabledActions:!1,setDisabledActions:()=>!1,components:{}},_n=b.createContext(wn),En=e=>{var t=e,{children:n,defaultOpen:r=!1,startAt:o=0,steps:s,setCurrentStep:i,currentStep:a}=t,c=Z(t,["children","defaultOpen","startAt","steps","setCurrentStep","currentStep"]);const[u,l]=d.useState(r),[f,v]=d.useState(o),[g,_]=d.useState(s),[O,y]=d.useState(""),[p,E]=d.useState(!1),x=P({isOpen:u,setIsOpen:l,currentStep:a||f,setCurrentStep:i&&typeof i=="function"?i:v,steps:g,setSteps:_,disabledActions:p,setDisabledActions:E,meta:O,setMeta:y},c);return b.createElement(_n.Provider,{value:x},n,u?b.createElement(gn,P({},x)):null)};const On={default:"#1A1A1A",white:"#FFFFFF",orange:"#CE2021",current:"currentColor"};function Se({variant:e="default",size:t=40,className:n,style:r}){const o=On[e],s=t*(799/2325);return L.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:s,viewBox:"0 0 2325 799",fill:"none",className:n,style:r,"aria-hidden":"true",children:[L.jsx("rect",{x:"50",y:"50",width:"2225",height:"699",stroke:o,strokeWidth:"100"}),L.jsx("path",{d:"M492.333 199.627L599.833 295.627L600 295.776V491.707L492.207 599.5H199.5V199.5H492.19L492.333 199.627ZM334 347.5V448.5H435V347.5H334Z",fill:o}),L.jsx("path",{d:"M1108.5 497.715L1108.34 497.862L1001.34 599.362L1001.2 599.5H699V296.283L699.158 296.135L802.158 199.635L802.303 199.5H1108.5V497.715ZM855 347.5V448.5H956V347.5H855Z",fill:o}),L.jsx("path",{d:"M1616.94 200.24L1510.07 395.005L1616.94 598.768L1617.64 600.103L1616.28 599.451L1409 500.056L1208.22 599.448L1207.5 599.806V199.5H1617.34L1616.94 200.24ZM1332 337.5V439.207L1433.71 337.5H1332Z",fill:o}),L.jsx("path",{d:"M1716.5 599V200L1841 291.5L2125 200L2017.5 400L2125 599L1841 501L1716.5 599Z",fill:o,stroke:o})]})}function xn({caption:e,chipLabel:t,isLast:n,onAdvance:r,onEnd:o}){const s=t??(n?"Got it":"Next");return L.jsxs("div",{className:Ue("flex max-w-[min(20rem,calc(100vw-2rem))] flex-col gap-3 rounded-lg border","bg-popover text-popover-foreground shadow-floating p-4"),children:[L.jsxs("div",{className:"flex items-start gap-3",children:[L.jsxs("span",{className:"mt-0.5 shrink-0",children:[L.jsx(Se,{size:28,className:"dark:hidden"}),L.jsx(Se,{variant:"white",size:28,className:"hidden dark:block"})]}),L.jsx("p",{className:"text-sm leading-relaxed",children:e})]}),L.jsxs("div",{className:"flex items-center justify-end gap-2",children:[L.jsx(ve,{variant:"ghost",size:"sm",onClick:o,children:"Done"}),L.jsx(ve,{variant:"default",size:"sm",onClick:r,children:s})]})]})}const Rn=4e3,Sn=100;function kn(e){const[t,n]=d.useState({element:null,status:"resolving",anchor:e}),[r,o]=d.useState(e);return e!==r&&(o(e),n({element:null,status:"resolving",anchor:e})),d.useEffect(()=>{if(e===null)return;const s=Ce(e);let i=null,a=!1;const c=Date.now()+Rn,u=()=>{const f=document.querySelector(s);return f?(f!==i&&(f.scrollIntoView({block:"center",inline:"center"}),i=f,a=!0,n({element:f,status:"found",anchor:e})),!1):a?!1:Date.now()>=c?(n({element:null,status:"timeout",anchor:e}),!0):!1},l=setInterval(()=>{u()&&clearInterval(l)},Sn);return()=>clearInterval(l)},[e]),t}const Cn=".reactour__popover",Ln=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");function ke(e){return Array.from(e.querySelectorAll(Ln))}function Mn(e,t){d.useEffect(()=>{var o;if(!e)return;const n=document.querySelector(Cn);if(!n)return;(o=ke(n)[0])==null||o.focus();const r=s=>{if(s.key!=="Tab")return;const i=ke(n);if(i.length===0)return;const a=i[0],c=i[i.length-1],u=document.activeElement;n.contains(u)?s.shiftKey&&u===a?(s.preventDefault(),c.focus()):!s.shiftKey&&u===c&&(s.preventDefault(),a.focus()):(s.preventDefault(),a.focus())};return document.addEventListener("keydown",r,!0),()=>document.removeEventListener("keydown",r,!0)},[e,t])}const ze="(prefers-reduced-motion: reduce)";function Tn(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(ze).matches}function An(){const[e,t]=d.useState(Tn);return d.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const n=window.matchMedia(ze),r=o=>t(o.matches);return n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e}const In="dork-tour-mask--reduced-motion",Pn={mask:8,popover:10},Dn="x 280ms ease, y 280ms ease, width 280ms ease, height 280ms ease";function Hn({steps:e,activeIndex:t,onAdvance:n,onEnd:r}){const o=e[t],s=t>=e.length-1,i=Ze(),a=An(),c=kn((o==null?void 0:o.anchor)??null),[u,l]=d.useState(null);c.status==="found"&&c.element!==null&&c.anchor===(o==null?void 0:o.anchor)&&u!==t?l(t):!o&&u!==null&&l(null);const f=u!==null,v=u!==null?e[u]:void 0,g=d.useCallback(()=>{s?r():n()},[s,r,n]),_=d.useRef(g);d.useEffect(()=>{_.current=g},[g]),d.useEffect(()=>{c.status==="timeout"&&_.current()},[c.status]);const O=d.useRef(n),y=d.useRef(r);d.useEffect(()=>{O.current=n,y.current=r},[n,r]);const p=d.useRef(!1);d.useEffect(()=>{p.current=u===t},[u,t]);const[E,x]=d.useState(!1);d.useEffect(()=>{if(f&&!E){const w=requestAnimationFrame(()=>x(!0));return()=>cancelAnimationFrame(w)}},[f,E]),d.useEffect(()=>{if(!f)return;const w=document.getElementById("root");if(w)return w.inert=!0,()=>{w.inert=!1}},[f]),Mn(f,u??-1);const k=d.useMemo(()=>w=>{const R={...w,backgroundColor:"transparent",padding:0,boxShadow:"none",maxWidth:"none",color:"inherit"};return i?{...R,position:"fixed",top:"auto",left:0,right:0,bottom:0,transform:"none",display:"flex",justifyContent:"center",padding:"0 1rem 1rem"}:R},[i]),h=d.useCallback(w=>E?{...w,transition:Dn}:w,[E]),T=d.useMemo(()=>({popover:k,maskArea:h}),[k,h]),M=d.useMemo(()=>e.map((w,R)=>{const A=R===e.length-1;return{selector:Ce(w.anchor),stepInteraction:!1,content:L.jsx(xn,{caption:w.caption,chipLabel:w.chipLabel,isLast:A,onAdvance:()=>A?y.current():O.current(),onEnd:()=>y.current()})}}),[e]),C=d.useMemo(()=>e.map(w=>w.anchor).join("|"),[e]);return o?Qe.createPortal(L.jsxs(L.Fragment,{children:[L.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:f?(v==null?void 0:v.caption)??"":""}),f&&L.jsx(En,{steps:M,currentStep:u??0,defaultOpen:!0,showNavigation:!1,showPrevNextButtons:!1,showCloseButton:!1,showBadge:!1,showDots:!1,disableInteraction:!0,padding:Pn,styles:T,maskClassName:a?In:void 0,onClickMask:()=>r(),keyboardHandler:w=>{w.key==="Escape"?(w.preventDefault(),y.current()):w.key==="ArrowRight"&&p.current&&_.current()},children:L.jsx("span",{className:"hidden","aria-hidden":!0})},C)]}),document.body):null}const de={general:{id:"general",deepLink:{kind:"route",...X.home()},steps:[{anchor:U.homeComposer,caption:z.general.composer,chipLabel:"Next"},{anchor:U.homeTabs,caption:z.general.homeTabs,chipLabel:"Got it"}]},tasks:{id:"tasks",occasion:"tasks",offerLine:z.offers.tasks,deepLink:{kind:"route",...X.tasks()},steps:[{anchor:U.tasksList,caption:z.tasks.tasksList,chipLabel:"Got it"}]},relay:{id:"relay",occasion:"relay",offerLine:z.offers.relay,deepLink:{kind:"route",...X.connections()},steps:[{anchor:U.relayIntegrations,caption:z.relay.relayIntegrations,chipLabel:"Got it"}]},mesh:{id:"mesh",occasion:"mesh",offerLine:z.offers.mesh,deepLink:{kind:"route",...X.team()},steps:[{anchor:U.teamRoster,caption:z.mesh.teamRoster,chipLabel:"Got it"}]}},F=Xe()(e=>({runningTourId:null,activeIndex:0,pendingOfferId:null,startTour:t=>e({runningTourId:t,activeIndex:0,pendingOfferId:null}),advanceStep:()=>e(t=>({activeIndex:t.activeIndex+1})),endTour:()=>e({runningTourId:null,activeIndex:0}),setPendingOffer:t=>e({pendingOfferId:t}),clearPendingOffer:()=>e({pendingOfferId:null})}));function Fe(){var x,k;const e=Je(),t=et(),{data:n}=tt({queryKey:me.current(),queryFn:()=>e.getConfig(),staleTime:rt}),r=((x=n==null?void 0:n.tours)==null?void 0:x.seen)??[],o=((k=n==null?void 0:n.tours)==null?void 0:k.declined)??[],s=F(h=>h.runningTourId),i=F(h=>h.activeIndex),a=F(h=>h.pendingOfferId),c=F(h=>h.startTour),u=F(h=>h.advanceStep),l=F(h=>h.endTour),f=F(h=>h.setPendingOffer),v=F(h=>h.clearPendingOffer),g=nt({mutationFn:h=>e.updateConfig({tours:h}),onSuccess:()=>t.invalidateQueries({queryKey:me.all}),meta:{errorLabel:"Couldn’t save your tour progress"}});function _(h){r.includes(h)||g.mutate({seen:[...r,h]})}function O(h){o.includes(h)||g.mutate({declined:[...o,h]})}function y(h){return r.includes(h)||o.includes(h)}function p(h){_(h),c(h)}function E(h){O(h),v()}return{seen:r,declined:o,isSuppressed:y,runningDefinition:s?de[s]:null,activeIndex:i,pendingOffer:a?de[a]:null,pendingOfferId:a,runTour:c,acceptOffer:p,declineOffer:E,setPendingOffer:f,advanceStep:u,endTour:l}}const Nn=1,jn=1,$n=2;function zn(){const{isSuppressed:e,setPendingOffer:t,pendingOfferId:n,runningDefinition:r}=Fe(),o=ot(y=>Object.values(y.statuses).some(p=>p.lifecycle==="streaming")),s=ut(),i=it(),{data:a}=st(i),{data:c}=ft(s),{data:u}=at(),l=a==null?void 0:a.length,f=s&&c?c.reduce((y,p)=>y+p.instances.length,0):void 0,v=u==null?void 0:u.agents.length,g=d.useRef(void 0),_=d.useRef(void 0),O=d.useRef(void 0);d.useEffect(()=>{const y=(E,x,k,h,T)=>{if(x===void 0)return T;const M=h.current;return M===void 0||!(M<k&&x>=k)?(h.current=x,T):o||T||(h.current=x,e(E))?T:(t(E),!0)};let p=n!==null||r!==null;p=y("tasks",l,Nn,g,p),p=y("relay",f,jn,_,p),y("mesh",v,$n,O,p)},[l,f,v,o,n,r,e,t])}function Bn(){zn();const{runningDefinition:e,activeIndex:t,advanceStep:n,endTour:r,runTour:o}=Fe(),s=lt(),i=ct({select:l=>l.location.pathname}),a=ge(l=>l.requestedTour),c=ge(l=>l.clearRequestedTour),u=(e==null?void 0:e.id)??null;return d.useEffect(()=>{if(a!==null){if(!(a in de)){c();return}if(u===a){c();return}o(a)}},[a,u,o,c]),d.useEffect(()=>{if(!e)return;const{to:l}=e.deepLink;i!==l&&s({to:l})},[e,i,s]),e?L.jsx(Hn,{steps:e.steps,activeIndex:t,onAdvance:n,onEnd:r}):null}export{Se as D,de as T,Bn as a,zn as b,Fe as u};
|
|
1
|
+
import{r as d,R as b,j as L,B as ve,G as Ue,iO as Ce,ad as Ze,ez as Qe,ea as U,l as X,iP as Xe,a1 as Je,a3 as et,a2 as tt,au as me,a4 as nt,eL as rt,eM as ot,bf as it,a$ as st,cQ as at,cj as lt,eT as ct,aY as ge}from"./index-CjUfPyOM.js";import{D as z}from"./dorkbot-templates-8Yu9POWJ.js";import{u as ut}from"./use-relay-config-BA6c0FMB.js";import{u as ft}from"./use-external-adapter-catalog-Bv5rDkX4.js";var dt={attributes:!0,characterData:!0,subtree:!0,childList:!0};function ht(e,t,n=dt){d.useEffect(()=>{if(e.current){const r=new MutationObserver(t);return r.observe(e.current,n),()=>{r.disconnect()}}},[t,n])}var Le=(function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(o,s){return o[0]===n?(r=s,!0):!1}),r}return(function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),o=this.__entries__[r];return o&&o[1]},t.prototype.set=function(n,r){var o=e(this.__entries__,n);~o?this.__entries__[o][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,o=e(r,n);~o&&r.splice(o,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var o=0,s=this.__entries__;o<s.length;o++){var i=s[o];n.call(r,i[1],i[0])}},t})()})(),ue=typeof window<"u"&&typeof document<"u"&&window.document===document,te=(function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()})(),pt=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(te):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),vt=2;function mt(e,t){var n=!1,r=!1,o=0;function s(){n&&(n=!1,e()),r&&a()}function i(){pt(s)}function a(){var c=Date.now();if(n){if(c-o<vt)return;r=!0}else n=!0,r=!1,setTimeout(i,t);o=c}return a}var gt=20,bt=["top","right","bottom","left","width","height","size","weight"],yt=typeof MutationObserver<"u",wt=(function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=mt(this.refresh.bind(this),gt)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,r=n.indexOf(t);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!ue||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),yt?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!ue||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,o=bt.some(function(s){return!!~r.indexOf(s)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e})(),Me=(function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e}),q=(function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||te}),Te=ie(0,0,0,0);function ne(e){return parseFloat(e)||0}function be(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,o){var s=e["border-"+o+"-width"];return r+ne(s)},0)}function _t(e){for(var t=["top","right","bottom","left"],n={},r=0,o=t;r<o.length;r++){var s=o[r],i=e["padding-"+s];n[s]=ne(i)}return n}function Et(e){var t=e.getBBox();return ie(0,0,t.width,t.height)}function Ot(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Te;var r=q(e).getComputedStyle(e),o=_t(r),s=o.left+o.right,i=o.top+o.bottom,a=ne(r.width),c=ne(r.height);if(r.boxSizing==="border-box"&&(Math.round(a+s)!==t&&(a-=be(r,"left","right")+s),Math.round(c+i)!==n&&(c-=be(r,"top","bottom")+i)),!Rt(e)){var u=Math.round(a+s)-t,l=Math.round(c+i)-n;Math.abs(u)!==1&&(a-=u),Math.abs(l)!==1&&(c-=l)}return ie(o.left,o.top,a,c)}var xt=(function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof q(e).SVGGraphicsElement}:function(e){return e instanceof q(e).SVGElement&&typeof e.getBBox=="function"}})();function Rt(e){return e===q(e).document.documentElement}function St(e){return ue?xt(e)?Et(e):Ot(e):Te}function kt(e){var t=e.x,n=e.y,r=e.width,o=e.height,s=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,i=Object.create(s.prototype);return Me(i,{x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:o+n,left:t}),i}function ie(e,t,n,r){return{x:e,y:t,width:n,height:r}}var Ct=(function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ie(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=St(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e})(),Lt=(function(){function e(t,n){var r=kt(n);Me(this,{target:t,contentRect:r})}return e})(),Mt=(function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new Le,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof q(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new Ct(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof q(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new Lt(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e})(),Ae=typeof WeakMap<"u"?new WeakMap:new Le,Ie=(function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=wt.getInstance(),r=new Mt(t,n,this);Ae.set(this,r)}return e})();["observe","unobserve","disconnect"].forEach(function(e){Ie.prototype[e]=function(){var t;return(t=Ae.get(this))[e].apply(t,arguments)}});var Tt=(function(){return typeof te.ResizeObserver<"u"?te.ResizeObserver:Ie})(),At=({mutationObservables:e,resizeObservables:t,refresh:n})=>{const[r,o]=d.useState(0),s=d.useRef(document.documentElement||document.body);function i(c){const u=Array.from(c);for(const l of u)if(e){if(!l.attributes)continue;e.find(v=>l.matches(v))&&n(!0)}}function a(c){const u=Array.from(c);for(const l of u)if(t){if(!l.attributes)continue;t.find(v=>l.matches(v))&&o(r+1)}}return ht(s,c=>{for(const u of c)u.addedNodes.length!==0&&(i(u.addedNodes),a(u.addedNodes)),u.removedNodes.length!==0&&(i(u.removedNodes),a(u.removedNodes))},{childList:!0,subtree:!0}),d.useEffect(()=>{if(!t)return;const c=new Tt(()=>{n()});for(const u of t){const l=document.querySelector(u);l&&c.observe(l)}return()=>{c.disconnect()}},[t,r]),null},It=At;function ee(e){let t=Pe;return e&&(t=e.getBoundingClientRect()),t}function Pt(e,t){const[n,r]=d.useState(Pe),o=d.useCallback(()=>{e!=null&&e.current&&r(ee(e==null?void 0:e.current))},[e==null?void 0:e.current]);return d.useEffect(()=>(o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)),[e==null?void 0:e.current,t]),n}var Pe={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0};function Dt(e,t){return new Promise(n=>{if(!(e instanceof Element))throw new TypeError("Argument 1 must be an Element");let r=0,o=null;const s=Object.assign({behavior:"smooth"},t);e.scrollIntoView(s),requestAnimationFrame(i);function i(){const a=e==null?void 0:e.getBoundingClientRect().top;if(a===o){if(r++>2)return n(null)}else r=0,o=a;requestAnimationFrame(i)}})}function J(e){return e<0?0:e}function Ht(e){return typeof e=="object"&&e!==null?{thresholdX:e.x||0,thresholdY:e.y||0}:{thresholdX:e||0,thresholdY:e||0}}function se(){const e=Math.max(document.documentElement.clientWidth,window.innerWidth||0),t=Math.max(document.documentElement.clientHeight,window.innerHeight||0);return{w:e,h:t}}function Nt({top:e,right:t,bottom:n,left:r,threshold:o}){const{w:s,h:i}=se(),{thresholdX:a,thresholdY:c}=Ht(o);return e<0&&n-e>i?!0:e>=0+c&&r>=0+a&&n<=i-c&&t<=s-a}var ye=(e,t)=>e>t,we=(e,t)=>e>t;function jt(e,t=[]){const n=(r,o)=>t.includes(r)?1:t.includes(o)?-1:0;return Object.keys(e).map(r=>({position:r,value:e[r]})).sort((r,o)=>o.value-r.value).sort((r,o)=>n(r.position,o.position)).filter(r=>r.value>0).map(r=>r.position)}var ce=10;function fe(e=ce){return Array.isArray(e)?e.length===1?[e[0],e[0],e[0],e[0]]:e.length===2?[e[1],e[0],e[1],e[0]]:e.length===3?[e[0],e[1],e[2],e[1]]:e.length>3?[e[0],e[1],e[2],e[3]]:[ce,ce]:[e,e,e,e]}var $t={maskWrapper:()=>({opacity:.7,left:0,top:0,position:"fixed",zIndex:99999,pointerEvents:"none",color:"#000"}),svgWrapper:({windowWidth:e,windowHeight:t,wpt:n,wpl:r})=>({width:e,height:t,left:Number(r),top:Number(n),position:"fixed"}),maskArea:({x:e,y:t,width:n,height:r})=>({x:e,y:t,width:n,height:r,fill:"black",rx:0}),maskRect:({windowWidth:e,windowHeight:t,maskID:n})=>({x:0,y:0,width:e,height:t,fill:"currentColor",mask:`url(#${n})`}),clickArea:({windowWidth:e,windowHeight:t,clipID:n})=>({x:0,y:0,width:e,height:t,fill:"currentcolor",pointerEvents:"auto",clipPath:`url(#${n})`}),highlightedArea:({x:e,y:t,width:n,height:r})=>({x:e,y:t,width:n,height:r,pointerEvents:"auto",fill:"transparent",display:"none"})};function zt(e){return(t,n)=>{const r=$t[t](n),o=e[t];return o?o(r,n):r}}var Ft=({padding:e=10,wrapperPadding:t=0,onClick:n,onClickHighlighted:r,styles:o={},sizes:s,className:i,highlightedAreaClassName:a,maskId:c,clipId:u})=>{const l=c||_e("mask__"),f=u||_e("clip__"),v=zt(o),[g,_,O,y]=fe(e),[p,E,x,k]=fe(t),{w:h,h:T}=se(),M=J((s==null?void 0:s.width)+y+_),C=J((s==null?void 0:s.height)+g+O),w=J((s==null?void 0:s.top)-g-p),R=J((s==null?void 0:s.left)-y-k),A=h-k-E,S=T-p-x,j=v("maskArea",{x:R,y:w,width:M,height:C}),$=v("highlightedArea",{x:R,y:w,width:M,height:C});return b.createElement("div",{style:v("maskWrapper",{}),onClick:n,className:i},b.createElement("svg",{width:A,height:S,xmlns:"http://www.w3.org/2000/svg",style:v("svgWrapper",{windowWidth:A,windowHeight:S,wpt:p,wpl:k})},b.createElement("defs",null,b.createElement("mask",{id:l},b.createElement("rect",{x:0,y:0,width:A,height:S,fill:"white"}),b.createElement("rect",{style:j,rx:j.rx?1:void 0})),b.createElement("clipPath",{id:f},b.createElement("polygon",{points:`0 0, 0 ${S}, ${R} ${S}, ${R} ${w}, ${R+M} ${w}, ${R+M} ${w+C}, ${R} ${w+C}, ${R} ${S}, ${A} ${S}, ${A} 0`}))),b.createElement("rect",{style:v("maskRect",{windowWidth:A,windowHeight:S,maskID:l})}),b.createElement("rect",{style:v("clickArea",{windowWidth:A,windowHeight:S,top:w,left:R,width:M,height:C,clipID:f})}),b.createElement("rect",{style:$,className:a,onClick:r,rx:$.rx?1:void 0})))},Vt=Ft;function _e(e){return e+Math.random().toString(36).substring(2,16)}var Wt=Object.defineProperty,re=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,Ee=(e,t,n)=>t in e?Wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oe=(e,t)=>{for(var n in t||(t={}))De.call(t,n)&&Ee(e,n,t[n]);if(re)for(var n of re(t))He.call(t,n)&&Ee(e,n,t[n]);return e},qt=(e,t)=>{var n={};for(var r in e)De.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&re)for(var r of re(e))t.indexOf(r)<0&&He.call(e,r)&&(n[r]=e[r]);return n},Bt={popover:()=>({position:"fixed",maxWidth:353,backgroundColor:"#fff",padding:"24px 30px",boxShadow:"0 0.5em 3em rgba(0, 0, 0, 0.3)",color:"inherit",zIndex:1e5,transition:"transform 0.3s",top:0,left:0})};function Gt(e){return(t,n)=>{const r=Bt[t](n),o=e[t];return o?o(r,n):r}}var Kt=e=>{var t=e,{children:n,position:r="bottom",padding:o=10,styles:s={},sizes:i,refresher:a}=t,c=qt(t,["children","position","padding","styles","sizes","refresher"]);const u=d.useRef(null),l=d.useRef(""),f=d.useRef(""),v=d.useRef(""),{w:g,h:_}=se(),O=Gt(s),y=Pt(u,a),{width:p,height:E}=y,[x,k,h,T]=fe(o),M=(i==null?void 0:i.left)-T,C=(i==null?void 0:i.top)-x,w=(i==null?void 0:i.right)+k,R=(i==null?void 0:i.bottom)+h,A=r&&typeof r=="function"?r({width:p,height:E,windowWidth:g,windowHeight:_,top:C,left:M,right:w,bottom:R,x:i.x,y:i.y},y):r,S={left:M,right:g-w,top:C,bottom:_-R},j=(I,D,H)=>{switch(I){case"top":return S.top>E+h;case"right":return D?!1:S.right>p+T;case"bottom":return H?!1:S.bottom>E+x;case"left":return S.left>p+k;default:return!1}},$=(I,D,H)=>{const m=jt(S,H?["right","left"]:D?["top","bottom"]:[]);for(let N=0;N<m.length;N++)if(j(m[N],D,H))return l.current=m[N],I[m[N]];return l.current="center",I.center},G=(I=>{if(Array.isArray(I)){const V=ye(I[0],g),le=we(I[1],_);return l.current="custom",[V?g/2-p/2:I[0],le?_/2-E/2:I[1]]}const D=ye(M+p,g),H=we(R+E,_),m=D?Math.min(M,g-p):Math.max(M,0),N=H?E>S.bottom?Math.max(R-E,0):Math.max(C,0):C;H&&E>S.bottom?f.current="bottom":f.current="top",D?v.current="left":v.current="right";const K={top:[m-T,C-E-h],right:[w+T,N-x],bottom:[m-T,R+x],left:[M-p-k,N-x],center:[g/2-p/2,_/2-E/2]};return I==="center"||j(I,D,H)&&!D&&!H?(l.current=I,K[I]):$(K,D,H)})(A);return b.createElement("div",Oe({className:"reactour__popover",style:Oe({transform:`translate(${Math.round(G[0])}px, ${Math.round(G[1])}px)`},O("popover",{position:l.current,verticalAlign:f.current,horizontalAlign:v.current,helperRect:y,targetRect:i})),ref:u},c),n)},Yt=Kt,Ut=Object.defineProperty,Zt=Object.defineProperties,Qt=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,xe=(e,t,n)=>t in e?Ut(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t)=>{for(var n in t||(t={}))Ne.call(t,n)&&xe(e,n,t[n]);if(oe)for(var n of oe(t))je.call(t,n)&&xe(e,n,t[n]);return e},he=(e,t)=>Zt(e,Qt(t)),Z=(e,t)=>{var n={};for(var r in e)Ne.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&oe)for(var r of oe(e))t.indexOf(r)<0&&je.call(e,r)&&(n[r]=e[r]);return n},Xt={bottom:0,height:0,left:0,right:0,top:0,width:0,windowWidth:0,windowHeight:0,x:0,y:0};function Jt(e,t={block:"center",behavior:"smooth",inViewThreshold:0}){const[n,r]=d.useState(!1),[o,s]=d.useState(!1),[i,a]=d.useState(!1),[c,u]=d.useState(null),[l,f]=d.useState(Xt),v=(e==null?void 0:e.selector)instanceof Element?e==null?void 0:e.selector:document.querySelector(e==null?void 0:e.selector),g=d.useCallback(()=>{const O=Re(v,e==null?void 0:e.highlightedSelectors,e==null?void 0:e.bypassElem),{hasHighligtedElems:y}=O,p=Z(O,["hasHighligtedElems"]);Object.entries(l).some(([E,x])=>p[E]!==x)&&f(p)},[v,e==null?void 0:e.highlightedSelectors,l]);d.useEffect(()=>(g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)),[v,e==null?void 0:e.highlightedSelectors,c]),d.useEffect(()=>{!Nt(he(P({},l),{threshold:t.inViewThreshold}))&&v&&(r(!0),Dt(v,t).then(()=>{o||u(Date.now())}).finally(()=>{r(!1)}))},[l]);const _=d.useCallback(()=>{s(!0);const O=Re(v,e==null?void 0:e.highlightedSelectors,e==null?void 0:e.bypassElem),{hasHighligtedElems:y}=O,p=Z(O,["hasHighligtedElems"]);a(y),f(p),s(!1)},[v,e==null?void 0:e.highlightedSelectors,l]);return{sizes:l,transition:n,target:v,observableRefresher:_,isHighlightingObserved:i}}function Re(e,t=[],n=!0){let r=!1;const{w:o,h:s}=se();if(!t)return he(P({},ee(e)),{windowWidth:o,windowHeight:s,hasHighligtedElems:!1});let i=ee(e),a={bottom:0,height:0,left:o,right:0,top:s,width:0};for(const u of t){const l=document.querySelector(u);if(!l||l.style.display==="none"||l.style.visibility==="hidden")continue;const f=ee(l);r=!0,n||!e?(f.top<a.top&&(a.top=f.top),f.right>a.right&&(a.right=f.right),f.bottom>a.bottom&&(a.bottom=f.bottom),f.left<a.left&&(a.left=f.left),a.width=a.right-a.left,a.height=a.bottom-a.top):(f.top<i.top&&(i.top=f.top),f.right>i.right&&(i.right=f.right),f.bottom>i.bottom&&(i.bottom=f.bottom),f.left<i.left&&(i.left=f.left),i.width=i.right-i.left,i.height=i.bottom-i.top)}const c=n||!e?a.width>0&&a.height>0:!1;return{left:(c?a:i).left,top:(c?a:i).top,right:(c?a:i).right,bottom:(c?a:i).bottom,width:(c?a:i).width,height:(c?a:i).height,windowWidth:o,windowHeight:s,hasHighligtedElems:r,x:i.x,y:i.y}}var en=({disableKeyboardNavigation:e,setCurrentStep:t,currentStep:n,setIsOpen:r,stepsLength:o,disable:s,rtl:i,clickProps:a,keyboardHandler:c})=>{function u(l){if(l.stopPropagation(),e===!0||s)return;let f,v,g;e&&(f=e.includes("esc"),v=e.includes("right"),g=e.includes("left"));function _(){t(Math.min(n+1,o-1))}function O(){t(Math.max(n-1,0))}c&&typeof c=="function"?c(l,a,{isEscDisabled:f,isRightDisabled:v,isLeftDisabled:g}):(l.keyCode===27&&!f&&(l.preventDefault(),r(!1)),l.keyCode===39&&!v&&(l.preventDefault(),i?O():_()),l.keyCode===37&&!g&&(l.preventDefault(),i?_():O()))}return d.useEffect(()=>(window.addEventListener("keydown",u,!1),()=>{window.removeEventListener("keydown",u)}),[s,t,n]),null},tn=en,nn={badge:()=>({position:"absolute",fontFamily:"monospace",background:"var(--reactour-accent,#007aff)",height:"1.875em",lineHeight:2,paddingLeft:"0.8125em",paddingRight:"0.8125em",fontSize:"1em",borderRadius:"1.625em",color:"white",textAlign:"center",boxShadow:"0 0.25em 0.5em rgba(0, 0, 0, 0.3)",top:"-0.8125em",left:"-0.8125em"}),controls:()=>({display:"flex",marginTop:24,alignItems:"center",justifyContent:"space-between"}),navigation:()=>({counterReset:"dot",display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"}),button:({disabled:e})=>({display:"block",padding:0,border:0,background:"none",cursor:e?"not-allowed":"pointer"}),arrow:({disabled:e})=>({color:e?"#caccce":"#646464",width:16,height:12,flex:"0 0 16px"}),dot:({current:e,disabled:t,showNumber:n})=>({counterIncrement:"dot",width:8,height:8,border:e?"0":"1px solid #caccce",borderRadius:"100%",padding:0,display:"block",margin:4,transition:"opacity 0.3s, transform 0.3s",cursor:t?"not-allowed":"pointer",transform:`scale(${e?1.25:1})`,color:e?"var(--reactour-accent, #007aff)":"#caccce",background:e?"var(--reactour-accent, #007aff)":"none"}),close:({disabled:e})=>({position:"absolute",top:22,right:22,width:9,height:9,"--rt-close-btn":e?"#caccce":"#5e5e5e","--rt-close-btn-disabled":e?"#caccce":"#000"}),svg:()=>({display:"block"})};function ae(e){return(t,n)=>{const r=nn[t](n),o=e[t];return o?o(r,n):r}}var rn=({styles:e={},children:t})=>{const n=ae(e);return b.createElement("span",{style:n("badge",{})},t)},on=rn,sn=e=>{var t=e,{styles:n={},onClick:r,disabled:o}=t,s=Z(t,["styles","onClick","disabled"]);const i=ae(n);return b.createElement("button",P({className:"reactour__close-button",style:P(P({},i("button",{})),i("close",{disabled:o})),onClick:r},s),b.createElement("svg",{viewBox:"0 0 9.1 9.1","aria-hidden":!0,role:"presentation",style:P({},i("svg",{}))},b.createElement("path",{fill:"currentColor",d:"M5.9 4.5l2.8-2.8c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0L4.5 3.1 1.7.3C1.3-.1.7-.1.3.3c-.4.4-.4 1 0 1.4l2.8 2.8L.3 7.4c-.4.4-.4 1 0 1.4.2.2.4.3.7.3s.5-.1.7-.3L4.5 6l2.8 2.8c.3.2.5.3.8.3s.5-.1.7-.3c.4-.4.4-1 0-1.4L5.9 4.5z"})))},an=sn,ln=({content:e,setCurrentStep:t,transition:n,isHighlightingObserved:r,currentStep:o,setIsOpen:s})=>typeof e=="function"?e({setCurrentStep:t,transition:n,isHighlightingObserved:r,currentStep:o,setIsOpen:s}):e,cn=ln,un=({styles:e={},steps:t,setCurrentStep:n,currentStep:r,setIsOpen:o,nextButton:s,prevButton:i,disableDots:a,hideDots:c,hideButtons:u,disableAll:l,rtl:f,Arrow:v=$e})=>{const g=t.length,_=ae(e),O=({onClick:y,kind:p="next",children:E,hideArrow:x})=>{function k(){l||(y&&typeof y=="function"?y():n(p==="next"?Math.min(r+1,g-1):Math.max(r-1,0)))}return b.createElement("button",{style:_("button",{kind:p,disabled:l||(p==="next"?g-1===r:r===0)}),onClick:k,"aria-label":`Go to ${p} step`},x?null:b.createElement(v,{styles:e,inverted:f?p==="prev":p==="next",disabled:l||(p==="next"?g-1===r:r===0)}),E)};return b.createElement("div",{style:_("controls",{}),dir:f?"rtl":"ltr"},u?null:i&&typeof i=="function"?i({Button:O,setCurrentStep:n,currentStep:r,stepsLength:g,setIsOpen:o,steps:t}):b.createElement(O,{kind:"prev"}),c?null:b.createElement("div",{style:_("navigation",{})},Array.from({length:g},(y,p)=>p).map(y=>{var p;return b.createElement("button",{style:_("dot",{current:y===r,disabled:a||l}),onClick:()=>{!a&&!l&&n(y)},key:`navigation_dot_${y}`,"aria-label":((p=t[y])==null?void 0:p.navDotAriaLabel)||`Go to step ${y+1}`})})),u?null:s&&typeof s=="function"?s({Button:O,setCurrentStep:n,currentStep:r,stepsLength:g,setIsOpen:o,steps:t}):b.createElement(O,null))},fn=un,$e=({styles:e={},inverted:t=!1,disabled:n})=>{const r=ae(e);return b.createElement("svg",{viewBox:"0 0 18.4 14.4",style:r("arrow",{inverted:t,disabled:n})},b.createElement("path",{d:t?"M17 7.2H1M10.8 1L17 7.2l-6.2 6.2":"M1.4 7.2h16M7.6 1L1.4 7.2l6.2 6.2",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeMiterlimit:"10"}))},dn={Badge:on,Close:an,Content:cn,Navigation:fn,Arrow:$e},hn=e=>P(P({},dn),e),pn=({styles:e,components:t={},badgeContent:n,accessibilityOptions:r,disabledActions:o,onClickClose:s,steps:i,setCurrentStep:a,currentStep:c,transition:u,isHighlightingObserved:l,setIsOpen:f,nextButton:v,prevButton:g,disableDotsNavigation:_,rtl:O,showPrevNextButtons:y=!0,showCloseButton:p=!0,showNavigation:E=!0,showBadge:x=!0,showDots:k=!0,meta:h,setMeta:T,setSteps:M})=>{const C=i[c],{Badge:w,Close:R,Content:A,Navigation:S,Arrow:j}=hn(t),$=n&&typeof n=="function"?n({currentStep:c,totalSteps:i.length,transition:u}):c+1;function B(){o||(s&&typeof s=="function"?s({setCurrentStep:a,setIsOpen:f,currentStep:c,steps:i,meta:h,setMeta:T,setSteps:M}):f(!1))}return b.createElement(b.Fragment,null,x?b.createElement(w,{styles:e},$):null,p?b.createElement(R,{styles:e,"aria-label":r==null?void 0:r.closeButtonAriaLabel,disabled:o,onClick:B}):null,b.createElement(A,{content:C==null?void 0:C.content,setCurrentStep:a,currentStep:c,transition:u,isHighlightingObserved:l,setIsOpen:f}),E?b.createElement(S,{setCurrentStep:a,currentStep:c,setIsOpen:f,steps:i,styles:e,"aria-hidden":!(r!=null&&r.showNavigationScreenReaders),nextButton:v,prevButton:g,disableDots:_,hideButtons:!y,hideDots:!k,disableAll:o,rtl:O,Arrow:j}):null)},vn=pn,mn=e=>{var t=e,{currentStep:n,setCurrentStep:r,setIsOpen:o,steps:s=[],setSteps:i,styles:a={},scrollSmooth:c,afterOpen:u,beforeClose:l,padding:f=10,position:v,onClickMask:g,onClickHighlighted:_,keyboardHandler:O,className:y="reactour__popover",maskClassName:p="reactour__mask",highlightedMaskClassName:E,clipId:x,maskId:k,disableInteraction:h,disableKeyboardNavigation:T,inViewThreshold:M,disabledActions:C,setDisabledActions:w,disableWhenSelectorFalsy:R,rtl:A,accessibilityOptions:S={closeButtonAriaLabel:"Close Tour",showNavigationScreenReaders:!0},ContentComponent:j,Wrapper:$,meta:B,setMeta:G,onTransition:I=()=>"center"}=t,D=Z(t,["currentStep","setCurrentStep","setIsOpen","steps","setSteps","styles","scrollSmooth","afterOpen","beforeClose","padding","position","onClickMask","onClickHighlighted","keyboardHandler","className","maskClassName","highlightedMaskClassName","clipId","maskId","disableInteraction","disableKeyboardNavigation","inViewThreshold","disabledActions","setDisabledActions","disableWhenSelectorFalsy","rtl","accessibilityOptions","ContentComponent","Wrapper","meta","setMeta","onTransition"]),H;const m=s[n],N=P(P({},a),m==null?void 0:m.styles),{sizes:K,transition:V,observableRefresher:le,isHighlightingObserved:pe,target:W}=Jt(m,{block:"center",behavior:c?"smooth":"auto",inViewThreshold:M});d.useEffect(()=>(u&&typeof u=="function"&&u(W),()=>{l&&typeof l=="function"&&l(W)}),[]);const{maskPadding:Ve,popoverPadding:We,wrapperPadding:qe}=bn((H=m==null?void 0:m.padding)!=null?H:f),Q={setCurrentStep:r,setIsOpen:o,currentStep:n,setSteps:i,steps:s,setMeta:G,meta:B};function Be(){C||(g&&typeof g=="function"?g(Q):o(!1))}const Ge=typeof(m==null?void 0:m.stepInteraction)=="boolean"?!(m!=null&&m.stepInteraction):h?typeof h=="boolean"?h:h(Q):!1;d.useEffect(()=>(m!=null&&m.action&&typeof(m==null?void 0:m.action)=="function"&&(m==null||m.action(W)),(m==null?void 0:m.disableActions)!==void 0&&w(m==null?void 0:m.disableActions),()=>{m!=null&&m.actionAfter&&typeof(m==null?void 0:m.actionAfter)=="function"&&(m==null||m.actionAfter(W))}),[m]);const Ke=V?I:m!=null&&m.position?m==null?void 0:m.position:v,Ye=$||b.Fragment;return m?b.createElement(Ye,null,b.createElement(It,{mutationObservables:m==null?void 0:m.mutationObservables,resizeObservables:m==null?void 0:m.resizeObservables,refresh:le}),b.createElement(tn,{setCurrentStep:r,currentStep:n,setIsOpen:o,stepsLength:s.length,disableKeyboardNavigation:T,disable:C,rtl:A,clickProps:Q,keyboardHandler:O}),(!R||W)&&b.createElement(Vt,{sizes:V?yn:K,onClick:Be,styles:P({highlightedArea:Y=>he(P({},Y),{display:Ge?"block":"none"})},N),padding:V?0:Ve,highlightedAreaClassName:E,className:p,onClickHighlighted:Y=>{Y.preventDefault(),Y.stopPropagation(),_&&_(Y,Q)},wrapperPadding:qe,clipId:x,maskId:k}),(!R||W)&&b.createElement(Yt,{sizes:K,styles:N,position:Ke,padding:We,"aria-labelledby":S==null?void 0:S.ariaLabelledBy,className:y,refresher:n},j?b.createElement(j,P({styles:N,setCurrentStep:r,currentStep:n,setIsOpen:o,steps:s,accessibilityOptions:S,disabledActions:C,transition:V,isHighlightingObserved:pe,rtl:A},D)):b.createElement(vn,P({styles:N,setCurrentStep:r,currentStep:n,setIsOpen:o,steps:s,setSteps:i,accessibilityOptions:S,disabledActions:C,transition:V,isHighlightingObserved:pe,rtl:A,meta:B,setMeta:G},D)))):null},gn=mn;function bn(e){return typeof e=="object"&&e!==null?{maskPadding:e.mask,popoverPadding:e.popover,wrapperPadding:e.wrapper}:{maskPadding:e,popoverPadding:e,wrapperPadding:0}}var yn={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0},wn={isOpen:!1,setIsOpen:()=>!1,currentStep:0,setCurrentStep:()=>0,steps:[],setSteps:()=>[],setMeta:()=>"",disabledActions:!1,setDisabledActions:()=>!1,components:{}},_n=b.createContext(wn),En=e=>{var t=e,{children:n,defaultOpen:r=!1,startAt:o=0,steps:s,setCurrentStep:i,currentStep:a}=t,c=Z(t,["children","defaultOpen","startAt","steps","setCurrentStep","currentStep"]);const[u,l]=d.useState(r),[f,v]=d.useState(o),[g,_]=d.useState(s),[O,y]=d.useState(""),[p,E]=d.useState(!1),x=P({isOpen:u,setIsOpen:l,currentStep:a||f,setCurrentStep:i&&typeof i=="function"?i:v,steps:g,setSteps:_,disabledActions:p,setDisabledActions:E,meta:O,setMeta:y},c);return b.createElement(_n.Provider,{value:x},n,u?b.createElement(gn,P({},x)):null)};const On={default:"#1A1A1A",white:"#FFFFFF",orange:"#CE2021",current:"currentColor"};function Se({variant:e="default",size:t=40,className:n,style:r}){const o=On[e],s=t*(799/2325);return L.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:s,viewBox:"0 0 2325 799",fill:"none",className:n,style:r,"aria-hidden":"true",children:[L.jsx("rect",{x:"50",y:"50",width:"2225",height:"699",stroke:o,strokeWidth:"100"}),L.jsx("path",{d:"M492.333 199.627L599.833 295.627L600 295.776V491.707L492.207 599.5H199.5V199.5H492.19L492.333 199.627ZM334 347.5V448.5H435V347.5H334Z",fill:o}),L.jsx("path",{d:"M1108.5 497.715L1108.34 497.862L1001.34 599.362L1001.2 599.5H699V296.283L699.158 296.135L802.158 199.635L802.303 199.5H1108.5V497.715ZM855 347.5V448.5H956V347.5H855Z",fill:o}),L.jsx("path",{d:"M1616.94 200.24L1510.07 395.005L1616.94 598.768L1617.64 600.103L1616.28 599.451L1409 500.056L1208.22 599.448L1207.5 599.806V199.5H1617.34L1616.94 200.24ZM1332 337.5V439.207L1433.71 337.5H1332Z",fill:o}),L.jsx("path",{d:"M1716.5 599V200L1841 291.5L2125 200L2017.5 400L2125 599L1841 501L1716.5 599Z",fill:o,stroke:o})]})}function xn({caption:e,chipLabel:t,isLast:n,onAdvance:r,onEnd:o}){const s=t??(n?"Got it":"Next");return L.jsxs("div",{className:Ue("flex max-w-[min(20rem,calc(100vw-2rem))] flex-col gap-3 rounded-lg border","bg-popover text-popover-foreground shadow-floating p-4"),children:[L.jsxs("div",{className:"flex items-start gap-3",children:[L.jsxs("span",{className:"mt-0.5 shrink-0",children:[L.jsx(Se,{size:28,className:"dark:hidden"}),L.jsx(Se,{variant:"white",size:28,className:"hidden dark:block"})]}),L.jsx("p",{className:"text-sm leading-relaxed",children:e})]}),L.jsxs("div",{className:"flex items-center justify-end gap-2",children:[L.jsx(ve,{variant:"ghost",size:"sm",onClick:o,children:"Done"}),L.jsx(ve,{variant:"default",size:"sm",onClick:r,children:s})]})]})}const Rn=4e3,Sn=100;function kn(e){const[t,n]=d.useState({element:null,status:"resolving",anchor:e}),[r,o]=d.useState(e);return e!==r&&(o(e),n({element:null,status:"resolving",anchor:e})),d.useEffect(()=>{if(e===null)return;const s=Ce(e);let i=null,a=!1;const c=Date.now()+Rn,u=()=>{const f=document.querySelector(s);return f?(f!==i&&(f.scrollIntoView({block:"center",inline:"center"}),i=f,a=!0,n({element:f,status:"found",anchor:e})),!1):a?!1:Date.now()>=c?(n({element:null,status:"timeout",anchor:e}),!0):!1},l=setInterval(()=>{u()&&clearInterval(l)},Sn);return()=>clearInterval(l)},[e]),t}const Cn=".reactour__popover",Ln=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");function ke(e){return Array.from(e.querySelectorAll(Ln))}function Mn(e,t){d.useEffect(()=>{var o;if(!e)return;const n=document.querySelector(Cn);if(!n)return;(o=ke(n)[0])==null||o.focus();const r=s=>{if(s.key!=="Tab")return;const i=ke(n);if(i.length===0)return;const a=i[0],c=i[i.length-1],u=document.activeElement;n.contains(u)?s.shiftKey&&u===a?(s.preventDefault(),c.focus()):!s.shiftKey&&u===c&&(s.preventDefault(),a.focus()):(s.preventDefault(),a.focus())};return document.addEventListener("keydown",r,!0),()=>document.removeEventListener("keydown",r,!0)},[e,t])}const ze="(prefers-reduced-motion: reduce)";function Tn(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(ze).matches}function An(){const[e,t]=d.useState(Tn);return d.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const n=window.matchMedia(ze),r=o=>t(o.matches);return n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e}const In="dork-tour-mask--reduced-motion",Pn={mask:8,popover:10},Dn="x 280ms ease, y 280ms ease, width 280ms ease, height 280ms ease";function Hn({steps:e,activeIndex:t,onAdvance:n,onEnd:r}){const o=e[t],s=t>=e.length-1,i=Ze(),a=An(),c=kn((o==null?void 0:o.anchor)??null),[u,l]=d.useState(null);c.status==="found"&&c.element!==null&&c.anchor===(o==null?void 0:o.anchor)&&u!==t?l(t):!o&&u!==null&&l(null);const f=u!==null,v=u!==null?e[u]:void 0,g=d.useCallback(()=>{s?r():n()},[s,r,n]),_=d.useRef(g);d.useEffect(()=>{_.current=g},[g]),d.useEffect(()=>{c.status==="timeout"&&_.current()},[c.status]);const O=d.useRef(n),y=d.useRef(r);d.useEffect(()=>{O.current=n,y.current=r},[n,r]);const p=d.useRef(!1);d.useEffect(()=>{p.current=u===t},[u,t]);const[E,x]=d.useState(!1);d.useEffect(()=>{if(f&&!E){const w=requestAnimationFrame(()=>x(!0));return()=>cancelAnimationFrame(w)}},[f,E]),d.useEffect(()=>{if(!f)return;const w=document.getElementById("root");if(w)return w.inert=!0,()=>{w.inert=!1}},[f]),Mn(f,u??-1);const k=d.useMemo(()=>w=>{const R={...w,backgroundColor:"transparent",padding:0,boxShadow:"none",maxWidth:"none",color:"inherit"};return i?{...R,position:"fixed",top:"auto",left:0,right:0,bottom:0,transform:"none",display:"flex",justifyContent:"center",padding:"0 1rem 1rem"}:R},[i]),h=d.useCallback(w=>E?{...w,transition:Dn}:w,[E]),T=d.useMemo(()=>({popover:k,maskArea:h}),[k,h]),M=d.useMemo(()=>e.map((w,R)=>{const A=R===e.length-1;return{selector:Ce(w.anchor),stepInteraction:!1,content:L.jsx(xn,{caption:w.caption,chipLabel:w.chipLabel,isLast:A,onAdvance:()=>A?y.current():O.current(),onEnd:()=>y.current()})}}),[e]),C=d.useMemo(()=>e.map(w=>w.anchor).join("|"),[e]);return o?Qe.createPortal(L.jsxs(L.Fragment,{children:[L.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:f?(v==null?void 0:v.caption)??"":""}),f&&L.jsx(En,{steps:M,currentStep:u??0,defaultOpen:!0,showNavigation:!1,showPrevNextButtons:!1,showCloseButton:!1,showBadge:!1,showDots:!1,disableInteraction:!0,padding:Pn,styles:T,maskClassName:a?In:void 0,onClickMask:()=>r(),keyboardHandler:w=>{w.key==="Escape"?(w.preventDefault(),y.current()):w.key==="ArrowRight"&&p.current&&_.current()},children:L.jsx("span",{className:"hidden","aria-hidden":!0})},C)]}),document.body):null}const de={general:{id:"general",deepLink:{kind:"route",...X.home()},steps:[{anchor:U.homeComposer,caption:z.general.composer,chipLabel:"Next"},{anchor:U.homeTabs,caption:z.general.homeTabs,chipLabel:"Got it"}]},tasks:{id:"tasks",occasion:"tasks",offerLine:z.offers.tasks,deepLink:{kind:"route",...X.tasks()},steps:[{anchor:U.tasksList,caption:z.tasks.tasksList,chipLabel:"Got it"}]},relay:{id:"relay",occasion:"relay",offerLine:z.offers.relay,deepLink:{kind:"route",...X.connections()},steps:[{anchor:U.relayIntegrations,caption:z.relay.relayIntegrations,chipLabel:"Got it"}]},mesh:{id:"mesh",occasion:"mesh",offerLine:z.offers.mesh,deepLink:{kind:"route",...X.team()},steps:[{anchor:U.teamRoster,caption:z.mesh.teamRoster,chipLabel:"Got it"}]}},F=Xe()(e=>({runningTourId:null,activeIndex:0,pendingOfferId:null,startTour:t=>e({runningTourId:t,activeIndex:0,pendingOfferId:null}),advanceStep:()=>e(t=>({activeIndex:t.activeIndex+1})),endTour:()=>e({runningTourId:null,activeIndex:0}),setPendingOffer:t=>e({pendingOfferId:t}),clearPendingOffer:()=>e({pendingOfferId:null})}));function Fe(){var x,k;const e=Je(),t=et(),{data:n}=tt({queryKey:me.current(),queryFn:()=>e.getConfig(),staleTime:rt}),r=((x=n==null?void 0:n.tours)==null?void 0:x.seen)??[],o=((k=n==null?void 0:n.tours)==null?void 0:k.declined)??[],s=F(h=>h.runningTourId),i=F(h=>h.activeIndex),a=F(h=>h.pendingOfferId),c=F(h=>h.startTour),u=F(h=>h.advanceStep),l=F(h=>h.endTour),f=F(h=>h.setPendingOffer),v=F(h=>h.clearPendingOffer),g=nt({mutationFn:h=>e.updateConfig({tours:h}),onSuccess:()=>t.invalidateQueries({queryKey:me.all}),meta:{errorLabel:"Couldn’t save your tour progress"}});function _(h){r.includes(h)||g.mutate({seen:[...r,h]})}function O(h){o.includes(h)||g.mutate({declined:[...o,h]})}function y(h){return r.includes(h)||o.includes(h)}function p(h){_(h),c(h)}function E(h){O(h),v()}return{seen:r,declined:o,isSuppressed:y,runningDefinition:s?de[s]:null,activeIndex:i,pendingOffer:a?de[a]:null,pendingOfferId:a,runTour:c,acceptOffer:p,declineOffer:E,setPendingOffer:f,advanceStep:u,endTour:l}}const Nn=1,jn=1,$n=2;function zn(){const{isSuppressed:e,setPendingOffer:t,pendingOfferId:n,runningDefinition:r}=Fe(),o=ot(y=>Object.values(y.statuses).some(p=>p.lifecycle==="streaming")),s=ut(),i=it(),{data:a}=st(i),{data:c}=ft(s),{data:u}=at(),l=a==null?void 0:a.length,f=s&&c?c.reduce((y,p)=>y+p.instances.length,0):void 0,v=u==null?void 0:u.agents.length,g=d.useRef(void 0),_=d.useRef(void 0),O=d.useRef(void 0);d.useEffect(()=>{const y=(E,x,k,h,T)=>{if(x===void 0)return T;const M=h.current;return M===void 0||!(M<k&&x>=k)?(h.current=x,T):o||T||(h.current=x,e(E))?T:(t(E),!0)};let p=n!==null||r!==null;p=y("tasks",l,Nn,g,p),p=y("relay",f,jn,_,p),y("mesh",v,$n,O,p)},[l,f,v,o,n,r,e,t])}function Bn(){zn();const{runningDefinition:e,activeIndex:t,advanceStep:n,endTour:r,runTour:o}=Fe(),s=lt(),i=ct({select:l=>l.location.pathname}),a=ge(l=>l.requestedTour),c=ge(l=>l.clearRequestedTour),u=(e==null?void 0:e.id)??null;return d.useEffect(()=>{if(a!==null){if(!(a in de)){c();return}if(u===a){c();return}o(a)}},[a,u,o,c]),d.useEffect(()=>{if(!e)return;const{to:l}=e.deepLink;i!==l&&s({to:l})},[e,i,s]),e?L.jsx(Hn,{steps:e.steps,activeIndex:t,onAdvance:n,onEnd:r}):null}export{Se as D,de as T,Bn as a,zn as b,Fe as u};
|