"use strict";(self.webpackChunk=self.webpackChunk||[]).push([["vendors-node_modules_mermaid_dist_pieDiagram-79897490_js"],{"./node_modules/mermaid/dist/pieDiagram-79897490.js":function(mt,it,O){O.d(it,{diagram:function(){return dt}});var o=O("./node_modules/mermaid/dist/mermaid-f47111a7.js"),N=O("./node_modules/d3/src/index.js"),kt=O("./node_modules/dayjs/dayjs.min.js"),xt=O("./node_modules/@braintree/sanitize-url/dist/index.js"),bt=O("./node_modules/dompurify/dist/purify.js"),Y=function(){var i=function(g,t,e,s){for(e=e||{},s=g.length;s--;e[g[s]]=t);return e},m=[1,3],M=[1,4],p=[1,5],_=[1,6],E=[1,10,12,14,16,18,19,20,21,22],W=[2,4],P=[1,5,10,12,14,16,18,19,20,21,22],h=[20,21,22],w=[2,7],k=[1,12],C=[1,13],L=[1,14],x=[1,15],j=[1,16],u=[1,17],$={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,PIE:5,document:6,showData:7,line:8,statement:9,txt:10,value:11,title:12,title_value:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,section:19,NEWLINE:20,";":21,EOF:22,$accept:0,$end:1},terminals_:{2:"error",5:"PIE",7:"showData",10:"txt",11:"value",12:"title",13:"title_value",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"section",20:"NEWLINE",21:";",22:"EOF"},productions_:[0,[3,2],[3,2],[3,3],[6,0],[6,2],[8,2],[9,0],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[4,1],[4,1],[4,1]],performAction:function(t,e,s,r,a,n,D){var y=n.length-1;switch(a){case 3:r.setShowData(!0);break;case 6:this.$=n[y-1];break;case 8:r.addSection(n[y-1],r.cleanupValue(n[y]));break;case 9:this.$=n[y].trim(),r.setDiagramTitle(this.$);break;case 10:this.$=n[y].trim(),r.setAccTitle(this.$);break;case 11:case 12:this.$=n[y].trim(),r.setAccDescription(this.$);break;case 13:r.addSection(n[y].substr(8)),this.$=n[y].substr(8);break}},table:[{3:1,4:2,5:m,20:M,21:p,22:_},{1:[3]},{3:7,4:2,5:m,20:M,21:p,22:_},i(E,W,{6:8,7:[1,9]}),i(P,[2,14]),i(P,[2,15]),i(P,[2,16]),{1:[2,1]},i(h,w,{8:10,9:11,1:[2,2],10:k,12:C,14:L,16:x,18:j,19:u}),i(E,W,{6:18}),i(E,[2,5]),{4:19,20:M,21:p,22:_},{11:[1,20]},{13:[1,21]},{15:[1,22]},{17:[1,23]},i(h,[2,12]),i(h,[2,13]),i(h,w,{8:10,9:11,1:[2,3],10:k,12:C,14:L,16:x,18:j,19:u}),i(E,[2,6]),i(h,[2,8]),i(h,[2,9]),i(h,[2,10]),i(h,[2,11])],defaultActions:{7:[2,1]},parseError:function(t,e){if(e.recoverable)this.trace(t);else{var s=new Error(t);throw s.hash=e,s}},parse:function(t){var e=this,s=[0],r=[],a=[null],n=[],D=this.table,y="",c=0,A=0,R=2,B=1,Z=n.slice.call(arguments,1),l=Object.create(this.lexer),T={yy:{}};for(var H in this.yy)Object.prototype.hasOwnProperty.call(this.yy,H)&&(T.yy[H]=this.yy[H]);l.setInput(t,T.yy),T.yy.lexer=l,T.yy.parser=this,typeof l.yylloc>"u"&&(l.yylloc={});var Q=l.yylloc;n.push(Q);var _t=l.options&&l.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function gt(){var v;return v=r.pop()||l.lex()||B,typeof v!="number"&&(v instanceof Array&&(r=v,v=r.pop()),v=e.symbols_[v]||v),v}for(var f,I,d,X,V={},G,b,et,K;;){if(I=s[s.length-1],this.defaultActions[I]?d=this.defaultActions[I]:((f===null||typeof f>"u")&&(f=gt()),d=D[I]&&D[I][f]),typeof d>"u"||!d.length||!d[0]){var q="";K=[];for(G in D[I])this.terminals_[G]&&G>R&&K.push("'"+this.terminals_[G]+"'");l.showPosition?q="Parse error on line "+(c+1)+`:
`+l.showPosition()+`
Expecting `+K.join(", ")+", got '"+(this.terminals_[f]||f)+"'":q="Parse error on line "+(c+1)+": Unexpected "+(f==B?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(q,{text:l.match,token:this.terminals_[f]||f,line:l.yylineno,loc:Q,expected:K})}if(d[0]instanceof Array&&d.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+f);switch(d[0]){case 1:s.push(f),a.push(l.yytext),n.push(l.yylloc),s.push(d[1]),f=null,A=l.yyleng,y=l.yytext,c=l.yylineno,Q=l.yylloc;break;case 2:if(b=this.productions_[d[1]][1],V.$=a[a.length-b],V._$={first_line:n[n.length-(b||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(b||1)].first_column,last_column:n[n.length-1].last_column},_t&&(V._$.range=[n[n.length-(b||1)].range[0],n[n.length-1].range[1]]),X=this.performAction.apply(V,[y,A,c,T.yy,d[1],a,n].concat(Z)),typeof X<"u")return X;b&&(s=s.slice(0,-1*b*2),a=a.slice(0,-1*b),n=n.slice(0,-1*b)),s.push(this.productions_[d[1]][0]),a.push(V.$),n.push(V._$),et=D[s[s.length-2]][s[s.length-1]],s.push(et);break;case 3:return!0}}return!0}},U=function(){var g={EOF:1,parseError:function(e,s){if(this.yy.parser)this.yy.parser.parseError(e,s);else throw new Error(e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,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},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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),s.length-1&&(this.yylineno-=s.length-1);var a=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:s?(s.length===r.length?this.yylloc.first_column:0)+r[r.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},test_match:function(t,e){var s,r,a;if(this.options.backtrack_lexer&&(a={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&&(a.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var n in a)this[n]=a[n];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,s,r;this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),n=0;n<a.length;n++)if(s=this._input.match(this.rules[a[n]]),s&&(!e||s[0].length>e[0].length)){if(e=s,r=n,this.options.backtrack_lexer){if(t=this.test_match(s,a[n]),t!==!1)return t;if(this._backtrack){e=!1;continue}else return!1}else if(!this.options.flex)break}return e?(t=this.test_match(e,a[r]),t!==!1?t:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){var e=this.conditionStack.length-1;return e>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(e,s,r,a){switch(r){case 0:break;case 1:break;case 2:return 20;case 3:break;case 4:break;case 5:return this.begin("title"),12;case 6:return this.popState(),"title_value";case 7:return this.begin("acc_title"),14;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),16;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 15:this.popState();break;case 16:return"txt";case 17:return 5;case 18:return 7;case 19:return"value";case 20:return 22}},rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[6],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,7,9,11,14,17,18,19,20],inclusive:!0}}};return g}();$.lexer=U;function S(){this.yy={}}return S.prototype=$,$.Parser=S,new S}();Y.parser=Y;const st=Y,tt=o.B.pie,F={sections:{},showData:!1,config:tt};let z=F.sections,J=F.showData;const nt=structuredClone(tt),rt=()=>structuredClone(nt),at=()=>{z=structuredClone(F.sections),J=F.showData,(0,o.v)()},lt=(i,m)=>{i=(0,o.d)(i,(0,o.c)()),z[i]===void 0&&(z[i]=m,o.l.debug(`added new section: ${i}, with value: ${m}`))},ct=()=>z,ot=i=>(i.substring(0,1)===":"&&(i=i.substring(1).trim()),Number(i.trim())),ht=i=>{J=i},ut=()=>J,yt={getConfig:rt,clear:at,setDiagramTitle:o.q,getDiagramTitle:o.t,setAccTitle:o.s,getAccTitle:o.g,setAccDescription:o.b,getAccDescription:o.a,addSection:lt,getSections:ct,cleanupValue:ot,setShowData:ht,getShowData:ut},ft=i=>`
  .pieCircle{
    stroke: ${i.pieStrokeColor};
    stroke-width : ${i.pieStrokeWidth};
    opacity : ${i.pieOpacity};
  }
  .pieOuterCircle{
    stroke: ${i.pieOuterStrokeColor};
    stroke-width: ${i.pieOuterStrokeWidth};
    fill: none;
  }
  .pieTitleText {
    text-anchor: middle;
    font-size: ${i.pieTitleTextSize};
    fill: ${i.pieTitleTextColor};
    font-family: ${i.fontFamily};
  }
  .slice {
    font-family: ${i.fontFamily};
    fill: ${i.pieSectionTextColor};
    font-size:${i.pieSectionTextSize};
    // fill: white;
  }
  .legend text {
    fill: ${i.pieLegendTextColor};
    font-family: ${i.fontFamily};
    font-size: ${i.pieLegendTextSize};
  }
`,pt=i=>{const m=Object.entries(i).map(p=>({label:p[0],value:p[1]})).sort((p,_)=>_.value-p.value);return(0,N.rLf)().value(p=>p.value)(m)},dt={parser:st,db:yt,renderer:{draw:(i,m,M,p)=>{o.l.debug(`rendering pie chart
`+i);const _=p.db,E=(0,o.c)(),W=(0,o.C)(_.getConfig(),E.pie),P=40,h=18,w=4,k=450,C=k,L=(0,o.A)(m),x=L.append("g"),j=_.getSections();x.attr("transform","translate("+C/2+","+k/2+")");const{themeVariables:u}=E;let[$]=(0,o.D)(u.pieOuterStrokeWidth);$??($=2);const U=W.textPosition,S=Math.min(C,k)/2-P,g=(0,N.JLW)().innerRadius(0).outerRadius(S),t=(0,N.JLW)().innerRadius(S*U).outerRadius(S*U);x.append("circle").attr("cx",0).attr("cy",0).attr("r",S+$/2).attr("class","pieOuterCircle");const e=pt(j),s=[u.pie1,u.pie2,u.pie3,u.pie4,u.pie5,u.pie6,u.pie7,u.pie8,u.pie9,u.pie10,u.pie11,u.pie12],r=(0,N.UMr)(s);x.selectAll("mySlices").data(e).enter().append("path").attr("d",g).attr("fill",c=>r(c.data.label)).attr("class","pieCircle");let a=0;Object.keys(j).forEach(c=>{a+=j[c]}),x.selectAll("mySlices").data(e).enter().append("text").text(c=>(c.data.value/a*100).toFixed(0)+"%").attr("transform",c=>"translate("+t.centroid(c)+")").style("text-anchor","middle").attr("class","slice"),x.append("text").text(_.getDiagramTitle()).attr("x",0).attr("y",-(k-50)/2).attr("class","pieTitleText");const n=x.selectAll(".legend").data(r.domain()).enter().append("g").attr("class","legend").attr("transform",(c,A)=>{const R=h+w,B=R*r.domain().length/2,Z=12*h,l=A*R-B;return"translate("+Z+","+l+")"});n.append("rect").attr("width",h).attr("height",h).style("fill",r).style("stroke",r),n.data(e).append("text").attr("x",h+w).attr("y",h-w).text(c=>{const{label:A,value:R}=c.data;return _.getShowData()?`${A} [${R}]`:A});const D=Math.max(...n.selectAll("text").nodes().map(c=>c?.getBoundingClientRect().width??0)),y=C+P+h+w+D;L.attr("viewBox",`0 0 ${y} ${k}`),(0,o.i)(L,k,y,W.useMaxWidth)}},styles:ft}}}]);
