@marimo-team/islands 0.24.3-dev9 → 0.25.1-dev1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (440) hide show
  1. package/dist/{ConnectedDataExplorerComponent-C9OF_75w.js → ConnectedDataExplorerComponent-KVhjDMSe.js} +1066 -1066
  2. package/dist/ErrorBoundary-pXXIvlr3.js +200 -0
  3. package/dist/{ImageComparisonComponent-2a9TMMm2.js → ImageComparisonComponent-Dlm5aWnH.js} +4 -4
  4. package/dist/{Plot-C-9MQeGP.js → Plot-CTyjbQDT.js} +21032 -20666
  5. package/dist/_baseMerge-BiGRwuqv.js +165 -0
  6. package/dist/{abnfDiagram-N423BO3Z-CQKwzX8t.js → abnfDiagram-VCTEODGH-CpN0FRda.js} +17 -18
  7. package/dist/{any-language-editor-DmQ7dyCx.js → any-language-editor-CycIVIeP.js} +17 -17
  8. package/dist/arc-7ra3iNdN.js +81 -0
  9. package/dist/architecture-7GRP2DOG-BWLylgiA.js +3 -0
  10. package/dist/{architectureDiagram-T3A2C74G-CncrDpfa.js → architectureDiagram-5GKGNRK7-DDyj5SRB.js} +25 -25
  11. package/dist/assets/__vite-browser-external-C9iR87Zl.js +1 -0
  12. package/dist/assets/worker-D7hWi02M.js +109 -0
  13. package/dist/blockDiagram-I7D4REHJ-BbXEXJRu.js +1922 -0
  14. package/dist/{button-CKBkqR9J.js → button-DdXAm8iz.js} +5 -5
  15. package/dist/{c4Diagram-5PPSVZJV-DarUk3Yq.js → c4Diagram-7LVT6UL2-DcLsbQmR.js} +696 -668
  16. package/dist/{capabilities-CMBBJTcc.js → capabilities-B3ce_GNu.js} +1 -1
  17. package/dist/{html-to-image-BtFMe_Nq.js → cells-DYIkSxs6.js} +6757 -10137
  18. package/dist/{channel-CyiYUzJv.js → channel-B5XnTarr.js} +1 -1
  19. package/dist/chat-ui-BXj3uYjy.js +5786 -0
  20. package/dist/{check-CHig47QV.js → check-B7cIK6gb.js} +1 -1
  21. package/dist/{chunk-2Q5K7J3B-BMuJl2jB.js → chunk-2Q5K7J3B-BMkUkeuy.js} +2 -2
  22. package/dist/chunk-4HAMMTFA-D2qv8E0X.js +4188 -0
  23. package/dist/{chunk-5VM5RSS4-Bcq0ftdy.js → chunk-5VM5RSS4-DKsmPCL6.js} +2 -2
  24. package/dist/{chunk-NSK5VX7P-CDTMcJB0.js → chunk-75Z2AOVW-5_HsvXwr.js} +23 -23
  25. package/dist/{chunk-I66GZJ75-BqyTCAPf.js → chunk-DU6HZSFF-BUgAHvnM.js} +21 -4
  26. package/dist/{chunk-2GRJ4B5K-DgO8Qudq.js → chunk-F27PBJKO-DHmYWZXr.js} +4 -4
  27. package/dist/{chunk-KEIR6QF5-C4KX3XYh.js → chunk-FOHPRMQF-BpYR8RqP.js} +4 -4
  28. package/dist/{chunk-WRU74C26-BpWsbiDK.js → chunk-GMAD6QVW-Czynz8aA.js} +486 -258
  29. package/dist/chunk-GVQU2GXP-yQEdulRS.js +37 -0
  30. package/dist/{chunk-5RXB4S5H-tLNUVDdO.js → chunk-IMKFNOWR-BfwTebD0.js} +11 -11
  31. package/dist/{chunk-JWPE2WC7-BJwjGUnF.js → chunk-JWPE2WC7-DJvv1t8U.js} +2 -2
  32. package/dist/chunk-L3NEJ4N5-DwRWnDDK.js +245 -0
  33. package/dist/{chunk-7Z6QIM7H-Dc18hFxH.js → chunk-OSK3NFVY-BBKU_Ign.js} +222 -144
  34. package/dist/{chunk-W5SLKNZC-DLnvpEtV.js → chunk-P2QGCYS3-C0iGU29N.js} +20 -20
  35. package/dist/{chunk-KBJHAD2P-BuqWqkcW.js → chunk-POPQ4Y6H-BCbS3Ozc.js} +4 -4
  36. package/dist/{chunk-4I5QYGJK-DpytHuZQ.js → chunk-PWAF6VOD-CTFCL0jI.js} +4 -4
  37. package/dist/{chunk-JQJVKLGR-CgqCwe8E.js → chunk-SHT3W25Y-BspJEJ5H.js} +109 -63
  38. package/dist/{chunk-6Q2QTUOP-DmTcEBMn.js → chunk-SVP7TREG-DX3rFNTe.js} +5 -5
  39. package/dist/{chunk-GF5L2VYU-B0wgCQgS.js → chunk-TICWLB2K-fVF7Uujg.js} +13 -13
  40. package/dist/{chunk-XXDRQBXY-D73H4IN0.js → chunk-XXDRQBXY-Dnl5VBqG.js} +3 -3
  41. package/dist/{chunk-Y2CYZVJY-DoegUj_e.js → chunk-Y2CYZVJY-DKKS1VyV.js} +1 -1
  42. package/dist/{chunk-5FQGJX7Z-B85XCPv6.js → chunk-YOKDWASO-DrWbKnxA.js} +6925 -5460
  43. package/dist/classDiagram-ZZMXUADV-Fe-V14Sc.js +30 -0
  44. package/dist/classDiagram-v2-VYDZK3BY-xTDg7lOs.js +30 -0
  45. package/dist/code-visibility-BC_yF09p.js +138 -0
  46. package/dist/{common-Cv-4hMa0.js → common-Dv227ygK.js} +8838 -12645
  47. package/dist/{compiler-runtime-CAH9RLw2.js → compiler-runtime-Cj8ZWiNS.js} +2 -2
  48. package/dist/copy-icon-CLdENY__.js +190 -0
  49. package/dist/{cose-bilkent-JH36ORCC-FUWHkXFX.js → cose-bilkent-JH36ORCC-_LyRKVqm.js} +2 -2
  50. package/dist/cubic-OaEBhQPK.js +1404 -0
  51. package/dist/cynefin-OW5HDTMX-obq-i80l.js +3 -0
  52. package/dist/{cynefinDiagram-MW4NZA55-BXSFK93J.js → cynefinDiagram-5FMLGOSQ-CFQrqzSX.js} +10 -10
  53. package/dist/{dagre-CGyalH38.js → dagre-BGSfXNEb.js} +678 -537
  54. package/dist/dagre-GXQ25YYZ-xHNAUTyG.js +425 -0
  55. package/dist/{data-grid-overlay-editor-DZM4BAaI.js → data-grid-overlay-editor-B-I2K7z3.js} +8 -9
  56. package/dist/{data-grid-types-BnZwWG8z.js → data-grid-types-BucVmDDp.js} +1 -1
  57. package/dist/{defaultLocale-DKaU_opG.js → defaultLocale-JI_lnoCe.js} +1 -1
  58. package/dist/{diagram-7IWD3JNH-BjfzDNvj.js → diagram-S7CK7UJ4-Bt1rPbAx.js} +40 -39
  59. package/dist/{diagram-UB23O5K3-DDg-7wLA.js → diagram-UQ7AKVKN-D1sq5FoZ.js} +10 -10
  60. package/dist/{diagram-B4RE2ZJO-CKccR9eE.js → diagram-VSXAHHWV-BKpmG23x.js} +10 -10
  61. package/dist/{diagram-Q27KOJAE-Zhz01ss7.js → diagram-VX7I27RA-BMwGFVD6.js} +21 -21
  62. package/dist/{diagram-LBJQPF4R-CJ-bOruh.js → diagram-Z3DM3KII--KLDR9Pl.js} +10 -10
  63. package/dist/dialog-CgNq6y9-.js +94 -0
  64. package/dist/{dist-dAqZAPcF.js → dist-1HDa70oE.js} +3 -3
  65. package/dist/{dist-Re9sOPOx.js → dist-9x1ZRe-e.js} +2 -2
  66. package/dist/{dist-DEeLqRlU.js → dist-B1vYLK28.js} +1 -1
  67. package/dist/{dist-C5Bn52W4.js → dist-B8D7McG3.js} +3 -3
  68. package/dist/{dist-_XvgytiS.js → dist-BHCHt1NI.js} +1 -1
  69. package/dist/{dist-CRjAdnqF.js → dist-BRxfaJgs.js} +3 -3
  70. package/dist/{dist-Byj2bV8o.js → dist-BVGtK7Ht.js} +1 -1
  71. package/dist/{dist-BIN5LKyE.js → dist-BaHjhkpZ.js} +2 -2
  72. package/dist/{dist-DVFbIwc5.js → dist-BtKIs9N-.js} +1 -1
  73. package/dist/{dist-BrQGcfQ9.js → dist-C2KzV-vf.js} +2 -2
  74. package/dist/{dist-DJFiGP2k.js → dist-C2wDlYdD.js} +2 -2
  75. package/dist/{dist-BVRM2y1P.js → dist-C8xMLVYi.js} +2 -2
  76. package/dist/dist-CMh_W4y4.js +538 -0
  77. package/dist/{extends-BPB6_lTK.js → dist-CO1AwwG_.js} +516 -561
  78. package/dist/{dist-BzN60Z2s.js → dist-CPGxfVGX.js} +1 -1
  79. package/dist/{dist-C7v-9nUK.js → dist-Cm3iAFMD.js} +3 -3
  80. package/dist/{dist-CGAxEiaM.js → dist-Cs2FijYk.js} +2 -2
  81. package/dist/{dist-hXd65f0_.js → dist-D1PpnuZB.js} +1 -1
  82. package/dist/{dist-VdvbxG72.js → dist-DHOTQar0.js} +1 -1
  83. package/dist/{dist-DcgzXCfy.js → dist-DPcEtqmG.js} +2 -2
  84. package/dist/{dist-D4Z_qdP4.js → dist-Df0wKI0F.js} +1 -1
  85. package/dist/{dist-qhLI-SHd.js → dist-DszxuxS1.js} +2 -2
  86. package/dist/{dist-BEmkrGoQ.js → dist-Kxgjxakw.js} +1 -1
  87. package/dist/{dist-BbSMhhD2.js → dist-KzZ7WELx.js} +2 -2
  88. package/dist/{dist-jWUab2d1.js → dist-lA1Cttkb.js} +1 -1
  89. package/dist/dropdown-menu-CZgjYSAh.js +4502 -0
  90. package/dist/{ebnfDiagram-BXEA7PRR-Dm75pCAS.js → ebnfDiagram-PWID7BFC-WnG4cvSQ.js} +17 -18
  91. package/dist/{erDiagram-JOGREHBK-rVDG3VSQ.js → erDiagram-RLTQ6QDP-DhzKiYHc.js} +1037 -798
  92. package/dist/error-banner-B94dcDmP.js +391 -0
  93. package/dist/error-entries-C0NsUqXl.js +56 -0
  94. package/dist/{esm-CR1nhb1c.js → esm-BElI3qKH.js} +22 -22
  95. package/dist/{esm-C1d0g6Bv.js → esm-G4Fhsgng.js} +51 -37
  96. package/dist/{esm-CesmlDrs.js → esm-h8f7-1CJ.js} +423 -423
  97. package/dist/eventmodeling-NTZA5JFV-D7nP7Uyu.js +3 -0
  98. package/dist/feedback-button-D2hUXe09.js +380 -0
  99. package/dist/flowDiagram-HODETNUW-6dMdB8pR.js +16 -0
  100. package/dist/{formats-CslNOKy0.js → formats-BR5iGb4s.js} +8 -8
  101. package/dist/{ganttDiagram-PKOTCBZU-9D-LXF6P.js → ganttDiagram-EL5Y4UJY-DbzEBLbl.js} +15 -15
  102. package/dist/gitGraph-4MIJSDKK-Dy9uQXGh.js +3 -0
  103. package/dist/{gitGraphDiagram-DS77QQ5N-BfpsXTLf.js → gitGraphDiagram-WWUBYQGX-BMf0iKi1.js} +10 -10
  104. package/dist/{glide-data-editor-sPZ8fUFn.js → glide-data-editor-B851uguN.js} +2143 -1910
  105. package/dist/{glide-utils-NShAPPtn.js → glide-utils-B3rUT5PI.js} +15 -15
  106. package/dist/globals-CmijFoIU.js +19 -0
  107. package/dist/highlighted-body-KPVGNVTW-Ad3MKZ18.js +38 -0
  108. package/dist/html-to-image-CeYYvQNb.js +3272 -0
  109. package/dist/info-A6RAGUB7-DKoayiHY.js +3 -0
  110. package/dist/{infoDiagram-6WML65LV-DqCTXHVy.js → infoDiagram-27XIBGKW-BagtCX_5.js} +7 -7
  111. package/dist/{ishikawaDiagram-WSZJBQD7-BCUYmZ1v.js → ishikawaDiagram-5VMMS53U-DByDehYy.js} +8 -8
  112. package/dist/{journeyDiagram-NVQOT4AX-BXB6M4zN.js → journeyDiagram-3NMN7TZE-D2LcKDUO.js} +8 -8
  113. package/dist/{jsx-runtime-CpoKNRgu.js → jsx-runtime-DgDPJV9S.js} +1 -1
  114. package/dist/{kanban-definition-27J2QSJJ-CGRhrDUX.js → kanban-definition-UXKFOSKX-BxwkbBI_.js} +29 -29
  115. package/dist/katex-DFBiSucW.js +21840 -0
  116. package/dist/{label-lwzzBHUW.js → label-BJ49YTvk.js} +6 -6
  117. package/dist/{linear-D5r_1YqD.js → linear-Cnaq3Tfb.js} +4 -4
  118. package/dist/{loader-VZ__bv4g.js → loader-D2W4oM-3.js} +15 -15
  119. package/dist/main.js +8113 -13475
  120. package/dist/mermaid-DPNuhemn.js +3084 -0
  121. package/dist/mermaid-HWGCJPDP-DYCzSILp.js +2 -0
  122. package/dist/mermaid-parser.core-DxuSfYwJ.js +638 -0
  123. package/dist/{mhchem-BjwrxcV-.js → mhchem-DWCF06w9.js} +1 -1
  124. package/dist/{micromark-factory-space-DruVGzeG.js → micromark-factory-space-DGxAzmw8.js} +2 -2
  125. package/dist/{mindmap-definition-FAOFIHXS-C9gRhzZq.js → mindmap-definition-YA3MSWOX-Cgvojw3y.js} +17 -17
  126. package/dist/{node-sql-parser-DesT1xNw.js → node-sql-parser-BiZOJ-FS.js} +0 -3
  127. package/dist/{number-overlay-editor-De2CabLL.js → number-overlay-editor-BtdoxWiD.js} +5 -5
  128. package/dist/objectWithoutPropertiesLoose-BRDcTsfB.js +23 -0
  129. package/dist/packet-AYTQ26CC-Yw7ajchJ.js +3 -0
  130. package/dist/{pegDiagram-VL7TDLO6-Df9IUjMD.js → pegDiagram-XKGWAZYB-DahHhYyN.js} +19 -20
  131. package/dist/{pick-SnHlmIBN.js → pick-CJeoxYOS.js} +1 -1
  132. package/dist/pie-WAS4IAKB-BKdKOAkL.js +3 -0
  133. package/dist/{pieDiagram-7S7Q4E2Y-BmRzQ8ZP.js → pieDiagram-E7YTZNPT-CCtX0oCK.js} +29 -31
  134. package/dist/{process-output-CPy0YKUe.js → process-output-BCTjlyuH.js} +7 -6
  135. package/dist/purify.es-DgKyQviY.js +805 -0
  136. package/dist/{quadrantDiagram-CIZ2JOQS-wFBvWcxS.js → quadrantDiagram-AXDQQJYC-DftINo6g.js} +5 -5
  137. package/dist/radar-RG4KPBEZ-ScR_D_Ts.js +3 -0
  138. package/dist/railroad-74A4TZTK-DQvPSdo5.js +3 -0
  139. package/dist/railroad-abnf-HS5TGJTU-CsJQG2O8.js +3 -0
  140. package/dist/railroad-ebnf-LZEXJU2U-BgEobkSn.js +3 -0
  141. package/dist/railroad-peg-WCYAUIDC-DjLAjofI.js +3 -0
  142. package/dist/{railroadDiagram-AXF67PYL-DxbIatiN.js → railroadDiagram-O6MQD6OU-Du5NsPUb.js} +17 -18
  143. package/dist/{react-dom-C94wmq5w.js → react-dom-BUgJ-ab_.js} +3 -3
  144. package/dist/{react-DMWcHin-.js → react-ofJbxM4x.js} +2 -2
  145. package/dist/{react-vega-DSD5aT7_.js → react-vega-5AcMW8gG.js} +10012 -9369
  146. package/dist/{requirementDiagram-LRYGKXZP-X_x-Y713.js → requirementDiagram-BXWQKSXE-0pmmxL6_.js} +20 -19
  147. package/dist/{reveal-component-CVsYlb9J.js → reveal-component-DQq7NUGJ.js} +1303 -1237
  148. package/dist/{sankeyDiagram-W5VNT64P-BYJALbbm.js → sankeyDiagram-P5KCCOFB-CDKR5TJH.js} +4 -4
  149. package/dist/{select-3qHpFKF9.js → select-C6plhmZr.js} +317 -562
  150. package/dist/{sequenceDiagram-SI44F4Z6-BiPBe3Sv.js → sequenceDiagram-WJ2MYXX4-DB-ChWwU.js} +11 -11
  151. package/dist/{sizeCapture-X5ZJPWSS-BKLDeh5H.js → sizeCapture-INFHLROL-Dx5SpkQF.js} +2 -2
  152. package/dist/{spec-CutWdqo3.js → spec-CAYwFeV6.js} +4 -4
  153. package/dist/{src-C31ngt98.js → src-CA_m4ONl.js} +298 -303
  154. package/dist/{stateDiagram-OKZ733FA-B7QyNBxH.js → stateDiagram-D77RDMKH-orN6AwMx.js} +19 -20
  155. package/dist/stateDiagram-v2-MP3YSRHH-o05_rJN8.js +30 -0
  156. package/dist/style.css +2 -2
  157. package/dist/{swimlanes-SLNWSIFB-B4f8VP3b.js → swimlanes-42K2YHIH-BkSDcqDT.js} +1501 -1591
  158. package/dist/swimlanesDiagram-VR7AAH4N-D_nFQfRc.js +30 -0
  159. package/dist/{swiper-component-C90YjhaV.js → swiper-component-IOUowglM.js} +39 -26
  160. package/dist/{time-aWGfjN8x.js → time-BieKwdYS.js} +42 -42
  161. package/dist/{timeline-definition-Z64GVDOM-Dacq_5lr.js → timeline-definition-24CTP7MA-BuqJUIRZ.js} +7 -7
  162. package/dist/{toDate-CpXBeDq0.js → toDate-WXg1yLcI.js} +7 -7
  163. package/dist/toast-DvY70eFX.js +1834 -0
  164. package/dist/tooltip-qB8NlSqV.js +1742 -0
  165. package/dist/treeView-Q6P3EWNA-DuRV97YF.js +3 -0
  166. package/dist/treemap-WGGIJYW6-AsLq-uwC.js +3 -0
  167. package/dist/use-restore-focus-D5D9xEjZ.js +5946 -0
  168. package/dist/{use-vega-container-remeasure-DUW4tRxq.js → use-vega-container-remeasure-4DwJbPWu.js} +2 -2
  169. package/dist/{useAsyncData-CH6-CgJF.js → useAsyncData-BD6AStMt.js} +3 -3
  170. package/dist/{useDateFormatter-Cp9Jdxls.js → useDateFormatter-BRTPsUK7.js} +8 -8
  171. package/dist/{useDeepCompareMemoize-JC87C_jO.js → useDeepCompareMemoize-D_HNdyvI.js} +2 -2
  172. package/dist/{useIframeCapabilities-De3C-9b4.js → useIframeCapabilities-CVtNkI3Y.js} +2 -2
  173. package/dist/{useLifecycle-B4RGlyf0.js → useLifecycle-DPgiiwwU.js} +6 -6
  174. package/dist/useNumberFormatter-BfDpa21j.js +251 -0
  175. package/dist/useTheme-DzXmYZ5V.js +904 -0
  176. package/dist/{vega-component-ovBXgp91.js → vega-component-D0QXopU8.js} +34 -34
  177. package/dist/{vega-embed-container-TJ5z5dZw.js → vega-embed-container-CbnTccZi.js} +6 -6
  178. package/dist/vega-loader.browser-D95WfUcj.js +1139 -0
  179. package/dist/{vennDiagram-T6HMQDX7-D-Rcq3Iu.js → vennDiagram-4TSXK5OY-CTUlJ2PK.js} +9 -9
  180. package/dist/wardley-WFR3VGLG-Na-tFhQJ.js +3 -0
  181. package/dist/{wardleyDiagram-T6FBY63Y-Z-Og7_Wd.js → wardleyDiagram-VM6X3IG4-3evLUb0M.js} +10 -10
  182. package/dist/{xychartDiagram-ELKLHX3M-BDJ2dITA.js → xychartDiagram-S5SC5T6Z-DL2E3K8-.js} +248 -139
  183. package/package.json +54 -57
  184. package/src/__mocks__/notebook.ts +1 -0
  185. package/src/__mocks__/requests.ts +7 -0
  186. package/src/__tests__/__snapshots__/CellStatus.test.tsx.snap +12 -12
  187. package/src/__tests__/fixtures/pair-preview.ts +19 -0
  188. package/src/__tests__/mount.test.ts +18 -0
  189. package/src/components/app-config/optional-features.tsx +6 -0
  190. package/src/components/chat/acp/__tests__/agent-panel-initialization.test.tsx +394 -0
  191. package/src/components/chat/acp/__tests__/agent-panel.test.tsx +272 -0
  192. package/src/components/chat/acp/__tests__/state.test.ts +2 -2
  193. package/src/components/chat/acp/agent-panel.tsx +115 -74
  194. package/src/components/chat/acp/state.ts +1 -1
  195. package/src/components/data-table/__tests__/filters.test.ts +21 -21
  196. package/src/components/data-table/charts/__tests__/spec.test.ts +5 -10
  197. package/src/components/data-table/column-explorer-panel/column-explorer.tsx +2 -6
  198. package/src/components/data-table/column-summary/chart-spec-model.tsx +1 -1
  199. package/src/components/data-table/columns.tsx +64 -67
  200. package/src/components/editor/RecoveryButton.tsx +1 -0
  201. package/src/components/editor/__tests__/dynamic-favicon.test.tsx +36 -2
  202. package/src/components/editor/actions/__tests__/pair-with-agent-commands.test.ts +115 -0
  203. package/src/components/editor/actions/__tests__/pair-with-agent-modal.test.tsx +218 -0
  204. package/src/components/editor/actions/pair-with-agent-commands.ts +46 -9
  205. package/src/components/editor/actions/pair-with-agent-modal.tsx +49 -23
  206. package/src/components/editor/ai/add-cell-with-ai.tsx +1 -0
  207. package/src/components/editor/ai/ai-completion-editor.tsx +3 -1
  208. package/src/components/editor/alerts/__tests__/connection-notice.test.tsx +186 -0
  209. package/src/components/editor/alerts/__tests__/startup-progress.test.tsx +185 -0
  210. package/src/components/editor/alerts/connecting-alert.tsx +1 -66
  211. package/src/components/editor/alerts/connection-notice.tsx +186 -0
  212. package/src/components/editor/alerts/startup-output.tsx +173 -0
  213. package/src/components/editor/alerts/startup-progress.tsx +204 -0
  214. package/src/components/editor/app-container.tsx +9 -3
  215. package/src/components/editor/boundary/ErrorBoundary.tsx +38 -16
  216. package/src/components/editor/boundary/__tests__/ErrorBoundary.test.tsx +311 -0
  217. package/src/components/editor/cell/__tests__/toolbar.test.tsx +73 -0
  218. package/src/components/editor/cell/code/__tests__/rtc-editor-config.test.ts +50 -0
  219. package/src/components/editor/cell/code/cell-editor.tsx +41 -42
  220. package/src/components/editor/cell/toolbar.tsx +11 -0
  221. package/src/components/editor/chrome/components/__tests__/feedback-button.test.tsx +94 -0
  222. package/src/components/editor/chrome/components/feedback-button.tsx +63 -42
  223. package/src/components/editor/chrome/panels/__tests__/packages-panel.test.tsx +164 -8
  224. package/src/components/editor/chrome/panels/__tests__/sandbox-details.test.tsx +358 -0
  225. package/src/components/editor/chrome/panels/__tests__/sandbox-recovery.test.tsx +168 -0
  226. package/src/components/editor/chrome/panels/packages-panel.tsx +113 -175
  227. package/src/components/editor/chrome/panels/sandbox-controller.tsx +106 -0
  228. package/src/components/editor/chrome/panels/sandbox-details-state.ts +38 -0
  229. package/src/components/editor/chrome/panels/sandbox-panel.tsx +230 -0
  230. package/src/components/editor/chrome/panels/sandbox-toggle.tsx +52 -0
  231. package/src/components/editor/chrome/wrapper/app-chrome.tsx +7 -0
  232. package/src/components/editor/chrome/wrapper/footer-items/backend-status.tsx +3 -1
  233. package/src/components/editor/code/__tests__/readonly-diff.test.tsx +65 -0
  234. package/src/components/editor/code/readonly-diff.tsx +1 -1
  235. package/src/components/editor/connections/database/__tests__/__snapshots__/as-code.test.ts.snap +98 -98
  236. package/src/components/editor/connections/database/__tests__/as-code.test.ts +11 -5
  237. package/src/components/editor/dynamic-favicon.tsx +17 -10
  238. package/src/components/editor/file-tree/__tests__/file-explorer-navigation.test.tsx +13 -11
  239. package/src/components/editor/file-tree/__tests__/tree-actions.test.tsx +54 -0
  240. package/src/components/editor/file-tree/tree-actions.tsx +11 -14
  241. package/src/components/editor/header/__tests__/status.test.tsx +8 -20
  242. package/src/components/editor/header/filename-input.tsx +2 -0
  243. package/src/components/editor/header/status.tsx +5 -3
  244. package/src/components/editor/navigation/clipboard.ts +1 -0
  245. package/src/components/editor/notebook-cell.tsx +4 -2
  246. package/src/components/editor/output/JsonOutput.tsx +182 -632
  247. package/src/components/editor/output/Outputs.css +49 -17
  248. package/src/components/editor/output/__tests__/JsonOutput-interactions.test.tsx +254 -0
  249. package/src/components/editor/output/__tests__/JsonOutput-mimetype.test.tsx +41 -46
  250. package/src/components/editor/output/__tests__/{json-output.test.ts → json-output-formatting.test.ts} +113 -75
  251. package/src/components/editor/output/__tests__/json-output-pagination.test.ts +252 -0
  252. package/src/components/editor/output/json-output/formatting.ts +167 -0
  253. package/src/components/editor/output/json-output/pagination.ts +155 -0
  254. package/src/components/editor/output/json-output/renderers.tsx +196 -0
  255. package/src/components/editor/output/json-output/themes.ts +52 -0
  256. package/src/components/editor/package-alert.tsx +112 -66
  257. package/src/components/editor/renderers/cell-array.tsx +1 -5
  258. package/src/components/editor/renderers/slides-layout/__tests__/plugin.test.ts +3 -7
  259. package/src/components/slides/slide-form.tsx +1 -0
  260. package/src/components/slides/slide-notes-editor.tsx +1 -0
  261. package/src/components/tracing/tracing-spec.ts +1 -1
  262. package/src/components/ui/__tests__/badge.test.ts +6 -4
  263. package/src/components/ui/use-toast.ts +8 -0
  264. package/src/core/MarimoApp.tsx +0 -2
  265. package/src/core/ai/context/providers/__tests__/error.test.ts +16 -22
  266. package/src/core/alerts/__tests__/environment.test.ts +183 -0
  267. package/src/core/alerts/__tests__/state.test.tsx +240 -0
  268. package/src/core/alerts/environment.ts +57 -0
  269. package/src/core/alerts/state.ts +155 -99
  270. package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +296 -259
  271. package/src/core/cells/__tests__/apply-transaction.test.ts +34 -0
  272. package/src/core/cells/__tests__/cell.test.ts +61 -0
  273. package/src/core/cells/__tests__/cells.test.ts +182 -37
  274. package/src/core/cells/__tests__/document-changes.test.ts +39 -1
  275. package/src/core/cells/__tests__/outputs.test.tsx +117 -0
  276. package/src/core/cells/__tests__/pending-delete-service.test.tsx +4 -3
  277. package/src/core/cells/__tests__/session.test.ts +7 -0
  278. package/src/core/cells/cell.ts +9 -1
  279. package/src/core/cells/cells.ts +13 -18
  280. package/src/core/cells/document-changes.ts +11 -1
  281. package/src/core/cells/outputs.ts +66 -9
  282. package/src/core/cells/pending-delete-service.ts +12 -16
  283. package/src/core/cells/session.ts +2 -0
  284. package/src/core/cells/types.ts +2 -0
  285. package/src/core/codemirror/find-replace/__tests__/navigate.test.ts +8 -16
  286. package/src/core/codemirror/language/__tests__/sql.test.ts +70 -2
  287. package/src/core/codemirror/language/embedded/__tests__/embedded-python.test.ts +4 -8
  288. package/src/core/codemirror/language/languages/sql/sql.ts +16 -1
  289. package/src/core/codemirror/rtc/extension.ts +5 -2
  290. package/src/core/config/pair.ts +19 -0
  291. package/src/core/datasets/__tests__/data-source.test.ts +2 -0
  292. package/src/core/datasets/data-source-connections.ts +15 -10
  293. package/src/core/edit-app.tsx +8 -5
  294. package/src/core/errors/state.ts +1 -2
  295. package/src/core/export/__tests__/hooks.test.ts +1 -6
  296. package/src/core/islands/bootstrap.ts +3 -1
  297. package/src/core/islands/bridge.ts +3 -0
  298. package/src/core/islands/worker-factory.ts +2 -12
  299. package/src/core/kernel/messages.ts +2 -2
  300. package/src/core/network/__tests__/requests-network.test.ts +4 -3
  301. package/src/core/network/connection-notice.ts +117 -0
  302. package/src/core/network/connection.ts +19 -0
  303. package/src/core/network/requests-lazy.ts +3 -0
  304. package/src/core/network/requests-network.ts +12 -0
  305. package/src/core/network/requests-static.ts +3 -0
  306. package/src/core/network/requests-toasting.tsx +3 -0
  307. package/src/core/network/resolve.ts +2 -1
  308. package/src/core/network/types.ts +7 -0
  309. package/src/core/network/useConnectionNotice.ts +53 -0
  310. package/src/core/packages/__tests__/usePackageAction.test.tsx +129 -0
  311. package/src/core/packages/__tests__/useSandboxController.test.tsx +246 -0
  312. package/src/core/packages/package-data.ts +35 -0
  313. package/src/core/packages/sandbox-state.ts +67 -0
  314. package/src/core/packages/toast-components.tsx +11 -0
  315. package/src/core/packages/useInstallPackage.ts +1 -1
  316. package/src/core/packages/usePackageAction.ts +51 -0
  317. package/src/core/packages/usePackageDependencies.ts +22 -0
  318. package/src/core/packages/useSandboxController.ts +208 -0
  319. package/src/core/run-app.tsx +2 -0
  320. package/src/core/static/__tests__/files.test.ts +12 -30
  321. package/src/core/wasm/__tests__/bootstrap.test.ts +63 -0
  322. package/src/core/wasm/__tests__/bridge.test.ts +13 -4
  323. package/src/core/wasm/__tests__/fs.test.ts +22 -0
  324. package/src/core/wasm/__tests__/runtime-config.test.ts +65 -0
  325. package/src/core/wasm/bridge.ts +35 -23
  326. package/src/core/wasm/rpc.ts +2 -0
  327. package/src/core/wasm/runtime-config.ts +31 -0
  328. package/src/core/wasm/worker/bootstrap.ts +21 -11
  329. package/src/core/wasm/worker/constants.ts +1 -0
  330. package/src/core/wasm/worker/fs.ts +4 -0
  331. package/src/core/wasm/worker/getController.ts +3 -1
  332. package/src/core/wasm/worker/save-worker.ts +10 -9
  333. package/src/core/wasm/worker/types.ts +6 -4
  334. package/src/core/wasm/worker/worker.ts +9 -9
  335. package/src/core/websocket/__tests__/useMarimoKernelConnection.hook.test.tsx +404 -3
  336. package/src/core/websocket/__tests__/useMarimoKernelConnection.test.ts +8 -6
  337. package/src/core/websocket/transports/transport.ts +1 -1
  338. package/src/core/websocket/transports/ws.ts +1 -1
  339. package/src/core/websocket/types.ts +11 -1
  340. package/src/core/websocket/useMarimoKernelConnection.tsx +63 -16
  341. package/src/hooks/useDebounce.ts +2 -0
  342. package/src/mount.tsx +3 -0
  343. package/src/plugins/core/BadPlugin.tsx +3 -14
  344. package/src/plugins/core/RenderHTML.tsx +22 -2
  345. package/src/plugins/core/__test__/RenderHTML.test.ts +187 -0
  346. package/src/plugins/core/registerReactComponent.tsx +0 -1
  347. package/src/plugins/impl/FileBrowserPlugin.tsx +10 -4
  348. package/src/plugins/impl/FormPlugin.tsx +2 -0
  349. package/src/plugins/impl/MatrixPlugin.tsx +2 -0
  350. package/src/plugins/impl/RangeSliderPlugin.tsx +2 -0
  351. package/src/plugins/impl/SliderPlugin.tsx +2 -0
  352. package/src/plugins/impl/__tests__/FileBrowserPlugin.test.tsx +50 -1
  353. package/src/plugins/impl/data-editor/__tests__/glide-data-editor.test.tsx +23 -18
  354. package/src/plugins/impl/data-frames/panel.tsx +1 -0
  355. package/src/plugins/impl/image-comparison/ImageComparisonComponent.tsx +1 -1
  356. package/src/plugins/impl/image-comparison/__tests__/ImageComparisonComponent.test.tsx +15 -0
  357. package/src/plugins/impl/vega/__tests__/make-selectable.test.ts +42 -48
  358. package/src/plugins/layout/AccordionPlugin.tsx +7 -2
  359. package/src/plugins/layout/JsonOutputPlugin.tsx +7 -10
  360. package/src/plugins/layout/__test__/AccordionPlugin.test.tsx +66 -0
  361. package/src/stories/sandbox.stories.tsx +488 -0
  362. package/src/utils/__tests__/path.test.ts +6 -5
  363. package/src/utils/__tests__/worker.test.ts +81 -0
  364. package/src/utils/worker.ts +22 -0
  365. package/dist/ErrorBoundary-CR-ZQN_c.js +0 -125
  366. package/dist/_baseMerge-Dv8bBloN.js +0 -73
  367. package/dist/_initCloneObject---vediN2.js +0 -95
  368. package/dist/arc-DOVLrCPd.js +0 -82
  369. package/dist/architecture-TIHT7OUA-MiJpPpQW.js +0 -3
  370. package/dist/array-CApNbSU9.js +0 -6
  371. package/dist/assets/__vite-browser-external-BdKGjRZ4.js +0 -1
  372. package/dist/assets/worker-DlIBfp9S.js +0 -98
  373. package/dist/blockDiagram-VBNYF7ZC-Bc--I65C.js +0 -3158
  374. package/dist/chat-ui-BSwr409J.js +0 -8455
  375. package/dist/chunk-3NCLNEKW-BIp_lB_4.js +0 -14
  376. package/dist/chunk-5FCAYU7R-C_HO9A1J.js +0 -23
  377. package/dist/chunk-5HE753X5-Bixm_MV-.js +0 -38
  378. package/dist/chunk-5JV3BV7I-CH5J3iZY.js +0 -54
  379. package/dist/chunk-5TONJI2A-DG6gDiSS.js +0 -62
  380. package/dist/chunk-7BUUIJ7U-5afmIPeo.js +0 -82
  381. package/dist/chunk-BIQX33UG-7TMBUf89.js +0 -23
  382. package/dist/chunk-CQNSW5MT-Cnqqsxt-.js +0 -38
  383. package/dist/chunk-CYSBUYHQ-BAbymFHR.js +0 -23
  384. package/dist/chunk-EMLP6XTP-Bsz-QL77.js +0 -23
  385. package/dist/chunk-J7OUQ5F2-CM_meqZH.js +0 -57
  386. package/dist/chunk-JG7HCLWE-DUnCDgPk.js +0 -62
  387. package/dist/chunk-MOZMSUNE-BG6IHvzT.js +0 -35
  388. package/dist/chunk-OSBZ3O6U-CYwj_bvR.js +0 -23
  389. package/dist/chunk-QBLGF6JB-B4vJ4j8J.js +0 -23
  390. package/dist/chunk-QR6OTTB3-D4wH2ldi.js +0 -3738
  391. package/dist/chunk-R7FJI6CG-Blf8FcmZ.js +0 -64
  392. package/dist/chunk-RYQCIY6F-BWbIlBIH.js +0 -241
  393. package/dist/chunk-U6XO7XAA-COw445DS.js +0 -63
  394. package/dist/chunk-UBXNYLIW-BHigVU4H.js +0 -32
  395. package/dist/chunk-YOTPTUD7-Dn044Q_d.js +0 -30
  396. package/dist/chunk-ZIRB5QZD-BR4TMfOa.js +0 -1153
  397. package/dist/classDiagram-JCYQIIEL-DmXSLxe_.js +0 -30
  398. package/dist/classDiagram-v2-OCEON4UE-CooqVexA.js +0 -30
  399. package/dist/click-outside-container-D_URcm3D.js +0 -167
  400. package/dist/code-block-37QAKDTI-CQrzBOr-.js +0 -107
  401. package/dist/copy-CD7S58CY.js +0 -141
  402. package/dist/cynefin-VYW2F7L2-CeHAxOEX.js +0 -3
  403. package/dist/dagre-VZM6K2ZE-CJggWPTJ.js +0 -328
  404. package/dist/dist-3_o3T78I.js +0 -1360
  405. package/dist/dist-ABQjhuek.js +0 -64
  406. package/dist/dist-CO5R6VMi.js +0 -538
  407. package/dist/dropdown-menu-DhCfcscX.js +0 -5858
  408. package/dist/emotion-is-prop-valid.esm-M57VsT8j.js +0 -14
  409. package/dist/error-banner-CsXbEEjo.js +0 -611
  410. package/dist/eventmodeling-45OFAUF4-B_lWZ-Pd.js +0 -3
  411. package/dist/flowDiagram-UKHOOZJN-g1AmrZzM.js +0 -17
  412. package/dist/gitGraph-TEB2WS4Q-Dj-eXUph.js +0 -3
  413. package/dist/info-DKCQHKI2-Bhb-pe2e.js +0 -3
  414. package/dist/line-CuKjIQa1.js +0 -34
  415. package/dist/map-BJpOfPlL.js +0 -149
  416. package/dist/math-BXtKgYah.js +0 -10
  417. package/dist/mermaid-4DMBBIKO-Ddp9TgNp.js +0 -2
  418. package/dist/mermaid-Bi23Ibnw.js +0 -1173
  419. package/dist/mermaid-parser.core-Din9FvSi.js +0 -99
  420. package/dist/packet-7NZHBO7P-fbkIIyKE.js +0 -3
  421. package/dist/path-BNHuHZP8.js +0 -87
  422. package/dist/pie-RZYD4A2V-CLRIsxY1.js +0 -3
  423. package/dist/purify.es-CB-YO1Hn.js +0 -774
  424. package/dist/radar-I7S5WNFK-BGzCbgXu.js +0 -3
  425. package/dist/railroad-3IZDKUUU-CvQIIcuU.js +0 -3
  426. package/dist/railroad-abnf-AHOZXSZD-CMwtlNtu.js +0 -3
  427. package/dist/railroad-ebnf-EBAXGLYW-n1QUOAsh.js +0 -3
  428. package/dist/railroad-peg-LSFZ7HO6-PjnrpmCs.js +0 -3
  429. package/dist/schemas-DzK6U94N.js +0 -6057
  430. package/dist/stateDiagram-v2-UEYNNEHI-BTRUs8Il.js +0 -30
  431. package/dist/step-CKczO72Q.js +0 -670
  432. package/dist/swimlanesDiagram-ULZ7WXOC-NBmgBl9G.js +0 -31
  433. package/dist/timer-DpDyj9G0.js +0 -596
  434. package/dist/tooltip-Dt77sBeT.js +0 -390
  435. package/dist/treeView-QDETBFTQ-DU8LwHuf.js +0 -3
  436. package/dist/treemap-6X3UGDF4-DUk4-k_O.js +0 -3
  437. package/dist/useTheme-CVJ0UOf2.js +0 -841
  438. package/dist/vega-loader.browser-DEggZzni.js +0 -1083
  439. package/dist/wardley-OPB4EBWU-Db-AaGas.js +0 -3
  440. package/src/components/editor/output/EmotionCacheProvider.tsx +0 -32
