import{a as de}from"./chunk-6764PJDD.mjs";import{a as ge}from"./chunk-ZXARS5L4.mjs";import{b as he,c as pe}from"./chunk-VU6ZFW4Y.mjs";import"./chunk-7J6CGLKN.mjs";import"./chunk-KGFNY3KK.mjs";import"./chunk-5IMINLNL.mjs";import"./chunk-T2UQINTJ.mjs";import"./chunk-5VCL7Z4A.mjs";import"./chunk-UY5QBCOK.mjs";import"./chunk-INKRHTLW.mjs";import"./chunk-QA3QBVWF.mjs";import"./chunk-KNLZD3CH.mjs";import{A as F,_ as M,d as se,e as ae,f as oe,j as O,t as ce,w as le}from"./chunk-67TQ5CYL.mjs";import{b as L}from"./chunk-7W6UQGC5.mjs";import{a as c}from"./chunk-AQ6EADP3.mjs";var q=(function(){var t=c(function(_,s,n,o){for(n=n||{},o=_.length;o--;n[_[o]]=s);return n},"o"),e=[1,4],a=[1,13],d=[1,12],i=[1,15],h=[1,16],m=[1,20],y=[1,19],b=[6,7,8],x=[1,26],w=[1,24],I=[1,25],p=[6,7,11],R=[1,6,13,15,16,19,22],Q=[1,33],ee=[1,34],A=[1,6,7,11,13,15,16,19,22],G={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},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,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:c(function(s,n,o,l,u,r,B){var g=r.length-1;switch(u){case 6:case 7:return l;case 8:l.getLogger().trace("Stop NL ");break;case 9:l.getLogger().trace("Stop EOF ");break;case 11:l.getLogger().trace("Stop NL2 ");break;case 12:l.getLogger().trace("Stop EOF2 ");break;case 15:l.getLogger().info("Node: ",r[g].id),l.addNode(r[g-1].length,r[g].id,r[g].descr,r[g].type);break;case 16:l.getLogger().trace("Icon: ",r[g]),l.decorateNode({icon:r[g]});break;case 17:case 21:l.decorateNode({class:r[g]});break;case 18:l.getLogger().trace("SPACELIST");break;case 19:l.getLogger().trace("Node: ",r[g].id),l.addNode(0,r[g].id,r[g].descr,r[g].type);break;case 20:l.decorateNode({icon:r[g]});break;case 25:l.getLogger().trace("node found ..",r[g-2]),this.$={id:r[g-1],descr:r[g-1],type:l.getType(r[g-2],r[g])};break;case 26:this.$={id:r[g],descr:r[g],type:l.nodeType.DEFAULT};break;case 27:l.getLogger().trace("node found ..",r[g-3]),this.$={id:r[g-3],descr:r[g-1],type:l.getType(r[g-2],r[g])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:a,7:[1,10],9:9,12:11,13:d,14:14,15:i,16:h,17:17,18:18,19:m,22:y},t(b,[2,3]),{1:[2,2]},t(b,[2,4]),t(b,[2,5]),{1:[2,6],6:a,12:21,13:d,14:14,15:i,16:h,17:17,18:18,19:m,22:y},{6:a,9:22,12:11,13:d,14:14,15:i,16:h,17:17,18:18,19:m,22:y},{6:x,7:w,10:23,11:I},t(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:m,22:y}),t(p,[2,18]),t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),t(p,[2,23]),t(p,[2,24]),t(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:x,7:w,10:32,11:I},{1:[2,7],6:a,12:21,13:d,14:14,15:i,16:h,17:17,18:18,19:m,22:y},t(R,[2,14],{7:Q,11:ee}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(p,[2,15]),t(p,[2,16]),t(p,[2,17]),{20:[1,35]},{21:[1,36]},t(R,[2,13],{7:Q,11:ee}),t(A,[2,11]),t(A,[2,12]),{21:[1,37]},t(p,[2,25]),t(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(s,n){if(n.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=n,o}},"parseError"),parse:c(function(s){var n=this,o=[0],l=[],u=[null],r=[],B=this.table,g="",P=0,te=0,ie=0,Ee=2,ne=1,xe=r.slice.call(arguments,1),f=Object.create(this.lexer),v={yy:{}};for(var X in this.yy)Object.prototype.hasOwnProperty.call(this.yy,X)&&(v.yy[X]=this.yy[X]);f.setInput(s,v.yy),v.yy.lexer=f,v.yy.parser=this,typeof f.yylloc>"u"&&(f.yylloc={});var z=f.yylloc;r.push(z);var Se=f.options&&f.options.ranges;typeof v.yy.parseError=="function"?this.parseError=v.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ce(S){o.length=o.length-2*S,u.length=u.length-S,r.length=r.length-S}c(Ce,"popStack");function $e(){var S;return S=l.pop()||f.lex()||ne,typeof S!="number"&&(S instanceof Array&&(l=S,S=l.pop()),S=n.symbols_[S]||S),S}c($e,"lex");for(var E,W,T,$,Oe,Y,C={},U,D,re,j;;){if(T=o[o.length-1],this.defaultActions[T]?$=this.defaultActions[T]:((E===null||typeof E>"u")&&(E=$e()),$=B[T]&&B[T][E]),typeof $>"u"||!$.length||!$[0]){var Z="";j=[];for(U in B[T])this.terminals_[U]&&U>Ee&&j.push("'"+this.terminals_[U]+"'");f.showPosition?Z="Parse error on line "+(P+1)+`: `+f.showPosition()+` Expecting `+j.join(", ")+", got '"+(this.terminals_[E]||E)+"'":Z="Parse error on line "+(P+1)+": Unexpected "+(E==ne?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(Z,{text:f.match,token:this.terminals_[E]||E,line:f.yylineno,loc:z,expected:j})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+E);switch($[0]){case 1:o.push(E),u.push(f.yytext),r.push(f.yylloc),o.push($[1]),E=null,W?(E=W,W=null):(te=f.yyleng,g=f.yytext,P=f.yylineno,z=f.yylloc,ie>0&&ie--);break;case 2:if(D=this.productions_[$[1]][1],C.$=u[u.length-D],C._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},Se&&(C._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),Y=this.performAction.apply(C,[g,te,P,v.yy,$[1],u,r].concat(xe)),typeof Y<"u")return Y;D&&(o=o.slice(0,-1*D*2),u=u.slice(0,-1*D),r=r.slice(0,-1*D)),o.push(this.productions_[$[1]][0]),u.push(C.$),r.push(C._$),re=B[o[o.length-2]][o[o.length-1]],o.push(re);break;case 3:return!0}}return!0},"parse")},ke=(function(){var _={EOF:1,parseError:c(function(n,o){if(this.yy.parser)this.yy.parser.parseError(n,o);else throw new Error(n)},"parseError"),setInput:c(function(s,n){return this.yy=n||this.yy||{},this._input=s,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:c(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:c(function(s){var n=s.length,o=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var l=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),o.length-1&&(this.yylineno-=o.length-1);var u=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:o?(o.length===l.length?this.yylloc.first_column:0)+l[l.length-o.length].length-o[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(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:c(function(s){this.unput(this.match.slice(s))},"less"),pastInput:c(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+` `+n+"^"},"showPosition"),test_match:c(function(s,n){var o,l,u;if(this.options.backtrack_lexer&&(u={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&&(u.yylloc.range=this.yylloc.range.slice(0))),l=s[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var r in u)this[r]=u[r];return!1}return!1},"test_match"),next:c(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,n,o,l;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),r=0;rn[0].length)){if(n=o,l=r,this.options.backtrack_lexer){if(s=this.test_match(o,u[r]),s!==!1)return s;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(s=this.test_match(n,u[l]),s!==!1?s:!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:c(function(){var n=this.next();return n||this.lex()},"lex"),begin:c(function(n){this.conditionStack.push(n)},"begin"),popState:c(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:c(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:c(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:c(function(n){this.begin(n)},"pushState"),stateStackSize:c(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:c(function(n,o,l,u){var r=u;switch(l){case 0:return n.getLogger().trace("Found comment",o.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:n.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return n.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:n.getLogger().trace("end icon"),this.popState();break;case 10:return n.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return n.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return n.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return n.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:n.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return n.getLogger().trace("description:",o.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),n.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),n.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),n.getLogger().trace("node end ...",o.yytext),"NODE_DEND";break;case 30:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return n.getLogger().trace("Long description:",o.yytext),20;break;case 36:return n.getLogger().trace("Long description:",o.yytext),20;break}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\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:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return _})();G.lexer=ke;function H(){this.yy={}}return c(H,"Parser"),H.prototype=G,G.Parser=H,new H})();q.parser=q;var ue=q;var k=[];for(let t=0;t<256;++t)k.push((t+256).toString(16).slice(1));function me(t,e=0){return(k[t[e+0]]+k[t[e+1]]+k[t[e+2]]+k[t[e+3]]+"-"+k[t[e+4]]+k[t[e+5]]+"-"+k[t[e+6]]+k[t[e+7]]+"-"+k[t[e+8]]+k[t[e+9]]+"-"+k[t[e+10]]+k[t[e+11]]+k[t[e+12]]+k[t[e+13]]+k[t[e+14]]+k[t[e+15]]).toLowerCase()}c(me,"unsafeStringify");var De=new Uint8Array(16);function J(){return crypto.getRandomValues(De)}c(J,"rng");function Ne(t,e,a){return!e&&!t&&crypto.randomUUID?crypto.randomUUID():_e(t,e,a)}c(Ne,"v4");function _e(t,e,a){t=t||{};let d=t.random??t.rng?.()??J();if(d.length<16)throw new Error("Random bytes length must be >= 16");if(d[6]=d[6]&15|64,d[8]=d[8]&63|128,e){if(a=a||0,a<0||a+16>e.length)throw new RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);for(let i=0;i<16;++i)e[a+i]=d[i];return e}return me(d)}c(_e,"_v4");var K=Ne;var fe=12;var N={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},V=class{constructor(){this.nodes=[];this.count=0;this.elements={};this.getLogger=this.getLogger.bind(this),this.nodeType=N,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{c(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let a=this.nodes.length-1;a>=0;a--)if(this.nodes[a].level0?this.nodes[0]:null}addNode(e,a,d,i){L.info("addNode",e,a,d,i);let h=!1;this.nodes.length===0?(this.baseLevel=e,e=0,h=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,h=!1);let m=M(),y=m.mindmap?.padding??O.mindmap.padding;switch(i){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:y*=2;break}let b={id:this.count++,nodeId:F(a,m),level:e,descr:F(d,m),type:i,children:[],width:m.mindmap?.maxNodeWidth??O.mindmap.maxNodeWidth,padding:y,isRoot:h},x=this.getParent(e);if(x)x.children.push(b),this.nodes.push(b);else if(h)this.nodes.push(b);else throw new Error(`There can be only one root. No parent could be found for ("${b.descr}")`)}getType(e,a){switch(L.debug("In get type",e,a),e){case"[":return this.nodeType.RECT;case"(":return a===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,a){this.elements[e]=a}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;let a=M(),d=this.nodes[this.nodes.length-1];e.icon&&(d.icon=F(e.icon,a)),e.class&&(d.class=F(e.class,a))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,a){if(e.level===0?e.section=void 0:e.section=a,e.children)for(let[d,i]of e.children.entries()){let h=e.level===0?d%(fe-1):a;this.assignSections(i,h)}}flattenNodes(e,a){let d=M(),i=["mindmap-node"];e.isRoot===!0?i.push("section-root","section--1"):e.section!==void 0&&i.push(`section-${e.section}`),e.class&&i.push(e.class);let h=i.join(" "),m=c(b=>{let w=(d.theme?.toLowerCase()??"").includes("redux");switch(b){case N.CIRCLE:return"mindmapCircle";case N.RECT:return"rect";case N.ROUNDED_RECT:return"rounded";case N.CLOUD:return"cloud";case N.BANG:return"bang";case N.HEXAGON:return"hexagon";case N.DEFAULT:return w?"rounded":"defaultMindmapNode";case N.NO_BORDER:default:return"rect"}},"getShapeFromType"),y={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:m(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:h,cssStyles:[],look:d.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(a.push(y),e.children)for(let b of e.children)this.flattenNodes(b,a)}generateEdges(e,a){if(!e.children)return;let d=M();for(let i of e.children){let h="edge";i.section!==void 0&&(h+=` section-edge-${i.section}`);let m=e.level+1;h+=` edge-depth-${m}`;let y={id:`edge_${e.id}_${i.id}`,start:e.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:d.look,classes:h,depth:e.level,section:i.section};a.push(y),this.generateEdges(i,a)}}getData(){let e=this.getMindmap(),a=M(),i=le().layout!==void 0,h=a;if(i||(h.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:h};L.debug("getData: mindmapRoot",e,a),this.assignSections(e);let m=[],y=[];this.flattenNodes(e,m),this.generateEdges(e,y),L.debug(`getData: processed ${m.length} nodes and ${y.length} edges`);let b=new Map;for(let x of m)b.set(x.id,{shape:x.shape,width:x.width,height:x.height,padding:x.padding});return{nodes:m,edges:y,config:h,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(b),type:"mindmap",diagramId:"mindmap-"+K()}}getLogger(){return L}};var Le=c(async(t,e,a,d)=>{L.debug(`Rendering mindmap diagram `+t);let i=d.db,h=i.getData(),m=de(e,h.config.securityLevel);if(h.type=d.type,h.layoutAlgorithm=pe(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=e,!i.getMindmap())return;h.nodes.forEach(p=>{p.shape==="rounded"?(p.radius=15,p.taper=15,p.stroke="none",p.width=0,p.padding=15):p.shape==="circle"?p.padding=10:p.shape==="rect"?(p.width=0,p.padding=10):p.shape==="hexagon"&&(p.width=0,p.height=0)}),await he(h,m);let{themeVariables:b}=ce(),{useGradient:x,gradientStart:w,gradientStop:I}=b;if(x&&w&&I){let p=m.attr("id"),R=m.append("defs").append("linearGradient").attr("id",`${p}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");R.append("stop").attr("offset","0%").attr("stop-color",w).attr("stop-opacity",1),R.append("stop").attr("offset","100%").attr("stop-color",I).attr("stop-opacity",1)}ge(m,h.config.mindmap?.padding??O.mindmap.padding,"mindmapDiagram",h.config.mindmap?.useMaxWidth??O.mindmap.useMaxWidth)},"draw"),ye={draw:Le};var we=c(t=>{let{theme:e,look:a}=t,d="";for(let i=0;i{let d="";for(let i=0;i{let{theme:e}=t,a=t.svgId,d=t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none";return` .edge { stroke-width: 3; } ${we(t)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${t.git0}; } .section-root text { fill: ${t.gitBranchLabel0}; } .section-root span { color: ${e?.includes("redux")?t.nodeBorder:t.gitBranchLabel0}; } .icon-container { height:100%; display: flex; justify-content: center; align-items: center; } .edge { fill: none; } .mindmap-node-label { dy: 1em; alignment-baseline: middle; text-anchor: middle; dominant-baseline: middle; text-align: center; } [data-look="neo"].mindmap-node { filter: ${d}; } [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon { fill: ${e?.includes("redux")?t.mainBkg:t.git0}; } [data-look="neo"].mindmap-node.section-root .text-inner-tspan { fill: ${e?.includes("redux")?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:0)]}; } ${t.useGradient&&a&&t.mainBkg?ve(t.THEME_COLOR_LIMIT,a,t.mainBkg):""} `},"getStyles"),be=Te;var xt={get db(){return new V},renderer:ye,parser:ue,styles:be};export{xt as diagram};