livebook/static/assets/xychartDiagram-6QU3TZC5-6SD7MGQD.js
2024-12-05 05:49:36 +00:00

7 lines
37 KiB
JavaScript

import{a as ti}from"./chunk-5XJO6U7A.js";import{b as Jt}from"./chunk-ZPWCXWQI.js";import{l as Ct}from"./chunk-47P5NBBB.js";import"./chunk-XHGORZV2.js";import{D as ot,Fa as kt,H as Ut,O as $t,S as qt,T as Gt,U as jt,V as Qt,W as Kt,X as Zt,Y as yt,h as n,j as mt,la as bt,ma as At,t as Yt,v as Ht}from"./chunk-KRX7QNR4.js";import"./chunk-24JW6VB3.js";import"./chunk-MGYUK2XN.js";var wt=function(){var s=n(function(M,o,c,u){for(c=c||{},u=M.length;u--;c[M[u]]=o);return c},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],e=[1,3],a=[1,5],h=[1,6],x=[1,7],m=[1,5,10,12,14,16,18,19,21,23,34,35,36],y=[1,25],R=[1,26],S=[1,28],D=[1,29],I=[1,30],V=[1,31],_=[1,32],E=[1,33],f=[1,34],C=[1,35],l=[1,36],v=[1,37],K=[1,43],Bt=[1,42],Mt=[1,47],et=[1,50],A=[1,10,12,14,16,18,19,21,23,34,35,36],ct=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],P=[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],Wt=[1,64],ut={trace:n(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:n(function(o,c,u,g,b,r,Z){var p=r.length-1;switch(b){case 5:g.setOrientation(r[p]);break;case 9:g.setDiagramTitle(r[p].text.trim());break;case 12:g.setLineData({text:"",type:"text"},r[p]);break;case 13:g.setLineData(r[p-1],r[p]);break;case 14:g.setBarData({text:"",type:"text"},r[p]);break;case 15:g.setBarData(r[p-1],r[p]);break;case 16:this.$=r[p].trim(),g.setAccTitle(this.$);break;case 17:case 18:this.$=r[p].trim(),g.setAccDescription(this.$);break;case 19:this.$=r[p-1];break;case 20:this.$=[Number(r[p-2]),...r[p]];break;case 21:this.$=[Number(r[p])];break;case 22:g.setXAxisTitle(r[p]);break;case 23:g.setXAxisTitle(r[p-1]);break;case 24:g.setXAxisTitle({type:"text",text:""});break;case 25:g.setXAxisBand(r[p]);break;case 26:g.setXAxisRangeData(Number(r[p-2]),Number(r[p]));break;case 27:this.$=r[p-1];break;case 28:this.$=[r[p-2],...r[p]];break;case 29:this.$=[r[p]];break;case 30:g.setYAxisTitle(r[p]);break;case 31:g.setYAxisTitle(r[p-1]);break;case 32:g.setYAxisTitle({type:"text",text:""});break;case 33:g.setYAxisRangeData(Number(r[p-2]),Number(r[p]));break;case 37:this.$={text:r[p],type:"text"};break;case 38:this.$={text:r[p],type:"text"};break;case 39:this.$={text:r[p],type:"markdown"};break;case 40:this.$=r[p];break;case 41:this.$=r[p-1]+""+r[p];break}},"anonymous"),table:[s(t,i,{3:1,4:2,7:4,5:e,34:a,35:h,36:x}),{1:[3]},s(t,i,{4:2,7:4,3:8,5:e,34:a,35:h,36:x}),s(t,i,{4:2,7:4,6:9,3:10,5:e,8:[1,11],34:a,35:h,36:x}),{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]},s(m,[2,34]),s(m,[2,35]),s(m,[2,36]),{1:[2,1]},s(t,i,{4:2,7:4,3:21,5:e,34:a,35:h,36:x}),{1:[2,3]},s(m,[2,5]),s(t,[2,7],{4:22,34:a,35:h,36:x}),{11:23,37:24,38:y,39:R,40:27,41:S,42:D,43:I,44:V,45:_,46:E,47:f,48:C,49:l,50:v},{11:39,13:38,24:K,27:Bt,29:40,30:41,37:24,38:y,39:R,40:27,41:S,42:D,43:I,44:V,45:_,46:E,47:f,48:C,49:l,50:v},{11:45,15:44,27:Mt,33:46,37:24,38:y,39:R,40:27,41:S,42:D,43:I,44:V,45:_,46:E,47:f,48:C,49:l,50:v},{11:49,17:48,24:et,37:24,38:y,39:R,40:27,41:S,42:D,43:I,44:V,45:_,46:E,47:f,48:C,49:l,50:v},{11:52,17:51,24:et,37:24,38:y,39:R,40:27,41:S,42:D,43:I,44:V,45:_,46:E,47:f,48:C,49:l,50:v},{20:[1,53]},{22:[1,54]},s(A,[2,18]),{1:[2,2]},s(A,[2,8]),s(A,[2,9]),s(ct,[2,37],{40:55,41:S,42:D,43:I,44:V,45:_,46:E,47:f,48:C,49:l,50:v}),s(ct,[2,38]),s(ct,[2,39]),s(P,[2,40]),s(P,[2,42]),s(P,[2,43]),s(P,[2,44]),s(P,[2,45]),s(P,[2,46]),s(P,[2,47]),s(P,[2,48]),s(P,[2,49]),s(P,[2,50]),s(P,[2,51]),s(A,[2,10]),s(A,[2,22],{30:41,29:56,24:K,27:Bt}),s(A,[2,24]),s(A,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:y,39:R,40:27,41:S,42:D,43:I,44:V,45:_,46:E,47:f,48:C,49:l,50:v},s(A,[2,11]),s(A,[2,30],{33:60,27:Mt}),s(A,[2,32]),{31:[1,61]},s(A,[2,12]),{17:62,24:et},{25:63,27:Wt},s(A,[2,14]),{17:65,24:et},s(A,[2,16]),s(A,[2,17]),s(P,[2,41]),s(A,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},s(A,[2,31]),{27:[1,69]},s(A,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},s(A,[2,15]),s(A,[2,26]),s(A,[2,27]),{11:59,32:72,37:24,38:y,39:R,40:27,41:S,42:D,43:I,44:V,45:_,46:E,47:f,48:C,49:l,50:v},s(A,[2,33]),s(A,[2,19]),{25:73,27:Wt},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(o,c){if(c.recoverable)this.trace(o);else{var u=new Error(o);throw u.hash=c,u}},"parseError"),parse:n(function(o){var c=this,u=[0],g=[],b=[null],r=[],Z=this.table,p="",at=0,Ot=0,zt=0,ki=2,Ft=1,Ci=r.slice.call(arguments,1),k=Object.create(this.lexer),W={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(W.yy[gt]=this.yy[gt]);k.setInput(o,W.yy),W.yy.lexer=k,W.yy.parser=this,typeof k.yylloc=="undefined"&&(k.yylloc={});var xt=k.yylloc;r.push(xt);var wi=k.options&&k.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Si(T){u.length=u.length-2*T,b.length=b.length-T,r.length=r.length-T}n(Si,"popStack");function Xt(){var T;return T=g.pop()||k.lex()||Ft,typeof T!="number"&&(T instanceof Array&&(g=T,T=g.pop()),T=c.symbols_[T]||T),T}n(Xt,"lex");for(var w,pt,O,L,Oi,dt,z={},nt,B,Nt,rt;;){if(O=u[u.length-1],this.defaultActions[O]?L=this.defaultActions[O]:((w===null||typeof w=="undefined")&&(w=Xt()),L=Z[O]&&Z[O][w]),typeof L=="undefined"||!L.length||!L[0]){var ft="";rt=[];for(nt in Z[O])this.terminals_[nt]&&nt>ki&&rt.push("'"+this.terminals_[nt]+"'");k.showPosition?ft="Parse error on line "+(at+1)+`:
`+k.showPosition()+`
Expecting `+rt.join(", ")+", got '"+(this.terminals_[w]||w)+"'":ft="Parse error on line "+(at+1)+": Unexpected "+(w==Ft?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(ft,{text:k.match,token:this.terminals_[w]||w,line:k.yylineno,loc:xt,expected:rt})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+w);switch(L[0]){case 1:u.push(w),b.push(k.yytext),r.push(k.yylloc),u.push(L[1]),w=null,pt?(w=pt,pt=null):(Ot=k.yyleng,p=k.yytext,at=k.yylineno,xt=k.yylloc,zt>0&&zt--);break;case 2:if(B=this.productions_[L[1]][1],z.$=b[b.length-B],z._$={first_line:r[r.length-(B||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(B||1)].first_column,last_column:r[r.length-1].last_column},wi&&(z._$.range=[r[r.length-(B||1)].range[0],r[r.length-1].range[1]]),dt=this.performAction.apply(z,[p,Ot,at,W.yy,L[1],b,r].concat(Ci)),typeof dt!="undefined")return dt;B&&(u=u.slice(0,-1*B*2),b=b.slice(0,-1*B),r=r.slice(0,-1*B)),u.push(this.productions_[L[1]][0]),b.push(z.$),r.push(z._$),Nt=Z[u[u.length-2]][u[u.length-1]],u.push(Nt);break;case 3:return!0}}return!0},"parse")},Ai=function(){var M={EOF:1,parseError:n(function(c,u){if(this.yy.parser)this.yy.parser.parseError(c,u);else throw new Error(c)},"parseError"),setInput:n(function(o,c){return this.yy=c||this.yy||{},this._input=o,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:n(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var c=o.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),o},"input"),unput:n(function(o){var c=o.length,u=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var g=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),u.length-1&&(this.yylineno-=u.length-1);var b=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:u?(u.length===g.length?this.yylloc.first_column:0)+g[g.length-u.length].length-u[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(o){this.unput(this.match.slice(o))},"less"),pastInput:n(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var o=this.pastInput(),c=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
`+c+"^"},"showPosition"),test_match:n(function(o,c){var u,g,b;if(this.options.backtrack_lexer&&(b={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&&(b.yylloc.range=this.yylloc.range.slice(0))),g=o[0].match(/(?:\r\n?|\n).*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,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(o[0].length),this.matched+=o[0],u=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u)return u;if(this._backtrack){for(var r in b)this[r]=b[r];return!1}return!1},"test_match"),next:n(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,c,u,g;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),r=0;r<b.length;r++)if(u=this._input.match(this.rules[b[r]]),u&&(!c||u[0].length>c[0].length)){if(c=u,g=r,this.options.backtrack_lexer){if(o=this.test_match(u,b[r]),o!==!1)return o;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(o=this.test_match(c,b[g]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:n(function(){var c=this.next();return c||this.lex()},"lex"),begin:n(function(c){this.conditionStack.push(c)},"begin"),popState:n(function(){var c=this.conditionStack.length-1;return c>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n(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:n(function(c){return c=this.conditionStack.length-1-Math.abs(c||0),c>=0?this.conditionStack[c]:"INITIAL"},"topState"),pushState:n(function(c){this.begin(c)},"pushState"),stateStackSize:n(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:n(function(c,u,g,b){var r=b;switch(g){case 0:break;case 1:break;case 2:return this.popState(),34;break;case 3:return this.popState(),34;break;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;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 8;case 16:return this.pushState("axis_data"),"X_AXIS";break;case 17:return this.pushState("axis_data"),"Y_AXIS";break;case 18:return this.pushState("axis_band_data"),24;break;case 19:return 31;case 20:return this.pushState("data"),16;break;case 21:return this.pushState("data"),18;break;case 22:return this.pushState("data_inner"),24;break;case 23:return 27;case 24:return this.popState(),26;break;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45: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,/^(?:(?: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,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],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:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};return M}();ut.lexer=Ai;function st(){this.yy={}}return n(st,"Parser"),st.prototype=ut,ut.Parser=st,new st}();wt.parser=wt;var _i=wt;function St(s){return s.type==="bar"}n(St,"isBarPlot");function Rt(s){return s.type==="band"}n(Rt,"isBandAxisData");function F(s){return s.type==="linear"}n(F,"isLinearAxisData");var X,si=(X=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((h,x)=>Math.max(x.length,h),0)*i,height:i};let e={width:0,height:0},a=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(let h of t){let x=Jt(a,1,h),m=x?x.width:h.length*i,y=x?x.height:i;e.width=Math.max(e.width,m),e.height=Math.max(e.height,y)}return a.remove(),e}},n(X,"TextDimensionCalculatorWithFont"),X),ii=.7,ei=.2,N,ai=(N=class{constructor(t,i,e,a){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=a,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(){let 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(){ii*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(ii*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){let e=this.getLabelDimension(),a=ei*t.width;this.outerPadding=Math.min(e.width/2,a);let h=e.height+this.axisConfig.labelPadding*2;this.labelTextHeight=e.height,h<=i&&(i-=h,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,a<=i&&(i-=a,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){let e=this.getLabelDimension(),a=ei*t.height;this.outerPadding=Math.min(e.height/2,a);let h=e.width+this.axisConfig.labelPadding*2;h<=i&&(i-=h,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,a<=i&&(i-=a,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(){let t=[];if(this.showAxisLine){let 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){let 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(){let t=[];if(this.showAxisLine){let 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){let 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(){let t=[];if(this.showAxisLine){let 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){let 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():[]}},n(N,"BaseAxis"),N),Y,Ti=(Y=class extends ai{constructor(t,i,e,a,h){super(t,a,h,i),this.categories=e,this.scale=bt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=bt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),mt.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){var i;return(i=this.scale(t))!=null?i:this.getRange()[0]}},n(Y,"BandAxis"),Y),H,Ri=(H=class extends ai{constructor(t,i,e,a,h){super(t,a,h,i),this.domain=e,this.scale=At().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=At().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},n(H,"LinearAxis"),H);function _t(s,t,i,e){let a=new si(e);return Rt(s)?new Ti(t,i,s.categories,s.title,a):new Ri(t,i,[s.min,s.max],s.title,a)}n(_t,"getAxis");var U,Di=(U=class{constructor(t,i,e,a){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=a,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){let i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),a=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=a&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=a,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let 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}},n(U,"ChartTitle"),U);function ni(s,t,i,e){let a=new si(e);return new Di(a,s,t,i)}n(ni,"getChartTitleComponent");var $,vi=($=class{constructor(t,i,e,a,h){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=a,this.plotIndex=h}getDrawableElement(){let t=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),i;return this.orientation==="horizontal"?i=kt().y(e=>e[0]).x(e=>e[1])(t):i=kt().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}]}]:[]}},n($,"LinePlot"),$),q,Pi=(q=class{constructor(t,i,e,a,h,x){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=a,this.orientation=h,this.plotIndex=x}getDrawableElement(){let t=this.barData.data.map(h=>[this.xAxis.getScaleValue(h[0]),this.yAxis.getScaleValue(h[1])]),e=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),a=e/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(h=>({x:this.boundingRect.x,y:h[0]-a,height:e,width:h[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(h=>({x:h[0]-a,y:h[1],width:e,height:this.boundingRect.y+this.boundingRect.height-h[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},n(q,"BarPlot"),q),G,Li=(G=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");let t=[];for(let[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{let a=new vi(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...a.getDrawableElement())}break;case"bar":{let a=new Pi(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...a.getDrawableElement())}break}return t}},n(G,"BasePlot"),G);function ri(s,t,i){return new Li(s,t,i)}n(ri,"getPlotComponent");var j,Ei=(j=class{constructor(t,i,e,a){this.chartConfig=t,this.chartData=i,this.componentStore={title:ni(t,i,e,a),plot:ri(t,i,e),xAxis:_t(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},a),yAxis:_t(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},a)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,a=0,h=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),x=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),m=this.componentStore.plot.calculateSpace({width:h,height:x});t-=m.width,i-=m.height,m=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),a=m.height,i-=m.height,this.componentStore.xAxis.setAxisPosition("bottom"),m=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=m.height,this.componentStore.yAxis.setAxisPosition("left"),m=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=m.width,t-=m.width,t>0&&(h+=t,t=0),i>0&&(x+=i,i=0),this.componentStore.plot.calculateSpace({width:h,height:x}),this.componentStore.plot.setBoundingBoxXY({x:e,y:a}),this.componentStore.xAxis.setRange([e,e+h]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:a+x}),this.componentStore.yAxis.setRange([a,a+x]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(y=>St(y))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,a=0,h=0,x=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),m=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),y=this.componentStore.plot.calculateSpace({width:x,height:m});t-=y.width,i-=y.height,y=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=y.height,i-=y.height,this.componentStore.xAxis.setAxisPosition("left"),y=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=y.width,a=y.width,this.componentStore.yAxis.setAxisPosition("top"),y=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=y.height,h=e+y.height,t>0&&(x+=t,t=0),i>0&&(m+=i,i=0),this.componentStore.plot.calculateSpace({width:x,height:m}),this.componentStore.plot.setBoundingBoxXY({x:a,y:h}),this.componentStore.yAxis.setRange([a,a+x]),this.componentStore.yAxis.setBoundingBoxXY({x:a,y:e}),this.componentStore.xAxis.setRange([h,h+m]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:h}),this.chartData.plots.some(R=>St(R))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},n(j,"Orchestrator"),j),Q,Ii=(Q=class{static build(t,i,e,a){return new Ei(t,i,e,a).getDrawableElement()}},n(Q,"XYChartBuilder"),Q),J=0,oi,tt=Pt(),it=vt(),d=Lt(),Tt=it.plotColorPalette.split(",").map(s=>s.trim()),ht=!1,Dt=!1;function vt(){let s=Yt(),t=ot();return Ct(s.xyChart,t.themeVariables.xyChart)}n(vt,"getChartDefaultThemeConfig");function Pt(){let s=ot();return Ct(Ht.xyChart,s.xyChart)}n(Pt,"getChartDefaultConfig");function Lt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}n(Lt,"getChartDefaultData");function lt(s){let t=ot();return Ut(s.trim(),t)}n(lt,"textSanitizer");function hi(s){oi=s}n(hi,"setTmpSVGG");function li(s){s==="horizontal"?tt.chartOrientation="horizontal":tt.chartOrientation="vertical"}n(li,"setOrientation");function ci(s){d.xAxis.title=lt(s.text)}n(ci,"setXAxisTitle");function Et(s,t){d.xAxis={type:"linear",title:d.xAxis.title,min:s,max:t},ht=!0}n(Et,"setXAxisRangeData");function ui(s){d.xAxis={type:"band",title:d.xAxis.title,categories:s.map(t=>lt(t.text))},ht=!0}n(ui,"setXAxisBand");function gi(s){d.yAxis.title=lt(s.text)}n(gi,"setYAxisTitle");function xi(s,t){d.yAxis={type:"linear",title:d.yAxis.title,min:s,max:t},Dt=!0}n(xi,"setYAxisRangeData");function pi(s){let t=Math.min(...s),i=Math.max(...s),e=F(d.yAxis)?d.yAxis.min:1/0,a=F(d.yAxis)?d.yAxis.max:-1/0;d.yAxis={type:"linear",title:d.yAxis.title,min:Math.min(e,t),max:Math.max(a,i)}}n(pi,"setYAxisRangeFromPlotData");function It(s){let t=[];if(s.length===0)return t;if(!ht){let i=F(d.xAxis)?d.xAxis.min:1/0,e=F(d.xAxis)?d.xAxis.max:-1/0;Et(Math.min(i,1),Math.max(e,s.length))}if(Dt||pi(s),Rt(d.xAxis)&&(t=d.xAxis.categories.map((i,e)=>[i,s[e]])),F(d.xAxis)){let i=d.xAxis.min,e=d.xAxis.max,a=(e-i)/(s.length-1),h=[];for(let x=i;x<=e;x+=a)h.push(`${x}`);t=h.map((x,m)=>[x,s[m]])}return t}n(It,"transformDataWithoutCategory");function Vt(s){return Tt[s===0?0:s%Tt.length]}n(Vt,"getPlotColorFromPalette");function di(s,t){let i=It(t);d.plots.push({type:"line",strokeFill:Vt(J),strokeWidth:2,data:i}),J++}n(di,"setLineData");function fi(s,t){let i=It(t);d.plots.push({type:"bar",fill:Vt(J),data:i}),J++}n(fi,"setBarData");function mi(){if(d.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return d.title=yt(),Ii.build(tt,d,it,oi)}n(mi,"getDrawableElem");function yi(){return it}n(yi,"getChartThemeConfig");function bi(){return tt}n(bi,"getChartConfig");var Vi=n(function(){qt(),J=0,tt=Pt(),d=Lt(),it=vt(),Tt=it.plotColorPalette.split(",").map(s=>s.trim()),ht=!1,Dt=!1},"clear"),Bi={getDrawableElem:mi,clear:Vi,setAccTitle:Gt,getAccTitle:jt,setDiagramTitle:Zt,getDiagramTitle:yt,getAccDescription:Kt,setAccDescription:Qt,setOrientation:li,setXAxisTitle:ci,setXAxisRangeData:Et,setXAxisBand:ui,setYAxisTitle:gi,setYAxisRangeData:xi,setLineData:di,setBarData:fi,setTmpSVGG:hi,getChartThemeConfig:yi,getChartConfig:bi},Mi=n((s,t,i,e)=>{let a=e.db,h=a.getChartThemeConfig(),x=a.getChartConfig();function m(f){return f==="top"?"text-before-edge":"middle"}n(m,"getDominantBaseLine");function y(f){return f==="left"?"start":f==="right"?"end":"middle"}n(y,"getTextAnchor");function R(f){return`translate(${f.x}, ${f.y}) rotate(${f.rotation||0})`}n(R,"getTextTransformation"),mt.debug(`Rendering xychart chart
`+s);let S=ti(t),D=S.append("g").attr("class","main"),I=D.append("rect").attr("width",x.width).attr("height",x.height).attr("class","background");$t(S,x.height,x.width,!0),S.attr("viewBox",`0 0 ${x.width} ${x.height}`),I.attr("fill",h.backgroundColor),a.setTmpSVGG(S.append("g").attr("class","mermaid-tmp-group"));let V=a.getDrawableElem(),_={};function E(f){let C=D,l="";for(let[v]of f.entries()){let K=D;v>0&&_[l]&&(K=_[l]),l+=f[v],C=_[l],C||(C=_[l]=K.append("g").attr("class",f[v]))}return C}n(E,"getGroup");for(let f of V){if(f.data.length===0)continue;let C=E(f.groupTexts);switch(f.type){case"rect":C.selectAll("rect").data(f.data).enter().append("rect").attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height).attr("fill",l=>l.fill).attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break;case"text":C.selectAll("text").data(f.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",l=>l.fill).attr("font-size",l=>l.fontSize).attr("dominant-baseline",l=>m(l.verticalPos)).attr("text-anchor",l=>y(l.horizontalPos)).attr("transform",l=>R(l)).text(l=>l.text);break;case"path":C.selectAll("path").data(f.data).enter().append("path").attr("d",l=>l.path).attr("fill",l=>l.fill?l.fill:"none").attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break}}},"draw"),Wi={draw:Mi},$i={parser:_i,db:Bi,renderer:Wi};export{$i as diagram};