@superlc/md-core 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_baseUniq-BfzcfZ4T.cjs +1 -0
- package/dist/_baseUniq-Y3ulau-C.js +477 -0
- package/dist/arc-Be_AVKBg.cjs +1 -0
- package/dist/arc-Ca7Zrknn.js +83 -0
- package/dist/architectureDiagram-VXUJARFQ-4Jx44yBn.cjs +36 -0
- package/dist/architectureDiagram-VXUJARFQ-DJeUU_qv.js +4665 -0
- package/dist/blockDiagram-VD42YOAC-BimcGKKd.cjs +122 -0
- package/dist/blockDiagram-VD42YOAC-D-giXjw6.js +2265 -0
- package/dist/c4Diagram-YG6GDRKO-Bl9iUUVb.cjs +10 -0
- package/dist/c4Diagram-YG6GDRKO-YxTtvGWw.js +1581 -0
- package/dist/channel-DOU_t-A5.js +5 -0
- package/dist/channel-DzR_mTuG.cjs +1 -0
- package/dist/chunk-4BX2VUAB-BT8x_a4k.cjs +1 -0
- package/dist/chunk-4BX2VUAB-qWjx6fvp.js +9 -0
- package/dist/chunk-55IACEB6-DRmMNyi7.js +8 -0
- package/dist/chunk-55IACEB6-DfzR1I2i.cjs +1 -0
- package/dist/chunk-B4BG7PRW-B4vBwkd7.js +1376 -0
- package/dist/chunk-B4BG7PRW-k_Ki7ZYa.cjs +165 -0
- package/dist/chunk-DI55MBZ5-67zt7BEa.cjs +220 -0
- package/dist/chunk-DI55MBZ5-B-Akunv8.js +1382 -0
- package/dist/chunk-FMBD7UC4-D-gJ-PKq.cjs +15 -0
- package/dist/chunk-FMBD7UC4-D1foMA2H.js +19 -0
- package/dist/chunk-QN33PNHL-DBsOH5IO.cjs +1 -0
- package/dist/chunk-QN33PNHL-DpeYRHMx.js +20 -0
- package/dist/chunk-QZHKN3VN-CWmChvMD.cjs +1 -0
- package/dist/chunk-QZHKN3VN-CoINyXCe.js +15 -0
- package/dist/chunk-TZMSLE5B-CMo-Qyqp.js +64 -0
- package/dist/chunk-TZMSLE5B-Psc_3Gkx.cjs +1 -0
- package/dist/classDiagram-2ON5EDUG-BrNHAA-E.js +16 -0
- package/dist/classDiagram-2ON5EDUG-CA1gbIW7.cjs +1 -0
- package/dist/classDiagram-v2-WZHVMYZB-BrNHAA-E.js +16 -0
- package/dist/classDiagram-v2-WZHVMYZB-CA1gbIW7.cjs +1 -0
- package/dist/clone-BOyua0mT.js +8 -0
- package/dist/clone-D7Rx0g6P.cjs +1 -0
- package/dist/cose-bilkent-S5V4N54A-BBcnamAX.cjs +1 -0
- package/dist/cose-bilkent-S5V4N54A-xbHM31av.js +2605 -0
- package/dist/cytoscape.esm-DkGgpG6d.cjs +331 -0
- package/dist/cytoscape.esm-ZmItrg9y.js +18731 -0
- package/dist/dagre-6UL2VRFP-B5ZJ9Mmw.cjs +4 -0
- package/dist/dagre-6UL2VRFP-lY6fElcy.js +446 -0
- package/dist/defaultLocale-BgPVtth8.js +171 -0
- package/dist/defaultLocale-C4wbwF1n.cjs +1 -0
- package/dist/diagram-PSM6KHXK-DOgpThfE.js +534 -0
- package/dist/diagram-PSM6KHXK-NUCrGNCX.cjs +24 -0
- package/dist/diagram-QEK2KX5R-CKpcqpBk.js +221 -0
- package/dist/diagram-QEK2KX5R-P-pWAYvp.cjs +43 -0
- package/dist/diagram-S2PKOQOG-B4PYQerv.cjs +24 -0
- package/dist/diagram-S2PKOQOG-CZn9lft8.js +143 -0
- package/dist/erDiagram-Q2GNP2WA-D6UL-dgf.js +842 -0
- package/dist/erDiagram-Q2GNP2WA-DwYOfnOX.cjs +60 -0
- package/dist/flowDiagram-NV44I4VS-BvuqC7lR.cjs +162 -0
- package/dist/flowDiagram-NV44I4VS-YPdRK_ji.js +1627 -0
- package/dist/ganttDiagram-JELNMOA3-CGnvf7yj.js +2662 -0
- package/dist/ganttDiagram-JELNMOA3-wbYrtCNf.cjs +267 -0
- package/dist/gitGraphDiagram-NY62KEGX-BnpFLmUy.js +712 -0
- package/dist/gitGraphDiagram-NY62KEGX-BzlCJL63.cjs +65 -0
- package/dist/graph-Bv0JC_B1.cjs +1 -0
- package/dist/graph-DwDboYRQ.js +381 -0
- package/dist/index-A-U0gtM4.js +15167 -0
- package/dist/index-BC30feOR.cjs +300 -0
- package/dist/index.cjs +1 -300
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -14816
- package/dist/infoDiagram-WHAUD3N6-CPFFyZEz.cjs +2 -0
- package/dist/infoDiagram-WHAUD3N6-DF-Kn4KW.js +24 -0
- package/dist/init-CHZsXQcr.cjs +1 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/journeyDiagram-XKPGCS4Q-Bc3YJVQN.cjs +139 -0
- package/dist/journeyDiagram-XKPGCS4Q-CqUVbDan.js +836 -0
- package/dist/kanban-definition-3W4ZIXB7-BKxpdlfe.cjs +89 -0
- package/dist/kanban-definition-3W4ZIXB7-Zx7cVnZF.js +720 -0
- package/dist/layout-CrdknE74.js +1441 -0
- package/dist/layout-y4Mby5BC.cjs +1 -0
- package/dist/linear-D_NLLphh.cjs +1 -0
- package/dist/linear-Fqu_aevY.js +259 -0
- package/dist/mermaid/darkMode.d.ts +54 -0
- package/dist/mermaid/darkMode.d.ts.map +1 -0
- package/dist/mermaid/download.d.ts +27 -0
- package/dist/mermaid/download.d.ts.map +1 -0
- package/dist/mermaid/index.d.ts +9 -0
- package/dist/mermaid/index.d.ts.map +1 -0
- package/dist/mermaid/renderer.d.ts +36 -0
- package/dist/mermaid/renderer.d.ts.map +1 -0
- package/dist/mermaid/themes.d.ts +17 -0
- package/dist/mermaid/themes.d.ts.map +1 -0
- package/dist/mermaid/types.d.ts +117 -0
- package/dist/mermaid/types.d.ts.map +1 -0
- package/dist/mermaid.core-Buzus1hw.js +15321 -0
- package/dist/mermaid.core-CCMj67LO.cjs +255 -0
- package/dist/min-BNEwgiip.js +38 -0
- package/dist/min-CxfddLJo.cjs +1 -0
- package/dist/mindmap-definition-VGOIOE7T-C3sZAv1n.js +786 -0
- package/dist/mindmap-definition-VGOIOE7T-Cq9KhFIU.cjs +68 -0
- package/dist/ordinal-CagbB1m8.cjs +1 -0
- package/dist/ordinal-DfAQgscy.js +61 -0
- package/dist/pieDiagram-ADFJNKIX-Bib4GVaz.js +161 -0
- package/dist/pieDiagram-ADFJNKIX-CPJ4LdHJ.cjs +30 -0
- package/dist/quadrantDiagram-AYHSOK5B-Bw4qbzaI.js +1024 -0
- package/dist/quadrantDiagram-AYHSOK5B-Dldq3aFV.cjs +7 -0
- package/dist/requirementDiagram-UZGBJVZJ-BiMT5LBm.cjs +64 -0
- package/dist/requirementDiagram-UZGBJVZJ-DKt5E9D5.js +852 -0
- package/dist/sankeyDiagram-TZEHDZUN-BvqABFTj.cjs +10 -0
- package/dist/sankeyDiagram-TZEHDZUN-DPexJVr0.js +810 -0
- package/dist/sequenceDiagram-WL72ISMW-JcPuIgsZ.cjs +145 -0
- package/dist/sequenceDiagram-WL72ISMW-rx65Aq7k.js +2518 -0
- package/dist/stateDiagram-FKZM4ZOC-5jwz-EhH.cjs +1 -0
- package/dist/stateDiagram-FKZM4ZOC-D95elPzf.js +263 -0
- package/dist/stateDiagram-v2-4FDKWEC3-DKxcP1od.cjs +1 -0
- package/dist/stateDiagram-v2-4FDKWEC3-U8OyZJcH.js +16 -0
- package/dist/styles.css +292 -0
- package/dist/timeline-definition-IT6M3QCI-C_aFXPzu.cjs +61 -0
- package/dist/timeline-definition-IT6M3QCI-DzBIcxIH.js +801 -0
- package/dist/treemap-KMMF4GRG-CqQBq3TE.js +14157 -0
- package/dist/treemap-KMMF4GRG-DJHv4WOZ.cjs +128 -0
- package/dist/xychartDiagram-PRI3JC2R-M2dUh85s.cjs +7 -0
- package/dist/xychartDiagram-PRI3JC2R-ZNBNeiJf.js +1340 -0
- package/package.json +6 -2
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const re=require("./chunk-55IACEB6-DfzR1I2i.cjs"),ae=require("./chunk-QN33PNHL-DBsOH5IO.cjs"),a=require("./mermaid.core-CCMj67LO.cjs"),_=[];for(let t=0;t<256;++t)_.push((t+256).toString(16).slice(1));function oe(t,e=0){return(_[t[e+0]]+_[t[e+1]]+_[t[e+2]]+_[t[e+3]]+"-"+_[t[e+4]]+_[t[e+5]]+"-"+_[t[e+6]]+_[t[e+7]]+"-"+_[t[e+8]]+_[t[e+9]]+"-"+_[t[e+10]]+_[t[e+11]]+_[t[e+12]]+_[t[e+13]]+_[t[e+14]]+_[t[e+15]]).toLowerCase()}let H;const ce=new Uint8Array(16);function le(){if(!H){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");H=crypto.getRandomValues.bind(crypto)}return H(ce)}const he=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Z={randomUUID:he};function de(t,e,i){var u;if(Z.randomUUID&&!t)return Z.randomUUID();t=t||{};const l=t.random??((u=t.rng)==null?void 0:u.call(t))??le();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,oe(l)}var $=function(){var t=a.__name(function(v,s,n,o){for(n=n||{},o=v.length;o--;n[v[o]]=s);return n},"o"),e=[1,4],i=[1,13],l=[1,12],u=[1,15],h=[1,16],p=[1,20],m=[1,19],E=[6,7,8],b=[1,26],y=[1,24],R=[1,25],N=[6,7,11],W=[1,6,13,15,16,19,22],X=[1,33],q=[1,34],w=[1,6,7,11,13,15,16,19,22],B={trace:a.__name(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.__name(function(s,n,o,c,g,r,A){var d=r.length-1;switch(g){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:p,22:m},t(E,[2,3]),{1:[2,2]},t(E,[2,4]),t(E,[2,5]),{1:[2,6],6:i,12:21,13:l,14:14,15:u,16:h,17:17,18:18,19:p,22:m},{6:i,9:22,12:11,13:l,14:14,15:u,16:h,17:17,18:18,19:p,22:m},{6:b,7:y,10:23,11:R},t(N,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:p,22:m}),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,23]),t(N,[2,24]),t(N,[2,26],{19:[1,30]}),{20:[1,31]},{6:b,7:y,10:32,11:R},{1:[2,7],6:i,12:21,13:l,14:14,15:u,16:h,17:17,18:18,19:p,22:m},t(W,[2,14],{7:X,11:q}),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),{20:[1,35]},{21:[1,36]},t(W,[2,13],{7:X,11:q}),t(w,[2,11]),t(w,[2,12]),{21:[1,37]},t(N,[2,25]),t(N,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:a.__name(function(s,n){if(n.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=n,o}},"parseError"),parse:a.__name(function(s){var n=this,o=[0],c=[],g=[null],r=[],A=this.table,d="",P=0,Y=0,te=2,Q=1,ne=r.slice.call(arguments,1),f=Object.create(this.lexer),T={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(T.yy[F]=this.yy[F]);f.setInput(s,T.yy),T.yy.lexer=f,T.yy.parser=this,typeof f.yylloc>"u"&&(f.yylloc={});var j=f.yylloc;r.push(j);var ie=f.options&&f.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function se(D){o.length=o.length-2*D,g.length=g.length-D,r.length=r.length-D}a.__name(se,"popStack");function J(){var D;return D=c.pop()||f.lex()||Q,typeof D!="number"&&(D instanceof Array&&(c=D,D=c.pop()),D=n.symbols_[D]||D),D}a.__name(J,"lex");for(var S,C,k,G,O={},M,L,K,V;;){if(C=o[o.length-1],this.defaultActions[C]?k=this.defaultActions[C]:((S===null||typeof S>"u")&&(S=J()),k=A[C]&&A[C][S]),typeof k>"u"||!k.length||!k[0]){var z="";V=[];for(M in A[C])this.terminals_[M]&&M>te&&V.push("'"+this.terminals_[M]+"'");f.showPosition?z="Parse error on line "+(P+1)+`:
|
|
2
|
+
`+f.showPosition()+`
|
|
3
|
+
Expecting `+V.join(", ")+", got '"+(this.terminals_[S]||S)+"'":z="Parse error on line "+(P+1)+": Unexpected "+(S==Q?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(z,{text:f.match,token:this.terminals_[S]||S,line:f.yylineno,loc:j,expected:V})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+S);switch(k[0]){case 1:o.push(S),g.push(f.yytext),r.push(f.yylloc),o.push(k[1]),S=null,Y=f.yyleng,d=f.yytext,P=f.yylineno,j=f.yylloc;break;case 2:if(L=this.productions_[k[1]][1],O.$=g[g.length-L],O._$={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},ie&&(O._$.range=[r[r.length-(L||1)].range[0],r[r.length-1].range[1]]),G=this.performAction.apply(O,[d,Y,P,T.yy,k[1],g,r].concat(ne)),typeof G<"u")return G;L&&(o=o.slice(0,-1*L*2),g=g.slice(0,-1*L),r=r.slice(0,-1*L)),o.push(this.productions_[k[1]][0]),g.push(O.$),r.push(O._$),K=A[o[o.length-2]][o[o.length-1]],o.push(K);break;case 3:return!0}}return!0},"parse")},ee=function(){var v={EOF:1,parseError:a.__name(function(n,o){if(this.yy.parser)this.yy.parser.parseError(n,o);else throw new Error(n)},"parseError"),setInput:a.__name(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.__name(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.__name(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 g=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=[g[0],g[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:a.__name(function(){return this._more=!0,this},"more"),reject:a.__name(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).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a.__name(function(s){this.unput(this.match.slice(s))},"less"),pastInput:a.__name(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.__name(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.__name(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
5
|
+
`+n+"^"},"showPosition"),test_match:a.__name(function(s,n){var o,c,g;if(this.options.backtrack_lexer&&(g={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&&(g.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 g)this[r]=g[r];return!1}return!1},"test_match"),next:a.__name(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 g=this._currentRules(),r=0;r<g.length;r++)if(o=this._input.match(this.rules[g[r]]),o&&(!n||o[0].length>n[0].length)){if(n=o,c=r,this.options.backtrack_lexer){if(s=this.test_match(o,g[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,g[c]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a.__name(function(){var n=this.next();return n||this.lex()},"lex"),begin:a.__name(function(n){this.conditionStack.push(n)},"begin"),popState:a.__name(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a.__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:a.__name(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:a.__name(function(n){this.begin(n)},"pushState"),stateStackSize:a.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a.__name(function(n,o,c,g){switch(c){case 0:return n.getLogger().trace("Found comment",o.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:n.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return n.getLogger().trace("SPACELINE"),6;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;case 11:return n.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return n.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return n.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;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";case 26:this.popState();break;case 27:return this.popState(),n.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),n.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),n.getLogger().trace("node end ...",o.yytext),"NODE_DEND";case 30:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 35:return n.getLogger().trace("Long description:",o.yytext),20;case 36:return n.getLogger().trace("Long description:",o.yytext),20}},"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 v}();B.lexer=ee;function U(){this.yy={}}return a.__name(U,"Parser"),U.prototype=B,B.Parser=U,new U}();$.parser=$;var ge=$,x={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},I,ue=(I=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=x,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)}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){var y,R;a.log.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);const p=a.getConfig2();let m=((y=p.mindmap)==null?void 0:y.padding)??a.defaultConfig_default.mindmap.padding;switch(u){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:m*=2;break}const E={id:this.count++,nodeId:a.sanitizeText(i,p),level:e,descr:a.sanitizeText(l,p),type:u,children:[],width:((R=p.mindmap)==null?void 0:R.maxNodeWidth)??a.defaultConfig_default.mindmap.maxNodeWidth,padding:m,isRoot:h},b=this.getParent(e);if(b)b.children.push(E),this.nodes.push(E);else if(h)this.nodes.push(E);else throw new Error(`There can be only one root. No parent could be found for ("${E.descr}")`)}getType(e,i){switch(a.log.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;const i=a.getConfig2(),l=this.nodes[this.nodes.length-1];e.icon&&(l.icon=a.sanitizeText(e.icon,i)),e.class&&(l.class=a.sanitizeText(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(const[l,u]of e.children.entries()){const h=e.level===0?l:i;this.assignSections(u,h)}}flattenNodes(e,i){const 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);const u=l.join(" "),h=a.__name(m=>{switch(m){case x.CIRCLE:return"mindmapCircle";case x.RECT:return"rect";case x.ROUNDED_RECT:return"rounded";case x.CLOUD:return"cloud";case x.BANG:return"bang";case x.HEXAGON:return"hexagon";case x.DEFAULT:return"defaultMindmapNode";case x.NO_BORDER:default:return"rect"}},"getShapeFromType"),p={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(p),e.children)for(const m of e.children)this.flattenNodes(m,i)}generateEdges(e,i){if(e.children)for(const l of e.children){let u="edge";l.section!==void 0&&(u+=` section-edge-${l.section}`);const h=e.level+1;u+=` edge-depth-${h}`;const p={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(p),this.generateEdges(l,i)}}getData(){const e=this.getMindmap(),i=a.getConfig2(),u=a.getUserDefinedConfig().layout!==void 0,h=i;if(u||(h.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:h};a.log.debug("getData: mindmapRoot",e,i),this.assignSections(e);const p=[],m=[];this.flattenNodes(e,p),this.generateEdges(e,m),a.log.debug(`getData: processed ${p.length} nodes and ${m.length} edges`);const E=new Map;for(const b of p)E.set(b.id,{shape:b.shape,width:b.width,height:b.height,padding:b.padding});return{nodes:p,edges:m,config:h,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(E),type:"mindmap",diagramId:"mindmap-"+de()}}getLogger(){return a.log}},a.__name(I,"MindmapDB"),I),pe=a.__name(async(t,e,i,l)=>{var E,b;a.log.debug(`Rendering mindmap diagram
|
|
7
|
+
`+t);const u=l.db,h=u.getData(),p=re.getDiagramElement(e,h.config.securityLevel);h.type=l.type,h.layoutAlgorithm=a.getRegisteredLayoutAlgorithm(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=e,u.getMindmap()&&(h.nodes.forEach(y=>{y.shape==="rounded"?(y.radius=15,y.taper=15,y.stroke="none",y.width=0,y.padding=15):y.shape==="circle"?y.padding=10:y.shape==="rect"&&(y.width=0,y.padding=10)}),await a.render(h,p),ae.setupViewPortForSVG(p,((E=h.config.mindmap)==null?void 0:E.padding)??a.defaultConfig_default.mindmap.padding,"mindmapDiagram",((b=h.config.mindmap)==null?void 0:b.useMaxWidth)??a.defaultConfig_default.mindmap.useMaxWidth))},"draw"),fe={draw:pe},me=a.__name(t=>{let e="";for(let i=0;i<t.THEME_COLOR_LIMIT;i++)t["lineColor"+i]=t["lineColor"+i]||t["cScaleInv"+i],a.isDark(t["lineColor"+i])?t["lineColor"+i]=a.lighten(t["lineColor"+i],20):t["lineColor"+i]=a.darken(t["lineColor"+i],20);for(let i=0;i<t.THEME_COLOR_LIMIT;i++){const l=""+(17-3*i);e+=`
|
|
8
|
+
.section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} polygon, .section-${i-1} path {
|
|
9
|
+
fill: ${t["cScale"+i]};
|
|
10
|
+
}
|
|
11
|
+
.section-${i-1} text {
|
|
12
|
+
fill: ${t["cScaleLabel"+i]};
|
|
13
|
+
}
|
|
14
|
+
.node-icon-${i-1} {
|
|
15
|
+
font-size: 40px;
|
|
16
|
+
color: ${t["cScaleLabel"+i]};
|
|
17
|
+
}
|
|
18
|
+
.section-edge-${i-1}{
|
|
19
|
+
stroke: ${t["cScale"+i]};
|
|
20
|
+
}
|
|
21
|
+
.edge-depth-${i-1}{
|
|
22
|
+
stroke-width: ${l};
|
|
23
|
+
}
|
|
24
|
+
.section-${i-1} line {
|
|
25
|
+
stroke: ${t["cScaleInv"+i]} ;
|
|
26
|
+
stroke-width: 3;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.disabled, .disabled circle, .disabled text {
|
|
30
|
+
fill: lightgray;
|
|
31
|
+
}
|
|
32
|
+
.disabled text {
|
|
33
|
+
fill: #efefef;
|
|
34
|
+
}
|
|
35
|
+
`}return e},"genSections"),ye=a.__name(t=>`
|
|
36
|
+
.edge {
|
|
37
|
+
stroke-width: 3;
|
|
38
|
+
}
|
|
39
|
+
${me(t)}
|
|
40
|
+
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
41
|
+
fill: ${t.git0};
|
|
42
|
+
}
|
|
43
|
+
.section-root text {
|
|
44
|
+
fill: ${t.gitBranchLabel0};
|
|
45
|
+
}
|
|
46
|
+
.section-root span {
|
|
47
|
+
color: ${t.gitBranchLabel0};
|
|
48
|
+
}
|
|
49
|
+
.section-2 span {
|
|
50
|
+
color: ${t.gitBranchLabel0};
|
|
51
|
+
}
|
|
52
|
+
.icon-container {
|
|
53
|
+
height:100%;
|
|
54
|
+
display: flex;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
align-items: center;
|
|
57
|
+
}
|
|
58
|
+
.edge {
|
|
59
|
+
fill: none;
|
|
60
|
+
}
|
|
61
|
+
.mindmap-node-label {
|
|
62
|
+
dy: 1em;
|
|
63
|
+
alignment-baseline: middle;
|
|
64
|
+
text-anchor: middle;
|
|
65
|
+
dominant-baseline: middle;
|
|
66
|
+
text-align: center;
|
|
67
|
+
}
|
|
68
|
+
`,"getStyles"),_e=ye,Ee={get db(){return new ue},renderer:fe,parser:ge,styles:_e};exports.diagram=Ee;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const l=require("./init-CHZsXQcr.cjs");class o extends Map{constructor(n,t=p){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),n!=null)for(const[r,s]of n)this.set(r,s)}get(n){return super.get(c(this,n))}has(n){return super.has(c(this,n))}set(n,t){return super.set(g(this,n),t)}delete(n){return super.delete(h(this,n))}}function c({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):t}function g({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):(e.set(r,t),t)}function h({_intern:e,_key:n},t){const r=n(t);return e.has(r)&&(t=e.get(r),e.delete(r)),t}function p(e){return e!==null&&typeof e=="object"?e.valueOf():e}const f=Symbol("implicit");function a(){var e=new o,n=[],t=[],r=f;function s(i){let u=e.get(i);if(u===void 0){if(r!==f)return r;e.set(i,u=n.push(i)-1)}return t[u%t.length]}return s.domain=function(i){if(!arguments.length)return n.slice();n=[],e=new o;for(const u of i)e.has(u)||e.set(u,n.push(u)-1);return s},s.range=function(i){return arguments.length?(t=Array.from(i),s):t.slice()},s.unknown=function(i){return arguments.length?(r=i,s):r},s.copy=function(){return a(n,t).unknown(r)},l.initRange.apply(s,arguments),s}exports.ordinal=a;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { i as a } from "./init-DjUOC4st.js";
|
|
2
|
+
class o extends Map {
|
|
3
|
+
constructor(n, t = g) {
|
|
4
|
+
if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: t } }), n != null) for (const [r, s] of n) this.set(r, s);
|
|
5
|
+
}
|
|
6
|
+
get(n) {
|
|
7
|
+
return super.get(c(this, n));
|
|
8
|
+
}
|
|
9
|
+
has(n) {
|
|
10
|
+
return super.has(c(this, n));
|
|
11
|
+
}
|
|
12
|
+
set(n, t) {
|
|
13
|
+
return super.set(l(this, n), t);
|
|
14
|
+
}
|
|
15
|
+
delete(n) {
|
|
16
|
+
return super.delete(p(this, n));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function c({ _intern: e, _key: n }, t) {
|
|
20
|
+
const r = n(t);
|
|
21
|
+
return e.has(r) ? e.get(r) : t;
|
|
22
|
+
}
|
|
23
|
+
function l({ _intern: e, _key: n }, t) {
|
|
24
|
+
const r = n(t);
|
|
25
|
+
return e.has(r) ? e.get(r) : (e.set(r, t), t);
|
|
26
|
+
}
|
|
27
|
+
function p({ _intern: e, _key: n }, t) {
|
|
28
|
+
const r = n(t);
|
|
29
|
+
return e.has(r) && (t = e.get(r), e.delete(r)), t;
|
|
30
|
+
}
|
|
31
|
+
function g(e) {
|
|
32
|
+
return e !== null && typeof e == "object" ? e.valueOf() : e;
|
|
33
|
+
}
|
|
34
|
+
const f = Symbol("implicit");
|
|
35
|
+
function h() {
|
|
36
|
+
var e = new o(), n = [], t = [], r = f;
|
|
37
|
+
function s(u) {
|
|
38
|
+
let i = e.get(u);
|
|
39
|
+
if (i === void 0) {
|
|
40
|
+
if (r !== f) return r;
|
|
41
|
+
e.set(u, i = n.push(u) - 1);
|
|
42
|
+
}
|
|
43
|
+
return t[i % t.length];
|
|
44
|
+
}
|
|
45
|
+
return s.domain = function(u) {
|
|
46
|
+
if (!arguments.length) return n.slice();
|
|
47
|
+
n = [], e = new o();
|
|
48
|
+
for (const i of u)
|
|
49
|
+
e.has(i) || e.set(i, n.push(i) - 1);
|
|
50
|
+
return s;
|
|
51
|
+
}, s.range = function(u) {
|
|
52
|
+
return arguments.length ? (t = Array.from(u), s) : t.slice();
|
|
53
|
+
}, s.unknown = function(u) {
|
|
54
|
+
return arguments.length ? (r = u, s) : r;
|
|
55
|
+
}, s.copy = function() {
|
|
56
|
+
return h(n, t).unknown(r);
|
|
57
|
+
}, a.apply(s, arguments), s;
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
h as o
|
|
61
|
+
};
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { a4 as S, a7 as F, aB as j, _ as p, g as q, s as H, a as Z, b as J, q as K, p as Q, l as z, c as X, D as Y, H as ee, N as te, e as ae, y as re, F as ne } from "./mermaid.core-Buzus1hw.js";
|
|
2
|
+
import { p as ie } from "./chunk-4BX2VUAB-qWjx6fvp.js";
|
|
3
|
+
import { p as se } from "./treemap-KMMF4GRG-CqQBq3TE.js";
|
|
4
|
+
import { d as I } from "./arc-Ca7Zrknn.js";
|
|
5
|
+
import { o as le } from "./ordinal-DfAQgscy.js";
|
|
6
|
+
function oe(e, a) {
|
|
7
|
+
return a < e ? -1 : a > e ? 1 : a >= e ? 0 : NaN;
|
|
8
|
+
}
|
|
9
|
+
function ce(e) {
|
|
10
|
+
return e;
|
|
11
|
+
}
|
|
12
|
+
function ue() {
|
|
13
|
+
var e = ce, a = oe, f = null, y = S(0), s = S(F), o = S(0);
|
|
14
|
+
function l(t) {
|
|
15
|
+
var n, c = (t = j(t)).length, g, x, m = 0, u = new Array(c), i = new Array(c), v = +y.apply(this, arguments), w = Math.min(F, Math.max(-F, s.apply(this, arguments) - v)), h, C = Math.min(Math.abs(w) / c, o.apply(this, arguments)), $ = C * (w < 0 ? -1 : 1), d;
|
|
16
|
+
for (n = 0; n < c; ++n)
|
|
17
|
+
(d = i[u[n] = n] = +e(t[n], n, t)) > 0 && (m += d);
|
|
18
|
+
for (a != null ? u.sort(function(A, D) {
|
|
19
|
+
return a(i[A], i[D]);
|
|
20
|
+
}) : f != null && u.sort(function(A, D) {
|
|
21
|
+
return f(t[A], t[D]);
|
|
22
|
+
}), n = 0, x = m ? (w - c * $) / m : 0; n < c; ++n, v = h)
|
|
23
|
+
g = u[n], d = i[g], h = v + (d > 0 ? d * x : 0) + $, i[g] = {
|
|
24
|
+
data: t[g],
|
|
25
|
+
index: n,
|
|
26
|
+
value: d,
|
|
27
|
+
startAngle: v,
|
|
28
|
+
endAngle: h,
|
|
29
|
+
padAngle: C
|
|
30
|
+
};
|
|
31
|
+
return i;
|
|
32
|
+
}
|
|
33
|
+
return l.value = function(t) {
|
|
34
|
+
return arguments.length ? (e = typeof t == "function" ? t : S(+t), l) : e;
|
|
35
|
+
}, l.sortValues = function(t) {
|
|
36
|
+
return arguments.length ? (a = t, f = null, l) : a;
|
|
37
|
+
}, l.sort = function(t) {
|
|
38
|
+
return arguments.length ? (f = t, a = null, l) : f;
|
|
39
|
+
}, l.startAngle = function(t) {
|
|
40
|
+
return arguments.length ? (y = typeof t == "function" ? t : S(+t), l) : y;
|
|
41
|
+
}, l.endAngle = function(t) {
|
|
42
|
+
return arguments.length ? (s = typeof t == "function" ? t : S(+t), l) : s;
|
|
43
|
+
}, l.padAngle = function(t) {
|
|
44
|
+
return arguments.length ? (o = typeof t == "function" ? t : S(+t), l) : o;
|
|
45
|
+
}, l;
|
|
46
|
+
}
|
|
47
|
+
var pe = ne.pie, N = {
|
|
48
|
+
sections: /* @__PURE__ */ new Map(),
|
|
49
|
+
showData: !1
|
|
50
|
+
}, T = N.sections, G = N.showData, ge = structuredClone(pe), de = /* @__PURE__ */ p(() => structuredClone(ge), "getConfig"), fe = /* @__PURE__ */ p(() => {
|
|
51
|
+
T = /* @__PURE__ */ new Map(), G = N.showData, re();
|
|
52
|
+
}, "clear"), he = /* @__PURE__ */ p(({ label: e, value: a }) => {
|
|
53
|
+
if (a < 0)
|
|
54
|
+
throw new Error(
|
|
55
|
+
`"${e}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`
|
|
56
|
+
);
|
|
57
|
+
T.has(e) || (T.set(e, a), z.debug(`added new section: ${e}, with value: ${a}`));
|
|
58
|
+
}, "addSection"), me = /* @__PURE__ */ p(() => T, "getSections"), ve = /* @__PURE__ */ p((e) => {
|
|
59
|
+
G = e;
|
|
60
|
+
}, "setShowData"), Se = /* @__PURE__ */ p(() => G, "getShowData"), L = {
|
|
61
|
+
getConfig: de,
|
|
62
|
+
clear: fe,
|
|
63
|
+
setDiagramTitle: Q,
|
|
64
|
+
getDiagramTitle: K,
|
|
65
|
+
setAccTitle: J,
|
|
66
|
+
getAccTitle: Z,
|
|
67
|
+
setAccDescription: H,
|
|
68
|
+
getAccDescription: q,
|
|
69
|
+
addSection: he,
|
|
70
|
+
getSections: me,
|
|
71
|
+
setShowData: ve,
|
|
72
|
+
getShowData: Se
|
|
73
|
+
}, ye = /* @__PURE__ */ p((e, a) => {
|
|
74
|
+
ie(e, a), a.setShowData(e.showData), e.sections.map(a.addSection);
|
|
75
|
+
}, "populateDb"), xe = {
|
|
76
|
+
parse: /* @__PURE__ */ p(async (e) => {
|
|
77
|
+
const a = await se("pie", e);
|
|
78
|
+
z.debug(a), ye(a, L);
|
|
79
|
+
}, "parse")
|
|
80
|
+
}, we = /* @__PURE__ */ p((e) => `
|
|
81
|
+
.pieCircle{
|
|
82
|
+
stroke: ${e.pieStrokeColor};
|
|
83
|
+
stroke-width : ${e.pieStrokeWidth};
|
|
84
|
+
opacity : ${e.pieOpacity};
|
|
85
|
+
}
|
|
86
|
+
.pieOuterCircle{
|
|
87
|
+
stroke: ${e.pieOuterStrokeColor};
|
|
88
|
+
stroke-width: ${e.pieOuterStrokeWidth};
|
|
89
|
+
fill: none;
|
|
90
|
+
}
|
|
91
|
+
.pieTitleText {
|
|
92
|
+
text-anchor: middle;
|
|
93
|
+
font-size: ${e.pieTitleTextSize};
|
|
94
|
+
fill: ${e.pieTitleTextColor};
|
|
95
|
+
font-family: ${e.fontFamily};
|
|
96
|
+
}
|
|
97
|
+
.slice {
|
|
98
|
+
font-family: ${e.fontFamily};
|
|
99
|
+
fill: ${e.pieSectionTextColor};
|
|
100
|
+
font-size:${e.pieSectionTextSize};
|
|
101
|
+
// fill: white;
|
|
102
|
+
}
|
|
103
|
+
.legend text {
|
|
104
|
+
fill: ${e.pieLegendTextColor};
|
|
105
|
+
font-family: ${e.fontFamily};
|
|
106
|
+
font-size: ${e.pieLegendTextSize};
|
|
107
|
+
}
|
|
108
|
+
`, "getStyles"), Ae = we, De = /* @__PURE__ */ p((e) => {
|
|
109
|
+
const a = [...e.values()].reduce((s, o) => s + o, 0), f = [...e.entries()].map(([s, o]) => ({ label: s, value: o })).filter((s) => s.value / a * 100 >= 1).sort((s, o) => o.value - s.value);
|
|
110
|
+
return ue().value((s) => s.value)(f);
|
|
111
|
+
}, "createPieArcs"), Ce = /* @__PURE__ */ p((e, a, f, y) => {
|
|
112
|
+
z.debug(`rendering pie chart
|
|
113
|
+
` + e);
|
|
114
|
+
const s = y.db, o = X(), l = Y(s.getConfig(), o.pie), t = 40, n = 18, c = 4, g = 450, x = g, m = ee(a), u = m.append("g");
|
|
115
|
+
u.attr("transform", "translate(" + x / 2 + "," + g / 2 + ")");
|
|
116
|
+
const { themeVariables: i } = o;
|
|
117
|
+
let [v] = te(i.pieOuterStrokeWidth);
|
|
118
|
+
v ?? (v = 2);
|
|
119
|
+
const w = l.textPosition, h = Math.min(x, g) / 2 - t, C = I().innerRadius(0).outerRadius(h), $ = I().innerRadius(h * w).outerRadius(h * w);
|
|
120
|
+
u.append("circle").attr("cx", 0).attr("cy", 0).attr("r", h + v / 2).attr("class", "pieOuterCircle");
|
|
121
|
+
const d = s.getSections(), A = De(d), D = [
|
|
122
|
+
i.pie1,
|
|
123
|
+
i.pie2,
|
|
124
|
+
i.pie3,
|
|
125
|
+
i.pie4,
|
|
126
|
+
i.pie5,
|
|
127
|
+
i.pie6,
|
|
128
|
+
i.pie7,
|
|
129
|
+
i.pie8,
|
|
130
|
+
i.pie9,
|
|
131
|
+
i.pie10,
|
|
132
|
+
i.pie11,
|
|
133
|
+
i.pie12
|
|
134
|
+
];
|
|
135
|
+
let b = 0;
|
|
136
|
+
d.forEach((r) => {
|
|
137
|
+
b += r;
|
|
138
|
+
});
|
|
139
|
+
const W = A.filter((r) => (r.data.value / b * 100).toFixed(0) !== "0"), E = le(D);
|
|
140
|
+
u.selectAll("mySlices").data(W).enter().append("path").attr("d", C).attr("fill", (r) => E(r.data.label)).attr("class", "pieCircle"), u.selectAll("mySlices").data(W).enter().append("text").text((r) => (r.data.value / b * 100).toFixed(0) + "%").attr("transform", (r) => "translate(" + $.centroid(r) + ")").style("text-anchor", "middle").attr("class", "slice"), u.append("text").text(s.getDiagramTitle()).attr("x", 0).attr("y", -400 / 2).attr("class", "pieTitleText");
|
|
141
|
+
const O = [...d.entries()].map(([r, M]) => ({
|
|
142
|
+
label: r,
|
|
143
|
+
value: M
|
|
144
|
+
})), k = u.selectAll(".legend").data(O).enter().append("g").attr("class", "legend").attr("transform", (r, M) => {
|
|
145
|
+
const R = n + c, B = R * O.length / 2, V = 12 * n, U = M * R - B;
|
|
146
|
+
return "translate(" + V + "," + U + ")";
|
|
147
|
+
});
|
|
148
|
+
k.append("rect").attr("width", n).attr("height", n).style("fill", (r) => E(r.label)).style("stroke", (r) => E(r.label)), k.append("text").attr("x", n + c).attr("y", n - c).text((r) => s.getShowData() ? `${r.label} [${r.value}]` : r.label);
|
|
149
|
+
const _ = Math.max(
|
|
150
|
+
...k.selectAll("text").nodes().map((r) => (r == null ? void 0 : r.getBoundingClientRect().width) ?? 0)
|
|
151
|
+
), P = x + t + n + c + _;
|
|
152
|
+
m.attr("viewBox", `0 0 ${P} ${g}`), ae(m, g, P, l.useMaxWidth);
|
|
153
|
+
}, "draw"), $e = { draw: Ce }, Fe = {
|
|
154
|
+
parser: xe,
|
|
155
|
+
db: L,
|
|
156
|
+
renderer: $e,
|
|
157
|
+
styles: Ae
|
|
158
|
+
};
|
|
159
|
+
export {
|
|
160
|
+
Fe as diagram
|
|
161
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./mermaid.core-CCMj67LO.cjs"),q=require("./chunk-4BX2VUAB-BT8x_a4k.cjs"),B=require("./treemap-KMMF4GRG-DJHv4WOZ.cjs"),O=require("./arc-Be_AVKBg.cjs"),V=require("./ordinal-CagbB1m8.cjs");function U(e,n){return n<e?-1:n>e?1:n>=e?0:NaN}function j(e){return e}function K(){var e=j,n=U,f=null,S=t.constant(0),s=t.constant(t.tau),c=t.constant(0);function o(a){var i,u=(a=t.array(a)).length,p,y,h=0,g=new Array(u),l=new Array(u),v=+S.apply(this,arguments),A=Math.min(t.tau,Math.max(-t.tau,s.apply(this,arguments)-v)),m,w=Math.min(Math.abs(A)/u,c.apply(this,arguments)),T=w*(A<0?-1:1),d;for(i=0;i<u;++i)(d=l[g[i]=i]=+e(a[i],i,a))>0&&(h+=d);for(n!=null?g.sort(function(x,D){return n(l[x],l[D])}):f!=null&&g.sort(function(x,D){return f(a[x],a[D])}),i=0,y=h?(A-u*T)/h:0;i<u;++i,v=m)p=g[i],d=l[p],m=v+(d>0?d*y:0)+T,l[p]={data:a[p],index:i,value:d,startAngle:v,endAngle:m,padAngle:w};return l}return o.value=function(a){return arguments.length?(e=typeof a=="function"?a:t.constant(+a),o):e},o.sortValues=function(a){return arguments.length?(n=a,f=null,o):n},o.sort=function(a){return arguments.length?(f=a,n=null,o):f},o.startAngle=function(a){return arguments.length?(S=typeof a=="function"?a:t.constant(+a),o):S},o.endAngle=function(a){return arguments.length?(s=typeof a=="function"?a:t.constant(+a),o):s},o.padAngle=function(a){return arguments.length?(c=typeof a=="function"?a:t.constant(+a),o):c},o}var X=t.defaultConfig_default.pie,k={sections:new Map,showData:!1},_=k.sections,E=k.showData,Z=structuredClone(X),H=t.__name(()=>structuredClone(Z),"getConfig"),J=t.__name(()=>{_=new Map,E=k.showData,t.clear()},"clear"),Q=t.__name(({label:e,value:n})=>{if(n<0)throw new Error(`"${e}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);_.has(e)||(_.set(e,n),t.log.debug(`added new section: ${e}, with value: ${n}`))},"addSection"),Y=t.__name(()=>_,"getSections"),ee=t.__name(e=>{E=e},"setShowData"),te=t.__name(()=>E,"getShowData"),P={getConfig:H,clear:J,setDiagramTitle:t.setDiagramTitle,getDiagramTitle:t.getDiagramTitle,setAccTitle:t.setAccTitle,getAccTitle:t.getAccTitle,setAccDescription:t.setAccDescription,getAccDescription:t.getAccDescription,addSection:Q,getSections:Y,setShowData:ee,getShowData:te},ae=t.__name((e,n)=>{q.populateCommonDb(e,n),n.setShowData(e.showData),e.sections.map(n.addSection)},"populateDb"),ne={parse:t.__name(async e=>{const n=await B.parse("pie",e);t.log.debug(n),ae(n,P)},"parse")},re=t.__name(e=>`
|
|
2
|
+
.pieCircle{
|
|
3
|
+
stroke: ${e.pieStrokeColor};
|
|
4
|
+
stroke-width : ${e.pieStrokeWidth};
|
|
5
|
+
opacity : ${e.pieOpacity};
|
|
6
|
+
}
|
|
7
|
+
.pieOuterCircle{
|
|
8
|
+
stroke: ${e.pieOuterStrokeColor};
|
|
9
|
+
stroke-width: ${e.pieOuterStrokeWidth};
|
|
10
|
+
fill: none;
|
|
11
|
+
}
|
|
12
|
+
.pieTitleText {
|
|
13
|
+
text-anchor: middle;
|
|
14
|
+
font-size: ${e.pieTitleTextSize};
|
|
15
|
+
fill: ${e.pieTitleTextColor};
|
|
16
|
+
font-family: ${e.fontFamily};
|
|
17
|
+
}
|
|
18
|
+
.slice {
|
|
19
|
+
font-family: ${e.fontFamily};
|
|
20
|
+
fill: ${e.pieSectionTextColor};
|
|
21
|
+
font-size:${e.pieSectionTextSize};
|
|
22
|
+
// fill: white;
|
|
23
|
+
}
|
|
24
|
+
.legend text {
|
|
25
|
+
fill: ${e.pieLegendTextColor};
|
|
26
|
+
font-family: ${e.fontFamily};
|
|
27
|
+
font-size: ${e.pieLegendTextSize};
|
|
28
|
+
}
|
|
29
|
+
`,"getStyles"),ie=re,le=t.__name(e=>{const n=[...e.values()].reduce((s,c)=>s+c,0),f=[...e.entries()].map(([s,c])=>({label:s,value:c})).filter(s=>s.value/n*100>=1).sort((s,c)=>c.value-s.value);return K().value(s=>s.value)(f)},"createPieArcs"),se=t.__name((e,n,f,S)=>{t.log.debug(`rendering pie chart
|
|
30
|
+
`+e);const s=S.db,c=t.getConfig2(),o=t.cleanAndMerge(s.getConfig(),c.pie),a=40,i=18,u=4,p=450,y=p,h=t.selectSvgElement(n),g=h.append("g");g.attr("transform","translate("+y/2+","+p/2+")");const{themeVariables:l}=c;let[v]=t.parseFontSize(l.pieOuterStrokeWidth);v??(v=2);const A=o.textPosition,m=Math.min(y,p)/2-a,w=O.d3arc().innerRadius(0).outerRadius(m),T=O.d3arc().innerRadius(m*A).outerRadius(m*A);g.append("circle").attr("cx",0).attr("cy",0).attr("r",m+v/2).attr("class","pieOuterCircle");const d=s.getSections(),x=le(d),D=[l.pie1,l.pie2,l.pie3,l.pie4,l.pie5,l.pie6,l.pie7,l.pie8,l.pie9,l.pie10,l.pie11,l.pie12];let C=0;d.forEach(r=>{C+=r});const F=x.filter(r=>(r.data.value/C*100).toFixed(0)!=="0"),$=V.ordinal(D);g.selectAll("mySlices").data(F).enter().append("path").attr("d",w).attr("fill",r=>$(r.data.label)).attr("class","pieCircle"),g.selectAll("mySlices").data(F).enter().append("text").text(r=>(r.data.value/C*100).toFixed(0)+"%").attr("transform",r=>"translate("+T.centroid(r)+")").style("text-anchor","middle").attr("class","slice"),g.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText");const G=[...d.entries()].map(([r,M])=>({label:r,value:M})),b=g.selectAll(".legend").data(G).enter().append("g").attr("class","legend").attr("transform",(r,M)=>{const N=i+u,W=N*G.length/2,I=12*i,L=M*N-W;return"translate("+I+","+L+")"});b.append("rect").attr("width",i).attr("height",i).style("fill",r=>$(r.label)).style("stroke",r=>$(r.label)),b.append("text").attr("x",i+u).attr("y",i-u).text(r=>s.getShowData()?`${r.label} [${r.value}]`:r.label);const R=Math.max(...b.selectAll("text").nodes().map(r=>(r==null?void 0:r.getBoundingClientRect().width)??0)),z=y+a+i+u+R;h.attr("viewBox",`0 0 ${z} ${p}`),t.configureSvgSize(h,p,z,o.useMaxWidth)},"draw"),oe={draw:se},ce={parser:ne,db:P,renderer:oe,styles:ie};exports.diagram=ce;
|