Files
Awperative/docs/_site/public/mindmap-definition-VGOIOE7T-ET7PTNX6.min.js
2026-02-09 17:41:19 -05:00

70 lines
21 KiB
JavaScript
Executable File

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