@softistx/pulsarix-widget 0.8.2 → 0.8.4

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 (112) hide show
  1. package/dist/chunks/{abnfDiagram-XWFEHMT6.jcqkp43e.js → abnfDiagram-XWFEHMT6.b9yk4x5x.js} +1 -1
  2. package/dist/chunks/architecture-WOLXFQ4H.aft3rkrr.js +1 -0
  3. package/dist/chunks/{architectureDiagram-CSQXQB3N.pk9dxdfb.js → architectureDiagram-CSQXQB3N.qz18rz0g.js} +1 -1
  4. package/dist/chunks/{blockDiagram-BEDRHYPZ.ehefn7dt.js → blockDiagram-BEDRHYPZ.bb08b9nt.js} +1 -1
  5. package/dist/chunks/{c4Diagram-M2UUVUY5.knj3as6x.js → c4Diagram-M2UUVUY5.px0epccd.js} +2 -2
  6. package/dist/chunks/{chat-markdown-DLDNLXM9.tvekh9sm.js → chat-markdown-CrbWbK1O.k4nmgyey.js} +5 -5
  7. package/dist/chunks/{classDiagram-v2-KXABOMEV.vtb7vjzn.js → classDiagram-v2-KXABOMEV.f02387t9.js} +2 -2
  8. package/dist/chunks/{cose-bilkent-JH36ORCC.gb18dr42.js → cose-bilkent-JH36ORCC.azq9k24r.js} +1 -1
  9. package/dist/chunks/cynefin-EF2NZ3EQ.dk039jny.js +1 -0
  10. package/dist/chunks/{cynefinDiagram-NJNITYFG.akmr90zk.js → cynefinDiagram-NJNITYFG.zt7gprt1.js} +1 -1
  11. package/dist/chunks/{dagre-KIHZ2IZ3.7n7s7vq2.js → dagre-KIHZ2IZ3.702bqbr9.js} +1 -1
  12. package/dist/chunks/{diagram-7YQZDPLS.d3sdv0py.js → diagram-7YQZDPLS.m7vf21j6.js} +1 -1
  13. package/dist/chunks/{diagram-QBROCOUO.2v08zs42.js → diagram-QBROCOUO.33e5hv7x.js} +3 -3
  14. package/dist/chunks/{diagram-RJJCUUZO.tpnwa621.js → diagram-RJJCUUZO.94k74bz7.js} +2 -2
  15. package/dist/chunks/{diagram-WERXNKYE.hz7tgbtr.js → diagram-WERXNKYE.7fe849z6.js} +1 -1
  16. package/dist/chunks/{diagram-YHHI257C.9gge9ecb.js → diagram-YHHI257C.qjjjfq7w.js} +2 -2
  17. package/dist/chunks/{diagram-YR4HJLHV.bajpx75b.js → diagram-YR4HJLHV.310x2we2.js} +1 -1
  18. package/dist/chunks/{ebnfDiagram-N527522P.hxbbq671.js → ebnfDiagram-N527522P.a4crteq1.js} +1 -1
  19. package/dist/chunks/{editor-shortcuts-dialog-I77EAez1.0s00eh53.js → editor-shortcuts-dialog-B0ppoiza.x3p4h07t.js} +1 -1
  20. package/dist/chunks/editor.arg3zy29.js +4 -0
  21. package/dist/chunks/{elk-O5DQBFGD.vy7cdqps.js → elk-O5DQBFGD.dx61etan.js} +1 -1
  22. package/dist/chunks/{emoji-picker-BofyuTmK.qf287fk6.js → emoji-picker-CbvQZ2ZL.nst616hd.js} +2 -2
  23. package/dist/chunks/{erDiagram-K3K3BIDK.kzs3v0ts.js → erDiagram-K3K3BIDK.qzqv67zm.js} +5 -5
  24. package/dist/chunks/eventmodeling-K75KTNOO.gmm1bcak.js +1 -0
  25. package/dist/chunks/{flow-diagram-OPO1ep57.5006stqg.js → flow-diagram-AiM6FiIm.73jr19pb.js} +1 -1
  26. package/dist/chunks/flowDiagram-Z6JWZHQI.fzwqg115.js +1 -0
  27. package/dist/chunks/{ganttDiagram-3PRQTZWP.qkcp8pvg.js → ganttDiagram-3PRQTZWP.xngzb32h.js} +2 -2
  28. package/dist/chunks/gitGraph-VSP46ZUC.0m8jykgw.js +1 -0
  29. package/dist/chunks/{gitGraphDiagram-VXDFKS5L.ry9dejxm.js → gitGraphDiagram-VXDFKS5L.1sm36z2q.js} +1 -1
  30. package/dist/chunks/{grid-E2QIVN74.q51enfx7.js → grid-E2QIVN74.76pgtn2n.js} +1 -1
  31. package/dist/chunks/illustration-BOW28wq5.bkz28k1x.js +1 -0
  32. package/dist/chunks/{index.23p1k2rx.js → index.0e4s8r4m.js} +1 -1
  33. package/dist/chunks/{index.bfeafb22.js → index.0k4tbjhp.js} +1 -1
  34. package/dist/chunks/{index.fab58nn0.js → index.1d7qpsyx.js} +2 -2
  35. package/dist/chunks/{index.q9dsw4bt.js → index.32jxrb9b.js} +2 -2
  36. package/dist/chunks/{index.9zhger75.js → index.7gxz6d1f.js} +2 -2
  37. package/dist/chunks/{index.gqa9s37g.js → index.7k5v3p25.js} +1 -1
  38. package/dist/chunks/{index.vnhefjwh.js → index.8f3x951p.js} +1 -1
  39. package/dist/chunks/{index.h6120080.js → index.9bf5qrah.js} +1 -1
  40. package/dist/chunks/{index.fgsp5qqn.js → index.a1bxkgd3.js} +10 -10
  41. package/dist/chunks/{index.cf9nd6xy.js → index.a6rz456z.js} +2 -2
  42. package/dist/chunks/{index.eec12m3n.js → index.dnnzjw18.js} +1 -1
  43. package/dist/chunks/index.e35b4yh5.js +44 -0
  44. package/dist/chunks/{index.51yk4ene.js → index.fbeztcp3.js} +1 -1
  45. package/dist/chunks/{index.fvh2m60c.js → index.hvdnkr5m.js} +2 -2
  46. package/dist/chunks/{index.3k4gyba0.js → index.nsckd1vt.js} +2 -2
  47. package/dist/chunks/{index.yf0h5qnv.js → index.r0p3fm9f.js} +1 -1
  48. package/dist/chunks/{index.x163xe9c.js → index.rfyzb2yv.js} +1 -1
  49. package/dist/chunks/{index.x1xqs5m5.js → index.t34t6kpe.js} +2 -2
  50. package/dist/chunks/{index.20dvswea.js → index.wrjdgn4c.js} +2 -2
  51. package/dist/chunks/{index.153rcscj.js → index.zm5x44tn.js} +1 -1
  52. package/dist/chunks/info-OHQRW6UA.e0a85drn.js +1 -0
  53. package/dist/chunks/{infoDiagram-EZ3ZOAHP.r2yygqw8.js → infoDiagram-EZ3ZOAHP.pfd0fjwn.js} +1 -1
  54. package/dist/chunks/{ishikawaDiagram-S3EKX5GW.gwqtdvb2.js → ishikawaDiagram-S3EKX5GW.h5kjez1x.js} +2 -2
  55. package/dist/chunks/{journeyDiagram-POQNLL5X.rp31qkq5.js → journeyDiagram-POQNLL5X.55cqc9p0.js} +2 -2
  56. package/dist/chunks/{kanban-definition-BH5XI6FM.ymsqx6en.js → kanban-definition-BH5XI6FM.pkdvda4y.js} +1 -1
  57. package/dist/chunks/{markup-color-chrome-ykGNUl8y.06cy435c.js → markup-color-chrome-ykGNUl8y.0ds56d6x.js} +1 -1
  58. package/dist/chunks/{markup-custom-color-C8Xc6JxB.an2wngns.js → markup-custom-color-Dgm2hHI7.7darvajx.js} +1 -1
  59. package/dist/chunks/{mention-list-Dhq70jL5.1k61f24q.js → mention-list-CkAUzPBG.mtjgmmzb.js} +1 -1
  60. package/dist/chunks/{mermaid.core.x45crg0h.js → mermaid.core.j7s05j63.js} +4 -4
  61. package/dist/chunks/{mindmap-definition-WVAN44T4.5cbd4rg2.js → mindmap-definition-WVAN44T4.x3jbxvft.js} +1 -1
  62. package/dist/chunks/packet-JDAUHWVQ.52409p3r.js +1 -0
  63. package/dist/chunks/{panel.nm4pj2wm.js → panel.9tp7gr60.js} +1 -1
  64. package/dist/chunks/{pegDiagram-D4NLKWP3.fsryts4r.js → pegDiagram-D4NLKWP3.xq15gqy9.js} +1 -1
  65. package/dist/chunks/pie-XZMESJXO.q5kre8cx.js +1 -0
  66. package/dist/chunks/{pieDiagram-36ENHN4W.k4k2gvg0.js → pieDiagram-36ENHN4W.8h0wam54.js} +2 -2
  67. package/dist/chunks/{plated-illustration-BzxADkoZ.wtc9psry.js → plated-illustration-COZYWJ81.xy7ba5mq.js} +1 -1
  68. package/dist/chunks/{quadrantDiagram-ZQUDMS73.j7nj12w0.js → quadrantDiagram-ZQUDMS73.k28g8jpn.js} +2 -2
  69. package/dist/chunks/radar-ABXABTNO.yk872k2n.js +1 -0
  70. package/dist/chunks/railroad-I3PHUGI6.9wfa6vs3.js +1 -0
  71. package/dist/chunks/railroad-abnf-LNEFI6M7.70zznk3b.js +1 -0
  72. package/dist/chunks/railroad-ebnf-DWYD2UWJ.4pvdng0p.js +1 -0
  73. package/dist/chunks/railroad-peg-JR7BVNR7.ev15ebp6.js +1 -0
  74. package/dist/chunks/{railroadDiagram-JIZHGYPL.a681wt3b.js → railroadDiagram-JIZHGYPL.e7p2vqgg.js} +1 -1
  75. package/dist/chunks/{render-VIF2ZAQL.rn9hpsbx.js → render-VIF2ZAQL.w5ytncsg.js} +1 -1
  76. package/dist/chunks/{requirementDiagram-AXW2TVFA.shapgy39.js → requirementDiagram-AXW2TVFA.arekdz02.js} +2 -2
  77. package/dist/chunks/{sankeyDiagram-FBCJTAIF.2syz1e2b.js → sankeyDiagram-FBCJTAIF.1d04xcmb.js} +2 -2
  78. package/dist/chunks/{sequenceDiagram-3LA2ROMG.jq1w12a6.js → sequenceDiagram-3LA2ROMG.j4xywwp1.js} +2 -2
  79. package/dist/chunks/{sizeCapture-2Q2CQKSF.jtv53a6j.js → sizeCapture-2Q2CQKSF.862bnf6p.js} +1 -1
  80. package/dist/chunks/{stateDiagram-v2-ATKHQDJO.x0g2rngz.js → stateDiagram-v2-ATKHQDJO.xvvtr0y2.js} +2 -2
  81. package/dist/chunks/{swimlanes-YQL5WMAO.j7j7c6ex.js → swimlanes-YQL5WMAO.dtnjb4xt.js} +1 -1
  82. package/dist/chunks/swimlanesDiagram-UCCPES4V.0q8kd5qn.js +8 -0
  83. package/dist/chunks/{timeline-definition-7Z437IG3.s5bvn8dr.js → timeline-definition-7Z437IG3.zfhqzc4r.js} +1 -1
  84. package/dist/chunks/treeView-D4JQ5SDB.3fzswdjp.js +1 -0
  85. package/dist/chunks/treemap-SAJKECNS.cgh74bhn.js +1 -0
  86. package/dist/chunks/{usecaseDiagram-RDK6N6HP.9k4r423e.js → usecaseDiagram-RDK6N6HP.ewxnyz4c.js} +2 -2
  87. package/dist/chunks/{vennDiagram-SHRQU5PJ.82q5dzm6.js → vennDiagram-SHRQU5PJ.wkzf1f00.js} +2 -2
  88. package/dist/chunks/wardley-7MLQ67FV.6q5tgt0s.js +1 -0
  89. package/dist/chunks/{wardleyDiagram-F3OXNVQS.fm4tw2nc.js → wardleyDiagram-F3OXNVQS.srjfm4nb.js} +1 -1
  90. package/dist/chunks/{xychartDiagram-GDYJKCDI.57vqn2zd.js → xychartDiagram-GDYJKCDI.xfa2vexk.js} +2 -2
  91. package/dist/index.js +16 -16
  92. package/package.json +2 -2
  93. package/dist/chunks/architecture-WOLXFQ4H.6qa86taq.js +0 -1
  94. package/dist/chunks/cynefin-EF2NZ3EQ.e86yfa9w.js +0 -1
  95. package/dist/chunks/editor.h5bxwyxn.js +0 -4
  96. package/dist/chunks/eventmodeling-K75KTNOO.9yb5zf47.js +0 -1
  97. package/dist/chunks/flowDiagram-Z6JWZHQI.zf0kndsp.js +0 -1
  98. package/dist/chunks/gitGraph-VSP46ZUC.txpj8e6d.js +0 -1
  99. package/dist/chunks/illustration-BoOzuxNg.h0gnxa4s.js +0 -1
  100. package/dist/chunks/index.0hrfbrja.js +0 -44
  101. package/dist/chunks/info-OHQRW6UA.xea9bh7d.js +0 -1
  102. package/dist/chunks/packet-JDAUHWVQ.c7dmae11.js +0 -1
  103. package/dist/chunks/pie-XZMESJXO.6rv4kzjx.js +0 -1
  104. package/dist/chunks/radar-ABXABTNO.58dfc8ba.js +0 -1
  105. package/dist/chunks/railroad-I3PHUGI6.00fqbahv.js +0 -1
  106. package/dist/chunks/railroad-abnf-LNEFI6M7.gt1x50q5.js +0 -1
  107. package/dist/chunks/railroad-ebnf-DWYD2UWJ.qr5qfkga.js +0 -1
  108. package/dist/chunks/railroad-peg-JR7BVNR7.m61rq7hj.js +0 -1
  109. package/dist/chunks/swimlanesDiagram-UCCPES4V.tzqcsrmd.js +0 -8
  110. package/dist/chunks/treeView-D4JQ5SDB.0x1grm2t.js +0 -1
  111. package/dist/chunks/treemap-SAJKECNS.1te19jsm.js +0 -1
  112. package/dist/chunks/wardley-7MLQ67FV.zp6gykk3.js +0 -1