@@ -1,15 +1,18 @@
1
- import { _ as e, n as t, r as n } from "./chunk-NSK5VX7P-CDTMcJB0.js";
2
- import { n as r, t as i } from "./src-C31ngt98.js";
3
- import { n as a } from "./chunk-Y2CYZVJY-DoegUj_e.js";
4
- import { H as o, U as s, c as l, r as u, s as d, v as f, x as p, y as m, z as h } from "./chunk-I66GZJ75-BqyTCAPf.js";
5
- import { t as g } from "./dist-DUAh96QY.js";
6
- import { a as _, s as v } from "./chunk-2GRJ4B5K-DgO8Qudq.js";
7
- //#region ../node_modules/.pnpm/mermaid@11.16.1/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-5PPSVZJV.mjs
8
- var y = g(), b = (function() {
1
+ import { _ as e, n as t, r as n } from "./chunk-75Z2AOVW-5_HsvXwr.js";
2
+ import { n as r, t as i } from "./src-CA_m4ONl.js";
3
+ import { n as a } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
4
+ import { H as o, U as s, c as l, r as u, s as d, v as f, x as p, y as m, z as h } from "./chunk-DU6HZSFF-BUgAHvnM.js";
5
+ import "./chunk-P2QGCYS3-C0iGU29N.js";
6
+ import "./chunk-PWAF6VOD-CTFCL0jI.js";
7
+ import "./chunk-GMAD6QVW-Czynz8aA.js";
8
+ import { o as g } from "./chunk-4HAMMTFA-D2qv8E0X.js";
9
+ import { a as _ } from "./chunk-F27PBJKO-DHmYWZXr.js";
10
+ //#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-7LVT6UL2.mjs
11
+ var v = (function() {
9
12
  var e = /* @__PURE__ */ a(function(e, t, n, r) {
10
13
  for (n ||= {}, r = e.length; r--; n[e[r]] = t);
11
14
  return n;
12
- }, "o"), t = [1, 24], n = [1, 25], r = [1, 26], i = [1, 27], o = [1, 28], s = [1, 63], l = [1, 64], u = [1, 65], d = [1, 66], f = [1, 67], p = [1, 68], m = [1, 69], h = [1, 29], g = [1, 30], _ = [1, 31], v = [1, 32], y = [1, 33], b = [1, 34], x = [1, 35], S = [1, 36], C = [1, 37], w = [1, 38], T = [1, 39], E = [1, 40], D = [1, 41], O = [1, 42], k = [1, 43], A = [1, 44], j = [1, 45], M = [1, 46], N = [1, 47], P = [1, 48], F = [1, 50], I = [1, 51], L = [1, 52], R = [1, 53], ee = [1, 54], te = [1, 55], ne = [1, 56], z = [1, 57], B = [1, 58], V = [1, 59], H = [1, 60], re = [14, 42], ie = [
15
+ }, "o"), t = [1, 24], n = [1, 25], r = [1, 26], i = [1, 27], o = [1, 28], s = [1, 63], l = [1, 64], u = [1, 65], d = [1, 66], f = [1, 67], p = [1, 68], m = [1, 69], h = [1, 29], g = [1, 30], _ = [1, 31], v = [1, 32], y = [1, 33], b = [1, 34], x = [1, 35], S = [1, 36], C = [1, 37], w = [1, 38], T = [1, 39], E = [1, 40], D = [1, 41], O = [1, 42], k = [1, 43], A = [1, 44], j = [1, 45], M = [1, 46], N = [1, 47], P = [1, 48], F = [1, 50], I = [1, 51], L = [1, 52], R = [1, 53], z = [1, 54], B = [1, 55], V = [1, 56], H = [1, 57], U = [1, 58], W = [1, 59], G = [1, 60], ee = [14, 42], te = [
13
16
  14,
14
17
  34,
15
18
  36,
@@ -50,7 +53,7 @@ var y = g(), b = (function() {
50
53
  72,
51
54
  73,
52
55
  74
53
- ], ae = [
56
+ ], ne = [
54
57
  12,
55
58
  14,
56
59
  34,
@@ -92,16 +95,16 @@ var y = g(), b = (function() {
92
95
  72,
93
96
  73,
94
97
  74
95
- ], U = [1, 82], W = [1, 83], G = [1, 84], K = [1, 85], q = [
98
+ ], K = [1, 82], q = [1, 83], J = [1, 84], Y = [1, 85], X = [
96
99
  12,
97
100
  14,
98
101
  42
99
- ], oe = [
102
+ ], re = [
100
103
  12,
101
104
  14,
102
105
  33,
103
106
  42
104
- ], se = [
107
+ ], ie = [
105
108
  12,
106
109
  14,
107
110
  33,
@@ -110,7 +113,7 @@ var y = g(), b = (function() {
110
113
  77,
111
114
  79,
112
115
  80
113
- ], ce = [12, 33], le = [
116
+ ], ae = [12, 33], oe = [
114
117
  34,
115
118
  36,
116
119
  37,
@@ -149,7 +152,7 @@ var y = g(), b = (function() {
149
152
  72,
150
153
  73,
151
154
  74
152
- ], J = {
155
+ ], se = {
153
156
  trace: /* @__PURE__ */ a(function() {}, "trace"),
154
157
  yy: {},
155
158
  symbols_: {
@@ -623,13 +626,13 @@ var y = g(), b = (function() {
623
626
  65: I,
624
627
  66: L,
625
628
  67: R,
626
- 68: ee,
627
- 69: te,
628
- 70: ne,
629
- 71: z,
630
- 72: B,
631
- 73: V,
632
- 74: H
629
+ 68: z,
630
+ 69: B,
631
+ 70: V,
632
+ 71: H,
633
+ 72: U,
634
+ 73: W,
635
+ 74: G
633
636
  },
634
637
  {
635
638
  13: 70,
@@ -676,13 +679,13 @@ var y = g(), b = (function() {
676
679
  65: I,
677
680
  66: L,
678
681
  67: R,
679
- 68: ee,
680
- 69: te,
681
- 70: ne,
682
- 71: z,
683
- 72: B,
684
- 73: V,
685
- 74: H
682
+ 68: z,
683
+ 69: B,
684
+ 70: V,
685
+ 71: H,
686
+ 72: U,
687
+ 73: W,
688
+ 74: G
686
689
  },
687
690
  {
688
691
  13: 71,
@@ -729,13 +732,13 @@ var y = g(), b = (function() {
729
732
  65: I,
730
733
  66: L,
731
734
  67: R,
732
- 68: ee,
733
- 69: te,
734
- 70: ne,
735
- 71: z,
736
- 72: B,
737
- 73: V,
738
- 74: H
735
+ 68: z,
736
+ 69: B,
737
+ 70: V,
738
+ 71: H,
739
+ 72: U,
740
+ 73: W,
741
+ 74: G
739
742
  },
740
743
  {
741
744
  13: 72,
@@ -782,13 +785,13 @@ var y = g(), b = (function() {
782
785
  65: I,
783
786
  66: L,
784
787
  67: R,
785
- 68: ee,
786
- 69: te,
787
- 70: ne,
788
- 71: z,
789
- 72: B,
790
- 73: V,
791
- 74: H
788
+ 68: z,
789
+ 69: B,
790
+ 70: V,
791
+ 71: H,
792
+ 72: U,
793
+ 73: W,
794
+ 74: G
792
795
  },
793
796
  {
794
797
  13: 73,
@@ -835,16 +838,16 @@ var y = g(), b = (function() {
835
838
  65: I,
836
839
  66: L,
837
840
  67: R,
838
- 68: ee,
839
- 69: te,
840
- 70: ne,
841
- 71: z,
842
- 72: B,
843
- 73: V,
844
- 74: H
841
+ 68: z,
842
+ 69: B,
843
+ 70: V,
844
+ 71: H,
845
+ 72: U,
846
+ 73: W,
847
+ 74: G
845
848
  },
846
849
  { 14: [1, 74] },
847
- e(re, [2, 13], {
850
+ e(ee, [2, 13], {
848
851
  43: 23,
849
852
  29: 49,
850
853
  30: 61,
@@ -881,270 +884,270 @@ var y = g(), b = (function() {
881
884
  65: I,
882
885
  66: L,
883
886
  67: R,
884
- 68: ee,
885
- 69: te,
886
- 70: ne,
887
- 71: z,
888
- 72: B,
889
- 73: V,
890
- 74: H
887
+ 68: z,
888
+ 69: B,
889
+ 70: V,
890
+ 71: H,
891
+ 72: U,
892
+ 73: W,
893
+ 74: G
891
894
  }),
892
- e(re, [2, 14]),
893
- e(ie, [2, 16], { 12: [1, 76] }),
894
- e(re, [2, 36], { 12: [1, 77] }),
895
- e(ae, [2, 19]),
896
- e(ae, [2, 20]),
895
+ e(ee, [2, 14]),
896
+ e(te, [2, 16], { 12: [1, 76] }),
897
+ e(ee, [2, 36], { 12: [1, 77] }),
898
+ e(ne, [2, 19]),
899
+ e(ne, [2, 20]),
897
900
  { 25: [1, 78] },
898
901
  { 27: [1, 79] },
899
- e(ae, [2, 23]),
902
+ e(ne, [2, 23]),
900
903
  {
901
904
  35: 80,
902
905
  75: 81,
903
- 76: U,
904
- 77: W,
905
- 79: G,
906
- 80: K
906
+ 76: K,
907
+ 77: q,
908
+ 79: J,
909
+ 80: Y
907
910
  },
908
911
  {
909
912
  35: 86,
910
913
  75: 81,
911
- 76: U,
912
- 77: W,
913
- 79: G,
914
- 80: K
914
+ 76: K,
915
+ 77: q,
916
+ 79: J,
917
+ 80: Y
915
918
  },
916
919
  {
917
920
  35: 87,
918
921
  75: 81,
919
- 76: U,
920
- 77: W,
921
- 79: G,
922
- 80: K
922
+ 76: K,
923
+ 77: q,
924
+ 79: J,
925
+ 80: Y
923
926
  },
924
927
  {
925
928
  35: 88,
926
929
  75: 81,
927
- 76: U,
928
- 77: W,
929
- 79: G,
930
- 80: K
930
+ 76: K,
931
+ 77: q,
932
+ 79: J,
933
+ 80: Y
931
934
  },
932
935
  {
933
936
  35: 89,
934
937
  75: 81,
935
- 76: U,
936
- 77: W,
937
- 79: G,
938
- 80: K
938
+ 76: K,
939
+ 77: q,
940
+ 79: J,
941
+ 80: Y
939
942
  },
940
943
  {
941
944
  35: 90,
942
945
  75: 81,
943
- 76: U,
944
- 77: W,
945
- 79: G,
946
- 80: K
946
+ 76: K,
947
+ 77: q,
948
+ 79: J,
949
+ 80: Y
947
950
  },
948
951
  {
949
952
  35: 91,
950
953
  75: 81,
951
- 76: U,
952
- 77: W,
953
- 79: G,
954
- 80: K
954
+ 76: K,
955
+ 77: q,
956
+ 79: J,
957
+ 80: Y
955
958
  },
956
959
  {
957
960
  35: 92,
958
961
  75: 81,
959
- 76: U,
960
- 77: W,
961
- 79: G,
962
- 80: K
962
+ 76: K,
963
+ 77: q,
964
+ 79: J,
965
+ 80: Y
963
966
  },
964
967
  {
965
968
  35: 93,
966
969
  75: 81,
967
- 76: U,
968
- 77: W,
969
- 79: G,
970
- 80: K
970
+ 76: K,
971
+ 77: q,
972
+ 79: J,
973
+ 80: Y
971
974
  },
972
975
  {
973
976
  35: 94,
974
977
  75: 81,
975
- 76: U,
976
- 77: W,
977
- 79: G,
978
- 80: K
978
+ 76: K,
979
+ 77: q,
980
+ 79: J,
981
+ 80: Y
979
982
  },
980
983
  {
981
984
  35: 95,
982
985
  75: 81,
983
- 76: U,
984
- 77: W,
985
- 79: G,
986
- 80: K
986
+ 76: K,
987
+ 77: q,
988
+ 79: J,
989
+ 80: Y
987
990
  },
988
991
  {
989
992
  35: 96,
990
993
  75: 81,
991
- 76: U,
992
- 77: W,
993
- 79: G,
994
- 80: K
994
+ 76: K,
995
+ 77: q,
996
+ 79: J,
997
+ 80: Y
995
998
  },
996
999
  {
997
1000
  35: 97,
998
1001
  75: 81,
999
- 76: U,
1000
- 77: W,
1001
- 79: G,
1002
- 80: K
1002
+ 76: K,
1003
+ 77: q,
1004
+ 79: J,
1005
+ 80: Y
1003
1006
  },
1004
1007
  {
1005
1008
  35: 98,
1006
1009
  75: 81,
1007
- 76: U,
1008
- 77: W,
1009
- 79: G,
1010
- 80: K
1010
+ 76: K,
1011
+ 77: q,
1012
+ 79: J,
1013
+ 80: Y
1011
1014
  },
1012
1015
  {
1013
1016
  35: 99,
1014
1017
  75: 81,
1015
- 76: U,
1016
- 77: W,
1017
- 79: G,
1018
- 80: K
1018
+ 76: K,
1019
+ 77: q,
1020
+ 79: J,
1021
+ 80: Y
1019
1022
  },
1020
1023
  {
1021
1024
  35: 100,
1022
1025
  75: 81,
1023
- 76: U,
1024
- 77: W,
1025
- 79: G,
1026
- 80: K
1026
+ 76: K,
1027
+ 77: q,
1028
+ 79: J,
1029
+ 80: Y
1027
1030
  },
1028
1031
  {
1029
1032
  35: 101,
1030
1033
  75: 81,
1031
- 76: U,
1032
- 77: W,
1033
- 79: G,
1034
- 80: K
1034
+ 76: K,
1035
+ 77: q,
1036
+ 79: J,
1037
+ 80: Y
1035
1038
  },
1036
1039
  {
1037
1040
  35: 102,
1038
1041
  75: 81,
1039
- 76: U,
1040
- 77: W,
1041
- 79: G,
1042
- 80: K
1042
+ 76: K,
1043
+ 77: q,
1044
+ 79: J,
1045
+ 80: Y
1043
1046
  },
1044
1047
  {
1045
1048
  35: 103,
1046
1049
  75: 81,
1047
- 76: U,
1048
- 77: W,
1049
- 79: G,
1050
- 80: K
1050
+ 76: K,
1051
+ 77: q,
1052
+ 79: J,
1053
+ 80: Y
1051
1054
  },
1052
1055
  {
1053
1056
  35: 104,
1054
1057
  75: 81,
1055
- 76: U,
1056
- 77: W,
1057
- 79: G,
1058
- 80: K
1058
+ 76: K,
1059
+ 77: q,
1060
+ 79: J,
1061
+ 80: Y
1059
1062
  },
1060
- e(q, [2, 59]),
1063
+ e(X, [2, 59]),
1061
1064
  {
1062
1065
  35: 105,
1063
1066
  75: 81,
1064
- 76: U,
1065
- 77: W,
1066
- 79: G,
1067
- 80: K
1067
+ 76: K,
1068
+ 77: q,
1069
+ 79: J,
1070
+ 80: Y
1068
1071
  },
1069
1072
  {
1070
1073
  35: 106,
1071
1074
  75: 81,
1072
- 76: U,
1073
- 77: W,
1074
- 79: G,
1075
- 80: K
1075
+ 76: K,
1076
+ 77: q,
1077
+ 79: J,
1078
+ 80: Y
1076
1079
  },
1077
1080
  {
1078
1081
  35: 107,
1079
1082
  75: 81,
1080
- 76: U,
1081
- 77: W,
1082
- 79: G,
1083
- 80: K
1083
+ 76: K,
1084
+ 77: q,
1085
+ 79: J,
1086
+ 80: Y
1084
1087
  },
1085
1088
  {
1086
1089
  35: 108,
1087
1090
  75: 81,
1088
- 76: U,
1089
- 77: W,
1090
- 79: G,
1091
- 80: K
1091
+ 76: K,
1092
+ 77: q,
1093
+ 79: J,
1094
+ 80: Y
1092
1095
  },
1093
1096
  {
1094
1097
  35: 109,
1095
1098
  75: 81,
1096
- 76: U,
1097
- 77: W,
1098
- 79: G,
1099
- 80: K
1099
+ 76: K,
1100
+ 77: q,
1101
+ 79: J,
1102
+ 80: Y
1100
1103
  },
1101
1104
  {
1102
1105
  35: 110,
1103
1106
  75: 81,
1104
- 76: U,
1105
- 77: W,
1106
- 79: G,
1107
- 80: K
1107
+ 76: K,
1108
+ 77: q,
1109
+ 79: J,
1110
+ 80: Y
1108
1111
  },
1109
1112
  {
1110
1113
  35: 111,
1111
1114
  75: 81,
1112
- 76: U,
1113
- 77: W,
1114
- 79: G,
1115
- 80: K
1115
+ 76: K,
1116
+ 77: q,
1117
+ 79: J,
1118
+ 80: Y
1116
1119
  },
1117
1120
  {
1118
1121
  35: 112,
1119
1122
  75: 81,
1120
- 76: U,
1121
- 77: W,
1122
- 79: G,
1123
- 80: K
1123
+ 76: K,
1124
+ 77: q,
1125
+ 79: J,
1126
+ 80: Y
1124
1127
  },
1125
1128
  {
1126
1129
  35: 113,
1127
1130
  75: 81,
1128
- 76: U,
1129
- 77: W,
1130
- 79: G,
1131
- 80: K
1131
+ 76: K,
1132
+ 77: q,
1133
+ 79: J,
1134
+ 80: Y
1132
1135
  },
1133
1136
  {
1134
1137
  35: 114,
1135
1138
  75: 81,
1136
- 76: U,
1137
- 77: W,
1138
- 79: G,
1139
- 80: K
1139
+ 76: K,
1140
+ 77: q,
1141
+ 79: J,
1142
+ 80: Y
1140
1143
  },
1141
1144
  {
1142
1145
  35: 115,
1143
1146
  75: 81,
1144
- 76: U,
1145
- 77: W,
1146
- 79: G,
1147
- 80: K
1147
+ 76: K,
1148
+ 77: q,
1149
+ 79: J,
1150
+ 80: Y
1148
1151
  },
1149
1152
  {
1150
1153
  20: 116,
@@ -1183,13 +1186,13 @@ var y = g(), b = (function() {
1183
1186
  65: I,
1184
1187
  66: L,
1185
1188
  67: R,
1186
- 68: ee,
1187
- 69: te,
1188
- 70: ne,
1189
- 71: z,
1190
- 72: B,
1191
- 73: V,
1192
- 74: H
1189
+ 68: z,
1190
+ 69: B,
1191
+ 70: V,
1192
+ 71: H,
1193
+ 72: U,
1194
+ 73: W,
1195
+ 74: G
1193
1196
  },
1194
1197
  {
1195
1198
  12: [1, 118],
@@ -1198,66 +1201,66 @@ var y = g(), b = (function() {
1198
1201
  {
1199
1202
  35: 119,
1200
1203
  75: 81,
1201
- 76: U,
1202
- 77: W,
1203
- 79: G,
1204
- 80: K
1204
+ 76: K,
1205
+ 77: q,
1206
+ 79: J,
1207
+ 80: Y
1205
1208
  },
1206
1209
  {
1207
1210
  35: 120,
1208
1211
  75: 81,
1209
- 76: U,
1210
- 77: W,
1211
- 79: G,
1212
- 80: K
1212
+ 76: K,
1213
+ 77: q,
1214
+ 79: J,
1215
+ 80: Y
1213
1216
  },
1214
1217
  {
1215
1218
  35: 121,
1216
1219
  75: 81,
1217
- 76: U,
1218
- 77: W,
1219
- 79: G,
1220
- 80: K
1220
+ 76: K,
1221
+ 77: q,
1222
+ 79: J,
1223
+ 80: Y
1221
1224
  },
1222
1225
  {
1223
1226
  35: 122,
1224
1227
  75: 81,
1225
- 76: U,
1226
- 77: W,
1227
- 79: G,
1228
- 80: K
1228
+ 76: K,
1229
+ 77: q,
1230
+ 79: J,
1231
+ 80: Y
1229
1232
  },
1230
1233
  {
1231
1234
  35: 123,
1232
1235
  75: 81,
1233
- 76: U,
1234
- 77: W,
1235
- 79: G,
1236
- 80: K
1236
+ 76: K,
1237
+ 77: q,
1238
+ 79: J,
1239
+ 80: Y
1237
1240
  },
1238
1241
  {
1239
1242
  35: 124,
1240
1243
  75: 81,
1241
- 76: U,
1242
- 77: W,
1243
- 79: G,
1244
- 80: K
1244
+ 76: K,
1245
+ 77: q,
1246
+ 79: J,
1247
+ 80: Y
1245
1248
  },
1246
1249
  {
1247
1250
  35: 125,
1248
1251
  75: 81,
1249
- 76: U,
1250
- 77: W,
1251
- 79: G,
1252
- 80: K
1252
+ 76: K,
1253
+ 77: q,
1254
+ 79: J,
1255
+ 80: Y
1253
1256
  },
1254
1257
  { 14: [1, 126] },
1255
1258
  { 14: [1, 127] },
1256
1259
  { 14: [1, 128] },
1257
1260
  { 14: [1, 129] },
1258
1261
  { 1: [2, 8] },
1259
- e(re, [2, 15]),
1260
- e(ie, [2, 17], {
1262
+ e(ee, [2, 15]),
1263
+ e(te, [2, 17], {
1261
1264
  21: 22,
1262
1265
  19: 130,
1263
1266
  22: t,
@@ -1266,7 +1269,7 @@ var y = g(), b = (function() {
1266
1269
  26: i,
1267
1270
  28: o
1268
1271
  }),
1269
- e(re, [2, 37], {
1272
+ e(ee, [2, 37], {
1270
1273
  19: 20,
1271
1274
  20: 21,
1272
1275
  21: 22,
@@ -1311,85 +1314,85 @@ var y = g(), b = (function() {
1311
1314
  65: I,
1312
1315
  66: L,
1313
1316
  67: R,
1314
- 68: ee,
1315
- 69: te,
1316
- 70: ne,
1317
- 71: z,
1318
- 72: B,
1319
- 73: V,
1320
- 74: H
1317
+ 68: z,
1318
+ 69: B,
1319
+ 70: V,
1320
+ 71: H,
1321
+ 72: U,
1322
+ 73: W,
1323
+ 74: G
1321
1324
  }),
1322
- e(ae, [2, 21]),
1323
- e(ae, [2, 22]),
1324
- e(q, [2, 39]),
1325
- e(oe, [2, 71], {
1325
+ e(ne, [2, 21]),
1326
+ e(ne, [2, 22]),
1327
+ e(X, [2, 39]),
1328
+ e(re, [2, 71], {
1326
1329
  75: 81,
1327
1330
  35: 132,
1328
- 76: U,
1329
- 77: W,
1330
- 79: G,
1331
- 80: K
1331
+ 76: K,
1332
+ 77: q,
1333
+ 79: J,
1334
+ 80: Y
1332
1335
  }),
1333
- e(se, [2, 73]),
1336
+ e(ie, [2, 73]),
1334
1337
  { 78: [1, 133] },
1335
- e(se, [2, 75]),
1336
- e(se, [2, 76]),
1337
- e(q, [2, 40]),
1338
- e(q, [2, 41]),
1339
- e(q, [2, 42]),
1340
- e(q, [2, 43]),
1341
- e(q, [2, 44]),
1342
- e(q, [2, 45]),
1343
- e(q, [2, 46]),
1344
- e(q, [2, 47]),
1345
- e(q, [2, 48]),
1346
- e(q, [2, 49]),
1347
- e(q, [2, 50]),
1348
- e(q, [2, 51]),
1349
- e(q, [2, 52]),
1350
- e(q, [2, 53]),
1351
- e(q, [2, 54]),
1352
- e(q, [2, 55]),
1353
- e(q, [2, 56]),
1354
- e(q, [2, 57]),
1355
- e(q, [2, 58]),
1356
- e(q, [2, 60]),
1357
- e(q, [2, 61]),
1358
- e(q, [2, 62]),
1359
- e(q, [2, 63]),
1360
- e(q, [2, 64]),
1361
- e(q, [2, 65]),
1362
- e(q, [2, 66]),
1363
- e(q, [2, 67]),
1364
- e(q, [2, 68]),
1365
- e(q, [2, 69]),
1366
- e(q, [2, 70]),
1338
+ e(ie, [2, 75]),
1339
+ e(ie, [2, 76]),
1340
+ e(X, [2, 40]),
1341
+ e(X, [2, 41]),
1342
+ e(X, [2, 42]),
1343
+ e(X, [2, 43]),
1344
+ e(X, [2, 44]),
1345
+ e(X, [2, 45]),
1346
+ e(X, [2, 46]),
1347
+ e(X, [2, 47]),
1348
+ e(X, [2, 48]),
1349
+ e(X, [2, 49]),
1350
+ e(X, [2, 50]),
1351
+ e(X, [2, 51]),
1352
+ e(X, [2, 52]),
1353
+ e(X, [2, 53]),
1354
+ e(X, [2, 54]),
1355
+ e(X, [2, 55]),
1356
+ e(X, [2, 56]),
1357
+ e(X, [2, 57]),
1358
+ e(X, [2, 58]),
1359
+ e(X, [2, 60]),
1360
+ e(X, [2, 61]),
1361
+ e(X, [2, 62]),
1362
+ e(X, [2, 63]),
1363
+ e(X, [2, 64]),
1364
+ e(X, [2, 65]),
1365
+ e(X, [2, 66]),
1366
+ e(X, [2, 67]),
1367
+ e(X, [2, 68]),
1368
+ e(X, [2, 69]),
1369
+ e(X, [2, 70]),
1367
1370
  {
1368
1371
  31: 134,
1369
1372
  42: [1, 135]
1370
1373
  },
1371
1374
  { 12: [1, 136] },
1372
1375
  { 33: [1, 137] },
1373
- e(ce, [2, 28]),
1374
- e(ce, [2, 29]),
1375
- e(ce, [2, 30]),
1376
- e(ce, [2, 31]),
1377
- e(ce, [2, 32]),
1378
- e(ce, [2, 33]),
1379
- e(ce, [2, 34]),
1376
+ e(ae, [2, 28]),
1377
+ e(ae, [2, 29]),
1378
+ e(ae, [2, 30]),
1379
+ e(ae, [2, 31]),
1380
+ e(ae, [2, 32]),
1381
+ e(ae, [2, 33]),
1382
+ e(ae, [2, 34]),
1380
1383
  { 1: [2, 9] },
1381
1384
  { 1: [2, 10] },
1382
1385
  { 1: [2, 11] },
1383
1386
  { 1: [2, 12] },
1384
- e(ie, [2, 18]),
1385
- e(re, [2, 38]),
1386
- e(oe, [2, 72]),
1387
- e(se, [2, 74]),
1388
- e(q, [2, 24]),
1389
- e(q, [2, 35]),
1390
- e(le, [2, 25]),
1391
- e(le, [2, 26], { 12: [1, 138] }),
1392
- e(le, [2, 27])
1387
+ e(te, [2, 18]),
1388
+ e(ee, [2, 38]),
1389
+ e(re, [2, 72]),
1390
+ e(ie, [2, 74]),
1391
+ e(X, [2, 24]),
1392
+ e(X, [2, 35]),
1393
+ e(oe, [2, 25]),
1394
+ e(oe, [2, 26], { 12: [1, 138] }),
1395
+ e(oe, [2, 27])
1393
1396
  ],
1394
1397
  defaultActions: {
1395
1398
  2: [2, 1],
@@ -1469,7 +1472,7 @@ var y = g(), b = (function() {
1469
1472
  return !0;
1470
1473
  }, "parse")
1471
1474
  };
1472
- J.lexer = /* @__PURE__ */ (function() {
1475
+ se.lexer = /* @__PURE__ */ (function() {
1473
1476
  return {
1474
1477
  EOF: 1,
1475
1478
  parseError: /* @__PURE__ */ a(function(e, t) {
@@ -2268,27 +2271,34 @@ var y = g(), b = (function() {
2268
2271
  }
2269
2272
  };
2270
2273
  })();
2271
- function ue() {
2274
+ function Z() {
2272
2275
  this.yy = {};
2273
2276
  }
2274
- return a(ue, "Parser"), ue.prototype = J, J.Parser = ue, new ue();
2277
+ return a(Z, "Parser"), Z.prototype = se, se.Parser = Z, new Z();
2275
2278
  })();
2276
- b.parser = b;
2277
- var x = b, S = [], C = [""], w = "global", T = "", E = [{
2279
+ v.parser = v;
2280
+ var y = v, b = /* @__PURE__ */ a((e) => p()[e], "getRequiredConfig"), x = /* @__PURE__ */ a((e, t) => {
2281
+ for (let [n, r] of Object.entries(t)) if (r !== void 0) {
2282
+ if (typeof r == "object") {
2283
+ let [t, n] = Object.entries(r)[0];
2284
+ e[t] = n;
2285
+ } else e[n] = r;
2286
+ }
2287
+ }, "assignAttributes"), S = /* @__PURE__ */ a(() => ({
2278
2288
  alias: "global",
2279
2289
  label: { text: "global" },
2280
2290
  type: { text: "global" },
2281
2291
  tags: null,
2282
2292
  link: null,
2283
2293
  parentBoundary: ""
2284
- }], D = [], O = "", k = !1, A = 4, j = 2, M, N = /* @__PURE__ */ a(function() {
2285
- return M;
2286
- }, "getC4Type"), P = /* @__PURE__ */ a(function(e) {
2287
- M = h(e, p());
2288
- }, "setC4Type"), F = /* @__PURE__ */ a(function(e, t, n, r, i, a, o, s, l) {
2294
+ }), "createGlobalBoundary"), C = [], w = [""], T = "global", E = "", D = [S()], O = [], k = "", A = !1, j = 4, M = 2, N, P = /* @__PURE__ */ a(function() {
2295
+ return N;
2296
+ }, "getC4Type"), F = /* @__PURE__ */ a(function(e) {
2297
+ N = h(e, p());
2298
+ }, "setC4Type"), I = /* @__PURE__ */ a(function(e, t, n, r, i, a, o, s, l) {
2289
2299
  if (e == null || t == null || n == null || r == null) return;
2290
- let u = {}, d = D.find((e) => e.from === t && e.to === n);
2291
- if (d ? u = d : D.push(u), u.type = e, u.from = t, u.to = n, u.label = { text: r }, i == null) u.techn = { text: "" };
2300
+ let u = {}, d = O.find((e) => e.from === t && e.to === n);
2301
+ if (d ? u = d : O.push(u), u.type = e, u.from = t, u.to = n, u.label = { text: r }, i == null) u.techn = { text: "" };
2292
2302
  else if (typeof i == "object") {
2293
2303
  let [e, t] = Object.entries(i)[0];
2294
2304
  u[e] = { text: t };
@@ -2298,44 +2308,28 @@ var x = b, S = [], C = [""], w = "global", T = "", E = [{
2298
2308
  let [e, t] = Object.entries(a)[0];
2299
2309
  u[e] = { text: t };
2300
2310
  } else u.descr = { text: a };
2301
- if (typeof o == "object") {
2302
- let [e, t] = Object.entries(o)[0];
2303
- u[e] = t;
2304
- } else u.sprite = o;
2305
- if (typeof s == "object") {
2306
- let [e, t] = Object.entries(s)[0];
2307
- u[e] = t;
2308
- } else u.tags = s;
2309
- if (typeof l == "object") {
2310
- let [e, t] = Object.entries(l)[0];
2311
- u[e] = t;
2312
- } else u.link = l;
2313
- u.wrap = J();
2314
- }, "addRel"), I = /* @__PURE__ */ a(function(e, t, n, r, i, a, o) {
2311
+ x(u, {
2312
+ sprite: o,
2313
+ tags: s,
2314
+ link: l
2315
+ }), u.wrap = Z();
2316
+ }, "addRel"), L = /* @__PURE__ */ a(function(e, t, n, r, i, a, o) {
2315
2317
  if (t === null || n === null) return;
2316
- let s = {}, l = S.find((e) => e.alias === t);
2317
- if (l && t === l.alias ? s = l : (s.alias = t, S.push(s)), n == null ? s.label = { text: "" } : s.label = { text: n }, r == null) s.descr = { text: "" };
2318
+ let s = {}, l = C.find((e) => e.alias === t);
2319
+ if (l && t === l.alias ? s = l : (s.alias = t, C.push(s)), n == null ? s.label = { text: "" } : s.label = { text: n }, r == null) s.descr = { text: "" };
2318
2320
  else if (typeof r == "object") {
2319
2321
  let [e, t] = Object.entries(r)[0];
2320
2322
  s[e] = { text: t };
2321
2323
  } else s.descr = { text: r };
2322
- if (typeof i == "object") {
2323
- let [e, t] = Object.entries(i)[0];
2324
- s[e] = t;
2325
- } else s.sprite = i;
2326
- if (typeof a == "object") {
2327
- let [e, t] = Object.entries(a)[0];
2328
- s[e] = t;
2329
- } else s.tags = a;
2330
- if (typeof o == "object") {
2331
- let [e, t] = Object.entries(o)[0];
2332
- s[e] = t;
2333
- } else s.link = o;
2334
- s.typeC4Shape = { text: e }, s.parentBoundary = w, s.wrap = J();
2335
- }, "addPersonOrSystem"), L = /* @__PURE__ */ a(function(e, t, n, r, i, a, o, s) {
2324
+ x(s, {
2325
+ sprite: i,
2326
+ tags: a,
2327
+ link: o
2328
+ }), s.typeC4Shape = { text: e }, s.parentBoundary = T, s.wrap = Z();
2329
+ }, "addPersonOrSystem"), R = /* @__PURE__ */ a(function(e, t, n, r, i, a, o, s) {
2336
2330
  if (t === null || n === null) return;
2337
- let l = {}, u = S.find((e) => e.alias === t);
2338
- if (u && t === u.alias ? l = u : (l.alias = t, S.push(l)), n == null ? l.label = { text: "" } : l.label = { text: n }, r == null) l.techn = { text: "" };
2331
+ let l = {}, u = C.find((e) => e.alias === t);
2332
+ if (u && t === u.alias ? l = u : (l.alias = t, C.push(l)), n == null ? l.label = { text: "" } : l.label = { text: n }, r == null) l.techn = { text: "" };
2339
2333
  else if (typeof r == "object") {
2340
2334
  let [e, t] = Object.entries(r)[0];
2341
2335
  l[e] = { text: t };
@@ -2345,23 +2339,15 @@ var x = b, S = [], C = [""], w = "global", T = "", E = [{
2345
2339
  let [e, t] = Object.entries(i)[0];
2346
2340
  l[e] = { text: t };
2347
2341
  } else l.descr = { text: i };
2348
- if (typeof a == "object") {
2349
- let [e, t] = Object.entries(a)[0];
2350
- l[e] = t;
2351
- } else l.sprite = a;
2352
- if (typeof o == "object") {
2353
- let [e, t] = Object.entries(o)[0];
2354
- l[e] = t;
2355
- } else l.tags = o;
2356
- if (typeof s == "object") {
2357
- let [e, t] = Object.entries(s)[0];
2358
- l[e] = t;
2359
- } else l.link = s;
2360
- l.wrap = J(), l.typeC4Shape = { text: e }, l.parentBoundary = w;
2361
- }, "addContainer"), R = /* @__PURE__ */ a(function(e, t, n, r, i, a, o, s) {
2342
+ x(l, {
2343
+ sprite: a,
2344
+ tags: o,
2345
+ link: s
2346
+ }), l.wrap = Z(), l.typeC4Shape = { text: e }, l.parentBoundary = T;
2347
+ }, "addContainer"), z = /* @__PURE__ */ a(function(e, t, n, r, i, a, o, s) {
2362
2348
  if (t === null || n === null) return;
2363
- let l = {}, u = S.find((e) => e.alias === t);
2364
- if (u && t === u.alias ? l = u : (l.alias = t, S.push(l)), n == null ? l.label = { text: "" } : l.label = { text: n }, r == null) l.techn = { text: "" };
2349
+ let l = {}, u = C.find((e) => e.alias === t);
2350
+ if (u && t === u.alias ? l = u : (l.alias = t, C.push(l)), n == null ? l.label = { text: "" } : l.label = { text: n }, r == null) l.techn = { text: "" };
2365
2351
  else if (typeof r == "object") {
2366
2352
  let [e, t] = Object.entries(r)[0];
2367
2353
  l[e] = { text: t };
@@ -2371,57 +2357,39 @@ var x = b, S = [], C = [""], w = "global", T = "", E = [{
2371
2357
  let [e, t] = Object.entries(i)[0];
2372
2358
  l[e] = { text: t };
2373
2359
  } else l.descr = { text: i };
2374
- if (typeof a == "object") {
2375
- let [e, t] = Object.entries(a)[0];
2376
- l[e] = t;
2377
- } else l.sprite = a;
2378
- if (typeof o == "object") {
2379
- let [e, t] = Object.entries(o)[0];
2380
- l[e] = t;
2381
- } else l.tags = o;
2382
- if (typeof s == "object") {
2383
- let [e, t] = Object.entries(s)[0];
2384
- l[e] = t;
2385
- } else l.link = s;
2386
- l.wrap = J(), l.typeC4Shape = { text: e }, l.parentBoundary = w;
2387
- }, "addComponent"), ee = /* @__PURE__ */ a(function(e, t, n, r, i) {
2360
+ x(l, {
2361
+ sprite: a,
2362
+ tags: o,
2363
+ link: s
2364
+ }), l.wrap = Z(), l.typeC4Shape = { text: e }, l.parentBoundary = T;
2365
+ }, "addComponent"), B = /* @__PURE__ */ a(function(e, t, n, r, i) {
2388
2366
  if (e === null || t === null) return;
2389
- let a = {}, o = E.find((t) => t.alias === e);
2390
- if (o && e === o.alias ? a = o : (a.alias = e, E.push(a)), t == null ? a.label = { text: "" } : a.label = { text: t }, n == null) a.type = { text: "system" };
2367
+ let a = {}, o = D.find((t) => t.alias === e);
2368
+ if (o && e === o.alias ? a = o : (a.alias = e, D.push(a)), t == null ? a.label = { text: "" } : a.label = { text: t }, n == null) a.type = { text: "system" };
2391
2369
  else if (typeof n == "object") {
2392
2370
  let [e, t] = Object.entries(n)[0];
2393
2371
  a[e] = { text: t };
2394
2372
  } else a.type = { text: n };
2395
- if (typeof r == "object") {
2396
- let [e, t] = Object.entries(r)[0];
2397
- a[e] = t;
2398
- } else a.tags = r;
2399
- if (typeof i == "object") {
2400
- let [e, t] = Object.entries(i)[0];
2401
- a[e] = t;
2402
- } else a.link = i;
2403
- a.parentBoundary = w, a.wrap = J(), T = w, w = e, C.push(T);
2404
- }, "addPersonOrSystemBoundary"), te = /* @__PURE__ */ a(function(e, t, n, r, i) {
2373
+ x(a, {
2374
+ tags: r,
2375
+ link: i
2376
+ }), a.parentBoundary = T, a.wrap = Z(), E = T, T = e, w.push(E);
2377
+ }, "addPersonOrSystemBoundary"), V = /* @__PURE__ */ a(function(e, t, n, r, i) {
2405
2378
  if (e === null || t === null) return;
2406
- let a = {}, o = E.find((t) => t.alias === e);
2407
- if (o && e === o.alias ? a = o : (a.alias = e, E.push(a)), t == null ? a.label = { text: "" } : a.label = { text: t }, n == null) a.type = { text: "container" };
2379
+ let a = {}, o = D.find((t) => t.alias === e);
2380
+ if (o && e === o.alias ? a = o : (a.alias = e, D.push(a)), t == null ? a.label = { text: "" } : a.label = { text: t }, n == null) a.type = { text: "container" };
2408
2381
  else if (typeof n == "object") {
2409
2382
  let [e, t] = Object.entries(n)[0];
2410
2383
  a[e] = { text: t };
2411
2384
  } else a.type = { text: n };
2412
- if (typeof r == "object") {
2413
- let [e, t] = Object.entries(r)[0];
2414
- a[e] = t;
2415
- } else a.tags = r;
2416
- if (typeof i == "object") {
2417
- let [e, t] = Object.entries(i)[0];
2418
- a[e] = t;
2419
- } else a.link = i;
2420
- a.parentBoundary = w, a.wrap = J(), T = w, w = e, C.push(T);
2421
- }, "addContainerBoundary"), ne = /* @__PURE__ */ a(function(e, t, n, r, i, a, o, s) {
2385
+ x(a, {
2386
+ tags: r,
2387
+ link: i
2388
+ }), a.parentBoundary = T, a.wrap = Z(), E = T, T = e, w.push(E);
2389
+ }, "addContainerBoundary"), H = /* @__PURE__ */ a(function(e, t, n, r, i, a, o, s) {
2422
2390
  if (t === null || n === null) return;
2423
- let l = {}, u = E.find((e) => e.alias === t);
2424
- if (u && t === u.alias ? l = u : (l.alias = t, E.push(l)), n == null ? l.label = { text: "" } : l.label = { text: n }, r == null) l.type = { text: "node" };
2391
+ let l = {}, u = D.find((e) => e.alias === t);
2392
+ if (u && t === u.alias ? l = u : (l.alias = t, D.push(l)), n == null ? l.label = { text: "" } : l.label = { text: n }, r == null) l.type = { text: "node" };
2425
2393
  else if (typeof r == "object") {
2426
2394
  let [e, t] = Object.entries(r)[0];
2427
2395
  l[e] = { text: t };
@@ -2431,20 +2399,15 @@ var x = b, S = [], C = [""], w = "global", T = "", E = [{
2431
2399
  let [e, t] = Object.entries(i)[0];
2432
2400
  l[e] = { text: t };
2433
2401
  } else l.descr = { text: i };
2434
- if (typeof o == "object") {
2435
- let [e, t] = Object.entries(o)[0];
2436
- l[e] = t;
2437
- } else l.tags = o;
2438
- if (typeof s == "object") {
2439
- let [e, t] = Object.entries(s)[0];
2440
- l[e] = t;
2441
- } else l.link = s;
2442
- l.nodeType = e, l.parentBoundary = w, l.wrap = J(), T = w, w = t, C.push(T);
2443
- }, "addDeploymentNode"), z = /* @__PURE__ */ a(function() {
2444
- w = T, C.pop(), T = C.pop(), C.push(T);
2445
- }, "popBoundaryParseStack"), B = /* @__PURE__ */ a(function(e, t, n, r, i, a, o, s, l, u, d) {
2446
- let f = S.find((e) => e.alias === t);
2447
- if (!(f === void 0 && (f = E.find((e) => e.alias === t), f === void 0))) {
2402
+ x(l, {
2403
+ tags: o,
2404
+ link: s
2405
+ }), l.nodeType = e, l.parentBoundary = T, l.wrap = Z(), E = T, T = t, w.push(E);
2406
+ }, "addDeploymentNode"), U = /* @__PURE__ */ a(function() {
2407
+ T = E, w.pop(), E = w.pop(), w.push(E);
2408
+ }, "popBoundaryParseStack"), W = /* @__PURE__ */ a(function(e, t, n, r, i, a, o, s, l, u, d) {
2409
+ let f = C.find((e) => e.alias === t);
2410
+ if (!(f === void 0 && (f = D.find((e) => e.alias === t), f === void 0))) {
2448
2411
  if (n != null) {
2449
2412
  if (typeof n == "object") {
2450
2413
  let [e, t] = Object.entries(n)[0];
@@ -2500,8 +2463,8 @@ var x = b, S = [], C = [""], w = "global", T = "", E = [{
2500
2463
  } else f.legendSprite = d;
2501
2464
  }
2502
2465
  }
2503
- }, "updateElStyle"), V = /* @__PURE__ */ a(function(e, t, n, r, i, a, o) {
2504
- let s = D.find((e) => e.from === t && e.to === n);
2466
+ }, "updateElStyle"), G = /* @__PURE__ */ a(function(e, t, n, r, i, a, o) {
2467
+ let s = O.find((e) => e.from === t && e.to === n);
2505
2468
  if (s !== void 0) {
2506
2469
  if (r != null) {
2507
2470
  if (typeof r == "object") {
@@ -2528,8 +2491,8 @@ var x = b, S = [], C = [""], w = "global", T = "", E = [{
2528
2491
  } else s.offsetY = parseInt(o);
2529
2492
  }
2530
2493
  }
2531
- }, "updateRelStyle"), H = /* @__PURE__ */ a(function(e, t, n) {
2532
- let r = A, i = j;
2494
+ }, "updateRelStyle"), ee = /* @__PURE__ */ a(function(e, t, n) {
2495
+ let r = j, i = M;
2533
2496
  if (typeof t == "object") {
2534
2497
  let e = Object.values(t)[0];
2535
2498
  r = parseInt(e);
@@ -2538,71 +2501,64 @@ var x = b, S = [], C = [""], w = "global", T = "", E = [{
2538
2501
  let e = Object.values(n)[0];
2539
2502
  i = parseInt(e);
2540
2503
  } else i = parseInt(n);
2541
- r >= 1 && (A = r), i >= 1 && (j = i);
2542
- }, "updateLayoutConfig"), re = /* @__PURE__ */ a(function() {
2543
- return A;
2544
- }, "getC4ShapeInRow"), ie = /* @__PURE__ */ a(function() {
2504
+ r >= 1 && (j = r), i >= 1 && (M = i);
2505
+ }, "updateLayoutConfig"), te = /* @__PURE__ */ a(function() {
2545
2506
  return j;
2546
- }, "getC4BoundaryInRow"), ae = /* @__PURE__ */ a(function() {
2547
- return w;
2548
- }, "getCurrentBoundaryParse"), U = /* @__PURE__ */ a(function() {
2507
+ }, "getC4ShapeInRow"), ne = /* @__PURE__ */ a(function() {
2508
+ return M;
2509
+ }, "getC4BoundaryInRow"), K = /* @__PURE__ */ a(function() {
2549
2510
  return T;
2550
- }, "getParentBoundaryParse"), W = /* @__PURE__ */ a(function(e) {
2551
- return e == null ? S : S.filter((t) => t.parentBoundary === e);
2552
- }, "getC4ShapeArray"), G = /* @__PURE__ */ a(function(e) {
2553
- return S.find((t) => t.alias === e);
2554
- }, "getC4Shape"), K = /* @__PURE__ */ a(function(e) {
2555
- return Object.keys(W(e));
2556
- }, "getC4ShapeKeys"), q = /* @__PURE__ */ a(function(e) {
2557
- return e == null ? E : E.filter((t) => t.parentBoundary === e);
2558
- }, "getBoundaries"), oe = q, se = /* @__PURE__ */ a(function() {
2559
- return D;
2560
- }, "getRels"), ce = /* @__PURE__ */ a(function() {
2511
+ }, "getCurrentBoundaryParse"), q = /* @__PURE__ */ a(function() {
2512
+ return E;
2513
+ }, "getParentBoundaryParse"), J = /* @__PURE__ */ a(function(e) {
2514
+ return e == null ? C : C.filter((t) => t.parentBoundary === e);
2515
+ }, "getC4ShapeArray"), Y = /* @__PURE__ */ a(function(e) {
2516
+ return C.find((t) => t.alias === e);
2517
+ }, "getC4Shape"), X = /* @__PURE__ */ a(function(e) {
2518
+ return Object.keys(J(e));
2519
+ }, "getC4ShapeKeys"), re = /* @__PURE__ */ a(function(e) {
2520
+ return e == null ? D : D.filter((t) => t.parentBoundary === e);
2521
+ }, "getBoundaries"), ie = re, ae = /* @__PURE__ */ a(function() {
2561
2522
  return O;
2562
- }, "getTitle"), le = /* @__PURE__ */ a(function(e) {
2563
- k = e;
2564
- }, "setWrap"), J = /* @__PURE__ */ a(function() {
2523
+ }, "getRels"), oe = /* @__PURE__ */ a(function() {
2565
2524
  return k;
2566
- }, "autoWrap"), ue = {
2567
- addPersonOrSystem: I,
2568
- addPersonOrSystemBoundary: ee,
2569
- addContainer: L,
2570
- addContainerBoundary: te,
2571
- addComponent: R,
2572
- addDeploymentNode: ne,
2573
- popBoundaryParseStack: z,
2574
- addRel: F,
2575
- updateElStyle: B,
2576
- updateRelStyle: V,
2577
- updateLayoutConfig: H,
2578
- autoWrap: J,
2579
- setWrap: le,
2580
- getC4ShapeArray: W,
2581
- getC4Shape: G,
2582
- getC4ShapeKeys: K,
2583
- getBoundaries: q,
2584
- getBoundarys: oe,
2585
- getCurrentBoundaryParse: ae,
2586
- getParentBoundaryParse: U,
2587
- getRels: se,
2588
- getTitle: ce,
2589
- getC4Type: N,
2590
- getC4ShapeInRow: re,
2591
- getC4BoundaryInRow: ie,
2525
+ }, "getTitle"), se = /* @__PURE__ */ a(function(e) {
2526
+ A = e;
2527
+ }, "setWrap"), Z = /* @__PURE__ */ a(function() {
2528
+ return A;
2529
+ }, "autoWrap"), ce = {
2530
+ addPersonOrSystem: L,
2531
+ addPersonOrSystemBoundary: B,
2532
+ addContainer: R,
2533
+ addContainerBoundary: V,
2534
+ addComponent: z,
2535
+ addDeploymentNode: H,
2536
+ popBoundaryParseStack: U,
2537
+ addRel: I,
2538
+ updateElStyle: W,
2539
+ updateRelStyle: G,
2540
+ updateLayoutConfig: ee,
2541
+ autoWrap: Z,
2542
+ setWrap: se,
2543
+ getC4ShapeArray: J,
2544
+ getC4Shape: Y,
2545
+ getC4ShapeKeys: X,
2546
+ getBoundaries: re,
2547
+ getBoundarys: ie,
2548
+ getCurrentBoundaryParse: K,
2549
+ getParentBoundaryParse: q,
2550
+ getRels: ae,
2551
+ getTitle: oe,
2552
+ getC4Type: P,
2553
+ getC4ShapeInRow: te,
2554
+ getC4BoundaryInRow: ne,
2592
2555
  setAccTitle: s,
2593
2556
  getAccTitle: m,
2594
2557
  getAccDescription: f,
2595
2558
  setAccDescription: o,
2596
- getConfig: /* @__PURE__ */ a(() => p().c4, "getConfig"),
2559
+ getConfig: /* @__PURE__ */ a(() => b("c4"), "getConfig"),
2597
2560
  clear: /* @__PURE__ */ a(function() {
2598
- S = [], E = [{
2599
- alias: "global",
2600
- label: { text: "global" },
2601
- type: { text: "global" },
2602
- tags: null,
2603
- link: null,
2604
- parentBoundary: ""
2605
- }], T = "", w = "global", C = [""], D = [], C = [""], O = "", k = !1, A = 4, j = 2;
2561
+ C = [], D = [S()], E = "", T = "global", w = [""], O = [], w = [""], k = "", A = !1, j = 4, M = 2;
2606
2562
  }, "clear"),
2607
2563
  LINETYPE: {
2608
2564
  SOLID: 0,
@@ -2639,20 +2595,15 @@ var x = b, S = [], C = [""], w = "global", T = "", E = [{
2639
2595
  OVER: 2
2640
2596
  },
2641
2597
  setTitle: /* @__PURE__ */ a(function(e) {
2642
- O = h(e, p());
2598
+ k = h(e, p());
2643
2599
  }, "setTitle"),
2644
- setC4Type: P
2645
- }, de = /* @__PURE__ */ a(function(e, t) {
2600
+ setC4Type: F
2601
+ }, le = /* @__PURE__ */ a(function(e, t) {
2646
2602
  return _(e, t);
2647
- }, "drawRect"), fe = /* @__PURE__ */ a(function(e, t, n, r, i, a) {
2648
- let o = e.append("image");
2649
- o.attr("width", t), o.attr("height", n), o.attr("x", r), o.attr("y", i);
2650
- let s = a.startsWith("data:image/png;base64") ? a : (0, y.sanitizeUrl)(a);
2651
- o.attr("xlink:href", s);
2652
- }, "drawImage"), pe = /* @__PURE__ */ a((e, t, n, r) => {
2603
+ }, "drawRect"), ue = /* @__PURE__ */ a((e, t, n, r) => {
2653
2604
  let i = e.append("g"), a = 0;
2654
2605
  for (let e of t) {
2655
- let t = e.textColor ? e.textColor : "#444444", o = e.lineColor ? e.lineColor : "#444444", s = e.offsetX ? parseInt(e.offsetX) : 0, l = e.offsetY ? parseInt(e.offsetY) : 0;
2606
+ let t = e.textColor ? e.textColor : "#444444", o = e.lineColor ? e.lineColor : "#444444", s = e.offsetX ? parseInt(String(e.offsetX)) : 0, l = e.offsetY ? parseInt(String(e.offsetY)) : 0;
2656
2607
  if (a === 0) {
2657
2608
  let t = i.append("line");
2658
2609
  t.attr("x1", e.startPoint.x), t.attr("y1", e.startPoint.y), t.attr("x2", e.endPoint.x), t.attr("y2", e.endPoint.y), t.attr("stroke-width", "1"), t.attr("stroke", o), t.style("fill", "none"), e.type !== "rel_b" && t.attr("marker-end", "url(#" + r + "-arrowhead)"), (e.type === "birel" || e.type === "rel_b") && t.attr("marker-start", "url(#" + r + "-arrowend)"), a = -1;
@@ -2660,18 +2611,18 @@ var x = b, S = [], C = [""], w = "global", T = "", E = [{
2660
2611
  let t = i.append("path");
2661
2612
  t.attr("fill", "none").attr("stroke-width", "1").attr("stroke", o).attr("d", "Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", e.startPoint.x).replaceAll("starty", e.startPoint.y).replaceAll("controlx", e.startPoint.x + (e.endPoint.x - e.startPoint.x) / 2 - (e.endPoint.x - e.startPoint.x) / 4).replaceAll("controly", e.startPoint.y + (e.endPoint.y - e.startPoint.y) / 2).replaceAll("stopx", e.endPoint.x).replaceAll("stopy", e.endPoint.y)), e.type !== "rel_b" && t.attr("marker-end", "url(#" + r + "-arrowhead)"), (e.type === "birel" || e.type === "rel_b") && t.attr("marker-start", "url(#" + r + "-arrowend)");
2662
2613
  }
2663
- let u = n.messageFont();
2664
- Y(n)(e.label.text, i, Math.min(e.startPoint.x, e.endPoint.x) + Math.abs(e.endPoint.x - e.startPoint.x) / 2 + s, Math.min(e.startPoint.y, e.endPoint.y) + Math.abs(e.endPoint.y - e.startPoint.y) / 2 + l, e.label.width, e.label.height, { fill: t }, u), e.techn && e.techn.text !== "" && (u = n.messageFont(), Y(n)("[" + e.techn.text + "]", i, Math.min(e.startPoint.x, e.endPoint.x) + Math.abs(e.endPoint.x - e.startPoint.x) / 2 + s, Math.min(e.startPoint.y, e.endPoint.y) + Math.abs(e.endPoint.y - e.startPoint.y) / 2 + n.messageFontSize + 5 + l, Math.max(e.label.width, e.techn.width), e.techn.height, {
2614
+ let u = e.label.width, d = n.messageFont();
2615
+ ye(n)(e.label.text, i, Math.min(e.startPoint.x, e.endPoint.x) + Math.abs(e.endPoint.x - e.startPoint.x) / 2 + s, Math.min(e.startPoint.y, e.endPoint.y) + Math.abs(e.endPoint.y - e.startPoint.y) / 2 + l, u, e.label.height, { fill: t }, d), e.techn && e.techn.text !== "" && (d = n.messageFont(), ye(n)("[" + e.techn.text + "]", i, Math.min(e.startPoint.x, e.endPoint.x) + Math.abs(e.endPoint.x - e.startPoint.x) / 2 + s, Math.min(e.startPoint.y, e.endPoint.y) + Math.abs(e.endPoint.y - e.startPoint.y) / 2 + n.messageFontSize + 5 + l, Math.max(u, e.techn.width), e.techn.height, {
2665
2616
  fill: t,
2666
2617
  "font-style": "italic"
2667
- }, u));
2618
+ }, d));
2668
2619
  }
2669
- }, "drawRels"), me = /* @__PURE__ */ a(function(e, t, n) {
2620
+ }, "drawRels"), de = /* @__PURE__ */ a(function(e, t, n) {
2670
2621
  let r = e.append("g"), i = t.bgColor ? t.bgColor : "none", a = t.borderColor ? t.borderColor : "#444444", o = t.fontColor ? t.fontColor : "black", s = {
2671
2622
  "stroke-width": 1,
2672
2623
  "stroke-dasharray": "7.0,7.0"
2673
2624
  };
2674
- t.nodeType && (s = { "stroke-width": 1 }), de(r, {
2625
+ t.nodeType && (s = { "stroke-width": 1 }), le(r, {
2675
2626
  x: t.x,
2676
2627
  y: t.y,
2677
2628
  fill: i,
@@ -2683,77 +2634,23 @@ var x = b, S = [], C = [""], w = "global", T = "", E = [{
2683
2634
  attrs: s
2684
2635
  });
2685
2636
  let l = n.boundaryFont();
2686
- l.fontWeight = "bold", l.fontSize += 2, l.fontColor = o, Y(n)(t.label.text, r, t.x, t.y + t.label.Y, t.width, t.height, { fill: "#444444" }, l), t.type && t.type.text !== "" && (l = n.boundaryFont(), l.fontColor = o, Y(n)(t.type.text, r, t.x, t.y + t.type.Y, t.width, t.height, { fill: "#444444" }, l)), t.descr && t.descr.text !== "" && (l = n.boundaryFont(), l.fontSize -= 2, l.fontColor = o, Y(n)(t.descr.text, r, t.x, t.y + t.descr.Y, t.width, t.height, { fill: "#444444" }, l));
2687
- }, "drawBoundary"), he = /* @__PURE__ */ a(function(e, t, n) {
2688
- let r = t.bgColor ? t.bgColor : n[t.typeC4Shape.text + "_bg_color"], i = t.borderColor ? t.borderColor : n[t.typeC4Shape.text + "_border_color"], a = t.fontColor ? t.fontColor : "#FFFFFF", o = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
2689
- switch (t.typeC4Shape.text) {
2690
- case "person":
2691
- o = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
2692
- break;
2693
- case "external_person": o = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";
2694
- }
2695
- let s = e.append("g");
2696
- s.attr("class", "person-man");
2697
- let l = v();
2698
- switch (t.typeC4Shape.text) {
2699
- case "person":
2700
- case "external_person":
2701
- case "system":
2702
- case "external_system":
2703
- case "container":
2704
- case "external_container":
2705
- case "component":
2706
- case "external_component":
2707
- l.x = t.x, l.y = t.y, l.fill = r, l.width = t.width, l.height = t.height, l.stroke = i, l.rx = 2.5, l.ry = 2.5, l.attrs = { "stroke-width": .5 }, de(s, l);
2708
- break;
2709
- case "system_db":
2710
- case "external_system_db":
2711
- case "container_db":
2712
- case "external_container_db":
2713
- case "component_db":
2714
- case "external_component_db":
2715
- s.append("path").attr("fill", r).attr("stroke-width", "0.5").attr("stroke", i).attr("d", "Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx", t.x).replaceAll("starty", t.y).replaceAll("half", t.width / 2).replaceAll("height", t.height)), s.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", i).attr("d", "Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx", t.x).replaceAll("starty", t.y).replaceAll("half", t.width / 2));
2716
- break;
2717
- case "system_queue":
2718
- case "external_system_queue":
2719
- case "container_queue":
2720
- case "external_container_queue":
2721
- case "component_queue":
2722
- case "external_component_queue": s.append("path").attr("fill", r).attr("stroke-width", "0.5").attr("stroke", i).attr("d", "Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx", t.x).replaceAll("starty", t.y).replaceAll("width", t.width).replaceAll("half", t.height / 2)), s.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", i).attr("d", "Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx", t.x + t.width).replaceAll("starty", t.y).replaceAll("half", t.height / 2));
2723
- }
2724
- let u = Ce(n, t.typeC4Shape.text);
2725
- switch (s.append("text").attr("fill", a).attr("font-family", u.fontFamily).attr("font-size", u.fontSize - 2).attr("font-style", "italic").attr("lengthAdjust", "spacing").attr("textLength", t.typeC4Shape.width).attr("x", t.x + t.width / 2 - t.typeC4Shape.width / 2).attr("y", t.y + t.typeC4Shape.Y).text("<<" + t.typeC4Shape.text + ">>"), t.typeC4Shape.text) {
2726
- case "person":
2727
- case "external_person": fe(s, 48, 48, t.x + t.width / 2 - 24, t.y + t.image.Y, o);
2728
- }
2729
- let d = n[t.typeC4Shape.text + "Font"]();
2730
- return d.fontWeight = "bold", d.fontSize += 2, d.fontColor = a, Y(n)(t.label.text, s, t.x, t.y + t.label.Y, t.width, t.height, { fill: a }, d), d = n[t.typeC4Shape.text + "Font"](), d.fontColor = a, t.techn && t.techn?.text !== "" ? Y(n)(t.techn.text, s, t.x, t.y + t.techn.Y, t.width, t.height, {
2731
- fill: a,
2732
- "font-style": "italic"
2733
- }, d) : t.type && t.type.text !== "" && Y(n)(t.type.text, s, t.x, t.y + t.type.Y, t.width, t.height, {
2734
- fill: a,
2735
- "font-style": "italic"
2736
- }, d), t.descr && t.descr.text !== "" && (d = n.personFont(), d.fontColor = a, Y(n)(t.descr.text, s, t.x, t.y + t.descr.Y, t.width, t.height, { fill: a }, d)), t.height;
2737
- }, "drawC4Shape"), ge = /* @__PURE__ */ a(function(e, t) {
2637
+ l.fontWeight = "bold", l.fontSize += 2, l.fontColor = o, ye(n)(t.label.text, r, t.x, t.y + t.label.Y, t.width, t.height, { fill: "#444444" }, l), t.type && t.type.text !== "" && (l = n.boundaryFont(), l.fontColor = o, ye(n)(t.type.text, r, t.x, t.y + t.type.Y, t.width, t.height, { fill: "#444444" }, l)), t.descr && t.descr.text !== "" && (l = n.boundaryFont(), l.fontSize -= 2, l.fontColor = o, ye(n)(t.descr.text, r, t.x, t.y + t.descr.Y, t.width, t.height, { fill: "#444444" }, l));
2638
+ }, "drawBoundary"), fe = /* @__PURE__ */ a(function(e, t) {
2738
2639
  e.append("defs").append("symbol").attr("id", t + "-database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr("d", "M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z");
2739
- }, "insertDatabaseIcon"), _e = /* @__PURE__ */ a(function(e, t) {
2640
+ }, "insertDatabaseIcon"), pe = /* @__PURE__ */ a(function(e, t) {
2740
2641
  e.append("defs").append("symbol").attr("id", t + "-computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr("d", "M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z");
2741
- }, "insertComputerIcon"), ve = /* @__PURE__ */ a(function(e, t) {
2642
+ }, "insertComputerIcon"), me = /* @__PURE__ */ a(function(e, t) {
2742
2643
  e.append("defs").append("symbol").attr("id", t + "-clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr("d", "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z");
2743
- }, "insertClockIcon"), ye = /* @__PURE__ */ a(function(e, t) {
2644
+ }, "insertClockIcon"), he = /* @__PURE__ */ a(function(e, t) {
2744
2645
  e.append("defs").append("marker").attr("id", t + "-arrowhead").attr("refX", 9).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");
2745
- }, "insertArrowHead"), be = /* @__PURE__ */ a(function(e, t) {
2646
+ }, "insertArrowHead"), ge = /* @__PURE__ */ a(function(e, t) {
2746
2647
  e.append("defs").append("marker").attr("id", t + "-arrowend").attr("refX", 1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z");
2747
- }, "insertArrowEnd"), xe = /* @__PURE__ */ a(function(e, t) {
2648
+ }, "insertArrowEnd"), _e = /* @__PURE__ */ a(function(e, t) {
2748
2649
  e.append("defs").append("marker").attr("id", t + "-filled-head").attr("refX", 18).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");
2749
- }, "insertArrowFilledHead"), Se = /* @__PURE__ */ a(function(e, t) {
2650
+ }, "insertArrowFilledHead"), ve = /* @__PURE__ */ a(function(e, t) {
2750
2651
  let n = e.append("defs").append("marker").attr("id", t + "-crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4);
2751
2652
  n.append("path").attr("fill", "black").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 9,2 V 6 L16,4 Z"), n.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 0,1 L 6,7 M 6,1 L 0,7");
2752
- }, "insertArrowCrossHead"), Ce = /* @__PURE__ */ a((e, t) => ({
2753
- fontFamily: e[t + "FontFamily"],
2754
- fontSize: e[t + "FontSize"],
2755
- fontWeight: e[t + "FontWeight"]
2756
- }), "getC4ShapeFont"), Y = /* @__PURE__ */ (function() {
2653
+ }, "insertArrowCrossHead"), ye = /* @__PURE__ */ (function() {
2757
2654
  function e(e, t, n, i, a, o, s) {
2758
2655
  r(t.append("text").attr("x", n + a / 2).attr("y", i + o / 2 + 5).style("text-anchor", "middle").text(e), s);
2759
2656
  }
@@ -2777,27 +2674,115 @@ var x = b, S = [], C = [""], w = "global", T = "", E = [{
2777
2674
  return a(r, "_setTextAttrs"), function(r) {
2778
2675
  return r.textPlacement === "fo" ? n : r.textPlacement === "old" ? e : t;
2779
2676
  };
2780
- })(), X = {
2781
- drawRect: de,
2782
- drawBoundary: me,
2783
- drawC4Shape: he,
2784
- drawRels: pe,
2785
- drawImage: fe,
2786
- insertArrowHead: ye,
2787
- insertArrowEnd: be,
2788
- insertArrowFilledHead: xe,
2789
- insertArrowCrossHead: Se,
2790
- insertDatabaseIcon: ge,
2791
- insertComputerIcon: _e,
2792
- insertClockIcon: ve
2793
- }, we = 0, Te = 0, Ee = 4, De = 2;
2794
- b.yy = ue;
2795
- var Z = {}, Oe = class {
2677
+ })(), Q = {
2678
+ drawRect: le,
2679
+ drawBoundary: de,
2680
+ drawRels: ue,
2681
+ insertArrowHead: he,
2682
+ insertArrowEnd: ge,
2683
+ insertArrowFilledHead: _e,
2684
+ insertArrowCrossHead: ve,
2685
+ insertDatabaseIcon: fe,
2686
+ insertComputerIcon: pe,
2687
+ insertClockIcon: me
2688
+ }, be = /* @__PURE__ */ a((e, t) => {
2689
+ if (t === "sandbox") {
2690
+ let t = i("#i" + e).node()?.contentDocument;
2691
+ if (!t) throw Error(`Sandbox iframe #i${e} is missing its content document`);
2692
+ return {
2693
+ root: i(t.body),
2694
+ doc: t
2695
+ };
2696
+ }
2697
+ return {
2698
+ root: i("body"),
2699
+ doc: document
2700
+ };
2701
+ }, "getDiagramRoot"), xe = /* @__PURE__ */ new Set([
2702
+ "system_queue",
2703
+ "external_system_queue",
2704
+ "container_queue",
2705
+ "external_container_queue",
2706
+ "component_queue",
2707
+ "external_component_queue"
2708
+ ]), Se = /* @__PURE__ */ new Set([
2709
+ "system_db",
2710
+ "external_system_db",
2711
+ "container_db",
2712
+ "external_container_db",
2713
+ "component_db",
2714
+ "external_component_db"
2715
+ ]), Ce = {
2716
+ person: "person",
2717
+ box: "rounded",
2718
+ rounded: "rounded",
2719
+ cylinder: "cylinder",
2720
+ database: "cylinder",
2721
+ db: "cylinder",
2722
+ queue: "h-cyl",
2723
+ pipe: "h-cyl",
2724
+ component: "fr-rect"
2725
+ }, we = /* @__PURE__ */ a((e) => e ? Ce[e.toLowerCase()] : void 0, "keywordShape"), Te = /* @__PURE__ */ a((e) => {
2726
+ let t = we(e.shape) ?? we(e.sprite);
2727
+ if (t) return t;
2728
+ if (e.tags) for (let t of e.tags.split(",")) {
2729
+ let e = we(t.trim());
2730
+ if (e) return e;
2731
+ }
2732
+ let n = e.typeC4Shape.text;
2733
+ return n === "person" || n === "external_person" ? "person" : Se.has(n) ? "cylinder" : xe.has(n) ? "h-cyl" : "rounded";
2734
+ }, "resolveNodeShape"), Ee = {
2735
+ person: "Person",
2736
+ system: "Software System",
2737
+ container: "Container",
2738
+ component: "Component"
2739
+ }, De = /* @__PURE__ */ a((e) => {
2740
+ let t = e.replace(/^external_/, "").replace(/_(db|queue)$/, "");
2741
+ return Ee[t] ?? t.replace(/_/g, " ");
2742
+ }, "stereotypeLabel"), Oe = /* @__PURE__ */ a((e) => e.startsWith("external_"), "isExternal"), ke = /* @__PURE__ */ a((e) => {
2743
+ let t = De(e.typeC4Shape.text);
2744
+ return e.techn?.text ? `[${t}: ${e.techn.text}]` : `[${t}]`;
2745
+ }, "stereotypeText"), Ae = [
2746
+ "person",
2747
+ "system",
2748
+ "system_db",
2749
+ "system_queue",
2750
+ "container",
2751
+ "container_db",
2752
+ "container_queue",
2753
+ "component",
2754
+ "component_db",
2755
+ "component_queue"
2756
+ ].flatMap((e) => [e, `external_${e}`]), je = new Set(Ae), Me = /* @__PURE__ */ a((e) => je.has(e), "isC4ElementType"), Ne = /* @__PURE__ */ a((e, t) => {
2757
+ let n = e.typeC4Shape.text, r = e.bgColor ?? (Me(n) && t[`${n}_bg_color`]), i = e.borderColor ?? (Me(n) && t[`${n}_border_color`]), a = [];
2758
+ return r && a.push(`fill:${r}`), i && a.push(`stroke:${i}`), a.push(`color:${e.fontColor ?? "#FFFFFF"}`), a;
2759
+ }, "elementCssStyles"), Pe = /* @__PURE__ */ a((e, t, n, r, i) => {
2760
+ let a = e.typeC4Shape.text, o = ["c4-shape", `c4-${a}`];
2761
+ Oe(a) && o.push("c4-external");
2762
+ let s = Te(e), l = Ne(e, t);
2763
+ return (s === "rounded" || s === "fr-rect") && l.push("rx:12px", "ry:12px"), {
2764
+ id: e.alias,
2765
+ label: e.label.text,
2766
+ stereotype: ke(e),
2767
+ description: e.descr?.text ? [e.descr.text] : void 0,
2768
+ labelType: "string",
2769
+ isGroup: !1,
2770
+ shape: s,
2771
+ cssClasses: o.join(" "),
2772
+ cssStyles: l,
2773
+ padding: n,
2774
+ look: r,
2775
+ useHtmlLabels: !1,
2776
+ width: i
2777
+ };
2778
+ }, "buildC4Node"), Fe = 0, Ie = 0, Le = 4, Re = 2;
2779
+ v.yy = ce;
2780
+ var $ = {}, ze = class {
2796
2781
  static {
2797
2782
  a(this, "Bounds");
2798
2783
  }
2799
2784
  constructor(e) {
2800
- this.name = "", this.data = {}, this.data.startx = void 0, this.data.stopx = void 0, this.data.starty = void 0, this.data.stopy = void 0, this.data.widthLimit = void 0, this.nextData = {}, this.nextData.startx = void 0, this.nextData.stopx = void 0, this.nextData.starty = void 0, this.nextData.stopy = void 0, this.nextData.cnt = 0, ke(e.db.getConfig());
2785
+ this.name = "", this.data = {}, this.data.startx = void 0, this.data.stopx = void 0, this.data.starty = void 0, this.data.stopy = void 0, this.data.widthLimit = void 0, this.nextData = {}, this.nextData.startx = void 0, this.nextData.stopx = void 0, this.nextData.starty = void 0, this.nextData.stopy = void 0, this.nextData.cnt = 0, Be(e.db.getConfig());
2801
2786
  }
2802
2787
  setData(e, t, n, r) {
2803
2788
  this.nextData.startx = this.data.startx = e, this.nextData.stopx = this.data.stopx = t, this.nextData.starty = this.data.starty = n, this.nextData.stopy = this.data.stopy = r;
@@ -2807,8 +2792,8 @@ var Z = {}, Oe = class {
2807
2792
  }
2808
2793
  insert(e) {
2809
2794
  this.nextData.cnt = this.nextData.cnt + 1;
2810
- let t = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + e.margin : this.nextData.stopx + e.margin * 2, n = t + e.width, r = this.nextData.starty + e.margin * 2, i = r + e.height;
2811
- (t >= this.data.widthLimit || n >= this.data.widthLimit || this.nextData.cnt > Ee) && (t = this.nextData.startx + e.margin + Z.nextLinePaddingX, r = this.nextData.stopy + e.margin * 2, this.nextData.stopx = n = t + e.width, this.nextData.starty = this.nextData.stopy, this.nextData.stopy = i = r + e.height, this.nextData.cnt = 1), e.x = t, e.y = r, this.updateVal(this.data, "startx", t, Math.min), this.updateVal(this.data, "starty", r, Math.min), this.updateVal(this.data, "stopx", n, Math.max), this.updateVal(this.data, "stopy", i, Math.max), this.updateVal(this.nextData, "startx", t, Math.min), this.updateVal(this.nextData, "starty", r, Math.min), this.updateVal(this.nextData, "stopx", n, Math.max), this.updateVal(this.nextData, "stopy", i, Math.max);
2795
+ let t = this.nextData.stopx, n = this.data.widthLimit, r = this.nextData.startx === this.nextData.stopx ? t + e.margin : t + e.margin * 2, i = r + e.width, a = this.nextData.starty + e.margin * 2, o = a + e.height;
2796
+ (r >= n || i >= n || this.nextData.cnt > Le) && (r = this.nextData.startx + e.margin + $.nextLinePaddingX, a = this.nextData.stopy + e.margin * 2, this.nextData.stopx = i = r + e.width, this.nextData.starty = this.nextData.stopy, this.nextData.stopy = o = a + e.height, this.nextData.cnt = 1), e.x = r, e.y = a, this.updateVal(this.data, "startx", r, Math.min), this.updateVal(this.data, "starty", a, Math.min), this.updateVal(this.data, "stopx", i, Math.max), this.updateVal(this.data, "stopy", o, Math.max), this.updateVal(this.nextData, "startx", r, Math.min), this.updateVal(this.nextData, "starty", a, Math.min), this.updateVal(this.nextData, "stopx", i, Math.max), this.updateVal(this.nextData, "stopy", o, Math.max);
2812
2797
  }
2813
2798
  init(e) {
2814
2799
  this.name = "", this.data = {
@@ -2823,160 +2808,203 @@ var Z = {}, Oe = class {
2823
2808
  starty: void 0,
2824
2809
  stopy: void 0,
2825
2810
  cnt: 0
2826
- }, ke(e.db.getConfig());
2811
+ }, Be(e.db.getConfig());
2827
2812
  }
2828
2813
  bumpLastMargin(e) {
2829
2814
  this.data.stopx += e, this.data.stopy += e;
2830
2815
  }
2831
- }, ke = /* @__PURE__ */ a(function(e) {
2832
- u(Z, e), e.fontFamily && (Z.personFontFamily = Z.systemFontFamily = Z.messageFontFamily = e.fontFamily), e.fontSize && (Z.personFontSize = Z.systemFontSize = Z.messageFontSize = e.fontSize), e.fontWeight && (Z.personFontWeight = Z.systemFontWeight = Z.messageFontWeight = e.fontWeight);
2833
- }, "setConf"), Ae = /* @__PURE__ */ a((e, t) => ({
2834
- fontFamily: e[t + "FontFamily"],
2835
- fontSize: e[t + "FontSize"],
2836
- fontWeight: e[t + "FontWeight"]
2837
- }), "c4ShapeFont"), je = /* @__PURE__ */ a((e) => ({
2816
+ }, Be = /* @__PURE__ */ a(function(e) {
2817
+ u($, e), e?.fontFamily && ($.personFontFamily = $.systemFontFamily = $.messageFontFamily = e.fontFamily), e?.fontSize && ($.personFontSize = $.systemFontSize = $.messageFontSize = e.fontSize), e?.fontWeight && ($.personFontWeight = $.systemFontWeight = $.messageFontWeight = e.fontWeight);
2818
+ }, "setConf"), Ve = /* @__PURE__ */ a((e) => ({
2838
2819
  fontFamily: e.boundaryFontFamily,
2839
2820
  fontSize: e.boundaryFontSize,
2840
2821
  fontWeight: e.boundaryFontWeight
2841
- }), "boundaryFont"), Me = /* @__PURE__ */ a((e) => ({
2822
+ }), "boundaryFont"), He = /* @__PURE__ */ a((e) => ({
2842
2823
  fontFamily: e.messageFontFamily,
2843
2824
  fontSize: e.messageFontSize,
2844
2825
  fontWeight: e.messageFontWeight
2845
2826
  }), "messageFont");
2846
- function Q(r, i, a, o, s) {
2847
- if (!i[r].width) {
2848
- if (a) i[r].text = e(i[r].text, s, o), i[r].textLines = i[r].text.split(d.lineBreakRegex).length, i[r].width = s, i[r].height = t(i[r].text, o);
2827
+ function Ue(r, i, a, o, s) {
2828
+ let l = i[r];
2829
+ if (!l.width) {
2830
+ if (a) l.text = e(l.text, s, o), l.textLines = l.text.split(d.lineBreakRegex).length, l.width = s, l.height = t(l.text, o);
2849
2831
  else {
2850
- let e = i[r].text.split(d.lineBreakRegex);
2851
- i[r].textLines = e.length;
2852
- let a = 0;
2853
- i[r].height = 0, i[r].width = 0;
2854
- for (let s of e) i[r].width = Math.max(n(s, o), i[r].width), a = t(s, o), i[r].height = i[r].height + a;
2832
+ let e = l.text.split(d.lineBreakRegex);
2833
+ l.textLines = e.length;
2834
+ let r = 0;
2835
+ l.height = 0, l.width = 0;
2836
+ for (let i of e) l.width = Math.max(n(i, o), l.width), r = t(i, o), l.height += r;
2855
2837
  }
2856
2838
  }
2839
+ return l;
2857
2840
  }
2858
- a(Q, "calcC4ShapeTextWH");
2859
- var Ne = /* @__PURE__ */ a(function(e, t, r) {
2860
- t.x = r.data.startx, t.y = r.data.starty, t.width = r.data.stopx - r.data.startx, t.height = r.data.stopy - r.data.starty, t.label.y = Z.c4ShapeMargin - 35;
2861
- let i = t.wrap && Z.wrap, a = je(Z);
2862
- a.fontSize += 2, a.fontWeight = "bold", Q("label", t, i, a, n(t.label.text, a)), X.drawBoundary(e, t, Z);
2863
- }, "drawBoundary"), Pe = /* @__PURE__ */ a(function(e, t, r, i) {
2864
- let a = 0;
2865
- for (let o of i) {
2866
- a = 0;
2867
- let i = r[o], s = Ae(Z, i.typeC4Shape.text);
2868
- switch (s.fontSize -= 2, i.typeC4Shape.width = n("«" + i.typeC4Shape.text + "»", s), i.typeC4Shape.height = s.fontSize + 2, i.typeC4Shape.Y = Z.c4ShapePadding, a = i.typeC4Shape.Y + i.typeC4Shape.height - 4, i.image = {
2869
- width: 0,
2870
- height: 0,
2871
- Y: 0
2872
- }, i.typeC4Shape.text) {
2873
- case "person":
2874
- case "external_person": i.image.width = 48, i.image.height = 48, i.image.Y = a, a = i.image.Y + i.image.height;
2875
- }
2876
- i.sprite && (i.image.width = 48, i.image.height = 48, i.image.Y = a, a = i.image.Y + i.image.height);
2877
- let l = i.wrap && Z.wrap, u = Z.width - Z.c4ShapePadding * 2, d = Ae(Z, i.typeC4Shape.text);
2878
- d.fontSize += 2, d.fontWeight = "bold", Q("label", i, l, d, u), i.label.Y = a + 8, a = i.label.Y + i.label.height, i.type && i.type.text !== "" ? (i.type.text = "[" + i.type.text + "]", Q("type", i, l, Ae(Z, i.typeC4Shape.text), u), i.type.Y = a + 5, a = i.type.Y + i.type.height) : i.techn && i.techn.text !== "" && (i.techn.text = "[" + i.techn.text + "]", Q("techn", i, l, Ae(Z, i.techn.text), u), i.techn.Y = a + 5, a = i.techn.Y + i.techn.height);
2879
- let f = a, p = i.label.width;
2880
- i.descr && i.descr.text !== "" && (Q("descr", i, l, Ae(Z, i.typeC4Shape.text), u), i.descr.Y = a + 20, a = i.descr.Y + i.descr.height, p = Math.max(i.label.width, i.descr.width), f = a - i.descr.textLines * 5), p += Z.c4ShapePadding, i.width = Math.max(i.width || Z.width, p, Z.width), i.height = Math.max(i.height || Z.height, f, Z.height), i.margin = i.margin || Z.c4ShapeMargin, e.insert(i), X.drawC4Shape(t, i, Z);
2881
- }
2882
- e.bumpLastMargin(Z.c4ShapeMargin);
2883
- }, "drawC4ShapeArray"), $ = class {
2841
+ a(Ue, "calcC4ShapeTextWH");
2842
+ var We = /* @__PURE__ */ a(function(e, t, r) {
2843
+ let i = r.data.startx, a = r.data.starty;
2844
+ t.x = i, t.y = a, t.width = r.data.stopx - i, t.height = r.data.stopy - a, t.label.y = $.c4ShapeMargin - 35;
2845
+ let o = t.wrap && $.wrap, s = Ve($);
2846
+ s.fontSize += 2, s.fontWeight = "bold", Ue("label", t, o, s, n(t.label.text, s)), Q.drawBoundary(e, t, $);
2847
+ }, "drawBoundary"), Ge = /* @__PURE__ */ a(async function(e, t, n, r) {
2848
+ let i = p(), o = i.look ?? "classic", s = { config: i }, l = t.attr("id") ?? "", u = r.map((e) => n[Number(e)]), d = /* @__PURE__ */ a((e) => {
2849
+ let t = e.shape ? g[e.shape] : void 0;
2850
+ if (!t) throw Error(`C4: no shape handler for "${e.shape}"`);
2851
+ return t;
2852
+ }, "shapeHandlerFor");
2853
+ await Promise.all(u.map(async (e) => {
2854
+ let n = Pe(e, $, $.c4ShapePadding, o, $.width);
2855
+ n.domId = `${l}-${n.id}`;
2856
+ let r = await d(n)(t, n, s);
2857
+ e.width = n.width ?? $.width, e.height = n.height ?? $.height, e.margin = $.c4ShapeMargin, r.remove();
2858
+ }));
2859
+ for (let t of u) e.insert(t);
2860
+ await Promise.all(u.map(async (e) => {
2861
+ let n = Pe(e, $, $.c4ShapePadding, o, $.width);
2862
+ n.domId = `${l}-${n.id}`, n.x = e.x + e.width / 2, n.y = e.y + e.height / 2;
2863
+ let r = t.append("g").attr("transform", `translate(${e.x + e.width / 2}, ${e.y + e.height / 2})`);
2864
+ await d(n)(r, n, s), e.intersect = n.intersect;
2865
+ })), e.bumpLastMargin($.c4ShapeMargin);
2866
+ }, "drawC4ShapeArray"), Ke = class {
2884
2867
  static {
2885
2868
  a(this, "Point");
2886
2869
  }
2887
2870
  constructor(e, t) {
2888
2871
  this.x = e, this.y = t;
2889
2872
  }
2890
- }, Fe = /* @__PURE__ */ a(function(e, t) {
2891
- let n = e.x, r = e.y, i = t.x, a = t.y, o = n + e.width / 2, s = r + e.height / 2, l = Math.abs(n - i), u = Math.abs(r - a), d = u / l, f = e.height / e.width, p = null;
2892
- return r == a && n < i ? p = new $(n + e.width, s) : r == a && n > i ? p = new $(n, s) : n == i && r < a ? p = new $(o, r + e.height) : n == i && r > a && (p = new $(o, r)), n > i && r < a ? p = f >= d ? new $(n, s + d * e.width / 2) : new $(o - l / u * e.height / 2, r + e.height) : n < i && r < a ? p = f >= d ? new $(n + e.width, s + d * e.width / 2) : new $(o + l / u * e.height / 2, r + e.height) : n < i && r > a ? p = f >= d ? new $(n + e.width, s - d * e.width / 2) : new $(o + e.height / 2 * l / u, r) : n > i && r > a && (p = f >= d ? new $(n, s - e.width / 2 * d) : new $(o - e.height / 2 * l / u, r)), p;
2893
- }, "getIntersectPoint"), Ie = /* @__PURE__ */ a(function(e, t) {
2873
+ }, qe = /* @__PURE__ */ a(function(e, t) {
2874
+ if (!e.intersect) throw Error(`C4 shape "${e.alias}" has no intersect function. Please report this to https://github.com/mermaid-js/mermaid/issues`);
2875
+ let { x: n, y: r } = e.intersect(t);
2876
+ return new Ke(n, r);
2877
+ }, "getIntersectPoint"), Je = /* @__PURE__ */ a(function(e, t) {
2894
2878
  let n = {
2895
2879
  x: 0,
2896
2880
  y: 0
2897
2881
  };
2898
2882
  n.x = t.x + t.width / 2, n.y = t.y + t.height / 2;
2899
- let r = Fe(e, n);
2883
+ let r = qe(e, n);
2900
2884
  return n.x = e.x + e.width / 2, n.y = e.y + e.height / 2, {
2901
2885
  startPoint: r,
2902
- endPoint: Fe(t, n)
2886
+ endPoint: qe(t, n)
2903
2887
  };
2904
- }, "getIntersectPoints"), Le = /* @__PURE__ */ a(function(e, t, r, i, a) {
2905
- let o = 0;
2888
+ }, "getIntersectPoints"), Ye = /* @__PURE__ */ a(function(e, t, r, i, a) {
2889
+ let o = i.db.getC4Type(), s = 0;
2906
2890
  for (let e of t) {
2907
- o += 1;
2908
- let t = e.wrap && Z.wrap, a = Me(Z);
2909
- i.db.getC4Type() === "C4Dynamic" && (e.label.text = o + ": " + e.label.text);
2910
- let s = n(e.label.text, a);
2911
- Q("label", e, t, a, s), e.techn && e.techn.text !== "" && (s = n(e.techn.text, a), Q("techn", e, t, a, s)), e.descr && e.descr.text !== "" && (s = n(e.descr.text, a), Q("descr", e, t, a, s));
2912
- let l = Ie(r(e.from), r(e.to));
2913
- e.startPoint = l.startPoint, e.endPoint = l.endPoint;
2891
+ s += 1;
2892
+ let t = e.wrap && $.wrap, i = He($);
2893
+ o === "C4Dynamic" && (e.label.text = s + ": " + e.label.text);
2894
+ let a = n(e.label.text, i);
2895
+ Ue("label", e, t, i, a), e.techn && e.techn.text !== "" && (a = n(e.techn.text, i), Ue("techn", e, t, i, a)), e.descr && e.descr.text !== "" && (a = n(e.descr.text, i), Ue("descr", e, t, i, a));
2896
+ let l = r(e.from), u = r(e.to);
2897
+ if (!l || !u) throw Error(`C4 rel "${e.from}" -> "${e.to}" references an unknown shape`);
2898
+ let d = Je(l, u);
2899
+ if (!d.startPoint || !d.endPoint) throw Error(`Could not calculate intersection points for rel "${e.from}" -> "${e.to}"`);
2900
+ e.startPoint = d.startPoint, e.endPoint = d.endPoint;
2914
2901
  }
2915
- X.drawRels(e, t, Z, a);
2902
+ Q.drawRels(e, t, $, a);
2916
2903
  }, "drawRels");
2917
- function Re(e, t, n, r, i) {
2918
- let a = new Oe(i);
2919
- a.data.widthLimit = n.data.widthLimit / Math.min(De, r.length);
2920
- for (let [o, s] of r.entries()) {
2904
+ async function Xe(e, t, n, r, i) {
2905
+ let a = i.db, o = new ze(i);
2906
+ o.data.widthLimit = n.data.widthLimit / Math.min(Re, r.length);
2907
+ for (let [s, l] of r.entries()) {
2921
2908
  let r = 0;
2922
- s.image = {
2909
+ l.image = {
2923
2910
  width: 0,
2924
2911
  height: 0,
2925
2912
  Y: 0
2926
- }, s.sprite && (s.image.width = 48, s.image.height = 48, s.image.Y = r, r = s.image.Y + s.image.height);
2927
- let l = s.wrap && Z.wrap, u = je(Z);
2928
- if (u.fontSize += 2, u.fontWeight = "bold", Q("label", s, l, u, a.data.widthLimit), s.label.Y = r + 8, r = s.label.Y + s.label.height, s.type && s.type.text !== "" && (s.type.text = "[" + s.type.text + "]", Q("type", s, l, je(Z), a.data.widthLimit), s.type.Y = r + 5, r = s.type.Y + s.type.height), s.descr && s.descr.text !== "") {
2929
- let e = je(Z);
2930
- e.fontSize -= 2, Q("descr", s, l, e, a.data.widthLimit), s.descr.Y = r + 20, r = s.descr.Y + s.descr.height;
2913
+ }, l.sprite && (l.image.width = 48, l.image.height = 48, l.image.Y = r, r = l.image.Y + l.image.height);
2914
+ let u = l.wrap && $.wrap, d = Ve($);
2915
+ d.fontSize += 2, d.fontWeight = "bold";
2916
+ let f = Ue("label", l, u, d, o.data.widthLimit);
2917
+ if (f.Y = r + 8, r = f.Y + f.height, l.type && l.type.text !== "") {
2918
+ l.type.text = "[" + l.type.text + "]";
2919
+ let e = Ue("type", l, u, Ve($), o.data.widthLimit);
2920
+ e.Y = r + 5, r = e.Y + e.height;
2921
+ }
2922
+ if (l.descr && l.descr.text !== "") {
2923
+ let e = Ve($);
2924
+ e.fontSize -= 2;
2925
+ let t = Ue("descr", l, u, e, o.data.widthLimit);
2926
+ t.Y = r + 20, r = t.Y + t.height;
2931
2927
  }
2932
- if (o == 0 || o % De === 0) {
2933
- let e = n.data.startx + Z.diagramMarginX, t = n.data.stopy + Z.diagramMarginY + r;
2934
- a.setData(e, e, t, t);
2928
+ if (s == 0 || s % Re === 0) {
2929
+ let e = n.data.startx + $.diagramMarginX, t = n.data.stopy + $.diagramMarginY + r;
2930
+ o.setData(e, e, t, t);
2935
2931
  } else {
2936
- let e = a.data.stopx === a.data.startx ? a.data.startx : a.data.stopx + Z.diagramMarginX, t = a.data.starty;
2937
- a.setData(e, e, t, t);
2932
+ let e = o.data.stopx === o.data.startx ? o.data.startx : o.data.stopx + $.diagramMarginX, t = o.data.starty;
2933
+ o.setData(e, e, t, t);
2938
2934
  }
2939
- a.name = s.alias;
2940
- let d = i.db.getC4ShapeArray(s.alias), f = i.db.getC4ShapeKeys(s.alias);
2941
- f.length > 0 && Pe(a, e, d, f), t = s.alias;
2942
- let p = i.db.getBoundaries(t);
2943
- p.length > 0 && Re(e, t, a, p, i), s.alias !== "global" && Ne(e, s, a), n.data.stopy = Math.max(a.data.stopy + Z.c4ShapeMargin, n.data.stopy), n.data.stopx = Math.max(a.data.stopx + Z.c4ShapeMargin, n.data.stopx), we = Math.max(we, n.data.stopx), Te = Math.max(Te, n.data.stopy);
2935
+ o.name = l.alias;
2936
+ let p = a.getC4ShapeArray(l.alias), m = a.getC4ShapeKeys(l.alias);
2937
+ m.length > 0 && await Ge(o, e, p, m), t = l.alias;
2938
+ let h = a.getBoundaries(t);
2939
+ h.length > 0 && await Xe(e, t, o, h, i), l.alias !== "global" && We(e, l, o), n.data.stopy = Math.max(o.data.stopy + $.c4ShapeMargin, n.data.stopy), n.data.stopx = Math.max(o.data.stopx + $.c4ShapeMargin, n.data.stopx), Fe = Math.max(Fe, n.data.stopx), Ie = Math.max(Ie, n.data.stopy);
2944
2940
  }
2945
2941
  }
2946
- a(Re, "drawInsideBoundary");
2947
- var ze = {
2948
- drawPersonOrSystemArray: Pe,
2949
- drawBoundary: Ne,
2950
- setConf: ke,
2951
- draw: /* @__PURE__ */ a(function(e, t, n, a) {
2952
- Z = p().c4;
2953
- let o = p().securityLevel, s;
2954
- o === "sandbox" && (s = i("#i" + t));
2955
- let u = i(o === "sandbox" ? s.nodes()[0].contentDocument.body : "body"), d = a.db;
2956
- a.db.setWrap(Z.wrap), Ee = d.getC4ShapeInRow(), De = d.getC4BoundaryInRow(), r.debug(`C:${JSON.stringify(Z, null, 2)}`);
2957
- let f = o === "sandbox" ? u.select(`[id="${t}"]`) : i(`[id="${t}"]`);
2958
- X.insertComputerIcon(f, t), X.insertDatabaseIcon(f, t), X.insertClockIcon(f, t);
2959
- let m = new Oe(a);
2960
- m.setData(Z.diagramMarginX, Z.diagramMarginX, Z.diagramMarginY, Z.diagramMarginY), m.data.widthLimit = screen.availWidth, we = Z.diagramMarginX, Te = Z.diagramMarginY;
2961
- let h = a.db.getTitle();
2962
- Re(f, "", m, a.db.getBoundaries(""), a), X.insertArrowHead(f, t), X.insertArrowEnd(f, t), X.insertArrowCrossHead(f, t), X.insertArrowFilledHead(f, t), Le(f, a.db.getRels(), a.db.getC4Shape, a, t), m.data.stopx = we, m.data.stopy = Te;
2963
- let g = m.data, _ = g.stopy - g.starty + 2 * Z.diagramMarginY, v = g.stopx - g.startx + 2 * Z.diagramMarginX;
2964
- h && f.append("text").text(h).attr("x", (g.stopx - g.startx) / 2 - 4 * Z.diagramMarginX).attr("y", g.starty + Z.diagramMarginY), l(f, _, v, Z.useMaxWidth);
2965
- let y = h ? 60 : 0;
2966
- f.attr("viewBox", g.startx - Z.diagramMarginX + " -" + (Z.diagramMarginY + y) + " " + v + " " + (_ + y)), r.debug("models:", g);
2942
+ a(Xe, "drawInsideBoundary");
2943
+ var Ze = {
2944
+ drawPersonOrSystemArray: Ge,
2945
+ drawBoundary: We,
2946
+ setConf: Be,
2947
+ draw: /* @__PURE__ */ a(async function(e, t, n, i) {
2948
+ $ = b("c4");
2949
+ let a = p().securityLevel, { root: o } = be(t, a), s = i.db;
2950
+ s.setWrap($.wrap), Le = s.getC4ShapeInRow(), Re = s.getC4BoundaryInRow(), r.debug(`C:${JSON.stringify($, null, 2)}`);
2951
+ let u = o.select(`[id="${t}"]`);
2952
+ Q.insertComputerIcon(u, t), Q.insertDatabaseIcon(u, t), Q.insertClockIcon(u, t);
2953
+ let d = new ze(i);
2954
+ d.setData($.diagramMarginX, $.diagramMarginX, $.diagramMarginY, $.diagramMarginY), d.data.widthLimit = screen.availWidth, Fe = $.diagramMarginX, Ie = $.diagramMarginY;
2955
+ let f = s.getTitle();
2956
+ await Xe(u, "", d, s.getBoundaries(""), i), Q.insertArrowHead(u, t), Q.insertArrowEnd(u, t), Q.insertArrowCrossHead(u, t), Q.insertArrowFilledHead(u, t), Ye(u, s.getRels(), s.getC4Shape, i, t), d.data.stopx = Fe, d.data.stopy = Ie;
2957
+ let m = d.data, h = m.startx, g = m.starty, _ = Ie - g + 2 * $.diagramMarginY, v = Fe - h, y = v + 2 * $.diagramMarginX;
2958
+ f && u.append("text").text(f).attr("x", v / 2 - 4 * $.diagramMarginX).attr("y", g + $.diagramMarginY), l(u, _, y, $.useMaxWidth);
2959
+ let x = f ? 60 : 0;
2960
+ u.attr("viewBox", h - $.diagramMarginX + " -" + ($.diagramMarginY + x) + " " + y + " " + (_ + x)), r.debug("models:", m);
2967
2961
  }, "draw")
2968
- }, Be = {
2969
- parser: x,
2970
- db: ue,
2971
- renderer: ze,
2962
+ }, Qe = /* @__PURE__ */ a(() => {
2963
+ let e = p().c4 ?? {}, t = new CSSStyleSheet();
2964
+ for (let n of Ae) {
2965
+ let r = t.cssRules[t.insertRule(`.c4-shape.c4-${n} .label {}`, t.cssRules.length)], i = e[`${n}FontFamily`], a = e[`${n}FontSize`], o = e[`${n}FontWeight`];
2966
+ i && r.style.setProperty("font-family", i), a && r.style.setProperty("font-size", typeof a == "number" ? `${a}px` : a), o && r.style.setProperty("font-weight", String(o));
2967
+ }
2968
+ return [...t.cssRules].filter((e) => e.style.length > 0).map((e) => ` ${e.cssText}`).join("\n");
2969
+ }, "elementFontStyles"), $e = {
2970
+ parser: y,
2971
+ db: ce,
2972
+ renderer: Ze,
2972
2973
  styles: /* @__PURE__ */ a((e) => `.person {
2973
2974
  stroke: ${e.personBorder};
2974
2975
  fill: ${e.personBkg};
2975
2976
  }
2977
+ ${Qe()}
2978
+
2979
+ /* The element font colour is set inline per element (default white); the
2980
+ label text takes it via currentColor. */
2981
+ .c4-shape .label,
2982
+ .c4-shape .label text {
2983
+ color: inherit;
2984
+ fill: currentColor;
2985
+ }
2986
+ /* Structurizr typography: bold name, smaller stereotype/type and description lines. */
2987
+ .c4-shape .label .c4-name {
2988
+ font-weight: bold;
2989
+ }
2990
+ .c4-shape .label .c4-type {
2991
+ font-size: 0.75em;
2992
+ }
2993
+ .c4-shape .label .c4-descr {
2994
+ font-size: 0.82em;
2995
+ }
2996
+ .c4-shape .basic,
2997
+ .c4-shape rect,
2998
+ .c4-shape path,
2999
+ .c4-shape circle,
3000
+ .c4-shape ellipse,
3001
+ .c4-shape line {
3002
+ stroke-width: 2px;
3003
+ }
2976
3004
  `, "getStyles"),
2977
3005
  init: /* @__PURE__ */ a(({ c4: e, wrap: t }) => {
2978
- ze.setConf(e), ue.setWrap(t);
3006
+ Ze.setConf(e), ce.setWrap(t);
2979
3007
  }, "init")
2980
3008
  };
2981
3009
  //#endregion
2982
- export { Be as diagram };
3010
+ export { $e as diagram };