discover/web/themes/hugo-geekdoc/static/js/361-f7cd601a.chunk.min.js
2023-09-25 00:41:28 +02:00

1 line
81 KiB
JavaScript

"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[361],{5510:function(t,e,a){a.d(e,{diagram:function(){return mt}});var i=a(9339),r=a(7274),s=a(8252),n=a(7967),o=(a(7484),a(7856),function(){var t=function(t,e,a,i){for(a=a||{},i=t.length;i--;a[t[i]]=e);return a},e=[1,2],a=[1,3],i=[1,5],r=[1,7],s=[2,5],n=[1,15],o=[1,17],c=[1,19],l=[1,20],h=[1,22],d=[1,23],p=[1,24],g=[1,30],u=[1,31],x=[1,32],y=[1,33],m=[1,34],f=[1,35],b=[1,36],T=[1,37],E=[1,38],w=[1,39],_=[1,40],v=[1,41],P=[1,42],k=[1,44],L=[1,45],I=[1,46],M=[1,48],N=[1,49],A=[1,50],S=[1,51],O=[1,52],D=[1,53],R=[1,56],Y=[1,4,5,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,53,54,55,56,58,59,60,65,66,67,68,76,86],$=[4,5,22,56,58,59],C=[4,5,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,56,58,59,60,65,66,67,68,76,86],V=[4,5,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,55,56,58,59,60,65,66,67,68,76,86],B=[4,5,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,54,56,58,59,60,65,66,67,68,76,86],F=[4,5,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,53,56,58,59,60,65,66,67,68,76,86],W=[74,75,76],q=[1,133],z=[1,4,5,7,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,53,54,55,56,58,59,60,65,66,67,68,76,86],H={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,box_section:11,box_line:12,participant_statement:13,openDirective:14,typeDirective:15,closeDirective:16,":":17,argDirective:18,create:19,box:20,restOfLine:21,end:22,signal:23,autonumber:24,NUM:25,off:26,activate:27,actor:28,deactivate:29,note_statement:30,links_statement:31,link_statement:32,properties_statement:33,details_statement:34,title:35,legacy_title:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,loop:42,rect:43,opt:44,alt:45,else_sections:46,par:47,par_sections:48,par_over:49,critical:50,option_sections:51,break:52,option:53,and:54,else:55,participant:56,AS:57,participant_actor:58,destroy:59,note:60,placement:61,text2:62,over:63,actor_pair:64,links:65,link:66,properties:67,details:68,spaceList:69,",":70,left_of:71,right_of:72,signaltype:73,"+":74,"-":75,ACTOR:76,SOLID_OPEN_ARROW:77,DOTTED_OPEN_ARROW:78,SOLID_ARROW:79,DOTTED_ARROW:80,SOLID_CROSS:81,DOTTED_CROSS:82,SOLID_POINT:83,DOTTED_POINT:84,TXT:85,open_directive:86,type_directive:87,arg_directive:88,close_directive:89,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",17:":",19:"create",20:"box",21:"restOfLine",22:"end",24:"autonumber",25:"NUM",26:"off",27:"activate",29:"deactivate",35:"title",36:"legacy_title",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"loop",43:"rect",44:"opt",45:"alt",47:"par",49:"par_over",50:"critical",52:"break",53:"option",54:"and",55:"else",56:"participant",57:"AS",58:"participant_actor",59:"destroy",60:"note",63:"over",65:"links",66:"link",67:"properties",68:"details",70:",",71:"left_of",72:"right_of",74:"+",75:"-",76:"ACTOR",77:"SOLID_OPEN_ARROW",78:"DOTTED_OPEN_ARROW",79:"SOLID_ARROW",80:"DOTTED_ARROW",81:"SOLID_CROSS",82:"DOTTED_CROSS",83:"SOLID_POINT",84:"DOTTED_POINT",85:"TXT",86:"open_directive",87:"type_directive",88:"arg_directive",89:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[11,0],[11,2],[12,2],[12,1],[12,1],[6,4],[6,6],[10,1],[10,2],[10,4],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[51,1],[51,4],[48,1],[48,4],[46,1],[46,4],[13,5],[13,3],[13,5],[13,3],[13,3],[30,4],[30,4],[31,3],[32,3],[33,3],[34,3],[69,2],[69,1],[64,3],[64,1],[61,1],[61,1],[23,5],[23,5],[23,4],[28,1],[73,1],[73,1],[73,1],[73,1],[73,1],[73,1],[73,1],[73,1],[62,1],[14,1],[15,1],[18,1],[16,1]],performAction:function(t,e,a,i,r,s,n){var o=s.length-1;switch(r){case 4:return i.apply(s[o]),s[o];case 5:case 10:case 9:case 14:this.$=[];break;case 6:case 11:s[o-1].push(s[o]),this.$=s[o-1];break;case 7:case 8:case 12:case 13:case 66:this.$=s[o];break;case 18:s[o].type="createParticipant",this.$=s[o];break;case 19:s[o-1].unshift({type:"boxStart",boxData:i.parseBoxData(s[o-2])}),s[o-1].push({type:"boxEnd",boxText:s[o-2]}),this.$=s[o-1];break;case 21:this.$={type:"sequenceIndex",sequenceIndex:Number(s[o-2]),sequenceIndexStep:Number(s[o-1]),sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceIndex:Number(s[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:i.LINETYPE.AUTONUMBER};break;case 24:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 25:this.$={type:"activeStart",signalType:i.LINETYPE.ACTIVE_START,actor:s[o-1]};break;case 26:this.$={type:"activeEnd",signalType:i.LINETYPE.ACTIVE_END,actor:s[o-1]};break;case 32:i.setDiagramTitle(s[o].substring(6)),this.$=s[o].substring(6);break;case 33:i.setDiagramTitle(s[o].substring(7)),this.$=s[o].substring(7);break;case 34:this.$=s[o].trim(),i.setAccTitle(this.$);break;case 35:case 36:this.$=s[o].trim(),i.setAccDescription(this.$);break;case 37:s[o-1].unshift({type:"loopStart",loopText:i.parseMessage(s[o-2]),signalType:i.LINETYPE.LOOP_START}),s[o-1].push({type:"loopEnd",loopText:s[o-2],signalType:i.LINETYPE.LOOP_END}),this.$=s[o-1];break;case 38:s[o-1].unshift({type:"rectStart",color:i.parseMessage(s[o-2]),signalType:i.LINETYPE.RECT_START}),s[o-1].push({type:"rectEnd",color:i.parseMessage(s[o-2]),signalType:i.LINETYPE.RECT_END}),this.$=s[o-1];break;case 39:s[o-1].unshift({type:"optStart",optText:i.parseMessage(s[o-2]),signalType:i.LINETYPE.OPT_START}),s[o-1].push({type:"optEnd",optText:i.parseMessage(s[o-2]),signalType:i.LINETYPE.OPT_END}),this.$=s[o-1];break;case 40:s[o-1].unshift({type:"altStart",altText:i.parseMessage(s[o-2]),signalType:i.LINETYPE.ALT_START}),s[o-1].push({type:"altEnd",signalType:i.LINETYPE.ALT_END}),this.$=s[o-1];break;case 41:s[o-1].unshift({type:"parStart",parText:i.parseMessage(s[o-2]),signalType:i.LINETYPE.PAR_START}),s[o-1].push({type:"parEnd",signalType:i.LINETYPE.PAR_END}),this.$=s[o-1];break;case 42:s[o-1].unshift({type:"parStart",parText:i.parseMessage(s[o-2]),signalType:i.LINETYPE.PAR_OVER_START}),s[o-1].push({type:"parEnd",signalType:i.LINETYPE.PAR_END}),this.$=s[o-1];break;case 43:s[o-1].unshift({type:"criticalStart",criticalText:i.parseMessage(s[o-2]),signalType:i.LINETYPE.CRITICAL_START}),s[o-1].push({type:"criticalEnd",signalType:i.LINETYPE.CRITICAL_END}),this.$=s[o-1];break;case 44:s[o-1].unshift({type:"breakStart",breakText:i.parseMessage(s[o-2]),signalType:i.LINETYPE.BREAK_START}),s[o-1].push({type:"breakEnd",optText:i.parseMessage(s[o-2]),signalType:i.LINETYPE.BREAK_END}),this.$=s[o-1];break;case 47:this.$=s[o-3].concat([{type:"option",optionText:i.parseMessage(s[o-1]),signalType:i.LINETYPE.CRITICAL_OPTION},s[o]]);break;case 49:this.$=s[o-3].concat([{type:"and",parText:i.parseMessage(s[o-1]),signalType:i.LINETYPE.PAR_AND},s[o]]);break;case 51:this.$=s[o-3].concat([{type:"else",altText:i.parseMessage(s[o-1]),signalType:i.LINETYPE.ALT_ELSE},s[o]]);break;case 52:s[o-3].draw="participant",s[o-3].type="addParticipant",s[o-3].description=i.parseMessage(s[o-1]),this.$=s[o-3];break;case 53:s[o-1].draw="participant",s[o-1].type="addParticipant",this.$=s[o-1];break;case 54:s[o-3].draw="actor",s[o-3].type="addParticipant",s[o-3].description=i.parseMessage(s[o-1]),this.$=s[o-3];break;case 55:s[o-1].draw="actor",s[o-1].type="addParticipant",this.$=s[o-1];break;case 56:s[o-1].type="destroyParticipant",this.$=s[o-1];break;case 57:this.$=[s[o-1],{type:"addNote",placement:s[o-2],actor:s[o-1].actor,text:s[o]}];break;case 58:s[o-2]=[].concat(s[o-1],s[o-1]).slice(0,2),s[o-2][0]=s[o-2][0].actor,s[o-2][1]=s[o-2][1].actor,this.$=[s[o-1],{type:"addNote",placement:i.PLACEMENT.OVER,actor:s[o-2].slice(0,2),text:s[o]}];break;case 59:this.$=[s[o-1],{type:"addLinks",actor:s[o-1].actor,text:s[o]}];break;case 60:this.$=[s[o-1],{type:"addALink",actor:s[o-1].actor,text:s[o]}];break;case 61:this.$=[s[o-1],{type:"addProperties",actor:s[o-1].actor,text:s[o]}];break;case 62:this.$=[s[o-1],{type:"addDetails",actor:s[o-1].actor,text:s[o]}];break;case 65:this.$=[s[o-2],s[o]];break;case 67:this.$=i.PLACEMENT.LEFTOF;break;case 68:this.$=i.PLACEMENT.RIGHTOF;break;case 69:this.$=[s[o-4],s[o-1],{type:"addMessage",from:s[o-4].actor,to:s[o-1].actor,signalType:s[o-3],msg:s[o]},{type:"activeStart",signalType:i.LINETYPE.ACTIVE_START,actor:s[o-1]}];break;case 70:this.$=[s[o-4],s[o-1],{type:"addMessage",from:s[o-4].actor,to:s[o-1].actor,signalType:s[o-3],msg:s[o]},{type:"activeEnd",signalType:i.LINETYPE.ACTIVE_END,actor:s[o-4]}];break;case 71:this.$=[s[o-3],s[o-1],{type:"addMessage",from:s[o-3].actor,to:s[o-1].actor,signalType:s[o-2],msg:s[o]}];break;case 72:this.$={type:"addParticipant",actor:s[o]};break;case 73:this.$=i.LINETYPE.SOLID_OPEN;break;case 74:this.$=i.LINETYPE.DOTTED_OPEN;break;case 75:this.$=i.LINETYPE.SOLID;break;case 76:this.$=i.LINETYPE.DOTTED;break;case 77:this.$=i.LINETYPE.SOLID_CROSS;break;case 78:this.$=i.LINETYPE.DOTTED_CROSS;break;case 79:this.$=i.LINETYPE.SOLID_POINT;break;case 80:this.$=i.LINETYPE.DOTTED_POINT;break;case 81:this.$=i.parseMessage(s[o].trim().substring(1));break;case 82:i.parseDirective("%%{","open_directive");break;case 83:i.parseDirective(s[o],"type_directive");break;case 84:s[o]=s[o].trim().replace(/'/g,'"'),i.parseDirective(s[o],"arg_directive");break;case 85:i.parseDirective("}%%","close_directive","sequence")}},table:[{3:1,4:e,5:a,6:4,7:i,14:6,86:r},{1:[3]},{3:8,4:e,5:a,6:4,7:i,14:6,86:r},{3:9,4:e,5:a,6:4,7:i,14:6,86:r},{3:10,4:e,5:a,6:4,7:i,14:6,86:r},t([1,4,5,19,20,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,56,58,59,60,65,66,67,68,76,86],s,{8:11}),{15:12,87:[1,13]},{87:[2,82]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:n,5:o,6:43,9:14,10:16,13:18,14:6,19:c,20:l,23:21,24:h,27:d,28:47,29:p,30:25,31:26,32:27,33:28,34:29,35:g,36:u,37:x,39:y,41:m,42:f,43:b,44:T,45:E,47:w,49:_,50:v,52:P,56:k,58:L,59:I,60:M,65:N,66:A,67:S,68:O,76:D,86:r},{16:54,17:[1,55],89:R},t([17,89],[2,83]),t(Y,[2,6]),{6:43,10:57,13:18,14:6,19:c,20:l,23:21,24:h,27:d,28:47,29:p,30:25,31:26,32:27,33:28,34:29,35:g,36:u,37:x,39:y,41:m,42:f,43:b,44:T,45:E,47:w,49:_,50:v,52:P,56:k,58:L,59:I,60:M,65:N,66:A,67:S,68:O,76:D,86:r},t(Y,[2,8]),t(Y,[2,9]),t(Y,[2,17]),{13:58,56:k,58:L,59:I},{21:[1,59]},{5:[1,60]},{5:[1,63],25:[1,61],26:[1,62]},{28:64,76:D},{28:65,76:D},{5:[1,66]},{5:[1,67]},{5:[1,68]},{5:[1,69]},{5:[1,70]},t(Y,[2,32]),t(Y,[2,33]),{38:[1,71]},{40:[1,72]},t(Y,[2,36]),{21:[1,73]},{21:[1,74]},{21:[1,75]},{21:[1,76]},{21:[1,77]},{21:[1,78]},{21:[1,79]},{21:[1,80]},t(Y,[2,45]),{28:81,76:D},{28:82,76:D},{28:83,76:D},{73:84,77:[1,85],78:[1,86],79:[1,87],80:[1,88],81:[1,89],82:[1,90],83:[1,91],84:[1,92]},{61:93,63:[1,94],71:[1,95],72:[1,96]},{28:97,76:D},{28:98,76:D},{28:99,76:D},{28:100,76:D},t([5,57,70,77,78,79,80,81,82,83,84,85],[2,72]),{5:[1,101]},{18:102,88:[1,103]},{5:[2,85]},t(Y,[2,7]),t(Y,[2,18]),t($,[2,10],{11:104}),t(Y,[2,20]),{5:[1,106],25:[1,105]},{5:[1,107]},t(Y,[2,24]),{5:[1,108]},{5:[1,109]},t(Y,[2,27]),t(Y,[2,28]),t(Y,[2,29]),t(Y,[2,30]),t(Y,[2,31]),t(Y,[2,34]),t(Y,[2,35]),t(C,s,{8:110}),t(C,s,{8:111}),t(C,s,{8:112}),t(V,s,{46:113,8:114}),t(B,s,{48:115,8:116}),t(B,s,{8:116,48:117}),t(F,s,{51:118,8:119}),t(C,s,{8:120}),{5:[1,122],57:[1,121]},{5:[1,124],57:[1,123]},{5:[1,125]},{28:128,74:[1,126],75:[1,127],76:D},t(W,[2,73]),t(W,[2,74]),t(W,[2,75]),t(W,[2,76]),t(W,[2,77]),t(W,[2,78]),t(W,[2,79]),t(W,[2,80]),{28:129,76:D},{28:131,64:130,76:D},{76:[2,67]},{76:[2,68]},{62:132,85:q},{62:134,85:q},{62:135,85:q},{62:136,85:q},t(z,[2,15]),{16:137,89:R},{89:[2,84]},{4:[1,140],5:[1,142],12:139,13:141,22:[1,138],56:k,58:L,59:I},{5:[1,143]},t(Y,[2,22]),t(Y,[2,23]),t(Y,[2,25]),t(Y,[2,26]),{4:n,5:o,6:43,9:14,10:16,13:18,14:6,19:c,20:l,22:[1,144],23:21,24:h,27:d,28:47,29:p,30:25,31:26,32:27,33:28,34:29,35:g,36:u,37:x,39:y,41:m,42:f,43:b,44:T,45:E,47:w,49:_,50:v,52:P,56:k,58:L,59:I,60:M,65:N,66:A,67:S,68:O,76:D,86:r},{4:n,5:o,6:43,9:14,10:16,13:18,14:6,19:c,20:l,22:[1,145],23:21,24:h,27:d,28:47,29:p,30:25,31:26,32:27,33:28,34:29,35:g,36:u,37:x,39:y,41:m,42:f,43:b,44:T,45:E,47:w,49:_,50:v,52:P,56:k,58:L,59:I,60:M,65:N,66:A,67:S,68:O,76:D,86:r},{4:n,5:o,6:43,9:14,10:16,13:18,14:6,19:c,20:l,22:[1,146],23:21,24:h,27:d,28:47,29:p,30:25,31:26,32:27,33:28,34:29,35:g,36:u,37:x,39:y,41:m,42:f,43:b,44:T,45:E,47:w,49:_,50:v,52:P,56:k,58:L,59:I,60:M,65:N,66:A,67:S,68:O,76:D,86:r},{22:[1,147]},{4:n,5:o,6:43,9:14,10:16,13:18,14:6,19:c,20:l,22:[2,50],23:21,24:h,27:d,28:47,29:p,30:25,31:26,32:27,33:28,34:29,35:g,36:u,37:x,39:y,41:m,42:f,43:b,44:T,45:E,47:w,49:_,50:v,52:P,55:[1,148],56:k,58:L,59:I,60:M,65:N,66:A,67:S,68:O,76:D,86:r},{22:[1,149]},{4:n,5:o,6:43,9:14,10:16,13:18,14:6,19:c,20:l,22:[2,48],23:21,24:h,27:d,28:47,29:p,30:25,31:26,32:27,33:28,34:29,35:g,36:u,37:x,39:y,41:m,42:f,43:b,44:T,45:E,47:w,49:_,50:v,52:P,54:[1,150],56:k,58:L,59:I,60:M,65:N,66:A,67:S,68:O,76:D,86:r},{22:[1,151]},{22:[1,152]},{4:n,5:o,6:43,9:14,10:16,13:18,14:6,19:c,20:l,22:[2,46],23:21,24:h,27:d,28:47,29:p,30:25,31:26,32:27,33:28,34:29,35:g,36:u,37:x,39:y,41:m,42:f,43:b,44:T,45:E,47:w,49:_,50:v,52:P,53:[1,153],56:k,58:L,59:I,60:M,65:N,66:A,67:S,68:O,76:D,86:r},{4:n,5:o,6:43,9:14,10:16,13:18,14:6,19:c,20:l,22:[1,154],23:21,24:h,27:d,28:47,29:p,30:25,31:26,32:27,33:28,34:29,35:g,36:u,37:x,39:y,41:m,42:f,43:b,44:T,45:E,47:w,49:_,50:v,52:P,56:k,58:L,59:I,60:M,65:N,66:A,67:S,68:O,76:D,86:r},{21:[1,155]},t(Y,[2,53]),{21:[1,156]},t(Y,[2,55]),t(Y,[2,56]),{28:157,76:D},{28:158,76:D},{62:159,85:q},{62:160,85:q},{62:161,85:q},{70:[1,162],85:[2,66]},{5:[2,59]},{5:[2,81]},{5:[2,60]},{5:[2,61]},{5:[2,62]},{5:[1,163]},t(Y,[2,19]),t($,[2,11]),{13:164,56:k,58:L,59:I},t($,[2,13]),t($,[2,14]),t(Y,[2,21]),t(Y,[2,37]),t(Y,[2,38]),t(Y,[2,39]),t(Y,[2,40]),{21:[1,165]},t(Y,[2,41]),{21:[1,166]},t(Y,[2,42]),t(Y,[2,43]),{21:[1,167]},t(Y,[2,44]),{5:[1,168]},{5:[1,169]},{62:170,85:q},{62:171,85:q},{5:[2,71]},{5:[2,57]},{5:[2,58]},{28:172,76:D},t(z,[2,16]),t($,[2,12]),t(V,s,{8:114,46:173}),t(B,s,{8:116,48:174}),t(F,s,{8:119,51:175}),t(Y,[2,52]),t(Y,[2,54]),{5:[2,69]},{5:[2,70]},{85:[2,65]},{22:[2,51]},{22:[2,49]},{22:[2,47]}],defaultActions:{7:[2,82],8:[2,1],9:[2,2],10:[2,3],56:[2,85],95:[2,67],96:[2,68],103:[2,84],132:[2,59],133:[2,81],134:[2,60],135:[2,61],136:[2,62],159:[2,71],160:[2,57],161:[2,58],170:[2,69],171:[2,70],172:[2,65],173:[2,51],174:[2,49],175:[2,47]},parseError:function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)},parse:function(t){var e=[0],a=[],i=[null],r=[],s=this.table,n="",o=0,c=0,l=r.slice.call(arguments,1),h=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);h.setInput(t,d.yy),d.yy.lexer=h,d.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var g=h.yylloc;r.push(g);var u=h.options&&h.options.ranges;"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,y,m,f,b,T,E,w,_,v={};;){if(y=e[e.length-1],this.defaultActions[y]?m=this.defaultActions[y]:(null==x&&(_=void 0,"number"!=typeof(_=a.pop()||h.lex()||1)&&(_ instanceof Array&&(_=(a=_).pop()),_=this.symbols_[_]||_),x=_),m=s[y]&&s[y][x]),void 0===m||!m.length||!m[0]){var P;for(b in w=[],s[y])this.terminals_[b]&&b>2&&w.push("'"+this.terminals_[b]+"'");P=h.showPosition?"Parse error on line "+(o+1)+":\n"+h.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(P,{text:h.match,token:this.terminals_[x]||x,line:h.yylineno,loc:g,expected:w})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+x);switch(m[0]){case 1:e.push(x),i.push(h.yytext),r.push(h.yylloc),e.push(m[1]),x=null,c=h.yyleng,n=h.yytext,o=h.yylineno,g=h.yylloc;break;case 2:if(T=this.productions_[m[1]][1],v.$=i[i.length-T],v._$={first_line:r[r.length-(T||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(T||1)].first_column,last_column:r[r.length-1].last_column},u&&(v._$.range=[r[r.length-(T||1)].range[0],r[r.length-1].range[1]]),void 0!==(f=this.performAction.apply(v,[n,c,o,d.yy,m[1],i,r].concat(l))))return f;T&&(e=e.slice(0,-1*T*2),i=i.slice(0,-1*T),r=r.slice(0,-1*T)),e.push(this.productions_[m[1]][0]),i.push(v.$),r.push(v._$),E=s[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0}},U={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,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},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=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),a.length-1&&(this.yylineno-=a.length-1);var r=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:a?(a.length===i.length?this.yylloc.first_column:0)+i[i.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var a,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,a,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;s<r.length;s++)if((a=this._input.match(this.rules[r[s]]))&&(!e||a[0].length>e[0].length)){if(e=a,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,r[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,a,i){switch(a){case 0:return this.begin("open_directive"),86;case 1:return this.begin("type_directive"),87;case 2:return this.popState(),this.begin("arg_directive"),17;case 3:return this.popState(),this.popState(),89;case 4:return 88;case 5:case 56:case 69:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return 25;case 12:return this.begin("LINE"),20;case 13:return this.begin("ID"),56;case 14:return this.begin("ID"),58;case 15:return 19;case 16:return this.begin("ID"),59;case 17:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),76;case 18:return this.popState(),this.popState(),this.begin("LINE"),57;case 19:return this.popState(),this.popState(),5;case 20:return this.begin("LINE"),42;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),44;case 23:return this.begin("LINE"),45;case 24:return this.begin("LINE"),55;case 25:return this.begin("LINE"),47;case 26:return this.begin("LINE"),49;case 27:return this.begin("LINE"),54;case 28:return this.begin("LINE"),50;case 29:return this.begin("LINE"),53;case 30:return this.begin("LINE"),52;case 31:return this.popState(),21;case 32:return 22;case 33:return 71;case 34:return 72;case 35:return 65;case 36:return 66;case 37:return 67;case 38:return 68;case 39:return 63;case 40:return 60;case 41:return this.begin("ID"),27;case 42:return this.begin("ID"),29;case 43:return 35;case 44:return 36;case 45:return this.begin("acc_title"),37;case 46:return this.popState(),"acc_title_value";case 47:return this.begin("acc_descr"),39;case 48:return this.popState(),"acc_descr_value";case 49:this.begin("acc_descr_multiline");break;case 50:this.popState();break;case 51:return"acc_descr_multiline_value";case 52:return 7;case 53:return 24;case 54:return 26;case 55:return 70;case 57:return e.yytext=e.yytext.trim(),76;case 58:return 79;case 59:return 80;case 60:return 77;case 61:return 78;case 62:return 81;case 63:return 82;case 64:return 83;case 65:return 84;case 66:return 85;case 67:return 74;case 68:return 75;case 70:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[50,51],inclusive:!1},acc_descr:{rules:[48],inclusive:!1},acc_title:{rules:[46],inclusive:!1},open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,17],inclusive:!1},ALIAS:{rules:[7,8,18,19],inclusive:!1},LINE:{rules:[7,8,31],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,14,15,16,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,49,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70],inclusive:!0}}};function j(){this.yy={}}return H.lexer=U,j.prototype=H,H.Parser=j,new j}());o.parser=o;const c=o;let l,h,d,p,g,u={},x={},y={},m=[],f=[],b=!1;const T=function(t,e,a,i){let r=d;const s=u[t];if(s){if(d&&s.box&&d!==s.box)throw new Error("A same participant should only be defined in one Box: "+s.name+" can't be in '"+s.box.name+"' and in '"+d.name+"' at the same time.");if(r=s.box?s.box:d,s.box=r,s&&e===s.name&&null==a)return}null!=a&&null!=a.text||(a={text:e,wrap:null,type:i}),null!=i&&null!=a.text||(a={text:e,wrap:null,type:i}),u[t]={box:r,name:e,description:a.text,wrap:void 0===a.wrap&&_()||!!a.wrap,prevActor:l,links:{},properties:{},actorCnt:null,rectData:null,type:i||"participant"},l&&u[l]&&(u[l].nextActor=t),d&&d.actorKeys.push(t),l=t},E=function(t,e,a={text:void 0,wrap:void 0},i){if(i===v.ACTIVE_END&&(t=>{let e,a=0;for(e=0;e<f.length;e++)f[e].type===v.ACTIVE_START&&f[e].from.actor===t&&a++,f[e].type===v.ACTIVE_END&&f[e].from.actor===t&&a--;return a})(t.actor)<1){let e=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw e.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}return f.push({from:t,to:e,message:a.text,wrap:void 0===a.wrap&&_()||!!a.wrap,type:i}),!0},w=function(t){return u[t]},_=()=>void 0!==h?h:(0,i.c)().sequence.wrap,v={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32},P=function(t,e,a){a.text,void 0===a.wrap&&_()||a.wrap;const i=[].concat(t,t);f.push({from:i[0],to:i[1],message:a.text,wrap:void 0===a.wrap&&_()||!!a.wrap,type:v.NOTE,placement:e})},k=function(t,e){const a=w(t);try{let t=(0,i.d)(e.text,(0,i.c)());t=t.replace(/&amp;/g,"&"),t=t.replace(/&equals;/g,"="),L(a,JSON.parse(t))}catch(t){i.l.error("error while parsing actor link text",t)}};function L(t,e){if(null==t.links)t.links=e;else for(let a in e)t.links[a]=e[a]}const I=function(t,e){const a=w(t);try{let t=(0,i.d)(e.text,(0,i.c)());M(a,JSON.parse(t))}catch(t){i.l.error("error while parsing actor properties text",t)}};function M(t,e){if(null==t.properties)t.properties=e;else for(let a in e)t.properties[a]=e[a]}const N=function(t,e){const a=w(t),r=document.getElementById(e.text);try{const t=r.innerHTML,e=JSON.parse(t);e.properties&&M(a,e.properties),e.links&&L(a,e.links)}catch(t){i.l.error("error while parsing actor details text",t)}},A=function(t){if(Array.isArray(t))t.forEach((function(t){A(t)}));else switch(t.type){case"sequenceIndex":f.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":T(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(u[t.actor])throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");p=t.actor,T(t.actor,t.actor,t.description,t.draw),x[t.actor]=f.length;break;case"destroyParticipant":g=t.actor,y[t.actor]=f.length;break;case"activeStart":case"activeEnd":E(t.actor,void 0,void 0,t.signalType);break;case"addNote":P(t.actor,t.placement,t.text);break;case"addLinks":k(t.actor,t.text);break;case"addALink":!function(t,e){const a=w(t);try{const t={};let o=(0,i.d)(e.text,(0,i.c)());var r=o.indexOf("@");o=o.replace(/&amp;/g,"&"),o=o.replace(/&equals;/g,"=");var s=o.slice(0,r-1).trim(),n=o.slice(r+1).trim();t[s]=n,L(a,t)}catch(t){i.l.error("error while parsing actor link text",t)}}(t.actor,t.text);break;case"addProperties":I(t.actor,t.text);break;case"addDetails":N(t.actor,t.text);break;case"addMessage":if(p){if(t.to!==p)throw new Error("The created participant "+p+" does not have an associated creating message after its declaration. Please check the sequence diagram.");p=void 0}else if(g){if(t.to!==g&&t.from!==g)throw new Error("The destroyed participant "+g+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");g=void 0}E(t.from,t.to,t.msg,t.signalType);break;case"boxStart":e=t.boxData,m.push({name:e.text,wrap:void 0===e.wrap&&_()||!!e.wrap,fill:e.color,actorKeys:[]}),d=m.slice(-1)[0];break;case"boxEnd":d=void 0;break;case"loopStart":E(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":E(void 0,void 0,void 0,t.signalType);break;case"rectStart":E(void 0,void 0,t.color,t.signalType);break;case"optStart":E(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":E(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,i.s)(t.text);break;case"parStart":case"and":E(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":E(void 0,void 0,t.criticalText,t.signalType);break;case"option":E(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":E(void 0,void 0,t.breakText,t.signalType)}var e},S={addActor:T,addMessage:function(t,e,a,i){f.push({from:t,to:e,message:a.text,wrap:void 0===a.wrap&&_()||!!a.wrap,answer:i})},addSignal:E,addLinks:k,addDetails:N,addProperties:I,autoWrap:_,setWrap:function(t){h=t},enableSequenceNumbers:function(){b=!0},disableSequenceNumbers:function(){b=!1},showSequenceNumbers:()=>b,getMessages:function(){return f},getActors:function(){return u},getCreatedActors:function(){return x},getDestroyedActors:function(){return y},getActor:w,getActorKeys:function(){return Object.keys(u)},getActorProperty:function(t,e){if(void 0!==t&&void 0!==t.properties)return t.properties[e]},getAccTitle:i.g,getBoxes:function(){return m},getDiagramTitle:i.t,setDiagramTitle:i.r,parseDirective:function(t,e,a){i.m.parseDirective(this,t,e,a)},getConfig:()=>(0,i.c)().sequence,clear:function(){u={},x={},y={},m=[],f=[],b=!1,(0,i.v)()},parseMessage:function(t){const e=t.trim(),a={text:e.replace(/^:?(?:no)?wrap:/,"").trim(),wrap:null!==e.match(/^:?wrap:/)||null===e.match(/^:?nowrap:/)&&void 0};return i.l.debug("parseMessage:",a),a},parseBoxData:function(t){const e=t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);let a=null!=e&&e[1]?e[1].trim():"transparent",r=null!=e&&e[2]?e[2].trim():void 0;if(window&&window.CSS)window.CSS.supports("color",a)||(a="transparent",r=t.trim());else{const e=(new Option).style;e.color=a,e.color!==a&&(a="transparent",r=t.trim())}return{color:a,text:void 0!==r?(0,i.d)(r.replace(/^:?(?:no)?wrap:/,""),(0,i.c)()):void 0,wrap:void 0!==r?null!==r.match(/^:?wrap:/)||null===r.match(/^:?nowrap:/)&&void 0:void 0}},LINETYPE:v,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:P,setAccTitle:i.s,apply:A,setAccDescription:i.b,getAccDescription:i.a,hasAtLeastOneBox:function(){return m.length>0},hasAtLeastOneBoxWithTitle:function(){return m.some((t=>t.name))}},O=function(t,e){return(0,s.d)(t,e)},D=(t,e)=>{(0,i.H)((()=>{const a=document.querySelectorAll(t);0!==a.length&&(a[0].addEventListener("mouseover",(function(){R("actor"+e+"_popup")})),a[0].addEventListener("mouseout",(function(){Y("actor"+e+"_popup")})))}))},R=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="block")},Y=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="none")},$=function(t,e){let a=0,r=0;const s=e.text.split(i.e.lineBreakRegex),[n,o]=(0,i.F)(e.fontSize);let c=[],l=0,h=()=>e.y;if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":h=()=>Math.round(e.y+e.textMargin);break;case"middle":case"center":h=()=>Math.round(e.y+(a+r+e.textMargin)/2);break;case"bottom":case"end":h=()=>Math.round(e.y+(a+r+2*e.textMargin)-e.textMargin)}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(let[d,p]of s.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==n&&(l=d*n);const s=t.append("text");s.attr("x",e.x),s.attr("y",h()),void 0!==e.anchor&&s.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&s.style("font-family",e.fontFamily),void 0!==o&&s.style("font-size",o),void 0!==e.fontWeight&&s.style("font-weight",e.fontWeight),void 0!==e.fill&&s.attr("fill",e.fill),void 0!==e.class&&s.attr("class",e.class),void 0!==e.dy?s.attr("dy",e.dy):0!==l&&s.attr("dy",l);const g=p||i.Z;if(e.tspan){const t=s.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(g)}else s.text(g);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(s._groups||s)[0][0].getBBox().height,a=r),c.push(s)}return c},C=function(t,e){const a=t.append("polygon");var i,r,s,n;return a.attr("points",(i=e.x)+","+(r=e.y)+" "+(i+(s=e.width))+","+r+" "+(i+s)+","+(r+(n=e.height)-7)+" "+(i+s-8.4)+","+(r+n)+" "+i+","+(r+n)),a.attr("class","labelBox"),e.y=e.y+e.height/2,$(t,e),a};let V=-1;const B=(t,e,a,i)=>{t.select&&a.forEach((a=>{const r=e[a],s=t.select("#actor"+r.actorCnt);!i.mirrorActors&&r.stopy?s.attr("y2",r.stopy+r.height/2):i.mirrorActors&&s.attr("y2",r.stopy)}))},F=function(t,e){(0,s.a)(t,e)},W=function(){function t(t,e,a,i,s,n,o){r(e.append("text").attr("x",a+s/2).attr("y",i+n/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,a,s,n,o,c,l){const{actorFontSize:h,actorFontFamily:d,actorFontWeight:p}=l,[g,u]=(0,i.F)(h),x=t.split(i.e.lineBreakRegex);for(let t=0;t<x.length;t++){const i=t*g-g*(x.length-1)/2,l=e.append("text").attr("x",a+n/2).attr("y",s).style("text-anchor","middle").style("font-size",u).style("font-weight",p).style("font-family",d);l.append("tspan").attr("x",a+n/2).attr("dy",i).text(x[t]),l.attr("y",s+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(l,c)}}function a(t,a,i,s,n,o,c,l){const h=a.append("switch"),d=h.append("foreignObject").attr("x",i).attr("y",s).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,i,s,n,o,c,l),r(d,c)}function r(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return function(i){return"fo"===i.textPlacement?a:"old"===i.textPlacement?t:e}}(),q=function(){function t(t,e,a,i,s,n,o){r(e.append("text").attr("x",a).attr("y",i).style("text-anchor","start").text(t),o)}function e(t,e,a,s,n,o,c,l){const{actorFontSize:h,actorFontFamily:d,actorFontWeight:p}=l,g=t.split(i.e.lineBreakRegex);for(let t=0;t<g.length;t++){const i=t*h-h*(g.length-1)/2,n=e.append("text").attr("x",a).attr("y",s).style("text-anchor","start").style("font-size",h).style("font-weight",p).style("font-family",d);n.append("tspan").attr("x",a).attr("dy",i).text(g[t]),n.attr("y",s+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(n,c)}}function a(t,a,i,s,n,o,c,l){const h=a.append("switch"),d=h.append("foreignObject").attr("x",i).attr("y",s).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,i,s,0,o,c,l),r(d,c)}function r(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return function(i){return"fo"===i.textPlacement?a:"old"===i.textPlacement?t:e}}(),z=O,H=function(t,e,a,i){switch(e.type){case"actor":return function(t,e,a,i){const r=i?e.stopy:e.starty,n=e.x+e.width/2,o=r+80;t.lower(),i||(V++,t.append("line").attr("id","actor"+V).attr("x1",n).attr("y1",o).attr("x2",n).attr("y2",2e3).attr("class","actor-line").attr("class","200").attr("stroke-width","0.5px").attr("stroke","#999"),e.actorCnt=V);const c=t.append("g");c.attr("class","actor-man");const l=(0,s.g)();l.x=e.x,l.y=r,l.fill="#eaeaea",l.width=e.width,l.height=e.height,l.class="actor",l.rx=3,l.ry=3,c.append("line").attr("id","actor-man-torso"+V).attr("x1",n).attr("y1",r+25).attr("x2",n).attr("y2",r+45),c.append("line").attr("id","actor-man-arms"+V).attr("x1",n-18).attr("y1",r+33).attr("x2",n+18).attr("y2",r+33),c.append("line").attr("x1",n-18).attr("y1",r+60).attr("x2",n).attr("y2",r+45),c.append("line").attr("x1",n).attr("y1",r+45).attr("x2",n+18-2).attr("y2",r+60);const h=c.append("circle");h.attr("cx",e.x+e.width/2),h.attr("cy",r+10),h.attr("r",15),h.attr("width",e.width),h.attr("height",e.height);const d=c.node().getBBox();return e.height=d.height,W(a)(e.description,c,l.x,l.y+35,l.width,l.height,{class:"actor"},a),e.height}(t,e,a,i);case"participant":return function(t,e,a,i){const r=i?e.stopy:e.starty,n=e.x+e.width/2,o=r+5,c=t.append("g").lower();var l=c;i||(V++,l.append("line").attr("id","actor"+V).attr("x1",n).attr("y1",o).attr("x2",n).attr("y2",2e3).attr("class","actor-line").attr("class","200").attr("stroke-width","0.5px").attr("stroke","#999"),l=c.append("g"),e.actorCnt=V,null!=e.links&&(l.attr("id","root-"+V),D("#root-"+V,V)));const h=(0,s.g)();var d="actor";null!=e.properties&&e.properties.class?d=e.properties.class:h.fill="#eaeaea",h.x=e.x,h.y=r,h.width=e.width,h.height=e.height,h.class=d,h.rx=3,h.ry=3;const p=O(l,h);if(e.rectData=h,null!=e.properties&&e.properties.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?(0,s.b)(l,h.x+h.width-20,h.y+10,t.substr(1)):(0,s.c)(l,h.x+h.width-20,h.y+10,t)}W(a)(e.description,l,h.x,h.y,h.width,h.height,{class:"actor"},a);let g=e.height;if(p.node){const t=p.node().getBBox();e.height=t.height,g=t.height}return g}(t,e,a,i)}},U=function(t,e,a){const i=t.append("g");F(i,e),e.name&&W(a)(e.name,i,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},a),i.lower()},j=function(t,e,a,i,r){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const s=e.links,o=e.actorCnt,c=e.rectData;var l="none";r&&(l="block !important");const h=t.append("g");h.attr("id","actor"+o+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",l),D("#actor"+o+"_popup",o);var d="";void 0!==c.class&&(d=" "+c.class);let p=c.width>a?c.width:a;const g=h.append("rect");if(g.attr("class","actorPopupMenuPanel"+d),g.attr("x",c.x),g.attr("y",c.height),g.attr("fill",c.fill),g.attr("stroke",c.stroke),g.attr("width",p),g.attr("height",c.height),g.attr("rx",c.rx),g.attr("ry",c.ry),null!=s){var u=20;for(let t in s){var x=h.append("a"),y=(0,n.Nm)(s[t]);x.attr("xlink:href",y),x.attr("target","_blank"),q(i)(t,x,c.x+10,c.height+u,p,20,{class:"actor"},i),u+=30}}return g.attr("height",u),{height:c.height+u,width:p}},K=function(t){return t.append("g")},X=function(t,e,a,i,r){const n=(0,s.g)(),o=e.anchored;n.x=e.startx,n.y=e.starty,n.class="activation"+r%3,n.width=e.stopx-e.startx,n.height=a-e.starty,O(o,n)},G=function(t,e,a,i){const{boxMargin:r,boxTextMargin:n,labelBoxHeight:o,labelBoxWidth:c,messageFontFamily:l,messageFontSize:h,messageFontWeight:d}=i,p=t.append("g"),g=function(t,e,a,i){return p.append("line").attr("x1",t).attr("y1",e).attr("x2",a).attr("y2",i).attr("class","loopLine")};g(e.startx,e.starty,e.stopx,e.starty),g(e.stopx,e.starty,e.stopx,e.stopy),g(e.startx,e.stopy,e.stopx,e.stopy),g(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){g(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));let u=(0,s.e)();u.text=a,u.x=e.startx,u.y=e.starty,u.fontFamily=l,u.fontSize=h,u.fontWeight=d,u.anchor="middle",u.valign="middle",u.tspan=!1,u.width=c||50,u.height=o||20,u.textMargin=n,u.class="labelText",C(p,u),u={x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0},u.text=e.title,u.x=e.startx+c/2+(e.stopx-e.startx)/2,u.y=e.starty+r+n,u.anchor="middle",u.valign="middle",u.textMargin=n,u.class="loopText",u.fontFamily=l,u.fontSize=h,u.fontWeight=d,u.wrap=!0;let x=$(p,u);return void 0!==e.sectionTitles&&e.sectionTitles.forEach((function(t,a){if(t.message){u.text=t.message,u.x=e.startx+(e.stopx-e.startx)/2,u.y=e.sections[a].y+r+n,u.class="loopText",u.anchor="middle",u.valign="middle",u.tspan=!1,u.fontFamily=l,u.fontSize=h,u.fontWeight=d,u.wrap=e.wrap,x=$(p,u);let i=Math.round(x.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));e.sections[a].height+=i-(r+n)}})),e.height=Math.round(e.stopy-e.starty),p},J=F,Z=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},Q=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},tt=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},et=function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},at=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},it=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},rt=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")};n.Nm;let st={};const nt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((t=>t.height||0)))+(0===this.loops.length?0:this.loops.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.messages.length?0:this.messages.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.notes.length?0:this.notes.map((t=>t.height||0)).reduce(((t,e)=>t+e)))},clear:function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},addBox:function(t){this.boxes.push(t)},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],boxes:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,pt((0,i.c)())},updateVal:function(t,e,a,i){void 0===t[e]?t[e]=a:t[e]=i(a,t[e])},updateBounds:function(t,e,a,i){const r=this;let s=0;function n(n){return function(o){s++;const c=r.sequenceItems.length-s+1;r.updateVal(o,"starty",e-c*st.boxMargin,Math.min),r.updateVal(o,"stopy",i+c*st.boxMargin,Math.max),r.updateVal(nt.data,"startx",t-c*st.boxMargin,Math.min),r.updateVal(nt.data,"stopx",a+c*st.boxMargin,Math.max),"activation"!==n&&(r.updateVal(o,"startx",t-c*st.boxMargin,Math.min),r.updateVal(o,"stopx",a+c*st.boxMargin,Math.max),r.updateVal(nt.data,"starty",e-c*st.boxMargin,Math.min),r.updateVal(nt.data,"stopy",i+c*st.boxMargin,Math.max))}}this.sequenceItems.forEach(n()),this.activations.forEach(n("activation"))},insert:function(t,e,a,r){const s=i.e.getMin(t,a),n=i.e.getMax(t,a),o=i.e.getMin(e,r),c=i.e.getMax(e,r);this.updateVal(nt.data,"startx",s,Math.min),this.updateVal(nt.data,"starty",o,Math.min),this.updateVal(nt.data,"stopx",n,Math.max),this.updateVal(nt.data,"stopy",c,Math.max),this.updateBounds(s,o,n,c)},newActivation:function(t,e,a){const i=a[t.from.actor],r=gt(t.from.actor).length||0,s=i.x+i.width/2+(r-1)*st.activationWidth/2;this.activations.push({startx:s,starty:this.verticalPos+2,stopx:s+st.activationWidth,stopy:void 0,actor:t.from.actor,anchored:K(e)})},endActivation:function(t){const e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},isLoopOverlap:function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},addSectionToLoop:function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:nt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},saveVerticalPos:function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},resetVerticalPos:function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=i.e.getMax(this.data.stopy,this.verticalPos)},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},ot=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),ct=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),lt=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),ht=function(t,e,a,r){if(r){let r=0;nt.bumpVerticalPos(2*st.boxMargin);for(const s of a){const a=e[s];a.stopy||(a.stopy=nt.getVerticalPos());const n=H(t,a,st,!0);r=i.e.getMax(r,n)}nt.bumpVerticalPos(r+st.boxMargin)}else for(const i of a){const a=e[i];H(t,a,st,!1)}},dt=function(t,e,a,i){let r=0,s=0;for(const n of a){const a=e[n],o=yt(a),c=j(t,a,o,st,st.forceMenus,i);c.height>r&&(r=c.height),c.width+a.x>s&&(s=c.width+a.x)}return{maxHeight:r,maxWidth:s}},pt=function(t){(0,i.f)(st,t),t.fontFamily&&(st.actorFontFamily=st.noteFontFamily=st.messageFontFamily=t.fontFamily),t.fontSize&&(st.actorFontSize=st.noteFontSize=st.messageFontSize=t.fontSize),t.fontWeight&&(st.actorFontWeight=st.noteFontWeight=st.messageFontWeight=t.fontWeight)},gt=function(t){return nt.activations.filter((function(e){return e.actor===t}))},ut=function(t,e){const a=e[t],r=gt(t);return[r.reduce((function(t,e){return i.e.getMin(t,e.startx)}),a.x+a.width/2),r.reduce((function(t,e){return i.e.getMax(t,e.stopx)}),a.x+a.width/2)]};function xt(t,e,a,r,s){nt.bumpVerticalPos(a);let n=r;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,s=ot(st);e.message=i.u.wrapLabel(`[${e.message}]`,a-2*st.wrapPadding,s),e.width=a,e.wrap=!0;const o=i.u.calculateTextDimensions(e.message,s),c=i.e.getMax(o.height,st.labelBoxHeight);n=r+c,i.l.debug(`${c} - ${e.message}`)}s(e),nt.bumpVerticalPos(n)}const yt=function(t){let e=0;const a=lt(st);for(const r in t.links){const t=i.u.calculateTextDimensions(r,a).width+2*st.wrapPadding+2*st.boxMargin;e<t&&(e=t)}return e},mt={parser:c,db:S,renderer:{bounds:nt,drawActors:ht,drawActorsPopup:dt,setConf:pt,draw:function(t,e,a,n){const{securityLevel:o,sequence:c}=(0,i.c)();let l;st=c,"sandbox"===o&&(l=(0,r.Ys)("#i"+e));const h="sandbox"===o?(0,r.Ys)(l.nodes()[0].contentDocument.body):(0,r.Ys)("body"),d="sandbox"===o?l.nodes()[0].contentDocument:document;nt.init(),i.l.debug(n.db);const p="sandbox"===o?h.select(`[id="${e}"]`):(0,r.Ys)(`[id="${e}"]`),g=n.db.getActors(),u=n.db.getCreatedActors(),x=n.db.getDestroyedActors(),y=n.db.getBoxes();let m=n.db.getActorKeys();const f=n.db.getMessages(),b=n.db.getDiagramTitle(),T=n.db.hasAtLeastOneBox(),E=n.db.hasAtLeastOneBoxWithTitle(),w=function(t,e,a){const r={};return e.forEach((function(e){if(t[e.to]&&t[e.from]){const s=t[e.to];if(e.placement===a.db.PLACEMENT.LEFTOF&&!s.prevActor)return;if(e.placement===a.db.PLACEMENT.RIGHTOF&&!s.nextActor)return;const n=void 0!==e.placement,o=!n,c=n?ct(st):ot(st),l=e.wrap?i.u.wrapLabel(e.message,st.width-2*st.wrapPadding,c):e.message,h=i.u.calculateTextDimensions(l,c).width+2*st.wrapPadding;o&&e.from===s.nextActor?r[e.to]=i.e.getMax(r[e.to]||0,h):o&&e.from===s.prevActor?r[e.from]=i.e.getMax(r[e.from]||0,h):o&&e.from===e.to?(r[e.from]=i.e.getMax(r[e.from]||0,h/2),r[e.to]=i.e.getMax(r[e.to]||0,h/2)):e.placement===a.db.PLACEMENT.RIGHTOF?r[e.from]=i.e.getMax(r[e.from]||0,h):e.placement===a.db.PLACEMENT.LEFTOF?r[s.prevActor]=i.e.getMax(r[s.prevActor]||0,h):e.placement===a.db.PLACEMENT.OVER&&(s.prevActor&&(r[s.prevActor]=i.e.getMax(r[s.prevActor]||0,h/2)),s.nextActor&&(r[e.from]=i.e.getMax(r[e.from]||0,h/2)))}})),i.l.debug("maxMessageWidthPerActor:",r),r}(g,f,n);if(st.height=function(t,e,a){let r=0;Object.keys(t).forEach((e=>{const a=t[e];a.wrap&&(a.description=i.u.wrapLabel(a.description,st.width-2*st.wrapPadding,lt(st)));const s=i.u.calculateTextDimensions(a.description,lt(st));a.width=a.wrap?st.width:i.e.getMax(st.width,s.width+2*st.wrapPadding),a.height=a.wrap?i.e.getMax(s.height,st.height):st.height,r=i.e.getMax(r,a.height)}));for(const a in e){const r=t[a];if(!r)continue;const s=t[r.nextActor];if(!s){const t=e[a]+st.actorMargin-r.width/2;r.margin=i.e.getMax(t,st.actorMargin);continue}const n=e[a]+st.actorMargin-r.width/2-s.width/2;r.margin=i.e.getMax(n,st.actorMargin)}let s=0;return a.forEach((e=>{const a=ot(st);let r=e.actorKeys.reduce(((e,a)=>e+(t[a].width+(t[a].margin||0))),0);r-=2*st.boxTextMargin,e.wrap&&(e.name=i.u.wrapLabel(e.name,r-2*st.wrapPadding,a));const n=i.u.calculateTextDimensions(e.name,a);s=i.e.getMax(n.height,s);const o=i.e.getMax(r,n.width+2*st.wrapPadding);if(e.margin=st.boxTextMargin,r<o){const t=(o-r)/2;e.margin+=t}})),a.forEach((t=>t.textMaxHeight=s)),i.e.getMax(r,st.height)}(g,w,y),it(p),at(p),rt(p),T&&(nt.bumpVerticalPos(st.boxMargin),E&&nt.bumpVerticalPos(y[0].textMaxHeight)),!0===st.hideUnusedParticipants){const t=new Set;f.forEach((e=>{t.add(e.from),t.add(e.to)})),m=m.filter((e=>t.has(e)))}!function(t,e,a,r,s,n,o){let c,l=0,h=0,d=0;for(const t of r){const r=e[t],s=r.box;c&&c!=s&&(nt.models.addBox(c),h+=st.boxMargin+c.margin),s&&s!=c&&(s.x=l+h,s.y=0,h+=s.margin),r.width=r.width||st.width,r.height=i.e.getMax(r.height||st.height,st.height),r.margin=r.margin||st.actorMargin,d=i.e.getMax(d,r.height),a[r.name]&&(h+=r.width/2),r.x=l+h,r.starty=nt.getVerticalPos(),nt.insert(r.x,0,r.x+r.width,r.height),l+=r.width+h,r.box&&(r.box.width=l+s.margin-r.box.x),h=r.margin,c=r.box,nt.models.addActor(r)}c&&nt.models.addBox(c),nt.bumpVerticalPos(d)}(0,g,u,m);const _=function(t,e,a,r){const s={},n=[];let o,c,l;return t.forEach((function(t){switch(t.id=i.u.random({length:10}),t.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:n.push({id:t.id,msg:t.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:t.message&&(o=n.pop(),s[o.id]=o,s[t.id]=o,n.push(o));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:o=n.pop(),s[o.id]=o;break;case r.db.LINETYPE.ACTIVE_START:{const a=e[t.from?t.from.actor:t.to.actor],i=gt(t.from?t.from.actor:t.to.actor).length,r=a.x+a.width/2+(i-1)*st.activationWidth/2,s={startx:r,stopx:r+st.activationWidth,actor:t.from.actor,enabled:!0};nt.activations.push(s)}break;case r.db.LINETYPE.ACTIVE_END:{const e=nt.activations.map((t=>t.actor)).lastIndexOf(t.from.actor);delete nt.activations.splice(e,1)[0]}}void 0!==t.placement?(c=function(t,e,a){const r=e[t.from].x,s=e[t.to].x,n=t.wrap&&t.message;let o=i.u.calculateTextDimensions(n?i.u.wrapLabel(t.message,st.width,ct(st)):t.message,ct(st));const c={width:n?st.width:i.e.getMax(st.width,o.width+2*st.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===a.db.PLACEMENT.RIGHTOF?(c.width=n?i.e.getMax(st.width,o.width):i.e.getMax(e[t.from].width/2+e[t.to].width/2,o.width+2*st.noteMargin),c.startx=r+(e[t.from].width+st.actorMargin)/2):t.placement===a.db.PLACEMENT.LEFTOF?(c.width=n?i.e.getMax(st.width,o.width+2*st.noteMargin):i.e.getMax(e[t.from].width/2+e[t.to].width/2,o.width+2*st.noteMargin),c.startx=r-c.width+(e[t.from].width-st.actorMargin)/2):t.to===t.from?(o=i.u.calculateTextDimensions(n?i.u.wrapLabel(t.message,i.e.getMax(st.width,e[t.from].width),ct(st)):t.message,ct(st)),c.width=n?i.e.getMax(st.width,e[t.from].width):i.e.getMax(e[t.from].width,st.width,o.width+2*st.noteMargin),c.startx=r+(e[t.from].width-c.width)/2):(c.width=Math.abs(r+e[t.from].width/2-(s+e[t.to].width/2))+st.actorMargin,c.startx=r<s?r+e[t.from].width/2-st.actorMargin/2:s+e[t.to].width/2-st.actorMargin/2),n&&(c.message=i.u.wrapLabel(t.message,c.width-2*st.wrapPadding,ct(st))),i.l.debug(`NM:[${c.startx},${c.stopx},${c.starty},${c.stopy}:${c.width},${c.height}=${t.message}]`),c}(t,e,r),t.noteModel=c,n.forEach((t=>{o=t,o.from=i.e.getMin(o.from,c.startx),o.to=i.e.getMax(o.to,c.startx+c.width),o.width=i.e.getMax(o.width,Math.abs(o.from-o.to))-st.labelBoxWidth}))):(l=function(t,e,a){let r=!1;if([a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.SOLID,a.db.LINETYPE.DOTTED,a.db.LINETYPE.SOLID_CROSS,a.db.LINETYPE.DOTTED_CROSS,a.db.LINETYPE.SOLID_POINT,a.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(r=!0),!r)return{};const s=ut(t.from,e),n=ut(t.to,e),o=s[0]<=n[0]?1:0,c=s[0]<n[0]?0:1,l=[...s,...n],h=Math.abs(n[c]-s[o]);t.wrap&&t.message&&(t.message=i.u.wrapLabel(t.message,i.e.getMax(h+2*st.wrapPadding,st.width),ot(st)));const d=i.u.calculateTextDimensions(t.message,ot(st));return{width:i.e.getMax(t.wrap?0:d.width+2*st.wrapPadding,h+2*st.wrapPadding,st.width),height:0,startx:s[o],stopx:n[c],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,l),toBounds:Math.max.apply(null,l)}}(t,e,r),t.msgModel=l,l.startx&&l.stopx&&n.length>0&&n.forEach((a=>{if(o=a,l.startx===l.stopx){const a=e[t.from],r=e[t.to];o.from=i.e.getMin(a.x-l.width/2,a.x-a.width/2,o.from),o.to=i.e.getMax(r.x+l.width/2,r.x+a.width/2,o.to),o.width=i.e.getMax(o.width,Math.abs(o.to-o.from))-st.labelBoxWidth}else o.from=i.e.getMin(l.startx,o.from),o.to=i.e.getMax(l.stopx,o.to),o.width=i.e.getMax(o.width,l.width)-st.labelBoxWidth})))})),nt.activations=[],i.l.debug("Loop type widths:",s),s}(f,g,0,n);Z(p),et(p),Q(p),tt(p);let v=1,P=1;const k=[],L=[];f.forEach((function(t,e){let a,r,o;switch(t.type){case n.db.LINETYPE.NOTE:nt.resetVerticalPos(),r=t.noteModel,function(t,e){nt.bumpVerticalPos(st.boxMargin),e.height=st.boxMargin,e.starty=nt.getVerticalPos();const a=(0,s.g)();a.x=e.startx,a.y=e.starty,a.width=e.width||st.width,a.class="note";const i=t.append("g"),r=z(i,a),n=(0,s.e)();n.x=e.startx,n.y=e.starty,n.width=a.width,n.dy="1em",n.text=e.message,n.class="noteText",n.fontFamily=st.noteFontFamily,n.fontSize=st.noteFontSize,n.fontWeight=st.noteFontWeight,n.anchor=st.noteAlign,n.textMargin=st.noteMargin,n.valign="center";const o=$(i,n),c=Math.round(o.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));r.attr("height",c+2*st.noteMargin),e.height+=c+2*st.noteMargin,nt.bumpVerticalPos(c+2*st.noteMargin),e.stopy=e.starty+c+2*st.noteMargin,e.stopx=e.startx+a.width,nt.insert(e.startx,e.starty,e.stopx,e.stopy),nt.models.addNote(e)}(p,r);break;case n.db.LINETYPE.ACTIVE_START:nt.newActivation(t,p,g);break;case n.db.LINETYPE.ACTIVE_END:!function(t,e){const a=nt.endActivation(t);a.starty+18>e&&(a.starty=e-6,e+=12),X(p,a,e,st,gt(t.from.actor).length),nt.insert(a.startx,e-10,a.stopx,e)}(t,nt.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:xt(_,t,st.boxMargin,st.boxMargin+st.boxTextMargin,(t=>nt.newLoop(t)));break;case n.db.LINETYPE.LOOP_END:a=nt.endLoop(),G(p,a,"loop",st),nt.bumpVerticalPos(a.stopy-nt.getVerticalPos()),nt.models.addLoop(a);break;case n.db.LINETYPE.RECT_START:xt(_,t,st.boxMargin,st.boxMargin,(t=>nt.newLoop(void 0,t.message)));break;case n.db.LINETYPE.RECT_END:a=nt.endLoop(),L.push(a),nt.models.addLoop(a),nt.bumpVerticalPos(a.stopy-nt.getVerticalPos());break;case n.db.LINETYPE.OPT_START:xt(_,t,st.boxMargin,st.boxMargin+st.boxTextMargin,(t=>nt.newLoop(t)));break;case n.db.LINETYPE.OPT_END:a=nt.endLoop(),G(p,a,"opt",st),nt.bumpVerticalPos(a.stopy-nt.getVerticalPos()),nt.models.addLoop(a);break;case n.db.LINETYPE.ALT_START:xt(_,t,st.boxMargin,st.boxMargin+st.boxTextMargin,(t=>nt.newLoop(t)));break;case n.db.LINETYPE.ALT_ELSE:xt(_,t,st.boxMargin+st.boxTextMargin,st.boxMargin,(t=>nt.addSectionToLoop(t)));break;case n.db.LINETYPE.ALT_END:a=nt.endLoop(),G(p,a,"alt",st),nt.bumpVerticalPos(a.stopy-nt.getVerticalPos()),nt.models.addLoop(a);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:xt(_,t,st.boxMargin,st.boxMargin+st.boxTextMargin,(t=>nt.newLoop(t))),nt.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:xt(_,t,st.boxMargin+st.boxTextMargin,st.boxMargin,(t=>nt.addSectionToLoop(t)));break;case n.db.LINETYPE.PAR_END:a=nt.endLoop(),G(p,a,"par",st),nt.bumpVerticalPos(a.stopy-nt.getVerticalPos()),nt.models.addLoop(a);break;case n.db.LINETYPE.AUTONUMBER:v=t.message.start||v,P=t.message.step||P,t.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:xt(_,t,st.boxMargin,st.boxMargin+st.boxTextMargin,(t=>nt.newLoop(t)));break;case n.db.LINETYPE.CRITICAL_OPTION:xt(_,t,st.boxMargin+st.boxTextMargin,st.boxMargin,(t=>nt.addSectionToLoop(t)));break;case n.db.LINETYPE.CRITICAL_END:a=nt.endLoop(),G(p,a,"critical",st),nt.bumpVerticalPos(a.stopy-nt.getVerticalPos()),nt.models.addLoop(a);break;case n.db.LINETYPE.BREAK_START:xt(_,t,st.boxMargin,st.boxMargin+st.boxTextMargin,(t=>nt.newLoop(t)));break;case n.db.LINETYPE.BREAK_END:a=nt.endLoop(),G(p,a,"break",st),nt.bumpVerticalPos(a.stopy-nt.getVerticalPos()),nt.models.addLoop(a);break;default:try{o=t.msgModel,o.starty=nt.getVerticalPos(),o.sequenceIndex=v,o.sequenceVisible=n.db.showSequenceNumbers();const a=function(t,e){nt.bumpVerticalPos(10);const{startx:a,stopx:r,message:s}=e,n=i.e.splitBreaks(s).length,o=i.u.calculateTextDimensions(s,ot(st)),c=o.height/n;let l;e.height+=c,nt.bumpVerticalPos(c);let h=o.height-10;const d=o.width;if(a===r){l=nt.getVerticalPos()+h,st.rightAngles||(h+=st.boxMargin,l=nt.getVerticalPos()+h),h+=30;const t=i.e.getMax(d/2,st.width/2);nt.insert(a-t,nt.getVerticalPos()-10+h,r+t,nt.getVerticalPos()+30+h)}else h+=st.boxMargin,l=nt.getVerticalPos()+h,nt.insert(a,l-10,r,l);return nt.bumpVerticalPos(h),e.height+=h,e.stopy=e.starty+e.height,nt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}(0,o);!function(t,e,a,i,r,s,n){function o(a,i){a.x<r[t.from].x?(nt.insert(e.stopx-i,e.starty,e.startx,e.stopy+a.height/2+st.noteMargin),e.stopx=e.stopx+i):(nt.insert(e.startx,e.starty,e.stopx+i,e.stopy+a.height/2+st.noteMargin),e.stopx=e.stopx-i)}if(s[t.to]==i){const e=r[t.to];o(e,"actor"==e.type?21:e.width/2+3),e.starty=a-e.height/2,nt.bumpVerticalPos(e.height/2)}else if(n[t.from]==i){const i=r[t.from];st.mirrorActors&&function(a,i){a.x<r[t.to].x?(nt.insert(e.startx-i,e.starty,e.stopx,e.stopy+a.height/2+st.noteMargin),e.startx=e.startx+i):(nt.insert(e.stopx,e.starty,e.startx+i,e.stopy+a.height/2+st.noteMargin),e.startx=e.startx-i)}(i,"actor"==i.type?18:i.width/2),i.stopy=a-i.height/2,nt.bumpVerticalPos(i.height/2)}else if(n[t.to]==i){const e=r[t.to];st.mirrorActors&&o(e,"actor"==e.type?21:e.width/2+3),e.stopy=a-e.height/2,nt.bumpVerticalPos(e.height/2)}}(t,o,a,e,g,u,x),k.push({messageModel:o,lineStartY:a}),nt.models.addMessage(o)}catch(t){i.l.error("error while drawing message",t)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(v+=P)})),i.l.debug("createdActors",u),i.l.debug("destroyedActors",x),ht(p,g,m,!1),k.forEach((t=>function(t,e,a,r){const{startx:n,stopx:o,starty:c,message:l,type:h,sequenceIndex:d,sequenceVisible:p}=e,g=i.u.calculateTextDimensions(l,ot(st)),u=(0,s.e)();u.x=n,u.y=c+10,u.width=o-n,u.class="messageText",u.dy="1em",u.text=l,u.fontFamily=st.messageFontFamily,u.fontSize=st.messageFontSize,u.fontWeight=st.messageFontWeight,u.anchor=st.messageAlign,u.valign="center",u.textMargin=st.wrapPadding,u.tspan=!1,$(t,u);const x=g.width;let y;n===o?y=st.rightAngles?t.append("path").attr("d",`M ${n},${a} H ${n+i.e.getMax(st.width/2,x/2)} V ${a+25} H ${n}`):t.append("path").attr("d","M "+n+","+a+" C "+(n+60)+","+(a-10)+" "+(n+60)+","+(a+30)+" "+n+","+(a+20)):(y=t.append("line"),y.attr("x1",n),y.attr("y1",a),y.attr("x2",o),y.attr("y2",a)),h===r.db.LINETYPE.DOTTED||h===r.db.LINETYPE.DOTTED_CROSS||h===r.db.LINETYPE.DOTTED_POINT||h===r.db.LINETYPE.DOTTED_OPEN?(y.style("stroke-dasharray","3, 3"),y.attr("class","messageLine1")):y.attr("class","messageLine0");let m="";st.arrowMarkerAbsolute&&(m=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,m=m.replace(/\(/g,"\\("),m=m.replace(/\)/g,"\\)")),y.attr("stroke-width",2),y.attr("stroke","none"),y.style("fill","none"),h!==r.db.LINETYPE.SOLID&&h!==r.db.LINETYPE.DOTTED||y.attr("marker-end","url("+m+"#arrowhead)"),h!==r.db.LINETYPE.SOLID_POINT&&h!==r.db.LINETYPE.DOTTED_POINT||y.attr("marker-end","url("+m+"#filled-head)"),h!==r.db.LINETYPE.SOLID_CROSS&&h!==r.db.LINETYPE.DOTTED_CROSS||y.attr("marker-end","url("+m+"#crosshead)"),(p||st.showSequenceNumbers)&&(y.attr("marker-start","url("+m+"#sequencenumber)"),t.append("text").attr("x",n).attr("y",a+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(d))}(p,t.messageModel,t.lineStartY,n))),st.mirrorActors&&ht(p,g,m,!0),L.forEach((t=>J(p,t))),B(p,g,m,st),nt.models.boxes.forEach((function(t){t.height=nt.getVerticalPos()-t.y,nt.insert(t.x,t.y,t.x+t.width,t.height),t.startx=t.x,t.starty=t.y,t.stopx=t.startx+t.width,t.stopy=t.starty+t.height,t.stroke="rgb(0,0,0, 0.5)",U(p,t,st)})),T&&nt.bumpVerticalPos(st.boxMargin);const I=dt(p,g,m,d),{bounds:M}=nt.getBounds();let N=M.stopy-M.starty;N<I.maxHeight&&(N=I.maxHeight);let A=N+2*st.diagramMarginY;st.mirrorActors&&(A=A-st.boxMargin+st.bottomMarginAdj);let S=M.stopx-M.startx;S<I.maxWidth&&(S=I.maxWidth);const O=S+2*st.diagramMarginX;b&&p.append("text").text(b).attr("x",(M.stopx-M.startx)/2-2*st.diagramMarginX).attr("y",-25),(0,i.i)(p,A,O,st.useMaxWidth);const D=b?40:0;p.attr("viewBox",M.startx-st.diagramMarginX+" -"+(st.diagramMarginY+D)+" "+O+" "+(A+D)),i.l.debug("models:",nt.models)}},styles:t=>`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n #arrowhead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${t.signalColor};\n }\n\n #crosshead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n`}},8252:function(t,e,a){a.d(e,{a:function(){return n},b:function(){return l},c:function(){return c},d:function(){return s},e:function(){return d},f:function(){return o},g:function(){return h}});var i=a(7967),r=a(9339);const s=(t,e)=>{const a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),void 0!==e.rx&&a.attr("rx",e.rx),void 0!==e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(const t in e.attrs)a.attr(t,e.attrs[t]);return void 0!==e.class&&a.attr("class",e.class),a},n=(t,e)=>{const a={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};s(t,a).lower()},o=(t,e)=>{const a=e.text.replace(r.J," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),void 0!==e.class&&i.attr("class",e.class);const s=i.append("tspan");return s.attr("x",e.x+2*e.textMargin),s.text(a),i},c=(t,e,a,r)=>{const s=t.append("image");s.attr("x",e),s.attr("y",a);const n=(0,i.Nm)(r);s.attr("xlink:href",n)},l=(t,e,a,r)=>{const s=t.append("use");s.attr("x",e),s.attr("y",a);const n=(0,i.Nm)(r);s.attr("xlink:href",`#${n}`)},h=()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),d=()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0})}}]);