orbitchat 2.2.10 → 2.3.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/assets/{_basePickBy-0t-1TdXj-DH4J1m8V.js → _basePickBy-lBvRrdD9-B-9MpFjW.js} +1 -1
- package/dist/assets/_baseUniq-BtBvqxlY-Dv5C3esR.js +1 -0
- package/dist/assets/{api-0NuHuopb.js → api-CV6_7nU6.js} +1 -1
- package/dist/assets/arc-CCBnZEkJ-DybyxfWt.js +1 -0
- package/dist/assets/{architectureDiagram-VXUJARFQ-5Jt_APG9-BoVNR4UV.js → architectureDiagram-VXUJARFQ-D6fnSZjh-dA25eufs.js} +1 -1
- package/dist/assets/{blockDiagram-VD42YOAC-DTiW7a-n-CSp1ALjf.js → blockDiagram-VD42YOAC-CVjY2HvJ-Bvs-2xFL.js} +5 -5
- package/dist/assets/{c4Diagram-YG6GDRKO-DfrzrMnC-CkCuHyrT.js → c4Diagram-YG6GDRKO-C-f-jRtb-CBj7d1Qp.js} +3 -3
- package/dist/assets/channel-BvgtnSqX-CiCpm-FK.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-DP6WsS5b-DmFzjHyq.js → chunk-4BX2VUAB-ecO_Iw3K-Dsg9QQ9e.js} +1 -1
- package/dist/assets/chunk-55IACEB6-BFlfi8hV-BGJXNzLC.js +1 -0
- package/dist/assets/{chunk-B4BG7PRW-BVaRFjbY-BdpIBFL7.js → chunk-B4BG7PRW-0M4wlQGy-BFIioH1f.js} +5 -5
- package/dist/assets/{chunk-DI55MBZ5-NwybRWU6-D93ibRgN.js → chunk-DI55MBZ5-DcwSH2gI-uNFBVBGw.js} +3 -3
- package/dist/assets/{chunk-FMBD7UC4-D0AjqgJd-BqUKvjQH.js → chunk-FMBD7UC4-CyW6Y4c1-Cvb-I-1S.js} +1 -1
- package/dist/assets/{chunk-QN33PNHL-cmS1bOzt-B1tGHIDu.js → chunk-QN33PNHL-DF3LkPOs-IyOxcAL-.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-DehtyeGo-BsFo-AuY.js → chunk-QZHKN3VN-BnmCvaos-BhXhqQoN.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-BILiPuwH-DOft2nRu.js → chunk-TZMSLE5B-C4Hy1m-m-DFftuvKT.js} +1 -1
- package/dist/assets/classDiagram-2ON5EDUG-C2K4H7s6-BqCqtggy.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-C2K4H7s6-BqCqtggy.js +1 -0
- package/dist/assets/clone-DlVqQknZ-BDJyp8y8.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-CDJ5hD7Q-BcxkEWNp.js → cose-bilkent-S5V4N54A-mo6qcR8E-D_z6t4Tf.js} +1 -1
- package/dist/assets/dagre-6UL2VRFP-DH4t_gQU-UMN3n2-7.js +4 -0
- package/dist/assets/{diagram-PSM6KHXK-C0ItMhu6-BHHxSZE4.js → diagram-PSM6KHXK-xncR2khS-DE1fEkBR.js} +1 -1
- package/dist/assets/{diagram-QEK2KX5R-CEsgotfL-F-1j8qO7.js → diagram-QEK2KX5R-CSzZUVkA-tJcvFwfU.js} +1 -1
- package/dist/assets/{diagram-S2PKOQOG-B6d1S6_G-Zzv-O9xk.js → diagram-S2PKOQOG-CTsV2Ry--BQlcrrcr.js} +2 -2
- package/dist/assets/{erDiagram-Q2GNP2WA-B-w3sS7V-2nanwMJ6.js → erDiagram-Q2GNP2WA-C-DLmzQQ-B-jtk4eF.js} +5 -5
- package/dist/assets/{flowDiagram-NV44I4VS-DssRq_2c-BffMgd28.js → flowDiagram-NV44I4VS-9jalL_2N-DKuPtUeP.js} +1 -1
- package/dist/assets/{ganttDiagram-JELNMOA3-IIlGW_kJ-Dxu3SgAH.js → ganttDiagram-JELNMOA3-B5Q1jKOu-Ho5f5uzH.js} +3 -3
- package/dist/assets/gitGraphDiagram-NY62KEGX-ug9A7XoP-D9w06-2F.js +65 -0
- package/dist/assets/{graph-BZqzM_VI-BBLTPB3S.js → graph-C-LzaQKB-Cch5aJ-h.js} +1 -1
- package/dist/assets/{index-rkYlv_42-Bg0V1tPP.js → index-B04ueuvU-Cvw4_ymU.js} +1 -1
- package/dist/assets/{index-DodYl3VC.js → index-DiPXXjl1.js} +93 -90
- package/dist/assets/infoDiagram-WHAUD3N6-D3nyF9iF-BjcBjZOT.js +2 -0
- package/dist/assets/{journeyDiagram-XKPGCS4Q-D6S72Oe9-iYQx9Mof.js → journeyDiagram-XKPGCS4Q-DrGofxJ_-Zv8ktrVj.js} +4 -4
- package/dist/assets/{kanban-definition-3W4ZIXB7--JZpAUKg-C2LOftDm.js → kanban-definition-3W4ZIXB7-DPOqAG2O-DfLp3ebY.js} +6 -6
- package/dist/assets/{layout-DHdXRoe5-CY2O2SIL.js → layout-Cx9iE-zh-K_S5vGG7.js} +1 -1
- package/dist/assets/{mindmap-definition-VGOIOE7T-I33kejqp-b66KO8Rt.js → mindmap-definition-VGOIOE7T-CDbIuwaY-D4Ih9cyZ.js} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-69ywrIzx-ceXn0a9Q.js → pieDiagram-ADFJNKIX-DFk5HpTR-BSzTH4-Z.js} +3 -3
- package/dist/assets/{quadrantDiagram-AYHSOK5B-CySBol3o-CltGpVzM.js → quadrantDiagram-AYHSOK5B-B92wNx9A-Bpuj71wR.js} +5 -5
- package/dist/assets/{requirementDiagram-UZGBJVZJ-BL-LwQUQ-DM_SSY8F.js → requirementDiagram-UZGBJVZJ-DbcE1GOH-BSV5OUP4.js} +1 -1
- package/dist/assets/{sankeyDiagram-TZEHDZUN-D3rAZVzY-BAAQukCD.js → sankeyDiagram-TZEHDZUN-B0rVCfiD-kdmAtl5Z.js} +3 -3
- package/dist/assets/{sequenceDiagram-WL72ISMW-BfBBVBjh-C993xDQ0.js → sequenceDiagram-WL72ISMW-Ch4qd1_w-DeggnvKy.js} +8 -8
- package/dist/assets/{stateDiagram-FKZM4ZOC-CioTL1ci-eXs9ZVMI.js → stateDiagram-FKZM4ZOC-BXSNYh_4-BBInmGsn.js} +1 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3--JZPzZ-Q-C0r6gD51.js +1 -0
- package/dist/assets/{timeline-definition-IT6M3QCI-DJ1oTa68-Cp1nvAUx.js → timeline-definition-IT6M3QCI-BaU6yGwl-BdHCQ244.js} +4 -4
- package/dist/assets/{treemap-KMMF4GRG-BLuW6hva-CvNDnceM.js → treemap-KMMF4GRG-B8dtJA6c-C7398h3b.js} +38 -38
- package/dist/assets/{xychartDiagram-PRI3JC2R-BahWB4u4-B6_eZy6F.js → xychartDiagram-PRI3JC2R-CdE6529H-Bf_betHN.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/_baseUniq-DZ7Bpu3I-Co9egLVD.js +0 -1
- package/dist/assets/arc-CsV8WDj2-C9VadXC6.js +0 -1
- package/dist/assets/channel-C1GZ9yWj-DYugq-sa.js +0 -1
- package/dist/assets/chunk-55IACEB6-DcZAWW2t-DPyoMeFz.js +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-_7dtGwsA-C3Nhy3w6.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-_7dtGwsA-C3Nhy3w6.js +0 -1
- package/dist/assets/clone-D8_vOzkg-D9aZREI4.js +0 -1
- package/dist/assets/dagre-6UL2VRFP-D6cOp6Da-xpk1mIcg.js +0 -4
- package/dist/assets/gitGraphDiagram-NY62KEGX-D9Tl4KHH--tnJGvul.js +0 -65
- package/dist/assets/infoDiagram-WHAUD3N6-CjmJiQNf-YInQHfWX.js +0 -2
- package/dist/assets/stateDiagram-v2-4FDKWEC3-CNXUSYFj-C88PWSf5.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{I as a,h as gi,p as ui,C as Xt,A as xi,d as di,u as pi,O as Nt,am as fi,B as yi,G as mi,L as wt,Z as Ot,M as bi,at as Ai,S as Si,au as wi,av as Mt,$ as Bt,aw as zt}from"./index-DiPXXjl1.js";var mt=function(){var t=a(function(v,h,c,g){for(c=c||{},g=v.length;g--;c[v[g]]=h);return c},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],l=[1,5],p=[1,6],u=[1,7],m=[1,5,10,12,14,16,18,19,21,23,34,35,36],L=[1,25],z=[1,26],$=[1,28],R=[1,29],P=[1,30],F=[1,31],W=[1,32],T=[1,33],I=[1,34],d=[1,35],A=[1,36],r=[1,37],M=[1,43],B=[1,42],U=[1,47],N=[1,50],o=[1,10,12,14,16,18,19,21,23,34,35,36],C=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],b=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],S=[1,64],j={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(v,h,c,g,y,n,k){var x=n.length-1;switch(y){case 5:g.setOrientation(n[x]);break;case 9:g.setDiagramTitle(n[x].text.trim());break;case 12:g.setLineData({text:"",type:"text"},n[x]);break;case 13:g.setLineData(n[x-1],n[x]);break;case 14:g.setBarData({text:"",type:"text"},n[x]);break;case 15:g.setBarData(n[x-1],n[x]);break;case 16:this.$=n[x].trim(),g.setAccTitle(this.$);break;case 17:case 18:this.$=n[x].trim(),g.setAccDescription(this.$);break;case 19:this.$=n[x-1];break;case 20:this.$=[Number(n[x-2]),...n[x]];break;case 21:this.$=[Number(n[x])];break;case 22:g.setXAxisTitle(n[x]);break;case 23:g.setXAxisTitle(n[x-1]);break;case 24:g.setXAxisTitle({type:"text",text:""});break;case 25:g.setXAxisBand(n[x]);break;case 26:g.setXAxisRangeData(Number(n[x-2]),Number(n[x]));break;case 27:this.$=n[x-1];break;case 28:this.$=[n[x-2],...n[x]];break;case 29:this.$=[n[x]];break;case 30:g.setYAxisTitle(n[x]);break;case 31:g.setYAxisTitle(n[x-1]);break;case 32:g.setYAxisTitle({type:"text",text:""});break;case 33:g.setYAxisRangeData(Number(n[x-2]),Number(n[x]));break;case 37:this.$={text:n[x],type:"text"};break;case 38:this.$={text:n[x],type:"text"};break;case 39:this.$={text:n[x],type:"markdown"};break;case 40:this.$=n[x];break;case 41:this.$=n[x-1]+""+n[x];break}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:l,35:p,36:u}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:l,35:p,36:u}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:l,35:p,36:u}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(m,[2,34]),t(m,[2,35]),t(m,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:l,35:p,36:u}),{1:[2,3]},t(m,[2,5]),t(i,[2,7],{4:22,34:l,35:p,36:u}),{11:23,37:24,38:L,39:z,40:27,41:$,42:R,43:P,44:F,45:W,46:T,47:I,48:d,49:A,50:r},{11:39,13:38,24:M,27:B,29:40,30:41,37:24,38:L,39:z,40:27,41:$,42:R,43:P,44:F,45:W,46:T,47:I,48:d,49:A,50:r},{11:45,15:44,27:U,33:46,37:24,38:L,39:z,40:27,41:$,42:R,43:P,44:F,45:W,46:T,47:I,48:d,49:A,50:r},{11:49,17:48,24:N,37:24,38:L,39:z,40:27,41:$,42:R,43:P,44:F,45:W,46:T,47:I,48:d,49:A,50:r},{11:52,17:51,24:N,37:24,38:L,39:z,40:27,41:$,42:R,43:P,44:F,45:W,46:T,47:I,48:d,49:A,50:r},{20:[1,53]},{22:[1,54]},t(o,[2,18]),{1:[2,2]},t(o,[2,8]),t(o,[2,9]),t(C,[2,37],{40:55,41:$,42:R,43:P,44:F,45:W,46:T,47:I,48:d,49:A,50:r}),t(C,[2,38]),t(C,[2,39]),t(b,[2,40]),t(b,[2,42]),t(b,[2,43]),t(b,[2,44]),t(b,[2,45]),t(b,[2,46]),t(b,[2,47]),t(b,[2,48]),t(b,[2,49]),t(b,[2,50]),t(b,[2,51]),t(o,[2,10]),t(o,[2,22],{30:41,29:56,24:M,27:B}),t(o,[2,24]),t(o,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:L,39:z,40:27,41:$,42:R,43:P,44:F,45:W,46:T,47:I,48:d,49:A,50:r},t(o,[2,11]),t(o,[2,30],{33:60,27:U}),t(o,[2,32]),{31:[1,61]},t(o,[2,12]),{17:62,24:N},{25:63,27:S},t(o,[2,14]),{17:65,24:N},t(o,[2,16]),t(o,[2,17]),t(b,[2,41]),t(o,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(o,[2,31]),{27:[1,69]},t(o,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(o,[2,15]),t(o,[2,26]),t(o,[2,27]),{11:59,32:72,37:24,38:L,39:z,40:27,41:$,42:R,43:P,44:F,45:W,46:T,47:I,48:d,49:A,50:r},t(o,[2,33]),t(o,[2,19]),{25:73,27:S},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(v,h){if(h.recoverable)this.trace(v);else{var c=new Error(v);throw c.hash=h,c}},"parseError"),parse:a(function(v){var h=this,c=[0],g=[],y=[null],n=[],k=this.table,x="",q=0,vt=0,oi=2,Et=1,ri=n.slice.call(arguments,1),w=Object.create(this.lexer),V={yy:{}};for(var at in this.yy)Object.prototype.hasOwnProperty.call(this.yy,at)&&(V.yy[at]=this.yy[at]);w.setInput(v,V.yy),V.yy.lexer=w,V.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var nt=w.yylloc;n.push(nt);var li=w.options&&w.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ci(D){c.length=c.length-2*D,y.length=y.length-D,n.length=n.length-D}a(ci,"popStack");function $t(){var D;return D=g.pop()||w.lex()||Et,typeof D!="number"&&(D instanceof Array&&(g=D,D=g.pop()),D=h.symbols_[D]||D),D}a($t,"lex");for(var _,Y,E,ht,H={},tt,X,It,it;;){if(Y=c[c.length-1],this.defaultActions[Y]?E=this.defaultActions[Y]:((_===null||typeof _>"u")&&(_=$t()),E=k[Y]&&k[Y][_]),typeof E>"u"||!E.length||!E[0]){var ot="";it=[];for(tt in k[Y])this.terminals_[tt]&&tt>oi&&it.push("'"+this.terminals_[tt]+"'");w.showPosition?ot="Parse error on line "+(q+1)+`:
|
|
2
2
|
`+w.showPosition()+`
|
|
3
3
|
Expecting `+it.join(", ")+", got '"+(this.terminals_[_]||_)+"'":ot="Parse error on line "+(q+1)+": Unexpected "+(_==Et?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(ot,{text:w.match,token:this.terminals_[_]||_,line:w.yylineno,loc:nt,expected:it})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Y+", token: "+_);switch(E[0]){case 1:c.push(_),y.push(w.yytext),n.push(w.yylloc),c.push(E[1]),_=null,vt=w.yyleng,x=w.yytext,q=w.yylineno,nt=w.yylloc;break;case 2:if(X=this.productions_[E[1]][1],H.$=y[y.length-X],H._$={first_line:n[n.length-(X||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(X||1)].first_column,last_column:n[n.length-1].last_column},li&&(H._$.range=[n[n.length-(X||1)].range[0],n[n.length-1].range[1]]),ht=this.performAction.apply(H,[x,vt,q,V.yy,E[1],y,n].concat(ri)),typeof ht<"u")return ht;X&&(c=c.slice(0,-1*X*2),y=y.slice(0,-1*X),n=n.slice(0,-1*X)),c.push(this.productions_[E[1]][0]),y.push(H.$),n.push(H._$),It=k[c[c.length-2]][c[c.length-1]],c.push(It);break;case 3:return!0}}return!0},"parse")},J=function(){var v={EOF:1,parseError:a(function(h,c){if(this.yy.parser)this.yy.parser.parseError(h,c);else throw new Error(h)},"parseError"),setInput:a(function(h,c){return this.yy=c||this.yy||{},this._input=h,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 h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var c=h.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var c=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var y=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),g.length-1&&(this.yylineno-=g.length-1);var n=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:g?(g.length===y.length?this.yylloc.first_column:0)+y[y.length-g.length].length-g[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-c]),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).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),c=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
|
5
5
|
`+c+"^"},"showPosition"),test_match:a(function(h,c){var g,y,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),y=h[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,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(h[0].length),this.matched+=h[0],g=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var k in n)this[k]=n[k];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,c,g,y;this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),k=0;k<n.length;k++)if(g=this._input.match(this.rules[n[k]]),g&&(!c||g[0].length>c[0].length)){if(c=g,y=k,this.options.backtrack_lexer){if(h=this.test_match(g,n[k]),h!==!1)return h;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(h=this.test_match(c,n[y]),h!==!1?h:!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(function(){var h=this.next();return h||this.lex()},"lex"),begin:a(function(h){this.conditionStack.push(h)},"begin"),popState:a(function(){var h=this.conditionStack.length-1;return h>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(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:a(function(h){this.begin(h)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(h,c,g,y){switch(g){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return v}();G.lexer=J;function O(){this.yy={}}return a(O,"Parser"),O.prototype=G,G.Parser=O,new O}();mt.parser=mt;var Ci=mt;function bt(t){return t.type==="bar"}a(bt,"isBarPlot");function Ct(t){return t.type==="band"}a(Ct,"isBandAxisData");function j(t){return t.type==="linear"}a(j,"isLinearAxisData");var rt,Vt=(rt=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((l,p)=>Math.max(p.length,l),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const l of t){const p=wi(s,1,l),u=p?p.width:l.length*i,m=p?p.height:i;e.width=Math.max(e.width,u),e.height=Math.max(e.height,m)}return s.remove(),e}},a(rt,"TextDimensionCalculatorWithFont"),rt),Ft=.7,Wt=.2,lt,Yt=(lt=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Ft*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Ft*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=Wt*t.width;this.outerPadding=Math.min(e.width/2,s);const l=e.height+this.axisConfig.labelPadding*2;this.labelTextHeight=e.height,l<=i&&(i-=l,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),s=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,s<=i&&(i-=s,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=Wt*t.height;this.outerPadding=Math.min(e.height/2,s);const l=e.width+this.axisConfig.labelPadding*2;l<=i&&(i-=l,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),s=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,s<=i&&(i-=s,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${i},${this.getScaleValue(e)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(e)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${i} L ${this.getScaleValue(e)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},a(lt,"BaseAxis"),lt),ct,ki=(ct=class extends Yt{constructor(t,i,e,s,l){super(t,s,l,i),this.categories=e,this.scale=Mt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=Mt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Nt.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},a(ct,"BandAxis"),ct),gt,_i=(gt=class extends Yt{constructor(t,i,e,s,l){super(t,s,l,i),this.domain=e,this.scale=Bt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Bt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},a(gt,"LinearAxis"),gt);function At(t,i,e,s){const l=new Vt(s);return Ct(t)?new ki(i,e,t.categories,t.title,l):new _i(i,e,[t.min,t.max],t.title,l)}a(At,"getAxis");var ut,Ri=(ut=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},a(ut,"ChartTitle"),ut);function Ut(t,i,e,s){const l=new Vt(s);return new Ri(l,t,i,e)}a(Ut,"getChartTitleComponent");var xt,Ti=(xt=class{constructor(t,i,e,s,l){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=l}getDrawableElement(){const t=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]);let i;return this.orientation==="horizontal"?i=zt().y(e=>e[0]).x(e=>e[1])(t):i=zt().x(e=>e[0]).y(e=>e[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},a(xt,"LinePlot"),xt),dt,Di=(dt=class{constructor(t,i,e,s,l,p){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=l,this.plotIndex=p}getDrawableElement(){const t=this.barData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]),i=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),e=i/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(s=>({x:this.boundingRect.x,y:s[0]-e,height:i,width:s[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(s=>({x:s[0]-e,y:s[1],width:i,height:this.boundingRect.y+this.boundingRect.height-s[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},a(dt,"BarPlot"),dt),pt,Li=(pt=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new Ti(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new Di(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break}return t}},a(pt,"BasePlot"),pt);function Ht(t,i,e){return new Li(t,i,e)}a(Ht,"getPlotComponent");var ft,Pi=(ft=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:Ut(t,i,e,s),plot:Ht(t,i,e),xAxis:At(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:At(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,l=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),p=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),u=this.componentStore.plot.calculateSpace({width:l,height:p});t-=u.width,i-=u.height,u=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=u.height,i-=u.height,this.componentStore.xAxis.setAxisPosition("bottom"),u=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=u.height,this.componentStore.yAxis.setAxisPosition("left"),u=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=u.width,t-=u.width,t>0&&(l+=t,t=0),i>0&&(p+=i,i=0),this.componentStore.plot.calculateSpace({width:l,height:p}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+l]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+p}),this.componentStore.yAxis.setRange([s,s+p]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(m=>bt(m))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,l=0,p=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),u=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),m=this.componentStore.plot.calculateSpace({width:p,height:u});t-=m.width,i-=m.height,m=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=m.height,i-=m.height,this.componentStore.xAxis.setAxisPosition("left"),m=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=m.width,s=m.width,this.componentStore.yAxis.setAxisPosition("top"),m=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=m.height,l=e+m.height,t>0&&(p+=t,t=0),i>0&&(u+=i,i=0),this.componentStore.plot.calculateSpace({width:p,height:u}),this.componentStore.plot.setBoundingBoxXY({x:s,y:l}),this.componentStore.yAxis.setRange([s,s+p]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([l,l+u]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:l}),this.chartData.plots.some(L=>bt(L))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},a(ft,"Orchestrator"),ft),yt,vi=(yt=class{static build(t,i,e,s){return new Pi(t,i,e,s).getDrawableElement()}},a(yt,"XYChartBuilder"),yt),Q=0,jt,K=Rt(),Z=_t(),f=Tt(),St=Z.plotColorPalette.split(",").map(t=>t.trim()),et=!1,kt=!1;function _t(){const t=Ai(),i=wt();return Ot(t.xyChart,i.themeVariables.xyChart)}a(_t,"getChartDefaultThemeConfig");function Rt(){const t=wt();return Ot(bi.xyChart,t.xyChart)}a(Rt,"getChartDefaultConfig");function Tt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}a(Tt,"getChartDefaultData");function st(t){const i=wt();return Si(t.trim(),i)}a(st,"textSanitizer");function Gt(t){jt=t}a(Gt,"setTmpSVGG");function Qt(t){t==="horizontal"?K.chartOrientation="horizontal":K.chartOrientation="vertical"}a(Qt,"setOrientation");function Kt(t){f.xAxis.title=st(t.text)}a(Kt,"setXAxisTitle");function Dt(t,i){f.xAxis={type:"linear",title:f.xAxis.title,min:t,max:i},et=!0}a(Dt,"setXAxisRangeData");function Zt(t){f.xAxis={type:"band",title:f.xAxis.title,categories:t.map(i=>st(i.text))},et=!0}a(Zt,"setXAxisBand");function Jt(t){f.yAxis.title=st(t.text)}a(Jt,"setYAxisTitle");function qt(t,i){f.yAxis={type:"linear",title:f.yAxis.title,min:t,max:i},kt=!0}a(qt,"setYAxisRangeData");function ti(t){const i=Math.min(...t),e=Math.max(...t),s=j(f.yAxis)?f.yAxis.min:1/0,l=j(f.yAxis)?f.yAxis.max:-1/0;f.yAxis={type:"linear",title:f.yAxis.title,min:Math.min(s,i),max:Math.max(l,e)}}a(ti,"setYAxisRangeFromPlotData");function Lt(t){let i=[];if(t.length===0)return i;if(!et){const e=j(f.xAxis)?f.xAxis.min:1/0,s=j(f.xAxis)?f.xAxis.max:-1/0;Dt(Math.min(e,1),Math.max(s,t.length))}if(kt||ti(t),Ct(f.xAxis)&&(i=f.xAxis.categories.map((e,s)=>[e,t[s]])),j(f.xAxis)){const e=f.xAxis.min,s=f.xAxis.max,l=(s-e)/(t.length-1),p=[];for(let u=e;u<=s;u+=l)p.push(`${u}`);i=p.map((u,m)=>[u,t[m]])}return i}a(Lt,"transformDataWithoutCategory");function Pt(t){return St[t===0?0:t%St.length]}a(Pt,"getPlotColorFromPalette");function ii(t,i){const e=Lt(i);f.plots.push({type:"line",strokeFill:Pt(Q),strokeWidth:2,data:e}),Q++}a(ii,"setLineData");function ei(t,i){const e=Lt(i);f.plots.push({type:"bar",fill:Pt(Q),data:e}),Q++}a(ei,"setBarData");function si(){if(f.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return f.title=Xt(),vi.build(K,f,Z,jt)}a(si,"getDrawableElem");function ai(){return Z}a(ai,"getChartThemeConfig");function ni(){return K}a(ni,"getChartConfig");function hi(){return f}a(hi,"getXYChartData");var Ei=a(function(){mi(),Q=0,K=Rt(),f=Tt(),Z=_t(),St=Z.plotColorPalette.split(",").map(t=>t.trim()),et=!1,kt=!1},"clear"),$i={getDrawableElem:si,clear:Ei,setAccTitle:pi,getAccTitle:di,setDiagramTitle:xi,getDiagramTitle:Xt,getAccDescription:ui,setAccDescription:gi,setOrientation:Qt,setXAxisTitle:Kt,setXAxisRangeData:Dt,setXAxisBand:Zt,setYAxisTitle:Jt,setYAxisRangeData:qt,setLineData:ii,setBarData:ei,setTmpSVGG:Gt,getChartThemeConfig:ai,getChartConfig:ni,getXYChartData:hi},Ii=a((t,i,e,s)=>{const l=s.db,p=l.getChartThemeConfig(),u=l.getChartConfig(),m=l.getXYChartData().plots[0].data.map(d=>d[1]);function L(d){return d==="top"?"text-before-edge":"middle"}a(L,"getDominantBaseLine");function z(d){return d==="left"?"start":d==="right"?"end":"middle"}a(z,"getTextAnchor");function $(d){return`translate(${d.x}, ${d.y}) rotate(${d.rotation||0})`}a($,"getTextTransformation"),Nt.debug(`Rendering xychart chart
|
|
7
|
-
`+t);const R=fi(i),P=R.append("g").attr("class","main"),F=P.append("rect").attr("width",u.width).attr("height",u.height).attr("class","background");yi(R,u.height,u.width,!0),R.attr("viewBox",`0 0 ${u.width} ${u.height}`),F.attr("fill",p.backgroundColor),l.setTmpSVGG(R.append("g").attr("class","mermaid-tmp-group"));const W=l.getDrawableElem(),T={};function I(d){let A=P,r="";for(const[M]of d.entries()){let B=P;M>0&&T[r]&&(B=T[r]),r+=d[M],A=T[r],A||(A=T[r]=B.append("g").attr("class",d[M]))}return A}a(I,"getGroup");for(const d of W){if(d.data.length===0)continue;const A=I(d.groupTexts);switch(d.type){case"rect":if(A.selectAll("rect").data(d.data).enter().append("rect").attr("x",r=>r.x).attr("y",r=>r.y).attr("width",r=>r.width).attr("height",r=>r.height).attr("fill",r=>r.fill).attr("stroke",r=>r.strokeFill).attr("stroke-width",r=>r.strokeWidth),u.showDataLabel)if(u.chartOrientation==="horizontal"){let r=function(o,C){const{data:b,label:S}=o;return C*S.length*M<=b.width-10};a(r,"fitsHorizontally");const M=.7,B=d.data.map((o,C)=>({data:o,label:m[C].toString()})).filter(o=>o.data.width>0&&o.data.height>0),U=B.map(o=>{const{data:C}=o;let b=C.height*.7;for(;!r(o,b)&&b>0;)b-=1;return b}),N=Math.floor(Math.min(...U));A.selectAll("text").data(B).enter().append("text").attr("x",o=>o.data.x+o.data.width-10).attr("y",o=>o.data.y+o.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",`${N}px`).text(o=>o.label)}else{let r=function(o,C,b){const{data:S,label:
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var h=this.next();return h||this.lex()},"lex"),begin:a(function(h){this.conditionStack.push(h)},"begin"),popState:a(function(){var h=this.conditionStack.length-1;return h>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(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:a(function(h){this.begin(h)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(h,c,g,y){switch(g){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return v}();j.lexer=J;function O(){this.yy={}}return a(O,"Parser"),O.prototype=j,j.Parser=O,new O}();mt.parser=mt;var Ci=mt;function bt(t){return t.type==="bar"}a(bt,"isBarPlot");function Ct(t){return t.type==="band"}a(Ct,"isBandAxisData");function G(t){return t.type==="linear"}a(G,"isLinearAxisData");var rt,Vt=(rt=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((l,p)=>Math.max(p.length,l),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const l of t){const p=wi(s,1,l),u=p?p.width:l.length*i,m=p?p.height:i;e.width=Math.max(e.width,u),e.height=Math.max(e.height,m)}return s.remove(),e}},a(rt,"TextDimensionCalculatorWithFont"),rt),Ft=.7,Wt=.2,lt,Yt=(lt=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Ft*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Ft*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=Wt*t.width;this.outerPadding=Math.min(e.width/2,s);const l=e.height+this.axisConfig.labelPadding*2;this.labelTextHeight=e.height,l<=i&&(i-=l,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),s=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,s<=i&&(i-=s,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=Wt*t.height;this.outerPadding=Math.min(e.height/2,s);const l=e.width+this.axisConfig.labelPadding*2;l<=i&&(i-=l,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),s=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,s<=i&&(i-=s,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${i},${this.getScaleValue(e)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(e)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${i} L ${this.getScaleValue(e)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},a(lt,"BaseAxis"),lt),ct,ki=(ct=class extends Yt{constructor(t,i,e,s,l){super(t,s,l,i),this.categories=e,this.scale=Mt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=Mt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Nt.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},a(ct,"BandAxis"),ct),gt,_i=(gt=class extends Yt{constructor(t,i,e,s,l){super(t,s,l,i),this.domain=e,this.scale=Bt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Bt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},a(gt,"LinearAxis"),gt);function At(t,i,e,s){const l=new Vt(s);return Ct(t)?new ki(i,e,t.categories,t.title,l):new _i(i,e,[t.min,t.max],t.title,l)}a(At,"getAxis");var ut,Ri=(ut=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},a(ut,"ChartTitle"),ut);function Ut(t,i,e,s){const l=new Vt(s);return new Ri(l,t,i,e)}a(Ut,"getChartTitleComponent");var xt,Ti=(xt=class{constructor(t,i,e,s,l){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=l}getDrawableElement(){const t=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]);let i;return this.orientation==="horizontal"?i=zt().y(e=>e[0]).x(e=>e[1])(t):i=zt().x(e=>e[0]).y(e=>e[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},a(xt,"LinePlot"),xt),dt,Di=(dt=class{constructor(t,i,e,s,l,p){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=l,this.plotIndex=p}getDrawableElement(){const t=this.barData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]),i=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),e=i/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(s=>({x:this.boundingRect.x,y:s[0]-e,height:i,width:s[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(s=>({x:s[0]-e,y:s[1],width:i,height:this.boundingRect.y+this.boundingRect.height-s[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},a(dt,"BarPlot"),dt),pt,Li=(pt=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new Ti(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new Di(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break}return t}},a(pt,"BasePlot"),pt);function Ht(t,i,e){return new Li(t,i,e)}a(Ht,"getPlotComponent");var ft,Pi=(ft=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:Ut(t,i,e,s),plot:Ht(t,i,e),xAxis:At(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:At(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,l=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),p=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),u=this.componentStore.plot.calculateSpace({width:l,height:p});t-=u.width,i-=u.height,u=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=u.height,i-=u.height,this.componentStore.xAxis.setAxisPosition("bottom"),u=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=u.height,this.componentStore.yAxis.setAxisPosition("left"),u=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=u.width,t-=u.width,t>0&&(l+=t,t=0),i>0&&(p+=i,i=0),this.componentStore.plot.calculateSpace({width:l,height:p}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+l]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+p}),this.componentStore.yAxis.setRange([s,s+p]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(m=>bt(m))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,l=0,p=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),u=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),m=this.componentStore.plot.calculateSpace({width:p,height:u});t-=m.width,i-=m.height,m=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=m.height,i-=m.height,this.componentStore.xAxis.setAxisPosition("left"),m=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=m.width,s=m.width,this.componentStore.yAxis.setAxisPosition("top"),m=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=m.height,l=e+m.height,t>0&&(p+=t,t=0),i>0&&(u+=i,i=0),this.componentStore.plot.calculateSpace({width:p,height:u}),this.componentStore.plot.setBoundingBoxXY({x:s,y:l}),this.componentStore.yAxis.setRange([s,s+p]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([l,l+u]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:l}),this.chartData.plots.some(L=>bt(L))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},a(ft,"Orchestrator"),ft),yt,vi=(yt=class{static build(t,i,e,s){return new Pi(t,i,e,s).getDrawableElement()}},a(yt,"XYChartBuilder"),yt),Q=0,Gt,Z=Rt(),K=_t(),f=Tt(),St=K.plotColorPalette.split(",").map(t=>t.trim()),et=!1,kt=!1;function _t(){const t=Ai(),i=wt();return Ot(t.xyChart,i.themeVariables.xyChart)}a(_t,"getChartDefaultThemeConfig");function Rt(){const t=wt();return Ot(bi.xyChart,t.xyChart)}a(Rt,"getChartDefaultConfig");function Tt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}a(Tt,"getChartDefaultData");function st(t){const i=wt();return Si(t.trim(),i)}a(st,"textSanitizer");function jt(t){Gt=t}a(jt,"setTmpSVGG");function Qt(t){t==="horizontal"?Z.chartOrientation="horizontal":Z.chartOrientation="vertical"}a(Qt,"setOrientation");function Zt(t){f.xAxis.title=st(t.text)}a(Zt,"setXAxisTitle");function Dt(t,i){f.xAxis={type:"linear",title:f.xAxis.title,min:t,max:i},et=!0}a(Dt,"setXAxisRangeData");function Kt(t){f.xAxis={type:"band",title:f.xAxis.title,categories:t.map(i=>st(i.text))},et=!0}a(Kt,"setXAxisBand");function Jt(t){f.yAxis.title=st(t.text)}a(Jt,"setYAxisTitle");function qt(t,i){f.yAxis={type:"linear",title:f.yAxis.title,min:t,max:i},kt=!0}a(qt,"setYAxisRangeData");function ti(t){const i=Math.min(...t),e=Math.max(...t),s=G(f.yAxis)?f.yAxis.min:1/0,l=G(f.yAxis)?f.yAxis.max:-1/0;f.yAxis={type:"linear",title:f.yAxis.title,min:Math.min(s,i),max:Math.max(l,e)}}a(ti,"setYAxisRangeFromPlotData");function Lt(t){let i=[];if(t.length===0)return i;if(!et){const e=G(f.xAxis)?f.xAxis.min:1/0,s=G(f.xAxis)?f.xAxis.max:-1/0;Dt(Math.min(e,1),Math.max(s,t.length))}if(kt||ti(t),Ct(f.xAxis)&&(i=f.xAxis.categories.map((e,s)=>[e,t[s]])),G(f.xAxis)){const e=f.xAxis.min,s=f.xAxis.max,l=(s-e)/(t.length-1),p=[];for(let u=e;u<=s;u+=l)p.push(`${u}`);i=p.map((u,m)=>[u,t[m]])}return i}a(Lt,"transformDataWithoutCategory");function Pt(t){return St[t===0?0:t%St.length]}a(Pt,"getPlotColorFromPalette");function ii(t,i){const e=Lt(i);f.plots.push({type:"line",strokeFill:Pt(Q),strokeWidth:2,data:e}),Q++}a(ii,"setLineData");function ei(t,i){const e=Lt(i);f.plots.push({type:"bar",fill:Pt(Q),data:e}),Q++}a(ei,"setBarData");function si(){if(f.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return f.title=Xt(),vi.build(Z,f,K,Gt)}a(si,"getDrawableElem");function ai(){return K}a(ai,"getChartThemeConfig");function ni(){return Z}a(ni,"getChartConfig");function hi(){return f}a(hi,"getXYChartData");var Ei=a(function(){mi(),Q=0,Z=Rt(),f=Tt(),K=_t(),St=K.plotColorPalette.split(",").map(t=>t.trim()),et=!1,kt=!1},"clear"),$i={getDrawableElem:si,clear:Ei,setAccTitle:pi,getAccTitle:di,setDiagramTitle:xi,getDiagramTitle:Xt,getAccDescription:ui,setAccDescription:gi,setOrientation:Qt,setXAxisTitle:Zt,setXAxisRangeData:Dt,setXAxisBand:Kt,setYAxisTitle:Jt,setYAxisRangeData:qt,setLineData:ii,setBarData:ei,setTmpSVGG:jt,getChartThemeConfig:ai,getChartConfig:ni,getXYChartData:hi},Ii=a((t,i,e,s)=>{const l=s.db,p=l.getChartThemeConfig(),u=l.getChartConfig(),m=l.getXYChartData().plots[0].data.map(d=>d[1]);function L(d){return d==="top"?"text-before-edge":"middle"}a(L,"getDominantBaseLine");function z(d){return d==="left"?"start":d==="right"?"end":"middle"}a(z,"getTextAnchor");function $(d){return`translate(${d.x}, ${d.y}) rotate(${d.rotation||0})`}a($,"getTextTransformation"),Nt.debug(`Rendering xychart chart
|
|
7
|
+
`+t);const R=fi(i),P=R.append("g").attr("class","main"),F=P.append("rect").attr("width",u.width).attr("height",u.height).attr("class","background");yi(R,u.height,u.width,!0),R.attr("viewBox",`0 0 ${u.width} ${u.height}`),F.attr("fill",p.backgroundColor),l.setTmpSVGG(R.append("g").attr("class","mermaid-tmp-group"));const W=l.getDrawableElem(),T={};function I(d){let A=P,r="";for(const[M]of d.entries()){let B=P;M>0&&T[r]&&(B=T[r]),r+=d[M],A=T[r],A||(A=T[r]=B.append("g").attr("class",d[M]))}return A}a(I,"getGroup");for(const d of W){if(d.data.length===0)continue;const A=I(d.groupTexts);switch(d.type){case"rect":if(A.selectAll("rect").data(d.data).enter().append("rect").attr("x",r=>r.x).attr("y",r=>r.y).attr("width",r=>r.width).attr("height",r=>r.height).attr("fill",r=>r.fill).attr("stroke",r=>r.strokeFill).attr("stroke-width",r=>r.strokeWidth),u.showDataLabel)if(u.chartOrientation==="horizontal"){let r=function(o,C){const{data:b,label:S}=o;return C*S.length*M<=b.width-10};a(r,"fitsHorizontally");const M=.7,B=d.data.map((o,C)=>({data:o,label:m[C].toString()})).filter(o=>o.data.width>0&&o.data.height>0),U=B.map(o=>{const{data:C}=o;let b=C.height*.7;for(;!r(o,b)&&b>0;)b-=1;return b}),N=Math.floor(Math.min(...U));A.selectAll("text").data(B).enter().append("text").attr("x",o=>o.data.x+o.data.width-10).attr("y",o=>o.data.y+o.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",`${N}px`).text(o=>o.label)}else{let r=function(o,C,b){const{data:S,label:j}=o,J=C*j.length*.7,O=S.x+S.width/2,v=O-J/2,h=O+J/2,c=v>=S.x&&h<=S.x+S.width,g=S.y+b+C<=S.y+S.height;return c&&g};a(r,"fitsInBar");const M=10,B=d.data.map((o,C)=>({data:o,label:m[C].toString()})).filter(o=>o.data.width>0&&o.data.height>0),U=B.map(o=>{const{data:C,label:b}=o;let S=C.width/(b.length*.7);for(;!r(o,S,M)&&S>0;)S-=1;return S}),N=Math.floor(Math.min(...U));A.selectAll("text").data(B).enter().append("text").attr("x",o=>o.data.x+o.data.width/2).attr("y",o=>o.data.y+M).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",`${N}px`).text(o=>o.label)}break;case"text":A.selectAll("text").data(d.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",r=>r.fill).attr("font-size",r=>r.fontSize).attr("dominant-baseline",r=>L(r.verticalPos)).attr("text-anchor",r=>z(r.horizontalPos)).attr("transform",r=>$(r)).text(r=>r.text);break;case"path":A.selectAll("path").data(d.data).enter().append("path").attr("d",r=>r.path).attr("fill",r=>r.fill?r.fill:"none").attr("stroke",r=>r.strokeFill).attr("stroke-width",r=>r.strokeWidth);break}}},"draw"),Mi={draw:Ii},zi={parser:Ci,db:$i,renderer:Mi};export{zi as diagram};
|
package/dist/index.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
|
11
11
|
}
|
|
12
12
|
</style>
|
|
13
|
-
<script type="module" crossorigin src="/assets/index-
|
|
13
|
+
<script type="module" crossorigin src="/assets/index-DiPXXjl1.js"></script>
|
|
14
14
|
<link rel="stylesheet" crossorigin href="/assets/index-V1hWOL-o.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orbitchat",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"orbitchat": "./bin/orbitchat.js"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@schmitech/chatbot-api": "^2.1.1",
|
|
29
|
-
"@schmitech/markdown-renderer": "^0.
|
|
29
|
+
"@schmitech/markdown-renderer": "^0.6.1",
|
|
30
30
|
"express": "^5.0.1",
|
|
31
31
|
"http-proxy-middleware": "^3.0.5",
|
|
32
32
|
"js-yaml": "^4.1.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bv as Lr,bw as Mr,br as or,aJ as p,aK as cr,bt as fr,bx as $r,by as m,bz as P,bA as zr,bB as kr,bC as O,aL as sr,aO as Dr,bD as k,bE as Fr,bF as $,aQ as B,bG as Pr,bH as ir,bI as M,bJ as S,bK as Ur,bL as w,bM as Br,bN as Gr,bu as Qr,bO as lr,bP as Vr,bs as Cr,bQ as K,bR as Hr,aP as Nr}from"./index-DodYl3VC.js";var Rr="[object Symbol]";function G(r){return typeof r=="symbol"||S(r)&&Br(r)==Rr}function br(r,e){for(var t=-1,a=r==null?0:r.length,n=Array(a);++t<a;)n[t]=e(r[t],t,r);return n}var T=w?w.prototype:void 0,W=T?T.toString:void 0;function vr(r){if(typeof r=="string")return r;if(p(r))return br(r,vr)+"";if(G(r))return W?W.call(r):"";var e=r+"";return e=="0"&&1/r==-1/0?"-0":e}function Jr(){}function jr(r,e){for(var t=-1,a=r==null?0:r.length;++t<a&&e(r[t],t,r)!==!1;);return r}function Kr(r,e,t,a){for(var n=r.length,u=t+-1;++u<n;)if(e(r[u],u,r))return u;return-1}function Tr(r){return r!==r}function Wr(r,e,t){for(var a=t-1,n=r.length;++a<n;)if(r[a]===e)return a;return-1}function Xr(r,e,t){return e===e?Wr(r,e,t):Kr(r,Tr,t)}function qr(r,e){var t=r==null?0:r.length;return!!t&&Xr(r,e,0)>-1}function _(r){return or(r)?Lr(r):Mr(r)}var Yr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zr=/^\w*$/;function Q(r,e){if(p(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||G(r)?!0:Zr.test(r)||!Yr.test(r)||e!=null&&r in Object(e)}var re=500;function ee(r){var e=Hr(r,function(a){return t.size===re&&t.clear(),a}),t=e.cache;return e}var te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ae=/\\(\\)?/g,ue=ee(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(te,function(t,a,n,u){e.push(n?u.replace(ae,"$1"):a||t)}),e});function ne(r){return r==null?"":vr(r)}function yr(r,e){return p(r)?r:Q(r,e)?[r]:ue(ne(r))}function z(r){if(typeof r=="string"||G(r))return r;var e=r+"";return e=="0"&&1/r==-1/0?"-0":e}function hr(r,e){e=yr(e,r);for(var t=0,a=e.length;r!=null&&t<a;)r=r[z(e[t++])];return t&&t==a?r:void 0}function oe(r,e,t){var a=r==null?void 0:hr(r,e);return a===void 0?t:a}function V(r,e){for(var t=-1,a=e.length,n=r.length;++t<a;)r[n+t]=e[t];return r}var X=w?w.isConcatSpreadable:void 0;function ce(r){return p(r)||lr(r)||!!(X&&r&&r[X])}function wa(r,e,t,a,n){var u=-1,o=r.length;for(t||(t=ce),n||(n=[]);++u<o;){var c=r[u];t(c)?V(n,c):a||(n[n.length]=c)}return n}function fe(r,e,t,a){var n=-1,u=r==null?0:r.length;for(a&&u&&(t=r[++n]);++n<u;)t=e(t,r[n],n,r);return t}function se(r,e){return r&&$(e,_(e),r)}function ie(r,e){return r&&$(e,B(e),r)}function gr(r,e){for(var t=-1,a=r==null?0:r.length,n=0,u=[];++t<a;){var o=r[t];e(o,t,r)&&(u[n++]=o)}return u}function pr(){return[]}var le=Object.prototype,be=le.propertyIsEnumerable,q=Object.getOwnPropertySymbols,C=q?function(r){return r==null?[]:(r=Object(r),gr(q(r),function(e){return be.call(r,e)}))}:pr;function ve(r,e){return $(r,C(r),e)}var je=Object.getOwnPropertySymbols,dr=je?function(r){for(var e=[];r;)V(e,C(r)),r=Ur(r);return e}:pr;function ye(r,e){return $(r,dr(r),e)}function wr(r,e,t){var a=e(r);return p(r)?a:V(a,t(r))}function U(r){return wr(r,_,C)}function he(r){return wr(r,B,dr)}var ge=Object.prototype,pe=ge.hasOwnProperty;function de(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&pe.call(r,"index")&&(t.index=r.index,t.input=r.input),t}function we(r,e){var t=e?ir(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}var Ae=/\w*$/;function _e(r){var e=new r.constructor(r.source,Ae.exec(r));return e.lastIndex=r.lastIndex,e}var Y=w?w.prototype:void 0,Z=Y?Y.valueOf:void 0;function Oe(r){return Z?Object(Z.call(r)):{}}var me="[object Boolean]",Se="[object Date]",Ee="[object Map]",Ie="[object Number]",xe="[object RegExp]",Le="[object Set]",Me="[object String]",$e="[object Symbol]",ze="[object ArrayBuffer]",ke="[object DataView]",De="[object Float32Array]",Fe="[object Float64Array]",Pe="[object Int8Array]",Ue="[object Int16Array]",Be="[object Int32Array]",Ge="[object Uint8Array]",Qe="[object Uint8ClampedArray]",Ve="[object Uint16Array]",Ce="[object Uint32Array]";function He(r,e,t){var a=r.constructor;switch(e){case ze:return ir(r);case me:case Se:return new a(+r);case ke:return we(r,t);case De:case Fe:case Pe:case Ue:case Be:case Ge:case Qe:case Ve:case Ce:return Pr(r,t);case Ee:return new a;case Ie:case Me:return new a(r);case xe:return _e(r);case Le:return new a;case $e:return Oe(r)}}var Ne="[object Map]";function Re(r){return S(r)&&m(r)==Ne}var rr=M&&M.isMap,Je=rr?sr(rr):Re,Ke="[object Set]";function Te(r){return S(r)&&m(r)==Ke}var er=M&&M.isSet,We=er?sr(er):Te,Xe=1,qe=2,Ye=4,Ar="[object Arguments]",Ze="[object Array]",rt="[object Boolean]",et="[object Date]",tt="[object Error]",_r="[object Function]",at="[object GeneratorFunction]",ut="[object Map]",nt="[object Number]",Or="[object Object]",ot="[object RegExp]",ct="[object Set]",ft="[object String]",st="[object Symbol]",it="[object WeakMap]",lt="[object ArrayBuffer]",bt="[object DataView]",vt="[object Float32Array]",jt="[object Float64Array]",yt="[object Int8Array]",ht="[object Int16Array]",gt="[object Int32Array]",pt="[object Uint8Array]",dt="[object Uint8ClampedArray]",wt="[object Uint16Array]",At="[object Uint32Array]",i={};i[Ar]=i[Ze]=i[lt]=i[bt]=i[rt]=i[et]=i[vt]=i[jt]=i[yt]=i[ht]=i[gt]=i[ut]=i[nt]=i[Or]=i[ot]=i[ct]=i[ft]=i[st]=i[pt]=i[dt]=i[wt]=i[At]=!0;i[tt]=i[_r]=i[it]=!1;function D(r,e,t,a,n,u){var o,c=e&Xe,f=e&qe,v=e&Ye;if(o!==void 0)return o;if(!fr(r))return r;var l=p(r);if(l){if(o=de(r),!c)return $r(r,o)}else{var s=m(r),b=s==_r||s==at;if(P(r))return zr(r,c);if(s==Or||s==Ar||b&&!n){if(o=f||b?{}:kr(r),!c)return f?ye(r,ie(o,r)):ve(r,se(o,r))}else{if(!i[s])return n?r:{};o=He(r,s,c)}}u||(u=new O);var d=u.get(r);if(d)return d;u.set(r,o),We(r)?r.forEach(function(j){o.add(D(j,e,t,j,r,u))}):Je(r)&&r.forEach(function(j,y){o.set(y,D(j,e,t,y,r,u))});var h=v?f?he:U:f?B:_,g=l?void 0:h(r);return jr(g||r,function(j,y){g&&(y=j,j=r[y]),Dr(o,y,D(j,e,t,y,r,u))}),o}var _t="__lodash_hash_undefined__";function Ot(r){return this.__data__.set(r,_t),this}function mt(r){return this.__data__.has(r)}function E(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new Fr;++e<t;)this.add(r[e])}E.prototype.add=E.prototype.push=Ot;E.prototype.has=mt;function St(r,e){for(var t=-1,a=r==null?0:r.length;++t<a;)if(e(r[t],t,r))return!0;return!1}function mr(r,e){return r.has(e)}var Et=1,It=2;function Sr(r,e,t,a,n,u){var o=t&Et,c=r.length,f=e.length;if(c!=f&&!(o&&f>c))return!1;var v=u.get(r),l=u.get(e);if(v&&l)return v==e&&l==r;var s=-1,b=!0,d=t&It?new E:void 0;for(u.set(r,e),u.set(e,r);++s<c;){var h=r[s],g=e[s];if(a)var j=o?a(g,h,s,e,r,u):a(h,g,s,r,e,u);if(j!==void 0){if(j)continue;b=!1;break}if(d){if(!St(e,function(y,A){if(!mr(d,A)&&(h===y||n(h,y,t,a,u)))return d.push(A)})){b=!1;break}}else if(!(h===g||n(h,g,t,a,u))){b=!1;break}}return u.delete(r),u.delete(e),b}function xt(r){var e=-1,t=Array(r.size);return r.forEach(function(a,n){t[++e]=[n,a]}),t}function H(r){var e=-1,t=Array(r.size);return r.forEach(function(a){t[++e]=a}),t}var Lt=1,Mt=2,$t="[object Boolean]",zt="[object Date]",kt="[object Error]",Dt="[object Map]",Ft="[object Number]",Pt="[object RegExp]",Ut="[object Set]",Bt="[object String]",Gt="[object Symbol]",Qt="[object ArrayBuffer]",Vt="[object DataView]",tr=w?w.prototype:void 0,F=tr?tr.valueOf:void 0;function Ct(r,e,t,a,n,u,o){switch(t){case Vt:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case Qt:return!(r.byteLength!=e.byteLength||!u(new K(r),new K(e)));case $t:case zt:case Ft:return Cr(+r,+e);case kt:return r.name==e.name&&r.message==e.message;case Pt:case Bt:return r==e+"";case Dt:var c=xt;case Ut:var f=a≪if(c||(c=H),r.size!=e.size&&!f)return!1;var v=o.get(r);if(v)return v==e;a|=Mt,o.set(r,e);var l=Sr(c(r),c(e),a,n,u,o);return o.delete(r),l;case Gt:if(F)return F.call(r)==F.call(e)}return!1}var Ht=1,Nt=Object.prototype,Rt=Nt.hasOwnProperty;function Jt(r,e,t,a,n,u){var o=t&Ht,c=U(r),f=c.length,v=U(e),l=v.length;if(f!=l&&!o)return!1;for(var s=f;s--;){var b=c[s];if(!(o?b in e:Rt.call(e,b)))return!1}var d=u.get(r),h=u.get(e);if(d&&h)return d==e&&h==r;var g=!0;u.set(r,e),u.set(e,r);for(var j=o;++s<f;){b=c[s];var y=r[b],A=e[b];if(a)var J=o?a(A,y,b,e,r,u):a(y,A,b,r,e,u);if(!(J===void 0?y===A||n(y,A,t,a,u):J)){g=!1;break}j||(j=b=="constructor")}if(g&&!j){var I=r.constructor,x=e.constructor;I!=x&&"constructor"in r&&"constructor"in e&&!(typeof I=="function"&&I instanceof I&&typeof x=="function"&&x instanceof x)&&(g=!1)}return u.delete(r),u.delete(e),g}var Kt=1,ar="[object Arguments]",ur="[object Array]",L="[object Object]",Tt=Object.prototype,nr=Tt.hasOwnProperty;function Wt(r,e,t,a,n,u){var o=p(r),c=p(e),f=o?ur:m(r),v=c?ur:m(e);f=f==ar?L:f,v=v==ar?L:v;var l=f==L,s=v==L,b=f==v;if(b&&P(r)){if(!P(e))return!1;o=!0,l=!1}if(b&&!l)return u||(u=new O),o||Vr(r)?Sr(r,e,t,a,n,u):Ct(r,e,f,t,a,n,u);if(!(t&Kt)){var d=l&&nr.call(r,"__wrapped__"),h=s&&nr.call(e,"__wrapped__");if(d||h){var g=d?r.value():r,j=h?e.value():e;return u||(u=new O),n(g,j,t,a,u)}}return b?(u||(u=new O),Jt(r,e,t,a,n,u)):!1}function N(r,e,t,a,n){return r===e?!0:r==null||e==null||!S(r)&&!S(e)?r!==r&&e!==e:Wt(r,e,t,a,N,n)}var Xt=1,qt=2;function Yt(r,e,t,a){var n=t.length,u=n;if(r==null)return!u;for(r=Object(r);n--;){var o=t[n];if(o[2]?o[1]!==r[o[0]]:!(o[0]in r))return!1}for(;++n<u;){o=t[n];var c=o[0],f=r[c],v=o[1];if(o[2]){if(f===void 0&&!(c in r))return!1}else{var l=new O,s;if(!(s===void 0?N(v,f,Xt|qt,a,l):s))return!1}}return!0}function Er(r){return r===r&&!fr(r)}function Zt(r){for(var e=_(r),t=e.length;t--;){var a=e[t],n=r[a];e[t]=[a,n,Er(n)]}return e}function Ir(r,e){return function(t){return t==null?!1:t[r]===e&&(e!==void 0||r in Object(t))}}function ra(r){var e=Zt(r);return e.length==1&&e[0][2]?Ir(e[0][0],e[0][1]):function(t){return t===r||Yt(t,r,e)}}function ea(r,e){return r!=null&&e in Object(r)}function ta(r,e,t){e=yr(e,r);for(var a=-1,n=e.length,u=!1;++a<n;){var o=z(e[a]);if(!(u=r!=null&&t(r,o)))break;r=r[o]}return u||++a!=n?u:(n=r==null?0:r.length,!!n&&Gr(n)&&Qr(o,n)&&(p(r)||lr(r)))}function aa(r,e){return r!=null&&ta(r,e,ea)}var ua=1,na=2;function oa(r,e){return Q(r)&&Er(e)?Ir(z(r),e):function(t){var a=oe(t,r);return a===void 0&&a===e?aa(t,r):N(e,a,ua|na)}}function ca(r){return function(e){return e==null?void 0:e[r]}}function fa(r){return function(e){return hr(e,r)}}function sa(r){return Q(r)?ca(z(r)):fa(r)}function xr(r){return typeof r=="function"?r:r==null?cr:typeof r=="object"?p(r)?oa(r[0],r[1]):ra(r):sa(r)}function ia(r,e){return r&&Nr(r,e,_)}function la(r,e){return function(t,a){if(t==null)return t;if(!or(t))return r(t,a);for(var n=t.length,u=-1,o=Object(t);++u<n&&a(o[u],u,o)!==!1;);return t}}var R=la(ia);function ba(r){return typeof r=="function"?r:cr}function Aa(r,e){var t=p(r)?jr:R;return t(r,ba(e))}function va(r,e){var t=[];return R(r,function(a,n,u){e(a,n,u)&&t.push(a)}),t}function _a(r,e){var t=p(r)?gr:va;return t(r,xr(e))}function ja(r,e){return br(e,function(t){return r[t]})}function Oa(r){return r==null?[]:ja(r,_(r))}function ma(r){return r===void 0}function ya(r,e,t,a,n){return n(r,function(u,o,c){t=a?(a=!1,u):e(t,u,o,c)}),t}function Sa(r,e,t){var a=p(r)?fe:ya,n=arguments.length<3;return a(r,xr(e),t,n,R)}var ha=1/0,ga=k&&1/H(new k([,-0]))[1]==ha?function(r){return new k(r)}:Jr,pa=200;function Ea(r,e,t){var a=-1,n=qr,u=r.length,o=!0,c=[],f=c;if(u>=pa){var v=e?null:ga(r);if(v)return H(v);o=!1,n=mr,f=new E}else f=e?[]:c;r:for(;++a<u;){var l=r[a],s=e?e(l):l;if(l=l!==0?l:0,o&&s===s){for(var b=f.length;b--;)if(f[b]===s)continue r;e&&f.push(s),c.push(l)}else n(f,s,t)||(f!==c&&f.push(s),c.push(l))}return c}export{Aa as $,yr as A,Oa as E,Sa as I,Jr as J,xr as L,z as M,G as N,wa as O,Ea as P,Kr as Q,ma as S,gr as T,qr as V,R as Y,_a as _,ne as a,br as b,ba as c,_ as d,E as e,he as f,va as g,St as h,aa as i,mr as j,ia as l,D as m,ta as t,hr as y,Xr as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aY as sn,aZ as an,a_ as l,as as on,a$ as L,b0 as F,b1 as E,b2 as un,aq as z,b3 as cn,b4 as M,b5 as e,b6 as rn,b7 as en,b8 as yn}from"./index-DodYl3VC.js";function fn(i){return i.innerRadius}function ln(i){return i.outerRadius}function gn(i){return i.startAngle}function pn(i){return i.endAngle}function xn(i){return i&&i.padAngle}function mn(i,d,C,R,v,b,B,a){var H=C-i,r=R-d,n=B-v,p=a-b,u=p*H-n*r;if(!(u*u<l))return u=(n*(d-b)-p*(i-v))/u,[i+u*H,d+u*r]}function X(i,d,C,R,v,b,B){var a=i-C,H=d-R,r=(B?b:-b)/M(a*a+H*H),n=r*H,p=-r*a,u=i+n,s=d+p,y=C+n,f=R+p,D=(u+y)/2,o=(s+f)/2,x=y-u,g=f-s,j=x*x+g*g,T=v-b,A=u*f-y*s,W=(g<0?-1:1)*M(en(0,T*T*j-A*A)),_=(A*g-x*W)/j,$=(-A*x-g*W)/j,O=(A*g+x*W)/j,m=(-A*x+g*W)/j,h=_-D,t=$-o,c=O-D,I=m-o;return h*h+t*t>c*c+I*I&&(_=O,$=m),{cx:_,cy:$,x01:-n,y01:-p,x11:_*(v/T-1),y11:$*(v/T-1)}}function dn(){var i=fn,d=ln,C=z(0),R=null,v=gn,b=pn,B=xn,a=null,H=sn(r);function r(){var n,p,u=+i.apply(this,arguments),s=+d.apply(this,arguments),y=v.apply(this,arguments)-an,f=b.apply(this,arguments)-an,D=un(f-y),o=f>y;if(a||(a=n=H()),s<u&&(p=s,s=u,u=p),!(s>l))a.moveTo(0,0);else if(D>on-l)a.moveTo(s*L(y),s*F(y)),a.arc(0,0,s,y,f,!o),u>l&&(a.moveTo(u*L(f),u*F(f)),a.arc(0,0,u,f,y,o));else{var x=y,g=f,j=y,T=f,A=D,W=D,_=B.apply(this,arguments)/2,$=_>l&&(R?+R.apply(this,arguments):M(u*u+s*s)),O=E(un(s-u)/2,+C.apply(this,arguments)),m=O,h=O,t,c;if($>l){var I=rn($/u*F(_)),S=rn($/s*F(_));(A-=I*2)>l?(I*=o?1:-1,j+=I,T-=I):(A=0,j=T=(y+f)/2),(W-=S*2)>l?(S*=o?1:-1,x+=S,g-=S):(W=0,x=g=(y+f)/2)}var P=s*L(x),Y=s*F(x),Z=u*L(T),k=u*F(T);if(O>l){var G=s*L(g),U=s*F(g),N=u*L(j),Q=u*F(j),q;if(D<cn)if(q=mn(P,Y,N,Q,G,U,Z,k)){var V=P-q[0],w=Y-q[1],J=G-q[0],K=U-q[1],nn=1/F(yn((V*J+w*K)/(M(V*V+w*w)*M(J*J+K*K)))/2),tn=M(q[0]*q[0]+q[1]*q[1]);m=E(O,(u-tn)/(nn-1)),h=E(O,(s-tn)/(nn+1))}else m=h=0}W>l?h>l?(t=X(N,Q,P,Y,s,h,o),c=X(G,U,Z,k,s,h,o),a.moveTo(t.cx+t.x01,t.cy+t.y01),h<O?a.arc(t.cx,t.cy,h,e(t.y01,t.x01),e(c.y01,c.x01),!o):(a.arc(t.cx,t.cy,h,e(t.y01,t.x01),e(t.y11,t.x11),!o),a.arc(0,0,s,e(t.cy+t.y11,t.cx+t.x11),e(c.cy+c.y11,c.cx+c.x11),!o),a.arc(c.cx,c.cy,h,e(c.y11,c.x11),e(c.y01,c.x01),!o))):(a.moveTo(P,Y),a.arc(0,0,s,x,g,!o)):a.moveTo(P,Y),!(u>l)||!(A>l)?a.lineTo(Z,k):m>l?(t=X(Z,k,G,U,u,-m,o),c=X(P,Y,N,Q,u,-m,o),a.lineTo(t.cx+t.x01,t.cy+t.y01),m<O?a.arc(t.cx,t.cy,m,e(t.y01,t.x01),e(c.y01,c.x01),!o):(a.arc(t.cx,t.cy,m,e(t.y01,t.x01),e(t.y11,t.x11),!o),a.arc(0,0,u,e(t.cy+t.y11,t.cx+t.x11),e(c.cy+c.y11,c.cx+c.x11),o),a.arc(c.cx,c.cy,m,e(c.y11,c.x11),e(c.y01,c.x01),!o))):a.arc(0,0,u,T,j,o)}if(a.closePath(),n)return a=null,n+""||null}return r.centroid=function(){var n=(+i.apply(this,arguments)+ +d.apply(this,arguments))/2,p=(+v.apply(this,arguments)+ +b.apply(this,arguments))/2-cn/2;return[L(p)*n,F(p)*n]},r.innerRadius=function(n){return arguments.length?(i=typeof n=="function"?n:z(+n),r):i},r.outerRadius=function(n){return arguments.length?(d=typeof n=="function"?n:z(+n),r):d},r.cornerRadius=function(n){return arguments.length?(C=typeof n=="function"?n:z(+n),r):C},r.padRadius=function(n){return arguments.length?(R=n==null?null:typeof n=="function"?n:z(+n),r):R},r.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:z(+n),r):v},r.endAngle=function(n){return arguments.length?(b=typeof n=="function"?n:z(+n),r):b},r.padAngle=function(n){return arguments.length?(B=typeof n=="function"?n:z(+n),r):B},r.context=function(n){return arguments.length?(a=n??null,r):a},r}export{dn as h};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bg as t,bh as a}from"./index-DodYl3VC.js";const s=(o,r)=>t.lang.round(a.parse(o)[r]);export{s as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{R as d,d as e}from"./index-DodYl3VC.js";var a=d((o,t)=>{let n;return t==="sandbox"&&(n=e("#i"+o)),(t==="sandbox"?e(n.nodes()[0].contentDocument.body):e("body")).select(`[id="${o}"]`)},"getDiagramElement");export{a as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as t,F as s,T as a,k as e}from"./chunk-B4BG7PRW-BVaRFjbY-BdpIBFL7.js";import{R as o}from"./index-DodYl3VC.js";import"./chunk-FMBD7UC4-D0AjqgJd-BqUKvjQH.js";import"./chunk-55IACEB6-DcZAWW2t-DPyoMeFz.js";import"./chunk-QN33PNHL-cmS1bOzt-B1tGHIDu.js";var d={parser:a,get db(){return new e},renderer:s,styles:t,init:o(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{d as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as t,F as s,T as a,k as e}from"./chunk-B4BG7PRW-BVaRFjbY-BdpIBFL7.js";import{R as o}from"./index-DodYl3VC.js";import"./chunk-FMBD7UC4-D0AjqgJd-BqUKvjQH.js";import"./chunk-55IACEB6-DcZAWW2t-DPyoMeFz.js";import"./chunk-QN33PNHL-cmS1bOzt-B1tGHIDu.js";var d={parser:a,get db(){return new e},renderer:s,styles:t,init:o(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{d as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{m as o}from"./_baseUniq-DZ7Bpu3I-Co9egLVD.js";var t=4;function m(r){return o(r,t)}export{m as a};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{R as v,q as j,J as L,t as M,Z as F,O as t,g as Y,c as q,Q as H,m as Q,b as U,a as Z,e as D,X as V,k as $,y as z}from"./index-DodYl3VC.js";import{L as O}from"./graph-BZqzM_VI-BBLTPB3S.js";import{o as K}from"./layout-DHdXRoe5-CY2O2SIL.js";import{S}from"./_baseUniq-DZ7Bpu3I-Co9egLVD.js";import{a as W}from"./clone-D8_vOzkg-D9aZREI4.js";import{b as G}from"./_basePickBy-0t-1TdXj-DH4J1m8V.js";function X(e){var n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:_(e),edges:ee(e)};return S(e.graph())||(n.value=W(e.graph())),n}function _(e){return G(e.nodes(),function(n){var r=e.node(n),s=e.parent(n),d={v:n};return S(r)||(d.value=r),S(s)||(d.parent=s),d})}function ee(e){return G(e.edges(),function(n){var r=e.edge(n),s={v:n.v,w:n.w};return S(n.name)||(s.name=n.name),S(r)||(s.value=r),s})}var u=new Map,E=new Map,J=new Map,ne=v(()=>{E.clear(),J.clear(),u.clear()},"clear"),I=v((e,n)=>{const r=E.get(n)||[];return t.trace("In isDescendant",n," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),re=v((e,n)=>{const r=E.get(n)||[];return t.info("Descendants of ",n," is ",r),t.info("Edge is ",e),e.v===n||e.w===n?!1:r?r.includes(e.v)||I(e.v,n)||I(e.w,n)||r.includes(e.w):(t.debug("Tilt, ",n,",not in descendants"),!1)},"edgeInCluster"),P=v((e,n,r,s)=>{t.warn("Copying children of ",e,"root",s,"data",n.node(e),s);const d=n.children(e)||[];e!==s&&d.push(e),t.warn("Copying (nodes) clusterId",e,"nodes",d),d.forEach(c=>{if(n.children(c).length>0)P(c,n,r,s);else{const a=n.node(c);t.info("cp ",c," to ",s," with parent ",e),r.setNode(c,a),s!==n.parent(c)&&(t.warn("Setting parent",c,n.parent(c)),r.setParent(c,n.parent(c))),e!==s&&c!==e?(t.debug("Setting parent",c,e),r.setParent(c,e)):(t.info("In copy ",e,"root",s,"data",n.node(e),s),t.debug("Not Setting parent for node=",c,"cluster!==rootId",e!==s,"node!==clusterId",c!==e));const l=n.edges(c);t.debug("Copying Edges",l),l.forEach(f=>{t.info("Edge",f);const b=n.edge(f.v,f.w,f.name);t.info("Edge data",b,s);try{re(f,s)?(t.info("Copying as ",f.v,f.w,b,f.name),r.setEdge(f.v,f.w,b,f.name),t.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):t.info("Skipping copy of edge ",f.v,"-->",f.w," rootId: ",s," clusterId:",e)}catch(C){t.error(C)}})}t.debug("Removing node",c),n.removeNode(c)})},"copy"),R=v((e,n)=>{const r=n.children(e);let s=[...r];for(const d of r)J.set(d,e),s=[...s,...R(d,n)];return s},"extractDescendants"),te=v((e,n,r)=>{const s=e.edges().filter(l=>l.v===n||l.w===n),d=e.edges().filter(l=>l.v===r||l.w===r),c=s.map(l=>({v:l.v===n?r:l.v,w:l.w===n?n:l.w})),a=d.map(l=>({v:l.v,w:l.w}));return c.filter(l=>a.some(f=>l.v===f.v&&l.w===f.w))},"findCommonEdges"),x=v((e,n,r)=>{const s=n.children(e);if(t.trace("Searching children of id ",e,s),s.length<1)return e;let d;for(const c of s){const a=x(c,n,r),l=te(n,r,a);if(a)if(l.length>0)d=a;else return a}return d},"findNonClusterChild"),k=v(e=>!u.has(e)||!u.get(e).externalConnections?e:u.has(e)?u.get(e).id:e,"getAnchorId"),ie=v((e,n)=>{if(!e||n>10){t.debug("Opting out, no graph ");return}else t.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(t.warn("Cluster identified",r," Replacement id in edges: ",x(r,e,r)),E.set(r,R(r,e)),u.set(r,{id:x(r,e,r),clusterData:e.node(r)}))}),e.nodes().forEach(function(r){const s=e.children(r),d=e.edges();s.length>0?(t.debug("Cluster identified",r,E),d.forEach(c=>{const a=I(c.v,r),l=I(c.w,r);a^l&&(t.warn("Edge: ",c," leaves cluster ",r),t.warn("Descendants of XXX ",r,": ",E.get(r)),u.get(r).externalConnections=!0)})):t.debug("Not a cluster ",r,E)});for(let r of u.keys()){const s=u.get(r).id,d=e.parent(s);d!==r&&u.has(d)&&!u.get(d).externalConnections&&(u.get(r).id=d)}e.edges().forEach(function(r){const s=e.edge(r);t.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),t.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let d=r.v,c=r.w;if(t.warn("Fix XXX",u,"ids:",r.v,r.w,"Translating: ",u.get(r.v)," --- ",u.get(r.w)),u.get(r.v)||u.get(r.w)){if(t.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),d=k(r.v),c=k(r.w),e.removeEdge(r.v,r.w,r.name),d!==r.v){const a=e.parent(d);u.get(a).externalConnections=!0,s.fromCluster=r.v}if(c!==r.w){const a=e.parent(c);u.get(a).externalConnections=!0,s.toCluster=r.w}t.warn("Fix Replacing with XXX",d,c,r.name),e.setEdge(d,c,s,r.name)}}),t.warn("Adjusted Graph",X(e)),B(e,0),t.trace(u)},"adjustClustersAndEdges"),B=v((e,n)=>{var r,s;if(t.warn("extractor - ",n,X(e),e.children("D")),n>10){t.error("Bailing out");return}let d=e.nodes(),c=!1;for(const a of d){const l=e.children(a);c=c||l.length>0}if(!c){t.debug("Done, no node has children",e.nodes());return}t.debug("Nodes = ",d,n);for(const a of d)if(t.debug("Extracting node",a,u,u.has(a)&&!u.get(a).externalConnections,!e.parent(a),e.node(a),e.children("D")," Depth ",n),!u.has(a))t.debug("Not a cluster",a,n);else if(!u.get(a).externalConnections&&e.children(a)&&e.children(a).length>0){t.warn("Cluster without external connections, without a parent and with children",a,n);let l=e.graph().rankdir==="TB"?"LR":"TB";(s=(r=u.get(a))==null?void 0:r.clusterData)!=null&&s.dir&&(l=u.get(a).clusterData.dir,t.warn("Fixing dir",u.get(a).clusterData.dir,l));const f=new O({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});t.warn("Old graph before copy",X(e)),P(a,e,f,a),e.setNode(a,{clusterNode:!0,id:a,clusterData:u.get(a).clusterData,label:u.get(a).label,graph:f}),t.warn("New graph after copy node: (",a,")",X(f)),t.debug("Old graph after copy",X(e))}else t.warn("Cluster ** ",a," **not meeting the criteria !externalConnections:",!u.get(a).externalConnections," no parent: ",!e.parent(a)," children ",e.children(a)&&e.children(a).length>0,e.children("D"),n),t.debug(u);d=e.nodes(),t.warn("New list of nodes",d);for(const a of d){const l=e.node(a);t.warn(" Now next level",a,l),l!=null&&l.clusterNode&&B(l.graph,n+1)}},"extractor"),T=v((e,n)=>{if(n.length===0)return[];let r=Object.assign([],n);return n.forEach(s=>{const d=e.children(s),c=T(e,d);r=[...r,...c]}),r},"sorter"),ae=v(e=>T(e,e.children()),"sortNodesByHierarchy"),A=v(async(e,n,r,s,d,c)=>{t.warn("Graph in recursive render:XAX",X(n),d);const a=n.graph().rankdir;t.trace("Dir in recursive render - dir:",a);const l=e.insert("g").attr("class","root");n.nodes()?t.info("Recursive render XXX",n.nodes()):t.info("No nodes found for",n),n.edges().length>0&&t.info("Recursive edges",n.edge(n.edges()[0]));const f=l.insert("g").attr("class","clusters"),b=l.insert("g").attr("class","edgePaths"),C=l.insert("g").attr("class","edgeLabels"),h=l.insert("g").attr("class","nodes");await Promise.all(n.nodes().map(async function(g){const o=n.node(g);if(d!==void 0){const i=JSON.parse(JSON.stringify(d.clusterData));t.trace(`Setting data for parent cluster XXX
|
|
2
|
-
Node.id = `,g,`
|
|
3
|
-
data=`,i.height,`
|
|
4
|
-
Parent cluster`,d.height),n.setNode(d.id,i),n.parent(g)||(t.trace("Setting parent",g,d.id),n.setParent(g,d.id,i))}if(t.info("(Insert) Node XXX"+g+": "+JSON.stringify(n.node(g))),o!=null&&o.clusterNode){t.info("Cluster identified XBX",g,o.width,n.node(g));const{ranksep:i,nodesep:w}=n.graph();o.graph.setGraph({...o.graph.graph(),ranksep:i+25,nodesep:w});const m=await A(h,o.graph,r,s,n.node(g),c),N=m.elem;q(o,N),o.diff=m.diff||0,t.info("New compound node after recursive render XAX",g,"width",o.width,"height",o.height),H(N,o)}else n.children(g).length>0?(t.trace("Cluster - the non recursive path XBX",g,o.id,o,o.width,"Graph:",n),t.trace(x(o.id,n)),u.set(o.id,{id:x(o.id,n),node:o})):(t.trace("Node - the non recursive path XAX",g,h,n.node(g),a),await Q(h,n.node(g),{config:c,dir:a}))})),await v(async()=>{const g=n.edges().map(async function(o){const i=n.edge(o.v,o.w,o.name);t.info("Edge "+o.v+" -> "+o.w+": "+JSON.stringify(o)),t.info("Edge "+o.v+" -> "+o.w+": ",o," ",JSON.stringify(n.edge(o))),t.info("Fix",u,"ids:",o.v,o.w,"Translating: ",u.get(o.v),u.get(o.w)),await U(C,i)});await Promise.all(g)},"processEdges")(),t.info("Graph before layout:",JSON.stringify(X(n))),t.info("############################################# XXX"),t.info("### Layout ### XXX"),t.info("############################################# XXX"),K(n),t.info("Graph after layout:",JSON.stringify(X(n)));let p=0,{subGraphTitleTotalMargin:y}=Z(c);return await Promise.all(ae(n).map(async function(g){var o;const i=n.node(g);if(t.info("Position XBX => "+g+": ("+i.x,","+i.y,") width: ",i.width," height: ",i.height),i!=null&&i.clusterNode)i.y+=y,t.info("A tainted cluster node XBX1",g,i.id,i.width,i.height,i.x,i.y,n.parent(g)),u.get(i.id).node=i,D(i);else if(n.children(g).length>0){t.info("A pure cluster node XBX1",g,i.id,i.x,i.y,i.width,i.height,n.parent(g)),i.height+=y,n.node(i.parentId);const w=(i==null?void 0:i.padding)/2||0,m=((o=i==null?void 0:i.labelBBox)==null?void 0:o.height)||0,N=m-w||0;t.debug("OffsetY",N,"labelHeight",m,"halfPadding",w),await V(f,i),u.get(i.id).node=i}else{const w=n.node(i.parentId);i.y+=y/2,t.info("A regular node XBX1 - using the padding",i.id,"parent",i.parentId,i.width,i.height,i.x,i.y,"offsetY",i.offsetY,"parent",w,w==null?void 0:w.offsetY,i),D(i)}})),n.edges().forEach(function(g){const o=n.edge(g);t.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(o),o),o.points.forEach(N=>N.y+=y/2);const i=n.node(g.v);var w=n.node(g.w);const m=$(b,o,u,r,i,w,s);z(o,m)}),n.nodes().forEach(function(g){const o=n.node(g);t.info(g,o.type,o.diff),o.isGroup&&(p=o.diff)}),t.warn("Returning from recursive render XAX",l,p),{elem:l,diff:p}},"recursiveRender"),ue=v(async(e,n)=>{var r,s,d,c,a,l;const f=new O({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:((r=e.config)==null?void 0:r.nodeSpacing)||((d=(s=e.config)==null?void 0:s.flowchart)==null?void 0:d.nodeSpacing)||e.nodeSpacing,ranksep:((c=e.config)==null?void 0:c.rankSpacing)||((l=(a=e.config)==null?void 0:a.flowchart)==null?void 0:l.rankSpacing)||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),b=n.select("g");j(b,e.markers,e.type,e.diagramId),L(),M(),F(),ne(),e.nodes.forEach(h=>{f.setNode(h.id,{...h}),h.parentId&&f.setParent(h.id,h.parentId)}),t.debug("Edges:",e.edges),e.edges.forEach(h=>{if(h.start===h.end){const p=h.start,y=p+"---"+p+"---1",g=p+"---"+p+"---2",o=f.node(p);f.setNode(y,{domId:y,id:y,parentId:o.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),f.setParent(y,o.parentId),f.setNode(g,{domId:g,id:g,parentId:o.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),f.setParent(g,o.parentId);const i=structuredClone(h),w=structuredClone(h),m=structuredClone(h);i.label="",i.arrowTypeEnd="none",i.id=p+"-cyclic-special-1",w.arrowTypeStart="none",w.arrowTypeEnd="none",w.id=p+"-cyclic-special-mid",m.label="",o.isGroup&&(i.fromCluster=p,m.toCluster=p),m.id=p+"-cyclic-special-2",m.arrowTypeStart="none",f.setEdge(p,y,i,p+"-cyclic-special-0"),f.setEdge(y,g,w,p+"-cyclic-special-1"),f.setEdge(g,p,m,p+"-cyc<lic-special-2")}else f.setEdge(h.start,h.end,{...h},h.id)}),t.warn("Graph at first:",JSON.stringify(X(f))),ie(f),t.warn("Graph after XAX:",JSON.stringify(X(f)));const C=Y();await A(b,f,e.type,e.diagramId,void 0,C)},"render");export{ue as render};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import{m as Q}from"./chunk-4BX2VUAB-DP6WsS5b-DmFzjHyq.js";import{e as X}from"./chunk-QZHKN3VN-DehtyeGo-BsFo-AuY.js";import{R as m,z as Z,w as rr,u as tr,h as er,i as or,l as nr,O as w,g as ar,d as cr,v as ir,K as sr,F as dr,x as k,L as hr,M as $r,N as mr,T as lr}from"./index-DodYl3VC.js";import{N as yr}from"./treemap-KMMF4GRG-BLuW6hva-CvNDnceM.js";import"./_baseUniq-DZ7Bpu3I-Co9egLVD.js";import"./_basePickBy-0t-1TdXj-DH4J1m8V.js";import"./clone-D8_vOzkg-D9aZREI4.js";var f={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},gr=mr.gitGraph,O=m(()=>hr({...gr,...$r().gitGraph}),"getConfig"),s=new X(()=>{const t=O(),r=t.mainBranchName,e=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:e}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function S(){return lr({length:7})}m(S,"getID");function F(t,r){const e=Object.create(null);return t.reduce((a,c)=>{const i=r(c);return e[i]||(e[i]=!0,a.push(c)),a},[])}m(F,"uniqBy");var pr=m(function(t){s.records.direction=t},"setDirection"),xr=m(function(t){w.debug("options str",t),t=t==null?void 0:t.trim(),t=t||"{}";try{s.records.options=JSON.parse(t)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),ur=m(function(){return s.records.options},"getOptions"),fr=m(function(t){let r=t.msg,e=t.id;const a=t.type;let c=t.tags;w.info("commit",r,e,a,c),w.debug("Entering commit:",r,e,a,c);const i=O();e=k.sanitizeText(e,i),r=k.sanitizeText(r,i),c=c==null?void 0:c.map(h=>k.sanitizeText(h,i));const d={id:e||s.records.seq+"-"+S(),message:r,seq:s.records.seq++,type:a??f.NORMAL,tags:c??[],parents:s.records.head==null?[]:[s.records.head.id],branch:s.records.currBranch};s.records.head=d,w.info("main branch",i.mainBranchName),s.records.commits.has(d.id)&&w.warn(`Commit ID ${d.id} already exists`),s.records.commits.set(d.id,d),s.records.branches.set(s.records.currBranch,d.id),w.debug("in pushCommit "+d.id)},"commit"),br=m(function(t){let r=t.name;const e=t.order;if(r=k.sanitizeText(r,O()),s.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);s.records.branches.set(r,s.records.head!=null?s.records.head.id:null),s.records.branchConfig.set(r,{name:r,order:e}),_(r),w.debug("in createBranch")},"branch"),wr=m(t=>{let r=t.branch,e=t.id;const a=t.type,c=t.tags,i=O();r=k.sanitizeText(r,i),e&&(e=k.sanitizeText(e,i));const d=s.records.branches.get(s.records.currBranch),h=s.records.branches.get(r),l=d?s.records.commits.get(d):void 0,o=h?s.records.commits.get(h):void 0;if(l&&o&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(s.records.currBranch===r){const $=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw $.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},$}if(l===void 0||!l){const $=new Error(`Incorrect usage of "merge". Current branch (${s.records.currBranch})has no commits`);throw $.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},$}if(!s.records.branches.has(r)){const $=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw $.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},$}if(o===void 0||!o){const $=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw $.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},$}if(l===o){const $=new Error('Incorrect usage of "merge". Both branches have same head');throw $.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},$}if(e&&s.records.commits.has(e)){const $=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom id");throw $.hash={text:`merge ${r} ${e} ${a} ${c==null?void 0:c.join(" ")}`,token:`merge ${r} ${e} ${a} ${c==null?void 0:c.join(" ")}`,expected:[`merge ${r} ${e}_UNIQUE ${a} ${c==null?void 0:c.join(" ")}`]},$}const n=h||"",u={id:e||`${s.records.seq}-${S()}`,message:`merged branch ${r} into ${s.records.currBranch}`,seq:s.records.seq++,parents:s.records.head==null?[]:[s.records.head.id,n],branch:s.records.currBranch,type:f.MERGE,customType:a,customId:!!e,tags:c??[]};s.records.head=u,s.records.commits.set(u.id,u),s.records.branches.set(s.records.currBranch,u.id),w.debug(s.records.branches),w.debug("in mergeBranch")},"merge"),Br=m(function(t){let r=t.id,e=t.targetId,a=t.tags,c=t.parent;w.debug("Entering cherryPick:",r,e,a);const i=O();if(r=k.sanitizeText(r,i),e=k.sanitizeText(e,i),a=a==null?void 0:a.map(l=>k.sanitizeText(l,i)),c=k.sanitizeText(c,i),!r||!s.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},l}const d=s.records.commits.get(r);if(d===void 0||!d)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(c&&!(Array.isArray(d.parents)&&d.parents.includes(c)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const h=d.branch;if(d.type===f.MERGE&&!c)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!e||!s.records.commits.has(e)){if(h===s.records.currBranch){const u=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw u.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},u}const l=s.records.branches.get(s.records.currBranch);if(l===void 0||!l){const u=new Error(`Incorrect usage of "cherry-pick". Current branch (${s.records.currBranch})has no commits`);throw u.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},u}const o=s.records.commits.get(l);if(o===void 0||!o){const u=new Error(`Incorrect usage of "cherry-pick". Current branch (${s.records.currBranch})has no commits`);throw u.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},u}const n={id:s.records.seq+"-"+S(),message:`cherry-picked ${d==null?void 0:d.message} into ${s.records.currBranch}`,seq:s.records.seq++,parents:s.records.head==null?[]:[s.records.head.id,d.id],branch:s.records.currBranch,type:f.CHERRY_PICK,tags:a?a.filter(Boolean):[`cherry-pick:${d.id}${d.type===f.MERGE?`|parent:${c}`:""}`]};s.records.head=n,s.records.commits.set(n.id,n),s.records.branches.set(s.records.currBranch,n.id),w.debug(s.records.branches),w.debug("in cherryPick")}},"cherryPick"),_=m(function(t){if(t=k.sanitizeText(t,O()),s.records.branches.has(t)){s.records.currBranch=t;const r=s.records.branches.get(s.records.currBranch);r===void 0||!r?s.records.head=null:s.records.head=s.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}},"checkout");function D(t,r,e){const a=t.indexOf(r);a===-1?t.push(e):t.splice(a,1,e)}m(D,"upsert");function W(t){const r=t.reduce((c,i)=>c.seq>i.seq?c:i,t[0]);let e="";t.forEach(function(c){c===r?e+=" *":e+=" |"});const a=[e,r.id,r.seq];for(const c in s.records.branches)s.records.branches.get(c)===r.id&&a.push(c);if(w.debug(a.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const c=s.records.commits.get(r.parents[0]);D(t,r,c),r.parents[1]&&t.push(s.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const c=s.records.commits.get(r.parents[0]);D(t,r,c)}}t=F(t,c=>c.id),W(t)}m(W,"prettyPrintCommitHistory");var Er=m(function(){w.debug(s.records.commits);const t=Y()[0];W([t])},"prettyPrint"),vr=m(function(){s.reset(),dr()},"clear"),Cr=m(function(){return[...s.records.branchConfig.values()].map((t,r)=>t.order!==null&&t.order!==void 0?t:{...t,order:parseFloat(`0.${r}`)}).sort((t,r)=>(t.order??0)-(r.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),kr=m(function(){return s.records.branches},"getBranches"),Lr=m(function(){return s.records.commits},"getCommits"),Y=m(function(){const t=[...s.records.commits.values()];return t.forEach(function(r){w.debug(r.id)}),t.sort((r,e)=>r.seq-e.seq),t},"getCommitsArray"),Tr=m(function(){return s.records.currBranch},"getCurrentBranch"),Mr=m(function(){return s.records.direction},"getDirection"),Rr=m(function(){return s.records.head},"getHead"),V={commitType:f,getConfig:O,setDirection:pr,setOptions:xr,getOptions:ur,commit:fr,branch:br,merge:wr,cherryPick:Br,checkout:_,prettyPrint:Er,clear:vr,getBranchesAsObjArray:Cr,getBranches:kr,getCommits:Lr,getCommitsArray:Y,getCurrentBranch:Tr,getDirection:Mr,getHead:Rr,setAccTitle:nr,getAccTitle:or,getAccDescription:er,setAccDescription:tr,setDiagramTitle:rr,getDiagramTitle:Z},Pr=m((t,r)=>{Q(t,r),t.dir&&r.setDirection(t.dir);for(const e of t.statements)Ir(e,r)},"populate"),Ir=m((t,r)=>{const e={Commit:m(a=>r.commit(Ar(a)),"Commit"),Branch:m(a=>r.branch(Gr(a)),"Branch"),Merge:m(a=>r.merge(Or(a)),"Merge"),Checkout:m(a=>r.checkout(qr(a)),"Checkout"),CherryPicking:m(a=>r.cherryPick(zr(a)),"CherryPicking")}[t.$type];e?e(t):w.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Ar=m(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?f[t.type]:f.NORMAL,tags:t.tags??void 0}),"parseCommit"),Gr=m(t=>({name:t.name,order:t.order??0}),"parseBranch"),Or=m(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?f[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),qr=m(t=>t.branch,"parseCheckout"),zr=m(t=>{var r;return{id:t.id,targetId:"",tags:((r=t.tags)==null?void 0:r.length)===0?void 0:t.tags,parent:t.parent}},"parseCherryPicking"),Hr={parse:m(async t=>{const r=await yr("gitGraph",t);w.debug(r),Pr(r,V)},"parse")},j=ar(),E=j==null?void 0:j.gitGraph,I=10,A=40,L=4,M=2,G=8,v=new Map,C=new Map,H=30,q=new Map,N=[],P=0,x="LR",Nr=m(()=>{v.clear(),C.clear(),q.clear(),P=0,N=[],x="LR"},"clear"),U=m(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(e=>{const a=document.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),a.setAttribute("dy","1em"),a.setAttribute("x","0"),a.setAttribute("class","row"),a.textContent=e.trim(),r.appendChild(a)}),r},"drawText"),J=m(t=>{let r,e,a;return x==="BT"?(e=m((c,i)=>c<=i,"comparisonFunc"),a=1/0):(e=m((c,i)=>c>=i,"comparisonFunc"),a=0),t.forEach(c=>{var i,d;const h=x==="TB"||x=="BT"?(i=C.get(c))==null?void 0:i.y:(d=C.get(c))==null?void 0:d.x;h!==void 0&&e(h,a)&&(r=c,a=h)}),r},"findClosestParent"),Sr=m(t=>{let r="",e=1/0;return t.forEach(a=>{const c=C.get(a).y;c<=e&&(r=a,e=c)}),r||void 0},"findClosestParentBT"),Dr=m((t,r,e)=>{let a=e,c=e;const i=[];t.forEach(d=>{const h=r.get(d);if(!h)throw new Error(`Commit not found for key ${d}`);h.parents.length?(a=jr(h),c=Math.max(a,c)):i.push(h),Kr(h,a)}),a=c,i.forEach(d=>{Fr(d,a,e)}),t.forEach(d=>{const h=r.get(d);if(h!=null&&h.parents.length){const l=Sr(h.parents);a=C.get(l).y-A,a<=c&&(c=a);const o=v.get(h.branch).pos,n=a-I;C.set(h.id,{x:o,y:n})}})},"setParallelBTPos"),Wr=m(t=>{var r;const e=J(t.parents.filter(c=>c!==null));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);const a=(r=C.get(e))==null?void 0:r.y;if(a===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return a},"findClosestParentPos"),jr=m(t=>Wr(t)+A,"calculateCommitPosition"),Kr=m((t,r)=>{const e=v.get(t.branch);if(!e)throw new Error(`Branch not found for commit ${t.id}`);const a=e.pos,c=r+I;return C.set(t.id,{x:a,y:c}),{x:a,y:c}},"setCommitPosition"),Fr=m((t,r,e)=>{const a=v.get(t.branch);if(!a)throw new Error(`Branch not found for commit ${t.id}`);const c=r+e,i=a.pos;C.set(t.id,{x:i,y:c})},"setRootPosition"),_r=m((t,r,e,a,c,i)=>{if(i===f.HIGHLIGHT)t.append("rect").attr("x",e.x-10).attr("y",e.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${c%G} ${a}-outer`),t.append("rect").attr("x",e.x-6).attr("y",e.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${c%G} ${a}-inner`);else if(i===f.CHERRY_PICK)t.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",10).attr("class",`commit ${r.id} ${a}`),t.append("circle").attr("cx",e.x-3).attr("cy",e.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${a}`),t.append("circle").attr("cx",e.x+3).attr("cy",e.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${a}`),t.append("line").attr("x1",e.x+3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${a}`),t.append("line").attr("x1",e.x-3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${a}`);else{const d=t.append("circle");if(d.attr("cx",e.x),d.attr("cy",e.y),d.attr("r",r.type===f.MERGE?9:10),d.attr("class",`commit ${r.id} commit${c%G}`),i===f.MERGE){const h=t.append("circle");h.attr("cx",e.x),h.attr("cy",e.y),h.attr("r",6),h.attr("class",`commit ${a} ${r.id} commit${c%G}`)}i===f.REVERSE&&t.append("path").attr("d",`M ${e.x-5},${e.y-5}L${e.x+5},${e.y+5}M${e.x-5},${e.y+5}L${e.x+5},${e.y-5}`).attr("class",`commit ${a} ${r.id} commit${c%G}`)}},"drawCommitBullet"),Yr=m((t,r,e,a)=>{var c;if(r.type!==f.CHERRY_PICK&&(r.customId&&r.type===f.MERGE||r.type!==f.MERGE)&&E!=null&&E.showCommitLabel){const i=t.append("g"),d=i.insert("rect").attr("class","commit-label-bkg"),h=i.append("text").attr("x",a).attr("y",e.y+25).attr("class","commit-label").text(r.id),l=(c=h.node())==null?void 0:c.getBBox();if(l&&(d.attr("x",e.posWithOffset-l.width/2-M).attr("y",e.y+13.5).attr("width",l.width+2*M).attr("height",l.height+2*M),x==="TB"||x==="BT"?(d.attr("x",e.x-(l.width+4*L+5)).attr("y",e.y-12),h.attr("x",e.x-(l.width+4*L)).attr("y",e.y+l.height-12)):h.attr("x",e.posWithOffset-l.width/2),E.rotateCommitLabel))if(x==="TB"||x==="BT")h.attr("transform","rotate(-45, "+e.x+", "+e.y+")"),d.attr("transform","rotate(-45, "+e.x+", "+e.y+")");else{const o=-7.5-(l.width+10)/25*9.5,n=10+l.width/25*8.5;i.attr("transform","translate("+o+", "+n+") rotate(-45, "+a+", "+e.y+")")}}},"drawCommitLabel"),Vr=m((t,r,e,a)=>{var c;if(r.tags.length>0){let i=0,d=0,h=0;const l=[];for(const o of r.tags.reverse()){const n=t.insert("polygon"),u=t.append("circle"),$=t.append("text").attr("y",e.y-16-i).attr("class","tag-label").text(o),y=(c=$.node())==null?void 0:c.getBBox();if(!y)throw new Error("Tag bbox not found");d=Math.max(d,y.width),h=Math.max(h,y.height),$.attr("x",e.posWithOffset-y.width/2),l.push({tag:$,hole:u,rect:n,yOffset:i}),i+=20}for(const{tag:o,hole:n,rect:u,yOffset:$}of l){const y=h/2,p=e.y-19.2-$;if(u.attr("class","tag-label-bkg").attr("points",`
|
|
2
|
-
${a-d/2-L/2},${p+M}
|
|
3
|
-
${a-d/2-L/2},${p-M}
|
|
4
|
-
${e.posWithOffset-d/2-L},${p-y-M}
|
|
5
|
-
${e.posWithOffset+d/2+L},${p-y-M}
|
|
6
|
-
${e.posWithOffset+d/2+L},${p+y+M}
|
|
7
|
-
${e.posWithOffset-d/2-L},${p+y+M}`),n.attr("cy",p).attr("cx",a-d/2+L/2).attr("r",1.5).attr("class","tag-hole"),x==="TB"||x==="BT"){const g=a+$;u.attr("class","tag-label-bkg").attr("points",`
|
|
8
|
-
${e.x},${g+2}
|
|
9
|
-
${e.x},${g-2}
|
|
10
|
-
${e.x+I},${g-y-2}
|
|
11
|
-
${e.x+I+d+4},${g-y-2}
|
|
12
|
-
${e.x+I+d+4},${g+y+2}
|
|
13
|
-
${e.x+I},${g+y+2}`).attr("transform","translate(12,12) rotate(45, "+e.x+","+a+")"),n.attr("cx",e.x+L/2).attr("cy",g).attr("transform","translate(12,12) rotate(45, "+e.x+","+a+")"),o.attr("x",e.x+5).attr("y",g+3).attr("transform","translate(14,14) rotate(45, "+e.x+","+a+")")}}}},"drawCommitTags"),Ur=m(t=>{switch(t.customType??t.type){case f.NORMAL:return"commit-normal";case f.REVERSE:return"commit-reverse";case f.HIGHLIGHT:return"commit-highlight";case f.MERGE:return"commit-merge";case f.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Jr=m((t,r,e,a)=>{const c={x:0,y:0};if(t.parents.length>0){const i=J(t.parents);if(i){const d=a.get(i)??c;return r==="TB"?d.y+A:r==="BT"?(a.get(t.id)??c).y-A:d.x+A}}else return r==="TB"?H:r==="BT"?(a.get(t.id)??c).y-A:0;return 0},"calculatePosition"),Qr=m((t,r,e)=>{var a,c;const i=x==="BT"&&e?r:r+I,d=x==="TB"||x==="BT"?i:(a=v.get(t.branch))==null?void 0:a.pos,h=x==="TB"||x==="BT"?(c=v.get(t.branch))==null?void 0:c.pos:i;if(h===void 0||d===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:h,y:d,posWithOffset:i}},"getCommitPosition"),K=m((t,r,e)=>{if(!E)throw new Error("GitGraph config not found");const a=t.append("g").attr("class","commit-bullets"),c=t.append("g").attr("class","commit-labels");let i=x==="TB"||x==="BT"?H:0;const d=[...r.keys()],h=(E==null?void 0:E.parallelCommits)??!1,l=m((n,u)=>{var $,y;const p=($=r.get(n))==null?void 0:$.seq,g=(y=r.get(u))==null?void 0:y.seq;return p!==void 0&&g!==void 0?p-g:0},"sortKeys");let o=d.sort(l);x==="BT"&&(h&&Dr(o,r,i),o=o.reverse()),o.forEach(n=>{var u;const $=r.get(n);if(!$)throw new Error(`Commit not found for key ${n}`);h&&(i=Jr($,x,i,C));const y=Qr($,i,h);if(e){const p=Ur($),g=$.customType??$.type,T=((u=v.get($.branch))==null?void 0:u.index)??0;_r(a,$,y,p,T,g),Yr(c,$,y,i),Vr(c,$,y,i)}x==="TB"||x==="BT"?C.set($.id,{x:y.x,y:y.posWithOffset}):C.set($.id,{x:y.posWithOffset,y:y.y}),i=x==="BT"&&h?i+A:i+A+I,i>P&&(P=i)})},"drawCommits"),Xr=m((t,r,e,a,c)=>{const i=(x==="TB"||x==="BT"?e.x<a.x:e.y<a.y)?r.branch:t.branch,d=m(l=>l.branch===i,"isOnBranchToGetCurve"),h=m(l=>l.seq>t.seq&&l.seq<r.seq,"isBetweenCommits");return[...c.values()].some(l=>h(l)&&d(l))},"shouldRerouteArrow"),z=m((t,r,e=0)=>{const a=t+Math.abs(t-r)/2;if(e>5)return a;if(N.every(i=>Math.abs(i-a)>=10))return N.push(a),a;const c=Math.abs(t-r);return z(t,r-c/5,e+1)},"findLane"),Zr=m((t,r,e,a)=>{var c,i,d,h,l;const o=C.get(r.id),n=C.get(e.id);if(o===void 0||n===void 0)throw new Error(`Commit positions not found for commits ${r.id} and ${e.id}`);const u=Xr(r,e,o,n,a);let $="",y="",p=0,g=0,T=(c=v.get(e.branch))==null?void 0:c.index;e.type===f.MERGE&&r.id!==e.parents[0]&&(T=(i=v.get(r.branch))==null?void 0:i.index);let b;if(u){$="A 10 10, 0, 0, 0,",y="A 10 10, 0, 0, 1,",p=10,g=10;const R=o.y<n.y?z(o.y,n.y):z(n.y,o.y),B=o.x<n.x?z(o.x,n.x):z(n.x,o.x);x==="TB"?o.x<n.x?b=`M ${o.x} ${o.y} L ${B-p} ${o.y} ${y} ${B} ${o.y+g} L ${B} ${n.y-p} ${$} ${B+g} ${n.y} L ${n.x} ${n.y}`:(T=(d=v.get(r.branch))==null?void 0:d.index,b=`M ${o.x} ${o.y} L ${B+p} ${o.y} ${$} ${B} ${o.y+g} L ${B} ${n.y-p} ${y} ${B-g} ${n.y} L ${n.x} ${n.y}`):x==="BT"?o.x<n.x?b=`M ${o.x} ${o.y} L ${B-p} ${o.y} ${$} ${B} ${o.y-g} L ${B} ${n.y+p} ${y} ${B+g} ${n.y} L ${n.x} ${n.y}`:(T=(h=v.get(r.branch))==null?void 0:h.index,b=`M ${o.x} ${o.y} L ${B+p} ${o.y} ${y} ${B} ${o.y-g} L ${B} ${n.y+p} ${$} ${B-g} ${n.y} L ${n.x} ${n.y}`):o.y<n.y?b=`M ${o.x} ${o.y} L ${o.x} ${R-p} ${$} ${o.x+g} ${R} L ${n.x-p} ${R} ${y} ${n.x} ${R+g} L ${n.x} ${n.y}`:(T=(l=v.get(r.branch))==null?void 0:l.index,b=`M ${o.x} ${o.y} L ${o.x} ${R+p} ${y} ${o.x+g} ${R} L ${n.x-p} ${R} ${$} ${n.x} ${R-g} L ${n.x} ${n.y}`)}else $="A 20 20, 0, 0, 0,",y="A 20 20, 0, 0, 1,",p=20,g=20,x==="TB"?(o.x<n.x&&(e.type===f.MERGE&&r.id!==e.parents[0]?b=`M ${o.x} ${o.y} L ${o.x} ${n.y-p} ${$} ${o.x+g} ${n.y} L ${n.x} ${n.y}`:b=`M ${o.x} ${o.y} L ${n.x-p} ${o.y} ${y} ${n.x} ${o.y+g} L ${n.x} ${n.y}`),o.x>n.x&&($="A 20 20, 0, 0, 0,",y="A 20 20, 0, 0, 1,",p=20,g=20,e.type===f.MERGE&&r.id!==e.parents[0]?b=`M ${o.x} ${o.y} L ${o.x} ${n.y-p} ${y} ${o.x-g} ${n.y} L ${n.x} ${n.y}`:b=`M ${o.x} ${o.y} L ${n.x+p} ${o.y} ${$} ${n.x} ${o.y+g} L ${n.x} ${n.y}`),o.x===n.x&&(b=`M ${o.x} ${o.y} L ${n.x} ${n.y}`)):x==="BT"?(o.x<n.x&&(e.type===f.MERGE&&r.id!==e.parents[0]?b=`M ${o.x} ${o.y} L ${o.x} ${n.y+p} ${y} ${o.x+g} ${n.y} L ${n.x} ${n.y}`:b=`M ${o.x} ${o.y} L ${n.x-p} ${o.y} ${$} ${n.x} ${o.y-g} L ${n.x} ${n.y}`),o.x>n.x&&($="A 20 20, 0, 0, 0,",y="A 20 20, 0, 0, 1,",p=20,g=20,e.type===f.MERGE&&r.id!==e.parents[0]?b=`M ${o.x} ${o.y} L ${o.x} ${n.y+p} ${$} ${o.x-g} ${n.y} L ${n.x} ${n.y}`:b=`M ${o.x} ${o.y} L ${n.x-p} ${o.y} ${$} ${n.x} ${o.y-g} L ${n.x} ${n.y}`),o.x===n.x&&(b=`M ${o.x} ${o.y} L ${n.x} ${n.y}`)):(o.y<n.y&&(e.type===f.MERGE&&r.id!==e.parents[0]?b=`M ${o.x} ${o.y} L ${n.x-p} ${o.y} ${y} ${n.x} ${o.y+g} L ${n.x} ${n.y}`:b=`M ${o.x} ${o.y} L ${o.x} ${n.y-p} ${$} ${o.x+g} ${n.y} L ${n.x} ${n.y}`),o.y>n.y&&(e.type===f.MERGE&&r.id!==e.parents[0]?b=`M ${o.x} ${o.y} L ${n.x-p} ${o.y} ${$} ${n.x} ${o.y-g} L ${n.x} ${n.y}`:b=`M ${o.x} ${o.y} L ${o.x} ${n.y+p} ${y} ${o.x+g} ${n.y} L ${n.x} ${n.y}`),o.y===n.y&&(b=`M ${o.x} ${o.y} L ${n.x} ${n.y}`));if(b===void 0)throw new Error("Line definition not found");t.append("path").attr("d",b).attr("class","arrow arrow"+T%G)},"drawArrow"),rt=m((t,r)=>{const e=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(a=>{const c=r.get(a);c.parents&&c.parents.length>0&&c.parents.forEach(i=>{Zr(e,r.get(i),c,r)})})},"drawArrows"),tt=m((t,r)=>{const e=t.append("g");r.forEach((a,c)=>{var i;const d=c%G,h=(i=v.get(a.name))==null?void 0:i.pos;if(h===void 0)throw new Error(`Position not found for branch ${a.name}`);const l=e.append("line");l.attr("x1",0),l.attr("y1",h),l.attr("x2",P),l.attr("y2",h),l.attr("class","branch branch"+d),x==="TB"?(l.attr("y1",H),l.attr("x1",h),l.attr("y2",P),l.attr("x2",h)):x==="BT"&&(l.attr("y1",P),l.attr("x1",h),l.attr("y2",H),l.attr("x2",h)),N.push(h);const o=a.name,n=U(o),u=e.insert("rect"),$=e.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+d);$.node().appendChild(n);const y=n.getBBox();u.attr("class","branchLabelBkg label"+d).attr("rx",4).attr("ry",4).attr("x",-y.width-4-((E==null?void 0:E.rotateCommitLabel)===!0?30:0)).attr("y",-y.height/2+8).attr("width",y.width+18).attr("height",y.height+4),$.attr("transform","translate("+(-y.width-14-((E==null?void 0:E.rotateCommitLabel)===!0?30:0))+", "+(h-y.height/2-1)+")"),x==="TB"?(u.attr("x",h-y.width/2-10).attr("y",0),$.attr("transform","translate("+(h-y.width/2-5)+", 0)")):x==="BT"?(u.attr("x",h-y.width/2-10).attr("y",P),$.attr("transform","translate("+(h-y.width/2-5)+", "+P+")")):u.attr("transform","translate(-19, "+(h-y.height/2)+")")})},"drawBranches"),et=m(function(t,r,e,a,c){return v.set(t,{pos:r,index:e}),r+=50+(c?40:0)+(x==="TB"||x==="BT"?a.width/2:0),r},"setBranchPosition"),ot=m(function(t,r,e,a){if(Nr(),w.debug("in gitgraph renderer",t+`
|
|
14
|
-
`,"id:",r,e),!E)throw new Error("GitGraph config not found");const c=E.rotateCommitLabel??!1,i=a.db;q=i.getCommits();const d=i.getBranchesAsObjArray();x=i.getDirection();const h=cr(`[id="${r}"]`);let l=0;d.forEach((o,n)=>{var u;const $=U(o.name),y=h.append("g"),p=y.insert("g").attr("class","branchLabel"),g=p.insert("g").attr("class","label branch-label");(u=g.node())==null||u.appendChild($);const T=$.getBBox();l=et(o.name,l,n,T,c),g.remove(),p.remove(),y.remove()}),K(h,q,!1),E.showBranches&&tt(h,d),rt(h,q),K(h,q,!0),ir.insertTitle(h,"gitTitleText",E.titleTopMargin??0,i.getDiagramTitle()),sr(void 0,h,E.diagramPadding,E.useMaxWidth)},"draw"),nt={draw:ot},at=m(t=>`
|
|
15
|
-
.commit-id,
|
|
16
|
-
.commit-msg,
|
|
17
|
-
.branch-label {
|
|
18
|
-
fill: lightgrey;
|
|
19
|
-
color: lightgrey;
|
|
20
|
-
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
21
|
-
font-family: var(--mermaid-font-family);
|
|
22
|
-
}
|
|
23
|
-
${[0,1,2,3,4,5,6,7].map(r=>`
|
|
24
|
-
.branch-label${r} { fill: ${t["gitBranchLabel"+r]}; }
|
|
25
|
-
.commit${r} { stroke: ${t["git"+r]}; fill: ${t["git"+r]}; }
|
|
26
|
-
.commit-highlight${r} { stroke: ${t["gitInv"+r]}; fill: ${t["gitInv"+r]}; }
|
|
27
|
-
.label${r} { fill: ${t["git"+r]}; }
|
|
28
|
-
.arrow${r} { stroke: ${t["git"+r]}; }
|
|
29
|
-
`).join(`
|
|
30
|
-
`)}
|
|
31
|
-
|
|
32
|
-
.branch {
|
|
33
|
-
stroke-width: 1;
|
|
34
|
-
stroke: ${t.lineColor};
|
|
35
|
-
stroke-dasharray: 2;
|
|
36
|
-
}
|
|
37
|
-
.commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}
|
|
38
|
-
.commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }
|
|
39
|
-
.tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
|
|
40
|
-
.tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }
|
|
41
|
-
.tag-hole { fill: ${t.textColor}; }
|
|
42
|
-
|
|
43
|
-
.commit-merge {
|
|
44
|
-
stroke: ${t.primaryColor};
|
|
45
|
-
fill: ${t.primaryColor};
|
|
46
|
-
}
|
|
47
|
-
.commit-reverse {
|
|
48
|
-
stroke: ${t.primaryColor};
|
|
49
|
-
fill: ${t.primaryColor};
|
|
50
|
-
stroke-width: 3;
|
|
51
|
-
}
|
|
52
|
-
.commit-highlight-outer {
|
|
53
|
-
}
|
|
54
|
-
.commit-highlight-inner {
|
|
55
|
-
stroke: ${t.primaryColor};
|
|
56
|
-
fill: ${t.primaryColor};
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
|
|
60
|
-
.gitTitleText {
|
|
61
|
-
text-anchor: middle;
|
|
62
|
-
font-size: 18px;
|
|
63
|
-
fill: ${t.textColor};
|
|
64
|
-
}
|
|
65
|
-
`,"getStyles"),ct=at,yt={parser:Hr,db:V,renderer:nt,styles:ct};export{yt as diagram};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{R as e,O as s,am as i,B as n,an as d}from"./index-DodYl3VC.js";import{N as p}from"./treemap-KMMF4GRG-BLuW6hva-CvNDnceM.js";import"./_baseUniq-DZ7Bpu3I-Co9egLVD.js";import"./_basePickBy-0t-1TdXj-DH4J1m8V.js";import"./clone-D8_vOzkg-D9aZREI4.js";var m={parse:e(async r=>{const a=await p("info",r);s.debug(a)},"parse")},g={version:d.version+""},v=e(()=>g.version,"getVersion"),c={getVersion:v},f=e((r,a,o)=>{s.debug(`rendering info diagram
|
|
2
|
-
`+r);const t=i(a);n(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw"),x={draw:f},N={parser:m,db:c,renderer:x};export{N as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as t,V as e,B as a,M as s}from"./chunk-DI55MBZ5-NwybRWU6-D93ibRgN.js";import{R as o}from"./index-DodYl3VC.js";import"./chunk-55IACEB6-DcZAWW2t-DPyoMeFz.js";import"./chunk-QN33PNHL-cmS1bOzt-B1tGHIDu.js";var M={parser:a,get db(){return new s(2)},renderer:e,styles:t,init:o(r=>{r.state||(r.state={}),r.state.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{M as diagram};
|