@@ -0,0 +1,8 @@
1
+ import"./index.zm5x44tn.js";import{e}from"./index.a1bxkgd3.js";import"./index.0e4s8r4m.js";import{cs,us}from"./index.t34t6kpe.js";import"./index.dnnzjw18.js";import"./index.7k5v3p25.js";import"./index.9bf5qrah.js";var r=e((t)=>`${cs(t)}
2
+ .swimlane.cluster:not([data-color-id]) rect {
3
+ stroke: ${t.clusterBorder} !important;
4
+ }
5
+ [data-look="neo"].cluster rect {
6
+ filter: none;
7
+ }
8
+ `,"getStyles"),o=r,F=us({styles:o});export{F as diagram};
@@ -1,4 +1,4 @@
1
- import{e,dr,n,ae,h,p,k,Tt,to,A,u,m,Qt,Y,he,tt,Qe}from"./index.fgsp5qqn.js";var ht=function(){var r=e(function(E,o,f,d){for(f=f||{},d=E.length;d--;f[E[d]]=o);return f},"o"),t=[6,11,13,14,15,17,19,20,23,24],a=[1,12],s=[1,13],i=[1,14],g=[1,15],c=[1,16],l=[1,19],_=[1,20],b={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:e(function(o,f,d,x,w,y,I){var T=y.length-1;switch(w){case 1:return y[T-1];case 3:x.setDirection("LR");break;case 4:x.setDirection("TD");break;case 5:this.$=[];break;case 6:y[T-1].push(y[T]),this.$=y[T-1];break;case 7:case 8:this.$=y[T];break;case 9:case 10:this.$=[];break;case 11:x.getCommonDb().setDiagramTitle(y[T].substr(6)),this.$=y[T].substr(6);break;case 12:this.$=y[T].trim(),x.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=y[T].trim(),x.getCommonDb().setAccDescription(this.$);break;case 15:x.addSection(y[T].substr(8)),this.$=y[T].substr(8);break;case 18:x.addTask(y[T],0,""),this.$=y[T];break;case 19:x.addEvent(y[T].substr(2)),this.$=y[T];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},r(t,[2,5],{5:6}),r(t,[2,2]),r(t,[2,3]),r(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:a,15:s,17:i,19:g,20:c,21:17,22:18,23:l,24:_},r(t,[2,10],{1:[2,1]}),r(t,[2,6]),{12:21,14:a,15:s,17:i,19:g,20:c,21:17,22:18,23:l,24:_},r(t,[2,8]),r(t,[2,9]),r(t,[2,11]),{16:[1,22]},{18:[1,23]},r(t,[2,14]),r(t,[2,15]),r(t,[2,16]),r(t,[2,17]),r(t,[2,18]),r(t,[2,19]),r(t,[2,7]),r(t,[2,12]),r(t,[2,13])],defaultActions:{},parseError:e(function(o,f){if(f.recoverable)this.trace(o);else{var d=Error(o);throw d.hash=f,d}},"parseError"),parse:e(function(o){var f=this,d=[0],x=[],w=[null],y=[],I=this.table,T="",W=0,G=0,D=0,q=2,B=1,O=y.slice.call(arguments,1),L=Object.create(this.lexer),F={yy:{}};for(var U in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,U))F.yy[U]=this.yy[U];if(L.setInput(o,F.yy),F.yy.lexer=L,F.yy.parser=this,typeof L.yylloc>"u")L.yylloc={};var J=L.yylloc;y.push(J);var C=L.options&&L.options.ranges;if(typeof F.yy.parseError==="function")this.parseError=F.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function N(K){d.length=d.length-2*K,w.length=w.length-K,y.length=y.length-K}e(N,"popStack");function M(){var K=x.pop()||L.lex()||B;if(typeof K!=="number"){if(K instanceof Array)x=K,K=x.pop();K=f.symbols_[K]||K}return K}e(M,"lex");var H,P,V,R,lt,rt,j={},nt,X,mt,it;while(!0){if(V=d[d.length-1],this.defaultActions[V])R=this.defaultActions[V];else{if(H===null||typeof H>"u")H=M();R=I[V]&&I[V][H]}if(typeof R>"u"||!R.length||!R[0]){var ct="";it=[];for(nt in I[V])if(this.terminals_[nt]&&nt>q)it.push("'"+this.terminals_[nt]+"'");if(L.showPosition)ct="Parse error on line "+(W+1)+`:
1
+ import{e,dr,n,ae,h,p,k,Tt,to,A,u,m,Qt,Y,he,tt,Qe}from"./index.a1bxkgd3.js";var ht=function(){var r=e(function(E,o,f,d){for(f=f||{},d=E.length;d--;f[E[d]]=o);return f},"o"),t=[6,11,13,14,15,17,19,20,23,24],a=[1,12],s=[1,13],i=[1,14],g=[1,15],c=[1,16],l=[1,19],_=[1,20],b={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:e(function(o,f,d,x,w,y,I){var T=y.length-1;switch(w){case 1:return y[T-1];case 3:x.setDirection("LR");break;case 4:x.setDirection("TD");break;case 5:this.$=[];break;case 6:y[T-1].push(y[T]),this.$=y[T-1];break;case 7:case 8:this.$=y[T];break;case 9:case 10:this.$=[];break;case 11:x.getCommonDb().setDiagramTitle(y[T].substr(6)),this.$=y[T].substr(6);break;case 12:this.$=y[T].trim(),x.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=y[T].trim(),x.getCommonDb().setAccDescription(this.$);break;case 15:x.addSection(y[T].substr(8)),this.$=y[T].substr(8);break;case 18:x.addTask(y[T],0,""),this.$=y[T];break;case 19:x.addEvent(y[T].substr(2)),this.$=y[T];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},r(t,[2,5],{5:6}),r(t,[2,2]),r(t,[2,3]),r(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:a,15:s,17:i,19:g,20:c,21:17,22:18,23:l,24:_},r(t,[2,10],{1:[2,1]}),r(t,[2,6]),{12:21,14:a,15:s,17:i,19:g,20:c,21:17,22:18,23:l,24:_},r(t,[2,8]),r(t,[2,9]),r(t,[2,11]),{16:[1,22]},{18:[1,23]},r(t,[2,14]),r(t,[2,15]),r(t,[2,16]),r(t,[2,17]),r(t,[2,18]),r(t,[2,19]),r(t,[2,7]),r(t,[2,12]),r(t,[2,13])],defaultActions:{},parseError:e(function(o,f){if(f.recoverable)this.trace(o);else{var d=Error(o);throw d.hash=f,d}},"parseError"),parse:e(function(o){var f=this,d=[0],x=[],w=[null],y=[],I=this.table,T="",W=0,G=0,D=0,q=2,B=1,O=y.slice.call(arguments,1),L=Object.create(this.lexer),F={yy:{}};for(var U in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,U))F.yy[U]=this.yy[U];if(L.setInput(o,F.yy),F.yy.lexer=L,F.yy.parser=this,typeof L.yylloc>"u")L.yylloc={};var J=L.yylloc;y.push(J);var C=L.options&&L.options.ranges;if(typeof F.yy.parseError==="function")this.parseError=F.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function N(K){d.length=d.length-2*K,w.length=w.length-K,y.length=y.length-K}e(N,"popStack");function M(){var K=x.pop()||L.lex()||B;if(typeof K!=="number"){if(K instanceof Array)x=K,K=x.pop();K=f.symbols_[K]||K}return K}e(M,"lex");var H,P,V,R,lt,rt,j={},nt,X,mt,it;while(!0){if(V=d[d.length-1],this.defaultActions[V])R=this.defaultActions[V];else{if(H===null||typeof H>"u")H=M();R=I[V]&&I[V][H]}if(typeof R>"u"||!R.length||!R[0]){var ct="";it=[];for(nt in I[V])if(this.terminals_[nt]&&nt>q)it.push("'"+this.terminals_[nt]+"'");if(L.showPosition)ct="Parse error on line "+(W+1)+`:
2
2
  `+L.showPosition()+`
3
3
  Expecting `+it.join(", ")+", got '"+(this.terminals_[H]||H)+"'";else ct="Parse error on line "+(W+1)+": Unexpected "+(H==B?"end of input":"'"+(this.terminals_[H]||H)+"'");this.parseError(ct,{text:L.match,token:this.terminals_[H]||H,line:L.yylineno,loc:J,expected:it})}if(R[0]instanceof Array&&R.length>1)throw Error("Parse Error: multiple actions possible at state: "+V+", token: "+H);switch(R[0]){case 1:if(d.push(H),w.push(L.yytext),y.push(L.yylloc),d.push(R[1]),H=null,!P){if(G=L.yyleng,T=L.yytext,W=L.yylineno,J=L.yylloc,D>0)D--}else H=P,P=null;break;case 2:if(X=this.productions_[R[1]][1],j.$=w[w.length-X],j._$={first_line:y[y.length-(X||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(X||1)].first_column,last_column:y[y.length-1].last_column},C)j._$.range=[y[y.length-(X||1)].range[0],y[y.length-1].range[1]];if(rt=this.performAction.apply(j,[T,G,W,F.yy,R[1],w,y].concat(O)),typeof rt<"u")return rt;if(X)d=d.slice(0,-1*X*2),w=w.slice(0,-1*X),y=y.slice(0,-1*X);d.push(this.productions_[R[1]][0]),w.push(j.$),y.push(j._$),mt=I[d[d.length-2]][d[d.length-1]],d.push(mt);break;case 3:return!0}}return!0},"parse")},S=function(){var E={EOF:1,parseError:e(function(f,d){if(this.yy.parser)this.yy.parser.parseError(f,d);else throw Error(f)},"parseError"),setInput:e(function(o,f){if(this.yy=f||this.yy||{},this._input=o,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];return this.offset=0,this},"setInput"),input:e(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var f=o.match(/(?:\r\n?|\n).*/g);if(f)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),o},"input"),unput:e(function(o){var f=o.length,d=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var x=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1)this.yylineno-=d.length-1;var w=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===x.length?this.yylloc.first_column:0)+x[x.length-d.length].length-d[0].length:this.yylloc.first_column-f},this.options.ranges)this.yylloc.range=[w[0],w[0]+this.yyleng-f];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(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:e(function(o){this.unput(this.match.slice(o))},"less"),pastInput:e(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var o=this.match;if(o.length<20)o+=this._input.substr(0,20-o.length);return(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var o=this.pastInput(),f=Array(o.length+1).join("-");return o+this.upcomingInput()+`
@@ -0,0 +1 @@
1
+ import{rs}from"./index.7gxz6d1f.js";export{rs as createTreeViewServices};
@@ -0,0 +1 @@
1
+ import{Yo}from"./index.7gxz6d1f.js";export{Yo as createTreemapServices};
@@ -1,4 +1,4 @@
1
- import{e,n,F,k,q,A,L,I,R,M,O,D,u,m,ve,he,pe,Ct,z,Ao,Ae,_e}from"./index.fgsp5qqn.js";import{Ee}from"./index.gqa9s37g.js";import{ge}from"./index.h6120080.js";function tt(t){if(console&&console.error)console.error(`Error: ${t}`)}function Tt(t){if(console&&console.warn)console.warn(`Warning: ${t}`)}function gt(t){let s=new Date().getTime(),i=t();return{time:new Date().getTime()-s,value:i}}function At(t){function s(){}s.prototype=t;let i=new s;function r(){return typeof i.bar}return r(),r(),t;(0,eval)(t)}function $r(t){if(Gr(t))return t.LABEL;else return t.name}function Gr(t){return typeof t.LABEL==="string"&&t.LABEL!==""}class Oe{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(t){t.visit(this),this.definition.forEach((s)=>{s.accept(t)})}}class B extends Oe{constructor(t){super([]);this.idx=1,Object.assign(this,be(t))}set definition(t){}get definition(){if(this.referencedRule!==void 0)return this.referencedRule.definition;return[]}accept(t){t.visit(this)}}class fe extends Oe{constructor(t){super(t.definition);this.orgText="",Object.assign(this,be(t))}}class G extends Oe{constructor(t){super(t.definition);this.ignoreAmbiguities=!1,Object.assign(this,be(t))}}class W extends Oe{constructor(t){super(t.definition);this.idx=1,Object.assign(this,be(t))}}class Z extends Oe{constructor(t){super(t.definition);this.idx=1,Object.assign(this,be(t))}}class Q extends Oe{constructor(t){super(t.definition);this.idx=1,Object.assign(this,be(t))}}class P extends Oe{constructor(t){super(t.definition);this.idx=1,Object.assign(this,be(t))}}class Y extends Oe{constructor(t){super(t.definition);this.idx=1,Object.assign(this,be(t))}}class J extends Oe{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){super(t.definition);this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Object.assign(this,be(t))}}class w{constructor(t){this.idx=1,Object.assign(this,be(t))}accept(t){t.visit(this)}}function Wt(t){return t.map(st)}function st(t){function s(i){return i.map(st)}if(t instanceof B){let i={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};if(typeof t.label==="string")i.label=t.label;return i}else if(t instanceof G)return{type:"Alternative",definition:s(t.definition)};else if(t instanceof W)return{type:"Option",idx:t.idx,definition:s(t.definition)};else if(t instanceof Z)return{type:"RepetitionMandatory",idx:t.idx,definition:s(t.definition)};else if(t instanceof Q)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:st(new w({terminalType:t.separator})),definition:s(t.definition)};else if(t instanceof Y)return{type:"RepetitionWithSeparator",idx:t.idx,separator:st(new w({terminalType:t.separator})),definition:s(t.definition)};else if(t instanceof P)return{type:"Repetition",idx:t.idx,definition:s(t.definition)};else if(t instanceof J)return{type:"Alternation",idx:t.idx,definition:s(t.definition)};else if(t instanceof w){let i={type:"Terminal",name:t.terminalType.name,label:$r(t.terminalType),idx:t.idx};if(typeof t.label==="string")i.terminalLabel=t.label;let r=t.terminalType.PATTERN;if(t.terminalType.PATTERN)i.pattern=r instanceof RegExp?r.source:r;return i}else if(t instanceof fe)return{type:"Rule",name:t.name,orgText:t.orgText,definition:s(t.definition)};else throw Error("non exhaustive match")}function be(t){return Object.fromEntries(Object.entries(t).filter(([,s])=>s!==void 0))}class me{visit(t){let s=t;switch(s.constructor){case B:return this.visitNonTerminal(s);case G:return this.visitAlternative(s);case W:return this.visitOption(s);case Z:return this.visitRepetitionMandatory(s);case Q:return this.visitRepetitionMandatoryWithSeparator(s);case Y:return this.visitRepetitionWithSeparator(s);case P:return this.visitRepetition(s);case J:return this.visitAlternation(s);case w:return this.visitTerminal(s);case fe:return this.visitRule(s);default:throw Error("non exhaustive match")}}visitNonTerminal(t){}visitAlternative(t){}visitOption(t){}visitRepetition(t){}visitRepetitionMandatory(t){}visitRepetitionMandatoryWithSeparator(t){}visitRepetitionWithSeparator(t){}visitAlternation(t){}visitTerminal(t){}visitRule(t){}}function vs(t){return t instanceof G||t instanceof W||t instanceof P||t instanceof Z||t instanceof Q||t instanceof Y||t instanceof w||t instanceof fe}function je(t,s=[]){if(t instanceof W||t instanceof P||t instanceof Y)return!0;if(t instanceof J)return t.definition.some((r)=>je(r,s));else if(t instanceof B&&s.includes(t))return!1;else if(t instanceof Oe){if(t instanceof B)s.push(t);return t.definition.every((r)=>je(r,s))}else return!1}function Ms(t){return t instanceof J}function Te(t){if(t instanceof B)return"SUBRULE";else if(t instanceof W)return"OPTION";else if(t instanceof J)return"OR";else if(t instanceof Z)return"AT_LEAST_ONE";else if(t instanceof Q)return"AT_LEAST_ONE_SEP";else if(t instanceof Y)return"MANY_SEP";else if(t instanceof P)return"MANY";else if(t instanceof w)return"CONSUME";else throw Error("non exhaustive match")}class $e{walk(t,s=[]){t.definition.forEach((i,r)=>{let a=t.definition.slice(r+1);if(i instanceof B)this.walkProdRef(i,a,s);else if(i instanceof w)this.walkTerminal(i,a,s);else if(i instanceof G)this.walkFlat(i,a,s);else if(i instanceof W)this.walkOption(i,a,s);else if(i instanceof Z)this.walkAtLeastOne(i,a,s);else if(i instanceof Q)this.walkAtLeastOneSep(i,a,s);else if(i instanceof Y)this.walkManySep(i,a,s);else if(i instanceof P)this.walkMany(i,a,s);else if(i instanceof J)this.walkOr(i,a,s);else throw Error("non exhaustive match")})}walkTerminal(t,s,i){}walkProdRef(t,s,i){}walkFlat(t,s,i){let r=s.concat(i);this.walk(t,r)}walkOption(t,s,i){let r=s.concat(i);this.walk(t,r)}walkAtLeastOne(t,s,i){let r=[new W({definition:t.definition})].concat(s,i);this.walk(t,r)}walkAtLeastOneSep(t,s,i){let r=Nn(t,s,i);this.walk(t,r)}walkMany(t,s,i){let r=[new W({definition:t.definition})].concat(s,i);this.walk(t,r)}walkManySep(t,s,i){let r=Nn(t,s,i);this.walk(t,r)}walkOr(t,s,i){let r=s.concat(i);t.definition.forEach((a)=>{let o=new G({definition:[a]});this.walk(o,r)})}}function Nn(t,s,i){return[new W({definition:[new w({terminalType:t.separator})].concat(t.definition)})].concat(s,i)}function Ke(t){if(t instanceof B)return Ke(t.referencedRule);else if(t instanceof w)return Kr(t);else if(vs(t))return Wr(t);else if(Ms(t))return jr(t);else throw Error("non exhaustive match")}function Wr(t){let s=[],i=t.definition,r=0,a=i.length>r,o,c=!0;while(a&&c)o=i[r],c=je(o),s=s.concat(Ke(o)),r=r+1,a=i.length>r;return[...new Set(s)]}function jr(t){let s=t.definition.map((i)=>Ke(i));return[...new Set(s.flat())]}function Kr(t){return[t.terminalType]}var jt="_~IN~_";class In extends $e{constructor(t){super();this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,s,i){}walkProdRef(t,s,i){let r=Vr(t.referencedRule,t.idx)+this.topProd.name,a=s.concat(i),o=new G({definition:a}),c=Ke(o);this.follows[r]=c}}function kn(t){let s={};return t.forEach((i)=>{let r=new In(i).startWalking();Object.assign(s,r)}),s}function Vr(t,s){return t.name+s+jt}function C(t){return t.charCodeAt(0)}function Kt(t,s){if(Array.isArray(t))t.forEach(function(i){s.push(i)});else s.push(t)}function nt(t,s){if(t[s]===!0)throw"duplicate flag "+s;let i=t[s];t[s]=!0}function Ve(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function St(){throw Error("Internal Error - Should never get here!")}function ws(t){return t.type==="Character"}var Rt=[];for(let t=C("0");t<=C("9");t++)Rt.push(t);var yt=[C("_")].concat(Rt);for(let t=C("a");t<=C("z");t++)yt.push(t);for(let t=C("A");t<=C("Z");t++)yt.push(t);var Us=[C(" "),C("\f"),C(`
1
+ import{e,n,F,k,q,A,L,R,I,M,D,O,u,m,ve,he,pe,Ct,z,Ao,Ae,_e}from"./index.a1bxkgd3.js";import{Ee}from"./index.7k5v3p25.js";import{ge}from"./index.9bf5qrah.js";function tt(t){if(console&&console.error)console.error(`Error: ${t}`)}function Tt(t){if(console&&console.warn)console.warn(`Warning: ${t}`)}function gt(t){let s=new Date().getTime(),i=t();return{time:new Date().getTime()-s,value:i}}function At(t){function s(){}s.prototype=t;let i=new s;function r(){return typeof i.bar}return r(),r(),t;(0,eval)(t)}function $r(t){if(Gr(t))return t.LABEL;else return t.name}function Gr(t){return typeof t.LABEL==="string"&&t.LABEL!==""}class Oe{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(t){t.visit(this),this.definition.forEach((s)=>{s.accept(t)})}}class B extends Oe{constructor(t){super([]);this.idx=1,Object.assign(this,be(t))}set definition(t){}get definition(){if(this.referencedRule!==void 0)return this.referencedRule.definition;return[]}accept(t){t.visit(this)}}class fe extends Oe{constructor(t){super(t.definition);this.orgText="",Object.assign(this,be(t))}}class G extends Oe{constructor(t){super(t.definition);this.ignoreAmbiguities=!1,Object.assign(this,be(t))}}class W extends Oe{constructor(t){super(t.definition);this.idx=1,Object.assign(this,be(t))}}class Z extends Oe{constructor(t){super(t.definition);this.idx=1,Object.assign(this,be(t))}}class Q extends Oe{constructor(t){super(t.definition);this.idx=1,Object.assign(this,be(t))}}class P extends Oe{constructor(t){super(t.definition);this.idx=1,Object.assign(this,be(t))}}class Y extends Oe{constructor(t){super(t.definition);this.idx=1,Object.assign(this,be(t))}}class J extends Oe{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){super(t.definition);this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Object.assign(this,be(t))}}class w{constructor(t){this.idx=1,Object.assign(this,be(t))}accept(t){t.visit(this)}}function Wt(t){return t.map(st)}function st(t){function s(i){return i.map(st)}if(t instanceof B){let i={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};if(typeof t.label==="string")i.label=t.label;return i}else if(t instanceof G)return{type:"Alternative",definition:s(t.definition)};else if(t instanceof W)return{type:"Option",idx:t.idx,definition:s(t.definition)};else if(t instanceof Z)return{type:"RepetitionMandatory",idx:t.idx,definition:s(t.definition)};else if(t instanceof Q)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:st(new w({terminalType:t.separator})),definition:s(t.definition)};else if(t instanceof Y)return{type:"RepetitionWithSeparator",idx:t.idx,separator:st(new w({terminalType:t.separator})),definition:s(t.definition)};else if(t instanceof P)return{type:"Repetition",idx:t.idx,definition:s(t.definition)};else if(t instanceof J)return{type:"Alternation",idx:t.idx,definition:s(t.definition)};else if(t instanceof w){let i={type:"Terminal",name:t.terminalType.name,label:$r(t.terminalType),idx:t.idx};if(typeof t.label==="string")i.terminalLabel=t.label;let r=t.terminalType.PATTERN;if(t.terminalType.PATTERN)i.pattern=r instanceof RegExp?r.source:r;return i}else if(t instanceof fe)return{type:"Rule",name:t.name,orgText:t.orgText,definition:s(t.definition)};else throw Error("non exhaustive match")}function be(t){return Object.fromEntries(Object.entries(t).filter(([,s])=>s!==void 0))}class me{visit(t){let s=t;switch(s.constructor){case B:return this.visitNonTerminal(s);case G:return this.visitAlternative(s);case W:return this.visitOption(s);case Z:return this.visitRepetitionMandatory(s);case Q:return this.visitRepetitionMandatoryWithSeparator(s);case Y:return this.visitRepetitionWithSeparator(s);case P:return this.visitRepetition(s);case J:return this.visitAlternation(s);case w:return this.visitTerminal(s);case fe:return this.visitRule(s);default:throw Error("non exhaustive match")}}visitNonTerminal(t){}visitAlternative(t){}visitOption(t){}visitRepetition(t){}visitRepetitionMandatory(t){}visitRepetitionMandatoryWithSeparator(t){}visitRepetitionWithSeparator(t){}visitAlternation(t){}visitTerminal(t){}visitRule(t){}}function vs(t){return t instanceof G||t instanceof W||t instanceof P||t instanceof Z||t instanceof Q||t instanceof Y||t instanceof w||t instanceof fe}function je(t,s=[]){if(t instanceof W||t instanceof P||t instanceof Y)return!0;if(t instanceof J)return t.definition.some((r)=>je(r,s));else if(t instanceof B&&s.includes(t))return!1;else if(t instanceof Oe){if(t instanceof B)s.push(t);return t.definition.every((r)=>je(r,s))}else return!1}function Ms(t){return t instanceof J}function Te(t){if(t instanceof B)return"SUBRULE";else if(t instanceof W)return"OPTION";else if(t instanceof J)return"OR";else if(t instanceof Z)return"AT_LEAST_ONE";else if(t instanceof Q)return"AT_LEAST_ONE_SEP";else if(t instanceof Y)return"MANY_SEP";else if(t instanceof P)return"MANY";else if(t instanceof w)return"CONSUME";else throw Error("non exhaustive match")}class $e{walk(t,s=[]){t.definition.forEach((i,r)=>{let a=t.definition.slice(r+1);if(i instanceof B)this.walkProdRef(i,a,s);else if(i instanceof w)this.walkTerminal(i,a,s);else if(i instanceof G)this.walkFlat(i,a,s);else if(i instanceof W)this.walkOption(i,a,s);else if(i instanceof Z)this.walkAtLeastOne(i,a,s);else if(i instanceof Q)this.walkAtLeastOneSep(i,a,s);else if(i instanceof Y)this.walkManySep(i,a,s);else if(i instanceof P)this.walkMany(i,a,s);else if(i instanceof J)this.walkOr(i,a,s);else throw Error("non exhaustive match")})}walkTerminal(t,s,i){}walkProdRef(t,s,i){}walkFlat(t,s,i){let r=s.concat(i);this.walk(t,r)}walkOption(t,s,i){let r=s.concat(i);this.walk(t,r)}walkAtLeastOne(t,s,i){let r=[new W({definition:t.definition})].concat(s,i);this.walk(t,r)}walkAtLeastOneSep(t,s,i){let r=Nn(t,s,i);this.walk(t,r)}walkMany(t,s,i){let r=[new W({definition:t.definition})].concat(s,i);this.walk(t,r)}walkManySep(t,s,i){let r=Nn(t,s,i);this.walk(t,r)}walkOr(t,s,i){let r=s.concat(i);t.definition.forEach((a)=>{let o=new G({definition:[a]});this.walk(o,r)})}}function Nn(t,s,i){return[new W({definition:[new w({terminalType:t.separator})].concat(t.definition)})].concat(s,i)}function Ke(t){if(t instanceof B)return Ke(t.referencedRule);else if(t instanceof w)return Kr(t);else if(vs(t))return Wr(t);else if(Ms(t))return jr(t);else throw Error("non exhaustive match")}function Wr(t){let s=[],i=t.definition,r=0,a=i.length>r,o,c=!0;while(a&&c)o=i[r],c=je(o),s=s.concat(Ke(o)),r=r+1,a=i.length>r;return[...new Set(s)]}function jr(t){let s=t.definition.map((i)=>Ke(i));return[...new Set(s.flat())]}function Kr(t){return[t.terminalType]}var jt="_~IN~_";class In extends $e{constructor(t){super();this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,s,i){}walkProdRef(t,s,i){let r=Vr(t.referencedRule,t.idx)+this.topProd.name,a=s.concat(i),o=new G({definition:a}),c=Ke(o);this.follows[r]=c}}function kn(t){let s={};return t.forEach((i)=>{let r=new In(i).startWalking();Object.assign(s,r)}),s}function Vr(t,s){return t.name+s+jt}function C(t){return t.charCodeAt(0)}function Kt(t,s){if(Array.isArray(t))t.forEach(function(i){s.push(i)});else s.push(t)}function nt(t,s){if(t[s]===!0)throw"duplicate flag "+s;let i=t[s];t[s]=!0}function Ve(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function St(){throw Error("Internal Error - Should never get here!")}function ws(t){return t.type==="Character"}var Rt=[];for(let t=C("0");t<=C("9");t++)Rt.push(t);var yt=[C("_")].concat(Rt);for(let t=C("a");t<=C("z");t++)yt.push(t);for(let t=C("A");t<=C("Z");t++)yt.push(t);var Us=[C(" "),C("\f"),C(`
2
2
  `),C("\r"),C("\t"),C("\v"),C("\t"),C(" "),C(" "),C(" "),C(" "),C(" "),C(" "),C(" "),C(" "),C(" "),C(" "),C(" "),C(" "),C(" "),C("\u2028"),C("\u2029"),C(" "),C(" "),C(" "),C("\uFEFF")];var zr=/[0-9a-fA-F]/,Vt=/[0-9]/,Hr=/[1-9]/;class zt{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");let s=this.disjunction();this.consumeChar("/");let i={type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};while(this.isRegExpFlag())switch(this.popChar()){case"g":nt(i,"global");break;case"i":nt(i,"ignoreCase");break;case"m":nt(i,"multiLine");break;case"u":nt(i,"unicode");break;case"y":nt(i,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:i,value:s,loc:this.loc(0)}}disjunction(){let t=[],s=this.idx;t.push(this.alternative());while(this.peekChar()==="|")this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(s)}}alternative(){let t=[],s=this.idx;while(this.isTerm())t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(s)}}term(){if(this.isAssertion())return this.assertion();else return this.atom()}assertion(){let t=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(t)};case"$":return{type:"EndAnchor",loc:this.loc(t)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(t)};case"B":return{type:"NonWordBoundary",loc:this.loc(t)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let s;switch(this.popChar()){case"=":s="Lookahead";break;case"!":s="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":s="Lookbehind";break;case"!":s="NegativeLookbehind"}break}}Ve(s);let i=this.disjunction();return this.consumeChar(")"),{type:s,value:i,loc:this.loc(t)}}return St()}quantifier(t=!1){let s=void 0,i=this.idx;switch(this.popChar()){case"*":s={atLeast:0,atMost:1/0};break;case"+":s={atLeast:1,atMost:1/0};break;case"?":s={atLeast:0,atMost:1};break;case"{":let r=this.integerIncludingZero();switch(this.popChar()){case"}":s={atLeast:r,atMost:r};break;case",":let a;if(this.isDigit())a=this.integerIncludingZero(),s={atLeast:r,atMost:a};else s={atLeast:r,atMost:1/0};this.consumeChar("}");break}if(t===!0&&s===void 0)return;Ve(s);break}if(t===!0&&s===void 0)return;if(Ve(s)){if(this.peekChar(0)==="?")this.consumeChar("?"),s.greedy=!1;else s.greedy=!0;return s.type="Quantifier",s.loc=this.loc(i),s}}atom(){let t,s=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group();break}if(t===void 0&&this.isPatternCharacter())t=this.patternCharacter();if(Ve(t)){if(t.loc=this.loc(s),this.isQuantifier())t.quantifier=this.quantifier();return t}return St()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[C(`
3
3
  `),C("\r"),C("\u2028"),C("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let t,s=!1;switch(this.popChar()){case"d":t=Rt;break;case"D":t=Rt,s=!0;break;case"s":t=Us;break;case"S":t=Us,s=!0;break;case"w":t=yt;break;case"W":t=yt,s=!0;break}if(Ve(t))return{type:"Set",value:t,complement:s};return St()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=C("\f");break;case"n":t=C(`
4
4
  `);break;case"r":t=C("\r");break;case"t":t=C("\t");break;case"v":t=C("\v");break}if(Ve(t))return{type:"Character",value:t};return St()}controlLetterEscapeAtom(){this.consumeChar("c");let t=this.popChar();if(/[a-zA-Z]/.test(t)===!1)throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:C("\x00")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let t=this.popChar();return{type:"Character",value:C(t)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
@@ -107,7 +107,7 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
107
107
  `)}`)})}constructor(t,s){this.definitionErrors=[],this.selfAnalysisDone=!1;let i=this;if(i.initErrorHandler(s),i.initLexerAdapter(),i.initLooksAhead(s),i.initRecognizerEngine(t,s),i.initRecoverable(s),i.initTreeBuilder(s),i.initGastRecorder(s),i.initPerformanceTracer(s),Object.hasOwn(s,"ignoredIssues"))throw Error(`The <ignoredIssues> IParserConfig property has been deprecated.
108
108
  Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
109
109
  See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
110
- For further details.`);this.skipValidations=Object.hasOwn(s,"skipValidations")?s.skipValidations:ue.skipValidations}}Pt.DEFER_DEFINITION_ERRORS_HANDLING=!1;Fi(Pt,[qs,Js,sn,nn,an,rn,on,ln,cn]);class gs extends Pt{constructor(t,s=ue){let i=Object.assign({},s);i.outputCst=!0;super(t,i)}}var ut=e((t)=>t!==void 0&&t>=0,"isKnownLocation");function Hi(t,s){let i=t.lexer.tokenize(s);if(i.errors.length>0){let a=i.errors[0],o=ut(a.offset)?a.offset:s.length,c=o+(ut(a.length)?a.length:0);throw Error(`Error lexing ${t.diagramType} diagram: ${a.message} at line ${a.line??1}, column ${a.column??1} [${o},${c})`)}t.parser.input=i.tokens;let r=t.entry();if(t.parser.errors.length>0)throw Error(`Error parsing ${t.diagramType} diagram: ${t.parser.errors[0].message}`);t.visit(r)}e(Hi,"runChevrotainParse");var H={SOLID_ARROW:0,BACK_ARROW:1,LINE_SOLID:2,CIRCLE_ARROW:3,CROSS_ARROW:4,CIRCLE_ARROW_REVERSED:5,CROSS_ARROW_REVERSED:6},Ga="LR",Wa=F.usecase,Tn=e(()=>({actors:new Map,useCases:new Map,systemBoundaries:new Map,relationships:[],notes:new Map,jsonNodes:new Map,classDefs:new Map,symbols:new Map,direction:Ga,relationshipCounter:0,noteCounter:0,accTitle:"",accDescription:"",ast:void 0,config:structuredClone(Wa)}),"createModel"),ja=e((t)=>{if(!(t.actors instanceof Map)||!(t.useCases instanceof Map)||!(t.systemBoundaries instanceof Map)||!Array.isArray(t.relationships)||!(t.notes instanceof Map)||!(t.jsonNodes instanceof Map)||!(t.classDefs instanceof Map)||!(t.symbols instanceof Map)||!["TB","TD","BT","RL","LR"].includes(t.direction)||!Number.isSafeInteger(t.relationshipCounter)||t.relationshipCounter<0||!Number.isSafeInteger(t.noteCounter)||t.noteCounter<0||typeof t.accTitle!=="string"||typeof t.accDescription!=="string"||!t.config)throw Error("Cannot commit an incomplete usecase model")},"assertCompleteModel"),U=Tn(),Ka=e(()=>structuredClone(U.config),"getConfig"),Va=e(()=>U.ast,"getAST"),za=e((t)=>{let s=structuredClone(t);ja(s);let i=I(),r=M();try{L(s.accTitle),R(s.accDescription),U=s}catch(a){throw L(i),R(r),a}},"commit"),Ha=e(()=>{U=Tn(),A()},"clear"),Xa=e(()=>U.actors,"getActors"),Ya=e((t)=>U.actors.get(t),"getActor"),qa=e(()=>U.useCases,"getUseCases"),Ja=e((t)=>U.useCases.get(t),"getUseCase"),Za=e(()=>U.systemBoundaries,"getSystemBoundaries"),Qa=e((t)=>U.systemBoundaries.get(t),"getSystemBoundary"),eo=e(()=>U.relationships,"getRelationships"),to=e(()=>U.notes,"getNotes"),so=e((t)=>U.notes.get(t),"getNote"),no=e(()=>U.jsonNodes,"getJsonNodes"),io=e((t)=>U.jsonNodes.get(t),"getJsonNode"),ro=e(()=>U.classDefs,"getClassDefs"),ao=e((t)=>U.classDefs.get(t),"getClassDef"),Xi=e(()=>U.direction,"getDirection"),Je=e((t)=>{let s=new Map;for(let i of["default",...t]){let r=U.classDefs.get(i);if(!r)continue;for(let a of r.styles){let o=a.trim(),c=o.indexOf(":"),h=(c===-1?o:o.slice(0,c)).trim();if(h)s.set(h,o)}}return[...s.values()]},"getCompiledStyles"),oo=e((t)=>t.replaceAll("~","~0").replaceAll("/","~1"),"escapeJsonPointerPart"),Bi=e((t)=>typeof t==="string"?t:t===null?"null":String(t),"displayJsonScalar"),lo=e((t,s,i=(r)=>r)=>{let r=[],a=e((c,h,l)=>{r.push({key:i(c),accessibleKey:i(h),value:i(l)})},"append"),o=e((c,h,l)=>{if(Array.isArray(c)){if(c.length===0){a(h,h,"[]");return}if(c.every((p)=>p===null||["string","number","boolean"].includes(typeof p))){for(let[p,f]of c.entries())a(p===0?h:"",h,Bi(f));return}for(let[p,f]of c.entries())o(f,`${h}[${p}]`,`${l}/${p}`);return}if(c!==null&&typeof c==="object"){let d=c,p=s[l]??Object.keys(d);if(p.length===0){a(h,h,"{}");return}for(let f of p){let T=h?`${h}.${f}`:f;o(d[f],T,`${l}/${oo(f)}`)}return}a(h,h,Bi(c))},"visit");return o(t,"",""),r},"flattenJsonRows"),co=e((t)=>{switch(t.type){case"hollow":return"usecaseActorHollow";case"awesome":return"usecaseActorAwesome";case"icon":return"usecaseActorIcon";case"normal":return"usecaseActor"}},"actorShape"),ho=e((t)=>{if(t.shape==="ellipse")return t.business?"usecaseBusiness":"usecaseEllipse";return t.shape},"useCaseShape"),uo=e((t)=>{switch(t){case H.SOLID_ARROW:return{arrowTypeStart:"none",arrowTypeEnd:"arrow_point"};case H.BACK_ARROW:return{arrowTypeStart:"arrow_point",arrowTypeEnd:"none"};case H.CIRCLE_ARROW:return{arrowTypeStart:"none",arrowTypeEnd:"arrow_circle"};case H.CROSS_ARROW:return{arrowTypeStart:"none",arrowTypeEnd:"arrow_cross"};case H.CIRCLE_ARROW_REVERSED:return{arrowTypeStart:"arrow_circle",arrowTypeEnd:"none"};case H.CROSS_ARROW_REVERSED:return{arrowTypeStart:"arrow_cross",arrowTypeEnd:"none"};case H.LINE_SOLID:return{arrowTypeStart:"none",arrowTypeEnd:"none"}}},"associationMarkers"),po=e((t)=>{switch(t.type){case"include":case"extend":return{arrowTypeStart:"none",arrowTypeEnd:"arrow_point",pattern:"dotted",label:`«${t.type}»`,labelType:"text"};case"generalization":return{arrowTypeStart:"none",arrowTypeEnd:"extension",pattern:"solid"};case"association":return{...uo(t.arrowType),pattern:"solid",...t.label?{label:t.label}:{},...t.labelType?{labelType:t.labelType}:{}}}},"relationshipVisuals"),fo=e((t)=>t.animate||t.animation?[`edge-animation-${t.animation??"fast"}`]:[],"animationClasses"),Dt=e((...t)=>t.filter((s)=>Boolean(s)).join(" "),"classNames"),mo=e(()=>{let t=u(),s={...U.config,...t.usecase},i=e((l)=>q(l,t),"sanitize"),r=e((l)=>i(U.actors.get(l)?.label??U.useCases.get(l)?.label??U.jsonNodes.get(l)?.id??U.notes.get(l)?.label??l),"endpointLabel"),a=[],o=[],c=0,h=0;for(let l of U.actors.values())a.push({id:l.id,label:i(l.label),labelType:l.labelType,shape:co(l),isGroup:!1,padding:10,look:t.look,colorIndex:c++,cssClasses:Dt("default","usecase-actor",`usecase-actor-${l.type}`,l.business&&"usecase-business",...l.classes),cssStyles:[...l.styles],cssCompiledStyles:Je(l.classes),actorType:l.type,business:l.business,...l.icon?{icon:l.icon}:{},...l.stereotype?{stereotype:i(l.stereotype)}:{},...l.parentId?{parentId:l.parentId}:{}});for(let l of U.useCases.values())a.push({id:l.id,label:i(l.label),labelType:l.labelType,shape:ho(l),isGroup:!1,padding:l.shape==="ellipse"?20:10,look:t.look,colorIndex:c++,cssClasses:Dt("default","usecase-element",`usecase-${l.shape}`,l.business&&"usecase-business",...l.classes),cssStyles:[...l.styles],cssCompiledStyles:Je(l.classes),business:l.business,...l.stereotype?{stereotype:i(l.stereotype)}:{},...l.parentId?{parentId:l.parentId}:{}});for(let l of U.notes.values())a.push({id:l.id,label:i(l.label),labelType:l.labelType,shape:"note",isGroup:!1,padding:10,look:t.look,cssClasses:"default usecase-note",cssStyles:[],cssCompiledStyles:Je([]),noteTarget:l.target,noteTargetLabel:i(U.actors.get(l.target)?.label??U.useCases.get(l.target)?.label??U.jsonNodes.get(l.target)?.id??l.target)});for(let l of U.jsonNodes.values())a.push({id:l.id,label:i(l.id),labelType:"text",shape:"usecaseJsonTable",isGroup:!1,padding:10,look:t.look,cssClasses:Dt("default","usecase-json-table",...l.classes),cssStyles:[...l.styles],cssCompiledStyles:Je(l.classes),jsonRows:lo(l.value,l.propertyOrder,i)});for(let l of U.systemBoundaries.values())a.push({id:l.id,label:i(l.label),labelType:l.labelType,shape:"usecaseSystemBoundary",isGroup:!0,padding:20,look:t.look,colorIndex:h++,cssClasses:Dt("default","system-boundary",`system-boundary-${l.type}`,...l.classes),cssStyles:[...l.styles],cssCompiledStyles:Je(l.classes),boundaryType:l.type});for(let l of U.relationships){let{label:d,...p}=po(l);o.push({id:l.id,start:l.source,end:l.target,source:l.source,target:l.target,sourceLabel:r(l.source),targetLabel:r(l.target),type:"edge",relationshipType:l.type,internal:!1,...p,...d!==void 0?{label:i(d)}:{},labelpos:"c",classes:Dt("default","relationship",`relationship-${l.type}`,...l.classes,...fo(l)),style:[...l.styles],cssCompiledStyles:Je(l.classes),animate:l.animate,...l.animation?{animation:l.animation}:{},look:t.look,thickness:"normal",minlen:l.minlen,isUserDefinedId:l.explicitId})}for(let l of U.notes.values())o.push({id:`${l.id}-edge`,start:l.id,end:l.target,source:l.id,target:l.target,type:"edge",relationshipType:"note",sourceLabel:r(l.id),targetLabel:r(l.target),internal:!0,pattern:"dotted",arrowTypeStart:"none",arrowTypeEnd:"none",labelpos:"c",classes:"default relationship relationship-note",style:[],cssCompiledStyles:Je([]),animate:!1,look:t.look,thickness:"normal",minlen:1,isUserDefinedId:!1});for(let l of a){if(l.wrappingWidth??=s.wrappingWidth,!l.isGroup&&!l.shape.startsWith("usecaseActor"))l.minWidth??=s.minNodeWidth;if(l.shape==="usecaseEllipse"||l.shape==="usecaseBusiness")l.spreadPorts=!0}return{nodes:a,edges:o,config:t,type:"usecase",layoutAlgorithm:"dagre",direction:Xi(),nodeSpacing:s.nodeSpacing,rankSpacing:s.rankSpacing,actorFontSize:s.actorFontSize,actorFontFamily:s.actorFontFamily,actorFontWeight:s.actorFontWeight,usecaseFontSize:s.usecaseFontSize,usecaseFontFamily:s.usecaseFontFamily,usecaseFontWeight:s.usecaseFontWeight,diagramPadding:s.diagramPadding,useMaxWidth:s.useMaxWidth,markers:["point","circle","cross","extension"]}},"getData"),Ns={getConfig:Ka,createModel:Tn,commit:za,getAST:Va,clear:Ha,setDiagramTitle:O,getDiagramTitle:D,setAccTitle:L,getAccTitle:I,setAccDescription:R,getAccDescription:M,getActors:Xa,getActor:Ya,getUseCases:qa,getUseCase:Ja,getSystemBoundaries:Za,getSystemBoundary:Qa,getRelationships:eo,getNotes:to,getNote:so,getJsonNodes:no,getJsonNode:io,getClassDefs:ro,getClassDef:ao,getDirection:Xi,getData:mo};function Qe(t,s,i){let r=[i];return r.index=s,r.input=t,r}e(Qe,"customMatch");var Eo=e((t,s)=>{if(t[s]!=='"'||t[s+1]!=="`")return null;for(let i=s+2;i<t.length-1;i++)if(t[i]==="`"&&t[i+1]==='"')return Qe(t,s,t.slice(s,i+2));return null},"matchMarkdownString"),To=e((t,s)=>{if(t[s]!=="%"||t[s+1]!=="%")return null;for(let r=s-1;r>=0;r--){let a=t[r];if(a===`
110
+ For further details.`);this.skipValidations=Object.hasOwn(s,"skipValidations")?s.skipValidations:ue.skipValidations}}Pt.DEFER_DEFINITION_ERRORS_HANDLING=!1;Fi(Pt,[qs,Js,sn,nn,an,rn,on,ln,cn]);class gs extends Pt{constructor(t,s=ue){let i=Object.assign({},s);i.outputCst=!0;super(t,i)}}var ut=e((t)=>t!==void 0&&t>=0,"isKnownLocation");function Hi(t,s){let i=t.lexer.tokenize(s);if(i.errors.length>0){let a=i.errors[0],o=ut(a.offset)?a.offset:s.length,c=o+(ut(a.length)?a.length:0);throw Error(`Error lexing ${t.diagramType} diagram: ${a.message} at line ${a.line??1}, column ${a.column??1} [${o},${c})`)}t.parser.input=i.tokens;let r=t.entry();if(t.parser.errors.length>0)throw Error(`Error parsing ${t.diagramType} diagram: ${t.parser.errors[0].message}`);t.visit(r)}e(Hi,"runChevrotainParse");var H={SOLID_ARROW:0,BACK_ARROW:1,LINE_SOLID:2,CIRCLE_ARROW:3,CROSS_ARROW:4,CIRCLE_ARROW_REVERSED:5,CROSS_ARROW_REVERSED:6},Ga="LR",Wa=F.usecase,Tn=e(()=>({actors:new Map,useCases:new Map,systemBoundaries:new Map,relationships:[],notes:new Map,jsonNodes:new Map,classDefs:new Map,symbols:new Map,direction:Ga,relationshipCounter:0,noteCounter:0,accTitle:"",accDescription:"",ast:void 0,config:structuredClone(Wa)}),"createModel"),ja=e((t)=>{if(!(t.actors instanceof Map)||!(t.useCases instanceof Map)||!(t.systemBoundaries instanceof Map)||!Array.isArray(t.relationships)||!(t.notes instanceof Map)||!(t.jsonNodes instanceof Map)||!(t.classDefs instanceof Map)||!(t.symbols instanceof Map)||!["TB","TD","BT","RL","LR"].includes(t.direction)||!Number.isSafeInteger(t.relationshipCounter)||t.relationshipCounter<0||!Number.isSafeInteger(t.noteCounter)||t.noteCounter<0||typeof t.accTitle!=="string"||typeof t.accDescription!=="string"||!t.config)throw Error("Cannot commit an incomplete usecase model")},"assertCompleteModel"),U=Tn(),Ka=e(()=>structuredClone(U.config),"getConfig"),Va=e(()=>U.ast,"getAST"),za=e((t)=>{let s=structuredClone(t);ja(s);let i=R(),r=M();try{L(s.accTitle),I(s.accDescription),U=s}catch(a){throw L(i),I(r),a}},"commit"),Ha=e(()=>{U=Tn(),A()},"clear"),Xa=e(()=>U.actors,"getActors"),Ya=e((t)=>U.actors.get(t),"getActor"),qa=e(()=>U.useCases,"getUseCases"),Ja=e((t)=>U.useCases.get(t),"getUseCase"),Za=e(()=>U.systemBoundaries,"getSystemBoundaries"),Qa=e((t)=>U.systemBoundaries.get(t),"getSystemBoundary"),eo=e(()=>U.relationships,"getRelationships"),to=e(()=>U.notes,"getNotes"),so=e((t)=>U.notes.get(t),"getNote"),no=e(()=>U.jsonNodes,"getJsonNodes"),io=e((t)=>U.jsonNodes.get(t),"getJsonNode"),ro=e(()=>U.classDefs,"getClassDefs"),ao=e((t)=>U.classDefs.get(t),"getClassDef"),Xi=e(()=>U.direction,"getDirection"),Je=e((t)=>{let s=new Map;for(let i of["default",...t]){let r=U.classDefs.get(i);if(!r)continue;for(let a of r.styles){let o=a.trim(),c=o.indexOf(":"),h=(c===-1?o:o.slice(0,c)).trim();if(h)s.set(h,o)}}return[...s.values()]},"getCompiledStyles"),oo=e((t)=>t.replaceAll("~","~0").replaceAll("/","~1"),"escapeJsonPointerPart"),Bi=e((t)=>typeof t==="string"?t:t===null?"null":String(t),"displayJsonScalar"),lo=e((t,s,i=(r)=>r)=>{let r=[],a=e((c,h,l)=>{r.push({key:i(c),accessibleKey:i(h),value:i(l)})},"append"),o=e((c,h,l)=>{if(Array.isArray(c)){if(c.length===0){a(h,h,"[]");return}if(c.every((p)=>p===null||["string","number","boolean"].includes(typeof p))){for(let[p,f]of c.entries())a(p===0?h:"",h,Bi(f));return}for(let[p,f]of c.entries())o(f,`${h}[${p}]`,`${l}/${p}`);return}if(c!==null&&typeof c==="object"){let d=c,p=s[l]??Object.keys(d);if(p.length===0){a(h,h,"{}");return}for(let f of p){let T=h?`${h}.${f}`:f;o(d[f],T,`${l}/${oo(f)}`)}return}a(h,h,Bi(c))},"visit");return o(t,"",""),r},"flattenJsonRows"),co=e((t)=>{switch(t.type){case"hollow":return"usecaseActorHollow";case"awesome":return"usecaseActorAwesome";case"icon":return"usecaseActorIcon";case"normal":return"usecaseActor"}},"actorShape"),ho=e((t)=>{if(t.shape==="ellipse")return t.business?"usecaseBusiness":"usecaseEllipse";return t.shape},"useCaseShape"),uo=e((t)=>{switch(t){case H.SOLID_ARROW:return{arrowTypeStart:"none",arrowTypeEnd:"arrow_point"};case H.BACK_ARROW:return{arrowTypeStart:"arrow_point",arrowTypeEnd:"none"};case H.CIRCLE_ARROW:return{arrowTypeStart:"none",arrowTypeEnd:"arrow_circle"};case H.CROSS_ARROW:return{arrowTypeStart:"none",arrowTypeEnd:"arrow_cross"};case H.CIRCLE_ARROW_REVERSED:return{arrowTypeStart:"arrow_circle",arrowTypeEnd:"none"};case H.CROSS_ARROW_REVERSED:return{arrowTypeStart:"arrow_cross",arrowTypeEnd:"none"};case H.LINE_SOLID:return{arrowTypeStart:"none",arrowTypeEnd:"none"}}},"associationMarkers"),po=e((t)=>{switch(t.type){case"include":case"extend":return{arrowTypeStart:"none",arrowTypeEnd:"arrow_point",pattern:"dotted",label:`«${t.type}»`,labelType:"text"};case"generalization":return{arrowTypeStart:"none",arrowTypeEnd:"extension",pattern:"solid"};case"association":return{...uo(t.arrowType),pattern:"solid",...t.label?{label:t.label}:{},...t.labelType?{labelType:t.labelType}:{}}}},"relationshipVisuals"),fo=e((t)=>t.animate||t.animation?[`edge-animation-${t.animation??"fast"}`]:[],"animationClasses"),Dt=e((...t)=>t.filter((s)=>Boolean(s)).join(" "),"classNames"),mo=e(()=>{let t=u(),s={...U.config,...t.usecase},i=e((l)=>q(l,t),"sanitize"),r=e((l)=>i(U.actors.get(l)?.label??U.useCases.get(l)?.label??U.jsonNodes.get(l)?.id??U.notes.get(l)?.label??l),"endpointLabel"),a=[],o=[],c=0,h=0;for(let l of U.actors.values())a.push({id:l.id,label:i(l.label),labelType:l.labelType,shape:co(l),isGroup:!1,padding:10,look:t.look,colorIndex:c++,cssClasses:Dt("default","usecase-actor",`usecase-actor-${l.type}`,l.business&&"usecase-business",...l.classes),cssStyles:[...l.styles],cssCompiledStyles:Je(l.classes),actorType:l.type,business:l.business,...l.icon?{icon:l.icon}:{},...l.stereotype?{stereotype:i(l.stereotype)}:{},...l.parentId?{parentId:l.parentId}:{}});for(let l of U.useCases.values())a.push({id:l.id,label:i(l.label),labelType:l.labelType,shape:ho(l),isGroup:!1,padding:l.shape==="ellipse"?20:10,look:t.look,colorIndex:c++,cssClasses:Dt("default","usecase-element",`usecase-${l.shape}`,l.business&&"usecase-business",...l.classes),cssStyles:[...l.styles],cssCompiledStyles:Je(l.classes),business:l.business,...l.stereotype?{stereotype:i(l.stereotype)}:{},...l.parentId?{parentId:l.parentId}:{}});for(let l of U.notes.values())a.push({id:l.id,label:i(l.label),labelType:l.labelType,shape:"note",isGroup:!1,padding:10,look:t.look,cssClasses:"default usecase-note",cssStyles:[],cssCompiledStyles:Je([]),noteTarget:l.target,noteTargetLabel:i(U.actors.get(l.target)?.label??U.useCases.get(l.target)?.label??U.jsonNodes.get(l.target)?.id??l.target)});for(let l of U.jsonNodes.values())a.push({id:l.id,label:i(l.id),labelType:"text",shape:"usecaseJsonTable",isGroup:!1,padding:10,look:t.look,cssClasses:Dt("default","usecase-json-table",...l.classes),cssStyles:[...l.styles],cssCompiledStyles:Je(l.classes),jsonRows:lo(l.value,l.propertyOrder,i)});for(let l of U.systemBoundaries.values())a.push({id:l.id,label:i(l.label),labelType:l.labelType,shape:"usecaseSystemBoundary",isGroup:!0,padding:20,look:t.look,colorIndex:h++,cssClasses:Dt("default","system-boundary",`system-boundary-${l.type}`,...l.classes),cssStyles:[...l.styles],cssCompiledStyles:Je(l.classes),boundaryType:l.type});for(let l of U.relationships){let{label:d,...p}=po(l);o.push({id:l.id,start:l.source,end:l.target,source:l.source,target:l.target,sourceLabel:r(l.source),targetLabel:r(l.target),type:"edge",relationshipType:l.type,internal:!1,...p,...d!==void 0?{label:i(d)}:{},labelpos:"c",classes:Dt("default","relationship",`relationship-${l.type}`,...l.classes,...fo(l)),style:[...l.styles],cssCompiledStyles:Je(l.classes),animate:l.animate,...l.animation?{animation:l.animation}:{},look:t.look,thickness:"normal",minlen:l.minlen,isUserDefinedId:l.explicitId})}for(let l of U.notes.values())o.push({id:`${l.id}-edge`,start:l.id,end:l.target,source:l.id,target:l.target,type:"edge",relationshipType:"note",sourceLabel:r(l.id),targetLabel:r(l.target),internal:!0,pattern:"dotted",arrowTypeStart:"none",arrowTypeEnd:"none",labelpos:"c",classes:"default relationship relationship-note",style:[],cssCompiledStyles:Je([]),animate:!1,look:t.look,thickness:"normal",minlen:1,isUserDefinedId:!1});for(let l of a){if(l.wrappingWidth??=s.wrappingWidth,!l.isGroup&&!l.shape.startsWith("usecaseActor"))l.minWidth??=s.minNodeWidth;if(l.shape==="usecaseEllipse"||l.shape==="usecaseBusiness")l.spreadPorts=!0}return{nodes:a,edges:o,config:t,type:"usecase",layoutAlgorithm:"dagre",direction:Xi(),nodeSpacing:s.nodeSpacing,rankSpacing:s.rankSpacing,actorFontSize:s.actorFontSize,actorFontFamily:s.actorFontFamily,actorFontWeight:s.actorFontWeight,usecaseFontSize:s.usecaseFontSize,usecaseFontFamily:s.usecaseFontFamily,usecaseFontWeight:s.usecaseFontWeight,diagramPadding:s.diagramPadding,useMaxWidth:s.useMaxWidth,markers:["point","circle","cross","extension"]}},"getData"),Ns={getConfig:Ka,createModel:Tn,commit:za,getAST:Va,clear:Ha,setDiagramTitle:D,getDiagramTitle:O,setAccTitle:L,getAccTitle:R,setAccDescription:I,getAccDescription:M,getActors:Xa,getActor:Ya,getUseCases:qa,getUseCase:Ja,getSystemBoundaries:Za,getSystemBoundary:Qa,getRelationships:eo,getNotes:to,getNote:so,getJsonNodes:no,getJsonNode:io,getClassDefs:ro,getClassDef:ao,getDirection:Xi,getData:mo};function Qe(t,s,i){let r=[i];return r.index=s,r.input=t,r}e(Qe,"customMatch");var Eo=e((t,s)=>{if(t[s]!=='"'||t[s+1]!=="`")return null;for(let i=s+2;i<t.length-1;i++)if(t[i]==="`"&&t[i+1]==='"')return Qe(t,s,t.slice(s,i+2));return null},"matchMarkdownString"),To=e((t,s)=>{if(t[s]!=="%"||t[s+1]!=="%")return null;for(let r=s-1;r>=0;r--){let a=t[r];if(a===`
111
111
  `||a==="\r")break;if(a!==" "&&a!=="\t")return null}let i=s+2;while(i<t.length&&t[i]!==`
112
112
  `&&t[i]!=="\r")i++;return Qe(t,s,t.slice(s,i))},"matchComment"),Yi=e((t,s)=>{for(let i=s-1;i>=0;i--){let r=t[i];if(r===`
113
113
  `||r==="\r")return!0;if(r!==" "&&r!=="\t")return!1}return!0},"isIndentedLineStart"),qi=e((t,s,i)=>{if(!Yi(t,s))return null;let r=i.exec(t.slice(s));return r?Qe(t,s,r[0]):null},"matchAccessibilityLine"),go=e((t,s)=>{if(!Yi(t,s))return null;let i=/^accDescr[\t ]*{/.exec(t.slice(s));if(!i)return null;let r=t.indexOf("}",s+i[0].length);return r===-1?null:Qe(t,s,t.slice(s,r+1))},"matchAccDescrBlock"),So=e((t,s)=>{if(t[s]!=="{")return null;let i=0,r=!1,a=!1;for(let o=s;o<t.length;o++){let c=t[o];if(r){if(a)a=!1;else if(c==="\\")a=!0;else if(c==='"')r=!1;continue}if(c==='"')r=!0;else if(c==="{")i++;else if(c==="}"&&--i===0)return Qe(t,s,t.slice(s,o+1))}return null},"matchJsonObject"),Ro=e((t,s)=>{let i=t.indexOf(">>",s);if(i===-1||/[\n\r]/.test(t.slice(s,i)))return null;let r=t.slice(s,i);return r.trim()?Qe(t,s,r):null},"matchStereotypeText"),ie=S({name:"LABEL_TEXT",pattern:K.NA}),dt=S({name:"WORD",pattern:K.NA,categories:ie}),gn=S({name:"NUMBER",pattern:/(?:\d+\.\d+|\d+|\.\d+)(?:[A-Za-z]+)?/,categories:ie}),X=S({name:"IDENTIFIER",pattern:/\w+/,longer_alt:gn,categories:dt}),yo=S({name:"HWS",pattern:/[\t ]+/,group:K.SKIPPED}),Be=S({name:"MARKDOWN_STRING",pattern:Eo,start_chars_hint:['"'],line_breaks:!0}),Oo=S({name:"UNCLOSED_MARKDOWN_STRING",pattern:/"`[^]*/,line_breaks:!0}),un=S({name:"COMMENT",pattern:To,start_chars_hint:["%"],line_breaks:!1}),Fe=S({name:"NEWLINE",pattern:/\r\n|\n|\r/,line_breaks:!0}),Ji=S({name:"ACC_DESCR_BLOCK",pattern:go,start_chars_hint:["a"],line_breaks:!0}),Lo=/^accTitle[\t ]*:[^\n\r]*/,No=/^accDescr[\t ]*:[^\n\r]*/,Zi=S({name:"ACC_TITLE_LINE",pattern:e((t,s)=>qi(t,s,Lo),"pattern"),start_chars_hint:["a"],line_breaks:!1}),Qi=S({name:"ACC_DESCR_LINE",pattern:e((t,s)=>qi(t,s,No),"pattern"),start_chars_hint:["a"],line_breaks:!1}),er=S({name:"JSON_DECLARATION_START",pattern:/json[\t ]+\w+[\t ]*@[\t ]*(?={)/,push_mode:"jsonBody"}),An=S({name:"JSON_OBJECT_LITERAL",pattern:So,start_chars_hint:["{"],line_breaks:!0,pop_mode:!0}),tr=S({name:"UNCLOSED_JSON_OBJECT_LITERAL",pattern:/{[^]*/,line_breaks:!0,pop_mode:!0}),ee=e((t,s)=>S({name:t,pattern:s,longer_alt:X,categories:dt}),"keyword"),sr=ee("USECASE",/usecase-beta/),dn=ee("ACTOR",/actor/),nr=ee("SYSTEM_BOUNDARY",/systemBoundary/),ir=ee("END",/end/),rr=ee("DIRECTION",/direction/),ar=ee("TD",/TD/),or=ee("TB",/TB/),lr=ee("BT",/BT/),cr=ee("LR",/LR/),hr=ee("RL",/RL/),ur=ee("NOTE",/note/),dr=ee("FOR",/for/),Io=ee("JSON",/json/),pr=ee("CLASS_DEF",/classDef/),fr=ee("CLASS",/class/),mr=ee("STYLE",/style/),Er=ee("INCLUDE",/include/i),Tr=ee("EXTEND",/extend/i),gr=ee("TRUE",/true/),Ar=ee("FALSE",/false/),Sr=S({name:"GENERALIZATION",pattern:/--\|>/}),Rr=S({name:"DEPENDENCY_ARROW",pattern:/\.\.>/}),yr=S({name:"STEREOTYPE_START",pattern:/<</,push_mode:"stereotype"}),Sn=S({name:"STEREOTYPE_END",pattern:/>>/,pop_mode:!0}),Rn=S({name:"STEREOTYPE_TEXT",pattern:Ro,line_breaks:!1}),Or=S({name:"UNCLOSED_STEREOTYPE_TEXT",pattern:/[^\n\r]+/,line_breaks:!1,pop_mode:!0}),Lr=S({name:"CLASS_SEPARATOR",pattern:/:::/}),As=S({name:"FORWARD_SOLID",pattern:/--+>/}),Nr=S({name:"BACKWARD_SOLID",pattern:/<--+/}),Ss=S({name:"FORWARD_CIRCLE",pattern:/--o/}),Ir=S({name:"BACKWARD_CIRCLE",pattern:/o--/}),Rs=S({name:"FORWARD_CROSS",pattern:/--x/}),kr=S({name:"BACKWARD_CROSS",pattern:/x--/}),Le=S({name:"MARKERLESS_SOLID",pattern:/--+/}),pn=S({name:"METADATA_START",pattern:/@{/}),ys=S({name:"AT",pattern:/@/,categories:ie}),Cr=S({name:"LBRACE",pattern:/{/}),fn=S({name:"RBRACE",pattern:/}/}),Os=S({name:"LBRACKET",pattern:/\[/}),Ls=S({name:"RBRACKET",pattern:/]/}),Ft=S({name:"LPAREN",pattern:/\(/}),Bt=S({name:"RPAREN",pattern:/\)/}),ke=S({name:"COMMA",pattern:/,/,categories:ie}),$t=S({name:"COLON",pattern:/:/,categories:ie}),br=S({name:"HASH_COLOR",pattern:/#[\dA-Fa-f]+/,categories:ie}),Ne=S({name:"PLAIN_STRING",pattern:/"[^\n\r"]*"|'[^\n\r']*'/}),mn=S({name:"CSS_IDENTIFIER",pattern:/--[A-Z_a-z][\w-]*|[A-Z_a-z]\w*(?:-\w+)+/,categories:ie}),_r=S({name:"CSS_ESCAPED_COMMA",pattern:/\\,/,categories:ie}),xr=S({name:"DASH",pattern:/-/,categories:ie}),vr=S({name:"DOT",pattern:/\./,categories:ie}),Mr=S({name:"PERCENT",pattern:/%/,categories:ie}),wr=S({name:"CSS_PUNCTUATION",pattern:/[!#$&*+/=?^_|~]/,categories:ie}),ko=S({name:"LABEL_PUNCTUATION",pattern:/[;<>\\`]/,categories:ie}),Co=S({name:"LABEL_SYMBOL",pattern:/[^\t\n\r !-~]+/,categories:ie}),Ur=[ie,dt,yo,Be,Oo,un,Fe,Ji,Zi,Qi,er,sr,dn,nr,ir,rr,ar,or,lr,cr,hr,ur,dr,Io,pr,fr,mr,Er,Tr,gr,Ar,Sr,Rr,yr,Lr,As,Nr,Ss,Ir,Rs,kr,Le,pn,ys,Cr,fn,Os,Ls,Ft,Bt,ke,$t,br,Ne,mn,X,gn,_r,xr,vr,Mr,wr,ko,Co],bo={defaultMode:"defaultMode",modes:{defaultMode:[...Ur],jsonBody:[An,tr],stereotype:[Sn,Rn,Or]}},_o=[...Ur,An,tr,Sn,Rn,Or],xo=new K(bo),$i=e((t)=>It(t,ie)||t.tokenType===Ne||t.tokenType===Be,"isLabelToken"),vo={allowmixing:!0,newpage:!0,package:!0,rectangle:!0,skinparam:!0},Mo=class extends gs{static{e(this,"UsecaseParser")}constructor(){super(_o,{nodeLocationTracking:"full"});this.RULE("start",()=>{this.CONSUME(sr),this.SUBRULE(this.lineEnd),this.MANY(()=>this.SUBRULE(this.line))}),this.RULE("line",()=>{this.OR([{ALT:e(()=>this.SUBRULE(this.blankLine),"ALT")},{ALT:e(()=>this.SUBRULE(this.commentLine),"ALT")},{GATE:e(()=>this.isStatementStart(),"GATE"),ALT:e(()=>this.SUBRULE(this.statement),"ALT")}])}),this.RULE("statement",()=>{this.OR([{ALT:e(()=>this.SUBRULE(this.accTitleStatement),"ALT")},{ALT:e(()=>this.SUBRULE(this.accDescrStatement),"ALT")},{ALT:e(()=>this.SUBRULE(this.directionStatement),"ALT")},{ALT:e(()=>this.SUBRULE(this.actorStatement),"ALT")},{ALT:e(()=>this.SUBRULE(this.systemBoundaryStatement),"ALT")},{ALT:e(()=>this.SUBRULE(this.noteStatement),"ALT")},{ALT:e(()=>this.SUBRULE(this.jsonStatement),"ALT")},{ALT:e(()=>this.SUBRULE(this.classDefStatement),"ALT")},{ALT:e(()=>this.SUBRULE(this.classStatement),"ALT")},{ALT:e(()=>this.SUBRULE(this.styleStatement),"ALT")},{GATE:e(()=>this.isMetadataAssignment(),"GATE"),ALT:e(()=>this.SUBRULE(this.metadataAssignmentStatement),"ALT")},{GATE:e(()=>!this.isForbiddenPlantUmlStatement(),"GATE"),ALT:e(()=>this.SUBRULE(this.entityStatement),"ALT")}])}),this.RULE("lineEnd",()=>{this.OR([{ALT:e(()=>this.CONSUME(Fe),"ALT")},{ALT:e(()=>this.CONSUME(Se),"ALT")}])}),this.RULE("blankLine",()=>{this.CONSUME(Fe)}),this.RULE("commentLine",()=>{this.CONSUME(un),this.SUBRULE(this.lineEnd)}),this.RULE("accTitleStatement",()=>{this.CONSUME(Zi),this.SUBRULE(this.lineEnd)}),this.RULE("accDescrStatement",()=>{this.OR([{ALT:e(()=>this.CONSUME(Qi),"ALT")},{ALT:e(()=>this.CONSUME(Ji),"ALT")}]),this.SUBRULE(this.lineEnd)}),this.RULE("actorStatement",()=>{this.CONSUME(dn),this.SUBRULE(this.actorItem),this.OPTION(()=>{this.OR([{ALT:e(()=>this.AT_LEAST_ONE(()=>{this.CONSUME(ke),this.SUBRULE2(this.actorItem)}),"ALT")},{ALT:e(()=>this.SUBRULE(this.relationTail),"ALT")}])}),this.SUBRULE(this.lineEnd)}),this.RULE("actorItem",()=>{this.SUBRULE(this.actorName),this.OPTION(()=>this.SUBRULE(this.metadata)),this.OPTION2(()=>this.SUBRULE(this.stereotype)),this.OPTION3(()=>this.SUBRULE(this.classSuffix))}),this.RULE("actorName",()=>{this.OR([{ALT:e(()=>{this.CONSUME(X),this.OPTION(()=>{this.CONSUME(Ft),this.SUBRULE(this.nodeLabel),this.CONSUME(Bt)})},"ALT")},{ALT:e(()=>this.CONSUME(Ne),"ALT")},{ALT:e(()=>this.CONSUME(Be),"ALT")}])}),this.RULE("actorDeclarationOnly",()=>{this.CONSUME(dn),this.SUBRULE(this.actorItem),this.MANY(()=>{this.CONSUME(ke),this.SUBRULE2(this.actorItem)}),this.SUBRULE(this.lineEnd)}),this.RULE("entityStatement",()=>{this.SUBRULE(this.entityName),this.OPTION(()=>this.SUBRULE(this.relationTail)),this.SUBRULE(this.lineEnd)}),this.RULE("entityName",()=>{this.OR([{ALT:e(()=>{this.CONSUME(X),this.OPTION(()=>{this.OR2([{ALT:e(()=>{this.CONSUME(Ft),this.SUBRULE(this.nodeLabel),this.CONSUME(Bt)},"ALT")},{ALT:e(()=>{this.CONSUME(Os),this.SUBRULE2(this.nodeLabel),this.CONSUME(Ls)},"ALT")}])})},"ALT")},{ALT:e(()=>this.CONSUME(Ne),"ALT")},{ALT:e(()=>this.CONSUME(Be),"ALT")}]),this.OPTION2(()=>this.SUBRULE(this.useCaseMetadata)),this.OPTION3(()=>this.SUBRULE(this.stereotype)),this.OPTION4(()=>this.SUBRULE(this.classSuffix))}),this.RULE("nodeLabel",()=>{this.OR([{ALT:e(()=>this.CONSUME(Ne),"ALT")},{ALT:e(()=>this.CONSUME(Be),"ALT")},{ALT:e(()=>this.AT_LEAST_ONE(()=>this.CONSUME(ie)),"ALT")}])}),this.RULE("useCaseMetadata",()=>{this.SUBRULE(this.metadata)}),this.RULE("relationTail",()=>{this.OPTION({GATE:e(()=>this.LA(1).tokenType===X&&this.LA(2).tokenType===ys,"GATE"),DEF:e(()=>{this.CONSUME(X),this.CONSUME(ys)},"DEF")}),this.SUBRULE(this.arrow),this.SUBRULE(this.entityName)}),this.RULE("arrow",()=>{this.OR([{ALT:e(()=>this.SUBRULE(this.semanticRelation),"ALT")},{ALT:e(()=>this.SUBRULE(this.forwardSolidOperator),"ALT")},{ALT:e(()=>this.SUBRULE(this.backwardSolidOperator),"ALT")},{ALT:e(()=>this.SUBRULE(this.markerlessSolidOperator),"ALT")},{ALT:e(()=>this.SUBRULE(this.forwardCircleOperator),"ALT")},{ALT:e(()=>this.SUBRULE(this.backwardCircleOperator),"ALT")},{ALT:e(()=>this.SUBRULE(this.forwardCrossOperator),"ALT")},{ALT:e(()=>this.SUBRULE(this.backwardCrossOperator),"ALT")}])}),this.RULE("forwardSolidOperator",()=>{this.CONSUME(As)}),this.RULE("backwardSolidOperator",()=>{this.CONSUME(Nr),this.OPTION({GATE:e(()=>this.LA(0).image==="<--"&&this.hasLabeledRight([Le]),"GATE"),DEF:e(()=>{this.SUBRULE(this.edgeLabel),this.CONSUME(Le)},"DEF")})}),this.RULE("markerlessSolidOperator",()=>{this.CONSUME(Le),this.OPTION({GATE:e(()=>this.LA(0).image==="--"&&this.hasLabeledRight([As,Le,Ss,Rs]),"GATE"),DEF:e(()=>{this.SUBRULE(this.edgeLabel),this.OR([{ALT:e(()=>this.CONSUME(As),"ALT")},{ALT:e(()=>this.CONSUME2(Le),"ALT")},{ALT:e(()=>this.CONSUME(Ss),"ALT")},{ALT:e(()=>this.CONSUME(Rs),"ALT")}])},"DEF")})}),this.RULE("forwardCircleOperator",()=>{this.CONSUME(Ss)}),this.RULE("backwardCircleOperator",()=>{this.CONSUME(Ir),this.OPTION({GATE:e(()=>this.hasLabeledRight([Le]),"GATE"),DEF:e(()=>{this.SUBRULE(this.edgeLabel),this.CONSUME(Le)},"DEF")})}),this.RULE("forwardCrossOperator",()=>{this.CONSUME(Rs)}),this.RULE("backwardCrossOperator",()=>{this.CONSUME(kr),this.OPTION({GATE:e(()=>this.hasLabeledRight([Le]),"GATE"),DEF:e(()=>{this.SUBRULE(this.edgeLabel),this.CONSUME(Le)},"DEF")})}),this.RULE("edgeLabel",()=>{this.OR([{ALT:e(()=>this.CONSUME(Ne),"ALT")},{ALT:e(()=>this.CONSUME(Be),"ALT")},{ALT:e(()=>this.AT_LEAST_ONE(()=>this.CONSUME(ie)),"ALT")}])}),this.RULE("semanticRelation",()=>{this.OR([{ALT:e(()=>{this.CONSUME(Rr),this.CONSUME($t),this.OR2([{ALT:e(()=>this.CONSUME(Er),"ALT")},{ALT:e(()=>this.CONSUME(Tr),"ALT")}])},"ALT")},{ALT:e(()=>this.CONSUME(Sr),"ALT")}])}),this.RULE("metadata",()=>{this.CONSUME(pn),this.MANY(()=>this.CONSUME(Fe)),this.OPTION(()=>{this.SUBRULE(this.metadataProperty),this.MANY2(()=>{this.SUBRULE(this.metadataSeparator),this.SUBRULE2(this.metadataProperty)}),this.OPTION2(()=>this.CONSUME(ke)),this.MANY3(()=>this.CONSUME2(Fe))}),this.CONSUME(fn)}),this.RULE("metadataProperty",()=>{this.OR([{ALT:e(()=>this.CONSUME(X),"ALT")},{ALT:e(()=>this.CONSUME(Ne),"ALT")}]),this.CONSUME($t),this.OR2([{ALT:e(()=>this.CONSUME2(X),"ALT")},{ALT:e(()=>this.CONSUME2(Ne),"ALT")},{ALT:e(()=>this.CONSUME(gr),"ALT")},{ALT:e(()=>this.CONSUME(Ar),"ALT")}])}),this.RULE("metadataSeparator",()=>{this.OR([{ALT:e(()=>{this.CONSUME(ke),this.MANY(()=>this.CONSUME(Fe))},"ALT")},{ALT:e(()=>{this.AT_LEAST_ONE(()=>this.CONSUME2(Fe)),this.OPTION(()=>this.CONSUME2(ke)),this.MANY2(()=>this.CONSUME3(Fe))},"ALT")}])}),this.RULE("systemBoundaryStatement",()=>{this.CONSUME(nr),this.SUBRULE(this.systemBoundaryName),this.OPTION(()=>this.SUBRULE(this.metadata)),this.OPTION2(()=>this.SUBRULE(this.classSuffix)),this.SUBRULE(this.lineEnd),this.SUBRULE(this.systemBoundaryContent),this.CONSUME(ir),this.SUBRULE2(this.lineEnd)}),this.RULE("systemBoundaryName",()=>{this.OR([{ALT:e(()=>{this.CONSUME(X),this.OPTION(()=>{this.OR2([{ALT:e(()=>{this.CONSUME(Ft),this.SUBRULE(this.nodeLabel),this.CONSUME(Bt)},"ALT")},{ALT:e(()=>{this.CONSUME(Os),this.SUBRULE2(this.nodeLabel),this.CONSUME(Ls)},"ALT")}])})},"ALT")},{ALT:e(()=>this.CONSUME(Ne),"ALT")},{ALT:e(()=>this.CONSUME(Be),"ALT")}])}),this.RULE("systemBoundaryContent",()=>{this.MANY(()=>{this.OR([{ALT:e(()=>this.SUBRULE(this.blankLine),"ALT")},{ALT:e(()=>this.SUBRULE(this.commentLine),"ALT")},{ALT:e(()=>this.SUBRULE(this.boundaryElement),"ALT")}])})}),this.RULE("boundaryElement",()=>{this.OR([{ALT:e(()=>this.SUBRULE(this.actorDeclarationOnly),"ALT")},{ALT:e(()=>{this.SUBRULE(this.entityName),this.SUBRULE(this.lineEnd)},"ALT")}])}),this.RULE("metadataAssignmentStatement",()=>{this.SUBRULE(this.metadataAssignmentTarget),this.SUBRULE(this.metadata),this.SUBRULE(this.lineEnd)}),this.RULE("metadataAssignmentTarget",()=>{this.OR([{ALT:e(()=>this.CONSUME(X),"ALT")},{ALT:e(()=>this.CONSUME(Ne),"ALT")},{ALT:e(()=>this.CONSUME(Be),"ALT")}])}),this.RULE("noteStatement",()=>{this.CONSUME(ur),this.CONSUME(dr),this.CONSUME(X),this.SUBRULE(this.nodeLabel),this.SUBRULE(this.lineEnd)}),this.RULE("stereotype",()=>{this.CONSUME(yr),this.CONSUME(Rn),this.CONSUME(Sn)}),this.RULE("classSuffix",()=>{this.CONSUME(Lr),this.CONSUME(X),this.MANY(()=>{this.CONSUME(ke),this.CONSUME2(X)})}),this.RULE("jsonStatement",()=>{this.CONSUME(er),this.CONSUME(An),this.OPTION(()=>this.SUBRULE(this.classSuffix)),this.SUBRULE(this.lineEnd)}),this.RULE("directionStatement",()=>{this.CONSUME(rr),this.OR([{ALT:e(()=>this.CONSUME(ar),"ALT")},{ALT:e(()=>this.CONSUME(or),"ALT")},{ALT:e(()=>this.CONSUME(lr),"ALT")},{ALT:e(()=>this.CONSUME(cr),"ALT")},{ALT:e(()=>this.CONSUME(hr),"ALT")}]),this.SUBRULE(this.lineEnd)}),this.RULE("classDefStatement",()=>{this.CONSUME(pr),this.CONSUME(X),this.MANY(()=>{this.CONSUME(ke),this.CONSUME2(X)}),this.SUBRULE(this.styles),this.SUBRULE(this.lineEnd)}),this.RULE("classStatement",()=>{this.CONSUME(fr),this.CONSUME(X),this.MANY(()=>{this.CONSUME(ke),this.CONSUME2(X)}),this.CONSUME3(X),this.MANY2(()=>{this.CONSUME2(ke),this.CONSUME4(X)}),this.SUBRULE(this.lineEnd)}),this.RULE("styleStatement",()=>{this.CONSUME(mr),this.CONSUME(X),this.SUBRULE(this.styles),this.SUBRULE(this.lineEnd)}),this.RULE("styles",()=>{this.SUBRULE(this.styleValue),this.MANY(()=>{this.CONSUME(ke),this.SUBRULE2(this.styleValue)})}),this.RULE("styleValue",()=>{this.OR([{ALT:e(()=>this.CONSUME(dt),"ALT")},{ALT:e(()=>this.CONSUME(mn),"ALT")},{ALT:e(()=>{this.CONSUME(Le),this.CONSUME2(dt)},"ALT")}]),this.CONSUME($t),this.AT_LEAST_ONE(()=>this.SUBRULE(this.styleComponent))}),this.RULE("styleComponent",()=>{this.OR([{ALT:e(()=>this.CONSUME(dt),"ALT")},{ALT:e(()=>this.CONSUME(Ne),"ALT")},{ALT:e(()=>this.CONSUME(gn),"ALT")},{ALT:e(()=>this.CONSUME(br),"ALT")},{ALT:e(()=>this.CONSUME(mn),"ALT")},{ALT:e(()=>this.CONSUME(_r),"ALT")},{ALT:e(()=>this.CONSUME(xr),"ALT")},{ALT:e(()=>this.CONSUME(vr),"ALT")},{ALT:e(()=>this.CONSUME(Mr),"ALT")},{ALT:e(()=>this.CONSUME(wr),"ALT")},{ALT:e(()=>this.CONSUME($t),"ALT")},{ALT:e(()=>this.CONSUME(Ft),"ALT")},{ALT:e(()=>this.CONSUME(Bt),"ALT")},{ALT:e(()=>this.CONSUME(Os),"ALT")},{ALT:e(()=>this.CONSUME(Ls),"ALT")},{ALT:e(()=>this.CONSUME(Cr),"ALT")},{ALT:e(()=>this.CONSUME(fn),"ALT")},{ALT:e(()=>this.CONSUME(ys),"ALT")},{ALT:e(()=>this.CONSUME(Le),"ALT")}])}),this.performSelfAnalysis()}isMetadataAssignment(){let t=this.LA(1).tokenType;return(t===X||t===Ne||t===Be)&&this.LA(2).tokenType===pn}isStatementStart(){let t=this.LA(1).tokenType;return t!==Se&&t!==Fe&&t!==un}isForbiddenPlantUmlStatement(){return this.LA(1).tokenType===X&&vo[this.LA(1).image.toLowerCase()]===!0}hasLabeledRight(t){if(!$i(this.LA(1)))return!1;for(let s=2;;s++){let i=this.LA(s);if(t.includes(i.tokenType))return!0;if(!$i(i))return!1}}},Gt=new Mo,Gi=class extends Error{constructor(t,s,i){super(`${t} (line ${s}, column ${i})`);this.line=s,this.column=i,this.name="UsecaseJsonError"}static{e(this,"UsecaseJsonError")}},En=e((t,s,i,r)=>{let a=i,o=r,c=Math.min(Math.max(s,0),t.length);for(let h=0;h<c;h++){let l=t[h];if(l==="\r")a++,o=1;else if(l===`
@@ -1,4 +1,4 @@
1
- import{e,ae,Qn,h,p,F,k,j,A,L,I,R,M,O,D,m,Y,K,g}from"./index.fgsp5qqn.js";var fe=(t,s)=>Qn(t,"a",-s),St=fe;function kt(t,s){let i=de(t),n=i.filter((c)=>he(c,t)),r=0,o=0,a=[];if(n.length>1){let c=Wt(n);for(let f=0;f<n.length;++f){let l=n[f];l.angle=Math.atan2(l.x-c.x,l.y-c.y)}n.sort((f,l)=>l.angle-f.angle);let d=n[n.length-1];for(let f=0;f<n.length;++f){let l=n[f];o+=(d.x+l.x)*(l.y-d.y);let S={x:(l.x+d.x)/2,y:(l.y+d.y)/2},y=null;for(let E=0;E<l.parentIndex.length;++E)if(d.parentIndex.includes(l.parentIndex[E])){let w=t[l.parentIndex[E]],N=Math.atan2(l.x-w.x,l.y-w.y),q=Math.atan2(d.x-w.x,d.y-w.y),V=q-N;if(V<0)V+=2*Math.PI;let P=q-V/2,b=ot(S,{x:w.x+w.radius*Math.sin(P),y:w.y+w.radius*Math.cos(P)});if(b>w.radius*2)b=w.radius*2;if(y==null||y.width>b)y={circle:w,width:b,p1:l,p2:d,large:b>w.radius,sweep:!0}}if(y!=null)a.push(y),r+=Et(y.circle.radius,y.width),d=l}}else{let c=t[0];for(let f=1;f<t.length;++f)if(t[f].radius<c.radius)c=t[f];let d=!1;for(let f=0;f<t.length;++f)if(ot(t[f],c)>Math.abs(c.radius-t[f].radius)){d=!0;break}if(d)r=o=0;else r=c.radius*c.radius*Math.PI,a.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-0.0000000001,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0})}if(o/=2,s)s.area=r+o,s.arcArea=r,s.polygonArea=o,s.arcs=a,s.innerPoints=n,s.intersectionPoints=i;return r+o}function he(t,s){return s.every((i)=>ot(t,i)<i.radius+0.0000000001)}function de(t){let s=[];for(let i=0;i<t.length;++i)for(let n=i+1;n<t.length;++n){let r=Gt(t[i],t[n]);for(let o of r)o.parentIndex=[i,n],s.push(o)}return s}function Et(t,s){return t*t*Math.acos(1-s/t)-(t-s)*Math.sqrt(s*(2*t-s))}function ot(t,s){return Math.sqrt((t.x-s.x)*(t.x-s.x)+(t.y-s.y)*(t.y-s.y))}function Rt(t,s,i){if(i>=t+s)return 0;if(i<=Math.abs(t-s))return Math.PI*Math.min(t,s)*Math.min(t,s);let n=t-(i*i-s*s+t*t)/(2*i),r=s-(i*i-t*t+s*s)/(2*i);return Et(t,n)+Et(s,r)}function Gt(t,s){let i=ot(t,s),n=t.radius,r=s.radius;if(i>=n+r||i<=Math.abs(n-r))return[];let o=(n*n-r*r+i*i)/(2*i),a=Math.sqrt(n*n-o*o),c=t.x+o*(s.x-t.x)/i,d=t.y+o*(s.y-t.y)/i,f=-(s.y-t.y)*(a/i),l=-(s.x-t.x)*(a/i);return[{x:c+f,y:d-l},{x:c-f,y:d+l}]}function Wt(t){let s={x:0,y:0};for(let i of t)s.x+=i.x,s.y+=i.y;return s.x/=t.length,s.y/=t.length,s}function ge(t,s,i,n){n=n||{};let r=n.maxIterations||100,o=n.tolerance||0.0000000001,a=t(s),c=t(i),d=i-s;if(a*c>0)throw"Initial bisect points must have opposite signs";if(a===0)return s;if(c===0)return i;for(let f=0;f<r;++f){d/=2;let l=s+d,S=t(l);if(S*a>=0)s=l;if(Math.abs(d)<o||S===0)return l}return s+d}function Tt(t){let s=Array(t);for(let i=0;i<t;++i)s[i]=0;return s}function qt(t,s){return Tt(t).map(()=>Tt(s))}function pt(t,s){let i=0;for(let n=0;n<t.length;++n)i+=t[n]*s[n];return i}function zt(t){return Math.sqrt(pt(t,t))}function At(t,s,i){for(let n=0;n<s.length;++n)t[n]=s[n]*i}function gt(t,s,i,n,r){for(let o=0;o<t.length;++o)t[o]=s*i[o]+n*r[o]}function Kt(t,s,i){i=i||{};let n=i.maxIterations||s.length*200,r=i.nonZeroDelta||1.05,o=i.zeroDelta||0.001,a=i.minErrorDelta||0.000001,c=i.minErrorDelta||0.00001,d=i.rho!==void 0?i.rho:1,f=i.chi!==void 0?i.chi:2,l=i.psi!==void 0?i.psi:-0.5,S=i.sigma!==void 0?i.sigma:0.5,y,E=s.length,w=Array(E+1);w[0]=s,w[0].fx=t(s),w[0].id=0;for(let T=0;T<E;++T){let u=s.slice();u[T]=u[T]?u[T]*r:o,w[T+1]=u,w[T+1].fx=t(u),w[T+1].id=T+1}function N(T){for(let u=0;u<T.length;u++)w[E][u]=T[u];w[E].fx=T.fx}let q=(T,u)=>T.fx-u.fx,V=s.slice(),P=s.slice(),b=s.slice(),_=s.slice();for(let T=0;T<n;++T){if(w.sort(q),i.history){let v=w.map((x)=>{let W=x.slice();return W.fx=x.fx,W.id=x.id,W});v.sort((x,W)=>x.id-W.id),i.history.push({x:w[0].slice(),fx:w[0].fx,simplex:v})}y=0;for(let v=0;v<E;++v)y=Math.max(y,Math.abs(w[0][v]-w[1][v]));if(Math.abs(w[0].fx-w[E].fx)<a&&y<c)break;for(let v=0;v<E;++v){V[v]=0;for(let x=0;x<E;++x)V[v]+=w[x][v];V[v]/=E}let u=w[E];if(gt(P,1+d,V,-d,u),P.fx=t(P),P.fx<w[0].fx)if(gt(_,1+f,V,-f,u),_.fx=t(_),_.fx<P.fx)N(_);else N(P);else if(P.fx>=w[E-1].fx){let v=!1;if(P.fx>u.fx)if(gt(b,1+l,V,-l,u),b.fx=t(b),b.fx<u.fx)N(b);else v=!0;else if(gt(b,1-l*d,V,l*d,u),b.fx=t(b),b.fx<P.fx)N(b);else v=!0;if(v){if(S>=1)break;for(let x=1;x<w.length;++x)gt(w[x],1-S,w[0],S,w[x]),w[x].fx=t(w[x])}}else N(P)}return w.sort(q),{fx:w[0].fx,x:w[0]}}function xe(t,s,i,n,r,o,a){let c=i.fx,d=pt(i.fxprime,s),f=c,l=c,S=d,y=0;r=r||1,o=o||0.000001,a=a||0.1;function E(w,N,q){for(let V=0;V<16;++V)if(r=(w+N)/2,gt(n.x,1,i.x,r,s),f=n.fx=t(n.x,n.fxprime),S=pt(n.fxprime,s),f>c+o*r*d||f>=q)N=r;else{if(Math.abs(S)<=-a*d)return r;if(S*(N-w)>=0)N=w;w=r,q=f}return 0}for(let w=0;w<10;++w){if(gt(n.x,1,i.x,r,s),f=n.fx=t(n.x,n.fxprime),S=pt(n.fxprime,s),f>c+o*r*d||w&&f>=l)return E(y,r,l);if(Math.abs(S)<=-a*d)return r;if(S>=0)return E(r,y,f);l=f,y=r,r*=2}return r}function ye(t,s,i){let n={x:s.slice(),fx:0,fxprime:s.slice()},r={x:s.slice(),fx:0,fxprime:s.slice()},o=s.slice(),a,c,d=1,f;i=i||{},f=i.maxIterations||s.length*20,n.fx=t(n.x,n.fxprime),a=n.fxprime.slice(),At(a,n.fxprime,-1);for(let l=0;l<f;++l){if(d=xe(t,a,n,r,d),i.history)i.history.push({x:n.x.slice(),fx:n.fx,fxprime:n.fxprime.slice(),alpha:d});if(!d)At(a,n.fxprime,-1);else{gt(o,1,r.fxprime,-1,n.fxprime);let S=pt(n.fxprime,n.fxprime),y=Math.max(0,pt(o,r.fxprime)/S);gt(a,y,a,-1,r.fxprime),c=n,n=r,r=c}if(zt(n.fxprime)<=0.00001)break}if(i.history)i.history.push({x:n.x.slice(),fx:n.fx,fxprime:n.fxprime.slice(),alpha:d});return n}function Ht(t,s={}){s.maxIterations=s.maxIterations||500;let i=s.initialLayout||ve,n=s.lossFunction||mt,r=pe(t,s),o=i(r,s),a=Object.keys(o),c=[];for(let l of a)c.push(o[l].x),c.push(o[l].y);let f=Kt((l)=>{let S={};for(let y=0;y<a.length;++y){let E=a[y];S[E]={x:l[2*y],y:l[2*y+1],radius:o[E].radius}}return n(S,r)},c,s).x;for(let l=0;l<a.length;++l){let S=a[l];o[S].x=f[2*l],o[S].y=f[2*l+1]}return o}var Yt=0.0000000001;function Ct(t,s,i){if(Math.min(t,s)*Math.min(t,s)*Math.PI<=i+Yt)return Math.abs(t-s);return ge((n)=>Rt(t,s,n)-i,0,t+s)}function pe(t,s={}){let i=s.distinct,n=t.map((c)=>Object.assign({},c));function r(c){return c.join(";")}if(i){let c=new Map;for(let d of n)for(let f=0;f<d.sets.length;f++){let l=String(d.sets[f]);c.set(l,d.size+(c.get(l)||0));for(let S=f+1;S<d.sets.length;S++){let y=String(d.sets[S]),E=`${l};${y}`,w=`${y};${l}`;c.set(E,d.size+(c.get(E)||0)),c.set(w,d.size+(c.get(w)||0))}}for(let d of n)if(d.sets.length<3)d.size=c.get(r(d.sets))}let o=[],a=new Set;for(let c of n)if(c.sets.length===1)o.push(c.sets[0]);else if(c.sets.length===2){let d=c.sets[0],f=c.sets[1];a.add(r(c.sets)),a.add(r([f,d]))}o.sort((c,d)=>c===d?0:c<d?-1:1);for(let c=0;c<o.length;++c){let d=o[c];for(let f=c+1;f<o.length;++f){let l=o[f];if(!a.has(r([d,l])))n.push({sets:[d,l],size:0})}}return n}function me(t,s,i){let n=qt(s.length,s.length),r=qt(s.length,s.length);return t.filter((o)=>o.sets.length===2).forEach((o)=>{let a=i[o.sets[0]],c=i[o.sets[1]],d=Math.sqrt(s[a].size/Math.PI),f=Math.sqrt(s[c].size/Math.PI),l=Ct(d,f,o.size);n[a][c]=n[c][a]=l;let S=0;if(o.size+0.0000000001>=Math.min(s[a].size,s[c].size))S=1;else if(o.size<=0.0000000001)S=-1;r[a][c]=r[c][a]=S}),{distances:n,constraints:r}}function be(t,s,i,n){for(let o=0;o<s.length;++o)s[o]=0;let r=0;for(let o=0;o<i.length;++o){let a=t[2*o],c=t[2*o+1];for(let d=o+1;d<i.length;++d){let f=t[2*d],l=t[2*d+1],S=i[o][d],y=n[o][d],E=(f-a)*(f-a)+(l-c)*(l-c),w=Math.sqrt(E),N=E-S*S;if(y>0&&w<=S||y<0&&w>=S)continue;r+=2*N*N,s[2*o]+=4*N*(a-f),s[2*o+1]+=4*N*(c-l),s[2*d]+=4*N*(f-a),s[2*d+1]+=4*N*(l-c)}}return r}function ve(t,s={}){let i=Ie(t,s),n=s.lossFunction||mt;if(t.length>=8){let r=ke(t,s),o=n(r,t),a=n(i,t);if(o+0.00000001<a)i=r}return i}function ke(t,s={}){let i=s.restarts||10,n=[],r={};for(let y of t)if(y.sets.length===1)r[y.sets[0]]=n.length,n.push(y);let{distances:o,constraints:a}=me(t,n,r),c=zt(o.map(zt))/o.length;o=o.map((y)=>y.map((E)=>E/c));let d=(y,E)=>be(y,E,o,a),f=null;for(let y=0;y<i;++y){let E=Tt(o.length*2).map(Math.random),w=ye(d,E,s);if(!f||w.fx<f.fx)f=w}let l=f.x,S={};for(let y=0;y<n.length;++y){let E=n[y];S[E.sets[0]]={x:l[2*y]*c,y:l[2*y+1]*c,radius:Math.sqrt(E.size/Math.PI)}}if(s.history)for(let y of s.history)At(y.x,c);return S}function Ie(t,s){let i=s&&s.lossFunction?s.lossFunction:mt,n={},r={};for(let S of t)if(S.sets.length===1){let y=S.sets[0];n[y]={x:10000000000,y:10000000000,rowid:n.length,size:S.size,radius:Math.sqrt(S.size/Math.PI)},r[y]=[]}t=t.filter((S)=>S.sets.length===2);for(let S of t){let y=S.weight!=null?S.weight:1,E=S.sets[0],w=S.sets[1];if(S.size+Yt>=Math.min(n[E].size,n[w].size))y=0;r[E].push({set:w,size:S.size,weight:y}),r[w].push({set:E,size:S.size,weight:y})}let o=[];Object.keys(r).forEach((S)=>{let y=0;for(let E=0;E<r[S].length;++E)y+=r[S][E].size*r[S][E].weight;o.push({set:S,size:y})});function a(S,y){return y.size-S.size}o.sort(a);let c={};function d(S){return S.set in c}function f(S,y){n[y].x=S.x,n[y].y=S.y,c[y]=!0}f({x:0,y:0},o[0].set);for(let S=1;S<o.length;++S){let y=o[S].set,E=r[y].filter(d),w=n[y];if(E.sort(a),E.length===0)throw"ERROR: missing pairwise overlap information";let N=[];for(var l=0;l<E.length;++l){let P=n[E[l].set],b=Ct(w.radius,P.radius,E[l].size);N.push({x:P.x+b,y:P.y}),N.push({x:P.x-b,y:P.y}),N.push({y:P.y+b,x:P.x}),N.push({y:P.y-b,x:P.x});for(let _=l+1;_<E.length;++_){let T=n[E[_].set],u=Ct(w.radius,T.radius,E[_].size),v=Gt({x:P.x,y:P.y,radius:b},{x:T.x,y:T.y,radius:u});N.push(...v)}}let q=100000000000000000000000000000000000000000000000000,V=N[0];for(let P of N){n[y].x=P.x,n[y].y=P.y;let b=i(n,t);if(b<q)q=b,V=P}f(V,y)}return n}function mt(t,s){let i=0;for(let n of s){if(n.sets.length===1)continue;let r;if(n.sets.length===2){let a=t[n.sets[0]],c=t[n.sets[1]];r=Rt(a.radius,c.radius,ot(a,c))}else r=kt(n.sets.map((a)=>t[a]));let o=n.weight!=null?n.weight:1;i+=o*(r-n.size)*(r-n.size)}return i}function Xt(t,s){let i=0;for(let n of s){if(n.sets.length===1)continue;let r;if(n.sets.length===2){let c=t[n.sets[0]],d=t[n.sets[1]];r=Rt(c.radius,d.radius,ot(c,d))}else r=kt(n.sets.map((c)=>t[c]));let o=n.weight!=null?n.weight:1,a=Math.log((r+1)/(n.size+1));i+=o*a*a}return i}function Me(t,s,i){if(i==null)t.sort((r,o)=>o.radius-r.radius);else t.sort(i);if(t.length>0){let r=t[0].x,o=t[0].y;for(let a of t)a.x-=r,a.y-=o}if(t.length===2){if(ot(t[0],t[1])<Math.abs(t[1].radius-t[0].radius))t[1].x=t[0].x+t[0].radius-t[1].radius-0.0000000001,t[1].y=t[0].y}if(t.length>1){let r=Math.atan2(t[1].x,t[1].y)-s,o=Math.cos(r),a=Math.sin(r);for(let c of t){let{x:d,y:f}=c;c.x=o*d-a*f,c.y=a*d+o*f}}if(t.length>2){let r=Math.atan2(t[2].x,t[2].y)-s;while(r<0)r+=2*Math.PI;while(r>2*Math.PI)r-=2*Math.PI;if(r>Math.PI){let o=t[1].y/(0.0000000001+t[1].x);for(let a of t){var n=(a.x+o*a.y)/(1+o*o);a.x=2*n-a.x,a.y=2*n*o-a.y}}}}function Se(t){t.forEach((r)=>{r.parent=r});function s(r){if(r.parent!==r)r.parent=s(r.parent);return r.parent}function i(r,o){let a=s(r),c=s(o);a.parent=c}for(let r=0;r<t.length;++r)for(let o=r+1;o<t.length;++o){let a=t[r].radius+t[o].radius;if(ot(t[r],t[o])+0.0000000001<a)i(t[o],t[r])}let n=new Map;for(let r=0;r<t.length;++r){let o=s(t[r]).parent.setid;if(!n.has(o))n.set(o,[]);n.get(o).push(t[r])}return t.forEach((r)=>{delete r.parent}),Array.from(n.values())}function Dt(t){let s=(i)=>{let n=t.reduce((o,a)=>Math.max(o,a[i]+a.radius),Number.NEGATIVE_INFINITY),r=t.reduce((o,a)=>Math.min(o,a[i]-a.radius),Number.POSITIVE_INFINITY);return{max:n,min:r}};return{xRange:s("x"),yRange:s("y")}}function Zt(t,s,i){if(s==null)s=Math.PI/2;let n=$t(t).map((f)=>Object.assign({},f)),r=Se(n);for(let f of r){Me(f,s,i);let l=Dt(f);f.size=(l.xRange.max-l.xRange.min)*(l.yRange.max-l.yRange.min),f.bounds=l}r.sort((f,l)=>l.size-f.size),n=r[0];let o=n.bounds,a=(o.xRange.max-o.xRange.min)/50;function c(f,l,S){if(!f)return;let y=f.bounds,E,w;if(l)E=o.xRange.max-y.xRange.min+a;else{E=o.xRange.max-y.xRange.max;let N=(y.xRange.max-y.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;if(N<0)E+=N}if(S)w=o.yRange.max-y.yRange.min+a;else{w=o.yRange.max-y.yRange.max;let N=(y.yRange.max-y.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;if(N<0)w+=N}for(let N of f)N.x+=E,N.y+=w,n.push(N)}let d=1;while(d<r.length)c(r[d],!0,!1),c(r[d+1],!1,!0),c(r[d+2],!0,!0),d+=3,o=Dt(n);return Qt(n)}function Jt(t,s,i,n,r){let o=$t(t);s-=2*n,i-=2*n;let{xRange:a,yRange:c}=Dt(o);if(a.max===a.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let d,f;if(r){let E=Math.sqrt(r/Math.PI)*2;d=s/E,f=i/E}else d=s/(a.max-a.min),f=i/(c.max-c.min);let l=Math.min(f,d),S=(s-(a.max-a.min)*l)/2,y=(i-(c.max-c.min)*l)/2;return Qt(o.map((E)=>({radius:l*E.radius,x:n+S+(E.x-a.min)*l,y:n+y+(E.y-c.min)*l,setid:E.setid})))}function Qt(t){let s={};for(let i of t)s[i.setid]=i;return s}function $t(t){return Object.keys(t).map((i)=>Object.assign(t[i],{setid:i}))}function te(t={}){let s=!1,i=600,n=350,r=15,o=1000,a=Math.PI/2,c=!0,d=null,f=!0,l=!0,S=null,y=null,E=!1,w=null,N=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,q={},V=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],P=0,b=function(v){if(v in q)return q[v];var x=q[v]=V[P];if(P+=1,P>=V.length)P=0;return x},_=Ht,T=mt;function u(v){let x=v.datum(),W=new Set;x.forEach((z)=>{if(z.size==0&&z.sets.length==1)W.add(z.sets[0])}),x=x.filter((z)=>!z.sets.some((J)=>W.has(J)));let C={},H={};if(x.length>0){let z=_(x,{lossFunction:T,distinct:E});if(c)z=Zt(z,a,y);C=Jt(z,i,n,r,d),H=ne(C,x,N)}let at={};x.forEach((z)=>{if(z.label)at[z.sets]=z.label});function nt(z){if(z.sets in at)return at[z.sets];if(z.sets.length==1)return""+z.sets[0]}v.selectAll("svg").data([C]).enter().append("svg");let Z=v.select("svg");if(s)Z.attr("viewBox",`0 0 ${i} ${n}`);else Z.attr("width",i).attr("height",n);let G={},X=!1;Z.selectAll(".venn-area path").each(function(z){let J=this.getAttribute("d");if(z.sets.length==1&&J&&!E)X=!0,G[z.sets[0]]=Ee(J)});function B(z){return(J)=>{let yt=z.sets.map((dt)=>{let ht=G[dt],rt=C[dt];if(!ht)ht={x:i/2,y:n/2,radius:1};if(!rt)rt={x:i/2,y:n/2,radius:1};return{x:ht.x*(1-J)+rt.x*J,y:ht.y*(1-J)+rt.y*J,radius:ht.radius*(1-J)+rt.radius*J}});return Ut(yt,w)}}let Q=Z.selectAll(".venn-area").data(x,(z)=>z.sets),st=Q.enter().append("g").attr("class",(z)=>`venn-area venn-${z.sets.length==1?"circle":"intersection"}${z.colour||z.color?" venn-coloured":""}`).attr("data-venn-sets",(z)=>z.sets.join("_")),tt=st.append("path"),lt=st.append("text").attr("class","label").text((z)=>nt(z)).attr("text-anchor","middle").attr("dy",".35em").attr("x",i/2).attr("y",n/2);if(l)tt.style("fill-opacity","0").filter((z)=>z.sets.length==1).style("fill",(z)=>z.colour?z.colour:z.color?z.color:b(z.sets)).style("fill-opacity",".25"),lt.style("fill",(z)=>{if(z.colour||z.color)return"#FFF";if(t.textFill)return t.textFill;return z.sets.length==1?b(z.sets):"#444"});function it(z){if(typeof z.transition==="function")return z.transition("venn").duration(o);return z}let et=v;if(X&&typeof et.transition==="function")et=it(v),et.selectAll("path").attrTween("d",B);else et.selectAll("path").attr("d",(z)=>Ut(z.sets.map((J)=>C[J])),w);let U=et.selectAll("text").filter((z)=>(z.sets in H)).text((z)=>nt(z)).attr("x",(z)=>Math.floor(H[z.sets].x)).attr("y",(z)=>Math.floor(H[z.sets].y));if(f)if(X)if("on"in U)U.on("end",wt(C,nt));else U.each("end",wt(C,nt));else U.each(wt(C,nt));let ft=it(Q.exit()).remove();if(typeof Q.transition==="function")ft.selectAll("path").attrTween("d",B);let ut=ft.selectAll("text").attr("x",i/2).attr("y",n/2);if(S!==null)lt.style("font-size","0px"),U.style("font-size",S),ut.style("font-size","0px");return{circles:C,textCentres:H,nodes:Q,enter:st,update:et,exit:ft}}return u.wrap=function(v){if(!arguments.length)return f;return f=v,u},u.useViewBox=function(){return s=!0,u},u.width=function(v){if(!arguments.length)return i;return i=v,u},u.height=function(v){if(!arguments.length)return n;return n=v,u},u.padding=function(v){if(!arguments.length)return r;return r=v,u},u.distinct=function(v){if(!arguments.length)return E;return E=v,u},u.colours=function(v){if(!arguments.length)return b;return b=v,u},u.colors=function(v){if(!arguments.length)return b;return b=v,u},u.fontSize=function(v){if(!arguments.length)return S;return S=v,u},u.round=function(v){if(!arguments.length)return w;return w=v,u},u.duration=function(v){if(!arguments.length)return o;return o=v,u},u.layoutFunction=function(v){if(!arguments.length)return _;return _=v,u},u.normalize=function(v){if(!arguments.length)return c;return c=v,u},u.scaleToFit=function(v){if(!arguments.length)return d;return d=v,u},u.styled=function(v){if(!arguments.length)return l;return l=v,u},u.orientation=function(v){if(!arguments.length)return a;return a=v,u},u.orientationOrder=function(v){if(!arguments.length)return y;return y=v,u},u.lossFunction=function(v){if(!arguments.length)return T;return T=v==="default"?mt:v==="logRatio"?Xt:v,u},u}function wt(t,s){return function(i){let n=this,r=t[i.sets[0]].radius||50,o=s(i)||"",a=o.split(/\s+/).reverse(),c=3,d=(o.length+a.length)/3,f=a.pop(),l=[f],S=0,y=1.1;n.textContent=null;let E=[];function w(b){let _=n.ownerDocument.createElementNS(n.namespaceURI,"tspan");return _.textContent=b,E.push(_),n.append(_),_}let N=w(f);while(!0){if(f=a.pop(),!f)break;l.push(f);let b=l.join(" ");if(N.textContent=b,b.length>d&&N.getComputedTextLength()>r)l.pop(),N.textContent=l.join(" "),l=[f],N=w(f),S++}let q=0.35-S*y/2,V=n.getAttribute("x"),P=n.getAttribute("y");E.forEach((b,_)=>{b.setAttribute("x",V),b.setAttribute("y",P),b.setAttribute("dy",`${q+_*y}em`)})}}function _t(t,s,i){let n=s[0].radius-ot(s[0],t);for(let r=1;r<s.length;++r){let o=s[r].radius-ot(s[r],t);if(o<=n)n=o}for(let r=0;r<i.length;++r){let o=ot(i[r],t)-i[r].radius;if(o<=n)n=o}return n}function ee(t,s,i){let n=[];for(let l of t)n.push({x:l.x,y:l.y}),n.push({x:l.x+l.radius/2,y:l.y}),n.push({x:l.x-l.radius/2,y:l.y}),n.push({x:l.x,y:l.y+l.radius/2}),n.push({x:l.x,y:l.y-l.radius/2});let r=n[0],o=_t(n[0],t,s);for(let l=1;l<n.length;++l){let S=_t(n[l],t,s);if(S>=o)r=n[l],o=S}let a=Kt((l)=>-1*_t({x:l[0],y:l[1]},t,s),[r.x,r.y],{maxIterations:500,minErrorDelta:0.0000000001}).x,c={x:i?0:a[0],y:a[1]},d=!0;for(let l of t)if(ot(c,l)>l.radius){d=!1;break}for(let l of s)if(ot(c,l)<l.radius){d=!1;break}if(d)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};let f={};if(kt(t,f),f.arcs.length===0)return{x:0,y:-1000,disjoint:!0};if(f.arcs.length==1)return{x:f.arcs[0].circle.x,y:f.arcs[0].circle.y};if(s.length)return ee(t,[]);return Wt(f.arcs.map((l)=>l.p1))}function we(t){let s={},i=Object.keys(t);for(let n of i)s[n]=[];for(let n=0;n<i.length;n++){let r=i[n],o=t[r];for(let a=n+1;a<i.length;++a){let c=i[a],d=t[c],f=ot(o,d);if(f+d.radius<=o.radius+0.0000000001)s[c].push(r);else if(f+o.radius<=d.radius+0.0000000001)s[r].push(c)}}return s}function ne(t,s,i){let n={},r=we(t);for(let o=0;o<s.length;++o){let a=s[o].sets,c={},d={};for(let y=0;y<a.length;++y){c[a[y]]=!0;let E=r[a[y]];for(let w=0;w<E.length;++w)d[E[w]]=!0}let f=[],l=[];for(let y in t)if(y in c)f.push(t[y]);else if(!(y in d))l.push(t[y]);let S=ee(f,l,i);if(n[a]=S,S.disjoint&&s[o].size>0)console.log("WARNING: area "+a+" not represented on screen")}return n}function _e(t,s,i){let n=[];return n.push(`
1
+ import{e,ae,Qn,h,p,F,k,j,A,L,R,I,M,D,O,m,Y,K,g}from"./index.a1bxkgd3.js";var fe=(t,s)=>Qn(t,"a",-s),St=fe;function kt(t,s){let i=de(t),n=i.filter((c)=>he(c,t)),r=0,o=0,a=[];if(n.length>1){let c=Wt(n);for(let f=0;f<n.length;++f){let l=n[f];l.angle=Math.atan2(l.x-c.x,l.y-c.y)}n.sort((f,l)=>l.angle-f.angle);let d=n[n.length-1];for(let f=0;f<n.length;++f){let l=n[f];o+=(d.x+l.x)*(l.y-d.y);let S={x:(l.x+d.x)/2,y:(l.y+d.y)/2},y=null;for(let E=0;E<l.parentIndex.length;++E)if(d.parentIndex.includes(l.parentIndex[E])){let w=t[l.parentIndex[E]],N=Math.atan2(l.x-w.x,l.y-w.y),q=Math.atan2(d.x-w.x,d.y-w.y),V=q-N;if(V<0)V+=2*Math.PI;let P=q-V/2,b=ot(S,{x:w.x+w.radius*Math.sin(P),y:w.y+w.radius*Math.cos(P)});if(b>w.radius*2)b=w.radius*2;if(y==null||y.width>b)y={circle:w,width:b,p1:l,p2:d,large:b>w.radius,sweep:!0}}if(y!=null)a.push(y),r+=Et(y.circle.radius,y.width),d=l}}else{let c=t[0];for(let f=1;f<t.length;++f)if(t[f].radius<c.radius)c=t[f];let d=!1;for(let f=0;f<t.length;++f)if(ot(t[f],c)>Math.abs(c.radius-t[f].radius)){d=!0;break}if(d)r=o=0;else r=c.radius*c.radius*Math.PI,a.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-0.0000000001,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0})}if(o/=2,s)s.area=r+o,s.arcArea=r,s.polygonArea=o,s.arcs=a,s.innerPoints=n,s.intersectionPoints=i;return r+o}function he(t,s){return s.every((i)=>ot(t,i)<i.radius+0.0000000001)}function de(t){let s=[];for(let i=0;i<t.length;++i)for(let n=i+1;n<t.length;++n){let r=Gt(t[i],t[n]);for(let o of r)o.parentIndex=[i,n],s.push(o)}return s}function Et(t,s){return t*t*Math.acos(1-s/t)-(t-s)*Math.sqrt(s*(2*t-s))}function ot(t,s){return Math.sqrt((t.x-s.x)*(t.x-s.x)+(t.y-s.y)*(t.y-s.y))}function Rt(t,s,i){if(i>=t+s)return 0;if(i<=Math.abs(t-s))return Math.PI*Math.min(t,s)*Math.min(t,s);let n=t-(i*i-s*s+t*t)/(2*i),r=s-(i*i-t*t+s*s)/(2*i);return Et(t,n)+Et(s,r)}function Gt(t,s){let i=ot(t,s),n=t.radius,r=s.radius;if(i>=n+r||i<=Math.abs(n-r))return[];let o=(n*n-r*r+i*i)/(2*i),a=Math.sqrt(n*n-o*o),c=t.x+o*(s.x-t.x)/i,d=t.y+o*(s.y-t.y)/i,f=-(s.y-t.y)*(a/i),l=-(s.x-t.x)*(a/i);return[{x:c+f,y:d-l},{x:c-f,y:d+l}]}function Wt(t){let s={x:0,y:0};for(let i of t)s.x+=i.x,s.y+=i.y;return s.x/=t.length,s.y/=t.length,s}function ge(t,s,i,n){n=n||{};let r=n.maxIterations||100,o=n.tolerance||0.0000000001,a=t(s),c=t(i),d=i-s;if(a*c>0)throw"Initial bisect points must have opposite signs";if(a===0)return s;if(c===0)return i;for(let f=0;f<r;++f){d/=2;let l=s+d,S=t(l);if(S*a>=0)s=l;if(Math.abs(d)<o||S===0)return l}return s+d}function Tt(t){let s=Array(t);for(let i=0;i<t;++i)s[i]=0;return s}function qt(t,s){return Tt(t).map(()=>Tt(s))}function pt(t,s){let i=0;for(let n=0;n<t.length;++n)i+=t[n]*s[n];return i}function zt(t){return Math.sqrt(pt(t,t))}function At(t,s,i){for(let n=0;n<s.length;++n)t[n]=s[n]*i}function gt(t,s,i,n,r){for(let o=0;o<t.length;++o)t[o]=s*i[o]+n*r[o]}function Kt(t,s,i){i=i||{};let n=i.maxIterations||s.length*200,r=i.nonZeroDelta||1.05,o=i.zeroDelta||0.001,a=i.minErrorDelta||0.000001,c=i.minErrorDelta||0.00001,d=i.rho!==void 0?i.rho:1,f=i.chi!==void 0?i.chi:2,l=i.psi!==void 0?i.psi:-0.5,S=i.sigma!==void 0?i.sigma:0.5,y,E=s.length,w=Array(E+1);w[0]=s,w[0].fx=t(s),w[0].id=0;for(let T=0;T<E;++T){let u=s.slice();u[T]=u[T]?u[T]*r:o,w[T+1]=u,w[T+1].fx=t(u),w[T+1].id=T+1}function N(T){for(let u=0;u<T.length;u++)w[E][u]=T[u];w[E].fx=T.fx}let q=(T,u)=>T.fx-u.fx,V=s.slice(),P=s.slice(),b=s.slice(),_=s.slice();for(let T=0;T<n;++T){if(w.sort(q),i.history){let v=w.map((x)=>{let W=x.slice();return W.fx=x.fx,W.id=x.id,W});v.sort((x,W)=>x.id-W.id),i.history.push({x:w[0].slice(),fx:w[0].fx,simplex:v})}y=0;for(let v=0;v<E;++v)y=Math.max(y,Math.abs(w[0][v]-w[1][v]));if(Math.abs(w[0].fx-w[E].fx)<a&&y<c)break;for(let v=0;v<E;++v){V[v]=0;for(let x=0;x<E;++x)V[v]+=w[x][v];V[v]/=E}let u=w[E];if(gt(P,1+d,V,-d,u),P.fx=t(P),P.fx<w[0].fx)if(gt(_,1+f,V,-f,u),_.fx=t(_),_.fx<P.fx)N(_);else N(P);else if(P.fx>=w[E-1].fx){let v=!1;if(P.fx>u.fx)if(gt(b,1+l,V,-l,u),b.fx=t(b),b.fx<u.fx)N(b);else v=!0;else if(gt(b,1-l*d,V,l*d,u),b.fx=t(b),b.fx<P.fx)N(b);else v=!0;if(v){if(S>=1)break;for(let x=1;x<w.length;++x)gt(w[x],1-S,w[0],S,w[x]),w[x].fx=t(w[x])}}else N(P)}return w.sort(q),{fx:w[0].fx,x:w[0]}}function xe(t,s,i,n,r,o,a){let c=i.fx,d=pt(i.fxprime,s),f=c,l=c,S=d,y=0;r=r||1,o=o||0.000001,a=a||0.1;function E(w,N,q){for(let V=0;V<16;++V)if(r=(w+N)/2,gt(n.x,1,i.x,r,s),f=n.fx=t(n.x,n.fxprime),S=pt(n.fxprime,s),f>c+o*r*d||f>=q)N=r;else{if(Math.abs(S)<=-a*d)return r;if(S*(N-w)>=0)N=w;w=r,q=f}return 0}for(let w=0;w<10;++w){if(gt(n.x,1,i.x,r,s),f=n.fx=t(n.x,n.fxprime),S=pt(n.fxprime,s),f>c+o*r*d||w&&f>=l)return E(y,r,l);if(Math.abs(S)<=-a*d)return r;if(S>=0)return E(r,y,f);l=f,y=r,r*=2}return r}function ye(t,s,i){let n={x:s.slice(),fx:0,fxprime:s.slice()},r={x:s.slice(),fx:0,fxprime:s.slice()},o=s.slice(),a,c,d=1,f;i=i||{},f=i.maxIterations||s.length*20,n.fx=t(n.x,n.fxprime),a=n.fxprime.slice(),At(a,n.fxprime,-1);for(let l=0;l<f;++l){if(d=xe(t,a,n,r,d),i.history)i.history.push({x:n.x.slice(),fx:n.fx,fxprime:n.fxprime.slice(),alpha:d});if(!d)At(a,n.fxprime,-1);else{gt(o,1,r.fxprime,-1,n.fxprime);let S=pt(n.fxprime,n.fxprime),y=Math.max(0,pt(o,r.fxprime)/S);gt(a,y,a,-1,r.fxprime),c=n,n=r,r=c}if(zt(n.fxprime)<=0.00001)break}if(i.history)i.history.push({x:n.x.slice(),fx:n.fx,fxprime:n.fxprime.slice(),alpha:d});return n}function Ht(t,s={}){s.maxIterations=s.maxIterations||500;let i=s.initialLayout||ve,n=s.lossFunction||mt,r=pe(t,s),o=i(r,s),a=Object.keys(o),c=[];for(let l of a)c.push(o[l].x),c.push(o[l].y);let f=Kt((l)=>{let S={};for(let y=0;y<a.length;++y){let E=a[y];S[E]={x:l[2*y],y:l[2*y+1],radius:o[E].radius}}return n(S,r)},c,s).x;for(let l=0;l<a.length;++l){let S=a[l];o[S].x=f[2*l],o[S].y=f[2*l+1]}return o}var Yt=0.0000000001;function Ct(t,s,i){if(Math.min(t,s)*Math.min(t,s)*Math.PI<=i+Yt)return Math.abs(t-s);return ge((n)=>Rt(t,s,n)-i,0,t+s)}function pe(t,s={}){let i=s.distinct,n=t.map((c)=>Object.assign({},c));function r(c){return c.join(";")}if(i){let c=new Map;for(let d of n)for(let f=0;f<d.sets.length;f++){let l=String(d.sets[f]);c.set(l,d.size+(c.get(l)||0));for(let S=f+1;S<d.sets.length;S++){let y=String(d.sets[S]),E=`${l};${y}`,w=`${y};${l}`;c.set(E,d.size+(c.get(E)||0)),c.set(w,d.size+(c.get(w)||0))}}for(let d of n)if(d.sets.length<3)d.size=c.get(r(d.sets))}let o=[],a=new Set;for(let c of n)if(c.sets.length===1)o.push(c.sets[0]);else if(c.sets.length===2){let d=c.sets[0],f=c.sets[1];a.add(r(c.sets)),a.add(r([f,d]))}o.sort((c,d)=>c===d?0:c<d?-1:1);for(let c=0;c<o.length;++c){let d=o[c];for(let f=c+1;f<o.length;++f){let l=o[f];if(!a.has(r([d,l])))n.push({sets:[d,l],size:0})}}return n}function me(t,s,i){let n=qt(s.length,s.length),r=qt(s.length,s.length);return t.filter((o)=>o.sets.length===2).forEach((o)=>{let a=i[o.sets[0]],c=i[o.sets[1]],d=Math.sqrt(s[a].size/Math.PI),f=Math.sqrt(s[c].size/Math.PI),l=Ct(d,f,o.size);n[a][c]=n[c][a]=l;let S=0;if(o.size+0.0000000001>=Math.min(s[a].size,s[c].size))S=1;else if(o.size<=0.0000000001)S=-1;r[a][c]=r[c][a]=S}),{distances:n,constraints:r}}function be(t,s,i,n){for(let o=0;o<s.length;++o)s[o]=0;let r=0;for(let o=0;o<i.length;++o){let a=t[2*o],c=t[2*o+1];for(let d=o+1;d<i.length;++d){let f=t[2*d],l=t[2*d+1],S=i[o][d],y=n[o][d],E=(f-a)*(f-a)+(l-c)*(l-c),w=Math.sqrt(E),N=E-S*S;if(y>0&&w<=S||y<0&&w>=S)continue;r+=2*N*N,s[2*o]+=4*N*(a-f),s[2*o+1]+=4*N*(c-l),s[2*d]+=4*N*(f-a),s[2*d+1]+=4*N*(l-c)}}return r}function ve(t,s={}){let i=Ie(t,s),n=s.lossFunction||mt;if(t.length>=8){let r=ke(t,s),o=n(r,t),a=n(i,t);if(o+0.00000001<a)i=r}return i}function ke(t,s={}){let i=s.restarts||10,n=[],r={};for(let y of t)if(y.sets.length===1)r[y.sets[0]]=n.length,n.push(y);let{distances:o,constraints:a}=me(t,n,r),c=zt(o.map(zt))/o.length;o=o.map((y)=>y.map((E)=>E/c));let d=(y,E)=>be(y,E,o,a),f=null;for(let y=0;y<i;++y){let E=Tt(o.length*2).map(Math.random),w=ye(d,E,s);if(!f||w.fx<f.fx)f=w}let l=f.x,S={};for(let y=0;y<n.length;++y){let E=n[y];S[E.sets[0]]={x:l[2*y]*c,y:l[2*y+1]*c,radius:Math.sqrt(E.size/Math.PI)}}if(s.history)for(let y of s.history)At(y.x,c);return S}function Ie(t,s){let i=s&&s.lossFunction?s.lossFunction:mt,n={},r={};for(let S of t)if(S.sets.length===1){let y=S.sets[0];n[y]={x:10000000000,y:10000000000,rowid:n.length,size:S.size,radius:Math.sqrt(S.size/Math.PI)},r[y]=[]}t=t.filter((S)=>S.sets.length===2);for(let S of t){let y=S.weight!=null?S.weight:1,E=S.sets[0],w=S.sets[1];if(S.size+Yt>=Math.min(n[E].size,n[w].size))y=0;r[E].push({set:w,size:S.size,weight:y}),r[w].push({set:E,size:S.size,weight:y})}let o=[];Object.keys(r).forEach((S)=>{let y=0;for(let E=0;E<r[S].length;++E)y+=r[S][E].size*r[S][E].weight;o.push({set:S,size:y})});function a(S,y){return y.size-S.size}o.sort(a);let c={};function d(S){return S.set in c}function f(S,y){n[y].x=S.x,n[y].y=S.y,c[y]=!0}f({x:0,y:0},o[0].set);for(let S=1;S<o.length;++S){let y=o[S].set,E=r[y].filter(d),w=n[y];if(E.sort(a),E.length===0)throw"ERROR: missing pairwise overlap information";let N=[];for(var l=0;l<E.length;++l){let P=n[E[l].set],b=Ct(w.radius,P.radius,E[l].size);N.push({x:P.x+b,y:P.y}),N.push({x:P.x-b,y:P.y}),N.push({y:P.y+b,x:P.x}),N.push({y:P.y-b,x:P.x});for(let _=l+1;_<E.length;++_){let T=n[E[_].set],u=Ct(w.radius,T.radius,E[_].size),v=Gt({x:P.x,y:P.y,radius:b},{x:T.x,y:T.y,radius:u});N.push(...v)}}let q=100000000000000000000000000000000000000000000000000,V=N[0];for(let P of N){n[y].x=P.x,n[y].y=P.y;let b=i(n,t);if(b<q)q=b,V=P}f(V,y)}return n}function mt(t,s){let i=0;for(let n of s){if(n.sets.length===1)continue;let r;if(n.sets.length===2){let a=t[n.sets[0]],c=t[n.sets[1]];r=Rt(a.radius,c.radius,ot(a,c))}else r=kt(n.sets.map((a)=>t[a]));let o=n.weight!=null?n.weight:1;i+=o*(r-n.size)*(r-n.size)}return i}function Xt(t,s){let i=0;for(let n of s){if(n.sets.length===1)continue;let r;if(n.sets.length===2){let c=t[n.sets[0]],d=t[n.sets[1]];r=Rt(c.radius,d.radius,ot(c,d))}else r=kt(n.sets.map((c)=>t[c]));let o=n.weight!=null?n.weight:1,a=Math.log((r+1)/(n.size+1));i+=o*a*a}return i}function Me(t,s,i){if(i==null)t.sort((r,o)=>o.radius-r.radius);else t.sort(i);if(t.length>0){let r=t[0].x,o=t[0].y;for(let a of t)a.x-=r,a.y-=o}if(t.length===2){if(ot(t[0],t[1])<Math.abs(t[1].radius-t[0].radius))t[1].x=t[0].x+t[0].radius-t[1].radius-0.0000000001,t[1].y=t[0].y}if(t.length>1){let r=Math.atan2(t[1].x,t[1].y)-s,o=Math.cos(r),a=Math.sin(r);for(let c of t){let{x:d,y:f}=c;c.x=o*d-a*f,c.y=a*d+o*f}}if(t.length>2){let r=Math.atan2(t[2].x,t[2].y)-s;while(r<0)r+=2*Math.PI;while(r>2*Math.PI)r-=2*Math.PI;if(r>Math.PI){let o=t[1].y/(0.0000000001+t[1].x);for(let a of t){var n=(a.x+o*a.y)/(1+o*o);a.x=2*n-a.x,a.y=2*n*o-a.y}}}}function Se(t){t.forEach((r)=>{r.parent=r});function s(r){if(r.parent!==r)r.parent=s(r.parent);return r.parent}function i(r,o){let a=s(r),c=s(o);a.parent=c}for(let r=0;r<t.length;++r)for(let o=r+1;o<t.length;++o){let a=t[r].radius+t[o].radius;if(ot(t[r],t[o])+0.0000000001<a)i(t[o],t[r])}let n=new Map;for(let r=0;r<t.length;++r){let o=s(t[r]).parent.setid;if(!n.has(o))n.set(o,[]);n.get(o).push(t[r])}return t.forEach((r)=>{delete r.parent}),Array.from(n.values())}function Dt(t){let s=(i)=>{let n=t.reduce((o,a)=>Math.max(o,a[i]+a.radius),Number.NEGATIVE_INFINITY),r=t.reduce((o,a)=>Math.min(o,a[i]-a.radius),Number.POSITIVE_INFINITY);return{max:n,min:r}};return{xRange:s("x"),yRange:s("y")}}function Zt(t,s,i){if(s==null)s=Math.PI/2;let n=$t(t).map((f)=>Object.assign({},f)),r=Se(n);for(let f of r){Me(f,s,i);let l=Dt(f);f.size=(l.xRange.max-l.xRange.min)*(l.yRange.max-l.yRange.min),f.bounds=l}r.sort((f,l)=>l.size-f.size),n=r[0];let o=n.bounds,a=(o.xRange.max-o.xRange.min)/50;function c(f,l,S){if(!f)return;let y=f.bounds,E,w;if(l)E=o.xRange.max-y.xRange.min+a;else{E=o.xRange.max-y.xRange.max;let N=(y.xRange.max-y.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;if(N<0)E+=N}if(S)w=o.yRange.max-y.yRange.min+a;else{w=o.yRange.max-y.yRange.max;let N=(y.yRange.max-y.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;if(N<0)w+=N}for(let N of f)N.x+=E,N.y+=w,n.push(N)}let d=1;while(d<r.length)c(r[d],!0,!1),c(r[d+1],!1,!0),c(r[d+2],!0,!0),d+=3,o=Dt(n);return Qt(n)}function Jt(t,s,i,n,r){let o=$t(t);s-=2*n,i-=2*n;let{xRange:a,yRange:c}=Dt(o);if(a.max===a.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let d,f;if(r){let E=Math.sqrt(r/Math.PI)*2;d=s/E,f=i/E}else d=s/(a.max-a.min),f=i/(c.max-c.min);let l=Math.min(f,d),S=(s-(a.max-a.min)*l)/2,y=(i-(c.max-c.min)*l)/2;return Qt(o.map((E)=>({radius:l*E.radius,x:n+S+(E.x-a.min)*l,y:n+y+(E.y-c.min)*l,setid:E.setid})))}function Qt(t){let s={};for(let i of t)s[i.setid]=i;return s}function $t(t){return Object.keys(t).map((i)=>Object.assign(t[i],{setid:i}))}function te(t={}){let s=!1,i=600,n=350,r=15,o=1000,a=Math.PI/2,c=!0,d=null,f=!0,l=!0,S=null,y=null,E=!1,w=null,N=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,q={},V=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],P=0,b=function(v){if(v in q)return q[v];var x=q[v]=V[P];if(P+=1,P>=V.length)P=0;return x},_=Ht,T=mt;function u(v){let x=v.datum(),W=new Set;x.forEach((z)=>{if(z.size==0&&z.sets.length==1)W.add(z.sets[0])}),x=x.filter((z)=>!z.sets.some((J)=>W.has(J)));let C={},H={};if(x.length>0){let z=_(x,{lossFunction:T,distinct:E});if(c)z=Zt(z,a,y);C=Jt(z,i,n,r,d),H=ne(C,x,N)}let at={};x.forEach((z)=>{if(z.label)at[z.sets]=z.label});function nt(z){if(z.sets in at)return at[z.sets];if(z.sets.length==1)return""+z.sets[0]}v.selectAll("svg").data([C]).enter().append("svg");let Z=v.select("svg");if(s)Z.attr("viewBox",`0 0 ${i} ${n}`);else Z.attr("width",i).attr("height",n);let G={},X=!1;Z.selectAll(".venn-area path").each(function(z){let J=this.getAttribute("d");if(z.sets.length==1&&J&&!E)X=!0,G[z.sets[0]]=Ee(J)});function B(z){return(J)=>{let yt=z.sets.map((dt)=>{let ht=G[dt],rt=C[dt];if(!ht)ht={x:i/2,y:n/2,radius:1};if(!rt)rt={x:i/2,y:n/2,radius:1};return{x:ht.x*(1-J)+rt.x*J,y:ht.y*(1-J)+rt.y*J,radius:ht.radius*(1-J)+rt.radius*J}});return Ut(yt,w)}}let Q=Z.selectAll(".venn-area").data(x,(z)=>z.sets),st=Q.enter().append("g").attr("class",(z)=>`venn-area venn-${z.sets.length==1?"circle":"intersection"}${z.colour||z.color?" venn-coloured":""}`).attr("data-venn-sets",(z)=>z.sets.join("_")),tt=st.append("path"),lt=st.append("text").attr("class","label").text((z)=>nt(z)).attr("text-anchor","middle").attr("dy",".35em").attr("x",i/2).attr("y",n/2);if(l)tt.style("fill-opacity","0").filter((z)=>z.sets.length==1).style("fill",(z)=>z.colour?z.colour:z.color?z.color:b(z.sets)).style("fill-opacity",".25"),lt.style("fill",(z)=>{if(z.colour||z.color)return"#FFF";if(t.textFill)return t.textFill;return z.sets.length==1?b(z.sets):"#444"});function it(z){if(typeof z.transition==="function")return z.transition("venn").duration(o);return z}let et=v;if(X&&typeof et.transition==="function")et=it(v),et.selectAll("path").attrTween("d",B);else et.selectAll("path").attr("d",(z)=>Ut(z.sets.map((J)=>C[J])),w);let U=et.selectAll("text").filter((z)=>(z.sets in H)).text((z)=>nt(z)).attr("x",(z)=>Math.floor(H[z.sets].x)).attr("y",(z)=>Math.floor(H[z.sets].y));if(f)if(X)if("on"in U)U.on("end",wt(C,nt));else U.each("end",wt(C,nt));else U.each(wt(C,nt));let ft=it(Q.exit()).remove();if(typeof Q.transition==="function")ft.selectAll("path").attrTween("d",B);let ut=ft.selectAll("text").attr("x",i/2).attr("y",n/2);if(S!==null)lt.style("font-size","0px"),U.style("font-size",S),ut.style("font-size","0px");return{circles:C,textCentres:H,nodes:Q,enter:st,update:et,exit:ft}}return u.wrap=function(v){if(!arguments.length)return f;return f=v,u},u.useViewBox=function(){return s=!0,u},u.width=function(v){if(!arguments.length)return i;return i=v,u},u.height=function(v){if(!arguments.length)return n;return n=v,u},u.padding=function(v){if(!arguments.length)return r;return r=v,u},u.distinct=function(v){if(!arguments.length)return E;return E=v,u},u.colours=function(v){if(!arguments.length)return b;return b=v,u},u.colors=function(v){if(!arguments.length)return b;return b=v,u},u.fontSize=function(v){if(!arguments.length)return S;return S=v,u},u.round=function(v){if(!arguments.length)return w;return w=v,u},u.duration=function(v){if(!arguments.length)return o;return o=v,u},u.layoutFunction=function(v){if(!arguments.length)return _;return _=v,u},u.normalize=function(v){if(!arguments.length)return c;return c=v,u},u.scaleToFit=function(v){if(!arguments.length)return d;return d=v,u},u.styled=function(v){if(!arguments.length)return l;return l=v,u},u.orientation=function(v){if(!arguments.length)return a;return a=v,u},u.orientationOrder=function(v){if(!arguments.length)return y;return y=v,u},u.lossFunction=function(v){if(!arguments.length)return T;return T=v==="default"?mt:v==="logRatio"?Xt:v,u},u}function wt(t,s){return function(i){let n=this,r=t[i.sets[0]].radius||50,o=s(i)||"",a=o.split(/\s+/).reverse(),c=3,d=(o.length+a.length)/3,f=a.pop(),l=[f],S=0,y=1.1;n.textContent=null;let E=[];function w(b){let _=n.ownerDocument.createElementNS(n.namespaceURI,"tspan");return _.textContent=b,E.push(_),n.append(_),_}let N=w(f);while(!0){if(f=a.pop(),!f)break;l.push(f);let b=l.join(" ");if(N.textContent=b,b.length>d&&N.getComputedTextLength()>r)l.pop(),N.textContent=l.join(" "),l=[f],N=w(f),S++}let q=0.35-S*y/2,V=n.getAttribute("x"),P=n.getAttribute("y");E.forEach((b,_)=>{b.setAttribute("x",V),b.setAttribute("y",P),b.setAttribute("dy",`${q+_*y}em`)})}}function _t(t,s,i){let n=s[0].radius-ot(s[0],t);for(let r=1;r<s.length;++r){let o=s[r].radius-ot(s[r],t);if(o<=n)n=o}for(let r=0;r<i.length;++r){let o=ot(i[r],t)-i[r].radius;if(o<=n)n=o}return n}function ee(t,s,i){let n=[];for(let l of t)n.push({x:l.x,y:l.y}),n.push({x:l.x+l.radius/2,y:l.y}),n.push({x:l.x-l.radius/2,y:l.y}),n.push({x:l.x,y:l.y+l.radius/2}),n.push({x:l.x,y:l.y-l.radius/2});let r=n[0],o=_t(n[0],t,s);for(let l=1;l<n.length;++l){let S=_t(n[l],t,s);if(S>=o)r=n[l],o=S}let a=Kt((l)=>-1*_t({x:l[0],y:l[1]},t,s),[r.x,r.y],{maxIterations:500,minErrorDelta:0.0000000001}).x,c={x:i?0:a[0],y:a[1]},d=!0;for(let l of t)if(ot(c,l)>l.radius){d=!1;break}for(let l of s)if(ot(c,l)<l.radius){d=!1;break}if(d)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};let f={};if(kt(t,f),f.arcs.length===0)return{x:0,y:-1000,disjoint:!0};if(f.arcs.length==1)return{x:f.arcs[0].circle.x,y:f.arcs[0].circle.y};if(s.length)return ee(t,[]);return Wt(f.arcs.map((l)=>l.p1))}function we(t){let s={},i=Object.keys(t);for(let n of i)s[n]=[];for(let n=0;n<i.length;n++){let r=i[n],o=t[r];for(let a=n+1;a<i.length;++a){let c=i[a],d=t[c],f=ot(o,d);if(f+d.radius<=o.radius+0.0000000001)s[c].push(r);else if(f+o.radius<=d.radius+0.0000000001)s[r].push(c)}}return s}function ne(t,s,i){let n={},r=we(t);for(let o=0;o<s.length;++o){let a=s[o].sets,c={},d={};for(let y=0;y<a.length;++y){c[a[y]]=!0;let E=r[a[y]];for(let w=0;w<E.length;++w)d[E[w]]=!0}let f=[],l=[];for(let y in t)if(y in c)f.push(t[y]);else if(!(y in d))l.push(t[y]);let S=ee(f,l,i);if(n[a]=S,S.disjoint&&s[o].size>0)console.log("WARNING: area "+a+" not represented on screen")}return n}function _e(t,s,i){let n=[];return n.push(`
2
2
  M`,t,s),n.push(`
3
3
  m`,-i,0),n.push(`
4
4
  a`,i,i,0,1,0,i*2,0),n.push(`
@@ -9,7 +9,7 @@ A`,a,a,0,o.large?1:0,o.sweep?1:0,n(o.p1.x),n(o.p1.y))}return r.join(" ")}functio
9
9
  Expecting `+vt.join(", ")+", got '"+(this.terminals_[U]||U)+"'";else Mt="Parse error on line "+(H+1)+": Unexpected "+(U==G?"end of input":"'"+(this.terminals_[U]||U)+"'");this.parseError(Mt,{text:B.match,token:this.terminals_[U]||U,line:B.yylineno,loc:tt,expected:vt})}if(z[0]instanceof Array&&z.length>1)throw Error("Parse Error: multiple actions possible at state: "+ut+", token: "+U);switch(z[0]){case 1:if(T.push(U),v.push(B.yytext),x.push(B.yylloc),T.push(z[1]),U=null,!ft){if(at=B.yyleng,C=B.yytext,H=B.yylineno,tt=B.yylloc,nt>0)nt--}else U=ft,ft=null;break;case 2:if(rt=this.productions_[z[1]][1],dt.$=v[v.length-rt],dt._$={first_line:x[x.length-(rt||1)].first_line,last_line:x[x.length-1].last_line,first_column:x[x.length-(rt||1)].first_column,last_column:x[x.length-1].last_column},lt)dt._$.range=[x[x.length-(rt||1)].range[0],x[x.length-1].range[1]];if(yt=this.performAction.apply(dt,[C,at,H,Q.yy,z[1],v,x].concat(X)),typeof yt<"u")return yt;if(rt)T=T.slice(0,-1*rt*2),v=v.slice(0,-1*rt),x=x.slice(0,-1*rt);T.push(this.productions_[z[1]][0]),v.push(dt.$),x.push(dt._$),Bt=W[T[T.length-2]][T[T.length-1]],T.push(Bt);break;case 3:return!0}}return!0},"parse")},q=function(){var P={EOF:1,parseError:e(function(_,T){if(this.yy.parser)this.yy.parser.parseError(_,T);else throw Error(_)},"parseError"),setInput:e(function(b,_){if(this.yy=_||this.yy||{},this._input=b,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];return this.offset=0,this},"setInput"),input:e(function(){var b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var _=b.match(/(?:\r\n?|\n).*/g);if(_)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),b},"input"),unput:e(function(b){var _=b.length,T=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-_),this.offset-=_;var u=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),T.length-1)this.yylineno-=T.length-1;var v=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:T?(T.length===u.length?this.yylloc.first_column:0)+u[u.length-T.length].length-T[0].length:this.yylloc.first_column-_},this.options.ranges)this.yylloc.range=[v[0],v[0]+this.yyleng-_];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(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).
10
10
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(b){this.unput(this.match.slice(b))},"less"),pastInput:e(function(){var b=this.matched.substr(0,this.matched.length-this.match.length);return(b.length>20?"...":"")+b.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var b=this.match;if(b.length<20)b+=this._input.substr(0,20-b.length);return(b.substr(0,20)+(b.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var b=this.pastInput(),_=Array(b.length+1).join("-");return b+this.upcomingInput()+`
11
11
  `+_+"^"},"showPosition"),test_match:e(function(b,_){var T,u,v;if(this.options.backtrack_lexer){if(v={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)v.yylloc.range=this.yylloc.range.slice(0)}if(u=b[0].match(/(?:\r\n?|\n).*/g),u)this.yylineno+=u.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],T=this.performAction.call(this,this.yy,this,_,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(T)return T;else if(this._backtrack){for(var x in v)this[x]=v[x];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var b,_,T,u;if(!this._more)this.yytext="",this.match="";var v=this._currentRules();for(var x=0;x<v.length;x++)if(T=this._input.match(this.rules[v[x]]),T&&(!_||T[0].length>_[0].length)){if(_=T,u=x,this.options.backtrack_lexer)if(b=this.test_match(T,v[x]),b!==!1)return b;else if(this._backtrack){_=!1;continue}else return!1;else if(!this.options.flex)break}if(_){if(b=this.test_match(_,v[u]),b!==!1)return b;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
12
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var _=this.next();if(_)return _;else return this.lex()},"lex"),begin:e(function(_){this.conditionStack.push(_)},"begin"),popState:e(function(){var _=this.conditionStack.length-1;if(_>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(_){if(_=this.conditionStack.length-1-Math.abs(_||0),_>=0)return this.conditionStack[_];else return"INITIAL"},"topState"),pushState:e(function(_){this.begin(_)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(_,T,u,v){var x=v;switch(u){case 0:break;case 1:break;case 2:break;case 3:if(_.getIndentMode&&_.getIndentMode())return _.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 4:break;case 5:if(_.setIndentMode)_.setIndentMode(!1);this.begin("INITIAL"),this.unput(T.yytext);break;case 6:return this.begin("bol"),8;break;case 7:break;case 8:break;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(_.consumeIndentText)_.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return T.yytext=T.yytext.slice(2,-2),14;break;case 17:return T.yytext=T.yytext.slice(1,-1).trim(),14;break;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}};return P}();N.lexer=q;function V(){this.yy={}}return e(V,"Parser"),V.prototype=N,N.Parser=V,new V}();Nt.parser=Nt;var ze=Nt,Ot=[],Lt=[],jt=[],Ft=new Set,Pt,Vt=!1,Ae=e((t,s,i)=>{let n=It(t).sort(),r=i??10/Math.pow(t.length,2);if(Pt=n,n.length===1)Ft.add(n[0]);Ot.push({sets:n,size:r,label:s?bt(s):void 0})},"addSubsetData"),Ce=e(()=>Ot,"getSubsetData"),bt=e((t)=>{let s=t.trim();if(s.length>=2&&s.startsWith('"')&&s.endsWith('"'))return s.slice(1,-1);return s},"normalizeText"),De=e((t)=>t?bt(t):t,"normalizeStyleValue"),Re=e((t,s,i)=>{let n=bt(s);Lt.push({sets:It(t).sort(),id:n,label:i?bt(i):void 0})},"addTextData"),Ne=e((t,s)=>{let i=It(t).sort(),n={};for(let[r,o]of s)n[r]=De(o)??o;jt.push({targets:i,styles:n})},"addStyleData"),Oe=e(()=>jt,"getStyleData"),It=e((t)=>t.map((s)=>bt(s)),"normalizeIdentifierList"),Le=e((t)=>{let i=It(t).filter((n)=>!Ft.has(n));if(i.length>0)throw Error(`unknown set identifier: ${i.join(", ")}`)},"validateUnionIdentifiers"),je=e(()=>Lt,"getTextData"),Fe=e(()=>Pt,"getCurrentSets"),Pe=e(()=>Vt,"getIndentMode"),Ve=e((t)=>{Vt=t},"setIndentMode"),Be=F.venn;function oe(){return K(Be,k().venn)}e(oe,"getConfig");var qe=e(()=>{A(),Ot.length=0,Lt.length=0,jt.length=0,Ft.clear(),Pt=void 0,Vt=!1},"customClear"),Ue={getConfig:oe,clear:qe,setAccTitle:L,getAccTitle:I,setDiagramTitle:O,getDiagramTitle:D,getAccDescription:M,setAccDescription:R,addSubsetData:Ae,getSubsetData:Ce,addTextData:Re,addStyleData:Ne,validateUnionIdentifiers:Le,getTextData:je,getStyleData:Oe,getCurrentSets:Fe,getIndentMode:Pe,setIndentMode:Ve},Ge=e((t)=>`
12
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var _=this.next();if(_)return _;else return this.lex()},"lex"),begin:e(function(_){this.conditionStack.push(_)},"begin"),popState:e(function(){var _=this.conditionStack.length-1;if(_>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(_){if(_=this.conditionStack.length-1-Math.abs(_||0),_>=0)return this.conditionStack[_];else return"INITIAL"},"topState"),pushState:e(function(_){this.begin(_)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(_,T,u,v){var x=v;switch(u){case 0:break;case 1:break;case 2:break;case 3:if(_.getIndentMode&&_.getIndentMode())return _.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 4:break;case 5:if(_.setIndentMode)_.setIndentMode(!1);this.begin("INITIAL"),this.unput(T.yytext);break;case 6:return this.begin("bol"),8;break;case 7:break;case 8:break;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(_.consumeIndentText)_.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return T.yytext=T.yytext.slice(2,-2),14;break;case 17:return T.yytext=T.yytext.slice(1,-1).trim(),14;break;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}};return P}();N.lexer=q;function V(){this.yy={}}return e(V,"Parser"),V.prototype=N,N.Parser=V,new V}();Nt.parser=Nt;var ze=Nt,Ot=[],Lt=[],jt=[],Ft=new Set,Pt,Vt=!1,Ae=e((t,s,i)=>{let n=It(t).sort(),r=i??10/Math.pow(t.length,2);if(Pt=n,n.length===1)Ft.add(n[0]);Ot.push({sets:n,size:r,label:s?bt(s):void 0})},"addSubsetData"),Ce=e(()=>Ot,"getSubsetData"),bt=e((t)=>{let s=t.trim();if(s.length>=2&&s.startsWith('"')&&s.endsWith('"'))return s.slice(1,-1);return s},"normalizeText"),De=e((t)=>t?bt(t):t,"normalizeStyleValue"),Re=e((t,s,i)=>{let n=bt(s);Lt.push({sets:It(t).sort(),id:n,label:i?bt(i):void 0})},"addTextData"),Ne=e((t,s)=>{let i=It(t).sort(),n={};for(let[r,o]of s)n[r]=De(o)??o;jt.push({targets:i,styles:n})},"addStyleData"),Oe=e(()=>jt,"getStyleData"),It=e((t)=>t.map((s)=>bt(s)),"normalizeIdentifierList"),Le=e((t)=>{let i=It(t).filter((n)=>!Ft.has(n));if(i.length>0)throw Error(`unknown set identifier: ${i.join(", ")}`)},"validateUnionIdentifiers"),je=e(()=>Lt,"getTextData"),Fe=e(()=>Pt,"getCurrentSets"),Pe=e(()=>Vt,"getIndentMode"),Ve=e((t)=>{Vt=t},"setIndentMode"),Be=F.venn;function oe(){return K(Be,k().venn)}e(oe,"getConfig");var qe=e(()=>{A(),Ot.length=0,Lt.length=0,jt.length=0,Ft.clear(),Pt=void 0,Vt=!1},"customClear"),Ue={getConfig:oe,clear:qe,setAccTitle:L,getAccTitle:R,setDiagramTitle:D,getDiagramTitle:O,getAccDescription:M,setAccDescription:I,addSubsetData:Ae,getSubsetData:Ce,addTextData:Re,addStyleData:Ne,validateUnionIdentifiers:Le,getTextData:je,getStyleData:Oe,getCurrentSets:Fe,getIndentMode:Pe,setIndentMode:Ve},Ge=e((t)=>`
13
13
  .venn-title {
14
14
  font-size: 32px;
15
15
  fill: ${t.vennTitleTextColor};
@@ -0,0 +1 @@
1
+ import{Xo}from"./index.7gxz6d1f.js";export{Xo as createWardleyServices};
@@ -1,4 +1,4 @@
1
- import{ee}from"./index.yf0h5qnv.js";import{e,n,Me,k,j,A,L,I,R,M,O,D,u,Y,K}from"./index.fgsp5qqn.js";import{se}from"./index.9zhger75.js";var at=e((a,i)=>{let o=a<=1?a*100:a;if(o<0||o>100)throw Error(`${i} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return o},"toPercent"),G=e((a,i,o)=>({x:at(i,`${o} evolution`),y:at(a,`${o} visibility`)}),"toCoordinates"),lt=e((a)=>{if(!a)return;if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward";return},"getFlowFromPort"),Yt=e((a)=>{if(!a?.startsWith("+"))return{};let o=/^\+'([^']*)'/.exec(a)?.[1];if(a.includes("<>"))return{flow:"bidirectional",label:o};if(a.includes("<"))return{flow:"backward",label:o};if(a.includes(">"))return{flow:"forward",label:o};return{label:o}},"extractFlowFromArrow"),It=e((a,i)=>{if(ee(a,i),a.size)i.setSize(a.size.width,a.size.height);if(a.evolution){let o=a.evolution.stages.map((r)=>{if(r.secondName)return`${r.name.trim()} / ${r.secondName.trim()}`;return r.name.trim()}),g=a.evolution.stages.filter((r)=>r.boundary!==void 0).map((r)=>r.boundary);i.updateAxes({stages:o,stageBoundaries:g})}if(a.anchors.forEach((o)=>{let g=G(o.visibility,o.evolution,`Anchor "${o.name}"`);i.addNode(o.name,o.name,g.x,g.y,"anchor")}),a.components.forEach((o)=>{let g=G(o.visibility,o.evolution,`Component "${o.name}"`),r=o.label?(o.label.negX?-1:1)*o.label.offsetX:void 0,c=o.label?(o.label.negY?-1:1)*o.label.offsetY:void 0,b=o.decorator?.strategy;i.addNode(o.name,o.name,g.x,g.y,"component",r,c,o.inertia,b)}),a.notes.forEach((o)=>{let g=G(o.visibility,o.evolution,`Note "${o.text}"`);i.addNote(o.text,g.x,g.y)}),a.pipelines.forEach((o)=>{let g=i.getNode(o.parent);if(!g||typeof g.y!=="number")throw Error(`Pipeline "${o.parent}" must reference an existing component with coordinates.`);let r=g.y;i.startPipeline(o.parent),o.components.forEach((c)=>{let b=`${o.parent}_${c.name}`,T=c.label?(c.label.negX?-1:1)*c.label.offsetX:void 0,w=c.label?(c.label.negY?-1:1)*c.label.offsetY:void 0,J=at(c.evolution,`Pipeline component "${c.name}" evolution`);i.addNode(b,c.name,J,r,"pipeline-component",T,w),i.addPipelineComponent(o.parent,b)})}),a.links.forEach((o)=>{let g=!!o.arrow&&(o.arrow.includes("-.->")||o.arrow.includes(".-.")),r=lt(o.fromPort)??lt(o.toPort),{flow:c,label:b}=Yt(o.arrow);if(!r&&c)r=c;let T=o.linkLabel,w=b??T;i.addLink(i.resolveNodeId(o.from),i.resolveNodeId(o.to),g,w,r)}),a.evolves.forEach((o)=>{let g=i.getNode(o.component);if(g?.y!==void 0){let r=at(o.target,`Evolve target for "${o.component}"`);i.addTrend(o.component,r,g.y)}}),a.annotations.length>0){let o=a.annotations[0],g=G(o.x,o.y,"Annotations box");i.setAnnotationsBox(g.x,g.y)}a.annotation.forEach((o)=>{let g=G(o.x,o.y,`Annotation ${o.number}`);i.addAnnotation(o.number,[{x:g.x,y:g.y}],o.text)}),a.accelerators.forEach((o)=>{let g=G(o.x,o.y,`Accelerator "${o.name}"`);i.addAccelerator(o.name,g.x,g.y)}),a.deaccelerators.forEach((o)=>{let g=G(o.x,o.y,`Deaccelerator "${o.name}"`);i.addDeaccelerator(o.name,g.x,g.y)})},"populateDb"),ct={parser:{yy:void 0},parse:e(async(a)=>{let i=await se("wardley",a);n.debug(i);let o=ct.parser?.yy;if(!o||typeof o.addNode!=="function")throw Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");It(i,o)},"parse")},Bt=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{e(this,"WardleyBuilder")}addNode(a){let i=this.nodes.get(a.id)??{id:a.id,label:a.label},o={...i,...a,className:a.className??i.className,labelOffsetX:a.labelOffsetX??i.labelOffsetX,labelOffsetY:a.labelOffsetY??i.labelOffsetY};this.nodes.set(a.id,o)}addLink(a){this.links.push(a)}addTrend(a){this.trends.set(a.nodeId,a)}startPipeline(a){this.pipelines.set(a,{nodeId:a,componentIds:[]});let i=this.nodes.get(a);if(i)i.isPipelineParent=!0}addPipelineComponent(a,i){let o=this.pipelines.get(a);if(o)o.componentIds.push(i);let g=this.nodes.get(i);if(g)g.inPipeline=!0}addAnnotation(a){this.annotations.push(a)}addNote(a){this.notes.push(a)}addAccelerator(a){this.accelerators.push(a)}addDeaccelerator(a){this.deaccelerators.push(a)}setAnnotationsBox(a,i){this.annotationsBox={x:a,y:i}}setAxes(a){this.axes={...this.axes,...a}}setSize(a,i){this.size={width:a,height:i}}getNode(a){return this.nodes.get(a)}resolveNodeId(a){if(this.nodes.has(a))return a;for(let[i,o]of this.nodes)if(o.label===a)return i;return a}build(){let a=[];for(let i of this.nodes.values()){if(typeof i.x!=="number"||typeof i.y!=="number")throw Error(`Node "${i.label}" is missing coordinates`);a.push(i)}return{nodes:a,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},P=new Bt;function pt(){return u()["wardley-beta"]}e(pt,"getConfig");function ht(a,i,o,g,r,c,b,T,w){P.addNode({id:a,label:i,x:o,y:g,className:r,labelOffsetX:c,labelOffsetY:b,inertia:T,sourceStrategy:w})}e(ht,"addNode");function ft(a,i,o=!1,g,r){P.addLink({source:a,target:i,dashed:o,label:g,flow:r})}e(ft,"addLink");function xt(a,i,o){P.addTrend({nodeId:a,targetX:i,targetY:o})}e(xt,"addTrend");function gt(a,i,o){P.addAnnotation({number:a,coordinates:i,text:o})}e(gt,"addAnnotation");function yt(a,i,o){P.addNote({text:a,x:i,y:o})}e(yt,"addNote");function ut(a,i,o){P.addAccelerator({name:a,x:i,y:o})}e(ut,"addAccelerator");function wt(a,i,o){P.addDeaccelerator({name:a,x:i,y:o})}e(wt,"addDeaccelerator");function mt(a,i){P.setAnnotationsBox(a,i)}e(mt,"setAnnotationsBox");function kt(a,i){P.setSize(a,i)}e(kt,"setSize");function bt(a){P.startPipeline(a)}e(bt,"startPipeline");function $t(a,i){P.addPipelineComponent(a,i)}e($t,"addPipelineComponent");function vt(a){P.setAxes(a)}e(vt,"updateAxes");function Pt(a){return P.getNode(a)}e(Pt,"getNode");function Ct(a){return P.resolveNodeId(a)}e(Ct,"resolveNodeId");function St(){return P.build()}e(St,"getWardleyData");function Mt(){P.clear(),A()}e(Mt,"clear");var Ft={getConfig:pt,addNode:ht,addLink:ft,addTrend:xt,addAnnotation:gt,addNote:yt,addAccelerator:ut,addDeaccelerator:wt,setAnnotationsBox:mt,setSize:kt,startPipeline:bt,addPipelineComponent:$t,updateAxes:vt,getNode:Pt,resolveNodeId:Ct,getWardleyData:St,clear:Mt,setAccTitle:L,getAccTitle:I,setDiagramTitle:O,getDiagramTitle:D,getAccDescription:M,setAccDescription:R},Rt=["Genesis","Custom Built","Product","Commodity"],Ot=e(()=>{let{themeVariables:a}=u();return{backgroundColor:a.wardley?.backgroundColor??a.background??"#fff",axisColor:a.wardley?.axisColor??"#000",axisTextColor:a.wardley?.axisTextColor??a.primaryTextColor??"#222",gridColor:a.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:a.wardley?.componentFill??"#fff",componentStroke:a.wardley?.componentStroke??"#000",componentLabelColor:a.wardley?.componentLabelColor??a.primaryTextColor??"#222",linkStroke:a.wardley?.linkStroke??"#000",evolutionStroke:a.wardley?.evolutionStroke??"#dc3545",annotationStroke:a.wardley?.annotationStroke??"#000",annotationTextColor:a.wardley?.annotationTextColor??a.primaryTextColor??"#222",annotationFill:a.wardley?.annotationFill??a.background??"#fff"}},"getTheme"),Dt=e(()=>{let a=u()["wardley-beta"];return{width:a?.width??900,height:a?.height??600,padding:a?.padding??48,nodeRadius:a?.nodeRadius??6,nodeLabelOffset:a?.nodeLabelOffset??8,axisFontSize:a?.axisFontSize??12,labelFontSize:a?.labelFontSize??10,showGrid:a?.showGrid??!1,useMaxWidth:a?.useMaxWidth??!0}},"getConfigValues"),Gt=e((a,i,o,g)=>{n.debug(`Rendering Wardley map
1
+ import{ee}from"./index.r0p3fm9f.js";import{e,n,Me,k,j,A,L,R,I,M,D,O,u,Y,K}from"./index.a1bxkgd3.js";import{se}from"./index.7gxz6d1f.js";var at=e((a,i)=>{let o=a<=1?a*100:a;if(o<0||o>100)throw Error(`${i} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return o},"toPercent"),G=e((a,i,o)=>({x:at(i,`${o} evolution`),y:at(a,`${o} visibility`)}),"toCoordinates"),lt=e((a)=>{if(!a)return;if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward";return},"getFlowFromPort"),Yt=e((a)=>{if(!a?.startsWith("+"))return{};let o=/^\+'([^']*)'/.exec(a)?.[1];if(a.includes("<>"))return{flow:"bidirectional",label:o};if(a.includes("<"))return{flow:"backward",label:o};if(a.includes(">"))return{flow:"forward",label:o};return{label:o}},"extractFlowFromArrow"),It=e((a,i)=>{if(ee(a,i),a.size)i.setSize(a.size.width,a.size.height);if(a.evolution){let o=a.evolution.stages.map((r)=>{if(r.secondName)return`${r.name.trim()} / ${r.secondName.trim()}`;return r.name.trim()}),g=a.evolution.stages.filter((r)=>r.boundary!==void 0).map((r)=>r.boundary);i.updateAxes({stages:o,stageBoundaries:g})}if(a.anchors.forEach((o)=>{let g=G(o.visibility,o.evolution,`Anchor "${o.name}"`);i.addNode(o.name,o.name,g.x,g.y,"anchor")}),a.components.forEach((o)=>{let g=G(o.visibility,o.evolution,`Component "${o.name}"`),r=o.label?(o.label.negX?-1:1)*o.label.offsetX:void 0,c=o.label?(o.label.negY?-1:1)*o.label.offsetY:void 0,b=o.decorator?.strategy;i.addNode(o.name,o.name,g.x,g.y,"component",r,c,o.inertia,b)}),a.notes.forEach((o)=>{let g=G(o.visibility,o.evolution,`Note "${o.text}"`);i.addNote(o.text,g.x,g.y)}),a.pipelines.forEach((o)=>{let g=i.getNode(o.parent);if(!g||typeof g.y!=="number")throw Error(`Pipeline "${o.parent}" must reference an existing component with coordinates.`);let r=g.y;i.startPipeline(o.parent),o.components.forEach((c)=>{let b=`${o.parent}_${c.name}`,T=c.label?(c.label.negX?-1:1)*c.label.offsetX:void 0,w=c.label?(c.label.negY?-1:1)*c.label.offsetY:void 0,J=at(c.evolution,`Pipeline component "${c.name}" evolution`);i.addNode(b,c.name,J,r,"pipeline-component",T,w),i.addPipelineComponent(o.parent,b)})}),a.links.forEach((o)=>{let g=!!o.arrow&&(o.arrow.includes("-.->")||o.arrow.includes(".-.")),r=lt(o.fromPort)??lt(o.toPort),{flow:c,label:b}=Yt(o.arrow);if(!r&&c)r=c;let T=o.linkLabel,w=b??T;i.addLink(i.resolveNodeId(o.from),i.resolveNodeId(o.to),g,w,r)}),a.evolves.forEach((o)=>{let g=i.getNode(o.component);if(g?.y!==void 0){let r=at(o.target,`Evolve target for "${o.component}"`);i.addTrend(o.component,r,g.y)}}),a.annotations.length>0){let o=a.annotations[0],g=G(o.x,o.y,"Annotations box");i.setAnnotationsBox(g.x,g.y)}a.annotation.forEach((o)=>{let g=G(o.x,o.y,`Annotation ${o.number}`);i.addAnnotation(o.number,[{x:g.x,y:g.y}],o.text)}),a.accelerators.forEach((o)=>{let g=G(o.x,o.y,`Accelerator "${o.name}"`);i.addAccelerator(o.name,g.x,g.y)}),a.deaccelerators.forEach((o)=>{let g=G(o.x,o.y,`Deaccelerator "${o.name}"`);i.addDeaccelerator(o.name,g.x,g.y)})},"populateDb"),ct={parser:{yy:void 0},parse:e(async(a)=>{let i=await se("wardley",a);n.debug(i);let o=ct.parser?.yy;if(!o||typeof o.addNode!=="function")throw Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");It(i,o)},"parse")},Bt=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{e(this,"WardleyBuilder")}addNode(a){let i=this.nodes.get(a.id)??{id:a.id,label:a.label},o={...i,...a,className:a.className??i.className,labelOffsetX:a.labelOffsetX??i.labelOffsetX,labelOffsetY:a.labelOffsetY??i.labelOffsetY};this.nodes.set(a.id,o)}addLink(a){this.links.push(a)}addTrend(a){this.trends.set(a.nodeId,a)}startPipeline(a){this.pipelines.set(a,{nodeId:a,componentIds:[]});let i=this.nodes.get(a);if(i)i.isPipelineParent=!0}addPipelineComponent(a,i){let o=this.pipelines.get(a);if(o)o.componentIds.push(i);let g=this.nodes.get(i);if(g)g.inPipeline=!0}addAnnotation(a){this.annotations.push(a)}addNote(a){this.notes.push(a)}addAccelerator(a){this.accelerators.push(a)}addDeaccelerator(a){this.deaccelerators.push(a)}setAnnotationsBox(a,i){this.annotationsBox={x:a,y:i}}setAxes(a){this.axes={...this.axes,...a}}setSize(a,i){this.size={width:a,height:i}}getNode(a){return this.nodes.get(a)}resolveNodeId(a){if(this.nodes.has(a))return a;for(let[i,o]of this.nodes)if(o.label===a)return i;return a}build(){let a=[];for(let i of this.nodes.values()){if(typeof i.x!=="number"||typeof i.y!=="number")throw Error(`Node "${i.label}" is missing coordinates`);a.push(i)}return{nodes:a,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},P=new Bt;function pt(){return u()["wardley-beta"]}e(pt,"getConfig");function ht(a,i,o,g,r,c,b,T,w){P.addNode({id:a,label:i,x:o,y:g,className:r,labelOffsetX:c,labelOffsetY:b,inertia:T,sourceStrategy:w})}e(ht,"addNode");function ft(a,i,o=!1,g,r){P.addLink({source:a,target:i,dashed:o,label:g,flow:r})}e(ft,"addLink");function xt(a,i,o){P.addTrend({nodeId:a,targetX:i,targetY:o})}e(xt,"addTrend");function gt(a,i,o){P.addAnnotation({number:a,coordinates:i,text:o})}e(gt,"addAnnotation");function yt(a,i,o){P.addNote({text:a,x:i,y:o})}e(yt,"addNote");function ut(a,i,o){P.addAccelerator({name:a,x:i,y:o})}e(ut,"addAccelerator");function wt(a,i,o){P.addDeaccelerator({name:a,x:i,y:o})}e(wt,"addDeaccelerator");function mt(a,i){P.setAnnotationsBox(a,i)}e(mt,"setAnnotationsBox");function kt(a,i){P.setSize(a,i)}e(kt,"setSize");function bt(a){P.startPipeline(a)}e(bt,"startPipeline");function $t(a,i){P.addPipelineComponent(a,i)}e($t,"addPipelineComponent");function vt(a){P.setAxes(a)}e(vt,"updateAxes");function Pt(a){return P.getNode(a)}e(Pt,"getNode");function Ct(a){return P.resolveNodeId(a)}e(Ct,"resolveNodeId");function St(){return P.build()}e(St,"getWardleyData");function Mt(){P.clear(),A()}e(Mt,"clear");var Ft={getConfig:pt,addNode:ht,addLink:ft,addTrend:xt,addAnnotation:gt,addNote:yt,addAccelerator:ut,addDeaccelerator:wt,setAnnotationsBox:mt,setSize:kt,startPipeline:bt,addPipelineComponent:$t,updateAxes:vt,getNode:Pt,resolveNodeId:Ct,getWardleyData:St,clear:Mt,setAccTitle:L,getAccTitle:R,setDiagramTitle:D,getDiagramTitle:O,getAccDescription:M,setAccDescription:I},Rt=["Genesis","Custom Built","Product","Commodity"],Ot=e(()=>{let{themeVariables:a}=u();return{backgroundColor:a.wardley?.backgroundColor??a.background??"#fff",axisColor:a.wardley?.axisColor??"#000",axisTextColor:a.wardley?.axisTextColor??a.primaryTextColor??"#222",gridColor:a.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:a.wardley?.componentFill??"#fff",componentStroke:a.wardley?.componentStroke??"#000",componentLabelColor:a.wardley?.componentLabelColor??a.primaryTextColor??"#222",linkStroke:a.wardley?.linkStroke??"#000",evolutionStroke:a.wardley?.evolutionStroke??"#dc3545",annotationStroke:a.wardley?.annotationStroke??"#000",annotationTextColor:a.wardley?.annotationTextColor??a.primaryTextColor??"#222",annotationFill:a.wardley?.annotationFill??a.background??"#fff"}},"getTheme"),Dt=e(()=>{let a=u()["wardley-beta"];return{width:a?.width??900,height:a?.height??600,padding:a?.padding??48,nodeRadius:a?.nodeRadius??6,nodeLabelOffset:a?.nodeLabelOffset??8,axisFontSize:a?.axisFontSize??12,labelFontSize:a?.labelFontSize??10,showGrid:a?.showGrid??!1,useMaxWidth:a?.useMaxWidth??!0}},"getConfigValues"),Gt=e((a,i,o,g)=>{n.debug(`Rendering Wardley map
2
2
  `+a);let r=Dt(),c=Ot(),b=r.nodeRadius*1.6,T=g.db,w=T.getWardleyData(),J=T.getDiagramTitle(),W=w.size?.width??r.width,C=w.size?.height??r.height,V=Y(i);V.selectAll("*").remove(),j(V,C,W,r.useMaxWidth),V.attr("viewBox",`0 0 ${W} ${C}`);let N=V.append("g").attr("class","wardley-map"),rt=V.append("defs");rt.append("marker").attr("id",`arrow-${i}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",c.evolutionStroke).attr("stroke","none"),rt.append("marker").attr("id",`link-arrow-end-${i}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",c.linkStroke).attr("stroke","none"),rt.append("marker").attr("id",`link-arrow-start-${i}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",c.linkStroke).attr("stroke","none"),N.append("rect").attr("class","wardley-background").attr("width",W).attr("height",C).attr("fill",c.backgroundColor);let _=W-r.padding*2,Z=C-r.padding*2;if(J)N.append("text").attr("class","wardley-title").attr("x",W/2).attr("y",r.padding/2).attr("fill",c.axisTextColor).attr("font-size",r.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(J);let H=e((t)=>r.padding+t/100*_,"projectX"),B=e((t)=>C-r.padding-t/100*Z,"projectY"),Q=N.append("g").attr("class","wardley-axes");Q.append("line").attr("x1",r.padding).attr("x2",W-r.padding).attr("y1",C-r.padding).attr("y2",C-r.padding).attr("stroke",c.axisColor).attr("stroke-width",1),Q.append("line").attr("x1",r.padding).attr("x2",r.padding).attr("y1",r.padding).attr("y2",C-r.padding).attr("stroke",c.axisColor).attr("stroke-width",1);let Nt=w.axes.xLabel??"Evolution",zt=w.axes.yLabel??"Visibility";Q.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",r.padding+_/2).attr("y",C-r.padding/4).attr("fill",c.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(Nt),Q.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",r.padding/3).attr("y",r.padding+Z/2).attr("fill",c.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${r.padding/3} ${r.padding+Z/2})`).text(zt);let U=w.axes.stages&&w.axes.stages.length>0?w.axes.stages:Rt;if(U.length>0){let t=N.append("g").attr("class","wardley-stages"),d=w.axes.stageBoundaries,s=[];if(d&&d.length===U.length){let l=0;d.forEach((h)=>{s.push({start:l,end:h}),l=h})}else{let l=1/U.length;U.forEach((h,f)=>{s.push({start:f*l,end:(f+1)*l})})}U.forEach((l,h)=>{let f=s[h],y=r.padding+f.start*_,x=r.padding+f.end*_,m=(y+x)/2;if(h>0)t.append("line").attr("x1",y).attr("x2",y).attr("y1",r.padding).attr("y2",C-r.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",0.8);t.append("text").attr("class","wardley-stage-label").attr("x",m).attr("y",C-r.padding/1.5).attr("fill",c.axisTextColor).attr("font-size",r.axisFontSize-2).attr("text-anchor","middle").text(l)})}if(r.showGrid){let t=N.append("g").attr("class","wardley-grid");for(let d=1;d<4;d++){let s=d/4,l=r.padding+_*s;t.append("line").attr("x1",l).attr("x2",l).attr("y1",r.padding).attr("y2",C-r.padding).attr("stroke",c.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",r.padding).attr("x2",W-r.padding).attr("y1",C-r.padding-Z*s).attr("y2",C-r.padding-Z*s).attr("stroke",c.gridColor).attr("stroke-dasharray","2 6")}}let p=new Map;if(w.nodes.forEach((t)=>{p.set(t.id,{x:H(t.x),y:B(t.y),node:t})}),w.pipelines.length>0){let t=N.append("g").attr("class","wardley-pipelines"),d=N.append("g").attr("class","wardley-pipeline-links");w.pipelines.forEach((s)=>{if(s.componentIds.length===0)return;let l=s.componentIds.map((x)=>({id:x,pos:p.get(x),node:w.nodes.find((m)=>m.id===x)})).filter((x)=>x.pos&&x.node).sort((x,m)=>x.node.x-m.node.x);for(let x=0;x<l.length-1;x++){let m=l[x],v=l[x+1];d.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",m.pos.x).attr("y1",m.pos.y).attr("x2",v.pos.x).attr("y2",v.pos.y).attr("stroke",c.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let h=1/0,f=-1/0,y=0;if(s.componentIds.forEach((x)=>{let m=p.get(x);if(m)h=Math.min(h,m.x),f=Math.max(f,m.x),y=m.y}),h!==1/0&&f!==-1/0){let m=r.nodeRadius*4,v=y-m/2,z=p.get(s.nodeId);if(z){let E=(h+f)/2;z.x=E,z.y=v-b/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",h-15).attr("y",v).attr("width",f-h+30).attr("height",m).attr("fill","none").attr("stroke",c.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}let st=N.append("g").attr("class","wardley-links"),it=new Map;w.pipelines.forEach((t)=>{it.set(t.nodeId,new Set(t.componentIds))});let dt=w.links.filter((t)=>{if(!p.has(t.source)||!p.has(t.target))return!1;if(it.get(t.target)?.has(t.source))return!1;return!0});st.selectAll("line").data(dt).enter().append("line").attr("class",(t)=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",(t)=>{let d=p.get(t.source),s=p.get(t.target),h=w.nodes.find((m)=>m.id===t.source).isPipelineParent?b/Math.sqrt(2):r.nodeRadius,f=s.x-d.x,y=s.y-d.y,x=Math.sqrt(f*f+y*y);return d.x+f/x*h}).attr("y1",(t)=>{let d=p.get(t.source),s=p.get(t.target),h=w.nodes.find((m)=>m.id===t.source).isPipelineParent?b/Math.sqrt(2):r.nodeRadius,f=s.x-d.x,y=s.y-d.y,x=Math.sqrt(f*f+y*y);return d.y+y/x*h}).attr("x2",(t)=>{let d=p.get(t.source),s=p.get(t.target),h=w.nodes.find((m)=>m.id===t.target).isPipelineParent?b/Math.sqrt(2):r.nodeRadius,f=d.x-s.x,y=d.y-s.y,x=Math.sqrt(f*f+y*y);return s.x+f/x*h}).attr("y2",(t)=>{let d=p.get(t.source),s=p.get(t.target),h=w.nodes.find((m)=>m.id===t.target).isPipelineParent?b/Math.sqrt(2):r.nodeRadius,f=d.x-s.x,y=d.y-s.y,x=Math.sqrt(f*f+y*y);return s.y+y/x*h}).attr("stroke",c.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",(t)=>t.dashed?"6 6":null).attr("marker-end",(t)=>{if(t.flow==="forward"||t.flow==="bidirectional")return`url(#link-arrow-end-${i})`;return null}).attr("marker-start",(t)=>{if(t.flow==="backward"||t.flow==="bidirectional")return`url(#link-arrow-start-${i})`;return null}),st.selectAll("text").data(dt.filter((t)=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",(t)=>{let d=p.get(t.source),s=p.get(t.target),l=(d.x+s.x)/2,h=s.y-d.y,f=s.x-d.x,y=Math.sqrt(f*f+h*h),x=8,m=h/y;return l+m*8}).attr("y",(t)=>{let d=p.get(t.source),s=p.get(t.target),l=(d.y+s.y)/2,h=s.x-d.x,f=s.y-d.y,y=Math.sqrt(h*h+f*f),x=8,m=-h/y;return l+m*8}).attr("fill",c.axisTextColor).attr("font-size",r.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",(t)=>{let d=p.get(t.source),s=p.get(t.target),l=(d.x+s.x)/2,h=(d.y+s.y)/2,f=s.x-d.x,y=s.y-d.y,x=Math.sqrt(f*f+y*y),m=8,v=y/x,z=-f/x,E=l+v*8,tt=h+z*8,q=Math.atan2(y,f)*180/Math.PI;if(q>90||q<-90)q+=180;return`rotate(${q} ${E} ${tt})`}).text((t)=>t.label);let Lt=N.append("g").attr("class","wardley-trends"),Tt=w.trends.map((t)=>{let d=p.get(t.nodeId);if(!d)return null;let s=H(t.targetX),l=B(t.targetY),h=s-d.x,f=l-d.y,y=Math.sqrt(h*h+f*f),x=r.nodeRadius+2,m=y>x?s-h/y*x:s,v=y>x?l-f/y*x:l;return{origin:d,targetX:s,targetY:l,adjustedX2:m,adjustedY2:v}}).filter((t)=>t!==null);Lt.selectAll("line").data(Tt).enter().append("line").attr("class","wardley-trend").attr("x1",(t)=>t.origin.x).attr("y1",(t)=>t.origin.y).attr("x2",(t)=>t.adjustedX2).attr("y2",(t)=>t.adjustedY2).attr("stroke",c.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${i})`);let X=N.append("g").attr("class","wardley-nodes").selectAll("g").data(w.nodes).enter().append("g").attr("class",(t)=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));X.filter((t)=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",(t)=>p.get(t.id).x).attr("cy",(t)=>p.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#666").attr("stroke",c.componentStroke).attr("stroke-width",1),X.filter((t)=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",(t)=>p.get(t.id).x).attr("cy",(t)=>p.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#ccc").attr("stroke",c.componentStroke).attr("stroke-width",1),X.filter((t)=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",(t)=>p.get(t.id).x).attr("cy",(t)=>p.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);let F=X.filter((t)=>t.sourceStrategy==="market");F.append("circle").attr("class","wardley-market-overlay").attr("cx",(t)=>p.get(t.id).x).attr("cy",(t)=>p.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",1),X.filter((t)=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",(t)=>p.get(t.id).x).attr("cy",(t)=>p.get(t.id).y).attr("r",r.nodeRadius).attr("fill",c.componentFill).attr("stroke",c.componentStroke).attr("stroke-width",1);let ot=r.nodeRadius*0.7,S=r.nodeRadius*1.2;if(F.append("line").attr("class","wardley-market-line").attr("x1",(t)=>p.get(t.id).x).attr("y1",(t)=>p.get(t.id).y-S).attr("x2",(t)=>p.get(t.id).x-S*Math.cos(Math.PI/6)).attr("y2",(t)=>p.get(t.id).y+S*Math.sin(Math.PI/6)).attr("stroke",c.componentStroke).attr("stroke-width",1),F.append("line").attr("class","wardley-market-line").attr("x1",(t)=>p.get(t.id).x-S*Math.cos(Math.PI/6)).attr("y1",(t)=>p.get(t.id).y+S*Math.sin(Math.PI/6)).attr("x2",(t)=>p.get(t.id).x+S*Math.cos(Math.PI/6)).attr("y2",(t)=>p.get(t.id).y+S*Math.sin(Math.PI/6)).attr("stroke",c.componentStroke).attr("stroke-width",1),F.append("line").attr("class","wardley-market-line").attr("x1",(t)=>p.get(t.id).x+S*Math.cos(Math.PI/6)).attr("y1",(t)=>p.get(t.id).y+S*Math.sin(Math.PI/6)).attr("x2",(t)=>p.get(t.id).x).attr("y2",(t)=>p.get(t.id).y-S).attr("stroke",c.componentStroke).attr("stroke-width",1),F.append("circle").attr("class","wardley-market-dot").attr("cx",(t)=>p.get(t.id).x).attr("cy",(t)=>p.get(t.id).y-S).attr("r",ot).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",2),F.append("circle").attr("class","wardley-market-dot").attr("cx",(t)=>p.get(t.id).x-S*Math.cos(Math.PI/6)).attr("cy",(t)=>p.get(t.id).y+S*Math.sin(Math.PI/6)).attr("r",ot).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",2),F.append("circle").attr("class","wardley-market-dot").attr("cx",(t)=>p.get(t.id).x+S*Math.cos(Math.PI/6)).attr("cy",(t)=>p.get(t.id).y+S*Math.sin(Math.PI/6)).attr("r",ot).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",2),X.filter((t)=>t.isPipelineParent===!0).append("rect").attr("x",(t)=>p.get(t.id).x-b/2).attr("y",(t)=>p.get(t.id).y-b/2).attr("width",b).attr("height",b).attr("fill",c.componentFill).attr("stroke",c.componentStroke).attr("stroke-width",1),X.filter((t)=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",(t)=>{let d=p.get(t.id),s=t.isPipelineParent?b/2+15:r.nodeRadius+15;if(t.sourceStrategy)s+=r.nodeRadius+10;return d.x+s}).attr("y1",(t)=>{let d=p.get(t.id),s=t.isPipelineParent?b:r.nodeRadius*2;return d.y-s/2}).attr("x2",(t)=>{let d=p.get(t.id),s=t.isPipelineParent?b/2+15:r.nodeRadius+15;if(t.sourceStrategy)s+=r.nodeRadius+10;return d.x+s}).attr("y2",(t)=>{let d=p.get(t.id),s=t.isPipelineParent?b:r.nodeRadius*2;return d.y+s/2}).attr("stroke",c.componentStroke).attr("stroke-width",6),X.append("text").attr("x",(t)=>{let d=p.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?d.x+t.labelOffsetX:d.x;let s=r.nodeLabelOffset;if(t.sourceStrategy&&t.labelOffsetX===void 0)s+=10;let l=t.labelOffsetX??s;return d.x+l}).attr("y",(t)=>{let d=p.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?d.y+t.labelOffsetY:d.y-3;let s=-r.nodeLabelOffset;if(t.sourceStrategy&&t.labelOffsetY===void 0)s-=10;let l=t.labelOffsetY??s;return d.y+l}).attr("class","wardley-node-label").attr("fill",(t)=>{if(t.className==="evolved")return c.evolutionStroke;if(t.className==="anchor")return"#000";return c.componentLabelColor}).attr("font-size",r.labelFontSize).attr("font-weight",(t)=>t.className==="anchor"?"bold":"normal").attr("text-anchor",(t)=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",(t)=>t.className==="anchor"?"middle":"auto").text((t)=>t.label),w.annotations.length>0){let t=N.append("g").attr("class","wardley-annotations");if(w.annotations.forEach((d)=>{let s=d.coordinates.map((l)=>({x:H(l.x),y:B(l.y)}));if(s.length>1)for(let l=0;l<s.length-1;l++)t.append("line").attr("class","wardley-annotation-line").attr("x1",s[l].x).attr("y1",s[l].y).attr("x2",s[l+1].x).attr("y2",s[l+1].y).attr("stroke",c.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");s.forEach((l)=>{let h=t.append("g").attr("class","wardley-annotation");h.append("circle").attr("cx",l.x).attr("cy",l.y).attr("r",10).attr("fill","white").attr("stroke",c.axisColor).attr("stroke-width",1.5),h.append("text").attr("x",l.x).attr("y",l.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",c.axisTextColor).attr("font-weight","bold").text(d.number)})}),w.annotationsBox){let d=H(w.annotationsBox.x),s=B(w.annotationsBox.y),l=10,h=16,f=11,y=t.append("g").attr("class","wardley-annotations-box"),x=[...w.annotations].filter((v)=>v.text).sort((v,z)=>v.number-z.number),m=[];if(x.forEach((v,z)=>{let E=y.append("text").attr("x",d+l).attr("y",s+l+(z+1)*h).attr("font-size",f).attr("fill",c.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${v.number}. ${v.text}`);m.push(E)}),m.length>0){let v=0,z=0;m.forEach((nt)=>{let et=nt.node(),Et=et.getComputedTextLength();v=Math.max(v,Et);let Ht=et.getBBox();z=Math.max(z,Ht.height)});let E=v+l*2+105,tt=x.length*h+l*2+z/2,q=r.padding,Wt=W-r.padding-E,At=r.padding,Xt=C-r.padding-tt;d=Math.max(q,Math.min(d,Wt)),s=Math.max(At,Math.min(s,Xt)),m.forEach((nt,et)=>{nt.attr("x",d+l).attr("y",s+l+(et+1)*h)}),y.insert("rect","text").attr("x",d).attr("y",s).attr("width",E).attr("height",tt).attr("fill","white").attr("stroke",c.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(w.notes.length>0){let t=N.append("g").attr("class","wardley-notes");w.notes.forEach((d)=>{let s=H(d.x),l=B(d.y);t.append("text").attr("x",s).attr("y",l).attr("text-anchor","start").attr("font-size",11).attr("fill",c.axisTextColor).attr("font-weight","bold").text(d.text)})}if(w.accelerators.length>0){let t=N.append("g").attr("class","wardley-accelerators");w.accelerators.forEach((d)=>{let s=H(d.x),l=B(d.y),h=60,f=30,y=20,x=`
3
3
  M ${s} ${l-15}
4
4
  L ${s+60-20} ${l-15}