@datalayer/agent-runtimes 1.5.80 → 1.5.82
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-embed/chunks/ChatView-uYgfl4KN.js +32 -0
- package/dist-embed/chunks/{DeckComponent-Cd1sbs9L.js → DeckComponent-DS42k_Ud.js} +2 -2
- package/dist-embed/chunks/{DocumentView-ssQ835Wa.js → DocumentView-DTZjQfu5.js} +1 -1
- package/dist-embed/chunks/{EphemeralDocument-DNziilOG.js → EphemeralDocument-BcxH847U.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawComponent-CQ4BeoQt.js → ExcalidrawComponent-D-DdWmbS.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawModal-8W-b1OmA.js → ExcalidrawModal-Bgdc7pqI.js} +1 -1
- package/dist-embed/chunks/{JupyterLexicalExtension-BLYM-DTn.js → JupyterLexicalExtension-2cZTnnOv.js} +6 -6
- package/dist-embed/chunks/{YouTubePlugin-BgZG6fCA.js → YouTubePlugin-CcQPagoa.js} +1 -1
- package/dist-embed/chunks/{abnfDiagram-VCTEODGH-CHerLzZ0.js → abnfDiagram-VCTEODGH-BHwrDUSK.js} +1 -1
- package/dist-embed/chunks/{abnfDiagram-VCTEODGH-BdOOK2nG.js → abnfDiagram-VCTEODGH-BlJ0uJzg.js} +1 -1
- package/dist-embed/chunks/{abnfDiagram-VCTEODGH-CsKFU4Ej.js → abnfDiagram-VCTEODGH-BnGI-UIs.js} +1 -1
- package/dist-embed/chunks/{ar-SA-G6X2FPQ2-Bcy9b6jn.js → ar-SA-G6X2FPQ2-CqfmhD9l.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-C8jjE2mY.js → architectureDiagram-5GKGNRK7-BAJb7Shu.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-iDgRBR0a.js → architectureDiagram-5GKGNRK7-CuAYWP6N.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-GukKr_g1.js → architectureDiagram-5GKGNRK7-DLWJva8u.js} +1 -1
- package/dist-embed/chunks/{az-AZ-76LH7QW2-Bzy5rt95.js → az-AZ-76LH7QW2-mjoZR4wa.js} +1 -1
- package/dist-embed/chunks/{bg-BG-XCXSNQG7-C3mQkAoD.js → bg-BG-XCXSNQG7-DU3y3x4T.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-868be97b-D3BurtSN.js → blockDiagram-868be97b-DRJ_ofQv.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-DH6ta7S_.js → blockDiagram-I7D4REHJ-BZLSOJfR.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-oDRNhSU2.js → blockDiagram-I7D4REHJ-DO_8w9-1.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-edfypROz.js → blockDiagram-I7D4REHJ-XN1bU5Ii.js} +1 -1
- package/dist-embed/chunks/{bn-BD-2XOGV67Q-DHwDUFeg.js → bn-BD-2XOGV67Q-C4V6q1wT.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-3f4bdde3-Dmbl9p6m.js → c4Diagram-3f4bdde3-B-w3s9rx.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-B6NHHf7w.js → c4Diagram-7LVT6UL2-B28HS4IQ.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-CR3iQQ6O.js → c4Diagram-7LVT6UL2-BACgR0fs.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-BD3Ld97M.js → c4Diagram-7LVT6UL2-DwLtBd8O.js} +1 -1
- package/dist-embed/chunks/{ca-ES-6MX7JW3Y-CWMZCfjI.js → ca-ES-6MX7JW3Y-DzJcx7TI.js} +1 -1
- package/dist-embed/chunks/{chunk-2Q5K7J3B-9xCosPaH.js → chunk-2Q5K7J3B-BqK0jhMM.js} +1 -1
- package/dist-embed/chunks/{chunk-2Q5K7J3B-ZWnuQ6M2.js → chunk-2Q5K7J3B-Cv2QB080.js} +1 -1
- package/dist-embed/chunks/{chunk-2Q5K7J3B-H_DA_jTG.js → chunk-2Q5K7J3B-Pu-PawH9.js} +1 -1
- package/dist-embed/chunks/{chunk-5VM5RSS4-BhWUyelG.js → chunk-5VM5RSS4-BIWdC4YC.js} +1 -1
- package/dist-embed/chunks/{chunk-5VM5RSS4-7q2jPq-I.js → chunk-5VM5RSS4-DI3POCyE.js} +1 -1
- package/dist-embed/chunks/{chunk-5VM5RSS4-C2EZUNrH.js → chunk-5VM5RSS4-DthkbWcR.js} +1 -1
- package/dist-embed/chunks/{chunk-F27PBJKO-B9wgW70d.js → chunk-F27PBJKO-BY-_X1Ii.js} +1 -1
- package/dist-embed/chunks/{chunk-F27PBJKO-hasZYXJc.js → chunk-F27PBJKO-DcCqnHNB.js} +1 -1
- package/dist-embed/chunks/{chunk-F27PBJKO-iAw_9Xtd.js → chunk-F27PBJKO-dSqM-5aG.js} +1 -1
- package/dist-embed/chunks/{chunk-IMKFNOWR-CU661Hle.js → chunk-IMKFNOWR-BYkz40H8.js} +1 -1
- package/dist-embed/chunks/{chunk-IMKFNOWR-CR2LIHPi.js → chunk-IMKFNOWR-DPv-w5lK.js} +1 -1
- package/dist-embed/chunks/{chunk-IMKFNOWR-DhXkXQPV.js → chunk-IMKFNOWR-O7b2kauh.js} +1 -1
- package/dist-embed/chunks/{chunk-JWPE2WC7-B40RAhYQ.js → chunk-JWPE2WC7-779bmDSv.js} +1 -1
- package/dist-embed/chunks/{chunk-JWPE2WC7-DaBG37yC.js → chunk-JWPE2WC7-Be4x4L6B.js} +1 -1
- package/dist-embed/chunks/{chunk-JWPE2WC7-D4pNFsZF.js → chunk-JWPE2WC7-th9umQbo.js} +1 -1
- package/dist-embed/chunks/{chunk-POPQ4Y6H-CNc-_UkX.js → chunk-POPQ4Y6H-B097KlFr.js} +1 -1
- package/dist-embed/chunks/{chunk-POPQ4Y6H-PC7NS4ab.js → chunk-POPQ4Y6H-CYXeyiko.js} +1 -1
- package/dist-embed/chunks/{chunk-POPQ4Y6H-WjTzJISs.js → chunk-POPQ4Y6H-C_fIQaTN.js} +1 -1
- package/dist-embed/chunks/{chunk-SVP7TREG-BgVpHjUA.js → chunk-SVP7TREG-BZUv4JX-.js} +1 -1
- package/dist-embed/chunks/{chunk-SVP7TREG-bq0J6tH_.js → chunk-SVP7TREG-YgahXZy2.js} +1 -1
- package/dist-embed/chunks/{chunk-SVP7TREG-B-LR0OEY.js → chunk-SVP7TREG-dXH2Z6GR.js} +1 -1
- package/dist-embed/chunks/{chunk-TICWLB2K-D0mlrZUj.js → chunk-TICWLB2K-C54VOu9Q.js} +1 -1
- package/dist-embed/chunks/{chunk-TICWLB2K-BKUWUi4x.js → chunk-TICWLB2K-DIe5qIoj.js} +1 -1
- package/dist-embed/chunks/{chunk-TICWLB2K-BV_9f6ak.js → chunk-TICWLB2K-YWBHGfC8.js} +1 -1
- package/dist-embed/chunks/{chunk-XXDRQBXY-fV8doVJJ.js → chunk-XXDRQBXY-B1faoehH.js} +1 -1
- package/dist-embed/chunks/{chunk-XXDRQBXY-CFD4Agg8.js → chunk-XXDRQBXY-CNEiTt6v.js} +1 -1
- package/dist-embed/chunks/{chunk-XXDRQBXY-DF8wFPCi.js → chunk-XXDRQBXY-f3FbRmyb.js} +1 -1
- package/dist-embed/chunks/{classDiagram-ZZMXUADV-B2RPE1Bl.js → classDiagram-ZZMXUADV-Cd7eEzi4.js} +1 -1
- package/dist-embed/chunks/{classDiagram-ZZMXUADV-B0pbDswj.js → classDiagram-ZZMXUADV-DuuqqgIP.js} +1 -1
- package/dist-embed/chunks/{classDiagram-ZZMXUADV-BSdRgwsr.js → classDiagram-ZZMXUADV-q1xSQX4O.js} +1 -1
- package/dist-embed/chunks/{classDiagram-f62afe4f-tD890DEl.js → classDiagram-f62afe4f-ByEt3lSF.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-604399ef-DReIuoeI.js → classDiagram-v2-604399ef-NBzfAORG.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-B2RPE1Bl.js → classDiagram-v2-VYDZK3BY-Cd7eEzi4.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-B0pbDswj.js → classDiagram-v2-VYDZK3BY-DuuqqgIP.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-BSdRgwsr.js → classDiagram-v2-VYDZK3BY-q1xSQX4O.js} +1 -1
- package/dist-embed/chunks/{cose-bilkent-JH36ORCC-CGF9N16A.js → cose-bilkent-JH36ORCC-BiEPnrEj.js} +1 -1
- package/dist-embed/chunks/{cose-bilkent-JH36ORCC-D976z1sp.js → cose-bilkent-JH36ORCC-DfR5QnyH.js} +1 -1
- package/dist-embed/chunks/{cose-bilkent-JH36ORCC-BS_pJML-.js → cose-bilkent-JH36ORCC-DzJSYCRG.js} +1 -1
- package/dist-embed/chunks/{createText-aed3d8b3-1eVJ8jxH.js → createText-aed3d8b3-6mXespHo.js} +1 -1
- package/dist-embed/chunks/{cs-CZ-2BRQDIVT-B_pe2qj9.js → cs-CZ-2BRQDIVT-BKep5hDJ.js} +1 -1
- package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-Cil4cm66.js → cynefinDiagram-5FMLGOSQ-B7qhaV93.js} +1 -1
- package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-AxJwZ7KT.js → cynefinDiagram-5FMLGOSQ-DwHfF9hE.js} +1 -1
- package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-D7ioXav_.js → cynefinDiagram-5FMLGOSQ-_vxJMyqw.js} +1 -1
- package/dist-embed/chunks/{da-DK-5WZEPLOC-CGWCNcJj.js → da-DK-5WZEPLOC-DlOP6lOL.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-DauBFK-x.js → dagre-GXQ25YYZ-Bjepw68A.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-B8Ip03td.js → dagre-GXQ25YYZ-DFR_CaEv.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-Cp78_L9l.js → dagre-GXQ25YYZ-Ds0JPzDS.js} +1 -1
- package/dist-embed/chunks/{de-DE-XR44H4JA-DTdq2h_G.js → de-DE-XR44H4JA-BRk2-hl3.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-LsSU5PzE.js → diagram-S7CK7UJ4-BwwRJlNT.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-BxRBCYVP.js → diagram-S7CK7UJ4-DIMHIP_O.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-cLOCifii.js → diagram-S7CK7UJ4-DjMCZvT1.js} +1 -1
- package/dist-embed/chunks/{diagram-UQ7AKVKN-BvgP6_rf.js → diagram-UQ7AKVKN-BqqL4ZW6.js} +1 -1
- package/dist-embed/chunks/{diagram-UQ7AKVKN-BK4qe_eB.js → diagram-UQ7AKVKN-COGYRNFS.js} +1 -1
- package/dist-embed/chunks/{diagram-UQ7AKVKN-CoIPlGw-.js → diagram-UQ7AKVKN-D0P7rl1p.js} +1 -1
- package/dist-embed/chunks/{diagram-VSXAHHWV-Cy8iWh4H.js → diagram-VSXAHHWV-ChB-FOnw.js} +1 -1
- package/dist-embed/chunks/{diagram-VSXAHHWV-CIhWkrRX.js → diagram-VSXAHHWV-DsMS8foW.js} +1 -1
- package/dist-embed/chunks/{diagram-VSXAHHWV-DWWQ-Ga9.js → diagram-VSXAHHWV-DvxkVQ-E.js} +1 -1
- package/dist-embed/chunks/{diagram-VX7I27RA-43SwkivD.js → diagram-VX7I27RA-BIxeQH4u.js} +1 -1
- package/dist-embed/chunks/{diagram-VX7I27RA-CQM8aGRO.js → diagram-VX7I27RA-Cg10qtez.js} +1 -1
- package/dist-embed/chunks/{diagram-VX7I27RA-CCx8R8FK.js → diagram-VX7I27RA-Cuf1tsVI.js} +1 -1
- package/dist-embed/chunks/{diagram-Z3DM3KII-Da75Rc5Q.js → diagram-Z3DM3KII-B22XcXbf.js} +1 -1
- package/dist-embed/chunks/{diagram-Z3DM3KII-DrILxydN.js → diagram-Z3DM3KII-CNWiLQR4.js} +1 -1
- package/dist-embed/chunks/{diagram-Z3DM3KII-Dqcrl8-1.js → diagram-Z3DM3KII-DsRXBtfM.js} +1 -1
- package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-CwBVaHP2.js → ebnfDiagram-PWID7BFC-81p8Ls5M.js} +1 -1
- package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-DC-Zam6d.js → ebnfDiagram-PWID7BFC-BiAjk2HF.js} +1 -1
- package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-Klx1dPe6.js → ebnfDiagram-PWID7BFC-C31mpWW_.js} +1 -1
- package/dist-embed/chunks/{edges-b2856ca0-B3ybuHDU.js → edges-b2856ca0-Bup5nxkN.js} +1 -1
- package/dist-embed/chunks/{el-GR-BZB4AONW-qdInZt55.js → el-GR-BZB4AONW-BwGTv3Ip.js} +1 -1
- package/dist-embed/chunks/{erDiagram-5d81789a-HZ-VLc2f.js → erDiagram-5d81789a-DFzRdHol.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-DmlOR1VA.js → erDiagram-RLTQ6QDP-BdoySyRQ.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-6YXMuidI.js → erDiagram-RLTQ6QDP-BrpNZMOa.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-CNO4pVhU.js → erDiagram-RLTQ6QDP-OQO_sYyP.js} +1 -1
- package/dist-embed/chunks/{es-ES-U4NZUMDT-CbVgghD5.js → es-ES-U4NZUMDT-tz36zNcB.js} +1 -1
- package/dist-embed/chunks/{eu-ES-A7QVB2H4-Cfyi4-QV.js → eu-ES-A7QVB2H4-CGBVWQ14.js} +1 -1
- package/dist-embed/chunks/{fa-IR-HGAKTJCU-Bpz9Yk2c.js → fa-IR-HGAKTJCU-CoO7_ncQ.js} +1 -1
- package/dist-embed/chunks/{fi-FI-Z5N7JZ37-CnNP_ASI.js → fi-FI-Z5N7JZ37-DPjdvbO9.js} +1 -1
- package/dist-embed/chunks/{flowDb-185abca5-7Nn2obHG.js → flowDb-185abca5-au1lLLx1.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-1629c991-CnvM_psw.js → flowDiagram-1629c991-BeGPcZ6y.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-Bsl5oOFb.js → flowDiagram-HODETNUW-CYTfSgr_.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-DpJLPDJS.js → flowDiagram-HODETNUW-D1SiifhW.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-_PPo6xx4.js → flowDiagram-HODETNUW-ZrGwOdyu.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-v2-1d953310-TkF25UVC.js → flowDiagram-v2-1d953310-DjmvuK3n.js} +1 -1
- package/dist-embed/chunks/{flowchart-elk-definition-6df44142-CwiGfEuJ.js → flowchart-elk-definition-6df44142-vDckeTZu.js} +1 -1
- package/dist-embed/chunks/{fr-FR-RHASNOE6-CXIU81zC.js → fr-FR-RHASNOE6-Cmv7wG_0.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-3b0b3873-DeouFDZE.js → ganttDiagram-3b0b3873-DVQKpltu.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-BeK3rGHM.js → ganttDiagram-EL5Y4UJY-BORJG_RB.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-B3ddBLm-.js → ganttDiagram-EL5Y4UJY-BqzFsgGN.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-DnJUq63S.js → ganttDiagram-EL5Y4UJY-YQkzQd01.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-CKVR9Ajq.js → gitGraphDiagram-WWUBYQGX-AAVjuV14.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-u7eHxrMk.js → gitGraphDiagram-WWUBYQGX-BKLKcFoS.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-DkYi8eWr.js → gitGraphDiagram-WWUBYQGX-D1o9osXz.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-mCCRVzIs.js → gitGraphDiagram-f01e8bc2-CJSbiZjx.js} +1 -1
- package/dist-embed/chunks/{gl-ES-HMX3MZ6V-Do1RdVfG.js → gl-ES-HMX3MZ6V-CRdkmw5y.js} +1 -1
- package/dist-embed/chunks/{he-IL-6SHJWFNN-NcTscmv6.js → he-IL-6SHJWFNN-DvMw5Cul.js} +1 -1
- package/dist-embed/chunks/{hi-IN-IWLTKZ5I-CyNpoQ12.js → hi-IN-IWLTKZ5I-DJlp0nwg.js} +1 -1
- package/dist-embed/chunks/{hu-HU-A5ZG7DT2-Bzge2Fdz.js → hu-HU-A5ZG7DT2-CzRriMFn.js} +1 -1
- package/dist-embed/chunks/{id-ID-SAP4L64H-DaNcoDhl.js → id-ID-SAP4L64H-DIWyOwkf.js} +1 -1
- package/dist-embed/chunks/{index-9bae90f3-CzUk5Hhq.js → index-9bae90f3-CSxqLQwc.js} +1 -1
- package/dist-embed/chunks/{index-Cx_cIRez.js → index-B8BulvHI.js} +1 -1
- package/dist-embed/chunks/{index-CLdL3h_Z.js → index-BCGvaYVt.js} +1 -1
- package/dist-embed/chunks/{index-BQdtKMKk.js → index-CbnU-kk0.js} +4 -4
- package/dist-embed/chunks/index-CeTMYE1j.js +1 -0
- package/dist-embed/chunks/{index-lOJZWhTu.js → index-DY5U0msZ.js} +4 -4
- package/dist-embed/chunks/{index-D_vehxcD.js → index-DxN3ZybZ.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-27XIBGKW-CrHEoNfn.js → infoDiagram-27XIBGKW-BnxVO2UJ.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-27XIBGKW-DiC5_yjB.js → infoDiagram-27XIBGKW-COSYMCha.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-27XIBGKW-C3YByzAX.js → infoDiagram-27XIBGKW-CrDC6noC.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-a29d40f1-DRVyx4Bf.js → infoDiagram-a29d40f1-oSOWBNcS.js} +1 -1
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-B87JmQRn.js → ishikawaDiagram-5VMMS53U-Cabl3zHc.js} +1 -1
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-DkW3YLz9.js → ishikawaDiagram-5VMMS53U-Dy7sKgzH.js} +1 -1
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-3WGbru46.js → ishikawaDiagram-5VMMS53U-orLa617t.js} +1 -1
- package/dist-embed/chunks/{it-IT-JPQ66NNP-6fWP-4Pk.js → it-IT-JPQ66NNP--0R7ykIn.js} +1 -1
- package/dist-embed/chunks/{ja-JP-DBVTYXUO-TOPcUfq8.js → ja-JP-DBVTYXUO-BceLsdOT.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-BZWmkUfk.js → journeyDiagram-3NMN7TZE-CFX02NzG.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-BcfZXfHF.js → journeyDiagram-3NMN7TZE-DK2YyxiL.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-BjO5pIr-.js → journeyDiagram-3NMN7TZE-YkKUQWKF.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-95396277-D_QLiVq4.js → journeyDiagram-95396277-CU6tIrkG.js} +1 -1
- package/dist-embed/chunks/{kaa-6HZHGXH3-WPmptgZr.js → kaa-6HZHGXH3-DmBIoS2A.js} +1 -1
- package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-CMOAXrZA.js → kab-KAB-ZGHBKWFO-FOhJJBEr.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-D9d45rsU.js → kanban-definition-UXKFOSKX-BluwjAGS.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-B84ZaZEy.js → kanban-definition-UXKFOSKX-C14qnrHj.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-DKCJ8_n0.js → kanban-definition-UXKFOSKX-C4dKZPut.js} +1 -1
- package/dist-embed/chunks/{kk-KZ-P5N5QNE5-B6ezOPzr.js → kk-KZ-P5N5QNE5-Cfl-4Zso.js} +1 -1
- package/dist-embed/chunks/{km-KH-HSX4SM5Z-C84QUPbc.js → km-KH-HSX4SM5Z-CkPlUErW.js} +1 -1
- package/dist-embed/chunks/{ko-KR-MTYHY66A-cuBEuTL_.js → ko-KR-MTYHY66A-ClNehjJR.js} +1 -1
- package/dist-embed/chunks/{ku-TR-6OUDTVRD-B9KdlCAR.js → ku-TR-6OUDTVRD-BWAQD572.js} +1 -1
- package/dist-embed/chunks/{layout-Do3wJC1j.js → layout-BJZx1DET.js} +1 -1
- package/dist-embed/chunks/{layout-Dx5Hzkor.js → layout-Cj2S0_6r.js} +1 -1
- package/dist-embed/chunks/{layout-C6Twj1mW.js → layout-CrZLRdHC.js} +1 -1
- package/dist-embed/chunks/{lt-LT-XHIRWOB4-B39JwBGi.js → lt-LT-XHIRWOB4-CdVgmT3F.js} +1 -1
- package/dist-embed/chunks/{lv-LV-5QDEKY6T-8WReOaa7.js → lv-LV-5QDEKY6T-DhvrkAd6.js} +1 -1
- package/dist-embed/chunks/{mermaid.core-D0955PCw.js → mermaid.core-CN-kUGXQ.js} +4 -4
- package/dist-embed/chunks/{mermaid.core-D98kc0OO.js → mermaid.core-Cb8_A6yp.js} +3 -3
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-D86IPkt3.js → mindmap-definition-YA3MSWOX-BI8iAkoX.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-5wZuXgB8.js → mindmap-definition-YA3MSWOX-C3PLDJT4.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-BURkGTKI.js → mindmap-definition-YA3MSWOX-CLcKjJkV.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-e4c1d938-UbbfpF-a.js → mindmap-definition-e4c1d938-BR3XAv_v.js} +1 -1
- package/dist-embed/chunks/{mr-IN-CRQNXWMA-DUaS8VWx.js → mr-IN-CRQNXWMA-EGNXrciM.js} +1 -1
- package/dist-embed/chunks/{my-MM-5M5IBNSE-BdJYwQXg.js → my-MM-5M5IBNSE-B-8cjGNb.js} +1 -1
- package/dist-embed/chunks/{nb-NO-T6EIAALU-C_p5yu1z.js → nb-NO-T6EIAALU-C49vGMvQ.js} +1 -1
- package/dist-embed/chunks/{nl-NL-IS3SIHDZ-DM5qgcCp.js → nl-NL-IS3SIHDZ-Bop5b6pF.js} +1 -1
- package/dist-embed/chunks/{nn-NO-6E72VCQL-BuX1DqI5.js → nn-NO-6E72VCQL-CztS-gYX.js} +1 -1
- package/dist-embed/chunks/{oc-FR-POXYY2M6-BAWljcaf.js → oc-FR-POXYY2M6-D5wo47w8.js} +1 -1
- package/dist-embed/chunks/{pa-IN-N4M65BXN-2iyq8qxX.js → pa-IN-N4M65BXN-USnnio2R.js} +1 -1
- package/dist-embed/chunks/{pegDiagram-XKGWAZYB-BjrOX_Ki.js → pegDiagram-XKGWAZYB-BHSFNuDr.js} +1 -1
- package/dist-embed/chunks/{pegDiagram-XKGWAZYB-BJAdJVqh.js → pegDiagram-XKGWAZYB-CxqsEvHB.js} +1 -1
- package/dist-embed/chunks/{pegDiagram-XKGWAZYB-CyuSADYr.js → pegDiagram-XKGWAZYB-D_KkFB8O.js} +1 -1
- package/dist-embed/chunks/{percentages-BXMCSKIN-C9b5dzpq.js → percentages-BXMCSKIN-Qs237i5f.js} +5 -5
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-C55wHgO0.js → pieDiagram-E7YTZNPT-C01d4vFA.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-ni9UMEzV.js → pieDiagram-E7YTZNPT-DrPlYr3y.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-GvxNnk0x.js → pieDiagram-E7YTZNPT-XvKrNQIe.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-c941bede-DTmViAsB.js → pieDiagram-c941bede-5Q4eh0ys.js} +1 -1
- package/dist-embed/chunks/{pl-PL-T2D74RX3-C6nLJHhB.js → pl-PL-T2D74RX3-BzossiHE.js} +1 -1
- package/dist-embed/chunks/{pt-BR-5N22H2LF-B1adz-DU.js → pt-BR-5N22H2LF-DqZAv4oC.js} +1 -1
- package/dist-embed/chunks/{pt-PT-UZXXM6DQ-BCZpI4LV.js → pt-PT-UZXXM6DQ-CfFta-9l.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-CufBEqrC.js → quadrantDiagram-AXDQQJYC-Ba9Uoul2.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-BCeMrGXB.js → quadrantDiagram-AXDQQJYC-Cayreizb.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-Yg2WGHWh.js → quadrantDiagram-AXDQQJYC-qHBK2GfL.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-BZAbhmbg.js → quadrantDiagram-cf8b8fe0-baOXG64t.js} +1 -1
- package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-BAXhb26s.js → railroadDiagram-O6MQD6OU-BoiPFsc0.js} +1 -1
- package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-6tStysfX.js → railroadDiagram-O6MQD6OU-Ck3rOcDX.js} +1 -1
- package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-Df7m1mT4.js → railroadDiagram-O6MQD6OU-DPbTwglx.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-53bda41b-DNqx3JRF.js → requirementDiagram-53bda41b--Vif0cFL.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-CmXBYo40.js → requirementDiagram-BXWQKSXE-BU62-ZX8.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-0AqPqv7a.js → requirementDiagram-BXWQKSXE-BnpFahSo.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-B0SL6Gqb.js → requirementDiagram-BXWQKSXE-TxEizGOu.js} +1 -1
- package/dist-embed/chunks/{ro-RO-JPDTUUEW-BPM7y_F2.js → ro-RO-JPDTUUEW-DeKMiDGM.js} +1 -1
- package/dist-embed/chunks/{ru-RU-B4JR7IUQ-UViKo8dy.js → ru-RU-B4JR7IUQ-DwcP27bd.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-rQsp_j9w.js → sankeyDiagram-P5KCCOFB-BZdt2wZF.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-CktuQIU1.js → sankeyDiagram-P5KCCOFB-Be7ybx8L.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-CqcWOAyy.js → sankeyDiagram-P5KCCOFB-BvBkWEs8.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-c3ef121a-4-5C_fXA.js → sankeyDiagram-c3ef121a-DG1UM3l4.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-82a5b84f-DedJ5qnD.js → sequenceDiagram-82a5b84f-UdVxURsq.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-Br4F1sd7.js → sequenceDiagram-WJ2MYXX4-BCfarclu.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-BBGHED3s.js → sequenceDiagram-WJ2MYXX4-D7c_CoMJ.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-GMFparx1.js → sequenceDiagram-WJ2MYXX4-Dg0wfvkN.js} +1 -1
- package/dist-embed/chunks/{si-LK-N5RQ5JYF-D7TIYEDr.js → si-LK-N5RQ5JYF-d-F0Cewp.js} +1 -1
- package/dist-embed/chunks/{sizeCapture-INFHLROL-8qFOiWrK.js → sizeCapture-INFHLROL-DMANNAaY.js} +1 -1
- package/dist-embed/chunks/{sizeCapture-INFHLROL-C_M5Nl06.js → sizeCapture-INFHLROL-Dj0ydwKk.js} +1 -1
- package/dist-embed/chunks/{sizeCapture-INFHLROL-BNuVN7vX.js → sizeCapture-INFHLROL-DlIgxaWS.js} +1 -1
- package/dist-embed/chunks/{sk-SK-C5VTKIMK-CQedcNlJ.js → sk-SK-C5VTKIMK-BgobCs_4.js} +1 -1
- package/dist-embed/chunks/{sl-SI-NN7IZMDC-BX1W51zJ.js → sl-SI-NN7IZMDC-BLiLsQKQ.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-43e79a5f-C-TVhCrM.js → stateDiagram-43e79a5f-CNvh6hi1.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-D77RDMKH-tqnmMQUf.js → stateDiagram-D77RDMKH-B57tGlQp.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-D77RDMKH-CWrs6KzY.js → stateDiagram-D77RDMKH-D0LWS8oe.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-D77RDMKH-XK76naDS.js → stateDiagram-D77RDMKH-DxKAfNML.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-TVcKzajK.js → stateDiagram-v2-2041ed4f-BJpoWqKy.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-D3ZN_IoS.js → stateDiagram-v2-MP3YSRHH-CouGWb0D.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-lpluVNfO.js → stateDiagram-v2-MP3YSRHH-DAJ3mmV7.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-C3MNIg5B.js → stateDiagram-v2-MP3YSRHH-DWVb2don.js} +1 -1
- package/dist-embed/chunks/{styles-455b33cd-CIILXOoF.js → styles-455b33cd--c-Q4lAI.js} +1 -1
- package/dist-embed/chunks/{styles-f932cba9-CVBMDsh6.js → styles-f932cba9-D41PptLO.js} +1 -1
- package/dist-embed/chunks/{styles-fcc2142b-CTOmFTKK.js → styles-fcc2142b-DO_mbuzb.js} +1 -1
- package/dist-embed/chunks/{subset-shared.chunk-PVguOYyR.js → subset-shared.chunk-KMJoi0ES.js} +1 -1
- package/dist-embed/chunks/{subset-worker.chunk-iWGyr_E5.js → subset-worker.chunk-D4fLKx8W.js} +1 -1
- package/dist-embed/chunks/{sv-SE-XGPEYMSR-DI7YcqUR.js → sv-SE-XGPEYMSR-BG1QXCvW.js} +1 -1
- package/dist-embed/chunks/{svgDrawCommon-148a3cd9-BCgvh5nL.js → svgDrawCommon-148a3cd9-_sy1MPqQ.js} +1 -1
- package/dist-embed/chunks/{swimlanes-42K2YHIH-B9qJ99nD.js → swimlanes-42K2YHIH-DFY4MLTT.js} +1 -1
- package/dist-embed/chunks/{swimlanes-42K2YHIH-Ca0PhRmf.js → swimlanes-42K2YHIH-DFhNG700.js} +1 -1
- package/dist-embed/chunks/{swimlanes-42K2YHIH-DHcV40DB.js → swimlanes-42K2YHIH-qHdPIKqR.js} +1 -1
- package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-BEQKTD21.js → swimlanesDiagram-VR7AAH4N-DLu8qxW1.js} +1 -1
- package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-CQ7d-sbG.js → swimlanesDiagram-VR7AAH4N-DfJlYoc0.js} +1 -1
- package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-D-2e4UFJ.js → swimlanesDiagram-VR7AAH4N-Di8ZW7vB.js} +1 -1
- package/dist-embed/chunks/{ta-IN-2NMHFXQM-OZH5xroe.js → ta-IN-2NMHFXQM-Cwf7MXhM.js} +1 -1
- package/dist-embed/chunks/{th-TH-HPSO5L25-gAuWhBpT.js → th-TH-HPSO5L25-BgFIeFdc.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-CtZZro9U.js → timeline-definition-24CTP7MA-CSnCQHgO.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-DJcFE1jT.js → timeline-definition-24CTP7MA-EjGuok3K.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-B8lxEouP.js → timeline-definition-24CTP7MA-jNu4kA6-.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-7545f45a-CLycxRtq.js → timeline-definition-7545f45a-DKVkx2iN.js} +1 -1
- package/dist-embed/chunks/{tr-TR-DEFEU3FU-DQ0SDuS6.js → tr-TR-DEFEU3FU-B36BzndK.js} +1 -1
- package/dist-embed/chunks/{uk-UA-QMV73CPH-7J4e2jng.js → uk-UA-QMV73CPH-BIdgdufZ.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-zaNGkt8b.js → vennDiagram-4TSXK5OY-BwJIpWTX.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-Ca7szyFH.js → vennDiagram-4TSXK5OY-Ct92LUy3.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-BMmQ-DIV.js → vennDiagram-4TSXK5OY-sTUDzxoI.js} +1 -1
- package/dist-embed/chunks/{vi-VN-M7AON7JQ-dNpZ5DZ5.js → vi-VN-M7AON7JQ-C_vYqSDJ.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-C1VKw6YX.js → wardleyDiagram-VM6X3IG4-CmL9UVda.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-Dh0UOrRp.js → wardleyDiagram-VM6X3IG4-D19vZyCA.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-D_Q6gtp2.js → wardleyDiagram-VM6X3IG4-pjFMZv0g.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-3f383b91-B-BTwetN.js → xychartDiagram-3f383b91-C9v4_Sav.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-D_TaZM0k.js → xychartDiagram-S5SC5T6Z-BR0Sc17V.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-4OhI4XQl.js → xychartDiagram-S5SC5T6Z-CVSyvraK.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-BQHFHk-x.js → xychartDiagram-S5SC5T6Z-DlWO5eFt.js} +1 -1
- package/dist-embed/chunks/{zh-CN-LNUGB5OW-CZSp2g8b.js → zh-CN-LNUGB5OW-yOtUN9v4.js} +1 -1
- package/dist-embed/chunks/{zh-HK-E62DVLB3-DUqVOyB_.js → zh-HK-E62DVLB3-Drd2m3yL.js} +1 -1
- package/dist-embed/chunks/{zh-TW-RAJ6MFWO-U-TalxxN.js → zh-TW-RAJ6MFWO-CqJCCTAz.js} +1 -1
- package/dist-embed/datalayer-app-main.js +13 -13
- package/lib/AgentNode.js +9 -9
- package/lib/agents/AgentRuntimeChat.js +1 -1
- package/lib/api/agents.js +3 -3
- package/lib/api/context.js +3 -3
- package/lib/api/evals.js +3 -3
- package/lib/api/events.js +3 -3
- package/lib/api/index.js +2 -2
- package/lib/api/notifications.js +3 -3
- package/lib/api/output.js +3 -3
- package/lib/api/runtimes/checkpoints.js +3 -3
- package/lib/api/runtimes/environments.js +3 -3
- package/lib/api/runtimes/healthz.js +2 -2
- package/lib/api/runtimes/runtimes.js +3 -3
- package/lib/api/runtimes/snapshots.js +3 -3
- package/lib/api/scheduler/schedules.js +2 -2
- package/lib/api/spacer/documents.js +2 -2
- package/lib/api/spacer/healthz.js +2 -2
- package/lib/api/spacer/items.js +2 -2
- package/lib/api/spacer/lexicals.js +2 -2
- package/lib/api/spacer/notebooks.js +2 -2
- package/lib/api/spacer/spaces.js +3 -3
- package/lib/api/spacer/users.js +3 -3
- package/lib/apps/core/index.d.ts +12 -0
- package/lib/apps/embed/AppEmbed.js +2 -2
- package/lib/apps/embed/element.js +1 -1
- package/lib/apps/plugins/agents/AnonymousKeyBadge.js +1 -1
- package/lib/apps/plugins/app-activity/AppActivity.js +2 -2
- package/lib/apps/plugins/app-computer/AppComputer.js +1 -1
- package/lib/apps/plugins/app-page/AppPage.js +1 -1
- package/lib/apps/plugins/app-rules/AppRulesCard.js +1 -1
- package/lib/apps/plugins/app-rules/sessionRulesAction.d.ts +17 -0
- package/lib/apps/plugins/app-rules/sessionRulesAction.js +30 -0
- package/lib/apps/plugins/assistant/index.js +2 -2
- package/lib/apps/plugins/chat/ChatView.js +1 -1
- package/lib/apps/plugins/chat/SessionActionsMenu.js +13 -8
- package/lib/apps/plugins/chat/sessionActions.js +4 -0
- package/lib/apps/plugins/commands/index.js +1 -1
- package/lib/apps/plugins/document/openingDocument.js +1 -1
- package/lib/apps/plugins/page-layout/TurnPanel.js +1 -1
- package/lib/apps/plugins/page-layout/index.js +2 -2
- package/lib/apps/presets.js +1 -1
- package/lib/chat/ChatFloating.js +1 -1
- package/lib/chat/ChatPopupStandalone.js +1 -1
- package/lib/chat/ChatSidebar.js +1 -1
- package/lib/chat/ChatStandalone.js +1 -1
- package/lib/chat/assistant/characters.js +1 -1
- package/lib/chat/base/ChatBase.js +1 -1
- package/lib/chat/presence/Presence.js +1 -1
- package/lib/client/AgentRuntimesClient.js +1 -1
- package/lib/client/AgentsMixin.js +1 -1
- package/lib/client/mixins/RuntimesMixin.js +1 -1
- package/lib/client/mixins/SpacerMixin.js +2 -2
- package/lib/client/utils/spacerUtils.js +1 -1
- package/lib/components/agents/AgentSummary.js +1 -1
- package/lib/components/cards/NotificationEventCard.js +1 -1
- package/lib/components/cards/OutputCard.js +1 -1
- package/lib/components/cards/ToolApprovalCard.js +1 -1
- package/lib/components/code-sandboxes/CodeSandboxLauncher.js +6 -6
- package/lib/components/code-sandboxes/CodeSandboxPickerCell.js +1 -1
- package/lib/components/context/SpaceSelect.js +1 -1
- package/lib/components/flashes/FlashDisclaimer.js +1 -1
- package/lib/components/inspector/AgentInspector.js +1 -1
- package/lib/components/inspector/agentSpans.js +1 -1
- package/lib/components/progress/CreditsIndicator.js +2 -2
- package/lib/components/progress/index.js +1 -1
- package/lib/components/scheduler/ScheduleMenu.js +1 -1
- package/lib/components/snapshots/SandboxSnapshotMenu.js +2 -2
- package/lib/components/snippets/SnippetDialog.js +1 -1
- package/lib/components/teams/SceneTranscript.js +1 -1
- package/lib/context/CostUsageChart.js +1 -1
- package/lib/context/TokenUsageChart.js +1 -1
- package/lib/context/TurnGraphChart.js +1 -1
- package/lib/examples/AgentA2ATeamExample.js +2 -2
- package/lib/examples/AgentCheckpointsExample.js +1 -1
- package/lib/examples/AgentCodemodeExample.js +1 -1
- package/lib/examples/AgentEvalsExample.js +1 -1
- package/lib/examples/AgentGuardrailsExample.js +2 -2
- package/lib/examples/AgentInferenceProviderExample.js +1 -1
- package/lib/examples/AgentMCPExample.js +1 -1
- package/lib/examples/AgentMemoryExample.js +1 -1
- package/lib/examples/AgentMonitoringExample.js +1 -1
- package/lib/examples/AgentNotificationsExample.js +1 -1
- package/lib/examples/AgentOtelExample.js +1 -1
- package/lib/examples/AgentOutputsExample.js +1 -1
- package/lib/examples/AgentSkillsExample.js +1 -1
- package/lib/examples/AgentToolApprovalsExample.js +1 -1
- package/lib/examples/AgentTriggersExample.js +1 -1
- package/lib/examples/AgentspecsExample.js +1 -1
- package/lib/examples/LoopWorkspaceEmbed.js +1 -1
- package/lib/examples/ScenesExample.js +2 -2
- package/lib/examples/VoiceChatExample.js +1 -1
- package/lib/examples/components/AuthRequiredView.js +2 -2
- package/lib/examples/components/HeaderControls.js +1 -1
- package/lib/examples/main.js +4 -4
- package/lib/examples2/main.js +1 -1
- package/lib/hooks/index.js +1 -1
- package/lib/hooks/useAIAgentsWebSocket.js +2 -2
- package/lib/hooks/useAgentRuntimes.js +3 -3
- package/lib/hooks/useCellOutputshot.js +1 -1
- package/lib/hooks/useCheckpoints.js +6 -6
- package/lib/hooks/useMonitoring.js +1 -1
- package/lib/hooks/useNotifications.js +2 -2
- package/lib/hooks/useProjects.js +1 -1
- package/lib/jupyter/serverExecution.js +2 -2
- package/lib/mocks/models/CourseMock.js +2 -2
- package/lib/mocks/models/SpaceMock.js +2 -2
- package/lib/models/CodeSandboxSnapshotDTO.js +1 -1
- package/lib/models/EnvironmentDTO.js +1 -1
- package/lib/models/LexicalDTO.js +2 -2
- package/lib/models/NotebookDTO.js +2 -2
- package/lib/models/Page.js +1 -1
- package/lib/models/RuntimeDTO.js +1 -1
- package/lib/models/Space.js +2 -2
- package/lib/models/SpaceDTO.js +2 -2
- package/lib/models/index.js +1 -1
- package/lib/portable/sessions.d.ts +4 -0
- package/lib/portable/sessions.js +4 -0
- package/lib/runtimes/actions.js +1 -1
- package/lib/services/DatalayerServiceManager.js +2 -2
- package/lib/state/index.js +3 -3
- package/lib/state/substates/RuntimesState.js +2 -2
- package/lib/state/substates/index.js +1 -1
- package/lib/stores/agentRuntimeStore.js +1 -1
- package/lib/types/mcp.js +1 -1
- package/lib/types/sandbox.js +1 -1
- package/package.json +1 -1
- package/scripts/check-npm-pack.mjs +22 -3
- package/scripts/esm-specifiers.mjs +71 -1
- package/scripts/fully-specify-lib.mjs +17 -2
- package/dist-embed/chunks/ChatView-LzqHHAEe.js +0 -32
- package/dist-embed/chunks/index-D8x0MQWQ.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as pe}from"./chunk-JWPE2WC7-D4pNFsZF.js";import{_ as m,F as de,y as X,A as G,D as he,d as me,l as O,a9 as L,b as ue,a as fe,o as ye,p as ge,g as Se,s as xe,B as be,aa as ve,q as Ce}from"./index-lOJZWhTu.js";import{s as we}from"./chunk-POPQ4Y6H-CNc-_UkX.js";import{p as Te}from"./cynefin-OW5HDTMX-D8Lw5okC.js";import{s as _}from"./index-MIxQaicl.js";import{f as P}from"./defaultLocale-5voVPcsN.js";import{o as I}from"./ordinal-Cboi1Yqb.js";import{h as $e,t as Le}from"./index-CvYzv8kf.js";import"./index-CJys1M3A.js";import"../datalayer-app-main.js";import"./fastdom-promised-BMVBoXkp.js";import"./line-DUjWPDRX.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./color-CG7_7V2-.js";import"./index-atSsKceW.js";import"./init-Gi6I4Gst.js";var ee=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=ue,this.getAccTitle=fe,this.setDiagramTitle=ye,this.getDiagramTitle=ge,this.getAccDescription=Se,this.setAccDescription=xe}static{m(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const r=be,s=X();return G({...r.treemap,...s.treemap??{}})}addNode(r,s){this.nodes.push(r),this.levels.set(r,s),s===0&&(this.outerNodes.push(r),this.root??=r)}getRoot(){return{name:"",children:this.outerNodes}}addClass(r,s){const i=this.classes.get(r)??{id:r,styles:[],textStyles:[]},c=s.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");c&&c.forEach(l=>{ve(l)&&(i?.textStyles?i.textStyles.push(l):i.textStyles=[l]),i?.styles?i.styles.push(l):i.styles=[l]}),this.classes.set(r,i)}getClasses(){return this.classes}getStylesForClass(r){return this.classes.get(r)?.styles??[]}clear(){Ce(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function te(r){if(!r.length)return[];const s=[],i=[];return r.forEach(c=>{const l={name:c.name,children:c.type==="Leaf"?void 0:[]};for(l.classSelector=c?.classSelector,c?.cssCompiledStyles&&(l.cssCompiledStyles=c.cssCompiledStyles),c.type==="Leaf"&&c.value!==void 0&&(l.value=c.value);i.length>0&&i[i.length-1].level>=c.level;)i.pop();if(i.length===0)s.push(l);else{const o=i[i.length-1].node;o.children?o.children.push(l):o.children=[l]}c.type!=="Leaf"&&i.push({node:l,level:c.level})}),s}m(te,"buildHierarchy");var Fe=m((r,s)=>{pe(r,s);const i=[];for(const o of r.TreemapRows??[])o.$type==="ClassDefStatement"&&s.addClass(o.className??"",o.styleText??"");for(const o of r.TreemapRows??[]){const d=o.item;if(!d)continue;const h=o.indent?parseInt(o.indent):0,M=Ne(d),a=d.classSelector?s.getStylesForClass(d.classSelector):[],N=a.length>0?a:void 0,x={level:h,name:M,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:N};i.push(x)}const c=te(i),l=m((o,d)=>{for(const h of o)s.addNode(h,d),h.children&&h.children.length>0&&l(h.children,d+1)},"addNodesRecursively");l(c,0)},"populate"),Ne=m(r=>r.name?String(r.name):"","getItemName"),ae={parser:{yy:void 0},parse:m(async r=>{try{const i=await Te("treemap",r);O.debug("Treemap AST:",i);const c=ae.parser?.yy;if(!(c instanceof ee))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Fe(i,c)}catch(s){throw O.error("Error parsing treemap:",s),s}},"parse")},ze=10,F=10,V=25,Ae=m((r,s,i,c)=>{const l=c.db,o=l.getConfig(),d=o.padding??ze,h=l.getDiagramTitle(),M=l.getRoot(),{themeVariables:a}=X();if(!M)return;const N=h?30:0,x=he(s),Y=o.nodeWidth?o.nodeWidth*F:960,j=o.nodeHeight?o.nodeHeight*F:500,H=Y,q=j+N;x.attr("viewBox",`0 0 ${H} ${q}`),me(x,q,H,o.useMaxWidth);let b;try{const e=o.valueFormat||",";if(e==="$0,0")b=m(t=>"$"+P(",")(t),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),n=t?t[0]:"";b=m(u=>"$"+P(","+n)(u),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);b=m(n=>"$"+P(t||"")(n),"valueFormat")}else b=P(e)}catch(e){O.error("Error creating format function:",e),b=P(",")}const z=I().range(["transparent",a.cScale0,a.cScale1,a.cScale2,a.cScale3,a.cScale4,a.cScale5,a.cScale6,a.cScale7,a.cScale8,a.cScale9,a.cScale10,a.cScale11]),le=I().range(["transparent",a.cScalePeer0,a.cScalePeer1,a.cScalePeer2,a.cScalePeer3,a.cScalePeer4,a.cScalePeer5,a.cScalePeer6,a.cScalePeer7,a.cScalePeer8,a.cScalePeer9,a.cScalePeer10,a.cScalePeer11]),k=I().range([a.cScaleLabel0,a.cScaleLabel1,a.cScaleLabel2,a.cScaleLabel3,a.cScaleLabel4,a.cScaleLabel5,a.cScaleLabel6,a.cScaleLabel7,a.cScaleLabel8,a.cScaleLabel9,a.cScaleLabel10,a.cScaleLabel11]);h&&x.append("text").attr("x",H/2).attr("y",N/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const U=x.append("g").attr("transform",`translate(0, ${N})`).attr("class","treemapContainer"),se=$e(M).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),J=Le().size([Y,j]).paddingTop(e=>e.children&&e.children.length>0?V+F:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?F:0).paddingRight(e=>e.children&&e.children.length>0?F:0).paddingBottom(e=>e.children&&e.children.length>0?F:0).round(!0)(se),re=J.descendants().filter(e=>e.children&&e.children.length>0),A=U.selectAll(".treemapSection").data(re).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",V).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),A.append("clipPath").attr("id",(e,t)=>`clip-section-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",V),A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>z(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>le(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const t=L({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),A.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",V/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,t)=>`url(#clip-section-${s}-${t})`).attr("style",e=>{if(e.depth===0)return"display: none;";const t="dominant-baseline: middle; font-size: 12px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const t=_(this),n=e.data.name;t.text(n);const u=e.x1-e.x0,y=6;let f;o.showValues!==!1&&e.value?f=u-10-30-10-y:f=u-y-6;const p=Math.max(15,f),v=t.node();if(v.getComputedTextLength()>p){let w=n;for(;w.length>0;){if(w=n.substring(0,w.length-1),w.length===0){t.text("..."),v.getComputedTextLength()>p&&t.text("");break}if(t.text(w+"..."),v.getComputedTextLength()<=p)break}}}),o.showValues!==!1&&A.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",V/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?b(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const t="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")});const K=J.leaves(),g=K.length>20,oe=g?16:38,W=g?14:28,T=g?4:8,D=g?4:6,R=g?2:4,Q=g?8:10,B=g?1:2,E=U.selectAll(".treemapLeafGroup").data(K).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);E.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("style",e=>L({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("stroke-width",3),E.append("clipPath").attr("id",(e,t)=>`clip-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),E.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const t=`text-anchor: middle; dominant-baseline: middle; font-size: ${oe}px;fill:`+k(e.data.name)+";",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,t)=>`url(#clip-${s}-${t})`).text(e=>e.data.name).each(function(e){const t=_(this),n=e.x1-e.x0,u=e.y1-e.y0,y=t.node(),f=n-2*R,$=u-2*R;if(f<Q||$<Q){t.style("display","none");return}let p=parseInt(t.style("font-size"),10);const v=.6;for(;y.getComputedTextLength()>f&&p>T;)p--,t.style("font-size",`${p}px`);let S=Math.max(D,Math.min(W,Math.round(p*v))),C=p+B+S;for(;C>$&&p>T&&(p--,S=Math.max(D,Math.min(W,Math.round(p*v))),!(S<D&&p===T));)t.style("font-size",`${p}px`),C=p+B+S;t.style("font-size",`${p}px`),g?(p<T||$<T)&&t.style("display","none"):(y.getComputedTextLength()>f||p<T||$<p)&&t.style("display","none")}),o.showValues!==!1&&E.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>{const n=`text-anchor: middle; dominant-baseline: hanging; font-size: ${W}px;fill:`+k(t.data.name)+";",u=L({cssCompiledStyles:t.data.cssCompiledStyles});return n+u.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,n)=>`url(#clip-${s}-${n})`).text(t=>t.value?b(t.value):"").each(function(t){const n=_(this),u=this.parentNode;if(!u){n.style("display","none");return}const y=_(u).select(".treemapLabel");if(y.empty()||y.style("display")==="none"){n.style("display","none");return}const f=parseFloat(y.style("font-size")),p=Math.max(D,Math.min(W,Math.round(f*.6)));n.style("font-size",`${p}px`);const S=(t.y1-t.y0)/2+f/2+B;n.attr("y",S);const C=t.x1-t.x0,Z=t.y1-t.y0-4,ce=C-2*R;n.node().getComputedTextLength()>ce||S+p>Z||p<D?n.style("display","none"):n.style("display",null)});const ne=o.diagramPadding??8;we(x,ne,"flowchart",o?.useMaxWidth||!1)},"draw"),De=m(function(r,s){return s.db.getClasses()},"getClasses"),Pe={draw:Ae,getClasses:De},Ve={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},Me=m(({treemap:r}={})=>{const s=de(),i=X(),c=G(s,i.themeVariables),l=G(Ve,r),o=l.titleColor??c.titleColor,d=l.labelColor??c.textColor,h=l.valueColor??c.textColor;return`
|
|
1
|
+
import{p as pe}from"./chunk-JWPE2WC7-th9umQbo.js";import{_ as m,F as de,y as X,A as G,D as he,d as me,l as O,a9 as L,b as ue,a as fe,o as ye,p as ge,g as Se,s as xe,B as be,aa as ve,q as Ce}from"./index-CbnU-kk0.js";import{s as we}from"./chunk-POPQ4Y6H-B097KlFr.js";import{p as Te}from"./cynefin-OW5HDTMX-BBLugbYz.js";import{s as _}from"./index-MIxQaicl.js";import{f as P}from"./defaultLocale-5voVPcsN.js";import{o as I}from"./ordinal-Cboi1Yqb.js";import{h as $e,t as Le}from"./index-CvYzv8kf.js";import"./index-CJys1M3A.js";import"../datalayer-app-main.js";import"./fastdom-promised-BMVBoXkp.js";import"./line-DUjWPDRX.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./color-CG7_7V2-.js";import"./index-atSsKceW.js";import"./init-Gi6I4Gst.js";var ee=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=ue,this.getAccTitle=fe,this.setDiagramTitle=ye,this.getDiagramTitle=ge,this.getAccDescription=Se,this.setAccDescription=xe}static{m(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const r=be,s=X();return G({...r.treemap,...s.treemap??{}})}addNode(r,s){this.nodes.push(r),this.levels.set(r,s),s===0&&(this.outerNodes.push(r),this.root??=r)}getRoot(){return{name:"",children:this.outerNodes}}addClass(r,s){const i=this.classes.get(r)??{id:r,styles:[],textStyles:[]},c=s.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");c&&c.forEach(l=>{ve(l)&&(i?.textStyles?i.textStyles.push(l):i.textStyles=[l]),i?.styles?i.styles.push(l):i.styles=[l]}),this.classes.set(r,i)}getClasses(){return this.classes}getStylesForClass(r){return this.classes.get(r)?.styles??[]}clear(){Ce(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function te(r){if(!r.length)return[];const s=[],i=[];return r.forEach(c=>{const l={name:c.name,children:c.type==="Leaf"?void 0:[]};for(l.classSelector=c?.classSelector,c?.cssCompiledStyles&&(l.cssCompiledStyles=c.cssCompiledStyles),c.type==="Leaf"&&c.value!==void 0&&(l.value=c.value);i.length>0&&i[i.length-1].level>=c.level;)i.pop();if(i.length===0)s.push(l);else{const o=i[i.length-1].node;o.children?o.children.push(l):o.children=[l]}c.type!=="Leaf"&&i.push({node:l,level:c.level})}),s}m(te,"buildHierarchy");var Fe=m((r,s)=>{pe(r,s);const i=[];for(const o of r.TreemapRows??[])o.$type==="ClassDefStatement"&&s.addClass(o.className??"",o.styleText??"");for(const o of r.TreemapRows??[]){const d=o.item;if(!d)continue;const h=o.indent?parseInt(o.indent):0,M=Ne(d),a=d.classSelector?s.getStylesForClass(d.classSelector):[],N=a.length>0?a:void 0,x={level:h,name:M,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:N};i.push(x)}const c=te(i),l=m((o,d)=>{for(const h of o)s.addNode(h,d),h.children&&h.children.length>0&&l(h.children,d+1)},"addNodesRecursively");l(c,0)},"populate"),Ne=m(r=>r.name?String(r.name):"","getItemName"),ae={parser:{yy:void 0},parse:m(async r=>{try{const i=await Te("treemap",r);O.debug("Treemap AST:",i);const c=ae.parser?.yy;if(!(c instanceof ee))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Fe(i,c)}catch(s){throw O.error("Error parsing treemap:",s),s}},"parse")},ze=10,F=10,V=25,Ae=m((r,s,i,c)=>{const l=c.db,o=l.getConfig(),d=o.padding??ze,h=l.getDiagramTitle(),M=l.getRoot(),{themeVariables:a}=X();if(!M)return;const N=h?30:0,x=he(s),Y=o.nodeWidth?o.nodeWidth*F:960,j=o.nodeHeight?o.nodeHeight*F:500,H=Y,q=j+N;x.attr("viewBox",`0 0 ${H} ${q}`),me(x,q,H,o.useMaxWidth);let b;try{const e=o.valueFormat||",";if(e==="$0,0")b=m(t=>"$"+P(",")(t),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),n=t?t[0]:"";b=m(u=>"$"+P(","+n)(u),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);b=m(n=>"$"+P(t||"")(n),"valueFormat")}else b=P(e)}catch(e){O.error("Error creating format function:",e),b=P(",")}const z=I().range(["transparent",a.cScale0,a.cScale1,a.cScale2,a.cScale3,a.cScale4,a.cScale5,a.cScale6,a.cScale7,a.cScale8,a.cScale9,a.cScale10,a.cScale11]),le=I().range(["transparent",a.cScalePeer0,a.cScalePeer1,a.cScalePeer2,a.cScalePeer3,a.cScalePeer4,a.cScalePeer5,a.cScalePeer6,a.cScalePeer7,a.cScalePeer8,a.cScalePeer9,a.cScalePeer10,a.cScalePeer11]),k=I().range([a.cScaleLabel0,a.cScaleLabel1,a.cScaleLabel2,a.cScaleLabel3,a.cScaleLabel4,a.cScaleLabel5,a.cScaleLabel6,a.cScaleLabel7,a.cScaleLabel8,a.cScaleLabel9,a.cScaleLabel10,a.cScaleLabel11]);h&&x.append("text").attr("x",H/2).attr("y",N/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const U=x.append("g").attr("transform",`translate(0, ${N})`).attr("class","treemapContainer"),se=$e(M).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),J=Le().size([Y,j]).paddingTop(e=>e.children&&e.children.length>0?V+F:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?F:0).paddingRight(e=>e.children&&e.children.length>0?F:0).paddingBottom(e=>e.children&&e.children.length>0?F:0).round(!0)(se),re=J.descendants().filter(e=>e.children&&e.children.length>0),A=U.selectAll(".treemapSection").data(re).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",V).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),A.append("clipPath").attr("id",(e,t)=>`clip-section-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",V),A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>z(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>le(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const t=L({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),A.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",V/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,t)=>`url(#clip-section-${s}-${t})`).attr("style",e=>{if(e.depth===0)return"display: none;";const t="dominant-baseline: middle; font-size: 12px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const t=_(this),n=e.data.name;t.text(n);const u=e.x1-e.x0,y=6;let f;o.showValues!==!1&&e.value?f=u-10-30-10-y:f=u-y-6;const p=Math.max(15,f),v=t.node();if(v.getComputedTextLength()>p){let w=n;for(;w.length>0;){if(w=n.substring(0,w.length-1),w.length===0){t.text("..."),v.getComputedTextLength()>p&&t.text("");break}if(t.text(w+"..."),v.getComputedTextLength()<=p)break}}}),o.showValues!==!1&&A.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",V/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?b(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const t="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")});const K=J.leaves(),g=K.length>20,oe=g?16:38,W=g?14:28,T=g?4:8,D=g?4:6,R=g?2:4,Q=g?8:10,B=g?1:2,E=U.selectAll(".treemapLeafGroup").data(K).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);E.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("style",e=>L({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("stroke-width",3),E.append("clipPath").attr("id",(e,t)=>`clip-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),E.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const t=`text-anchor: middle; dominant-baseline: middle; font-size: ${oe}px;fill:`+k(e.data.name)+";",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,t)=>`url(#clip-${s}-${t})`).text(e=>e.data.name).each(function(e){const t=_(this),n=e.x1-e.x0,u=e.y1-e.y0,y=t.node(),f=n-2*R,$=u-2*R;if(f<Q||$<Q){t.style("display","none");return}let p=parseInt(t.style("font-size"),10);const v=.6;for(;y.getComputedTextLength()>f&&p>T;)p--,t.style("font-size",`${p}px`);let S=Math.max(D,Math.min(W,Math.round(p*v))),C=p+B+S;for(;C>$&&p>T&&(p--,S=Math.max(D,Math.min(W,Math.round(p*v))),!(S<D&&p===T));)t.style("font-size",`${p}px`),C=p+B+S;t.style("font-size",`${p}px`),g?(p<T||$<T)&&t.style("display","none"):(y.getComputedTextLength()>f||p<T||$<p)&&t.style("display","none")}),o.showValues!==!1&&E.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>{const n=`text-anchor: middle; dominant-baseline: hanging; font-size: ${W}px;fill:`+k(t.data.name)+";",u=L({cssCompiledStyles:t.data.cssCompiledStyles});return n+u.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,n)=>`url(#clip-${s}-${n})`).text(t=>t.value?b(t.value):"").each(function(t){const n=_(this),u=this.parentNode;if(!u){n.style("display","none");return}const y=_(u).select(".treemapLabel");if(y.empty()||y.style("display")==="none"){n.style("display","none");return}const f=parseFloat(y.style("font-size")),p=Math.max(D,Math.min(W,Math.round(f*.6)));n.style("font-size",`${p}px`);const S=(t.y1-t.y0)/2+f/2+B;n.attr("y",S);const C=t.x1-t.x0,Z=t.y1-t.y0-4,ce=C-2*R;n.node().getComputedTextLength()>ce||S+p>Z||p<D?n.style("display","none"):n.style("display",null)});const ne=o.diagramPadding??8;we(x,ne,"flowchart",o?.useMaxWidth||!1)},"draw"),De=m(function(r,s){return s.db.getClasses()},"getClasses"),Pe={draw:Ae,getClasses:De},Ve={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},Me=m(({treemap:r}={})=>{const s=de(),i=X(),c=G(s,i.themeVariables),l=G(Ve,r),o=l.titleColor??c.titleColor,d=l.labelColor??c.textColor,h=l.valueColor??c.textColor;return`
|
|
2
2
|
.treemapNode.section {
|
|
3
3
|
stroke: ${l.sectionStrokeColor};
|
|
4
4
|
stroke-width: ${l.sectionStrokeWidth};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as pe}from"./chunk-JWPE2WC7-B40RAhYQ.js";import{_ as m,F as de,y as X,A as G,D as he,d as me,l as O,a9 as L,b as ue,a as fe,o as ye,p as ge,g as Se,s as xe,B as be,aa as ve,q as Ce}from"./index-BQdtKMKk.js";import{s as we}from"./chunk-POPQ4Y6H-PC7NS4ab.js";import{p as Te}from"./cynefin-OW5HDTMX-BBLugbYz.js";import{s as _}from"./index-MIxQaicl.js";import{f as P}from"./defaultLocale-5voVPcsN.js";import{o as I}from"./ordinal-Cboi1Yqb.js";import{h as $e,t as Le}from"./index-CvYzv8kf.js";import"./index-CJys1M3A.js";import"../datalayer-app-main.js";import"./fastdom-promised-BMVBoXkp.js";import"./line-DUjWPDRX.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./color-CG7_7V2-.js";import"./index-atSsKceW.js";import"./init-Gi6I4Gst.js";var ee=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=ue,this.getAccTitle=fe,this.setDiagramTitle=ye,this.getDiagramTitle=ge,this.getAccDescription=Se,this.setAccDescription=xe}static{m(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const r=be,s=X();return G({...r.treemap,...s.treemap??{}})}addNode(r,s){this.nodes.push(r),this.levels.set(r,s),s===0&&(this.outerNodes.push(r),this.root??=r)}getRoot(){return{name:"",children:this.outerNodes}}addClass(r,s){const i=this.classes.get(r)??{id:r,styles:[],textStyles:[]},c=s.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");c&&c.forEach(l=>{ve(l)&&(i?.textStyles?i.textStyles.push(l):i.textStyles=[l]),i?.styles?i.styles.push(l):i.styles=[l]}),this.classes.set(r,i)}getClasses(){return this.classes}getStylesForClass(r){return this.classes.get(r)?.styles??[]}clear(){Ce(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function te(r){if(!r.length)return[];const s=[],i=[];return r.forEach(c=>{const l={name:c.name,children:c.type==="Leaf"?void 0:[]};for(l.classSelector=c?.classSelector,c?.cssCompiledStyles&&(l.cssCompiledStyles=c.cssCompiledStyles),c.type==="Leaf"&&c.value!==void 0&&(l.value=c.value);i.length>0&&i[i.length-1].level>=c.level;)i.pop();if(i.length===0)s.push(l);else{const o=i[i.length-1].node;o.children?o.children.push(l):o.children=[l]}c.type!=="Leaf"&&i.push({node:l,level:c.level})}),s}m(te,"buildHierarchy");var Fe=m((r,s)=>{pe(r,s);const i=[];for(const o of r.TreemapRows??[])o.$type==="ClassDefStatement"&&s.addClass(o.className??"",o.styleText??"");for(const o of r.TreemapRows??[]){const d=o.item;if(!d)continue;const h=o.indent?parseInt(o.indent):0,M=Ne(d),a=d.classSelector?s.getStylesForClass(d.classSelector):[],N=a.length>0?a:void 0,x={level:h,name:M,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:N};i.push(x)}const c=te(i),l=m((o,d)=>{for(const h of o)s.addNode(h,d),h.children&&h.children.length>0&&l(h.children,d+1)},"addNodesRecursively");l(c,0)},"populate"),Ne=m(r=>r.name?String(r.name):"","getItemName"),ae={parser:{yy:void 0},parse:m(async r=>{try{const i=await Te("treemap",r);O.debug("Treemap AST:",i);const c=ae.parser?.yy;if(!(c instanceof ee))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Fe(i,c)}catch(s){throw O.error("Error parsing treemap:",s),s}},"parse")},ze=10,F=10,V=25,Ae=m((r,s,i,c)=>{const l=c.db,o=l.getConfig(),d=o.padding??ze,h=l.getDiagramTitle(),M=l.getRoot(),{themeVariables:a}=X();if(!M)return;const N=h?30:0,x=he(s),Y=o.nodeWidth?o.nodeWidth*F:960,j=o.nodeHeight?o.nodeHeight*F:500,H=Y,q=j+N;x.attr("viewBox",`0 0 ${H} ${q}`),me(x,q,H,o.useMaxWidth);let b;try{const e=o.valueFormat||",";if(e==="$0,0")b=m(t=>"$"+P(",")(t),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),n=t?t[0]:"";b=m(u=>"$"+P(","+n)(u),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);b=m(n=>"$"+P(t||"")(n),"valueFormat")}else b=P(e)}catch(e){O.error("Error creating format function:",e),b=P(",")}const z=I().range(["transparent",a.cScale0,a.cScale1,a.cScale2,a.cScale3,a.cScale4,a.cScale5,a.cScale6,a.cScale7,a.cScale8,a.cScale9,a.cScale10,a.cScale11]),le=I().range(["transparent",a.cScalePeer0,a.cScalePeer1,a.cScalePeer2,a.cScalePeer3,a.cScalePeer4,a.cScalePeer5,a.cScalePeer6,a.cScalePeer7,a.cScalePeer8,a.cScalePeer9,a.cScalePeer10,a.cScalePeer11]),k=I().range([a.cScaleLabel0,a.cScaleLabel1,a.cScaleLabel2,a.cScaleLabel3,a.cScaleLabel4,a.cScaleLabel5,a.cScaleLabel6,a.cScaleLabel7,a.cScaleLabel8,a.cScaleLabel9,a.cScaleLabel10,a.cScaleLabel11]);h&&x.append("text").attr("x",H/2).attr("y",N/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const U=x.append("g").attr("transform",`translate(0, ${N})`).attr("class","treemapContainer"),se=$e(M).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),J=Le().size([Y,j]).paddingTop(e=>e.children&&e.children.length>0?V+F:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?F:0).paddingRight(e=>e.children&&e.children.length>0?F:0).paddingBottom(e=>e.children&&e.children.length>0?F:0).round(!0)(se),re=J.descendants().filter(e=>e.children&&e.children.length>0),A=U.selectAll(".treemapSection").data(re).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",V).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),A.append("clipPath").attr("id",(e,t)=>`clip-section-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",V),A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>z(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>le(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const t=L({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),A.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",V/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,t)=>`url(#clip-section-${s}-${t})`).attr("style",e=>{if(e.depth===0)return"display: none;";const t="dominant-baseline: middle; font-size: 12px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const t=_(this),n=e.data.name;t.text(n);const u=e.x1-e.x0,y=6;let f;o.showValues!==!1&&e.value?f=u-10-30-10-y:f=u-y-6;const p=Math.max(15,f),v=t.node();if(v.getComputedTextLength()>p){let w=n;for(;w.length>0;){if(w=n.substring(0,w.length-1),w.length===0){t.text("..."),v.getComputedTextLength()>p&&t.text("");break}if(t.text(w+"..."),v.getComputedTextLength()<=p)break}}}),o.showValues!==!1&&A.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",V/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?b(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const t="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")});const K=J.leaves(),g=K.length>20,oe=g?16:38,W=g?14:28,T=g?4:8,D=g?4:6,R=g?2:4,Q=g?8:10,B=g?1:2,E=U.selectAll(".treemapLeafGroup").data(K).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);E.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("style",e=>L({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("stroke-width",3),E.append("clipPath").attr("id",(e,t)=>`clip-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),E.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const t=`text-anchor: middle; dominant-baseline: middle; font-size: ${oe}px;fill:`+k(e.data.name)+";",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,t)=>`url(#clip-${s}-${t})`).text(e=>e.data.name).each(function(e){const t=_(this),n=e.x1-e.x0,u=e.y1-e.y0,y=t.node(),f=n-2*R,$=u-2*R;if(f<Q||$<Q){t.style("display","none");return}let p=parseInt(t.style("font-size"),10);const v=.6;for(;y.getComputedTextLength()>f&&p>T;)p--,t.style("font-size",`${p}px`);let S=Math.max(D,Math.min(W,Math.round(p*v))),C=p+B+S;for(;C>$&&p>T&&(p--,S=Math.max(D,Math.min(W,Math.round(p*v))),!(S<D&&p===T));)t.style("font-size",`${p}px`),C=p+B+S;t.style("font-size",`${p}px`),g?(p<T||$<T)&&t.style("display","none"):(y.getComputedTextLength()>f||p<T||$<p)&&t.style("display","none")}),o.showValues!==!1&&E.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>{const n=`text-anchor: middle; dominant-baseline: hanging; font-size: ${W}px;fill:`+k(t.data.name)+";",u=L({cssCompiledStyles:t.data.cssCompiledStyles});return n+u.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,n)=>`url(#clip-${s}-${n})`).text(t=>t.value?b(t.value):"").each(function(t){const n=_(this),u=this.parentNode;if(!u){n.style("display","none");return}const y=_(u).select(".treemapLabel");if(y.empty()||y.style("display")==="none"){n.style("display","none");return}const f=parseFloat(y.style("font-size")),p=Math.max(D,Math.min(W,Math.round(f*.6)));n.style("font-size",`${p}px`);const S=(t.y1-t.y0)/2+f/2+B;n.attr("y",S);const C=t.x1-t.x0,Z=t.y1-t.y0-4,ce=C-2*R;n.node().getComputedTextLength()>ce||S+p>Z||p<D?n.style("display","none"):n.style("display",null)});const ne=o.diagramPadding??8;we(x,ne,"flowchart",o?.useMaxWidth||!1)},"draw"),De=m(function(r,s){return s.db.getClasses()},"getClasses"),Pe={draw:Ae,getClasses:De},Ve={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},Me=m(({treemap:r}={})=>{const s=de(),i=X(),c=G(s,i.themeVariables),l=G(Ve,r),o=l.titleColor??c.titleColor,d=l.labelColor??c.textColor,h=l.valueColor??c.textColor;return`
|
|
1
|
+
import{p as pe}from"./chunk-JWPE2WC7-779bmDSv.js";import{_ as m,F as de,y as X,A as G,D as he,d as me,l as O,a9 as L,b as ue,a as fe,o as ye,p as ge,g as Se,s as xe,B as be,aa as ve,q as Ce}from"./index-DY5U0msZ.js";import{s as we}from"./chunk-POPQ4Y6H-CYXeyiko.js";import{p as Te}from"./cynefin-OW5HDTMX-D8Lw5okC.js";import{s as _}from"./index-MIxQaicl.js";import{f as P}from"./defaultLocale-5voVPcsN.js";import{o as I}from"./ordinal-Cboi1Yqb.js";import{h as $e,t as Le}from"./index-CvYzv8kf.js";import"./index-CJys1M3A.js";import"../datalayer-app-main.js";import"./fastdom-promised-BMVBoXkp.js";import"./line-DUjWPDRX.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./color-CG7_7V2-.js";import"./index-atSsKceW.js";import"./init-Gi6I4Gst.js";var ee=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=ue,this.getAccTitle=fe,this.setDiagramTitle=ye,this.getDiagramTitle=ge,this.getAccDescription=Se,this.setAccDescription=xe}static{m(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const r=be,s=X();return G({...r.treemap,...s.treemap??{}})}addNode(r,s){this.nodes.push(r),this.levels.set(r,s),s===0&&(this.outerNodes.push(r),this.root??=r)}getRoot(){return{name:"",children:this.outerNodes}}addClass(r,s){const i=this.classes.get(r)??{id:r,styles:[],textStyles:[]},c=s.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");c&&c.forEach(l=>{ve(l)&&(i?.textStyles?i.textStyles.push(l):i.textStyles=[l]),i?.styles?i.styles.push(l):i.styles=[l]}),this.classes.set(r,i)}getClasses(){return this.classes}getStylesForClass(r){return this.classes.get(r)?.styles??[]}clear(){Ce(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function te(r){if(!r.length)return[];const s=[],i=[];return r.forEach(c=>{const l={name:c.name,children:c.type==="Leaf"?void 0:[]};for(l.classSelector=c?.classSelector,c?.cssCompiledStyles&&(l.cssCompiledStyles=c.cssCompiledStyles),c.type==="Leaf"&&c.value!==void 0&&(l.value=c.value);i.length>0&&i[i.length-1].level>=c.level;)i.pop();if(i.length===0)s.push(l);else{const o=i[i.length-1].node;o.children?o.children.push(l):o.children=[l]}c.type!=="Leaf"&&i.push({node:l,level:c.level})}),s}m(te,"buildHierarchy");var Fe=m((r,s)=>{pe(r,s);const i=[];for(const o of r.TreemapRows??[])o.$type==="ClassDefStatement"&&s.addClass(o.className??"",o.styleText??"");for(const o of r.TreemapRows??[]){const d=o.item;if(!d)continue;const h=o.indent?parseInt(o.indent):0,M=Ne(d),a=d.classSelector?s.getStylesForClass(d.classSelector):[],N=a.length>0?a:void 0,x={level:h,name:M,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:N};i.push(x)}const c=te(i),l=m((o,d)=>{for(const h of o)s.addNode(h,d),h.children&&h.children.length>0&&l(h.children,d+1)},"addNodesRecursively");l(c,0)},"populate"),Ne=m(r=>r.name?String(r.name):"","getItemName"),ae={parser:{yy:void 0},parse:m(async r=>{try{const i=await Te("treemap",r);O.debug("Treemap AST:",i);const c=ae.parser?.yy;if(!(c instanceof ee))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Fe(i,c)}catch(s){throw O.error("Error parsing treemap:",s),s}},"parse")},ze=10,F=10,V=25,Ae=m((r,s,i,c)=>{const l=c.db,o=l.getConfig(),d=o.padding??ze,h=l.getDiagramTitle(),M=l.getRoot(),{themeVariables:a}=X();if(!M)return;const N=h?30:0,x=he(s),Y=o.nodeWidth?o.nodeWidth*F:960,j=o.nodeHeight?o.nodeHeight*F:500,H=Y,q=j+N;x.attr("viewBox",`0 0 ${H} ${q}`),me(x,q,H,o.useMaxWidth);let b;try{const e=o.valueFormat||",";if(e==="$0,0")b=m(t=>"$"+P(",")(t),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),n=t?t[0]:"";b=m(u=>"$"+P(","+n)(u),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);b=m(n=>"$"+P(t||"")(n),"valueFormat")}else b=P(e)}catch(e){O.error("Error creating format function:",e),b=P(",")}const z=I().range(["transparent",a.cScale0,a.cScale1,a.cScale2,a.cScale3,a.cScale4,a.cScale5,a.cScale6,a.cScale7,a.cScale8,a.cScale9,a.cScale10,a.cScale11]),le=I().range(["transparent",a.cScalePeer0,a.cScalePeer1,a.cScalePeer2,a.cScalePeer3,a.cScalePeer4,a.cScalePeer5,a.cScalePeer6,a.cScalePeer7,a.cScalePeer8,a.cScalePeer9,a.cScalePeer10,a.cScalePeer11]),k=I().range([a.cScaleLabel0,a.cScaleLabel1,a.cScaleLabel2,a.cScaleLabel3,a.cScaleLabel4,a.cScaleLabel5,a.cScaleLabel6,a.cScaleLabel7,a.cScaleLabel8,a.cScaleLabel9,a.cScaleLabel10,a.cScaleLabel11]);h&&x.append("text").attr("x",H/2).attr("y",N/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const U=x.append("g").attr("transform",`translate(0, ${N})`).attr("class","treemapContainer"),se=$e(M).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),J=Le().size([Y,j]).paddingTop(e=>e.children&&e.children.length>0?V+F:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?F:0).paddingRight(e=>e.children&&e.children.length>0?F:0).paddingBottom(e=>e.children&&e.children.length>0?F:0).round(!0)(se),re=J.descendants().filter(e=>e.children&&e.children.length>0),A=U.selectAll(".treemapSection").data(re).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",V).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),A.append("clipPath").attr("id",(e,t)=>`clip-section-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",V),A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>z(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>le(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const t=L({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),A.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",V/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,t)=>`url(#clip-section-${s}-${t})`).attr("style",e=>{if(e.depth===0)return"display: none;";const t="dominant-baseline: middle; font-size: 12px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const t=_(this),n=e.data.name;t.text(n);const u=e.x1-e.x0,y=6;let f;o.showValues!==!1&&e.value?f=u-10-30-10-y:f=u-y-6;const p=Math.max(15,f),v=t.node();if(v.getComputedTextLength()>p){let w=n;for(;w.length>0;){if(w=n.substring(0,w.length-1),w.length===0){t.text("..."),v.getComputedTextLength()>p&&t.text("");break}if(t.text(w+"..."),v.getComputedTextLength()<=p)break}}}),o.showValues!==!1&&A.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",V/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?b(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const t="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")});const K=J.leaves(),g=K.length>20,oe=g?16:38,W=g?14:28,T=g?4:8,D=g?4:6,R=g?2:4,Q=g?8:10,B=g?1:2,E=U.selectAll(".treemapLeafGroup").data(K).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);E.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("style",e=>L({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("stroke-width",3),E.append("clipPath").attr("id",(e,t)=>`clip-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),E.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const t=`text-anchor: middle; dominant-baseline: middle; font-size: ${oe}px;fill:`+k(e.data.name)+";",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,t)=>`url(#clip-${s}-${t})`).text(e=>e.data.name).each(function(e){const t=_(this),n=e.x1-e.x0,u=e.y1-e.y0,y=t.node(),f=n-2*R,$=u-2*R;if(f<Q||$<Q){t.style("display","none");return}let p=parseInt(t.style("font-size"),10);const v=.6;for(;y.getComputedTextLength()>f&&p>T;)p--,t.style("font-size",`${p}px`);let S=Math.max(D,Math.min(W,Math.round(p*v))),C=p+B+S;for(;C>$&&p>T&&(p--,S=Math.max(D,Math.min(W,Math.round(p*v))),!(S<D&&p===T));)t.style("font-size",`${p}px`),C=p+B+S;t.style("font-size",`${p}px`),g?(p<T||$<T)&&t.style("display","none"):(y.getComputedTextLength()>f||p<T||$<p)&&t.style("display","none")}),o.showValues!==!1&&E.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>{const n=`text-anchor: middle; dominant-baseline: hanging; font-size: ${W}px;fill:`+k(t.data.name)+";",u=L({cssCompiledStyles:t.data.cssCompiledStyles});return n+u.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,n)=>`url(#clip-${s}-${n})`).text(t=>t.value?b(t.value):"").each(function(t){const n=_(this),u=this.parentNode;if(!u){n.style("display","none");return}const y=_(u).select(".treemapLabel");if(y.empty()||y.style("display")==="none"){n.style("display","none");return}const f=parseFloat(y.style("font-size")),p=Math.max(D,Math.min(W,Math.round(f*.6)));n.style("font-size",`${p}px`);const S=(t.y1-t.y0)/2+f/2+B;n.attr("y",S);const C=t.x1-t.x0,Z=t.y1-t.y0-4,ce=C-2*R;n.node().getComputedTextLength()>ce||S+p>Z||p<D?n.style("display","none"):n.style("display",null)});const ne=o.diagramPadding??8;we(x,ne,"flowchart",o?.useMaxWidth||!1)},"draw"),De=m(function(r,s){return s.db.getClasses()},"getClasses"),Pe={draw:Ae,getClasses:De},Ve={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},Me=m(({treemap:r}={})=>{const s=de(),i=X(),c=G(s,i.themeVariables),l=G(Ve,r),o=l.titleColor??c.titleColor,d=l.labelColor??c.textColor,h=l.valueColor??c.textColor;return`
|
|
2
2
|
.treemapNode.section {
|
|
3
3
|
stroke: ${l.sectionStrokeColor};
|
|
4
4
|
stroke-width: ${l.sectionStrokeWidth};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as pe}from"./chunk-JWPE2WC7-DaBG37yC.js";import{_ as m,F as de,y as X,A as G,D as he,d as me,l as O,a9 as L,b as ue,a as fe,o as ye,p as ge,g as Se,s as xe,B as be,aa as ve,q as Ce}from"./mermaid.core-D0955PCw.js";import{s as we}from"./chunk-POPQ4Y6H-WjTzJISs.js";import{p as Te}from"./cynefin-OW5HDTMX-BVK0_S--.js";import{s as _}from"./index-MIxQaicl.js";import{f as P}from"./defaultLocale-5voVPcsN.js";import{o as I}from"./ordinal-Cboi1Yqb.js";import{h as $e,t as Le}from"./index-CvYzv8kf.js";import"../datalayer-app-main.js";import"./fastdom-promised-BMVBoXkp.js";import"./line-DUjWPDRX.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./color-CG7_7V2-.js";import"./index-atSsKceW.js";import"./init-Gi6I4Gst.js";var ee=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=ue,this.getAccTitle=fe,this.setDiagramTitle=ye,this.getDiagramTitle=ge,this.getAccDescription=Se,this.setAccDescription=xe}static{m(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const r=be,s=X();return G({...r.treemap,...s.treemap??{}})}addNode(r,s){this.nodes.push(r),this.levels.set(r,s),s===0&&(this.outerNodes.push(r),this.root??=r)}getRoot(){return{name:"",children:this.outerNodes}}addClass(r,s){const i=this.classes.get(r)??{id:r,styles:[],textStyles:[]},c=s.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");c&&c.forEach(l=>{ve(l)&&(i?.textStyles?i.textStyles.push(l):i.textStyles=[l]),i?.styles?i.styles.push(l):i.styles=[l]}),this.classes.set(r,i)}getClasses(){return this.classes}getStylesForClass(r){return this.classes.get(r)?.styles??[]}clear(){Ce(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function te(r){if(!r.length)return[];const s=[],i=[];return r.forEach(c=>{const l={name:c.name,children:c.type==="Leaf"?void 0:[]};for(l.classSelector=c?.classSelector,c?.cssCompiledStyles&&(l.cssCompiledStyles=c.cssCompiledStyles),c.type==="Leaf"&&c.value!==void 0&&(l.value=c.value);i.length>0&&i[i.length-1].level>=c.level;)i.pop();if(i.length===0)s.push(l);else{const o=i[i.length-1].node;o.children?o.children.push(l):o.children=[l]}c.type!=="Leaf"&&i.push({node:l,level:c.level})}),s}m(te,"buildHierarchy");var Fe=m((r,s)=>{pe(r,s);const i=[];for(const o of r.TreemapRows??[])o.$type==="ClassDefStatement"&&s.addClass(o.className??"",o.styleText??"");for(const o of r.TreemapRows??[]){const d=o.item;if(!d)continue;const h=o.indent?parseInt(o.indent):0,M=Ne(d),a=d.classSelector?s.getStylesForClass(d.classSelector):[],N=a.length>0?a:void 0,x={level:h,name:M,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:N};i.push(x)}const c=te(i),l=m((o,d)=>{for(const h of o)s.addNode(h,d),h.children&&h.children.length>0&&l(h.children,d+1)},"addNodesRecursively");l(c,0)},"populate"),Ne=m(r=>r.name?String(r.name):"","getItemName"),ae={parser:{yy:void 0},parse:m(async r=>{try{const i=await Te("treemap",r);O.debug("Treemap AST:",i);const c=ae.parser?.yy;if(!(c instanceof ee))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Fe(i,c)}catch(s){throw O.error("Error parsing treemap:",s),s}},"parse")},ze=10,F=10,V=25,Ae=m((r,s,i,c)=>{const l=c.db,o=l.getConfig(),d=o.padding??ze,h=l.getDiagramTitle(),M=l.getRoot(),{themeVariables:a}=X();if(!M)return;const N=h?30:0,x=he(s),Y=o.nodeWidth?o.nodeWidth*F:960,j=o.nodeHeight?o.nodeHeight*F:500,H=Y,q=j+N;x.attr("viewBox",`0 0 ${H} ${q}`),me(x,q,H,o.useMaxWidth);let b;try{const e=o.valueFormat||",";if(e==="$0,0")b=m(t=>"$"+P(",")(t),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),n=t?t[0]:"";b=m(u=>"$"+P(","+n)(u),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);b=m(n=>"$"+P(t||"")(n),"valueFormat")}else b=P(e)}catch(e){O.error("Error creating format function:",e),b=P(",")}const z=I().range(["transparent",a.cScale0,a.cScale1,a.cScale2,a.cScale3,a.cScale4,a.cScale5,a.cScale6,a.cScale7,a.cScale8,a.cScale9,a.cScale10,a.cScale11]),le=I().range(["transparent",a.cScalePeer0,a.cScalePeer1,a.cScalePeer2,a.cScalePeer3,a.cScalePeer4,a.cScalePeer5,a.cScalePeer6,a.cScalePeer7,a.cScalePeer8,a.cScalePeer9,a.cScalePeer10,a.cScalePeer11]),k=I().range([a.cScaleLabel0,a.cScaleLabel1,a.cScaleLabel2,a.cScaleLabel3,a.cScaleLabel4,a.cScaleLabel5,a.cScaleLabel6,a.cScaleLabel7,a.cScaleLabel8,a.cScaleLabel9,a.cScaleLabel10,a.cScaleLabel11]);h&&x.append("text").attr("x",H/2).attr("y",N/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const U=x.append("g").attr("transform",`translate(0, ${N})`).attr("class","treemapContainer"),se=$e(M).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),J=Le().size([Y,j]).paddingTop(e=>e.children&&e.children.length>0?V+F:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?F:0).paddingRight(e=>e.children&&e.children.length>0?F:0).paddingBottom(e=>e.children&&e.children.length>0?F:0).round(!0)(se),re=J.descendants().filter(e=>e.children&&e.children.length>0),A=U.selectAll(".treemapSection").data(re).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",V).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),A.append("clipPath").attr("id",(e,t)=>`clip-section-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",V),A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>z(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>le(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const t=L({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),A.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",V/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,t)=>`url(#clip-section-${s}-${t})`).attr("style",e=>{if(e.depth===0)return"display: none;";const t="dominant-baseline: middle; font-size: 12px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const t=_(this),n=e.data.name;t.text(n);const u=e.x1-e.x0,y=6;let f;o.showValues!==!1&&e.value?f=u-10-30-10-y:f=u-y-6;const p=Math.max(15,f),v=t.node();if(v.getComputedTextLength()>p){let w=n;for(;w.length>0;){if(w=n.substring(0,w.length-1),w.length===0){t.text("..."),v.getComputedTextLength()>p&&t.text("");break}if(t.text(w+"..."),v.getComputedTextLength()<=p)break}}}),o.showValues!==!1&&A.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",V/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?b(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const t="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")});const K=J.leaves(),g=K.length>20,oe=g?16:38,W=g?14:28,T=g?4:8,D=g?4:6,R=g?2:4,Q=g?8:10,B=g?1:2,E=U.selectAll(".treemapLeafGroup").data(K).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);E.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("style",e=>L({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("stroke-width",3),E.append("clipPath").attr("id",(e,t)=>`clip-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),E.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const t=`text-anchor: middle; dominant-baseline: middle; font-size: ${oe}px;fill:`+k(e.data.name)+";",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,t)=>`url(#clip-${s}-${t})`).text(e=>e.data.name).each(function(e){const t=_(this),n=e.x1-e.x0,u=e.y1-e.y0,y=t.node(),f=n-2*R,$=u-2*R;if(f<Q||$<Q){t.style("display","none");return}let p=parseInt(t.style("font-size"),10);const v=.6;for(;y.getComputedTextLength()>f&&p>T;)p--,t.style("font-size",`${p}px`);let S=Math.max(D,Math.min(W,Math.round(p*v))),C=p+B+S;for(;C>$&&p>T&&(p--,S=Math.max(D,Math.min(W,Math.round(p*v))),!(S<D&&p===T));)t.style("font-size",`${p}px`),C=p+B+S;t.style("font-size",`${p}px`),g?(p<T||$<T)&&t.style("display","none"):(y.getComputedTextLength()>f||p<T||$<p)&&t.style("display","none")}),o.showValues!==!1&&E.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>{const n=`text-anchor: middle; dominant-baseline: hanging; font-size: ${W}px;fill:`+k(t.data.name)+";",u=L({cssCompiledStyles:t.data.cssCompiledStyles});return n+u.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,n)=>`url(#clip-${s}-${n})`).text(t=>t.value?b(t.value):"").each(function(t){const n=_(this),u=this.parentNode;if(!u){n.style("display","none");return}const y=_(u).select(".treemapLabel");if(y.empty()||y.style("display")==="none"){n.style("display","none");return}const f=parseFloat(y.style("font-size")),p=Math.max(D,Math.min(W,Math.round(f*.6)));n.style("font-size",`${p}px`);const S=(t.y1-t.y0)/2+f/2+B;n.attr("y",S);const C=t.x1-t.x0,Z=t.y1-t.y0-4,ce=C-2*R;n.node().getComputedTextLength()>ce||S+p>Z||p<D?n.style("display","none"):n.style("display",null)});const ne=o.diagramPadding??8;we(x,ne,"flowchart",o?.useMaxWidth||!1)},"draw"),De=m(function(r,s){return s.db.getClasses()},"getClasses"),Pe={draw:Ae,getClasses:De},Ve={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},Me=m(({treemap:r}={})=>{const s=de(),i=X(),c=G(s,i.themeVariables),l=G(Ve,r),o=l.titleColor??c.titleColor,d=l.labelColor??c.textColor,h=l.valueColor??c.textColor;return`
|
|
1
|
+
import{p as pe}from"./chunk-JWPE2WC7-Be4x4L6B.js";import{_ as m,F as de,y as X,A as G,D as he,d as me,l as O,a9 as L,b as ue,a as fe,o as ye,p as ge,g as Se,s as xe,B as be,aa as ve,q as Ce}from"./mermaid.core-CN-kUGXQ.js";import{s as we}from"./chunk-POPQ4Y6H-C_fIQaTN.js";import{p as Te}from"./cynefin-OW5HDTMX-BVK0_S--.js";import{s as _}from"./index-MIxQaicl.js";import{f as P}from"./defaultLocale-5voVPcsN.js";import{o as I}from"./ordinal-Cboi1Yqb.js";import{h as $e,t as Le}from"./index-CvYzv8kf.js";import"../datalayer-app-main.js";import"./fastdom-promised-BMVBoXkp.js";import"./line-DUjWPDRX.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./color-CG7_7V2-.js";import"./index-atSsKceW.js";import"./init-Gi6I4Gst.js";var ee=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=ue,this.getAccTitle=fe,this.setDiagramTitle=ye,this.getDiagramTitle=ge,this.getAccDescription=Se,this.setAccDescription=xe}static{m(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const r=be,s=X();return G({...r.treemap,...s.treemap??{}})}addNode(r,s){this.nodes.push(r),this.levels.set(r,s),s===0&&(this.outerNodes.push(r),this.root??=r)}getRoot(){return{name:"",children:this.outerNodes}}addClass(r,s){const i=this.classes.get(r)??{id:r,styles:[],textStyles:[]},c=s.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");c&&c.forEach(l=>{ve(l)&&(i?.textStyles?i.textStyles.push(l):i.textStyles=[l]),i?.styles?i.styles.push(l):i.styles=[l]}),this.classes.set(r,i)}getClasses(){return this.classes}getStylesForClass(r){return this.classes.get(r)?.styles??[]}clear(){Ce(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function te(r){if(!r.length)return[];const s=[],i=[];return r.forEach(c=>{const l={name:c.name,children:c.type==="Leaf"?void 0:[]};for(l.classSelector=c?.classSelector,c?.cssCompiledStyles&&(l.cssCompiledStyles=c.cssCompiledStyles),c.type==="Leaf"&&c.value!==void 0&&(l.value=c.value);i.length>0&&i[i.length-1].level>=c.level;)i.pop();if(i.length===0)s.push(l);else{const o=i[i.length-1].node;o.children?o.children.push(l):o.children=[l]}c.type!=="Leaf"&&i.push({node:l,level:c.level})}),s}m(te,"buildHierarchy");var Fe=m((r,s)=>{pe(r,s);const i=[];for(const o of r.TreemapRows??[])o.$type==="ClassDefStatement"&&s.addClass(o.className??"",o.styleText??"");for(const o of r.TreemapRows??[]){const d=o.item;if(!d)continue;const h=o.indent?parseInt(o.indent):0,M=Ne(d),a=d.classSelector?s.getStylesForClass(d.classSelector):[],N=a.length>0?a:void 0,x={level:h,name:M,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:N};i.push(x)}const c=te(i),l=m((o,d)=>{for(const h of o)s.addNode(h,d),h.children&&h.children.length>0&&l(h.children,d+1)},"addNodesRecursively");l(c,0)},"populate"),Ne=m(r=>r.name?String(r.name):"","getItemName"),ae={parser:{yy:void 0},parse:m(async r=>{try{const i=await Te("treemap",r);O.debug("Treemap AST:",i);const c=ae.parser?.yy;if(!(c instanceof ee))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Fe(i,c)}catch(s){throw O.error("Error parsing treemap:",s),s}},"parse")},ze=10,F=10,V=25,Ae=m((r,s,i,c)=>{const l=c.db,o=l.getConfig(),d=o.padding??ze,h=l.getDiagramTitle(),M=l.getRoot(),{themeVariables:a}=X();if(!M)return;const N=h?30:0,x=he(s),Y=o.nodeWidth?o.nodeWidth*F:960,j=o.nodeHeight?o.nodeHeight*F:500,H=Y,q=j+N;x.attr("viewBox",`0 0 ${H} ${q}`),me(x,q,H,o.useMaxWidth);let b;try{const e=o.valueFormat||",";if(e==="$0,0")b=m(t=>"$"+P(",")(t),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),n=t?t[0]:"";b=m(u=>"$"+P(","+n)(u),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);b=m(n=>"$"+P(t||"")(n),"valueFormat")}else b=P(e)}catch(e){O.error("Error creating format function:",e),b=P(",")}const z=I().range(["transparent",a.cScale0,a.cScale1,a.cScale2,a.cScale3,a.cScale4,a.cScale5,a.cScale6,a.cScale7,a.cScale8,a.cScale9,a.cScale10,a.cScale11]),le=I().range(["transparent",a.cScalePeer0,a.cScalePeer1,a.cScalePeer2,a.cScalePeer3,a.cScalePeer4,a.cScalePeer5,a.cScalePeer6,a.cScalePeer7,a.cScalePeer8,a.cScalePeer9,a.cScalePeer10,a.cScalePeer11]),k=I().range([a.cScaleLabel0,a.cScaleLabel1,a.cScaleLabel2,a.cScaleLabel3,a.cScaleLabel4,a.cScaleLabel5,a.cScaleLabel6,a.cScaleLabel7,a.cScaleLabel8,a.cScaleLabel9,a.cScaleLabel10,a.cScaleLabel11]);h&&x.append("text").attr("x",H/2).attr("y",N/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const U=x.append("g").attr("transform",`translate(0, ${N})`).attr("class","treemapContainer"),se=$e(M).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),J=Le().size([Y,j]).paddingTop(e=>e.children&&e.children.length>0?V+F:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?F:0).paddingRight(e=>e.children&&e.children.length>0?F:0).paddingBottom(e=>e.children&&e.children.length>0?F:0).round(!0)(se),re=J.descendants().filter(e=>e.children&&e.children.length>0),A=U.selectAll(".treemapSection").data(re).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",V).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),A.append("clipPath").attr("id",(e,t)=>`clip-section-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",V),A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>z(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>le(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const t=L({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),A.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",V/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,t)=>`url(#clip-section-${s}-${t})`).attr("style",e=>{if(e.depth===0)return"display: none;";const t="dominant-baseline: middle; font-size: 12px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const t=_(this),n=e.data.name;t.text(n);const u=e.x1-e.x0,y=6;let f;o.showValues!==!1&&e.value?f=u-10-30-10-y:f=u-y-6;const p=Math.max(15,f),v=t.node();if(v.getComputedTextLength()>p){let w=n;for(;w.length>0;){if(w=n.substring(0,w.length-1),w.length===0){t.text("..."),v.getComputedTextLength()>p&&t.text("");break}if(t.text(w+"..."),v.getComputedTextLength()<=p)break}}}),o.showValues!==!1&&A.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",V/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?b(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const t="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")});const K=J.leaves(),g=K.length>20,oe=g?16:38,W=g?14:28,T=g?4:8,D=g?4:6,R=g?2:4,Q=g?8:10,B=g?1:2,E=U.selectAll(".treemapLeafGroup").data(K).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);E.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("style",e=>L({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("stroke-width",3),E.append("clipPath").attr("id",(e,t)=>`clip-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),E.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const t=`text-anchor: middle; dominant-baseline: middle; font-size: ${oe}px;fill:`+k(e.data.name)+";",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,t)=>`url(#clip-${s}-${t})`).text(e=>e.data.name).each(function(e){const t=_(this),n=e.x1-e.x0,u=e.y1-e.y0,y=t.node(),f=n-2*R,$=u-2*R;if(f<Q||$<Q){t.style("display","none");return}let p=parseInt(t.style("font-size"),10);const v=.6;for(;y.getComputedTextLength()>f&&p>T;)p--,t.style("font-size",`${p}px`);let S=Math.max(D,Math.min(W,Math.round(p*v))),C=p+B+S;for(;C>$&&p>T&&(p--,S=Math.max(D,Math.min(W,Math.round(p*v))),!(S<D&&p===T));)t.style("font-size",`${p}px`),C=p+B+S;t.style("font-size",`${p}px`),g?(p<T||$<T)&&t.style("display","none"):(y.getComputedTextLength()>f||p<T||$<p)&&t.style("display","none")}),o.showValues!==!1&&E.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>{const n=`text-anchor: middle; dominant-baseline: hanging; font-size: ${W}px;fill:`+k(t.data.name)+";",u=L({cssCompiledStyles:t.data.cssCompiledStyles});return n+u.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,n)=>`url(#clip-${s}-${n})`).text(t=>t.value?b(t.value):"").each(function(t){const n=_(this),u=this.parentNode;if(!u){n.style("display","none");return}const y=_(u).select(".treemapLabel");if(y.empty()||y.style("display")==="none"){n.style("display","none");return}const f=parseFloat(y.style("font-size")),p=Math.max(D,Math.min(W,Math.round(f*.6)));n.style("font-size",`${p}px`);const S=(t.y1-t.y0)/2+f/2+B;n.attr("y",S);const C=t.x1-t.x0,Z=t.y1-t.y0-4,ce=C-2*R;n.node().getComputedTextLength()>ce||S+p>Z||p<D?n.style("display","none"):n.style("display",null)});const ne=o.diagramPadding??8;we(x,ne,"flowchart",o?.useMaxWidth||!1)},"draw"),De=m(function(r,s){return s.db.getClasses()},"getClasses"),Pe={draw:Ae,getClasses:De},Ve={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},Me=m(({treemap:r}={})=>{const s=de(),i=X(),c=G(s,i.themeVariables),l=G(Ve,r),o=l.titleColor??c.titleColor,d=l.labelColor??c.textColor,h=l.valueColor??c.textColor;return`
|
|
2
2
|
.treemapNode.section {
|
|
3
3
|
stroke: ${l.sectionStrokeColor};
|
|
4
4
|
stroke-width: ${l.sectionStrokeWidth};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as B}from"./chunk-JWPE2WC7-
|
|
1
|
+
import{p as B}from"./chunk-JWPE2WC7-th9umQbo.js";import{_ as m,A as b,D as $,d as C,l as u,b as S,a as D,o as T,p as P,g as z,s as A,B as E,y as F,q as W}from"./index-CbnU-kk0.js";import{p as _}from"./cynefin-OW5HDTMX-BBLugbYz.js";import"./index-CJys1M3A.js";import"../datalayer-app-main.js";import"./index-MIxQaicl.js";import"./color-CG7_7V2-.js";import"./index-atSsKceW.js";import"./fastdom-promised-BMVBoXkp.js";import"./line-DUjWPDRX.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";var N=E.packet,w=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=P,this.getAccDescription=z,this.setAccDescription=A}static{m(this,"PacketDB")}getConfig(){const t=b({...N,...F().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},L=1e4,M=m((t,e)=>{B(t,e);let r=-1,o=[],n=1;const{bitsPerRow:l}=e.getConfig();for(let{start:a,end:s,bits:d,label:c}of t.blocks){if(a!==void 0&&s!==void 0&&s<a)throw new Error(`Packet block ${a} - ${s} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${s??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(s??=a+(d??1)-1,d??=s-a+1,r=s,u.debug(`Packet block ${a} - ${r} with label ${c}`);o.length<=l+1&&e.getPacket().length<L;){const[p,i]=Y({start:a,end:s,bits:d,label:c},n,l);if(o.push(p),p.end+1===n*l&&(e.pushWord(o),o=[],n++),!i)break;({start:a,end:s,bits:d,label:c}=i)}}e.pushWord(o)},"populate"),Y=m((t,e,r)=>{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const o=e*r-1,n=e*r;return[{start:t.start,end:o,label:t.label,bits:o-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),v={parser:{yy:void 0},parse:m(async t=>{const e=await _("packet",t),r=v.parser?.yy;if(!(r instanceof w))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");u.debug(e),M(e,r)},"parse")},I=m((t,e,r,o)=>{const n=o.db,l=n.getConfig(),{rowHeight:a,paddingY:s,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),i=n.getDiagramTitle(),h=a+s,g=h*(p.length+1)-(i?0:a),k=d*c+2,f=$(e);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())O(f,y,x,l);f.append("text").text(i).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=m((t,e,r,{rowHeight:o,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:s,showBits:d})=>{const c=t.append("g"),p=r*(o+l)+l;for(const i of e){const h=i.start%s*a+1,g=(i.end-i.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(i.label),!d)continue;const k=i.end===i.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(i.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(i.end)}},"drawWord"),j={draw:I},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},G=m(({packet:t}={})=>{const e=b(q,t);return`
|
|
2
2
|
.packetByte {
|
|
3
3
|
font-size: ${e.byteFontSize};
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as B}from"./chunk-JWPE2WC7-
|
|
1
|
+
import{p as B}from"./chunk-JWPE2WC7-779bmDSv.js";import{_ as m,A as b,D as $,d as C,l as u,b as S,a as D,o as T,p as P,g as z,s as A,B as E,y as F,q as W}from"./index-DY5U0msZ.js";import{p as _}from"./cynefin-OW5HDTMX-D8Lw5okC.js";import"./index-CJys1M3A.js";import"../datalayer-app-main.js";import"./index-MIxQaicl.js";import"./color-CG7_7V2-.js";import"./index-atSsKceW.js";import"./fastdom-promised-BMVBoXkp.js";import"./line-DUjWPDRX.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";var N=E.packet,w=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=P,this.getAccDescription=z,this.setAccDescription=A}static{m(this,"PacketDB")}getConfig(){const t=b({...N,...F().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},L=1e4,M=m((t,e)=>{B(t,e);let r=-1,o=[],n=1;const{bitsPerRow:l}=e.getConfig();for(let{start:a,end:s,bits:d,label:c}of t.blocks){if(a!==void 0&&s!==void 0&&s<a)throw new Error(`Packet block ${a} - ${s} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${s??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(s??=a+(d??1)-1,d??=s-a+1,r=s,u.debug(`Packet block ${a} - ${r} with label ${c}`);o.length<=l+1&&e.getPacket().length<L;){const[p,i]=Y({start:a,end:s,bits:d,label:c},n,l);if(o.push(p),p.end+1===n*l&&(e.pushWord(o),o=[],n++),!i)break;({start:a,end:s,bits:d,label:c}=i)}}e.pushWord(o)},"populate"),Y=m((t,e,r)=>{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const o=e*r-1,n=e*r;return[{start:t.start,end:o,label:t.label,bits:o-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),v={parser:{yy:void 0},parse:m(async t=>{const e=await _("packet",t),r=v.parser?.yy;if(!(r instanceof w))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");u.debug(e),M(e,r)},"parse")},I=m((t,e,r,o)=>{const n=o.db,l=n.getConfig(),{rowHeight:a,paddingY:s,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),i=n.getDiagramTitle(),h=a+s,g=h*(p.length+1)-(i?0:a),k=d*c+2,f=$(e);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())O(f,y,x,l);f.append("text").text(i).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=m((t,e,r,{rowHeight:o,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:s,showBits:d})=>{const c=t.append("g"),p=r*(o+l)+l;for(const i of e){const h=i.start%s*a+1,g=(i.end-i.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(i.label),!d)continue;const k=i.end===i.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(i.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(i.end)}},"drawWord"),j={draw:I},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},G=m(({packet:t}={})=>{const e=b(q,t);return`
|
|
2
2
|
.packetByte {
|
|
3
3
|
font-size: ${e.byteFontSize};
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as B}from"./chunk-JWPE2WC7-
|
|
1
|
+
import{p as B}from"./chunk-JWPE2WC7-Be4x4L6B.js";import{_ as m,A as b,D as $,d as C,l as u,b as S,a as D,o as T,p as P,g as z,s as A,y as E,B as F,q as W}from"./mermaid.core-CN-kUGXQ.js";import{p as _}from"./cynefin-OW5HDTMX-BVK0_S--.js";import"../datalayer-app-main.js";import"./index-MIxQaicl.js";import"./color-CG7_7V2-.js";import"./index-atSsKceW.js";import"./fastdom-promised-BMVBoXkp.js";import"./line-DUjWPDRX.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";var N=F.packet,w=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=P,this.getAccDescription=z,this.setAccDescription=A}static{m(this,"PacketDB")}getConfig(){const t=b({...N,...E().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},L=1e4,M=m((t,e)=>{B(t,e);let r=-1,o=[],n=1;const{bitsPerRow:l}=e.getConfig();for(let{start:a,end:s,bits:d,label:c}of t.blocks){if(a!==void 0&&s!==void 0&&s<a)throw new Error(`Packet block ${a} - ${s} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${s??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(s??=a+(d??1)-1,d??=s-a+1,r=s,u.debug(`Packet block ${a} - ${r} with label ${c}`);o.length<=l+1&&e.getPacket().length<L;){const[p,i]=Y({start:a,end:s,bits:d,label:c},n,l);if(o.push(p),p.end+1===n*l&&(e.pushWord(o),o=[],n++),!i)break;({start:a,end:s,bits:d,label:c}=i)}}e.pushWord(o)},"populate"),Y=m((t,e,r)=>{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const o=e*r-1,n=e*r;return[{start:t.start,end:o,label:t.label,bits:o-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),v={parser:{yy:void 0},parse:m(async t=>{const e=await _("packet",t),r=v.parser?.yy;if(!(r instanceof w))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");u.debug(e),M(e,r)},"parse")},I=m((t,e,r,o)=>{const n=o.db,l=n.getConfig(),{rowHeight:a,paddingY:s,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),i=n.getDiagramTitle(),h=a+s,g=h*(p.length+1)-(i?0:a),k=d*c+2,f=$(e);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())O(f,y,x,l);f.append("text").text(i).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=m((t,e,r,{rowHeight:o,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:s,showBits:d})=>{const c=t.append("g"),p=r*(o+l)+l;for(const i of e){const h=i.start%s*a+1,g=(i.end-i.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(i.label),!d)continue;const k=i.end===i.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(i.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(i.end)}},"drawWord"),j={draw:I},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},G=m(({packet:t}={})=>{const e=b(q,t);return`
|
|
2
2
|
.packetByte {
|
|
3
3
|
font-size: ${e.byteFontSize};
|
|
4
4
|
}
|
package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-CwBVaHP2.js → ebnfDiagram-PWID7BFC-81p8Ls5M.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as m,r as p,d as n}from"./chunk-SVP7TREG-
|
|
1
|
+
import{g as m,r as p,d as n}from"./chunk-SVP7TREG-dXH2Z6GR.js";import{p as l}from"./chunk-JWPE2WC7-779bmDSv.js";import{_ as t,l as s}from"./index-DY5U0msZ.js";import"./index-MIxQaicl.js";import{M as u,a as f}from"./cynefin-OW5HDTMX-D8Lw5okC.js";import"./index-CJys1M3A.js";import"../datalayer-app-main.js";import"./fastdom-promised-BMVBoXkp.js";import"./line-DUjWPDRX.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./color-CG7_7V2-.js";import"./index-atSsKceW.js";var c=f().RailroadEbnf.parser.LangiumParser,o=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return o(e.element);case"EbnfOptional":return{type:"optional",element:o(e.element)};case"EbnfRepetition":return{type:"repetition",element:o(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:o(e.definition)}),"transformRule"),v=t(e=>{l(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),s.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;s.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),s.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},_={parser:g,db:n,renderer:p,styles:m};export{_ as diagram};
|
package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-DC-Zam6d.js → ebnfDiagram-PWID7BFC-BiAjk2HF.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as m,r as p,d as n}from"./chunk-SVP7TREG-
|
|
1
|
+
import{g as m,r as p,d as n}from"./chunk-SVP7TREG-YgahXZy2.js";import{p as l}from"./chunk-JWPE2WC7-Be4x4L6B.js";import{_ as t,l as s}from"./mermaid.core-CN-kUGXQ.js";import"./index-MIxQaicl.js";import{M as u,a as f}from"./cynefin-OW5HDTMX-BVK0_S--.js";import"../datalayer-app-main.js";import"./fastdom-promised-BMVBoXkp.js";import"./line-DUjWPDRX.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./color-CG7_7V2-.js";import"./index-atSsKceW.js";var c=f().RailroadEbnf.parser.LangiumParser,o=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return o(e.element);case"EbnfOptional":return{type:"optional",element:o(e.element)};case"EbnfRepetition":return{type:"repetition",element:o(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:o(e.definition)}),"transformRule"),v=t(e=>{l(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),s.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;s.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),s.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},I={parser:g,db:n,renderer:p,styles:m};export{I as diagram};
|
package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-Klx1dPe6.js → ebnfDiagram-PWID7BFC-C31mpWW_.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as m,r as p,d as n}from"./chunk-SVP7TREG-
|
|
1
|
+
import{g as m,r as p,d as n}from"./chunk-SVP7TREG-BZUv4JX-.js";import{p as l}from"./chunk-JWPE2WC7-th9umQbo.js";import{_ as t,l as s}from"./index-CbnU-kk0.js";import"./index-MIxQaicl.js";import{M as u,a as f}from"./cynefin-OW5HDTMX-BBLugbYz.js";import"./index-CJys1M3A.js";import"../datalayer-app-main.js";import"./fastdom-promised-BMVBoXkp.js";import"./line-DUjWPDRX.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./color-CG7_7V2-.js";import"./index-atSsKceW.js";var c=f().RailroadEbnf.parser.LangiumParser,o=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return o(e.element);case"EbnfOptional":return{type:"optional",element:o(e.element)};case"EbnfRepetition":return{type:"repetition",element:o(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:o(e.definition)}),"transformRule"),v=t(e=>{l(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),s.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;s.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),s.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},_={parser:g,db:n,renderer:p,styles:m};export{_ as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{l as g,c as b,q as H,u as j,h as q,r as Q}from"./mermaid.core-D98kc0OO.js";import{l as lt,s as E}from"./index-MIxQaicl.js";import{c as st}from"./createText-aed3d8b3-1eVJ8jxH.js";import{l as ct}from"./line-DUjWPDRX.js";const ht=(a,t,e,i)=>{t.forEach(l=>{wt[l](a,e,i)})},ot=(a,t,e)=>{g.trace("Making markers for ",e),a.append("defs").append("marker").attr("id",e+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),a.append("defs").append("marker").attr("id",e+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},yt=(a,t,e)=>{a.append("defs").append("marker").attr("id",e+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",e+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},pt=(a,t,e)=>{a.append("defs").append("marker").attr("id",e+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",e+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},ft=(a,t,e)=>{a.append("defs").append("marker").attr("id",e+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",e+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},xt=(a,t,e)=>{a.append("defs").append("marker").attr("id",e+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),a.append("defs").append("marker").attr("id",e+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},dt=(a,t,e)=>{a.append("marker").attr("id",e+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),a.append("marker").attr("id",e+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},gt=(a,t,e)=>{a.append("marker").attr("id",e+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),a.append("marker").attr("id",e+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},ut=(a,t,e)=>{a.append("marker").attr("id",e+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),a.append("marker").attr("id",e+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},bt=(a,t,e)=>{a.append("defs").append("marker").attr("id",e+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},wt={extension:ot,composition:yt,aggregation:pt,dependency:ft,lollipop:xt,point:dt,circle:gt,cross:ut,barb:bt},or=ht;function mt(a,t){t&&a.attr("style",t)}function kt(a,t){const e=E(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),i=e.append("xhtml:div"),l=a.label,r=a.isNode?"nodeLabel":"edgeLabel";return i.html(q('<span class="'+r+'" '+(a.labelStyle?'style="'+a.labelStyle+'"':"")+">"+l+"</span>",t)),mt(i,a.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap"),i.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}const vt=(a,t,e,i)=>{let l=a||"";typeof l=="object"&&(l=l[0]);const r=b();if(H(r.flowchart.htmlLabels)){l=l.replace(/\\n|\n/g,"<br />"),g.debug("vertexText"+l);const s={isNode:i,label:Q(l).replace(/fa[blrs]?:fa-[\w-]+/g,c=>`<i class='${c.replace(":"," ")}'></i>`),labelStyle:t.replace("fill:","color:")};return kt(s,r)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));let n=[];typeof l=="string"?n=l.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(l)?n=l:n=[];for(const c of n){const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),e?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=c.trim(),s.appendChild(o)}return s}},R=vt,M=async(a,t,e,i)=>{let l;const r=t.useHtmlLabels||H(b().flowchart.htmlLabels);e?l=e:l="node default";const s=a.insert("g").attr("class",l).attr("id",t.domId||t.id),n=s.insert("g").attr("class","label").attr("style",t.labelStyle);let c;t.labelText===void 0?c="":c=typeof t.labelText=="string"?t.labelText:t.labelText[0];const o=n.node();let h;t.labelType==="markdown"?h=st(n,q(Q(c),b()),{useHtmlLabels:r,width:t.width||b().flowchart.wrappingWidth,classes:"markdown-node-label"}):h=o.appendChild(R(q(Q(c),b()),t.labelStyle,!1,i));let y=h.getBBox();const f=t.padding/2;if(H(b().flowchart.htmlLabels)){const p=h.children[0],d=E(h),k=p.getElementsByTagName("img");if(k){const x=c.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...k].map(u=>new Promise(S=>{function B(){if(u.style.display="flex",u.style.flexDirection="column",x){const C=b().fontSize?b().fontSize:window.getComputedStyle(document.body).fontSize,D=parseInt(C,10)*5+"px";u.style.minWidth=D,u.style.maxWidth=D}else u.style.width="100%";S(u)}setTimeout(()=>{u.complete&&B()}),u.addEventListener("error",B),u.addEventListener("load",B)})))}y=p.getBoundingClientRect(),d.attr("width",y.width),d.attr("height",y.height)}return r?n.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"):n.attr("transform","translate(0, "+-y.height/2+")"),t.centerLabel&&n.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:s,bbox:y,halfPadding:f,label:n}},m=(a,t)=>{const e=t.node().getBBox();a.width=e.width,a.height=e.height};function I(a,t,e,i){return a.insert("polygon",":first-child").attr("points",i.map(function(l){return l.x+","+l.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+e/2+")")}function Lt(a,t){return a.intersect(t)}function it(a,t,e,i){var l=a.x,r=a.y,s=l-i.x,n=r-i.y,c=Math.sqrt(t*t*n*n+e*e*s*s),o=Math.abs(t*e*s/c);i.x<l&&(o=-o);var h=Math.abs(t*e*n/c);return i.y<r&&(h=-h),{x:l+o,y:r+h}}function St(a,t,e){return it(a,t,t,e)}function Mt(a,t,e,i){var l,r,s,n,c,o,h,y,f,p,d,k,x,u,S;if(l=t.y-a.y,s=a.x-t.x,c=t.x*a.y-a.x*t.y,f=l*e.x+s*e.y+c,p=l*i.x+s*i.y+c,!(f!==0&&p!==0&&J(f,p))&&(r=i.y-e.y,n=e.x-i.x,o=i.x*e.y-e.x*i.y,h=r*a.x+n*a.y+o,y=r*t.x+n*t.y+o,!(h!==0&&y!==0&&J(h,y))&&(d=l*n-r*s,d!==0)))return k=Math.abs(d/2),x=s*o-n*c,u=x<0?(x-k)/d:(x+k)/d,x=r*c-l*o,S=x<0?(x-k)/d:(x+k)/d,{x:u,y:S}}function J(a,t){return a*t>0}function Tt(a,t,e){var i=a.x,l=a.y,r=[],s=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(d){s=Math.min(s,d.x),n=Math.min(n,d.y)}):(s=Math.min(s,t.x),n=Math.min(n,t.y));for(var c=i-a.width/2-s,o=l-a.height/2-n,h=0;h<t.length;h++){var y=t[h],f=t[h<t.length-1?h+1:0],p=Mt(a,e,{x:c+y.x,y:o+y.y},{x:c+f.x,y:o+f.y});p&&r.push(p)}return r.length?(r.length>1&&r.sort(function(d,k){var x=d.x-e.x,u=d.y-e.y,S=Math.sqrt(x*x+u*u),B=k.x-e.x,C=k.y-e.y,X=Math.sqrt(B*B+C*C);return S<X?-1:S===X?0:1}),r[0]):a}const Bt=(a,t)=>{var e=a.x,i=a.y,l=t.x-e,r=t.y-i,s=a.width/2,n=a.height/2,c,o;return Math.abs(r)*s>Math.abs(l)*n?(r<0&&(n=-n),c=r===0?0:n*l/r,o=n):(l<0&&(s=-s),c=s,o=l===0?0:s*r/l),{x:e+c,y:i+o}},Et=Bt,w={node:Lt,circle:St,ellipse:it,polygon:Tt,rect:Et},Ct=async(a,t)=>{t.useHtmlLabels||b().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:i,bbox:l,halfPadding:r}=await M(a,t,"node "+t.classes,!0);g.info("Classes = ",t.classes);const s=i.insert("rect",":first-child");return s.attr("rx",t.rx).attr("ry",t.ry).attr("x",-l.width/2-r).attr("y",-l.height/2-r).attr("width",l.width+t.padding).attr("height",l.height+t.padding),m(t,s),t.intersect=function(n){return w.rect(t,n)},i},$t=Ct,_t=a=>{const t=new Set;for(const e of a)switch(e){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(e);break}return t},Rt=(a,t,e)=>{const i=_t(a),l=2,r=t.height+2*e.padding,s=r/l,n=t.width+2*s+e.padding,c=e.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:s,y:0},{x:n/2,y:2*c},{x:n-s,y:0},{x:n,y:0},{x:n,y:-r/3},{x:n+2*c,y:-r/2},{x:n,y:-2*r/3},{x:n,y:-r},{x:n-s,y:-r},{x:n/2,y:-r-2*c},{x:s,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*c,y:-r/2},{x:0,y:-r/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:s,y:0},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:s,y:-r},{x:0,y:-r/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:s,y:-r},{x:n-s,y:-r},{x:n,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:n,y:-s},{x:n,y:-r+s},{x:0,y:-r}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:n,y:0},{x:0,y:-s},{x:0,y:-r+s},{x:n,y:-r}]:i.has("right")&&i.has("left")?[{x:s,y:0},{x:s,y:-c},{x:n-s,y:-c},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:n-s,y:-r+c},{x:s,y:-r+c},{x:s,y:-r},{x:0,y:-r/2}]:i.has("up")&&i.has("down")?[{x:n/2,y:0},{x:0,y:-c},{x:s,y:-c},{x:s,y:-r+c},{x:0,y:-r+c},{x:n/2,y:-r},{x:n,y:-r+c},{x:n-s,y:-r+c},{x:n-s,y:-c},{x:n,y:-c}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:n,y:-s},{x:0,y:-r}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:n,y:0},{x:0,y:-r}]:i.has("left")&&i.has("up")?[{x:n,y:0},{x:0,y:-s},{x:n,y:-r}]:i.has("left")&&i.has("down")?[{x:n,y:0},{x:0,y:0},{x:n,y:-r}]:i.has("right")?[{x:s,y:-c},{x:s,y:-c},{x:n-s,y:-c},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:n-s,y:-r+c},{x:s,y:-r+c},{x:s,y:-r+c}]:i.has("left")?[{x:s,y:0},{x:s,y:-c},{x:n-s,y:-c},{x:n-s,y:-r+c},{x:s,y:-r+c},{x:s,y:-r},{x:0,y:-r/2}]:i.has("up")?[{x:s,y:-c},{x:s,y:-r+c},{x:0,y:-r+c},{x:n/2,y:-r},{x:n,y:-r+c},{x:n-s,y:-r+c},{x:n-s,y:-c}]:i.has("down")?[{x:n/2,y:0},{x:0,y:-c},{x:s,y:-c},{x:s,y:-r+c},{x:n-s,y:-r+c},{x:n-s,y:-c},{x:n,y:-c}]:[{x:0,y:0}]},K=a=>a?" "+a:"",_=(a,t)=>`node default${K(a.classes)} ${K(a.class)}`,P=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=l+r,n=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];g.info("Question main (Circle)");const c=I(e,s,s,n);return c.attr("style",t.style),m(t,c),t.intersect=function(o){return g.warn("Intersect called"),w.polygon(t,n,o)},e},Ht=(a,t)=>{const e=a.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=28,l=[{x:0,y:i/2},{x:i/2,y:0},{x:0,y:-i/2},{x:-i/2,y:0}];return e.insert("polygon",":first-child").attr("points",l.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(s){return w.circle(t,14,s)},e},It=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=4,r=i.height+t.padding,s=r/l,n=i.width+2*s+t.padding,c=[{x:s,y:0},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:s,y:-r},{x:0,y:-r/2}],o=I(e,n,r,c);return o.attr("style",t.style),m(t,o),t.intersect=function(h){return w.polygon(t,c,h)},e},Nt=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,void 0,!0),l=2,r=i.height+2*t.padding,s=r/l,n=i.width+2*s+t.padding,c=Rt(t.directions,i,t),o=I(e,n,r,c);return o.attr("style",t.style),m(t,o),t.intersect=function(h){return w.polygon(t,c,h)},e},Ot=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:-r/2,y:0},{x:l,y:0},{x:l,y:-r},{x:-r/2,y:-r},{x:0,y:-r/2}];return I(e,l,r,s).attr("style",t.style),t.width=l+r,t.height=r,t.intersect=function(c){return w.polygon(t,s,c)},e},Wt=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:-2*r/6,y:0},{x:l-r/6,y:0},{x:l+2*r/6,y:-r},{x:r/6,y:-r}],n=I(e,l,r,s);return n.attr("style",t.style),m(t,n),t.intersect=function(c){return w.polygon(t,s,c)},e},Xt=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:2*r/6,y:0},{x:l+r/6,y:0},{x:l-2*r/6,y:-r},{x:-r/6,y:-r}],n=I(e,l,r,s);return n.attr("style",t.style),m(t,n),t.intersect=function(c){return w.polygon(t,s,c)},e},Yt=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:-2*r/6,y:0},{x:l+2*r/6,y:0},{x:l-r/6,y:-r},{x:r/6,y:-r}],n=I(e,l,r,s);return n.attr("style",t.style),m(t,n),t.intersect=function(c){return w.polygon(t,s,c)},e},Dt=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:r/6,y:0},{x:l-r/6,y:0},{x:l+2*r/6,y:-r},{x:-2*r/6,y:-r}],n=I(e,l,r,s);return n.attr("style",t.style),m(t,n),t.intersect=function(c){return w.polygon(t,s,c)},e},At=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:0,y:0},{x:l+r/2,y:0},{x:l,y:-r/2},{x:l+r/2,y:-r},{x:0,y:-r}],n=I(e,l,r,s);return n.attr("style",t.style),m(t,n),t.intersect=function(c){return w.polygon(t,s,c)},e},jt=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=i.width+t.padding,r=l/2,s=r/(2.5+l/50),n=i.height+s+t.padding,c="M 0,"+s+" a "+r+","+s+" 0,0,0 "+l+" 0 a "+r+","+s+" 0,0,0 "+-l+" 0 l 0,"+n+" a "+r+","+s+" 0,0,0 "+l+" 0 l 0,"+-n,o=e.attr("label-offset-y",s).insert("path",":first-child").attr("style",t.style).attr("d",c).attr("transform","translate("+-l/2+","+-(n/2+s)+")");return m(t,o),t.intersect=function(h){const y=w.rect(t,h),f=y.x-t.x;if(r!=0&&(Math.abs(f)<t.width/2||Math.abs(f)==t.width/2&&Math.abs(y.y-t.y)>t.height/2-s)){let p=s*s*(1-f*f/(r*r));p!=0&&(p=Math.sqrt(p)),p=s-p,h.y-t.y>0&&(p=-p),y.y+=p}return y},e},Ut=async(a,t)=>{const{shapeSvg:e,bbox:i,halfPadding:l}=await M(a,t,"node "+t.classes+" "+t.class,!0),r=e.insert("rect",":first-child"),s=t.positioned?t.width:i.width+t.padding,n=t.positioned?t.height:i.height+t.padding,c=t.positioned?-s/2:-i.width/2-l,o=t.positioned?-n/2:-i.height/2-l;if(r.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",o).attr("width",s).attr("height",n),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(V(r,t.props.borders,s,n),h.delete("borders")),h.forEach(y=>{g.warn(`Unknown node property ${y}`)})}return m(t,r),t.intersect=function(h){return w.rect(t,h)},e},zt=async(a,t)=>{const{shapeSvg:e,bbox:i,halfPadding:l}=await M(a,t,"node "+t.classes,!0),r=e.insert("rect",":first-child"),s=t.positioned?t.width:i.width+t.padding,n=t.positioned?t.height:i.height+t.padding,c=t.positioned?-s/2:-i.width/2-l,o=t.positioned?-n/2:-i.height/2-l;if(r.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",o).attr("width",s).attr("height",n),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(V(r,t.props.borders,s,n),h.delete("borders")),h.forEach(y=>{g.warn(`Unknown node property ${y}`)})}return m(t,r),t.intersect=function(h){return w.rect(t,h)},e},Zt=async(a,t)=>{const{shapeSvg:e}=await M(a,t,"label",!0);g.trace("Classes = ",t.class);const i=e.insert("rect",":first-child"),l=0,r=0;if(i.attr("width",l).attr("height",r),e.attr("class","label edgeLabel"),t.props){const s=new Set(Object.keys(t.props));t.props.borders&&(V(i,t.props.borders,l,r),s.delete("borders")),s.forEach(n=>{g.warn(`Unknown node property ${n}`)})}return m(t,i),t.intersect=function(s){return w.rect(t,s)},e};function V(a,t,e,i){const l=[],r=n=>{l.push(n,0)},s=n=>{l.push(0,n)};t.includes("t")?(g.debug("add top border"),r(e)):s(e),t.includes("r")?(g.debug("add right border"),r(i)):s(i),t.includes("b")?(g.debug("add bottom border"),r(e)):s(e),t.includes("l")?(g.debug("add left border"),r(i)):s(i),a.attr("stroke-dasharray",l.join(" "))}const Gt=(a,t)=>{let e;t.classes?e="node "+t.classes:e="node default";const i=a.insert("g").attr("class",e).attr("id",t.domId||t.id),l=i.insert("rect",":first-child"),r=i.insert("line"),s=i.insert("g").attr("class","label"),n=t.labelText.flat?t.labelText.flat():t.labelText;let c="";typeof n=="object"?c=n[0]:c=n,g.info("Label text abc79",c,n,typeof n=="object");const o=s.node().appendChild(R(c,t.labelStyle,!0,!0));let h={width:0,height:0};if(H(b().flowchart.htmlLabels)){const k=o.children[0],x=E(o);h=k.getBoundingClientRect(),x.attr("width",h.width),x.attr("height",h.height)}g.info("Text 2",n);const y=n.slice(1,n.length);let f=o.getBBox();const p=s.node().appendChild(R(y.join?y.join("<br/>"):y,t.labelStyle,!0,!0));if(H(b().flowchart.htmlLabels)){const k=p.children[0],x=E(p);h=k.getBoundingClientRect(),x.attr("width",h.width),x.attr("height",h.height)}const d=t.padding/2;return E(p).attr("transform","translate( "+(h.width>f.width?0:(f.width-h.width)/2)+", "+(f.height+d+5)+")"),E(o).attr("transform","translate( "+(h.width<f.width?0:-(f.width-h.width)/2)+", 0)"),h=s.node().getBBox(),s.attr("transform","translate("+-h.width/2+", "+(-h.height/2-d+3)+")"),l.attr("class","outer title-state").attr("x",-h.width/2-d).attr("y",-h.height/2-d).attr("width",h.width+t.padding).attr("height",h.height+t.padding),r.attr("class","divider").attr("x1",-h.width/2-d).attr("x2",h.width/2+d).attr("y1",-h.height/2-d+f.height+d).attr("y2",-h.height/2-d+f.height+d),m(t,l),t.intersect=function(k){return w.rect(t,k)},i},Ft=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=i.height+t.padding,r=i.width+l/4+t.padding,s=e.insert("rect",":first-child").attr("style",t.style).attr("rx",l/2).attr("ry",l/2).attr("x",-r/2).attr("y",-l/2).attr("width",r).attr("height",l);return m(t,s),t.intersect=function(n){return w.rect(t,n)},e},qt=async(a,t)=>{const{shapeSvg:e,bbox:i,halfPadding:l}=await M(a,t,_(t),!0),r=e.insert("circle",":first-child");return r.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+l).attr("width",i.width+t.padding).attr("height",i.height+t.padding),g.info("Circle main"),m(t,r),t.intersect=function(s){return g.info("Circle intersect",t,i.width/2+l,s),w.circle(t,i.width/2+l,s)},e},Qt=async(a,t)=>{const{shapeSvg:e,bbox:i,halfPadding:l}=await M(a,t,_(t),!0),r=5,s=e.insert("g",":first-child"),n=s.insert("circle"),c=s.insert("circle");return s.attr("class",t.class),n.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+l+r).attr("width",i.width+t.padding+r*2).attr("height",i.height+t.padding+r*2),c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+l).attr("width",i.width+t.padding).attr("height",i.height+t.padding),g.info("DoubleCircle main"),m(t,n),t.intersect=function(o){return g.info("DoubleCircle intersect",t,i.width/2+l+r,o),w.circle(t,i.width/2+l+r,o)},e},Vt=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:0,y:0},{x:l,y:0},{x:l,y:-r},{x:0,y:-r},{x:0,y:0},{x:-8,y:0},{x:l+8,y:0},{x:l+8,y:-r},{x:-8,y:-r},{x:-8,y:0}],n=I(e,l,r,s);return n.attr("style",t.style),m(t,n),t.intersect=function(c){return w.polygon(t,s,c)},e},Jt=(a,t)=>{const e=a.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=e.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),m(t,i),t.intersect=function(l){return w.circle(t,7,l)},e},tt=(a,t,e)=>{const i=a.insert("g").attr("class","node default").attr("id",t.domId||t.id);let l=70,r=10;e==="LR"&&(l=10,r=70);const s=i.append("rect").attr("x",-1*l/2).attr("y",-1*r/2).attr("width",l).attr("height",r).attr("class","fork-join");return m(t,s),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(n){return w.rect(t,n)},i},Kt=(a,t)=>{const e=a.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=e.insert("circle",":first-child"),l=e.insert("circle",":first-child");return l.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),i.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),m(t,l),t.intersect=function(r){return w.circle(t,7,r)},e},Pt=(a,t)=>{const e=t.padding/2,i=4,l=8;let r;t.classes?r="node "+t.classes:r="node default";const s=a.insert("g").attr("class",r).attr("id",t.domId||t.id),n=s.insert("rect",":first-child"),c=s.insert("line"),o=s.insert("line");let h=0,y=i;const f=s.insert("g").attr("class","label");let p=0;const d=t.classData.annotations&&t.classData.annotations[0],k=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",x=f.node().appendChild(R(k,t.labelStyle,!0,!0));let u=x.getBBox();if(H(b().flowchart.htmlLabels)){const v=x.children[0],L=E(x);u=v.getBoundingClientRect(),L.attr("width",u.width),L.attr("height",u.height)}t.classData.annotations[0]&&(y+=u.height+i,h+=u.width);let S=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(b().flowchart.htmlLabels?S+="<"+t.classData.type+">":S+="<"+t.classData.type+">");const B=f.node().appendChild(R(S,t.labelStyle,!0,!0));E(B).attr("class","classTitle");let C=B.getBBox();if(H(b().flowchart.htmlLabels)){const v=B.children[0],L=E(B);C=v.getBoundingClientRect(),L.attr("width",C.width),L.attr("height",C.height)}y+=C.height+i,C.width>h&&(h=C.width);const X=[];t.classData.members.forEach(v=>{const L=v.getDisplayDetails();let W=L.displayText;b().flowchart.htmlLabels&&(W=W.replace(/</g,"<").replace(/>/g,">"));const N=f.node().appendChild(R(W,L.cssStyle?L.cssStyle:t.labelStyle,!0,!0));let $=N.getBBox();if(H(b().flowchart.htmlLabels)){const F=N.children[0],A=E(N);$=F.getBoundingClientRect(),A.attr("width",$.width),A.attr("height",$.height)}$.width>h&&(h=$.width),y+=$.height+i,X.push(N)}),y+=l;const D=[];if(t.classData.methods.forEach(v=>{const L=v.getDisplayDetails();let W=L.displayText;b().flowchart.htmlLabels&&(W=W.replace(/</g,"<").replace(/>/g,">"));const N=f.node().appendChild(R(W,L.cssStyle?L.cssStyle:t.labelStyle,!0,!0));let $=N.getBBox();if(H(b().flowchart.htmlLabels)){const F=N.children[0],A=E(N);$=F.getBoundingClientRect(),A.attr("width",$.width),A.attr("height",$.height)}$.width>h&&(h=$.width),y+=$.height+i,D.push(N)}),y+=l,d){let v=(h-u.width)/2;E(x).attr("transform","translate( "+(-1*h/2+v)+", "+-1*y/2+")"),p=u.height+i}let nt=(h-C.width)/2;return E(B).attr("transform","translate( "+(-1*h/2+nt)+", "+(-1*y/2+p)+")"),p+=C.height+i,c.attr("class","divider").attr("x1",-h/2-e).attr("x2",h/2+e).attr("y1",-y/2-e+l+p).attr("y2",-y/2-e+l+p),p+=l,X.forEach(v=>{E(v).attr("transform","translate( "+-h/2+", "+(-1*y/2+p+l/2)+")");const L=v?.getBBox();p+=(L?.height??0)+i}),p+=l,o.attr("class","divider").attr("x1",-h/2-e).attr("x2",h/2+e).attr("y1",-y/2-e+l+p).attr("y2",-y/2-e+l+p),p+=l,D.forEach(v=>{E(v).attr("transform","translate( "+-h/2+", "+(-1*y/2+p)+")");const L=v?.getBBox();p+=(L?.height??0)+i}),n.attr("style",t.style).attr("class","outer title-state").attr("x",-h/2-e).attr("y",-(y/2)-e).attr("width",h+t.padding).attr("height",y+t.padding),m(t,n),t.intersect=function(v){return w.rect(t,v)},s},rt={rhombus:P,composite:zt,question:P,rect:Ut,labelRect:Zt,rectWithTitle:Gt,choice:Ht,circle:qt,doublecircle:Qt,stadium:Ft,hexagon:It,block_arrow:Nt,rect_left_inv_arrow:Ot,lean_right:Wt,lean_left:Xt,trapezoid:Yt,inv_trapezoid:Dt,rect_right_inv_arrow:At,cylinder:jt,start:Jt,end:Kt,note:$t,subroutine:Vt,fork:tt,join:tt,class_box:Pt};let Y={};const yr=async(a,t,e)=>{let i,l;if(t.link){let r;b().securityLevel==="sandbox"?r="_top":t.linkTarget&&(r=t.linkTarget||"_blank"),i=a.insert("svg:a").attr("xlink:href",t.link).attr("target",r),l=await rt[t.shape](i,t,e)}else l=await rt[t.shape](a,t,e),i=l;return t.tooltip&&l.attr("title",t.tooltip),t.class&&l.attr("class","node default "+t.class),i.attr("data-node","true"),i.attr("data-id",t.id),Y[t.id]=i,t.haveCallback&&Y[t.id].attr("class",Y[t.id].attr("class")+" clickable"),i},pr=(a,t)=>{Y[t.id]=a},fr=()=>{Y={}},xr=a=>{const t=Y[a.id];g.trace("Transforming node",a.diff,a,"translate("+(a.x-a.width/2-5)+", "+a.width/2+")");const e=8,i=a.diff||0;return a.clusterNode?t.attr("transform","translate("+(a.x+i-a.width/2)+", "+(a.y-a.height/2-e)+")"):t.attr("transform","translate("+a.x+", "+a.y+")"),i},tr=({flowchart:a})=>{var t,e;const i=((t=a?.subGraphTitleMargin)==null?void 0:t.top)??0,l=((e=a?.subGraphTitleMargin)==null?void 0:e.bottom)??0,r=i+l;return{subGraphTitleTopMargin:i,subGraphTitleBottomMargin:l,subGraphTitleTotalMargin:r}},O={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:5.3};function U(a,t){if(a===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};a=Z(a),t=Z(t);const[e,i]=[a.x,a.y],[l,r]=[t.x,t.y],s=l-e,n=r-i;return{angle:Math.atan(n/s),deltaX:s,deltaY:n}}const Z=a=>Array.isArray(a)?{x:a[0],y:a[1]}:a,rr=a=>({x:function(t,e,i){let l=0;if(e===0&&Object.hasOwn(O,a.arrowTypeStart)){const{angle:r,deltaX:s}=U(i[0],i[1]);l=O[a.arrowTypeStart]*Math.cos(r)*(s>=0?1:-1)}else if(e===i.length-1&&Object.hasOwn(O,a.arrowTypeEnd)){const{angle:r,deltaX:s}=U(i[i.length-1],i[i.length-2]);l=O[a.arrowTypeEnd]*Math.cos(r)*(s>=0?1:-1)}return Z(t).x+l},y:function(t,e,i){let l=0;if(e===0&&Object.hasOwn(O,a.arrowTypeStart)){const{angle:r,deltaY:s}=U(i[0],i[1]);l=O[a.arrowTypeStart]*Math.abs(Math.sin(r))*(s>=0?1:-1)}else if(e===i.length-1&&Object.hasOwn(O,a.arrowTypeEnd)){const{angle:r,deltaY:s}=U(i[i.length-1],i[i.length-2]);l=O[a.arrowTypeEnd]*Math.abs(Math.sin(r))*(s>=0?1:-1)}return Z(t).y+l}}),ar=(a,t,e,i,l)=>{t.arrowTypeStart&&at(a,"start",t.arrowTypeStart,e,i,l),t.arrowTypeEnd&&at(a,"end",t.arrowTypeEnd,e,i,l)},er={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},at=(a,t,e,i,l,r)=>{const s=er[e];if(!s){g.warn(`Unknown arrow type: ${e}`);return}const n=t==="start"?"Start":"End";a.attr(`marker-${t}`,`url(${i}#${l}_${r}-${s}${n})`)};let G={},T={};const dr=()=>{G={},T={}},gr=(a,t)=>{const e=H(b().flowchart.htmlLabels),i=t.labelType==="markdown"?st(a,t.label,{style:t.labelStyle,useHtmlLabels:e,addSvgBackground:!0}):R(t.label,t.labelStyle),l=a.insert("g").attr("class","edgeLabel"),r=l.insert("g").attr("class","label");r.node().appendChild(i);let s=i.getBBox();if(e){const c=i.children[0],o=E(i);s=c.getBoundingClientRect(),o.attr("width",s.width),o.attr("height",s.height)}r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),G[t.id]=l,t.width=s.width,t.height=s.height;let n;if(t.startLabelLeft){const c=R(t.startLabelLeft,t.labelStyle),o=a.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");n=h.node().appendChild(c);const y=c.getBBox();h.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),T[t.id]||(T[t.id]={}),T[t.id].startLeft=o,z(n,t.startLabelLeft)}if(t.startLabelRight){const c=R(t.startLabelRight,t.labelStyle),o=a.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");n=o.node().appendChild(c),h.node().appendChild(c);const y=c.getBBox();h.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),T[t.id]||(T[t.id]={}),T[t.id].startRight=o,z(n,t.startLabelRight)}if(t.endLabelLeft){const c=R(t.endLabelLeft,t.labelStyle),o=a.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");n=h.node().appendChild(c);const y=c.getBBox();h.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),o.node().appendChild(c),T[t.id]||(T[t.id]={}),T[t.id].endLeft=o,z(n,t.endLabelLeft)}if(t.endLabelRight){const c=R(t.endLabelRight,t.labelStyle),o=a.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");n=h.node().appendChild(c);const y=c.getBBox();h.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),o.node().appendChild(c),T[t.id]||(T[t.id]={}),T[t.id].endRight=o,z(n,t.endLabelRight)}return i};function z(a,t){b().flowchart.htmlLabels&&a&&(a.style.width=t.length*9+"px",a.style.height="12px")}const ur=(a,t)=>{g.debug("Moving label abc88 ",a.id,a.label,G[a.id],t);let e=t.updatedPath?t.updatedPath:t.originalPath;const i=b(),{subGraphTitleTotalMargin:l}=tr(i);if(a.label){const r=G[a.id];let s=a.x,n=a.y;if(e){const c=j.calcLabelPosition(e);g.debug("Moving label "+a.label+" from (",s,",",n,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(s=c.x,n=c.y)}r.attr("transform",`translate(${s}, ${n+l/2})`)}if(a.startLabelLeft){const r=T[a.id].startLeft;let s=a.x,n=a.y;if(e){const c=j.calcTerminalLabelPosition(a.arrowTypeStart?10:0,"start_left",e);s=c.x,n=c.y}r.attr("transform",`translate(${s}, ${n})`)}if(a.startLabelRight){const r=T[a.id].startRight;let s=a.x,n=a.y;if(e){const c=j.calcTerminalLabelPosition(a.arrowTypeStart?10:0,"start_right",e);s=c.x,n=c.y}r.attr("transform",`translate(${s}, ${n})`)}if(a.endLabelLeft){const r=T[a.id].endLeft;let s=a.x,n=a.y;if(e){const c=j.calcTerminalLabelPosition(a.arrowTypeEnd?10:0,"end_left",e);s=c.x,n=c.y}r.attr("transform",`translate(${s}, ${n})`)}if(a.endLabelRight){const r=T[a.id].endRight;let s=a.x,n=a.y;if(e){const c=j.calcTerminalLabelPosition(a.arrowTypeEnd?10:0,"end_right",e);s=c.x,n=c.y}r.attr("transform",`translate(${s}, ${n})`)}},sr=(a,t)=>{const e=a.x,i=a.y,l=Math.abs(t.x-e),r=Math.abs(t.y-i),s=a.width/2,n=a.height/2;return l>=s||r>=n},ir=(a,t,e)=>{g.debug(`intersection calc abc89:
|
|
1
|
+
import{l as g,c as b,q as H,u as j,h as q,r as Q}from"./mermaid.core-Cb8_A6yp.js";import{l as lt,s as E}from"./index-MIxQaicl.js";import{c as st}from"./createText-aed3d8b3-6mXespHo.js";import{l as ct}from"./line-DUjWPDRX.js";const ht=(a,t,e,i)=>{t.forEach(l=>{wt[l](a,e,i)})},ot=(a,t,e)=>{g.trace("Making markers for ",e),a.append("defs").append("marker").attr("id",e+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),a.append("defs").append("marker").attr("id",e+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},yt=(a,t,e)=>{a.append("defs").append("marker").attr("id",e+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",e+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},pt=(a,t,e)=>{a.append("defs").append("marker").attr("id",e+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",e+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},ft=(a,t,e)=>{a.append("defs").append("marker").attr("id",e+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",e+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},xt=(a,t,e)=>{a.append("defs").append("marker").attr("id",e+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),a.append("defs").append("marker").attr("id",e+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},dt=(a,t,e)=>{a.append("marker").attr("id",e+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),a.append("marker").attr("id",e+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},gt=(a,t,e)=>{a.append("marker").attr("id",e+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),a.append("marker").attr("id",e+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},ut=(a,t,e)=>{a.append("marker").attr("id",e+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),a.append("marker").attr("id",e+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},bt=(a,t,e)=>{a.append("defs").append("marker").attr("id",e+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},wt={extension:ot,composition:yt,aggregation:pt,dependency:ft,lollipop:xt,point:dt,circle:gt,cross:ut,barb:bt},or=ht;function mt(a,t){t&&a.attr("style",t)}function kt(a,t){const e=E(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),i=e.append("xhtml:div"),l=a.label,r=a.isNode?"nodeLabel":"edgeLabel";return i.html(q('<span class="'+r+'" '+(a.labelStyle?'style="'+a.labelStyle+'"':"")+">"+l+"</span>",t)),mt(i,a.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap"),i.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}const vt=(a,t,e,i)=>{let l=a||"";typeof l=="object"&&(l=l[0]);const r=b();if(H(r.flowchart.htmlLabels)){l=l.replace(/\\n|\n/g,"<br />"),g.debug("vertexText"+l);const s={isNode:i,label:Q(l).replace(/fa[blrs]?:fa-[\w-]+/g,c=>`<i class='${c.replace(":"," ")}'></i>`),labelStyle:t.replace("fill:","color:")};return kt(s,r)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));let n=[];typeof l=="string"?n=l.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(l)?n=l:n=[];for(const c of n){const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),e?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=c.trim(),s.appendChild(o)}return s}},R=vt,M=async(a,t,e,i)=>{let l;const r=t.useHtmlLabels||H(b().flowchart.htmlLabels);e?l=e:l="node default";const s=a.insert("g").attr("class",l).attr("id",t.domId||t.id),n=s.insert("g").attr("class","label").attr("style",t.labelStyle);let c;t.labelText===void 0?c="":c=typeof t.labelText=="string"?t.labelText:t.labelText[0];const o=n.node();let h;t.labelType==="markdown"?h=st(n,q(Q(c),b()),{useHtmlLabels:r,width:t.width||b().flowchart.wrappingWidth,classes:"markdown-node-label"}):h=o.appendChild(R(q(Q(c),b()),t.labelStyle,!1,i));let y=h.getBBox();const f=t.padding/2;if(H(b().flowchart.htmlLabels)){const p=h.children[0],d=E(h),k=p.getElementsByTagName("img");if(k){const x=c.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...k].map(u=>new Promise(S=>{function B(){if(u.style.display="flex",u.style.flexDirection="column",x){const C=b().fontSize?b().fontSize:window.getComputedStyle(document.body).fontSize,D=parseInt(C,10)*5+"px";u.style.minWidth=D,u.style.maxWidth=D}else u.style.width="100%";S(u)}setTimeout(()=>{u.complete&&B()}),u.addEventListener("error",B),u.addEventListener("load",B)})))}y=p.getBoundingClientRect(),d.attr("width",y.width),d.attr("height",y.height)}return r?n.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"):n.attr("transform","translate(0, "+-y.height/2+")"),t.centerLabel&&n.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:s,bbox:y,halfPadding:f,label:n}},m=(a,t)=>{const e=t.node().getBBox();a.width=e.width,a.height=e.height};function I(a,t,e,i){return a.insert("polygon",":first-child").attr("points",i.map(function(l){return l.x+","+l.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+e/2+")")}function Lt(a,t){return a.intersect(t)}function it(a,t,e,i){var l=a.x,r=a.y,s=l-i.x,n=r-i.y,c=Math.sqrt(t*t*n*n+e*e*s*s),o=Math.abs(t*e*s/c);i.x<l&&(o=-o);var h=Math.abs(t*e*n/c);return i.y<r&&(h=-h),{x:l+o,y:r+h}}function St(a,t,e){return it(a,t,t,e)}function Mt(a,t,e,i){var l,r,s,n,c,o,h,y,f,p,d,k,x,u,S;if(l=t.y-a.y,s=a.x-t.x,c=t.x*a.y-a.x*t.y,f=l*e.x+s*e.y+c,p=l*i.x+s*i.y+c,!(f!==0&&p!==0&&J(f,p))&&(r=i.y-e.y,n=e.x-i.x,o=i.x*e.y-e.x*i.y,h=r*a.x+n*a.y+o,y=r*t.x+n*t.y+o,!(h!==0&&y!==0&&J(h,y))&&(d=l*n-r*s,d!==0)))return k=Math.abs(d/2),x=s*o-n*c,u=x<0?(x-k)/d:(x+k)/d,x=r*c-l*o,S=x<0?(x-k)/d:(x+k)/d,{x:u,y:S}}function J(a,t){return a*t>0}function Tt(a,t,e){var i=a.x,l=a.y,r=[],s=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(d){s=Math.min(s,d.x),n=Math.min(n,d.y)}):(s=Math.min(s,t.x),n=Math.min(n,t.y));for(var c=i-a.width/2-s,o=l-a.height/2-n,h=0;h<t.length;h++){var y=t[h],f=t[h<t.length-1?h+1:0],p=Mt(a,e,{x:c+y.x,y:o+y.y},{x:c+f.x,y:o+f.y});p&&r.push(p)}return r.length?(r.length>1&&r.sort(function(d,k){var x=d.x-e.x,u=d.y-e.y,S=Math.sqrt(x*x+u*u),B=k.x-e.x,C=k.y-e.y,X=Math.sqrt(B*B+C*C);return S<X?-1:S===X?0:1}),r[0]):a}const Bt=(a,t)=>{var e=a.x,i=a.y,l=t.x-e,r=t.y-i,s=a.width/2,n=a.height/2,c,o;return Math.abs(r)*s>Math.abs(l)*n?(r<0&&(n=-n),c=r===0?0:n*l/r,o=n):(l<0&&(s=-s),c=s,o=l===0?0:s*r/l),{x:e+c,y:i+o}},Et=Bt,w={node:Lt,circle:St,ellipse:it,polygon:Tt,rect:Et},Ct=async(a,t)=>{t.useHtmlLabels||b().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:i,bbox:l,halfPadding:r}=await M(a,t,"node "+t.classes,!0);g.info("Classes = ",t.classes);const s=i.insert("rect",":first-child");return s.attr("rx",t.rx).attr("ry",t.ry).attr("x",-l.width/2-r).attr("y",-l.height/2-r).attr("width",l.width+t.padding).attr("height",l.height+t.padding),m(t,s),t.intersect=function(n){return w.rect(t,n)},i},$t=Ct,_t=a=>{const t=new Set;for(const e of a)switch(e){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(e);break}return t},Rt=(a,t,e)=>{const i=_t(a),l=2,r=t.height+2*e.padding,s=r/l,n=t.width+2*s+e.padding,c=e.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:s,y:0},{x:n/2,y:2*c},{x:n-s,y:0},{x:n,y:0},{x:n,y:-r/3},{x:n+2*c,y:-r/2},{x:n,y:-2*r/3},{x:n,y:-r},{x:n-s,y:-r},{x:n/2,y:-r-2*c},{x:s,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*c,y:-r/2},{x:0,y:-r/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:s,y:0},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:s,y:-r},{x:0,y:-r/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:s,y:-r},{x:n-s,y:-r},{x:n,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:n,y:-s},{x:n,y:-r+s},{x:0,y:-r}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:n,y:0},{x:0,y:-s},{x:0,y:-r+s},{x:n,y:-r}]:i.has("right")&&i.has("left")?[{x:s,y:0},{x:s,y:-c},{x:n-s,y:-c},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:n-s,y:-r+c},{x:s,y:-r+c},{x:s,y:-r},{x:0,y:-r/2}]:i.has("up")&&i.has("down")?[{x:n/2,y:0},{x:0,y:-c},{x:s,y:-c},{x:s,y:-r+c},{x:0,y:-r+c},{x:n/2,y:-r},{x:n,y:-r+c},{x:n-s,y:-r+c},{x:n-s,y:-c},{x:n,y:-c}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:n,y:-s},{x:0,y:-r}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:n,y:0},{x:0,y:-r}]:i.has("left")&&i.has("up")?[{x:n,y:0},{x:0,y:-s},{x:n,y:-r}]:i.has("left")&&i.has("down")?[{x:n,y:0},{x:0,y:0},{x:n,y:-r}]:i.has("right")?[{x:s,y:-c},{x:s,y:-c},{x:n-s,y:-c},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:n-s,y:-r+c},{x:s,y:-r+c},{x:s,y:-r+c}]:i.has("left")?[{x:s,y:0},{x:s,y:-c},{x:n-s,y:-c},{x:n-s,y:-r+c},{x:s,y:-r+c},{x:s,y:-r},{x:0,y:-r/2}]:i.has("up")?[{x:s,y:-c},{x:s,y:-r+c},{x:0,y:-r+c},{x:n/2,y:-r},{x:n,y:-r+c},{x:n-s,y:-r+c},{x:n-s,y:-c}]:i.has("down")?[{x:n/2,y:0},{x:0,y:-c},{x:s,y:-c},{x:s,y:-r+c},{x:n-s,y:-r+c},{x:n-s,y:-c},{x:n,y:-c}]:[{x:0,y:0}]},K=a=>a?" "+a:"",_=(a,t)=>`node default${K(a.classes)} ${K(a.class)}`,P=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=l+r,n=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];g.info("Question main (Circle)");const c=I(e,s,s,n);return c.attr("style",t.style),m(t,c),t.intersect=function(o){return g.warn("Intersect called"),w.polygon(t,n,o)},e},Ht=(a,t)=>{const e=a.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=28,l=[{x:0,y:i/2},{x:i/2,y:0},{x:0,y:-i/2},{x:-i/2,y:0}];return e.insert("polygon",":first-child").attr("points",l.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(s){return w.circle(t,14,s)},e},It=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=4,r=i.height+t.padding,s=r/l,n=i.width+2*s+t.padding,c=[{x:s,y:0},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:s,y:-r},{x:0,y:-r/2}],o=I(e,n,r,c);return o.attr("style",t.style),m(t,o),t.intersect=function(h){return w.polygon(t,c,h)},e},Nt=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,void 0,!0),l=2,r=i.height+2*t.padding,s=r/l,n=i.width+2*s+t.padding,c=Rt(t.directions,i,t),o=I(e,n,r,c);return o.attr("style",t.style),m(t,o),t.intersect=function(h){return w.polygon(t,c,h)},e},Ot=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:-r/2,y:0},{x:l,y:0},{x:l,y:-r},{x:-r/2,y:-r},{x:0,y:-r/2}];return I(e,l,r,s).attr("style",t.style),t.width=l+r,t.height=r,t.intersect=function(c){return w.polygon(t,s,c)},e},Wt=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:-2*r/6,y:0},{x:l-r/6,y:0},{x:l+2*r/6,y:-r},{x:r/6,y:-r}],n=I(e,l,r,s);return n.attr("style",t.style),m(t,n),t.intersect=function(c){return w.polygon(t,s,c)},e},Xt=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:2*r/6,y:0},{x:l+r/6,y:0},{x:l-2*r/6,y:-r},{x:-r/6,y:-r}],n=I(e,l,r,s);return n.attr("style",t.style),m(t,n),t.intersect=function(c){return w.polygon(t,s,c)},e},Yt=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:-2*r/6,y:0},{x:l+2*r/6,y:0},{x:l-r/6,y:-r},{x:r/6,y:-r}],n=I(e,l,r,s);return n.attr("style",t.style),m(t,n),t.intersect=function(c){return w.polygon(t,s,c)},e},Dt=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:r/6,y:0},{x:l-r/6,y:0},{x:l+2*r/6,y:-r},{x:-2*r/6,y:-r}],n=I(e,l,r,s);return n.attr("style",t.style),m(t,n),t.intersect=function(c){return w.polygon(t,s,c)},e},At=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:0,y:0},{x:l+r/2,y:0},{x:l,y:-r/2},{x:l+r/2,y:-r},{x:0,y:-r}],n=I(e,l,r,s);return n.attr("style",t.style),m(t,n),t.intersect=function(c){return w.polygon(t,s,c)},e},jt=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=i.width+t.padding,r=l/2,s=r/(2.5+l/50),n=i.height+s+t.padding,c="M 0,"+s+" a "+r+","+s+" 0,0,0 "+l+" 0 a "+r+","+s+" 0,0,0 "+-l+" 0 l 0,"+n+" a "+r+","+s+" 0,0,0 "+l+" 0 l 0,"+-n,o=e.attr("label-offset-y",s).insert("path",":first-child").attr("style",t.style).attr("d",c).attr("transform","translate("+-l/2+","+-(n/2+s)+")");return m(t,o),t.intersect=function(h){const y=w.rect(t,h),f=y.x-t.x;if(r!=0&&(Math.abs(f)<t.width/2||Math.abs(f)==t.width/2&&Math.abs(y.y-t.y)>t.height/2-s)){let p=s*s*(1-f*f/(r*r));p!=0&&(p=Math.sqrt(p)),p=s-p,h.y-t.y>0&&(p=-p),y.y+=p}return y},e},Ut=async(a,t)=>{const{shapeSvg:e,bbox:i,halfPadding:l}=await M(a,t,"node "+t.classes+" "+t.class,!0),r=e.insert("rect",":first-child"),s=t.positioned?t.width:i.width+t.padding,n=t.positioned?t.height:i.height+t.padding,c=t.positioned?-s/2:-i.width/2-l,o=t.positioned?-n/2:-i.height/2-l;if(r.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",o).attr("width",s).attr("height",n),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(V(r,t.props.borders,s,n),h.delete("borders")),h.forEach(y=>{g.warn(`Unknown node property ${y}`)})}return m(t,r),t.intersect=function(h){return w.rect(t,h)},e},zt=async(a,t)=>{const{shapeSvg:e,bbox:i,halfPadding:l}=await M(a,t,"node "+t.classes,!0),r=e.insert("rect",":first-child"),s=t.positioned?t.width:i.width+t.padding,n=t.positioned?t.height:i.height+t.padding,c=t.positioned?-s/2:-i.width/2-l,o=t.positioned?-n/2:-i.height/2-l;if(r.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",o).attr("width",s).attr("height",n),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(V(r,t.props.borders,s,n),h.delete("borders")),h.forEach(y=>{g.warn(`Unknown node property ${y}`)})}return m(t,r),t.intersect=function(h){return w.rect(t,h)},e},Zt=async(a,t)=>{const{shapeSvg:e}=await M(a,t,"label",!0);g.trace("Classes = ",t.class);const i=e.insert("rect",":first-child"),l=0,r=0;if(i.attr("width",l).attr("height",r),e.attr("class","label edgeLabel"),t.props){const s=new Set(Object.keys(t.props));t.props.borders&&(V(i,t.props.borders,l,r),s.delete("borders")),s.forEach(n=>{g.warn(`Unknown node property ${n}`)})}return m(t,i),t.intersect=function(s){return w.rect(t,s)},e};function V(a,t,e,i){const l=[],r=n=>{l.push(n,0)},s=n=>{l.push(0,n)};t.includes("t")?(g.debug("add top border"),r(e)):s(e),t.includes("r")?(g.debug("add right border"),r(i)):s(i),t.includes("b")?(g.debug("add bottom border"),r(e)):s(e),t.includes("l")?(g.debug("add left border"),r(i)):s(i),a.attr("stroke-dasharray",l.join(" "))}const Gt=(a,t)=>{let e;t.classes?e="node "+t.classes:e="node default";const i=a.insert("g").attr("class",e).attr("id",t.domId||t.id),l=i.insert("rect",":first-child"),r=i.insert("line"),s=i.insert("g").attr("class","label"),n=t.labelText.flat?t.labelText.flat():t.labelText;let c="";typeof n=="object"?c=n[0]:c=n,g.info("Label text abc79",c,n,typeof n=="object");const o=s.node().appendChild(R(c,t.labelStyle,!0,!0));let h={width:0,height:0};if(H(b().flowchart.htmlLabels)){const k=o.children[0],x=E(o);h=k.getBoundingClientRect(),x.attr("width",h.width),x.attr("height",h.height)}g.info("Text 2",n);const y=n.slice(1,n.length);let f=o.getBBox();const p=s.node().appendChild(R(y.join?y.join("<br/>"):y,t.labelStyle,!0,!0));if(H(b().flowchart.htmlLabels)){const k=p.children[0],x=E(p);h=k.getBoundingClientRect(),x.attr("width",h.width),x.attr("height",h.height)}const d=t.padding/2;return E(p).attr("transform","translate( "+(h.width>f.width?0:(f.width-h.width)/2)+", "+(f.height+d+5)+")"),E(o).attr("transform","translate( "+(h.width<f.width?0:-(f.width-h.width)/2)+", 0)"),h=s.node().getBBox(),s.attr("transform","translate("+-h.width/2+", "+(-h.height/2-d+3)+")"),l.attr("class","outer title-state").attr("x",-h.width/2-d).attr("y",-h.height/2-d).attr("width",h.width+t.padding).attr("height",h.height+t.padding),r.attr("class","divider").attr("x1",-h.width/2-d).attr("x2",h.width/2+d).attr("y1",-h.height/2-d+f.height+d).attr("y2",-h.height/2-d+f.height+d),m(t,l),t.intersect=function(k){return w.rect(t,k)},i},Ft=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=i.height+t.padding,r=i.width+l/4+t.padding,s=e.insert("rect",":first-child").attr("style",t.style).attr("rx",l/2).attr("ry",l/2).attr("x",-r/2).attr("y",-l/2).attr("width",r).attr("height",l);return m(t,s),t.intersect=function(n){return w.rect(t,n)},e},qt=async(a,t)=>{const{shapeSvg:e,bbox:i,halfPadding:l}=await M(a,t,_(t),!0),r=e.insert("circle",":first-child");return r.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+l).attr("width",i.width+t.padding).attr("height",i.height+t.padding),g.info("Circle main"),m(t,r),t.intersect=function(s){return g.info("Circle intersect",t,i.width/2+l,s),w.circle(t,i.width/2+l,s)},e},Qt=async(a,t)=>{const{shapeSvg:e,bbox:i,halfPadding:l}=await M(a,t,_(t),!0),r=5,s=e.insert("g",":first-child"),n=s.insert("circle"),c=s.insert("circle");return s.attr("class",t.class),n.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+l+r).attr("width",i.width+t.padding+r*2).attr("height",i.height+t.padding+r*2),c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+l).attr("width",i.width+t.padding).attr("height",i.height+t.padding),g.info("DoubleCircle main"),m(t,n),t.intersect=function(o){return g.info("DoubleCircle intersect",t,i.width/2+l+r,o),w.circle(t,i.width/2+l+r,o)},e},Vt=async(a,t)=>{const{shapeSvg:e,bbox:i}=await M(a,t,_(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:0,y:0},{x:l,y:0},{x:l,y:-r},{x:0,y:-r},{x:0,y:0},{x:-8,y:0},{x:l+8,y:0},{x:l+8,y:-r},{x:-8,y:-r},{x:-8,y:0}],n=I(e,l,r,s);return n.attr("style",t.style),m(t,n),t.intersect=function(c){return w.polygon(t,s,c)},e},Jt=(a,t)=>{const e=a.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=e.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),m(t,i),t.intersect=function(l){return w.circle(t,7,l)},e},tt=(a,t,e)=>{const i=a.insert("g").attr("class","node default").attr("id",t.domId||t.id);let l=70,r=10;e==="LR"&&(l=10,r=70);const s=i.append("rect").attr("x",-1*l/2).attr("y",-1*r/2).attr("width",l).attr("height",r).attr("class","fork-join");return m(t,s),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(n){return w.rect(t,n)},i},Kt=(a,t)=>{const e=a.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=e.insert("circle",":first-child"),l=e.insert("circle",":first-child");return l.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),i.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),m(t,l),t.intersect=function(r){return w.circle(t,7,r)},e},Pt=(a,t)=>{const e=t.padding/2,i=4,l=8;let r;t.classes?r="node "+t.classes:r="node default";const s=a.insert("g").attr("class",r).attr("id",t.domId||t.id),n=s.insert("rect",":first-child"),c=s.insert("line"),o=s.insert("line");let h=0,y=i;const f=s.insert("g").attr("class","label");let p=0;const d=t.classData.annotations&&t.classData.annotations[0],k=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",x=f.node().appendChild(R(k,t.labelStyle,!0,!0));let u=x.getBBox();if(H(b().flowchart.htmlLabels)){const v=x.children[0],L=E(x);u=v.getBoundingClientRect(),L.attr("width",u.width),L.attr("height",u.height)}t.classData.annotations[0]&&(y+=u.height+i,h+=u.width);let S=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(b().flowchart.htmlLabels?S+="<"+t.classData.type+">":S+="<"+t.classData.type+">");const B=f.node().appendChild(R(S,t.labelStyle,!0,!0));E(B).attr("class","classTitle");let C=B.getBBox();if(H(b().flowchart.htmlLabels)){const v=B.children[0],L=E(B);C=v.getBoundingClientRect(),L.attr("width",C.width),L.attr("height",C.height)}y+=C.height+i,C.width>h&&(h=C.width);const X=[];t.classData.members.forEach(v=>{const L=v.getDisplayDetails();let W=L.displayText;b().flowchart.htmlLabels&&(W=W.replace(/</g,"<").replace(/>/g,">"));const N=f.node().appendChild(R(W,L.cssStyle?L.cssStyle:t.labelStyle,!0,!0));let $=N.getBBox();if(H(b().flowchart.htmlLabels)){const F=N.children[0],A=E(N);$=F.getBoundingClientRect(),A.attr("width",$.width),A.attr("height",$.height)}$.width>h&&(h=$.width),y+=$.height+i,X.push(N)}),y+=l;const D=[];if(t.classData.methods.forEach(v=>{const L=v.getDisplayDetails();let W=L.displayText;b().flowchart.htmlLabels&&(W=W.replace(/</g,"<").replace(/>/g,">"));const N=f.node().appendChild(R(W,L.cssStyle?L.cssStyle:t.labelStyle,!0,!0));let $=N.getBBox();if(H(b().flowchart.htmlLabels)){const F=N.children[0],A=E(N);$=F.getBoundingClientRect(),A.attr("width",$.width),A.attr("height",$.height)}$.width>h&&(h=$.width),y+=$.height+i,D.push(N)}),y+=l,d){let v=(h-u.width)/2;E(x).attr("transform","translate( "+(-1*h/2+v)+", "+-1*y/2+")"),p=u.height+i}let nt=(h-C.width)/2;return E(B).attr("transform","translate( "+(-1*h/2+nt)+", "+(-1*y/2+p)+")"),p+=C.height+i,c.attr("class","divider").attr("x1",-h/2-e).attr("x2",h/2+e).attr("y1",-y/2-e+l+p).attr("y2",-y/2-e+l+p),p+=l,X.forEach(v=>{E(v).attr("transform","translate( "+-h/2+", "+(-1*y/2+p+l/2)+")");const L=v?.getBBox();p+=(L?.height??0)+i}),p+=l,o.attr("class","divider").attr("x1",-h/2-e).attr("x2",h/2+e).attr("y1",-y/2-e+l+p).attr("y2",-y/2-e+l+p),p+=l,D.forEach(v=>{E(v).attr("transform","translate( "+-h/2+", "+(-1*y/2+p)+")");const L=v?.getBBox();p+=(L?.height??0)+i}),n.attr("style",t.style).attr("class","outer title-state").attr("x",-h/2-e).attr("y",-(y/2)-e).attr("width",h+t.padding).attr("height",y+t.padding),m(t,n),t.intersect=function(v){return w.rect(t,v)},s},rt={rhombus:P,composite:zt,question:P,rect:Ut,labelRect:Zt,rectWithTitle:Gt,choice:Ht,circle:qt,doublecircle:Qt,stadium:Ft,hexagon:It,block_arrow:Nt,rect_left_inv_arrow:Ot,lean_right:Wt,lean_left:Xt,trapezoid:Yt,inv_trapezoid:Dt,rect_right_inv_arrow:At,cylinder:jt,start:Jt,end:Kt,note:$t,subroutine:Vt,fork:tt,join:tt,class_box:Pt};let Y={};const yr=async(a,t,e)=>{let i,l;if(t.link){let r;b().securityLevel==="sandbox"?r="_top":t.linkTarget&&(r=t.linkTarget||"_blank"),i=a.insert("svg:a").attr("xlink:href",t.link).attr("target",r),l=await rt[t.shape](i,t,e)}else l=await rt[t.shape](a,t,e),i=l;return t.tooltip&&l.attr("title",t.tooltip),t.class&&l.attr("class","node default "+t.class),i.attr("data-node","true"),i.attr("data-id",t.id),Y[t.id]=i,t.haveCallback&&Y[t.id].attr("class",Y[t.id].attr("class")+" clickable"),i},pr=(a,t)=>{Y[t.id]=a},fr=()=>{Y={}},xr=a=>{const t=Y[a.id];g.trace("Transforming node",a.diff,a,"translate("+(a.x-a.width/2-5)+", "+a.width/2+")");const e=8,i=a.diff||0;return a.clusterNode?t.attr("transform","translate("+(a.x+i-a.width/2)+", "+(a.y-a.height/2-e)+")"):t.attr("transform","translate("+a.x+", "+a.y+")"),i},tr=({flowchart:a})=>{var t,e;const i=((t=a?.subGraphTitleMargin)==null?void 0:t.top)??0,l=((e=a?.subGraphTitleMargin)==null?void 0:e.bottom)??0,r=i+l;return{subGraphTitleTopMargin:i,subGraphTitleBottomMargin:l,subGraphTitleTotalMargin:r}},O={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:5.3};function U(a,t){if(a===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};a=Z(a),t=Z(t);const[e,i]=[a.x,a.y],[l,r]=[t.x,t.y],s=l-e,n=r-i;return{angle:Math.atan(n/s),deltaX:s,deltaY:n}}const Z=a=>Array.isArray(a)?{x:a[0],y:a[1]}:a,rr=a=>({x:function(t,e,i){let l=0;if(e===0&&Object.hasOwn(O,a.arrowTypeStart)){const{angle:r,deltaX:s}=U(i[0],i[1]);l=O[a.arrowTypeStart]*Math.cos(r)*(s>=0?1:-1)}else if(e===i.length-1&&Object.hasOwn(O,a.arrowTypeEnd)){const{angle:r,deltaX:s}=U(i[i.length-1],i[i.length-2]);l=O[a.arrowTypeEnd]*Math.cos(r)*(s>=0?1:-1)}return Z(t).x+l},y:function(t,e,i){let l=0;if(e===0&&Object.hasOwn(O,a.arrowTypeStart)){const{angle:r,deltaY:s}=U(i[0],i[1]);l=O[a.arrowTypeStart]*Math.abs(Math.sin(r))*(s>=0?1:-1)}else if(e===i.length-1&&Object.hasOwn(O,a.arrowTypeEnd)){const{angle:r,deltaY:s}=U(i[i.length-1],i[i.length-2]);l=O[a.arrowTypeEnd]*Math.abs(Math.sin(r))*(s>=0?1:-1)}return Z(t).y+l}}),ar=(a,t,e,i,l)=>{t.arrowTypeStart&&at(a,"start",t.arrowTypeStart,e,i,l),t.arrowTypeEnd&&at(a,"end",t.arrowTypeEnd,e,i,l)},er={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},at=(a,t,e,i,l,r)=>{const s=er[e];if(!s){g.warn(`Unknown arrow type: ${e}`);return}const n=t==="start"?"Start":"End";a.attr(`marker-${t}`,`url(${i}#${l}_${r}-${s}${n})`)};let G={},T={};const dr=()=>{G={},T={}},gr=(a,t)=>{const e=H(b().flowchart.htmlLabels),i=t.labelType==="markdown"?st(a,t.label,{style:t.labelStyle,useHtmlLabels:e,addSvgBackground:!0}):R(t.label,t.labelStyle),l=a.insert("g").attr("class","edgeLabel"),r=l.insert("g").attr("class","label");r.node().appendChild(i);let s=i.getBBox();if(e){const c=i.children[0],o=E(i);s=c.getBoundingClientRect(),o.attr("width",s.width),o.attr("height",s.height)}r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),G[t.id]=l,t.width=s.width,t.height=s.height;let n;if(t.startLabelLeft){const c=R(t.startLabelLeft,t.labelStyle),o=a.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");n=h.node().appendChild(c);const y=c.getBBox();h.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),T[t.id]||(T[t.id]={}),T[t.id].startLeft=o,z(n,t.startLabelLeft)}if(t.startLabelRight){const c=R(t.startLabelRight,t.labelStyle),o=a.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");n=o.node().appendChild(c),h.node().appendChild(c);const y=c.getBBox();h.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),T[t.id]||(T[t.id]={}),T[t.id].startRight=o,z(n,t.startLabelRight)}if(t.endLabelLeft){const c=R(t.endLabelLeft,t.labelStyle),o=a.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");n=h.node().appendChild(c);const y=c.getBBox();h.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),o.node().appendChild(c),T[t.id]||(T[t.id]={}),T[t.id].endLeft=o,z(n,t.endLabelLeft)}if(t.endLabelRight){const c=R(t.endLabelRight,t.labelStyle),o=a.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");n=h.node().appendChild(c);const y=c.getBBox();h.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),o.node().appendChild(c),T[t.id]||(T[t.id]={}),T[t.id].endRight=o,z(n,t.endLabelRight)}return i};function z(a,t){b().flowchart.htmlLabels&&a&&(a.style.width=t.length*9+"px",a.style.height="12px")}const ur=(a,t)=>{g.debug("Moving label abc88 ",a.id,a.label,G[a.id],t);let e=t.updatedPath?t.updatedPath:t.originalPath;const i=b(),{subGraphTitleTotalMargin:l}=tr(i);if(a.label){const r=G[a.id];let s=a.x,n=a.y;if(e){const c=j.calcLabelPosition(e);g.debug("Moving label "+a.label+" from (",s,",",n,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(s=c.x,n=c.y)}r.attr("transform",`translate(${s}, ${n+l/2})`)}if(a.startLabelLeft){const r=T[a.id].startLeft;let s=a.x,n=a.y;if(e){const c=j.calcTerminalLabelPosition(a.arrowTypeStart?10:0,"start_left",e);s=c.x,n=c.y}r.attr("transform",`translate(${s}, ${n})`)}if(a.startLabelRight){const r=T[a.id].startRight;let s=a.x,n=a.y;if(e){const c=j.calcTerminalLabelPosition(a.arrowTypeStart?10:0,"start_right",e);s=c.x,n=c.y}r.attr("transform",`translate(${s}, ${n})`)}if(a.endLabelLeft){const r=T[a.id].endLeft;let s=a.x,n=a.y;if(e){const c=j.calcTerminalLabelPosition(a.arrowTypeEnd?10:0,"end_left",e);s=c.x,n=c.y}r.attr("transform",`translate(${s}, ${n})`)}if(a.endLabelRight){const r=T[a.id].endRight;let s=a.x,n=a.y;if(e){const c=j.calcTerminalLabelPosition(a.arrowTypeEnd?10:0,"end_right",e);s=c.x,n=c.y}r.attr("transform",`translate(${s}, ${n})`)}},sr=(a,t)=>{const e=a.x,i=a.y,l=Math.abs(t.x-e),r=Math.abs(t.y-i),s=a.width/2,n=a.height/2;return l>=s||r>=n},ir=(a,t,e)=>{g.debug(`intersection calc abc89:
|
|
2
2
|
outsidePoint: ${JSON.stringify(t)}
|
|
3
3
|
insidePoint : ${JSON.stringify(e)}
|
|
4
4
|
node : x:${a.x} y:${a.y} w:${a.width} h:${a.height}`);const i=a.x,l=a.y,r=Math.abs(i-e.x),s=a.width/2;let n=e.x<t.x?s-r:s+r;const c=a.height/2,o=Math.abs(t.y-e.y),h=Math.abs(t.x-e.x);if(Math.abs(l-t.y)*s>Math.abs(i-t.x)*c){let y=e.y<t.y?t.y-c-l:l-c-t.y;n=h*y/o;const f={x:e.x<t.x?e.x+n:e.x-h+n,y:e.y<t.y?e.y+o-y:e.y-o+y};return n===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),o===0&&(f.y=t.y),g.debug(`abc89 topp/bott calc, Q ${o}, q ${y}, R ${h}, r ${n}`,f),f}else{e.x<t.x?n=t.x-s-i:n=i-s-t.x;let y=o*n/h,f=e.x<t.x?e.x+h-n:e.x-h+n,p=e.y<t.y?e.y+y:e.y-y;return g.debug(`sides calc abc89, Q ${o}, q ${y}, R ${h}, r ${n}`,{_x:f,_y:p}),n===0&&(f=t.x,p=t.y),h===0&&(f=t.x),o===0&&(p=t.y),{x:f,y:p}}},et=(a,t)=>{g.debug("abc88 cutPathAtIntersect",a,t);let e=[],i=a[0],l=!1;return a.forEach(r=>{if(!sr(t,r)&&!l){const s=ir(t,i,r);let n=!1;e.forEach(c=>{n=n||c.x===s.x&&c.y===s.y}),e.some(c=>c.x===s.x&&c.y===s.y)||e.push(s),l=!0}else i=r,l||e.push(r)}),e},br=function(a,t,e,i,l,r,s){let n=e.points;g.debug("abc88 InsertEdge: edge=",e,"e=",t);let c=!1;const o=r.node(t.v);var h=r.node(t.w);h?.intersect&&o?.intersect&&(n=n.slice(1,e.points.length-1),n.unshift(o.intersect(n[0])),n.push(h.intersect(n[n.length-1]))),e.toCluster&&(g.debug("to cluster abc88",i[e.toCluster]),n=et(e.points,i[e.toCluster].node),c=!0),e.fromCluster&&(g.debug("from cluster abc88",i[e.fromCluster]),n=et(n.reverse(),i[e.fromCluster].node).reverse(),c=!0);const y=n.filter(C=>!Number.isNaN(C.y));let f=lt;e.curve&&(l==="graph"||l==="flowchart")&&(f=e.curve);const{x:p,y:d}=rr(e),k=ct().x(p).y(d).curve(f);let x;switch(e.thickness){case"normal":x="edge-thickness-normal";break;case"thick":x="edge-thickness-thick";break;case"invisible":x="edge-thickness-thick";break;default:x=""}switch(e.pattern){case"solid":x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed";break}const u=a.append("path").attr("d",k(y)).attr("id",e.id).attr("class"," "+x+(e.classes?" "+e.classes:"")).attr("style",e.style);let S="";(b().flowchart.arrowMarkerAbsolute||b().state.arrowMarkerAbsolute)&&(S=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,S=S.replace(/\(/g,"\\("),S=S.replace(/\)/g,"\\)")),ar(u,e,S,s,l);let B={};return c&&(B.updatedPath=n),B.originalPath=e.points,B};export{br as a,gr as b,yr as c,xr as d,Et as e,R as f,tr as g,fr as h,or as i,dr as j,rr as k,M as l,ar as m,ur as p,pr as s,m as u};
|