@sme.up/ketchup2 2.0.0-SNAPSHOT-20250908152453 → 2.0.0-SNAPSHOT-20250909100819

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 (120) hide show
  1. package/dist/{_basePickBy-DNewzgl9.cjs → _basePickBy-Ca1ngxe-.cjs} +1 -1
  2. package/dist/{_basePickBy-Bq-OHVlJ.js → _basePickBy-CnPX6Bdb.js} +23 -23
  3. package/dist/{_baseUniq-DUO9awf7.js → _baseUniq-CQt2p9Xf.js} +40 -40
  4. package/dist/{_baseUniq-CQ7AOjch.cjs → _baseUniq-bHS4L6X9.cjs} +1 -1
  5. package/dist/{arc-BC6Mnh_l.js → arc-B2BtxFI4.js} +1 -1
  6. package/dist/{arc-H_1C-9yW.cjs → arc-Bg-chCuU.cjs} +1 -1
  7. package/dist/{architecture-O4VJ6CD3-Bfi1Y3W3.cjs → architecture-O4VJ6CD3-Bogzr-i1.cjs} +1 -1
  8. package/dist/{architecture-O4VJ6CD3-B2_zBkXA.js → architecture-O4VJ6CD3-DYTHPFXy.js} +1 -1
  9. package/dist/{architectureDiagram-KFL7JDKH-DOaG_WZV.cjs → architectureDiagram-W76B3OCA-BUHj3Zr2.cjs} +1 -1
  10. package/dist/{architectureDiagram-KFL7JDKH-Dzqraep6.js → architectureDiagram-W76B3OCA-Bj05bf6s.js} +132 -132
  11. package/dist/basic-components/typography/typography.d.ts.map +1 -1
  12. package/dist/{blockDiagram-ZYB65J3Q-0TfXbzbL.cjs → blockDiagram-QIGZ2CNN-BAiichlp.cjs} +4 -4
  13. package/dist/{blockDiagram-ZYB65J3Q-BF5gB3wI.js → blockDiagram-QIGZ2CNN-CwpHAq1V.js} +5 -5
  14. package/dist/{c4Diagram-AAMF2YG6-BUdDUCAg.cjs → c4Diagram-FPNF74CW-De8NL9Id.cjs} +4 -4
  15. package/dist/{c4Diagram-AAMF2YG6-CZutQWdQ.js → c4Diagram-FPNF74CW-DiSLBa6J.js} +2 -2
  16. package/dist/channel-C-hM23ua.cjs +1 -0
  17. package/dist/channel-Cn_5XvBc.js +5 -0
  18. package/dist/{chunk-ANTBXLJU-DqW7nBC-.cjs → chunk-4BX2VUAB-D2Fra4jo.cjs} +1 -1
  19. package/dist/{chunk-ANTBXLJU-BdaEgFx7.js → chunk-4BX2VUAB-Dc8D0um4.js} +1 -1
  20. package/dist/{chunk-WVR4S24B-Chw9GJ4r.cjs → chunk-55IACEB6-B9OyHdBl.cjs} +1 -1
  21. package/dist/{chunk-WVR4S24B-DkA4uS4H.js → chunk-55IACEB6-WLFUV7oZ.js} +1 -1
  22. package/dist/{chunk-GLLZNHP4-DiiaqYXe.js → chunk-FMBD7UC4-CB2wfBwS.js} +1 -1
  23. package/dist/{chunk-GLLZNHP4-BA8r1pFP.cjs → chunk-FMBD7UC4-gecPdlnv.cjs} +1 -1
  24. package/dist/{chunk-JBRWN2VN-BaREAv8H.js → chunk-K7UQS3LO-Ct-3gwwe.js} +176 -176
  25. package/dist/chunk-K7UQS3LO-DlKvL8UP.cjs +165 -0
  26. package/dist/{chunk-NRVI72HA-DLE8wk3-.js → chunk-QN33PNHL-D4Q8z0QK.js} +1 -1
  27. package/dist/{chunk-NRVI72HA-DRmCDH9L.cjs → chunk-QN33PNHL-DnwK1wh-.cjs} +1 -1
  28. package/dist/{chunk-FHKO5MBM-CzQq96F_.js → chunk-QZHKN3VN-BQc1ljoT.js} +1 -1
  29. package/dist/{chunk-FHKO5MBM-DXqhRcMm.cjs → chunk-QZHKN3VN-cx48mWRx.cjs} +1 -1
  30. package/dist/{chunk-LXBSTHXV-DFifdLZK.js → chunk-TVAH2DTR-C6i3nG3J.js} +3 -3
  31. package/dist/{chunk-LXBSTHXV-B0scQvN2.cjs → chunk-TVAH2DTR-Cln0v1mj.cjs} +3 -3
  32. package/dist/{chunk-OMD6QJNC-RjSGzdd8.cjs → chunk-TZMSLE5B-B512fbOf.cjs} +1 -1
  33. package/dist/{chunk-OMD6QJNC-BYvyUH2d.js → chunk-TZMSLE5B-Ch4jqMvo.js} +1 -1
  34. package/dist/{classDiagram-3BZAVTQC-BOmQDPcS.cjs → classDiagram-KNZD7YFC-BoArhhwm.cjs} +1 -1
  35. package/dist/{classDiagram-v2-QTMF73CY-CAtFVXFw.js → classDiagram-KNZD7YFC-CDc6SE_W.js} +2 -2
  36. package/dist/{classDiagram-v2-QTMF73CY-BOmQDPcS.cjs → classDiagram-v2-RKCZMP56-BoArhhwm.cjs} +1 -1
  37. package/dist/{classDiagram-3BZAVTQC-CAtFVXFw.js → classDiagram-v2-RKCZMP56-CDc6SE_W.js} +2 -2
  38. package/dist/{clone-B-bAOLls.js → clone-CP0dShvp.js} +1 -1
  39. package/dist/clone-DxIwbnXb.cjs +1 -0
  40. package/dist/cose-bilkent-S5V4N54A-Bx4ACTR3.js +2608 -0
  41. package/dist/cose-bilkent-S5V4N54A-DLiy4Dys.cjs +1 -0
  42. package/dist/{dagre-2BBEFEWP-CLTO8d-K.js → dagre-5GWH7T2D-B_9p1wnG.js} +108 -108
  43. package/dist/{dagre-2BBEFEWP-BCS301Dq.cjs → dagre-5GWH7T2D-XNzFQlw3.cjs} +1 -1
  44. package/dist/{diagram-4IRLE6MV-_WYVJBfL.cjs → diagram-N5W7TBWH-CELy5R0I.cjs} +2 -2
  45. package/dist/{diagram-4IRLE6MV-Cz4wPwXi.js → diagram-N5W7TBWH-DgzCbhxK.js} +23 -23
  46. package/dist/{diagram-RP2FKANI-C_dWK3j7.cjs → diagram-QEK2KX5R-CWUJhJRb.cjs} +4 -4
  47. package/dist/{diagram-RP2FKANI-CXmRNmBu.js → diagram-QEK2KX5R-DDJzGT4e.js} +15 -15
  48. package/dist/{diagram-GUPCWM2R-CH-4x3WD.js → diagram-S2PKOQOG-CGS6jThV.js} +10 -10
  49. package/dist/{diagram-GUPCWM2R-O4fOIHyx.cjs → diagram-S2PKOQOG-CxivHA5Z.cjs} +1 -1
  50. package/dist/{erDiagram-HZWUO2LU-uRisj4mV.cjs → erDiagram-AWTI2OKA-Bm9UKu4a.cjs} +4 -4
  51. package/dist/{erDiagram-HZWUO2LU-Dqt1BE2C.js → erDiagram-AWTI2OKA-uK37swgK.js} +4 -4
  52. package/dist/{flowDiagram-THRYKUMA-bRWo210y.cjs → flowDiagram-PVAE7QVJ-BoifHLur.cjs} +7 -7
  53. package/dist/{flowDiagram-THRYKUMA-C-r5MZds.js → flowDiagram-PVAE7QVJ-CseXgbf4.js} +5 -5
  54. package/dist/{ganttDiagram-WV7ZQ7D5-BVe9Yi12.js → ganttDiagram-OWAHRB6G-DBcQE30n.js} +57 -57
  55. package/dist/{ganttDiagram-WV7ZQ7D5-Dh9UR52T.cjs → ganttDiagram-OWAHRB6G-DxrVdbSN.cjs} +1 -1
  56. package/dist/{gitGraph-ZV4HHKMB-rHh_4sTF.cjs → gitGraph-ZV4HHKMB--W5fvjOe.cjs} +1 -1
  57. package/dist/{gitGraph-ZV4HHKMB-Bwp8pNLp.js → gitGraph-ZV4HHKMB-DI7K1S9a.js} +1 -1
  58. package/dist/{gitGraphDiagram-OJR772UL-Bq60AaCq.cjs → gitGraphDiagram-NY62KEGX-C8IAHC2w.cjs} +4 -4
  59. package/dist/{gitGraphDiagram-OJR772UL-BNm74Q9n.js → gitGraphDiagram-NY62KEGX-_dzUqzP_.js} +4 -4
  60. package/dist/{graph-CMnK4YO3.js → graph-BoeGwTWO.js} +4 -4
  61. package/dist/{graph-BrGj_Gfv.cjs → graph-v1PSEGdd.cjs} +1 -1
  62. package/dist/index-CdZgX2Ma.cjs +301 -0
  63. package/dist/{index-VJw3klPt.js → index-kj0EuvQM.js} +10116 -9505
  64. package/dist/{info-63CPKGFF-0H7FGkBP.cjs → info-63CPKGFF-DExJutq3.cjs} +1 -1
  65. package/dist/info-63CPKGFF-_OKf26EF.js +5 -0
  66. package/dist/{infoDiagram-DDUCL6P7-Cf77NdxY.js → infoDiagram-STP46IZ2-BybsRpjy.js} +2 -2
  67. package/dist/{infoDiagram-DDUCL6P7-DjqD8eRi.cjs → infoDiagram-STP46IZ2-ylOwUZka.cjs} +1 -1
  68. package/dist/{journeyDiagram-FFXJYRFH-DtxrMVYZ.cjs → journeyDiagram-BIP6EPQ6-B8QfAOqB.cjs} +4 -4
  69. package/dist/{journeyDiagram-FFXJYRFH-C7_bJR3c.js → journeyDiagram-BIP6EPQ6-aD-qICsN.js} +4 -4
  70. package/dist/{kanban-definition-KOZQBZVT-Bo9dRDl_.js → kanban-definition-6OIFK2YF-C0EFe9JN.js} +24 -24
  71. package/dist/{kanban-definition-KOZQBZVT-Bel-f3_i.cjs → kanban-definition-6OIFK2YF-Dxddoy_3.cjs} +5 -5
  72. package/dist/ketchup2.cjs.js +1 -1
  73. package/dist/ketchup2.es.js +9 -9
  74. package/dist/{layout-Bt4IJcSa.cjs → layout-CwMglWfT.cjs} +1 -1
  75. package/dist/{layout-kUC11kUc.js → layout-D6agY5Ds.js} +32 -32
  76. package/dist/{linear-BDcEY_LY.js → linear-CHZKZE-6.js} +12 -12
  77. package/dist/{linear-50cMYwZQ.cjs → linear-zcj9uSLT.cjs} +1 -1
  78. package/dist/{mermaid-parser.core-Bxkmx2-5.cjs → mermaid-parser.core-BFoNlVio.cjs} +2 -2
  79. package/dist/{mermaid-parser.core-BnvQOoyE.js → mermaid-parser.core-Blpz4SbD.js} +11 -11
  80. package/dist/mindmap-definition-Q6HEUPPD-BdQ8h5vs.js +755 -0
  81. package/dist/mindmap-definition-Q6HEUPPD-low7Mewd.cjs +68 -0
  82. package/dist/{packet-HUATNLJX-6TXP1bqK.cjs → packet-HUATNLJX-BmvldEFD.cjs} +1 -1
  83. package/dist/{packet-HUATNLJX-DaHhWwAU.js → packet-HUATNLJX-TyfgX3j3.js} +1 -1
  84. package/dist/{pie-WTHONI2E-AzeewyiY.cjs → pie-WTHONI2E-BltdTNxf.cjs} +1 -1
  85. package/dist/pie-WTHONI2E-Dt2hdV7w.js +5 -0
  86. package/dist/{pieDiagram-DBDJKBY4-W8GACAWO.cjs → pieDiagram-ADFJNKIX-CzvxfXwl.cjs} +3 -3
  87. package/dist/{pieDiagram-DBDJKBY4-DBzbWAu9.js → pieDiagram-ADFJNKIX-ExzVUSNO.js} +25 -25
  88. package/dist/{quadrantDiagram-YPSRARAO-BjYPzvUJ.cjs → quadrantDiagram-LMRXKWRM-Bi7EaXZ7.cjs} +1 -1
  89. package/dist/{quadrantDiagram-YPSRARAO-mnX6YljL.js → quadrantDiagram-LMRXKWRM-DqMz0iQn.js} +2 -2
  90. package/dist/radar-NJJJXTRR-BWXgZsQ6.js +5 -0
  91. package/dist/{radar-NJJJXTRR-BocemfZ8.cjs → radar-NJJJXTRR-DduW7l7R.cjs} +1 -1
  92. package/dist/{requirementDiagram-EGVEC5DT-B9Bwf2ay.js → requirementDiagram-4UW4RH46-DykQlAiG.js} +3 -3
  93. package/dist/{requirementDiagram-EGVEC5DT-Bimu3sL7.cjs → requirementDiagram-4UW4RH46-ud4W-Zp9.cjs} +4 -4
  94. package/dist/{sankeyDiagram-HRAUVNP4-DJiyVYTm.cjs → sankeyDiagram-GR3RE2ED-CUj9_a8o.cjs} +1 -1
  95. package/dist/{sankeyDiagram-HRAUVNP4-DzXnX0Ga.js → sankeyDiagram-GR3RE2ED-RK19iv1u.js} +1 -1
  96. package/dist/sequenceDiagram-C3RYC4MD-BuBk17RB.js +2511 -0
  97. package/dist/sequenceDiagram-C3RYC4MD-CcM-9wjX.cjs +145 -0
  98. package/dist/{stateDiagram-UUKSUZ4H-BfB7OKY5.js → stateDiagram-KXAO66HF-C_vpiwWi.js} +4 -4
  99. package/dist/{stateDiagram-UUKSUZ4H-DNsbUQC8.cjs → stateDiagram-KXAO66HF-leA_Ugq1.cjs} +1 -1
  100. package/dist/{stateDiagram-v2-EYPG3UTE-k2P5SO6h.cjs → stateDiagram-v2-UMBNRL4Z-DMn1PJJZ.cjs} +1 -1
  101. package/dist/{stateDiagram-v2-EYPG3UTE-CrbgZXhp.js → stateDiagram-v2-UMBNRL4Z-krzWPwwC.js} +2 -2
  102. package/dist/{timeline-definition-3HZDQTIS-TVmN8Z80.js → timeline-definition-XQNQX7LJ-CbPKkQDk.js} +2 -2
  103. package/dist/{timeline-definition-3HZDQTIS-CJz-ObCi.cjs → timeline-definition-XQNQX7LJ-DbVINiOM.cjs} +1 -1
  104. package/dist/{treemap-75Q7IDZK-CbpJhl6F.js → treemap-75Q7IDZK-CRSsbp2b.js} +1 -1
  105. package/dist/{treemap-75Q7IDZK-MVFNLG-W.cjs → treemap-75Q7IDZK-CcdS7WCH.cjs} +1 -1
  106. package/dist/{xychartDiagram-FDP5SA34-kb-QmiwQ.cjs → xychartDiagram-6GGTOJPD-8fzwt7BJ.cjs} +1 -1
  107. package/dist/{xychartDiagram-FDP5SA34-QzZvVH2o.js → xychartDiagram-6GGTOJPD-CGq5lmkW.js} +2 -2
  108. package/package.json +13 -13
  109. package/dist/channel-D7-lFnTD.js +0 -5
  110. package/dist/channel-DveM5GOL.cjs +0 -1
  111. package/dist/chunk-JBRWN2VN-4oDxplqY.cjs +0 -165
  112. package/dist/clone-C0dQSPFZ.cjs +0 -1
  113. package/dist/index-BA07EijG.cjs +0 -266
  114. package/dist/info-63CPKGFF-CV7HrEKO.js +0 -5
  115. package/dist/mindmap-definition-LNHGMQRG-CVh0vQd5.js +0 -3230
  116. package/dist/mindmap-definition-LNHGMQRG-qQmqPKl8.cjs +0 -95
  117. package/dist/pie-WTHONI2E-Cq9zrqsG.js +0 -5
  118. package/dist/radar-NJJJXTRR-Yz9jsEDT.js +0 -5
  119. package/dist/sequenceDiagram-4MX5Z3NR-DHUCnBgG.cjs +0 -122
  120. package/dist/sequenceDiagram-4MX5Z3NR-DuaMVfG7.js +0 -2281
