UNPKG

ruru

Version:

Grafast-flavoured GraphiQL distribution

2 lines 21 kB
export const __webpack_esm_id__=6826;export const __webpack_esm_ids__=[6826];export const __webpack_esm_modules__={22186(e,t,n){n.r(t),n.d(t,{getIconStyles:()=>i});var i=(0,n(60162).__name)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")},46826(e,t,n){n.r(t),n.d(t,{diagram:()=>C});var i=n(92329),s=n(22186),r=n(38698),o=n(85533),a=(n(70998),n(96540),n(67099),n(82029),n(54141)),c=n(60162),l=n(1942),h=n(47964),g=n(87708),u=function(){var e=(0,c.__name)(function(e,t,n,i){for(n=n||{},i=e.length;i--;n[e[i]]=t);return n},"o"),t=[1,4],n=[1,13],i=[1,12],s=[1,15],r=[1,16],o=[1,20],a=[1,19],l=[6,7,8],h=[1,26],g=[1,24],u=[1,25],d=[6,7,11],p=[1,31],y=[6,7,11,24],_=[1,6,13,16,17,20,23],m=[1,35],f=[1,36],b=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:(0,c.__name)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:(0,c.__name)(function(e,t,n,i,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[a-1].id),i.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:i.getLogger().info("Node: ",r[a].id),i.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:i.getLogger().trace("Icon: ",r[a]),i.decorateNode({icon:r[a]});break;case 18:case 23:i.decorateNode({class:r[a]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",r[a-1].id),i.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:i.getLogger().trace("Node: ",r[a].id),i.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:i.decorateNode({icon:r[a]});break;case 27:i.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:i.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:n,7:[1,10],9:9,12:11,13:i,14:14,16:s,17:r,18:17,19:18,20:o,23:a},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,16:s,17:r,18:17,19:18,20:o,23:a},{6:n,9:22,12:11,13:i,14:14,16:s,17:r,18:17,19:18,20:o,23:a},{6:h,7:g,10:23,11:u},e(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:a}),e(d,[2,19]),e(d,[2,21],{15:30,24:p}),e(d,[2,22]),e(d,[2,23]),e(y,[2,25]),e(y,[2,26]),e(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:g,10:34,11:u},{1:[2,7],6:n,12:21,13:i,14:14,16:s,17:r,18:17,19:18,20:o,23:a},e(_,[2,14],{7:m,11:f}),e(b,[2,8]),e(b,[2,9]),e(b,[2,10]),e(d,[2,16],{15:37,24:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,20],{24:k}),e(y,[2,31]),{21:[1,39]},{22:[1,40]},e(_,[2,13],{7:m,11:f}),e(b,[2,11]),e(b,[2,12]),e(d,[2,15],{24:k}),e(y,[2,30]),{22:[1,41]},e(y,[2,27]),e(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,c.__name)(function(e,t){if(!t.recoverable){var n=new Error(e);throw n.hash=t,n}this.trace(e)},"parseError"),parse:(0,c.__name)(function(e){var t=this,n=[0],i=[],s=[null],r=[],o=this.table,a="",l=0,h=0,g=0,u=r.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);d.setInput(e,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var _=d.yylloc;r.push(_);var m=d.options&&d.options.ranges;function f(){var e;return"number"!=typeof(e=i.pop()||d.lex()||1)&&(e instanceof Array&&(e=(i=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.__name)(function(e){n.length=n.length-2*e,s.length=s.length-e,r.length=r.length-e},"popStack"),(0,c.__name)(f,"lex");for(var b,k,E,S,x,N,L,D,C,I={};;){if(E=n[n.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==b&&(b=f()),S=o[E]&&o[E][b]),void 0===S||!S.length||!S[0]){var v;for(N in C=[],o[E])this.terminals_[N]&&N>2&&C.push("'"+this.terminals_[N]+"'");v=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(v,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:_,expected:C})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+b);switch(S[0]){case 1:n.push(b),s.push(d.yytext),r.push(d.yylloc),n.push(S[1]),b=null,k?(b=k,k=null):(h=d.yyleng,a=d.yytext,l=d.yylineno,_=d.yylloc,g>0&&g--);break;case 2:if(L=this.productions_[S[1]][1],I.$=s[s.length-L],I._$={first_line:r[r.length-(L||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(L||1)].first_column,last_column:r[r.length-1].last_column},m&&(I._$.range=[r[r.length-(L||1)].range[0],r[r.length-1].range[1]]),void 0!==(x=this.performAction.apply(I,[a,h,l,p.yy,S[1],s,r].concat(u))))return x;L&&(n=n.slice(0,-1*L*2),s=s.slice(0,-1*L),r=r.slice(0,-1*L)),n.push(this.productions_[S[1]][0]),s.push(I.$),r.push(I._$),D=o[n[n.length-2]][n[n.length-1]],n.push(D);break;case 3:return!0}}return!0},"parse")},S=function(){return{EOF:1,parseError:(0,c.__name)(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:(0,c.__name)(function(e,t){return this.yy=t||this.yy||{},this._input=e,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,c.__name)(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.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),e},"input"),unput:(0,c.__name)(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var i=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 s=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===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.__name)(function(){return this._more=!0,this},"more"),reject:(0,c.__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,c.__name)(function(e){this.unput(this.match.slice(e))},"less"),pastInput:(0,c.__name)(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.__name)(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.__name)(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},"showPosition"),test_match:(0,c.__name)(function(e,t){var n,i,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:(0,c.__name)(function(){if(this.done)return this.EOF;var e,t,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!t||n[0].length>t[0].length)){if(t=n,i=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,s[r])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,s[i]))&&e:""===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,c.__name)(function(){return this.next()||this.lex()},"lex"),begin:(0,c.__name)(function(e){this.conditionStack.push(e)},"begin"),popState:(0,c.__name)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.__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,c.__name)(function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:(0,c.__name)(function(e){this.begin(e)},"pushState"),stateStackSize:(0,c.__name)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.__name)(function(e,t,n,i){switch(n){case 0:return this.pushState("shapeData"),t.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const n=/\n\s*/g;return t.yytext=t.yytext.replace(n,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return e.getLogger().trace("Found comment",t.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return e.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace("end icon"),this.popState();break;case 16:return e.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return e.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return e.getLogger().trace("description:",t.yytext),"NODE_DESCR";case 33:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),e.getLogger().trace("node end ...",t.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return e.getLogger().trace("Long description:",t.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function x(){this.yy={}}return E.lexer=S,(0,c.__name)(x,"Parser"),x.prototype=E,E.Parser=x,new x}();u.parser=u;var d=u,p=[],y=[],_=0,m={},f=(0,c.__name)(()=>{p=[],y=[],_=0,m={}},"clear"),b=(0,c.__name)(e=>{if(0===p.length)return null;const t=p[0].level;let n=null;for(let e=p.length-1;e>=0;e--)if(p[e].level!==t||n||(n=p[e]),p[e].level<t)throw new Error('Items without section detected, found section ("'+p[e].label+'")');return e===n?.level?null:n},"getSection"),k=(0,c.__name)(function(){return y},"getSections"),E=(0,c.__name)(function(){const e=[],t=k(),n=(0,a.getConfig2)();for(const i of t){const t={id:i.id,label:(0,a.sanitizeText)(i.label??"",n),isGroup:!0,ticket:i.ticket,shape:"kanbanSection",level:i.level,look:n.look};e.push(t);const s=p.filter(e=>e.parentId===i.id);for(const t of s){const s={id:t.id,parentId:i.id,label:(0,a.sanitizeText)(t.label??"",n),isGroup:!1,ticket:t?.ticket,priority:t?.priority,assigned:t?.assigned,icon:t?.icon,shape:"kanbanItem",level:t.level,rx:5,ry:5,cssStyles:["text-align: left"]};e.push(s)}}return{nodes:e,edges:[],other:{},config:(0,a.getConfig2)()}},"getData"),S=(0,c.__name)((e,t,n,i,s)=>{const o=(0,a.getConfig2)();let c=o.mindmap?.padding??a.defaultConfig_default.mindmap.padding;switch(i){case x.ROUNDED_RECT:case x.RECT:case x.HEXAGON:c*=2}const l={id:(0,a.sanitizeText)(t,o)||"kbn"+_++,level:e,label:(0,a.sanitizeText)(n,o),width:o.mindmap?.maxNodeWidth??a.defaultConfig_default.mindmap.maxNodeWidth,padding:c,isGroup:!1};if(void 0!==s){let e;e=s.includes("\n")?s+"\n":"{\n"+s+"\n}";const t=(0,r.load)(e,{schema:r.JSON_SCHEMA});if(t.shape&&(t.shape!==t.shape.toLowerCase()||t.shape.includes("_")))throw new Error(`No such shape: ${t.shape}. Shape names should be lowercase.`);t?.shape&&"kanbanItem"===t.shape&&(l.shape=t?.shape),t?.label&&(l.label=t?.label),t?.icon&&(l.icon=t?.icon.toString()),t?.assigned&&(l.assigned=t?.assigned.toString()),t?.ticket&&(l.ticket=t?.ticket.toString()),t?.priority&&(l.priority=t?.priority)}const h=b(e);h?l.parentId=h.id||"kbn"+_++:y.push(l),p.push(l)},"addNode"),x={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},N={clear:f,addNode:S,getSections:k,getData:E,nodeType:x,getType:(0,c.__name)((e,t)=>{switch(c.log.debug("In get type",e,t),e){case"[":return x.RECT;case"(":return")"===t?x.ROUNDED_RECT:x.CLOUD;case"((":return x.CIRCLE;case")":return x.CLOUD;case"))":return x.BANG;case"{{":return x.HEXAGON;default:return x.DEFAULT}},"getType"),setElementForId:(0,c.__name)((e,t)=>{m[e]=t},"setElementForId"),decorateNode:(0,c.__name)(e=>{if(!e)return;const t=(0,a.getConfig2)(),n=p[p.length-1];e.icon&&(n.icon=(0,a.sanitizeText)(e.icon,t)),e.class&&(n.cssClasses=(0,a.sanitizeText)(e.class,t))},"decorateNode"),type2Str:(0,c.__name)(e=>{switch(e){case x.DEFAULT:return"no-border";case x.RECT:return"rect";case x.ROUNDED_RECT:return"rounded-rect";case x.CIRCLE:return"circle";case x.CLOUD:return"cloud";case x.BANG:return"bang";case x.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:(0,c.__name)(()=>c.log,"getLogger"),getElementById:(0,c.__name)(e=>m[e],"getElementById")},L={draw:(0,c.__name)(async(e,t,n,s)=>{c.log.debug("Rendering kanban diagram\n"+e);const r=s.db.getData(),l=(0,a.getConfig2)();l.htmlLabels=!1;const h=(0,i.selectSvgElement)(t),g=h.append("g");g.attr("class","sections");const u=h.append("g");u.attr("class","items");const d=r.nodes.filter(e=>e.isGroup);let p=0;const y=[];let _=25;for(const e of d){const t=l?.kanban?.sectionWidth||200;p+=1,e.x=t*p+10*(p-1)/2,e.width=t,e.y=0,e.height=3*t,e.rx=5,e.ry=5,e.cssClasses=e.cssClasses+" section-"+p;const n=await(0,o.insertCluster)(g,e);_=Math.max(_,n?.labelBBox?.height),y.push(n)}let m=0;for(const e of d){const t=y[m];m+=1;const n=l?.kanban?.sectionWidth||200,i=3*-n/2+_;let s=i;const a=r.nodes.filter(t=>t.parentId===e.id);for(const t of a){if(t.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");t.x=e.x,t.width=n-15;const i=(await(0,o.insertNode)(u,t,{config:l})).node().getBBox();t.y=s+i.height/2,await(0,o.positionNode)(t),s=t.y+i.height/2+5}const c=t.cluster.select("rect"),h=Math.max(s-i+30,50)+(_-25);c.attr("height",h)}(0,a.setupGraphViewbox)(void 0,h,l.mindmap?.padding??a.defaultConfig_default.kanban.padding,l.mindmap?.useMaxWidth??a.defaultConfig_default.kanban.useMaxWidth)},"draw")},D=(0,c.__name)(e=>{let t="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],(0,l.default)(e["lineColor"+t])?e["lineColor"+t]=(0,h.default)(e["lineColor"+t],20):e["lineColor"+t]=(0,g.default)(e["lineColor"+t],20);const n=(0,c.__name)((t,n)=>e.darkMode?(0,g.default)(t,n):(0,h.default)(t,n),"adjuster");for(let i=0;i<e.THEME_COLOR_LIMIT;i++){const s=""+(17-3*i);t+=`\n .section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} polygon, .section-${i-1} path {\n fill: ${n(e["cScale"+i],10)};\n stroke: ${n(e["cScale"+i],10)};\n\n }\n .section-${i-1} text {\n fill: ${e["cScaleLabel"+i]};\n }\n .node-icon-${i-1} {\n font-size: 40px;\n color: ${e["cScaleLabel"+i]};\n }\n .section-edge-${i-1}{\n stroke: ${e["cScale"+i]};\n }\n .edge-depth-${i-1}{\n stroke-width: ${s};\n }\n .section-${i-1} line {\n stroke: ${e["cScaleInv"+i]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .kanban-ticket-link {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n text-decoration: underline;\n }\n `}return t},"genSections"),C={db:N,renderer:L,parser:d,styles:(0,c.__name)(e=>`\n .edge {\n stroke-width: 3;\n }\n ${D(e)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${e.git0};\n }\n .section-root text {\n fill: ${e.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 .cluster-label, .label {\n color: ${e.textColor};\n fill: ${e.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n ${(0,s.getIconStyles)()}\n`,"getStyles")}}}; //# sourceMappingURL=6826.js.map