import{Ga as I,J as jt,La as D,Ta as yt,Za as _t,b as qt,c as Yt,cb as Et,db as Tt,eb as wt,fb as Rt,gb as Lt,h as xt,hb as Mt,ib as vt,kb as L,nb as Ct}from"./chunk-PXCFCI5A.js";import{a as dt,b as kt,h as mt}from"./chunk-3V74GZ4F.js";var Ee=mt(qt(),1),Te=mt(Yt(),1),we=mt(jt(),1);var ut=function(){var r=function(Y,u,b,x){for(b=b||{},x=Y.length;x--;b[Y[x]]=u);return b},n=[1,3],o=[1,6],m=[1,4],a=[1,5],c=[2,5],l=[1,12],h=[5,7,13,19,21,23,24,26,28,31,37,40,47],y=[7,13,19,21,23,24,26,28,31,37,40],k=[7,12,13,19,21,23,24,26,28,31,37,40],i=[7,13,47],g=[1,42],p=[1,41],E=[7,13,29,32,35,38,47],f=[1,55],d=[1,56],_=[1,57],H=[7,13,32,35,42,47],T={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,GG:5,document:6,EOF:7,":":8,DIR:9,options:10,body:11,OPT:12,NL:13,line:14,statement:15,commitStatement:16,mergeStatement:17,cherryPickStatement:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,section:24,branchStatement:25,CHECKOUT:26,ref:27,BRANCH:28,ORDER:29,NUM:30,CHERRY_PICK:31,COMMIT_ID:32,STR:33,PARENT_COMMIT:34,COMMIT_TAG:35,EMPTYSTR:36,MERGE:37,COMMIT_TYPE:38,commitType:39,COMMIT:40,commit_arg:41,COMMIT_MSG:42,NORMAL:43,REVERSE:44,HIGHLIGHT:45,ID:46,";":47,$accept:0,$end:1},terminals_:{2:"error",5:"GG",7:"EOF",8:":",9:"DIR",12:"OPT",13:"NL",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"section",26:"CHECKOUT",28:"BRANCH",29:"ORDER",30:"NUM",31:"CHERRY_PICK",32:"COMMIT_ID",33:"STR",34:"PARENT_COMMIT",35:"COMMIT_TAG",36:"EMPTYSTR",37:"MERGE",38:"COMMIT_TYPE",40:"COMMIT",42:"COMMIT_MSG",43:"NORMAL",44:"REVERSE",45:"HIGHLIGHT",46:"ID",47:";"},productions_:[0,[3,2],[3,3],[3,4],[3,5],[6,0],[6,2],[10,2],[10,1],[11,0],[11,2],[14,2],[14,1],[15,1],[15,1],[15,1],[15,2],[15,2],[15,1],[15,1],[15,1],[15,2],[25,2],[25,4],[18,3],[18,5],[18,5],[18,7],[18,7],[18,5],[18,5],[18,5],[18,7],[18,7],[18,7],[18,7],[17,2],[17,4],[17,4],[17,4],[17,6],[17,6],[17,6],[17,6],[17,6],[17,6],[17,8],[17,8],[17,8],[17,8],[17,8],[17,8],[16,2],[16,3],[16,3],[16,5],[16,5],[16,3],[16,5],[16,5],[16,5],[16,5],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,3],[16,5],[16,5],[16,5],[16,5],[16,5],[16,5],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[41,0],[41,1],[39,1],[39,1],[39,1],[27,1],[27,1],[4,1],[4,1],[4,1]],performAction:function(u,b,x,s,w,t,Q){var e=t.length-1;switch(w){case 2:return t[e];case 3:return t[e-1];case 4:return s.setDirection(t[e-3]),t[e-1];case 6:s.setOptions(t[e-1]),this.$=t[e];break;case 7:t[e-1]+=t[e],this.$=t[e-1];break;case 9:this.$=[];break;case 10:t[e-1].push(t[e]),this.$=t[e-1];break;case 11:this.$=t[e-1];break;case 16:this.$=t[e].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=t[e].trim(),s.setAccDescription(this.$);break;case 19:s.addSection(t[e].substr(8)),this.$=t[e].substr(8);break;case 21:s.checkout(t[e]);break;case 22:s.branch(t[e]);break;case 23:s.branch(t[e-2],t[e]);break;case 24:s.cherryPick(t[e],"",void 0);break;case 25:s.cherryPick(t[e-2],"",void 0,t[e]);break;case 26:s.cherryPick(t[e-2],"",t[e]);break;case 27:s.cherryPick(t[e-4],"",t[e],t[e-2]);break;case 28:s.cherryPick(t[e-4],"",t[e-2],t[e]);break;case 29:s.cherryPick(t[e],"",t[e-2]);break;case 30:s.cherryPick(t[e],"","");break;case 31:s.cherryPick(t[e-2],"","");break;case 32:s.cherryPick(t[e-4],"","",t[e-2]);break;case 33:s.cherryPick(t[e-4],"","",t[e]);break;case 34:s.cherryPick(t[e-2],"",t[e-4],t[e]);break;case 35:s.cherryPick(t[e-2],"","",t[e]);break;case 36:s.merge(t[e],"","","");break;case 37:s.merge(t[e-2],t[e],"","");break;case 38:s.merge(t[e-2],"",t[e],"");break;case 39:s.merge(t[e-2],"","",t[e]);break;case 40:s.merge(t[e-4],t[e],"",t[e-2]);break;case 41:s.merge(t[e-4],"",t[e],t[e-2]);break;case 42:s.merge(t[e-4],"",t[e-2],t[e]);break;case 43:s.merge(t[e-4],t[e-2],t[e],"");break;case 44:s.merge(t[e-4],t[e-2],"",t[e]);break;case 45:s.merge(t[e-4],t[e],t[e-2],"");break;case 46:s.merge(t[e-6],t[e-4],t[e-2],t[e]);break;case 47:s.merge(t[e-6],t[e],t[e-4],t[e-2]);break;case 48:s.merge(t[e-6],t[e-4],t[e],t[e-2]);break;case 49:s.merge(t[e-6],t[e-2],t[e-4],t[e]);break;case 50:s.merge(t[e-6],t[e],t[e-2],t[e-4]);break;case 51:s.merge(t[e-6],t[e-2],t[e],t[e-4]);break;case 52:s.commit(t[e]);break;case 53:s.commit("","",s.commitType.NORMAL,t[e]);break;case 54:s.commit("","",t[e],"");break;case 55:s.commit("","",t[e],t[e-2]);break;case 56:s.commit("","",t[e-2],t[e]);break;case 57:s.commit("",t[e],s.commitType.NORMAL,"");break;case 58:s.commit("",t[e-2],s.commitType.NORMAL,t[e]);break;case 59:s.commit("",t[e],s.commitType.NORMAL,t[e-2]);break;case 60:s.commit("",t[e-2],t[e],"");break;case 61:s.commit("",t[e],t[e-2],"");break;case 62:s.commit("",t[e-4],t[e-2],t[e]);break;case 63:s.commit("",t[e-4],t[e],t[e-2]);break;case 64:s.commit("",t[e-2],t[e-4],t[e]);break;case 65:s.commit("",t[e],t[e-4],t[e-2]);break;case 66:s.commit("",t[e],t[e-2],t[e-4]);break;case 67:s.commit("",t[e-2],t[e],t[e-4]);break;case 68:s.commit(t[e],"",s.commitType.NORMAL,"");break;case 69:s.commit(t[e],"",s.commitType.NORMAL,t[e-2]);break;case 70:s.commit(t[e-2],"",s.commitType.NORMAL,t[e]);break;case 71:s.commit(t[e-2],"",t[e],"");break;case 72:s.commit(t[e],"",t[e-2],"");break;case 73:s.commit(t[e],t[e-2],s.commitType.NORMAL,"");break;case 74:s.commit(t[e-2],t[e],s.commitType.NORMAL,"");break;case 75:s.commit(t[e-4],"",t[e-2],t[e]);break;case 76:s.commit(t[e-4],"",t[e],t[e-2]);break;case 77:s.commit(t[e-2],"",t[e-4],t[e]);break;case 78:s.commit(t[e],"",t[e-4],t[e-2]);break;case 79:s.commit(t[e],"",t[e-2],t[e-4]);break;case 80:s.commit(t[e-2],"",t[e],t[e-4]);break;case 81:s.commit(t[e-4],t[e],t[e-2],"");break;case 82:s.commit(t[e-4],t[e-2],t[e],"");break;case 83:s.commit(t[e-2],t[e],t[e-4],"");break;case 84:s.commit(t[e],t[e-2],t[e-4],"");break;case 85:s.commit(t[e],t[e-4],t[e-2],"");break;case 86:s.commit(t[e-2],t[e-4],t[e],"");break;case 87:s.commit(t[e-4],t[e],s.commitType.NORMAL,t[e-2]);break;case 88:s.commit(t[e-4],t[e-2],s.commitType.NORMAL,t[e]);break;case 89:s.commit(t[e-2],t[e],s.commitType.NORMAL,t[e-4]);break;case 90:s.commit(t[e],t[e-2],s.commitType.NORMAL,t[e-4]);break;case 91:s.commit(t[e],t[e-4],s.commitType.NORMAL,t[e-2]);break;case 92:s.commit(t[e-2],t[e-4],s.commitType.NORMAL,t[e]);break;case 93:s.commit(t[e-6],t[e-4],t[e-2],t[e]);break;case 94:s.commit(t[e-6],t[e-4],t[e],t[e-2]);break;case 95:s.commit(t[e-6],t[e-2],t[e-4],t[e]);break;case 96:s.commit(t[e-6],t[e],t[e-4],t[e-2]);break;case 97:s.commit(t[e-6],t[e-2],t[e],t[e-4]);break;case 98:s.commit(t[e-6],t[e],t[e-2],t[e-4]);break;case 99:s.commit(t[e-4],t[e-6],t[e-2],t[e]);break;case 100:s.commit(t[e-4],t[e-6],t[e],t[e-2]);break;case 101:s.commit(t[e-2],t[e-6],t[e-4],t[e]);break;case 102:s.commit(t[e],t[e-6],t[e-4],t[e-2]);break;case 103:s.commit(t[e-2],t[e-6],t[e],t[e-4]);break;case 104:s.commit(t[e],t[e-6],t[e-2],t[e-4]);break;case 105:s.commit(t[e],t[e-4],t[e-2],t[e-6]);break;case 106:s.commit(t[e-2],t[e-4],t[e],t[e-6]);break;case 107:s.commit(t[e],t[e-2],t[e-4],t[e-6]);break;case 108:s.commit(t[e-2],t[e],t[e-4],t[e-6]);break;case 109:s.commit(t[e-4],t[e-2],t[e],t[e-6]);break;case 110:s.commit(t[e-4],t[e],t[e-2],t[e-6]);break;case 111:s.commit(t[e-2],t[e-4],t[e-6],t[e]);break;case 112:s.commit(t[e],t[e-4],t[e-6],t[e-2]);break;case 113:s.commit(t[e-2],t[e],t[e-6],t[e-4]);break;case 114:s.commit(t[e],t[e-2],t[e-6],t[e-4]);break;case 115:s.commit(t[e-4],t[e-2],t[e-6],t[e]);break;case 116:s.commit(t[e-4],t[e],t[e-6],t[e-2]);break;case 117:this.$="";break;case 118:this.$=t[e];break;case 119:this.$=s.commitType.NORMAL;break;case 120:this.$=s.commitType.REVERSE;break;case 121:this.$=s.commitType.HIGHLIGHT;break}},table:[{3:1,4:2,5:n,7:o,13:m,47:a},{1:[3]},{3:7,4:2,5:n,7:o,13:m,47:a},{6:8,7:c,8:[1,9],9:[1,10],10:11,13:l},r(h,[2,124]),r(h,[2,125]),r(h,[2,126]),{1:[2,1]},{7:[1,13]},{6:14,7:c,10:11,13:l},{8:[1,15]},r(y,[2,9],{11:16,12:[1,17]}),r(k,[2,8]),{1:[2,2]},{7:[1,18]},{6:19,7:c,10:11,13:l},{7:[2,6],13:[1,22],14:20,15:21,16:23,17:24,18:25,19:[1,26],21:[1,27],23:[1,28],24:[1,29],25:30,26:[1,31],28:[1,35],31:[1,34],37:[1,33],40:[1,32]},r(k,[2,7]),{1:[2,3]},{7:[1,36]},r(y,[2,10]),{4:37,7:o,13:m,47:a},r(y,[2,12]),r(i,[2,13]),r(i,[2,14]),r(i,[2,15]),{20:[1,38]},{22:[1,39]},r(i,[2,18]),r(i,[2,19]),r(i,[2,20]),{27:40,33:g,46:p},r(i,[2,117],{41:43,32:[1,46],33:[1,48],35:[1,44],38:[1,45],42:[1,47]}),{27:49,33:g,46:p},{32:[1,50],35:[1,51]},{27:52,33:g,46:p},{1:[2,4]},r(y,[2,11]),r(i,[2,16]),r(i,[2,17]),r(i,[2,21]),r(E,[2,122]),r(E,[2,123]),r(i,[2,52]),{33:[1,53]},{39:54,43:f,44:d,45:_},{33:[1,58]},{33:[1,59]},r(i,[2,118]),r(i,[2,36],{32:[1,60],35:[1,62],38:[1,61]}),{33:[1,63]},{33:[1,64],36:[1,65]},r(i,[2,22],{29:[1,66]}),r(i,[2,53],{32:[1,68],38:[1,67],42:[1,69]}),r(i,[2,54],{32:[1,71],35:[1,70],42:[1,72]}),r(H,[2,119]),r(H,[2,120]),r(H,[2,121]),r(i,[2,57],{35:[1,73],38:[1,74],42:[1,75]}),r(i,[2,68],{32:[1,78],35:[1,76],38:[1,77]}),{33:[1,79]},{39:80,43:f,44:d,45:_},{33:[1,81]},r(i,[2,24],{34:[1,82],35:[1,83]}),{32:[1,84]},{32:[1,85]},{30:[1,86]},{39:87,43:f,44:d,45:_},{33:[1,88]},{33:[1,89]},{33:[1,90]},{33:[1,91]},{33:[1,92]},{33:[1,93]},{39:94,43:f,44:d,45:_},{33:[1,95]},{33:[1,96]},{39:97,43:f,44:d,45:_},{33:[1,98]},r(i,[2,37],{35:[1,100],38:[1,99]}),r(i,[2,38],{32:[1,102],35:[1,101]}),r(i,[2,39],{32:[1,103],38:[1,104]}),{33:[1,105]},{33:[1,106],36:[1,107]},{33:[1,108]},{33:[1,109]},r(i,[2,23]),r(i,[2,55],{32:[1,110],42:[1,111]}),r(i,[2,59],{38:[1,112],42:[1,113]}),r(i,[2,69],{32:[1,115],38:[1,114]}),r(i,[2,56],{32:[1,116],42:[1,117]}),r(i,[2,61],{35:[1,118],42:[1,119]}),r(i,[2,72],{32:[1,121],35:[1,120]}),r(i,[2,58],{38:[1,122],42:[1,123]}),r(i,[2,60],{35:[1,124],42:[1,125]}),r(i,[2,73],{35:[1,127],38:[1,126]}),r(i,[2,70],{32:[1,129],38:[1,128]}),r(i,[2,71],{32:[1,131],35:[1,130]}),r(i,[2,74],{35:[1,133],38:[1,132]}),{39:134,43:f,44:d,45:_},{33:[1,135]},{33:[1,136]},{33:[1,137]},{33:[1,138]},{39:139,43:f,44:d,45:_},r(i,[2,25],{35:[1,140]}),r(i,[2,26],{34:[1,141]}),r(i,[2,31],{34:[1,142]}),r(i,[2,29],{34:[1,143]}),r(i,[2,30],{34:[1,144]}),{33:[1,145]},{33:[1,146]},{39:147,43:f,44:d,45:_},{33:[1,148]},{39:149,43:f,44:d,45:_},{33:[1,150]},{33:[1,151]},{33:[1,152]},{33:[1,153]},{33:[1,154]},{33:[1,155]},{33:[1,156]},{39:157,43:f,44:d,45:_},{33:[1,158]},{33:[1,159]},{33:[1,160]},{39:161,43:f,44:d,45:_},{33:[1,162]},{39:163,43:f,44:d,45:_},{33:[1,164]},{33:[1,165]},{33:[1,166]},{39:167,43:f,44:d,45:_},{33:[1,168]},r(i,[2,43],{35:[1,169]}),r(i,[2,44],{38:[1,170]}),r(i,[2,42],{32:[1,171]}),r(i,[2,45],{35:[1,172]}),r(i,[2,40],{38:[1,173]}),r(i,[2,41],{32:[1,174]}),{33:[1,175],36:[1,176]},{33:[1,177]},{33:[1,178]},{33:[1,179]},{33:[1,180]},r(i,[2,66],{42:[1,181]}),r(i,[2,79],{32:[1,182]}),r(i,[2,67],{42:[1,183]}),r(i,[2,90],{38:[1,184]}),r(i,[2,80],{32:[1,185]}),r(i,[2,89],{38:[1,186]}),r(i,[2,65],{42:[1,187]}),r(i,[2,78],{32:[1,188]}),r(i,[2,64],{42:[1,189]}),r(i,[2,84],{35:[1,190]}),r(i,[2,77],{32:[1,191]}),r(i,[2,83],{35:[1,192]}),r(i,[2,63],{42:[1,193]}),r(i,[2,91],{38:[1,194]}),r(i,[2,62],{42:[1,195]}),r(i,[2,85],{35:[1,196]}),r(i,[2,86],{35:[1,197]}),r(i,[2,92],{38:[1,198]}),r(i,[2,76],{32:[1,199]}),r(i,[2,87],{38:[1,200]}),r(i,[2,75],{32:[1,201]}),r(i,[2,81],{35:[1,202]}),r(i,[2,82],{35:[1,203]}),r(i,[2,88],{38:[1,204]}),{33:[1,205]},{39:206,43:f,44:d,45:_},{33:[1,207]},{33:[1,208]},{39:209,43:f,44:d,45:_},{33:[1,210]},r(i,[2,27]),r(i,[2,32]),r(i,[2,28]),r(i,[2,33]),r(i,[2,34]),r(i,[2,35]),{33:[1,211]},{33:[1,212]},{33:[1,213]},{39:214,43:f,44:d,45:_},{33:[1,215]},{39:216,43:f,44:d,45:_},{33:[1,217]},{33:[1,218]},{33:[1,219]},{33:[1,220]},{33:[1,221]},{33:[1,222]},{33:[1,223]},{39:224,43:f,44:d,45:_},{33:[1,225]},{33:[1,226]},{33:[1,227]},{39:228,43:f,44:d,45:_},{33:[1,229]},{39:230,43:f,44:d,45:_},{33:[1,231]},{33:[1,232]},{33:[1,233]},{39:234,43:f,44:d,45:_},r(i,[2,46]),r(i,[2,48]),r(i,[2,47]),r(i,[2,49]),r(i,[2,51]),r(i,[2,50]),r(i,[2,107]),r(i,[2,108]),r(i,[2,105]),r(i,[2,106]),r(i,[2,110]),r(i,[2,109]),r(i,[2,114]),r(i,[2,113]),r(i,[2,112]),r(i,[2,111]),r(i,[2,116]),r(i,[2,115]),r(i,[2,104]),r(i,[2,103]),r(i,[2,102]),r(i,[2,101]),r(i,[2,99]),r(i,[2,100]),r(i,[2,98]),r(i,[2,97]),r(i,[2,96]),r(i,[2,95]),r(i,[2,93]),r(i,[2,94])],defaultActions:{7:[2,1],13:[2,2],18:[2,3],36:[2,4]},parseError:function(u,b){if(b.recoverable)this.trace(u);else{var x=new Error(u);throw x.hash=b,x}},parse:function(u){var b=this,x=[0],s=[],w=[null],t=[],Q=this.table,e="",rt=0,ft=0,Bt=2,bt=1,Vt=t.slice.call(arguments,1),C=Object.create(this.lexer),j={yy:{}};for(var ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ct)&&(j.yy[ct]=this.yy[ct]);C.setInput(u,j.yy),j.yy.lexer=C,j.yy.parser=this,typeof C.yylloc=="undefined"&&(C.yylloc={});var ot=C.yylloc;t.push(ot);var Dt=C.options&&C.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function zt(){var q;return q=s.pop()||C.lex()||bt,typeof q!="number"&&(q instanceof Array&&(s=q,q=s.pop()),q=b.symbols_[q]||q),q}for(var S,F,V,lt,W={},it,z,gt,st;;){if(F=x[x.length-1],this.defaultActions[F]?V=this.defaultActions[F]:((S===null||typeof S=="undefined")&&(S=zt()),V=Q[F]&&Q[F][S]),typeof V=="undefined"||!V.length||!V[0]){var ht="";st=[];for(it in Q[F])this.terminals_[it]&&it>Bt&&st.push("'"+this.terminals_[it]+"'");C.showPosition?ht="Parse error on line "+(rt+1)+`: `+C.showPosition()+` Expecting `+st.join(", ")+", got '"+(this.terminals_[S]||S)+"'":ht="Parse error on line "+(rt+1)+": Unexpected "+(S==bt?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(ht,{text:C.match,token:this.terminals_[S]||S,line:C.yylineno,loc:ot,expected:st})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+S);switch(V[0]){case 1:x.push(S),w.push(C.yytext),t.push(C.yylloc),x.push(V[1]),S=null,ft=C.yyleng,e=C.yytext,rt=C.yylineno,ot=C.yylloc;break;case 2:if(z=this.productions_[V[1]][1],W.$=w[w.length-z],W._$={first_line:t[t.length-(z||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(z||1)].first_column,last_column:t[t.length-1].last_column},Dt&&(W._$.range=[t[t.length-(z||1)].range[0],t[t.length-1].range[1]]),lt=this.performAction.apply(W,[e,ft,rt,j.yy,V[1],w,t].concat(Vt)),typeof lt!="undefined")return lt;z&&(x=x.slice(0,-1*z*2),w=w.slice(0,-1*z),t=t.slice(0,-1*z)),x.push(this.productions_[V[1]][0]),w.push(W.$),t.push(W._$),gt=Q[x[x.length-2]][x[x.length-1]],x.push(gt);break;case 3:return!0}}return!0}},B=function(){var Y={EOF:1,parseError:function(b,x){if(this.yy.parser)this.yy.parser.parseError(b,x);else throw new Error(b)},setInput:function(u,b){return this.yy=b||this.yy||{},this._input=u,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 u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var b=u.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},unput:function(u){var b=u.length,x=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===s.length?this.yylloc.first_column:0)+s[s.length-x.length].length-x[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(u){this.unput(this.match.slice(u))},pastInput:function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var u=this.pastInput(),b=new Array(u.length+1).join("-");return u+this.upcomingInput()+` `+b+"^"},test_match:function(u,b){var x,s,w;if(this.options.backtrack_lexer&&(w={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&&(w.yylloc.range=this.yylloc.range.slice(0))),s=u[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,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(u[0].length),this.matched+=u[0],x=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),x)return x;if(this._backtrack){for(var t in w)this[t]=w[t];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,b,x,s;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),t=0;tb[0].length)){if(b=x,s=t,this.options.backtrack_lexer){if(u=this.test_match(x,w[t]),u!==!1)return u;if(this._backtrack){b=!1;continue}else return!1}else if(!this.options.flex)break}return b?(u=this.test_match(b,w[s]),u!==!1?u:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var b=this.next();return b||this.lex()},begin:function(b){this.conditionStack.push(b)},popState:function(){var b=this.conditionStack.length-1;return b>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(b){return b=this.conditionStack.length-1-Math.abs(b||0),b>=0?this.conditionStack[b]:"INITIAL"},pushState:function(b){this.begin(b)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(b,x,s,w){switch(s){case 0:return this.begin("acc_title"),19;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),21;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 13;case 8:break;case 9:break;case 10:return 5;case 11:return 40;case 12:return 32;case 13:return 38;case 14:return 42;case 15:return 43;case 16:return 44;case 17:return 45;case 18:return 35;case 19:return 28;case 20:return 29;case 21:return 37;case 22:return 31;case 23:return 34;case 24:return 26;case 25:return 9;case 26:return 9;case 27:return 8;case 28:return"CARET";case 29:this.begin("options");break;case 30:this.popState();break;case 31:return 12;case 32:return 36;case 33:this.begin("string");break;case 34:this.popState();break;case 35:return 33;case 36:return 30;case 37:return 46;case 38:return 7}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:parent:)/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:TB\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},options:{rules:[30,31],inclusive:!1},string:{rules:[34,35],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,32,33,36,37,38,39],inclusive:!0}}};return Y}();T.lexer=B;function G(){this.yy={}}return G.prototype=T,T.Parser=G,new G}();ut.parser=ut;var Ft=ut,at=L().gitGraph.mainBranchName,Kt=L().gitGraph.mainBranchOrder,v={},P=null,$={};$[at]={name:at,order:Kt};var M={};M[at]=P;var O=at,It="LR",U=0;function pt(){return yt({length:7})}function Ut(r,n){let o=Object.create(null);return r.reduce((m,a)=>{let c=n(a);return o[c]||(o[c]=!0,m.push(a)),m},[])}var Wt=function(r){It=r},Pt={},Jt=function(r){I.debug("options str",r),r=r&&r.trim(),r=r||"{}";try{Pt=JSON.parse(r)}catch(n){I.error("error while parsing gitGraph options",n.message)}},Qt=function(){return Pt},Xt=function(r,n,o,m){I.debug("Entering commit:",r,n,o,m),n=D.sanitizeText(n,L()),r=D.sanitizeText(r,L()),m=D.sanitizeText(m,L());let a={id:n||U+"-"+pt(),message:r,seq:U++,type:o||J.NORMAL,tag:m||"",parents:P==null?[]:[P.id],branch:O};P=a,v[a.id]=a,M[O]=a.id,I.debug("in pushCommit "+a.id)},Zt=function(r,n){if(r=D.sanitizeText(r,L()),M[r]===void 0)M[r]=P!=null?P.id:null,$[r]={name:r,order:n?parseInt(n,10):null},St(r),I.debug("in createBranch");else{let o=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout '+r+'")');throw o.hash={text:"branch "+r,token:"branch "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+r+'"']},o}},$t=function(r,n,o,m){r=D.sanitizeText(r,L()),n=D.sanitizeText(n,L());let a=v[M[O]],c=v[M[r]];if(O===r){let h=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw h.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},h}else if(a===void 0||!a){let h=new Error('Incorrect usage of "merge". Current branch ('+O+")has no commits");throw h.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},h}else if(M[r]===void 0){let h=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw h.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+r]},h}else if(c===void 0||!c){let h=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw h.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},h}else if(a===c){let h=new Error('Incorrect usage of "merge". Both branches have same head');throw h.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},h}else if(n&&v[n]!==void 0){let h=new Error('Incorrect usage of "merge". Commit with id:'+n+" already exists, use different custom Id");throw h.hash={text:"merge "+r+n+o+m,token:"merge "+r+n+o+m,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+r+" "+n+"_UNIQUE "+o+" "+m]},h}let l={id:n||U+"-"+pt(),message:"merged branch "+r+" into "+O,seq:U++,parents:[P==null?null:P.id,M[r]],branch:O,type:J.MERGE,customType:o,customId:!!n,tag:m||""};P=l,v[l.id]=l,M[O]=l.id,I.debug(M),I.debug("in mergeBranch")},te=function(r,n,o,m){if(I.debug("Entering cherryPick:",r,n,o),r=D.sanitizeText(r,L()),n=D.sanitizeText(n,L()),o=D.sanitizeText(o,L()),m=D.sanitizeText(m,L()),!r||v[r]===void 0){let l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:"cherryPick "+r+" "+n,token:"cherryPick "+r+" "+n,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},l}let a=v[r],c=a.branch;if(m&&!(Array.isArray(a.parents)&&a.parents.includes(m)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");if(a.type===J.MERGE&&!m)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!n||v[n]===void 0){if(c===O){let y=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw y.hash={text:"cherryPick "+r+" "+n,token:"cherryPick "+r+" "+n,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},y}let l=v[M[O]];if(l===void 0||!l){let y=new Error('Incorrect usage of "cherry-pick". Current branch ('+O+")has no commits");throw y.hash={text:"cherryPick "+r+" "+n,token:"cherryPick "+r+" "+n,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},y}let h={id:U+"-"+pt(),message:"cherry-picked "+a+" into "+O,seq:U++,parents:[P==null?null:P.id,a.id],branch:O,type:J.CHERRY_PICK,tag:o!=null?o:`cherry-pick:${a.id}${a.type===J.MERGE?`|parent:${m}`:""}`};P=h,v[h.id]=h,M[O]=h.id,I.debug(M),I.debug("in cherryPick")}},St=function(r){if(r=D.sanitizeText(r,L()),M[r]===void 0){let n=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+r+'")');throw n.hash={text:"checkout "+r,token:"checkout "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+r+'"']},n}else{O=r;let n=M[O];P=v[n]}};function Ot(r,n,o){let m=r.indexOf(n);m===-1?r.push(o):r.splice(m,1,o)}function Gt(r){let n=r.reduce((a,c)=>a.seq>c.seq?a:c,r[0]),o="";r.forEach(function(a){a===n?o+=" *":o+=" |"});let m=[o,n.id,n.seq];for(let a in M)M[a]===n.id&&m.push(a);if(I.debug(m.join(" ")),n.parents&&n.parents.length==2){let a=v[n.parents[0]];Ot(r,n,a),r.push(v[n.parents[1]])}else{if(n.parents.length==0)return;{let a=v[n.parents];Ot(r,n,a)}}r=Ut(r,a=>a.id),Gt(r)}var ee=function(){I.debug(v);let r=Nt()[0];Gt([r])},re=function(){v={},P=null;let r=L().gitGraph.mainBranchName,n=L().gitGraph.mainBranchOrder;M={},M[r]=null,$={},$[r]={name:r,order:n},O=r,U=0,Et()},ie=function(){return Object.values($).map((n,o)=>n.order!==null?n:kt(dt({},n),{order:parseFloat(`0.${o}`,10)})).sort((n,o)=>n.order-o.order).map(({name:n})=>({name:n}))},se=function(){return M},ae=function(){return v},Nt=function(){let r=Object.keys(v).map(function(n){return v[n]});return r.forEach(function(n){I.debug(n.id)}),r.sort((n,o)=>n.seq-o.seq),r},ne=function(){return O},ce=function(){return It},oe=function(){return P},J={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},le={getConfig:()=>L().gitGraph,setDirection:Wt,setOptions:Jt,getOptions:Qt,commit:Xt,branch:Zt,merge:$t,cherryPick:te,checkout:St,prettyPrint:ee,clear:re,getBranchesAsObjArray:ie,getBranches:se,getCommits:ae,getCommitsArray:Nt,getCurrentBranch:ne,getDirection:ce,getHead:oe,setAccTitle:Tt,getAccTitle:wt,getAccDescription:Lt,setAccDescription:Rt,setDiagramTitle:Mt,getDiagramTitle:vt,commitType:J},X={},N={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},K=8,R={},tt={},nt=[],et=0,A="LR",he=()=>{R={},tt={},X={},et=0,nt=[],A="LR"},Ht=r=>{let n=document.createElementNS("http://www.w3.org/2000/svg","text"),o=[];typeof r=="string"?o=r.split(/\\n|\n|/gi):Array.isArray(r)?o=r:o=[];for(let m of o){let a=document.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),a.setAttribute("dy","1em"),a.setAttribute("x","0"),a.setAttribute("class","row"),a.textContent=m.trim(),n.appendChild(a)}return n},At=(r,n,o)=>{let m=L().gitGraph,a=r.append("g").attr("class","commit-bullets"),c=r.append("g").attr("class","commit-labels"),l=0;A==="TB"&&(l=30),Object.keys(n).sort((k,i)=>n[k].seq-n[i].seq).forEach(k=>{let i=n[k],g=A==="TB"?l+10:R[i.branch].pos,p=A==="TB"?R[i.branch].pos:l+10;if(o){let E,f=i.customType!==void 0&&i.customType!==""?i.customType:i.type;switch(f){case N.NORMAL:E="commit-normal";break;case N.REVERSE:E="commit-reverse";break;case N.HIGHLIGHT:E="commit-highlight";break;case N.MERGE:E="commit-merge";break;case N.CHERRY_PICK:E="commit-cherry-pick";break;default:E="commit-normal"}if(f===N.HIGHLIGHT){let d=a.append("rect");d.attr("x",p-10),d.attr("y",g-10),d.attr("height",20),d.attr("width",20),d.attr("class",`commit ${i.id} commit-highlight${R[i.branch].index%K} ${E}-outer`),a.append("rect").attr("x",p-6).attr("y",g-6).attr("height",12).attr("width",12).attr("class",`commit ${i.id} commit${R[i.branch].index%K} ${E}-inner`)}else if(f===N.CHERRY_PICK)a.append("circle").attr("cx",p).attr("cy",g).attr("r",10).attr("class",`commit ${i.id} ${E}`),a.append("circle").attr("cx",p-3).attr("cy",g+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${i.id} ${E}`),a.append("circle").attr("cx",p+3).attr("cy",g+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${i.id} ${E}`),a.append("line").attr("x1",p+3).attr("y1",g+1).attr("x2",p).attr("y2",g-5).attr("stroke","#fff").attr("class",`commit ${i.id} ${E}`),a.append("line").attr("x1",p-3).attr("y1",g+1).attr("x2",p).attr("y2",g-5).attr("stroke","#fff").attr("class",`commit ${i.id} ${E}`);else{let d=a.append("circle");if(d.attr("cx",p),d.attr("cy",g),d.attr("r",i.type===N.MERGE?9:10),d.attr("class",`commit ${i.id} commit${R[i.branch].index%K}`),f===N.MERGE){let _=a.append("circle");_.attr("cx",p),_.attr("cy",g),_.attr("r",6),_.attr("class",`commit ${E} ${i.id} commit${R[i.branch].index%K}`)}f===N.REVERSE&&a.append("path").attr("d",`M ${p-5},${g-5}L${p+5},${g+5}M${p-5},${g+5}L${p+5},${g-5}`).attr("class",`commit ${E} ${i.id} commit${R[i.branch].index%K}`)}}if(A==="TB"?tt[i.id]={x:p,y:l+10}:tt[i.id]={x:l+10,y:g},o){if(i.type!==N.CHERRY_PICK&&(i.customId&&i.type===N.MERGE||i.type!==N.MERGE)&&m.showCommitLabel){let d=c.append("g"),_=d.insert("rect").attr("class","commit-label-bkg"),H=d.append("text").attr("x",l).attr("y",g+25).attr("class","commit-label").text(i.id),T=H.node().getBBox();if(_.attr("x",l+10-T.width/2-2).attr("y",g+13.5).attr("width",T.width+2*2).attr("height",T.height+2*2),A==="TB"&&(_.attr("x",p-(T.width+4*4+5)).attr("y",g-12),H.attr("x",p-(T.width+4*4)).attr("y",g+T.height-12)),A!=="TB"&&H.attr("x",l+10-T.width/2),m.rotateCommitLabel)if(A==="TB")H.attr("transform","rotate(-45, "+p+", "+g+")"),_.attr("transform","rotate(-45, "+p+", "+g+")");else{let B=-7.5-(T.width+10)/25*9.5,G=10+T.width/25*8.5;d.attr("transform","translate("+B+", "+G+") rotate(-45, "+l+", "+g+")")}}if(i.tag){let d=c.insert("polygon"),_=c.append("circle"),H=c.append("text").attr("y",g-16).attr("class","tag-label").text(i.tag),T=H.node().getBBox();H.attr("x",l+10-T.width/2);let B=T.height/2,G=g-19.2;d.attr("class","tag-label-bkg").attr("points",` ${l-T.width/2-4/2},${G+2} ${l-T.width/2-4/2},${G-2} ${l+10-T.width/2-4},${G-B-2} ${l+10+T.width/2+4},${G-B-2} ${l+10+T.width/2+4},${G+B+2} ${l+10-T.width/2-4},${G+B+2}`),_.attr("cx",l-T.width/2+4/2).attr("cy",G).attr("r",1.5).attr("class","tag-hole"),A==="TB"&&(d.attr("class","tag-label-bkg").attr("points",` ${p},${l+2} ${p},${l-2} ${p+10},${l-B-2} ${p+10+T.width+4},${l-B-2} ${p+10+T.width+4},${l+B+2} ${p+10},${l+B+2}`).attr("transform","translate(12,12) rotate(45, "+p+","+l+")"),_.attr("cx",p+4/2).attr("cy",l).attr("transform","translate(12,12) rotate(45, "+p+","+l+")"),H.attr("x",p+5).attr("y",l+3).attr("transform","translate(14,14) rotate(45, "+p+","+l+")"))}}l+=50,l>et&&(et=l)})},me=(r,n,o,m,a)=>{let l=(A==="TB"?o.xk.branch===l,y=k=>k.seq>r.seq&&k.seqy(k)&&h(k))},Z=(r,n,o=0)=>{let m=r+Math.abs(r-n)/2;if(o>5)return m;if(nt.every(l=>Math.abs(l-m)>=10))return nt.push(m),m;let c=Math.abs(r-n);return Z(r,n-c/5,o+1)},ue=(r,n,o,m)=>{let a=tt[n.id],c=tt[o.id],l=me(n,o,a,c,m),h="",y="",k=0,i=0,g=R[o.branch].index,p;if(l){h="A 10 10, 0, 0, 0,",y="A 10 10, 0, 0, 1,",k=10,i=10;let E=a.yc.x&&(h="A 20 20, 0, 0, 0,",y="A 20 20, 0, 0, 1,",k=20,i=20,g=R[n.branch].index,p=`M ${a.x} ${a.y} L ${a.x} ${c.y-k} ${y} ${a.x-i} ${c.y} L ${c.x} ${c.y}`),a.x===c.x&&(g=R[n.branch].index,p=`M ${a.x} ${a.y} L ${a.x+k} ${a.y} ${h} ${a.x+i} ${c.y+k} L ${c.x} ${c.y}`)):(a.yc.y&&(h="A 20 20, 0, 0, 0,",k=20,i=20,g=R[n.branch].index,p=`M ${a.x} ${a.y} L ${c.x-k} ${a.y} ${h} ${c.x} ${a.y-i} L ${c.x} ${c.y}`),a.y===c.y&&(g=R[n.branch].index,p=`M ${a.x} ${a.y} L ${a.x} ${c.y-k} ${h} ${a.x+i} ${c.y} L ${c.x} ${c.y}`));r.append("path").attr("d",p).attr("class","arrow arrow"+g%K)},pe=(r,n)=>{let o=r.append("g").attr("class","commit-arrows");Object.keys(n).forEach(m=>{let a=n[m];a.parents&&a.parents.length>0&&a.parents.forEach(c=>{ue(o,n[c],a,n)})})},fe=(r,n)=>{let o=L().gitGraph,m=r.append("g");n.forEach((a,c)=>{let l=c%K,h=R[a.name].pos,y=m.append("line");y.attr("x1",0),y.attr("y1",h),y.attr("x2",et),y.attr("y2",h),y.attr("class","branch branch"+l),A==="TB"&&(y.attr("y1",30),y.attr("x1",h),y.attr("y2",et),y.attr("x2",h)),nt.push(h);let k=a.name,i=Ht(k),g=m.insert("rect"),E=m.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+l);E.node().appendChild(i);let f=i.getBBox();g.attr("class","branchLabelBkg label"+l).attr("rx",4).attr("ry",4).attr("x",-f.width-4-(o.rotateCommitLabel===!0?30:0)).attr("y",-f.height/2+8).attr("width",f.width+18).attr("height",f.height+4),E.attr("transform","translate("+(-f.width-14-(o.rotateCommitLabel===!0?30:0))+", "+(h-f.height/2-1)+")"),A==="TB"&&(g.attr("x",h-f.width/2-10).attr("y",0),E.attr("transform","translate("+(h-f.width/2-5)+", 0)")),A!=="TB"&&g.attr("transform","translate(-19, "+(h-f.height/2)+")")})},be=function(r,n,o,m){var k;he();let a=L(),c=a.gitGraph;I.debug("in gitgraph renderer",r+` `,"id:",n,o),X=m.db.getCommits();let l=m.db.getBranchesAsObjArray();A=m.db.getDirection();let h=xt(`[id="${n}"]`),y=0;l.forEach((i,g)=>{let p=Ht(i.name),E=h.append("g"),f=E.insert("g").attr("class","branchLabel"),d=f.insert("g").attr("class","label branch-label");d.node().appendChild(p);let _=p.getBBox();R[i.name]={pos:y,index:g},y+=50+(c.rotateCommitLabel?40:0)+(A==="TB"?_.width/2:0),d.remove(),f.remove(),E.remove()}),At(h,X,!1),c.showBranches&&fe(h,l),pe(h,X),At(h,X,!0),_t.insertTitle(h,"gitTitleText",c.titleTopMargin,m.db.getDiagramTitle()),Ct(void 0,h,c.diagramPadding,(k=c.useMaxWidth)!=null?k:a.useMaxWidth)},ge={draw:be},de=r=>` .commit-id, .commit-msg, .branch-label { fill: lightgrey; color: lightgrey; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-family: var(--mermaid-font-family); } ${[0,1,2,3,4,5,6,7].map(n=>` .branch-label${n} { fill: ${r["gitBranchLabel"+n]}; } .commit${n} { stroke: ${r["git"+n]}; fill: ${r["git"+n]}; } .commit-highlight${n} { stroke: ${r["gitInv"+n]}; fill: ${r["gitInv"+n]}; } .label${n} { fill: ${r["git"+n]}; } .arrow${n} { stroke: ${r["git"+n]}; } `).join(` `)} .branch { stroke-width: 1; stroke: ${r.lineColor}; stroke-dasharray: 2; } .commit-label { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelColor};} .commit-label-bkg { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelBackground}; opacity: 0.5; } .tag-label { font-size: ${r.tagLabelFontSize}; fill: ${r.tagLabelColor};} .tag-label-bkg { fill: ${r.tagLabelBackground}; stroke: ${r.tagLabelBorder}; } .tag-hole { fill: ${r.textColor}; } .commit-merge { stroke: ${r.primaryColor}; fill: ${r.primaryColor}; } .commit-reverse { stroke: ${r.primaryColor}; fill: ${r.primaryColor}; stroke-width: 3; } .commit-highlight-outer { } .commit-highlight-inner { stroke: ${r.primaryColor}; fill: ${r.primaryColor}; } .arrow { stroke-width: 8; stroke-linecap: round; fill: none} .gitTitleText { text-anchor: middle; font-size: 18px; fill: ${r.textColor}; } `,ke=de,Re={parser:Ft,db:le,renderer:ge,styles:ke};export{Re as diagram};