md/assets/ganttDiagram-GAYIUD5S-BfoVcS_n.js

258 lines
56 KiB
JavaScript
Raw Normal View History

import{a$ as Qt,b0 as Gt,b1 as Jt,b2 as Kt,b3 as Mn,b4 as rt,b5 as Sn,aJ as Un,aK as Fn,_ as f,b6 as ee,b7 as En,b8 as In,d as _e,s as An,g as Wn,p as Yn,q as Ln,c as On,b as Nn,r as Vn,m as Hn,l as Ge,j as qe,k as Pn,e as Rn,u as zn}from"./index-CFgdrPfe.js";import{b as Bn,t as At,c as qn,a as Zn,l as Xn}from"./linear-DDncwjTN.js";import{i as jn}from"./init-Gi6I4Gst.js";function Qn(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Gn(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Jn(e){return e}var Xe=1,it=2,mt=3,Ze=4,Wt=1e-6;function Kn(e){return"translate("+e+",0)"}function $n(e){return"translate(0,"+e+")"}function er(e){return t=>+e(t)}function tr(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function nr(){return!this.__axis}function $t(e,t){var n=[],r=null,i=null,a=6,s=6,C=3,M=typeof window<"u"&&window.devicePixelRatio>1?0:.5,T=e===Xe||e===Ze?-1:1,v=e===Ze||e===it?"x":"y",I=e===Xe||e===mt?Kn:$n;function b(k){var R=r??(t.ticks?t.ticks.apply(t,n):t.domain()),A=i??(t.tickFormat?t.tickFormat.apply(t,n):Jn),te=Math.max(a,0)+C,re=t.range(),ne=+re[0]+M,Z=+re[re.length-1]+M,X=(t.bandwidth?tr:er)(t.copy(),M),$=k.selection?k.selection():k,x=$.selectAll(".domain").data([null]),N=$.selectAll(".tick").data(R,t).order(),w=N.exit(),U=N.enter().append("g").attr("class","tick"),D=N.select("line"),_=N.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),N=N.merge(U),D=D.merge(U.append("line").attr("stroke","currentColor").attr(v+"2",T*a)),_=_.merge(U.append("text").attr("fill","currentColor").attr(v,T*te).attr("dy",e===Xe?"0em":e===mt?"0.71em":"0.32em")),k!==$&&(x=x.transition(k),N=N.transition(k),D=D.transition(k),_=_.transition(k),w=w.transition(k).attr("opacity",Wt).attr("transform",function(p){return isFinite(p=X(p))?I(p+M):this.getAttribute("transform")}),U.attr("opacity",Wt).attr("transform",function(p){var W=this.parentNode.__axis;return I((W&&isFinite(W=W(p))?W:X(p))+M)})),w.remove(),x.attr("d",e===Ze||e===it?s?"M"+T*s+","+ne+"H"+M+"V"+Z+"H"+T*s:"M"+M+","+ne+"V"+Z:s?"M"+ne+","+T*s+"V"+M+"H"+Z+"V"+T*s:"M"+ne+","+M+"H"+Z),N.attr("opacity",1).attr("transform",function(p){return I(X(p)+M)}),D.attr(v+"2",T*a),_.attr(v,T*te).text(A),$.filter(nr).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===it?"start":e===Ze?"end":"middle"),$.each(function(){this.__axis=X})}return b.scale=function(k){return arguments.length?(t=k,b):t},b.ticks=function(){return n=Array.from(arguments),b},b.tickArguments=function(k){return arguments.length?(n=k==null?[]:Array.from(k),b):n.slice()},b.tickValues=function(k){return arguments.length?(r=k==null?null:Array.from(k),b):r&&r.slice()},b.tickFormat=function(k){return arguments.length?(i=k,b):i},b.tickSize=function(k){return arguments.length?(a=s=+k,b):a},b.tickSizeInner=function(k){return arguments.length?(a=+k,b):a},b.tickSizeOuter=function(k){return arguments.length?(s=+k,b):s},b.tickPadding=function(k){return arguments.length?(C=+k,b):C},b.offset=function(k){return arguments.length?(M=+k,b):M},b}function rr(e){return $t(Xe,e)}function ir(e){return $t(mt,e)}const ar=Math.PI/180,sr=180/Math.PI,Je=18,en=.96422,tn=1,nn=.82521,rn=4/29,Me=6/29,an=3*Me*Me,or=Me*Me*Me;function sn(e){if(e instanceof le)return new le(e.l,e.a,e.b,e.opacity);if(e instanceof he)return on(e);e instanceof Jt||(e=Mn(e));var t=ct(e.r),n=ct(e.g),r=ct(e.b),i=at((.2225045*t+.7168786*n+.0606169*r)/tn),a,s;return t===n&&n===r?a=s=i:(a=at((.4360747*t+.3850649*n+.1430804*r)/en),s=at((.0139322*t+.0971045*n+.7141733*r)/nn)),new le(116*i-16,500*(a-i),200*(i-s),e.opacity)}function cr(e,t,n,r){return arguments.length===1?sn(e):new le(e,t,n,r??1)}function le(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}Qt(le,cr,Gt(Kt,{brighter(e){retu
`+B.showPosition()+`
Expecting `+Be.join(", ")+", got '"+(this.terminals_[S]||S)+"'":nt="Parse error on line "+(H+1)+": Unexpected "+(S==G?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(nt,{text:B.match,token:this.terminals_[S]||S,line:B.yylineno,loc:E,expected:Be})}if(P[0]instanceof Array&&P.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+S);switch(P[0]){case 1:y.push(S),F.push(B.yytext),c.push(B.yylloc),y.push(P[1]),S=null,L=B.yyleng,o=B.yytext,H=B.yylineno,E=B.yylloc;break;case 2:if(fe=this.productions_[P[1]][1],ue.$=F[F.length-fe],ue._$={first_line:c[c.length-(fe||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(fe||1)].first_column,last_column:c[c.length-1].last_column},Y&&(ue._$.range=[c[c.length-(fe||1)].range[0],c[c.length-1].range[1]]),oe=this.performAction.apply(ue,[o,L,H,se.yy,P[1],F,c].concat(z)),typeof oe<"u")return oe;fe&&(y=y.slice(0,-1*fe*2),F=F.slice(0,-1*fe),c=c.slice(0,-1*fe)),y.push(this.productions_[P[1]][0]),F.push(ue.$),c.push(ue._$),It=d[y[y.length-2]][y[y.length-1]],y.push(It);break;case 3:return!0}}return!0},"parse")},_=function(){var W={EOF:1,parseError:f(function(h,y){if(this.yy.parser)this.yy.parser.parseError(h,y);else throw new Error(h)},"parseError"),setInput:f(function(u,h){return this.yy=h||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},"setInput"),input:f(function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var h=u.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},"input"),unput:f(function(u){var h=u.length,y=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var m=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),y.length-1&&(this.yylineno-=y.length-1);var F=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:y?(y.length===m.length?this.yylloc.first_column:0)+m[m.length-y.length].length-y[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[F[0],F[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(u){this.unput(this.match.slice(u))},"less"),pastInput:f(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(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,"")},"upcomingInput"),showPosition:f(function(){var u=this.pastInput(),h=new Array(u.length+1).join("-");return u+this.upcomingInput()+`
`+h+"^"},"showPosition"),test_match:f(function(u,h){var y,m,F;if(this.options.backtrack_lexer&&(F={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&&(F.yylloc.range=this.yylloc.range.slice(0))),m=u[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.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],y=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var c in F)this[c]=F[c];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,h,y,m;this._more||(this.yytext="",this.match="");for(var F=this._currentRules(),c=0;c<F.length;c++)if(y=this._input.match(this.rules[F[c]]),y&&(!h||y[0].length>h[0].length)){if(h=y,m=c,this.options.backtrack_lexer){if(u=this.test_match(y,F[c]),u!==!1)return u;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(u=this.test_match(h,F[m]),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})},"next"),lex:f(function(){var h=this.next();return h||this.lex()},"lex"),begin:f(function(h){this.conditionStack.push(h)},"begin"),popState:f(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(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:f(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:f(function(h){this.begin(h)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(h,y,m,F){switch(m){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return W}();D.lexer=_;function p(){this.yy={}}return f(p,"Parser"),p.prototype=D,D.Parser=p,new p}();yt.parser=yt;var Fi=yt;ee.extend(Ui);ee.extend(En);ee.extend(In);var Zt={friday:5,saturday:6},ce="",xt="",wt=void 0,Ct="",He=[],Pe=[],Dt=new Map,_t=[],et=[],Ee="",Mt="",Tn=["active","done","crit","milestone"],St=[],Re=!1,Ut=!
.mermaid-main-font {
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
}
.exclude-range {
fill: ${e.excludeBkgColor};
}
.section {
stroke: none;
opacity: 0.2;
}
.section0 {
fill: ${e.sectionBkgColor};
}
.section2 {
fill: ${e.sectionBkgColor2};
}
.section1,
.section3 {
fill: ${e.altSectionBkgColor};
opacity: 0.2;
}
.sectionTitle0 {
fill: ${e.titleColor};
}
.sectionTitle1 {
fill: ${e.titleColor};
}
.sectionTitle2 {
fill: ${e.titleColor};
}
.sectionTitle3 {
fill: ${e.titleColor};
}
.sectionTitle {
text-anchor: start;
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
}
/* Grid and axis */
.grid .tick {
stroke: ${e.gridColor};
opacity: 0.8;
shape-rendering: crispEdges;
}
.grid .tick text {
font-family: ${e.fontFamily};
fill: ${e.textColor};
}
.grid path {
stroke-width: 0;
}
/* Today line */
.today {
fill: none;
stroke: ${e.todayLineColor};
stroke-width: 2px;
}
/* Task styling */
/* Default task */
.task {
stroke-width: 2;
}
.taskText {
text-anchor: middle;
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
}
.taskTextOutsideRight {
fill: ${e.taskTextDarkColor};
text-anchor: start;
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
}
.taskTextOutsideLeft {
fill: ${e.taskTextDarkColor};
text-anchor: end;
}
/* Special case clickable */
.task.clickable {
cursor: pointer;
}
.taskText.clickable {
cursor: pointer;
fill: ${e.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideLeft.clickable {
cursor: pointer;
fill: ${e.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideRight.clickable {
cursor: pointer;
fill: ${e.taskTextClickableColor} !important;
font-weight: bold;
}
/* Specific task settings for the sections*/
.taskText0,
.taskText1,
.taskText2,
.taskText3 {
fill: ${e.taskTextColor};
}
.task0,
.task1,
.task2,
.task3 {
fill: ${e.taskBkgColor};
stroke: ${e.taskBorderColor};
}
.taskTextOutside0,
.taskTextOutside2
{
fill: ${e.taskTextOutsideColor};
}
.taskTextOutside1,
.taskTextOutside3 {
fill: ${e.taskTextOutsideColor};
}
/* Active task */
.active0,
.active1,
.active2,
.active3 {
fill: ${e.activeTaskBkgColor};
stroke: ${e.activeTaskBorderColor};
}
.activeText0,
.activeText1,
.activeText2,
.activeText3 {
fill: ${e.taskTextDarkColor} !important;
}
/* Completed task */
.done0,
.done1,
.done2,
.done3 {
stroke: ${e.doneTaskBorderColor};
fill: ${e.doneTaskBkgColor};
stroke-width: 2;
}
.doneText0,
.doneText1,
.doneText2,
.doneText3 {
fill: ${e.taskTextDarkColor} !important;
}
/* Tasks on the critical line */
.crit0,
.crit1,
.crit2,
.crit3 {
stroke: ${e.critBorderColor};
fill: ${e.critBkgColor};
stroke-width: 2;
}
.activeCrit0,
.activeCrit1,
.activeCrit2,
.activeCrit3 {
stroke: ${e.critBorderColor};
fill: ${e.activeTaskBkgColor};
stroke-width: 2;
}
.doneCrit0,
.doneCrit1,
.doneCrit2,
.doneCrit3 {
stroke: ${e.critBorderColor};
fill: ${e.doneTaskBkgColor};
stroke-width: 2;
cursor: pointer;
shape-rendering: crispEdges;
}
.milestone {
transform: rotate(45deg) scale(0.8,0.8);
}
.milestoneText {
font-style: italic;
}
.doneCritText0,
.doneCritText1,
.doneCritText2,
.doneCritText3 {
fill: ${e.taskTextDarkColor} !important;
}
.activeCritText0,
.activeCritText1,
.activeCritText2,
.activeCritText3 {
fill: ${e.taskTextDarkColor} !important;
}
.titleText {
text-anchor: middle;
font-size: 18px;
fill: ${e.titleColor||e.textColor};
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
}
`,"getStyles"),pa=ka,xa={parser:Fi,db:da,renderer:ya,styles:pa};export{xa as diagram};