Files
infocom-systems-design/node_modules/mermaid/dist/chunks/mermaid.esm.min/mindmap-definition-ZYHNXUZP.mjs
2025-10-03 22:27:28 +03:00

69 lines
21 KiB
JavaScript

import{a as de}from"./chunk-6EQESGSB.mjs";import{a as ge}from"./chunk-T244DUNM.mjs";import{b as ue,c as pe}from"./chunk-W6CKT3PL.mjs";import"./chunk-TVVDRG3C.mjs";import"./chunk-RV6DXAHM.mjs";import"./chunk-EQI6KKA3.mjs";import"./chunk-LM6QDVU5.mjs";import"./chunk-5V7UUW6L.mjs";import"./chunk-GOL2OBWC.mjs";import"./chunk-EFRVIJHI.mjs";import"./chunk-THXVA4DE.mjs";import{W as V,d as ae,e as ce,f as le,i as C,t as he,w as A}from"./chunk-KXVH62NG.mjs";import{b as v}from"./chunk-63GW7ZVL.mjs";import"./chunk-A4ITRWGT.mjs";import{a}from"./chunk-GTKDMUJJ.mjs";var z=(function(){var t=a(function(L,s,n,o){for(n=n||{},o=L.length;o--;n[L[o]]=s);return n},"o"),e=[1,4],i=[1,13],l=[1,12],u=[1,15],h=[1,16],f=[1,20],y=[1,19],g=[6,7,8],_=[1,26],Q=[1,24],Z=[1,25],k=[6,7,11],ee=[1,6,13,15,16,19,22],te=[1,33],ie=[1,34],w=[1,6,7,11,13,15,16,19,22],j={trace:a(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:a(function(s,n,o,c,p,r,R){var d=r.length-1;switch(p){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[d].id),c.addNode(r[d-1].length,r[d].id,r[d].descr,r[d].type);break;case 16:c.getLogger().trace("Icon: ",r[d]),c.decorateNode({icon:r[d]});break;case 17:case 21:c.decorateNode({class:r[d]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[d].id),c.addNode(0,r[d].id,r[d].descr,r[d].type);break;case 20:c.decorateNode({icon:r[d]});break;case 25:c.getLogger().trace("node found ..",r[d-2]),this.$={id:r[d-1],descr:r[d-1],type:c.getType(r[d-2],r[d])};break;case 26:this.$={id:r[d],descr:r[d],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[d-3]),this.$={id:r[d-3],descr:r[d-1],type:c.getType(r[d-2],r[d])};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:i,7:[1,10],9:9,12:11,13:l,14:14,15:u,16:h,17:17,18:18,19:f,22:y},t(g,[2,3]),{1:[2,2]},t(g,[2,4]),t(g,[2,5]),{1:[2,6],6:i,12:21,13:l,14:14,15:u,16:h,17:17,18:18,19:f,22:y},{6:i,9:22,12:11,13:l,14:14,15:u,16:h,17:17,18:18,19:f,22:y},{6:_,7:Q,10:23,11:Z},t(k,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:f,22:y}),t(k,[2,18]),t(k,[2,19]),t(k,[2,20]),t(k,[2,21]),t(k,[2,23]),t(k,[2,24]),t(k,[2,26],{19:[1,30]}),{20:[1,31]},{6:_,7:Q,10:32,11:Z},{1:[2,7],6:i,12:21,13:l,14:14,15:u,16:h,17:17,18:18,19:f,22:y},t(ee,[2,14],{7:te,11:ie}),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(k,[2,15]),t(k,[2,16]),t(k,[2,17]),{20:[1,35]},{21:[1,36]},t(ee,[2,13],{7:te,11:ie}),t(w,[2,11]),t(w,[2,12]),{21:[1,37]},t(k,[2,25]),t(k,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:a(function(s,n){if(n.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=n,o}},"parseError"),parse:a(function(s){var n=this,o=[0],c=[],p=[null],r=[],R=this.table,d="",M=0,ne=0,re=0,ke=2,se=1,De=r.slice.call(arguments,1),m=Object.create(this.lexer),T={yy:{}};for(var G in this.yy)Object.prototype.hasOwnProperty.call(this.yy,G)&&(T.yy[G]=this.yy[G]);m.setInput(s,T.yy),T.yy.lexer=m,T.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var $=m.yylloc;r.push($);var Ne=m.options&&m.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ie(D){o.length=o.length-2*D,p.length=p.length-D,r.length=r.length-D}a(Ie,"popStack");function _e(){var D;return D=c.pop()||m.lex()||se,typeof D!="number"&&(D instanceof Array&&(c=D,D=c.pop()),D=n.symbols_[D]||D),D}a(_e,"lex");for(var E,H,O,N,Ce,W,I={},U,x,oe,P;;){if(O=o[o.length-1],this.defaultActions[O]?N=this.defaultActions[O]:((E===null||typeof E>"u")&&(E=_e()),N=R[O]&&R[O][E]),typeof N>"u"||!N.length||!N[0]){var X="";P=[];for(U in R[O])this.terminals_[U]&&U>ke&&P.push("'"+this.terminals_[U]+"'");m.showPosition?X="Parse error on line "+(M+1)+`:
`+m.showPosition()+`
Expecting `+P.join(", ")+", got '"+(this.terminals_[E]||E)+"'":X="Parse error on line "+(M+1)+": Unexpected "+(E==se?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(X,{text:m.match,token:this.terminals_[E]||E,line:m.yylineno,loc:$,expected:P})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+E);switch(N[0]){case 1:o.push(E),p.push(m.yytext),r.push(m.yylloc),o.push(N[1]),E=null,H?(E=H,H=null):(ne=m.yyleng,d=m.yytext,M=m.yylineno,$=m.yylloc,re>0&&re--);break;case 2:if(x=this.productions_[N[1]][1],I.$=p[p.length-x],I._$={first_line:r[r.length-(x||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(x||1)].first_column,last_column:r[r.length-1].last_column},Ne&&(I._$.range=[r[r.length-(x||1)].range[0],r[r.length-1].range[1]]),W=this.performAction.apply(I,[d,ne,M,T.yy,N[1],p,r].concat(De)),typeof W<"u")return W;x&&(o=o.slice(0,-1*x*2),p=p.slice(0,-1*x),r=r.slice(0,-1*x)),o.push(this.productions_[N[1]][0]),p.push(I.$),r.push(I._$),oe=R[o[o.length-2]][o[o.length-1]],o.push(oe);break;case 3:return!0}}return!0},"parse")},Ee=(function(){var L={EOF:1,parseError:a(function(n,o){if(this.yy.parser)this.yy.parser.parseError(n,o);else throw new Error(n)},"parseError"),setInput:a(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:a(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:a(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 c=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 p=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===c.length?this.yylloc.first_column:0)+c[c.length-o.length].length-o[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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:a(function(s){this.unput(this.match.slice(s))},"less"),pastInput:a(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:a(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:a(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
`+n+"^"},"showPosition"),test_match:a(function(s,n){var o,c,p;if(this.options.backtrack_lexer&&(p={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&&(p.yylloc.range=this.yylloc.range.slice(0))),c=s[0].match(/(?:\r\n?|\n).*/g),c&&(this.yylineno+=c.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.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 p)this[r]=p[r];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,n,o,c;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),r=0;r<p.length;r++)if(o=this._input.match(this.rules[p[r]]),o&&(!n||o[0].length>n[0].length)){if(n=o,c=r,this.options.backtrack_lexer){if(s=this.test_match(o,p[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,p[c]),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:a(function(){var n=this.next();return n||this.lex()},"lex"),begin:a(function(n){this.conditionStack.push(n)},"begin"),popState:a(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:a(function(n){this.begin(n)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(n,o,c,p){var r=p;switch(c){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 L})();j.lexer=Ee;function B(){this.yy={}}return a(B,"Parser"),B.prototype=j,j.Parser=B,new B})();z.parser=z;var fe=z;var b=[];for(let t=0;t<256;++t)b.push((t+256).toString(16).slice(1));function me(t,e=0){return(b[t[e+0]]+b[t[e+1]]+b[t[e+2]]+b[t[e+3]]+"-"+b[t[e+4]]+b[t[e+5]]+"-"+b[t[e+6]]+b[t[e+7]]+"-"+b[t[e+8]]+b[t[e+9]]+"-"+b[t[e+10]]+b[t[e+11]]+b[t[e+12]]+b[t[e+13]]+b[t[e+14]]+b[t[e+15]]).toLowerCase()}a(me,"unsafeStringify");var Y,xe=new Uint8Array(16);function q(){if(!Y){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Y=crypto.getRandomValues.bind(crypto)}return Y(xe)}a(q,"rng");var Se=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),J={randomUUID:Se};function Le(t,e,i){if(J.randomUUID&&!e&&!t)return J.randomUUID();t=t||{};let l=t.random??t.rng?.()??q();if(l.length<16)throw new Error("Random bytes length must be >= 16");if(l[6]=l[6]&15|64,l[8]=l[8]&63|128,e){if(i=i||0,i<0||i+16>e.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let u=0;u<16;++u)e[i+u]=l[u];return e}return me(l)}a(Le,"v4");var K=Le;var S={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},F=class{constructor(){this.nodes=[];this.count=0;this.elements={};this.getLogger=this.getLogger.bind(this),this.nodeType=S,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{a(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let i=this.nodes.length-1;i>=0;i--)if(this.nodes[i].level<e)return this.nodes[i];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,i,l,u){v.info("addNode",e,i,l,u);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 f=V(),y=f.mindmap?.padding??C.mindmap.padding;switch(u){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:y*=2;break}let g={id:this.count++,nodeId:A(i,f),level:e,descr:A(l,f),type:u,children:[],width:f.mindmap?.maxNodeWidth??C.mindmap.maxNodeWidth,padding:y,isRoot:h},_=this.getParent(e);if(_)_.children.push(g),this.nodes.push(g);else if(h)this.nodes.push(g);else throw new Error(`There can be only one root. No parent could be found for ("${g.descr}")`)}getType(e,i){switch(v.debug("In get type",e,i),e){case"[":return this.nodeType.RECT;case"(":return i===")"?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,i){this.elements[e]=i}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;let i=V(),l=this.nodes[this.nodes.length-1];e.icon&&(l.icon=A(e.icon,i)),e.class&&(l.class=A(e.class,i))}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,i){if(e.level===0?e.section=void 0:e.section=i,e.children)for(let[l,u]of e.children.entries()){let h=e.level===0?l:i;this.assignSections(u,h)}}flattenNodes(e,i){let l=["mindmap-node"];e.isRoot===!0?l.push("section-root","section--1"):e.section!==void 0&&l.push(`section-${e.section}`),e.class&&l.push(e.class);let u=l.join(" "),h=a(y=>{switch(y){case S.CIRCLE:return"mindmapCircle";case S.RECT:return"rect";case S.ROUNDED_RECT:return"rounded";case S.CLOUD:return"cloud";case S.BANG:return"bang";case S.HEXAGON:return"hexagon";case S.DEFAULT:return"defaultMindmapNode";case S.NO_BORDER:default:return"rect"}},"getShapeFromType"),f={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,isGroup:!1,shape:h(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:u,cssStyles:[],look:"default",icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(i.push(f),e.children)for(let y of e.children)this.flattenNodes(y,i)}generateEdges(e,i){if(e.children)for(let l of e.children){let u="edge";l.section!==void 0&&(u+=` section-edge-${l.section}`);let h=e.level+1;u+=` edge-depth-${h}`;let f={id:`edge_${e.id}_${l.id}`,start:e.id.toString(),end:l.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:"default",classes:u,depth:e.level,section:l.section};i.push(f),this.generateEdges(l,i)}}getData(){let e=this.getMindmap(),i=V(),u=he().layout!==void 0,h=i;if(u||(h.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:h};v.debug("getData: mindmapRoot",e,i),this.assignSections(e);let f=[],y=[];this.flattenNodes(e,f),this.generateEdges(e,y),v.debug(`getData: processed ${f.length} nodes and ${y.length} edges`);let g=new Map;for(let _ of f)g.set(_.id,{shape:_.shape,width:_.width,height:_.height,padding:_.padding});return{nodes:f,edges:y,config:h,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(g),type:"mindmap",diagramId:"mindmap-"+K()}}getLogger(){return v}};var ve=a(async(t,e,i,l)=>{v.debug(`Rendering mindmap diagram
`+t);let u=l.db,h=u.getData(),f=de(e,h.config.securityLevel);h.type=l.type,h.layoutAlgorithm=pe(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=e,u.getMindmap()&&(h.nodes.forEach(g=>{g.shape==="rounded"?(g.radius=15,g.taper=15,g.stroke="none",g.width=0,g.padding=15):g.shape==="circle"?g.padding=10:g.shape==="rect"&&(g.width=0,g.padding=10)}),await ue(h,f),ge(f,h.config.mindmap?.padding??C.mindmap.padding,"mindmapDiagram",h.config.mindmap?.useMaxWidth??C.mindmap.useMaxWidth))},"draw"),ye={draw:ve};var Te=a(t=>{let e="";for(let i=0;i<t.THEME_COLOR_LIMIT;i++)t["lineColor"+i]=t["lineColor"+i]||t["cScaleInv"+i],ae(t["lineColor"+i])?t["lineColor"+i]=ce(t["lineColor"+i],20):t["lineColor"+i]=le(t["lineColor"+i],20);for(let i=0;i<t.THEME_COLOR_LIMIT;i++){let l=""+(17-3*i);e+=`
.section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} polygon, .section-${i-1} path {
fill: ${t["cScale"+i]};
}
.section-${i-1} text {
fill: ${t["cScaleLabel"+i]};
}
.node-icon-${i-1} {
font-size: 40px;
color: ${t["cScaleLabel"+i]};
}
.section-edge-${i-1}{
stroke: ${t["cScale"+i]};
}
.edge-depth-${i-1}{
stroke-width: ${l};
}
.section-${i-1} line {
stroke: ${t["cScaleInv"+i]} ;
stroke-width: 3;
}
.disabled, .disabled circle, .disabled text {
fill: lightgray;
}
.disabled text {
fill: #efefef;
}
`}return e},"genSections"),Oe=a(t=>`
.edge {
stroke-width: 3;
}
${Te(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: ${t.gitBranchLabel0};
}
.section-2 span {
color: ${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;
}
`,"getStyles"),be=Oe;var gt={get db(){return new F},renderer:ye,parser:fe,styles:be};export{gt as diagram};