@@ -0,0 +1,145 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("./chunk-TZMSLE5B-B512fbOf.cjs"),i=require("./index-CdZgX2Ma.cjs"),ne=require("./chunk-QZHKN3VN-cx48mWRx.cjs");var Ot=function(){var e=i.__name(function(ot,w,L,v){for(L=L||{},v=ot.length;v--;L[ot[v]]=w);return L},"o"),t=[1,2],o=[1,3],a=[1,4],r=[2,4],n=[1,9],l=[1,11],d=[1,13],c=[1,14],s=[1,16],u=[1,17],f=[1,18],x=[1,24],m=[1,25],E=[1,26],b=[1,27],A=[1,28],P=[1,29],N=[1,30],C=[1,31],O=[1,32],F=[1,33],q=[1,34],X=[1,35],j=[1,36],z=[1,37],H=[1,38],W=[1,39],R=[1,41],Q=[1,42],K=[1,43],Z=[1,44],tt=[1,45],M=[1,46],T=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,55,60,61,62,63,71],I=[2,71],U=[4,5,16,50,52,53],J=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],S=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,55,60,61,62,63,71],Nt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,55,60,61,62,63,71],Yt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,55,60,61,62,63,71],st=[69,70,71],it=[1,127],St={trace:i.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,actor_with_config:54,note:55,placement:56,text2:57,over:58,actor_pair:59,links:60,link:61,properties:62,details:63,spaceList:64,",":65,left_of:66,right_of:67,signaltype:68,"+":69,"-":70,ACTOR:71,config_object:72,CONFIG_START:73,CONFIG_CONTENT:74,CONFIG_END:75,SOLID_OPEN_ARROW:76,DOTTED_OPEN_ARROW:77,SOLID_ARROW:78,BIDIRECTIONAL_SOLID_ARROW:79,DOTTED_ARROW:80,BIDIRECTIONAL_DOTTED_ARROW:81,SOLID_CROSS:82,DOTTED_CROSS:83,SOLID_POINT:84,DOTTED_POINT:85,TXT:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",55:"note",58:"over",60:"links",61:"link",62:"properties",63:"details",65:",",66:"left_of",67:"right_of",69:"+",70:"-",71:"ACTOR",73:"CONFIG_START",74:"CONFIG_CONTENT",75:"CONFIG_END",76:"SOLID_OPEN_ARROW",77:"DOTTED_OPEN_ARROW",78:"SOLID_ARROW",79:"BIDIRECTIONAL_SOLID_ARROW",80:"DOTTED_ARROW",81:"BIDIRECTIONAL_DOTTED_ARROW",82:"SOLID_CROSS",83:"DOTTED_CROSS",84:"SOLID_POINT",85:"DOTTED_POINT",86:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[64,2],[64,1],[59,3],[59,1],[56,1],[56,1],[17,5],[17,5],[17,4],[54,2],[72,3],[22,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[57,1]],performAction:i.__name(function(w,L,v,y,D,p,Tt){var g=p.length-1;switch(D){case 3:return y.apply(p[g]),p[g];case 4:case 9:this.$=[];break;case 5:case 10:p[g-1].push(p[g]),this.$=p[g-1];break;case 6:case 7:case 11:case 12:this.$=p[g];break;case 8:case 13:this.$=[];break;case 15:p[g].type="createParticipant",this.$=p[g];break;case 16:p[g-1].unshift({type:"boxStart",boxData:y.parseBoxData(p[g-2])}),p[g-1].push({type:"boxEnd",boxText:p[g-2]}),this.$=p[g-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(p[g-2]),sequenceIndexStep:Number(p[g-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(p[g-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:p[g-1].actor};break;case 23:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:p[g-1].actor};break;case 29:y.setDiagramTitle(p[g].substring(6)),this.$=p[g].substring(6);break;case 30:y.setDiagramTitle(p[g].substring(7)),this.$=p[g].substring(7);break;case 31:this.$=p[g].trim(),y.setAccTitle(this.$);break;case 32:case 33:this.$=p[g].trim(),y.setAccDescription(this.$);break;case 34:p[g-1].unshift({type:"loopStart",loopText:y.parseMessage(p[g-2]),signalType:y.LINETYPE.LOOP_START}),p[g-1].push({type:"loopEnd",loopText:p[g-2],signalType:y.LINETYPE.LOOP_END}),this.$=p[g-1];break;case 35:p[g-1].unshift({type:"rectStart",color:y.parseMessage(p[g-2]),signalType:y.LINETYPE.RECT_START}),p[g-1].push({type:"rectEnd",color:y.parseMessage(p[g-2]),signalType:y.LINETYPE.RECT_END}),this.$=p[g-1];break;case 36:p[g-1].unshift({type:"optStart",optText:y.parseMessage(p[g-2]),signalType:y.LINETYPE.OPT_START}),p[g-1].push({type:"optEnd",optText:y.parseMessage(p[g-2]),signalType:y.LINETYPE.OPT_END}),this.$=p[g-1];break;case 37:p[g-1].unshift({type:"altStart",altText:y.parseMessage(p[g-2]),signalType:y.LINETYPE.ALT_START}),p[g-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=p[g-1];break;case 38:p[g-1].unshift({type:"parStart",parText:y.parseMessage(p[g-2]),signalType:y.LINETYPE.PAR_START}),p[g-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=p[g-1];break;case 39:p[g-1].unshift({type:"parStart",parText:y.parseMessage(p[g-2]),signalType:y.LINETYPE.PAR_OVER_START}),p[g-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=p[g-1];break;case 40:p[g-1].unshift({type:"criticalStart",criticalText:y.parseMessage(p[g-2]),signalType:y.LINETYPE.CRITICAL_START}),p[g-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=p[g-1];break;case 41:p[g-1].unshift({type:"breakStart",breakText:y.parseMessage(p[g-2]),signalType:y.LINETYPE.BREAK_START}),p[g-1].push({type:"breakEnd",optText:y.parseMessage(p[g-2]),signalType:y.LINETYPE.BREAK_END}),this.$=p[g-1];break;case 43:this.$=p[g-3].concat([{type:"option",optionText:y.parseMessage(p[g-1]),signalType:y.LINETYPE.CRITICAL_OPTION},p[g]]);break;case 45:this.$=p[g-3].concat([{type:"and",parText:y.parseMessage(p[g-1]),signalType:y.LINETYPE.PAR_AND},p[g]]);break;case 47:this.$=p[g-3].concat([{type:"else",altText:y.parseMessage(p[g-1]),signalType:y.LINETYPE.ALT_ELSE},p[g]]);break;case 48:p[g-3].draw="participant",p[g-3].type="addParticipant",p[g-3].description=y.parseMessage(p[g-1]),this.$=p[g-3];break;case 49:p[g-1].draw="participant",p[g-1].type="addParticipant",this.$=p[g-1];break;case 50:p[g-3].draw="actor",p[g-3].type="addParticipant",p[g-3].description=y.parseMessage(p[g-1]),this.$=p[g-3];break;case 51:p[g-1].draw="actor",p[g-1].type="addParticipant",this.$=p[g-1];break;case 52:p[g-1].type="destroyParticipant",this.$=p[g-1];break;case 53:p[g-1].draw="participant",p[g-1].type="addParticipant",this.$=p[g-1];break;case 54:this.$=[p[g-1],{type:"addNote",placement:p[g-2],actor:p[g-1].actor,text:p[g]}];break;case 55:p[g-2]=[].concat(p[g-1],p[g-1]).slice(0,2),p[g-2][0]=p[g-2][0].actor,p[g-2][1]=p[g-2][1].actor,this.$=[p[g-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:p[g-2].slice(0,2),text:p[g]}];break;case 56:this.$=[p[g-1],{type:"addLinks",actor:p[g-1].actor,text:p[g]}];break;case 57:this.$=[p[g-1],{type:"addALink",actor:p[g-1].actor,text:p[g]}];break;case 58:this.$=[p[g-1],{type:"addProperties",actor:p[g-1].actor,text:p[g]}];break;case 59:this.$=[p[g-1],{type:"addDetails",actor:p[g-1].actor,text:p[g]}];break;case 62:this.$=[p[g-2],p[g]];break;case 63:this.$=p[g];break;case 64:this.$=y.PLACEMENT.LEFTOF;break;case 65:this.$=y.PLACEMENT.RIGHTOF;break;case 66:this.$=[p[g-4],p[g-1],{type:"addMessage",from:p[g-4].actor,to:p[g-1].actor,signalType:p[g-3],msg:p[g],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:p[g-1].actor}];break;case 67:this.$=[p[g-4],p[g-1],{type:"addMessage",from:p[g-4].actor,to:p[g-1].actor,signalType:p[g-3],msg:p[g]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:p[g-4].actor}];break;case 68:this.$=[p[g-3],p[g-1],{type:"addMessage",from:p[g-3].actor,to:p[g-1].actor,signalType:p[g-2],msg:p[g]}];break;case 69:this.$={type:"addParticipant",actor:p[g-1],config:p[g]};break;case 70:this.$=p[g-1].trim();break;case 71:this.$={type:"addParticipant",actor:p[g]};break;case 72:this.$=y.LINETYPE.SOLID_OPEN;break;case 73:this.$=y.LINETYPE.DOTTED_OPEN;break;case 74:this.$=y.LINETYPE.SOLID;break;case 75:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 76:this.$=y.LINETYPE.DOTTED;break;case 77:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 78:this.$=y.LINETYPE.SOLID_CROSS;break;case 79:this.$=y.LINETYPE.DOTTED_CROSS;break;case 80:this.$=y.LINETYPE.SOLID_POINT;break;case 81:this.$=y.LINETYPE.DOTTED_POINT;break;case 82:this.$=y.parseMessage(p[g].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:o,6:a},{1:[3]},{3:5,4:t,5:o,6:a},{3:6,4:t,5:o,6:a},e([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:l,8:8,9:10,12:12,13:d,14:c,17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:E,33:b,35:A,36:P,37:N,38:C,39:O,41:F,43:q,44:X,46:j,50:z,52:H,53:W,55:R,60:Q,61:K,62:Z,63:tt,71:M},e(T,[2,5]),{9:47,12:12,13:d,14:c,17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:E,33:b,35:A,36:P,37:N,38:C,39:O,41:F,43:q,44:X,46:j,50:z,52:H,53:W,55:R,60:Q,61:K,62:Z,63:tt,71:M},e(T,[2,7]),e(T,[2,8]),e(T,[2,14]),{12:48,50:z,52:H,53:W},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:M},{22:55,71:M},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},e(T,[2,29]),e(T,[2,30]),{32:[1,61]},{34:[1,62]},e(T,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,54:72,71:[1,73]},{22:74,71:M},{22:75,71:M},{68:76,76:[1,77],77:[1,78],78:[1,79],79:[1,80],80:[1,81],81:[1,82],82:[1,83],83:[1,84],84:[1,85],85:[1,86]},{56:87,58:[1,88],66:[1,89],67:[1,90]},{22:91,71:M},{22:92,71:M},{22:93,71:M},{22:94,71:M},e([5,51,65,76,77,78,79,80,81,82,83,84,85,86],I),e(T,[2,6]),e(T,[2,15]),e(U,[2,9],{10:95}),e(T,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},e(T,[2,21]),{5:[1,99]},{5:[1,100]},e(T,[2,24]),e(T,[2,25]),e(T,[2,26]),e(T,[2,27]),e(T,[2,28]),e(T,[2,31]),e(T,[2,32]),e(J,r,{7:101}),e(J,r,{7:102}),e(J,r,{7:103}),e(S,r,{40:104,7:105}),e(Nt,r,{42:106,7:107}),e(Nt,r,{7:107,42:108}),e(Yt,r,{45:109,7:110}),e(J,r,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},e([5,51],I,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:M},e(st,[2,72]),e(st,[2,73]),e(st,[2,74]),e(st,[2,75]),e(st,[2,76]),e(st,[2,77]),e(st,[2,78]),e(st,[2,79]),e(st,[2,80]),e(st,[2,81]),{22:123,71:M},{22:125,59:124,71:M},{71:[2,64]},{71:[2,65]},{57:126,86:it},{57:128,86:it},{57:129,86:it},{57:130,86:it},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:z,52:H,53:W},{5:[1,136]},e(T,[2,19]),e(T,[2,20]),e(T,[2,22]),e(T,[2,23]),{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[1,137],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:E,33:b,35:A,36:P,37:N,38:C,39:O,41:F,43:q,44:X,46:j,50:z,52:H,53:W,55:R,60:Q,61:K,62:Z,63:tt,71:M},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[1,138],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:E,33:b,35:A,36:P,37:N,38:C,39:O,41:F,43:q,44:X,46:j,50:z,52:H,53:W,55:R,60:Q,61:K,62:Z,63:tt,71:M},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[1,139],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:E,33:b,35:A,36:P,37:N,38:C,39:O,41:F,43:q,44:X,46:j,50:z,52:H,53:W,55:R,60:Q,61:K,62:Z,63:tt,71:M},{16:[1,140]},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[2,46],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:E,33:b,35:A,36:P,37:N,38:C,39:O,41:F,43:q,44:X,46:j,49:[1,141],50:z,52:H,53:W,55:R,60:Q,61:K,62:Z,63:tt,71:M},{16:[1,142]},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[2,44],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:E,33:b,35:A,36:P,37:N,38:C,39:O,41:F,43:q,44:X,46:j,48:[1,143],50:z,52:H,53:W,55:R,60:Q,61:K,62:Z,63:tt,71:M},{16:[1,144]},{16:[1,145]},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[2,42],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:E,33:b,35:A,36:P,37:N,38:C,39:O,41:F,43:q,44:X,46:j,47:[1,146],50:z,52:H,53:W,55:R,60:Q,61:K,62:Z,63:tt,71:M},{4:n,5:l,8:8,9:10,12:12,13:d,14:c,16:[1,147],17:15,18:s,21:u,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:x,30:m,31:E,33:b,35:A,36:P,37:N,38:C,39:O,41:F,43:q,44:X,46:j,50:z,52:H,53:W,55:R,60:Q,61:K,62:Z,63:tt,71:M},{15:[1,148]},e(T,[2,49]),e(T,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},e(T,[2,51]),e(T,[2,52]),{22:151,71:M},{22:152,71:M},{57:153,86:it},{57:154,86:it},{57:155,86:it},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},e(T,[2,16]),e(U,[2,10]),{12:157,50:z,52:H,53:W},e(U,[2,12]),e(U,[2,13]),e(T,[2,18]),e(T,[2,34]),e(T,[2,35]),e(T,[2,36]),e(T,[2,37]),{15:[1,158]},e(T,[2,38]),{15:[1,159]},e(T,[2,39]),e(T,[2,40]),{15:[1,160]},e(T,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:it},{57:165,86:it},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:M},e(U,[2,11]),e(S,r,{7:105,40:167}),e(Nt,r,{7:107,42:168}),e(Yt,r,{7:110,45:169}),e(T,[2,48]),{5:[2,70]},e(T,[2,50]),{5:[2,66]},{5:[2,67]},{86:[2,62]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],89:[2,64],90:[2,65],115:[2,69],126:[2,56],127:[2,82],128:[2,57],129:[2,58],130:[2,59],153:[2,68],154:[2,54],155:[2,55],162:[2,70],164:[2,66],165:[2,67],166:[2,62],167:[2,47],168:[2,45],169:[2,43]},parseError:i.__name(function(w,L){if(L.recoverable)this.trace(w);else{var v=new Error(w);throw v.hash=L,v}},"parseError"),parse:i.__name(function(w){var L=this,v=[0],y=[],D=[null],p=[],Tt=this.table,g="",bt=0,Wt=0,ae=2,Ft=1,se=p.slice.call(arguments,1),Y=Object.create(this.lexer),dt={yy:{}};for(var Mt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Mt)&&(dt.yy[Mt]=this.yy[Mt]);Y.setInput(w,dt.yy),dt.yy.lexer=Y,dt.yy.parser=this,typeof Y.yylloc>"u"&&(Y.yylloc={});var Rt=Y.yylloc;p.push(Rt);var ie=Y.options&&Y.options.ranges;typeof dt.yy.parseError=="function"?this.parseError=dt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re($){v.length=v.length-2*$,D.length=D.length-$,p.length=p.length-$}i.__name(re,"popStack");function qt(){var $;return $=y.pop()||Y.lex()||Ft,typeof $!="number"&&($ instanceof Array&&(y=$,$=y.pop()),$=L.symbols_[$]||$),$}i.__name(qt,"lex");for(var G,pt,et,Dt,ft={},wt,rt,zt,vt;;){if(pt=v[v.length-1],this.defaultActions[pt]?et=this.defaultActions[pt]:((G===null||typeof G>"u")&&(G=qt()),et=Tt[pt]&&Tt[pt][G]),typeof et>"u"||!et.length||!et[0]){var Ct="";vt=[];for(wt in Tt[pt])this.terminals_[wt]&&wt>ae&&vt.push("'"+this.terminals_[wt]+"'");Y.showPosition?Ct="Parse error on line "+(bt+1)+`:
2
+ `+Y.showPosition()+`
3
+ Expecting `+vt.join(", ")+", got '"+(this.terminals_[G]||G)+"'":Ct="Parse error on line "+(bt+1)+": Unexpected "+(G==Ft?"end of input":"'"+(this.terminals_[G]||G)+"'"),this.parseError(Ct,{text:Y.match,token:this.terminals_[G]||G,line:Y.yylineno,loc:Rt,expected:vt})}if(et[0]instanceof Array&&et.length>1)throw new Error("Parse Error: multiple actions possible at state: "+pt+", token: "+G);switch(et[0]){case 1:v.push(G),D.push(Y.yytext),p.push(Y.yylloc),v.push(et[1]),G=null,Wt=Y.yyleng,g=Y.yytext,bt=Y.yylineno,Rt=Y.yylloc;break;case 2:if(rt=this.productions_[et[1]][1],ft.$=D[D.length-rt],ft._$={first_line:p[p.length-(rt||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(rt||1)].first_column,last_column:p[p.length-1].last_column},ie&&(ft._$.range=[p[p.length-(rt||1)].range[0],p[p.length-1].range[1]]),Dt=this.performAction.apply(ft,[g,Wt,bt,dt.yy,et[1],D,p].concat(se)),typeof Dt<"u")return Dt;rt&&(v=v.slice(0,-1*rt*2),D=D.slice(0,-1*rt),p=p.slice(0,-1*rt)),v.push(this.productions_[et[1]][0]),D.push(ft.$),p.push(ft._$),zt=Tt[v[v.length-2]][v[v.length-1]],v.push(zt);break;case 3:return!0}}return!0},"parse")},ee=function(){var ot={EOF:1,parseError:i.__name(function(L,v){if(this.yy.parser)this.yy.parser.parseError(L,v);else throw new Error(L)},"parseError"),setInput:i.__name(function(w,L){return this.yy=L||this.yy||{},this._input=w,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:i.__name(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var L=w.match(/(?:\r\n?|\n).*/g);return L?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:i.__name(function(w){var L=w.length,v=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),v.length-1&&(this.yylineno-=v.length-1);var D=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:v?(v.length===y.length?this.yylloc.first_column:0)+y[y.length-v.length].length-v[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-L]),this.yyleng=this.yytext.length,this},"unput"),more:i.__name(function(){return this._more=!0,this},"more"),reject:i.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:i.__name(function(w){this.unput(this.match.slice(w))},"less"),pastInput:i.__name(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i.__name(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i.__name(function(){var w=this.pastInput(),L=new Array(w.length+1).join("-");return w+this.upcomingInput()+`
5
+ `+L+"^"},"showPosition"),test_match:i.__name(function(w,L){var v,y,D;if(this.options.backtrack_lexer&&(D={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(D.yylloc.range=this.yylloc.range.slice(0))),y=w[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+w[0].length},this.yytext+=w[0],this.match+=w[0],this.matches=w,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(w[0].length),this.matched+=w[0],v=this.performAction.call(this,this.yy,this,L,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var p in D)this[p]=D[p];return!1}return!1},"test_match"),next:i.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,L,v,y;this._more||(this.yytext="",this.match="");for(var D=this._currentRules(),p=0;p<D.length;p++)if(v=this._input.match(this.rules[D[p]]),v&&(!L||v[0].length>L[0].length)){if(L=v,y=p,this.options.backtrack_lexer){if(w=this.test_match(v,D[p]),w!==!1)return w;if(this._backtrack){L=!1;continue}else return!1}else if(!this.options.flex)break}return L?(w=this.test_match(L,D[y]),w!==!1?w:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:i.__name(function(){var L=this.next();return L||this.lex()},"lex"),begin:i.__name(function(L){this.conditionStack.push(L)},"begin"),popState:i.__name(function(){var L=this.conditionStack.length-1;return L>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:i.__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:i.__name(function(L){return L=this.conditionStack.length-1-Math.abs(L||0),L>=0?this.conditionStack[L]:"INITIAL"},"topState"),pushState:i.__name(function(L){this.begin(L)},"pushState"),stateStackSize:i.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:i.__name(function(L,v,y,D){switch(y){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("CONFIG"),73;case 8:return 74;case 9:return this.popState(),this.popState(),75;case 10:return v.yytext=v.yytext.trim(),71;case 11:return v.yytext=v.yytext.trim(),this.begin("ALIAS"),71;case 12:return this.begin("LINE"),14;case 13:return this.begin("ID"),50;case 14:return this.begin("ID"),52;case 15:return 13;case 16:return this.begin("ID"),53;case 17:return v.yytext=v.yytext.trim(),this.begin("ALIAS"),71;case 18:return this.popState(),this.popState(),this.begin("LINE"),51;case 19:return this.popState(),this.popState(),5;case 20:return this.begin("LINE"),36;case 21:return this.begin("LINE"),37;case 22:return this.begin("LINE"),38;case 23:return this.begin("LINE"),39;case 24:return this.begin("LINE"),49;case 25:return this.begin("LINE"),41;case 26:return this.begin("LINE"),43;case 27:return this.begin("LINE"),48;case 28:return this.begin("LINE"),44;case 29:return this.begin("LINE"),47;case 30:return this.begin("LINE"),46;case 31:return this.popState(),15;case 32:return 16;case 33:return 66;case 34:return 67;case 35:return 60;case 36:return 61;case 37:return 62;case 38:return 63;case 39:return 58;case 40:return 55;case 41:return this.begin("ID"),21;case 42:return this.begin("ID"),23;case 43:return 29;case 44:return 30;case 45:return this.begin("acc_title"),31;case 46:return this.popState(),"acc_title_value";case 47:return this.begin("acc_descr"),33;case 48:return this.popState(),"acc_descr_value";case 49:this.begin("acc_descr_multiline");break;case 50:this.popState();break;case 51:return"acc_descr_multiline_value";case 52:return 6;case 53:return 18;case 54:return 20;case 55:return 65;case 56:return 5;case 57:return v.yytext=v.yytext.trim(),71;case 58:return 78;case 59:return 79;case 60:return 80;case 61:return 81;case 62:return 76;case 63:return 77;case 64:return 82;case 65:return 83;case 66:return 84;case 67:return 85;case 68:return 86;case 69:return 86;case 70:return 69;case 71:return 70;case 72:return 5;case 73:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^\<->\->:\n,;@]+?([\-]*[^\<->\->:\n,;@]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^<\->\->:\n,;]+?([\-]*[^<\->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[50,51],inclusive:!1},acc_descr:{rules:[48],inclusive:!1},acc_title:{rules:[46],inclusive:!1},ID:{rules:[2,3,7,10,11,17],inclusive:!1},ALIAS:{rules:[2,3,18,19],inclusive:!1},LINE:{rules:[2,3,31],inclusive:!1},CONFIG:{rules:[8,9],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,12,13,14,15,16,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,49,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73],inclusive:!0}}};return ot}();St.lexer=ee;function Et(){this.yy={}}return i.__name(Et,"Parser"),Et.prototype=St,St.Parser=Et,new Et}();Ot.parser=Ot;var oe=Ot,ce={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},le={FILLED:0,OPEN:1},he={LEFTOF:0,RIGHTOF:1,OVER:2},It={ACTOR:"actor",CONTROL:"control",DATABASE:"database",ENTITY:"entity"},mt,de=(mt=class{constructor(){this.state=new ne.ImperativeState(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=i.setAccTitle,this.setAccDescription=i.setAccDescription,this.setDiagramTitle=i.setDiagramTitle,this.getAccTitle=i.getAccTitle,this.getAccDescription=i.getAccDescription,this.getDiagramTitle=i.getDiagramTitle,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(i.getConfig2().wrap),this.LINETYPE=ce,this.ARROWTYPE=le,this.PLACEMENT=he}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,o,a,r,n){let l=this.state.records.currentBox,d;if(n!==void 0){let s;n.includes(`
7
+ `)?s=n+`
8
+ `:s=`{
9
+ `+n+`
10
+ }`,d=i.load(s,{schema:i.JSON_SCHEMA})}r=d?.type??r;const c=this.state.records.actors.get(t);if(c){if(this.state.records.currentBox&&c.box&&this.state.records.currentBox!==c.box)throw new Error(`A same participant should only be defined in one Box: ${c.name} can't be in '${c.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(l=c.box?c.box:this.state.records.currentBox,c.box=l,c&&o===c.name&&a==null)return}if(a?.text==null&&(a={text:o,type:r}),(r==null||a.text==null)&&(a={text:o,type:r}),this.state.records.actors.set(t,{box:l,name:o,description:a.text,wrap:a.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??"participant"}),this.state.records.prevActor){const s=this.state.records.actors.get(this.state.records.prevActor);s&&(s.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let o,a=0;if(!t)return 0;for(o=0;o<this.state.records.messages.length;o++)this.state.records.messages[o].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[o].from===t&&a++,this.state.records.messages[o].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[o].from===t&&a--;return a}addMessage(t,o,a,r){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:o,message:a.text,wrap:a.wrap??this.autoWrap(),answer:r})}addSignal(t,o,a,r,n=!1){if(r===this.LINETYPE.ACTIVE_END&&this.activationCount(t??"")<1){const d=new Error("Trying to inactivate an inactive participant ("+t+")");throw d.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},d}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:o,message:a?.text??"",wrap:a?.wrap??this.autoWrap(),type:r,activate:n}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(t===void 0)return{};t=t.trim();const o=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(o===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:o}}autoWrap(){return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:i.getConfig2().sequence?.wrap??!1}clear(){this.state.reset(),i.clear()}parseMessage(t){const o=t.trim(),{wrap:a,cleanedText:r}=this.extractWrap(o),n={text:r,wrap:a};return i.log.debug(`parseMessage: ${JSON.stringify(n)}`),n}parseBoxData(t){const o=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let a=o?.[1]?o[1].trim():"transparent",r=o?.[2]?o[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",a)||(a="transparent",r=t.trim());else{const d=new Option().style;d.color=a,d.color!==a&&(a="transparent",r=t.trim())}const{wrap:n,cleanedText:l}=this.extractWrap(r);return{text:l?i.sanitizeText(l,i.getConfig2()):void 0,color:a,wrap:n}}addNote(t,o,a){const r={actor:t,placement:o,message:a.text,wrap:a.wrap??this.autoWrap()},n=[].concat(t,t);this.state.records.notes.push(r),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:n[0],to:n[1],message:a.text,wrap:a.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:o})}addLinks(t,o){const a=this.getActor(t);try{let r=i.sanitizeText(o.text,i.getConfig2());r=r.replace(/&equals;/g,"="),r=r.replace(/&amp;/g,"&");const n=JSON.parse(r);this.insertLinks(a,n)}catch(r){i.log.error("error while parsing actor link text",r)}}addALink(t,o){const a=this.getActor(t);try{const r={};let n=i.sanitizeText(o.text,i.getConfig2());const l=n.indexOf("@");n=n.replace(/&equals;/g,"="),n=n.replace(/&amp;/g,"&");const d=n.slice(0,l-1).trim(),c=n.slice(l+1).trim();r[d]=c,this.insertLinks(a,r)}catch(r){i.log.error("error while parsing actor link text",r)}}insertLinks(t,o){if(t.links==null)t.links=o;else for(const a in o)t.links[a]=o[a]}addProperties(t,o){const a=this.getActor(t);try{const r=i.sanitizeText(o.text,i.getConfig2()),n=JSON.parse(r);this.insertProperties(a,n)}catch(r){i.log.error("error while parsing actor properties text",r)}}insertProperties(t,o){if(t.properties==null)t.properties=o;else for(const a in o)t.properties[a]=o[a]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,o){const a=this.getActor(t),r=document.getElementById(o.text);try{const n=r.innerHTML,l=JSON.parse(n);l.properties&&this.insertProperties(a,l.properties),l.links&&this.insertLinks(a,l.links)}catch(n){i.log.error("error while parsing actor details text",n)}}getActorProperty(t,o){if(t?.properties!==void 0)return t.properties[o]}apply(t){if(Array.isArray(t))t.forEach(o=>{this.apply(o)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":i.setAccTitle(t.text);break;case"parStart":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break}}getConfig(){return i.getConfig2().sequence}},i.__name(mt,"SequenceDB"),mt),pe=i.__name(e=>`.actor {
11
+ stroke: ${e.actorBorder};
12
+ fill: ${e.actorBkg};
13
+ }
14
+
15
+ text.actor > tspan {
16
+ fill: ${e.actorTextColor};
17
+ stroke: none;
18
+ }
19
+
20
+ .actor-line {
21
+ stroke: ${e.actorLineColor};
22
+ }
23
+
24
+ .innerArc {
25
+ stroke-width: 1.5;
26
+ stroke-dasharray: none;
27
+ }
28
+
29
+ .messageLine0 {
30
+ stroke-width: 1.5;
31
+ stroke-dasharray: none;
32
+ stroke: ${e.signalColor};
33
+ }
34
+
35
+ .messageLine1 {
36
+ stroke-width: 1.5;
37
+ stroke-dasharray: 2, 2;
38
+ stroke: ${e.signalColor};
39
+ }
40
+
41
+ #arrowhead path {
42
+ fill: ${e.signalColor};
43
+ stroke: ${e.signalColor};
44
+ }
45
+
46
+ .sequenceNumber {
47
+ fill: ${e.sequenceNumberColor};
48
+ }
49
+
50
+ #sequencenumber {
51
+ fill: ${e.signalColor};
52
+ }
53
+
54
+ #crosshead path {
55
+ fill: ${e.signalColor};
56
+ stroke: ${e.signalColor};
57
+ }
58
+
59
+ .messageText {
60
+ fill: ${e.signalTextColor};
61
+ stroke: none;
62
+ }
63
+
64
+ .labelBox {
65
+ stroke: ${e.labelBoxBorderColor};
66
+ fill: ${e.labelBoxBkgColor};
67
+ }
68
+
69
+ .labelText, .labelText > tspan {
70
+ fill: ${e.labelTextColor};
71
+ stroke: none;
72
+ }
73
+
74
+ .loopText, .loopText > tspan {
75
+ fill: ${e.loopTextColor};
76
+ stroke: none;
77
+ }
78
+
79
+ .loopLine {
80
+ stroke-width: 2px;
81
+ stroke-dasharray: 2, 2;
82
+ stroke: ${e.labelBoxBorderColor};
83
+ fill: ${e.labelBoxBorderColor};
84
+ }
85
+
86
+ .note {
87
+ //stroke: #decc93;
88
+ stroke: ${e.noteBorderColor};
89
+ fill: ${e.noteBkgColor};
90
+ }
91
+
92
+ .noteText, .noteText > tspan {
93
+ fill: ${e.noteTextColor};
94
+ stroke: none;
95
+ }
96
+
97
+ .activation0 {
98
+ fill: ${e.activationBkgColor};
99
+ stroke: ${e.activationBorderColor};
100
+ }
101
+
102
+ .activation1 {
103
+ fill: ${e.activationBkgColor};
104
+ stroke: ${e.activationBorderColor};
105
+ }
106
+
107
+ .activation2 {
108
+ fill: ${e.activationBkgColor};
109
+ stroke: ${e.activationBorderColor};
110
+ }
111
+
112
+ .actorPopupMenu {
113
+ position: absolute;
114
+ }
115
+
116
+ .actorPopupMenuPanel {
117
+ position: absolute;
118
+ fill: ${e.actorBkg};
119
+ box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
120
+ filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
121
+ }
122
+ .actor-man line {
123
+ stroke: ${e.actorBorder};
124
+ fill: ${e.actorBkg};
125
+ }
126
+ .actor-man circle, line {
127
+ stroke: ${e.actorBorder};
128
+ fill: ${e.actorBkg};
129
+ stroke-width: 2px;
130
+ }
131
+
132
+ `,"getStyles"),ue=pe,ut=18*2,lt="actor-top",ht="actor-bottom",At="actor-box",ct="actor-man",yt=i.__name(function(e,t){return V.drawRect(e,t)},"drawRect"),ge=i.__name(function(e,t,o,a,r){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};const n=t.links,l=t.actorCnt,d=t.rectData;var c="none";r&&(c="block !important");const s=e.append("g");s.attr("id","actor"+l+"_popup"),s.attr("class","actorPopupMenu"),s.attr("display",c);var u="";d.class!==void 0&&(u=" "+d.class);let f=d.width>o?d.width:o;const x=s.append("rect");if(x.attr("class","actorPopupMenuPanel"+u),x.attr("x",d.x),x.attr("y",d.height),x.attr("fill",d.fill),x.attr("stroke",d.stroke),x.attr("width",f),x.attr("height",d.height),x.attr("rx",d.rx),x.attr("ry",d.ry),n!=null){var m=20;for(let A in n){var E=s.append("a"),b=i.distExports.sanitizeUrl(n[A]);E.attr("xlink:href",b),E.attr("target","_blank"),Oe(a)(A,E,d.x+10,d.height+m,f,20,{class:"actor"},a),m+=30}}return x.attr("height",m),{height:d.height+m,width:f}},"drawPopup"),kt=i.__name(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Lt=i.__name(async function(e,t,o=null){let a=e.append("foreignObject");const r=await i.renderKatexSanitized(t.text,i.getConfig()),l=a.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(r).node().getBoundingClientRect();if(a.attr("height",Math.round(l.height)).attr("width",Math.round(l.width)),t.class==="noteText"){const d=e.node().firstChild;d.setAttribute("height",l.height+2*t.textMargin);const c=d.getBBox();a.attr("x",Math.round(c.x+c.width/2-l.width/2)).attr("y",Math.round(c.y+c.height/2-l.height/2))}else if(o){let{startx:d,stopx:c,starty:s}=o;if(d>c){const u=d;d=c,c=u}a.attr("x",Math.round(d+Math.abs(d-c)/2-l.width/2)),t.class==="loopText"?a.attr("y",Math.round(s)):a.attr("y",Math.round(s-l.height))}return[a]},"drawKatex"),_t=i.__name(function(e,t){let o=0,a=0;const r=t.text.split(i.common_default.lineBreakRegex),[n,l]=i.parseFontSize(t.fontSize);let d=[],c=0,s=i.__name(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":s=i.__name(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":s=i.__name(()=>Math.round(t.y+(o+a+t.textMargin)/2),"yfunc");break;case"bottom":case"end":s=i.__name(()=>Math.round(t.y+(o+a+2*t.textMargin)-t.textMargin),"yfunc");break}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="middle",t.alignmentBaseline="middle";break}for(let[u,f]of r.entries()){t.textMargin!==void 0&&t.textMargin===0&&n!==void 0&&(c=u*n);const x=e.append("text");x.attr("x",t.x),x.attr("y",s()),t.anchor!==void 0&&x.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&x.style("font-family",t.fontFamily),l!==void 0&&x.style("font-size",l),t.fontWeight!==void 0&&x.style("font-weight",t.fontWeight),t.fill!==void 0&&x.attr("fill",t.fill),t.class!==void 0&&x.attr("class",t.class),t.dy!==void 0?x.attr("dy",t.dy):c!==0&&x.attr("dy",c);const m=f||i.ZERO_WIDTH_SPACE;if(t.tspan){const E=x.append("tspan");E.attr("x",t.x),t.fill!==void 0&&E.attr("fill",t.fill),E.text(m)}else x.text(m);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(a+=(x._groups||x)[0][0].getBBox().height,o=a),d.push(x)}return d},"drawText"),Kt=i.__name(function(e,t){function o(r,n,l,d,c){return r+","+n+" "+(r+l)+","+n+" "+(r+l)+","+(n+d-c)+" "+(r+l-c*1.2)+","+(n+d)+" "+r+","+(n+d)}i.__name(o,"genPoints");const a=e.append("polygon");return a.attr("points",o(t.x,t.y,t.width,t.height,7)),a.attr("class","labelBox"),t.y=t.y+t.height/2,_t(e,t),a},"drawLabel"),k=-1,Ut=i.__name((e,t,o,a)=>{e.select&&o.forEach(r=>{const n=t.get(r),l=e.select("#actor"+n.actorCnt);!a.mirrorActors&&n.stopy?l.attr("y2",n.stopy+n.height/2):a.mirrorActors&&l.attr("y2",n.stopy)})},"fixLifeLineHeights"),fe=i.__name(function(e,t,o,a){const r=a?t.stopy:t.starty,n=t.x+t.width/2,l=r+t.height,d=e.append("g").lower();var c=d;a||(k++,Object.keys(t.links||{}).length&&!o.forceMenus&&c.attr("onclick",kt(`actor${k}_popup`)).attr("cursor","pointer"),c.append("line").attr("id","actor"+k).attr("x1",n).attr("y1",l).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),c=d.append("g"),t.actorCnt=k,t.links!=null&&c.attr("id","root-"+k));const s=V.getNoteRect();var u="actor";t.properties?.class?u=t.properties.class:s.fill="#eaeaea",a?u+=` ${ht}`:u+=` ${lt}`,s.x=t.x,s.y=r,s.width=t.width,s.height=t.height,s.class=u,s.rx=3,s.ry=3,s.name=t.name;const f=yt(c,s);if(t.rectData=s,t.properties?.icon){const m=t.properties.icon.trim();m.charAt(0)==="@"?V.drawEmbeddedImage(c,s.x+s.width-20,s.y+10,m.substr(1)):V.drawImage(c,s.x+s.width-20,s.y+10,m)}nt(o,i.hasKatex(t.description))(t.description,c,s.x,s.y,s.width,s.height,{class:`actor ${At}`},o);let x=t.height;if(f.node){const m=f.node().getBBox();t.height=m.height,x=m.height}return x},"drawActorTypeParticipant"),xe=i.__name(function(e,t,o,a){const r=a?t.stopy:t.starty,n=t.x+t.width/2,l=r+t.height,d=e.append("g").lower();var c=d;a||(k++,Object.keys(t.links||{}).length&&!o.forceMenus&&c.attr("onclick",kt(`actor${k}_popup`)).attr("cursor","pointer"),c.append("line").attr("id","actor"+k).attr("x1",n).attr("y1",l).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),c=d.append("g"),t.actorCnt=k,t.links!=null&&c.attr("id","root-"+k));const s=V.getNoteRect();var u="actor";t.properties?.class?u=t.properties.class:s.fill="#eaeaea",a?u+=` ${ht}`:u+=` ${lt}`,s.x=t.x,s.y=r,s.width=t.width,s.height=t.height,s.class=u,s.name=t.name;const f=6,x={...s,x:s.x+-f,y:s.y+ +f,class:"actor"},m=yt(c,s);if(yt(c,x),t.rectData=s,t.properties?.icon){const b=t.properties.icon.trim();b.charAt(0)==="@"?V.drawEmbeddedImage(c,s.x+s.width-20,s.y+10,b.substr(1)):V.drawImage(c,s.x+s.width-20,s.y+10,b)}nt(o,i.hasKatex(t.description))(t.description,c,s.x-f,s.y+f,s.width,s.height,{class:`actor ${At}`},o);let E=t.height;if(m.node){const b=m.node().getBBox();t.height=b.height,E=b.height}return E},"drawActorTypeCollections"),me=i.__name(function(e,t,o,a){const r=a?t.stopy:t.starty,n=t.x+t.width/2,l=r+t.height,d=e.append("g").lower();let c=d;a||(k++,Object.keys(t.links||{}).length&&!o.forceMenus&&c.attr("onclick",kt(`actor${k}_popup`)).attr("cursor","pointer"),c.append("line").attr("id","actor"+k).attr("x1",n).attr("y1",l).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),c=d.append("g"),t.actorCnt=k,t.links!=null&&c.attr("id","root-"+k));const s=V.getNoteRect();let u="actor";t.properties?.class?u=t.properties.class:s.fill="#eaeaea",a?u+=` ${ht}`:u+=` ${lt}`,s.x=t.x,s.y=r,s.width=t.width,s.height=t.height,s.class=u,s.name=t.name;const f=s.height/2,x=f/(2.5+s.height/50),m=c.append("g"),E=c.append("g");if(m.append("path").attr("d",`M ${s.x},${s.y+f}
133
+ a ${x},${f} 0 0 0 0,${s.height}
134
+ h ${s.width-2*x}
135
+ a ${x},${f} 0 0 0 0,-${s.height}
136
+ Z
137
+ `).attr("class",u),E.append("path").attr("d",`M ${s.x},${s.y+f}
138
+ a ${x},${f} 0 0 0 0,${s.height}`).attr("stroke","#666").attr("stroke-width","1px").attr("class",u),m.attr("transform",`translate(${x}, ${-(s.height/2)})`),E.attr("transform",`translate(${s.width-x}, ${-s.height/2})`),t.rectData=s,t.properties?.icon){const P=t.properties.icon.trim(),N=s.x+s.width-20,C=s.y+10;P.charAt(0)==="@"?V.drawEmbeddedImage(c,N,C,P.substr(1)):V.drawImage(c,N,C,P)}nt(o,i.hasKatex(t.description))(t.description,c,s.x,s.y,s.width,s.height,{class:`actor ${At}`},o);let b=t.height;const A=m.select("path:last-child");if(A.node()){const P=A.node().getBBox();t.height=P.height,b=P.height}return b},"drawActorTypeQueue"),_e=i.__name(function(e,t,o,a){const r=a?t.stopy:t.starty,n=t.x+t.width/2,l=r+75,d=e.append("g").lower();a||(k++,d.append("line").attr("id","actor"+k).attr("x1",n).attr("y1",l).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=k);const c=e.append("g");let s=ct;a?s+=` ${ht}`:s+=` ${lt}`,c.attr("class",s),c.attr("name",t.name);const u=V.getNoteRect();u.x=t.x,u.y=r,u.fill="#eaeaea",u.width=t.width,u.height=t.height,u.class="actor";const f=t.x+t.width/2,x=r+30,m=18;c.append("defs").append("marker").attr("id","filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),c.append("circle").attr("cx",f).attr("cy",x).attr("r",m).attr("fill","#eaeaf7").attr("stroke","#666").attr("stroke-width",1.2),c.append("line").attr("marker-end","url(#filled-head-control)").attr("transform",`translate(${f}, ${x-m})`);const E=c.node().getBBox();return t.height=E.height+2*(o?.sequence?.labelBoxHeight??0),nt(o,i.hasKatex(t.description))(t.description,c,u.x,u.y+m+(a?5:10),u.width,u.height,{class:`actor ${ct}`},o),t.height},"drawActorTypeControl"),Te=i.__name(function(e,t,o,a){const r=a?t.stopy:t.starty,n=t.x+t.width/2,l=r+75,d=e.append("g").lower(),c=e.append("g");let s=ct;a?s+=` ${ht}`:s+=` ${lt}`,c.attr("class",s),c.attr("name",t.name);const u=V.getNoteRect();u.x=t.x,u.y=r,u.fill="#eaeaea",u.width=t.width,u.height=t.height,u.class="actor";const f=t.x+t.width/2,x=r+(a?10:25),m=18;c.append("circle").attr("cx",f).attr("cy",x).attr("r",m).attr("width",t.width).attr("height",t.height),c.append("line").attr("x1",f-m).attr("x2",f+m).attr("y1",x+m).attr("y2",x+m).attr("stroke","#333").attr("stroke-width",2);const E=c.node().getBBox();return t.height=E.height+(o?.sequence?.labelBoxHeight??0),a||(k++,d.append("line").attr("id","actor"+k).attr("x1",n).attr("y1",l).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=k),nt(o,i.hasKatex(t.description))(t.description,c,u.x,u.y+(a?(x-r+m-5)/2:(x+m-r)/2),u.width,u.height,{class:`actor ${ct}`},o),a?c.attr("transform",`translate(0, ${m/2})`):c.attr("transform",`translate(0, ${m/2})`),t.height},"drawActorTypeEntity"),ye=i.__name(function(e,t,o,a){const r=a?t.stopy:t.starty,n=t.x+t.width/2,l=r+t.height+2*o.boxTextMargin,d=e.append("g").lower();let c=d;a||(k++,Object.keys(t.links||{}).length&&!o.forceMenus&&c.attr("onclick",kt(`actor${k}_popup`)).attr("cursor","pointer"),c.append("line").attr("id","actor"+k).attr("x1",n).attr("y1",l).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),c=d.append("g"),t.actorCnt=k,t.links!=null&&c.attr("id","root-"+k));const s=V.getNoteRect();let u="actor";t.properties?.class?u=t.properties.class:s.fill="#eaeaea",a?u+=` ${ht}`:u+=` ${lt}`,s.x=t.x,s.y=r,s.width=t.width,s.height=t.height,s.class=u,s.name=t.name,s.x=t.x,s.y=r;const f=s.width/4,x=s.width/4,m=f/2,E=m/(2.5+f/50),b=c.append("g"),A=`
139
+ M ${s.x},${s.y+E}
140
+ a ${m},${E} 0 0 0 ${f},0
141
+ a ${m},${E} 0 0 0 -${f},0
142
+ l 0,${x-2*E}
143
+ a ${m},${E} 0 0 0 ${f},0
144
+ l 0,-${x-2*E}
145
+ `;b.append("path").attr("d",A).attr("fill","#eaeaea").attr("stroke","#000").attr("stroke-width",1).attr("class",u),a?b.attr("transform",`translate(${f*1.5}, ${s.height/4-2*E})`):b.attr("transform",`translate(${f*1.5}, ${(s.height+E)/4})`),t.rectData=s,nt(o,i.hasKatex(t.description))(t.description,c,s.x,s.y+(a?(s.height+x)/4:(s.height+E)/2),s.width,s.height,{class:`actor ${At}`},o);const P=b.select("path:last-child");if(P.node()){const N=P.node().getBBox();t.height=N.height+(o.sequence.labelBoxHeight??0)}return t.height},"drawActorTypeDatabase"),Ee=i.__name(function(e,t,o,a){const r=a?t.stopy:t.starty,n=t.x+t.width/2,l=r+80,d=30,c=e.append("g").lower();a||(k++,c.append("line").attr("id","actor"+k).attr("x1",n).attr("y1",l).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=k);const s=e.append("g");let u=ct;a?u+=` ${ht}`:u+=` ${lt}`,s.attr("class",u),s.attr("name",t.name);const f=V.getNoteRect();f.x=t.x,f.y=r,f.fill="#eaeaea",f.width=t.width,f.height=t.height,f.class="actor",s.append("line").attr("id","actor-man-torso"+k).attr("x1",t.x+t.width/2-d*2.5).attr("y1",r+10).attr("x2",t.x+t.width/2-15).attr("y2",r+10),s.append("line").attr("id","actor-man-arms"+k).attr("x1",t.x+t.width/2-d*2.5).attr("y1",r+0).attr("x2",t.x+t.width/2-d*2.5).attr("y2",r+20),s.append("circle").attr("cx",t.x+t.width/2).attr("cy",r+10).attr("r",d);const x=s.node().getBBox();return t.height=x.height+(o.sequence.labelBoxHeight??0),nt(o,i.hasKatex(t.description))(t.description,s,f.x,f.y+(a?d/2-4:d/2+3),f.width,f.height,{class:`actor ${ct}`},o),a?s.attr("transform",`translate(0,${d/2+7})`):s.attr("transform",`translate(0,${d/2+7})`),t.height},"drawActorTypeBoundary"),be=i.__name(function(e,t,o,a){const r=a?t.stopy:t.starty,n=t.x+t.width/2,l=r+80,d=e.append("g").lower();a||(k++,d.append("line").attr("id","actor"+k).attr("x1",n).attr("y1",l).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=k);const c=e.append("g");let s=ct;a?s+=` ${ht}`:s+=` ${lt}`,c.attr("class",s),c.attr("name",t.name);const u=V.getNoteRect();u.x=t.x,u.y=r,u.fill="#eaeaea",u.width=t.width,u.height=t.height,u.class="actor",u.rx=3,u.ry=3,c.append("line").attr("id","actor-man-torso"+k).attr("x1",n).attr("y1",r+25).attr("x2",n).attr("y2",r+45),c.append("line").attr("id","actor-man-arms"+k).attr("x1",n-ut/2).attr("y1",r+33).attr("x2",n+ut/2).attr("y2",r+33),c.append("line").attr("x1",n-ut/2).attr("y1",r+60).attr("x2",n).attr("y2",r+45),c.append("line").attr("x1",n).attr("y1",r+45).attr("x2",n+ut/2-2).attr("y2",r+60);const f=c.append("circle");f.attr("cx",t.x+t.width/2),f.attr("cy",r+10),f.attr("r",15),f.attr("width",t.width),f.attr("height",t.height);const x=c.node().getBBox();return t.height=x.height,nt(o,i.hasKatex(t.description))(t.description,c,u.x,u.y+35,u.width,u.height,{class:`actor ${ct}`},o),t.height},"drawActorTypeActor"),we=i.__name(async function(e,t,o,a){switch(t.type){case"actor":return await be(e,t,o,a);case"participant":return await fe(e,t,o,a);case"boundary":return await Ee(e,t,o,a);case"control":return await _e(e,t,o,a);case"entity":return await Te(e,t,o,a);case"database":return await ye(e,t,o,a);case"collections":return await xe(e,t,o,a);case"queue":return await me(e,t,o,a)}},"drawActor"),ve=i.__name(function(e,t,o){const r=e.append("g");Gt(r,t),t.name&&nt(o)(t.name,r,t.x,t.y+o.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},o),r.lower()},"drawBox"),Ie=i.__name(function(e){return e.append("g")},"anchorElement"),Le=i.__name(function(e,t,o,a,r){const n=V.getNoteRect(),l=t.anchored;n.x=t.startx,n.y=t.starty,n.class="activation"+r%3,n.width=t.stopx-t.startx,n.height=o-t.starty,yt(l,n)},"drawActivation"),Ae=i.__name(async function(e,t,o,a){const{boxMargin:r,boxTextMargin:n,labelBoxHeight:l,labelBoxWidth:d,messageFontFamily:c,messageFontSize:s,messageFontWeight:u}=a,f=e.append("g"),x=i.__name(function(b,A,P,N){return f.append("line").attr("x1",b).attr("y1",A).attr("x2",P).attr("y2",N).attr("class","loopLine")},"drawLoopLine");x(t.startx,t.starty,t.stopx,t.starty),x(t.stopx,t.starty,t.stopx,t.stopy),x(t.startx,t.stopy,t.stopx,t.stopy),x(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(b){x(t.startx,b.y,t.stopx,b.y).style("stroke-dasharray","3, 3")});let m=V.getTextObj();m.text=o,m.x=t.startx,m.y=t.starty,m.fontFamily=c,m.fontSize=s,m.fontWeight=u,m.anchor="middle",m.valign="middle",m.tspan=!1,m.width=d||50,m.height=l||20,m.textMargin=n,m.class="labelText",Kt(f,m),m=Xt(),m.text=t.title,m.x=t.startx+d/2+(t.stopx-t.startx)/2,m.y=t.starty+r+n,m.anchor="middle",m.valign="middle",m.textMargin=n,m.class="loopText",m.fontFamily=c,m.fontSize=s,m.fontWeight=u,m.wrap=!0;let E=i.hasKatex(m.text)?await Lt(f,m,t):_t(f,m);if(t.sectionTitles!==void 0){for(const[b,A]of Object.entries(t.sectionTitles))if(A.message){m.text=A.message,m.x=t.startx+(t.stopx-t.startx)/2,m.y=t.sections[b].y+r+n,m.class="loopText",m.anchor="middle",m.valign="middle",m.tspan=!1,m.fontFamily=c,m.fontSize=s,m.fontWeight=u,m.wrap=t.wrap,i.hasKatex(m.text)?(t.starty=t.sections[b].y,await Lt(f,m,t)):_t(f,m);let P=Math.round(E.map(N=>(N._groups||N)[0][0].getBBox().height).reduce((N,C)=>N+C));t.sections[b].height+=P-(r+n)}}return t.height=Math.round(t.stopy-t.starty),f},"drawLoop"),Gt=i.__name(function(e,t){V.drawBackgroundRect(e,t)},"drawBackgroundRect"),ke=i.__name(function(e){e.append("defs").append("symbol").attr("id","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")},"insertDatabaseIcon"),Pe=i.__name(function(e){e.append("defs").append("symbol").attr("id","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")},"insertComputerIcon"),Ne=i.__name(function(e){e.append("defs").append("symbol").attr("id","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")},"insertClockIcon"),Se=i.__name(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),Me=i.__name(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).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")},"insertArrowFilledHead"),Re=i.__name(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),De=i.__name(function(e){e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),Xt=i.__name(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),Ce=i.__name(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),nt=function(){function e(n,l,d,c,s,u,f){const x=l.append("text").attr("x",d+s/2).attr("y",c+u/2+5).style("text-anchor","middle").text(n);r(x,f)}i.__name(e,"byText");function t(n,l,d,c,s,u,f,x){const{actorFontSize:m,actorFontFamily:E,actorFontWeight:b}=x,[A,P]=i.parseFontSize(m),N=n.split(i.common_default.lineBreakRegex);for(let C=0;C<N.length;C++){const O=C*A-A*(N.length-1)/2,F=l.append("text").attr("x",d+s/2).attr("y",c).style("text-anchor","middle").style("font-size",P).style("font-weight",b).style("font-family",E);F.append("tspan").attr("x",d+s/2).attr("dy",O).text(N[C]),F.attr("y",c+u/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(F,f)}}i.__name(t,"byTspan");function o(n,l,d,c,s,u,f,x){const m=l.append("switch"),b=m.append("foreignObject").attr("x",d).attr("y",c).attr("width",s).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");b.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),t(n,m,d,c,s,u,f,x),r(b,f)}i.__name(o,"byFo");async function a(n,l,d,c,s,u,f,x){const m=await i.calculateMathMLDimensions(n,i.getConfig()),E=l.append("switch"),A=E.append("foreignObject").attr("x",d+s/2-m.width/2).attr("y",c+u/2-m.height/2).attr("width",m.width).attr("height",m.height).append("xhtml:div").style("height","100%").style("width","100%");A.append("div").style("text-align","center").style("vertical-align","middle").html(await i.renderKatexSanitized(n,i.getConfig())),t(n,E,d,c,s,u,f,x),r(A,f)}i.__name(a,"byKatex");function r(n,l){for(const d in l)l.hasOwnProperty(d)&&n.attr(d,l[d])}return i.__name(r,"_setTextAttrs"),function(n,l=!1){return l?a:n.textPlacement==="fo"?o:n.textPlacement==="old"?e:t}}(),Oe=function(){function e(r,n,l,d,c,s,u){const f=n.append("text").attr("x",l).attr("y",d).style("text-anchor","start").text(r);a(f,u)}i.__name(e,"byText");function t(r,n,l,d,c,s,u,f){const{actorFontSize:x,actorFontFamily:m,actorFontWeight:E}=f,b=r.split(i.common_default.lineBreakRegex);for(let A=0;A<b.length;A++){const P=A*x-x*(b.length-1)/2,N=n.append("text").attr("x",l).attr("y",d).style("text-anchor","start").style("font-size",x).style("font-weight",E).style("font-family",m);N.append("tspan").attr("x",l).attr("dy",P).text(b[A]),N.attr("y",d+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),a(N,u)}}i.__name(t,"byTspan");function o(r,n,l,d,c,s,u,f){const x=n.append("switch"),E=x.append("foreignObject").attr("x",l).attr("y",d).attr("width",c).attr("height",s).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");E.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(r),t(r,x,l,d,c,s,u,f),a(E,u)}i.__name(o,"byFo");function a(r,n){for(const l in n)n.hasOwnProperty(l)&&r.attr(l,n[l])}return i.__name(a,"_setTextAttrs"),function(r){return r.textPlacement==="fo"?o:r.textPlacement==="old"?e:t}}(),B={drawRect:yt,drawText:_t,drawLabel:Kt,drawActor:we,drawBox:ve,drawPopup:ge,anchorElement:Ie,drawActivation:Le,drawLoop:Ae,drawBackgroundRect:Gt,insertArrowHead:Se,insertArrowFilledHead:Me,insertSequenceNumber:Re,insertArrowCrossHead:De,insertDatabaseIcon:ke,insertComputerIcon:Pe,insertClockIcon:Ne,getTextObj:Xt,getNoteRect:Ce,fixLifeLineHeights:Ut,sanitizeUrl:i.distExports.sanitizeUrl},h={},_={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:i.__name(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(e=>e.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},"getHeight"),clear:i.__name(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:i.__name(function(e){this.boxes.push(e)},"addBox"),addActor:i.__name(function(e){this.actors.push(e)},"addActor"),addLoop:i.__name(function(e){this.loops.push(e)},"addLoop"),addMessage:i.__name(function(e){this.messages.push(e)},"addMessage"),addNote:i.__name(function(e){this.notes.push(e)},"addNote"),lastActor:i.__name(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:i.__name(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:i.__name(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:i.__name(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:i.__name(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Jt(i.getConfig2())},"init"),updateVal:i.__name(function(e,t,o,a){e[t]===void 0?e[t]=o:e[t]=a(o,e[t])},"updateVal"),updateBounds:i.__name(function(e,t,o,a){const r=this;let n=0;function l(d){return i.__name(function(s){n++;const u=r.sequenceItems.length-n+1;r.updateVal(s,"starty",t-u*h.boxMargin,Math.min),r.updateVal(s,"stopy",a+u*h.boxMargin,Math.max),r.updateVal(_.data,"startx",e-u*h.boxMargin,Math.min),r.updateVal(_.data,"stopx",o+u*h.boxMargin,Math.max),d!=="activation"&&(r.updateVal(s,"startx",e-u*h.boxMargin,Math.min),r.updateVal(s,"stopx",o+u*h.boxMargin,Math.max),r.updateVal(_.data,"starty",t-u*h.boxMargin,Math.min),r.updateVal(_.data,"stopy",a+u*h.boxMargin,Math.max))},"updateItemBounds")}i.__name(l,"updateFn"),this.sequenceItems.forEach(l()),this.activations.forEach(l("activation"))},"updateBounds"),insert:i.__name(function(e,t,o,a){const r=i.common_default.getMin(e,o),n=i.common_default.getMax(e,o),l=i.common_default.getMin(t,a),d=i.common_default.getMax(t,a);this.updateVal(_.data,"startx",r,Math.min),this.updateVal(_.data,"starty",l,Math.min),this.updateVal(_.data,"stopx",n,Math.max),this.updateVal(_.data,"stopy",d,Math.max),this.updateBounds(r,l,n,d)},"insert"),newActivation:i.__name(function(e,t,o){const a=o.get(e.from),r=Pt(e.from).length||0,n=a.x+a.width/2+(r-1)*h.activationWidth/2;this.activations.push({startx:n,starty:this.verticalPos+2,stopx:n+h.activationWidth,stopy:void 0,actor:e.from,anchored:B.anchorElement(t)})},"newActivation"),endActivation:i.__name(function(e){const t=this.activations.map(function(o){return o.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},"endActivation"),createLoop:i.__name(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},"createLoop"),newLoop:i.__name(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:i.__name(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:i.__name(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:i.__name(function(e){const t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:_.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:i.__name(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:i.__name(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:i.__name(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=i.common_default.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:i.__name(function(){return this.verticalPos},"getVerticalPos"),getBounds:i.__name(function(){return{bounds:this.data,models:this.models}},"getBounds")},Be=i.__name(async function(e,t){_.bumpVerticalPos(h.boxMargin),t.height=h.boxMargin,t.starty=_.getVerticalPos();const o=V.getNoteRect();o.x=t.startx,o.y=t.starty,o.width=t.width||h.width,o.class="note";const a=e.append("g"),r=B.drawRect(a,o),n=V.getTextObj();n.x=t.startx,n.y=t.starty,n.width=o.width,n.dy="1em",n.text=t.message,n.class="noteText",n.fontFamily=h.noteFontFamily,n.fontSize=h.noteFontSize,n.fontWeight=h.noteFontWeight,n.anchor=h.noteAlign,n.textMargin=h.noteMargin,n.valign="center";const l=i.hasKatex(n.text)?await Lt(a,n):_t(a,n),d=Math.round(l.map(c=>(c._groups||c)[0][0].getBBox().height).reduce((c,s)=>c+s));r.attr("height",d+2*h.noteMargin),t.height+=d+2*h.noteMargin,_.bumpVerticalPos(d+2*h.noteMargin),t.stopy=t.starty+d+2*h.noteMargin,t.stopx=t.startx+o.width,_.insert(t.startx,t.starty,t.stopx,t.stopy),_.models.addNote(t)},"drawNote"),gt=i.__name(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),xt=i.__name(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),Bt=i.__name(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");async function Qt(e,t){_.bumpVerticalPos(10);const{startx:o,stopx:a,message:r}=t,n=i.common_default.splitBreaks(r).length,l=i.hasKatex(r),d=l?await i.calculateMathMLDimensions(r,i.getConfig2()):i.utils_default.calculateTextDimensions(r,gt(h));if(!l){const f=d.height/n;t.height+=f,_.bumpVerticalPos(f)}let c,s=d.height-10;const u=d.width;if(o===a){c=_.getVerticalPos()+s,h.rightAngles||(s+=h.boxMargin,c=_.getVerticalPos()+s),s+=30;const f=i.common_default.getMax(u/2,h.width/2);_.insert(o-f,_.getVerticalPos()-10+s,a+f,_.getVerticalPos()+30+s)}else s+=h.boxMargin,c=_.getVerticalPos()+s,_.insert(o,c-10,a,c);return _.bumpVerticalPos(s),t.height+=s,t.stopy=t.starty+t.height,_.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),c}i.__name(Qt,"boundMessage");var Ve=i.__name(async function(e,t,o,a){const{startx:r,stopx:n,starty:l,message:d,type:c,sequenceIndex:s,sequenceVisible:u}=t,f=i.utils_default.calculateTextDimensions(d,gt(h)),x=V.getTextObj();x.x=r,x.y=l+10,x.width=n-r,x.class="messageText",x.dy="1em",x.text=d,x.fontFamily=h.messageFontFamily,x.fontSize=h.messageFontSize,x.fontWeight=h.messageFontWeight,x.anchor=h.messageAlign,x.valign="center",x.textMargin=h.wrapPadding,x.tspan=!1,i.hasKatex(x.text)?await Lt(e,x,{startx:r,stopx:n,starty:o}):_t(e,x);const m=f.width;let E;r===n?h.rightAngles?E=e.append("path").attr("d",`M ${r},${o} H ${r+i.common_default.getMax(h.width/2,m/2)} V ${o+25} H ${r}`):E=e.append("path").attr("d","M "+r+","+o+" C "+(r+60)+","+(o-10)+" "+(r+60)+","+(o+30)+" "+r+","+(o+20)):(E=e.append("line"),E.attr("x1",r),E.attr("y1",o),E.attr("x2",n),E.attr("y2",o)),c===a.db.LINETYPE.DOTTED||c===a.db.LINETYPE.DOTTED_CROSS||c===a.db.LINETYPE.DOTTED_POINT||c===a.db.LINETYPE.DOTTED_OPEN||c===a.db.LINETYPE.BIDIRECTIONAL_DOTTED?(E.style("stroke-dasharray","3, 3"),E.attr("class","messageLine1")):E.attr("class","messageLine0");let b="";h.arrowMarkerAbsolute&&(b=i.getUrl(!0)),E.attr("stroke-width",2),E.attr("stroke","none"),E.style("fill","none"),(c===a.db.LINETYPE.SOLID||c===a.db.LINETYPE.DOTTED)&&E.attr("marker-end","url("+b+"#arrowhead)"),(c===a.db.LINETYPE.BIDIRECTIONAL_SOLID||c===a.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(E.attr("marker-start","url("+b+"#arrowhead)"),E.attr("marker-end","url("+b+"#arrowhead)")),(c===a.db.LINETYPE.SOLID_POINT||c===a.db.LINETYPE.DOTTED_POINT)&&E.attr("marker-end","url("+b+"#filled-head)"),(c===a.db.LINETYPE.SOLID_CROSS||c===a.db.LINETYPE.DOTTED_CROSS)&&E.attr("marker-end","url("+b+"#crosshead)"),(u||h.showSequenceNumbers)&&((c===a.db.LINETYPE.BIDIRECTIONAL_SOLID||c===a.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(r<n?E.attr("x1",r+2*6):E.attr("x1",r+6)),e.append("line").attr("x1",r).attr("y1",o).attr("x2",r).attr("y2",o).attr("stroke-width",0).attr("marker-start","url("+b+"#sequencenumber)"),e.append("text").attr("x",r).attr("y",o+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(s))},"drawMessage"),Ye=i.__name(function(e,t,o,a,r,n,l){let d=0,c=0,s,u=0;for(const f of a){const x=t.get(f),m=x.box;s&&s!=m&&(l||_.models.addBox(s),c+=h.boxMargin+s.margin),m&&m!=s&&(l||(m.x=d+c,m.y=r),c+=m.margin),x.width=x.width||h.width,x.height=i.common_default.getMax(x.height||h.height,h.height),x.margin=x.margin||h.actorMargin,u=i.common_default.getMax(u,x.height),o.get(x.name)&&(c+=x.width/2),x.x=d+c,x.starty=_.getVerticalPos(),_.insert(x.x,r,x.x+x.width,x.height),d+=x.width+c,x.box&&(x.box.width=d+m.margin-x.box.x),c=x.margin,s=x.box,_.models.addActor(x)}s&&!l&&_.models.addBox(s),_.bumpVerticalPos(u)},"addActorRenderingData"),Vt=i.__name(async function(e,t,o,a){if(a){let r=0;_.bumpVerticalPos(h.boxMargin*2);for(const n of o){const l=t.get(n);l.stopy||(l.stopy=_.getVerticalPos());const d=await B.drawActor(e,l,h,!0);r=i.common_default.getMax(r,d)}_.bumpVerticalPos(r+h.boxMargin)}else for(const r of o){const n=t.get(r);await B.drawActor(e,n,h,!1)}},"drawActors"),Zt=i.__name(function(e,t,o,a){let r=0,n=0;for(const l of o){const d=t.get(l),c=Fe(d),s=B.drawPopup(e,d,c,h,h.forceMenus,a);s.height>r&&(r=s.height),s.width+d.x>n&&(n=s.width+d.x)}return{maxHeight:r,maxWidth:n}},"drawActorsPopup"),Jt=i.__name(function(e){i.assignWithDepth_default(h,e),e.fontFamily&&(h.actorFontFamily=h.noteFontFamily=h.messageFontFamily=e.fontFamily),e.fontSize&&(h.actorFontSize=h.noteFontSize=h.messageFontSize=e.fontSize),e.fontWeight&&(h.actorFontWeight=h.noteFontWeight=h.messageFontWeight=e.fontWeight)},"setConf"),Pt=i.__name(function(e){return _.activations.filter(function(t){return t.actor===e})},"actorActivations"),Ht=i.__name(function(e,t){const o=t.get(e),a=Pt(e),r=a.reduce(function(l,d){return i.common_default.getMin(l,d.startx)},o.x+o.width/2-1),n=a.reduce(function(l,d){return i.common_default.getMax(l,d.stopx)},o.x+o.width/2+1);return[r,n]},"activationBounds");function at(e,t,o,a,r){_.bumpVerticalPos(o);let n=a;if(t.id&&t.message&&e[t.id]){const l=e[t.id].width,d=gt(h);t.message=i.utils_default.wrapLabel(`[${t.message}]`,l-2*h.wrapPadding,d),t.width=l,t.wrap=!0;const c=i.utils_default.calculateTextDimensions(t.message,d),s=i.common_default.getMax(c.height,h.labelBoxHeight);n=a+s,i.log.debug(`${s} - ${t.message}`)}r(t),_.bumpVerticalPos(n)}i.__name(at,"adjustLoopHeightForWrap");function $t(e,t,o,a,r,n,l){function d(u,f){u.x<r.get(e.from).x?(_.insert(t.stopx-f,t.starty,t.startx,t.stopy+u.height/2+h.noteMargin),t.stopx=t.stopx+f):(_.insert(t.startx,t.starty,t.stopx+f,t.stopy+u.height/2+h.noteMargin),t.stopx=t.stopx-f)}i.__name(d,"receiverAdjustment");function c(u,f){u.x<r.get(e.to).x?(_.insert(t.startx-f,t.starty,t.stopx,t.stopy+u.height/2+h.noteMargin),t.startx=t.startx+f):(_.insert(t.stopx,t.starty,t.startx+f,t.stopy+u.height/2+h.noteMargin),t.startx=t.startx-f)}i.__name(c,"senderAdjustment");const s=[It.ACTOR,It.CONTROL,It.ENTITY,It.DATABASE];if(n.get(e.to)==a){const u=r.get(e.to),f=s.includes(u.type)?ut/2+3:u.width/2+3;d(u,f),u.starty=o-u.height/2,_.bumpVerticalPos(u.height/2)}else if(l.get(e.from)==a){const u=r.get(e.from);if(h.mirrorActors){const f=s.includes(u.type)?ut/2:u.width/2;c(u,f)}u.stopy=o-u.height/2,_.bumpVerticalPos(u.height/2)}else if(l.get(e.to)==a){const u=r.get(e.to);if(h.mirrorActors){const f=s.includes(u.type)?ut/2+3:u.width/2+3;d(u,f)}u.stopy=o-u.height/2,_.bumpVerticalPos(u.height/2)}}i.__name($t,"adjustCreatedDestroyedData");var We=i.__name(async function(e,t,o,a){const{securityLevel:r,sequence:n}=i.getConfig2();h=n;let l;r==="sandbox"&&(l=i.select("#i"+t));const d=r==="sandbox"?i.select(l.nodes()[0].contentDocument.body):i.select("body"),c=r==="sandbox"?l.nodes()[0].contentDocument:document;_.init(),i.log.debug(a.db);const s=r==="sandbox"?d.select(`[id="${t}"]`):i.select(`[id="${t}"]`),u=a.db.getActors(),f=a.db.getCreatedActors(),x=a.db.getDestroyedActors(),m=a.db.getBoxes();let E=a.db.getActorKeys();const b=a.db.getMessages(),A=a.db.getDiagramTitle(),P=a.db.hasAtLeastOneBox(),N=a.db.hasAtLeastOneBoxWithTitle(),C=await jt(u,b,a);if(h.height=await te(u,C,m),B.insertComputerIcon(s),B.insertDatabaseIcon(s),B.insertClockIcon(s),P&&(_.bumpVerticalPos(h.boxMargin),N&&_.bumpVerticalPos(m[0].textMaxHeight)),h.hideUnusedParticipants===!0){const T=new Set;b.forEach(I=>{T.add(I.from),T.add(I.to)}),E=E.filter(I=>T.has(I))}Ye(s,u,f,E,0,b,!1);const O=await He(b,u,C,a);B.insertArrowHead(s),B.insertArrowCrossHead(s),B.insertArrowFilledHead(s),B.insertSequenceNumber(s);function F(T,I){const U=_.endActivation(T);U.starty+18>I&&(U.starty=I-6,I+=12),B.drawActivation(s,U,I,h,Pt(T.from).length),_.insert(U.startx,I-10,U.stopx,I)}i.__name(F,"activeEnd");let q=1,X=1;const j=[],z=[];let H=0;for(const T of b){let I,U,J;switch(T.type){case a.db.LINETYPE.NOTE:_.resetVerticalPos(),U=T.noteModel,await Be(s,U);break;case a.db.LINETYPE.ACTIVE_START:_.newActivation(T,s,u);break;case a.db.LINETYPE.ACTIVE_END:F(T,_.getVerticalPos());break;case a.db.LINETYPE.LOOP_START:at(O,T,h.boxMargin,h.boxMargin+h.boxTextMargin,S=>_.newLoop(S));break;case a.db.LINETYPE.LOOP_END:I=_.endLoop(),await B.drawLoop(s,I,"loop",h),_.bumpVerticalPos(I.stopy-_.getVerticalPos()),_.models.addLoop(I);break;case a.db.LINETYPE.RECT_START:at(O,T,h.boxMargin,h.boxMargin,S=>_.newLoop(void 0,S.message));break;case a.db.LINETYPE.RECT_END:I=_.endLoop(),z.push(I),_.models.addLoop(I),_.bumpVerticalPos(I.stopy-_.getVerticalPos());break;case a.db.LINETYPE.OPT_START:at(O,T,h.boxMargin,h.boxMargin+h.boxTextMargin,S=>_.newLoop(S));break;case a.db.LINETYPE.OPT_END:I=_.endLoop(),await B.drawLoop(s,I,"opt",h),_.bumpVerticalPos(I.stopy-_.getVerticalPos()),_.models.addLoop(I);break;case a.db.LINETYPE.ALT_START:at(O,T,h.boxMargin,h.boxMargin+h.boxTextMargin,S=>_.newLoop(S));break;case a.db.LINETYPE.ALT_ELSE:at(O,T,h.boxMargin+h.boxTextMargin,h.boxMargin,S=>_.addSectionToLoop(S));break;case a.db.LINETYPE.ALT_END:I=_.endLoop(),await B.drawLoop(s,I,"alt",h),_.bumpVerticalPos(I.stopy-_.getVerticalPos()),_.models.addLoop(I);break;case a.db.LINETYPE.PAR_START:case a.db.LINETYPE.PAR_OVER_START:at(O,T,h.boxMargin,h.boxMargin+h.boxTextMargin,S=>_.newLoop(S)),_.saveVerticalPos();break;case a.db.LINETYPE.PAR_AND:at(O,T,h.boxMargin+h.boxTextMargin,h.boxMargin,S=>_.addSectionToLoop(S));break;case a.db.LINETYPE.PAR_END:I=_.endLoop(),await B.drawLoop(s,I,"par",h),_.bumpVerticalPos(I.stopy-_.getVerticalPos()),_.models.addLoop(I);break;case a.db.LINETYPE.AUTONUMBER:q=T.message.start||q,X=T.message.step||X,T.message.visible?a.db.enableSequenceNumbers():a.db.disableSequenceNumbers();break;case a.db.LINETYPE.CRITICAL_START:at(O,T,h.boxMargin,h.boxMargin+h.boxTextMargin,S=>_.newLoop(S));break;case a.db.LINETYPE.CRITICAL_OPTION:at(O,T,h.boxMargin+h.boxTextMargin,h.boxMargin,S=>_.addSectionToLoop(S));break;case a.db.LINETYPE.CRITICAL_END:I=_.endLoop(),await B.drawLoop(s,I,"critical",h),_.bumpVerticalPos(I.stopy-_.getVerticalPos()),_.models.addLoop(I);break;case a.db.LINETYPE.BREAK_START:at(O,T,h.boxMargin,h.boxMargin+h.boxTextMargin,S=>_.newLoop(S));break;case a.db.LINETYPE.BREAK_END:I=_.endLoop(),await B.drawLoop(s,I,"break",h),_.bumpVerticalPos(I.stopy-_.getVerticalPos()),_.models.addLoop(I);break;default:try{J=T.msgModel,J.starty=_.getVerticalPos(),J.sequenceIndex=q,J.sequenceVisible=a.db.showSequenceNumbers();const S=await Qt(s,J);$t(T,J,S,H,u,f,x),j.push({messageModel:J,lineStartY:S}),_.models.addMessage(J)}catch(S){i.log.error("error while drawing message",S)}}[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.SOLID,a.db.LINETYPE.DOTTED,a.db.LINETYPE.SOLID_CROSS,a.db.LINETYPE.DOTTED_CROSS,a.db.LINETYPE.SOLID_POINT,a.db.LINETYPE.DOTTED_POINT,a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(T.type)&&(q=q+X),H++}i.log.debug("createdActors",f),i.log.debug("destroyedActors",x),await Vt(s,u,E,!1);for(const T of j)await Ve(s,T.messageModel,T.lineStartY,a);h.mirrorActors&&await Vt(s,u,E,!0),z.forEach(T=>B.drawBackgroundRect(s,T)),Ut(s,u,E,h);for(const T of _.models.boxes){T.height=_.getVerticalPos()-T.y,_.insert(T.x,T.y,T.x+T.width,T.height);const I=h.boxMargin*2;T.startx=T.x-I,T.starty=T.y-I*.25,T.stopx=T.startx+T.width+2*I,T.stopy=T.starty+T.height+I*.75,T.stroke="rgb(0,0,0, 0.5)",B.drawBox(s,T,h)}P&&_.bumpVerticalPos(h.boxMargin);const W=Zt(s,u,E,c),{bounds:R}=_.getBounds();R.startx===void 0&&(R.startx=0),R.starty===void 0&&(R.starty=0),R.stopx===void 0&&(R.stopx=0),R.stopy===void 0&&(R.stopy=0);let Q=R.stopy-R.starty;Q<W.maxHeight&&(Q=W.maxHeight);let K=Q+2*h.diagramMarginY;h.mirrorActors&&(K=K-h.boxMargin+h.bottomMarginAdj);let Z=R.stopx-R.startx;Z<W.maxWidth&&(Z=W.maxWidth);const tt=Z+2*h.diagramMarginX;A&&s.append("text").text(A).attr("x",(R.stopx-R.startx)/2-2*h.diagramMarginX).attr("y",-25),i.configureSvgSize(s,K,tt,h.useMaxWidth);const M=A?40:0;s.attr("viewBox",R.startx-h.diagramMarginX+" -"+(h.diagramMarginY+M)+" "+tt+" "+(K+M)),i.log.debug("models:",_.models)},"draw");async function jt(e,t,o){const a={};for(const r of t)if(e.get(r.to)&&e.get(r.from)){const n=e.get(r.to);if(r.placement===o.db.PLACEMENT.LEFTOF&&!n.prevActor||r.placement===o.db.PLACEMENT.RIGHTOF&&!n.nextActor)continue;const l=r.placement!==void 0,d=!l,c=l?xt(h):gt(h),s=r.wrap?i.utils_default.wrapLabel(r.message,h.width-2*h.wrapPadding,c):r.message,f=(i.hasKatex(s)?await i.calculateMathMLDimensions(r.message,i.getConfig2()):i.utils_default.calculateTextDimensions(s,c)).width+2*h.wrapPadding;d&&r.from===n.nextActor?a[r.to]=i.common_default.getMax(a[r.to]||0,f):d&&r.from===n.prevActor?a[r.from]=i.common_default.getMax(a[r.from]||0,f):d&&r.from===r.to?(a[r.from]=i.common_default.getMax(a[r.from]||0,f/2),a[r.to]=i.common_default.getMax(a[r.to]||0,f/2)):r.placement===o.db.PLACEMENT.RIGHTOF?a[r.from]=i.common_default.getMax(a[r.from]||0,f):r.placement===o.db.PLACEMENT.LEFTOF?a[n.prevActor]=i.common_default.getMax(a[n.prevActor]||0,f):r.placement===o.db.PLACEMENT.OVER&&(n.prevActor&&(a[n.prevActor]=i.common_default.getMax(a[n.prevActor]||0,f/2)),n.nextActor&&(a[r.from]=i.common_default.getMax(a[r.from]||0,f/2)))}return i.log.debug("maxMessageWidthPerActor:",a),a}i.__name(jt,"getMaxMessageWidthPerActor");var Fe=i.__name(function(e){let t=0;const o=Bt(h);for(const a in e.links){const n=i.utils_default.calculateTextDimensions(a,o).width+2*h.wrapPadding+2*h.boxMargin;t<n&&(t=n)}return t},"getRequiredPopupWidth");async function te(e,t,o){let a=0;for(const n of e.keys()){const l=e.get(n);l.wrap&&(l.description=i.utils_default.wrapLabel(l.description,h.width-2*h.wrapPadding,Bt(h)));const d=i.hasKatex(l.description)?await i.calculateMathMLDimensions(l.description,i.getConfig2()):i.utils_default.calculateTextDimensions(l.description,Bt(h));l.width=l.wrap?h.width:i.common_default.getMax(h.width,d.width+2*h.wrapPadding),l.height=l.wrap?i.common_default.getMax(d.height,h.height):h.height,a=i.common_default.getMax(a,l.height)}for(const n in t){const l=e.get(n);if(!l)continue;const d=e.get(l.nextActor);if(!d){const f=t[n]+h.actorMargin-l.width/2;l.margin=i.common_default.getMax(f,h.actorMargin);continue}const s=t[n]+h.actorMargin-l.width/2-d.width/2;l.margin=i.common_default.getMax(s,h.actorMargin)}let r=0;return o.forEach(n=>{const l=gt(h);let d=n.actorKeys.reduce((f,x)=>f+=e.get(x).width+(e.get(x).margin||0),0);const c=h.boxMargin*8;d+=c,d-=2*h.boxTextMargin,n.wrap&&(n.name=i.utils_default.wrapLabel(n.name,d-2*h.wrapPadding,l));const s=i.utils_default.calculateTextDimensions(n.name,l);r=i.common_default.getMax(s.height,r);const u=i.common_default.getMax(d,s.width+2*h.wrapPadding);if(n.margin=h.boxTextMargin,d<u){const f=(u-d)/2;n.margin+=f}}),o.forEach(n=>n.textMaxHeight=r),i.common_default.getMax(a,h.height)}i.__name(te,"calculateActorMargins");var qe=i.__name(async function(e,t,o){const a=t.get(e.from),r=t.get(e.to),n=a.x,l=r.x,d=e.wrap&&e.message;let c=i.hasKatex(e.message)?await i.calculateMathMLDimensions(e.message,i.getConfig2()):i.utils_default.calculateTextDimensions(d?i.utils_default.wrapLabel(e.message,h.width,xt(h)):e.message,xt(h));const s={width:d?h.width:i.common_default.getMax(h.width,c.width+2*h.noteMargin),height:0,startx:a.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===o.db.PLACEMENT.RIGHTOF?(s.width=d?i.common_default.getMax(h.width,c.width):i.common_default.getMax(a.width/2+r.width/2,c.width+2*h.noteMargin),s.startx=n+(a.width+h.actorMargin)/2):e.placement===o.db.PLACEMENT.LEFTOF?(s.width=d?i.common_default.getMax(h.width,c.width+2*h.noteMargin):i.common_default.getMax(a.width/2+r.width/2,c.width+2*h.noteMargin),s.startx=n-s.width+(a.width-h.actorMargin)/2):e.to===e.from?(c=i.utils_default.calculateTextDimensions(d?i.utils_default.wrapLabel(e.message,i.common_default.getMax(h.width,a.width),xt(h)):e.message,xt(h)),s.width=d?i.common_default.getMax(h.width,a.width):i.common_default.getMax(a.width,h.width,c.width+2*h.noteMargin),s.startx=n+(a.width-s.width)/2):(s.width=Math.abs(n+a.width/2-(l+r.width/2))+h.actorMargin,s.startx=n<l?n+a.width/2-h.actorMargin/2:l+r.width/2-h.actorMargin/2),d&&(s.message=i.utils_default.wrapLabel(e.message,s.width-2*h.wrapPadding,xt(h))),i.log.debug(`NM:[${s.startx},${s.stopx},${s.starty},${s.stopy}:${s.width},${s.height}=${e.message}]`),s},"buildNoteModel"),ze=i.__name(function(e,t,o){if(![o.db.LINETYPE.SOLID_OPEN,o.db.LINETYPE.DOTTED_OPEN,o.db.LINETYPE.SOLID,o.db.LINETYPE.DOTTED,o.db.LINETYPE.SOLID_CROSS,o.db.LINETYPE.DOTTED_CROSS,o.db.LINETYPE.SOLID_POINT,o.db.LINETYPE.DOTTED_POINT,o.db.LINETYPE.BIDIRECTIONAL_SOLID,o.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type))return{};const[a,r]=Ht(e.from,t),[n,l]=Ht(e.to,t),d=a<=n;let c=d?r:a,s=d?n:l;const u=Math.abs(n-l)>2,f=i.__name(b=>d?-b:b,"adjustValue");e.from===e.to?s=c:(e.activate&&!u&&(s+=f(h.activationWidth/2-1)),[o.db.LINETYPE.SOLID_OPEN,o.db.LINETYPE.DOTTED_OPEN].includes(e.type)||(s+=f(3)),[o.db.LINETYPE.BIDIRECTIONAL_SOLID,o.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(c-=f(3)));const x=[a,r,n,l],m=Math.abs(c-s);e.wrap&&e.message&&(e.message=i.utils_default.wrapLabel(e.message,i.common_default.getMax(m+2*h.wrapPadding,h.width),gt(h)));const E=i.utils_default.calculateTextDimensions(e.message,gt(h));return{width:i.common_default.getMax(e.wrap?0:E.width+2*h.wrapPadding,m+2*h.wrapPadding,h.width),height:0,startx:c,stopx:s,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,x),toBounds:Math.max.apply(null,x)}},"buildMessageModel"),He=i.__name(async function(e,t,o,a){const r={},n=[];let l,d,c;for(const s of e){switch(s.type){case a.db.LINETYPE.LOOP_START:case a.db.LINETYPE.ALT_START:case a.db.LINETYPE.OPT_START:case a.db.LINETYPE.PAR_START:case a.db.LINETYPE.PAR_OVER_START:case a.db.LINETYPE.CRITICAL_START:case a.db.LINETYPE.BREAK_START:n.push({id:s.id,msg:s.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case a.db.LINETYPE.ALT_ELSE:case a.db.LINETYPE.PAR_AND:case a.db.LINETYPE.CRITICAL_OPTION:s.message&&(l=n.pop(),r[l.id]=l,r[s.id]=l,n.push(l));break;case a.db.LINETYPE.LOOP_END:case a.db.LINETYPE.ALT_END:case a.db.LINETYPE.OPT_END:case a.db.LINETYPE.PAR_END:case a.db.LINETYPE.CRITICAL_END:case a.db.LINETYPE.BREAK_END:l=n.pop(),r[l.id]=l;break;case a.db.LINETYPE.ACTIVE_START:{const f=t.get(s.from?s.from:s.to.actor),x=Pt(s.from?s.from:s.to.actor).length,m=f.x+f.width/2+(x-1)*h.activationWidth/2,E={startx:m,stopx:m+h.activationWidth,actor:s.from,enabled:!0};_.activations.push(E)}break;case a.db.LINETYPE.ACTIVE_END:{const f=_.activations.map(x=>x.actor).lastIndexOf(s.from);_.activations.splice(f,1).splice(0,1)}break}s.placement!==void 0?(d=await qe(s,t,a),s.noteModel=d,n.forEach(f=>{l=f,l.from=i.common_default.getMin(l.from,d.startx),l.to=i.common_default.getMax(l.to,d.startx+d.width),l.width=i.common_default.getMax(l.width,Math.abs(l.from-l.to))-h.labelBoxWidth})):(c=ze(s,t,a),s.msgModel=c,c.startx&&c.stopx&&n.length>0&&n.forEach(f=>{if(l=f,c.startx===c.stopx){const x=t.get(s.from),m=t.get(s.to);l.from=i.common_default.getMin(x.x-c.width/2,x.x-x.width/2,l.from),l.to=i.common_default.getMax(m.x+c.width/2,m.x+x.width/2,l.to),l.width=i.common_default.getMax(l.width,Math.abs(l.to-l.from))-h.labelBoxWidth}else l.from=i.common_default.getMin(c.startx,l.from),l.to=i.common_default.getMax(c.stopx,l.to),l.width=i.common_default.getMax(l.width,c.width)-h.labelBoxWidth}))}return _.activations=[],i.log.debug("Loop type widths:",r),r},"calculateLoopBounds"),Ke={bounds:_,drawActors:Vt,drawActorsPopup:Zt,setConf:Jt,draw:We},Ue={parser:oe,get db(){return new de},renderer:Ke,styles:ue,init:i.__name(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,i.setConfig2({sequence:{wrap:e.wrap}}))},"init")};exports.diagram=Ue;
@@ -1,7 +1,7 @@
1
- import { s as G, a as W, S as N } from "./chunk-LXBSTHXV-DFifdLZK.js";
2
- import { _ as f, c as t, d as H, l as S, e as P, k as z, R as _, S as U, O as C, u as F } from "./index-VJw3klPt.js";
3
- import { G as O } from "./graph-CMnK4YO3.js";
4
- import { l as J } from "./layout-kUC11kUc.js";
1
+ import { s as G, a as W, S as N } from "./chunk-TVAH2DTR-C6i3nG3J.js";
2
+ import { _ as f, c as t, d as H, l as S, e as P, k as z, R as _, S as U, O as C, u as F } from "./index-kj0EuvQM.js";
3
+ import { G as O } from "./graph-BoeGwTWO.js";
4
+ import { l as J } from "./layout-D6agY5Ds.js";
5
5
  var X = /* @__PURE__ */ f((e) => e.append("circle").attr("class", "start-state").attr("r", t().state.sizeUnit).attr("cx", t().state.padding + t().state.sizeUnit).attr("cy", t().state.padding + t().state.sizeUnit), "drawStartState"), D = /* @__PURE__ */ f((e) => e.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", t().state.textHeight).attr("class", "divider").attr("x2", t().state.textHeight * 2).attr("y1", 0).attr("y2", 0), "drawDivider"), Y = /* @__PURE__ */ f((e, i) => {
6
6
  const d = e.append("text").attr("x", 2 * t().state.padding).attr("y", t().state.textHeight + 2 * t().state.padding).attr("font-size", t().state.fontSize).attr("class", "state-title").text(i.id), c = d.node().getBBox();
7
7
  return e.insert("rect", ":first-child").attr("x", t().state.padding).attr("y", t().state.padding).attr("width", c.width + 2 * t().state.padding).attr("height", c.height + 2 * t().state.padding).attr("rx", t().state.radius), d;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./chunk-LXBSTHXV-B0scQvN2.cjs"),t=require("./index-BA07EijG.cjs"),T=require("./graph-BrGj_Gfv.cjs"),H=require("./layout-Bt4IJcSa.cjs");var z=t.__name(e=>e.append("circle").attr("class","start-state").attr("r",t.getConfig2().state.sizeUnit).attr("cx",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit).attr("cy",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit),"drawStartState"),L=t.__name(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t.getConfig2().state.textHeight).attr("class","divider").attr("x2",t.getConfig2().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),A=t.__name((e,n)=>{const d=e.append("text").attr("x",2*t.getConfig2().state.padding).attr("y",t.getConfig2().state.textHeight+2*t.getConfig2().state.padding).attr("font-size",t.getConfig2().state.fontSize).attr("class","state-title").text(n.id),g=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t.getConfig2().state.padding).attr("y",t.getConfig2().state.padding).attr("width",g.width+2*t.getConfig2().state.padding).attr("height",g.height+2*t.getConfig2().state.padding).attr("rx",t.getConfig2().state.radius),d},"drawSimpleState"),P=t.__name((e,n)=>{const d=t.__name(function(c,m,y){const b=c.append("tspan").attr("x",2*t.getConfig2().state.padding).text(m);y||b.attr("dy",t.getConfig2().state.textHeight)},"addTspan"),o=e.append("text").attr("x",2*t.getConfig2().state.padding).attr("y",t.getConfig2().state.textHeight+1.3*t.getConfig2().state.padding).attr("font-size",t.getConfig2().state.fontSize).attr("class","state-title").text(n.descriptions[0]).node().getBBox(),l=o.height,p=e.append("text").attr("x",t.getConfig2().state.padding).attr("y",l+t.getConfig2().state.padding*.4+t.getConfig2().state.dividerMargin+t.getConfig2().state.textHeight).attr("class","state-description");let i=!0,r=!0;n.descriptions.forEach(function(c){i||(d(p,c,r),r=!1),i=!1});const C=e.append("line").attr("x1",t.getConfig2().state.padding).attr("y1",t.getConfig2().state.padding+l+t.getConfig2().state.dividerMargin/2).attr("y2",t.getConfig2().state.padding+l+t.getConfig2().state.dividerMargin/2).attr("class","descr-divider"),h=p.node().getBBox(),s=Math.max(h.width,o.width);return C.attr("x2",s+3*t.getConfig2().state.padding),e.insert("rect",":first-child").attr("x",t.getConfig2().state.padding).attr("y",t.getConfig2().state.padding).attr("width",s+2*t.getConfig2().state.padding).attr("height",h.height+l+2*t.getConfig2().state.padding).attr("rx",t.getConfig2().state.radius),e},"drawDescrState"),R=t.__name((e,n,d)=>{const g=t.getConfig2().state.padding,o=2*t.getConfig2().state.padding,l=e.node().getBBox(),p=l.width,i=l.x,r=e.append("text").attr("x",0).attr("y",t.getConfig2().state.titleShift).attr("font-size",t.getConfig2().state.fontSize).attr("class","state-title").text(n.id),h=r.node().getBBox().width+o;let s=Math.max(h,p);s===p&&(s=s+o);let c;const m=e.node().getBBox();n.doc,c=i-g,h>p&&(c=(p-s)/2+g),Math.abs(i-m.x)<g&&h>p&&(c=i-(h-p)/2);const y=1-t.getConfig2().state.textHeight;return e.insert("rect",":first-child").attr("x",c).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",s).attr("height",m.height+t.getConfig2().state.textHeight+t.getConfig2().state.titleShift+1).attr("rx","0"),r.attr("x",c+g),h<=p&&r.attr("x",i+(s-o)/2-h/2+g),e.insert("rect",":first-child").attr("x",c).attr("y",t.getConfig2().state.titleShift-t.getConfig2().state.textHeight-t.getConfig2().state.padding).attr("width",s).attr("height",t.getConfig2().state.textHeight*3).attr("rx",t.getConfig2().state.radius),e.insert("rect",":first-child").attr("x",c).attr("y",t.getConfig2().state.titleShift-t.getConfig2().state.textHeight-t.getConfig2().state.padding).attr("width",s).attr("height",m.height+3+2*t.getConfig2().state.textHeight).attr("rx",t.getConfig2().state.radius),e},"addTitleAndBox"),W=t.__name(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t.getConfig2().state.sizeUnit+t.getConfig2().state.miniPadding).attr("cx",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit+t.getConfig2().state.miniPadding).attr("cy",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit+t.getConfig2().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t.getConfig2().state.sizeUnit).attr("cx",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit+2).attr("cy",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit+2)),"drawEndState"),G=t.__name((e,n)=>{let d=t.getConfig2().state.forkWidth,g=t.getConfig2().state.forkHeight;if(n.parentId){let o=d;d=g,g=o}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",g).attr("x",t.getConfig2().state.padding).attr("y",t.getConfig2().state.padding)},"drawForkJoinState"),U=t.__name((e,n,d,g)=>{let o=0;const l=g.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const i=p.split(t.common_default.lineBreakRegex);let r=1.25*t.getConfig2().state.noteMargin;for(const C of i){const h=C.trim();if(h.length>0){const s=l.append("tspan");if(s.text(h),r===0){const c=s.node().getBBox();r+=c.height}o+=r,s.attr("x",n+t.getConfig2().state.noteMargin),s.attr("y",d+o+1.25*t.getConfig2().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:o}},"_drawLongText"),D=t.__name((e,n)=>{n.attr("class","state-note");const d=n.append("rect").attr("x",0).attr("y",t.getConfig2().state.padding),g=n.append("g"),{textWidth:o,textHeight:l}=U(e,0,0,g);return d.attr("height",l+2*t.getConfig2().state.noteMargin),d.attr("width",o+t.getConfig2().state.noteMargin*2),d},"drawNote"),k=t.__name(function(e,n){const d=n.id,g={id:d,label:n.id,width:0,height:0},o=e.append("g").attr("id",d).attr("class","stateGroup");n.type==="start"&&z(o),n.type==="end"&&W(o),(n.type==="fork"||n.type==="join")&&G(o,n),n.type==="note"&&D(n.note.text,o),n.type==="divider"&&L(o),n.type==="default"&&n.descriptions.length===0&&A(o,n),n.type==="default"&&n.descriptions.length>0&&P(o,n);const l=o.node().getBBox();return g.width=l.width+2*t.getConfig2().state.padding,g.height=l.height+2*t.getConfig2().state.padding,g},"drawState"),N=0,F=t.__name(function(e,n,d){const g=t.__name(function(r){switch(r){case _.StateDB.relationType.AGGREGATION:return"aggregation";case _.StateDB.relationType.EXTENSION:return"extension";case _.StateDB.relationType.COMPOSITION:return"composition";case _.StateDB.relationType.DEPENDENCY:return"dependency"}},"getRelationType");n.points=n.points.filter(r=>!Number.isNaN(r.y));const o=n.points,l=t.line().x(function(r){return r.x}).y(function(r){return r.y}).curve(t.curveBasis),p=e.append("path").attr("d",l(o)).attr("id","edge"+N).attr("class","transition");let i="";if(t.getConfig2().state.arrowMarkerAbsolute&&(i=t.getUrl(!0)),p.attr("marker-end","url("+i+"#"+g(_.StateDB.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const r=e.append("g").attr("class","stateLabel"),{x:C,y:h}=t.utils_default.calcLabelPosition(n.points),s=t.common_default.getRows(d.title);let c=0;const m=[];let y=0,b=0;for(let x=0;x<=s.length;x++){const f=r.append("text").attr("text-anchor","middle").text(s[x]).attr("x",C).attr("y",h+c),u=f.node().getBBox();y=Math.max(y,u.width),b=Math.min(b,u.x),t.log.info(u.x,C,h+c),c===0&&(c=f.node().getBBox().height,t.log.info("Title height",c,h)),m.push(f)}let S=c*s.length;if(s.length>1){const x=(s.length-1)*c*.5;m.forEach((f,u)=>f.attr("y",h+u*c-x)),S=c*s.length}const a=r.node().getBBox();r.insert("rect",":first-child").attr("class","box").attr("x",C-y/2-t.getConfig2().state.padding/2).attr("y",h-S/2-t.getConfig2().state.padding/2-3.5).attr("width",y+t.getConfig2().state.padding).attr("height",S+t.getConfig2().state.padding),t.log.info(a)}N++},"drawEdge"),w,E={},O=t.__name(function(){},"setConf"),X=t.__name(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),q=t.__name(function(e,n,d,g){w=t.getConfig2().state;const o=t.getConfig2().securityLevel;let l;o==="sandbox"&&(l=t.select("#i"+n));const p=o==="sandbox"?t.select(l.nodes()[0].contentDocument.body):t.select("body"),i=o==="sandbox"?l.nodes()[0].contentDocument:document;t.log.debug("Rendering diagram "+e);const r=p.select(`[id='${n}']`);X(r);const C=g.db.getRootDoc();M(C,r,void 0,!1,p,i,g);const h=w.padding,s=r.node().getBBox(),c=s.width+h*2,m=s.height+h*2,y=c*1.75;t.configureSvgSize(r,m,y,w.useMaxWidth),r.attr("viewBox",`${s.x-w.padding} ${s.y-w.padding} `+c+" "+m)},"draw"),J=t.__name(e=>e?e.length*w.fontSizeFactor:1,"getLabelWidth"),M=t.__name((e,n,d,g,o,l,p)=>{const i=new T.Graph({compound:!0,multigraph:!0});let r,C=!0;for(r=0;r<e.length;r++)if(e[r].stmt==="relation"){C=!1;break}d?i.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:C?1:w.edgeLengthFactor,nodeSep:C?1:50,isMultiGraph:!0}):i.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:C?1:w.edgeLengthFactor,nodeSep:C?1:50,ranker:"tight-tree",isMultiGraph:!0}),i.setDefaultEdgeLabel(function(){return{}});const h=p.db.getStates(),s=p.db.getRelations(),c=Object.keys(h);for(const a of c){const x=h[a];d&&(x.parentId=d);let f;if(x.doc){let u=n.append("g").attr("id",x.id).attr("class","stateGroup");f=M(x.doc,u,x.id,!g,o,l,p);{u=R(u,x,g);let B=u.node().getBBox();f.width=B.width,f.height=B.height+w.padding/2,E[x.id]={y:w.compositTitleSize}}}else f=k(n,x,i);if(x.note){const u={descriptions:[],id:x.id+"-note",note:x.note,type:"note"},B=k(n,u,i);x.note.position==="left of"?(i.setNode(f.id+"-note",B),i.setNode(f.id,f)):(i.setNode(f.id,f),i.setNode(f.id+"-note",B)),i.setParent(f.id,f.id+"-group"),i.setParent(f.id+"-note",f.id+"-group")}else i.setNode(f.id,f)}t.log.debug("Count=",i.nodeCount(),i);let m=0;s.forEach(function(a){m++,t.log.debug("Setting edge",a),i.setEdge(a.id1,a.id2,{relation:a,width:J(a.title),height:w.labelHeight*t.common_default.getRows(a.title).length,labelpos:"c"},"id"+m)}),H.layout(i),t.log.debug("Graph after layout",i.nodes());const y=n.node();i.nodes().forEach(function(a){a!==void 0&&i.node(a)!==void 0?(t.log.warn("Node "+a+": "+JSON.stringify(i.node(a))),o.select("#"+y.id+" #"+a).attr("transform","translate("+(i.node(a).x-i.node(a).width/2)+","+(i.node(a).y+(E[a]?E[a].y:0)-i.node(a).height/2)+" )"),o.select("#"+y.id+" #"+a).attr("data-x-shift",i.node(a).x-i.node(a).width/2),l.querySelectorAll("#"+y.id+" #"+a+" .divider").forEach(f=>{const u=f.parentElement;let B=0,v=0;u&&(u.parentElement&&(B=u.parentElement.getBBox().width),v=parseInt(u.getAttribute("data-x-shift"),10),Number.isNaN(v)&&(v=0)),f.setAttribute("x1",0-v+8),f.setAttribute("x2",B-v-8)})):t.log.debug("No Node "+a+": "+JSON.stringify(i.node(a)))});let b=y.getBBox();i.edges().forEach(function(a){a!==void 0&&i.edge(a)!==void 0&&(t.log.debug("Edge "+a.v+" -> "+a.w+": "+JSON.stringify(i.edge(a))),F(n,i.edge(a),i.edge(a).relation))}),b=y.getBBox();const S={id:d||"root",label:d||"root",width:0,height:0};return S.width=b.width+2*w.padding,S.height=b.height+2*w.padding,t.log.debug("Doc rendered",S,i),S},"renderDoc"),Y={setConf:O,draw:q},$={parser:_.stateDiagram_default,get db(){return new _.StateDB(1)},renderer:Y,styles:_.styles_default,init:t.__name(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};exports.diagram=$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./chunk-TVAH2DTR-Cln0v1mj.cjs"),t=require("./index-CdZgX2Ma.cjs"),T=require("./graph-v1PSEGdd.cjs"),H=require("./layout-CwMglWfT.cjs");var z=t.__name(e=>e.append("circle").attr("class","start-state").attr("r",t.getConfig2().state.sizeUnit).attr("cx",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit).attr("cy",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit),"drawStartState"),L=t.__name(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t.getConfig2().state.textHeight).attr("class","divider").attr("x2",t.getConfig2().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),A=t.__name((e,n)=>{const d=e.append("text").attr("x",2*t.getConfig2().state.padding).attr("y",t.getConfig2().state.textHeight+2*t.getConfig2().state.padding).attr("font-size",t.getConfig2().state.fontSize).attr("class","state-title").text(n.id),g=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t.getConfig2().state.padding).attr("y",t.getConfig2().state.padding).attr("width",g.width+2*t.getConfig2().state.padding).attr("height",g.height+2*t.getConfig2().state.padding).attr("rx",t.getConfig2().state.radius),d},"drawSimpleState"),R=t.__name((e,n)=>{const d=t.__name(function(c,m,y){const b=c.append("tspan").attr("x",2*t.getConfig2().state.padding).text(m);y||b.attr("dy",t.getConfig2().state.textHeight)},"addTspan"),o=e.append("text").attr("x",2*t.getConfig2().state.padding).attr("y",t.getConfig2().state.textHeight+1.3*t.getConfig2().state.padding).attr("font-size",t.getConfig2().state.fontSize).attr("class","state-title").text(n.descriptions[0]).node().getBBox(),l=o.height,p=e.append("text").attr("x",t.getConfig2().state.padding).attr("y",l+t.getConfig2().state.padding*.4+t.getConfig2().state.dividerMargin+t.getConfig2().state.textHeight).attr("class","state-description");let i=!0,r=!0;n.descriptions.forEach(function(c){i||(d(p,c,r),r=!1),i=!1});const C=e.append("line").attr("x1",t.getConfig2().state.padding).attr("y1",t.getConfig2().state.padding+l+t.getConfig2().state.dividerMargin/2).attr("y2",t.getConfig2().state.padding+l+t.getConfig2().state.dividerMargin/2).attr("class","descr-divider"),h=p.node().getBBox(),s=Math.max(h.width,o.width);return C.attr("x2",s+3*t.getConfig2().state.padding),e.insert("rect",":first-child").attr("x",t.getConfig2().state.padding).attr("y",t.getConfig2().state.padding).attr("width",s+2*t.getConfig2().state.padding).attr("height",h.height+l+2*t.getConfig2().state.padding).attr("rx",t.getConfig2().state.radius),e},"drawDescrState"),P=t.__name((e,n,d)=>{const g=t.getConfig2().state.padding,o=2*t.getConfig2().state.padding,l=e.node().getBBox(),p=l.width,i=l.x,r=e.append("text").attr("x",0).attr("y",t.getConfig2().state.titleShift).attr("font-size",t.getConfig2().state.fontSize).attr("class","state-title").text(n.id),h=r.node().getBBox().width+o;let s=Math.max(h,p);s===p&&(s=s+o);let c;const m=e.node().getBBox();n.doc,c=i-g,h>p&&(c=(p-s)/2+g),Math.abs(i-m.x)<g&&h>p&&(c=i-(h-p)/2);const y=1-t.getConfig2().state.textHeight;return e.insert("rect",":first-child").attr("x",c).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",s).attr("height",m.height+t.getConfig2().state.textHeight+t.getConfig2().state.titleShift+1).attr("rx","0"),r.attr("x",c+g),h<=p&&r.attr("x",i+(s-o)/2-h/2+g),e.insert("rect",":first-child").attr("x",c).attr("y",t.getConfig2().state.titleShift-t.getConfig2().state.textHeight-t.getConfig2().state.padding).attr("width",s).attr("height",t.getConfig2().state.textHeight*3).attr("rx",t.getConfig2().state.radius),e.insert("rect",":first-child").attr("x",c).attr("y",t.getConfig2().state.titleShift-t.getConfig2().state.textHeight-t.getConfig2().state.padding).attr("width",s).attr("height",m.height+3+2*t.getConfig2().state.textHeight).attr("rx",t.getConfig2().state.radius),e},"addTitleAndBox"),W=t.__name(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t.getConfig2().state.sizeUnit+t.getConfig2().state.miniPadding).attr("cx",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit+t.getConfig2().state.miniPadding).attr("cy",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit+t.getConfig2().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t.getConfig2().state.sizeUnit).attr("cx",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit+2).attr("cy",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit+2)),"drawEndState"),G=t.__name((e,n)=>{let d=t.getConfig2().state.forkWidth,g=t.getConfig2().state.forkHeight;if(n.parentId){let o=d;d=g,g=o}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",g).attr("x",t.getConfig2().state.padding).attr("y",t.getConfig2().state.padding)},"drawForkJoinState"),D=t.__name((e,n,d,g)=>{let o=0;const l=g.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const i=p.split(t.common_default.lineBreakRegex);let r=1.25*t.getConfig2().state.noteMargin;for(const C of i){const h=C.trim();if(h.length>0){const s=l.append("tspan");if(s.text(h),r===0){const c=s.node().getBBox();r+=c.height}o+=r,s.attr("x",n+t.getConfig2().state.noteMargin),s.attr("y",d+o+1.25*t.getConfig2().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:o}},"_drawLongText"),U=t.__name((e,n)=>{n.attr("class","state-note");const d=n.append("rect").attr("x",0).attr("y",t.getConfig2().state.padding),g=n.append("g"),{textWidth:o,textHeight:l}=D(e,0,0,g);return d.attr("height",l+2*t.getConfig2().state.noteMargin),d.attr("width",o+t.getConfig2().state.noteMargin*2),d},"drawNote"),k=t.__name(function(e,n){const d=n.id,g={id:d,label:n.id,width:0,height:0},o=e.append("g").attr("id",d).attr("class","stateGroup");n.type==="start"&&z(o),n.type==="end"&&W(o),(n.type==="fork"||n.type==="join")&&G(o,n),n.type==="note"&&U(n.note.text,o),n.type==="divider"&&L(o),n.type==="default"&&n.descriptions.length===0&&A(o,n),n.type==="default"&&n.descriptions.length>0&&R(o,n);const l=o.node().getBBox();return g.width=l.width+2*t.getConfig2().state.padding,g.height=l.height+2*t.getConfig2().state.padding,g},"drawState"),N=0,F=t.__name(function(e,n,d){const g=t.__name(function(r){switch(r){case _.StateDB.relationType.AGGREGATION:return"aggregation";case _.StateDB.relationType.EXTENSION:return"extension";case _.StateDB.relationType.COMPOSITION:return"composition";case _.StateDB.relationType.DEPENDENCY:return"dependency"}},"getRelationType");n.points=n.points.filter(r=>!Number.isNaN(r.y));const o=n.points,l=t.line().x(function(r){return r.x}).y(function(r){return r.y}).curve(t.curveBasis),p=e.append("path").attr("d",l(o)).attr("id","edge"+N).attr("class","transition");let i="";if(t.getConfig2().state.arrowMarkerAbsolute&&(i=t.getUrl(!0)),p.attr("marker-end","url("+i+"#"+g(_.StateDB.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const r=e.append("g").attr("class","stateLabel"),{x:C,y:h}=t.utils_default.calcLabelPosition(n.points),s=t.common_default.getRows(d.title);let c=0;const m=[];let y=0,b=0;for(let x=0;x<=s.length;x++){const f=r.append("text").attr("text-anchor","middle").text(s[x]).attr("x",C).attr("y",h+c),u=f.node().getBBox();y=Math.max(y,u.width),b=Math.min(b,u.x),t.log.info(u.x,C,h+c),c===0&&(c=f.node().getBBox().height,t.log.info("Title height",c,h)),m.push(f)}let S=c*s.length;if(s.length>1){const x=(s.length-1)*c*.5;m.forEach((f,u)=>f.attr("y",h+u*c-x)),S=c*s.length}const a=r.node().getBBox();r.insert("rect",":first-child").attr("class","box").attr("x",C-y/2-t.getConfig2().state.padding/2).attr("y",h-S/2-t.getConfig2().state.padding/2-3.5).attr("width",y+t.getConfig2().state.padding).attr("height",S+t.getConfig2().state.padding),t.log.info(a)}N++},"drawEdge"),w,E={},O=t.__name(function(){},"setConf"),q=t.__name(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),J=t.__name(function(e,n,d,g){w=t.getConfig2().state;const o=t.getConfig2().securityLevel;let l;o==="sandbox"&&(l=t.select("#i"+n));const p=o==="sandbox"?t.select(l.nodes()[0].contentDocument.body):t.select("body"),i=o==="sandbox"?l.nodes()[0].contentDocument:document;t.log.debug("Rendering diagram "+e);const r=p.select(`[id='${n}']`);q(r);const C=g.db.getRootDoc();M(C,r,void 0,!1,p,i,g);const h=w.padding,s=r.node().getBBox(),c=s.width+h*2,m=s.height+h*2,y=c*1.75;t.configureSvgSize(r,m,y,w.useMaxWidth),r.attr("viewBox",`${s.x-w.padding} ${s.y-w.padding} `+c+" "+m)},"draw"),X=t.__name(e=>e?e.length*w.fontSizeFactor:1,"getLabelWidth"),M=t.__name((e,n,d,g,o,l,p)=>{const i=new T.Graph({compound:!0,multigraph:!0});let r,C=!0;for(r=0;r<e.length;r++)if(e[r].stmt==="relation"){C=!1;break}d?i.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:C?1:w.edgeLengthFactor,nodeSep:C?1:50,isMultiGraph:!0}):i.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:C?1:w.edgeLengthFactor,nodeSep:C?1:50,ranker:"tight-tree",isMultiGraph:!0}),i.setDefaultEdgeLabel(function(){return{}});const h=p.db.getStates(),s=p.db.getRelations(),c=Object.keys(h);for(const a of c){const x=h[a];d&&(x.parentId=d);let f;if(x.doc){let u=n.append("g").attr("id",x.id).attr("class","stateGroup");f=M(x.doc,u,x.id,!g,o,l,p);{u=P(u,x,g);let B=u.node().getBBox();f.width=B.width,f.height=B.height+w.padding/2,E[x.id]={y:w.compositTitleSize}}}else f=k(n,x,i);if(x.note){const u={descriptions:[],id:x.id+"-note",note:x.note,type:"note"},B=k(n,u,i);x.note.position==="left of"?(i.setNode(f.id+"-note",B),i.setNode(f.id,f)):(i.setNode(f.id,f),i.setNode(f.id+"-note",B)),i.setParent(f.id,f.id+"-group"),i.setParent(f.id+"-note",f.id+"-group")}else i.setNode(f.id,f)}t.log.debug("Count=",i.nodeCount(),i);let m=0;s.forEach(function(a){m++,t.log.debug("Setting edge",a),i.setEdge(a.id1,a.id2,{relation:a,width:X(a.title),height:w.labelHeight*t.common_default.getRows(a.title).length,labelpos:"c"},"id"+m)}),H.layout(i),t.log.debug("Graph after layout",i.nodes());const y=n.node();i.nodes().forEach(function(a){a!==void 0&&i.node(a)!==void 0?(t.log.warn("Node "+a+": "+JSON.stringify(i.node(a))),o.select("#"+y.id+" #"+a).attr("transform","translate("+(i.node(a).x-i.node(a).width/2)+","+(i.node(a).y+(E[a]?E[a].y:0)-i.node(a).height/2)+" )"),o.select("#"+y.id+" #"+a).attr("data-x-shift",i.node(a).x-i.node(a).width/2),l.querySelectorAll("#"+y.id+" #"+a+" .divider").forEach(f=>{const u=f.parentElement;let B=0,v=0;u&&(u.parentElement&&(B=u.parentElement.getBBox().width),v=parseInt(u.getAttribute("data-x-shift"),10),Number.isNaN(v)&&(v=0)),f.setAttribute("x1",0-v+8),f.setAttribute("x2",B-v-8)})):t.log.debug("No Node "+a+": "+JSON.stringify(i.node(a)))});let b=y.getBBox();i.edges().forEach(function(a){a!==void 0&&i.edge(a)!==void 0&&(t.log.debug("Edge "+a.v+" -> "+a.w+": "+JSON.stringify(i.edge(a))),F(n,i.edge(a),i.edge(a).relation))}),b=y.getBBox();const S={id:d||"root",label:d||"root",width:0,height:0};return S.width=b.width+2*w.padding,S.height=b.height+2*w.padding,t.log.debug("Doc rendered",S,i),S},"renderDoc"),Y={setConf:O,draw:J},$={parser:_.stateDiagram_default,get db(){return new _.StateDB(1)},renderer:Y,styles:_.styles_default,init:t.__name(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};exports.diagram=$;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./chunk-LXBSTHXV-B0scQvN2.cjs"),r=require("./index-BA07EijG.cjs");var a={parser:t.stateDiagram_default,get db(){return new t.StateDB(2)},renderer:t.stateRenderer_v3_unified_default,styles:t.styles_default,init:r.__name(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};exports.diagram=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./chunk-TVAH2DTR-Cln0v1mj.cjs"),r=require("./index-CdZgX2Ma.cjs");var a={parser:t.stateDiagram_default,get db(){return new t.StateDB(2)},renderer:t.stateRenderer_v3_unified_default,styles:t.styles_default,init:r.__name(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};exports.diagram=a;
@@ -1,5 +1,5 @@
1
- import { s as a, b as t, a as r, S as s } from "./chunk-LXBSTHXV-DFifdLZK.js";
2
- import { _ as i } from "./index-VJw3klPt.js";
1
+ import { s as a, b as t, a as r, S as s } from "./chunk-TVAH2DTR-C6i3nG3J.js";
2
+ import { _ as i } from "./index-kj0EuvQM.js";
3
3
  var _ = {
4
4
  parser: r,
5
5
  get db() {
@@ -1,5 +1,5 @@
1
- import { _ as s, c as xt, l as E, d as j, V as kt, W as vt, X as _t, Y as bt, B as wt, $ as St, y as Et } from "./index-VJw3klPt.js";
2
- import { d as nt } from "./arc-BC6Mnh_l.js";
1
+ import { _ as s, c as xt, l as E, d as j, V as kt, W as vt, X as _t, Y as bt, B as wt, $ as St, y as Et } from "./index-kj0EuvQM.js";
2
+ import { d as nt } from "./arc-B2BtxFI4.js";
3
3
  var Q = function() {
4
4
  var n = /* @__PURE__ */ s(function(x, r, a, c) {
5
5
  for (a = a || {}, c = x.length; c--; a[x[c]] = r) ;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-BA07EijG.cjs"),tt=require("./arc-H_1C-9yW.cjs");var J=function(){var r=n.__name(function(m,s,a,c){for(a=a||{},c=m.length;c--;a[m[c]]=s);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],i=[1,11],d=[1,12],h=[1,13],_=[1,16],f=[1,17],p={trace:n.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:n.__name(function(s,a,c,u,g,o,w){var k=o.length-1;switch(g){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.getCommonDb().setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.getCommonDb().setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 15:u.addTask(o[k],0,""),this.$=o[k];break;case 16:u.addEvent(o[k].substr(2)),this.$=o[k];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},r(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:i,16:d,17:h,18:14,19:15,20:_,21:f},r(t,[2,7],{1:[2,1]}),r(t,[2,3]),{9:18,11:e,12:l,14:i,16:d,17:h,18:14,19:15,20:_,21:f},r(t,[2,5]),r(t,[2,6]),r(t,[2,8]),{13:[1,19]},{15:[1,20]},r(t,[2,11]),r(t,[2,12]),r(t,[2,13]),r(t,[2,14]),r(t,[2,15]),r(t,[2,16]),r(t,[2,4]),r(t,[2,9]),r(t,[2,10])],defaultActions:{},parseError:n.__name(function(s,a){if(a.recoverable)this.trace(s);else{var c=new Error(s);throw c.hash=a,c}},"parseError"),parse:n.__name(function(s){var a=this,c=[0],u=[],g=[null],o=[],w=this.table,k="",I=0,P=0,z=2,G=1,M=o.slice.call(arguments,1),y=Object.create(this.lexer),b={yy:{}};for(var N in this.yy)Object.prototype.hasOwnProperty.call(this.yy,N)&&(b.yy[N]=this.yy[N]);y.setInput(s,b.yy),b.yy.lexer=y,b.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var $=y.yylloc;o.push($);var V=y.options&&y.options.ranges;typeof b.yy.parseError=="function"?this.parseError=b.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function q(E){c.length=c.length-2*E,g.length=g.length-E,o.length=o.length-E}n.__name(q,"popStack");function Y(){var E;return E=u.pop()||y.lex()||G,typeof E!="number"&&(E instanceof Array&&(u=E,E=u.pop()),E=a.symbols_[E]||E),E}n.__name(Y,"lex");for(var S,H,T,U,C={},W,L,D,B;;){if(H=c[c.length-1],this.defaultActions[H]?T=this.defaultActions[H]:((S===null||typeof S>"u")&&(S=Y()),T=w[H]&&w[H][S]),typeof T>"u"||!T.length||!T[0]){var Z="";B=[];for(W in w[H])this.terminals_[W]&&W>z&&B.push("'"+this.terminals_[W]+"'");y.showPosition?Z="Parse error on line "+(I+1)+`:
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CdZgX2Ma.cjs"),tt=require("./arc-Bg-chCuU.cjs");var J=function(){var r=n.__name(function(m,s,a,c){for(a=a||{},c=m.length;c--;a[m[c]]=s);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],i=[1,11],d=[1,12],h=[1,13],_=[1,16],f=[1,17],p={trace:n.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:n.__name(function(s,a,c,u,g,o,w){var k=o.length-1;switch(g){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.getCommonDb().setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.getCommonDb().setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 15:u.addTask(o[k],0,""),this.$=o[k];break;case 16:u.addEvent(o[k].substr(2)),this.$=o[k];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},r(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:i,16:d,17:h,18:14,19:15,20:_,21:f},r(t,[2,7],{1:[2,1]}),r(t,[2,3]),{9:18,11:e,12:l,14:i,16:d,17:h,18:14,19:15,20:_,21:f},r(t,[2,5]),r(t,[2,6]),r(t,[2,8]),{13:[1,19]},{15:[1,20]},r(t,[2,11]),r(t,[2,12]),r(t,[2,13]),r(t,[2,14]),r(t,[2,15]),r(t,[2,16]),r(t,[2,4]),r(t,[2,9]),r(t,[2,10])],defaultActions:{},parseError:n.__name(function(s,a){if(a.recoverable)this.trace(s);else{var c=new Error(s);throw c.hash=a,c}},"parseError"),parse:n.__name(function(s){var a=this,c=[0],u=[],g=[null],o=[],w=this.table,k="",I=0,P=0,z=2,G=1,M=o.slice.call(arguments,1),y=Object.create(this.lexer),b={yy:{}};for(var N in this.yy)Object.prototype.hasOwnProperty.call(this.yy,N)&&(b.yy[N]=this.yy[N]);y.setInput(s,b.yy),b.yy.lexer=y,b.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var $=y.yylloc;o.push($);var V=y.options&&y.options.ranges;typeof b.yy.parseError=="function"?this.parseError=b.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function q(E){c.length=c.length-2*E,g.length=g.length-E,o.length=o.length-E}n.__name(q,"popStack");function Y(){var E;return E=u.pop()||y.lex()||G,typeof E!="number"&&(E instanceof Array&&(u=E,E=u.pop()),E=a.symbols_[E]||E),E}n.__name(Y,"lex");for(var S,H,T,U,C={},W,L,D,B;;){if(H=c[c.length-1],this.defaultActions[H]?T=this.defaultActions[H]:((S===null||typeof S>"u")&&(S=Y()),T=w[H]&&w[H][S]),typeof T>"u"||!T.length||!T[0]){var Z="";B=[];for(W in w[H])this.terminals_[W]&&W>z&&B.push("'"+this.terminals_[W]+"'");y.showPosition?Z="Parse error on line "+(I+1)+`:
2
2
  `+y.showPosition()+`
3
3
  Expecting `+B.join(", ")+", got '"+(this.terminals_[S]||S)+"'":Z="Parse error on line "+(I+1)+": Unexpected "+(S==G?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(Z,{text:y.match,token:this.terminals_[S]||S,line:y.yylineno,loc:$,expected:B})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+S);switch(T[0]){case 1:c.push(S),g.push(y.yytext),o.push(y.yylloc),c.push(T[1]),S=null,P=y.yyleng,k=y.yytext,I=y.yylineno,$=y.yylloc;break;case 2:if(L=this.productions_[T[1]][1],C.$=g[g.length-L],C._$={first_line:o[o.length-(L||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(L||1)].first_column,last_column:o[o.length-1].last_column},V&&(C._$.range=[o[o.length-(L||1)].range[0],o[o.length-1].range[1]]),U=this.performAction.apply(C,[k,P,I,b.yy,T[1],g,o].concat(M)),typeof U<"u")return U;L&&(c=c.slice(0,-1*L*2),g=g.slice(0,-1*L),o=o.slice(0,-1*L)),c.push(this.productions_[T[1]][0]),g.push(C.$),o.push(C._$),D=w[c[c.length-2]][c[c.length-1]],c.push(D);break;case 3:return!0}}return!0},"parse")},x=function(){var m={EOF:1,parseError:n.__name(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:n.__name(function(s,a){return this.yy=a||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n.__name(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var a=s.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:n.__name(function(s){var a=s.length,c=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var g=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===u.length?this.yylloc.first_column:0)+u[u.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[g[0],g[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:n.__name(function(){return this._more=!0,this},"more"),reject:n.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n.__name(function(s){this.unput(this.match.slice(s))},"less"),pastInput:n.__name(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n.__name(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n.__name(function(){var s=this.pastInput(),a=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import { T as a, h as m } from "./mermaid-parser.core-BnvQOoyE.js";
1
+ import { T as a, h as m } from "./mermaid-parser.core-Blpz4SbD.js";
2
2
  export {
3
3
  a as TreemapModule,
4
4
  m as createTreemapServices
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mermaid-parser.core-Bxkmx2-5.cjs");exports.TreemapModule=e.TreemapModule;exports.createTreemapServices=e.createTreemapServices;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mermaid-parser.core-BFoNlVio.cjs");exports.TreemapModule=e.TreemapModule;exports.createTreemapServices=e.createTreemapServices;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-BA07EijG.cjs"),oe=require("./init-CHZsXQcr.cjs"),he=require("./ordinal-CagbB1m8.cjs"),Bt=require("./linear-50cMYwZQ.cjs");function le(i,t,e){i=+i,t=+t,e=(a=arguments.length)<2?(t=i,i=0,1):a<3?1:+e;for(var s=-1,a=Math.max(0,Math.ceil((t-i)/e))|0,o=new Array(a);++s<a;)o[s]=i+s*e;return o}function yt(){var i=he.ordinal().unknown(void 0),t=i.domain,e=i.range,s=0,a=1,o,g,m=!1,p=0,k=0,v=.5;delete i.unknown;function w(){var _=t().length,E=a<s,D=E?a:s,P=E?s:a;o=(P-D)/Math.max(1,_-p+k*2),m&&(o=Math.floor(o)),D+=(P-D-o*(_-p))*v,g=o*(1-p),m&&(D=Math.round(D),g=Math.round(g));var M=le(_).map(function(y){return D+o*y});return e(E?M.reverse():M)}return i.domain=function(_){return arguments.length?(t(_),w()):t()},i.range=function(_){return arguments.length?([s,a]=_,s=+s,a=+a,w()):[s,a]},i.rangeRound=function(_){return[s,a]=_,s=+s,a=+a,m=!0,w()},i.bandwidth=function(){return g},i.step=function(){return o},i.round=function(_){return arguments.length?(m=!!_,w()):m},i.padding=function(_){return arguments.length?(p=Math.min(1,k=+_),w()):p},i.paddingInner=function(_){return arguments.length?(p=Math.min(1,_),w()):p},i.paddingOuter=function(_){return arguments.length?(k=+_,w()):k},i.align=function(_){return arguments.length?(v=Math.max(0,Math.min(1,_)),w()):v},i.copy=function(){return yt(t(),[s,a]).round(m).paddingInner(p).paddingOuter(k).align(v)},oe.initRange.apply(w(),arguments)}var _t=function(){var i=n.__name(function(O,h,u,x){for(u=u||{},x=O.length;x--;u[O[x]]=h);return u},"o"),t=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],o=[1,6],g=[1,7],m=[1,5,10,12,14,16,18,19,21,23,34,35,36],p=[1,25],k=[1,26],v=[1,28],w=[1,29],_=[1,30],E=[1,31],D=[1,32],P=[1,33],M=[1,34],y=[1,35],S=[1,36],c=[1,37],W=[1,43],z=[1,42],U=[1,47],X=[1,50],l=[1,10,12,14,16,18,19,21,23,34,35,36],L=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],C=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],T=[1,64],$={trace:n.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n.__name(function(h,u,x,d,A,r,at){var f=r.length-1;switch(A){case 5:d.setOrientation(r[f]);break;case 9:d.setDiagramTitle(r[f].text.trim());break;case 12:d.setLineData({text:"",type:"text"},r[f]);break;case 13:d.setLineData(r[f-1],r[f]);break;case 14:d.setBarData({text:"",type:"text"},r[f]);break;case 15:d.setBarData(r[f-1],r[f]);break;case 16:this.$=r[f].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=r[f].trim(),d.setAccDescription(this.$);break;case 19:this.$=r[f-1];break;case 20:this.$=[Number(r[f-2]),...r[f]];break;case 21:this.$=[Number(r[f])];break;case 22:d.setXAxisTitle(r[f]);break;case 23:d.setXAxisTitle(r[f-1]);break;case 24:d.setXAxisTitle({type:"text",text:""});break;case 25:d.setXAxisBand(r[f]);break;case 26:d.setXAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 27:this.$=r[f-1];break;case 28:this.$=[r[f-2],...r[f]];break;case 29:this.$=[r[f]];break;case 30:d.setYAxisTitle(r[f]);break;case 31:d.setYAxisTitle(r[f-1]);break;case 32:d.setYAxisTitle({type:"text",text:""});break;case 33:d.setYAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 37:this.$={text:r[f],type:"text"};break;case 38:this.$={text:r[f],type:"text"};break;case 39:this.$={text:r[f],type:"markdown"};break;case 40:this.$=r[f];break;case 41:this.$=r[f-1]+""+r[f];break}},"anonymous"),table:[i(t,e,{3:1,4:2,7:4,5:s,34:a,35:o,36:g}),{1:[3]},i(t,e,{4:2,7:4,3:8,5:s,34:a,35:o,36:g}),i(t,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:a,35:o,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},i(m,[2,34]),i(m,[2,35]),i(m,[2,36]),{1:[2,1]},i(t,e,{4:2,7:4,3:21,5:s,34:a,35:o,36:g}),{1:[2,3]},i(m,[2,5]),i(t,[2,7],{4:22,34:a,35:o,36:g}),{11:23,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{11:39,13:38,24:W,27:z,29:40,30:41,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{11:45,15:44,27:U,33:46,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{11:49,17:48,24:X,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{11:52,17:51,24:X,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{20:[1,53]},{22:[1,54]},i(l,[2,18]),{1:[2,2]},i(l,[2,8]),i(l,[2,9]),i(L,[2,37],{40:55,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c}),i(L,[2,38]),i(L,[2,39]),i(C,[2,40]),i(C,[2,42]),i(C,[2,43]),i(C,[2,44]),i(C,[2,45]),i(C,[2,46]),i(C,[2,47]),i(C,[2,48]),i(C,[2,49]),i(C,[2,50]),i(C,[2,51]),i(l,[2,10]),i(l,[2,22],{30:41,29:56,24:W,27:z}),i(l,[2,24]),i(l,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},i(l,[2,11]),i(l,[2,30],{33:60,27:U}),i(l,[2,32]),{31:[1,61]},i(l,[2,12]),{17:62,24:X},{25:63,27:T},i(l,[2,14]),{17:65,24:X},i(l,[2,16]),i(l,[2,17]),i(C,[2,41]),i(l,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},i(l,[2,31]),{27:[1,69]},i(l,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},i(l,[2,15]),i(l,[2,26]),i(l,[2,27]),{11:59,32:72,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},i(l,[2,33]),i(l,[2,19]),{25:73,27:T},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n.__name(function(h,u){if(u.recoverable)this.trace(h);else{var x=new Error(h);throw x.hash=u,x}},"parseError"),parse:n.__name(function(h){var u=this,x=[0],d=[],A=[null],r=[],at=this.table,f="",lt=0,Et=0,se=2,Mt=1,ne=r.slice.call(arguments,1),R=Object.create(this.lexer),Y={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(Y.yy[dt]=this.yy[dt]);R.setInput(h,Y.yy),Y.yy.lexer=R,Y.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var ft=R.yylloc;r.push(ft);var ae=R.options&&R.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(V){x.length=x.length-2*V,A.length=A.length-V,r.length=r.length-V}n.__name(re,"popStack");function It(){var V;return V=d.pop()||R.lex()||Mt,typeof V!="number"&&(V instanceof Array&&(d=V,V=d.pop()),V=u.symbols_[V]||V),V}n.__name(It,"lex");for(var I,H,B,pt,q={},ct,F,Vt,ut;;){if(H=x[x.length-1],this.defaultActions[H]?B=this.defaultActions[H]:((I===null||typeof I>"u")&&(I=It()),B=at[H]&&at[H][I]),typeof B>"u"||!B.length||!B[0]){var mt="";ut=[];for(ct in at[H])this.terminals_[ct]&&ct>se&&ut.push("'"+this.terminals_[ct]+"'");R.showPosition?mt="Parse error on line "+(lt+1)+`:
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CdZgX2Ma.cjs"),oe=require("./init-CHZsXQcr.cjs"),he=require("./ordinal-CagbB1m8.cjs"),Bt=require("./linear-zcj9uSLT.cjs");function le(i,t,e){i=+i,t=+t,e=(a=arguments.length)<2?(t=i,i=0,1):a<3?1:+e;for(var s=-1,a=Math.max(0,Math.ceil((t-i)/e))|0,o=new Array(a);++s<a;)o[s]=i+s*e;return o}function yt(){var i=he.ordinal().unknown(void 0),t=i.domain,e=i.range,s=0,a=1,o,g,m=!1,p=0,k=0,v=.5;delete i.unknown;function w(){var _=t().length,E=a<s,D=E?a:s,P=E?s:a;o=(P-D)/Math.max(1,_-p+k*2),m&&(o=Math.floor(o)),D+=(P-D-o*(_-p))*v,g=o*(1-p),m&&(D=Math.round(D),g=Math.round(g));var M=le(_).map(function(y){return D+o*y});return e(E?M.reverse():M)}return i.domain=function(_){return arguments.length?(t(_),w()):t()},i.range=function(_){return arguments.length?([s,a]=_,s=+s,a=+a,w()):[s,a]},i.rangeRound=function(_){return[s,a]=_,s=+s,a=+a,m=!0,w()},i.bandwidth=function(){return g},i.step=function(){return o},i.round=function(_){return arguments.length?(m=!!_,w()):m},i.padding=function(_){return arguments.length?(p=Math.min(1,k=+_),w()):p},i.paddingInner=function(_){return arguments.length?(p=Math.min(1,_),w()):p},i.paddingOuter=function(_){return arguments.length?(k=+_,w()):k},i.align=function(_){return arguments.length?(v=Math.max(0,Math.min(1,_)),w()):v},i.copy=function(){return yt(t(),[s,a]).round(m).paddingInner(p).paddingOuter(k).align(v)},oe.initRange.apply(w(),arguments)}var _t=function(){var i=n.__name(function(O,h,u,x){for(u=u||{},x=O.length;x--;u[O[x]]=h);return u},"o"),t=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],o=[1,6],g=[1,7],m=[1,5,10,12,14,16,18,19,21,23,34,35,36],p=[1,25],k=[1,26],v=[1,28],w=[1,29],_=[1,30],E=[1,31],D=[1,32],P=[1,33],M=[1,34],y=[1,35],S=[1,36],c=[1,37],W=[1,43],z=[1,42],U=[1,47],X=[1,50],l=[1,10,12,14,16,18,19,21,23,34,35,36],L=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],C=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],T=[1,64],$={trace:n.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n.__name(function(h,u,x,d,A,r,at){var f=r.length-1;switch(A){case 5:d.setOrientation(r[f]);break;case 9:d.setDiagramTitle(r[f].text.trim());break;case 12:d.setLineData({text:"",type:"text"},r[f]);break;case 13:d.setLineData(r[f-1],r[f]);break;case 14:d.setBarData({text:"",type:"text"},r[f]);break;case 15:d.setBarData(r[f-1],r[f]);break;case 16:this.$=r[f].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=r[f].trim(),d.setAccDescription(this.$);break;case 19:this.$=r[f-1];break;case 20:this.$=[Number(r[f-2]),...r[f]];break;case 21:this.$=[Number(r[f])];break;case 22:d.setXAxisTitle(r[f]);break;case 23:d.setXAxisTitle(r[f-1]);break;case 24:d.setXAxisTitle({type:"text",text:""});break;case 25:d.setXAxisBand(r[f]);break;case 26:d.setXAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 27:this.$=r[f-1];break;case 28:this.$=[r[f-2],...r[f]];break;case 29:this.$=[r[f]];break;case 30:d.setYAxisTitle(r[f]);break;case 31:d.setYAxisTitle(r[f-1]);break;case 32:d.setYAxisTitle({type:"text",text:""});break;case 33:d.setYAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 37:this.$={text:r[f],type:"text"};break;case 38:this.$={text:r[f],type:"text"};break;case 39:this.$={text:r[f],type:"markdown"};break;case 40:this.$=r[f];break;case 41:this.$=r[f-1]+""+r[f];break}},"anonymous"),table:[i(t,e,{3:1,4:2,7:4,5:s,34:a,35:o,36:g}),{1:[3]},i(t,e,{4:2,7:4,3:8,5:s,34:a,35:o,36:g}),i(t,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:a,35:o,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},i(m,[2,34]),i(m,[2,35]),i(m,[2,36]),{1:[2,1]},i(t,e,{4:2,7:4,3:21,5:s,34:a,35:o,36:g}),{1:[2,3]},i(m,[2,5]),i(t,[2,7],{4:22,34:a,35:o,36:g}),{11:23,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{11:39,13:38,24:W,27:z,29:40,30:41,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{11:45,15:44,27:U,33:46,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{11:49,17:48,24:X,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{11:52,17:51,24:X,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{20:[1,53]},{22:[1,54]},i(l,[2,18]),{1:[2,2]},i(l,[2,8]),i(l,[2,9]),i(L,[2,37],{40:55,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c}),i(L,[2,38]),i(L,[2,39]),i(C,[2,40]),i(C,[2,42]),i(C,[2,43]),i(C,[2,44]),i(C,[2,45]),i(C,[2,46]),i(C,[2,47]),i(C,[2,48]),i(C,[2,49]),i(C,[2,50]),i(C,[2,51]),i(l,[2,10]),i(l,[2,22],{30:41,29:56,24:W,27:z}),i(l,[2,24]),i(l,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},i(l,[2,11]),i(l,[2,30],{33:60,27:U}),i(l,[2,32]),{31:[1,61]},i(l,[2,12]),{17:62,24:X},{25:63,27:T},i(l,[2,14]),{17:65,24:X},i(l,[2,16]),i(l,[2,17]),i(C,[2,41]),i(l,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},i(l,[2,31]),{27:[1,69]},i(l,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},i(l,[2,15]),i(l,[2,26]),i(l,[2,27]),{11:59,32:72,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},i(l,[2,33]),i(l,[2,19]),{25:73,27:T},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n.__name(function(h,u){if(u.recoverable)this.trace(h);else{var x=new Error(h);throw x.hash=u,x}},"parseError"),parse:n.__name(function(h){var u=this,x=[0],d=[],A=[null],r=[],at=this.table,f="",lt=0,Et=0,se=2,Mt=1,ne=r.slice.call(arguments,1),R=Object.create(this.lexer),Y={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(Y.yy[dt]=this.yy[dt]);R.setInput(h,Y.yy),Y.yy.lexer=R,Y.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var ft=R.yylloc;r.push(ft);var ae=R.options&&R.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(V){x.length=x.length-2*V,A.length=A.length-V,r.length=r.length-V}n.__name(re,"popStack");function It(){var V;return V=d.pop()||R.lex()||Mt,typeof V!="number"&&(V instanceof Array&&(d=V,V=d.pop()),V=u.symbols_[V]||V),V}n.__name(It,"lex");for(var I,H,B,pt,q={},ct,F,Vt,ut;;){if(H=x[x.length-1],this.defaultActions[H]?B=this.defaultActions[H]:((I===null||typeof I>"u")&&(I=It()),B=at[H]&&at[H][I]),typeof B>"u"||!B.length||!B[0]){var mt="";ut=[];for(ct in at[H])this.terminals_[ct]&&ct>se&&ut.push("'"+this.terminals_[ct]+"'");R.showPosition?mt="Parse error on line "+(lt+1)+`:
2
2
  `+R.showPosition()+`
3
3
  Expecting `+ut.join(", ")+", got '"+(this.terminals_[I]||I)+"'":mt="Parse error on line "+(lt+1)+": Unexpected "+(I==Mt?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(mt,{text:R.match,token:this.terminals_[I]||I,line:R.yylineno,loc:ft,expected:ut})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+I);switch(B[0]){case 1:x.push(I),A.push(R.yytext),r.push(R.yylloc),x.push(B[1]),I=null,Et=R.yyleng,f=R.yytext,lt=R.yylineno,ft=R.yylloc;break;case 2:if(F=this.productions_[B[1]][1],q.$=A[A.length-F],q._$={first_line:r[r.length-(F||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(F||1)].first_column,last_column:r[r.length-1].last_column},ae&&(q._$.range=[r[r.length-(F||1)].range[0],r[r.length-1].range[1]]),pt=this.performAction.apply(q,[f,Et,lt,Y.yy,B[1],A,r].concat(ne)),typeof pt<"u")return pt;F&&(x=x.slice(0,-1*F*2),A=A.slice(0,-1*F),r=r.slice(0,-1*F)),x.push(this.productions_[B[1]][0]),A.push(q.$),r.push(q._$),Vt=at[x[x.length-2]][x[x.length-1]],x.push(Vt);break;case 3:return!0}}return!0},"parse")},Lt=function(){var O={EOF:1,parseError:n.__name(function(u,x){if(this.yy.parser)this.yy.parser.parseError(u,x);else throw new Error(u)},"parseError"),setInput:n.__name(function(h,u){return this.yy=u||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n.__name(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var u=h.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:n.__name(function(h){var u=h.length,x=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===d.length?this.yylloc.first_column:0)+d[d.length-x.length].length-x[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:n.__name(function(){return this._more=!0,this},"more"),reject:n.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n.__name(function(h){this.unput(this.match.slice(h))},"less"),pastInput:n.__name(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n.__name(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n.__name(function(){var h=this.pastInput(),u=new Array(h.length+1).join("-");return h+this.upcomingInput()+`