@dooc-dev/dooc 0.0.6 → 0.0.7

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 (97) hide show
  1. package/dist/cli.js +35 -1
  2. package/dist/flow.global.js +1031 -1057
  3. package/dist/graph/{abnfDiagram-S7VZAUFO-ASBULSKE.js → abnfDiagram-S7VZAUFO-GAGCW2J5.js} +1 -1
  4. package/dist/graph/{architecture-WOLXFQ4H-V57EDXXY.js → architecture-WOLXFQ4H-AWAC3VBS.js} +1 -1
  5. package/dist/graph/{architectureDiagram-YGSQEFNW-GIMP347N.js → architectureDiagram-YGSQEFNW-WQ7QKSUJ.js} +1 -1
  6. package/dist/graph/{blockDiagram-APKKGZFW-RDL2T4JW.js → blockDiagram-APKKGZFW-H7ZNJMOM.js} +1 -1
  7. package/dist/graph/{bpmnIcons-APHXDYXF-TWOSQNUQ.js → bpmnIcons-APHXDYXF-EAVPNTFE.js} +1 -1
  8. package/dist/graph/{c4Diagram-KJ2TOQU5-75LIUC4F.js → c4Diagram-KJ2TOQU5-3IYS34YL.js} +1 -1
  9. package/dist/graph/{chunk-KU6GTEMS.js → chunk-3CJU2RDX.js} +1 -1
  10. package/dist/graph/{chunk-ISO77HML.js → chunk-5N2X2DXU.js} +1 -1
  11. package/dist/graph/{chunk-YCRLJT2S.js → chunk-67BPVAXC.js} +1 -1
  12. package/dist/graph/{chunk-26TUJSYJ.js → chunk-6CDZONCA.js} +1 -1
  13. package/dist/graph/{chunk-I3DMZIHV.js → chunk-7ASYMKN2.js} +1 -1
  14. package/dist/graph/{chunk-K2KLZU7M.js → chunk-7JQUFVT4.js} +2 -2
  15. package/dist/graph/{chunk-BBD5CEDC.js → chunk-7LSMJ4VU.js} +1 -1
  16. package/dist/graph/{chunk-EG5UVNOC.js → chunk-7UKJADAE.js} +1 -1
  17. package/dist/graph/{chunk-BZAMCJ6B.js → chunk-AARGNXTW.js} +1 -1
  18. package/dist/graph/{chunk-HOPPTA6H.js → chunk-BOXAA5AP.js} +2 -2
  19. package/dist/graph/{chunk-N3OHKGRZ.js → chunk-BTMPKSGF.js} +1 -1
  20. package/dist/graph/{chunk-QCJUF4YA.js → chunk-DIDARDST.js} +1 -1
  21. package/dist/graph/{chunk-R63JUMUK.js → chunk-EWYECPNJ.js} +1 -1
  22. package/dist/graph/{chunk-3YJHMOOA.js → chunk-FD7ZFC7R.js} +1 -1
  23. package/dist/graph/chunk-GWYODWCE.js +1 -0
  24. package/dist/graph/{chunk-IC23EEF6.js → chunk-HKRJKXEE.js} +1 -1
  25. package/dist/graph/{chunk-PW2RGZ3O.js → chunk-I5LEUF24.js} +1 -1
  26. package/dist/graph/{chunk-OFZLK5G4.js → chunk-ICJPOOXG.js} +1 -1
  27. package/dist/graph/{chunk-KT4VPQD5.js → chunk-IVZHB6RS.js} +2 -2
  28. package/dist/graph/{chunk-VM2H7G2R.js → chunk-JZGXHT3J.js} +1 -1
  29. package/dist/graph/{chunk-HJG2HUYJ.js → chunk-LSRL537V.js} +1 -1
  30. package/dist/graph/{chunk-C6J4A356.js → chunk-N44XPVUD.js} +1 -1
  31. package/dist/graph/{chunk-JD7ZBJD2.js → chunk-NDAMZVXQ.js} +1 -1
  32. package/dist/graph/{chunk-QEEA3KYY.js → chunk-QLS7NIYR.js} +1 -1
  33. package/dist/graph/{chunk-JRSH5GNS.js → chunk-QQIGL7OP.js} +1 -1
  34. package/dist/graph/chunk-SQE76S5B.js +1 -0
  35. package/dist/graph/{chunk-ZMCB7VP2.js → chunk-WQHTQAFY.js} +1 -1
  36. package/dist/graph/{classDiagram-v2-L25IHNXF-JL7LVDZH.js → classDiagram-v2-L25IHNXF-HNTCDTNK.js} +1 -1
  37. package/dist/graph/{cose-bilkent-JH36ORCC-PNM3EYPB.js → cose-bilkent-JH36ORCC-2GVA7XKO.js} +1 -1
  38. package/dist/graph/{cynefin-EF2NZ3EQ-PSXP3DXL.js → cynefin-EF2NZ3EQ-TCI65RAQ.js} +1 -1
  39. package/dist/graph/{cynefinDiagram-L36ESFBY-QVY54CXO.js → cynefinDiagram-L36ESFBY-OKQ5BLVF.js} +1 -1
  40. package/dist/graph/{dagre-SPEB5RXH-HPGQXBZJ.js → dagre-SPEB5RXH-KZEBD52K.js} +1 -1
  41. package/dist/graph/{diagram-3B7GL73J-DWH5WS2P.js → diagram-3B7GL73J-ESCBJM3O.js} +1 -1
  42. package/dist/graph/{diagram-DNEMPZML-TEGH2U5I.js → diagram-DNEMPZML-ZIBUSQZI.js} +1 -1
  43. package/dist/graph/{diagram-L3MUGCDN-X4MREUWR.js → diagram-L3MUGCDN-IGK62IPN.js} +1 -1
  44. package/dist/graph/{diagram-LA4NIPWU-NXT746HG.js → diagram-LA4NIPWU-2KZCOFJ5.js} +1 -1
  45. package/dist/graph/{diagram-MHCOC4E2-JGHXSAGS.js → diagram-MHCOC4E2-EYAAB236.js} +1 -1
  46. package/dist/graph/{diagram-XPFHEONP-ZHZPBLT4.js → diagram-XPFHEONP-OZ5ARGMG.js} +1 -1
  47. package/dist/graph/{ebnfDiagram-UZSYDL2S-SMF6KJ43.js → ebnfDiagram-UZSYDL2S-M3XJHARD.js} +1 -1
  48. package/dist/graph/{erDiagram-EYBAPDEH-B3JNJ357.js → erDiagram-EYBAPDEH-Y7KUBH7A.js} +1 -1
  49. package/dist/graph/{eventmodeling-K75KTNOO-WG6DDYMC.js → eventmodeling-K75KTNOO-ROLYRDEP.js} +1 -1
  50. package/dist/graph/flowDiagram-MALGAFMO-AAUEIPCR.js +1 -0
  51. package/dist/graph/{ganttDiagram-23REXITY-YXBYWFOJ.js → ganttDiagram-23REXITY-JSBTFSSJ.js} +1 -1
  52. package/dist/graph/{gitGraph-VSP46ZUC-VBFWJBBT.js → gitGraph-VSP46ZUC-ZCBCDVNF.js} +1 -1
  53. package/dist/graph/{gitGraphDiagram-STJD7YCW-4FZDCFGV.js → gitGraphDiagram-STJD7YCW-3ZA5FT3G.js} +1 -1
  54. package/dist/graph/{info-OHQRW6UA-ALVDUVYV.js → info-OHQRW6UA-JKJGOQNY.js} +1 -1
  55. package/dist/graph/infoDiagram-KBXO4MBG-6LFMPP2O.js +2 -0
  56. package/dist/graph/{ishikawaDiagram-M35NCXHK-FRZD2PWQ.js → ishikawaDiagram-M35NCXHK-YLEU44DY.js} +1 -1
  57. package/dist/graph/{journeyDiagram-OPLOXDXO-7Z66JCPR.js → journeyDiagram-OPLOXDXO-ZHJV66ZT.js} +1 -1
  58. package/dist/graph/{kanban-definition-BZKZHSQY-NN5AIKTE.js → kanban-definition-BZKZHSQY-SDU25WUM.js} +1 -1
  59. package/dist/graph/{katex-DXDNVO6V.js → katex-WSLZOTY7.js} +1 -1
  60. package/dist/graph/{mindmap-definition-I2QAS2VK-HDPCABN2.js → mindmap-definition-I2QAS2VK-XQNBCYHN.js} +1 -1
  61. package/dist/graph/{packet-JDAUHWVQ-5MQIBWAH.js → packet-JDAUHWVQ-Y3H77ERD.js} +1 -1
  62. package/dist/graph/{pegDiagram-FD4XPPHP-H2BFNCKT.js → pegDiagram-FD4XPPHP-YO4VWH6V.js} +1 -1
  63. package/dist/graph/{pie-XZMESJXO-T5VRKHVT.js → pie-XZMESJXO-PRER4XL5.js} +1 -1
  64. package/dist/graph/{pieDiagram-J4AKIIQI-O3NJSVD3.js → pieDiagram-J4AKIIQI-TJ5WOOSV.js} +1 -1
  65. package/dist/graph/{quadrantDiagram-XTYBLID2-TMTZJI3P.js → quadrantDiagram-XTYBLID2-G6MSSZLW.js} +1 -1
  66. package/dist/graph/{radar-ABXABTNO-C6FXIBYW.js → radar-ABXABTNO-M6MV34GM.js} +1 -1
  67. package/dist/graph/{railroad-I3PHUGI6-ZSO5JXB3.js → railroad-I3PHUGI6-YIWPGN6Q.js} +1 -1
  68. package/dist/graph/{railroad-abnf-LNEFI6M7-CI4GQRHB.js → railroad-abnf-LNEFI6M7-7JHLZ2R7.js} +1 -1
  69. package/dist/graph/{railroad-ebnf-DWYD2UWJ-MUENNCGK.js → railroad-ebnf-DWYD2UWJ-V55BXEWY.js} +1 -1
  70. package/dist/graph/{railroad-peg-JR7BVNR7-N3X5GGIX.js → railroad-peg-JR7BVNR7-XCGKDRMK.js} +1 -1
  71. package/dist/graph/{railroadDiagram-MRQ6NCDL-JHWS23UO.js → railroadDiagram-MRQ6NCDL-RACSFXC4.js} +1 -1
  72. package/dist/graph/{requirementDiagram-Y7LWUY3S-7DVLPO4B.js → requirementDiagram-Y7LWUY3S-4LQIQWHQ.js} +1 -1
  73. package/dist/graph/{sankeyDiagram-WGJFYUXA-Z5L4R5TR.js → sankeyDiagram-WGJFYUXA-K3RXG5FB.js} +1 -1
  74. package/dist/graph/schema-graph-global.js +4 -4
  75. package/dist/graph/{sequenceDiagram-5NDRBG5M-RCTU25NT.js → sequenceDiagram-5NDRBG5M-Y6RBHRS3.js} +1 -1
  76. package/dist/graph/{sizeCapture-INFHLROL-RROY32P5.js → sizeCapture-INFHLROL-TJW3VUGH.js} +1 -1
  77. package/dist/graph/{stateDiagram-v2-FJ4FJNEA-BXUSPWDK.js → stateDiagram-v2-FJ4FJNEA-4M5WZORG.js} +1 -1
  78. package/dist/graph/swimlanes-UMQ2AFYF-O4W6U4RO.js +1 -0
  79. package/dist/graph/swimlanesDiagram-OMPLPG4O-HZAKM45N.js +8 -0
  80. package/dist/graph/{timeline-definition-SEUHKTQE-ZQSMIVAS.js → timeline-definition-SEUHKTQE-IHISQ4Q7.js} +1 -1
  81. package/dist/graph/{treeView-D4JQ5SDB-42S7U73N.js → treeView-D4JQ5SDB-EVGY4VYS.js} +1 -1
  82. package/dist/graph/{treemap-SAJKECNS-RUBYQ7XF.js → treemap-SAJKECNS-LN3SMFRX.js} +1 -1
  83. package/dist/graph/{usecaseDiagram-AFA6YXN4-57RDRYXF.js → usecaseDiagram-AFA6YXN4-B645A3J6.js} +1 -1
  84. package/dist/graph/{vennDiagram-NNMJR3RB-5C3LVAV6.js → vennDiagram-NNMJR3RB-K3HWMON6.js} +1 -1
  85. package/dist/graph/{wardley-7MLQ67FV-NV5HXTTC.js → wardley-7MLQ67FV-RRWOELC6.js} +1 -1
  86. package/dist/graph/{wardleyDiagram-S7YFUSEH-6D5BKXHM.js → wardleyDiagram-S7YFUSEH-DMMWKJEK.js} +1 -1
  87. package/dist/graph/{xychartDiagram-GGNKY7IX-6ET3ZM67.js → xychartDiagram-GGNKY7IX-K6MUQVXR.js} +1 -1
  88. package/package.json +10 -2
  89. package/dist/graph/chunk-3RNHDNP5.js +0 -1
  90. package/dist/graph/chunk-5UUEAHTN.js +0 -1
  91. package/dist/graph/chunk-6T55RVVR.js +0 -1
  92. package/dist/graph/elk-XV6XMXQE-AZ4HLCWI.js +0 -27
  93. package/dist/graph/flowDiagram-MALGAFMO-2R7EYAQI.js +0 -1
  94. package/dist/graph/infoDiagram-KBXO4MBG-7EHX2GQG.js +0 -2
  95. package/dist/graph/swimlanes-UMQ2AFYF-LDD74Q2S.js +0 -1
  96. package/dist/graph/swimlanesDiagram-OMPLPG4O-ZYULLJSU.js +0 -8
  97. /package/dist/graph/{chunk-GYT4IYBZ.js → chunk-RJFVWYCA.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as cr}from"./chunk-N3OHKGRZ.js";import{a as nr,b as or,d as qt,e as zt,f as Tt,g as Ut}from"./chunk-I3DMZIHV.js";import{a as Ge,b as Xe}from"./chunk-BZAMCJ6B.js";import{c as ir,o as he,q as Z}from"./chunk-QEEA3KYY.js";import{a as wr}from"./chunk-OFZLK5G4.js";import{$ as tt,C as Dt,I as vt,J as Qe,L as j,M as At,N as ce,O as N,P as Ze,U as $e,V as le,W as je,X as tr,Y as er,Z as rr,_ as ar,aa as sr,o as Je}from"./chunk-KT4VPQD5.js";import{b as rt,d as Ct}from"./chunk-JRSH5GNS.js";import{a as f}from"./chunk-GYT4IYBZ.js";import{c as Nr}from"./chunk-3RNHDNP5.js";var ue=Nr(wr(),1),Te=(function(){var e=f(function(_t,k,C,D){for(C=C||{},D=_t.length;D--;C[_t[D]]=k);return C},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],c=[1,9],s=[1,11],n=[1,12],p=[1,14],d=[1,15],E=[1,17],u=[1,18],_=[1,19],O=[1,25],g=[1,26],y=[1,27],h=[1,28],R=[1,29],x=[1,30],m=[1,31],S=[1,32],L=[1,33],w=[1,34],P=[1,35],B=[1,36],V=[1,37],K=[1,38],U=[1,39],X=[1,40],at=[1,42],st=[1,43],G=[1,44],ot=[1,45],it=[1,46],W=[1,47],M=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Q=[1,56],Yt=[1,75],A=[1,81],v=[1,82],dt=[1,83],nt=[1,84],H=[1,85],mt=[1,86],_e=[1,87],ge=[1,88],xe=[1,89],be=[1,90],Ie=[1,91],ye=[1,92],Re=[1,93],Oe=[1,94],Le=[1,95],me=[1,96],Se=[1,97],Ae=[1,98],ke=[1,99],Ne=[1,100],we=[1,101],Pe=[1,102],De=[1,103],ve=[1,104],Ce=[1,105],Me=[1,106],Be=[2,79],Ye=[2,78],wt=[4,5,17,51,53,54],Vt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Ve=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],te=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],We=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],ee=[5,52],F=[62,70,71,72,73],Ke=[62,73],lt=[1,152],re={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:f(function(k,C,D,b,q,o,Pt){var T=o.length-1;switch(q){case 3:return b.apply(o[T]),o[T];break;case 4:case 10:this.$=[];break;case 5:case 11:o[T-1].push(o[T]),this.$=o[T-1];break;case 6:case 7:case 12:case 13:this.$=o[T];break;case 8:case 9:case 14:this.$=[];break;case 16:o[T].type="createParticipant",this.$=o[T];break;case 17:o[T-1].unshift({type:"boxStart",boxData:b.parseBoxData(o[T-2])}),o[T-1].push({type:"boxEnd",boxText:o[T-2]}),this.$=o[T-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(o[T-2]),sequenceIndexStep:Number(o[T-1]),sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(o[T-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:b.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:o[T-1].actor};break;case 24:this.$={type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:o[T-1].actor};break;case 30:b.setDiagramTitle(o[T].substring(6)),this.$=o[T].substring(6);break;case 31:b.setDiagramTitle(o[T].substring(7)),this.$=o[T].substring(7);break;case 32:this.$=o[T].trim(),b.setAccTitle(this.$);break;case 33:case 34:this.$=o[T].trim(),b.setAccDescription(this.$);break;case 35:o[T-1].unshift({type:"loopStart",loopText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.LOOP_START}),o[T-1].push({type:"loopEnd",loopText:o[T-2],signalType:b.LINETYPE.LOOP_END}),this.$=o[T-1];break;case 36:o[T-1].unshift({type:"rectStart",color:b.parseMessage(o[T-2]),signalType:b.LINETYPE.RECT_START}),o[T-1].push({type:"rectEnd",color:b.parseMessage(o[T-2]),signalType:b.LINETYPE.RECT_END}),this.$=o[T-1];break;case 37:o[T-1].unshift({type:"optStart",optText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.OPT_START}),o[T-1].push({type:"optEnd",optText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.OPT_END}),this.$=o[T-1];break;case 38:o[T-1].unshift({type:"altStart",altText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.ALT_START}),o[T-1].push({type:"altEnd",signalType:b.LINETYPE.ALT_END}),this.$=o[T-1];break;case 39:o[T-1].unshift({type:"parStart",parText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.PAR_START}),o[T-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=o[T-1];break;case 40:o[T-1].unshift({type:"parStart",parText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.PAR_OVER_START}),o[T-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=o[T-1];break;case 41:o[T-1].unshift({type:"criticalStart",criticalText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.CRITICAL_START}),o[T-1].push({type:"criticalEnd",signalType:b.LINETYPE.CRITICAL_END}),this.$=o[T-1];break;case 42:o[T-1].unshift({type:"breakStart",breakText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.BREAK_START}),o[T-1].push({type:"breakEnd",optText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.BREAK_END}),this.$=o[T-1];break;case 44:this.$=o[T-3].concat([{type:"option",optionText:b.parseMessage(o[T-1]),signalType:b.LINETYPE.CRITICAL_OPTION},o[T]]);break;case 46:this.$=o[T-3].concat([{type:"and",parText:b.parseMessage(o[T-1]),signalType:b.LINETYPE.PAR_AND},o[T]]);break;case 48:this.$=o[T-3].concat([{type:"else",altText:b.parseMessage(o[T-1]),signalType:b.LINETYPE.ALT_ELSE},o[T]]);break;case 49:o[T-3].draw="participant",o[T-3].type="addParticipant",o[T-3].description=b.parseMessage(o[T-1]),this.$=o[T-3];break;case 50:o[T-1].draw="participant",o[T-1].type="addParticipant",this.$=o[T-1];break;case 51:o[T-3].draw="actor",o[T-3].type="addParticipant",o[T-3].description=b.parseMessage(o[T-1]),this.$=o[T-3];break;case 52:case 57:o[T-1].draw="actor",o[T-1].type="addParticipant",this.$=o[T-1];break;case 53:o[T-1].type="destroyParticipant",this.$=o[T-1];break;case 54:o[T-3].draw="participant",o[T-3].type="addParticipant",o[T-3].description=b.parseMessage(o[T-1]),this.$=o[T-3];break;case 55:o[T-1].draw="participant",o[T-1].type="addParticipant",this.$=o[T-1];break;case 56:o[T-3].draw="actor",o[T-3].type="addParticipant",o[T-3].description=b.parseMessage(o[T-1]),this.$=o[T-3];break;case 58:this.$=[o[T-1],{type:"addNote",placement:o[T-2],actor:o[T-1].actor,text:o[T]}];break;case 59:o[T-2]=[].concat(o[T-1],o[T-1]).slice(0,2),o[T-2][0]=o[T-2][0].actor,o[T-2][1]=o[T-2][1].actor,this.$=[o[T-1],{type:"addNote",placement:b.PLACEMENT.OVER,actor:o[T-2].slice(0,2),text:o[T]}];break;case 60:this.$=[o[T-1],{type:"addLinks",actor:o[T-1].actor,text:o[T]}];break;case 61:this.$=[o[T-1],{type:"addALink",actor:o[T-1].actor,text:o[T]}];break;case 62:this.$=[o[T-1],{type:"addProperties",actor:o[T-1].actor,text:o[T]}];break;case 63:this.$=[o[T-1],{type:"addDetails",actor:o[T-1].actor,text:o[T]}];break;case 66:this.$=[o[T-2],o[T]];break;case 67:this.$=o[T];break;case 68:this.$=b.PLACEMENT.LEFTOF;break;case 69:this.$=b.PLACEMENT.RIGHTOF;break;case 70:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T],activate:!0},{type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:o[T-1].actor}];break;case 71:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T]},{type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:o[T-4].actor}];break;case 72:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T],activate:!0,centralConnection:b.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:b.LINETYPE.CENTRAL_CONNECTION,actor:o[T-1].actor}];break;case 73:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-2],msg:o[T],activate:!1,centralConnection:b.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:b.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[T-4].actor}];break;case 74:this.$=[o[T-5],o[T-1],{type:"addMessage",from:o[T-5].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T],activate:!0,centralConnection:b.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:b.LINETYPE.CENTRAL_CONNECTION,actor:o[T-1].actor},{type:"centralConnectionReverse",signalType:b.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[T-5].actor}];break;case 75:this.$=[o[T-3],o[T-1],{type:"addMessage",from:o[T-3].actor,to:o[T-1].actor,signalType:o[T-2],msg:o[T]}];break;case 76:this.$={type:"addParticipant",actor:o[T-1],config:o[T]};break;case 77:this.$=o[T-1].trim();break;case 78:case 79:this.$={type:"addParticipant",actor:o[T]};break;case 80:this.$=b.LINETYPE.SOLID_OPEN;break;case 81:this.$=b.LINETYPE.DOTTED_OPEN;break;case 82:this.$=b.LINETYPE.SOLID;break;case 83:this.$=b.LINETYPE.SOLID_TOP;break;case 84:this.$=b.LINETYPE.SOLID_BOTTOM;break;case 85:this.$=b.LINETYPE.STICK_TOP;break;case 86:this.$=b.LINETYPE.STICK_BOTTOM;break;case 87:this.$=b.LINETYPE.SOLID_TOP_DOTTED;break;case 88:this.$=b.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 89:this.$=b.LINETYPE.STICK_TOP_DOTTED;break;case 90:this.$=b.LINETYPE.STICK_BOTTOM_DOTTED;break;case 91:this.$=b.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 92:this.$=b.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 93:this.$=b.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 94:this.$=b.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 95:this.$=b.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 96:this.$=b.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 97:this.$=b.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 98:this.$=b.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 99:this.$=b.LINETYPE.BIDIRECTIONAL_SOLID;break;case 100:this.$=b.LINETYPE.DOTTED;break;case 101:this.$=b.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 102:this.$=b.LINETYPE.SOLID_CROSS;break;case 103:this.$=b.LINETYPE.DOTTED_CROSS;break;case 104:this.$=b.LINETYPE.SOLID_POINT;break;case 105:this.$=b.LINETYPE.DOTTED_POINT;break;case 106:this.$=b.parseMessage(o[T].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},e(M,[2,5]),{9:48,13:13,14:p,15:d,18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},e(M,[2,7]),e(M,[2,8]),e(M,[2,9]),e(M,[2,15]),{13:49,51:K,53:U,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,62:Q,73:W},{23:57,62:Q,73:W},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},{5:[1,62]},e(M,[2,30]),e(M,[2,31]),{33:[1,63]},{35:[1,64]},e(M,[2,34]),{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{16:[1,72]},{23:73,55:74,62:Q,73:Yt},{23:76,55:77,62:Q,73:Yt},{23:78,62:Q,73:W},{69:79,72:[1,80],78:A,79:v,80:dt,81:nt,82:H,83:mt,84:_e,85:ge,86:xe,87:be,88:Ie,89:ye,90:Re,91:Oe,92:Le,93:me,94:Se,95:Ae,96:ke,97:Ne,98:we,99:Pe,100:De,101:ve,102:Ce,103:Me},{57:107,59:[1,108],67:[1,109],68:[1,110]},{23:111,62:Q,73:W},e([72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103],Be,{23:112,62:Q,73:W}),{23:113,62:Q,73:W},{23:114,62:Q,73:W},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],Ye),e(M,[2,6]),e(M,[2,16]),e(wt,[2,10],{11:115}),e(M,[2,18]),{5:[1,117],20:[1,116]},{5:[1,118]},e(M,[2,22]),{5:[1,119]},e([5,52,66,104],Be),{5:[1,120]},e(M,[2,25]),e(M,[2,26]),e(M,[2,27]),e(M,[2,28]),e(M,[2,29]),e(M,[2,32]),e(M,[2,33]),e(Vt,i,{7:121}),e(Vt,i,{7:122}),e(Vt,i,{7:123}),e(Ve,i,{41:124,7:125}),e(te,i,{43:126,7:127}),e(te,i,{7:127,43:128}),e(We,i,{46:129,7:130}),e(Vt,i,{7:131}),{5:[1,133],52:[1,132]},{5:[1,135],52:[1,134]},e(ee,Ye,{74:136,75:[1,137]}),{5:[1,139],52:[1,138]},{5:[1,141],52:[1,140]},{5:[1,142]},{23:146,62:Q,70:[1,143],71:[1,144],72:[1,145],73:W},{69:147,78:A,79:v,80:dt,81:nt,82:H,83:mt,84:_e,85:ge,86:xe,87:be,88:Ie,89:ye,90:Re,91:Oe,92:Le,93:me,94:Se,95:Ae,96:ke,97:Ne,98:we,99:Pe,100:De,101:ve,102:Ce,103:Me},e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),e(F,[2,105]),{23:148,62:Q,73:W},{23:150,60:149,62:Q,73:W},e(Ke,[2,68]),e(Ke,[2,69]),{58:151,104:lt},{58:153,104:lt},{58:154,104:lt},{58:155,104:lt},{4:[1,158],5:[1,160],12:157,13:159,17:[1,156],51:K,53:U,54:X},{5:[1,161]},e(M,[2,20]),e(M,[2,21]),e(M,[2,23]),e(M,[2,24]),{4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,17:[1,162],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},{4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,17:[1,163],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},{4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,17:[1,164],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},{17:[1,165]},{4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,17:[2,47],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,50:[1,166],51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},{17:[1,167]},{4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,17:[2,45],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,49:[1,168],51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},{17:[1,169]},{17:[1,170]},{4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,17:[2,43],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,48:[1,171],51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},{4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,17:[1,172],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},{16:[1,173]},e(M,[2,50]),{16:[1,174]},e(M,[2,55]),e(ee,[2,76]),{76:[1,175]},{16:[1,176]},e(M,[2,52]),{16:[1,177]},e(M,[2,57]),e(M,[2,53]),{23:178,62:Q,73:W},{23:179,62:Q,73:W},{23:180,62:Q,73:W},{58:181,104:lt},{23:182,62:Q,72:[1,183],73:W},{58:184,104:lt},{58:185,104:lt},{66:[1,186],104:[2,67]},{5:[2,60]},{5:[2,106]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(M,[2,17]),e(wt,[2,11]),{13:187,51:K,53:U,54:X},e(wt,[2,13]),e(wt,[2,14]),e(M,[2,19]),e(M,[2,35]),e(M,[2,36]),e(M,[2,37]),e(M,[2,38]),{16:[1,188]},e(M,[2,39]),{16:[1,189]},e(M,[2,40]),e(M,[2,41]),{16:[1,190]},e(M,[2,42]),{5:[1,191]},{5:[1,192]},{77:[1,193]},{5:[1,194]},{5:[1,195]},{58:196,104:lt},{58:197,104:lt},{58:198,104:lt},{5:[2,75]},{58:199,104:lt},{23:200,62:Q,73:W},{5:[2,58]},{5:[2,59]},{23:201,62:Q,73:W},e(wt,[2,12]),e(Ve,i,{7:125,41:202}),e(te,i,{7:127,43:203}),e(We,i,{7:130,46:204}),e(M,[2,49]),e(M,[2,54]),e(ee,[2,77]),e(M,[2,51]),e(M,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:205,104:lt},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],151:[2,60],152:[2,106],153:[2,61],154:[2,62],155:[2,63],181:[2,75],184:[2,58],185:[2,59],196:[2,70],197:[2,71],198:[2,72],199:[2,73],201:[2,66],202:[2,48],203:[2,46],204:[2,44],205:[2,74]},parseError:f(function(k,C){if(C.recoverable)this.trace(k);else{var D=new Error(k);throw D.hash=C,D}},"parseError"),parse:f(function(k){var C=this,D=[0],b=[],q=[null],o=[],Pt=this.table,T="",Kt=0,He=0,Fe=0,mr=2,qe=1,Sr=o.slice.call(arguments,1),$=Object.create(this.lexer),It={yy:{}};for(var ae in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ae)&&(It.yy[ae]=this.yy[ae]);$.setInput(k,It.yy),It.yy.lexer=$,It.yy.parser=this,typeof $.yylloc>"u"&&($.yylloc={});var se=$.yylloc;o.push(se);var Ar=$.options&&$.options.ranges;typeof It.yy.parseError=="function"?this.parseError=It.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function kr(ct){D.length=D.length-2*ct,q.length=q.length-ct,o.length=o.length-ct}f(kr,"popStack");function ze(){var ct;return ct=b.pop()||$.lex()||qe,typeof ct!="number"&&(ct instanceof Array&&(b=ct,ct=b.pop()),ct=C.symbols_[ct]||ct),ct}f(ze,"lex");for(var et,ie,yt,ht,Na,ne,St={},Ht,Et,Ue,Ft;;){if(yt=D[D.length-1],this.defaultActions[yt]?ht=this.defaultActions[yt]:((et===null||typeof et>"u")&&(et=ze()),ht=Pt[yt]&&Pt[yt][et]),typeof ht>"u"||!ht.length||!ht[0]){var oe="";Ft=[];for(Ht in Pt[yt])this.terminals_[Ht]&&Ht>mr&&Ft.push("'"+this.terminals_[Ht]+"'");$.showPosition?oe="Parse error on line "+(Kt+1)+`:
1
+ import{a as cr}from"./chunk-BTMPKSGF.js";import{a as Ge,b as Xe}from"./chunk-AARGNXTW.js";import{a as nr,b as or,d as qt,e as zt,f as Tt,g as Ut}from"./chunk-7ASYMKN2.js";import{c as ir,o as he,q as Z}from"./chunk-QLS7NIYR.js";import{a as wr}from"./chunk-ICJPOOXG.js";import{$ as tt,C as Dt,I as vt,J as Qe,L as j,M as At,N as ce,O as N,P as Ze,U as $e,V as le,W as je,X as tr,Y as er,Z as rr,_ as ar,aa as sr,o as Je}from"./chunk-IVZHB6RS.js";import{b as rt,d as Ct}from"./chunk-QQIGL7OP.js";import{a as f}from"./chunk-RJFVWYCA.js";import{b as Nr}from"./chunk-SQE76S5B.js";var ue=Nr(wr(),1),Te=(function(){var e=f(function(_t,k,C,D){for(C=C||{},D=_t.length;D--;C[_t[D]]=k);return C},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],c=[1,9],s=[1,11],n=[1,12],p=[1,14],d=[1,15],E=[1,17],u=[1,18],_=[1,19],O=[1,25],g=[1,26],y=[1,27],h=[1,28],R=[1,29],x=[1,30],m=[1,31],S=[1,32],L=[1,33],w=[1,34],P=[1,35],B=[1,36],V=[1,37],K=[1,38],U=[1,39],X=[1,40],at=[1,42],st=[1,43],G=[1,44],ot=[1,45],it=[1,46],W=[1,47],M=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Q=[1,56],Yt=[1,75],A=[1,81],v=[1,82],dt=[1,83],nt=[1,84],H=[1,85],mt=[1,86],_e=[1,87],ge=[1,88],xe=[1,89],be=[1,90],Ie=[1,91],ye=[1,92],Re=[1,93],Oe=[1,94],Le=[1,95],me=[1,96],Se=[1,97],Ae=[1,98],ke=[1,99],Ne=[1,100],we=[1,101],Pe=[1,102],De=[1,103],ve=[1,104],Ce=[1,105],Me=[1,106],Be=[2,79],Ye=[2,78],wt=[4,5,17,51,53,54],Vt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Ve=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],te=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],We=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],ee=[5,52],F=[62,70,71,72,73],Ke=[62,73],lt=[1,152],re={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:f(function(k,C,D,b,q,o,Pt){var T=o.length-1;switch(q){case 3:return b.apply(o[T]),o[T];break;case 4:case 10:this.$=[];break;case 5:case 11:o[T-1].push(o[T]),this.$=o[T-1];break;case 6:case 7:case 12:case 13:this.$=o[T];break;case 8:case 9:case 14:this.$=[];break;case 16:o[T].type="createParticipant",this.$=o[T];break;case 17:o[T-1].unshift({type:"boxStart",boxData:b.parseBoxData(o[T-2])}),o[T-1].push({type:"boxEnd",boxText:o[T-2]}),this.$=o[T-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(o[T-2]),sequenceIndexStep:Number(o[T-1]),sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(o[T-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:b.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:o[T-1].actor};break;case 24:this.$={type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:o[T-1].actor};break;case 30:b.setDiagramTitle(o[T].substring(6)),this.$=o[T].substring(6);break;case 31:b.setDiagramTitle(o[T].substring(7)),this.$=o[T].substring(7);break;case 32:this.$=o[T].trim(),b.setAccTitle(this.$);break;case 33:case 34:this.$=o[T].trim(),b.setAccDescription(this.$);break;case 35:o[T-1].unshift({type:"loopStart",loopText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.LOOP_START}),o[T-1].push({type:"loopEnd",loopText:o[T-2],signalType:b.LINETYPE.LOOP_END}),this.$=o[T-1];break;case 36:o[T-1].unshift({type:"rectStart",color:b.parseMessage(o[T-2]),signalType:b.LINETYPE.RECT_START}),o[T-1].push({type:"rectEnd",color:b.parseMessage(o[T-2]),signalType:b.LINETYPE.RECT_END}),this.$=o[T-1];break;case 37:o[T-1].unshift({type:"optStart",optText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.OPT_START}),o[T-1].push({type:"optEnd",optText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.OPT_END}),this.$=o[T-1];break;case 38:o[T-1].unshift({type:"altStart",altText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.ALT_START}),o[T-1].push({type:"altEnd",signalType:b.LINETYPE.ALT_END}),this.$=o[T-1];break;case 39:o[T-1].unshift({type:"parStart",parText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.PAR_START}),o[T-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=o[T-1];break;case 40:o[T-1].unshift({type:"parStart",parText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.PAR_OVER_START}),o[T-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=o[T-1];break;case 41:o[T-1].unshift({type:"criticalStart",criticalText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.CRITICAL_START}),o[T-1].push({type:"criticalEnd",signalType:b.LINETYPE.CRITICAL_END}),this.$=o[T-1];break;case 42:o[T-1].unshift({type:"breakStart",breakText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.BREAK_START}),o[T-1].push({type:"breakEnd",optText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.BREAK_END}),this.$=o[T-1];break;case 44:this.$=o[T-3].concat([{type:"option",optionText:b.parseMessage(o[T-1]),signalType:b.LINETYPE.CRITICAL_OPTION},o[T]]);break;case 46:this.$=o[T-3].concat([{type:"and",parText:b.parseMessage(o[T-1]),signalType:b.LINETYPE.PAR_AND},o[T]]);break;case 48:this.$=o[T-3].concat([{type:"else",altText:b.parseMessage(o[T-1]),signalType:b.LINETYPE.ALT_ELSE},o[T]]);break;case 49:o[T-3].draw="participant",o[T-3].type="addParticipant",o[T-3].description=b.parseMessage(o[T-1]),this.$=o[T-3];break;case 50:o[T-1].draw="participant",o[T-1].type="addParticipant",this.$=o[T-1];break;case 51:o[T-3].draw="actor",o[T-3].type="addParticipant",o[T-3].description=b.parseMessage(o[T-1]),this.$=o[T-3];break;case 52:case 57:o[T-1].draw="actor",o[T-1].type="addParticipant",this.$=o[T-1];break;case 53:o[T-1].type="destroyParticipant",this.$=o[T-1];break;case 54:o[T-3].draw="participant",o[T-3].type="addParticipant",o[T-3].description=b.parseMessage(o[T-1]),this.$=o[T-3];break;case 55:o[T-1].draw="participant",o[T-1].type="addParticipant",this.$=o[T-1];break;case 56:o[T-3].draw="actor",o[T-3].type="addParticipant",o[T-3].description=b.parseMessage(o[T-1]),this.$=o[T-3];break;case 58:this.$=[o[T-1],{type:"addNote",placement:o[T-2],actor:o[T-1].actor,text:o[T]}];break;case 59:o[T-2]=[].concat(o[T-1],o[T-1]).slice(0,2),o[T-2][0]=o[T-2][0].actor,o[T-2][1]=o[T-2][1].actor,this.$=[o[T-1],{type:"addNote",placement:b.PLACEMENT.OVER,actor:o[T-2].slice(0,2),text:o[T]}];break;case 60:this.$=[o[T-1],{type:"addLinks",actor:o[T-1].actor,text:o[T]}];break;case 61:this.$=[o[T-1],{type:"addALink",actor:o[T-1].actor,text:o[T]}];break;case 62:this.$=[o[T-1],{type:"addProperties",actor:o[T-1].actor,text:o[T]}];break;case 63:this.$=[o[T-1],{type:"addDetails",actor:o[T-1].actor,text:o[T]}];break;case 66:this.$=[o[T-2],o[T]];break;case 67:this.$=o[T];break;case 68:this.$=b.PLACEMENT.LEFTOF;break;case 69:this.$=b.PLACEMENT.RIGHTOF;break;case 70:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T],activate:!0},{type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:o[T-1].actor}];break;case 71:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T]},{type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:o[T-4].actor}];break;case 72:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T],activate:!0,centralConnection:b.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:b.LINETYPE.CENTRAL_CONNECTION,actor:o[T-1].actor}];break;case 73:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-2],msg:o[T],activate:!1,centralConnection:b.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:b.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[T-4].actor}];break;case 74:this.$=[o[T-5],o[T-1],{type:"addMessage",from:o[T-5].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T],activate:!0,centralConnection:b.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:b.LINETYPE.CENTRAL_CONNECTION,actor:o[T-1].actor},{type:"centralConnectionReverse",signalType:b.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[T-5].actor}];break;case 75:this.$=[o[T-3],o[T-1],{type:"addMessage",from:o[T-3].actor,to:o[T-1].actor,signalType:o[T-2],msg:o[T]}];break;case 76:this.$={type:"addParticipant",actor:o[T-1],config:o[T]};break;case 77:this.$=o[T-1].trim();break;case 78:case 79:this.$={type:"addParticipant",actor:o[T]};break;case 80:this.$=b.LINETYPE.SOLID_OPEN;break;case 81:this.$=b.LINETYPE.DOTTED_OPEN;break;case 82:this.$=b.LINETYPE.SOLID;break;case 83:this.$=b.LINETYPE.SOLID_TOP;break;case 84:this.$=b.LINETYPE.SOLID_BOTTOM;break;case 85:this.$=b.LINETYPE.STICK_TOP;break;case 86:this.$=b.LINETYPE.STICK_BOTTOM;break;case 87:this.$=b.LINETYPE.SOLID_TOP_DOTTED;break;case 88:this.$=b.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 89:this.$=b.LINETYPE.STICK_TOP_DOTTED;break;case 90:this.$=b.LINETYPE.STICK_BOTTOM_DOTTED;break;case 91:this.$=b.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 92:this.$=b.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 93:this.$=b.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 94:this.$=b.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 95:this.$=b.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 96:this.$=b.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 97:this.$=b.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 98:this.$=b.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 99:this.$=b.LINETYPE.BIDIRECTIONAL_SOLID;break;case 100:this.$=b.LINETYPE.DOTTED;break;case 101:this.$=b.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 102:this.$=b.LINETYPE.SOLID_CROSS;break;case 103:this.$=b.LINETYPE.DOTTED_CROSS;break;case 104:this.$=b.LINETYPE.SOLID_POINT;break;case 105:this.$=b.LINETYPE.DOTTED_POINT;break;case 106:this.$=b.parseMessage(o[T].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},e(M,[2,5]),{9:48,13:13,14:p,15:d,18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},e(M,[2,7]),e(M,[2,8]),e(M,[2,9]),e(M,[2,15]),{13:49,51:K,53:U,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,62:Q,73:W},{23:57,62:Q,73:W},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},{5:[1,62]},e(M,[2,30]),e(M,[2,31]),{33:[1,63]},{35:[1,64]},e(M,[2,34]),{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{16:[1,72]},{23:73,55:74,62:Q,73:Yt},{23:76,55:77,62:Q,73:Yt},{23:78,62:Q,73:W},{69:79,72:[1,80],78:A,79:v,80:dt,81:nt,82:H,83:mt,84:_e,85:ge,86:xe,87:be,88:Ie,89:ye,90:Re,91:Oe,92:Le,93:me,94:Se,95:Ae,96:ke,97:Ne,98:we,99:Pe,100:De,101:ve,102:Ce,103:Me},{57:107,59:[1,108],67:[1,109],68:[1,110]},{23:111,62:Q,73:W},e([72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103],Be,{23:112,62:Q,73:W}),{23:113,62:Q,73:W},{23:114,62:Q,73:W},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],Ye),e(M,[2,6]),e(M,[2,16]),e(wt,[2,10],{11:115}),e(M,[2,18]),{5:[1,117],20:[1,116]},{5:[1,118]},e(M,[2,22]),{5:[1,119]},e([5,52,66,104],Be),{5:[1,120]},e(M,[2,25]),e(M,[2,26]),e(M,[2,27]),e(M,[2,28]),e(M,[2,29]),e(M,[2,32]),e(M,[2,33]),e(Vt,i,{7:121}),e(Vt,i,{7:122}),e(Vt,i,{7:123}),e(Ve,i,{41:124,7:125}),e(te,i,{43:126,7:127}),e(te,i,{7:127,43:128}),e(We,i,{46:129,7:130}),e(Vt,i,{7:131}),{5:[1,133],52:[1,132]},{5:[1,135],52:[1,134]},e(ee,Ye,{74:136,75:[1,137]}),{5:[1,139],52:[1,138]},{5:[1,141],52:[1,140]},{5:[1,142]},{23:146,62:Q,70:[1,143],71:[1,144],72:[1,145],73:W},{69:147,78:A,79:v,80:dt,81:nt,82:H,83:mt,84:_e,85:ge,86:xe,87:be,88:Ie,89:ye,90:Re,91:Oe,92:Le,93:me,94:Se,95:Ae,96:ke,97:Ne,98:we,99:Pe,100:De,101:ve,102:Ce,103:Me},e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),e(F,[2,105]),{23:148,62:Q,73:W},{23:150,60:149,62:Q,73:W},e(Ke,[2,68]),e(Ke,[2,69]),{58:151,104:lt},{58:153,104:lt},{58:154,104:lt},{58:155,104:lt},{4:[1,158],5:[1,160],12:157,13:159,17:[1,156],51:K,53:U,54:X},{5:[1,161]},e(M,[2,20]),e(M,[2,21]),e(M,[2,23]),e(M,[2,24]),{4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,17:[1,162],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},{4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,17:[1,163],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},{4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,17:[1,164],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},{17:[1,165]},{4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,17:[2,47],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,50:[1,166],51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},{17:[1,167]},{4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,17:[2,45],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,49:[1,168],51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},{17:[1,169]},{17:[1,170]},{4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,17:[2,43],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,48:[1,171],51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},{4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,17:[1,172],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},{16:[1,173]},e(M,[2,50]),{16:[1,174]},e(M,[2,55]),e(ee,[2,76]),{76:[1,175]},{16:[1,176]},e(M,[2,52]),{16:[1,177]},e(M,[2,57]),e(M,[2,53]),{23:178,62:Q,73:W},{23:179,62:Q,73:W},{23:180,62:Q,73:W},{58:181,104:lt},{23:182,62:Q,72:[1,183],73:W},{58:184,104:lt},{58:185,104:lt},{66:[1,186],104:[2,67]},{5:[2,60]},{5:[2,106]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(M,[2,17]),e(wt,[2,11]),{13:187,51:K,53:U,54:X},e(wt,[2,13]),e(wt,[2,14]),e(M,[2,19]),e(M,[2,35]),e(M,[2,36]),e(M,[2,37]),e(M,[2,38]),{16:[1,188]},e(M,[2,39]),{16:[1,189]},e(M,[2,40]),e(M,[2,41]),{16:[1,190]},e(M,[2,42]),{5:[1,191]},{5:[1,192]},{77:[1,193]},{5:[1,194]},{5:[1,195]},{58:196,104:lt},{58:197,104:lt},{58:198,104:lt},{5:[2,75]},{58:199,104:lt},{23:200,62:Q,73:W},{5:[2,58]},{5:[2,59]},{23:201,62:Q,73:W},e(wt,[2,12]),e(Ve,i,{7:125,41:202}),e(te,i,{7:127,43:203}),e(We,i,{7:130,46:204}),e(M,[2,49]),e(M,[2,54]),e(ee,[2,77]),e(M,[2,51]),e(M,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:205,104:lt},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],151:[2,60],152:[2,106],153:[2,61],154:[2,62],155:[2,63],181:[2,75],184:[2,58],185:[2,59],196:[2,70],197:[2,71],198:[2,72],199:[2,73],201:[2,66],202:[2,48],203:[2,46],204:[2,44],205:[2,74]},parseError:f(function(k,C){if(C.recoverable)this.trace(k);else{var D=new Error(k);throw D.hash=C,D}},"parseError"),parse:f(function(k){var C=this,D=[0],b=[],q=[null],o=[],Pt=this.table,T="",Kt=0,He=0,Fe=0,mr=2,qe=1,Sr=o.slice.call(arguments,1),$=Object.create(this.lexer),It={yy:{}};for(var ae in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ae)&&(It.yy[ae]=this.yy[ae]);$.setInput(k,It.yy),It.yy.lexer=$,It.yy.parser=this,typeof $.yylloc>"u"&&($.yylloc={});var se=$.yylloc;o.push(se);var Ar=$.options&&$.options.ranges;typeof It.yy.parseError=="function"?this.parseError=It.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function kr(ct){D.length=D.length-2*ct,q.length=q.length-ct,o.length=o.length-ct}f(kr,"popStack");function ze(){var ct;return ct=b.pop()||$.lex()||qe,typeof ct!="number"&&(ct instanceof Array&&(b=ct,ct=b.pop()),ct=C.symbols_[ct]||ct),ct}f(ze,"lex");for(var et,ie,yt,ht,Na,ne,St={},Ht,Et,Ue,Ft;;){if(yt=D[D.length-1],this.defaultActions[yt]?ht=this.defaultActions[yt]:((et===null||typeof et>"u")&&(et=ze()),ht=Pt[yt]&&Pt[yt][et]),typeof ht>"u"||!ht.length||!ht[0]){var oe="";Ft=[];for(Ht in Pt[yt])this.terminals_[Ht]&&Ht>mr&&Ft.push("'"+this.terminals_[Ht]+"'");$.showPosition?oe="Parse error on line "+(Kt+1)+`:
2
2
  `+$.showPosition()+`
3
3
  Expecting `+Ft.join(", ")+", got '"+(this.terminals_[et]||et)+"'":oe="Parse error on line "+(Kt+1)+": Unexpected "+(et==qe?"end of input":"'"+(this.terminals_[et]||et)+"'"),this.parseError(oe,{text:$.match,token:this.terminals_[et]||et,line:$.yylineno,loc:se,expected:Ft})}if(ht[0]instanceof Array&&ht.length>1)throw new Error("Parse Error: multiple actions possible at state: "+yt+", token: "+et);switch(ht[0]){case 1:D.push(et),q.push($.yytext),o.push($.yylloc),D.push(ht[1]),et=null,ie?(et=ie,ie=null):(He=$.yyleng,T=$.yytext,Kt=$.yylineno,se=$.yylloc,Fe>0&&Fe--);break;case 2:if(Et=this.productions_[ht[1]][1],St.$=q[q.length-Et],St._$={first_line:o[o.length-(Et||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(Et||1)].first_column,last_column:o[o.length-1].last_column},Ar&&(St._$.range=[o[o.length-(Et||1)].range[0],o[o.length-1].range[1]]),ne=this.performAction.apply(St,[T,He,Kt,It.yy,ht[1],q,o].concat(Sr)),typeof ne<"u")return ne;Et&&(D=D.slice(0,-1*Et*2),q=q.slice(0,-1*Et),o=o.slice(0,-1*Et)),D.push(this.productions_[ht[1]][0]),q.push(St.$),o.push(St._$),Ue=Pt[D[D.length-2]][D[D.length-1]],D.push(Ue);break;case 3:return!0}}return!0},"parse")},Lr=(function(){var _t={EOF:1,parseError:f(function(C,D){if(this.yy.parser)this.yy.parser.parseError(C,D);else throw new Error(C)},"parseError"),setInput:f(function(k,C){return this.yy=C||this.yy||{},this._input=k,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var k=this._input[0];this.yytext+=k,this.yyleng++,this.offset++,this.match+=k,this.matched+=k;var C=k.match(/(?:\r\n?|\n).*/g);return C?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),k},"input"),unput:f(function(k){var C=k.length,D=k.split(/(?:\r\n?|\n)/g);this._input=k+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-C),this.offset-=C;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),D.length-1&&(this.yylineno-=D.length-1);var q=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:D?(D.length===b.length?this.yylloc.first_column:0)+b[b.length-D.length].length-D[0].length:this.yylloc.first_column-C},this.options.ranges&&(this.yylloc.range=[q[0],q[0]+this.yyleng-C]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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:f(function(k){this.unput(this.match.slice(k))},"less"),pastInput:f(function(){var k=this.matched.substr(0,this.matched.length-this.match.length);return(k.length>20?"...":"")+k.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var k=this.match;return k.length<20&&(k+=this._input.substr(0,20-k.length)),(k.substr(0,20)+(k.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var k=this.pastInput(),C=new Array(k.length+1).join("-");return k+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{a as o}from"./chunk-GYT4IYBZ.js";import"./chunk-3RNHDNP5.js";var c=1;function i(){if(!(typeof globalThis>"u"))return globalThis}o(i,"getCaptureGlobal");function p(){return!!i()?.mermaidCaptureSizes}o(p,"shouldCaptureSizes");function u(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}o(u,"capturedFromLocation");function d(n,r){let t=i();if(!t)return;let e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];let a={svgId:s,sizes:n};t.mermaidCapturedSizes.push(a),t.mermaidLastCapturedSizes=a}o(d,"emitCapturedSizes");function m(n,r){let t=[];for(let e of r.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&d({metadata:{captureVersion:c,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:t},n)}o(m,"captureNodeSizes");export{m as captureNodeSizes,p as shouldCaptureSizes};
1
+ import{a as o}from"./chunk-RJFVWYCA.js";import"./chunk-SQE76S5B.js";var c=1;function i(){if(!(typeof globalThis>"u"))return globalThis}o(i,"getCaptureGlobal");function p(){return!!i()?.mermaidCaptureSizes}o(p,"shouldCaptureSizes");function u(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}o(u,"capturedFromLocation");function d(n,r){let t=i();if(!t)return;let e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];let a={svgId:s,sizes:n};t.mermaidCapturedSizes.push(a),t.mermaidLastCapturedSizes=a}o(d,"emitCapturedSizes");function m(n,r){let t=[];for(let e of r.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&d({metadata:{captureVersion:c,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:t},n)}o(m,"captureNodeSizes");export{m as captureNodeSizes,p as shouldCaptureSizes};
@@ -1,4 +1,4 @@
1
- import{h as Jt}from"./chunk-I3DMZIHV.js";import{a as qt}from"./chunk-VM2H7G2R.js";import{a as Qt}from"./chunk-26TUJSYJ.js";import{b as Kt,c as Xt}from"./chunk-6T55RVVR.js";import"./chunk-ZMCB7VP2.js";import"./chunk-R63JUMUK.js";import"./chunk-K2KLZU7M.js";import"./chunk-JD7ZBJD2.js";import"./chunk-HOPPTA6H.js";import"./chunk-4QDE4SUK.js";import"./chunk-QCJUF4YA.js";import"./chunk-BBD5CEDC.js";import"./chunk-ISO77HML.js";import{b as jt,c as Ut,d as Ht,e as zt}from"./chunk-KU6GTEMS.js";import{g as Mt,q as Wt}from"./chunk-QEEA3KYY.js";import"./chunk-OFZLK5G4.js";import{$,O as M,U as $t,V as Ft,W as Pt,X as Bt,Y as Gt,Z as Yt,_ as Vt,g as Rt}from"./chunk-KT4VPQD5.js";import{b as T,d as St}from"./chunk-JRSH5GNS.js";import{a as u}from"./chunk-GYT4IYBZ.js";import"./chunk-3RNHDNP5.js";var At=(function(){var t=u(function(V,o,d,i){for(d=d||{},i=V.length;i--;d[V[i]]=o);return d},"o"),e=[1,2],n=[1,3],s=[1,4],c=[2,4],h=[1,9],p=[1,11],S=[1,16],a=[1,17],m=[1,18],b=[1,19],x=[1,33],L=[1,20],O=[1,21],v=[1,22],f=[1,23],w=[1,24],D=[1,26],F=[1,27],I=[1,28],P=[1,29],_=[1,30],H=[1,31],it=[1,32],at=[1,35],nt=[1,36],ot=[1,37],lt=[1,38],z=[1,34],g=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],ct=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],It=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],bt={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:u(function(o,d,i,y,k,r,K){var l=r.length-1;switch(k){case 3:return y.setRootDoc(r[l]),r[l];break;case 4:this.$=[];break;case 5:r[l]!="nl"&&(r[l-1].push(r[l]),this.$=r[l-1]);break;case 6:case 7:this.$=r[l];break;case 8:this.$="nl";break;case 12:this.$=r[l];break;case 13:let dt=r[l-1];dt.description=y.trimColon(r[l]),this.$=dt;break;case 14:this.$={stmt:"relation",state1:r[l-2],state2:r[l]};break;case 15:let ut=y.trimColon(r[l]);this.$={stmt:"relation",state1:r[l-3],state2:r[l-1],description:ut};break;case 19:this.$={stmt:"state",id:r[l-3],type:"default",description:"",doc:r[l-1]};break;case 20:var B=r[l],G=r[l-2].trim();if(r[l].match(":")){var Q=r[l].split(":");B=Q[0],G=[G,Q[1]]}this.$={stmt:"state",id:B,type:"default",description:G};break;case 21:this.$={stmt:"state",id:r[l-3],type:"default",description:r[l-5],doc:r[l-1]};break;case 22:this.$={stmt:"state",id:r[l],type:"fork"};break;case 23:this.$={stmt:"state",id:r[l],type:"join"};break;case 24:this.$={stmt:"state",id:r[l],type:"choice"};break;case 25:this.$={stmt:"state",id:y.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[l-1].trim(),note:{position:r[l-2].trim(),text:r[l].trim()}};break;case 29:this.$=r[l].trim(),y.setAccTitle(this.$);break;case 30:case 31:this.$=r[l].trim(),y.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:r[l-3],url:r[l-2],tooltip:r[l-1]};break;case 33:this.$={stmt:"click",id:r[l-3],url:r[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:r[l-1].trim(),classes:r[l].trim()};break;case 36:this.$={stmt:"style",id:r[l-1].trim(),styleClass:r[l].trim()};break;case 37:this.$={stmt:"applyClass",id:r[l-1].trim(),styleClass:r[l].trim()};break;case 38:y.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:y.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:y.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:y.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:r[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:r[l-2].trim(),classes:[r[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:r[l-2].trim(),classes:[r[l].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:n,6:s},{1:[3]},{3:5,4:e,5:n,6:s},{3:6,4:e,5:n,6:s},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],c,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:S,17:a,19:m,22:b,24:x,25:L,26:O,27:v,28:f,29:w,32:25,33:D,35:F,37:I,38:P,41:_,45:H,48:it,51:at,52:nt,53:ot,54:lt,57:z},t(g,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:S,17:a,19:m,22:b,24:x,25:L,26:O,27:v,28:f,29:w,32:25,33:D,35:F,37:I,38:P,41:_,45:H,48:it,51:at,52:nt,53:ot,54:lt,57:z},t(g,[2,7]),t(g,[2,8]),t(g,[2,9]),t(g,[2,10]),t(g,[2,11]),t(g,[2,12],{14:[1,40],15:[1,41]}),t(g,[2,16]),{18:[1,42]},t(g,[2,18],{20:[1,43]}),{23:[1,44]},t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(g,[2,28]),{34:[1,49]},{36:[1,50]},t(g,[2,31]),{13:51,24:x,57:z},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(ct,[2,44],{58:[1,56]}),t(ct,[2,45],{58:[1,57]}),t(g,[2,38]),t(g,[2,39]),t(g,[2,40]),t(g,[2,41]),t(g,[2,6]),t(g,[2,13]),{13:58,24:x,57:z},t(g,[2,17]),t(It,c,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(g,[2,29]),t(g,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(g,[2,14],{14:[1,71]}),{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:S,17:a,19:m,21:[1,72],22:b,24:x,25:L,26:O,27:v,28:f,29:w,32:25,33:D,35:F,37:I,38:P,41:_,45:H,48:it,51:at,52:nt,53:ot,54:lt,57:z},t(g,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(g,[2,34]),t(g,[2,35]),t(g,[2,36]),t(g,[2,37]),t(ct,[2,46]),t(ct,[2,47]),t(g,[2,15]),t(g,[2,19]),t(It,c,{7:78}),t(g,[2,26]),t(g,[2,27]),{5:[1,79]},{5:[1,80]},{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:S,17:a,19:m,21:[1,81],22:b,24:x,25:L,26:O,27:v,28:f,29:w,32:25,33:D,35:F,37:I,38:P,41:_,45:H,48:it,51:at,52:nt,53:ot,54:lt,57:z},t(g,[2,32]),t(g,[2,33]),t(g,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:u(function(o,d){if(d.recoverable)this.trace(o);else{var i=new Error(o);throw i.hash=d,i}},"parseError"),parse:u(function(o){var d=this,i=[0],y=[],k=[null],r=[],K=this.table,l="",B=0,G=0,Q=0,dt=2,ut=1,ke=r.slice.call(arguments,1),E=Object.create(this.lexer),j={yy:{}};for(var kt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,kt)&&(j.yy[kt]=this.yy[kt]);E.setInput(o,j.yy),j.yy.lexer=E,j.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var Tt=E.yylloc;r.push(Tt);var Te=E.options&&E.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ee(N){i.length=i.length-2*N,k.length=k.length-N,r.length=r.length-N}u(Ee,"popStack");function Nt(){var N;return N=y.pop()||E.lex()||ut,typeof N!="number"&&(N instanceof Array&&(y=N,N=y.pop()),N=d.symbols_[N]||N),N}u(Nt,"lex");for(var C,Et,U,R,ts,_t,X={},ft,Y,Ot,pt;;){if(U=i[i.length-1],this.defaultActions[U]?R=this.defaultActions[U]:((C===null||typeof C>"u")&&(C=Nt()),R=K[U]&&K[U][C]),typeof R>"u"||!R.length||!R[0]){var vt="";pt=[];for(ft in K[U])this.terminals_[ft]&&ft>dt&&pt.push("'"+this.terminals_[ft]+"'");E.showPosition?vt="Parse error on line "+(B+1)+`:
1
+ import{a as qt}from"./chunk-JZGXHT3J.js";import{a as Qt}from"./chunk-6CDZONCA.js";import{b as Kt,c as Xt}from"./chunk-GWYODWCE.js";import"./chunk-WQHTQAFY.js";import"./chunk-EWYECPNJ.js";import"./chunk-7JQUFVT4.js";import"./chunk-NDAMZVXQ.js";import{h as Jt}from"./chunk-7ASYMKN2.js";import"./chunk-BOXAA5AP.js";import"./chunk-4QDE4SUK.js";import"./chunk-DIDARDST.js";import"./chunk-7LSMJ4VU.js";import"./chunk-5N2X2DXU.js";import{b as jt,c as Ut,d as Ht,e as zt}from"./chunk-3CJU2RDX.js";import{g as Mt,q as Wt}from"./chunk-QLS7NIYR.js";import"./chunk-ICJPOOXG.js";import{$,O as M,U as $t,V as Ft,W as Pt,X as Bt,Y as Gt,Z as Yt,_ as Vt,g as Rt}from"./chunk-IVZHB6RS.js";import{b as T,d as St}from"./chunk-QQIGL7OP.js";import{a as u}from"./chunk-RJFVWYCA.js";import"./chunk-SQE76S5B.js";var At=(function(){var t=u(function(V,o,d,i){for(d=d||{},i=V.length;i--;d[V[i]]=o);return d},"o"),e=[1,2],n=[1,3],s=[1,4],c=[2,4],h=[1,9],p=[1,11],S=[1,16],a=[1,17],m=[1,18],b=[1,19],x=[1,33],L=[1,20],O=[1,21],v=[1,22],f=[1,23],w=[1,24],D=[1,26],F=[1,27],I=[1,28],P=[1,29],_=[1,30],H=[1,31],it=[1,32],at=[1,35],nt=[1,36],ot=[1,37],lt=[1,38],z=[1,34],g=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],ct=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],It=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],bt={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:u(function(o,d,i,y,k,r,K){var l=r.length-1;switch(k){case 3:return y.setRootDoc(r[l]),r[l];break;case 4:this.$=[];break;case 5:r[l]!="nl"&&(r[l-1].push(r[l]),this.$=r[l-1]);break;case 6:case 7:this.$=r[l];break;case 8:this.$="nl";break;case 12:this.$=r[l];break;case 13:let dt=r[l-1];dt.description=y.trimColon(r[l]),this.$=dt;break;case 14:this.$={stmt:"relation",state1:r[l-2],state2:r[l]};break;case 15:let ut=y.trimColon(r[l]);this.$={stmt:"relation",state1:r[l-3],state2:r[l-1],description:ut};break;case 19:this.$={stmt:"state",id:r[l-3],type:"default",description:"",doc:r[l-1]};break;case 20:var B=r[l],G=r[l-2].trim();if(r[l].match(":")){var Q=r[l].split(":");B=Q[0],G=[G,Q[1]]}this.$={stmt:"state",id:B,type:"default",description:G};break;case 21:this.$={stmt:"state",id:r[l-3],type:"default",description:r[l-5],doc:r[l-1]};break;case 22:this.$={stmt:"state",id:r[l],type:"fork"};break;case 23:this.$={stmt:"state",id:r[l],type:"join"};break;case 24:this.$={stmt:"state",id:r[l],type:"choice"};break;case 25:this.$={stmt:"state",id:y.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[l-1].trim(),note:{position:r[l-2].trim(),text:r[l].trim()}};break;case 29:this.$=r[l].trim(),y.setAccTitle(this.$);break;case 30:case 31:this.$=r[l].trim(),y.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:r[l-3],url:r[l-2],tooltip:r[l-1]};break;case 33:this.$={stmt:"click",id:r[l-3],url:r[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:r[l-1].trim(),classes:r[l].trim()};break;case 36:this.$={stmt:"style",id:r[l-1].trim(),styleClass:r[l].trim()};break;case 37:this.$={stmt:"applyClass",id:r[l-1].trim(),styleClass:r[l].trim()};break;case 38:y.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:y.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:y.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:y.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:r[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:r[l-2].trim(),classes:[r[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:r[l-2].trim(),classes:[r[l].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:n,6:s},{1:[3]},{3:5,4:e,5:n,6:s},{3:6,4:e,5:n,6:s},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],c,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:S,17:a,19:m,22:b,24:x,25:L,26:O,27:v,28:f,29:w,32:25,33:D,35:F,37:I,38:P,41:_,45:H,48:it,51:at,52:nt,53:ot,54:lt,57:z},t(g,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:S,17:a,19:m,22:b,24:x,25:L,26:O,27:v,28:f,29:w,32:25,33:D,35:F,37:I,38:P,41:_,45:H,48:it,51:at,52:nt,53:ot,54:lt,57:z},t(g,[2,7]),t(g,[2,8]),t(g,[2,9]),t(g,[2,10]),t(g,[2,11]),t(g,[2,12],{14:[1,40],15:[1,41]}),t(g,[2,16]),{18:[1,42]},t(g,[2,18],{20:[1,43]}),{23:[1,44]},t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(g,[2,28]),{34:[1,49]},{36:[1,50]},t(g,[2,31]),{13:51,24:x,57:z},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(ct,[2,44],{58:[1,56]}),t(ct,[2,45],{58:[1,57]}),t(g,[2,38]),t(g,[2,39]),t(g,[2,40]),t(g,[2,41]),t(g,[2,6]),t(g,[2,13]),{13:58,24:x,57:z},t(g,[2,17]),t(It,c,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(g,[2,29]),t(g,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(g,[2,14],{14:[1,71]}),{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:S,17:a,19:m,21:[1,72],22:b,24:x,25:L,26:O,27:v,28:f,29:w,32:25,33:D,35:F,37:I,38:P,41:_,45:H,48:it,51:at,52:nt,53:ot,54:lt,57:z},t(g,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(g,[2,34]),t(g,[2,35]),t(g,[2,36]),t(g,[2,37]),t(ct,[2,46]),t(ct,[2,47]),t(g,[2,15]),t(g,[2,19]),t(It,c,{7:78}),t(g,[2,26]),t(g,[2,27]),{5:[1,79]},{5:[1,80]},{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:S,17:a,19:m,21:[1,81],22:b,24:x,25:L,26:O,27:v,28:f,29:w,32:25,33:D,35:F,37:I,38:P,41:_,45:H,48:it,51:at,52:nt,53:ot,54:lt,57:z},t(g,[2,32]),t(g,[2,33]),t(g,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:u(function(o,d){if(d.recoverable)this.trace(o);else{var i=new Error(o);throw i.hash=d,i}},"parseError"),parse:u(function(o){var d=this,i=[0],y=[],k=[null],r=[],K=this.table,l="",B=0,G=0,Q=0,dt=2,ut=1,ke=r.slice.call(arguments,1),E=Object.create(this.lexer),j={yy:{}};for(var kt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,kt)&&(j.yy[kt]=this.yy[kt]);E.setInput(o,j.yy),j.yy.lexer=E,j.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var Tt=E.yylloc;r.push(Tt);var Te=E.options&&E.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ee(N){i.length=i.length-2*N,k.length=k.length-N,r.length=r.length-N}u(Ee,"popStack");function Nt(){var N;return N=y.pop()||E.lex()||ut,typeof N!="number"&&(N instanceof Array&&(y=N,N=y.pop()),N=d.symbols_[N]||N),N}u(Nt,"lex");for(var C,Et,U,R,ts,_t,X={},ft,Y,Ot,pt;;){if(U=i[i.length-1],this.defaultActions[U]?R=this.defaultActions[U]:((C===null||typeof C>"u")&&(C=Nt()),R=K[U]&&K[U][C]),typeof R>"u"||!R.length||!R[0]){var vt="";pt=[];for(ft in K[U])this.terminals_[ft]&&ft>dt&&pt.push("'"+this.terminals_[ft]+"'");E.showPosition?vt="Parse error on line "+(B+1)+`:
2
2
  `+E.showPosition()+`
3
3
  Expecting `+pt.join(", ")+", got '"+(this.terminals_[C]||C)+"'":vt="Parse error on line "+(B+1)+": Unexpected "+(C==ut?"end of input":"'"+(this.terminals_[C]||C)+"'"),this.parseError(vt,{text:E.match,token:this.terminals_[C]||C,line:E.yylineno,loc:Tt,expected:pt})}if(R[0]instanceof Array&&R.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+C);switch(R[0]){case 1:i.push(C),k.push(E.yytext),r.push(E.yylloc),i.push(R[1]),C=null,Et?(C=Et,Et=null):(G=E.yyleng,l=E.yytext,B=E.yylineno,Tt=E.yylloc,Q>0&&Q--);break;case 2:if(Y=this.productions_[R[1]][1],X.$=k[k.length-Y],X._$={first_line:r[r.length-(Y||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(Y||1)].first_column,last_column:r[r.length-1].last_column},Te&&(X._$.range=[r[r.length-(Y||1)].range[0],r[r.length-1].range[1]]),_t=this.performAction.apply(X,[l,G,B,j.yy,R[1],k,r].concat(ke)),typeof _t<"u")return _t;Y&&(i=i.slice(0,-1*Y*2),k=k.slice(0,-1*Y),r=r.slice(0,-1*Y)),i.push(this.productions_[R[1]][0]),k.push(X.$),r.push(X._$),Ot=K[i[i.length-2]][i[i.length-1]],i.push(Ot);break;case 3:return!0}}return!0},"parse")},be=(function(){var V={EOF:1,parseError:u(function(d,i){if(this.yy.parser)this.yy.parser.parseError(d,i);else throw new Error(d)},"parseError"),setInput:u(function(o,d){return this.yy=d||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]),this.offset=0,this},"setInput"),input:u(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var d=o.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:u(function(o){var d=o.length,i=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var k=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===y.length?this.yylloc.first_column:0)+y[y.length-i.length].length-i[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[k[0],k[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(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:u(function(o){this.unput(this.match.slice(o))},"less"),pastInput:u(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:u(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var o=this.pastInput(),d=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
@@ -0,0 +1 @@
1
+ import{g as Wo}from"./chunk-I5LEUF24.js";import"./chunk-K4I76XBX.js";import"./chunk-EWYECPNJ.js";import{a as Fn}from"./chunk-7JQUFVT4.js";import"./chunk-NDAMZVXQ.js";import"./chunk-BOXAA5AP.js";import"./chunk-4QDE4SUK.js";import"./chunk-DIDARDST.js";import"./chunk-7LSMJ4VU.js";import"./chunk-5N2X2DXU.js";import"./chunk-3CJU2RDX.js";import"./chunk-QLS7NIYR.js";import"./chunk-ICJPOOXG.js";import"./chunk-IVZHB6RS.js";import{b as De}from"./chunk-QQIGL7OP.js";import{a as c}from"./chunk-RJFVWYCA.js";import"./chunk-SQE76S5B.js";var on=5,en=1e-5,fi=2,ui=.6,nn=1e-6;function sn(t){let e=[];for(let n=0;n<t.length-1;n++)e.push({a:t[n],b:t[n+1]});return e}c(sn,"buildSegmentList");function Ko(t,e,n,o){let s=e.x-t.x,r=e.y-t.y,i=o.x-n.x,d=o.y-n.y,u=s*d-r*i;if(u===0)return null;let a=n.x-t.x,y=n.y-t.y,l=(a*d-y*i)/u,x=(a*r-y*s)/u;return l<=nn||l>=1-nn||x<=nn||x>=1-nn?null:{point:{x:t.x+l*s,y:t.y+l*r},tA:l,tB:x}}c(Ko,"segmentIntersection");function Pn(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}c(Pn,"isHorizontalSeg");function kn(t,e,n){if(t.curve!=="rounded")return!1;let o=t.points,s=o[e],r=o[e+1];if(!s||!r)return!1;let i=Math.hypot(r.x-s.x,r.y-s.y),d=n*i,u=e>0?$e(o[e-1],s,r,on):null;if(u&&d<u.cutLen)return!0;let a=e+2<o.length?$e(s,r,o[e+2],on):null;return a!==null&&i-d<a.cutLen}c(kn,"crossingSitsInRoundedCorner");function qo(t){let e=[];for(let n=0;n<t.length;n++){let o=t[n],s=sn(o.points);for(let r=n+1;r<t.length;r++){let i=t[r],d=sn(i.points);for(let[u,a]of s.entries())for(let[y,l]of d.entries()){let x=Ko(a.a,a.b,l.a,l.b);if(!x||kn(o,u,x.tA)||kn(i,y,x.tB))continue;let m=Pn(a),p=Pn(l);(m!==p?m:!1)?e.push({jumpEdgeId:o.id,otherEdgeId:i.id,segIndex:u,t:x.tA,point:x.point}):e.push({jumpEdgeId:i.id,otherEdgeId:o.id,segIndex:y,t:x.tB,point:x.point})}}}return e}c(qo,"findEdgeIntersections");function fe(t){let e=Math.round(t*1e3)/1e3;return Number.isInteger(e)?`${e}`:`${e}`}c(fe,"fmt");function He(t){return`${fe(t.x)},${fe(t.y)}`}c(He,"pointToString");function Jo(t){let e=t.b.x-t.a.x,n=t.b.y-t.a.y;return Math.abs(e)>=Math.abs(n)?e>=0?1:0:n>=0?1:0}c(Jo,"getArcSweepFlag");function Zo(t,e){if(t.length<2)return t.map(r=>({...r}));let n=t.map(r=>({...r})),o=e.arrowTypeStart&&Fn[e.arrowTypeStart];if(o){let r=t[0],i=t[1],d=Math.atan2(i.y-r.y,i.x-r.x);n[0].x=r.x+o*Math.cos(d),n[0].y=r.y+o*Math.sin(d)}let s=e.arrowTypeEnd&&Fn[e.arrowTypeEnd];if(s){let r=t.length,i=t[r-2],d=t[r-1],u=Math.atan2(d.y-i.y,d.x-i.x);n[r-1].x=d.x-s*Math.cos(u),n[r-1].y=d.y-s*Math.sin(u)}return n}c(Zo,"applyMarkerOffsets");function Qo(t,e,n,o,s){let r=t.point.x,i=t.point.y,d={x:r-e*t.r,y:i-n*t.r},u={x:r+e*t.r,y:i+n*t.r},a=[`L${He(d)}`];return s==="arc"?a.push(`A${fe(t.r)},${fe(t.r)} 0 0 ${o} ${He(u)}`):a.push(`M${He(u)}`),a}c(Qo,"emitJump");function $e(t,e,n,o){let s=e.x-t.x,r=e.y-t.y,i=n.x-e.x,d=n.y-e.y,u=Math.hypot(s,r),a=Math.hypot(i,d);if(u<en||a<en)return null;let y=s/u,l=r/u,x=i/a,m=d/a,p=y*x+l*m,f=Math.max(-1,Math.min(1,p)),h=Math.acos(f);if(h<en||Math.abs(Math.PI-h)<en)return null;let M=Math.min(o/Math.sin(h/2),u/2,a/2);return{startX:e.x-y*M,startY:e.y-l*M,endX:e.x+x*M,endY:e.y+m*M,ctrlX:e.x,ctrlY:e.y,cutLen:M}}c($e,"computeRoundedCorner");function ts(t,e,n){let o=t.points;if(o.length<2)return"";let s=Zo(o,t),r=t.curve==="rounded",i=sn(s),d=new Map;for(let a of e){let y=i[a.segIndex];if(!y)continue;let l=Math.hypot(y.b.x-y.a.x,y.b.y-y.a.y),x=d.get(a.segIndex)??[];x.push({t:a.t,point:a.point,d:a.t*l,r:n.jumpRadius}),d.set(a.segIndex,x)}let u=[`M${He(s[0])}`];for(let a=0;a<i.length;a++){let y=i[a],l=Math.hypot(y.b.x-y.a.x,y.b.y-y.a.y),x=l===0?0:(y.b.x-y.a.x)/l,m=l===0?0:(y.b.y-y.a.y)/l,p=Jo(y),f=0;if(r&&a>0){let w=$e(s[a-1],s[a],s[a+1]??s[a],on);w&&(f=w.cutLen)}let h=l,M=null;r&&a<i.length-1&&(M=$e(s[a],s[a+1],s[a+2]??s[a+1],on),M&&(h=l-M.cutLen));let I=n.jumpRadius*ui,C=[...d.get(a)??[]].sort((w,S)=>w.t-S.t).filter(w=>{let S=Math.min(w.d-f,h-w.d)-fi;return w.r=Math.min(w.r,S),w.r>=I});for(let w=0;w<C.length-1;w++){let S=C[w+1].d-C[w].d;if(C[w].r+C[w+1].r>S){let b=S/2;C[w].r=Math.min(C[w].r,b),C[w+1].r=Math.min(C[w+1].r,b)}}for(let w of C)w.r<I||u.push(...Qo(w,x,m,p,n.jumpStyle));r&&M?(u.push(`L${fe(M.startX)},${fe(M.startY)}`),u.push(`Q${fe(M.ctrlX)},${fe(M.ctrlY)} ${fe(M.endX)},${fe(M.endY)}`)):u.push(`L${He(y.b)}`)}return u.join(" ")}c(ts,"rewriteEdgePath");function es(t){return/^[\d\s+,.LMelm-]*$/.test(t)}c(es,"isStraightPath");function ns(t){return t?t==="linear"||t==="rounded"||t==="step"||t==="stepBefore"||t==="stepAfter":!0}c(ns,"curveSupportsLineHops");function os(t){if(!t)return null;try{let e=typeof atob=="function"?atob(t):Buffer.from(t,"base64").toString(),n=JSON.parse(e);if(!Array.isArray(n))return null;let o=[];for(let s of n)s&&typeof s.x=="number"&&typeof s.y=="number"&&o.push({x:s.x,y:s.y});return o.length>=2?o:null}catch{return null}}c(os,"decodeDataPoints");function _n(t,e,n){if(!n.enabled)return;let o=t.node();if(!o)return;let s=new Map;for(let a of e)s.set(a.id,a);let r=new Map;for(let a of o.querySelectorAll("path[data-id]")){let y=a.getAttribute("data-id");y!==null&&!r.has(y)&&r.set(y,a)}let i=[];for(let a of e){let y=r.get(a.id);if(!y)continue;let x=os(y.getAttribute("data-points"))??a.points;i.push({...a,points:x})}let d=qo(i);if(d.length===0)return;let u=new Map;for(let a of d){let y=u.get(a.jumpEdgeId)??[];y.push(a),u.set(a.jumpEdgeId,y)}for(let a of i){let y=u.get(a.id);if(!y||y.length===0)continue;let x=s.get(a.id)?.curve;if(x!==void 0&&!ns(x))continue;let m=r.get(a.id);if(!m)continue;if(x===void 0){let C=m.getAttribute("d")??"";if(!es(C))continue}let p=m.getAttribute("style")??"",f=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(p),h=f?Number.parseFloat(f[1]):null,M=f?Number.parseFloat(f[2]):null,I=ts(a,y,n);if(m.setAttribute("d",I),h!==null&&M!==null&&typeof m.getTotalLength=="function"){let C=m.getTotalLength(),w=Math.max(0,C-h-M),S=`0 ${h} ${w} ${M}`,b=p.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${S};`).replace(/;\s*;+/g,";");m.setAttribute("style",b)}}}c(_n,"applyLineJumpsToSvg");function fs(t,{measure:e}){let n=t.config?.swimlane?.lineHops;if(n===!1)return;let o=n==="gap"?"gap":"arc",s=t.edges.filter(r=>Array.isArray(r.points)&&r.points.length>=2).map(r=>({id:r.id,points:r.points,curve:r.curve,arrowTypeStart:r.arrowTypeStart,arrowTypeEnd:r.arrowTypeEnd}));_n(e.groups.edgePaths,s,{enabled:!0,jumpRadius:6,jumpStyle:o})}c(fs,"applySwimlaneLineJumps");function us(t){let e=t?.metadata?.laneRole;return e==="pool"||e==="lane"?e:void 0}c(us,"readLaneRole");function ln(t){let e=t?.metadata?.laneIndex;return typeof e=="number"&&Number.isFinite(e)?e:void 0}c(ln,"readLaneIndex");function he(t){let e=new Map,n=new Map;for(let a of t)e.set(a.id,a),a.isGroup&&a.parentId&&n.set(a.parentId,(n.get(a.parentId)??0)+1);let o=new Set;for(let a of t)a.isGroup&&us(a)==="pool"&&(n.get(a.id)??0)>0&&o.add(a.id);let s=new Set,r=new Map;for(let a of t)if(!(!a.isGroup||o.has(a.id)))if(a.parentId&&o.has(a.parentId)){s.add(a.id);let y=r.get(a.parentId)??[];y.push(a.id),r.set(a.parentId,y)}else a.parentId||s.add(a.id);let i=c((a,y)=>{let l=new Set([a]),x=e.get(a)?.parentId;for(;x&&!l.has(x);){if(y.has(x))return x;l.add(x),x=e.get(x)?.parentId}return null},"walk"),d=new Map;return{isPool:c(a=>o.has(a),"isPool"),isLane:c(a=>s.has(a),"isLane"),laneIdOf:c(a=>{let y=d.get(a);if(y!==void 0)return y;let l=i(a,s);return d.set(a,l),l},"laneIdOf"),poolIdOf:c(a=>o.has(a)?a:i(a,o),"poolIdOf"),lanesByPool:r,hasPools:o.size>0}}c(he,"buildLaneModel");var hi=new Set(["top","right","bottom","left"]),$n=8,gi=1e4;function ze(t){let e=t?.metadata?.anchorTo;if(!e||typeof e!="object")return;let{hostId:n,side:o,slot:s,gap:r}=e;if(!(typeof n!="string"||n.length===0||n===t?.id))return{hostId:n,...typeof o=="string"&&hi.has(o)?{side:o}:{},...typeof s=="number"&&Number.isFinite(s)?{slot:s}:{},...typeof r=="number"&&Number.isFinite(r)&&r>0?{gap:Math.min(r,gi)}:{}}}c(ze,"readAnchor");function Sn(t,e){let n=new Set([t]),o=ze(e.get(t))?.hostId;for(;o&&!n.has(o);){let s=e.get(o);if(!s)return;let r=ze(s)?.hostId;if(!r)return o;n.add(o),o=r}}c(Sn,"resolveAnchorHostId");function Ve(t){let e=new Map(t.map(o=>[o.id,o])),n=new Set;for(let o of t)ze(o)&&Sn(o.id,e)&&n.add(o.id);return n}c(Ve,"collectAnchoredIds");function hs(t,e){return t==="canonical"?"right":e==="LR"||e==="RL"?"bottom":"right"}c(hs,"defaultAnchorSide");function gs(t,e){let n=t.anchor.slot,o=e.anchor.slot;return n!==void 0&&o!==void 0&&n!==o?n-o:n!==void 0&&o===void 0?-1:n===void 0&&o!==void 0?1:t.index-e.index}c(gs,"compareBucketEntries");function ps(t){let e=t.reduce((s,r)=>s+r,0)+$n*Math.max(0,t.length-1),n=[],o=-e/2;for(let s of t)n.push(o+s/2),o+=s+$n;return{offsets:n,total:e}}c(ps,"packAlongBorder");var pi=c(t=>[t.width,t.height].every(e=>e===void 0||Number.isFinite(e)),"hasUsableSize");function ms(t,e){let n=new Map(t.map(s=>[s.id,s])),o=new Map;t.forEach((s,r)=>{let i=ze(s);if(!i||!pi(s))return;let d=Sn(s.id,n);if(!d)return;let u=e(i),a=`${u}:${d}`,y=o.get(a)??[];y.push({node:s,anchor:i,index:r,side:u,hostId:d}),o.set(a,y)});for(let s of o.values())s.sort(gs);return o}c(ms,"bucketByHostAndSide");function ys(t,e,n,o){let s=!e&&n>0?-(o+$n):0;return t+s}c(ys,"centreAlongBorder");function xs(t,e){let n=e==="top"||e==="bottom",o=c(a=>n?a.width??0:a.height??0,"alongBorder"),s=c(a=>n?a.height??0:a.width??0,"reach"),{offsets:r}=ps(t.map(a=>o(a.node))),i=0,d=0,u=0;return t.forEach((a,y)=>{let l=a.anchor.gap??0,x=o(a.node)/2,m=ys(r[y],n,l,x);i=Math.max(i,x-m),d=Math.max(d,m+x),u=Math.max(u,l>0?l+s(a.node):0)}),{before:i,after:d,beyond:u}}c(xs,"footprintOf");function bs(t,e){let n=hs("final",e??"TB"),o=new Map;for(let s of ms(t,r=>r.side??n).values()){if(!s.some(d=>d.anchor.gap))continue;let{hostId:r,side:i}=s[0];o.set(r,{...o.get(r),[i]:xs(s,i)})}return o}c(bs,"anchorFootprints");var Dn="__swimlane_default__",mi=21,ss=20;function zn(t){return Math.max(t.padding??ss,ss)}c(zn,"topLaneHorizontalPadding");function Ms(t){let{x:e,y:n,width:o,height:s}=t,r=t.swimlaneContentTop;if(typeof e!="number"||typeof n!="number"||typeof o!="number"||typeof s!="number"||typeof r!="number"||!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(s)||!Number.isFinite(r)||o<=0||s<=0){delete t.groupTitleRect;return}let i=n-s/2,d=Math.min(r,n+s/2),u=Math.min(mi,Math.max(0,d-i)),a=i+u;if(a<=i){delete t.groupTitleRect;return}t.groupTitleRect={left:e-o/2,right:e+o/2,top:i,bottom:a}}c(Ms,"assignTopLaneTitleRect");function Is(t){let e=t.other?.droppedSubGraphMembers;return Array.isArray(e)?e:[]}c(Is,"sharedMembers");var yi=c((t,e,n)=>!e.some(o=>o.parentId===n)&&!(t.edges??[]).some(o=>o.start===n||o.end===n),"isEmptyLane");function Ss(t,e){return t.isLane(e)?e:t.laneIdOf(e)??void 0}c(Ss,"laneIdOrSelf");function Cs(t,e,n){for(let o of n){let s=e.findIndex(r=>r.id===o);s>=0&&yi(t,e,o)&&e.splice(s,1)}}c(Cs,"removeEmptyLanes");function vs(t,e){let n=he(e),o=new Set(e.filter(r=>n.isLane(r.id)).map(r=>r.id)),s=new Set;for(let{node:r,keptBy:i,droppedFrom:d}of Is(t)){let u=Ss(n,i);u&&u!==d&&o.has(d)&&(De.warn(`Swimlane node "${r}" is listed in lanes "${u}" and "${d}"; it is drawn in "${u}" only.`),s.add(d))}Cs(t,e,s)}c(vs,"dropLanesEmptiedBySharedNodes");function Ls(t,e){for(let n of t)n.isGroup&&!e.isLane(n.id)&&!e.isPool(n.id)&&De.warn(`Swimlane subgraph "${n.id}" is nested in "${n.parentId}"; only top-level subgraphs are lanes, so it is drawn as a plain box.`)}c(Ls,"warnAboutNestedGroups");function ws(t){let e=t.direction,n=t.nodes??=[];vs(t,n);let o=he(n);Ls(n,o);for(let i of n){let d=o.isLane(i.id);!d&&!o.isPool(i.id)||(i.shape=d?"swimlane":"pool",e&&(i.direction=e))}let s=n.filter(i=>!i.isGroup&&!i.parentId);if(s.length===0)return;let r=n.find(i=>i.id===Dn);r?r.isGroup&&(r.shape="swimlane",e&&(r.direction=e)):(r={id:Dn,label:"",isGroup:!0,shape:"swimlane",padding:20,look:t.config?.look,colorIndex:n.reduce((i,d)=>Math.max(i,d.colorIndex??-1),-1)+1,...e?{direction:e}:{}},n.push(r));for(let i of s)i.parentId=Dn}c(ws,"prepareLayoutForSwimlanes");function Es(t){let e=(t.nodes??[]).filter(l=>!l.isEdgeLabel),n=new Map(e.map(l=>[l.id,l])),o=Ve(e),s=c(l=>o.has(l)?Sn(l,n)??l:l,"hostOf"),r=new Map;for(let l of e)o.has(l.id)||r.set(l.id,l);let i=[];for(let l of t.edges??[]){let x=typeof l.start=="string"?l.start:void 0,m=typeof l.end=="string"?l.end:void 0;if(!x||!m||l.isLayoutOnly)continue;let p=s(x),f=s(m);p!==f&&i.push({id:l.id,src:p,dst:f,ref:l})}let d=e.filter(l=>l.isGroup&&!o.has(l.id)),u=e.filter(l=>!l.isGroup&&!o.has(l.id));return{nodes:[...[...d].reverse(),...u].map(l=>l.id),edges:i,layout:t,nodeById:r}}c(Es,"toGraphView");function As(t){let e=new Map(t.map(o=>[o.id,o])),n=c(o=>{let s=0,r=o.parentId,i=new Set([o.id]);for(;r!=null&&!i.has(r);)i.add(r),s++,r=e.get(r)?.parentId;return s},"depthOf");return t.filter(o=>o?.isGroup).map(o=>({node:o,depth:n(o)})).sort((o,s)=>s.depth-o.depth).map(o=>o.node)}c(As,"groupsDeepestFirst");function Rs(t,e,n,o){let{layout:s}=t,r=t.nodeById,i=o?.layerGap??100,d=o?.nodeGap??40,u=0;for(let p of e.layers){let f=0;for(let h of p){let M=r.get(h);if(!M){f++;continue}M.layer=u,M.order=f;let I=n.x[h]??f*d,C=n.y[h]??u*i;M.x=I,M.y=C,f++}u++}let a=s.nodes??[],y=Ve(a);for(let p of a)p.isEdgeLabel&&n.x[p.id]!=null&&n.y[p.id]!=null&&(p.x=n.x[p.id],p.y=n.y[p.id]);let l=new Map,x=he(a),m=[];for(let p of As(a)){x.isLane(p.id)&&m.push(p);let f=a.filter(w=>w.parentId===p.id&&!y.has(w.id)),h=1/0,M=-1/0,I=1/0,C=-1/0;for(let w of f){let S=w.x??n.x[w.id],b=w.y??n.y[w.id],L=w.width??0,E=w.height??0;S!=null&&b!=null&&(w.isEdgeLabel||(h=Math.min(h,S-L/2),M=Math.max(M,S+L/2)),I=Math.min(I,b-E/2),C=Math.max(C,b+E/2))}if(h===1/0||I===1/0)p.x=p.x??0,p.y=p.y??0,p.width=p.width??0,p.height=p.height??0;else{let w=p.padding??20,S=p.parentId?w:2*zn(p),b=w,L=Math.max(0,M-h)+S,E=Math.max(0,C-I)+b,B=(h+M)/2,P=(I+C)/2;p.x=B,p.y=P,p.width=L,p.height=E,l.set(p.id,{minX:h,maxX:M,minY:I,maxY:C})}}if(m.length>0&&l.size>0){let p=1/0,f=-1/0,h=0;for(let M of m){let I=M.padding??20;I>h&&(h=I);let C=l.get(M.id);C&&(p=Math.min(p,C.minY),f=Math.max(f,C.maxY))}if(p!==1/0&&f!==-1/0){let M=Math.max(0,f-p),C=Math.max(h,36),w=M+2*C,S=(p+f)/2;for(let N of m)N.y=S,N.height=w,N.swimlaneContentTop=p;let b=[...m].sort((N,F)=>{let U=N.x??0,G=F.x??0;return U-G}),L=[],E=[],B=[];for(let N of b){let F=l.get(N.id);if(!F)continue;let U=Math.max(0,F.maxX-F.minX)+2*zn(N),G=(F.minX+F.maxX)/2;L.push(N.id),E.push(G),B.push(U)}let P=L.length;if(P>0){let N=new Map;if(P===1)N.set(L[0],B[0]);else{let F=[];for(let ft=0;ft<P-1;ft++)F.push(E[ft+1]-E[ft]);let U=new Array(P);U[0]=0;for(let ft=0;ft<P-1;ft++)U[ft+1]=2*F[ft]-U[ft];let G=0,Z=Number.POSITIVE_INFINITY;for(let ft=0;ft<P;ft++){let At=B[ft];ft%2===0?G=Math.max(G,At-U[ft]):Z=Math.min(Z,U[ft]-At)}let it=G;G<=Z?it=(G+Z)/2:it=G;for(let ft=0;ft<P;ft++){let At=U[ft]+(ft%2===0?it:-it),te=Math.max(B[ft],At);N.set(L[ft],te)}}for(let F of m){let U=N.get(F.id);U!=null&&(F.width=U),Ms(F)}}}}}c(Rs,"writeBackToLayoutData");var xi="[EdgeLabelNodes]";function Ts(t){let e=[],n=[],o=new Map;for(let i of t.nodes)o.set(i.id,i);for(let i of t.edges){if(!i.label||i.label.length===0||i.isLayoutOnly||i.labelNodeId)continue;let d=i.start?o.get(i.start):void 0,u=i.end?o.get(i.end):void 0;if(!d||!u){De.warn(xi,`Edge ${i.id} has missing source or target node`);continue}let a=`edge-label-${i.start}-${i.end}-${i.id}`,l=d.parentId!==u.parentId?u.parentId:d.parentId,x={id:a,label:i.label,edgeStart:i.start??"",edgeEnd:i.end??"",shape:"labelRect",width:0,height:0,isEdgeLabel:!0,isDummy:!0,parentId:l,isGroup:!1,labelStyle:Array.isArray(i.labelStyle)?i.labelStyle[0]:i.labelStyle??"",...d.dir?{dir:d.dir}:{}};e.push(x),i.labelNodeId=a,i.label=void 0,i.text=void 0;let m={id:`${i.id}-to-label`,start:i.start,end:a,type:"normal",isLayoutOnly:!0},p={id:`${i.id}-from-label`,start:a,end:i.end,type:"normal",isLayoutOnly:!0};n.push(m,p)}let s=[...t.nodes,...e],r=[...t.edges,...n];return{...t,nodes:s,edges:r}}c(Ts,"createEdgeLabelNodes");var jt=.001;function vo(t){let e=t.x??0,n=t.y??0,o=t.width??0,s=t.height??0;return o>0&&s>0?{cx:e,cy:n,rect:Ye(e,n,o,s)}:void 0}c(vo,"measuredNodeRect");function Lo(t){if(t.isGroup)return;let e=vo(t);return e?{id:String(t.id??""),cx:e.cx,cy:e.cy,rect:e.rect}:void 0}c(Lo,"nodeBoundsInfoFor");function de(t,e,n=jt){return Math.abs(t.x-e.x)<n&&Math.abs(t.y-e.y)<n}c(de,"samePoint");function It(t,e,n=jt){return Math.abs(t.x-e.x)<n}c(It,"sameX");function Ct(t,e,n=jt){return Math.abs(t.y-e.y)<n}c(Ct,"sameY");function _t(t,e,n=jt){return Ct(t,e,n)&&Math.abs(t.x-e.x)>n}c(_t,"isHorizontalSegment");function Dt(t,e,n=jt){return It(t,e,n)&&Math.abs(t.y-e.y)>n}c(Dt,"isVerticalSegment");function Qt(t,e,n,o){return Math.max(0,Math.min(Math.max(t,e),Math.max(n,o))-Math.max(Math.min(t,e),Math.min(n,o)))}c(Qt,"overlapLength");function pe(t,e,n=jt){return t.horizontal&&e.horizontal&&Ct(t.a,e.a,n)?Qt(t.a.x,t.b.x,e.a.x,e.b.x):t.vertical&&e.vertical&&It(t.a,e.a,n)?Qt(t.a.y,t.b.y,e.a.y,e.b.y):0}c(pe,"sameAxisSegmentOverlapLength");function we(t,e=jt){let n=[];for(let o=0;o<t.length-1;o++){let s=t[o],r=t[o+1],i=_t(s,r,e),d=Dt(s,r,e);(i||d)&&n.push({index:o,a:s,b:r,horizontal:i,vertical:d})}return n}c(we,"orthogonalSegmentsForPoints");function ce(t,e=jt){let n=we(t,e),o=0;for(let s=1;s<n.length;s++)n[s-1].horizontal!==n[s].horizontal&&o++;return o}c(ce,"countOrthogonalBends");function Os(t){let e=we(vt(t));return e.slice(1).flatMap((n,o)=>e[o].horizontal===n.horizontal?[]:[n.a])}c(Os,"bendPoints");function Ns(t,e){let n=Math.max(Math.min(e.a.x,e.b.x)-t.x,0,t.x-Math.max(e.a.x,e.b.x)),o=Math.max(Math.min(e.a.y,e.b.y)-t.y,0,t.y-Math.max(e.a.y,e.b.y));return Math.hypot(n,o)}c(Ns,"distanceToSegment");function Bs(t,e,n){let o=c((s,r)=>{let i=we(vt(r));return Os(s).some(d=>i.some(u=>Ns(d,u)<n))},"touches");return o(t,e)||o(e,t)}c(Bs,"routesTouchAtBend");function vt(t,e=jt){let n=[];for(let o of t){let s=n.length>0?n[n.length-1]:void 0;(!s||!de(s,o,e))&&n.push({x:o.x,y:o.y})}return n}c(vt,"dedupeConsecutivePoints");function wo(t,e=jt){if(!t||t.length!==4)return;let[n,o,s,r]=t;return _t(n,o,e)&&Dt(o,s,e)&&_t(s,r,e)?{kind:"HVH",p0:n,p1:o,p2:s,p3:r}:Dt(n,o,e)&&_t(o,s,e)&&Dt(s,r,e)?{kind:"VHV",p0:n,p1:o,p2:s,p3:r}:void 0}c(wo,"classifyThreeSegmentRoute");function Cn(t,e,n,o=0){let s=Math.min(t.x,e.x),r=Math.max(t.x,e.x),i=Math.min(t.y,e.y),d=Math.max(t.y,e.y);return r>n.left-o&&s<n.right+o&&d>n.top-o&&i<n.bottom+o}c(Cn,"segmentBoundsOverlapRect");function Eo(t,e,n=0){return t.x>e.left+n&&t.x<e.right-n&&t.y>e.top+n&&t.y<e.bottom-n}c(Eo,"pointInsideRect");function Fs(t,e){return t.left<=e.left&&t.right>=e.right&&t.top<=e.top&&t.bottom>=e.bottom}c(Fs,"rectContainsRect");function hn(t,e){return t.left<e.right&&t.right>e.left&&t.top<e.bottom&&t.bottom>e.top}c(hn,"rectsOverlap");function Un(t,e){return{left:t.left-e,right:t.right+e,top:t.top-e,bottom:t.bottom+e}}c(Un,"inflateRect");function Ye(t,e,n,o){return{left:t-n/2,right:t+n/2,top:e-o/2,bottom:e+o/2}}c(Ye,"rectFromCenterSize");function se(t){return vo(t)?.rect}c(se,"rectOfNodeBounds");function Fe(t,e){switch(e){case"top":return{x:t.cx,y:t.rect.top};case"bottom":return{x:t.cx,y:t.rect.bottom};case"left":return{x:t.rect.left,y:t.cy};case"right":return{x:t.rect.right,y:t.cy}}}c(Fe,"portForRectSide");function Ao(t,e,n,o,s,r=jt){let i=e==="left"||e==="right",d=o==="left"||o==="right";if(i&&d){if(e==="right"&&o==="left"&&t.x<n.x||e==="left"&&o==="right"&&t.x>n.x){if(Ct(t,n,r))return[t,n];let l=(t.x+n.x)/2;return[t,{x:l,y:t.y},{x:l,y:n.y},n]}if(e===o){if(Ct(t,n,r))return;let l=e==="left"?Math.min(t.x,n.x)-s:Math.max(t.x,n.x)+s;return[t,{x:l,y:t.y},{x:l,y:n.y},n]}return}if(!i&&!d){if(e===o){if(It(t,n,r))return;let x=e==="top"?Math.min(t.y,n.y)-s:Math.max(t.y,n.y)+s;return[t,{x:t.x,y:x},{x:n.x,y:x},n]}if(!(e==="bottom"&&o==="top"&&t.y<n.y||e==="top"&&o==="bottom"&&t.y>n.y))return;if(It(t,n,r))return[t,n];let l=(t.y+n.y)/2;return[t,{x:t.x,y:l},{x:n.x,y:l},n]}if(i&&!d){let y=e==="right"&&n.x>t.x||e==="left"&&n.x<t.x,l=o==="top"&&t.y<n.y||o==="bottom"&&t.y>n.y;return y&&l?[t,{x:n.x,y:t.y},n]:void 0}let u=e==="bottom"&&n.y>t.y||e==="top"&&n.y<t.y,a=o==="left"&&t.x<n.x||o==="right"&&t.x>n.x;return u&&a?[t,{x:t.x,y:n.y},n]:void 0}c(Ao,"buildOrthogonalPortPath");function Ro(t,e,n,o){return e==="left"||e==="right"?[t,{x:o,y:t.y},{x:o,y:n.y},n]:[t,{x:t.x,y:o},{x:n.x,y:o},n]}c(Ro,"buildSameSideTrackPath");function vn(t){let e=new Map,n=[];for(let o of t){if(o.isEdgeLabel)continue;let s=Lo(o);s&&(e.set(s.id,s),n.push({id:s.id,rect:s.rect}))}return{nodeInfoById:e,realNodeRects:n}}c(vn,"collectRealNodeBounds");function Ee(t){let e=[],n=[];for(let o of t){let s=Lo(o);if(!s)continue;let r={id:s.id,rect:s.rect};o.isEdgeLabel?n.push(r):e.push(r)}return{realNodeRects:e,labelNodeRects:n}}c(Ee,"collectNodeRectEntries");function Ps(t,{includeEdgeLabels:e=!0}={}){let n=[];for(let o of t){if(o.isGroup||!e&&o.isEdgeLabel)continue;let s=o.x??0,r=o.y??0,i=o.width??0,d=o.height??0;n.push({nodeId:o.id,...Ye(s,r,i,d)})}return n}c(Ps,"collectLayoutNodeRects");function To(t,e,n=jt){let o=t.start,s=t.end;if(!o||!s)return;let r=e.get(o),i=e.get(s);if(!(!r||!i))return{srcId:o,dstId:s,srcInfo:r,dstInfo:i,collinearX:Math.abs(r.cx-i.cx)<n,collinearY:Math.abs(r.cy-i.cy)<n}}c(To,"getNodePairGeometry");function Xt(t,e,n,o=[],s=0){for(let r of n)if(!o.includes(r.id)&&Cn(t,e,r.rect,-s))return!0;return!1}c(Xt,"segmentHitsAnyRect");function Oo(t,e,n,o,s=jt,r=1e-6){let i=Ct(t,e,s),d=It(t,e,s),u=Ct(n,o,s),a=It(n,o,s);if(i&&u||d&&a||!(i||d)||!(u||a))return!1;let y=i?{a:t,b:e}:{a:n,b:o},l=d?{a:t,b:e}:{a:n,b:o},x=y.a.y,m=Math.min(y.a.x,y.b.x),p=Math.max(y.a.x,y.b.x),f=l.a.x,h=Math.min(l.a.y,l.b.y),M=Math.max(l.a.y,l.b.y);if(f<m||f>p||x<h||x>M)return!1;let I=Math.abs(f-y.a.x)<r&&Math.abs(x-y.a.y)<r||Math.abs(f-y.b.x)<r&&Math.abs(x-y.b.y)<r,C=Math.abs(f-l.a.x)<r&&Math.abs(x-l.a.y)<r||Math.abs(f-l.b.x)<r&&Math.abs(x-l.b.y)<r;return!(I&&C)}c(Oo,"orthogonalSegmentsCross");function ks(t,e,n,o,s=jt){let r=Ct(t,e,s),i=It(t,e,s),d=Ct(n,o,s),u=It(n,o,s);return i&&u&&It(t,n,s)?Qt(t.y,e.y,n.y,o.y)>s:r&&d&&Ct(t,n,s)?Qt(t.x,e.x,n.x,o.x)>s:!1}c(ks,"sameAxisSegmentsOverlap");function gn(t,e,n,o,{epsilon:s=jt,skipDegenerateOther:r=!1}={}){for(let i of n){if(i===o||i.isLayoutOnly)continue;let d=i.points;if(!(!d||d.length<2))for(let u=0;u<d.length-1;u++){let a=d[u],y=d[u+1];if(!(r&&de(a,y,s))&&(Oo(t,e,a,y,s)||ks(t,e,a,y,s)))return!0}}return!1}c(gn,"segmentConflictsWithAnyEdge");function be(t,e,n,o,s=jt){let r=Ct(t,e,s),i=It(t,e,s),d=Ct(n,o,s),u=It(n,o,s);if(!(r&&u||i&&d))return!1;let a=r?{a:t,b:e}:{a:n,b:o},y=r?{a:n,b:o}:{a:t,b:e},l=a.a.y,x=Math.min(a.a.x,a.b.x),m=Math.max(a.a.x,a.b.x),p=y.a.x,f=Math.min(y.a.y,y.b.y),h=Math.max(y.a.y,y.b.y);return p>x+s&&p<m-s&&l>f+s&&l<h-s}c(be,"orthogonalSegmentsStrictlyCross");function Vn(t,e,n){let o=Math.min(e,n),s=Math.max(e,n);return t>o+jt&&t<s-jt}c(Vn,"strictlyBetween");function _s(t,e,n){return It(t,e)&&It(e,n)?Vn(e.y,t.y,n.y):Ct(t,e)&&Ct(e,n)?Vn(e.x,t.x,n.x):!1}c(_s,"isCollinearIntermediate");function Ds(t){let e=!1,n=[];for(let o=0;o<t.length;o++){let s=n[n.length-1],r=t[o],i=o+1<t.length?t[o+1]:void 0;if(s&&i){if(de(s,i)){o++,e=!0;continue}if(_s(s,r,i)){e=!0;continue}}n.push(r)}return{points:n,changed:e}}c(Ds,"simplifyPolylineOnce");function pn(t){let e=[t[0]];for(let o=1;o<t.length;o++){let s=e[e.length-1],r=t[o];if(!It(s,r)&&!Ct(s,r)){let i=e.length>=2?e[e.length-2]:void 0,u=(i?It(i,s):!1)?{x:s.x,y:r.y}:{x:r.x,y:s.y};e.push(u)}e.push(r)}let n=[];for(let o of e){let s=n[n.length-1];(!s||!de(s,o))&&n.push(o)}return n}c(pn,"orthogonalizePolyline");function me(t){if(t.length<3)return t;let e=[...t];for(let n=0;n<32;n++){let o=Ds(e);if(e=o.points,!o.changed)break}return e}c(me,"simplifyPolyline");var ht=.001,bi=.5,rs=4;function No(t,e,n){let o=t;if(o.isLayoutOnly||!o.points||o.points.length<n)return;let s=o.start?e.get(o.start):void 0,r=o.end?e.get(o.end):void 0;return{edge:o,points:o.points,srcRect:s?se(s):void 0,dstRect:r?se(r):void 0}}c(No,"endpointContextFor");function Hs(t,e,n){if(Ct(t,e,ht))return{x:t.x<n.left?n.left:n.right,y:t.y};if(It(t,e,ht)){let o=t.y<n.top?n.top:n.bottom;return{x:t.x,y:o}}return{x:Math.min(n.right,Math.max(n.left,t.x)),y:Math.min(n.bottom,Math.max(n.top,t.y))}}c(Hs,"segmentEnterPoint");function jn(t,e,n){let o=n?1:-1,s=n?0:t.length-1;for(;s>=0&&s<t.length&&Eo(t[s],e,bi);)s+=o;if(s<0||s>=t.length)return t;let r=s-o;if(r<0||r>=t.length)return t;let i=Hs(t[s],t[r],e);return n?[i,...t.slice(s)]:[...t.slice(0,s+1),i]}c(jn,"clipEndpoint");function Xs(t,e){for(let n of t){let o=No(n,e,2);if(!o)continue;let s=[...o.points];o.srcRect&&(s=jn(s,o.srcRect,!0)),o.dstRect&&(s=jn(s,o.dstRect,!1)),s=me(pn(s)),s=Bo(s,o.srcRect,o.dstRect),o.edge.points=me(pn(s))}}c(Xs,"clipEdgeEndpointsToNodeBoundaries");function Wn(t,e,n,o=!1){if(Ct(t,e,ht)){if(e.y<n.top-ht||e.y>n.bottom+ht)return e;if(o){if(t.x<n.left-ht)return{x:n.left,y:t.y};if(t.x>n.right+ht)return{x:n.right,y:t.y}}return{x:Math.abs(e.x-n.left)<=Math.abs(e.x-n.right)?n.left:n.right,y:t.y}}if(It(t,e,ht)){if(e.x<n.left-ht||e.x>n.right+ht)return e;if(o){if(t.y<n.top-ht)return{x:t.x,y:n.top};if(t.y>n.bottom+ht)return{x:t.x,y:n.bottom}}let s=Math.abs(e.y-n.top)<=Math.abs(e.y-n.bottom);return{x:t.x,y:s?n.top:n.bottom}}return e}c(Wn,"snapEndpointToBoundary");function mn(t,e,n){let o=t[e];for(let s=e+n;s>=0&&s<t.length;s+=n){let r=t[s];if(!de(r,o,ht))return r}return t[e+n]}c(mn,"firstDistinctAdjacent");function yn(t,e){let n=t+rs,o=e-rs;return n<=o?{lo:n,hi:o}:{lo:(t+e)/2,hi:(t+e)/2}}c(yn,"cornerClearanceRange");function Kn(t,e,n){let{lo:o,hi:s}=yn(e,n);return Math.min(s,Math.max(o,t))}c(Kn,"clampToCornerClearance");function Ys(t){let e=Math.max(...t.map(o=>o.lo)),n=Math.min(...t.map(o=>o.hi));if(!(e>n))return{lo:e,hi:n}}c(Ys,"intersectRanges");function qn(t,e){return e==="left"||e==="right"?yn(t.top,t.bottom):yn(t.left,t.right)}c(qn,"clearanceRangeForSide");function xn(t,e,n){let o=t.y>=n.top-ht&&t.y<=n.bottom+ht,s=t.x>=n.left-ht&&t.x<=n.right+ht;if(Ct(t,e,ht)&&o){if(Math.abs(t.x-n.left)<ht)return"left";if(Math.abs(t.x-n.right)<ht)return"right"}if(It(t,e,ht)&&s){if(Math.abs(t.y-n.top)<ht)return"top";if(Math.abs(t.y-n.bottom)<ht)return"bottom"}}c(xn,"terminalSideForSegment");function Ue(t){return t==="left"||t==="right"}c(Ue,"isHorizontalSide");function Gs(t,e,n,o,s){let r=[],i=n?xn(t,e,n):void 0,d=o?xn(e,t,o):void 0;return n&&i&&Ue(i)===s&&r.push(qn(n,i)),o&&d&&Ue(d)===s&&r.push(qn(o,d)),r.length>0?Ys(r):void 0}c(Gs,"straightClearanceRange");function Jn(t,e,n,o,s){let r=Gs(t,e,n,o,s);if(!r)return;let i=s?t.y:t.x,d=Math.min(r.hi,Math.max(r.lo,i));if(!(Math.abs(d-i)<ht))return s?[{x:t.x,y:d},{x:e.x,y:d}]:[{x:d,y:t.y},{x:d,y:e.y}]}c(Jn,"clearStraightEndpointCornerAxis");function Bo(t,e,n){if(t.length!==2)return t;let[o,s]=t;return Ct(o,s,ht)?Jn(o,s,e,n,!0)??t:It(o,s,ht)?Jn(o,s,e,n,!1)??t:t}c(Bo,"clearStraightEndpointCornerConnections");function $s(t,e,n){return Ue(n)?{x:t.x,y:Kn(t.y,e.top,e.bottom)}:{x:Kn(t.x,e.left,e.right),y:t.y}}c($s,"cornerClearedEndpoint");function zs(t,e,n,o,s,r){let i=t.map(d=>({...d}));for(let d=e;d>=0&&d<t.length;d+=n){let u=t[d];if(r&&!Ct(u,o,ht)||!r&&!It(u,o,ht))break;r?i[d].y=s.y:i[d].x=s.x}return i}c(zs,"moveCollinearEndpointRun");function Zn(t,e,n){if(t.length<2)return t;let o=n?0:t.length-1,s=n?1:-1,r=t[o],i=mn(t,o,s);if(!i)return t;let d=xn(r,i,e);if(!d)return t;let u=Ue(d),a=$s(r,e,d);return de(r,a,ht)?t:zs(t,o,s,r,a,u)}c(Zn,"clearEndpointCornerConnection");function Qn(t,e,n){let o=Math.min(t.x,e.x)>=n.left-ht&&Math.max(t.x,e.x)<=n.right+ht,s=Math.min(t.y,e.y)>=n.top-ht&&Math.max(t.y,e.y)<=n.bottom+ht;if(Math.abs(t.y-n.top)<ht&&Math.abs(e.y-n.top)<ht&&o)return"top";if(Math.abs(t.y-n.bottom)<ht&&Math.abs(e.y-n.bottom)<ht&&o)return"bottom";if(Math.abs(t.x-n.left)<ht&&Math.abs(e.x-n.left)<ht&&s)return"left";if(Math.abs(t.x-n.right)<ht&&Math.abs(e.x-n.right)<ht&&s)return"right"}c(Qn,"borderSideForSegment");function to(t,e,n,o){switch(t){case"top":return It(e,n,ht)&&n.y<o.top-ht;case"bottom":return It(e,n,ht)&&n.y>o.bottom+ht;case"left":return Ct(e,n,ht)&&n.x<o.left-ht;case"right":return Ct(e,n,ht)&&n.x>o.right+ht}}c(to,"leavesOutward");function eo(t,e,n){if(t.length<3)return t;if(n){let r=Qn(t[0],t[1],e);return r&&to(r,t[1],t[2],e)?t.slice(1):t}let o=t.length-1,s=Qn(t[o-1],t[o],e);return s&&to(s,t[o-1],t[o-2],e)?t.slice(0,o):t}c(eo,"collapseOwnBorderStub");function Us(t,e,n){let o=t;if(e){let r=mn(o,0,1);if(r){let i=Wn(r,o[0],e);i!==o[0]&&(o=[i,...o.slice(1)])}o=eo(o,e,!0)}if(n){let r=o.length-1,i=mn(o,r,-1);if(i){let d=Wn(i,o[r],n,!0);d!==o[r]&&(o=[...o.slice(0,r),d])}o=eo(o,n,!1)}let s=Bo(o,e,n);return s!==o||o.length===2?s:(e&&(o=Zn(o,e,!0)),n&&(o=Zn(o,n,!1)),o)}c(Us,"snapAndCollapseEndpoints");function no(t,e){for(let n of t){let o=No(n,e,2);if(!o)continue;let s=vt(o.points,ht),r=Us(s,o.srcRect,o.dstRect);if(r.length<3){o.edge.points=r;continue}let i=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];o.edge.points=i}}c(no,"prepareEdgeEndpointsForRenderer");function Vs(t){return new Map(t.map(e=>[e.id,e]))}c(Vs,"buildNodeMap");function oo(t,e){let n=new Set([t.id]),o=0,s=t.parentId;for(;s&&!n.has(s);){let r=e.get(s);if(!r?.isGroup)break;n.add(s),o++,s=r.parentId}return o}c(oo,"groupDepth");function Fo(t){let e=1/0,n=-1/0,o=1/0,s=-1/0;for(let r of t){let i=r.x,d=r.y;if(typeof i!="number"||typeof d!="number")continue;let u=r.width??0,a=r.height??0;e=Math.min(e,i-u/2),n=Math.max(n,i+u/2),o=Math.min(o,d-a/2),s=Math.max(s,d+a/2)}return e===1/0||o===1/0?null:{minX:e,maxX:n,minY:o,maxY:s}}c(Fo,"boundsForChildren");function js(t,e){let n=t.padding??20;t.x=(e.minX+e.maxX)/2,t.y=(e.minY+e.maxY)/2,t.width=Math.max(0,e.maxX-e.minX)+n,t.height=Math.max(0,e.maxY-e.minY)+n}c(js,"applyGroupBounds");function Ws(t){let e=Vs(t),n=t.filter(o=>o.isGroup&&o.parentId).sort((o,s)=>oo(s,e)-oo(o,e));for(let o of n){let s=t.filter(i=>i.parentId===o.id),r=Fo(s);r&&js(o,r)}}c(Ws,"recomputeNestedGroupBounds");function bn(t,e){let n=t.nodes??[],o=t.edges??[],s=n.filter(u=>!u.isGroup),r=1/0,i=-1/0;for(let u of s){let a=u[e];typeof a=="number"&&(r=Math.min(r,a),i=Math.max(i,a))}if(!Number.isFinite(r)||!Number.isFinite(i))return!1;let d=c(u=>r+i-u,"mirror");for(let u of n){let a=u[e];typeof a=="number"&&(u[e]=d(a));let y=u.groupTitleRect;y&&(u.groupTitleRect=e==="x"?{...y,left:d(y.right),right:d(y.left)}:{...y,top:d(y.bottom),bottom:d(y.top)})}for(let u of o)for(let a of u.points??[])a[e]=d(a[e]);return!0}c(bn,"mirrorAxis");function Ks(t){return(t.nodes??[]).some(n=>!n.isGroup)?bn(t,"y"):!0}c(Ks,"applyBtDirectionTransform");function Po(t){let e=t.filter(i=>!i.isGroup&&!i.isEdgeLabel);if(e.length===0)return 1;let n=0,o=0;for(let i of e)n+=i.width??0,o+=i.height??0;let s=n/e.length,r=o/e.length;return r>0?Math.max(1,s/r):1}c(Po,"flowAxisStretch");var Mi=36,Ii=["top","right","bottom","left"];function qs(t){return t==="left"?"right":t==="right"?"left":t}c(qs,"mirroredSide");function Js(t,e,n,o,s){if(n==="top"||n==="bottom"){let i=(e.left+e.right)/2,[d,u]=s?[o.after,o.before]:[o.before,o.after];t.left=Math.min(t.left,i-d),t.right=Math.max(t.right,i+u);return}let r=(e.top+e.bottom)/2;t.top=Math.min(t.top,r-o.before),t.bottom=Math.max(t.bottom,r+o.after)}c(Js,"growAlongBorder");var Si={top:c((t,e,n)=>{t.top=Math.min(t.top,e.top-n)},"top"),bottom:c((t,e,n)=>{t.bottom=Math.max(t.bottom,e.bottom+n)},"bottom"),left:c((t,e,n)=>{t.left=Math.min(t.left,e.left-n)},"left"),right:c((t,e,n)=>{t.right=Math.max(t.right,e.right+n)},"right")};function Zs(t,e,n,o,s){Js(t,e,n,o,s),Si[n](t,e,o.beyond)}c(Zs,"reserveOnSide");function Qs(t,e,n){let o=t.x??0,s=t.y??0,r=(t.width??0)/2,i=(t.height??0)/2,d={left:o-r,right:o+r,top:s-i,bottom:s+i},u={...d},a=n==="RL";for(let y of Ii){let l=e[y];l&&Zs(u,d,a?qs(y):y,l,a)}return{...t,x:(u.left+u.right)/2,y:(u.top+u.bottom)/2,width:u.right-u.left,height:u.bottom-u.top}}c(Qs,"withAnchorFootprints");function tr(t,e="LR"){let n=t.nodes??[],o=t.edges??[],s=Ve(n),r=n.filter(N=>!N.isGroup&&!s.has(N.id)),i=1/0,d=1/0;for(let N of r){let F=N.x??0,U=N.y??0;F<i&&(i=F),U<d&&(d=U)}if(!Number.isFinite(i)||!Number.isFinite(d))return!1;let u=Mi,a=Po(r);for(let N of r){let F=N.x??0,G=((N.y??0)-d)*a+u,Z=F-i;N.x=G,N.y=Z}for(let N of o)if(N.points)for(let F of N.points){let U=F.x,Z=(F.y-d)*a+u,it=U-i;F.x=Z,F.y=it}Ws(n);let y=he(n),l=n.filter(N=>y.isLane(N.id));if(l.length===0)return e==="RL"&&bn(t,"x"),!0;let x=new Map,m=bs(n,e);for(let N of n){if(y.isLane(N.id)||y.isPool(N.id)||s.has(N.id))continue;let F=y.laneIdOf(N.id);if(!F)continue;let U=x.get(F)??[],G=m.get(N.id);U.push(G?Qs(N,G,e):N),x.set(F,U)}let p=0;for(let N of l){let F=N.padding??0;F>p&&(p=F)}let f=[],h=1/0,M=-1/0;for(let N of l){let F=x.get(N.id)??[],U=Fo(F);U&&(h=Math.min(h,U.minX),M=Math.max(M,U.maxX),f.push({lane:N,contentTop:U.minY,contentBottom:U.maxY,centerY:(U.minY+U.maxY)/2}))}if(h===1/0||M===-1/0)return!0;let I=Math.max(0,M-h),C=Math.max(p,10),w=I+2*C,S=u+w,E=(h+M)/2-w/2-u,B=E+S/2,P=Math.max(p,u);f.sort((N,F)=>N.centerY-F.centerY);for(let N=0;N<f.length;N++){let F=f[N],U,G;if(N===0?U=F.contentTop-P:U=(f[N-1].contentBottom+F.contentTop)/2,N===f.length-1)G=F.contentBottom+P;else{let ft=f[N+1];G=(F.contentBottom+ft.contentTop)/2}let Z=Math.max(0,G-U),it=(U+G)/2;F.lane.x=B,F.lane.y=it,F.lane.width=S,F.lane.height=Z,F.lane.swimlaneContentTop=F.contentTop,F.lane.groupTitleRect={left:E,right:E+u,top:U,bottom:G}}return e==="RL"&&bn(t,"x"),!0}c(tr,"applyLrDirectionTransform");var ue=1e-6,Ci=8,rn=Ci,vi=[0,rn,-rn,2*rn,-2*rn];function er(t,e){let{nodeInfoById:n,realNodeRects:o}=vn(e);for(let s of t){if(s.isLayoutOnly)continue;let r=s.points;if(!r||r.length<4)continue;let i=wo(vt(r,ue),ue);if(!i)continue;let{p3:d}=i,u=i.kind==="HVH",a=To(s,n,ue);if(!a)continue;let{srcId:y,dstId:l,srcInfo:x,dstInfo:m,collinearX:p,collinearY:f}=a;if(p||f)continue;let h,M=x.rect;for(let I of vi){let C,w,S;if(u){let N=m.cy>x.cy?M.bottom:M.top,F=x.cx+I;if(F<=M.left+ue||F>=M.right-ue)continue;C={x:F,y:N},w={x:F,y:d.y},S={x:d.x,y:d.y}}else{let N=m.cx>x.cx?M.right:M.left,F=x.cy+I;if(F<=M.top+ue||F>=M.bottom-ue)continue;C={x:N,y:F},w={x:d.x,y:F},S={x:d.x,y:d.y}}let b=de(C,w,ue),L=de(w,S,ue);if(b&&L||!b&&Xt(C,w,o,[y],1)||!L&&Xt(w,S,o,[l],1))continue;let E=!b&&gn(C,w,t,s,{epsilon:ue,skipDegenerateOther:!0}),B=!L&&gn(w,S,t,s,{epsilon:ue,skipDegenerateOther:!0});if(!(E||B)){b?h=[w,S]:L?h=[C,w]:h=[C,w,S];break}}h&&(s.points=h)}}c(er,"portSwapToLShape");function nr(t,e){let{realNodeRects:r,labelNodeRects:i}=Ee(e.values());for(let d of t){if(d.isLayoutOnly)continue;let u=d.points;if(!u||u.length<4)continue;let a=vt(u,.001);if(a.length<4)continue;let y=a.length-1,l=a[y],x=a[y-1],m=a[y-2],p=l.x-x.x,f=l.y-x.y,h=Math.hypot(p,f);if(h>=10||h<.001)continue;let M=x.x-m.x,I=x.y-m.y;if(Math.hypot(M,I)<.001)continue;let w=_t(x,l,.001),S=Dt(x,l,.001),b=_t(m,x,.001),L=Dt(m,x,.001);if(!(w&&L||S&&b))continue;let E=d.end,B=d.start,P=E?e.get(E):void 0;if(!P)continue;let N=P.x??0,F=P.y??0,U=se(P);if(!U)continue;let G,Z;if(L){let Q=I<0;G={x:N,y:m.y},Z={x:N,y:Q?U.bottom:U.top}}else{let Q=M>0;G={x:m.x,y:F},Z={x:Q?U.right:U.left,y:F}}if(Xt(G,Z,r,E?[E]:[],-2)||Xt(G,Z,i,[],-2))continue;if(B){let Q=e.get(B),lt=Q?se(Q):void 0;if(lt&&Eo(G,lt,2))continue}let it=c((Q,lt)=>`${Q.x.toFixed(3)},${Q.y.toFixed(3)}|${lt.x.toFixed(3)},${lt.y.toFixed(3)}`,"ownSegmentKey"),ft=new Set;for(let Q=0;Q<a.length-1;Q++)ft.add(it(a[Q],a[Q+1]));let At=c((Q,lt)=>{for(let _ of t){if(_===d||_.isLayoutOnly)continue;let $=_.points;if(!(!$||$.length<2))for(let tt=0;tt<$.length-1;tt++){let q=$[tt],st=$[tt+1];if(!ft.has(it(q,st))&&be(Q,lt,q,st,.001))return!0}}return!1},"segmentCrossesOtherEdge");if(At(G,Z))continue;if(y-3>=0){let Q=a[y-3],lt=[B,E].filter(_=>!!_);if(Xt(Q,G,r,lt,-2)||At(Q,G))continue}let zt=[...a.slice(0,y-2),G,Z];d.points=zt;let Ut=d.labelNodeId;if(Ut){let Q=e.get(Ut);if(Q){let lt=Q.width??0,_=Q.height??0;if(lt>0&&_>0){let $,tt,q=-1;for(let st=0;st<zt.length-1;st++){let ut=zt[st],gt=zt[st+1],pt=Math.hypot(gt.x-ut.x,gt.y-ut.y),xt=Ct(ut,gt,.001),Ft=It(ut,gt,.001);(xt&&pt>=lt+2||Ft&&pt>=_+2)&&pt>q&&(q=pt,$=(ut.x+gt.x)/2,tt=(ut.y+gt.y)/2)}$!==void 0&&tt!==void 0&&(Q.x=$,Q.y=tt)}}}}}c(nr,"collapseShortTerminalStub");var is=4,cs=2,or={EDGE_GAP:12,LANE_MARGIN:20,ARROWHEAD_SIZE:8,ARROWHEAD_GAP:is,MIN_ARROWHEAD_SPACING:12,EDGE_STROKE_WIDTH:cs,ROUTE_TOUCH_TOLERANCE:is+cs},Li={EPSILON:1e-6},Mn={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},Hn={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40,EDGE_LABEL_CLEARANCE:16},ct=.001,Vt=8,sr=c(t=>typeof t=="string"?t.toUpperCase():"","upperCaseDirection"),yt=we,Xn=c((t,e)=>It(t,e,ct)||Ct(t,e,ct),"orthogonallyAligned");function so(t,e){let s=c((m,p)=>{let f=m.x??0,h=m.y??0,M=p.x-f,I=p.y-h,C=(m.width??0)/2,w=(m.height??0)/2;return Math.abs(I)*C>Math.abs(M)*w?(I<0&&(w=-w),{x:f+(I===0?0:w*M/I),y:h+w}):(M<0&&(C=-C),{x:f+C,y:h+(M===0?0:C*I/M)})},"rectIntersect"),r=c((m,p)=>{let f=vt(m.points??[]);if(f.length<2)return;let h=p?m.start:m.end,M=h?e.get(h):void 0,I=M?se(M):void 0;if(!M||!h||!I)return;let C=p?f[0]:f[f.length-1],w=p?f[1]:f[f.length-2],S=s(M,C),b=C;if(Xn(w,S)&&(b=w),It(S,b,ct))return{edge:m,edgeId:String(m.id??""),nodeId:h,atStart:p,orientation:"V",coord:S.x,min:Math.min(S.y,b.y),max:Math.max(S.y,b.y),boundary:S,railEnd:b,rect:I};if(Ct(S,b,ct))return{edge:m,edgeId:String(m.id??""),nodeId:h,atStart:p,orientation:"H",coord:S.y,min:Math.min(S.x,b.x),max:Math.max(S.x,b.x),boundary:S,railEnd:b,rect:I}},"terminalLaneFor"),i=c((m,p)=>Math.max(0,Math.min(m.max,p.max)-Math.max(m.min,p.min)),"projectedOverlapLength"),d=c((m,p)=>m.nodeId!==p.nodeId||m.orientation!==p.orientation?!1:m.orientation==="H"?(Math.abs(m.boundary.x-m.rect.left)<1||Math.abs(m.boundary.x-m.rect.right)<1)&&It(m.boundary,p.boundary,1):(Math.abs(m.boundary.y-m.rect.top)<1||Math.abs(m.boundary.y-m.rect.bottom)<1)&&Ct(m.boundary,p.boundary,1),"sameTerminalFace"),u=c((m,p)=>m.nodeId!==p.nodeId||m.orientation!==p.orientation?!1:i(m,p)>=Vt&&Math.abs(m.coord-p.coord)<.5,"exactTerminalLaneConflict"),a=c((m,p)=>{if(m.nodeId!==p.nodeId||m.orientation!==p.orientation||m.orientation!=="H"||m.atStart===p.atStart)return!1;let f=i(m,p);if(f<Vt)return!1;let h=m.rect.bottom-m.rect.top;return f<h||f>2*h?!1:d(m,p)&&Math.abs(m.coord-p.coord)<16},"nearTerminalLaneConflict"),y=c((m,p)=>{let f=vt(m.edge.points??[]);if(f.length<2)return;let h=m.orientation==="V"?{x:m.boundary.x+p,y:m.boundary.y}:{x:m.boundary.x,y:m.boundary.y+p},M=m.orientation==="V"?{x:m.railEnd.x+p,y:m.railEnd.y}:{x:m.railEnd.x,y:m.railEnd.y+p};if(!c(()=>Math.abs(m.boundary.y-m.rect.top)<1||Math.abs(m.boundary.y-m.rect.bottom)<1?Ct(h,m.boundary,ct)&&h.x>=m.rect.left+1&&h.x<=m.rect.right-1:Math.abs(m.boundary.x-m.rect.left)<1||Math.abs(m.boundary.x-m.rect.right)<1?It(h,m.boundary,ct)&&h.y>=m.rect.top+1&&h.y<=m.rect.bottom-1:!1,"boundaryStaysOnSameFace")())return;if(m.atStart){let b=f.length>1&&de(f[1],m.railEnd,ct),L=f.slice(b?2:1),E=L[0];return E&&!Xn(E,M)?void 0:[h,M,...L]}let C=f.length>1&&de(f[f.length-2],m.railEnd,ct),w=f.slice(0,C?-2:-1),S=w[w.length-1];if(!(S&&!Xn(S,M)))return[...w,M,h]},"shiftedCandidate"),l=c(m=>{let p=m.edge,f=vt(p.points??[]);if(f.length!==2)return!1;let h=p.start,M=p.end,I=h?e.get(h):void 0,C=M?e.get(M):void 0;if(!I||!C)return!1;let w=I.x??0,S=I.y??0,b=C.x??0,L=C.y??0,[E,B]=f;return Ct(E,B,ct)&&Math.abs(S-L)<1&&Math.abs(w-b)>1||It(E,B,ct)&&Math.abs(w-b)<1&&Math.abs(S-L)>1},"laneIsStraightCollinearConnector"),x=[-7,7,-14,14,-21,21];for(let m=0;m<8;m++){let p=t.filter(h=>!h.isLayoutOnly).flatMap(h=>[r(h,!0),r(h,!1)]).filter(h=>!!h),f=!1;for(let h=0;h<p.length&&!f;h++)for(let M=h+1;M<p.length&&!f;M++){let I=p[h],C=p[M];if(I.edge===C.edge||!(u(I,C)||a(I,C)))continue;let w=!u(I,C),S=[I,C].sort((b,L)=>{let E=l(b),B=l(L);return E!==B?Number(E)-Number(B):+!L.atStart-+!b.atStart});for(let b of S){for(let L of x){let E=y(b,L);if(!E)continue;let B=r({...b.edge,points:E},b.atStart);if(!(!B||p.some(P=>P.edge!==b.edge&&(u(B,P)||w&&a(B,P))))){b.edge.points=E,f=!0;break}}if(f)break}}if(!f)return}}c(so,"separateSharedRenderedTerminalLanes");function rr(t,e){let{realNodeRects:s,labelNodeRects:r}=Ee(e.values()),i=c((u,a)=>{let y=u.start,l=u.end,x=yt(a);if(x.length!==a.length-1)return!1;let m=[y,l].filter(p=>!!p);for(let p of x)if(Xt(p.a,p.b,s,m,-2)||Xt(p.a,p.b,r,[],-2))return!1;for(let p of t){if(p===u||p.isLayoutOnly)continue;let f=p.points;if(!(!f||f.length<2)){for(let h of x)for(let M of yt(vt(f)))if(pe(h,M,.5)>=Vt||be(h.a,h.b,M.a,M.b,ct))return!1}}return!0},"candidateIsSafe"),d=c((u,a)=>{if(a+4>=u.length)return;let y=u[a],l=u[a+1],x=u[a+2],m=u[a+3],p=u[a+4],f=_t(y,l)&&Dt(l,x)&&_t(x,m)&&Dt(m,p)&&It(y,m,ct)&&It(y,p,ct)&&It(l,x,ct)&&(l.x-y.x)*(m.x-x.x)<0,h=Dt(y,l)&&_t(l,x)&&Dt(x,m)&&_t(m,p)&&Ct(y,m,ct)&&Ct(y,p,ct)&&Ct(l,x,ct)&&(l.y-y.y)*(m.y-x.y)<0;if(f||h)return vt([...u.slice(0,a+1),p,...u.slice(a+5)]);if(a+5>=u.length)return;let M=u[a+5],I=Dt(y,l)&&_t(l,x)&&Dt(x,m)&&_t(m,p)&&Dt(p,M)&&It(y,p,ct)&&It(y,M,ct)&&It(x,m,ct)&&(x.x-l.x)*(p.x-m.x)<0,C=_t(y,l)&&Dt(l,x)&&_t(x,m)&&Dt(m,p)&&_t(p,M)&&Ct(y,p,ct)&&Ct(y,M,ct)&&Ct(x,m,ct)&&(x.y-l.y)*(p.y-m.y)<0;if(!(!I&&!C))return vt([...u.slice(0,a+1),M,...u.slice(a+6)])},"withoutDogleg");for(let u=0;u<8;u++){let a=!1;for(let y of t){if(y.isLayoutOnly)continue;let l=vt(y.points??[]);for(let x=0;x<=l.length-5;x++){let m=d(l,x);if(!(!m||!i(y,m))){y.points=m,a=!0;break}}if(a)break}if(!a)return}}c(rr,"collapseRedundantRectangularDoglegs");function ro(t,e){let{realNodeRects:r,labelNodeRects:i}=Ee(e.values()),d=t.filter(p=>!p.isLayoutOnly),u=c((p,f,h)=>vt(p===f?h??[]:p.points??[]),"pointsFor"),a=c((p,f)=>{let h=0;for(let M=0;M<d.length;M++){let I=yt(u(d[M],p,f));for(let C=M+1;C<d.length;C++){let w=yt(u(d[C],p,f));for(let S of I)for(let b of w)be(S.a,S.b,b.a,b.b,ct)&&h++}}return h},"strictCrossingCount"),y=c(p=>{let f=yt(p);if(f.length!==3)return;let h=f[1];if(!(f[0].horizontal===h.horizontal||f[2].horizontal===h.horizontal))return{index:h.index,horizontal:h.horizontal,vertical:h.vertical,segment:h}},"middleRail"),l=c((p,f)=>{let h=[p.start,p.end].filter(M=>!!M);return r.filter(M=>{if(h.includes(M.id))return!1;let I=M.rect;return f.horizontal?Qt(f.a.x,f.b.x,I.left,I.right)>=Vt&&f.a.y>=I.top-2&&f.a.y<=I.bottom+2:Qt(f.a.y,f.b.y,I.top,I.bottom)>=Vt&&f.a.x>=I.left-2&&f.a.x<=I.right+2})},"blockingRectsFor"),x=c((p,f,h)=>{let M=p.map(C=>({...C}));if(f.horizontal)M[f.index].y=h,M[f.index+1].y=h;else if(f.vertical)M[f.index].x=h,M[f.index+1].x=h;else return;let I=me(vt(M));return yt(I).length===I.length-1?I:void 0},"candidateByMovingRail"),m=c((p,f,h)=>{let M=[p.start,p.end].filter(C=>!!C),I=yt(f);if(I.length!==f.length-1)return!1;for(let C of I)if(Xt(C.a,C.b,r,M,-2)||Xt(C.a,C.b,i,[],-2))return!1;for(let C of d)if(C!==p){for(let w of I)for(let S of yt(u(C)))if(pe(w,S,.5)>=Vt)return!1}return a(p,f)<=h},"candidateIsSafe");for(let p=0;p<8;p++){let f=a(),h=!1;for(let M of d){let I=u(M),C=y(I);if(!C)continue;let w=l(M,C.segment);if(w.length===0)continue;let S=C.horizontal?[Math.min(...w.map(b=>b.rect.top))-20,Math.max(...w.map(b=>b.rect.bottom))+20]:[Math.min(...w.map(b=>b.rect.left))-20,Math.max(...w.map(b=>b.rect.right))+20];for(let b of S){let L=x(I,C.segment,b);if(!(!L||!m(M,L,f))){M.points=L,h=!0;break}}if(h)break}if(!h)return}}c(ro,"liftObstacleHuggingSameSideRails");function io(t,e,n){let s=c(y=>{let l=y.groupTitleRect;if(!(!l||typeof l.left!="number"||typeof l.right!="number"||typeof l.top!="number"||typeof l.bottom!="number"||!Number.isFinite(l.left)||!Number.isFinite(l.right)||!Number.isFinite(l.top)||!Number.isFinite(l.bottom)||l.right<=l.left||l.bottom<=l.top))return{left:l.left,right:l.right,top:l.top,bottom:l.bottom}},"validTitleRect"),r=he([...e.values()]),i=c(y=>{if(!r.isLane(y.id))return;let l=sr(y.direction??n);if(l==="LR"||l==="RL"||l==="BT")return;let x=s(y),m=y.y,p=y.height;if(!x||typeof m!="number"||typeof p!="number"||!Number.isFinite(m)||!Number.isFinite(p)||p<=0)return;let f=x.right-x.left,h=x.bottom-x.top;if(!(h<=0||f<h))return{node:y,rect:x}},"topLaneTitleFor"),d=c((y,l)=>{if(!y.horizontal)return!1;let x=y.a.y;return x<l.top-ct||x>l.bottom+ct?!1:Qt(y.a.x,y.b.x,l.left,l.right)>=Vt},"horizontalSegmentIntersectsTitle"),u=[...e.values()].map(i).filter(y=>!!y);if(u.length===0)return;let a=0;for(let y of t){if(y.isLayoutOnly)continue;let l=vt(y.points??[]);for(let x of yt(l))for(let m of u)d(x,m.rect)&&(a=Math.max(a,m.rect.bottom-x.a.y+4))}if(!(a<=ct))for(let y of u){let l=y.node.y,x=y.node.height;typeof l!="number"||typeof x!="number"||!Number.isFinite(l)||!Number.isFinite(x)||x<=0||(y.node.y=l-a/2,y.node.height=x+a,y.node.groupTitleRect={...y.rect,top:y.rect.top-a,bottom:y.rect.bottom-a})}}c(io,"liftTopLaneTitleBandsAboveRails");function co(t,e,n){let s=c(l=>{let x=l.groupTitleRect;if(!(!x||typeof x.left!="number"||typeof x.right!="number"||typeof x.top!="number"||typeof x.bottom!="number"||!Number.isFinite(x.left)||!Number.isFinite(x.right)||!Number.isFinite(x.top)||!Number.isFinite(x.bottom)||x.right<=x.left||x.bottom<=x.top))return{left:x.left,right:x.right,top:x.top,bottom:x.bottom}},"validTitleRect"),r=he([...e.values()]),i=c(l=>{if(!r.isLane(l.id)||sr(l.direction??n)!=="LR")return;let m=s(l),p=l.x,f=l.width;if(!m||typeof p!="number"||typeof f!="number"||!Number.isFinite(p)||!Number.isFinite(f)||f<=0)return;let h=m.right-m.left,M=m.bottom-m.top;if(!(h<=0||M<h))return{node:l,rect:m}},"leftLaneTitleFor"),d=c((l,x)=>{if(!l.vertical)return!1;let m=l.a.x;return m<x.left-ct||m>x.right+ct?!1:Qt(l.a.y,l.b.y,x.top,x.bottom)>=Vt},"verticalSegmentIntersectsTitle"),u=c((l,x)=>{if(!l.horizontal)return!1;let m=l.a.y;return m<x.top-ct||m>x.bottom+ct?!1:Qt(l.a.x,l.b.x,x.left,x.right)>=Vt},"horizontalSegmentIntersectsTitle"),a=[...e.values()].map(i).filter(l=>!!l);if(a.length===0)return;let y=0;for(let l of t){if(l.isLayoutOnly)continue;let x=vt(l.points??[]);for(let m of yt(x))for(let p of a)if(d(m,p.rect))y=Math.max(y,p.rect.right-m.a.x+4);else if(u(m,p.rect)){let f=Math.min(m.a.x,m.b.x);y=Math.max(y,p.rect.right-f+4)}}if(!(y<=ct))for(let l of a){let x=l.node.x,m=l.node.width;typeof x!="number"||typeof m!="number"||!Number.isFinite(x)||!Number.isFinite(m)||m<=0||(l.node.x=x-y/2,l.node.width=m+y,l.node.groupTitleRect={...l.rect,left:l.rect.left-y,right:l.rect.right-y})}}c(co,"shiftLeftLaneTitleBandsLeftOfRails");function ir(t,e){let{realNodeRects:s}=Ee(e.values()),r=t.filter(f=>!f.isLayoutOnly),i=c((f,h=new Map)=>vt(h.get(f)??f.points??[]),"replacementPointsFor"),d=c((f=new Map)=>{let h=0;for(let M=0;M<r.length;M++){let I=yt(i(r[M],f));for(let C=M+1;C<r.length;C++){let w=yt(i(r[C],f));for(let S of I)for(let b of w)be(S.a,S.b,b.a,b.b,ct)&&h++}}return h},"crossingCount"),u=c((f=new Map)=>r.reduce((h,M)=>h+ce(i(M,f)),0),"totalBends"),a=c(f=>{let h=i(f);if(h.length<4)return;let M=h[h.length-2],I=h[h.length-1];if(!(!_t(M,I,ct)&&!Dt(M,I,ct)))return{tailStart:M,terminal:I}},"terminalTailFor"),y=c((f,h)=>{let M=i(f);if(M.length<3)return;let I=M[0],C=M[1],w;if(_t(I,C,ct))w={x:C.x,y:h.tailStart.y};else if(Dt(I,C,ct))w={x:h.tailStart.x,y:C.y};else return;let S=me(vt([I,C,w,h.tailStart,h.terminal]));return yt(S).length===S.length-1?S:void 0},"candidateWithDestinationTail"),l=c((f,h)=>{let M=[f.start,f.end].filter(I=>!!I);for(let I of yt(h))if(Xt(I.a,I.b,s,M,-2))return!0;return!1},"pathHasNodeHit"),x=c((f,h,M)=>{for(let I of r)if(I!==f){for(let C of yt(h))for(let w of yt(i(I,M)))if(pe(C,w,.5)>=Vt)return!0}return!1},"pathHasSharedTrack"),m=c((f,h,M)=>!l(f,h)&&!x(f,h,M),"candidateIsSafe"),p=c(()=>{let f=new Map;for(let h of r){let M=h.end;if(!M||!e.has(M)||i(h).length<4)continue;let C=f.get(M)??[];C.push(h),f.set(M,C)}return f},"edgesByDestination");for(let f=0;f<4;f++){let h=d();if(h===0)return;let M=u(),I,C=h,w=M;for(let S of p().values())for(let b=0;b<S.length;b++)for(let L=b+1;L<S.length;L++){let E=S[b],B=S[L],P=a(E),N=a(B);if(!P||!N)continue;let F=y(E,N),U=y(B,P);if(!F||!U)continue;let G=new Map([[E,F],[B,U]]);if(!m(E,F,G)||!m(B,U,G))continue;let Z=d(G),it=u(G);Z>=h||Z>C||Z===C&&it>=w||(I=G,C=Z,w=it)}if(!I)return;for(let[S,b]of I)S.points=b}}c(ir,"swapDestinationTerminalTailsToReduceCrossings");function cr(t,e){let{realNodeRects:i,labelNodeRects:d}=Ee(e.values()),u=t.filter(S=>!S.isLayoutOnly),a=c((S,b=new Map)=>vt(b.get(S)??S.points??[]),"replacementPointsFor"),y=c((S=new Map)=>{let b=0;for(let L=0;L<u.length;L++){let E=yt(a(u[L],S));for(let B=L+1;B<u.length;B++){let P=yt(a(u[B],S));for(let N of E)for(let F of P)be(N.a,N.b,F.a,F.b,ct)&&b++}}return b},"strictCrossingCount"),l=c((S=new Map)=>u.reduce((b,L)=>b+ce(a(L,S)),0),"totalBends"),x=c(S=>{let b=S.start,L=S.end,E=b?e.get(b):void 0,B=L?e.get(L):void 0,P=E?se(E):void 0,N=B?se(B):void 0;return P&&N?{src:P,dst:N}:void 0},"endpointRectsFor"),m=c((S,b,L)=>{if(L.index<=0||L.index+1>=b.length-1)return;let E=x(S);if(E){if(L.vertical){let B=L.a.x,P=Math.min(E.src.left,E.dst.left),N=Math.max(E.src.right,E.dst.right),F=B<P-ct?"left":B>N+ct?"right":void 0;return F?{edge:S,points:b,segmentIndex:L.index,axis:"vertical",side:F,coord:B,min:Math.min(L.a.y,L.b.y),max:Math.max(L.a.y,L.b.y)}:void 0}if(L.horizontal){let B=L.a.y,P=Math.min(E.src.top,E.dst.top),N=Math.max(E.src.bottom,E.dst.bottom),F=B<P-ct?"top":B>N+ct?"bottom":void 0;return F?{edge:S,points:b,segmentIndex:L.index,axis:"horizontal",side:F,coord:B,min:Math.min(L.a.x,L.b.x),max:Math.max(L.a.x,L.b.x)}:void 0}}},"externalRailForSegment"),p=c(()=>{let S=[];for(let b of u){let L=a(b);for(let E of yt(L)){let B=m(b,L,E);B&&S.push(B)}}return S},"collectExternalRails"),f=c((S,b)=>S.edge!==b.edge&&S.axis===b.axis&&S.side===b.side&&Qt(S.min,S.max,b.min,b.max)>=Vt,"railsInteract"),h=c(S=>{let b=[],L=new Set;for(let E of S){if(L.has(E))continue;let B=[E],P=[];for(L.add(E);B.length>0;){let N=B.pop();P.push(N);for(let F of S)!L.has(F)&&f(N,F)&&(L.add(F),B.push(F))}P.length>1&&b.push(P)}return b},"connectedComponents"),M=c(S=>{let b=[];for(let L of S)b.some(E=>Math.abs(E-L.coord)<ct)||b.push(L.coord);for(;b.length<S.length;){let L=Math.min(...b),E=Math.max(...b),B=S[0].side;b.push(B==="left"||B==="top"?L-12*(S.length-b.length):E+12*(S.length-b.length))}return b},"uniqueCoordsFor"),I=c(S=>{let b=S.map(B=>B.coord),L=M(S),E=[];if(S.length<=6){let B=new Array(L.length).fill(!1),P=[],N=c(()=>{if(P.length===S.length){P.some((F,U)=>Math.abs(F-b[U])>=ct)&&E.push([...P]);return}for(let[F,U]of L.entries())B[F]||(B[F]=!0,P.push(U),N(),P.pop(),B[F]=!1)},"visit");return N(),E}for(let B=0;B<b.length;B++)for(let P=B+1;P<b.length;P++){let N=[...b];[N[B],N[P]]=[N[P],N[B]],E.push(N)}return E},"coordinateAssignmentsFor"),C=c((S,b)=>{let L=new Map;for(let[B,P]of S.entries()){let N=b[B],F=L.get(P.edge)??P.points.map(U=>({x:U.x,y:U.y}));P.axis==="vertical"?(F[P.segmentIndex].x=N,F[P.segmentIndex+1].x=N):(F[P.segmentIndex].y=N,F[P.segmentIndex+1].y=N),L.set(P.edge,F)}let E=new Map;for(let[B,P]of L){let N=me(vt(P));if(yt(N).length!==N.length-1)return;E.set(B,N)}return E},"replacementsForAssignment"),w=c(S=>{for(let[b,L]of S){let E=[b.start,b.end].filter(B=>!!B);for(let B of yt(L))if(Xt(B.a,B.b,i,E,-2)||Xt(B.a,B.b,d,[],-2))return!1}for(let b=0;b<u.length;b++){let L=u[b],E=S.has(L),B=yt(a(L,S));for(let P=b+1;P<u.length;P++){let N=u[P];if(!E&&!S.has(N))continue;let F=yt(a(N,S));for(let U of B)for(let G of F)if(pe(U,G,.5)>=Vt)return!1}}return!0},"candidateIsSafe");for(let S=0;S<4;S++){let b=y();if(b===0)return;let L,E=b,B=l(),P=Number.POSITIVE_INFINITY;for(let N of h(p()))for(let F of I(N)){let U=C(N,F);if(!U||!w(U))continue;let G=y(U);if(G>=b)continue;let Z=l(U),it=N.reduce((ft,At,te)=>ft+Math.abs(F[te]-At.coord),0);G>E||G===E&&(Z>B||Z===B&&it>=P)||(L=U,E=G,B=Z,P=it)}if(!L)return;for(let[N,F]of L)N.points=F}}c(cr,"reassignCrossingExternalRailChannels");function ar(t,e){let{realNodeRects:s,labelNodeRects:r}=Ee(e.values()),i=t.filter(p=>!p.isLayoutOnly),d=c((p,f,h)=>vt(p===f?h??[]:p.points??[]),"pointsFor"),u=c(p=>yt(p).reduce((f,h)=>{let M=h.a.x-h.b.x,I=h.a.y-h.b.y;return f+Math.hypot(M,I)},0),"pathLength"),a=c((p,f)=>{let h=0;for(let M=0;M<i.length;M++){let I=yt(d(i[M],p,f));for(let C=M+1;C<i.length;C++){let w=yt(d(i[C],p,f));for(let S of I)for(let b of w)be(S.a,S.b,b.a,b.b,ct)&&h++}}return h},"strictCrossingCount"),y=c((p,f)=>{if(p.horizontal){let h=p.a.y;return(Math.abs(h-f.top)<1||Math.abs(h-f.bottom)<1)&&Qt(p.a.x,p.b.x,f.left,f.right)>=Vt}if(p.vertical){let h=p.a.x;return(Math.abs(h-f.left)<1||Math.abs(h-f.right)<1)&&Qt(p.a.y,p.b.y,f.top,f.bottom)>=Vt}return!1},"segmentRunsAlongRectBorder"),l=c(p=>{let f=[p.start,p.end].filter(M=>!!M),h=[];for(let M of f){let I=e.get(M),C=I?se(I):void 0;C&&h.push(C)}return h},"endpointRectsFor"),x=c((p,f)=>{if(f+3>=p.length)return[];let h=p[f],M=p[f+1],I=p[f+2],C=p[f+3],w=_t(h,M,ct)&&Dt(M,I,ct)&&_t(I,C,ct),S=Dt(h,M,ct)&&_t(M,I,ct)&&Dt(I,C,ct);if(!w&&!S)return[];if(!(w?Math.sign(M.x-h.x)!==Math.sign(C.x-I.x):Math.sign(M.y-h.y)!==Math.sign(C.y-I.y)))return[];let L=It(h,C,ct)||Ct(h,C,ct)?[]:[{x:h.x,y:C.y},{x:C.x,y:h.y}],E=L.length===0?[[...p.slice(0,f+1),...p.slice(f+3)]]:L.map(P=>[...p.slice(0,f+1),P,...p.slice(f+3)]),B=new Set;return E.map(P=>me(vt(P))).filter(P=>{if(yt(P).length!==P.length-1||!P.some(F=>de(F,C,ct)))return!1;let N=P.map(F=>`${F.x.toFixed(3)},${F.y.toFixed(3)}`).join("|");return B.has(N)?!1:(B.add(N),!0)})},"shortcutCandidatesAt"),m=c((p,f,h)=>{let M=[p.start,p.end].filter(C=>!!C),I=l(p);for(let C of yt(f))if(Xt(C.a,C.b,s,M,-2)||Xt(C.a,C.b,r,[],-2)||I.some(w=>y(C,w)))return!1;for(let C of i)if(C!==p){for(let w of yt(f))for(let S of yt(d(C)))if(pe(w,S,.5)>=Vt)return!1}return a(p,f)<=h},"candidateIsSafe");for(let p=0;p<8;p++){let f=a(),h,M,I=f,C=Number.POSITIVE_INFINITY,w=Number.POSITIVE_INFINITY;for(let S of i){let b=d(S),L=ce(b,ct),E=u(b);for(let B=0;B<=b.length-4;B++)for(let P of x(b,B)){let N=ce(P,ct),F=u(P);if(!(N<L||N===L&&F<E-ct)||!m(S,P,f))continue;let G=a(S,P);G>I||G===I&&(N>C||N===C&&F>=w)||(h=S,M=P,I=G,C=N,w=F)}}if(!h||!M)return;h.points=M}}c(ar,"shortcutRedundantOrthogonalJogs");function lr(t,e){let i=[];for(let O of e.values()){if(O.isGroup||O.isEdgeLabel)continue;let k=O.x??0,H=O.y??0,j=se(O);j&&i.push({id:String(O.id??""),cx:k,cy:H,rect:j})}if(i.length===0)return;let d=new Map(i.map(O=>[O.id,O])),u=i.map(O=>({id:O.id,rect:O.rect})),a=["top","bottom","left","right"],y={top:Math.min(...i.map(O=>O.rect.top))-20,bottom:Math.max(...i.map(O=>O.rect.bottom))+20,left:Math.min(...i.map(O=>O.rect.left))-20,right:Math.max(...i.map(O=>O.rect.right))+20},l=t.filter(O=>!O.isLayoutOnly),x=new Map(l.map((O,k)=>[O,k])),m=c(O=>{let k=O==="left"||O==="top"?-1:1,H=[];for(let j=0;j<=2;j++)H.push(y[O]+k*20*j);return H},"outwardTracksForSide"),p=c((O,k=new Map)=>vt(k.get(O)??O.points??[]),"replacementPointsFor"),f=c((O,k)=>{let H=0;for(let j of O)for(let K of k)be(j.a,j.b,K.a,K.b,ct)&&H++;return H},"crossingCountBetweenSegments"),h=c((O,k)=>f(yt(O),yt(k)),"crossingCountBetweenPaths"),M=c((O=new Map)=>{let k=0,H=[],j=new Set,K=[],et=c(Y=>{j.has(Y)||(j.add(Y),K.push(Y))},"addEdge");for(let Y=0;Y<l.length;Y++){let nt=l[Y],dt=p(nt,O);for(let g=Y+1;g<l.length;g++){let v=l[g],A=h(dt,p(v,O));A>0&&(k+=A,H.push({first:nt,second:v,count:A}),et(nt),et(v))}}return K.sort((Y,nt)=>(x.get(Y)??0)-(x.get(nt)??0)),{count:k,pairs:H,edgeSet:j,edges:K}},"crossingSnapshot"),I=c((O,k)=>{let H=new Set(k.keys());if(H.size===0)return O.count;let j=0;for(let et of O.pairs)(H.has(et.first)||H.has(et.second))&&(j+=et.count);let K=0;for(let et=0;et<l.length;et++){let Y=l[et],nt=H.has(Y),dt=p(Y,k);for(let g=et+1;g<l.length;g++){let v=l[g];!nt&&!H.has(v)||(K+=h(dt,p(v,k)))}}return O.count-j+K},"crossingCountWithReplacements"),C=c(O=>{let k=new Map;for(let K of O.pairs){let et=k.get(K.first)??new Set;et.add(K.second),k.set(K.first,et);let Y=k.get(K.second)??new Set;Y.add(K.first),k.set(K.second,Y)}let H=[],j=new Set;for(let K of O.edges){if(j.has(K))continue;let et=[K],Y=[];for(j.add(K);et.length>0;){let nt=et.pop();Y.push(nt);for(let dt of k.get(nt)??[])j.has(dt)||(j.add(dt),et.push(dt))}Y.sort((nt,dt)=>(x.get(nt)??0)-(x.get(dt)??0)),Y.length>1&&H.push(Y)}return H},"crossingComponents"),w=c(O=>[O.start,O.end].filter(k=>!!k),"endpointIdsFor"),S=c(O=>{let k=[];for(let H of C(O)){let j=new Set(H),K=new Set(H.flatMap(Y=>w(Y))),et=[...H];for(let Y of l)j.has(Y)||w(Y).some(nt=>K.has(nt))&&et.push(Y);et.sort((Y,nt)=>(x.get(Y)??0)-(x.get(nt)??0)),k.push(et)}return k},"pairSearchGroups"),b=c((O,k,H)=>I(O,new Map([[k,H]])),"crossingCountWithSingleReplacement"),L=c(O=>{let k=new Map;for(let H of O.pairs)k.set(H.first,(k.get(H.first)??0)+H.count),k.set(H.second,(k.get(H.second)??0)+H.count);return k},"currentCrossingsByEdge"),E=c(O=>O.slice(1).reduce((k,H,j)=>{let K=O[j];return k+Math.abs(H.x-K.x)+Math.abs(H.y-K.y)},0),"pathLength"),B=c((O=new Map)=>l.reduce((k,H)=>k+ce(p(H,O)),0),"totalBends"),P=c((O=new Map)=>l.reduce((k,H)=>k+E(p(H,O)),0),"totalLength"),N=c((O,k)=>Bs(O,k,or.ROUTE_TOUCH_TOLERANCE),"touchesAtBend"),F=c((O,k,H=new Map)=>{let j=yt(k);for(let K of l)if(K!==O){for(let et of j)for(let Y of yt(p(K,H)))if(pe(et,Y,.5)>=Vt)return!0;if(N(k,p(K,H)))return!0}return!1},"pathHasSegmentConflict"),U=c((O,k)=>{let H=[O.start,O.end].filter(j=>!!j);for(let j of yt(k))if(Xt(j.a,j.b,u,H,-2))return!0;return!1},"pathHitsNode"),G=c((O,k)=>{let H=me(vt(k));yt(H).length===H.length-1&&O.push(H)},"pushOrthogonalCandidate"),Z=c(O=>O==="left"||O==="right","sideIsHorizontal"),it=c((O,k,H)=>{switch(k){case"left":return Math.min(O.x,H.x)-20;case"right":return Math.max(O.x,H.x)+20;case"top":return Math.min(O.y,H.y)-20;case"bottom":return Math.max(O.y,H.y)+20}},"localTrackForSameSide"),ft=c((O,k,H,j)=>{let K=H==="left"||H==="top"?-1:1,et=[it(k,H,j),y[H]];for(let Y of et)for(let nt=0;nt<=2;nt++)G(O,Ro(k,H,j,Y+K*20*nt))},"addSameSideCandidates"),At=c((O,k,H,j,K)=>{for(let et of m(H))for(let Y of m(K))G(O,[k,{x:et,y:k.y},{x:et,y:Y},{x:j.x,y:Y},j])},"addHorizontalToVerticalCandidates"),te=c((O,k,H,j,K)=>{for(let et of m(H))for(let Y of m(K))G(O,[k,{x:k.x,y:et},{x:Y,y:et},{x:Y,y:j.y},j])},"addVerticalToHorizontalCandidates"),zt=c((O,k,H,j,K)=>{let et=[...m("top"),...m("bottom")];for(let Y of m(H))for(let nt of m(K))for(let dt of et)G(O,[k,{x:Y,y:k.y},{x:Y,y:dt},{x:nt,y:dt},{x:nt,y:j.y},j])},"addHorizontalPairCandidates"),Ut=c((O,k,H,j,K)=>{let et=[...m("left"),...m("right")];for(let Y of m(H))for(let nt of m(K))for(let dt of et)G(O,[k,{x:k.x,y:Y},{x:dt,y:Y},{x:dt,y:nt},{x:j.x,y:nt},j])},"addVerticalPairCandidates"),Q=c(O=>{let k=new Set;return O.map(H=>vt(H)).filter(H=>{let j=H.map(K=>`${K.x.toFixed(3)},${K.y.toFixed(3)}`).join("|");return k.has(j)||H.length<2?!1:(k.add(j),!0)})},"dedupeCandidatePaths"),lt=c((O,k,H,j)=>{let K=[],et=Ao(O,k,H,j,20,ct);et&&G(K,et),k===j&&ft(K,O,k,H);let Y=Z(k),nt=Z(j);return Y&&!nt?At(K,O,k,H,j):!Y&&nt?te(K,O,k,H,j):Y?zt(K,O,k,H,j):Ut(K,O,k,H,j),Q(K)},"buildCandidatesForSides"),_=c((O,k,H,j)=>{let K=[...m("left"),...m("right")],et=[...m("top"),...m("bottom")];for(let Y of a){let nt=Fe(j,Y),dt=Y==="top"||Y==="bottom"?m(Y):et;for(let g of K){Z(Y)&&G(O,[k,H,{x:g,y:H.y},{x:g,y:nt.y},nt]);for(let v of dt)G(O,[k,H,{x:g,y:H.y},{x:g,y:v},{x:nt.x,y:v},nt])}}},"addVerticalDepartureOuterTrackCandidates"),$=c((O,k,H,j)=>{let K=[...m("left"),...m("right")],et=[...m("top"),...m("bottom")];for(let Y of a){let nt=Fe(j,Y),dt=Y==="left"||Y==="right"?m(Y):K;for(let g of et){Z(Y)||G(O,[k,H,{x:H.x,y:g},{x:nt.x,y:g},nt]);for(let v of dt)G(O,[k,H,{x:H.x,y:g},{x:v,y:g},{x:v,y:nt.y},nt])}}},"addHorizontalDepartureOuterTrackCandidates"),tt=c(O=>{let k=O.start,H=O.end,j=H?d.get(H):void 0;if(!k||!j)return[];let K=vt(O.points??[]);if(K.length<4)return[];let et=K[0],Y=K[1],nt=[];return Dt(et,Y,ct)?_(nt,et,Y,j):_t(et,Y,ct)&&$(nt,et,Y,j),nt},"terminalPreservingOuterTrackCandidates"),q=c(O=>{let k=O.start,H=O.end,j=k?d.get(k):void 0,K=H?d.get(H):void 0;if(!j||!K)return[];let et=[];for(let Y of a){let nt=Fe(j,Y);for(let dt of a)et.push(...lt(nt,Y,Fe(K,dt),dt))}return et.push(...tt(O)),et},"candidatePathsFor"),st=c(()=>new Map(l.map(O=>[O,yt(p(O))])),"currentSegmentsByEdge"),ut=c((O,k,H,j)=>{let K=new Set;for(let et of l){if(et===O)continue;let Y=j.get(et)??yt(p(et));(H.some(nt=>Y.some(dt=>pe(nt,dt,.5)>=Vt))||N(k,p(et)))&&K.add(et)}return K},"sharedTrackConflictsFor"),gt=c((O,k,H,j)=>{let K=new Set;return q(O).map(Y=>me(vt(Y))).filter(Y=>{if(U(O,Y))return!1;let nt=Y.map(dt=>`${dt.x.toFixed(3)},${dt.y.toFixed(3)}`).join("|");return K.has(nt)||Y.length<2?!1:(K.add(nt),!0)}).map(Y=>{let nt=yt(Y),dt=0;for(let g of l)g!==O&&(dt+=f(nt,H.get(g)??yt(p(g))));return{candidate:Y,candidateSegments:nt,crossings:k.count-(j.get(O)??0)+dt,bends:ce(Y,ct),totalBends:ce(Y),length:E(Y)}}).filter(({crossings:Y})=>Y<=k.count).sort((Y,nt)=>Y.crossings-nt.crossings||Y.bends-nt.bends||Y.length-nt.length).slice(0,48).map(Y=>({path:Y.candidate,segments:Y.candidateSegments,sharedTrackConflicts:ut(O,Y.candidate,Y.candidateSegments,H),totalBends:Y.totalBends,length:Y.length}))},"pairCandidatesFor"),pt=c((O,k,H,j,K,et)=>{let Y=0;for(let dt of O.pairs)(dt.first===k||dt.second===k||dt.first===j||dt.second===j)&&(Y+=dt.count);let nt=f(H.segments,K.segments);for(let dt of l){if(dt===k||dt===j)continue;let g=et.get(dt)??yt(p(dt));nt+=f(H.segments,g)+f(K.segments,g)}return O.count-Y+nt},"pairCrossingCount"),xt=c((O,k)=>{for(let H of O.sharedTrackConflicts)if(H!==k)return!1;return!0},"conflictsOnlyWith"),Ft=c((O,k)=>O.segments.some(H=>k.segments.some(j=>pe(H,j,.5)>=Vt))||N(O.path,k.path),"candidatesShareTrack"),Re=c((O,k,H,j)=>xt(k,H.edge)&&xt(j,O.edge)&&!Ft(k,j),"pairCandidatesAreCompatible"),ye=c((O,k,H,j,K)=>{let et=pt(O.current,k.edge,H,j.edge,K,O.baseSegments);if(!(et>=O.current.count))return{replacements:new Map([[k.edge,H.path],[j.edge,K.path]]),crossings:et,bends:O.currentBends-(O.baseBendsByEdge.get(k.edge)??0)-(O.baseBendsByEdge.get(j.edge)??0)+H.totalBends+K.totalBends,length:O.currentLength-(O.baseLengthByEdge.get(k.edge)??0)-(O.baseLengthByEdge.get(j.edge)??0)+H.length+K.length}},"scorePairReplacement"),xe=c((O,k)=>O.crossings<k.crossings||O.crossings===k.crossings&&(O.bends<k.bends||O.bends===k.bends&&O.length<k.length),"pairScoreIsBetter"),Te=c((O,k,H,j)=>{let K=j;for(let et of k.candidates)for(let Y of H.candidates){if(!Re(k,et,H,Y))continue;let nt=ye(O,k,et,H,Y);nt&&xe(nt,K)&&(K=nt)}return K},"bestScoreForOptionPair"),We=c(O=>{let k=B(),H=P(),j=st(),K=L(O),et=new Map(l.map(A=>[A,ce(p(A))])),Y=new Map(l.map(A=>[A,E(p(A))])),nt=new Map,dt=S(O);for(let A of dt)for(let R of A){if(nt.has(R))continue;let T=gt(R,O,j,K);T.length>0&&nt.set(R,{edge:R,candidates:T})}let g={replacements:new Map,crossings:O.count,bends:k,length:H},v={current:O,currentBends:k,currentLength:H,baseBendsByEdge:et,baseLengthByEdge:Y,baseSegments:j};for(let A of dt){let R=new Set(A.filter(D=>O.edgeSet.has(D))),T=A.map(D=>nt.get(D)).filter(D=>!!D);for(let D=0;D<T.length;D++){let J=T[D];for(let at=D+1;at<T.length;at++){let W=T[at];!R.has(J.edge)&&!R.has(W.edge)||(g=Te(v,J,W,g))}}}return g.replacements.size>0?g.replacements:void 0},"bestPairedReplacement");for(let O=0;O<4;O++){let k=M(),H=k.count;if(H===0)return;let j,K,et=H,Y=Number.POSITIVE_INFINITY;for(let dt of k.edges){let g=ce(p(dt),ct);for(let v of q(dt)){let A=U(dt,v),R=!A&&F(dt,v),T=b(k,dt,v),D=ce(v,ct);A||R||!(T<H||T===H&&D<g)||T>et||T===et&&D>=Y||(j=dt,K=v,et=T,Y=D)}}if(j&&K){j.points=K;continue}let nt=We(k);if(!nt)return;for(let[dt,g]of nt)dt.points=g}}c(lr,"resolveRenderedOrthogonalCrossings");var Le=.001,wi=8;function dr(t,e){let{nodeInfoById:n,realNodeRects:o}=vn(e),s=["top","bottom","left","right"],r=20,i={top:Math.min(...o.map(f=>f.rect.top))-r,bottom:Math.max(...o.map(f=>f.rect.bottom))+r,left:Math.min(...o.map(f=>f.rect.left))-r,right:Math.max(...o.map(f=>f.rect.right))+r},d=c((f,h,M,I)=>{let C=[],w=Ao(f,h,M,I,r,Le);return w&&C.push(w),h===I&&C.push(Ro(f,h,M,i[h])),C},"buildOrthogonalPathCandidates"),u=c((f,h)=>{for(let M=0;M<f.length-1;M++){let I=f[M],C=f[M+1];if(Xt(I,C,o,h,1))return!0}return!1},"pathHitsNode"),a=c((f,h,M=!1)=>{let I=0,C=we(f,Le),w=h.start,S=h.end;for(let b of t){if(b===h||b.isLayoutOnly)continue;let L=b.start,E=b.end;if(!M&&w&&S&&(L===w||L===S||E===w||E===S))continue;let B=b.points;if(!(!B||B.length<2))for(let P of C)for(let N of we(B,Le)){if(Oo(P.a,P.b,N.a,N.b,Le,Le)){I++;continue}pe(P,N,Le)>=wi&&I++}}return I},"pathConflictCount"),y=4,l=c((f,h)=>{let M=Math.abs(f.y-h.rect.top),I=Math.abs(f.y-h.rect.bottom),C=Math.abs(f.x-h.rect.left),w=Math.abs(f.x-h.rect.right),S="top",b=M;return I<b&&(S="bottom",b=I),C<b&&(S="left",b=C),w<b&&(S="right",b=w),S},"nearestSideOfRect"),x=new Map,m=c((f,h,M)=>{let I=x.get(f)??[];I.push({side:h,edgeId:M}),x.set(f,I)},"addFaceClaim");for(let f of t){if(f.isLayoutOnly)continue;let h=f.points??[];if(h.length<1)continue;let M=f.id??"",I=f.start,C=f.end;if(I){let w=n.get(I);w&&m(I,l(h[0],w),M)}if(C){let w=n.get(C);w&&m(C,l(h[h.length-1],w),M)}}let p=c((f,h,M)=>x.get(f)?.some(I=>I.edgeId!==M&&I.side===h)??!1,"faceIsClaimed");for(let f of t){if(f.isLayoutOnly)continue;let h=f.points;if(!h||h.length<2)continue;let M=ce(h,Le);if(M<y)continue;let I=f.start,C=f.end;if(!I||!C)continue;let w=n.get(I),S=n.get(C);if(!w||!S)continue;let b=f.id??"",L=a(h,f,!0),E=a(h,f),B,P=L,N=M;for(let F of s){if(p(I,F,b))continue;let U=Fe(w,F);for(let G of s){if(p(C,G,b))continue;let Z=Fe(S,G);for(let it of d(U,F,Z,G)){if(u(it,[I,C]))continue;let ft=ce(it,Le);if(L>0){let At=a(it,f,!0);if(At>P||At===P&&ft>=N)continue;P=At,N=ft,B=it;continue}a(it,f)>E||ft<N&&(N=ft,B=it)}}}if(B){f.points=B;let F=x.get(I);F&&x.set(I,F.filter(G=>G.edgeId!==b));let U=x.get(C);U&&x.set(C,U.filter(G=>G.edgeId!==b)),m(I,l(B[0],w),b),m(C,l(B[B.length-1],S),b)}}}c(dr,"simplifyDetouredEdges");var oe=.001,as=10,cn=7;function ao(t,e){let n=e?0:t.length-1,o=e?1:-1,s=t[n],r=t[n+o];if(!s||!r)return;let i=r.x-s.x,d=r.y-s.y;if(!(Math.abs(i)+Math.abs(d)<oe)){if(Math.abs(d)<=oe){let a=s.x+Math.sign(i)*as;return{left:Math.min(s.x,a),right:Math.max(s.x,a),top:s.y-cn,bottom:s.y+cn}}if(Math.abs(i)<=oe){let a=s.y+Math.sign(d)*as;return{left:s.x-cn,right:s.x+cn,top:Math.min(s.y,a),bottom:Math.max(s.y,a)}}return{left:Math.min(s.x,r.x),right:Math.max(s.x,r.x),top:Math.min(s.y,r.y),bottom:Math.max(s.y,r.y)}}}c(ao,"markerClearanceRectFor");function fr(t){return{left:Math.min(t.left,t.right),right:Math.max(t.left,t.right),top:Math.min(t.top,t.bottom),bottom:Math.max(t.top,t.bottom)}}c(fr,"normalizeRect");function lo(t,e){let n=vt(e),o=ao(n,!0),s=ao(n,!1);return[o,s].some(r=>r&&hn(t,fr(r)))}c(lo,"labelOverlapsOwnMarker");function dn(t,e){let n=[];for(let f of t){if(f.isLayoutOnly)continue;let h=f.points;if(!(!h||h.length<2))for(let M=0;M<h.length-1;M++)n.push({edgeId:f.id,p1:h[M],p2:h[M+1]})}let o=[],s=[],r=he([...e.values()]);for(let f of e.values()){let h=f.isGroup;if(r.isLane(f.id)){let I=se(f);I&&s.push({id:f.id,rect:I});continue}if(h||f.isEdgeLabel)continue;let M=se(f);M&&o.push({nodeId:f.id,rect:M})}let i=3,d=1,u=12,a=c((f,h)=>{let M=Un(h,i);for(let{nodeId:I,rect:C}of o)if(I!==f&&hn(M,C))return!0;return!1},"labelOverlapsForeignNode"),y=c((f,h)=>{let M=Un(h,i);for(let I of n)if(I.edgeId!==f&&Cn(I.p1,I.p2,M))return!0;return!1},"labelOverlapsForeignEdge"),l=c((f,h,M)=>a(f,M)||y(h,M),"labelOverlapsAnything"),x=[],m=c(f=>{for(let{id:h,rect:M}of s)if(Fs(M,f))return h},"findContainingLane"),p=c((f,h)=>x.some(M=>M.labelId!==f&&hn(h,M.rect)),"overlapsPlacedLabel");for(let f of t){if(f.isLayoutOnly)continue;let h=f.labelNodeId;if(!h)continue;let M=e.get(h);if(!M)continue;let I=f.points;if(!I||I.length<2)continue;let C=M.width??0,w=M.height??0;if(C<=0||w<=0)continue;let S=[];for(let Q=0;Q<I.length-1;Q++){let lt=I[Q],_=I[Q+1],$=Math.abs(lt.x-_.x),tt=Math.abs(lt.y-_.y);$<oe&&tt<oe||$>=oe&&tt>=oe||S.push({idx:Q,length:$+tt,orientation:$>=oe?"horizontal":"vertical",midX:(lt.x+_.x)/2,midY:(lt.y+_.y)/2})}if(S.length===0)continue;let b=S.length>=3?S.filter(Q=>Q.idx>0&&Q.idx<S.length-1):S,L=b.length>0?b:S,E=C>=w?"horizontal":"vertical",B=c(Q=>[...Q].sort((lt,_)=>{let $=lt.orientation===E,tt=_.orientation===E;if($!==tt)return $?-1:1;let q=lt.length>=(lt.orientation==="horizontal"?C:w)+2,st=_.length>=(_.orientation==="horizontal"?C:w)+2;return q!==st?q?-1:1:_.length-lt.length}),"rankSegments"),P=S[0],N=S[S.length-1],F=[.5,.25,.75,.05,.95,.15,.85,.1,.9],U=c((Q,lt)=>{let _=I[Q.idx],$=I[Q.idx+1];return{midX:_.x+($.x-_.x)*lt,midY:_.y+($.y-_.y)*lt}},"anchorAtT"),G=c((Q,lt,_)=>Math.min(_,Math.max(lt,Q)),"clamp"),Z=c((Q,lt)=>Q.midX>=lt.left-oe&&Q.midX<=lt.right+oe&&Q.midY>=lt.top-oe&&Q.midY<=lt.bottom+oe,"pointInsideRectInclusive"),it=c(Q=>{let lt=Ye(Q.midX,Q.midY,C,w),_=m(lt);if(_)return{laneId:_,anchor:Q,rect:lt};let $=s.find(({rect:xt})=>Z(Q,xt));if(!$)return;let tt=$.rect.left+C/2+d,q=$.rect.right-C/2-d,st=$.rect.top+w/2+d,ut=$.rect.bottom-w/2-d;if(tt>q||st>ut)return;let gt={midX:G(Q.midX,tt,q),midY:G(Q.midY,st,ut)},pt=Ye(gt.midX,gt.midY,C,w);return Z(Q,pt)?{laneId:$.id,anchor:gt,rect:pt}:void 0},"placementForAnchor"),ft=c((Q,lt,_)=>Q.orientation==="horizontal"?Math.abs(lt.midX-_.x):Math.abs(lt.midY-_.y),"distanceAlongSegment"),At=c((Q,lt)=>{let $=(Q.orientation==="horizontal"?C/2:w/2)+u;if(Q===P){let tt=I[Q.idx];if(ft(Q,lt,tt)+oe<$)return!1}if(Q===N){let tt=I[Q.idx+1];if(ft(Q,lt,tt)+oe<$)return!1}return!0},"labelClearsTerminalEndpoints"),te=c(Q=>{let lt=B(Q);for(let _ of lt)for(let $ of F){let tt=U(_,$);if(!At(_,tt))continue;let q=it(tt);if(q&&!lo(q.rect,I)&&!p(h,q.rect)&&!l(h,f.id,q.rect))return{laneId:q.laneId,anchor:q.anchor}}},"tryPool"),zt=c((Q,lt,_=!1)=>{let $=B(Q);for(let tt of $){let q={midX:tt.midX,midY:tt.midY};if(lt&&!At(tt,q))continue;let st=it(q);if(st&&!lo(st.rect,I)&&!p(h,st.rect)&&!a(h,st.rect)&&(_||!y(f.id,st.rect)))return{laneId:st.laneId,anchor:st.anchor}}},"findLaneContainingFallback"),Ut=te(L)??(L.length<S.length?te(S):void 0)??zt(S,!0)??zt(S,!1)??zt(S,!1,!0);if(Ut){M.x=Ut.anchor.midX,M.y=Ut.anchor.midY,M.parentId=Ut.laneId;let Q=Ye(Ut.anchor.midX,Ut.anchor.midY,C,w),lt=x.findIndex(_=>_.labelId===h);lt>=0?x[lt]={labelId:h,rect:Q}:x.push({labelId:h,rect:Q})}}}c(dn,"anchorLabelsToPolyline");var Yn=1e-6,Ei=8,ls=Ei/2,Ai=3;function fo(t,e,n,{cx:o,cy:s},r,i){let d={x:o,y:s},u=i==="x"?"y":"x",a=Math.sign(r[u]-d[u]);for(let y of t){if(y===e||y.isLayoutOnly||!y.points?.length)continue;if([...y.end===n?[y.points.at(-1)]:[],...y.start===n?[y.points[0]]:[]].some(x=>Math.sign(x[u]-d[u])===a&&Math.abs(x[i]-r[i])<or.MIN_ARROWHEAD_SPACING))return!0}return!1}c(fo,"crowdsFaceNeighbour");function uo(t,e){return t<e?`${t}::${e}`:`${e}::${t}`}c(uo,"pairKey");function ur(t,e){let{nodeInfoById:n,realNodeRects:o}=vn(e),s=new Map;for(let i of e){let d=i.id;if(!i.isGroup&&i.isEdgeLabel){s.set(d,{w:i.width??0,h:i.height??0});continue}}let r=c((i,d,u,a)=>{let y=uo(d,u),l=0,x=c(m=>{if(!m)return;let p=s.get(m);if(!p)return;let f=a==="x"?p.w/2:p.h/2;f>l&&(l=f)},"consider");x(i.labelNodeId);for(let m of t){if(m===i||m.isLayoutOnly)continue;let p=m.start,f=m.end;!p||!f||uo(p,f)===y&&x(m.labelNodeId)}return l>0?l+Ai:0},"labelClearanceFor");for(let i of t){if(i.isLayoutOnly)continue;let d=i.points;if(!wo(d,Yn))continue;let u=To(i,n,Yn);if(!u)continue;let{srcId:a,dstId:y,srcInfo:l,dstInfo:x,collinearX:m,collinearY:p}=u;if(m===p)continue;let f,h;if(m){let b=x.cy>l.cy;f={x:l.cx,y:b?l.rect.bottom:l.rect.top},h={x:x.cx,y:b?x.rect.top:x.rect.bottom}}else{let b=x.cx>l.cx;f={x:b?l.rect.right:l.rect.left,y:l.cy},h={x:b?x.rect.left:x.rect.right,y:x.cy}}if(Xt(f,h,o,[a,y],1))continue;let M=m?"x":"y",I=r(i,a,y,M),C=I>ls?I:ls,w=[0,C,-C],S;for(let b of w){let L={...f},E={...h};if(m){if(L.x+=b,E.x+=b,L.x<=l.rect.left||L.x>=l.rect.right||E.x<=x.rect.left||E.x>=x.rect.right)continue}else if(L.y+=b,E.y+=b,L.y<=l.rect.top||L.y>=l.rect.bottom||E.y<=x.rect.top||E.y>=x.rect.bottom)continue;if(Xt(L,E,o,[a,y],1)||gn(L,E,t,i,{epsilon:Yn}))continue;let B=[L,E];if(fo(t,i,a,l,L,M)||fo(t,i,y,x,E,M)){S??=B;continue}i.points=B,S=void 0;break}S&&(i.points=S)}}c(ur,"straightenCollinearSiblingDetours");function ho(t,e){let{realNodeRects:a,labelNodeRects:y}=Ee(e.values()),l=c((b,L)=>we(L,.001).map(E=>({...E,edge:b,interior:E.index>=1&&E.index<=L.length-3})),"segmentsFor"),x=c(()=>{let b=[];for(let L of t){if(L.isLayoutOnly)continue;let E=L.points;!E||E.length<2||b.push(...l(L,vt(E)))}return b},"allSegments"),m=c((b,L)=>b.horizontal&&L.horizontal?Qt(b.a.x,b.b.x,L.a.x,L.b.x)>=8&&Math.abs(b.a.y-L.a.y)<7:b.vertical&&L.vertical?Qt(b.a.y,b.b.y,L.a.y,L.b.y)>=8&&Math.abs(b.a.x-L.a.x)<7:!1,"hasCrowdedParallelTrack"),p=c((b,L)=>{let E=b.start,B=b.end,P=l(b,L);if(P.length!==L.length-1)return!1;let N=[E,B].filter(U=>!!U),F=b.labelNodeId?[b.labelNodeId]:[];for(let U of P)if(Xt(U.a,U.b,a,N,-2)||Xt(U.a,U.b,y,F,-2))return!1;for(let U of t){if(U===b||U.isLayoutOnly)continue;let G=U.points;if(!(!G||G.length<2)){for(let Z of P)for(let it of l(U,vt(G)))if(m(Z,it)||be(Z.a,Z.b,it.a,it.b,.001))return!1}}return!0},"candidateIsSafe"),f=c((b,L)=>{let E=vt(b.edge.points??[]);if(E.length<4||b.index>=E.length-1)return;let B=E.map(P=>({...P}));if(b.horizontal)B[b.index].y+=L,B[b.index+1].y+=L;else if(b.vertical)B[b.index].x+=L,B[b.index+1].x+=L;else return;return l(b.edge,B).length===B.length-1?B:void 0},"shiftedCandidate"),h=c((b,L)=>({x:b.x??(L.left+L.right)/2,y:b.y??(L.top+L.bottom)/2}),"nodeCenter"),M=c(b=>{let L=b.edge,E=vt(L.points??[]);if(E.length!==4||b.index!==1)return;let B=L.start?e.get(L.start):void 0,P=L.end?e.get(L.end):void 0,N=B?se(B):void 0,F=P?se(P):void 0,U=E.slice(b.index+2);if(!(!B||!P||!N||!F||U.length===0))return{sourceCenter:h(B,N),targetCenter:h(P,F),sourceRect:N,tail:U}},"sourceDetourContextFor"),I=c((b,L,E,B,P,N)=>{let F=B.y>=E.y,U=F?P.bottom:P.top,G=U+(F?20:-20);if(F&&b.b.y<=G+.001||!F&&b.b.y>=G-.001)return;let Z=b.a.x+L;return vt([{x:E.x,y:U},{x:E.x,y:G},{x:Z,y:G},{x:Z,y:b.b.y},...N],.001)},"verticalSourceDetour"),C=c((b,L,E,B,P,N)=>{let F=B.x>=E.x,U=F?P.right:P.left,G=U+(F?20:-20);if(F&&b.b.x<=G+.001||!F&&b.b.x>=G-.001)return;let Z=b.a.y+L;return vt([{x:U,y:E.y},{x:G,y:E.y},{x:G,y:Z},{x:b.b.x,y:Z},...N],.001)},"horizontalSourceDetour"),w=c((b,L)=>{let E=M(b);if(E){if(b.vertical)return I(b,L,E.sourceCenter,E.targetCenter,E.sourceRect,E.tail);if(b.horizontal)return C(b,L,E.sourceCenter,E.targetCenter,E.sourceRect,E.tail)}},"sourceDetourCandidate"),S=[-7,7,-14,14,-21,21];for(let b=0;b<12;b++){let L=x(),E=!1;for(let B=0;B<L.length&&!E;B++)for(let P=B+1;P<L.length&&!E;P++){let N=L[B],F=L[P];if(N.edge===F.edge||!m(N,F))continue;let U=[N,F].filter(G=>G.interior);for(let G of U){for(let Z of S){let it=f(G,Z);if(it&&p(G.edge,it)){G.edge.points=it,E=!0;break}let ft=w(G,Z);if(ft&&p(G.edge,ft)){G.edge.points=ft,E=!0;break}}if(E)break}}if(!E)return}}c(ho,"nudgeSharedInteriorSubpaths");function hr(t,e,n,o){let s=e.x-t.x,r=e.y-t.y,i=o.x-n.x,d=o.y-n.y,u=s*d-r*i;if(Math.abs(u)<1e-10)return!1;let a=n.x-t.x,y=n.y-t.y,l=(a*d-y*i)/u,x=(a*r-y*s)/u,m=.01;return l>m&&l<1-m&&x>m&&x<1-m}c(hr,"segmentsIntersect");function gr(t){let e=t.nodes??[],n=t.edges??[],o=[];if(!n.length||!e.length)return o;let s=Ps(e),r=1,i=[];for(let u of n){if(u.isLayoutOnly)continue;let a=u.points;if(!a||a.length<2)continue;let y=u.start,l=u.end,x=u.labelNodeId,m=u.id??`${y}->${l}`;for(let p of s)if(!(p.nodeId===y||p.nodeId===l)&&!(x&&p.nodeId===x)){for(let f=0;f<a.length-1;f++)if(Cn(a[f],a[f+1],p,-r)){o.push({type:"edge-node-overlap",edgeId:m,targetId:p.nodeId,detail:`segment ${f} passes through node "${p.nodeId}"`});break}}for(let p=0;p<a.length-1;p++)i.push({edgeId:m,start:y,end:l,p1:a[p],p2:a[p+1]})}let d=new Set;for(let u=0;u<i.length;u++)for(let a=u+1;a<i.length;a++){let y=i[u],l=i[a];if(y.edgeId!==l.edgeId&&!(y.start===l.start||y.start===l.end||y.end===l.start||y.end===l.end)&&hr(y.p1,y.p2,l.p1,l.p2)){let x=y.edgeId<l.edgeId?`${y.edgeId}|${l.edgeId}`:`${l.edgeId}|${y.edgeId}`;d.has(x)||(d.add(x),o.push({type:"edge-edge-crossing",edgeId:y.edgeId,targetId:l.edgeId,detail:`edges "${y.edgeId}" and "${l.edgeId}" cross`}))}}if(o.length>0){let u=o.filter(y=>y.type==="edge-node-overlap").length,a=o.filter(y=>y.type==="edge-edge-crossing").length;De.warn(`[SWIMLANE_VALIDATE] ${o.length} issue(s) detected: ${u} edge-node overlap(s), ${a} edge crossing(s)`);for(let y of o)De.warn(`[SWIMLANE_VALIDATE] ${y.type}: ${y.detail}`)}return o}c(gr,"validateSwimlanesLayout");function pr(t,e){let n=t.nodes??[],o=t.edges??[],s=n.filter(d=>!d.isGroup);if((e==="LR"||e==="RL")&&s.length>0&&!tr(t,e)||e==="BT"&&s.length>0&&!Ks(t))return;for(let d of o){if(d.isLayoutOnly)continue;let u=d.points;!u||u.length<2||(d.points=me(pn(u)))}dr(o,n),ur(o,n),er(o,n);let r=new Map;for(let d of n)r.set(String(d.id),d);dn(o,r),Xs(o,r),nr(o,r),ho(o,r),so(o,r),rr(o,r),ro(o,r),ir(o,r);let i=c(()=>{lr(o,r),so(o,r),cr(o,r),ar(o,r),dn(o,r),no(o,r),ro(o,r),dn(o,r),no(o,r)},"finalizeRenderedEdges");i(),ho(o,r),i(),io(o,r,e),co(o,r,e),io(o,r,e),co(o,r,e)}c(pr,"postProcessSwimlaneLayout");function Ae(t){let e=new Map(t.nodeById),n=new Set,o=[];for(let r of t.edges){if(!e.has(r.src)||!e.has(r.dst))continue;let i=`${r.id}:${r.src}->${r.dst}`;n.has(i)||(n.add(i),o.push(r))}return{nodes:[...e.keys()],edges:o,layout:t.layout,nodeById:e}}c(Ae,"normalizeGraph");function ko(t,e){return t.edges.filter(n=>n.dst===e)}c(ko,"incoming");function mr(t){let e=new Map;for(let n of t.nodes)e.set(n,[]);for(let n of t.edges)e.get(n.src).push(n.dst);return e}c(mr,"buildSuccessorMap");function _o(t){let e=mr(t);for(let n of e.values())n.sort((o,s)=>o.localeCompare(s));return e}c(_o,"buildSortedSuccessorMap");function Ln(t){let e=new Map;for(let n of t.nodes)e.set(n,0);for(let n of t.edges)e.set(n.dst,(e.get(n.dst)??0)+1);return e}c(Ln,"buildInDegreeMap");function Do(t,e){let n=[...e.entries()].filter(([,d])=>d===0).map(([d])=>d).sort((d,u)=>d.localeCompare(u)),o=new Set(t.edges.flatMap(d=>[d.src,d.dst])),s=c(d=>!o.has(d)&&!t.nodeById.get(d)?.isGroup,"isUnconnected"),r=[...e.keys()].filter(d=>e.get(d)===0&&s(d)),i=0;return n.map(d=>s(d)?r[i++]:d)}c(Do,"sortedZeroInDegreeNodes");function wn(t,e=()=>!0){let n=new Map,o=new Map;for(let s of t.nodes)n.set(s,[]),o.set(s,[]);for(let s of t.edges)e(s)&&(o.get(s.src).push(s.dst),n.get(s.dst).push(s.src));return{preds:n,succs:o}}c(wn,"buildPredecessorSuccessorMaps");function Ho(t,e,n,o){let s=0;for(let i of t.nodes)o?.skipGroups&&t.nodeById.get(i)?.isGroup||(s=Math.max(s,n[i]??0));let r=Array.from({length:s+1},()=>[]);for(let i of e)o?.skipGroups&&t.nodeById.get(i)?.isGroup||r[Math.max(0,n[i]??0)].push(i);return r}c(Ho,"buildLayersFromRanks");function je(t){let e=Ln(t),n=Do(t,e),o=[],s=_o(t);for(;n.length;){let r=n.shift();o.push(r);for(let i of s.get(r)??[])if(e.set(i,(e.get(i)??0)-1),(e.get(i)??0)===0){let d=0;for(;d<n.length&&n[d]<i;)d++;n.splice(d,0,i)}}return o.length===t.nodes.length?o:null}c(je,"topoSortIfAcyclic");function Ge(t){let e=new Map,n=0;for(let o of t)e.set(o,n),n++;return e}c(Ge,"buildLayerIndex");function Xo(t){let e=new Array(t.length),n=c((o,s)=>{if(s-o<=1)return 0;let r=o+s>>1,i=n(o,r)+n(r,s),d=o,u=r,a=o;for(;d<r||u<s;)u>=s||d<r&&t[d]<=t[u]?e[a++]=t[d++]:(e[a++]=t[u++],i+=r-d);for(let y=o;y<s;y++)t[y]=e[y];return i},"count");return n(0,t.length)}c(Xo,"countInversions");function yr(t){let e=Ae(t),n=new Map;for(let l of e.nodes)n.set(l,[]);for(let l of e.edges)n.get(l.src).push(l);for(let l of n.values())l.sort((x,m)=>x.dst===m.dst?x.id.localeCompare(m.id):x.dst.localeCompare(m.dst));let o=Object.create(null);for(let l of e.nodes)o[l]=0;let s=[],r=c(l=>{o[l]=1;for(let x of n.get(l)??[]){let m=x.dst;o[m]===0?r(m):o[m]===1&&s.push(x)}o[l]=2},"dfs"),i=Ln(e),d=[...e.nodes.filter(l=>(i.get(l)??0)===0),...e.nodes.filter(l=>(i.get(l)??0)!==0)];for(let l of d)o[l]===0&&r(l);let u=new Set(s.map(l=>`${l.id}:${l.src}->${l.dst}`)),a=e.edges.map(l=>u.has(`${l.id}:${l.src}->${l.dst}`)?{id:l.id,src:l.dst,dst:l.src,weight:l.weight,ref:l.ref}:l);return{acyclic:{nodes:[...e.nodes],edges:a,layout:e.layout,nodeById:new Map(e.nodeById)},reversed:s}}c(yr,"removeCycles_DFS");function xr(t){let e=he(t.layout.nodes??[]),n=new Map;for(let o of t.nodes)n.set(o,e.laneIdOf(o));return n}c(xr,"buildTopLaneMap");function Me(t){let e=xr(t);return n=>e.get(n)??null}c(Me,"createTopLaneResolver");function En(t){let e=t.layout.nodes??[],n=he(e),o=e.filter(i=>n.isLane(i.id)),s=o.filter(i=>ln(i)!==void 0);if(s.length>0&&s.length===o.length)return[...s].sort((i,d)=>(ln(i)??0)-(ln(d)??0)).map(i=>i.id);if(!n.hasPools)return[...new Set(o.map(i=>i.id))].reverse();let r=[];for(let i of e)i.parentId||(n.isPool(i.id)?r.push(...n.lanesByPool.get(i.id)??[]):n.isLane(i.id)&&r.push(i.id));return[...new Set(r)].reverse()}c(En,"buildTopLaneOrder");function Yo(t,e){let n=En(t);if(!e||e.length===0)return n;let o=new Set(n),s=new Set,r=[];for(let i of e)!o.has(i)||s.has(i)||(s.add(i),r.push(i));for(let i of n)s.has(i)||r.push(i);return r}c(Yo,"resolveTopLaneOrder");function br(t,e){let n=Ae(t),o=e?.laneOf??(()=>null),s=e?.rankHint,{preds:r}=wn(n);for(let S of r.values())S.sort((b,L)=>b.localeCompare(L));let i=je(n)??[...n.nodes].sort((S,b)=>S.localeCompare(b)),d=new Map;for(let[S,b]of i.entries())d.set(b,S);let u=new Map,a=new Map;for(let S of n.nodes)a.set(S,[]);for(let S of i){let b=(r.get(S)??[]).filter(L=>u.has(L));if(b.length>0){let L=Mr(S,b,{laneOf:o,rankHint:s,topoIndex:d});u.set(S,L),a.get(L).push(S)}else u.has(S)||u.set(S,null)}for(let S of n.nodes)u.has(S)||u.set(S,null);let y=new Set;for(let S of n.nodes)(u.get(S)??null)===null&&y.add(S);let l=[...y].sort((S,b)=>{let L=d.get(S)??0,E=d.get(b)??0;return L===E?S.localeCompare(b):L-E}),x=Ir(n),m=new Map;for(let[S,b]of x.entries())m.set(S,[...b].sort((L,E)=>L.localeCompare(E)));let p=Sr(m),f=Cr(m),h=new Map;for(let S of n.nodes)h.set(S,[]);for(let S of f)for(let b of S.nodes){let L=h.get(b);L?L.push(S.id):h.set(b,[S.id])}let M=[],I=[],C=new Set,w=c(S=>{if(!C.has(S)){C.add(S),M.push(S);for(let b of a.get(S)??[])w(b);I.push(S)}},"walk");for(let S of l)w(S);for(let S of i)w(S);return{parent:u,children:a,roots:l,componentOf:p,blocks:f,nodeBlocks:h,adjacency:m,preorder:M,postorder:I,topologicalOrder:i}}c(br,"buildDrivingTree");function Mr(t,e,n){let o=n.laneOf(t);return[...e].sort((r,i)=>{let d=n.laneOf(r),u=n.laneOf(i),a=d!=null&&d===o,y=u!=null&&u===o;if(a!==y)return a?-1:1;let l=n.rankHint?.[r],x=n.rankHint?.[i];if(l!=null&&x!=null&&l!==x)return x-l;let m=n.topoIndex.get(r)??0,p=n.topoIndex.get(i)??0;return m!==p?m-p:r.localeCompare(i)})[0]}c(Mr,"chooseParent");function Ir(t){let e=new Map;for(let n of t.nodes)e.set(n,new Set);for(let n of t.edges)e.get(n.src).add(n.dst),e.get(n.dst).add(n.src);return e}c(Ir,"buildAdjacency");function Sr(t){let e=new Map,n=0;for(let o of t.keys()){if(e.has(o))continue;let s=[o];for(;s.length>0;){let r=s.pop();if(!e.has(r)){e.set(r,n);for(let i of t.get(r)??[])e.has(i)||s.push(i)}}n++}return e}c(Sr,"assignComponents");function Cr(t){let e=new Map,n=new Map,o=[],s=[],r=0,i=c((d,u)=>{e.set(d,++r),n.set(d,r);for(let a of t.get(d)??[])a!==u&&(e.has(a)?(e.get(a)??0)<(e.get(d)??0)&&(o.push([d,a]),n.set(d,Math.min(n.get(d)??r,e.get(a)??r))):(o.push([d,a]),i(a,d),n.set(d,Math.min(n.get(d)??r,n.get(a)??r)),(n.get(a)??0)>=(e.get(d)??0)&&s.push(vr(d,a,o,s.length))))},"visit");for(let d of t.keys())e.has(d)||i(d,null);return s}c(Cr,"computeBlocks");function vr(t,e,n,o){let s=[],r=new Set;for(;n.length>0;){let i=n.pop();if(s.push(i),r.add(i[0]),r.add(i[1]),i[0]===t&&i[1]===e||i[0]===e&&i[1]===t)break}return{id:o,edges:s,nodes:[...r]}}c(vr,"popBlock");function Lr(t,e,n){let o=[...t.nodes],s=new Map;for(let[I,C]of o.entries())s.set(C,I);let r=o.length,i=new Array(r).fill(-1),d=new Array(r).fill(0),u=[],a=new Set;for(let I of o){let C=n.parent.get(I)??null,w=s.get(I);w!=null&&C==null&&(i[w]=-1,d[w]=0,a.has(I)||(a.add(I),u.push(I)))}for(;u.length>0;){let I=u.shift(),C=s.get(I);if(C==null)continue;let w=n.children.get(I)??[];for(let S of w){if(a.has(S))continue;let b=s.get(S);b!=null&&(i[b]=C,d[b]=d[C]+1,a.add(S),u.push(S))}}for(let I of o){if(a.has(I))continue;let C=s.get(I);C!=null&&(i[C]=-1,d[C]=0,a.add(I))}let y=Math.max(1,Math.ceil(Math.log2(Math.max(1,r)))+1),l=Array.from({length:y},()=>new Array(r).fill(-1));for(let I=0;I<r;I++)l[0][I]=i[I];for(let I=1;I<y;I++)for(let C=0;C<r;C++){let w=l[I-1][C];l[I][C]=w===-1?-1:l[I-1][w]}let x=c((I,C)=>{if(I===-1||C===-1)return-1;d[I]<d[C]&&([I,C]=[C,I]);let w=d[I]-d[C];for(let S=0;S<y;S++)if(w>>S&1&&(I=l[S][I],I===-1))return-1;if(I===C)return I;for(let S=y-1;S>=0;S--){let b=l[S][I],L=l[S][C];b===-1||L===-1||b!==L&&(I=b,C=L)}return l[0][I]},"lcaIndex"),m=Array.from({length:r},()=>new Map);for(let I of t.edges){let C=I.src,w=I.dst,S=e[C],b=e[w];if(S==null||b==null||(S>b&&([C,w]=[w,C],[S,b]=[b,S]),S==null||b==null||S===b))continue;let L=s.get(C),E=s.get(w);if(L==null||E==null)continue;let B=x(L,E);if(B===-1)continue;let P=m[B];for(let N=S;N<b;N++)P.set(N,(P.get(N)??0)+1)}let p=new Map,f=c((I,C)=>{if(C.size!==0)for(let[w,S]of C)I.set(w,(I.get(w)??0)+S)},"mergeInto"),h=new Set,M=c(I=>{let C=s.get(I);h.add(I);let w=C==null?void 0:m[C],S=w?new Map(w):new Map,b=n.children.get(I)??[];for(let L of b){let E=M(L),B=e[I];if(B!=null){let P=p.get(I);P||(P=new Map,p.set(I,P));let N=E.get(B)??0,F=e[L];F!=null&&F>B&&(N+=1),P.set(L,N)}f(S,E)}return S},"dfs");for(let I of n.roots)h.has(I)||M(I);for(let I of o)h.has(I)||M(I);return p}c(Lr,"computeSubtreeCrossCounts");function wr(t,e,n){let o=new Map,s=c(r=>{let i=n[r]??0,d=[...e.get(r)??[]];d.sort(Go(n));for(let u of d){s(u);let a=o.get(u);a!=null&&(i=Math.min(i,a))}o.set(r,i)},"annotate");for(let r of t)s(r);return o}c(wr,"annotateMinimumLayers");function Go(t){return(e,n)=>{let o=t[e]??0,s=t[n]??0;return o===s?e.localeCompare(n):o-s}}c(Go,"compareByRankThenId");function Er(t,e,n,o){let s=0;for(let u of e){let a=n[u]??0;a>s&&(s=a)}let r=Array.from({length:s+1},()=>[]),i=new Set,d=c(u=>{if(i.has(u))return;i.add(u);let a=n[u]??0;r[a]||(r[a]=[]),r[a].push(u);for(let y of o(u))d(y)},"emit");for(let u of t)d(u);for(let u of e)if(!i.has(u)){let a=n[u]??0;r[a]||(r[a]=[]),r[a].push(u),i.add(u)}return r}c(Er,"emitNodesInTreeOrder");function Ar(t){let e=[];for(let n of t){let o=new Set,s=[];for(let r of n)o.has(r)||(o.add(r),s.push(r));e.push(s)}return e}c(Ar,"deduplicateLayers");function Rr(t,e,n,o){return s=>{let r=t.get(s)??[];if(r.length===0)return[];let i=e[s]??0,d=[],u=[],a=n.get(s);for(let y of r){let l=o.get(y)??i;l>i?d.push({child:y,min:l}):u.push(y)}return d.sort((y,l)=>y.min===l.min?y.child.localeCompare(l.child):y.min-l.min),u.sort((y,l)=>{let x=a?.get(y)??0,m=a?.get(l)??0;if(x!==m)return x-m;let p=o.get(y)??i,f=o.get(l)??i;return p!==f?p-f:y.localeCompare(l)}),[...d.map(y=>y.child),...u]}}c(Rr,"createChildOrderer");function In(t,e,n){let o=br(t,{rankHint:e,laneOf:n}),{children:s,roots:r}=o;for(let l of t.nodes)s.has(l)||s.set(l,[]);let i=Lr(t,e,o),d=[...r].sort(Go(e)),u=wr(d,s,e),a=Rr(s,e,i,u),y=Er(d,t.nodes,e,a);return y=Ar(y),y}c(In,"buildMultitreeLayerOrder");function Tr(t,e,n){let o=new Set(t),s=new Set(e),r=Ge(e),i=[];for(let d of n)o.has(d.src)&&s.has(d.dst)&&i.push(r.get(d.dst));return Xo(i)}c(Tr,"countCrossingsBetweenAdjacent");function go(t,e,n){let o=[];for(let r of e){let i=n[r.src],d=n[r.dst];if(i==null||d==null||i===d)continue;let u=r.src,a=r.dst,y=i,l=d;i>d&&(u=r.dst,a=r.src,y=d,l=i);for(let x=y;x<l;x++)o.push({id:`${r.id}@${x}`,src:u,dst:a,ref:r.ref})}let s=0;for(let r=0;r+1<t.length;r++)s+=Tr(t[r],t[r+1],o);return s}c(go,"totalCrossings");function Or(t,e){let n={...e},{preds:o}=wn(t),s=Me(t),r=In(t,n,s),i=go(r,t.edges,n),d=Mn.MAX_CROSSING_OPTIMIZATION_PASSES;for(let u=0;u<d;u++){let a=!1,y=[...t.nodes].sort((l,x)=>(n[x]??0)-(n[l]??0));for(let l of y){let x=n[l]??0;if(x===0)continue;let m=0;for(let M of o.get(l)??[])m=Math.max(m,(n[M]??0)+1);if(m>=x)continue;let p=x;n[l]=m;let f=In(t,n,s),h=go(f,t.edges,n);h<i?(i=h,a=!0):n[l]=p}if(!a)break}return n}c(Or,"optimizeRanksByCrossings");function Nr(t,e){let n=Me(t),o=[...t.nodes].sort((s,r)=>(e[s]??0)-(e[r]??0)||s.localeCompare(r));for(let s of o){let r=n(s);if(!r)continue;let i=t.edges.filter(f=>f.src===s);if(i.length===0)continue;let d=!1,u=0;for(let f of i){let h=n(f.dst);h==null||h===r?d=!0:u++}if(u===0||d)continue;let a=0,y=!1;for(let f of t.edges){if(f.dst!==s)continue;let h=n(f.src);h&&(h===r?y=!0:a++)}if(a>0||!y)continue;let l=e[s]??0,x=l+u,m=0;for(let f of t.edges)f.dst===s&&(m=Math.max(m,(e[f.src]??0)+1));let p=Math.max(l,m,x);p!==l&&(e[s]=p)}}c(Nr,"adjustCrossLaneSources");function Br(t,e){let n=Ae(t),o=je(n)??[...n.nodes].sort(),s=e?.compactSingleInput??!1,r=Me(n),i=Object.create(null);for(let u of o){let a=ko(n,u),y=e?.ignoreCrossLaneEdges?a.filter(l=>{let x=r(l.src),m=r(u);return!x||!m?!0:x===m}):a;if(y.length===0)i[u]=0;else if(s&&y.length===1){let l=y[0].src,x=r(l),m=r(u);x!==m?i[u]=i[l]??0:i[u]=(i[l]??0)+1}else{let l=-1/0;for(let x of y)l=Math.max(l,(i[x.src]??0)+1);i[u]=l===-1/0?0:l}}return(e?.optimizeRanksByCrossings??!1)&&(i=Or(n,i)),e?.ignoreCrossLaneEdges&&Nr(n,i),{layers:In(n,i,r),rankOf:i,dummy:new Set}}c(Br,"assignLayers_LongestPath");function Fr(t,e){let n=Ae(t),s={...Br(n,{compactSingleInput:e?.compactSingleInput,ignoreCrossLaneEdges:e?.ignoreCrossLaneEdges,optimizeRanksByCrossings:e?.optimizeRanksByCrossings}).rankOf},r=Me(n),{preds:i,succs:d}=wn(n,p=>{if(e?.ignoreCrossLaneEdges){let f=r(p.src),h=r(p.dst);if(f&&h&&f!==h)return!1}return!0}),u=je(n)??[...n.nodes],a=[...u].reverse(),y=c((p,f)=>{let h=0;for(let C of i.get(p)??[])h=Math.max(h,(s[C]??0)+1);let M=Number.POSITIVE_INFINITY,I=d.get(p)??[];return I.length>0&&(M=Math.min(...I.map(C=>(s[C]??0)-1))),Number.isFinite(M)||(M=Math.max(h,f)),Math.min(Math.max(f,h),M)},"clampFeasible"),l=Mn.GRAVITY_ITERATIONS,x=c(p=>{let f=!1;for(let h of p){let M=i.get(h)??[],I=d.get(h)??[];if(M.length===0&&I.length===0)continue;let C=M.length>0?M.reduce((L,E)=>L+(s[E]??0)+1,0)/M.length:s[h]??0,w=I.length>0?I.reduce((L,E)=>L+(s[E]??0)-1,0)/I.length:s[h]??0,S=Math.round((C+w)/2),b=y(h,S);b!==s[h]&&(s[h]=b,f=!0)}return f},"relaxOrder");for(let p=0;p<l;p++){let f=x(u),h=x(a);if(!f&&!h)break}for(let p of u){let f=0;for(let h of i.get(p)??[])f=Math.max(f,(s[h]??0)+1);(s[p]??0)<f&&(s[p]=f)}for(let p of a){let f=d.get(p)??[];if(f.length>0){let h=Math.min(...f.map(M=>(s[M]??0)-1));(s[p]??0)>h&&(s[p]=h)}}return{layers:Ho(n,u,s),rankOf:s,dummy:new Set}}c(Fr,"assignLayers_Gravity");function Pr(t){let e=Ln(t),n=_o(t),o=Do(t,e),s=[];for(;o.length>0;){let r=[];for(let i of o){s.push(i);for(let d of n.get(i)??[])e.set(d,(e.get(d)??0)-1),(e.get(d)??0)===0&&r.push(d)}o=r.sort((i,d)=>i.localeCompare(d))}return s.length===t.nodes.length?s:null}c(Pr,"topoSortByGenerationIfAcyclic");function kr(t,e){let n=Ae(t),o=e?.direction==="LR"?Pr(n)??[...n.nodes].sort():je(n)??[...n.nodes].sort(),s=Me(n),r=c(y=>s(y)??y,"laneOf"),i=Object.create(null),d=new Map,u=c((y,l)=>e?.ignoreCrossLaneEdges??!0?r(y)===r(l)?1:0:1,"edgeWeight");for(let y of o){if(n.nodeById.get(y)?.isGroup)continue;let x=ko(n,y),m=0;if(x.length>0)for(let M of x){let I=M.src,C=i[I]??0;m=Math.max(m,C+u(I,y))}let p=r(y),f=d.get(p)??0,h=Math.max(m,f);i[y]=h,d.set(p,h+1)}return{layers:Ho(n,o,i,{skipGroups:!0}),rankOf:i,dummy:new Set}}c(kr,"assignLayers_LaneAwareCompact");function _r(t,e){let n=Ae(e),{rankOf:o}=t,s=t.layers.map(m=>[...m]),r=new Set(t.dummy?[...t.dummy]:[]),i=0,d=new Map(n.nodeById),u=c(m=>{let p=`placeholder-${i++}`,f={id:p,isGroup:!1,isDummy:!0,width:0,height:0};for(d.set(p,f),r.add(p);s.length<=m;)s.push([]);return s[m].push(p),o[p]=m,p},"addDummyAt"),a=[...n.edges].sort((m,p)=>m.id===p.id?m.src===p.src?m.dst.localeCompare(p.dst):m.src.localeCompare(p.src):m.id.localeCompare(p.id)),y=[];for(let m of a){let p=o[m.src]??0,f=o[m.dst]??0;if(f-p<=1){y.push(m);continue}let h=m.src;for(let I=p+1,C=0;I<f;I++,C++){let w=u(I);y.push({id:`${m.id}#${C}`,src:h,dst:w,weight:m.weight,ref:m.ref}),h=w}let M=f-p-2;y.push({id:`${m.id}#${Math.max(M+1,0)}`,src:h,dst:m.dst,weight:m.weight,ref:m.ref})}let x={nodes:[...n.nodes,...[...r].filter(m=>!n.nodes.includes(m))],edges:y,layout:n.layout,nodeById:d};return{layering:{layers:s,rankOf:o,dummy:r},graphWithDummies:x}}c(_r,"makeProperLayering");function po(t){let e=t.length;if(e===0)return Number.POSITIVE_INFINITY;let n=[...t].sort((o,s)=>o-s);return e%2===1?n[(e-1)/2]:.5*(n[e/2-1]+n[e/2])}c(po,"median");function mo(t){return t.length===0?Number.POSITIVE_INFINITY:t.reduce((n,o)=>n+o,0)/t.length}c(mo,"barycenter");function Dr(t,e,n,o){let s=new Map;for(let r of t)s.set(r,[]);for(let r of n)o==="down"?e.has(r.src)&&s.has(r.dst)&&s.get(r.dst).push(e.get(r.src)):e.has(r.dst)&&s.has(r.src)&&s.get(r.src).push(e.get(r.dst));return s}c(Dr,"neighborPositionsFor");function Hr(t,e,n){let o=n.get(t)??0,s=n.get(e)??0;return o!==s?o-s:t.localeCompare(e)}c(Hr,"currentOrderTieBreak");function yo(t,e,n){let o=new Set(t),s=new Set(e),r=Ge(t),i=Ge(e),d=[];for(let a of n)o.has(a.src)&&s.has(a.dst)&&d.push({u:r.get(a.src),v:i.get(a.dst)});d.sort((a,y)=>a.u===y.u?a.v-y.v:a.u-y.u);let u=d.map(a=>a.v);return Xo(u)}c(yo,"countCrossingsBetweenAdjacent");function fn(t,e,n){return[...t].sort((o,s)=>{let r=po(e.get(o)??[]),i=po(e.get(s)??[]);return r===i?Hr(o,s,n):isFinite(r)?isFinite(i)?r-i:-1:1})}c(fn,"sortByHeuristic");function xo(t,e,n,o,s,r){let i=Ge(t),d=Ge(e),u=Dr(e,i,n,o);if(!s||!r||r.length===0)return fn(e,u,d);let a=new Map;for(let x of e){let m=s(x),p=a.get(m)??[];p.push(x),a.set(m,p)}let y=[];for(let x of r){let m=a.get(x);if(!m||m.length===0)continue;let p=fn(m,u,d);y.push(...p)}let l=a.get(null);if(l&&l.length>0){let x=fn(l,u,d);for(let m of x){let p=mo(u.get(m)??[]),f=y.length;if(isFinite(p))for(let[h,M]of y.entries()){let I=mo(u.get(M)??[]);if(p<I){f=h;break}}y.splice(f,0,m)}}return y}c(xo,"reorderLayer");function bo(t,e,n,o,s){let r=[...e],i=new Set(t),d=new Set(e),u=o?new Set(o):null,a=n.filter(f=>i.has(f.src)&&d.has(f.dst)),y=u?n.filter(f=>d.has(f.src)&&u.has(f.dst)):void 0,l=c(f=>{let h=yo(t,f,a);return y&&o&&(h+=yo(f,o,y)),h},"crossingScore"),x=s?new Map:null;if(s&&x)for(let f of e)x.set(f,s(f));let m=!0,p=l(r);for(;m;){m=!1;for(let f=0;f+1<r.length;f++){if(x){let I=x.get(r[f]),C=x.get(r[f+1]);if(I!==C)continue}let h=p;[r[f],r[f+1]]=[r[f+1],r[f]];let M=l(r);M<h?(p=M,m=!0):[r[f],r[f+1]]=[r[f+1],r[f]]}}return r}c(bo,"transposeImprove");function Xr(t,e,n){let o=t.layers.map(d=>[...d]),s=e.edges,r=Me(e),i=Yo(e,n?.laneOrder);for(let d=0;d<3;d++){for(let u=1;u<o.length;u++)o[u]=xo(o[u-1],o[u],s,"down",r,i),o[u]=bo(o[u-1],o[u],s,o[u+1],r);for(let u=o.length-2;u>=0;u--)o[u]=xo(o[u+1],o[u],s,"up",r,i),o[u]=bo(o[u+1],o[u],s,o[u-1],r)}return{layers:o}}c(Xr,"orderLayers");function Yr(t,e,n){let o=n?.layerGap??Hn.DEFAULT_LAYER_GAP,s=n?.nodeGap??Hn.DEFAULT_NODE_GAP,r=n?.laneGap??s*2,i=n?.direction??"TB",d=i==="LR"||i==="RL",u=Object.create(null),a=Object.create(null),y=new Map((e.layout?.nodes??[]).filter(_=>_.isEdgeLabel).map(_=>[_.id,_])),l=c(_=>y.get(_)??e.nodeById.get(_),"getNode"),x=c(_=>l(_)?.width??0,"getWidth"),m=c(_=>l(_)?.height??0,"getHeight"),p=Me(e),f=new Map,h=c(_=>f.has(_)?f.get(_)??null:p(_),"topLaneOf"),M=Yo(e,n?.laneOrder),I=new Set;for(let _ of t.layers)for(let $ of _)I.add(p($));let C=I.has(null),w=M.filter(_=>I.has(_)),S=[...C?[null]:[],...w],b=t.layers,L=new Map;for(let[_,$]of b.entries())for(let tt of $)L.set(tt,_);let E=[],B=[],P=[];for(let _ of e.layout?.edges??[]){let $=_.labelNodeId,tt=_.start,q=_.end;if(!$||!y.has($)||tt==null||q==null)continue;let st=L.get(tt),ut=L.get(q);if(st==null||ut==null){P.push({labelId:$,near:st==null?q:tt});continue}if(f.set($,p(q)),st===ut){let xt=c(Ft=>S.indexOf(p(Ft)),"column");E.push({labelId:$,rank:ut,lane:p(q),side:tt!==q&&xt(tt)<xt(q)?"before":"after"});continue}let gt=Math.min(st,ut),pt=Math.max(st,ut);B.push({labelId:$,start:tt,end:q,gap:gt+Math.floor((pt-gt-1)/2),crossesLanes:p(tt)!==p(q)})}let N=b.map(_=>_.reduce(($,tt)=>Math.max($,m(tt)),0));for(let{labelId:_,rank:$}of E)N[$]=Math.max(N[$],m(_));let F=b.map(()=>0);if(d)for(let _=0;_+1<b.length;_++){let $=b[_].reduce((pt,xt)=>Math.max(pt,x(xt)),0),tt=b[_+1].reduce((pt,xt)=>Math.max(pt,x(xt)),0),q=N[_],st=N[_+1],ut=q/2+st/2,gt=($+tt)/2;F[_]=Math.max(0,gt-ut-o)}let U=d?Po(e.layout?.nodes??[]):1,G=b.map(()=>0);for(let{labelId:_,gap:$}of B){let q=((d?x(_):m(_))+2*Hn.EDGE_LABEL_CLEARANCE)/U;G[$]=Math.max(G[$],q)}for(let[_,$]of G.entries())F[_]+=$;let Z=Object.create(null);for(let _ of w)Z[_]=0;C&&(Z.null=0);for(let _ of b){let $=Object.create(null),tt=[];for(let q of _){let st=h(q);st===null?tt.push(q):($[st]||=[]).push(q)}for(let[q,st]of Object.entries($)){let ut=st.reduce((gt,pt)=>gt+x(pt),0)+s*Math.max(0,st.length-1);Z[q]=Math.max(Z[q]??0,ut)}if(C&&tt.length){let q=tt.reduce((st,ut)=>st+x(ut),0)+s*Math.max(0,tt.length-1);Z.null=Math.max(Z.null??0,q)}}let it=new Map;for(let _ of B){let $=`${_.gap}:${h(_.labelId)}`,tt=it.get($);tt?tt.push(_):it.set($,[_])}for(let _ of it.values()){let $=h(_[0].labelId);if($!==null){let tt=_.reduce((q,st,ut)=>q+x(st.labelId)+(ut>0?s:0),0);Z[$]=Math.max(Z[$]??0,tt)}}let ft=new Map;for(let{labelId:_,rank:$,lane:tt,side:q}of E){let st=`${$}:${tt}:${q}`;ft.set(st,(ft.get(st)??0)+s+x(_))}let At=c((_,$,tt)=>ft.get(`${_}:${$}:${tt}`)??0,"rowLabelSpan");for(let{rank:_,lane:$}of E){let tt=b[_].filter(ut=>h(ut)===$).reduce((ut,gt,pt)=>ut+x(gt)+(pt>0?s:0),0),q=Math.max(At(_,$,"before"),At(_,$,"after")),st=$??"null";Z[st]=Math.max(Z[st]??0,tt+2*q)}let te=new Map;{let _=S.map(q=>(q===null?Z.null:Z[q])??0),tt=-(_.reduce((q,st)=>q+st,0)+r*Math.max(0,S.length-1))/2;for(let q=0;q<S.length;q++){let st=S[q],ut=_[q]??0,gt=tt+ut/2;te.set(st,gt),tt+=ut,q<S.length-1&&(tt+=r)}}let zt=[],Ut=0;for(let[_,$]of b.entries()){let tt=N[_]??0,q=new Map;for(let ut of $){let gt=h(ut),pt=q.get(gt)??[];pt.push(ut),q.set(gt,pt)}for(let ut of S){let gt=q.get(ut)??[];if(gt.length===0)continue;let pt=te.get(ut);if(gt.length===1){let xt=gt[0];u[xt]=pt,a[xt]=Ut+tt/2}else{let xt=gt.map(ye=>x(ye)),Ft=xt.reduce((ye,xe)=>ye+xe,0)+s*(gt.length-1),Re=pt-Ft/2;for(let[ye,xe]of gt.entries()){let Te=xt[ye];u[xe]=Re+Te/2,a[xe]=Ut+tt/2,Re+=Te+s}}}let st=o+(F[_]??0);zt[_]=Ut+tt+st/2,Ut+=tt+st}let Q=new Map;for(let{labelId:_,rank:$,lane:tt,side:q}of E){let st=`${$}:${tt}:${q}`;if(!Q.has(st)){let xt=b[$].filter(Ft=>h(Ft)===tt).map(Ft=>q==="before"?u[Ft]-x(Ft)/2:u[Ft]+x(Ft)/2);Q.set(st,q==="before"?Math.min(...xt):Math.max(...xt))}let ut=x(_),gt=Q.get(st)+(q==="before"?-1:1)*(s+ut/2);u[_]=gt,a[_]=a[b[$].find(pt=>h(pt)===tt)],Q.set(st,gt+(q==="before"?-1:1)*(ut/2))}for(let _ of it.values()){let $=_.map(({start:pt,end:xt,crossesLanes:Ft})=>Ft?u[xt]:((u[pt]??0)+(u[xt]??0))/2),tt=_.map((pt,xt)=>xt).sort((pt,xt)=>$[pt]-$[xt]||pt-xt),q=[],st=-1/0;for(let pt of tt){let xt=x(_[pt].labelId);q[pt]=Math.max($[pt],st+s+xt/2),st=q[pt]+xt/2}let ut=c(pt=>pt.reduce((xt,Ft)=>xt+Ft,0)/pt.length,"mean"),gt=ut($)-ut(q);for(let[pt,{labelId:xt,gap:Ft}]of _.entries())u[xt]=q[pt]+gt,a[xt]=zt[Ft]}for(let{labelId:_,near:$}of P)u[_]=u[$]??0,a[_]=a[$]??0;let lt=new Map;for(let _ of e.edges){let $=_.ref.id;lt.has($)||lt.set($,[]),lt.get($).push(_)}for(let[,_]of lt){if(_.length===0)continue;let $=_[0].ref,tt=$.start,q=$.end;if(tt==null||q==null)continue;let st=Math.round(((u[tt]??0)+(u[q]??0))/2),ut=new Set;for(let gt of _)ut.add(gt.src),ut.add(gt.dst);for(let gt of ut){if(gt===tt||gt===q)continue;e.nodeById.get(gt)?.isDummy&&(u[gt]=st)}}return{x:u,y:a}}c(Yr,"assignCoordinates");var Gr=8;function $r(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=Math.imul(e,16777619);return e>>>0}c($r,"hashString");function zr(t){let e=t>>>0;return()=>{e+=1831565813;let n=e;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}}c(zr,"mulberry32");function Ur(t,e){let n=[...t],o=zr(e);for(let s=n.length-1;s>0;s--){let r=Math.floor(o()*(s+1));[n[s],n[r]]=[n[r],n[s]]}return n}c(Ur,"deterministicShuffle");function Vr(t,e){let n=0;for(let[o,s]of t.entries())n+=Math.abs(o-(e.get(s)??o));return n}c(Vr,"sourceDistance");function Mo(t,e){let n=new Map;for(let[s,r]of t.entries())n.set(r,s);let o=0;for(let{a:s,b:r,weight:i}of e){let d=n.get(s),u=n.get(r);d==null||u==null||(o+=i*Math.abs(d-u))}return o}c(Mo,"laneArrangementCost");function jr(t){let e=En(t);if(e.length<2)return[];let n=new Map(e.map((r,i)=>[r,i])),o=Me(t),s=new Map;for(let r of t.layout.edges??[]){if(r.isLayoutOnly)continue;let i=typeof r.start=="string"?r.start:void 0,d=typeof r.end=="string"?r.end:void 0;if(!i||!d||!t.nodeById.has(i)||!t.nodeById.has(d))continue;let u=o(i),a=o(d);if(!u||!a||u===a)continue;let y=n.get(u),l=n.get(a);if(y==null||l==null)continue;let[x,m]=y<=l?[u,a]:[a,u],p=`${x}\0${m}`,f=s.get(p);f?f.weight++:s.set(p,{a:x,b:m,weight:1})}return[...s.values()]}c(jr,"buildWeightedLaneEdges");function Io(t,e,n){let o=[...t],s=Mo(o,e),r=!0,i=0,d=Math.max(1,o.length);for(;r&&i<d;){r=!1,i++;for(let u=0;u+1<o.length;u++){[o[u],o[u+1]]=[o[u+1],o[u]];let a=Mo(o,e);a<s?(s=a,r=!0):[o[u],o[u+1]]=[o[u+1],o[u]]}}return{order:o,cost:s,sourceDistance:Vr(o,n)}}c(Io,"greedySwitch");function Wr(t,e){return t.cost!==e.cost?t.cost<e.cost:t.sourceDistance<e.sourceDistance}c(Wr,"isBetterCandidate");function Kr(t,e,n){let o=[...e].sort((s,r)=>s.a===r.a?s.b.localeCompare(r.b):s.a.localeCompare(r.a)).map(({a:s,b:r,weight:i})=>`${s}:${r}:${i}`).join("|");return $r(`${t.join("|")}#${o}#${n}`)}c(Kr,"seedForRestart");function qr(t,e={}){let n=En(t);if(n.length<2)return n;let o=jr(t);if(o.length===0)return n;let s=new Map(n.map((d,u)=>[d,u])),r=Io(n,o,s),i=Math.max(0,e.restarts??Gr);for(let d=0;d<i;d++){let u=Kr(n,o,d),a=Ur(n,u),y=Io(a,o,s);Wr(y,r)&&(r=y)}return r.order}c(qr,"optimizeTopLaneOrder");function Jr(t,e){let n=e?.ignoreCrossLaneEdges??!0,o=e?.optimizeRanksByCrossings??!0,s=Ae(t),r=e?.automaticLaneOrdering?qr(s,{restarts:Gr}):void 0,i=yr(s),d=i.acyclic,u=n?kr(d,{compactSingleInput:e?.compactSingleInput??Mn.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!0,direction:e?.direction}):Fr(d,{compactSingleInput:e?.compactSingleInput??Mn.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!1,optimizeRanksByCrossings:o}),{layering:a,graphWithDummies:y}=_r(u,d),l=Xr(a,y,{laneOrder:r}),x=Yr(l,y,{layerGap:e?.layerGap,nodeGap:e?.nodeGap,direction:e?.direction,laneOrder:r});return{acyclic:d,reversed:i.reversed,layering:a,ordered:l,coordinates:x}}c(Jr,"sugiyamaLayout");var mt=Li.EPSILON,Ri=8,Ne=15,Xe=15,an=25,le=20,Gn=10;function So(t,e,n){let o=t.x??0,s=t.y??0,r=e.x-o,i=e.y-s,d=Math.abs(r),u=Math.abs(i);return d<mt&&u<mt?n:u>mt&&u*3>=d?i>0?"bottom":"top":d>mt?r>0?"right":"left":n}c(So,"chooseOrthogonalSide");var ds=c(t=>typeof t=="number"&&Number.isFinite(t)&&t>0,"isDrawableSize");function un(t,e){let n=t.metadata?.drawnExtent;return{w:ds(n?.width)?n.width:t.width??e,h:ds(n?.height)?n.height:t.height??e}}c(un,"drawnSize");function Co(t,e){return Math.abs(t.to-e.from)<mt||Math.abs(t.to-e.to)<mt?t.to:t.from}c(Co,"sharedLineEndpointCoord");function Be(t,e){return t.orient==="vertical"?{x:t.coord,y:e}:{x:e,y:t.coord}}c(Be,"pointOnLine");function Zr(t,e){let n=t.nodes??[],o=t.edges??[],s=[];for(let g of o)g.isLayoutOnly||s.push({...g,__originalEdge:g});let r=new Map,i=new Map,d=[],u=e==="LR";for(let g of n)r.set(g.id,g);let a=he(n),y=n.filter(g=>a.isLane(g.id));for(let g of y){let v={id:g.id},A=c(R=>{i.set(R.id,v),n.filter(T=>T.parentId===R.id).forEach(A)},"assignLane");A(g)}let l=Ve(n),x=n.filter(g=>!g.isGroup&&!g.isEdgeLabel&&!l.has(g.id)).map(g=>{let v=g.width??10,A=g.height??10,R=g.x??0,T=g.y??0,D=Ri;return{nodeId:g.id,minX:R-v/2-D,maxX:R+v/2+D,minY:T-A/2-D,maxY:T+A/2+D,visualXHalfExtent:u?A/2+D:v/2+D}}),m=c((g,v,A,R)=>{let T=d.find(D=>D.orientation===g&&Math.abs(D.coord-v)<1);return T||(T={id:`pipe-${g}-${v.toFixed(0)}`,orientation:g,coord:v,spanMin:A,spanMax:R,tracks:[]},d.push(T)),T.spanMin=Math.min(T.spanMin,A),T.spanMax=Math.max(T.spanMax,R),T},"getOrAddPipe"),p=c((g,v)=>{let{w:A,h:R}=un(g,10),T=g.x??0,D=g.y??0;switch(v){case"top":return{x:T,y:D-R/2};case"bottom":return{x:T,y:D+R/2};case"left":return{x:T-A/2,y:D};case"right":return{x:T+A/2,y:D}}},"portForSide"),f=c((g,v,A)=>p(g,So(g,v,A?"bottom":"top")),"getOrthogonalPort"),h=[],M=[],I=new Set,C=1e3,w=c((g,v,A)=>{if(h.length===0)return 0;let R=Math.abs(v.y-A.y)<mt,T=Math.abs(v.x-A.x)<mt;if(!R&&!T)return 0;let D=0;if(R){let J=v.y,at=Math.min(v.x,A.x)-mt,W=Math.max(v.x,A.x)+mt;if(W<=at)return 0;for(let V of h)V.edgeIndex===g||V.orientation!=="vertical"||V.pipe.coord<at||V.pipe.coord>W||V.from-mt<=J&&V.to+mt>=J&&(D+=C)}else if(T){let J=v.x,at=Math.min(v.y,A.y)-mt,W=Math.max(v.y,A.y)+mt;if(W<=at)return 0;for(let V of h)V.edgeIndex===g||V.orientation!=="horizontal"||V.pipe.coord<at||V.pipe.coord>W||V.from-mt<=J&&V.to+mt>=J&&(D+=C)}return D},"crossingPenalty"),S=s.map((g,v)=>{if(!g.start||!g.end)return{idx:v,crossLane:0,dx:0,dy:0};let A=r.get(g.start),R=r.get(g.end),T=i.get(g.start),D=i.get(g.end),J=T&&D&&T.id!==D.id?1:0,at=A&&R?Math.abs((R.x??0)-(A.x??0)):0,W=A&&R?Math.abs((R.y??0)-(A.y??0)):0;return{idx:v,crossLane:J,dx:at,dy:W}}).sort((g,v)=>{if(g.crossLane!==v.crossLane)return v.crossLane-g.crossLane;let A=g.dx+g.dy,R=v.dx+v.dy;return Math.abs(A-R)>1?A-R:g.idx-v.idx}).map(g=>g.idx),b=c((g,v,A,R)=>{let T=Math.min(g.x,v.x),D=Math.max(g.x,v.x),J=Math.min(g.y,v.y),at=Math.max(g.y,v.y);return!!x.find(V=>A&&V.nodeId===A||R&&V.nodeId===R?!1:Math.abs(g.x-v.x)>mt?V.minY<g.y&&V.maxY>g.y&&V.maxX>T&&V.minX<D:V.minX<g.x&&V.maxX>g.x&&V.maxY>J&&V.minY<at)},"isSegmentBlocked"),L=new Map,E=new Map;for(let g of s)!g.start||!g.end||g.start===g.end||(E.set(g.start,(E.get(g.start)??0)+1),E.set(g.end,(E.get(g.end)??0)+1));let B=c((g,v)=>So(g,v,"bottom"),"determineSide"),P=new Map;for(let[g,v]of s.entries()){if(!v.start||!v.end||v.start===v.end||v.points&&v.points.length>0)continue;let A=r.get(v.start),R=r.get(v.end);if(!A||!R)continue;let T=(R.x??0)-(A.x??0),D=(R.y??0)-(A.y??0);P.set(g,{edgeIdx:g,srcId:v.start,dstId:v.end,srcSide:B(A,{x:R.x??0,y:R.y??0}),dstSide:B(R,{x:A.x??0,y:A.y??0}),absDx:Math.abs(T),absDy:Math.abs(D),dxSign:Math.sign(T),dySign:Math.sign(D)})}let N=c(g=>g.srcSide==="top"||g.srcSide==="bottom"?g.absDx===0?1/0:g.absDy/g.absDx:g.absDy===0?1/0:g.absDx/g.absDy,"preferenceStrength"),F=c(g=>g.srcSide==="top"||g.srcSide==="bottom"?g.dxSign===0?["right","left"]:[g.dxSign>0?"right":"left"]:g.dySign===0?["bottom","top"]:[g.dySign>0?"bottom":"top"],"secondarySides"),U=c(g=>F(g)[0],"secondarySide"),G=new Map;for(let g of P.values()){let v=`${g.srcId}:${g.srcSide}`;G.has(v)||G.set(v,[]),G.get(v).push(g)}let Z=new Map,it=c((g,v)=>`${g}:${v}`,"loadKey");for(let g of P.values())Z.set(it(g.srcId,g.srcSide),(Z.get(it(g.srcId,g.srcSide))??0)+1),Z.set(it(g.dstId,g.dstSide),(Z.get(it(g.dstId,g.dstSide))??0)+1);for(let g of G.values())if(!(g.length<2)){g.sort((v,A)=>{let R=N(v),T=N(A);return Math.abs(R-T)>1e-9?T-R:v.edgeIdx-A.edgeIdx});for(let v=1;v<g.length;v++){let A=g[v],R=Z.get(it(A.srcId,A.srcSide))??0,T=F(A).reduce((J,at)=>(Z.get(it(A.srcId,at))??0)<(Z.get(it(A.srcId,J))??0)?at:J),D=Z.get(it(A.srcId,T))??0;D>=R||(Z.set(it(A.srcId,A.srcSide),R-1),Z.set(it(A.srcId,T),D+1),A.srcSide=T)}}let ft=c(g=>{let v=g?.shape;return v==="question"||v==="diamond"},"isDiamondNode"),At=new Map;for(let g of P.values())At.has(g.dstId)||At.set(g.dstId,new Set),At.get(g.dstId).add(g.dstSide);for(let g of P.values()){if(!ft(r.get(g.srcId)))continue;let v=At.get(g.srcId);if(!v?.has(g.srcSide))continue;let A=U(g);if(v.has(A)||(Z.get(it(g.srcId,A))??0)>0)continue;let R=Z.get(it(g.srcId,g.srcSide))??0;Z.set(it(g.srcId,g.srcSide),Math.max(0,R-1)),Z.set(it(g.srcId,A),1),g.srcSide=A}let te=c(g=>{let v=g?.shape;return v==="hexagon"||v==="notch-pent"},"hasVertexFaces"),zt=new Map;for(let g of P.values())zt.has(g.srcId)||zt.set(g.srcId,new Set),zt.get(g.srcId).add(g.srcSide);let Ut=c(g=>g.dstSide==="top"||g.dstSide==="bottom"?g.dxSign>=0?"left":"right":g.dySign>=0?"top":"bottom","secondaryDstSide");for(let g of P.values()){if(!te(r.get(g.dstId)))continue;let v=zt.get(g.dstId);if(!v?.has(g.dstSide))continue;let A=Ut(g);if(v.has(A)||(Z.get(it(g.dstId,A))??0)>0)continue;let R=Z.get(it(g.dstId,g.dstSide))??0;Z.set(it(g.dstId,g.dstSide),Math.max(0,R-1)),Z.set(it(g.dstId,A),1),g.dstSide=A;let T=g.dySign>=0?"bottom":"top";if((A==="top"||A==="bottom")&&At.get(g.srcId)?.has(g.srcSide)&&!At.get(g.srcId)?.has(T)&&(Z.get(it(g.srcId,T))??0)===0){let D=Z.get(it(g.srcId,g.srcSide))??0;Z.set(it(g.srcId,g.srcSide),Math.max(0,D-1)),Z.set(it(g.srcId,T),1),g.srcSide=T}}for(let g of P.values()){let{edgeIdx:v,srcId:A,dstId:R,srcSide:T,dstSide:D}=g,J=r.get(A),at=r.get(R),W=`${A}:${T}:src`,V=T==="top"||T==="bottom"?at.x??0:at.y??0;L.has(W)||L.set(W,[]),L.get(W).push({edgeIdx:v,oppositeCoord:V});let Lt=`${R}:${D}:dst`,wt=D==="top"||D==="bottom"?J.x??0:J.y??0;L.has(Lt)||L.set(Lt,[]),L.get(Lt).push({edgeIdx:v,oppositeCoord:wt})}let Q=new Map,lt=8;for(let[g,v]of L){if(v.length<2)continue;v.sort((Ht,re)=>Ht.oppositeCoord-re.oppositeCoord);let A=g.split(":"),R=A.slice(0,-2).join(":"),T=A[A.length-2],D=A[A.length-1],J=r.get(R);if(!J)continue;let at=T==="left"||T==="right",W=un(J,10),V=at?W.h:W.w,Lt=J.shape,Rt=Lt==="question"||Lt==="diamond"?V*.3:V,bt=Math.min(20,Rt/(v.length-1),Math.max(lt,Rt/(v.length+1))),ee=-(bt*(v.length-1))/2;for(let[Ht,re]of v.entries()){let Ie=ee+Ht*bt,An=`${re.edgeIdx}:${D}`;Q.set(An,Ie)}}let _=c(g=>!!s[g]?.labelNodeId,"edgeHasLabelNode"),$=c((g,v)=>g?(L.get(`${g}:${v}:src`)??[]).some(({edgeIdx:A})=>_(A))||(L.get(`${g}:${v}:dst`)??[]).some(({edgeIdx:A})=>_(A)):!1,"faceHasLabelNode"),tt=c((g,v,A)=>v==="top"||v==="bottom"?{x:g.x+A,y:g.y}:{x:g.x,y:g.y+A},"applyPortOffset"),q=c((g,v,A)=>{let R=P.get(g),T={x:A.x??0,y:A.y??0},D={x:v.x??0,y:v.y??0},J=R?.srcSide??B(v,T),at=R?.dstSide??B(A,D),W=R?p(v,R.srcSide):f(v,T,!0),V=R?p(A,R.dstSide):f(A,D,!1),Lt=Q.get(`${g}:src`),wt=Q.get(`${g}:dst`);return Lt!==void 0&&(W=tt(W,J,Lt)),wt!==void 0&&(V=tt(V,at,wt)),{pSrcPort:W,pDstPort:V,srcSide:J,dstSide:at}},"portsForEdge");for(let g of S){let v=s[g];if(M[g]=[],!v.start||!v.end||v.points&&v.points.length>0||v.start===v.end)continue;let A=r.get(v.start),R=r.get(v.end);if(!A||!R)continue;let{pSrcPort:T,pDstPort:D,srcSide:J,dstSide:at}=q(g,A,R),W={...T},V={...D},Lt=J==="top"||J==="bottom",wt=at==="top"||at==="bottom";if(Lt){let X=T.y>(A.y??0);W.y=X?T.y+le:T.y-le}else{let X=T.x>(A.x??0);W.x=X?T.x+le:T.x-le}if(wt){let X=D.y>(R.y??0);V.y=X?D.y+le:D.y-le}else{let X=D.x>(R.x??0);V.x=X?D.x+le:D.x-le}let Rt=c((X,z)=>{for(let ot of x)if(!z.includes(ot.nodeId)&&X.x>ot.minX&&X.x<ot.maxX&&X.y>ot.minY&&X.y<ot.maxY)return{inside:!0,obstacle:ot};return{inside:!1}},"isPointInObstacle"),rt=c((X,z,ot,Mt,Bt)=>{if(Bt){let Yt=X.y>(z.y??0);return{x:(ot.x??0)>=X.x?Mt.maxX+Ne:Mt.minX-Ne,y:Yt?Mt.maxY+Xe:Mt.minY-Xe,leavesPositiveSide:Yt}}let Et=X.x>(z.x??0),kt=(ot.y??0)>=X.y;return{x:Et?Mt.maxX+Ne:Mt.minX-Ne,y:kt?Mt.maxY+Xe:Mt.minY-Xe,leavesPositiveSide:Et}},"obstacleDetour"),bt=[],Pt=[v.start,v.end],ee=Rt(W,Pt);if(ee.inside&&ee.obstacle){let X=ee.obstacle;if(Lt){let z=rt(T,A,R,X,!0);W.x=z.x,W.y=z.y;let ot=z.leavesPositiveSide?Math.min(X.minY-2,T.y+le):Math.max(X.maxY+2,T.y-le);bt=[{x:T.x,y:ot},{x:z.x,y:ot},{x:z.x,y:z.y}]}else{let z=rt(T,A,R,X,!1),ot=z.leavesPositiveSide?Math.min(X.minX-2,T.x+le):Math.max(X.maxX+2,T.x-le);W.x=z.x,W.y=z.y,bt=[{x:ot,y:T.y},{x:ot,y:z.y},{x:z.x,y:z.y}]}}let Ht=[],re=Rt(V,Pt);if(re.inside&&re.obstacle){let X=re.obstacle;if(wt){let z=rt(D,R,A,X,!0);V.x=z.x,V.y=z.y,Ht=[{x:z.x,y:z.y},{x:D.x,y:z.y}]}else{let z=rt(D,R,A,X,!1);V.x=z.x,V.y=z.y,Ht=[{x:z.x,y:z.y},{x:z.x,y:D.y}]}}if(bt.length===0&&Ht.length===0){let X=Ne,z=Math.abs(W.x-V.x)<X,ot=Math.abs(W.y-V.y)<X,Mt=Q.get(`${g}:src`)!==void 0||Q.get(`${g}:dst`)!==void 0,Bt=(L.get(`${v.start??""}:${J}:src`)?.length??0)+(L.get(`${v.start??""}:${J}:dst`)?.length??0),Et=(L.get(`${v.end??""}:${at}:src`)?.length??0)+(L.get(`${v.end??""}:${at}:dst`)?.length??0),kt=Bt>1||Et>1,Yt=E.get(v.start??"")??0,St=E.get(v.end??"")??0,qt=Bt>1&&$(v.start,J)||Et>1&&$(v.end,at),ae=Bt<=1||Yt<=2,$t=Et<=1||St<=2;if((z||ot)&&!Mt&&(!kt||kt&&!qt&&ae&&$t)&&!b(T,D,v.start,v.end)){v.points=[{...T},{...W},{...V},{...D}],I.add(g);let Tt=ot?"horizontal":"vertical",Zt=ot?T.y:T.x,Ot=ot?Math.min(T.x,D.x):Math.min(T.y,D.y),Nt=ot?Math.max(T.x,D.x):Math.max(T.y,D.y),ne={id:`fast-path-${Tt}-${Zt.toFixed(0)}-${g}`,orientation:Tt,coord:Zt,spanMin:Ot,spanMax:Nt,tracks:[]};h.push({edgeIndex:g,segmentIndex:0,orientation:Tt,pipe:ne,trackIndex:0,from:Ot,to:Nt});continue}}let Ie=m("vertical",W.x,W.y,W.y);W.x=Ie.coord;let An=m("vertical",V.x,V.y,V.y);V.x=An.coord;let Se=Math.min(W.x,V.x)-50,Ce=Math.max(W.x,V.x)+50,Pe=Math.min(W.y,V.y)-50,ke=Math.max(W.y,V.y)+50;for(let X of x){let z=Math.min(W.x,V.x),ot=Math.max(W.x,V.x),Mt=Math.min(W.y,V.y),Bt=Math.max(W.y,V.y);X.minX<ot&&X.maxX>z&&X.minY<Bt&&X.maxY>Mt&&(Se=Math.min(Se,X.minX-an),Ce=Math.max(Ce,X.maxX+an),Pe=Math.min(Pe,X.minY-an),ke=Math.max(ke,X.maxY+an))}for(let X of x){if(X.maxX<Se||X.minX>Ce||X.maxY<Pe||X.minY>ke)continue;let z=Ne;m("horizontal",X.minY-z,Se,Ce),m("horizontal",X.maxY+z,Se,Ce);let ot=Xe;m("vertical",X.minX-ot,Pe,ke),m("vertical",X.maxX+ot,Pe,ke)}m("horizontal",W.y,Se,Ce),m("horizontal",V.y,Se,Ce);let ni=d.filter(X=>X.orientation==="horizontal"&&X.coord>=Pe&&X.coord<=ke),oi=d.filter(X=>X.orientation==="vertical"&&X.coord>=Se&&X.coord<=Ce),Ke=c((X,z)=>`${X.toFixed(1)},${z.toFixed(1)}`,"getKey"),qe=Ke(W.x,W.y),$o=Ke(V.x,V.y),Je=new Map,Rn=new Map,Tn=new Map,Ze=new Set,Oe=[];Je.set(qe,0),Tn.set(qe,"n"),Oe.push({key:qe,f:Math.hypot(V.x-W.x,V.y-W.y),pt:W}),Ze.add(qe);let Wt=[],ve=c((X,z)=>b(X,z,v.start,v.end),"checkSegmentBlocked"),On={x:V.x,y:W.y},si=ve(W,On),ri=ve(On,V),ii=si||ri,Nn={x:W.x,y:V.y},ci=ve(W,Nn),ai=ve(Nn,V);if(ii?ci||ai||(Math.abs(W.x-V.x)<mt?Wt=[W,V]:Wt=[W,Nn,V]):Math.abs(W.y-V.y)<mt||Math.abs(W.x-V.x)<mt?Wt=[W,V]:Wt=[W,On,V],Wt.length===0)for(;Oe.length>0;){Oe.sort((St,qt)=>St.f-qt.f);let X=Oe.shift();if(Ze.delete(X.key),X.key===$o){let St=$o,qt=V;for(Wt=[qt];Rn.has(St);){let ae=Rn.get(St);Wt.unshift(ae),qt=ae,St=Ke(ae.x,ae.y)}break}let z=X.pt.x,ot=X.pt.y,Mt=oi.sort((St,qt)=>St.coord-qt.coord),Bt=Mt.findIndex(St=>Math.abs(St.coord-z)<1),Et=ni.sort((St,qt)=>St.coord-qt.coord),kt=Et.findIndex(St=>Math.abs(St.coord-ot)<1),Yt=[];Bt>0&&Yt.push({x:Mt[Bt-1].coord,y:ot}),Bt>=0&&Bt<Mt.length-1&&Yt.push({x:Mt[Bt+1].coord,y:ot}),kt>0&&Yt.push({x:z,y:Et[kt-1].coord}),kt>=0&&kt<Et.length-1&&Yt.push({x:z,y:Et[kt+1].coord});for(let St of Yt){let qt=Math.min(z,St.x),ae=Math.max(z,St.x),$t=Math.min(ot,St.y),Jt=Math.max(ot,St.y);if(x.some(ie=>ie.nodeId===v.start||ie.nodeId===v.end?!1:qt!==ae?ie.minY<ot&&ie.maxY>ot&&ie.maxX>qt&&ie.minX<ae:ie.minX<z&&ie.maxX>z&&ie.maxY>$t&&ie.minY<Jt))continue;let Tt=Ke(St.x,St.y),Zt=Math.abs(St.x-z)+Math.abs(St.y-ot),Ot=w(g,X.pt,St),Nt=0,ne=V.x-W.x,_e=V.y-W.y,Qe=St.x-z,Bn=St.y-ot;(_e>10&&Bn<-5||_e<-10&&Bn>5)&&(Nt=Math.abs(Bn)*100),(ne>10&&Qe<-5||ne<-10&&Qe>5)&&(Nt+=Math.abs(Qe)*50);let zo=0,Uo=Tn.get(X.key)??"n",Vo=Math.abs(Qe)>mt?"h":"v";Uo!=="n"&&Uo!==Vo&&(zo=50);let li=Zt+Ot+Nt+zo,tn=(Je.get(X.key)??1/0)+li,jo=Math.abs(V.x-St.x)+Math.abs(V.y-St.y);if(tn<(Je.get(Tt)??1/0))if(Rn.set(Tt,X.pt),Je.set(Tt,tn),Tn.set(Tt,Vo),!Ze.has(Tt))Oe.push({key:Tt,f:tn+jo,pt:St}),Ze.add(Tt);else{let ie=Oe.findIndex(di=>di.key===Tt);ie!==-1&&(Oe[ie].f=tn+jo)}}}if(Wt.length===0&&(Wt=[W,{x:W.x,y:V.y},V]),Wt.length>4){let X=Wt[0],z=Wt[Wt.length-1],ot=Math.min(X.x,z.x),Mt=Math.max(X.x,z.x),Bt=Math.min(X.y,z.y),Et=Math.max(X.y,z.y);for(let $t of Wt)ot=Math.min(ot,$t.x),Mt=Math.max(Mt,$t.x),Bt=Math.min(Bt,$t.y),Et=Math.max(Et,$t.y);let kt=Mt>Math.max(X.x,z.x),Yt=ot<Math.min(X.x,z.x);if(u){let $t=Xe;if(kt){let Jt=Math.max(X.x,z.x),Gt=Math.min(X.y,z.y),Tt=Math.max(X.y,z.y),Zt=x.filter(Ot=>Ot.minX<Jt&&Ot.maxX>Jt&&Ot.minY<Tt&&Ot.maxY>Gt);if(Zt.length>0){let Ot=Math.max(X.x,z.x);for(let Nt of Zt){let ne=(Nt.minX+Nt.maxX)/2;if(Nt.visualXHalfExtent===void 0||isNaN(Nt.visualXHalfExtent))continue;let _e=ne+Nt.visualXHalfExtent+$t;Ot=Math.max(Ot,_e)}isNaN(Ot)||(Mt=Ot)}}if(Yt){let Jt=x.filter(Gt=>Gt.minX<Math.min(X.x,z.x)+$t&&Gt.minY<Math.max(X.y,z.y)&&Gt.maxY>Math.min(X.y,z.y));if(Jt.length>0){let Gt=Math.min(X.x,z.x);for(let Tt of Jt){let Ot=(Tt.minX+Tt.maxX)/2-Tt.visualXHalfExtent-$t;Gt=Math.min(Gt,Ot)}ot=Gt}}}let St=c($t=>{let Jt=z.y>X.y,Gt=x.filter(Ot=>{let Nt=Math.min(X.x,z.x)<Ot.maxX&&Math.max(X.x,z.x)>Ot.minX,ne=Math.min(X.y,z.y)<Ot.maxY&&Math.max(X.y,z.y)>Ot.minY;return Nt&&ne}),Tt=Gt;if(u&&Gt.length>0){let Ot=Gt.filter(Nt=>Nt.minX<$t&&Nt.maxX>$t);Ot.length>0&&(Tt=Ot)}if(Tt.length===0)return z.y;let Zt=Ne;if(Jt){let Nt=Math.max(...Tt.map(ne=>ne.maxY))+Zt;if(Nt<z.y-mt)return Nt}else{let Nt=Math.min(...Tt.map(ne=>ne.minY))-Zt;if(Nt>z.y+mt)return Nt}return z.y},"findBestReturnY"),qt=c($t=>{let Jt=St($t),Gt={x:$t,y:X.y},Tt={x:$t,y:Jt},Zt={x:z.x,y:Jt},Ot=ve(X,Gt),Nt=ve(Gt,Tt),ne=ve(Tt,Zt),_e=Jt!==z.y?ve(Zt,z):!1;return!Ot&&!Nt&&!ne&&!_e?Math.abs(Jt-z.y)<mt?[X,Gt,Tt,z]:[X,Gt,Tt,Zt,z]:null},"trySimplifyWithDetourX"),ae=kt&&!Yt?qt(Mt):Yt&&!kt?qt(ot):null;ae&&(Wt=ae)}let Kt=[T,...bt,...Wt,...Ht.reverse(),D];if(Kt.length>=3){let X=Kt[Kt.length-1],z=Kt[Kt.length-2],ot=Kt[Kt.length-3],Mt=Math.abs(ot.y-z.y)<mt&&Math.abs(z.y-X.y)<mt,Bt=Math.abs(ot.x-z.x)<mt&&Math.abs(z.x-X.x)<mt;if(Mt){let Et=Math.sign(z.x-ot.x),kt=Math.sign(X.x-ot.x);Et!==0&&Et===kt&&Math.abs(z.x-ot.x)>Math.abs(X.x-ot.x)&&Kt.splice(-2,1)}else if(Bt){let Et=Math.sign(z.y-ot.y),kt=Math.sign(X.y-ot.y);Et!==0&&Et===kt&&Math.abs(z.y-ot.y)>Math.abs(X.y-ot.y)&&Kt.splice(-2,1)}}let ge=[Kt[0]];for(let X=1;X<Kt.length-1;X++){if(X===1){ge.push(Kt[X]);continue}let z=ge[ge.length-1],ot=Kt[X],Mt=Kt[X+1];if(Math.abs(z.y-ot.y)<mt&&Math.abs(ot.y-Mt.y)<mt){let Bt=ot.x>z.x,Et=Mt.x>ot.x;if(Bt!==Et){ge.push(ot);continue}continue}if(Math.abs(z.x-ot.x)<mt&&Math.abs(ot.x-Mt.x)<mt){let Bt=ot.y>z.y,Et=Mt.y>ot.y;if(Bt!==Et){ge.push(ot);continue}continue}ge.push(ot)}ge.push(Kt[Kt.length-1]);for(let X=0;X<ge.length-1;X++){let z=ge[X],ot=ge[X+1],Mt=Math.abs(z.x-ot.x)<mt?"vertical":"horizontal",Bt=Mt==="vertical"?z.x:z.y,Et=Mt==="vertical"?Math.min(z.y,ot.y):Math.min(z.x,ot.x),kt=Mt==="vertical"?Math.max(z.y,ot.y):Math.max(z.x,ot.x),Yt=m(Mt,Bt,Et,kt),St={edgeIndex:g,segmentIndex:X,orientation:Mt,pipe:Yt,trackIndex:0,from:Et,to:kt};h.push(St),M[g].push(h.length-1),Yt.tracks[0]||(Yt.tracks[0]={index:0,coord:Yt.coord,segments:[]}),Yt.tracks[0].segments.push({edgeIndex:g,segmentIndex:X,from:Et,to:kt})}}let st=c((g,v)=>g.from<v.to&&v.from<g.to,"segmentsOverlap"),ut=c((g,v,A,R)=>{let T=!R.segments.some(J=>(J.edgeIndex!==v.edgeIndex||J.segmentIndex!==v.segmentIndex)&&st(J,g)),D=!A.segments.some(J=>(J.edgeIndex!==g.edgeIndex||J.segmentIndex!==g.segmentIndex)&&st(J,v));return T&&D?(g.trackIndex=R.index,v.trackIndex=A.index,A.segments=[...A.segments.filter(J=>J.edgeIndex!==g.edgeIndex||J.segmentIndex!==g.segmentIndex),{edgeIndex:v.edgeIndex,segmentIndex:v.segmentIndex,from:v.from,to:v.to}],R.segments=[...R.segments.filter(J=>J.edgeIndex!==v.edgeIndex||J.segmentIndex!==v.segmentIndex),{edgeIndex:g.edgeIndex,segmentIndex:g.segmentIndex,from:g.from,to:g.to}],!0):!1},"trySwapSegmentsAcrossTracks"),gt=c(g=>{let v=g.tracks.length;return g.tracks[v]={index:v,coord:g.coord,segments:[]},v},"createNewTrack"),pt=c((g,v)=>{let A=g.pipe.tracks[g.trackIndex];A.segments=A.segments.filter(T=>T.edgeIndex!==g.edgeIndex||T.segmentIndex!==g.segmentIndex),g.trackIndex=v,g.pipe.tracks[v].segments.push({edgeIndex:g.edgeIndex,segmentIndex:g.segmentIndex,from:g.from,to:g.to})},"moveSegmentToTrack"),xt=c((g,v)=>{let A=M[g.edgeIndex];for(let R of A){let T=h[R];T.pipe===g.pipe&&pt(T,v)}},"moveSegmentChainToTrack"),Ft=c(g=>{let v=M[g.edgeIndex],A=v.indexOf(h.indexOf(g)),R=[];return A>0&&R.push(h[v[A-1]]),A<v.length-1&&R.push(h[v[A+1]]),R},"getAdjacentSegmentsAlongEdge"),Re=c((g,v)=>{if(g.orientation===v.orientation)return!1;let A=g.orientation==="horizontal"?g:v,R=g.orientation==="horizontal"?v:g;return R.pipe.coord>A.from&&R.pipe.coord<A.to&&A.pipe.coord>R.from&&A.pipe.coord<R.to},"haveAnyCrossing"),ye=c((g,v)=>{for(let A of g.tracks)if(!A.segments.some(T=>(T.edgeIndex!==v.edgeIndex||T.segmentIndex!==v.segmentIndex)&&st(T,v)))return A.index;return-1},"findAvailableTrack"),xe=c((g,v)=>{if(g.trackIndex===v.trackIndex)return st(g,v);let A=Ft(g),R=Ft(v);return A.some(T=>R.some(D=>Re(T,D)))},"segmentsConflict"),Te=c((g,v,A)=>{if(ut(g,v,g.pipe.tracks[g.trackIndex],v.pipe.tracks[v.trackIndex]))return;let R=ye(g.pipe,v);A(v,R!==-1?R:gt(g.pipe))},"resolveTrackConflict"),We=c(g=>{let v=0;for(let A=0;A<g.length;A++)for(let R=A+1;R<g.length;R++){let T=g[A],D=g[R];T.pipe===D.pipe&&xe(T,D)&&(v++,Te(T,D,xt))}return v},"resolveHandleConflicts"),O=new Map,k=c(g=>{if(O.has(g))return O.get(g);let v=M[g];if(v.length===0){let at={dest:0,deviation:0,base:0,delta:0};return O.set(g,at),at}let R=h[v[0]].pipe.coord,T=R;for(let at=1;at<v.length;at++){let W=h[v[at]];if(W.orientation==="horizontal"){let V=W.from,Lt=W.to;T=Math.abs(V-R)>Math.abs(Lt-R)?V:Lt;break}}let D=Math.abs(T-R),J={dest:T,deviation:D,base:R,delta:T-R};return O.set(g,J),J},"getDestInfo"),H=c(()=>{let g=0,v=new Map;for(let[R,T]of s.entries())M[R].length!==0&&T.start&&(v.has(T.start)||v.set(T.start,[]),v.get(T.start).push(R));let A=c(R=>{let T=s[R];if(!T.start||!T.end)return 0;let D=r.get(T.start),J=r.get(T.end);if(!D||!J)return 0;let at=(J.x??0)-(D.x??0),W=(J.y??0)-(D.y??0);return Math.abs(at)+Math.abs(W)},"getEdgeDistance");for(let R of v.values()){R.sort((D,J)=>{let at=k(D),W=k(J);if(Math.abs(at.deviation-W.deviation)>1)return at.deviation-W.deviation;if(Math.abs(at.dest-W.dest)>1)return at.dest-W.dest;let V=A(D),Lt=A(J);if(Math.abs(V-Lt)>1)return Lt-V;let wt=M[D].length,Rt=M[J].length;if(wt!==Rt)return wt-Rt;if(wt===1){let rt=M[D][0],bt=M[J][0];if(h[rt]&&h[bt]){let Pt=h[rt],ee=h[bt],Ht=Math.abs(Pt.to-Pt.from),re=Math.abs(ee.to-ee.from);if(Math.abs(Ht-re)>1)return Ht-re}}return 0});let T=R.map(D=>h[M[D][0]]);g+=We(T)}return g},"fixSourceHandleCrossings"),j=c(()=>{let g=0,v=new Map;for(let[A,R]of s.entries())M[A].length!==0&&R.end&&(v.has(R.end)||v.set(R.end,[]),v.get(R.end).push(A));for(let A of v.values()){A.sort((T,D)=>{let J=c(V=>{let Lt=M[V];if(Lt.length<2)return 0;let wt=h[Lt[Lt.length-2]];return Math.abs(wt.to-wt.from)},"getDist"),at=J(T),W=J(D);return Math.abs(at-W)>.1?at-W:T-D});let R=A.map(T=>h[M[T][M[T].length-1]]);g+=We(R)}return g},"fixTargetHandleCrossings"),K=c(()=>{let g=0;for(let v of d){let A=[];for(let R of v.tracks)for(let T of R.segments){let D=M[T.edgeIndex].find(J=>h[J].segmentIndex===T.segmentIndex);D!==void 0&&A.push(h[D])}A.sort((R,T)=>R.edgeIndex-T.edgeIndex||R.segmentIndex-T.segmentIndex);for(let R=0;R<A.length;R++)for(let T=R+1;T<A.length;T++){let D=A[R],J=A[T];xe(D,J)&&(g++,Te(D,J,pt))}}return g},"fixPipeCrossings"),et=0,Y=10;for(;et<Y;){let g=0;if(g+=H(),g+=j(),g+=K(),g===0)break;et++}let nt=new Map;for(let g of d){let v=[];g.tracks.forEach(R=>{R.segments.forEach(T=>{v.push({edgeIndex:T.edgeIndex,segmentIndex:T.segmentIndex,trackIndex:R.index,from:T.from,to:T.to})})}),v.sort((R,T)=>R.from-T.from);let A=[];if(v.length>0){let R=[v[0]],T=v[0].to;for(let D=1;D<v.length;D++){let J=v[D];J.from<T?(R.push(J),T=Math.max(T,J.to)):(A.push(R),R=[J],T=J.to)}A.push(R)}for(let R of A){let T=new Set;R.forEach(rt=>T.add(rt.trackIndex));let D=new Map;R.forEach(rt=>{let bt=k(rt.edgeIndex);D.set(rt.trackIndex,(D.get(rt.trackIndex)??0)+bt.delta)});let J=[...T].filter(rt=>(D.get(rt)??0)<-1),at=[...T].filter(rt=>(D.get(rt)??0)>1),W=[...T].filter(rt=>Math.abs(D.get(rt)??0)<=1);J.sort((rt,bt)=>(D.get(bt)??0)-(D.get(rt)??0)),at.sort((rt,bt)=>(D.get(rt)??0)-(D.get(bt)??0));let V=c((rt,bt)=>{R.filter(Pt=>Pt.trackIndex===rt).forEach(Pt=>{let ee=I.has(Pt.edgeIndex)?g.coord:bt;nt.set(`${Pt.edgeIndex}-${Pt.segmentIndex}`,ee)})},"assignCoord"),Lt=0;for(let rt of J)Lt++,V(rt,g.coord-Lt*Gn);if(W.length===0&&T.size>0){let rt=[...T].sort((ee,Ht)=>Math.abs(D.get(ee)??0)-Math.abs(D.get(Ht)??0))[0],bt=J.indexOf(rt);bt!==-1&&J.splice(bt,1);let Pt=at.indexOf(rt);Pt!==-1&&at.splice(Pt,1),W.push(rt)}let wt=0;for(let rt of W){if(wt===0)V(rt,g.coord);else{let bt=wt%2===1?1:-1,Pt=Math.ceil(wt/2);V(rt,g.coord+bt*Pt*Gn*.5)}wt++}let Rt=0;for(let rt of at)Rt++,V(rt,g.coord+Rt*Gn)}}for(let[g,v]of s.entries()){let A=M[g]??[];if(A.length===0)continue;let R=[],T=r.get(v.start),D=r.get(v.end),{pSrcPort:J,pDstPort:at}=q(g,T,D),W=A.map(Rt=>{let rt=h[Rt],bt=nt.get(`${rt.edgeIndex}-${rt.segmentIndex}`)??rt.pipe.coord;return{orient:rt.orientation,coord:bt,from:rt.from,to:rt.to}});R.push(J);for(let Rt=0;Rt<W.length;Rt++){let rt=W[Rt],bt=R[R.length-1],Pt=rt.orient==="vertical"?bt.y:bt.x,ee=rt.orient==="vertical"?bt.x:bt.y,Ht=W[Rt+1],re=Rt<W.length-1;if(Math.abs(ee-rt.coord)>mt&&R.push(Be(rt,Pt)),re&&Ht.orient===rt.orient)if(Math.abs(rt.coord-Ht.coord)>mt){let Ie=rt.orient==="vertical"?(Pt+Ht.from)/2:Co(rt,Ht);R.push(Be(rt,Ie),Be(Ht,Ie))}else(Rt===0||Rt===W.length-2)&&R.push(Be(rt,Co(rt,Ht)));else if(re)R.push(Be(rt,Ht.coord));else{let Ie=Math.abs(rt.from-Pt)<Math.abs(rt.to-Pt)?rt.to:rt.from;R.push(Be(rt,Ie))}}let V=R[R.length-1];(Math.abs(V.x-at.x)>mt||Math.abs(V.y-at.y)>mt)&&R.push(at);let Lt=R[0];Lt&&(Math.abs(Lt.x-J.x)>mt||Math.abs(Lt.y-J.y)>mt)&&R.unshift(J);let wt=[];R.length>0&&wt.push(R[0]);for(let Rt=1;Rt<R.length;Rt++){let rt=R[Rt],bt=wt[wt.length-1];(Math.abs(rt.x-bt.x)>mt||Math.abs(rt.y-bt.y)>mt)&&wt.push(rt)}v.points=wt}for(let g of s){let v=g.__originalEdge;v&&g.points&&(v.points=g.points)}t.edges=(t.edges??[]).filter(g=>!g.isLayoutOnly);let dt=c((g,v)=>{let A=v.x??0,R=v.y??0,{w:T,h:D}=un(v,0);if(T<=0||D<=0)return g;let J=A-T/2,at=A+T/2,W=R-D/2,V=R+D/2;if(g.x<J||g.x>at||g.y<W||g.y>V)return g;let Lt=g.x-J,wt=at-g.x,Rt=g.y-W,rt=V-g.y,bt=Math.min(Lt,wt,Rt,rt);return bt===Lt?{x:J,y:g.y}:bt===wt?{x:at,y:g.y}:bt===Rt?{x:g.x,y:W}:{x:g.x,y:V}},"nodeBoundaryClamp");for(let g of t.edges){let v=g.points;if(!v||v.length<2)continue;let A=g.start,R=g.end,T=A?r.get(A):void 0,D=R?r.get(R):void 0;T&&(v[0]=dt(v[0],T)),D&&(v[v.length-1]=dt(v[v.length-1],D))}return t}c(Zr,"routeEdgesOrthogonal");function Qr(t){return t.direction??"TB"}c(Qr,"getSwimlaneDirection");function ti(t){let e=Es(t),n=t.config.flowchart?.nodeSpacing??40,o=t.config.flowchart?.rankSpacing??100,s=t.config.swimlane?.ignoreCrossLaneEdges??!0,r=t.config.swimlane?.optimizeRanksByCrossings??!0,i=t.config.swimlane?.automaticLaneOrdering??!1,d=Qr(t),{ordered:u,coordinates:a}=Jr(e,{nodeGap:n,layerGap:o,ignoreCrossLaneEdges:s,optimizeRanksByCrossings:r,automaticLaneOrdering:i,direction:d});Rs(e,u,a,{nodeGap:n,layerGap:o});for(let y of t.edges??[])delete y.points;Zr(t,d);for(let y of t.edges??[])(!y.curve||y.curve==="basis")&&(y.curve="rounded");return pr(t,d),gr(t),d}c(ti,"runSwimlaneLayoutCore");function ei(t){ws(t);let e=Ts(t);t.nodes=e.nodes,t.edges=e.edges}c(ei,"prepareSwimlaneLayout");var Wi=Wo({prepareLayout:ei,runLayoutCore:ti,afterPaint:fs});export{Wi as render};
@@ -0,0 +1,8 @@
1
+ import{a as o,b as m}from"./chunk-7UKJADAE.js";import"./chunk-N44XPVUD.js";import"./chunk-JZGXHT3J.js";import"./chunk-6CDZONCA.js";import"./chunk-AARGNXTW.js";import"./chunk-GWYODWCE.js";import"./chunk-WQHTQAFY.js";import"./chunk-EWYECPNJ.js";import"./chunk-7JQUFVT4.js";import"./chunk-NDAMZVXQ.js";import"./chunk-7ASYMKN2.js";import"./chunk-BOXAA5AP.js";import"./chunk-4QDE4SUK.js";import"./chunk-DIDARDST.js";import"./chunk-7LSMJ4VU.js";import"./chunk-5N2X2DXU.js";import"./chunk-3CJU2RDX.js";import"./chunk-QLS7NIYR.js";import"./chunk-ICJPOOXG.js";import"./chunk-IVZHB6RS.js";import"./chunk-QQIGL7OP.js";import{a as r}from"./chunk-RJFVWYCA.js";import"./chunk-SQE76S5B.js";var i=r(t=>`${o(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"),e=i,F=m({styles:e});export{F as diagram};
@@ -1,4 +1,4 @@
1
- import{a as wt}from"./chunk-YCRLJT2S.js";import{c as _t,f as J}from"./chunk-KU6GTEMS.js";import{o as vt}from"./chunk-QEEA3KYY.js";import{b as at}from"./chunk-OFZLK5G4.js";import{$ as st,C as nt,Q as it,T as kt,U as bt,c as yt,d as mt,e as xt}from"./chunk-KT4VPQD5.js";import{b as _,d as K}from"./chunk-JRSH5GNS.js";import{a as o,b as ft}from"./chunk-GYT4IYBZ.js";import"./chunk-3RNHDNP5.js";var ot=(function(){var e=o(function(k,a,d,c){for(d=d||{},c=k.length;c--;d[k[c]]=a);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],i=[1,12],n=[1,13],r=[1,14],h=[1,15],l=[1,16],s=[1,19],y=[1,20],g={trace:o(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:o(function(a,d,c,p,m,u,w){var b=u.length-1;switch(m){case 1:return u[b-1];case 3:p.setDirection("LR");break;case 4:p.setDirection("TD");break;case 5:this.$=[];break;case 6:u[b-1].push(u[b]),this.$=u[b-1];break;case 7:case 8:this.$=u[b];break;case 9:case 10:this.$=[];break;case 11:p.getCommonDb().setDiagramTitle(u[b].substr(6)),this.$=u[b].substr(6);break;case 12:this.$=u[b].trim(),p.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[b].trim(),p.getCommonDb().setAccDescription(this.$);break;case 15:p.addSection(u[b].substr(8)),this.$=u[b].substr(8);break;case 18:p.addTask(u[b],0,""),this.$=u[b];break;case 19:p.addEvent(u[b].substr(2)),this.$=u[b];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:i,15:n,17:r,19:h,20:l,21:17,22:18,23:s,24:y},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:i,15:n,17:r,19:h,20:l,21:17,22:18,23:s,24:y},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:o(function(a,d){if(d.recoverable)this.trace(a);else{var c=new Error(a);throw c.hash=d,c}},"parseError"),parse:o(function(a){var d=this,c=[0],p=[],m=[null],u=[],w=this.table,b="",I=0,P=0,B=0,G=2,L=1,R=u.slice.call(arguments,1),E=Object.create(this.lexer),A={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(A.yy[V]=this.yy[V]);E.setInput(a,A.yy),A.yy.lexer=E,A.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var D=E.yylloc;u.push(D);var $=E.options&&E.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function v(W){c.length=c.length-2*W,m.length=m.length-W,u.length=u.length-W}o(v,"popStack");function T(){var W;return W=p.pop()||E.lex()||L,typeof W!="number"&&(W instanceof Array&&(p=W,W=p.pop()),W=d.symbols_[W]||W),W}o(T,"lex");for(var S,H,M,N,et,Z,O={},j,F,gt,q;;){if(M=c[c.length-1],this.defaultActions[M]?N=this.defaultActions[M]:((S===null||typeof S>"u")&&(S=T()),N=w[M]&&w[M][S]),typeof N>"u"||!N.length||!N[0]){var rt="";q=[];for(j in w[M])this.terminals_[j]&&j>G&&q.push("'"+this.terminals_[j]+"'");E.showPosition?rt="Parse error on line "+(I+1)+`:
1
+ import{a as wt}from"./chunk-67BPVAXC.js";import{c as _t,f as J}from"./chunk-3CJU2RDX.js";import{o as vt}from"./chunk-QLS7NIYR.js";import{b as at}from"./chunk-ICJPOOXG.js";import{$ as st,C as nt,Q as it,T as kt,U as bt,c as yt,d as mt,e as xt}from"./chunk-IVZHB6RS.js";import{b as _,d as K}from"./chunk-QQIGL7OP.js";import{a as o,b as ft}from"./chunk-RJFVWYCA.js";import"./chunk-SQE76S5B.js";var ot=(function(){var e=o(function(k,a,d,c){for(d=d||{},c=k.length;c--;d[k[c]]=a);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],i=[1,12],n=[1,13],r=[1,14],h=[1,15],l=[1,16],s=[1,19],y=[1,20],g={trace:o(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:o(function(a,d,c,p,m,u,w){var b=u.length-1;switch(m){case 1:return u[b-1];case 3:p.setDirection("LR");break;case 4:p.setDirection("TD");break;case 5:this.$=[];break;case 6:u[b-1].push(u[b]),this.$=u[b-1];break;case 7:case 8:this.$=u[b];break;case 9:case 10:this.$=[];break;case 11:p.getCommonDb().setDiagramTitle(u[b].substr(6)),this.$=u[b].substr(6);break;case 12:this.$=u[b].trim(),p.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[b].trim(),p.getCommonDb().setAccDescription(this.$);break;case 15:p.addSection(u[b].substr(8)),this.$=u[b].substr(8);break;case 18:p.addTask(u[b],0,""),this.$=u[b];break;case 19:p.addEvent(u[b].substr(2)),this.$=u[b];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:i,15:n,17:r,19:h,20:l,21:17,22:18,23:s,24:y},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:i,15:n,17:r,19:h,20:l,21:17,22:18,23:s,24:y},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:o(function(a,d){if(d.recoverable)this.trace(a);else{var c=new Error(a);throw c.hash=d,c}},"parseError"),parse:o(function(a){var d=this,c=[0],p=[],m=[null],u=[],w=this.table,b="",I=0,P=0,B=0,G=2,L=1,R=u.slice.call(arguments,1),E=Object.create(this.lexer),A={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(A.yy[V]=this.yy[V]);E.setInput(a,A.yy),A.yy.lexer=E,A.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var D=E.yylloc;u.push(D);var $=E.options&&E.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function v(W){c.length=c.length-2*W,m.length=m.length-W,u.length=u.length-W}o(v,"popStack");function T(){var W;return W=p.pop()||E.lex()||L,typeof W!="number"&&(W instanceof Array&&(p=W,W=p.pop()),W=d.symbols_[W]||W),W}o(T,"lex");for(var S,H,M,N,et,Z,O={},j,F,gt,q;;){if(M=c[c.length-1],this.defaultActions[M]?N=this.defaultActions[M]:((S===null||typeof S>"u")&&(S=T()),N=w[M]&&w[M][S]),typeof N>"u"||!N.length||!N[0]){var rt="";q=[];for(j in w[M])this.terminals_[j]&&j>G&&q.push("'"+this.terminals_[j]+"'");E.showPosition?rt="Parse error on line "+(I+1)+`:
2
2
  `+E.showPosition()+`
3
3
  Expecting `+q.join(", ")+", got '"+(this.terminals_[S]||S)+"'":rt="Parse error on line "+(I+1)+": Unexpected "+(S==L?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(rt,{text:E.match,token:this.terminals_[S]||S,line:E.yylineno,loc:D,expected:q})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+S);switch(N[0]){case 1:c.push(S),m.push(E.yytext),u.push(E.yylloc),c.push(N[1]),S=null,H?(S=H,H=null):(P=E.yyleng,b=E.yytext,I=E.yylineno,D=E.yylloc,B>0&&B--);break;case 2:if(F=this.productions_[N[1]][1],O.$=m[m.length-F],O._$={first_line:u[u.length-(F||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(F||1)].first_column,last_column:u[u.length-1].last_column},$&&(O._$.range=[u[u.length-(F||1)].range[0],u[u.length-1].range[1]]),Z=this.performAction.apply(O,[b,P,I,A.yy,N[1],m,u].concat(R)),typeof Z<"u")return Z;F&&(c=c.slice(0,-1*F*2),m=m.slice(0,-1*F),u=u.slice(0,-1*F)),c.push(this.productions_[N[1]][0]),m.push(O.$),u.push(O._$),gt=w[c[c.length-2]][c[c.length-1]],c.push(gt);break;case 3:return!0}}return!0},"parse")},x=(function(){var k={EOF:1,parseError:o(function(d,c){if(this.yy.parser)this.yy.parser.parseError(d,c);else throw new Error(d)},"parseError"),setInput:o(function(a,d){return this.yy=d||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var d=a.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:o(function(a){var d=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var m=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===p.length?this.yylloc.first_column:0)+p[p.length-c.length].length-c[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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:o(function(a){this.unput(this.match.slice(a))},"less"),pastInput:o(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var a=this.pastInput(),d=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{a as e,b as r}from"./chunk-QYAXYFNI.js";import"./chunk-LT6LXKCR.js";import"./chunk-3RNHDNP5.js";export{e as TreeViewModule,r as createTreeViewServices};
1
+ import{a as e,b as r}from"./chunk-QYAXYFNI.js";import"./chunk-LT6LXKCR.js";import"./chunk-SQE76S5B.js";export{e as TreeViewModule,r as createTreeViewServices};
@@ -1 +1 @@
1
- import{a as e,b as r}from"./chunk-QYTM6GY3.js";import"./chunk-LT6LXKCR.js";import"./chunk-3RNHDNP5.js";export{e as TreemapModule,r as createTreemapServices};
1
+ import{a as e,b as r}from"./chunk-QYTM6GY3.js";import"./chunk-LT6LXKCR.js";import"./chunk-SQE76S5B.js";export{e as TreemapModule,r as createTreemapServices};