121 lines
30 KiB
JavaScript
Raw Permalink Normal View History

2026-05-31 13:21:13 +02:00
import{a as kt}from"./chunk-LRIF4GLE.mjs";import{n as bt}from"./chunk-QA3QBVWF.mjs";import"./chunk-KNLZD3CH.mjs";import{P as J,S as yt,Z as xt,_ as Q,d as gt,e as ft,f as mt,t as it}from"./chunk-67TQ5CYL.mjs";import{F as st,b as w,h as j}from"./chunk-7W6UQGC5.mjs";import{a as s,c as Xt}from"./chunk-AQ6EADP3.mjs";var at=(function(){var e=s(function(b,i,d,l){for(d=d||{},l=b.length;l--;d[b[l]]=i);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],a=[1,13],r=[1,14],h=[1,15],c=[1,16],o=[1,19],f=[1,20],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:s(function(i,d,l,p,y,u,v){var k=u.length-1;switch(y){case 1:return u[k-1];case 3:p.setDirection("LR");break;case 4:p.setDirection("TD");break;case 5:this.$=[];break;case 6:u[k-1].push(u[k]),this.$=u[k-1];break;case 7:case 8:this.$=u[k];break;case 9:case 10:this.$=[];break;case 11:p.getCommonDb().setDiagramTitle(u[k].substr(6)),this.$=u[k].substr(6);break;case 12:this.$=u[k].trim(),p.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[k].trim(),p.getCommonDb().setAccDescription(this.$);break;case 15:p.addSection(u[k].substr(8)),this.$=u[k].substr(8);break;case 18:p.addTask(u[k],0,""),this.$=u[k];break;case 19:p.addEvent(u[k].substr(2)),this.$=u[k];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:a,17:r,19:h,20:c,21:17,22:18,23:o,24:f},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:a,17:r,19:h,20:c,21:17,22:18,23:o,24:f},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:s(function(i,d){if(d.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=d,l}},"parseError"),parse:s(function(i){var d=this,l=[0],p=[],y=[null],u=[],v=this.table,k="",H=0,V=0,R=0,O=2,L=1,C=u.slice.call(arguments,1),T=Object.create(this.lexer),B={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(B.yy[P]=this.yy[P]);T.setInput(i,B.yy),B.yy.lexer=T,B.yy.parser=this,typeof T.yylloc>"u"&&(T.yylloc={});var D=T.yylloc;u.push(D);var $=T.options&&T.options.ranges;typeof B.yy.parseError=="function"?this.parseError=B.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _(W){l.length=l.length-2*W,y.length=y.length-W,u.length=u.length-W}s(_,"popStack");function E(){var W;return W=p.pop()||T.lex()||L,typeof W!="number"&&(W instanceof Array&&(p=W,W=p.pop()),W=d.symbols_[W]||W),W}s(E,"lex");for(var S,I,A,N,nt,X,z={},Z,F,pt,q;;){if(A=l[l.length-1],this.defaultActions[A]?N=this.defaultActions[A]:((S===null||typeof S>"u")&&(S=E()),N=v[A]&&v[A][S]),typeof N>"u"||!N.length||!N[0]){var rt="";q=[];for(Z in v[A])this.terminals_[Z]&&Z>O&&q.push("'"+this.terminals_[Z]+"'");T.showPosition?rt="Parse error on line "+(H+1)+`:
`+T.showPosition()+`
Expecting `+q.join(", ")+", got '"+(this.terminals_[S]||S)+"'":rt="Parse error on line "+(H+1)+": Unexpected "+(S==L?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(rt,{text:T.match,token:this.terminals_[S]||S,line:T.yylineno,loc:D,expected:q})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+S);switch(N[0]){case 1:l.push(S),y.push(T.yytext),u.push(T.yylloc),l.push(N[1]),S=null,I?(S=I,I=null):(V=T.yyleng,k=T.yytext,H=T.yylineno,D=T.yylloc,R>0&&R--);break;case 2:if(F=this.productions_[N[1]][1],z.$=y[y.length-F],z._$={first_line:u[u.length-(F||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(F||1)].first_column,last_column:u[u.length-1].last_column},$&&(z._$.range=[u[u.length-(F||1)].range[0],u[u.length-1].range[1]]),X=this.performAction.apply(z,[k,V,H,B.yy,N[1],y,u].concat(C)),typeof X<"u")return X;F&&(l=l.slice(0,-1*F*2),y=y.slice(0,-1*F),u=u.slice(0,-1*F)),l.push(this.productions_[N[1]][0]),y.push(z.$),u.push(z._$),pt=v[l[l.length-2]][l[l.length-1]],l.push(pt);break;case 3:return!0}}return!0},"parse")},x=(function(){var b={EOF:1,parseError:s(function(d,l){if(this.yy.parser)this.yy.parser.parseError(d,l);else throw new Error(d)},"parseError"),setInput:s(function(i,d){return this.yy=d||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var d=i.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var d=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var y=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:l?(l.length===p.length?this.yylloc.first_column:0)+p[p.length-l.length].length-l[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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},"reject"),less:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),d=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
`+d+"^"},"showPosition"),test_match:s(function(i,d){var l,p,y;if(this.options.backtrack_lexer&&(y={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&&(y.yylloc.range=this.yylloc.range.slice(0))),p=i[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],l=this.performAction.call(this,this.yy,this,d,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var u in y)this[u]=y[u];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,d,l,p;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),u=0;u<y.length;u++)if(l=this._input.match(this.rules[y[u]]),l&&(!d||l[0].length>d[0].length)){if(d=l,p=u,this.options.backtrack_lexer){if(i=this.test_match(l,y[u]),i!==!1)return i;if(this._backtrack){d=!1;continue}else return!1}else if(!this.options.flex)break}return d?(i=this.test_match(d,y[p]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var d=this.next();return d||this.lex()},"lex"),begin:s(function(d){this.conditionStack.push(d)},"begin"),popState:s(function(){var d=this.conditionStack.length-1;return d>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},"topState"),pushState:s(function(d){this.begin(d)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(d,l,p,y){var u=y;switch(p){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;break;case 10:return this.popState(),"acc_title_value";break;case 11:return this.begin("acc_descr"),17;break;case 12:return this.popState(),"acc_descr_value";break;case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\b)/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,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}};return b})();g.lexer=x;function m(){this.yy={}}return s(m,"Parser"),m.prototype=g,g.Parser=m,new m})();at.parser=at;var _t=at;var lt={};Xt(lt,{addEvent:()=>Lt,addSection:()=>Nt,addTask:()=>Mt,addTaskOrg:()=>At,clear:()=>Tt,default:()=>Zt,getCommonDb:()=>St,getDirection:()=>$t,getSections:()=>Ht,getTasks:()=>It,setDirection:()=>Et});var K="",vt=0,ot="LR",ct=[],Y=[],U=[],St=s(()=>xt,"getCommonDb"),Tt=s(function(){ct.length=0,Y.length=0,K="",U.length=0,ot="LR",yt()},"clear"),Et=s(function(e){ot=e},"setDirection"),$t=s(function(){return ot},"getDirection"),Nt=s(function(e){K=e,ct.push(e)},"addSection"),Ht=s(function(){return ct},"getSections"),It=s(function(){let e=wt(),t=100,n=0;for(;!e&&n<t;)e=wt(),n++;return Y.push(...U),Y},"getTasks"),Mt=s(function(e,t,n){let a={id:vt++,section:K,type:K,task:e,score:t||0,events:n?[n]:[]};U.push(a)},"addTask"),Lt=s(function(e){U.find(n=>n.id===vt-1).events.push(e)},"addEvent"),At=s(function(e){let t={section:K,type:K,description:e,task:e,classes:[]};Y.push(t)},"addTaskOrg"),wt=s(function(){let e=s(function(n){return U[n].processed},"compileTask"),t=!0;for(let[n,a]of U.entries())e(n),t=t&&a.processed;return t},"compileTasks"),Zt={clear:Tt,getCommonDb:St,getDirection:$t,setDirection:Et,addSection:Nt,getSections:Ht,getTasks:It,addTask:Mt,addTaskOrg:At,addEvent:Lt};var Bt=0,tt=s(function(e,t){let n=e.append("rect");return n.attr("x",t.x),n.attr("y",t.y),n.attr("fill",t.fill),n.attr("stroke",t.stroke),n.attr("width",t.width),n.attr("height",t.height),n.attr("rx",t.rx),n.attr("ry",t.ry),t.class!==void 0&&n.attr("class",t.class),n},"drawRect"),qt=s(function(e,t){let a=e.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),r=e.append("g");r.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).
.section-${o-1} rect,
.section-${o-1} path,
.section-${o-1} circle {
fill: ${n&&a?e.mainBkg:g};
stroke: ${x};
stroke-width: ${e.strokeWidth};
filter: ${h};
}
.section-${o-1} text {
fill: ${e.nodeBorder};
font-weight: ${e.fontWeight}
}
.node-icon-${o-1} {
font-size: 40px;
color: ${e["cScaleLabel"+o]};
}
.section-edge-${o-1} {
stroke: ${e["cScale"+o]};
}
.edge-depth-${o-1} {
stroke-width: ${f};
}
.section-${o-1} line {
stroke: ${e["cScaleInv"+o]};
stroke-width: 3;
}
.lineWrapper line {
stroke: ${e.nodeBorder};
stroke-width:${e.strokeWidth}
}
.disabled,
.disabled circle,
.disabled text {
fill: ${e.tertiaryColor??"lightgray"};
}
.disabled text {
fill: ${e.clusterBorder??"#efefef"};
}
`}return c},"genReduxSections"),fe=s(e=>{let t="";for(let n=0;n<e.THEME_COLOR_LIMIT;n++)e["lineColor"+n]=e["lineColor"+n]||e["cScaleInv"+n],gt(e["lineColor"+n])?e["lineColor"+n]=ft(e["lineColor"+n],20):e["lineColor"+n]=mt(e["lineColor"+n],20);for(let n=0;n<e.THEME_COLOR_LIMIT;n++){let a=""+(17-3*n);t+=`
.section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} path {
fill: ${e["cScale"+n]};
}
.section-${n-1} text {
fill: ${e["cScaleLabel"+n]};
}
.node-icon-${n-1} {
font-size: 40px;
color: ${e["cScaleLabel"+n]};
}
.section-edge-${n-1}{
stroke: ${e["cScale"+n]};
}
.edge-depth-${n-1}{
stroke-width: ${a};
}
.section-${n-1} line {
stroke: ${e["cScaleInv"+n]} ;
stroke-width: 3;
}
.lineWrapper line{
stroke: ${e["cScaleLabel"+n]} ;
}
.disabled, .disabled circle, .disabled text {
fill: ${e.tertiaryColor??"lightgray"};
}
.disabled text {
fill: ${e.clusterBorder??"#efefef"};
}
`}return t},"genSections"),me=s(e=>{let{theme:t}=it(),n=t?.includes("redux"),a=t==="neutral",r=e.svgId?.replace(/^#/,"")??"",h="";if(e.useGradient&&r&&e.THEME_COLOR_LIMIT&&!a)for(let c=0;c<e.THEME_COLOR_LIMIT;c++)h+=`
.section-${c-1}[data-look="neo"] rect,
.section-${c-1}[data-look="neo"] path,
.section-${c-1}[data-look="neo"] circle {
fill: ${e.mainBkg};
stroke: url(#${r}-gradient);
stroke-width: 2;
}
.section-${c-1}[data-look="neo"] line {
stroke: url(#${r}-gradient);
stroke-width: 2;
}`;return`
.edge {
stroke-width: 3;
}
${n?ge(e):fe(e)}
${h}
.section-root rect, .section-root path, .section-root circle {
fill: ${e.git0};
}
.section-root text {
fill: ${e.gitBranchLabel0};
}
.icon-container {
height:100%;
display: flex;
justify-content: center;
align-items: center;
}
.edge {
fill: none;
}
.eventWrapper {
filter: brightness(120%);
}
`},"getStyles"),Ut=me;var ye={setConf:s(()=>{},"setConf"),draw:s((e,t,n,a)=>(a?.db?.getDirection?.()??"LR")==="TD"?Kt.draw(e,t,n,a):Pt.draw(e,t,n,a),"draw")},Ue={db:lt,renderer:ye,parser:_t,styles:Ut};export{Ue as diagram};