nodered_cfg/node_modules/@flowfuse/node-red-dashboard/dist/assets/ganttDiagram-088dbd90-CCT2OGMU.js

267 lines
60 KiB
JavaScript
Raw Normal View History

2024-08-24 20:48:14 +02:00
import{L as Ge,M as je,R as Qe,N as Je,O as Un,P as ee,Q as Yn,T as Te,V as ve,W as nt,c as Ct,s as Fn,g as Ln,D as En,E as An,b as In,a as Wn,m as On,F as Hn,n as Nn,l as he,h as Bt,i as zn,j as Vn,A as Pn}from"./index-BPCszWWQ.js";import{b as Rn,t as Ee,c as Bn,a as Zn,l as qn}from"./linear-DUiwtY7t.js";import{i as Xn}from"./init-Gi6I4Gst.js";function Gn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function jn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Qn(t){return t}var qt=1,ne=2,de=3,Zt=4,Ae=1e-6;function Jn(t){return"translate("+t+",0)"}function $n(t){return"translate(0,"+t+")"}function Kn(t){return e=>+t(e)}function tr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function er(){return!this.__axis}function $e(t,e){var n=[],r=null,i=null,a=6,o=6,g=3,_=typeof window<"u"&&window.devicePixelRatio>1?0:.5,y=t===qt||t===Zt?-1:1,C=t===Zt||t===ne?"x":"y",Y=t===qt||t===de?Jn:$n;function w(x){var q=r??(e.ticks?e.ticks.apply(e,n):e.domain()),d=i??(e.tickFormat?e.tickFormat.apply(e,n):Qn),L=Math.max(a,0)+g,N=e.range(),H=+N[0]+_,B=+N[N.length-1]+_,Z=(e.bandwidth?tr:Kn)(e.copy(),_),j=x.selection?x.selection():x,b=j.selectAll(".domain").data([null]),I=j.selectAll(".tick").data(q,e).order(),v=I.exit(),S=I.enter().append("g").attr("class","tick"),M=I.select("line"),D=I.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),I=I.merge(S),M=M.merge(S.append("line").attr("stroke","currentColor").attr(C+"2",y*a)),D=D.merge(S.append("text").attr("fill","currentColor").attr(C,y*L).attr("dy",t===qt?"0em":t===de?"0.71em":"0.32em")),x!==j&&(b=b.transition(x),I=I.transition(x),M=M.transition(x),D=D.transition(x),v=v.transition(x).attr("opacity",Ae).attr("transform",function(p){return isFinite(p=Z(p))?Y(p+_):this.getAttribute("transform")}),S.attr("opacity",Ae).attr("transform",function(p){var W=this.parentNode.__axis;return Y((W&&isFinite(W=W(p))?W:Z(p))+_)})),v.remove(),b.attr("d",t===Zt||t===ne?o?"M"+y*o+","+H+"H"+_+"V"+B+"H"+y*o:"M"+_+","+H+"V"+B:o?"M"+H+","+y*o+"V"+_+"H"+B+"V"+y*o:"M"+H+","+_+"H"+B),I.attr("opacity",1).attr("transform",function(p){return Y(Z(p)+_)}),M.attr(C+"2",y*a),D.attr(C,y*L).text(d),j.filter(er).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===ne?"start":t===Zt?"end":"middle"),j.each(function(){this.__axis=Z})}return w.scale=function(x){return arguments.length?(e=x,w):e},w.ticks=function(){return n=Array.from(arguments),w},w.tickArguments=function(x){return arguments.length?(n=x==null?[]:Array.from(x),w):n.slice()},w.tickValues=function(x){return arguments.length?(r=x==null?null:Array.from(x),w):r&&r.slice()},w.tickFormat=function(x){return arguments.length?(i=x,w):i},w.tickSize=function(x){return arguments.length?(a=o=+x,w):a},w.tickSizeInner=function(x){return arguments.length?(a=+x,w):a},w.tickSizeOuter=function(x){return arguments.length?(o=+x,w):o},w.tickPadding=function(x){return arguments.length?(g=+x,w):g},w.offset=function(x){return arguments.length?(_=+x,w):_},w}function nr(t){return $e(qt,t)}function rr(t){return $e(de,t)}const ir=Math.PI/180,sr=180/Math.PI,jt=18,Ke=.96422,tn=1,en=.82521,nn=4/29,Mt=6/29,rn=3*Mt*Mt,ar=Mt*Mt*Mt;function sn(t){if(t instanceof st)return new st(t.l,t.a,t.b,t.opacity);if(t instanceof ft)return an(t);t instanceof Qe||(t=Un(t));var e=ae(t.r),n=ae(t.g),r=ae(t.b),i=re((.2225045*e+.7168786*n+.0606169*r)/tn),a,o;return e===n&&n===r?a=o=i:(a=re((.4360747*e+.3850649*n+.1430804*r)/Ke),o=re((.0139322*e+.0971045*n+.7141733*r)/en)),new st(116*i-16,500*(a-i),200*(i-o),t.opacity)}function or(t,e,n,r){return arguments.length===1?sn(t):new st(t,e,n,r??1)}function st(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Ge(st,or,je(Je,{brighter(t){return new st(this.l+jt*(t??1),this.a,this.
`+f.showPosition()+`
Expecting `+Rt.join(", ")+", got '"+(this.terminals_[V]||V)+"'":te="Parse error on line "+(O+1)+": Unexpected "+(V==at?"end of input":"'"+(this.terminals_[V]||V)+"'"),this.parseError(te,{text:f.match,token:this.terminals_[V]||V,line:f.yylineno,loc:u,expected:Rt})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+V);switch($[0]){case 1:T.push(V),l.push(f.yytext),s.push(f.yylloc),T.push($[1]),V=null,Q=f.yyleng,c=f.yytext,O=f.yylineno,u=f.yylloc;break;case 2:if(ct=this.productions_[$[1]][1],xt.$=l[l.length-ct],xt._$={first_line:s[s.length-(ct||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(ct||1)].first_column,last_column:s[s.length-1].last_column},J&&(xt._$.range=[s[s.length-(ct||1)].range[0],s[s.length-1].range[1]]),bt=this.performAction.apply(xt,[c,Q,O,U.yy,$[1],l,s].concat(ot)),typeof bt<"u")return bt;ct&&(T=T.slice(0,-1*ct*2),l=l.slice(0,-1*ct),s=s.slice(0,-1*ct)),T.push(this.productions_[$[1]][0]),l.push(xt.$),s.push(xt._$),Le=R[T[T.length-2]][T[T.length-1]],T.push(Le);break;case 3:return!0}}return!0}},W=function(){var F={EOF:1,parseError:function(k,T){if(this.yy.parser)this.yy.parser.parseError(k,T);else throw new Error(k)},setInput:function(h,k){return this.yy=k||this.yy||{},this._input=h,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 h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var k=h.match(/(?:\r\n?|\n).*/g);return k?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},unput:function(h){var k=h.length,T=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-k),this.offset-=k;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),T.length-1&&(this.yylineno-=T.length-1);var l=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:T?(T.length===m.length?this.yylloc.first_column:0)+m[m.length-T.length].length-T[0].length:this.yylloc.first_column-k},this.options.ranges&&(this.yylloc.range=[l[0],l[0]+this.yyleng-k]),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(h){this.unput(this.match.slice(h))},pastInput:function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var h=this.pastInput(),k=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
`+k+"^"},test_match:function(h,k){var T,m,l;if(this.options.backtrack_lexer&&(l={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&&(l.yylloc.range=this.yylloc.range.slice(0))),m=h[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+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,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(h[0].length),this.matched+=h[0],T=this.performAction.call(this,this.yy,this,k,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),T)return T;if(this._backtrack){for(var s in l)this[s]=l[s];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,k,T,m;this._more||(this.yytext="",this.match="");for(var l=this._currentRules(),s=0;s<l.length;s++)if(T=this._input.match(this.rules[l[s]]),T&&(!k||T[0].length>k[0].length)){if(k=T,m=s,this.options.backtrack_lexer){if(h=this.test_match(T,l[s]),h!==!1)return h;if(this._backtrack){k=!1;continue}else return!1}else if(!this.options.flex)break}return k?(h=this.test_match(k,l[m]),h!==!1?h:!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 k=this.next();return k||this.lex()},begin:function(k){this.conditionStack.push(k)},popState:function(){var k=this.conditionStack.length-1;return k>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(k){return k=this.conditionStack.length-1-Math.abs(k||0),k>=0?this.conditionStack[k]:"INITIAL"},pushState:function(k){this.begin(k)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(k,T,m,l){switch(m){case 0:return this.begin("open_directive"),48;case 1:return this.begin("type_directive"),49;case 2:return this.popState(),this.begin("arg_directive"),41;case 3:return this.popState(),this.popState(),51;case 4:return 50;case 5:return this.begin("acc_title"),29;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),31;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:break;case 13:break;case 14:break;case 15:return 11;case 16:break;case 17:break;case 18:break;case 19:this.begin("href");break;case 20:this.popState();break;case 21:return 46;case 22:this.begin("callbackname");break;case 23:this.popState();break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 44;case 26:this.popState();break;case 27:return 45;case 28:this.begin("click");break;case 29:this.popState();break;case 30:return 43;case 31:return 5;case 32:return 20;case 33:return 21;case 34:return 22;case 35:return 23;case 36:return 24;case 37:return 26;case 38:return 25;case 39:return 27;case 40:return 13;case 41:return 14;case 42:return 15;case 43:return 16;case 44:return 17;case 45:return 18;case 46:return 19;case 47:return"date";case 48:return 28;case 49:return"accDescription";case 50:return 34;case 51:return 36;case 52:return 37;case 53:return 41;case 54:return 7;case 55:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/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,/^(?:%[^\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,/^(?:\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:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}};return F}();p.lexer=W;function E(){this.yy={}}return E.prototype=p,p.Parser=E,new E}();ge.parser=ge
.mermaid-main-font {
font-family: "trebuchet ms", verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
.exclude-range {
fill: ${t.excludeBkgColor};
}
.section {
stroke: none;
opacity: 0.2;
}
.section0 {
fill: ${t.sectionBkgColor};
}
.section2 {
fill: ${t.sectionBkgColor2};
}
.section1,
.section3 {
fill: ${t.altSectionBkgColor};
opacity: 0.2;
}
.sectionTitle0 {
fill: ${t.titleColor};
}
.sectionTitle1 {
fill: ${t.titleColor};
}
.sectionTitle2 {
fill: ${t.titleColor};
}
.sectionTitle3 {
fill: ${t.titleColor};
}
.sectionTitle {
text-anchor: start;
// font-size: ${t.ganttFontSize};
// text-height: 14px;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
/* Grid and axis */
.grid .tick {
stroke: ${t.gridColor};
opacity: 0.8;
shape-rendering: crispEdges;
text {
font-family: ${t.fontFamily};
fill: ${t.textColor};
}
}
.grid path {
stroke-width: 0;
}
/* Today line */
.today {
fill: none;
stroke: ${t.todayLineColor};
stroke-width: 2px;
}
/* Task styling */
/* Default task */
.task {
stroke-width: 2;
}
.taskText {
text-anchor: middle;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
// .taskText:not([font-size]) {
// font-size: ${t.ganttFontSize};
// }
.taskTextOutsideRight {
fill: ${t.taskTextDarkColor};
text-anchor: start;
// font-size: ${t.ganttFontSize};
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
.taskTextOutsideLeft {
fill: ${t.taskTextDarkColor};
text-anchor: end;
// font-size: ${t.ganttFontSize};
}
/* Special case clickable */
.task.clickable {
cursor: pointer;
}
.taskText.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideLeft.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideRight.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
/* Specific task settings for the sections*/
.taskText0,
.taskText1,
.taskText2,
.taskText3 {
fill: ${t.taskTextColor};
}
.task0,
.task1,
.task2,
.task3 {
fill: ${t.taskBkgColor};
stroke: ${t.taskBorderColor};
}
.taskTextOutside0,
.taskTextOutside2
{
fill: ${t.taskTextOutsideColor};
}
.taskTextOutside1,
.taskTextOutside3 {
fill: ${t.taskTextOutsideColor};
}
/* Active task */
.active0,
.active1,
.active2,
.active3 {
fill: ${t.activeTaskBkgColor};
stroke: ${t.activeTaskBorderColor};
}
.activeText0,
.activeText1,
.activeText2,
.activeText3 {
fill: ${t.taskTextDarkColor} !important;
}
/* Completed task */
.done0,
.done1,
.done2,
.done3 {
stroke: ${t.doneTaskBorderColor};
fill: ${t.doneTaskBkgColor};
stroke-width: 2;
}
.doneText0,
.doneText1,
.doneText2,
.doneText3 {
fill: ${t.taskTextDarkColor} !important;
}
/* Tasks on the critical line */
.crit0,
.crit1,
.crit2,
.crit3 {
stroke: ${t.critBorderColor};
fill: ${t.critBkgColor};
stroke-width: 2;
}
.activeCrit0,
.activeCrit1,
.activeCrit2,
.activeCrit3 {
stroke: ${t.critBorderColor};
fill: ${t.activeTaskBkgColor};
stroke-width: 2;
}
.doneCrit0,
.doneCrit1,
.doneCrit2,
.doneCrit3 {
stroke: ${t.critBorderColor};
fill: ${t.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: ${t.taskTextDarkColor} !important;
}
.activeCritText0,
.activeCritText1,
.activeCritText2,
.activeCritText3 {
fill: ${t.taskTextDarkColor} !important;
}
.titleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.textColor} ;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
`,bs=vs,Cs={parser:Ei,db:gs,renderer:Ts,styles:bs};export{Cs as diagram};