dorkos 0.124.0 → 0.124.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/cli.js +935 -551
- package/dist/browser/native/package-manifest.json +1 -1
- package/dist/browser/source-manifest.json +1 -1
- package/dist/client/assets/{AboutPage-BH8Ndn3e.js → AboutPage-DHaZvsJE.js} +1 -1
- package/dist/client/assets/{ActivityErrorState-K5Mew9EX.js → ActivityErrorState-BP-qFk2S.js} +1 -1
- package/dist/client/assets/{ActivityPage-BB20L5HU.js → ActivityPage-Bme3TzdQ.js} +1 -1
- package/dist/client/assets/{ActivityRow-C5O7rnmS.js → ActivityRow-BRZyW9MA.js} +1 -1
- package/dist/client/assets/{AdapterIcon-Bmybvrzb.js → AdapterIcon-BcfquTja.js} +1 -1
- package/dist/client/assets/{AdapterSetupWizard-CkdV7Hhh.js → AdapterSetupWizard-B4I23pBg.js} +1 -1
- package/dist/client/assets/{AgentOptionRow-BA2cDa7r.js → AgentOptionRow-Cb34LtmH.js} +1 -1
- package/dist/client/assets/{AgentPicker-CsIIPGZJ.js → AgentPicker-ouNRFSDh.js} +1 -1
- package/dist/client/assets/{AgentRequestCard-0fOxvaoe.js → AgentRequestCard-B6MHIsxa.js} +2 -2
- package/dist/client/assets/{AppearancePage-XOjkkoli.js → AppearancePage-CutehigK.js} +1 -1
- package/dist/client/assets/ApplyToOverridesDialog-B-wIUI27.js +1 -0
- package/dist/client/assets/{AttentionSignalRow-CjjZobp7.js → AttentionSignalRow-B1aMjgX_.js} +1 -1
- package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-9TVHyRPJ.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-CdWF4WLz.js} +1 -1
- package/dist/client/assets/{BindingDialog-DLoAQauL.js → BindingDialog-BAdueON5.js} +1 -1
- package/dist/client/assets/{BlintzCanvas-CYHsXAcY.js → BlintzCanvas-b30dG4gx.js} +3 -3
- package/dist/client/assets/{CanvasCsvContent--Gr7Fe_U.js → CanvasCsvContent-DGHgSikG.js} +1 -1
- package/dist/client/assets/{CanvasFileContent-estXyAbr.js → CanvasFileContent-D1bFaUeh.js} +2 -2
- package/dist/client/assets/{CanvasModel3dContent-CkOo930M.js → CanvasModel3dContent-dST7g1v2.js} +2 -2
- package/dist/client/assets/{ChatAppsOff-D4L1zJVN.js → ChatAppsOff-DiObvmJS.js} +1 -1
- package/dist/client/assets/{CodeMirrorDiff-DY_6ju-z.js → CodeMirrorDiff-BncI1OY1.js} +1 -1
- package/dist/client/assets/{CodeMirrorEditor-BUoDBsBv.js → CodeMirrorEditor-DV6psv19.js} +1 -1
- package/dist/client/assets/{CommitmentList-wDkcVP9c.js → CommitmentList-Dx_Ek_Gl.js} +1 -1
- package/dist/client/assets/{CommitmentsPage-CzSM6b8R.js → CommitmentsPage-Bca8NMUa.js} +1 -1
- package/dist/client/assets/{ComputerResourceView-cERD9H2L.js → ComputerResourceView-DNVNFTdn.js} +1 -1
- package/dist/client/assets/{ComputerViewer-rMcfbk2_.js → ComputerViewer-D8SxJdMm.js} +1 -1
- package/dist/client/assets/{ConnectionAccessLists-f7QeQbQo.js → ConnectionAccessLists-Bhj1YT15.js} +1 -1
- package/dist/client/assets/{ConnectionsPage-BmjtA6pw.js → ConnectionsPage-B20JZxoK.js} +1 -1
- package/dist/client/assets/{ConventionPage-CH-ah6nI.js → ConventionPage-De645wxU.js} +1 -1
- package/dist/client/assets/{ExtensionPageRoute-CJIxa6ST.js → ExtensionPageRoute-nTeiOBRQ.js} +1 -1
- package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-BP7EJ2JL.js → FloatingTanStackRouterDevtools-CqogiFob-DM79UITv.js} +1 -1
- package/dist/client/assets/HandlePage-B08V-om7.js +1 -0
- package/dist/client/assets/{HeartbeatPage-BUsf-qrU.js → HeartbeatPage-CBoUxz6t.js} +1 -1
- package/dist/client/assets/{KeyEntry-C2kWdN8q.js → KeyEntry-Cug8ocpX.js} +1 -1
- package/dist/client/assets/{LexicalField-CR8ulsI_.js → LexicalField-Bv_ogmAq.js} +1 -1
- package/dist/client/assets/{ManagesPage-DTtsIOGi.js → ManagesPage-DfJBQKK3.js} +1 -1
- package/dist/client/assets/{Marketplace-iaV5XAzv.js → Marketplace-swCVUbdY.js} +2 -2
- package/dist/client/assets/{MarketplaceSourcesView-6tgzUfFj.js → MarketplaceSourcesView-CDZDChpV.js} +1 -1
- package/dist/client/assets/{McpAppFrame-C7eYYdI9.js → McpAppFrame-BM9cNPPd.js} +1 -1
- package/dist/client/assets/{McpSigninBody-BDyGbJ7I.js → McpSigninBody-DKyUKrEE.js} +1 -1
- package/dist/client/assets/{Model3dViewer-BujDNuVS.js → Model3dViewer-rXSL5y2P.js} +1 -1
- package/dist/client/assets/NamePage-JwMDK1JD.js +1 -0
- package/dist/client/assets/{NewDirectMessageMenu-D4e-z2Jt.js → NewDirectMessageMenu-GCEMS5oV.js} +1 -1
- package/dist/client/assets/{NotificationsPage-CkDeTaJp.js → NotificationsPage-DSWsOVLa.js} +1 -1
- package/dist/client/assets/{OpenMeshSwitch-CtbOt3r5.js → OpenMeshSwitch-BTuctDj4.js} +1 -1
- package/dist/client/assets/{OperatorIdentityForm-Vr4qZnmM.js → OperatorIdentityForm-ODDMd2YN.js} +1 -1
- package/dist/client/assets/PermissionHistory-41a58Se7.js +1 -0
- package/dist/client/assets/{PermissionsPage-f4QaX8oM.js → PermissionsPage-DefmymZ6.js} +1 -1
- package/dist/client/assets/{PersonalityPopover-BkZruwF-.js → PersonalityPopover-7zPVBI1I.js} +1 -1
- package/dist/client/assets/PhotoPage-DlOVhkW9.js +1 -0
- package/dist/client/assets/{PreviewRefusedNotice-BXC2K0tx.js → PreviewRefusedNotice-CwGlBJ7U.js} +1 -1
- package/dist/client/assets/{ProfileFields-BebX5oiv.js → ProfileFields-DVMkpJSb.js} +1 -1
- package/dist/client/assets/{ProfilePanelContainer-DZoL65zQ.js → ProfilePanelContainer-RrhoPD3T.js} +1 -1
- package/dist/client/assets/{ProfileRolePicker-D9H7wsuT.js → ProfileRolePicker-CXRVBCAu.js} +1 -1
- package/dist/client/assets/{PromptSuggestionChips-B5fDmc-g.js → PromptSuggestionChips-bBroJdTi.js} +1 -1
- package/dist/client/assets/{ReportsToPopover-uVYhSqj7.js → ReportsToPopover-CfPatsWM.js} +1 -1
- package/dist/client/assets/{RoomSurface-Bg5WV4Ep.js → RoomSurface-CdgCdV6h.js} +11 -11
- package/dist/client/assets/{RoomsPage-yflYFulU.js → RoomsPage-C3dDp1Mb.js} +1 -1
- package/dist/client/assets/{RunsOnPopover-DtGrX1Vq.js → RunsOnPopover-BcKjfQi-.js} +1 -1
- package/dist/client/assets/{RuntimeConnectFlow-DjReuQ-T.js → RuntimeConnectFlow-DCIRnvOH.js} +1 -1
- package/dist/client/assets/{RuntimeSetupDialog-Cr4GRi8c.js → RuntimeSetupDialog-Bg-0b-LC.js} +1 -1
- package/dist/client/assets/SeenDevices-nMsGUQTv.js +19 -0
- package/dist/client/assets/{SessionsPage-BWu-en78.js → SessionsPage-Cqfx4FGW.js} +1 -1
- package/dist/client/assets/SettingsDialog-C8r2igJ_.js +12 -0
- package/dist/client/assets/{SkillsPage-BdUb9SZy.js → SkillsPage-BleHQavF.js} +1 -1
- package/dist/client/assets/{TaskDialogWrapper-qYJPEoSR.js → TaskDialogWrapper-BhTEvf-u.js} +1 -1
- package/dist/client/assets/{TasksEmptyState-Bgcg9vxF.js → TasksEmptyState-Bprx1k8M.js} +2 -2
- package/dist/client/assets/{TasksPage-Ch5W2WQS.js → TasksPage-Dub39yEJ.js} +1 -1
- package/dist/client/assets/{TeamComputerEntry-CPwSIMRw.js → TeamComputerEntry-CJ-NG0u5.js} +1 -1
- package/dist/client/assets/ToolsPage-IsD6M-ZW.js +2 -0
- package/dist/client/assets/{TopologyGraph-I4_mkMHM.js → TopologyGraph-CwyasvFI.js} +14 -14
- package/dist/client/assets/{TourHost-BPaSwh9I.js → TourHost-BYfztuPb.js} +1 -1
- package/dist/client/assets/{UnlinkDialog-BUWZUu5P.js → UnlinkDialog-BKhgxVdF.js} +1 -1
- package/dist/client/assets/{WidgetErrorCard-cS8yMCxU.js → WidgetErrorCard-1NyzIJBj.js} +6 -6
- package/dist/client/assets/_shell-Ct2Bz7D0.js +80 -0
- package/dist/client/assets/{_shell._home-DCA5k-jb.js → _shell._home-xWj7wO5z.js} +1 -1
- package/dist/client/assets/{_shell._home.activity-BX4nFLna.js → _shell._home.activity-BqcLoaB1.js} +1 -1
- package/dist/client/assets/{_shell._home.index-C8t8cw72.js → _shell._home.index-D4sQsKKk.js} +1 -1
- package/dist/client/assets/{_shell._home.tasks-BgUeEvhK.js → _shell._home.tasks--UhQB6h3.js} +1 -1
- package/dist/client/assets/{_shell._home.workspaces-BPBdnkRt.js → _shell._home.workspaces-BPFD8Of2.js} +1 -1
- package/dist/client/assets/{_shell.channels-CX4kki7G.js → _shell.channels-CnFdvRzc.js} +4 -4
- package/dist/client/assets/{_shell.connections-0vP7g7E4.js → _shell.connections-Ik01wS5M.js} +1 -1
- package/dist/client/assets/{_shell.feedback-requests-TsuaO4eR.js → _shell.feedback-requests-Czu42kzo.js} +1 -1
- package/dist/client/assets/_shell.marketplace-Cezv-i16.js +1 -0
- package/dist/client/assets/_shell.marketplace_.sources-BTENmr4W.js +1 -0
- package/dist/client/assets/_shell.session-BjevHF_O.js +63 -0
- package/dist/client/assets/{_shell.team-Bm6cOBhR.js → _shell.team-UfaJqohh.js} +3 -3
- package/dist/client/assets/_shell.x._extensionId-0OO_Xr72.js +1 -0
- package/dist/client/assets/_shell.x._extensionId_._-0OO_Xr72.js +1 -0
- package/dist/client/assets/{abnfDiagram-WEYOIA3C-CrvoN15x.js → abnfDiagram-WEYOIA3C-oxkfGyl6.js} +1 -1
- package/dist/client/assets/{access-copy-B3yNZ7Gz.js → access-copy-Dggxx2cX.js} +1 -1
- package/dist/client/assets/{arc-CuT6QA_y.js → arc-CqQdP0Qe.js} +1 -1
- package/dist/client/assets/{architectureDiagram-ZHVYKT53-CPXCZ9H4.js → architectureDiagram-ZHVYKT53-89xM7zJD.js} +1 -1
- package/dist/client/assets/{banner-DRumuw3F.js → banner-DqJ2pM0Y.js} +1 -1
- package/dist/client/assets/{blockDiagram-RJAE7QA3-CM0rka9p.js → blockDiagram-RJAE7QA3-CcxwDmZC.js} +1 -1
- package/dist/client/assets/{c4Diagram-XDPPPE54-D4j2cXRy.js → c4Diagram-XDPPPE54-DCIhIyXa.js} +1 -1
- package/dist/client/assets/{card-B3CtfC3R.js → card-DT-vFAns.js} +1 -1
- package/dist/client/assets/channel-Ngk70nQZ.js +1 -0
- package/dist/client/assets/{chunk-2E7WHVMD-KGyqhVpO.js → chunk-2E7WHVMD-BfWEXcCj.js} +1 -1
- package/dist/client/assets/{chunk-2Q5K7J3B-Dl0BHoqK.js → chunk-2Q5K7J3B-KLXLZXlR.js} +1 -1
- package/dist/client/assets/{chunk-4EMNKR2T-Da7vH6Kv.js → chunk-4EMNKR2T-CL5Gttmj.js} +1 -1
- package/dist/client/assets/{chunk-55XCU76K-DgBUEROO.js → chunk-55XCU76K-cfAl84Mv.js} +1 -1
- package/dist/client/assets/{chunk-5VM5RSS4-BQ4mn-_I.js → chunk-5VM5RSS4-BqUyGgoH.js} +1 -1
- package/dist/client/assets/{chunk-JWPE2WC7-8LPR3mXf.js → chunk-JWPE2WC7-BWr2ST9i.js} +1 -1
- package/dist/client/assets/{chunk-VQ5W62QI-BkIVXi4W.js → chunk-VQ5W62QI-V5zYx50O.js} +1 -1
- package/dist/client/assets/{chunk-XXDRQBXY-DQXJx06h.js → chunk-XXDRQBXY-gnvheN_J.js} +1 -1
- package/dist/client/assets/{chunk-ZCHMQSOR-DzCE7qlD.js → chunk-ZCHMQSOR-ClGxxZvV.js} +2 -2
- package/dist/client/assets/{classDiagram-v2-4MYWR3UA-C_cZra7c.js → classDiagram-v2-4MYWR3UA-DvmHzDb5.js} +1 -1
- package/dist/client/assets/{command-CDKbyppr.js → command-CNx4L11m.js} +1 -1
- package/dist/client/assets/{cose-bilkent-JH36ORCC-DlXHdGwT.js → cose-bilkent-JH36ORCC-Df8nXBRj.js} +1 -1
- package/dist/client/assets/{cpu-B7xLO7jn.js → cpu-D8KJEkdh.js} +1 -1
- package/dist/client/assets/{cynefin-EF2NZ3EQ-HhP4ArLc.js → cynefin-EF2NZ3EQ-CAn6ufHs.js} +1 -1
- package/dist/client/assets/{cynefinDiagram-WF24UDRP-D4GgWnZV.js → cynefinDiagram-WF24UDRP-Cep_NrRw.js} +1 -1
- package/dist/client/assets/{dagre-NK4GIZVX-SZ_OI2Zi.js → dagre-NK4GIZVX-sWD3z9wf.js} +1 -1
- package/dist/client/assets/{diagram-CBK3MWTC-BN-_Ja5m.js → diagram-CBK3MWTC-CUpaBATr.js} +1 -1
- package/dist/client/assets/{diagram-I5XIIV2D-t7AK6xnL.js → diagram-I5XIIV2D-BejWB2ry.js} +1 -1
- package/dist/client/assets/{diagram-ODIL2UCW-C1V7szSc.js → diagram-ODIL2UCW-BGKJfNk9.js} +1 -1
- package/dist/client/assets/{diagram-PFBEJUXE-DPtraQ2g.js → diagram-PFBEJUXE-V0dP8H8k.js} +1 -1
- package/dist/client/assets/{diagram-RJA3I4VV-D2XNRB2b.js → diagram-RJA3I4VV-Bf5dVsFX.js} +1 -1
- package/dist/client/assets/{diagram-TYUNFSNR-BieaRy38.js → diagram-TYUNFSNR-CLrMSqb4.js} +1 -1
- package/dist/client/assets/{ebnfDiagram-V4P3TTPT-Bwki86UY.js → ebnfDiagram-V4P3TTPT-BGG4CWA0.js} +1 -1
- package/dist/client/assets/{elk-QONTBCTQ-WEXSAyHB.js → elk-QONTBCTQ-bf9D6f0w.js} +1 -1
- package/dist/client/assets/{empty-state-J-UJ0BUU.js → empty-state-CDoXnrKn.js} +1 -1
- package/dist/client/assets/{erDiagram-KYQIGQAA-DIKASnoc.js → erDiagram-KYQIGQAA-fEUv-33P.js} +1 -1
- package/dist/client/assets/{execution-config-ILQiJAmy.js → execution-config-Ca9MDOtV.js} +1 -1
- package/dist/client/assets/{file-D40js1Zx.js → file-CiyVL55_.js} +1 -1
- package/dist/client/assets/{file-exclamation-point-Dg3ZpiAe.js → file-exclamation-point-DaFRIKco.js} +1 -1
- package/dist/client/assets/{file-text-DgdvRfMk.js → file-text-DsnD-A8g.js} +1 -1
- package/dist/client/assets/{find-latest-widget-fence-D4kBWC_1.js → find-latest-widget-fence-CNsnCgbB.js} +1 -1
- package/dist/client/assets/{flowDiagram-IUGLLWBU-CoavNw0M.js → flowDiagram-IUGLLWBU-CRbeSDod.js} +1 -1
- package/dist/client/assets/{form-DlPwEgQH.js → form-Cru78aT-.js} +1 -1
- package/dist/client/assets/{format-cron-BrK8RzgT.js → format-cron-9K38-tn1.js} +1 -1
- package/dist/client/assets/{ganttDiagram-R7GPNTJY-DccKAz7f.js → ganttDiagram-R7GPNTJY-Mkk7zgs_.js} +1 -1
- package/dist/client/assets/{git-branch-BpxhecMq.js → git-branch-CONwEYiR.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PDYL7XHY-DEbo_dgQ.js → gitGraphDiagram-PDYL7XHY-Drre0vyA.js} +1 -1
- package/dist/client/assets/{graph-DROgI3M3.js → graph-BJlnKWgo.js} +1 -1
- package/dist/client/assets/{heart-c7u4Ezxt.js → heart-CqwUlIUG.js} +1 -1
- package/dist/client/assets/{highlighted-body-KPVGNVTW-CrATNdTR.js → highlighted-body-KPVGNVTW-e4LXC_pS.js} +1 -1
- package/dist/client/assets/{image-lightbox-DE_fHkw-.js → image-lightbox-DHDtzoja.js} +1 -1
- package/dist/client/assets/{image-off-BExgZjfM.js → image-off-DZuLkaRJ.js} +1 -1
- package/dist/client/assets/{index-D0eJtRlK.js → index-1yEXEZiH.js} +1 -1
- package/dist/client/assets/{index-Be0OJLWK.js → index-A41zxoWk.js} +1 -1
- package/dist/client/assets/{index-DeRDq7bD.js → index-B25gvCK_.js} +1 -1
- package/dist/client/assets/index-B9bZYNKR.js +1 -0
- package/dist/client/assets/{index-DaZ1I8s-.js → index-BBmkfbXd.js} +1 -1
- package/dist/client/assets/{index-DNGNMW3c.js → index-BDD2EyoW.js} +1 -1
- package/dist/client/assets/{index-Ccf1XBTs.js → index-BFNy-Yp3.js} +1 -1
- package/dist/client/assets/{index-DksjixUS.js → index-BIB-maE5.js} +1 -1
- package/dist/client/assets/{index-CbHCZsbE.js → index-BKp2B9JS.js} +1 -1
- package/dist/client/assets/{index-DCJQGDZk.js → index-BLP5O7X9.js} +1 -1
- package/dist/client/assets/{index-DhHobJd3.js → index-BTjZIgFn.js} +1 -1
- package/dist/client/assets/{index-BVqSmajJ.js → index-BV2Ezdxv.js} +1 -1
- package/dist/client/assets/{index-C7B3eSOP.js → index-B_0LYi32.js} +1 -1
- package/dist/client/assets/{index-DDgOoXP1.js → index-Bd7vUYhr.js} +1 -1
- package/dist/client/assets/{index-BlyoyIck.js → index-Bo7x9IkO.js} +1 -1
- package/dist/client/assets/{index-D150FXCC.js → index-BtDxwJsM.js} +1 -1
- package/dist/client/assets/{index-DswGXheF.js → index-By58MgcZ.js} +1 -1
- package/dist/client/assets/index-C3cvP8Fo.js +1033 -0
- package/dist/client/assets/{index-C5or4L_3.js → index-CVuEUzi5.js} +1 -1
- package/dist/client/assets/{index-BkoMsjtM.js → index-CoWJD3Jg.js} +2 -2
- package/dist/client/assets/{index-CqPRAM_6.js → index-CyVH876g.js} +1 -1
- package/dist/client/assets/{index-BGqvci3k.js → index-D67Kfy-M.js} +1 -1
- package/dist/client/assets/{index-D3YeRrne.js → index-DAlpmAIA.js} +1 -1
- package/dist/client/assets/{index-BEkYBuOq.js → index-DDNwNOHF.js} +1 -1
- package/dist/client/assets/{index-CD8aw6Jb.js → index-DL8ISRMH.js} +1 -1
- package/dist/client/assets/{index-AzyLwYS_.js → index-DabU6r9W.js} +3 -3
- package/dist/client/assets/{index-CT_pFeX_.js → index-DdJBZE0H.js} +1 -1
- package/dist/client/assets/{index-B3eeEDWj.js → index-DijWcSDZ.js} +1 -1
- package/dist/client/assets/index-DyRGZyur.css +1 -0
- package/dist/client/assets/{index-DINk1YfD.js → index-DzwZJuO1.js} +1 -1
- package/dist/client/assets/{index-CZmqtJWZ.js → index-HR8BYVRQ.js} +1 -1
- package/dist/client/assets/{index-J3Hh1MnL.js → index-LEcodwyW.js} +1 -1
- package/dist/client/assets/index-UPF8suf2.js +1 -0
- package/dist/client/assets/{index-DT7pv2iW.js → index-Vz7VUm9l.js} +1 -1
- package/dist/client/assets/index-YW-v746p.js +1 -0
- package/dist/client/assets/{index-2wezsLA_.js → index-cI2u8WZS.js} +1 -1
- package/dist/client/assets/{index-InEBtYxw.js → index-iTQUa_b2.js} +6 -6
- package/dist/client/assets/{index-CYy1cjtq.js → index-mZqojApH.js} +1 -1
- package/dist/client/assets/{index-dyAahqKe.js → index-pVFjKNjX.js} +1 -1
- package/dist/client/assets/{index-DxiRRZRo.js → index-skAhJyIF.js} +1 -1
- package/dist/client/assets/{index-BizvylBV.js → index-vJy88bwb.js} +1 -1
- package/dist/client/assets/index-wY5OcS4a.js +43 -0
- package/dist/client/assets/{index-mwf7ZNk2.js → index-x1yAu9zJ.js} +1 -1
- package/dist/client/assets/{index-F-vqXYqa.js → index-xAgihCJ7.js} +1 -1
- package/dist/client/assets/{index.esm-BFJ9SG0n.js → index.esm-BUPoRUaG.js} +1 -1
- package/dist/client/assets/{infoDiagram-MVDRKAX5-VL8q5pKx.js → infoDiagram-MVDRKAX5-B_Wyzufh.js} +1 -1
- package/dist/client/assets/{inline-code-BE9ckzPs.js → inline-code-BIzGDx6z.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-HPEHV2GE-BLKkPYF-.js → ishikawaDiagram-HPEHV2GE-BDk2-6Pd.js} +1 -1
- package/dist/client/assets/{journeyDiagram-BOSHW7O7-CSYpRobu.js → journeyDiagram-BOSHW7O7-7qf9KWEQ.js} +1 -1
- package/dist/client/assets/{kanban-definition-FNSA4HC5-HilAqtZo.js → kanban-definition-FNSA4HC5-CFYDQmXn.js} +1 -1
- package/dist/client/assets/{layers-Cm7coqdo.js → layers-C9tVVcXg.js} +1 -1
- package/dist/client/assets/{lightbulb-DqdWS75d.js → lightbulb-f4jtsAh0.js} +1 -1
- package/dist/client/assets/{link-2-CDJapTSa.js → link-2-ZNlK1BG1.js} +1 -1
- package/dist/client/assets/{list-runtime-types-CP82p1u4.js → list-runtime-types-CqO-QFYD.js} +1 -1
- package/dist/client/assets/{markdown-content-m_qereFc.js → markdown-content-DaEVxezf.js} +1 -1
- package/dist/client/assets/{mention-pill-DV5HIG5Q.js → mention-pill-BiCPflY-.js} +1 -1
- package/dist/client/assets/{mermaid.core-zxW6MBr-.js → mermaid.core-SX8SzrsU.js} +4 -4
- package/dist/client/assets/{message-square-off-YVtpbaJ0.js → message-square-off-_qbedNGF.js} +1 -1
- package/dist/client/assets/{mindmap-definition-6OY57UG3-IAYemvOg.js → mindmap-definition-6OY57UG3-BloJIArH.js} +1 -1
- package/dist/client/assets/{more-details-ReA2ZFBn.js → more-details-CdJT0Ehl.js} +1 -1
- package/dist/client/assets/{owner-notice-M4hn_1ep.js → owner-notice-BDafFD_I.js} +1 -1
- package/dist/client/assets/{package-CUuTl39E.js → package-Cb7lEm7t.js} +1 -1
- package/dist/client/assets/{page-container-BnmNikNZ.js → page-container-DsRgIMAL.js} +1 -1
- package/dist/client/assets/{paperclip-C6fYq5Zf.js → paperclip-DNu1VtoX.js} +1 -1
- package/dist/client/assets/{path-input-DHn9-XaE.js → path-input-D3O71b-X.js} +1 -1
- package/dist/client/assets/{pegDiagram-ECIUJNBX-CojaUwe7.js → pegDiagram-ECIUJNBX-Di48kPNu.js} +1 -1
- package/dist/client/assets/{pieDiagram-GNMPY74T-CjP3pw6V.js → pieDiagram-GNMPY74T-DY8B_SPD.js} +1 -1
- package/dist/client/assets/{plug-DHQcxt7N.js → plug-IIS_cL9-.js} +1 -1
- package/dist/client/assets/{primer-trigger-BmV5wjek.js → primer-trigger-DurKYe8C.js} +2 -2
- package/dist/client/assets/{profile-errors-BSCuj3rT.js → profile-errors-BdhZfdvZ.js} +1 -1
- package/dist/client/assets/{progress-4FQQfnS6.js → progress-g5kkqvlR.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-D57K4MC3-OP0Z8zcR.js → quadrantDiagram-D57K4MC3-Depv_dON.js} +1 -1
- package/dist/client/assets/{query-error-state-BkUdxenP.js → query-error-state-PuLGD7Jp.js} +1 -1
- package/dist/client/assets/{radio-ta5Bw763.js → radio-QOLZSBz1.js} +1 -1
- package/dist/client/assets/{railroadDiagram-Y72NRBL7-CT3NCb9b.js → railroadDiagram-Y72NRBL7-BfD2AiZM.js} +1 -1
- package/dist/client/assets/registry-Ck8p6n1T.js +1 -0
- package/dist/client/assets/{relay-trace-schemas-DwUuyxao.js → relay-trace-schemas-DF_DfZ7s.js} +1 -1
- package/dist/client/assets/{requirementDiagram-EQYSW5RA-tde4lYGp.js → requirementDiagram-EQYSW5RA-B1iTjrkD.js} +1 -1
- package/dist/client/assets/{room-files-source-CZWhaaOy.js → room-files-source-g1th8mWs.js} +2 -2
- package/dist/client/assets/{rotate-ccw-clock-RfbbgUa4.js → rotate-ccw-clock-BGwYMaGL.js} +1 -1
- package/dist/client/assets/{rotate-cw-B3rB_YSw.js → rotate-cw-B4Y0q4GY.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-SY24JHO5-sdCzIA7-.js → sankeyDiagram-SY24JHO5-D5TzVJrQ.js} +1 -1
- package/dist/client/assets/{scroll-area-B4WB7Q40.js → scroll-area-BvScZKSa.js} +1 -1
- package/dist/client/assets/{search-x-DCUmWW2_.js → search-x-CqN5twBj.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-BLEHNHQU-DvzTJcKu.js → sequenceDiagram-BLEHNHQU-BhUahaNf.js} +1 -1
- package/dist/client/assets/{shield-x-CANziVLc.js → shield-x-DHJrwtKp.js} +1 -1
- package/dist/client/assets/signed-in-BmywDpR5.js +1 -0
- package/dist/client/assets/{sizeCapture-INFHLROL-DuDA7TKE.js → sizeCapture-INFHLROL-D2Vi1Kq9.js} +1 -1
- package/dist/client/assets/{soul-file-Co_8f1qw.js → soul-file-BMpVFN7U.js} +1 -1
- package/dist/client/assets/{stateDiagram-v2-A6IESKWZ-BJPX5JTC.js → stateDiagram-v2-A6IESKWZ-b9gSbZnF.js} +1 -1
- package/dist/client/assets/{swimlanes-B3ENRKFQ-CiLSffGv.js → swimlanes-B3ENRKFQ-i47jxLY6.js} +1 -1
- package/dist/client/assets/swimlanesDiagram-AYQRV4AK-CA9gW19w.js +8 -0
- package/dist/client/assets/{table-BSAvOYPp.js → table-CN2HCi4p.js} +1 -1
- package/dist/client/assets/{terminal-6CdY-T1V.js → terminal-BORQniao.js} +1 -1
- package/dist/client/assets/{timeline-definition-JXYKGLGB-5oq8sl82.js → timeline-definition-JXYKGLGB-eY5gj0js.js} +1 -1
- package/dist/client/assets/{trust-posture-D-Yjm6ot.js → trust-posture-Bcyy5Fub.js} +1 -1
- package/dist/client/assets/{unplug-Bq_1WdV7.js → unplug-lkD35Rwp.js} +1 -1
- package/dist/client/assets/{unverified-catalog-notice-CEzu54YH.js → unverified-catalog-notice-DiCIrrhU.js} +1 -1
- package/dist/client/assets/{use-adapter-catalog-Tn3ZbPAj.js → use-adapter-catalog-BrqVd-47.js} +1 -1
- package/dist/client/assets/{use-bindings-Bz9YRgO7.js → use-bindings-CU2RSXOy.js} +1 -1
- package/dist/client/assets/{use-composer-prefs-D9oKJSQN.js → use-composer-prefs-Dy2oTM8Y.js} +1 -1
- package/dist/client/assets/{use-connector-management-CLYFraXN.js → use-connector-management-5oRqzydY.js} +1 -1
- package/dist/client/assets/{use-deep-link-scroll-DkS713kG.js → use-deep-link-scroll-Bg5nW8qq.js} +1 -1
- package/dist/client/assets/{use-delete-binding-CukKpHBK.js → use-delete-binding-qeyRkvR1.js} +1 -1
- package/dist/client/assets/{use-dev-links-DQ32IcGe.js → use-dev-links-FY4J_PjA.js} +1 -1
- package/dist/client/assets/{use-external-adapter-catalog-D-FO_XW6.js → use-external-adapter-catalog-HiWFZZrW.js} +1 -1
- package/dist/client/assets/{use-full-activity-feed-BNxcyb1j.js → use-full-activity-feed-K1uk9Wya.js} +1 -1
- package/dist/client/assets/use-is-below-desktop-Cu_jKnft.js +1 -0
- package/dist/client/assets/use-is-hub-BX7ypNRJ.js +1 -0
- package/dist/client/assets/{use-jump-back-in-Bibj5tVk.js → use-jump-back-in-BjZ8EswV.js} +1 -1
- package/dist/client/assets/{use-local-browser-xg7WXAVK.js → use-local-browser-CTFiF0wf.js} +1 -1
- package/dist/client/assets/{use-mesh-topology-BgCSFw8s.js → use-mesh-topology-CafidaIH.js} +1 -1
- package/dist/client/assets/{use-mounted-ref-qRbdZfOU.js → use-mounted-ref-B38uSLCx.js} +1 -1
- package/dist/client/assets/{use-notification-prefs-B-4kZR7I.js → use-notification-prefs-m9XSNB6W.js} +1 -1
- package/dist/client/assets/{use-panel-tab-placements-CCq-mZlY.js → use-panel-tab-placements-D9n6rNJ1.js} +1 -1
- package/dist/client/assets/use-pending-read-BoV-UI1E.js +1 -0
- package/dist/client/assets/{use-personality-commit-DwSisUfF.js → use-personality-commit-ChLQfLrK.js} +1 -1
- package/dist/client/assets/{use-promo-activation-Botoso6l.js → use-promo-activation-DbJDgp4_.js} +1 -1
- package/dist/client/assets/{use-promo-dismissals-RJXp-r_J.js → use-promo-dismissals-Csw0j0N0.js} +1 -1
- package/dist/client/assets/{use-pulse-freshness-B3390hGg.js → use-pulse-freshness-BIZ7daHW.js} +1 -1
- package/dist/client/assets/{use-relay-config-BV0xcLwS.js → use-relay-config-hUB3lVFv.js} +1 -1
- package/dist/client/assets/{use-room-follow-claim-Du4hKHIJ.js → use-room-follow-claim-BpKzhniV.js} +1 -1
- package/dist/client/assets/{use-roving-tab-list-g2hO6Ruz.js → use-roving-tab-list-BtM0bZL7.js} +1 -1
- package/dist/client/assets/{use-session-canvas-i30oMO_Q.js → use-session-canvas-DRrkNRcL.js} +3 -3
- package/dist/client/assets/use-session-diagnostics-BTNgouum.js +16 -0
- package/dist/client/assets/{use-unclaimed-chats-B92om889.js → use-unclaimed-chats-BbMZtNG9.js} +1 -1
- package/dist/client/assets/use-update-config-CkWwKNkY.js +1 -0
- package/dist/client/assets/{useMutationState-DdOGdpjP.js → useMutationState-CVpvw27W.js} +1 -1
- package/dist/client/assets/{usecaseDiagram-WPOLBNNX-Di5pJvcw.js → usecaseDiagram-WPOLBNNX-CHcpeLg4.js} +1 -1
- package/dist/client/assets/{vennDiagram-Q3Y3IDCW-K7KAf26T.js → vennDiagram-Q3Y3IDCW-gQbZL_A6.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-IVAIDKWA-DVTaxQt9.js → wardleyDiagram-IVAIDKWA-BFH_WHzZ.js} +1 -1
- package/dist/client/assets/{xychartDiagram-4URNHDU4-x-lSJm_B.js → xychartDiagram-4URNHDU4-B0QpyqeZ.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/drizzle/20261019185620_dor3037_wifi_holds.sql +8 -0
- package/dist/drizzle/meta/20261019185620_snapshot.json +14079 -0
- package/dist/drizzle/meta/_journal.json +7 -0
- package/dist/server/extension-child.cjs +18 -2
- package/dist/server/index.js +55523 -26605
- package/dist/server/index.js.map +2 -2
- package/package.json +6 -6
- package/dist/client/assets/ApplyToOverridesDialog-CoO6V1G4.js +0 -1
- package/dist/client/assets/HandlePage-Cg8H3mQS.js +0 -1
- package/dist/client/assets/NamePage-Bx8T98OF.js +0 -1
- package/dist/client/assets/PermissionHistory-DzU1rf2B.js +0 -1
- package/dist/client/assets/PhotoPage-CmrOIRjf.js +0 -1
- package/dist/client/assets/SeenDevices-SPWkdzoK.js +0 -19
- package/dist/client/assets/SettingsDialog-_dEXUhHe.js +0 -12
- package/dist/client/assets/ToolsPage-Idimrn3o.js +0 -2
- package/dist/client/assets/_shell-ClVN2pUj.js +0 -80
- package/dist/client/assets/_shell.marketplace-CiL6YRbl.js +0 -1
- package/dist/client/assets/_shell.marketplace_.sources-C0sI8e21.js +0 -1
- package/dist/client/assets/_shell.session-_hhBvFc6.js +0 -63
- package/dist/client/assets/_shell.x._extensionId-BWy5v1YE.js +0 -1
- package/dist/client/assets/_shell.x._extensionId_._-BWy5v1YE.js +0 -1
- package/dist/client/assets/channel-DjBlTcCV.js +0 -1
- package/dist/client/assets/index-7jby-RRg.js +0 -1
- package/dist/client/assets/index-BqIHtiaE.js +0 -1
- package/dist/client/assets/index-Cga0qx1T.js +0 -1033
- package/dist/client/assets/index-Ct4At33X.js +0 -1
- package/dist/client/assets/index-DITPwUa9.js +0 -38
- package/dist/client/assets/index-DUZrTFYD.css +0 -1
- package/dist/client/assets/registry-Dc102rws.js +0 -1
- package/dist/client/assets/signed-in-DctJ2IWe.js +0 -1
- package/dist/client/assets/swimlanesDiagram-AYQRV4AK-Dv1-QS9J.js +0 -8
- package/dist/client/assets/use-is-below-desktop-gTvJDvw4.js +0 -1
- package/dist/client/assets/use-is-hub-B1vPpkYU.js +0 -1
- package/dist/client/assets/use-pending-read-C8L_v4Zw.js +0 -1
- package/dist/client/assets/use-session-diagnostics-a4b83F5J.js +0 -16
- package/dist/client/assets/use-update-config-Tbn3SodN.js +0 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{W as fe,as as ie,a1 as K,a3 as he,a4 as As,at as Ps,au as F,r as h,lk as Os,ll as es,lm as ss,ln as Ds,aW as se,hQ as ts,dw as xe,y as ge,a2 as Ne,h1 as Is,lo as Us,ij as ns,lp as Ls,dS as rs,lq as zs,lr as Ae,ls as $s,lt as Bs,a7 as Pe,gR as Fs,j as s,G as S,bx as je,ar as be,d$ as Gs,aR as Oe,lu as ue,lv as Ws,lw as Hs,iu as is,lx as Qs,la as qs,bL as ye,gQ as Ks,hS as as,cu as H,gY as Xs,ly as Vs,lz as Ys,gW as Js,lA as q,cO as D,cP as I,cQ as U,by as ve,bz as Te,bA as Se,bC as ke,g_ as Zs,aN as os,gX as et,lB as De,lC as st,lg as tt,eT as ls,eU as nt,eV as cs,lD as rt,lE as G,lF as it,b8 as at,B as W,lG as ot,lH as lt,a9 as ct,lI as us,dv as ut,dT as dt,lJ as Ie,lK as mt,ix as pt,iy as ft,iA as ht,iB as xt,lL as gt,lM as Nt,iC as Ue,lN as jt,f as bt,dz as oe,jd as yt,hf as ds,lO as vt,lP as Tt,lQ as ms,lR as ps,lS as St,gc as kt,gd as Ct,ge as wt,gf as Et,_ as te,gg as Mt,gh as Rt,gi as _t,gj as At,e as Y,dB as fs,jY as Le,dl as Pt,I as Ot,jZ as Dt,jc as It,aS as hs,aO as Ce,c9 as Ut,dQ as ne,cb as le,lT as de,lU as xs,cc as gs,lV as Lt,lW as zt,lX as $t,lY as Bt,cd as Ft,lZ as Gt,bD as J,ce as Ns,l_ as Wt,ji as Ht,aq as Qt,eZ as qt,l$ as Kt,g$ as Xt,m0 as Vt,hK as Yt,iP as Jt,J as Zt,X as en,ad as sn,l6 as tn,g5 as nn,hO as rn,ed as an,hj as on,it as ln,$ as cn,eJ as un,m1 as dn,cr as mn,m2 as pn,m3 as fn,m4 as hn,m5 as xn,m6 as gn,m7 as Nn,m8 as jn}from"./index-C3cvP8Fo.js";import{G as Z}from"./git-branch-CONwEYiR.js";import{u as bn}from"./use-update-config-CkWwKNkY.js";import{s as yn}from"./settings-for-runtime-BoOa-ZFG.js";import{C as vn}from"./card-DT-vFAns.js";import{R as Tn,H as Sn,a as kn,b as Cn}from"./RuntimeSetupDialog-Bg-0b-LC.js";import{r as wn}from"./RuntimeConnectFlow-DCIRnvOH.js";import{U as ze}from"./unverified-catalog-notice-DiCIrrhU.js";import{L as En}from"./layers-C9tVVcXg.js";import{C as Mn,a as Rn}from"./cpu-D8KJEkdh.js";/**
|
|
2
|
+
* @license lucide-react v1.48.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const js={name:"chart-column",size:24,node:[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],aliases:["bar-chart-3"]};js.node;const _n=fe(js);/**
|
|
7
|
+
* @license lucide-react v1.48.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const bs={name:"clipboard-copy",size:24,node:[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]};bs.node;const An=fe(bs);/**
|
|
12
|
+
* @license lucide-react v1.48.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const ys={name:"wifi",size:24,node:[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]};ys.node;const Q=fe(ys);function Pn(e){return e.ambient===!0&&e.status!=="error"}function Ai(e){const t=[],n=[];for(const r of e)(r.ambient?n:t).push(r);return{shown:t,ambient:n}}function On(e){var t;return((t=e==null?void 0:e.ui)==null?void 0:t.statusBar)??Os}function Dn(){const{data:e}=ie();return On(e)}function In(){const e=K(),t=he(),n=As({mutationKey:Ps,mutationFn:i=>e.updateConfig({ui:{statusBar:{pins:[...i]}}}),onMutate:async i=>{await t.cancelQueries({queryKey:F.current()});const o=t.getQueryData(F.current());return t.setQueryData(F.current(),a=>a!=null&&a.ui?{...a,ui:{...a.ui,statusBar:{pins:[...i]}}}:a),{previous:o}},onError:(i,o,a)=>{a&&a.previous!==void 0&&t.setQueryData(F.current(),a.previous)},onSettled:()=>{t.invalidateQueries({queryKey:F.current()})}});return{setPins:h.useCallback(i=>n.mutate(i),[n]),isPending:n.isPending}}const Un=80,Ln=95,zn=70,vs=85;function $n(e){return e>=Ln?"critical":e>=Un?"warning":"ok"}function Ts(e,t){return e==null||e<=0||t==null||t<=0?null:Math.min(100,Math.round(e/t*100))}function Ss(e,t){return t?Math.round(t.percentage):e}function Bn(e){var n;const t=e.cacheStats;return!t||t.cacheReadTokens===0&&t.cacheCreationTokens===0?null:{cacheReadTokens:t.cacheReadTokens,cacheCreationTokens:t.cacheCreationTokens,contextTokens:(n=e.contextUsage)==null?void 0:n.totalTokens}}function Fn(e){var t,n;return e?{contextPercent:Ts((t=e.contextUsage)==null?void 0:t.totalTokens,(n=e.contextUsage)==null?void 0:n.maxTokens),costUsd:e.cost,model:e.model,cacheStatus:Bn(e),usage:e.usage}:{contextPercent:null,costUsd:null,model:null,cacheStatus:null,usage:null}}function ks(e,t,n){if(t)return"streaming";if(e===void 0)return n;switch(e){case"streaming":return"streaming";case"error":return"error";default:return"idle"}}function Pi(e,t){var n;return ks((n=e.status)==null?void 0:n.lifecycle,e.triggerPending,t)}function Gn(e){const t=es(e),n=ss(e),r=Ds(e);return ks(t,n,r)}function Wn(e,t){return e??t??"default"}function ee(e){return!e.isPending||e.fetchStatus==="idle"||e.fetchStatus==="paused"}const Hn=5e3;function Qn(e,t){const n=K(),r=se(j=>j.selectedCwd),{sessions:i,isAnswered:o,isLoading:a}=ts(),f=ie(),d=xe(),{data:p}=f,{data:l}=d,u=t??(l==null?void 0:l.defaultRuntime)??null,m=ge(u),T=e!==null&&o&&!i.some(j=>j.id===e),y=Ne({queryKey:ns.storedSettings(e),queryFn:()=>n.getStoredSessionSettings(e),staleTime:Hn,enabled:T,networkMode:"always"}),{data:c}=y;if(r===null)return{mode:void 0,settled:!1};if(a)return{mode:void 0,settled:!1};if(!T)return{mode:void 0,settled:!0};if(!ee(y)||!ee(f)||!ee(d))return{mode:void 0,settled:!1};if((c==null?void 0:c.permissionMode)!==void 0)return{mode:c.permissionMode,settled:!0};if(!u||!(m!=null&&m.permissionModes.supported))return{mode:void 0,settled:!0};const g=Is(p==null?void 0:p.executionDefaults,u);return{mode:Us(g,m.permissionModes),settled:!0}}function qn(e,t,n,r){var we,Ee;const i=K(),o=he(),a=se(b=>b.selectedCwd),f=Ls(e),d=(f==null?void 0:f.cwd)??a,p=se(b=>b.pendingAccount),{data:l}=rs({sessionId:e??void 0,runtime:r??void 0}),u=zs(e??""),m=Ae(b=>b.apply),T=Ae(b=>b.clear),y=$s(e),{data:c}=y,{sessions:g}=ts(),j=e===null?void 0:g.find(b=>b.id===e),C=Qn(e,r),P=((we=l==null?void 0:l.find(b=>b.isDefault))==null?void 0:we.value)??((Ee=l==null?void 0:l[0])==null?void 0:Ee.value)??"",R=Bs(e??""),w=!r||!(c!=null&&c.runtime)||c.runtime===r?c==null?void 0:c.model:void 0,k=R&&w===R.from?R.to:w,x=u.model??(n?t==null?void 0:t.model:null)??k??P,M=l==null?void 0:l.find(b=>b.value===x),O=(t==null?void 0:t.contextTokens)??(c==null?void 0:c.contextTokens)??null,E=(t==null?void 0:t.contextMaxTokens)??(M==null?void 0:M.contextWindow)??null,L=u.effort??(c==null?void 0:c.effort)??null,B=u.fastMode??(c==null?void 0:c.fastMode)??!1,z=u.permissionMode??(c==null?void 0:c.permissionMode)??(j==null?void 0:j.permissionMode)??C.mode,A=e===null||z!==void 0||ee(y)&&C.settled,N={permissionMode:Wn(u.permissionMode,z),permissionModeKnown:A,model:x,effort:L,fastMode:B,costUsd:(t==null?void 0:t.costUsd)??null,contextPercent:Ts(O,E),isStreaming:n,cwd:(c==null?void 0:c.cwd)??null},ae=h.useCallback(async b=>{if(!e)return;const Me={...b.model?{model:b.model}:{},...b.permissionMode?{permissionMode:b.permissionMode}:{},...b.effort?{effort:b.effort}:{},...b.fastMode!==void 0?{fastMode:b.fastMode}:{}};m(e,Me);const Re=(p==null?void 0:p.sessionId)===e?p.id:void 0,_s={...r?{runtime:r}:{},...Re?{account:Re}:{},...b};try{const{permissionModePendingUntilNextTurn:X,runtimeUnbound:V,..._e}=await i.updateSession(e,_s,d??void 0);return X&&Pe.warning("Saved · starts on your next message",{description:"The current reply keeps its old setting."}),o.setQueriesData({queryKey:ns.bySession(e)},$=>({...$,..._e,...b.model===void 0?{model:$==null?void 0:$.model}:{},...V?{runtime:$==null?void 0:$.runtime}:{}})),_e}catch(X){console.error("[useSessionStatus] updateSession failed for session",e,X),T(e,Me);const V=Fs(X);V&&Pe(V)}},[i,e,r,d,p,o,m,T]);return h.useEffect(()=>{if(!e)return;const b={};u.model!==void 0&&(c==null?void 0:c.model)===u.model&&(b.model=u.model),u.permissionMode!==void 0&&(c==null?void 0:c.permissionMode)===u.permissionMode&&(b.permissionMode=u.permissionMode),u.effort!==void 0&&(c==null?void 0:c.effort)===u.effort&&(b.effort=u.effort),u.fastMode!==void 0&&(c==null?void 0:c.fastMode)===u.fastMode&&(b.fastMode=u.fastMode),Object.keys(b).length>0&&T(e,b)},[e,c==null?void 0:c.model,c==null?void 0:c.permissionMode,c==null?void 0:c.effort,c==null?void 0:c.fastMode,u,T]),{...N,updateSession:ae}}function Kn(e){const t=K();return Ne({queryKey:["subagents",e??null],queryFn:()=>t.getSubagents({sessionId:e}),staleTime:1800*1e3})}const Xn={duration:.2,ease:[.4,0,.2,1]},Vn="pointer-coarse:[&_button]:py-3",Yn=1e3;function Oi({items:e,trailing:t,nameFirst:n}){const r=e.filter(o=>o.cluster==="left"),i=e.filter(o=>o.cluster==="right");return s.jsxs("div",{role:"toolbar","aria-label":"Chat status","aria-live":"polite","data-testid":"status-line",className:"text-muted-foreground flex items-center gap-2 overflow-hidden px-1 text-xs whitespace-nowrap pointer-coarse:min-h-11",children:[s.jsx($e,{items:r,className:S("flex-auto",n&&r.length>0?"min-w-10":"min-w-0"),style:n?{flexShrink:Yn}:void 0}),s.jsx($e,{items:i,className:"min-w-0 shrink"}),t!==void 0&&s.jsx("span",{className:"flex shrink-0 items-center",children:t})]})}const Jn=8;function Zn(e,t){return Jn**Math.max(0,t.indexOf(e.key))}function $e({items:e,className:t,style:n}){const r=[...e].sort((i,o)=>o.severity-i.severity).map(i=>i.key);return s.jsx("div",{className:S("flex items-center gap-2",t),style:n,children:s.jsx(je,{initial:!1,mode:"popLayout",children:e.map((i,o)=>s.jsxs(be.div,{"data-testid":`status-item-${i.key}`,"data-rigid":i.rigid?"true":void 0,"data-held":i.held?"true":void 0,"data-snug":i.snug?"true":void 0,layout:"position",initial:{opacity:0,scale:.8,filter:"blur(4px)"},animate:{opacity:1,scale:1,filter:"blur(0px)"},exit:{opacity:0,scale:.8,filter:"blur(4px)"},transition:Xn,style:i.rigid||i.held||i.snug?void 0:{flexShrink:Zn(i,r)},className:S("inline-flex items-center gap-2",i.rigid||i.held||i.snug?"shrink-0":"min-w-10",Vn),children:[o>0&&s.jsx(er,{}),i.node]},i.key))})})}function er(){return s.jsx("span",{className:"text-muted-foreground/30 shrink-0","aria-hidden":"true",children:"·"})}function Di({cwd:e}){const t=e.split("/").filter(Boolean).pop()??e;return s.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1",title:e,children:[s.jsx(Gs,{className:"size-(--size-icon-xs) shrink-0"}),s.jsx("span",{className:"truncate",children:t})]})}const sr=Object.freeze({state:"unknown"}),tr=Object.freeze({state:"no-repo"});function nr(e){const t=K();return Ne({queryKey:["git-status",e],queryFn:()=>t.getGitStatus(e??void 0),enabled:!!e,refetchInterval:Oe.GIT_STATUS_REFETCH_MS,refetchIntervalInBackground:!1,staleTime:Oe.GIT_STATUS_STALE_TIME_MS})}function rr(e){return!!e&&!("error"in e)}function ir(e){return e===void 0?sr:"error"in e?tr:{state:"repo",branch:e.branch,dirty:!e.clean}}function re(e){const t=e.trim(),n=Array.from(t);return n.length<=ue?t:`${n.slice(0,ue-1).join("").trimEnd()}…`}function ar(e){return e.replace(/\s*\([^()]*\)\s*$/,"").split("·")[0].trim()}function or(e,t){return re(lr(e,t))}function lr(e,t){const n=t.find(i=>i.value===e);if(n)return ar(n.displayName);const r=/claude-(\w+)-/.exec(e);return r?`${r[1].charAt(0).toUpperCase()}${r[1].slice(1)}`:e==="default"?"Default":Ws(e)??e}function Ii({data:e,workspace:t,compact:n}){if(!e)return null;if(!rr(e))return s.jsxs("span",{className:"text-muted-foreground/50 inline-flex min-w-0 items-center gap-1",title:"Not a git repository",children:[s.jsx(Z,{className:"size-(--size-icon-xs) shrink-0"}),s.jsx("span",{className:"truncate",children:"No repo"})]});const r=e.modified+e.staged+e.untracked,i=r===1?"1 change":`${r} changes`,o=[];if(e.modified>0&&o.push(`${e.modified} modified`),e.staged>0&&o.push(`${e.staged} staged`),e.untracked>0&&o.push(`${e.untracked} untracked`),e.conflicted>0&&o.push(`${e.conflicted} conflicted`),t){const f=Hs(t.portBase),d=[`${t.key} · ${t.projectKey}`,`${t.branch??e.branch} · ${t.provider}`,e.ahead>0?`↑${e.ahead}`:"",e.behind>0?`↓${e.behind}`:"",o.length>0?o.join(", "):"clean",`ports ${f.DORKOS_PORT} / ${f.VITE_PORT} / ${f.SITE_PORT}`,t.pinned?"pinned":""].filter(Boolean);return s.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1",title:d.join(" · "),children:[s.jsx(Z,{className:"size-(--size-icon-xs) shrink-0"}),s.jsx("span",{className:"max-w-[20ch] truncate font-medium",children:n?re(t.key):t.key}),!n&&s.jsxs("span",{className:"text-muted-foreground truncate",children:["· ",t.projectKey]}),t.pinned&&s.jsx(is,{className:"text-muted-foreground size-(--size-icon-xs) shrink-0"}),r>0&&(n?s.jsx(Be,{label:i}):s.jsxs("span",{className:"text-muted-foreground shrink-0",children:["· ",i]}))]})}const a=o.length>0?`${e.branch} · ${o.join(", ")}`:`${e.branch} · clean`;return s.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1",title:a,children:[s.jsx(Z,{className:"size-(--size-icon-xs) shrink-0"}),s.jsx("span",{className:"max-w-[25ch] truncate",children:n?re(e.branch):e.branch}),e.ahead>0&&s.jsxs("span",{className:"text-muted-foreground inline-flex shrink-0 items-center gap-0.5",children:[s.jsx(Qs,{className:"size-(--size-icon-xs)"}),e.ahead]}),e.behind>0&&s.jsxs("span",{className:"text-muted-foreground inline-flex shrink-0 items-center gap-0.5",children:[s.jsx(qs,{className:"size-(--size-icon-xs)"}),e.behind]}),r>0&&(n?s.jsx(Be,{label:i}):s.jsxs("span",{className:"text-muted-foreground shrink-0",children:["· ",i]}))]})}function Be({label:e}){return s.jsx("span",{role:"img","aria-label":e,title:e,className:"bg-muted-foreground/70 size-1 shrink-0 rounded-full"})}function cr({stop:e,onMakeDefault:t,onDismiss:n,pending:r,error:i,placement:o="inline"}){const a=o==="overlay";return a&&!e?null:s.jsx("div",{className:S("flex items-center px-1",a?"bg-background/95 pointer-events-auto absolute right-0 bottom-full left-0 z-20 mb-1 rounded-md py-0.5 backdrop-blur-sm":"min-h-5"),"data-testid":a?"make-default-slot-overlay":"make-default-slot",children:e&&s.jsxs("p",{role:"status","data-testid":"make-default-offer",className:S("animate-in fade-in-0 flex min-w-0 items-center gap-1.5 text-xs duration-200 motion-reduce:animate-none",i?"text-destructive":"text-muted-foreground"),children:[s.jsx("span",{className:"min-w-0 flex-1 truncate",children:i?s.jsxs(s.Fragment,{children:[s.jsx(ye,{className:"mr-1 inline size-3 shrink-0 align-[-2px]","aria-hidden":!0}),i]}):s.jsxs(s.Fragment,{children:["Start every new chat in ",Ks(e),"?"]})})," ",s.jsxs("span",{className:"flex shrink-0 items-center gap-1 whitespace-nowrap",children:[i?s.jsx("button",{type:"button",disabled:r,onClick:t,"data-testid":"make-default-retry",className:"focus-ring text-foreground rounded-sm underline underline-offset-2 disabled:opacity-50",children:"Try again"}):s.jsx("button",{type:"button",disabled:r,onClick:t,"data-testid":"make-default-confirm",className:"focus-ring text-foreground rounded-sm underline underline-offset-2 disabled:opacity-50",children:"Make default"}),s.jsx("span",{"aria-hidden":!0,children:"·"}),s.jsx("button",{type:"button",onClick:n,"data-testid":"make-default-dismiss",className:"focus-ring hover:text-foreground rounded-sm underline underline-offset-2",children:"Dismiss"})]})]})})}function ur(e,t,n){const r=De(e,t),i=De(e,n);return!r||!i?!1:st(i,r)?r.auto===!0&&i.auto!==!0&&i.asks!=="never":!0}const dr="Auto mode needs Opus 4.6+ or Sonnet 4.6";function Ui({mode:e,onChangeMode:t,disabled:n,pending:r,runtime:i,modelSupportsAutoMode:o,planActive:a,compact:f,makeDefault:d,onOpenChange:p}){var A;const l=ge(i),u=se(N=>N.setControlCenterOpen),m=as(),T=H(N=>N.open),y=H(N=>N.setOpen),c=H(N=>N.setAvailable),g=!(l&&!l.permissionModes.supported)&&n!==!0&&r!==!0;h.useEffect(()=>(c(g),()=>c(!1)),[g,c]);const j=h.useRef(p);if(h.useEffect(()=>{j.current=p},[p]),h.useEffect(()=>()=>{var N;y(!1),(N=j.current)==null||N.call(j,!1)},[y]),l&&!l.permissionModes.supported)return null;const C=(l==null?void 0:l.permissionModes.values)??[],P=!o&&C.some(N=>N.id==="auto"),R=P?C.filter(N=>N.id!=="auto"):C,_=R.find(N=>N.id===e),w=m?C.find(N=>N.id===(l==null?void 0:l.permissionModes.default)):void 0,k=w!==void 0&&_!==void 0&&l!==void 0&&ur(l.permissionModes,_.id,w.id),x=k?w:_,M=k?`${w.label} (Wi-Fi)`:(x==null?void 0:x.label)??Xs(e),O=f?re(k?w.label:M):M,E=Vs(x),L=(A=Ys(R).find(N=>N.mode.id===e))==null?void 0:A.stop,B=P&&(L==="act"||e==="auto"),z=s.jsxs("button",{disabled:n,"data-testid":"permission-mode-trigger","aria-label":`Permissions: ${M}`,className:S(q,"items-center gap-1 disabled:cursor-not-allowed disabled:opacity-40",E),children:[s.jsx(Js,{descriptor:x,className:"size-(--size-icon-xs) shrink-0"}),s.jsx("span",{className:"truncate",children:O})]});return n?s.jsxs(D,{children:[s.jsx(I,{asChild:!0,children:s.jsx("span",{className:"inline-flex",children:z})}),s.jsx(U,{side:"top",children:"Send a message first"})]}):r?s.jsxs("span",{"data-testid":"permission-mode-pending","aria-busy":"true","aria-label":"Permissions: still loading",className:S(q,"items-center gap-1 opacity-40"),children:[s.jsx("span",{className:"bg-muted-foreground/30 size-(--size-icon-xs) shrink-0 animate-pulse rounded-full"}),s.jsx("span",{className:"bg-muted-foreground/30 h-2 w-10 animate-pulse rounded"})]}):s.jsxs(ve,{open:T,onOpenChange:N=>{y(N),p==null||p(N)},children:[s.jsx(Te,{asChild:!0,children:z}),s.jsxs(Se,{side:"top",align:"start",className:"w-80 p-3","aria-label":"Permissions",children:[s.jsx(ke,{children:"Permissions"}),s.jsx(Zs,{mode:e,descriptors:R,onChangeMode:t,planActive:a,onUnlock:()=>u(!0)}),d&&s.jsx(cr,{...d}),B&&s.jsxs(D,{children:[s.jsx(I,{asChild:!0,children:s.jsxs("p",{"data-testid":"auto-unsupported-hint",className:"text-muted-foreground text-3xs mt-2 flex items-center gap-1.5 px-1",children:[s.jsx(os,{className:"size-(--size-icon-xs) shrink-0"}),"Auto unavailable on this model"]})}),s.jsx(U,{side:"top",children:dr})]}),s.jsx(et,{mode:e,descriptor:_,className:"mt-2 px-1"})]})]})}const Fe="On Wi-Fi · agents ask or only read",ce="Over Wi-Fi, every file or shell step needs your OK, or agents only read.",mr="relative after:absolute after:top-1/2 after:left-1/2 after:size-11 after:-translate-x-1/2 after:-translate-y-1/2 after:content-['']";function Li({compact:e}){const t=as(),n=tt();if(!t)return null;const r=s.jsxs("button",{type:"button","data-testid":"wifi-turn-cap","aria-label":`${Fe}. ${ce}`,className:S("border-border text-muted-foreground inline-flex items-center gap-1 rounded-full border py-0.5",mr,n?"cursor-pointer":"cursor-default",e?"mx-1.5 px-1":"px-2","focus-visible:ring-ring outline-none focus-visible:ring-[3px]"),children:[s.jsx(Q,{"aria-hidden":!0,className:"size-(--size-icon-xs) shrink-0"}),!e&&s.jsx("span",{children:Fe})]});return n?s.jsxs(ls,{children:[s.jsx(nt,{asChild:!0,children:r}),s.jsx(cs,{side:"top",collisionPadding:8,"data-testid":"wifi-turn-cap-detail",className:"w-auto max-w-70 p-3 text-xs",children:ce})]}):s.jsxs(D,{children:[s.jsx(I,{asChild:!0,children:r}),s.jsx(U,{side:"top",children:ce})]})}const pr=6e3;function fr(e){return e instanceof Error&&e.message||"Couldn’t save that. Try again."}function zi(e){var L,B,z;const{sessionId:t,runtime:n,declaredModes:r,runtimeDefaultMode:i}=e,{data:o}=ie(),{data:a}=xe(),f=bn(),d=he(),p=rt(t),l=G(A=>A.dismissDefaultStopOffer),[u,m]=h.useState(null),[T,y]=h.useState(null),[c,g]=h.useState(t);c!==t&&(g(t),m(null),y(null));const j=o==null?void 0:o.executionDefaults,C=n??(j==null?void 0:j.runtime),P=(L=j==null?void 0:j.perRuntime.find(A=>A.runtime===C))==null?void 0:L.trustStop,R=P??(j==null?void 0:j.trustStop)??null,_=(B=r.find(A=>A.id===i))==null?void 0:B.stop,w=R??_,k=P!=null?(z=yn(a,C))==null?void 0:z.configSection:void 0,x=o!==void 0;h.useEffect(()=>{if(!u)return;const A=setTimeout(()=>m(null),pr);return()=>clearTimeout(A)},[u]);const M=h.useCallback(A=>{const N=r.find(ae=>ae.id===A);!N||it(N)||!x||p||N.stop!==w&&(y(null),m(N.stop))},[r,x,p,w,m,y]),O=h.useCallback(()=>{if(!u)return;const A=u;y(null),f.mutate({runtimes:k?{[k]:{defaultTrustStop:A}}:{defaultTrustStop:A}},{onSuccess:()=>{d.invalidateQueries({queryKey:F.all}),m(null)},onError:N=>y(fr(N))})},[u,f,d,k,m,y]),E=h.useCallback(()=>{l(t),m(null)},[l,t,m]);return{line:x?{stop:u,onMakeDefault:O,onDismiss:E,pending:f.isPending,error:T}:null,offerFor:M}}function $i({runtimeLabel:e,onShown:t,onDismiss:n}){const r=H(o=>o.available),i=H(o=>o.setOpen);return h.useEffect(()=>{t==null||t()},[t]),s.jsxs(vn,{"data-slot":"read-only-mode-notice","data-testid":"read-only-mode-notice",gap:"none",className:"flex-row flex-wrap items-center gap-x-3 gap-y-2 px-3 py-2",children:[s.jsx(at,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":!0}),s.jsxs("p",{className:"text-muted-foreground min-w-0 flex-1 text-xs",children:["In this mode, ",e," reads files but won’t change them. Asking won’t help."]}),s.jsxs("div",{className:"flex w-full shrink-0 flex-wrap items-center justify-end gap-1.5 sm:w-auto",children:[s.jsx(W,{variant:"ghost",size:"sm",responsive:!1,className:"h-7 px-2 text-xs",onClick:n,children:"Dismiss"}),r&&s.jsx(W,{variant:"outline",size:"sm",responsive:!1,className:"h-7 px-2 text-xs",onClick:()=>i(!0),children:"Change permissions"})]})]})}function Bi(e,t,n){const r=ge(t??void 0),i=G(u=>u.recordReadOnlyHintShown),o=G(u=>u.spendReadOnlyHint),a=ot(e??""),f=r==null?void 0:r.permissionModes.values.find(u=>u.id===n),d=f!==void 0&<(f);h.useEffect(()=>{d||!e||a!=="shown"||o(e)},[d,e,a,o]);const p=h.useCallback(()=>{e&&i(e)},[e,i]),l=h.useCallback(()=>{e&&o(e)},[e,o]);return h.useMemo(()=>({eligible:!!e&&d&&a!=="spent",runtimeLabel:t?ct(t):"This agent",markShown:p,dismiss:l}),[e,d,a,t,p,l])}function Fi({descriptor:e,active:t,onToggle:n,disabled:r}){return s.jsxs(D,{children:[s.jsx(I,{asChild:!0,children:s.jsxs("button",{type:"button","aria-pressed":t,disabled:r,onClick:()=>n(!t),className:S(q,"items-center gap-1","disabled:cursor-not-allowed disabled:opacity-40",t&&"text-foreground"),children:[s.jsx(us,{className:"size-(--size-icon-xs) shrink-0","aria-hidden":!0}),s.jsx("span",{className:"shrink-0",children:e.label})]})}),s.jsx(U,{side:"top",children:r?"Send a message first":e.promise})]})}function Gi({runtime:e,model:t,onChangeRuntime:n,canSelect:r,compact:i,iconOnly:o,account:a}){const{data:f}=xe(),{data:d}=ut(),{nameFor:p}=dt(),[l,u]=h.useState({open:!1}),m=Object.keys((f==null?void 0:f.capabilities)??{}),T=m.filter(x=>Ie(d,x)),y=m.filter(x=>!Ie(d,x)),c=f!==void 0&&Object.values(mt).some(x=>x.setup&&!m.includes(x.type)),g=!!n&&(m.length>1||y.length>0||c),j=i?null:t,C=oe(e),P=C.icon,R=o?s.jsx(P,{"aria-hidden":!0,className:"size-(--size-icon-xs) shrink-0"}):s.jsx(yt,{runtime:e,model:j,iconClassName:"size-(--size-icon-xs)"}),_=o?s.jsx("span",{className:"block",children:C.label}):null,w=o?s.jsx("span",{role:"img","aria-label":C.label,"data-testid":"runtime-item-icon",className:"inline-flex items-center",children:R}):R,k=a?`Account: ${p(a)}`:null;return r?g?s.jsxs(s.Fragment,{children:[s.jsxs(pt,{children:[s.jsx(ft,{asChild:!0,children:s.jsx("button",{className:q,"aria-label":o?`Runs on: ${C.label}`:void 0,title:o?C.label:void 0,children:R})}),s.jsxs(ht,{side:"top",align:"start",className:"w-56",children:[s.jsx(xt,{children:"Runs on"}),s.jsx(gt,{value:e,onValueChange:x=>n==null?void 0:n(x),children:T.map(x=>{const M=oe(x);return s.jsx(Nt,{value:x,icon:M.icon,children:M.label},x)})}),y.map(x=>{const M=oe(x);return s.jsx(Ue,{icon:M.icon,description:"Connect",onSelect:()=>u({open:!0,runtime:x}),children:M.label},x)}),c&&s.jsxs(s.Fragment,{children:[s.jsx(jt,{}),s.jsx(Ue,{icon:bt,onSelect:()=>u({open:!0}),children:"Add a runtime"})]})]})]}),s.jsx(Tn,{runtime:l.runtime,open:l.open,onOpenChange:x=>u(M=>({...M,open:x})),renderConnect:wn,showConnectSuccess:!0,onRuntimeReady:x=>{n==null||n(x)}})]}):!k&&!_?w:s.jsxs(D,{children:[s.jsx(I,{asChild:!0,children:w}),s.jsxs(U,{side:"top",children:[_,k&&s.jsx("span",{className:"block",children:k})]})]}):s.jsxs(D,{children:[s.jsx(I,{asChild:!0,children:w}),s.jsxs(U,{side:"top",children:[_,s.jsx("span",{className:"block",children:"Set when the chat starts. It can’t change after."}),k&&s.jsx("span",{className:"block",children:k})]})]})}function Wi(e,t,n){const r=ds(),i=vt(e),o=new Date(r),a=t.pending?null:t.usage;return{...Tt({liveTurnUsage:n,liveTurnAt:i,accountStatus:St(a,o),accountObservedAt:ms(ps(a))}),accountUsage:a}}function Hi({open:e,onOpenChange:t,onConfirm:n}){return s.jsx(kt,{open:e,onOpenChange:t,children:s.jsxs(Ct,{children:[s.jsxs(wt,{children:[s.jsxs(Et,{className:"flex items-center gap-2",children:[s.jsx(os,{className:"text-muted-foreground size-4"}),"Turn on Auto mode?",s.jsx(te,{size:"xs",variant:"secondary",className:"tracking-wide uppercase",children:"Preview"})]}),s.jsx(Mt,{children:"Asks only before risky steps, like deleting files. Switch back anytime."})]}),s.jsxs(Rt,{children:[s.jsx(_t,{children:"Cancel"}),s.jsx(At,{onClick:n,children:"Turn on Auto mode"})]})]})})}const Ge=[{slug:"frontier",label:"Frontier"},{slug:"solid-coders",label:"Solid coders"},{slug:"quick-helpers",label:"Quick helpers"},{slug:"more-models",label:"More models"},{slug:"no-tools",label:"Can’t do agent work"}],hr=10,xr="Can’t use tools, so it can’t read files or run commands.",gr="Makes images DorkOS can’t show yet.",Nr=["openrouter/openrouter/auto","openrouter/auto"];function jr(e){return Nr.some(t=>e.value===t||e.value.startsWith(`${t}-`))}function Cs(e){return e.supportsToolUse!==!1}function br(e){return e.supportsImageOutput===!0&&!jr(e)?gr:Cs(e)?null:xr}function yr(e){if(!Cs(e))return"no-tools";switch(e.tier){case"frontier":return"frontier";case"solid-coder":return"solid-coders";case"quick-helper":return"quick-helpers";default:return"more-models"}}function vr(e){return e.some(t=>t.tier!=null)||e.length>hr}function Tr(e,t){const n=t.trim().toLowerCase();return n?e.value.toLowerCase().includes(n)||e.displayName.toLowerCase().includes(n):!0}function Sr(e){const t=new Map(Ge.map(n=>[n.slug,[]]));for(const n of e)t.get(yr(n)).push(n);return Ge.map(n=>({...n,models:t.get(n.slug)})).filter(n=>n.models.length>0)}function kr(e){return e>=1e6?`${Math.round(e/1e6)}M`:e>=1e3?`${Math.round(e/1e3)}K`:String(e)}function Cr(){return s.jsx("div",{className:"space-y-2","data-testid":"model-cards-skeleton",children:Array.from({length:3}).map((e,t)=>s.jsxs("div",{className:"flex items-center gap-3 rounded-xl p-3",children:[s.jsx(Y,{className:"size-4 rounded-full"}),s.jsxs("div",{className:"flex-1 space-y-1.5",children:[s.jsx(Y,{className:"h-3.5 w-24"}),s.jsx(Y,{className:"h-2.5 w-32"})]}),s.jsx(Y,{className:"h-5 w-10 rounded-md"})]},t))})}function wr({onRetry:e,message:t}){return s.jsxs("div",{className:"flex flex-col items-center gap-3 py-6 text-center","data-testid":"model-load-error",children:[s.jsx(ye,{className:"text-muted-foreground size-5"}),s.jsx("p",{className:"text-muted-foreground text-xs",children:t??"Couldn’t load the model list."}),s.jsxs("button",{onClick:e,className:"text-foreground hover:bg-accent inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs transition-colors",children:[s.jsx(fs,{className:"size-3"}),"Retry"]})]})}function Er(e){const t=e.slice(e.lastIndexOf(" ")+1);return t.includes("/")||t.includes(":")}function ws({text:e,className:t}){return Er(e)?s.jsx("div",{dir:"rtl",className:S("truncate text-left",t),title:e,children:s.jsx("bdi",{dir:"ltr",children:e})}):s.jsx("div",{className:S("truncate",t),title:e,children:e})}function We({model:e,isSelected:t}){const n=br(e);return s.jsxs("label",{className:S("flex w-full cursor-pointer items-center gap-3 rounded-xl border p-3 transition-colors duration-150",t?"bg-secondary border-foreground/15":"border-border hover:border-muted-foreground/30 hover:bg-muted/50 opacity-70"),children:[s.jsx(Dt,{value:e.value,className:"shrink-0"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"text-foreground line-clamp-2 text-sm font-medium break-words",children:[e.displayName,e.local&&s.jsxs("span",{className:"text-muted-foreground text-3xs ml-1.5 font-normal",children:[It()," · private"]})]}),s.jsx(ws,{text:e.description,className:"text-muted-foreground text-2xs leading-tight"}),n&&s.jsx("div",{className:"text-2xs text-status-warning-fg mt-0.5 leading-tight","data-testid":`model-limitation-${e.value}`,children:n})]}),e.contextWindow&&s.jsx(te,{size:"xs",variant:"secondary",className:"shrink-0",children:kr(e.contextWindow)})]})}function Mr({value:e}){return s.jsxs("div",{className:"space-y-1.5","data-testid":"model-unavailable-saved",children:[s.jsxs("div",{className:"border-border flex w-full items-center gap-3 rounded-xl border border-dashed p-3 opacity-80",children:[s.jsx(ye,{className:"text-status-warning-fg size-4 shrink-0"}),s.jsxs("div",{className:"flex min-w-0 flex-1 items-baseline gap-1.5",children:[s.jsx(ws,{text:e,className:"text-foreground min-w-0 text-sm font-medium"}),s.jsx("span",{className:"text-muted-foreground text-2xs shrink-0 font-normal",children:"(not available)"})]})]}),s.jsx("p",{className:"text-muted-foreground text-2xs leading-snug",children:"This model isn’t available anymore. Pick another."})]})}function Rr({slug:e,label:t}){return s.jsx("div",{className:"text-muted-foreground text-2xs mt-2 mb-1 font-medium tracking-wide uppercase first:mt-0","data-testid":`model-group-${e}`,children:t})}function _r({models:e,selectedModel:t,onChangeModel:n,emptyMessage:r}){const[i,o]=h.useState(""),a=vr(e),d=e.length>0&&t.length>0&&!e.some(m=>m.value===t)?s.jsx(Mr,{value:t}):null,p=e.some(m=>m.unverified),l=h.useMemo(()=>a?e.filter(m=>Tr(m,i)):e,[e,i,a]),u=h.useMemo(()=>a?Sr(l):[],[l,a]);return e.length===0?s.jsx("div",{className:"border-border text-muted-foreground text-2xs rounded-xl border border-dashed p-3 leading-snug","data-testid":"model-catalog-unavailable",children:r??"Couldn’t load models. Check Settings, then try again."}):a?s.jsxs("div",{className:"space-y-2",children:[d,p&&s.jsx(ze,{}),s.jsxs("div",{className:"relative",children:[s.jsx(Pt,{className:"text-muted-foreground pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2"}),s.jsx(Ot,{type:"text",value:i,onChange:m=>o(m.target.value),placeholder:"Search models…","aria-label":"Search models","data-testid":"model-search",className:"h-8 pl-8 text-xs"})]}),u.length===0?s.jsx("p",{className:"text-muted-foreground py-4 text-center text-xs","data-testid":"model-search-empty",children:p?"No match in this short list. Connect a provider to see more.":"No models match"}):s.jsx(Le,{value:t,onValueChange:n,className:"grid-cols-1 gap-1.5","aria-label":"Model selection","data-testid":"model-card-list",children:u.map(m=>s.jsxs(h.Fragment,{children:[s.jsx(Rr,{slug:m.slug,label:m.label}),m.models.map(T=>s.jsx(We,{model:T,isSelected:T.value===t},T.value))]},m.slug))})]}):s.jsxs("div",{className:"space-y-2",children:[d,p&&s.jsx(ze,{}),s.jsx(Le,{value:t,onValueChange:n,className:"grid-cols-1 gap-1.5","aria-label":"Model selection","data-testid":"model-card-list",children:e.map(m=>s.jsx(We,{model:m,isSelected:m.value===t},m.value))})]})}const me={none:{label:"None",description:"No reasoning"},minimal:{label:"Minimal",description:"Near-zero thinking"},low:{label:"Low",description:"Fastest responses"},medium:{label:"Medium",description:"Moderate thinking"},high:{label:"High",description:"Deep reasoning"},max:{label:"Max",description:"Maximum thinking"},xhigh:{label:"XHigh",description:"Beyond maximum"}},Ar={duration:.15,ease:"easeOut"};function Pr({effortLevels:e,effort:t,onChangeEffort:n}){return s.jsxs("div",{children:[s.jsx("div",{className:"text-muted-foreground text-2xs mb-2 font-medium tracking-wide uppercase",children:"Effort"}),s.jsxs("div",{className:"flex flex-wrap gap-1.5",role:"radiogroup","aria-label":"Effort level",children:[s.jsx(pe,{role:"radio",label:"Default",isSelected:t===null,onClick:()=>n(null)}),e.map(r=>s.jsx(pe,{role:"radio",label:me[r].label,description:me[r].description,isSelected:t===r,onClick:()=>n(r)},r))]})]})}function Or({supportsFastMode:e,fastMode:t,onChangeFastMode:n}){return e?s.jsxs("div",{children:[s.jsx("div",{className:"text-muted-foreground text-2xs mb-2 font-medium tracking-wide uppercase",children:"Mode"}),s.jsx("div",{className:"flex gap-1.5",children:s.jsx(pe,{role:"switch",label:"Fast",icon:s.jsx(Ce,{className:"size-3"}),isSelected:t,onClick:()=>n(!t)})})]}):null}function pe({role:e,label:t,description:n,icon:r,isSelected:i,onClick:o}){const a=s.jsxs("button",{role:e,"aria-checked":i,onClick:o,className:S("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors duration-150",i?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground"),children:[r,t]});return n?s.jsxs(D,{children:[s.jsx(I,{asChild:!0,children:a}),s.jsx(U,{side:"top",className:"text-xs",children:n})]}):a}function Qi({model:e,onChangeModel:t,effort:n,onChangeEffort:r,fastMode:i,onChangeFastMode:o,disabled:a,sessionId:f,runtime:d,onCredits:p,compact:l}){var w;const{data:u,isLoading:m,isError:T,refetch:y}=rs({sessionId:f,runtime:d??void 0}),c=u??[],g=c.find(k=>k.value===e),j=!!(g!=null&&g.supportsEffort&&(((w=g.supportedEffortLevels)==null?void 0:w.length)??0)>0),C=(g==null?void 0:g.supportsFastMode)??!1,P=!l&&j&&n?me[n].label:null,R=!l&&i,_=s.jsxs("button",{disabled:a,className:S(q,"items-center gap-1 disabled:cursor-not-allowed disabled:opacity-40"),"data-testid":"model-config-trigger",children:[s.jsx(hs,{className:"size-(--size-icon-xs) shrink-0"}),s.jsx("span",{className:"truncate",children:or(e,c)}),P&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-muted-foreground text-2xs",children:"·"}),s.jsx(te,{size:"xs",variant:"secondary",children:P})]}),R&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-muted-foreground text-2xs",children:"·"}),s.jsxs(te,{size:"xs",variant:"secondary",children:[s.jsx(Ce,{className:"mr-0.5 inline size-2.5"}),"Fast"]})]})]});return a?s.jsxs(D,{children:[s.jsx(I,{asChild:!0,children:s.jsx("span",{className:"inline-flex",children:_})}),s.jsx(U,{side:"top",children:"Send a message first"})]}):s.jsxs(ve,{children:[s.jsx(Te,{asChild:!0,children:_}),s.jsxs(Se,{side:"top",align:"start",className:"w-120 max-w-[calc(100vw-1.5rem)] p-3","data-testid":"model-config-popover",children:[s.jsx(ke,{children:"Model"}),c.some(k=>k.paidFromCredits)&&s.jsx("p",{className:"text-muted-foreground text-2xs mb-2","data-testid":"model-credits-note",children:c.some(k=>k.creditsListOutOfDate)?"Models your DorkOS credits cover. This list may be out of date.":"Models your DorkOS credits cover"}),m&&s.jsx(Cr,{}),T&&s.jsx(wr,{onRetry:()=>y(),message:p?"Couldn’t load the models DorkOS credits cover. Your model stays as it is.":void 0}),!m&&!T&&s.jsx(_r,{models:c,selectedModel:e,onChangeModel:t,emptyMessage:p?"DorkOS credits don’t cover a model for this runtime yet.":void 0}),s.jsx(je,{children:!m&&!T&&(j||C)&&s.jsxs(be.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:Ar,children:[s.jsx(Ut,{className:"my-3"}),s.jsx("div",{className:"text-muted-foreground text-2xs mb-3 font-medium tracking-wide uppercase",children:"Configuration"}),s.jsxs("div",{className:"space-y-3",children:[j&&s.jsx(Pr,{effortLevels:g.supportedEffortLevels,effort:n,onChangeEffort:r}),C&&s.jsx(Or,{supportsFastMode:(g==null?void 0:g.supportsFastMode)??!1,fastMode:i,onChangeFastMode:o})]})]},"config")})]})]})}function qi({percent:e,contextUsage:t,compact:n,reading:r,now:i}){const o=Ss(e,t)??e,a=$n(o),f=a==="critical"?ne.error:a==="warning"?ne.warning:"",d=n!=null&&o>=vs,p=t?{total:t.totalTokens,max:t.maxTokens}:r&&r.maxTokens>0?{total:r.totalTokens,max:r.maxTokens}:null,l=(r==null?void 0:r.observedAt)??null,u=p!==null,m=s.jsxs("span",{"aria-label":u?"Context window usage":void 0,className:S("inline-flex shrink-0 items-center gap-1",u&&"cursor-default",f),children:[s.jsx(En,{className:"size-(--size-icon-xs) shrink-0"}),s.jsxs("span",{children:[o,"%"]})]});return s.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1.5",children:[p?s.jsx(Dr,{totals:p,categories:(t==null?void 0:t.categories)??[],observedAt:l,now:i,children:m}):m,s.jsx(je,{initial:!1,children:d&&s.jsxs(be.button,{type:"button",onClick:n.onCompact,disabled:n.pending,"aria-label":n.pending?"Compacting chat…":`Context ${o}% full. Compact now`,"aria-busy":n.pending,"data-testid":"compaction-chip",initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.15},className:"bg-secondary text-muted-foreground hover:text-foreground hover:bg-muted inline-flex min-w-0 shrink items-center gap-1 rounded-md px-1.5 py-0.5 transition-colors duration-150 disabled:cursor-not-allowed disabled:opacity-60",children:[s.jsx(fs,{"aria-hidden":"true",className:S("size-(--size-icon-xs) shrink-0",n.pending&&"animate-spin")}),s.jsx("span",{className:"truncate",children:"Compact"})]},"compact")})]})}function Dr({totals:e,categories:t,observedAt:n,now:r,children:i}){const o=t.filter(a=>a.tokens>0).sort((a,f)=>f.tokens-a.tokens);return s.jsxs(D,{children:[s.jsx(I,{asChild:!0,children:i}),s.jsx(U,{side:"top",className:"max-w-64",children:s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("div",{className:"text-xs font-medium",children:[le(e.total)," / ",le(e.max)," tokens"]}),o.length>0&&s.jsx("div",{className:"space-y-0.5",children:o.map(a=>s.jsxs("div",{className:"text-3xs flex items-center justify-between gap-3",children:[s.jsxs("span",{className:"flex items-center gap-1 truncate",children:[s.jsx("span",{className:"inline-block size-1.5 shrink-0 rounded-full",style:{backgroundColor:a.color}}),a.name]}),s.jsx("span",{className:S(de,"shrink-0"),children:le(a.tokens)})]},a.name))}),n!==null&&s.jsx(xs,{observedAt:n,now:r,surface:"tooltip"})]})})]})}function Ki({usage:e,accountUsage:t=null,observedAt:n=null,open:r,onOpenChange:i,now:o}){const a=ds(),f=o??new Date(a),d=ps(t),p=d.length>0?ms(d):n,l=e!=null&&gs(e);let u;return d.length>0?u=s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"text-xs font-medium",children:"Subscription usage"}),s.jsx("div",{className:"flex flex-col gap-2.5",children:d.map(m=>s.jsx(Lt,{window:m,label:zt(m.key,m.label),now:f},m.key))}),e&&s.jsx("div",{className:"text-3xs space-y-0.5",children:s.jsx($t,{usage:e})})]}):l?u=s.jsx(Ft,{usage:e}):u=s.jsx("p",{className:"text-muted-foreground text-xs",children:"No usage yet."}),s.jsxs(ls,{open:r,onOpenChange:i,children:[s.jsx(Bt,{asChild:!0,children:s.jsx("span",{"aria-hidden":!0,className:"inline-block h-0 w-0"})}),s.jsx(cs,{side:"top",align:"end",className:"w-72 max-w-[calc(100vw-1.5rem)]","aria-label":"Usage and cost",children:s.jsxs("div",{className:"space-y-2",children:[u,p!==null&&(d.length>0||l)&&s.jsx(xs,{observedAt:p,now:f})]})})]})}const Ir={connecting:{color:J.warning,label:"Connecting",shortLabel:"Connecting",icon:Q,tasks:!0},connected:{color:J.success,label:"Connected",shortLabel:"Connected",icon:Q,tasks:!1},reconnecting:{color:J.warning,label:"Reconnecting",shortLabel:"Reconnecting",icon:Q,tasks:!0},disconnected:{color:J.error,label:"Live updates lost",shortLabel:"Offline",icon:Gt,tasks:!1}};function Xi({connectionState:e,compact:t}){const n=Ir[e],r=n.icon;return s.jsxs(Sn,{openDelay:200,children:[s.jsx(kn,{asChild:!0,children:s.jsxs("span",{className:"flex min-w-0 cursor-default items-center gap-1.5 text-xs",children:[s.jsx("span",{className:S("size-1.5 shrink-0 rounded-full",n.color,n.tasks&&"animate-breath")}),s.jsx("span",{className:"text-muted-foreground truncate",children:t?n.shortLabel:n.label})]})}),s.jsx(Cn,{side:"top",align:"center",className:"w-72 p-3",children:s.jsxs("div",{className:"flex items-start gap-2.5",children:[s.jsx(r,{className:S("mt-0.5 size-4 shrink-0",e==="disconnected"?ne.error:ne.warning)}),s.jsxs("div",{className:"min-w-0 space-y-1.5",children:[s.jsx("p",{className:"text-sm font-medium",children:n.label}),s.jsx(Ur,{connectionState:e})]})]})})]})}function Ur({connectionState:e}){const t="text-muted-foreground text-xs leading-relaxed";return e==="connecting"?s.jsx("p",{className:t,children:"Connecting to live updates. New messages appear once connected."}):e==="reconnecting"?s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("p",{className:t,children:"Live updates dropped and are reconnecting. Nothing is lost."}),s.jsx("p",{className:S(t,"text-muted-foreground/70"),children:"No action needed."})]}):s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("p",{className:t,children:"Couldn’t reconnect live updates. New messages won’t appear until they’re back."}),s.jsx("p",{className:S(t,"text-muted-foreground/70"),children:"Refresh the page. If that doesn’t help, check that DorkOS is running."})]})}function Vi({count:e,running:t,waiting:n}){const r=e===1?"":"s",i=e-t.length,o=`${e} subagent${r} running`;return s.jsxs(D,{children:[s.jsx(I,{asChild:!0,children:s.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1","aria-label":o,children:[s.jsx(Ns,{className:"size-(--size-icon-xs) shrink-0"}),s.jsx("span",{className:"shrink-0 tabular-nums",children:e})]})}),s.jsxs(U,{side:"top",className:"max-w-64",children:[n&&s.jsx("p",{className:"mb-1 font-medium",children:"Still working. The agent continues when they finish."}),s.jsx("ul",{className:"space-y-1",children:t.map(a=>s.jsxs("li",{children:[s.jsx("span",{className:"font-medium",children:a.description??"Working…"}),s.jsxs("p",{className:S(de,"text-3xs leading-tight"),children:[a.toolUses??0," tool",a.toolUses===1?"":"s",a.lastToolName?` · last ${a.lastToolName}`:""]})]},a.taskId))}),i>0&&s.jsx("p",{className:S(de,"text-3xs leading-tight"),children:t.length>0?`and ${i} more`:`${i} task${r} from earlier`})]})]})}const He=648,Lr=440,zr=340,$r=3,Br=3,Fr=2,Gr=4,Wr=8,Hr=20,Qr=ue*Wr+Hr,qr=Number.POSITIVE_INFINITY,Qe=[],Kr=["cwd"],qe=["cwd","git"];function Xr(e){if(e===null||e<=0)return{density:"full",rightBudget:qr,dropped:Qe};if(e>=He){const t=Math.floor((e-He)/Qr);return{density:"full",rightBudget:Gr+t,dropped:Qe}}return e>=Lr?{density:"compact",rightBudget:$r,dropped:Kr}:e>=zr?{density:"identity",rightBudget:Br,dropped:qe}:{density:"avatar",rightBudget:Fr,dropped:qe}}function Vr(e){return e==="identity"||e==="avatar"}function Yr(e,t){return t.severity!==e.severity?t.severity-e.severity:Number(t.pinned)-Number(e.pinned)}const Jr=2,Zr=2;function Yi(e,t){const n=new Set(t.dropped),r=t.density!=="full",i=l=>r&&l.held,o=e.filter(l=>l.cluster==="right"),a=new Set;let f=0,d=0;const p=[...o].sort((l,u)=>Number(i(u))-Number(i(l))||Yr(l,u));for(const l of p){if(d>=t.rightBudget)break;const u=l.rigid||i(l);u&&f>=Jr||(u&&(f+=1),a.add(l.key),d+=l.wide?Math.min(Zr,t.rightBudget-d):1)}return{items:e.filter(l=>l.cluster==="right"?a.has(l.key):!n.has(l.key)).map(l=>l.held===i(l)?l:{...l,held:i(l)}),overflow:o.length-a.size}}const ei=new Set(["main","master"]);function Ji(e,t,n){return{dirty:!t,onDefaultBranch:!n&&ei.has(e)}}const v={AGENT_ANCHOR:1e3,CONNECTION_LOST:100,CONTEXT_CRITICAL:90,ACCOUNT_ATTENTION:85,USAGE_EXHAUSTED:80,PERMISSION_BYPASS:70,CONTEXT_WARNING:50,USAGE_WARNING:50,PERMISSION_ELEVATED:40,PLAN_ACTIVE:40,SUBAGENTS_RUNNING:35,EXTENSION_ITEM:35,RUNTIME_NON_DEFAULT:30,GIT_DIRTY:20,MODEL:10,CWD:5,QUIET:0},si={session:"Session",diagnostics:"Diagnostics"};function Ke(e){return e.runtime&&!e.runtime.isDefault?v.RUNTIME_NON_DEFAULT:v.QUIET}function ti(e){return e.account!==null}const ni=new Set(["near","model-out","out"]);function Xe(e){return e.permissionDescriptor?e.permissionDescriptor.stop!=="ask":e.permissionMode!=="default"}const Es=[{key:"agent",label:"Agent",description:"Who you are talking to",cluster:"left",group:null,icon:Ht,promote:()=>!0,severity:()=>v.AGENT_ANCHOR},{key:"cwd",label:"Directory",description:"The folder this chat can touch",cluster:"left",group:"session",icon:Qt,promote:e=>e.cwd!==null,severity:()=>v.CWD},{key:"git",label:"Git",description:"Branch and uncommitted changes",cluster:"left",group:"session",icon:Z,promote:e=>e.git!==null&&(e.git.dirty||!e.git.onDefaultBranch),severity:e=>{var t;return(t=e.git)!=null&&t.dirty?v.GIT_DIRTY:v.QUIET}},{key:"runtime",label:"Runs on",description:"What runs this chat",cluster:"right",group:"session",icon:Mn,promote:e=>e.runtime!==null&&e.runtime.type!=="doe"&&(!e.runtime.isDefault||e.runtime.canSelect),severity:Ke,snug:Vr},{key:"account",label:"Account",description:"Which Claude account this uses, and what’s left",cluster:"right",group:null,icon:Rn,promote:e=>e.account!==null,severity:e=>e.account&&ni.has(e.account.chipState)?v.ACCOUNT_ATTENTION:Ke(e)},{key:"extensions",label:"Add-ons",description:"What your extensions show here",cluster:"right",group:null,icon:qt,promote:e=>e.extensionItems.some(t=>t.visible),severity:e=>e.extensionItems.some(t=>t.visible&&t.urgent)?v.ACCOUNT_ATTENTION:v.EXTENSION_ITEM},{key:"model",label:"Model",description:"The model answering you",cluster:"right",group:"session",icon:hs,promote:()=>!1,severity:()=>v.MODEL},{key:"cache",label:"Cache",description:"How much came from cache",cluster:"right",group:"session",icon:Ce,promote:()=>!1,severity:()=>v.QUIET,neverInLine:!0},{key:"context",label:"Context",description:"How full the context window is",cluster:"right",group:"session",icon:_n,rigid:!0,promote:e=>e.contextPercent!==null,severity:e=>e.contextPercent===null?v.QUIET:e.contextPercent>=vs?v.CONTEXT_CRITICAL:e.contextPercent>=zn?v.CONTEXT_WARNING:v.QUIET},{key:"usage",label:"Usage & cost",description:"Plan limits or chat cost",cluster:"right",group:"session",icon:Kt,rigid:!0,promote:e=>e.usage!==null&&gs(e.usage)&&!ti(e),wide:e=>e.usageStale,severity:e=>{var t,n;return((t=e.usage)==null?void 0:t.state)==="exhausted"?v.USAGE_EXHAUSTED:((n=e.usage)==null?void 0:n.state)==="warning"?v.USAGE_WARNING:v.QUIET}},{key:"permission",label:"Permissions",description:"How freely the agent acts",cluster:"right",group:"session",icon:Xt,held:!0,promote:e=>Xe(e)||e.permissionPickerOpen===!0||e.onWifi===!0,severity:e=>(e.permissionDescriptor?Vt(e.permissionDescriptor):Yt(e.permissionMode))?v.PERMISSION_BYPASS:Xe(e)||e.permissionPickerOpen===!0||e.onWifi===!0?v.PERMISSION_ELEVATED:v.QUIET},{key:"plan",label:"Plan",description:"Plan first, change nothing until approved",cluster:"right",group:"session",icon:us,promote:e=>e.plan!==null,severity:e=>{var t;return(t=e.plan)!=null&&t.active?v.PLAN_ACTIVE:v.QUIET},snug:()=>!0},{key:"subagents",label:"Subagents",description:"Subagents working on this turn",cluster:"right",group:"diagnostics",icon:Ns,rigid:!0,promote:e=>e.subagentsInFlight>0,severity:e=>e.subagentsInFlight>0?v.SUBAGENTS_RUNNING:v.QUIET},{key:"connection",label:"Live updates",description:"The live link that delivers messages",cluster:"right",group:"diagnostics",icon:Q,promote:e=>e.connectionState!=="connected",severity:e=>e.connectionState==="connected"?v.QUIET:v.CONNECTION_LOST}];function Ms(e){return e.group==="session"&&e.neverInLine!==!0}function ri(){const{pins:e}=Dn(),{setPins:t}=In(),n=h.useCallback(i=>{const o=Wt.find(a=>a===i);o&&t(e.includes(o)?e.filter(a=>a!==o):[...e,o])},[e,t]),r=h.useCallback(()=>t([]),[t]);return{pins:e,toggle:n,reset:r}}function ii(){return["session","diagnostics"].map(t=>({group:t,label:si[t],items:Es.filter(n=>n.group===t)})).filter(t=>t.items.length>0)}function Rs(e){const t=e.contextTokens??e.readTokens+e.creationTokens;return t<=0?0:Math.round(e.readTokens/t*100)}function ai(e){return e?e.kind==="subscription"&&e.utilization!=null?`${Math.round(e.utilization*100)}% of ${e.windowLabel??"your plan"}`:e.costUsd!=null?`$${e.costUsd.toFixed(2)}`:null:null}function oi(e){return e.split("/").filter(Boolean).pop()??e}function li(e,t){switch(e){case"cwd":return t.cwd?oi(t.cwd):null;case"git":return t.git.state==="unknown"?null:t.git.state==="no-repo"?"No repo":t.git.dirty?`${t.git.branch} · changed`:t.git.branch;case"runtime":return t.runtime;case"model":return t.model;case"context":return t.contextPercent===null?null:`${t.contextPercent}% full`;case"cache":return t.cache===null?null:`${Rs(t.cache)}% from cache`;case"usage":return ai(t.usage);case"permission":return t.permissionMode;case"connection":return`${t.connectionState} · event ${t.lastEventSeq}`;default:return null}}function ci(e){return JSON.stringify({sessionId:e.sessionId,cwd:e.cwd,git:e.git,runtime:e.runtime,model:e.model,selectedModel:e.selectedModel,effort:e.effort,fastMode:e.fastMode,permissionMode:e.permissionMode,contextPercent:e.contextPercent,contextUsage:e.contextUsage,cache:e.cache===null?null:{readTokens:e.cache.readTokens,creationTokens:e.cache.creationTokens,contextTokens:e.cache.contextTokens??null,hitPercent:Rs(e.cache)},usage:e.usage,connectionState:e.connectionState,streaming:e.streaming,lifecycle:e.lifecycle,triggerPending:e.triggerPending,lastEventSeq:e.lastEventSeq,snapshotCursor:e.snapshotCursor,lastEventAt:e.lastEventAt===null?null:new Date(e.lastEventAt).toISOString(),queueDepth:e.queueDepth,subagents:e.subagents.map(t=>t.name),activeSubagents:e.activeSubagents,runningSubagentCount:e.runningSubagentCount,clientVersion:e.clientVersion,capturedAt:new Date().toISOString()},null,2)}function ui({copied:e,failed:t}){return e?s.jsx(Zt,{className:"text-status-success size-3.5","aria-hidden":!0}):t?s.jsx(en,{className:"text-destructive size-3.5","aria-hidden":!0}):s.jsx(An,{className:"size-3.5","aria-hidden":!0})}function di(e,t){return e?"Copied":t?"Couldn’t copy":"Copy diagnostics"}function mi({diagnostics:e,className:t}){const{copied:n,failed:r,copy:i}=Jt(),o=()=>void i(ci(e));return s.jsxs(W,{variant:"ghost",size:"sm",className:S("gap-1.5 text-xs",t),onClick:o,children:[s.jsx(ui,{copied:n,failed:r}),di(n,r)]})}function Zi({open:e,onOpenChange:t,diagnostics:n,controls:r,promotionContext:i,urgentAction:o,overflowCount:a=0,addOns:f}){const d=sn(),{pins:p,toggle:l,reset:u}=ri(),m=ii(),T=new Set(p),y=a>0;return s.jsxs(ve,{open:e,onOpenChange:t,children:[s.jsx(tn,{children:s.jsxs(D,{children:[s.jsx(Te,{asChild:!0,children:s.jsx(I,{asChild:!0,children:s.jsxs("button",{type:"button","data-testid":"status-reveal","aria-label":y?`Chat details, ${a} more`:"Chat details",className:"text-muted-foreground/50 hover:text-muted-foreground inline-flex shrink-0 items-center justify-center gap-0.5 transition-colors duration-150 pointer-coarse:min-h-11 pointer-coarse:min-w-11",children:[s.jsx(nn,{className:"size-4"}),y&&s.jsxs("span",{className:"tabular-nums",children:["+",a]})]})})}),s.jsx(U,{side:"top",children:y?`Chat details, ${a} more`:"Chat details"})]})}),s.jsxs(Se,{side:"top",align:"end",className:"w-80 p-3","aria-label":"Chat",children:[s.jsx(ke,{children:"Chat"}),o&&s.jsx(W,{variant:"secondary",className:"mb-3 w-full",disabled:o.pending,onClick:()=>{o.onAction(),t(!1)},children:o.label}),s.jsxs("div",{className:"flex flex-col gap-4",children:[f&&s.jsxs("section",{className:"space-y-1","data-testid":"session-add-ons",children:[s.jsx("h3",{className:"text-muted-foreground px-1 text-xs font-medium tracking-wide uppercase",children:"Add-ons"}),f]}),m.map(c=>s.jsxs("section",{className:"space-y-1",children:[s.jsx("h3",{className:"text-muted-foreground px-1 text-xs font-medium tracking-wide uppercase",children:c.label}),pi(fi(c.items,r),d?i:null).map(g=>s.jsx(xi,{item:g,value:li(g.key,n),pinned:T.has(g.key),onTogglePin:Ms(g)?()=>l(g.key):null,control:hi(g.key,r)},g.key)),c.group==="diagnostics"&&s.jsxs(s.Fragment,{children:[s.jsx(Ve,{label:"Queued messages",value:String(n.queueDepth)}),s.jsx(Ve,{label:"Chat ID",value:n.sessionId||"—"})]})]},c.group))]}),n.sessionId!==""&&s.jsxs(W,{variant:"ghost",size:"sm",className:"text-muted-foreground mt-3 h-7 w-full justify-start gap-1.5 text-xs",onClick:()=>{t(!1),an({sessionId:n.sessionId})},children:[s.jsx(rn,{className:"size-3.5","aria-hidden":!0}),"View notifications"]}),s.jsxs("div",{className:"mt-4 flex items-center justify-between gap-2",children:[s.jsx(mi,{diagnostics:n}),s.jsxs(W,{variant:"ghost",size:"sm",className:"text-muted-foreground gap-1.5 text-xs",disabled:p.length===0,onClick:u,children:[s.jsx(on,{className:"size-3.5","aria-hidden":!0}),"Reset pins"]})]})]})]})}function pi(e,t){return t?[...e].sort((n,r)=>r.severity(t)-n.severity(t)):e}function fi(e,t){return e.filter(n=>n.key!=="plan"||t.plan!==null)}function hi(e,t){return e==="plan"&&t.plan?s.jsx(cn,{checked:t.plan.active,onCheckedChange:t.plan.onToggle,"aria-label":"Plan first, change nothing until approved"}):null}function xi({item:e,value:t,pinned:n,onTogglePin:r,control:i}){const o=e.icon;return s.jsxs("div",{"data-testid":`session-row-${e.key}`,className:"flex items-center gap-2 px-1 py-1 text-sm",children:[s.jsx(o,{className:"text-muted-foreground size-3.5 shrink-0","aria-hidden":!0}),s.jsx("span",{className:"shrink-0",children:e.label}),s.jsx("span",{className:"min-w-0 flex-1"}),s.jsx("span",{className:"text-muted-foreground truncate text-xs",title:t??void 0,children:t??"—"}),i,r&&s.jsx("button",{type:"button",onClick:r,"aria-pressed":n,"aria-label":n?`Stop keeping ${e.label} in the status bar`:`Keep ${e.label} in the status bar`,className:S("hover:text-foreground inline-flex size-6 shrink-0 items-center justify-center rounded-md transition-colors duration-150",n?"text-foreground":"text-muted-foreground/50"),children:n?s.jsx(is,{className:"size-3.5"}):s.jsx(ln,{className:"size-3.5"})})]})}function Ve({label:e,value:t}){return s.jsxs("div",{className:"flex items-center gap-2 px-1 py-1 text-sm",children:[s.jsx("span",{className:"w-3.5 shrink-0","aria-hidden":!0}),s.jsx("span",{className:"shrink-0",children:e}),s.jsx("span",{className:"min-w-0 flex-1"}),s.jsx("span",{className:"text-muted-foreground truncate text-xs",title:t,children:t})]})}function ea(e){const t=h.useRef(e);h.useEffect(()=>{t.current=e},[e]),h.useEffect(()=>{const n=r=>{const i=r.key==="."||r.key===">";(r.metaKey||r.ctrlKey)&&r.shiftKey&&i&&(r.preventDefault(),t.current())};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[])}function gi(e){const t=new Map;for(const r of e){if(r.type!=="subagent_update")continue;const i=t.get(r.taskId);t.set(r.taskId,{taskId:r.taskId,status:r.status,description:r.description??(i==null?void 0:i.description),toolUses:r.toolUses??(i==null?void 0:i.toolUses),lastToolName:r.lastToolName??(i==null?void 0:i.lastToolName),summary:r.summary??(i==null?void 0:i.summary),ambient:r.ambient??(i==null?void 0:i.ambient)})}const n=[];for(const{ambient:r,...i}of t.values())Pn({ambient:r,status:i.status})||n.push(i);return n}function sa(e){const t=[],n=[];for(const r of e)r.status==="running"?t.push(r):n.push(r);return{running:t,finished:n}}const Ye=new WeakMap;function Je(e,t,n){let r=Ye.get(e);r||(r=new Set,Ye.set(e,r)),!r.has(t)&&(r.add(t),n())}function Ze(e,t,n){let r;try{r=n()}catch(i){return Je(e,`${t}:throw`,()=>console.warn(`[extensions] ${e.extensionId}'s status-bar item "${e.id}" threw in ${t}(); it is hidden until it stops throwing.`,i)),!1}return typeof r!="boolean"?(Je(e,`${t}:type`,()=>console.warn(`[extensions] ${e.extensionId}'s status-bar item "${e.id}": ${t}() must return true or false, synchronously, reading only its ctx; it returned ${Ni(r)}, read as false.`)),!1):r}function Ni(e){return e instanceof Promise?"a Promise":e===null?"null":typeof e=="object"?"an object":`a ${typeof e}`}function ji(e,t){const n=[],r=[];for(const i of e){const o=i.when?Ze(i,"when",()=>i.when(t)):!0,a=o&&i.urgent?Ze(i,"urgent",()=>i.urgent(t)):!1;n.push({id:i.id,visible:o,urgent:a}),o&&r.push(i)}return r.sort((i,o)=>(i.priority??0)-(o.priority??0)),{promotion:n,visible:r}}function ta(e){const t=un("status-bar");return h.useMemo(()=>ji(t,e),[t,e])}function bi(e){return e!=null&&e!==!1}function na({ctx:e,pins:t,nodes:n,density:r="full"}){var a,f;const i=new Set(t),o=[];for(const d of Es){if(d.neverInLine)continue;const p=n[d.key];if(!bi(p))continue;const l=i.has(d.key)&&Ms(d);!l&&!d.promote(e)||o.push({key:d.key,cluster:d.cluster,severity:d.severity(e),pinned:l,rigid:d.rigid===!0,wide:((a=d.wide)==null?void 0:a.call(d,e))===!0,held:d.held===!0,snug:((f=d.snug)==null?void 0:f.call(d,r))===!0,node:p})}return o}function ra(){const e=h.useRef(null),[t,n]=h.useState(null);h.useLayoutEffect(()=>{const i=e.current;if(!i)return;n(i.getBoundingClientRect().width);const o=new ResizeObserver(a=>{var p,l;const f=a.at(0);if(!f)return;const d=((l=(p=f.contentBoxSize)==null?void 0:p.at(0))==null?void 0:l.inlineSize)??f.contentRect.width;n(d)});return o.observe(i),()=>o.disconnect()},[]);const r=h.useMemo(()=>Xr(t),[t]);return{ref:e,budget:r}}const yi=[];function ia(e){const t=dn(e),n=h.useMemo(()=>Fn(t),[t]),r=Gn(e)==="streaming",i=G(h.useCallback(O=>{var E;return((E=O.sessions[e])==null?void 0:E.sessionStatus)??null},[e])),o=mn(e),a=qn(e||null,i,r,o.runtime),f=G(h.useCallback(O=>{var E;return((E=O.sessions[e])==null?void 0:E.contextUsage)??null},[e])),d=G(pn(O=>{var L;const E=(L=O.sessions[e])==null?void 0:L.sessionStatus;return!(E!=null&&E.cacheReadTokens)&&!(E!=null&&E.cacheCreationTokens)?null:{cacheReadTokens:E.cacheReadTokens??0,cacheCreationTokens:E.cacheCreationTokens??0,contextTokens:E.contextTokens}})),p=n.cacheStatus??d,{data:l}=nr(a.cwd),{data:u}=Kn(e),{data:m}=ie(),T=fn(e),y=es(e),c=hn(e),g=xn(e),j=gn(e),C=ss(e),P=Nn(e).length,R=jn(e),_=h.useMemo(()=>{let O=null;return()=>O??(O=gi(R))},[R]),w=(t==null?void 0:t.runningSubagentCount)??null,k=h.useMemo(()=>ir(l),[l]),x=Ss(n.contextPercent??a.contextPercent,f),M=(o.model??n.model??a.model)||null;return h.useMemo(()=>({sessionId:e,cwd:a.cwd,git:k,runtime:o.runtime,model:M,selectedModel:a.model||null,effort:a.effort??null,fastMode:a.fastMode,permissionMode:a.permissionMode,contextPercent:x,contextUsage:f,cache:p?{readTokens:p.cacheReadTokens,creationTokens:p.cacheCreationTokens,contextTokens:p.contextTokens}:null,usage:n.usage,connectionState:T,streaming:r,lifecycle:y??null,triggerPending:C,lastEventSeq:c,snapshotCursor:j,lastEventAt:g,queueDepth:P,subagents:u??yi,get activeSubagents(){return _()},runningSubagentCount:w,clientVersion:(m==null?void 0:m.version)??null}),[e,a.cwd,a.model,a.effort,a.fastMode,a.permissionMode,k,o.runtime,M,x,f,p,n,T,y,r,C,c,j,g,P,u,_,w,m==null?void 0:m.version])}export{Hi as A,ri as B,mi as C,ra as D,Wi as E,Ai as F,Ii as G,vs as H,qn as I,Qn as J,Pi as K,Pn as L,cr as M,Ui as P,$i as R,Zi as S,Ki as U,Li as W,Ir as a,Xi as b,Rs as c,qi as d,Di as e,Qi as f,Fi as g,Gi as h,Oi as i,Vi as j,Yi as k,ji as l,ci as m,Ji as n,rr as o,sa as p,Vr as q,ti as r,Xr as s,na as t,ia as u,ta as v,nr as w,zi as x,Bi as y,ea as z};
|
package/dist/client/assets/{use-unclaimed-chats-B92om889.js → use-unclaimed-chats-BbMZtNG9.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a1 as a,a2 as l,a3 as r,ap as o,a4 as s}from"./index-
|
|
1
|
+
import{a1 as a,a2 as l,a3 as r,ap as o,a4 as s}from"./index-C3cvP8Fo.js";import{B as d}from"./use-bindings-CU2RSXOy.js";const u=["relay","unclaimed-chats"];function m(e){return[...u,e]}function y(e="pending",t=!0){const n=a();return l({queryKey:m(e),queryFn:()=>n.listUnclaimedChats(e),enabled:t})}function U(){const e=r(),t=()=>{e.invalidateQueries({queryKey:[...u]})};o("relay_chat_unclaimed",t),o("relay_chat_unclaimed_burst",t)}function i(e){e.invalidateQueries({queryKey:[...u]})}function p(){const e=a(),t=r();return s({mutationFn:({id:n,input:c})=>e.claimUnclaimedChat(n,c),meta:{suppressErrorToast:!0},onSuccess:()=>{i(t),t.invalidateQueries({queryKey:[...d]})}})}function v(){const e=a(),t=r();return s({mutationFn:n=>e.ignoreUnclaimedChat(n),meta:{errorLabel:"Couldn’t ignore this chat"},onSuccess:()=>i(t)})}function f(){const e=a(),t=r();return s({mutationFn:n=>e.blockUnclaimedChat(n),meta:{errorLabel:"Couldn’t block this chat"},onSuccess:()=>i(t)})}function q(){const e=a(),t=r();return s({mutationFn:n=>e.leaveUnclaimedChat(n),meta:{errorLabel:"Couldn’t leave this chat"},onSuccess:()=>i(t)})}export{u as U,U as a,p as b,v as c,f as d,q as e,y as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a1 as n,a3 as s,a4 as u,at as o,au as r}from"./index-C3cvP8Fo.js";function c(){const t=n(),e=s();return u({mutationKey:o,mutationFn:a=>t.updateConfig(a),onSuccess:()=>{e.invalidateQueries({queryKey:r.current()})}})}export{c as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a3 as f,r as n,an as i,ao as o}from"./index-
|
|
1
|
+
import{a3 as f,r as n,an as i,ao as o}from"./index-C3cvP8Fo.js";function a(r,u){return r.findAll(u.filters).map(e=>u.select?u.select(e):e.state)}function x(r={},u){const e=f(u).getMutationCache(),c=n.useRef(r),t=n.useRef(null);return t.current===null&&(t.current=a(e,r)),n.useEffect(()=>{c.current=r}),n.useSyncExternalStore(n.useCallback(l=>e.subscribe(()=>{const s=i(t.current,a(e,c.current));t.current!==s&&(t.current=s,o.schedule(l))}),[e]),()=>t.current,()=>t.current)}export{x as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Ni}from"./chunk-XXDRQBXY-
|
|
1
|
+
import{g as Ni}from"./chunk-XXDRQBXY-gnvheN_J.js";import{s as Ci}from"./chunk-VQ5W62QI-V5zYx50O.js";import{g as Zs,s as jt,a as Qs,b as Gt,v as bi,t as vi,_ as u,E as je,l as _i,c as en,q as Mi,r as xi,u as wi,j as Ui,A as Pi,P as Di,D as Fi,M as Bi,F as $i,K as ji,bj as Gi}from"./mermaid.core-SX8SzrsU.js";import{s as Wi}from"./transform-BqqRT-Iy.js";import"./index-C3cvP8Fo.js";import"./BlintzCanvas-b30dG4gx.js";import"./index-BIB-maE5.js";import"./index-DabU6r9W.js";function Wt(s){console&&console.error&&console.error(`Error: ${s}`)}function tn(s){console&&console.warn&&console.warn(`Warning: ${s}`)}function sn(s){const e=new Date().getTime(),t=s();return{time:new Date().getTime()-e,value:t}}function nn(s){function e(){}e.prototype=s;const t=new e;function n(){return typeof t.bar}return n(),n(),s}function Ki(s){return Vi(s)?s.LABEL:s.name}function Vi(s){return typeof s.LABEL=="string"&&s.LABEL!==""}class te{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),this.definition.forEach(t=>{t.accept(e)})}}class K extends te{constructor(e){super([]),this.idx=1,Object.assign(this,ie(e))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class _e extends te{constructor(e){super(e.definition),this.orgText="",Object.assign(this,ie(e))}}class W extends te{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Object.assign(this,ie(e))}}class G extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class se extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class ne extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class x extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class J extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class Z extends te{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Object.assign(this,ie(e))}}class k{constructor(e){this.idx=1,Object.assign(this,ie(e))}accept(e){e.visit(this)}}function zi(s){return s.map(at)}function at(s){function e(t){return t.map(at)}if(s instanceof K){const t={type:"NonTerminal",name:s.nonTerminalName,idx:s.idx};return typeof s.label=="string"&&(t.label=s.label),t}else{if(s instanceof W)return{type:"Alternative",definition:e(s.definition)};if(s instanceof G)return{type:"Option",idx:s.idx,definition:e(s.definition)};if(s instanceof se)return{type:"RepetitionMandatory",idx:s.idx,definition:e(s.definition)};if(s instanceof ne)return{type:"RepetitionMandatoryWithSeparator",idx:s.idx,separator:at(new k({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof J)return{type:"RepetitionWithSeparator",idx:s.idx,separator:at(new k({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof x)return{type:"Repetition",idx:s.idx,definition:e(s.definition)};if(s instanceof Z)return{type:"Alternation",idx:s.idx,definition:e(s.definition)};if(s instanceof k){const t={type:"Terminal",name:s.terminalType.name,label:Ki(s.terminalType),idx:s.idx};typeof s.label=="string"&&(t.terminalLabel=s.label);const n=s.terminalType.PATTERN;return s.terminalType.PATTERN&&(t.pattern=n instanceof RegExp?n.source:n),t}else{if(s instanceof _e)return{type:"Rule",name:s.name,orgText:s.orgText,definition:e(s.definition)};throw Error("non exhaustive match")}}}function ie(s){return Object.fromEntries(Object.entries(s).filter(([,e])=>e!==void 0))}class Me{visit(e){const t=e;switch(t.constructor){case K:return this.visitNonTerminal(t);case W:return this.visitAlternative(t);case G:return this.visitOption(t);case se:return this.visitRepetitionMandatory(t);case ne:return this.visitRepetitionMandatoryWithSeparator(t);case J:return this.visitRepetitionWithSeparator(t);case x:return this.visitRepetition(t);case Z:return this.visitAlternation(t);case k:return this.visitTerminal(t);case _e:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function Hi(s){return s instanceof W||s instanceof G||s instanceof x||s instanceof se||s instanceof ne||s instanceof J||s instanceof k||s instanceof _e}function Tt(s,e=[]){return s instanceof G||s instanceof x||s instanceof J?!0:s instanceof Z?s.definition.some(n=>Tt(n,e)):s instanceof K&&e.includes(s)?!1:s instanceof te?(s instanceof K&&e.push(s),s.definition.every(n=>Tt(n,e))):!1}function Xi(s){return s instanceof Z}function ee(s){if(s instanceof K)return"SUBRULE";if(s instanceof G)return"OPTION";if(s instanceof Z)return"OR";if(s instanceof se)return"AT_LEAST_ONE";if(s instanceof ne)return"AT_LEAST_ONE_SEP";if(s instanceof J)return"MANY_SEP";if(s instanceof x)return"MANY";if(s instanceof k)return"CONSUME";throw Error("non exhaustive match")}class kt{walk(e,t=[]){e.definition.forEach((n,i)=>{const a=e.definition.slice(i+1);if(n instanceof K)this.walkProdRef(n,a,t);else if(n instanceof k)this.walkTerminal(n,a,t);else if(n instanceof W)this.walkFlat(n,a,t);else if(n instanceof G)this.walkOption(n,a,t);else if(n instanceof se)this.walkAtLeastOne(n,a,t);else if(n instanceof ne)this.walkAtLeastOneSep(n,a,t);else if(n instanceof J)this.walkManySep(n,a,t);else if(n instanceof x)this.walkMany(n,a,t);else if(n instanceof Z)this.walkOr(n,a,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const i=t.concat(n);this.walk(e,i)}walkOption(e,t,n){const i=t.concat(n);this.walk(e,i)}walkAtLeastOne(e,t,n){const i=[new G({definition:e.definition})].concat(t,n);this.walk(e,i)}walkAtLeastOneSep(e,t,n){const i=ys(e,t,n);this.walk(e,i)}walkMany(e,t,n){const i=[new G({definition:e.definition})].concat(t,n);this.walk(e,i)}walkManySep(e,t,n){const i=ys(e,t,n);this.walk(e,i)}walkOr(e,t,n){const i=t.concat(n);e.definition.forEach(a=>{const r=new W({definition:[a]});this.walk(r,i)})}}function ys(s,e,t){return[new G({definition:[new k({terminalType:s.separator})].concat(s.definition)})].concat(e,t)}function qe(s){if(s instanceof K)return qe(s.referencedRule);if(s instanceof k)return Ji(s);if(Hi(s))return Yi(s);if(Xi(s))return qi(s);throw Error("non exhaustive match")}function Yi(s){let e=[];const t=s.definition;let n=0,i=t.length>n,a,r=!0;for(;i&&r;)a=t[n],r=Tt(a),e=e.concat(qe(a)),n=n+1,i=t.length>n;return[...new Set(e)]}function qi(s){const e=s.definition.map(t=>qe(t));return[...new Set(e.flat())]}function Ji(s){return[s.terminalType]}const an="_~IN~_";class Zi extends kt{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const i=ea(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(n),r=new W({definition:a}),o=qe(r);this.follows[i]=o}}function Qi(s){const e={};return s.forEach(t=>{const n=new Zi(t).startWalking();Object.assign(e,n)}),e}function ea(s,e){return s.name+e+an}function y(s){return s.charCodeAt(0)}function Pt(s,e){Array.isArray(s)?s.forEach(function(t){e.push(t)}):e.push(s)}function Fe(s,e){if(s[e]===!0)throw"duplicate flag "+e;s[e],s[e]=!0}function Se(s){if(s===void 0)throw Error("Internal Error - Should never get here!");return!0}function ta(){throw Error("Internal Error - Should never get here!")}function Rs(s){return s.type==="Character"}const gt=[];for(let s=y("0");s<=y("9");s++)gt.push(s);const At=[y("_")].concat(gt);for(let s=y("a");s<=y("z");s++)At.push(s);for(let s=y("A");s<=y("Z");s++)At.push(s);const Os=[y(" "),y("\f"),y(`
|
|
2
2
|
`),y("\r"),y(" "),y("\v"),y(" "),y(" "),y(" "),y(" "),y(" "),y(" "),y(" "),y(" "),y(" "),y(" "),y(" "),y(" "),y(" "),y(" "),y("\u2028"),y("\u2029"),y(" "),y(" "),y(" "),y("\uFEFF")],sa=/[0-9a-fA-F]/,tt=/[0-9]/,na=/[1-9]/;class ia{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const t=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Fe(n,"global");break;case"i":Fe(n,"ignoreCase");break;case"m":Fe(n,"multiLine");break;case"u":Fe(n,"unicode");break;case"y":Fe(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:t,loc:this.loc(0)}}disjunction(){const e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){const e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}break}}Se(t);const n=this.disjunction();return this.consumeChar(")"),{type:t,value:n,loc:this.loc(e)}}return ta()}quantifier(e=!1){let t;const n=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:i,atMost:i};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),t={atLeast:i,atMost:a}):t={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&t===void 0)return;Se(t);break}if(!(e===!0&&t===void 0)&&Se(t))return this.peekChar(0)==="?"?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(n),t}atom(){let e;const t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Se(e))return e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[y(`
|
|
3
3
|
`),y("\r"),y("\u2028"),y("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=gt;break;case"D":e=gt,t=!0;break;case"s":e=Os;break;case"S":e=Os,t=!0;break;case"w":e=At;break;case"W":e=At,t=!0;break}if(Se(e))return{type:"Set",value:e,complement:t}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=y("\f");break;case"n":e=y(`
|
|
4
4
|
`);break;case"r":e=y("\r");break;case"t":e=y(" ");break;case"v":e=y("\v");break}if(Se(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:y("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:y(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
package/dist/client/assets/{vennDiagram-Q3Y3IDCW-K7KAf26T.js → vennDiagram-Q3Y3IDCW-gQbZL_A6.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b8 as Wt,s as Kt,g as Ht,v as Yt,t as Xt,a as Zt,b as Jt,_ as S,M as St,R as Qt,ar as $t,ag as te,ah as ee,ai as ne,d as se,A as ie,O as re,P as oe}from"./mermaid.core-zxW6MBr-.js";import{s as rt}from"./transform-BqqRT-Iy.js";import"./index-Cga0qx1T.js";import"./BlintzCanvas-CYHsXAcY.js";import"./index-DksjixUS.js";import"./index-AzyLwYS_.js";const kt=(t,n)=>Wt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,r=0;const o=[];if(e.length>1){const l=Et(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-l.x,a.y-l.y)}e.sort((u,a)=>a.angle-u.angle);let h=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];r+=(h.x+a.x)*(a.y-h.y);const p={x:(a.x+h.x)/2,y:(a.y+h.y)/2};let d=null;for(let m=0;m<a.parentIndex.length;++m)if(h.parentIndex.includes(a.parentIndex[m])){const y=t[a.parentIndex[m]],M=Math.atan2(a.x-y.x,a.y-y.y),E=Math.atan2(h.x-y.x,h.y-y.y);let T=E-M;T<0&&(T+=2*Math.PI);const w=E-T/2;let g=K(p,{x:y.x+y.radius*Math.sin(w),y:y.y+y.radius*Math.cos(w)});g>y.radius*2&&(g=y.radius*2),(d==null||d.width>g)&&(d={circle:y,width:g,p1:a,p2:h,large:g>y.radius,sweep:!0})}d!=null&&(o.push(d),i+=lt(d.circle.radius,d.width),h=a)}}else{let l=t[0];for(let u=1;u<t.length;++u)t[u].radius<l.radius&&(l=t[u]);let h=!1;for(let u=0;u<t.length;++u)if(K(t[u],l)>Math.abs(l.radius-t[u].radius)){h=!0;break}h?i=r=0:(i=l.radius*l.radius*Math.PI,o.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-_t,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function ae(t,n){return n.every(s=>K(t,s)<s.radius+_t)}function le(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const r of i)r.parentIndex=[s,e],n.push(r)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function K(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=K(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),l=t.x+r*(n.x-t.x)/s,h=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),a=-(n.x-t.x)*(o/s);return[{x:l+u,y:h-a},{x:l-u,y:h+a}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function ce(t,n,s,e){e=e||{};const i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),l=t(s);let h=s-n;if(o*l>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(l===0)return s;for(let u=0;u<i;++u){h/=2;const a=n+h,p=t(a);if(p*o>=0&&(n=a),Math.abs(h)<r||p===0)return a}return n+h}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt(tt(t,t))}function ht(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function J(t,n,s,e,i){for(let r=0;r<t.length;++r)t[r]=n*s[r]+e*i[r]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,r=s.zeroDelta||.001,o=s.minErrorDelta||1e-6,l=s.minErrorDelta||1e-5,h=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,p=s.sigma!==void 0?s.sigma:.5;let d;const m=n.length,y=new Array(m+1);y[0]=n,y[0].fx=t(n),y[0].id=0;for(let v=0;v<m;++v){const c=n.slice();c[v]=c[v]?c[v]*i:r,y[v+1]=c,y[v+1].fx=t(c),y[v+1].id=v+1}function M(v){for(let c=0;c<v.length;c++)y[m][c]=v[c];y[m].fx=v.fx}const E=(v,c)=>v.fx-c.fx,T=n.slice(),w=n.slice(),g=n.slice(),b=n.slice();for(let v=0;v<e;++v){if(y.sort(E),s.history){const x=y.map(f=>{const O=f.slice();return O.fx=f.fx,O.id=f.id,O});x.sort((f,O)=>f.id-O.id),s.history.push({x:y[0].slice(),fx:y[0].fx,simplex:x})}d=0;for(let x=0;x<m;++x)d=Math.max(d,Math.abs(y[0][x]-y[1][x]));if(Math.abs(y[0].fx-y[m].fx)<o&&d<l)break;for(let x=0;x<m;++x){T[x]=0;for(let f=0;f<m;++f)T[x]+=y[f][x];T[x]/=m}const c=y[m];if(J(w,1+h,T,-h,c),w.fx=t(w),w.fx<y[0].fx)J(b,1+u,T,-u,c),b.fx=t(b),b.fx<w.fx?M(b):M(w);else if(w.fx>=y[m-1].fx){let x=!1;if(w.fx>c.fx?(J(g,1+a,T,-a,c),g.fx=t(g),g.fx<c.fx?M(g):x=!0):(J(g,1-a*h,T,a*h,c),g.fx=t(g),g.fx<w.fx?M(g):x=!0),x){if(p>=1)break;for(let f=1;f<y.length;++f)J(y[f],1-p,y[0],p,y[f]),y[f].fx=t(y[f])}}else M(w)}return y.sort(E),{fx:y[0].fx,x:y[0]}}function ue(t,n,s,e,i,r,o){const l=s.fx,h=tt(s.fxprime,n);let u=l,a=l,p=h,d=0;i=i||1,r=r||1e-6,o=o||.1;function m(y,M,E){for(let T=0;T<16;++T)if(i=(y+M)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),p=tt(e.fxprime,n),u>l+r*i*h||u>=E)M=i;else{if(Math.abs(p)<=-o*h)return i;p*(M-y)>=0&&(M=y),y=i,E=u}return 0}for(let y=0;y<10;++y){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),p=tt(e.fxprime,n),u>l+r*i*h||y&&u>=a)return m(d,i,a);if(Math.abs(p)<=-o*h)return i;if(p>=0)return m(i,d,u);a=u,d=i,i*=2}return i}function he(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const r=n.slice();let o,l,h=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),ht(o,e.fxprime,-1);for(let a=0;a<u;++a){if(h=ue(t,o,e,i,h),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),!h)ht(o,e.fxprime,-1);else{J(r,1,i.fxprime,-1,e.fxprime);const p=tt(e.fxprime,e.fxprime),d=Math.max(0,tt(r,i.fxprime)/p);J(o,d,o,-1,i.fxprime),l=e,e=i,i=l}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||xe,e=n.lossFunction||et,i=fe(t,n),r=s(i,n),o=Object.keys(r),l=[];for(const a of o)l.push(r[a].x),l.push(r[a].y);const u=zt(a=>{const p={};for(let d=0;d<o.length;++d){const m=o[d];p[m]={x:a[2*d],y:a[2*d+1],radius:r[m].radius}}return e(p,i)},l,n).x;for(let a=0;a<o.length;++a){const p=o[a];r[p].x=u[2*a],r[p].y=u[2*a+1]}return r}const Rt=1e-10;function ft(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):ce(e=>xt(t,n,e)-s,0,t+n)}function fe(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(s){const l=new Map;for(const h of e)for(let u=0;u<h.sets.length;u++){const a=String(h.sets[u]);l.set(a,h.size+(l.get(a)||0));for(let p=u+1;p<h.sets.length;p++){const d=String(h.sets[p]),m=`${a};${d}`,y=`${d};${a}`;l.set(m,h.size+(l.get(m)||0)),l.set(y,h.size+(l.get(y)||0))}}for(const h of e)h.sets.length<3&&(h.size=l.get(i(h.sets)))}const r=[],o=new Set;for(const l of e)if(l.sets.length===1)r.push(l.sets[0]);else if(l.sets.length===2){const h=l.sets[0],u=l.sets[1];o.add(i(l.sets)),o.add(i([u,h]))}r.sort((l,h)=>l===h?0:l<h?-1:1);for(let l=0;l<r.length;++l){const h=r[l];for(let u=l+1;u<r.length;++u){const a=r[u];o.has(i([h,a]))||e.push({sets:[h,a],size:0})}}return e}function de(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(r=>r.sets.length===2).forEach(r=>{const o=s[r.sets[0]],l=s[r.sets[1]],h=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ft(h,u,r.size);e[o][l]=e[l][o]=a;let p=0;r.size+1e-10>=Math.min(n[o].size,n[l].size)?p=1:r.size<=1e-10&&(p=-1),i[o][l]=i[l][o]=p}),{distances:e,constraints:i}}function ge(t,n,s,e){for(let r=0;r<n.length;++r)n[r]=0;let i=0;for(let r=0;r<s.length;++r){const o=t[2*r],l=t[2*r+1];for(let h=r+1;h<s.length;++h){const u=t[2*h],a=t[2*h+1],p=s[r][h],d=e[r][h],m=(u-o)*(u-o)+(a-l)*(a-l),y=Math.sqrt(m),M=m-p*p;d>0&&y<=p||d<0&&y>=p||(i+=2*M*M,n[2*r]+=4*M*(o-u),n[2*r+1]+=4*M*(l-a),n[2*h]+=4*M*(u-o),n[2*h+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=ye(t,n),r=e(i,t),o=e(s,t);r+1e-8<o&&(s=i)}return s}function ye(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:r,constraints:o}=de(t,e,i);const l=ut(r.map(ut))/r.length;r=r.map(d=>d.map(m=>m/l));const h=(d,m)=>ge(d,m,r,o);let u=null;for(let d=0;d<s;++d){const m=ct(r.length*2).map(Math.random),y=he(h,m,n);(!u||y.fx<u.fx)&&(u=y)}const a=u.x,p={};for(let d=0;d<e.length;++d){const m=e[d];p[m.sets[0]]={x:a[2*d]*l,y:a[2*d+1]*l,radius:Math.sqrt(m.size/Math.PI)}}if(n.history)for(const d of n.history)ht(d.x,l);return p}function pe(t,n){const s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(const p of t)if(p.sets.length===1){const d=p.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:p.size,radius:Math.sqrt(p.size/Math.PI)},i[d]=[]}t=t.filter(p=>p.sets.length===2);for(const p of t){let d=p.weight!=null?p.weight:1;const m=p.sets[0],y=p.sets[1];p.size+Rt>=Math.min(e[m].size,e[y].size)&&(d=0),i[m].push({set:y,size:p.size,weight:d}),i[y].push({set:m,size:p.size,weight:d})}const r=[];Object.keys(i).forEach(p=>{let d=0;for(let m=0;m<i[p].length;++m)d+=i[p][m].size*i[p][m].weight;r.push({set:p,size:d})});function o(p,d){return d.size-p.size}r.sort(o);const l={};function h(p){return p.set in l}function u(p,d){e[d].x=p.x,e[d].y=p.y,l[d]=!0}u({x:0,y:0},r[0].set);for(let p=1;p<r.length;++p){const d=r[p].set,m=i[d].filter(h),y=e[d];if(m.sort(o),m.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<m.length;++a){const w=e[m[a].set],g=ft(y.radius,w.radius,m[a].size);M.push({x:w.x+g,y:w.y}),M.push({x:w.x-g,y:w.y}),M.push({y:w.y+g,x:w.x}),M.push({y:w.y-g,x:w.x});for(let b=a+1;b<m.length;++b){const v=e[m[b].set],c=ft(y.radius,v.radius,m[b].size),x=Tt({x:w.x,y:w.y,radius:g},{x:v.x,y:v.y,radius:c});M.push(...x)}}let E=1e50,T=M[0];for(const w of M){e[d].x=w.x,e[d].y=w.y;const g=s(e,t);g<E&&(E=g,T=w)}u(T,d)}return e}function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const o=t[e.sets[0]],l=t[e.sets[1]];i=xt(o.radius,l.radius,K(o,l))}else i=st(e.sets.map(o=>t[o]));const r=e.weight!=null?e.weight:1;s+=r*(i-e.size)*(i-e.size)}return s}function Ct(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],h=t[e.sets[1]];i=xt(l.radius,h.radius,K(l,h))}else i=st(e.sets.map(l=>t[l]));const r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function me(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,r=t[0].y;for(const o of t)o.x-=i,o.y-=r}if(t.length===2&&K(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,r=Math.cos(i),o=Math.sin(i);for(const l of t){const h=l.x,u=l.y;l.x=r*h-o*u,l.y=o*h+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const r=t[1].y/(1e-10+t[1].x);for(const o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){const o=n(i),l=n(r);o.parent=l}for(let i=0;i<t.length;++i)for(let r=i+1;r<t.length;++r){const o=t[i].radius+t[r].radius;K(t[i],t[r])+1e-10<o&&s(t[r],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const r=n(t[i]).parent.setid;e.has(r)||e.set(r,[]),e.get(r).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let r=e.bounds;const o=(r.xRange.max-r.xRange.min)/50;function l(u,a,p){if(!u)return;const d=u.bounds;let m,y;if(a)m=r.xRange.max-d.xRange.min+o;else{m=r.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;M<0&&(m+=M)}if(p)y=r.yRange.max-d.yRange.min+o;else{y=r.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;M<0&&(y+=M)}for(const M of u)M.x+=m,M.y+=y,e.push(M)}let h=1;for(;h<i.length;)l(i[h],!0,!1),l(i[h+1],!1,!0),l(i[h+2],!0,!0),h+=3,r=dt(e);return Nt(e)}function Ot(t,n,s,e,i){const r=Ft(t);n-=2*e,s-=2*e;const{xRange:o,yRange:l}=dt(r);if(o.max===o.min||l.max===l.min)return console.log("not scaling solution: zero size detected"),t;let h,u;if(i){const m=Math.sqrt(i/Math.PI)*2;h=n/m,u=s/m}else h=n/(o.max-o.min),u=s/(l.max-l.min);const a=Math.min(u,h),p=(n-(o.max-o.min)*a)/2,d=(s-(l.max-l.min)*a)/2;return Nt(r.map(m=>({radius:a*m.radius,x:e+p+(m.x-o.min)*a,y:e+d+(m.y-l.min)*a,setid:m.setid})))}function Nt(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,l=!0,h=null,u=!0,a=!0,p=null,d=null,m=!1,y=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},T=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=function(x){if(x in E)return E[x];var f=E[x]=T[w];return w+=1,w>=T.length&&(w=0),f},b=At,v=et;function c(x){let f=x.datum();const O=new Set;f.forEach(I=>{I.size==0&&I.sets.length==1&&O.add(I.sets[0])}),f=f.filter(I=>!I.sets.some(C=>O.has(C)));let k={},D={};if(f.length>0){let I=b(f,{lossFunction:v,distinct:m});l&&(I=Dt(I,o,d)),k=Ot(I,s,e,i,h),D=Lt(k,f,M)}const X={};f.forEach(I=>{I.label&&(X[I.sets]=I.label)});function G(I){if(I.sets in X)return X[I.sets];if(I.sets.length==1)return""+I.sets[0]}x.selectAll("svg").data([k]).enter().append("svg");const B=x.select("svg");n?B.attr("viewBox",`0 0 ${s} ${e}`):B.attr("width",s).attr("height",e);const V={};let z=!1;B.selectAll(".venn-area path").each(function(I){const C=this.getAttribute("d");I.sets.length==1&&C&&!m&&(z=!0,V[I.sets[0]]=Me(C))});function q(I){return C=>{const H=I.sets.map(Q=>{let W=V[Q],Y=k[Q];return W||(W={x:s/2,y:e/2,radius:1}),Y||(Y={x:s/2,y:e/2,radius:1}),{x:W.x*(1-C)+Y.x*C,y:W.y*(1-C)+Y.y*C,radius:W.radius*(1-C)+Y.radius*C}});return wt(H,y)}}const R=B.selectAll(".venn-area").data(f,I=>I.sets),N=R.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),j=N.append("path"),L=N.append("text").attr("class","label").text(I=>G(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(j.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:g(I.sets)).style("fill-opacity",".25"),L.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?g(I.sets):"#444"));function P(I){return typeof I.transition=="function"?I.transition("venn").duration(r):I}let _=x;z&&typeof _.transition=="function"?(_=P(x),_.selectAll("path").attrTween("d",q)):_.selectAll("path").attr("d",I=>wt(I.sets.map(C=>k[C])),y);const F=_.selectAll("text").filter(I=>I.sets in D).text(I=>G(I)).attr("x",I=>Math.floor(D[I.sets].x)).attr("y",I=>Math.floor(D[I.sets].y));u&&(z?"on"in F?F.on("end",ot(k,G)):F.each("end",ot(k,G)):F.each(ot(k,G)));const A=P(R.exit()).remove();typeof R.transition=="function"&&A.selectAll("path").attrTween("d",q);const Z=A.selectAll("text").attr("x",s/2).attr("y",e/2);return p!==null&&(L.style("font-size","0px"),F.style("font-size",p),Z.style("font-size","0px")),{circles:k,textCentres:D,nodes:R,enter:N,update:_,exit:A}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(m=x,c):m},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(p=x,c):p},c.round=function(x){return arguments.length?(y=x,c):y},c.duration=function(x){return arguments.length?(r=x,c):r},c.layoutFunction=function(x){return arguments.length?(b=x,c):b},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(h=x,c):h},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(o=x,c):o},c.orientationOrder=function(x){return arguments.length?(d=x,c):d},c.lossFunction=function(x){return arguments.length?(v=x==="default"?et:x==="logRatio"?Ct:x,c):v},c}function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),h=(r.length+o.length)/3;let u=o.pop(),a=[u],p=0;const d=1.1;e.textContent=null;const m=[];function y(g){const b=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return b.textContent=g,m.push(b),e.append(b),b}let M=y(u);for(;u=o.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>h&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=y(u),p++)}const E=.35-p*d/2,T=e.getAttribute("x"),w=e.getAttribute("y");m.forEach((g,b)=>{g.setAttribute("x",T),g.setAttribute("y",w),g.setAttribute("dy",`${E+b*d}em`)})}}function at(t,n,s){let e=n[0].radius-K(n[0],t);for(let i=1;i<n.length;++i){const r=n[i].radius-K(n[i],t);r<=e&&(e=r)}for(let i=0;i<s.length;++i){const r=K(s[i],t)-s[i].radius;r<=e&&(e=r)}return e}function jt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],r=at(e[0],t,n);for(let a=1;a<e.length;++a){const p=at(e[a],t,n);p>=r&&(i=e[a],r=p)}const o=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:o[0],y:o[1]};let h=!0;for(const a of t)if(K(l,a)>a.radius){h=!1;break}for(const a of n)if(K(l,a)<a.radius){h=!1;break}if(h)return l;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?jt(t,[]):Et(u.arcs.map(a=>a.p1))}function Ie(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],r=t[i];for(let o=e+1;o<s.length;++o){const l=s[o],h=t[l],u=K(r,h);u+h.radius<=r.radius+1e-10?n[l].push(i):u+r.radius<=h.radius+1e-10&&n[i].push(l)}}return n}function Lt(t,n,s){const e={},i=Ie(t);for(let r=0;r<n.length;++r){const o=n[r].sets,l={},h={};for(let d=0;d<o.length;++d){l[o[d]]=!0;const m=i[o[d]];for(let y=0;y<m.length;++y)h[m[y]]=!0}const u=[],a=[];for(let d in t)d in l?u.push(t[d]):d in h||a.push(t[d]);const p=jt(u,a,s);e[o]=p,p.disjoint&&n[r].size>0&&console.log("WARNING: area "+o+" not represented on screen")}return e}function ke(t,n,s){const e=[];return e.push(`
|
|
1
|
+
import{b8 as Wt,s as Kt,g as Ht,v as Yt,t as Xt,a as Zt,b as Jt,_ as S,M as St,R as Qt,ar as $t,ag as te,ah as ee,ai as ne,d as se,A as ie,O as re,P as oe}from"./mermaid.core-SX8SzrsU.js";import{s as rt}from"./transform-BqqRT-Iy.js";import"./index-C3cvP8Fo.js";import"./BlintzCanvas-b30dG4gx.js";import"./index-BIB-maE5.js";import"./index-DabU6r9W.js";const kt=(t,n)=>Wt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,r=0;const o=[];if(e.length>1){const l=Et(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-l.x,a.y-l.y)}e.sort((u,a)=>a.angle-u.angle);let h=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];r+=(h.x+a.x)*(a.y-h.y);const p={x:(a.x+h.x)/2,y:(a.y+h.y)/2};let d=null;for(let m=0;m<a.parentIndex.length;++m)if(h.parentIndex.includes(a.parentIndex[m])){const y=t[a.parentIndex[m]],M=Math.atan2(a.x-y.x,a.y-y.y),E=Math.atan2(h.x-y.x,h.y-y.y);let T=E-M;T<0&&(T+=2*Math.PI);const w=E-T/2;let g=K(p,{x:y.x+y.radius*Math.sin(w),y:y.y+y.radius*Math.cos(w)});g>y.radius*2&&(g=y.radius*2),(d==null||d.width>g)&&(d={circle:y,width:g,p1:a,p2:h,large:g>y.radius,sweep:!0})}d!=null&&(o.push(d),i+=lt(d.circle.radius,d.width),h=a)}}else{let l=t[0];for(let u=1;u<t.length;++u)t[u].radius<l.radius&&(l=t[u]);let h=!1;for(let u=0;u<t.length;++u)if(K(t[u],l)>Math.abs(l.radius-t[u].radius)){h=!0;break}h?i=r=0:(i=l.radius*l.radius*Math.PI,o.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-_t,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function ae(t,n){return n.every(s=>K(t,s)<s.radius+_t)}function le(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const r of i)r.parentIndex=[s,e],n.push(r)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function K(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=K(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),l=t.x+r*(n.x-t.x)/s,h=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),a=-(n.x-t.x)*(o/s);return[{x:l+u,y:h-a},{x:l-u,y:h+a}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function ce(t,n,s,e){e=e||{};const i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),l=t(s);let h=s-n;if(o*l>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(l===0)return s;for(let u=0;u<i;++u){h/=2;const a=n+h,p=t(a);if(p*o>=0&&(n=a),Math.abs(h)<r||p===0)return a}return n+h}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt(tt(t,t))}function ht(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function J(t,n,s,e,i){for(let r=0;r<t.length;++r)t[r]=n*s[r]+e*i[r]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,r=s.zeroDelta||.001,o=s.minErrorDelta||1e-6,l=s.minErrorDelta||1e-5,h=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,p=s.sigma!==void 0?s.sigma:.5;let d;const m=n.length,y=new Array(m+1);y[0]=n,y[0].fx=t(n),y[0].id=0;for(let v=0;v<m;++v){const c=n.slice();c[v]=c[v]?c[v]*i:r,y[v+1]=c,y[v+1].fx=t(c),y[v+1].id=v+1}function M(v){for(let c=0;c<v.length;c++)y[m][c]=v[c];y[m].fx=v.fx}const E=(v,c)=>v.fx-c.fx,T=n.slice(),w=n.slice(),g=n.slice(),b=n.slice();for(let v=0;v<e;++v){if(y.sort(E),s.history){const x=y.map(f=>{const O=f.slice();return O.fx=f.fx,O.id=f.id,O});x.sort((f,O)=>f.id-O.id),s.history.push({x:y[0].slice(),fx:y[0].fx,simplex:x})}d=0;for(let x=0;x<m;++x)d=Math.max(d,Math.abs(y[0][x]-y[1][x]));if(Math.abs(y[0].fx-y[m].fx)<o&&d<l)break;for(let x=0;x<m;++x){T[x]=0;for(let f=0;f<m;++f)T[x]+=y[f][x];T[x]/=m}const c=y[m];if(J(w,1+h,T,-h,c),w.fx=t(w),w.fx<y[0].fx)J(b,1+u,T,-u,c),b.fx=t(b),b.fx<w.fx?M(b):M(w);else if(w.fx>=y[m-1].fx){let x=!1;if(w.fx>c.fx?(J(g,1+a,T,-a,c),g.fx=t(g),g.fx<c.fx?M(g):x=!0):(J(g,1-a*h,T,a*h,c),g.fx=t(g),g.fx<w.fx?M(g):x=!0),x){if(p>=1)break;for(let f=1;f<y.length;++f)J(y[f],1-p,y[0],p,y[f]),y[f].fx=t(y[f])}}else M(w)}return y.sort(E),{fx:y[0].fx,x:y[0]}}function ue(t,n,s,e,i,r,o){const l=s.fx,h=tt(s.fxprime,n);let u=l,a=l,p=h,d=0;i=i||1,r=r||1e-6,o=o||.1;function m(y,M,E){for(let T=0;T<16;++T)if(i=(y+M)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),p=tt(e.fxprime,n),u>l+r*i*h||u>=E)M=i;else{if(Math.abs(p)<=-o*h)return i;p*(M-y)>=0&&(M=y),y=i,E=u}return 0}for(let y=0;y<10;++y){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),p=tt(e.fxprime,n),u>l+r*i*h||y&&u>=a)return m(d,i,a);if(Math.abs(p)<=-o*h)return i;if(p>=0)return m(i,d,u);a=u,d=i,i*=2}return i}function he(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const r=n.slice();let o,l,h=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),ht(o,e.fxprime,-1);for(let a=0;a<u;++a){if(h=ue(t,o,e,i,h),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),!h)ht(o,e.fxprime,-1);else{J(r,1,i.fxprime,-1,e.fxprime);const p=tt(e.fxprime,e.fxprime),d=Math.max(0,tt(r,i.fxprime)/p);J(o,d,o,-1,i.fxprime),l=e,e=i,i=l}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||xe,e=n.lossFunction||et,i=fe(t,n),r=s(i,n),o=Object.keys(r),l=[];for(const a of o)l.push(r[a].x),l.push(r[a].y);const u=zt(a=>{const p={};for(let d=0;d<o.length;++d){const m=o[d];p[m]={x:a[2*d],y:a[2*d+1],radius:r[m].radius}}return e(p,i)},l,n).x;for(let a=0;a<o.length;++a){const p=o[a];r[p].x=u[2*a],r[p].y=u[2*a+1]}return r}const Rt=1e-10;function ft(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):ce(e=>xt(t,n,e)-s,0,t+n)}function fe(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(s){const l=new Map;for(const h of e)for(let u=0;u<h.sets.length;u++){const a=String(h.sets[u]);l.set(a,h.size+(l.get(a)||0));for(let p=u+1;p<h.sets.length;p++){const d=String(h.sets[p]),m=`${a};${d}`,y=`${d};${a}`;l.set(m,h.size+(l.get(m)||0)),l.set(y,h.size+(l.get(y)||0))}}for(const h of e)h.sets.length<3&&(h.size=l.get(i(h.sets)))}const r=[],o=new Set;for(const l of e)if(l.sets.length===1)r.push(l.sets[0]);else if(l.sets.length===2){const h=l.sets[0],u=l.sets[1];o.add(i(l.sets)),o.add(i([u,h]))}r.sort((l,h)=>l===h?0:l<h?-1:1);for(let l=0;l<r.length;++l){const h=r[l];for(let u=l+1;u<r.length;++u){const a=r[u];o.has(i([h,a]))||e.push({sets:[h,a],size:0})}}return e}function de(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(r=>r.sets.length===2).forEach(r=>{const o=s[r.sets[0]],l=s[r.sets[1]],h=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ft(h,u,r.size);e[o][l]=e[l][o]=a;let p=0;r.size+1e-10>=Math.min(n[o].size,n[l].size)?p=1:r.size<=1e-10&&(p=-1),i[o][l]=i[l][o]=p}),{distances:e,constraints:i}}function ge(t,n,s,e){for(let r=0;r<n.length;++r)n[r]=0;let i=0;for(let r=0;r<s.length;++r){const o=t[2*r],l=t[2*r+1];for(let h=r+1;h<s.length;++h){const u=t[2*h],a=t[2*h+1],p=s[r][h],d=e[r][h],m=(u-o)*(u-o)+(a-l)*(a-l),y=Math.sqrt(m),M=m-p*p;d>0&&y<=p||d<0&&y>=p||(i+=2*M*M,n[2*r]+=4*M*(o-u),n[2*r+1]+=4*M*(l-a),n[2*h]+=4*M*(u-o),n[2*h+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=ye(t,n),r=e(i,t),o=e(s,t);r+1e-8<o&&(s=i)}return s}function ye(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:r,constraints:o}=de(t,e,i);const l=ut(r.map(ut))/r.length;r=r.map(d=>d.map(m=>m/l));const h=(d,m)=>ge(d,m,r,o);let u=null;for(let d=0;d<s;++d){const m=ct(r.length*2).map(Math.random),y=he(h,m,n);(!u||y.fx<u.fx)&&(u=y)}const a=u.x,p={};for(let d=0;d<e.length;++d){const m=e[d];p[m.sets[0]]={x:a[2*d]*l,y:a[2*d+1]*l,radius:Math.sqrt(m.size/Math.PI)}}if(n.history)for(const d of n.history)ht(d.x,l);return p}function pe(t,n){const s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(const p of t)if(p.sets.length===1){const d=p.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:p.size,radius:Math.sqrt(p.size/Math.PI)},i[d]=[]}t=t.filter(p=>p.sets.length===2);for(const p of t){let d=p.weight!=null?p.weight:1;const m=p.sets[0],y=p.sets[1];p.size+Rt>=Math.min(e[m].size,e[y].size)&&(d=0),i[m].push({set:y,size:p.size,weight:d}),i[y].push({set:m,size:p.size,weight:d})}const r=[];Object.keys(i).forEach(p=>{let d=0;for(let m=0;m<i[p].length;++m)d+=i[p][m].size*i[p][m].weight;r.push({set:p,size:d})});function o(p,d){return d.size-p.size}r.sort(o);const l={};function h(p){return p.set in l}function u(p,d){e[d].x=p.x,e[d].y=p.y,l[d]=!0}u({x:0,y:0},r[0].set);for(let p=1;p<r.length;++p){const d=r[p].set,m=i[d].filter(h),y=e[d];if(m.sort(o),m.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<m.length;++a){const w=e[m[a].set],g=ft(y.radius,w.radius,m[a].size);M.push({x:w.x+g,y:w.y}),M.push({x:w.x-g,y:w.y}),M.push({y:w.y+g,x:w.x}),M.push({y:w.y-g,x:w.x});for(let b=a+1;b<m.length;++b){const v=e[m[b].set],c=ft(y.radius,v.radius,m[b].size),x=Tt({x:w.x,y:w.y,radius:g},{x:v.x,y:v.y,radius:c});M.push(...x)}}let E=1e50,T=M[0];for(const w of M){e[d].x=w.x,e[d].y=w.y;const g=s(e,t);g<E&&(E=g,T=w)}u(T,d)}return e}function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const o=t[e.sets[0]],l=t[e.sets[1]];i=xt(o.radius,l.radius,K(o,l))}else i=st(e.sets.map(o=>t[o]));const r=e.weight!=null?e.weight:1;s+=r*(i-e.size)*(i-e.size)}return s}function Ct(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],h=t[e.sets[1]];i=xt(l.radius,h.radius,K(l,h))}else i=st(e.sets.map(l=>t[l]));const r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function me(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,r=t[0].y;for(const o of t)o.x-=i,o.y-=r}if(t.length===2&&K(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,r=Math.cos(i),o=Math.sin(i);for(const l of t){const h=l.x,u=l.y;l.x=r*h-o*u,l.y=o*h+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const r=t[1].y/(1e-10+t[1].x);for(const o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){const o=n(i),l=n(r);o.parent=l}for(let i=0;i<t.length;++i)for(let r=i+1;r<t.length;++r){const o=t[i].radius+t[r].radius;K(t[i],t[r])+1e-10<o&&s(t[r],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const r=n(t[i]).parent.setid;e.has(r)||e.set(r,[]),e.get(r).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let r=e.bounds;const o=(r.xRange.max-r.xRange.min)/50;function l(u,a,p){if(!u)return;const d=u.bounds;let m,y;if(a)m=r.xRange.max-d.xRange.min+o;else{m=r.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;M<0&&(m+=M)}if(p)y=r.yRange.max-d.yRange.min+o;else{y=r.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;M<0&&(y+=M)}for(const M of u)M.x+=m,M.y+=y,e.push(M)}let h=1;for(;h<i.length;)l(i[h],!0,!1),l(i[h+1],!1,!0),l(i[h+2],!0,!0),h+=3,r=dt(e);return Nt(e)}function Ot(t,n,s,e,i){const r=Ft(t);n-=2*e,s-=2*e;const{xRange:o,yRange:l}=dt(r);if(o.max===o.min||l.max===l.min)return console.log("not scaling solution: zero size detected"),t;let h,u;if(i){const m=Math.sqrt(i/Math.PI)*2;h=n/m,u=s/m}else h=n/(o.max-o.min),u=s/(l.max-l.min);const a=Math.min(u,h),p=(n-(o.max-o.min)*a)/2,d=(s-(l.max-l.min)*a)/2;return Nt(r.map(m=>({radius:a*m.radius,x:e+p+(m.x-o.min)*a,y:e+d+(m.y-l.min)*a,setid:m.setid})))}function Nt(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,l=!0,h=null,u=!0,a=!0,p=null,d=null,m=!1,y=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},T=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=function(x){if(x in E)return E[x];var f=E[x]=T[w];return w+=1,w>=T.length&&(w=0),f},b=At,v=et;function c(x){let f=x.datum();const O=new Set;f.forEach(I=>{I.size==0&&I.sets.length==1&&O.add(I.sets[0])}),f=f.filter(I=>!I.sets.some(C=>O.has(C)));let k={},D={};if(f.length>0){let I=b(f,{lossFunction:v,distinct:m});l&&(I=Dt(I,o,d)),k=Ot(I,s,e,i,h),D=Lt(k,f,M)}const X={};f.forEach(I=>{I.label&&(X[I.sets]=I.label)});function G(I){if(I.sets in X)return X[I.sets];if(I.sets.length==1)return""+I.sets[0]}x.selectAll("svg").data([k]).enter().append("svg");const B=x.select("svg");n?B.attr("viewBox",`0 0 ${s} ${e}`):B.attr("width",s).attr("height",e);const V={};let z=!1;B.selectAll(".venn-area path").each(function(I){const C=this.getAttribute("d");I.sets.length==1&&C&&!m&&(z=!0,V[I.sets[0]]=Me(C))});function q(I){return C=>{const H=I.sets.map(Q=>{let W=V[Q],Y=k[Q];return W||(W={x:s/2,y:e/2,radius:1}),Y||(Y={x:s/2,y:e/2,radius:1}),{x:W.x*(1-C)+Y.x*C,y:W.y*(1-C)+Y.y*C,radius:W.radius*(1-C)+Y.radius*C}});return wt(H,y)}}const R=B.selectAll(".venn-area").data(f,I=>I.sets),N=R.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),j=N.append("path"),L=N.append("text").attr("class","label").text(I=>G(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(j.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:g(I.sets)).style("fill-opacity",".25"),L.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?g(I.sets):"#444"));function P(I){return typeof I.transition=="function"?I.transition("venn").duration(r):I}let _=x;z&&typeof _.transition=="function"?(_=P(x),_.selectAll("path").attrTween("d",q)):_.selectAll("path").attr("d",I=>wt(I.sets.map(C=>k[C])),y);const F=_.selectAll("text").filter(I=>I.sets in D).text(I=>G(I)).attr("x",I=>Math.floor(D[I.sets].x)).attr("y",I=>Math.floor(D[I.sets].y));u&&(z?"on"in F?F.on("end",ot(k,G)):F.each("end",ot(k,G)):F.each(ot(k,G)));const A=P(R.exit()).remove();typeof R.transition=="function"&&A.selectAll("path").attrTween("d",q);const Z=A.selectAll("text").attr("x",s/2).attr("y",e/2);return p!==null&&(L.style("font-size","0px"),F.style("font-size",p),Z.style("font-size","0px")),{circles:k,textCentres:D,nodes:R,enter:N,update:_,exit:A}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(m=x,c):m},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(p=x,c):p},c.round=function(x){return arguments.length?(y=x,c):y},c.duration=function(x){return arguments.length?(r=x,c):r},c.layoutFunction=function(x){return arguments.length?(b=x,c):b},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(h=x,c):h},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(o=x,c):o},c.orientationOrder=function(x){return arguments.length?(d=x,c):d},c.lossFunction=function(x){return arguments.length?(v=x==="default"?et:x==="logRatio"?Ct:x,c):v},c}function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),h=(r.length+o.length)/3;let u=o.pop(),a=[u],p=0;const d=1.1;e.textContent=null;const m=[];function y(g){const b=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return b.textContent=g,m.push(b),e.append(b),b}let M=y(u);for(;u=o.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>h&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=y(u),p++)}const E=.35-p*d/2,T=e.getAttribute("x"),w=e.getAttribute("y");m.forEach((g,b)=>{g.setAttribute("x",T),g.setAttribute("y",w),g.setAttribute("dy",`${E+b*d}em`)})}}function at(t,n,s){let e=n[0].radius-K(n[0],t);for(let i=1;i<n.length;++i){const r=n[i].radius-K(n[i],t);r<=e&&(e=r)}for(let i=0;i<s.length;++i){const r=K(s[i],t)-s[i].radius;r<=e&&(e=r)}return e}function jt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],r=at(e[0],t,n);for(let a=1;a<e.length;++a){const p=at(e[a],t,n);p>=r&&(i=e[a],r=p)}const o=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:o[0],y:o[1]};let h=!0;for(const a of t)if(K(l,a)>a.radius){h=!1;break}for(const a of n)if(K(l,a)<a.radius){h=!1;break}if(h)return l;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?jt(t,[]):Et(u.arcs.map(a=>a.p1))}function Ie(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],r=t[i];for(let o=e+1;o<s.length;++o){const l=s[o],h=t[l],u=K(r,h);u+h.radius<=r.radius+1e-10?n[l].push(i):u+r.radius<=h.radius+1e-10&&n[i].push(l)}}return n}function Lt(t,n,s){const e={},i=Ie(t);for(let r=0;r<n.length;++r){const o=n[r].sets,l={},h={};for(let d=0;d<o.length;++d){l[o[d]]=!0;const m=i[o[d]];for(let y=0;y<m.length;++y)h[m[y]]=!0}const u=[],a=[];for(let d in t)d in l?u.push(t[d]):d in h||a.push(t[d]);const p=jt(u,a,s);e[o]=p,p.disjoint&&n[r].size>0&&console.log("WARNING: area "+o+" not represented on screen")}return e}function ke(t,n,s){const e=[];return e.push(`
|
|
2
2
|
M`,t,n),e.push(`
|
|
3
3
|
m`,-s,0),e.push(`
|
|
4
4
|
a`,s,s,0,1,0,s*2,0),e.push(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as zt}from"./chunk-JWPE2WC7-
|
|
1
|
+
import{p as zt}from"./chunk-JWPE2WC7-BWr2ST9i.js";import{s as Lt,g as Tt,v as At,t as Xt,a as Et,b as Yt,_ as y,a7 as It,M as Bt,O as Q,l as et,R as Ft,d as Rt,A as Ot,c as V}from"./mermaid.core-SX8SzrsU.js";import{p as Wt}from"./cynefin-EF2NZ3EQ-CAn6ufHs.js";import"./index-C3cvP8Fo.js";import"./BlintzCanvas-b30dG4gx.js";import"./index-BIB-maE5.js";import"./index-DabU6r9W.js";import"./transform-BqqRT-Iy.js";var G=y((a,o)=>{const e=a<=1?a*100:a;if(e<0||e>100)throw new Error(`${o} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return e},"toPercent"),E=y((a,o,e)=>({x:G(o,`${e} evolution`),y:G(a,`${e} visibility`)}),"toCoordinates"),tt=y(a=>{if(a){if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward"}},"getFlowFromPort"),Dt=y(a=>{if(!(a!=null&&a.startsWith("+")))return{};const o=/^\+'([^']*)'/.exec(a),e=o==null?void 0:o[1];return a.includes("<>")?{flow:"bidirectional",label:e}:a.includes("<")?{flow:"backward",label:e}:a.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Gt=y((a,o)=>{if(zt(a,o),a.size&&o.setSize(a.size.width,a.size.height),a.evolution){const e=a.evolution.stages.map(r=>r.secondName?`${r.name.trim()} / ${r.secondName.trim()}`:r.name.trim()),p=a.evolution.stages.filter(r=>r.boundary!==void 0).map(r=>r.boundary);o.updateAxes({stages:e,stageBoundaries:p})}if(a.anchors.forEach(e=>{const p=E(e.visibility,e.evolution,`Anchor "${e.name}"`);o.addNode(e.name,e.name,p.x,p.y,"anchor")}),a.components.forEach(e=>{var v;const p=E(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=(v=e.decorator)==null?void 0:v.strategy;o.addNode(e.name,e.name,p.x,p.y,"component",r,d,e.inertia,m)}),a.notes.forEach(e=>{const p=E(e.visibility,e.evolution,`Note "${e.text}"`);o.addNote(e.text,p.x,p.y)}),a.pipelines.forEach(e=>{const p=o.getNode(e.parent);if(!p||typeof p.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const r=p.y;o.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,v=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,L=G(d.evolution,`Pipeline component "${d.name}" evolution`);o.addNode(m,d.name,L,r,"pipeline-component",v,g),o.addPipelineComponent(e.parent,m)})}),a.links.forEach(e=>{const p=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let r=tt(e.fromPort)??tt(e.toPort);const{flow:d,label:m}=Dt(e.arrow);!r&&d&&(r=d);const v=e.linkLabel,g=m??v;o.addLink(o.resolveNodeId(e.from),o.resolveNodeId(e.to),p,g,r)}),a.evolves.forEach(e=>{const p=o.getNode(e.component);if((p==null?void 0:p.y)!==void 0){const r=G(e.target,`Evolve target for "${e.component}"`);o.addTrend(e.component,r,p.y)}}),a.annotations.length>0){const e=a.annotations[0],p=E(e.x,e.y,"Annotations box");o.setAnnotationsBox(p.x,p.y)}a.annotation.forEach(e=>{const p=E(e.x,e.y,`Annotation ${e.number}`);o.addAnnotation(e.number,[{x:p.x,y:p.y}],e.text)}),a.accelerators.forEach(e=>{const p=E(e.x,e.y,`Accelerator "${e.name}"`);o.addAccelerator(e.name,p.x,p.y)}),a.deaccelerators.forEach(e=>{const p=E(e.x,e.y,`Deaccelerator "${e.name}"`);o.addDeaccelerator(e.name,p.x,p.y)})},"populateDb"),at={parser:{yy:void 0},parse:y(async a=>{var p;const o=await Wt("wardley",a);et.debug(o);const e=(p=at.parser)==null?void 0:p.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Gt(o,e)},"parse")},I,qt=(I=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(o){const e=this.nodes.get(o.id)??{id:o.id,label:o.label},p={...e,...o,className:o.className??e.className,labelOffsetX:o.labelOffsetX??e.labelOffsetX,labelOffsetY:o.labelOffsetY??e.labelOffsetY};this.nodes.set(o.id,p)}addLink(o){this.links.push(o)}addTrend(o){this.trends.set(o.nodeId,o)}startPipeline(o){this.pipelines.set(o,{nodeId:o,componentIds:[]});const e=this.nodes.get(o);e&&(e.isPipelineParent=!0)}addPipelineComponent(o,e){const p=this.pipelines.get(o);p&&p.componentIds.push(e);const r=this.nodes.get(e);r&&(r.inPipeline=!0)}addAnnotation(o){this.annotations.push(o)}addNote(o){this.notes.push(o)}addAccelerator(o){this.accelerators.push(o)}addDeaccelerator(o){this.deaccelerators.push(o)}setAnnotationsBox(o,e){this.annotationsBox={x:o,y:e}}setAxes(o){this.axes={...this.axes,...o}}setSize(o,e){this.size={width:o,height:e}}getNode(o){return this.nodes.get(o)}resolveNodeId(o){if(this.nodes.has(o))return o;for(const[e,p]of this.nodes)if(p.label===o)return e;return o}build(){const o=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);o.push(e)}return{nodes:o,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},y(I,"WardleyBuilder"),I),b=new qt;function rt(){return V()["wardley-beta"]}y(rt,"getConfig");function ot(a,o,e,p,r,d,m,v,g){b.addNode({id:a,label:o,x:e,y:p,className:r,labelOffsetX:d,labelOffsetY:m,inertia:v,sourceStrategy:g})}y(ot,"addNode");function st(a,o,e=!1,p,r){b.addLink({source:a,target:o,dashed:e,label:p,flow:r})}y(st,"addLink");function nt(a,o,e){b.addTrend({nodeId:a,targetX:o,targetY:e})}y(nt,"addTrend");function it(a,o,e){b.addAnnotation({number:a,coordinates:o,text:e})}y(it,"addAnnotation");function dt(a,o,e){b.addNote({text:a,x:o,y:e})}y(dt,"addNote");function lt(a,o,e){b.addAccelerator({name:a,x:o,y:e})}y(lt,"addAccelerator");function ct(a,o,e){b.addDeaccelerator({name:a,x:o,y:e})}y(ct,"addDeaccelerator");function pt(a,o){b.setAnnotationsBox(a,o)}y(pt,"setAnnotationsBox");function ht(a,o){b.setSize(a,o)}y(ht,"setSize");function xt(a){b.startPipeline(a)}y(xt,"startPipeline");function ft(a,o){b.addPipelineComponent(a,o)}y(ft,"addPipelineComponent");function gt(a){b.setAxes(a)}y(gt,"updateAxes");function ut(a){return b.getNode(a)}y(ut,"getNode");function yt(a){return b.resolveNodeId(a)}y(yt,"resolveNodeId");function mt(){return b.build()}y(mt,"getWardleyData");function wt(){b.clear(),Ot()}y(wt,"clear");var Ht={getConfig:rt,addNode:ot,addLink:st,addTrend:nt,addAnnotation:it,addNote:dt,addAccelerator:lt,addDeaccelerator:ct,setAnnotationsBox:pt,setSize:ht,startPipeline:xt,addPipelineComponent:ft,updateAxes:gt,getNode:ut,resolveNodeId:yt,getWardleyData:mt,clear:wt,setAccTitle:Yt,getAccTitle:Et,setDiagramTitle:Xt,getDiagramTitle:At,getAccDescription:Tt,setAccDescription:Lt},jt=["Genesis","Custom Built","Product","Commodity"],Vt=y(()=>{var o,e,p,r,d,m,v,g,L,M,k,N;const{themeVariables:a}=V();return{backgroundColor:((o=a.wardley)==null?void 0:o.backgroundColor)??a.background??"#fff",axisColor:((e=a.wardley)==null?void 0:e.axisColor)??"#000",axisTextColor:((p=a.wardley)==null?void 0:p.axisTextColor)??a.primaryTextColor??"#222",gridColor:((r=a.wardley)==null?void 0:r.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:((d=a.wardley)==null?void 0:d.componentFill)??"#fff",componentStroke:((m=a.wardley)==null?void 0:m.componentStroke)??"#000",componentLabelColor:((v=a.wardley)==null?void 0:v.componentLabelColor)??a.primaryTextColor??"#222",linkStroke:((g=a.wardley)==null?void 0:g.linkStroke)??"#000",evolutionStroke:((L=a.wardley)==null?void 0:L.evolutionStroke)??"#dc3545",annotationStroke:((M=a.wardley)==null?void 0:M.annotationStroke)??"#000",annotationTextColor:((k=a.wardley)==null?void 0:k.annotationTextColor)??a.primaryTextColor??"#222",annotationFill:((N=a.wardley)==null?void 0:N.annotationFill)??a.background??"#fff"}},"getTheme"),_t=y(()=>{const a=V()["wardley-beta"];return{width:(a==null?void 0:a.width)??900,height:(a==null?void 0:a.height)??600,padding:(a==null?void 0:a.padding)??48,nodeRadius:(a==null?void 0:a.nodeRadius)??6,nodeLabelOffset:(a==null?void 0:a.nodeLabelOffset)??8,axisFontSize:(a==null?void 0:a.axisFontSize)??12,labelFontSize:(a==null?void 0:a.labelFontSize)??10,showGrid:(a==null?void 0:a.showGrid)??!1,useMaxWidth:(a==null?void 0:a.useMaxWidth)??!0}},"getConfigValues"),Zt=y((a,o,e,p)=>{var J,K;et.debug(`Rendering Wardley map
|
|
2
2
|
`+a);const r=_t(),d=Vt(),m=r.nodeRadius*1.6,v=p.db,g=v.getWardleyData(),L=v.getDiagramTitle(),M=((J=g.size)==null?void 0:J.width)??r.width,k=((K=g.size)==null?void 0:K.height)??r.height,N=Ft(o);N.selectAll("*").remove(),Rt(N,k,M,r.useMaxWidth),N.attr("viewBox",`0 0 ${M} ${k}`);const P=N.append("g").attr("class","wardley-map"),q=N.append("defs");q.append("marker").attr("id",`arrow-${o}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-end-${o}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-start-${o}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),P.append("rect").attr("class","wardley-background").attr("width",M).attr("height",k).attr("fill",d.backgroundColor);const B=M-r.padding*2,F=k-r.padding*2;L&&P.append("text").attr("class","wardley-title").attr("x",M/2).attr("y",r.padding/2).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(L);const T=y(t=>r.padding+t/100*B,"projectX"),A=y(t=>k-r.padding-t/100*F,"projectY"),O=P.append("g").attr("class","wardley-axes");O.append("line").attr("x1",r.padding).attr("x2",M-r.padding).attr("y1",k-r.padding).attr("y2",k-r.padding).attr("stroke",d.axisColor).attr("stroke-width",1),O.append("line").attr("x1",r.padding).attr("x2",r.padding).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const kt=g.axes.xLabel??"Evolution",bt=g.axes.yLabel??"Visibility";O.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",r.padding+B/2).attr("y",k-r.padding/4).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(kt),O.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",r.padding/3).attr("y",r.padding+F/2).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${r.padding/3} ${r.padding+F/2})`).text(bt);const R=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:jt;if(R.length>0){const t=P.append("g").attr("class","wardley-stages"),n=g.axes.stageBoundaries,s=[];if(n&&n.length===R.length){let i=0;n.forEach(h=>{s.push({start:i,end:h}),i=h})}else{const i=1/R.length;R.forEach((h,l)=>{s.push({start:l*i,end:(l+1)*i})})}R.forEach((i,h)=>{const l=s[h],x=r.padding+l.start*B,f=r.padding+l.end*B,u=(x+f)/2;h>0&&t.append("line").attr("x1",x).attr("x2",x).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",u).attr("y",k-r.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(r.showGrid){const t=P.append("g").attr("class","wardley-grid");for(let n=1;n<4;n++){const s=n/4,i=r.padding+B*s;t.append("line").attr("x1",i).attr("x2",i).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",r.padding).attr("x2",M-r.padding).attr("y1",k-r.padding-F*s).attr("y2",k-r.padding-F*s).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:T(t.x),y:A(t.y),node:t})}),g.pipelines.length>0){const t=P.append("g").attr("class","wardley-pipelines"),n=P.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(s=>{if(s.componentIds.length===0)return;const i=s.componentIds.map(f=>({id:f,pos:c.get(f),node:g.nodes.find(u=>u.id===f)})).filter(f=>f.pos&&f.node).sort((f,u)=>f.node.x-u.node.x);for(let f=0;f<i.length-1;f++){const u=i[f],w=i[f+1];n.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",u.pos.x).attr("y1",u.pos.y).attr("x2",w.pos.x).attr("y2",w.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let h=1/0,l=-1/0,x=0;if(s.componentIds.forEach(f=>{const u=c.get(f);u&&(h=Math.min(h,u.x),l=Math.max(l,u.x),x=u.y)}),h!==1/0&&l!==-1/0){const u=r.nodeRadius*4,w=x-u/2,S=c.get(s.nodeId);if(S){const z=(h+l)/2;S.x=z,S.y=w-m/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",h-15).attr("y",w).attr("width",l-h+30).attr("height",u).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const _=P.append("g").attr("class","wardley-links"),Z=new Map;g.pipelines.forEach(t=>{Z.set(t.nodeId,new Set(t.componentIds))});const U=g.links.filter(t=>{if(!c.has(t.source)||!c.has(t.target))return!1;const n=Z.get(t.target);return!(n!=null&&n.has(t.source))});_.selectAll("line").data(U).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.x+l/f*h}).attr("y1",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.y+x/f*h}).attr("x2",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.x+l/f*h}).attr("y2",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.y+x/f*h}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${o})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${o})`:null),_.selectAll("text").data(U.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,h=s.y-n.y,l=s.x-n.x,x=Math.sqrt(l*l+h*h),f=8,u=h/x;return i+u*f}).attr("y",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.y+s.y)/2,h=s.x-n.x,l=s.y-n.y,x=Math.sqrt(h*h+l*l),f=8,u=-h/x;return i+u*f}).attr("fill",d.axisTextColor).attr("font-size",r.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,h=(n.y+s.y)/2,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x),u=8,w=x/f,S=-l/f,z=i+w*u,W=h+S*u;let Y=Math.atan2(x,l)*180/Math.PI;return(Y>90||Y<-90)&&(Y+=180),`rotate(${Y} ${z} ${W})`}).text(t=>t.label);const $t=P.append("g").attr("class","wardley-trends"),vt=g.trends.map(t=>{const n=c.get(t.nodeId);if(!n)return null;const s=T(t.targetX),i=A(t.targetY),h=s-n.x,l=i-n.y,x=Math.sqrt(h*h+l*l),f=r.nodeRadius+2,u=x>f?s-h/x*f:s,w=x>f?i-l/x*f:i;return{origin:n,targetX:s,targetY:i,adjustedX2:u,adjustedY2:w}}).filter(t=>t!==null);$t.selectAll("line").data(vt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${o})`);const C=P.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));C.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const X=C.filter(t=>t.sourceStrategy==="market");X.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const H=r.nodeRadius*.7,$=r.nodeRadius*1.2;if(X.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),X.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),X.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),X.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),X.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),X.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),C.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-m/2).attr("y",t=>c.get(t.id).y-m/2).attr("width",m).attr("height",m).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:r.nodeRadius+15;return t.sourceStrategy&&(s+=r.nodeRadius+10),n.x+s}).attr("y1",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:r.nodeRadius*2;return n.y-s/2}).attr("x2",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:r.nodeRadius+15;return t.sourceStrategy&&(s+=r.nodeRadius+10),n.x+s}).attr("y2",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:r.nodeRadius*2;return n.y+s/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),C.append("text").attr("x",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?n.x+t.labelOffsetX:n.x;let s=r.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(s+=10);const i=t.labelOffsetX??s;return n.x+i}).attr("y",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?n.y+t.labelOffsetY:n.y-3;let s=-r.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(s-=10);const i=t.labelOffsetY??s;return n.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",r.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=P.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(n=>{const s=n.coordinates.map(i=>({x:T(i.x),y:A(i.y)}));if(s.length>1)for(let i=0;i<s.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",s[i].x).attr("y1",s[i].y).attr("x2",s[i+1].x).attr("y2",s[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");s.forEach(i=>{const h=t.append("g").attr("class","wardley-annotation");h.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),h.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.number)})}),g.annotationsBox){let n=T(g.annotationsBox.x),s=A(g.annotationsBox.y);const i=10,h=16,l=11,x=t.append("g").attr("class","wardley-annotations-box"),f=[...g.annotations].filter(w=>w.text).sort((w,S)=>w.number-S.number),u=[];if(f.forEach((w,S)=>{const z=x.append("text").attr("x",n+i).attr("y",s+i+(S+1)*h).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${w.number}. ${w.text}`);u.push(z)}),u.length>0){let w=0,S=0;u.forEach(j=>{const D=j.node(),Nt=D.getComputedTextLength();w=Math.max(w,Nt);const Ct=D.getBBox();S=Math.max(S,Ct.height)});const z=w+i*2+105,W=f.length*h+i*2+S/2,Y=r.padding,Pt=M-r.padding-z,St=r.padding,Mt=k-r.padding-W;n=Math.max(Y,Math.min(n,Pt)),s=Math.max(St,Math.min(s,Mt)),u.forEach((j,D)=>{j.attr("x",n+i).attr("y",s+i+(D+1)*h)}),x.insert("rect","text").attr("x",n).attr("y",s).attr("width",z).attr("height",W).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=P.append("g").attr("class","wardley-notes");g.notes.forEach(n=>{const s=T(n.x),i=A(n.y);t.append("text").attr("x",s).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.text)})}if(g.accelerators.length>0){const t=P.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(n=>{const s=T(n.x),i=A(n.y),h=60,l=30,x=20,f=`
|
|
3
3
|
M ${s} ${i-l/2}
|
|
4
4
|
L ${s+h-x} ${i-l/2}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as pi,g as mi,v as $t,t as yi,a as bi,b as wi,_ as a,l as Ut,R as Ai,d as Ci,A as Si,M as Dt,j as Ri,O as Gt,P as _i,a7 as ki,aF as Ti,aG as Xt}from"./mermaid.core-
|
|
1
|
+
import{s as pi,g as mi,v as $t,t as yi,a as bi,b as wi,_ as a,l as Ut,R as Ai,d as Ci,A as Si,M as Dt,j as Ri,O as Gt,P as _i,a7 as ki,aF as Ti,aG as Xt}from"./mermaid.core-SX8SzrsU.js";import"./transform-BqqRT-Iy.js";import{i as Di}from"./init-Gi6I4Gst.js";import{o as Pi}from"./ordinal-Cboi1Yqb.js";import{l as Yt}from"./linear-BT-xgETh.js";import"./index-C3cvP8Fo.js";import"./BlintzCanvas-b30dG4gx.js";import"./index-BIB-maE5.js";import"./index-DabU6r9W.js";import"./value-wA6veExk.js";import"./defaultLocale-DX6XiGOO.js";function vi(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function St(){var e=Pi().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,l,m=!1,u=0,d=0,S=.5;delete e.unknown;function y(){var f=t().length,L=n<s,D=L?n:s,E=L?s:n;o=(E-D)/Math.max(1,f-u+d*2),m&&(o=Math.floor(o)),D+=(E-D-o*(f-u))*S,l=o*(1-u),m&&(D=Math.round(D),l=Math.round(l));var M=vi(f).map(function(w){return D+o*w});return i(L?M.reverse():M)}return e.domain=function(f){return arguments.length?(t(f),y()):t()},e.range=function(f){return arguments.length?([s,n]=f,s=+s,n=+n,y()):[s,n]},e.rangeRound=function(f){return[s,n]=f,s=+s,n=+n,m=!0,y()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(f){return arguments.length?(m=!!f,y()):m},e.padding=function(f){return arguments.length?(u=Math.min(1,d=+f),y()):u},e.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),y()):u},e.paddingOuter=function(f){return arguments.length?(d=+f,y()):d},e.align=function(f){return arguments.length?(S=Math.max(0,Math.min(1,f)),y()):S},e.copy=function(){return St(t(),[s,n]).round(m).paddingInner(u).paddingOuter(d).align(S)},Di.apply(y(),arguments)}var Rt=(function(){var e=a(function(F,r,g,x){for(g=g||{},x=F.length;x--;g[F[x]]=r);return g},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],l=[1,7],m=[1,5,10,12,14,16,18,19,21,23,36,37,38],u=[1,25],d=[1,26],S=[1,28],y=[1,29],f=[1,30],L=[1,31],D=[1,32],E=[1,33],M=[1,34],w=[1,35],P=[1,36],c=[1,37],B=[1,43],W=[1,42],X=[1,47],Y=[1,50],k=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],C=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],R=[1,65],O=[26,28],T={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:a(function(r,g,x,p,_,h,lt){var b=h.length-1;switch(_){case 5:p.setOrientation(h[b]);break;case 9:p.setDiagramTitle(h[b].text.trim());break;case 12:p.setLineData({text:"",type:"text"},h[b]);break;case 13:p.setLineData(h[b-1],h[b]);break;case 14:p.setBarData({text:"",type:"text"},h[b]);break;case 15:p.setBarData(h[b-1],h[b]);break;case 16:this.$=h[b].trim(),p.setAccTitle(this.$);break;case 17:case 18:this.$=h[b].trim(),p.setAccDescription(this.$);break;case 19:this.$=h[b-1];break;case 20:case 30:this.$=[h[b-2],...h[b]];break;case 21:case 31:this.$=[h[b]];break;case 22:this.$={value:Number(h[b-1]),label:h[b]};break;case 23:this.$={value:Number(h[b]),label:""};break;case 24:p.setXAxisTitle(h[b]);break;case 25:p.setXAxisTitle(h[b-1]);break;case 26:p.setXAxisTitle({type:"text",text:""});break;case 27:p.setXAxisBand(h[b]);break;case 28:p.setXAxisRangeData(Number(h[b-2]),Number(h[b]));break;case 29:this.$=h[b-1];break;case 32:p.setYAxisTitle(h[b]);break;case 33:p.setYAxisTitle(h[b-1]);break;case 34:p.setYAxisTitle({type:"text",text:""});break;case 35:p.setYAxisRangeData(Number(h[b-2]),Number(h[b]));break;case 39:this.$={text:h[b],type:"text"};break;case 40:this.$={text:h[b],type:"text"};break;case 41:this.$={text:h[b],type:"markdown"};break;case 42:this.$=h[b];break;case 43:this.$=h[b-1]+""+h[b];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,36:n,37:o,38:l}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,36:n,37:o,38:l}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:n,37:o,38:l}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(m,[2,36]),e(m,[2,37]),e(m,[2,38]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,36:n,37:o,38:l}),{1:[2,3]},e(m,[2,5]),e(t,[2,7],{4:22,36:n,37:o,38:l}),{11:23,30:u,39:24,40:d,41:27,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c},{11:39,13:38,24:B,29:W,30:u,31:40,32:41,39:24,40:d,41:27,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c},{11:45,15:44,29:X,30:u,35:46,39:24,40:d,41:27,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c},{11:49,17:48,24:Y,30:u,39:24,40:d,41:27,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c},{11:52,17:51,24:Y,30:u,39:24,40:d,41:27,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c},{20:[1,53]},{22:[1,54]},e(k,[2,18]),{1:[2,2]},e(k,[2,8]),e(k,[2,9]),e(H,[2,39],{41:55,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c}),e(H,[2,40]),e(H,[2,41]),e(C,[2,42]),e(C,[2,44]),e(C,[2,45]),e(C,[2,46]),e(C,[2,47]),e(C,[2,48]),e(C,[2,49]),e(C,[2,50]),e(C,[2,51]),e(C,[2,52]),e(C,[2,53]),e(k,[2,10]),e(k,[2,24],{32:41,31:56,24:B,29:W}),e(k,[2,26]),e(k,[2,27]),{33:[1,57]},{11:59,30:u,34:58,39:24,40:d,41:27,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c},e(k,[2,11]),e(k,[2,32],{35:60,29:X}),e(k,[2,34]),{33:[1,61]},e(k,[2,12]),{17:62,24:Y},{25:63,27:64,29:R},e(k,[2,14]),{17:66,24:Y},e(k,[2,16]),e(k,[2,17]),e(C,[2,43]),e(k,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(k,[2,33]),{29:[1,70]},e(k,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(O,[2,23],{30:[1,73]}),e(k,[2,15]),e(k,[2,28]),e(k,[2,29]),{11:59,30:u,34:74,39:24,40:d,41:27,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c},e(k,[2,35]),e(k,[2,19]),{25:75,27:64,29:R},e(O,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:a(function(r,g){if(g.recoverable)this.trace(r);else{var x=new Error(r);throw x.hash=g,x}},"parseError"),parse:a(function(r){var g=this,x=[0],p=[],_=[null],h=[],lt=this.table,b="",dt=0,Ot=0,ui=2,Vt=1,di=h.slice.call(arguments,1),v=Object.create(this.lexer),$={yy:{}};for(var bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,bt)&&($.yy[bt]=this.yy[bt]);v.setInput(r,$.yy),$.yy.lexer=v,$.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var wt=v.yylloc;h.push(wt);var xi=v.options&&v.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fi(z){x.length=x.length-2*z,_.length=_.length-z,h.length=h.length-z}a(fi,"popStack");function Wt(){var z;return z=p.pop()||v.lex()||Vt,typeof z!="number"&&(z instanceof Array&&(p=z,z=p.pop()),z=g.symbols_[z]||z),z}a(Wt,"lex");for(var I,U,V,At,j={},xt,N,Ft,ft;;){if(U=x[x.length-1],this.defaultActions[U]?V=this.defaultActions[U]:((I===null||typeof I>"u")&&(I=Wt()),V=lt[U]&<[U][I]),typeof V>"u"||!V.length||!V[0]){var Ct="";ft=[];for(xt in lt[U])this.terminals_[xt]&&xt>ui&&ft.push("'"+this.terminals_[xt]+"'");v.showPosition?Ct="Parse error on line "+(dt+1)+`:
|
|
2
2
|
`+v.showPosition()+`
|
|
3
3
|
Expecting `+ft.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Ct="Parse error on line "+(dt+1)+": Unexpected "+(I==Vt?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Ct,{text:v.match,token:this.terminals_[I]||I,line:v.yylineno,loc:wt,expected:ft})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+I);switch(V[0]){case 1:x.push(I),_.push(v.yytext),h.push(v.yylloc),x.push(V[1]),I=null,Ot=v.yyleng,b=v.yytext,dt=v.yylineno,wt=v.yylloc;break;case 2:if(N=this.productions_[V[1]][1],j.$=_[_.length-N],j._$={first_line:h[h.length-(N||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(N||1)].first_column,last_column:h[h.length-1].last_column},xi&&(j._$.range=[h[h.length-(N||1)].range[0],h[h.length-1].range[1]]),At=this.performAction.apply(j,[b,Ot,dt,$.yy,V[1],_,h].concat(di)),typeof At<"u")return At;N&&(x=x.slice(0,-1*N*2),_=_.slice(0,-1*N),h=h.slice(0,-1*N)),x.push(this.productions_[V[1]][0]),_.push(j.$),h.push(j._$),Ft=lt[x[x.length-2]][x[x.length-1]],x.push(Ft);break;case 3:return!0}}return!0},"parse")},rt=(function(){var F={EOF:1,parseError:a(function(g,x){if(this.yy.parser)this.yy.parser.parseError(g,x);else throw new Error(g)},"parseError"),setInput:a(function(r,g){return this.yy=g||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var g=r.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:a(function(r){var g=r.length,x=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===p.length?this.yylloc.first_column:0)+p[p.length-x.length].length-x[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(r){this.unput(this.match.slice(r))},"less"),pastInput:a(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var r=this.pastInput(),g=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
package/dist/client/index.html
CHANGED
|
@@ -524,8 +524,8 @@
|
|
|
524
524
|
}
|
|
525
525
|
})();
|
|
526
526
|
</script>
|
|
527
|
-
<script type="module" crossorigin src="/assets/index-
|
|
528
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
527
|
+
<script type="module" crossorigin src="/assets/index-C3cvP8Fo.js"></script>
|
|
528
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DyRGZyur.css">
|
|
529
529
|
</head>
|
|
530
530
|
<body>
|
|
531
531
|
<div id="root"></div>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
ALTER TABLE `approvals` ADD `raises_permissions` integer DEFAULT false NOT NULL;--> statement-breakpoint
|
|
2
|
+
ALTER TABLE `session_message_queue` ADD `held_to_default` integer DEFAULT false NOT NULL;--> statement-breakpoint
|
|
3
|
+
ALTER TABLE `session_metadata` ADD `last_turn_held` integer;--> statement-breakpoint
|
|
4
|
+
ALTER TABLE `room_entries` ADD `held_to_default` integer DEFAULT false NOT NULL;--> statement-breakpoint
|
|
5
|
+
-- Cards already waiting when this lands: the same rule the gate applies to a new
|
|
6
|
+
-- card (DOR-3037), read from what the row kept. A settings patch is marked
|
|
7
|
+
-- whatever it touched, since the row does not keep its input.
|
|
8
|
+
UPDATE `approvals` SET `raises_permissions` = 1 WHERE `state` = 'pending' AND `tier` <> 'observe' AND (`area` IN ('permissions', 'safety', 'reach') OR `capability_id` IN ('operator.config_patch', 'permissions.change', 'marketplace.install', 'create_agent', 'mcp.enable'));
|