You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
22 KiB
JavaScript

9 months ago
"use strict";exports.id=746,exports.ids=[746],exports.modules={50746:(t,e,i)=>{i.d(e,{diagram:()=>O});var n=i(15537),r=i(3896),s=i(19714),a=i(81738),l=i(26212);i(48869),i(43795),i(57581);var o=function(){var t=function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i},e=[6,8,10,11,12,14,16,17,20,21],i=[1,9],n=[1,10],r=[1,11],s=[1,12],a=[1,13],l=[1,16],o=[1,17],c={trace:function(){},yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:function(t,e,i,n,r,s,a){var l=s.length-1;switch(r){case 1:return s[l-1];case 2:case 6:case 7:this.$=[];break;case 3:s[l-1].push(s[l]),this.$=s[l-1];break;case 4:case 5:this.$=s[l];break;case 8:n.getCommonDb().setDiagramTitle(s[l].substr(6)),this.$=s[l].substr(6);break;case 9:this.$=s[l].trim(),n.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=s[l].trim(),n.getCommonDb().setAccDescription(this.$);break;case 12:n.addSection(s[l].substr(8)),this.$=s[l].substr(8);break;case 15:n.addTask(s[l],0,""),this.$=s[l];break;case 16:n.addEvent(s[l].substr(2)),this.$=s[l]}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:n,14:r,16:s,17:a,18:14,19:15,20:l,21:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:i,12:n,14:r,16:s,17:a,18:14,19:15,20:l,21:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,19]},{15:[1,20]},t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,4]),t(e,[2,9]),t(e,[2,10])],defaultActions:{},parseError:function(t,e){if(e.recoverable)this.trace(t);else{var i=Error(t);throw i.hash=e,i}},parse:function(t){var e=this,i=[0],n=[],r=[null],s=[],a=this.table,l="",o=0,c=0,h=s.slice.call(arguments,1),d=Object.create(this.lexer),u={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(u.yy[p]=this.yy[p]);d.setInput(t,u.yy),u.yy.lexer=d,u.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;s.push(y);var g=d.options&&d.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var f,m,x,b,_,k,v,w,S={};;){if(m=i[i.length-1],this.defaultActions[m]?x=this.defaultActions[m]:(null==f&&(f=function(){var t;return"number"!=typeof(t=n.pop()||d.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}()),x=a[m]&&a[m][f]),void 0===x||!x.length||!x[0]){var $="";for(_ in w=[],a[m])this.terminals_[_]&&_>2&&w.push("'"+this.terminals_[_]+"'");$=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError($,{text:d.match,token:this.terminals_[f]||f,line:d.yylineno,loc:y,expected:w})}if(x[0]instanceof Array&&x.length>1)throw Error("Parse Error: multiple actions possible at state: "+m+", token: "+f);switch(x[0]){case 1:i.push(f),r.push(d.yytext),s.push(d.yylloc),i.push(x[1]),f=null,c=d.yyleng,l=d.yytext,o=d.yylineno,y=d.yylloc;break;case 2:if(k=this.productions_[x[1]][1],S.$=r[r.length-k],S._$={first_line:s[s.length-(k||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(k||1)].first_column,last_column:s[s.length-1].last_column},g&&(S._$.range=[s[s.length-(k||1)].range[0],s[s.length-1].range[1]]),void 0!==(b=this.performAction.apply(S,[l,c,o,u.yy,x[1],r,s].concat(h))))return b;k&&(i=i.slice(0,-1*k*2),r=r.slice(0,-1*k),s=s.slice(0,-1*k)),i.push(this.productions_[x[1]][0]),r.push(S.$),s.push(S._$),v=a[i[i.length-2]][i[i.length-1]],i.push(v);brea
.section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} path {
fill: ${t["cScale"+i]};
}
.section-${i-1} text {
fill: ${t["cScaleLabel"+i]};
}
.node-icon-${i-1} {
font-size: 40px;
color: ${t["cScaleLabel"+i]};
}
.section-edge-${i-1}{
stroke: ${t["cScale"+i]};
}
.edge-depth-${i-1}{
stroke-width: ${n};
}
.section-${i-1} line {
stroke: ${t["cScaleInv"+i]} ;
stroke-width: 3;
}
.lineWrapper line{
stroke: ${t["cScaleLabel"+i]} ;
}
.disabled, .disabled circle, .disabled text {
fill: lightgray;
}
.disabled text {
fill: #efefef;
}
`}return e},O={db:w,renderer:{setConf:()=>{},draw:function(t,e,i,s){var a,l;let o;let c=(0,n.c)(),h=c.leftMargin??50;n.l.debug("timeline",s.db);let d=c.securityLevel;"sandbox"===d&&(o=(0,r.Ys)("#i"+e));let u=("sandbox"===d?(0,r.Ys)(o.nodes()[0].contentDocument.body):(0,r.Ys)("body")).select("#"+e);u.append("g");let p=s.db.getTasks(),y=s.db.getCommonDb().getDiagramTitle();n.l.debug("task",p),H.initGraphics(u);let g=s.db.getSections();n.l.debug("sections",g);let f=0,m=0,x=0,b=0,_=50+h,k=50;b=50;let v=0,w=!0;g.forEach(function(t){let e={number:v,descr:t,section:v,width:150,padding:20,maxHeight:f},i=H.getVirtualNodeHeight(u,e,c);n.l.debug("sectionHeight before draw",i),f=Math.max(f,i+20)});let S=0,$=0;for(let[t,e]of(n.l.debug("tasks.length",p.length),p.entries())){let i={number:t,descr:e,section:e.section,width:150,padding:20,maxHeight:m},r=H.getVirtualNodeHeight(u,i,c);n.l.debug("taskHeight before draw",r),m=Math.max(m,r+20),S=Math.max(S,e.events.length);let s=0;for(let t=0;t<e.events.length;t++){let i={descr:e.events[t],section:e.section,number:e.section,width:150,padding:20,maxHeight:50};s+=H.getVirtualNodeHeight(u,i,c)}$=Math.max($,s)}n.l.debug("maxSectionHeight before draw",f),n.l.debug("maxTaskHeight before draw",m),g&&g.length>0?g.forEach(t=>{let e=p.filter(e=>e.section===t),i={number:v,descr:t,section:v,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:f};n.l.debug("sectionNode",i);let r=u.append("g"),s=H.drawNode(r,i,v,c);n.l.debug("sectionNode output",s),r.attr("transform",`translate(${_}, ${b})`),k+=f+50,e.length>0&&P(u,e,v,_,k,m,c,S,$,f,!1),_+=200*Math.max(e.length,1),k=b,v++}):(w=!1,P(u,p,v,_,k,m,c,S,$,f,!0));let E=u.node().getBBox();n.l.debug("bounds",E),y&&u.append("text").text(y).attr("x",E.width/2-h).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),x=w?f+m+150:m+100,u.append("g").attr("class","lineWrapper").append("line").attr("x1",h).attr("y1",x).attr("x2",E.width+3*h).attr("y2",x).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),(0,n.o)(void 0,u,(null==(a=c.timeline)?void 0:a.padding)??50,(null==(l=c.timeline)?void 0:l.useMaxWidth)??!1)}},parser:o,styles:t=>`
.edge {
stroke-width: 3;
}
${C(t)}
.section-root rect, .section-root path, .section-root circle {
fill: ${t.git0};
}
.section-root text {
fill: ${t.gitBranchLabel0};
}
.icon-container {
height:100%;
display: flex;
justify-content: center;
align-items: center;
}
.edge {
fill: none;
}
.eventWrapper {
filter: brightness(120%);
}
`}}};