ruru
Version:
Grafast-flavoured GraphiQL distribution
2 lines • 31.8 kB
JavaScript
export const __webpack_esm_id__=7394;export const __webpack_esm_ids__=[7394];export const __webpack_esm_modules__={67394(t,e,n){n.r(e),n.d(e,{diagram:()=>lt});var a=n(64342),i=n(70848),r=n(39989),s=n(27166),o=n(79456),c=n(79806),l=n(1942),h=n(47964),d=n(87708),g=function(){var t=(0,o.__name)(function(t,e,n,a){for(n=n||{},a=t.length;a--;n[t[a]]=e);return n},"o"),e=[6,11,13,14,15,17,19,20,23,24],n=[1,12],a=[1,13],i=[1,14],r=[1,15],s=[1,16],c=[1,19],l=[1,20],h={trace:(0,o.__name)(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:(0,o.__name)(function(t,e,n,a,i,r,s){var o=r.length-1;switch(i){case 1:return r[o-1];case 3:a.setDirection("LR");break;case 4:a.setDirection("TD");break;case 5:case 9:case 10:this.$=[];break;case 6:r[o-1].push(r[o]),this.$=r[o-1];break;case 7:case 8:this.$=r[o];break;case 11:a.getCommonDb().setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 12:this.$=r[o].trim(),a.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=r[o].trim(),a.getCommonDb().setAccDescription(this.$);break;case 15:a.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 18:a.addTask(r[o],0,""),this.$=r[o];break;case 19:a.addEvent(r[o].substr(2)),this.$=r[o]}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},t(e,[2,5],{5:6}),t(e,[2,2]),t(e,[2,3]),t(e,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:a,17:i,19:r,20:s,21:17,22:18,23:c,24:l},t(e,[2,10],{1:[2,1]}),t(e,[2,6]),{12:21,14:n,15:a,17:i,19:r,20:s,21:17,22:18,23:c,24:l},t(e,[2,8]),t(e,[2,9]),t(e,[2,11]),{16:[1,22]},{18:[1,23]},t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,7]),t(e,[2,12]),t(e,[2,13])],defaultActions:{},parseError:(0,o.__name)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,o.__name)(function(t){var e=this,n=[0],a=[],i=[null],r=[],s=this.table,c="",l=0,h=0,d=0,g=r.slice.call(arguments,1),u=Object.create(this.lexer),p={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(p.yy[m]=this.yy[m]);u.setInput(t,p.yy),p.yy.lexer=u,p.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var _=u.yylloc;r.push(_);var y=u.options&&u.options.ranges;function f(){var t;return"number"!=typeof(t=a.pop()||u.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.__name)(function(t){n.length=n.length-2*t,i.length=i.length-t,r.length=r.length-t},"popStack"),(0,o.__name)(f,"lex");for(var x,b,k,w,$,v,S,E,T,I={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=f()),w=s[k]&&s[k][x]),void 0===w||!w.length||!w[0]){var M;for(v in T=[],s[k])this.terminals_[v]&&v>2&&T.push("'"+this.terminals_[v]+"'");M=u.showPosition?"Parse error on line "+(l+1)+":\n"+u.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(M,{text:u.match,token:this.terminals_[x]||x,line:u.yylineno,loc:_,expected:T})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(u.yytext),r.push(u.yylloc),n.push(w[1]),x=null,b?(x=b,b=null):(h=u.yyleng,c=u.yytext,l=u.yylineno,_=u.yylloc,d>0&&d--);break;case 2:if(S=this.productions_[w[1]][1],I.$=i[i.length-S],I._$={first_line:r[r.length-(S||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(S||1)].first_column,last_column:r[r.length-1].last_column},y&&(I._$.range=[r[r.length-(S||1)].range[0],r[r.length-1].range[1]]),void 0!==($=this.performAction.apply(I,[c,h,l,p.yy,w[1],i,r].concat(g))))return $;S&&(n=n.slice(0,-1*S*2),i=i.slice(0,-1*S),r=r.slice(0,-1*S)),n.push(this.productions_[w[1]][0]),i.push(I.$),r.push(I._$),E=s[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0},"parse")},d=function(){return{EOF:1,parseError:(0,o.__name)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,o.__name)(function(t,e){return this.yy=e||this.yy||{},this._input=t,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:(0,o.__name)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,o.__name)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=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),n.length-1&&(this.yylineno-=n.length-1);var i=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:n?(n.length===a.length?this.yylloc.first_column:0)+a[a.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.__name)(function(){return this._more=!0,this},"more"),reject:(0,o.__name)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,o.__name)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.__name)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,o.__name)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,o.__name)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,o.__name)(function(t,e){var n,a,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in i)this[r]=i[r];return!1}return!1},"test_match"),next:(0,o.__name)(function(){if(this.done)return this.EOF;var t,e,n,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),r=0;r<i.length;r++)if((n=this._input.match(this.rules[i[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,a=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,o.__name)(function(){return this.next()||this.lex()},"lex"),begin:(0,o.__name)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.__name)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.__name)(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:(0,o.__name)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.__name)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.__name)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.__name)(function(t,e,n,a){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 13;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;case 10:return this.popState(),"acc_title_value";case 11:return this.begin("acc_descr"),17;case 12:return this.popState(),"acc_descr_value";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}}}}();function g(){this.yy={}}return h.lexer=d,(0,o.__name)(g,"Parser"),g.prototype=h,h.Parser=g,new g}();g.parser=g;var u=g,p={};(0,o.__export)(p,{addEvent:()=>M,addSection:()=>S,addTask:()=>I,addTaskOrg:()=>C,clear:()=>w,default:()=>L,getCommonDb:()=>k,getDirection:()=>v,getSections:()=>E,getTasks:()=>T,setDirection:()=>$});var m="",_=0,y="LR",f=[],x=[],b=[],k=(0,o.__name)(()=>r.commonDb_exports,"getCommonDb"),w=(0,o.__name)(function(){f.length=0,x.length=0,m="",b.length=0,y="LR",(0,r.clear)()},"clear"),$=(0,o.__name)(function(t){y=t},"setDirection"),v=(0,o.__name)(function(){return y},"getDirection"),S=(0,o.__name)(function(t){m=t,f.push(t)},"addSection"),E=(0,o.__name)(function(){return f},"getSections"),T=(0,o.__name)(function(){let t=H(),e=0;for(;!t&&e<100;)t=H(),e++;return x.push(...b),x},"getTasks"),I=(0,o.__name)(function(t,e,n){const a={id:_++,section:m,type:m,task:t,score:e||0,events:n?[n]:[]};b.push(a)},"addTask"),M=(0,o.__name)(function(t){b.find(t=>t.id===_-1).events.push(t)},"addEvent"),C=(0,o.__name)(function(t){const e={section:m,type:m,description:t,task:t,classes:[]};x.push(e)},"addTaskOrg"),H=(0,o.__name)(function(){const t=(0,o.__name)(function(t){return b[t].processed},"compileTask");let e=!0;for(const[n,a]of b.entries())t(n),e=e&&a.processed;return e},"compileTasks"),L={clear:w,getCommonDb:k,getDirection:v,setDirection:$,addSection:S,getSections:E,getTasks:T,addTask:I,addTaskOrg:C,addEvent:M},N=0,D=(0,o.__name)(function(t,e){const n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},"drawRect"),O=(0,o.__name)(function(t,e){const n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),a=t.append("g");function i(t){const n=(0,c.arc)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function r(t){const n=(0,c.arc)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function s(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return a.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),a.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,o.__name)(i,"smile"),(0,o.__name)(r,"sad"),(0,o.__name)(s,"ambivalent"),e.score>3?i(a):e.score<3?r(a):s(a),n},"drawFace"),A=(0,o.__name)(function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},"drawCircle"),B=(0,o.__name)(function(t,e){const n=e.text.replace(/<br\s*\/?>/gi," "),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.attr("class","legend"),a.style("text-anchor",e.anchor),void 0!==e.class&&a.attr("class",e.class);const i=a.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(n),a},"drawText"),R=(0,o.__name)(function(t,e){function n(t,e,n,a,i){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+a-i)+" "+(t+n-1.2*i)+","+(e+a)+" "+t+","+(e+a)}(0,o.__name)(n,"genPoints");const a=t.append("polygon");a.attr("points",n(e.x,e.y,50,20,7)),a.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,B(t,e)},"drawLabel"),P=(0,o.__name)(function(t,e,n){const a=t.append("g"),i=V();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width,i.height=n.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,D(a,i),G(n)(e.text,a,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},n,e.colour)},"drawSection"),W=-1,F=(0,o.__name)(function(t,e,n,a){const i=e.x+n.width/2,r=t.append("g");W++,r.append("line").attr("id",a+"-task"+W).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),O(r,{cx:i,cy:300+30*(5-e.score),score:e.score});const s=V();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=n.width,s.height=n.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,D(r,s),G(n)(e.task,r,s.x,s.y,s.width,s.height,{class:"task"},n,e.colour)},"drawTask"),j=(0,o.__name)(function(t,e){D(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),z=(0,o.__name)(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),V=(0,o.__name)(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),G=function(){function t(t,e,n,i,r,s,o,c){a(e.append("text").attr("x",n+r/2).attr("y",i+s/2+5).style("font-color",c).style("text-anchor","middle").text(t),o)}function e(t,e,n,i,r,s,o,c,l){const{taskFontSize:h,taskFontFamily:d}=c,g=t.split(/<br\s*\/?>/gi);for(let t=0;t<g.length;t++){const c=t*h-h*(g.length-1)/2,u=e.append("text").attr("x",n+r/2).attr("y",i).attr("fill",l).style("text-anchor","middle").style("font-size",h).style("font-family",d);u.append("tspan").attr("x",n+r/2).attr("dy",c).text(g[t]),u.attr("y",i+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),a(u,o)}}function n(t,n,i,r,s,o,c,l){const h=n.append("switch"),d=h.append("foreignObject").attr("x",i).attr("y",r).attr("width",s).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,i,r,s,o,c,l),a(d,c)}function a(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return(0,o.__name)(t,"byText"),(0,o.__name)(e,"byTspan"),(0,o.__name)(n,"byFo"),(0,o.__name)(a,"_setTextAttrs"),function(a){return"fo"===a.textPlacement?n:"old"===a.textPlacement?t:e}}(),U=(0,o.__name)(function(t,e){N=0,W=-1,t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");function Z(t,e){t.each(function(){var t,n=(0,c.select)(this),a=n.text().split(/(\s+|<br>)/).reverse(),i=[],r=n.attr("y"),s=parseFloat(n.attr("dy")),o=n.text(null).append("tspan").attr("x",0).attr("y",r).attr("dy",s+"em");for(let s=0;s<a.length;s++)t=a[a.length-1-s],i.push(t),o.text(i.join(" ").trim()),(o.node().getComputedTextLength()>e||"<br>"===t)&&(i.pop(),o.text(i.join(" ").trim()),i="<br>"===t?[""]:[t],o=n.append("tspan").attr("x",0).attr("y",r).attr("dy","1.1em").text(t))})}(0,o.__name)(Z,"wrap");var q=(0,o.__name)(function(t,e,n,a,i,r=!1){const{theme:s,look:o}=a,l=s?.includes("redux"),h=n%(a?.themeVariables?.THEME_COLOR_LIMIT??12)-1,d=t.append("g");e.section=h,d.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+h);const g=d.append("g"),u=d.append("g"),p=u.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(Z,e.width).node().getBBox(),m=a.fontSize?.replace?a.fontSize.replace("px",""):a.fontSize;if(e.height=p.height+1.1*m*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,u.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),l&&u.attr("transform",`translate(${e.width/2}, ${r?e.padding/2+3:e.padding})`),X(g,e,h,i,a),"neo"===o&&(d.attr("data-look","neo"),l)){const e=s.includes("dark"),n=t.node()?.ownerSVGElement??t.node(),a=(0,c.select)(n),i=a.attr("id")??"",r=i?`${i}-drop-shadow`:"drop-shadow";if(a.select(`#${r}`).empty()){const t=a.select("defs");(t.empty()?a.append("defs"):t).append("filter").attr("id",r).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",e?"0.2":"0.06").attr("flood-color",e?"#FFFFFF":"#000000")}}return e},"drawNode"),Y=(0,o.__name)(function(t,e,n){const a=t.append("g"),i=a.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(Z,e.width).node().getBBox(),r=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return a.remove(),i.height+1.1*r*.5+e.padding},"getVirtualNodeHeight"),X=(0,o.__name)(function(t,e,n,a,i){const{theme:r}=i,s=r?.includes("redux")?0:5,o=s>0?`M0 ${e.height-5} v${10-e.height} q0,-${s},${s},-${s} h${e.width-10} q${s},0,${s},${s} v${e.height-5} H0 Z`:`M0 ${e.height-5} v${-(e.height-5)} h${e.width} v${e.height} H0 Z`;t.append("path").attr("id",a+"-node-"+N++).attr("class","node-bkg node-"+e.type).attr("d",o),r?.includes("redux")||t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),J={drawRect:D,drawCircle:A,drawSection:P,drawText:B,drawLabel:R,drawTask:F,drawBackgroundRect:j,getTextObj:z,getNoteRect:V,initGraphics:U,drawNode:q,getVirtualNodeHeight:Y},K=(0,o.__name)(function(t,e,n,a){const i=(0,r.getConfig2)(),{look:o,theme:l,themeVariables:h}=i,{useGradient:d,gradientStart:g,gradientStop:u}=h,p=i.timeline?.leftMargin??50;s.log.debug("timeline",a.db);const m=i.securityLevel;let _;"sandbox"===m&&(_=(0,c.select)("#i"+e));const y=("sandbox"===m?(0,c.select)(_.nodes()[0].contentDocument.body):(0,c.select)("body")).select("#"+e);y.append("g");const f=a.db.getTasks(),x=a.db.getCommonDb().getDiagramTitle();s.log.debug("task",f),J.initGraphics(y,e);const b=a.db.getSections();s.log.debug("sections",b);let k=0,w=0,$=0,v=0,S=50+p,E=50;v=50;let T=0,I=!0;b.forEach(function(t){const e={number:T,descr:t,section:T,width:150,padding:20,maxHeight:k},n=J.getVirtualNodeHeight(y,e,i);s.log.debug("sectionHeight before draw",n),k=Math.max(k,n+20)});let M=0,C=0;s.log.debug("tasks.length",f.length);for(const[t,e]of f.entries()){const n={number:t,descr:e,section:e.section,width:150,padding:20,maxHeight:w},a=J.getVirtualNodeHeight(y,n,i);s.log.debug("taskHeight before draw",a),w=Math.max(w,a+20),M=Math.max(M,e.events.length);let r=0;for(const t of e.events){const n={descr:t,section:e.section,number:e.section,width:150,padding:20,maxHeight:50};r+=J.getVirtualNodeHeight(y,n,i)}e.events.length>0&&(r+=10*(e.events.length-1)),C=Math.max(C,r)}s.log.debug("maxSectionHeight before draw",k),s.log.debug("maxTaskHeight before draw",w),b&&b.length>0?b.forEach(t=>{const n=f.filter(e=>e.section===t),a={number:T,descr:t,section:T,width:200*Math.max(n.length,1)-50,padding:20,maxHeight:k};s.log.debug("sectionNode",a);const r=y.append("g"),o=J.drawNode(r,a,T,i,e);s.log.debug("sectionNode output",o),r.attr("transform",`translate(${S}, 50)`),E+=k+50,n.length>0&&Q(y,n,T,S,E,w,i,M,C,k,!1,e),S+=200*Math.max(n.length,1),E=50,T++}):(I=!1,Q(y,f,T,S,E,w,i,M,C,k,!0,e));const H=y.node().getBBox();if(s.log.debug("bounds",H),x&&y.append("text").text(x).attr("x","neo"===o?2*H.x+p:H.width/2-p).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),$=I?k+w+150:w+100,y.append("g").attr("class","lineWrapper").append("line").attr("x1",p).attr("y1",$).attr("x2",H.width+3*p).attr("y2",$).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${e}-arrowhead)`),"neo"===o&&d&&"neutral"!==l){const t=y.select("defs"),e=(t.empty()?y.append("defs"):t).append("linearGradient").attr("id",y.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");e.append("stop").attr("offset","0%").attr("stop-color",g).attr("stop-opacity",1),e.append("stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}(0,r.setupGraphViewbox)(void 0,y,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),Q=(0,o.__name)(function(t,e,n,a,i,r,o,c,l,h,d,g){for(const c of e){const e={descr:c.task,section:n,number:n,width:150,padding:20,maxHeight:r};s.log.debug("taskNode",e);const h=t.append("g").attr("class","taskWrapper"),u=J.drawNode(h,e,n,o,g).height;if(s.log.debug("taskHeight after draw",u),h.attr("transform",`translate(${a}, ${i})`),r=Math.max(r,u),c.events){const e=t.append("g").attr("class","lineWrapper");let s=r;i+=100,s+=tt(t,c.events,n,a,i,o,g),i-=100,e.append("line").attr("x1",a+95).attr("y1",i+r).attr("x2",a+95).attr("y2",i+r+100+l+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${g}-arrowhead)`).attr("stroke-dasharray","5,5")}a+=200,d&&!o.timeline?.disableMulticolor&&n++}i-=10},"drawTasks"),tt=(0,o.__name)(function(t,e,n,a,i,r,o){let c=0;const l=i;i+=100;for(const l of e){const e={descr:l,section:n,number:n,width:150,padding:20,maxHeight:50};s.log.debug("eventNode",e);const h=t.append("g").attr("class","eventWrapper"),d=J.drawNode(h,e,n,r,o,!0).height;c+=d,h.attr("transform",`translate(${a}, ${i})`),i=i+10+d}return i=l,c},"drawEvents"),et={setConf:(0,o.__name)(()=>{},"setConf"),draw:K},nt=(0,o.__name)(function(t,e,n,o){const c=(0,r.getConfig2)(),l=c.timeline?.leftMargin??50;s.log.debug("timeline",o.db);const h=(0,a.selectSvgElement)(e);h.append("g");const d=o.db.getTasks(),g=o.db.getCommonDb().getDiagramTitle();s.log.debug("task",d),J.initGraphics(h);const u=o.db.getSections();s.log.debug("sections",u);let p=0,m=0;const _=50+l;let y=50;const f=y,x=_+230;let b=0;const k=u&&u.length>0,w=k?x:_+230,$=Math.max(50,580);u.forEach(function(t){const e={number:b,descr:t,section:b,width:$,padding:5,maxHeight:p},n=J.getVirtualNodeHeight(h,e,c);s.log.debug("sectionHeight before draw",n),p=Math.max(p,n)});let v=0;s.log.debug("tasks.length",d.length);for(const[t,e]of d.entries()){const n={number:t,descr:e,section:e.section,width:200,padding:5,maxHeight:m},a=J.getVirtualNodeHeight(h,n,c);s.log.debug("taskHeight before draw",a),m=Math.max(m,a);let i=0;for(const t of e.events){const n={descr:t,section:e.section,number:e.section,width:300,padding:5,maxHeight:50};i+=J.getVirtualNodeHeight(h,n,c)}e.events.length>0&&(i+=10*(e.events.length-1)),v=Math.max(v,i)+0}s.log.debug("maxSectionHeight before draw",p),s.log.debug("maxTaskHeight before draw",m);const S=Math.max(m,v)+30;k?u.forEach(t=>{const e=d.filter(e=>e.section===t),n={number:b,descr:t,section:b,width:$,padding:5,maxHeight:p};s.log.debug("sectionNode",n);const a=h.append("g"),i=J.drawNode(a,n,b,c);s.log.debug("sectionNode output",i);const r=w-230;a.attr("transform",`translate(${r}, ${y})`);const o=y+i.height+20;e.length>0&&at(h,e,b,w,o,m,c,S,!1);const l=e.length,g=i.height+20+S*Math.max(l,1)-(l>0?60:0);y+=g,b++}):at(h,d,b,w,y,m,c,S,!0);let E=h.node()?.getBBox();if(!E)throw new Error("bbox not found");if(s.log.debug("bounds",E),g){if(h.append("text").text(g).attr("x",E.width/2-l).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),E=h.node()?.getBBox(),!E)throw new Error("bbox not found");s.log.debug("bounds after title",E)}const[T]=(0,i.parseFontSize)(c.fontSize),I=2*(T??16),M=.5*(T??16)+20,C=h.append("g").attr("class","lineWrapper");C.append("line").attr("x1",w).attr("y1",f-I).attr("x2",w).attr("y2",E.y+E.height+M).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),C.lower(),(0,r.setupGraphViewbox)(void 0,h,c.timeline?.padding??50,c.timeline?.useMaxWidth??!1)},"draw"),at=(0,o.__name)(function(t,e,n,a,i,r,o,c,l){for(const h of e){const e={descr:h.task,section:n,number:n,width:200,padding:5,maxHeight:r};s.log.debug("taskNode",e);const d=t.append("g").attr("class","taskWrapper"),g=J.drawNode(d,e,n,o),u=g.height;s.log.debug("taskHeight after draw",u);const p=a-20-g.width;if(d.attr("transform",`translate(${p}, ${i})`),r=Math.max(r,u),h.events&&h.events.length>0){const e=i,r=a+50;it(t,h.events,n,a,r,e,o)}i+=c,l&&!o.timeline?.disableMulticolor&&n++}},"drawTasks"),it=(0,o.__name)(function(t,e,n,a,i,r,o){let c=r;for(const r of e){const e={descr:r,section:n,number:n,width:300,padding:5,maxHeight:0};s.log.debug("eventNode",e);const l=t.append("g").attr("class","eventWrapper"),h=J.drawNode(l,e,n,o).height;l.attr("transform",`translate(${i}, ${c})`);const d=c+h/2;t.append("g").attr("class","lineWrapper").append("line").attr("x1",a).attr("y1",d).attr("x2",i).attr("y2",d).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),c=c+h+10}return c-r},"drawEvents"),rt={setConf:(0,o.__name)(()=>{},"setConf"),draw:nt},st=(0,o.__name)(t=>{const{theme:e}=(0,r.getConfig)(),n=e?.includes("dark"),a=e?.includes("color"),i=t.svgId?.replace(/^#/,"")??"",s=i?`url(#${i}-drop-shadow)`:t.dropShadow??"none";let o="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++){const i=""+(17-3*e),r=a?t.borderColorArray[e]:t.mainBkg,c=a?t.borderColorArray[e]:t.nodeBorder;o+=`\n .section-${e-1} rect,\n .section-${e-1} path,\n .section-${e-1} circle {\n fill: ${n&&a?t.mainBkg:r};\n stroke: ${c};\n stroke-width: ${t.strokeWidth};\n filter: ${s};\n }\n\n .section-${e-1} text {\n fill: ${t.nodeBorder};\n font-weight: ${t.fontWeight}\n }\n\n .node-icon-${e-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+e]};\n }\n\n .section-edge-${e-1} {\n stroke: ${t["cScale"+e]};\n }\n\n .edge-depth-${e-1} {\n stroke-width: ${i};\n }\n\n .section-${e-1} line {\n stroke: ${t["cScaleInv"+e]};\n stroke-width: 3;\n }\n\n .lineWrapper line {\n stroke: ${t.nodeBorder};\n stroke-width:${t.strokeWidth}\n }\n\n .disabled,\n .disabled circle,\n .disabled text {\n fill: ${t.tertiaryColor??"lightgray"};\n }\n\n .disabled text {\n fill: ${t.clusterBorder??"#efefef"};\n }\n `}return o},"genReduxSections"),ot=(0,o.__name)(t=>{let e="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],(0,l.default)(t["lineColor"+e])?t["lineColor"+e]=(0,h.default)(t["lineColor"+e],20):t["lineColor"+e]=(0,d.default)(t["lineColor"+e],20);for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const a=""+(17-3*n);e+=`\n .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} path {\n fill: ${t["cScale"+n]};\n }\n .section-${n-1} text {\n fill: ${t["cScaleLabel"+n]};\n }\n .node-icon-${n-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+n]};\n }\n .section-edge-${n-1}{\n stroke: ${t["cScale"+n]};\n }\n .edge-depth-${n-1}{\n stroke-width: ${a};\n }\n .section-${n-1} line {\n stroke: ${t["cScaleInv"+n]} ;\n stroke-width: 3;\n }\n\n .lineWrapper line{\n stroke: ${t["cScaleLabel"+n]} ;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: ${t.tertiaryColor??"lightgray"};\n }\n .disabled text {\n fill: ${t.clusterBorder??"#efefef"};\n }\n `}return e},"genSections"),ct=(0,o.__name)(t=>{const{theme:e}=(0,r.getConfig)(),n=e?.includes("redux"),a="neutral"===e,i=t.svgId?.replace(/^#/,"")??"";let s="";if(t.useGradient&&i&&t.THEME_COLOR_LIMIT&&!a)for(let e=0;e<t.THEME_COLOR_LIMIT;e++)s+=`\n .section-${e-1}[data-look="neo"] rect,\n .section-${e-1}[data-look="neo"] path,\n .section-${e-1}[data-look="neo"] circle {\n fill: ${t.mainBkg};\n stroke: url(#${i}-gradient);\n stroke-width: 2;\n }\n .section-${e-1}[data-look="neo"] line {\n stroke: url(#${i}-gradient);\n stroke-width: 2;\n }`;return`\n .edge {\n stroke-width: 3;\n }\n ${n?st(t):ot(t)}\n ${s}\n .section-root rect, .section-root path, .section-root circle {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n`},"getStyles"),lt={db:p,renderer:{setConf:(0,o.__name)(()=>{},"setConf"),draw:(0,o.__name)((t,e,n,a)=>"TD"===(a?.db?.getDirection?.()??"LR")?rt.draw(t,e,n,a):et.draw(t,e,n,a),"draw")},parser:u,styles:ct}}};
//# sourceMappingURL=7394.js.map