You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
10 KiB
JavaScript

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1360],{42098:function(e,t,n){n.d(t,{a:function(){return l}});var r=n(89929);function l(e,t){var n=e.append("foreignObject").attr("width","100000"),l=n.append("xhtml:div");l.attr("xmlns","http://www.w3.org/1999/xhtml");var o=t.label;switch(typeof o){case"function":l.insert(o);break;case"object":l.insert(function(){return o});break;default:l.html(o)}r.bg(l,t.labelStyle),l.style("display","inline-block"),l.style("white-space","nowrap");var a=l.node().getBoundingClientRect();return n.attr("width",a.width).attr("height",a.height),n}},89929:function(e,t,n){n.d(t,{$p:function(){return d},O1:function(){return a},WR:function(){return p},bF:function(){return o},bg:function(){return s}});var r=n(6843),l=n(82610);function o(e,t){return!!e.children(t).length}function a(e){return c(e.v)+":"+c(e.w)+":"+c(e.name)}var i=/:/g;function c(e){return e?String(e).replace(i,"\\:"):""}function s(e,t){t&&e.attr("style",t)}function d(e,t,n){t&&e.attr("class",t).attr("class",n+" "+e.attr("class"))}function p(e,t){var n=t.graph();if(r.Z(n)){var o=n.transition;if(l.Z(o))return o(e)}return e}},21360:function(e,t,n){n.d(t,{diagram:function(){return a}});var r=n(9490),l=n(92829),o=n(51893);n(36783),n(77832),n(91605),n(23780),n(89539),n(99824),n(68985);let a={parser:r.p,db:r.f,renderer:l.f,styles:l.a,init:e=>{e.flowchart||(e.flowchart={}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,(0,o.p)({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}}),l.f.setConf(e.flowchart),r.f.clear(),r.f.setGen("gen-2")}}},92829:function(e,t,n){n.d(t,{a:function(){return y},f:function(){return h}});var r=n(77832),l=n(36783),o=n(51893),a=n(15883),i=n(42098),c=n(15926),s=n(34728),d=(e,t)=>c.Z.lang.round(s.Z.parse(e)[t]),p=n(5712);let b={},u=function(e,t,n,r,l,a){let c=r.select('[id="'.concat(n,'"]'));Object.keys(e).forEach(function(n){let r;let s=e[n],d="default";s.classes.length>0&&(d=s.classes.join(" ")),d+=" flowchart-label";let p=(0,o.k)(s.styles),b=void 0!==s.text?s.text:s.id;if(o.l.info("vertex",s,s.labelType),"markdown"===s.labelType)o.l.info("vertex",s,s.labelType);else if((0,o.m)((0,o.c)().flowchart.htmlLabels)){let e={label:b.replace(/fa[blrs]?:fa-[\w-]+/g,e=>"<i class='".concat(e.replace(":"," "),"'></i>"))};(r=(0,i.a)(c,e).node()).parentNode.removeChild(r)}else{let e=l.createElementNS("http://www.w3.org/2000/svg","text");for(let t of(e.setAttribute("style",p.labelStyle.replace("color:","fill:")),b.split(o.e.lineBreakRegex))){let n=l.createElementNS("http://www.w3.org/2000/svg","tspan");n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),n.setAttribute("dy","1em"),n.setAttribute("x","1"),n.textContent=t,e.appendChild(n)}r=e}let u=0,f="";switch(s.type){case"round":u=5,f="rect";break;case"square":case"group":default:f="rect";break;case"diamond":f="question";break;case"hexagon":f="hexagon";break;case"odd":case"odd_right":f="rect_left_inv_arrow";break;case"lean_right":f="lean_right";break;case"lean_left":f="lean_left";break;case"trapezoid":f="trapezoid";break;case"inv_trapezoid":f="inv_trapezoid";break;case"circle":f="circle";break;case"ellipse":f="ellipse";break;case"stadium":f="stadium";break;case"subroutine":f="subroutine";break;case"cylinder":f="cylinder";break;case"doublecircle":f="doublecircle"}t.setNode(s.id,{labelStyle:p.labelStyle,shape:f,labelText:b,labelType:s.labelType,rx:u,ry:u,class:d,style:p.style,id:s.id,link:s.link,linkTarget:s.linkTarget,tooltip:a.db.getTooltip(s.id)||"",domId:a.db.lookUpDomId(s.id),haveCallback:s.haveCallback,width:"group"===s.type?500:void 0,dir:s.dir,type:s.type,props:s.props,padding:(0,o.c)().flowchart.padding}),o.l.info("setNode",{labelStyle:p.labelStyle,labelType:s.labelType,shape:f,labelText:b,rx:u,ry:u,class:d,style:p.style,id:s.id,domId:a.db.lookUpDomId(s.id),width:"group"===s.type?500:void 0,type:s.type,dir:s.dir,props:s.props,padding:(0,o.c)().flowchart.padding})})},f=function(e,t,n){let r,a;o.l.info("abc78 edges = ",e);let i=0,c={};if(void 0!==e.defaultStyle){let t=(0,o.k)(e.defaultStyle);r=t.style,a=t.labelStyle}e.forEach(function(n){i++;let s="L-"+n.start+"-"+n.end;void 0===c[s]?c[s]=0:c[s]++,o.l.info("abc78 new entry",s,c[s]);let d=s+"-"+c[s];o.l.info("abc78 new link id to be used is",s,d,c[s]);let p="LS-"+n.start,u="LE-"+n.end,f={style:"",labelStyle:""};switch(f.minlen=n.length||1,"arrow_open"===n.type?f.arrowhead="none":f.arrowhead="normal",f.arrowTypeStart="arrow_open",f.arrowTypeEnd="arrow_open",n.type){case"double_arrow_cross":f.arrowTypeStart="arrow_cross";case"arrow_cross":f.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":f.arrowTypeStart="arrow_point";case"arrow_point":f.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":f.arrowTypeStart="arrow_circle";case"arrow_circle":f.arrowTypeEnd="arrow_circle"}let w="",h="";switch(n.stroke){case"normal":w="fill:none;",void 0!==r&&(w=r),void 0!==a&&(h=a),f.thickness="normal",f.pattern="solid";break;case"dotted":f.thickness="normal",f.pattern="dotted",f.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f.thickness="thick",f.pattern="solid",f.style="stroke-width: 3.5px;fill:none;";break;case"invisible":f.thickness="invisible",f.pattern="solid",f.style="stroke-width: 0;fill:none;"}if(void 0!==n.style){let e=(0,o.k)(n.style);w=e.style,h=e.labelStyle}f.style=f.style+=w,f.labelStyle=f.labelStyle+=h,void 0!==n.interpolate?f.curve=(0,o.n)(n.interpolate,l.c_6):void 0!==e.defaultInterpolate?f.curve=(0,o.n)(e.defaultInterpolate,l.c_6):f.curve=(0,o.n)(b.curve,l.c_6),void 0===n.text?void 0!==n.style&&(f.arrowheadStyle="fill: #333"):(f.arrowheadStyle="fill: #333",f.labelpos="c"),f.labelType=n.labelType,f.label=n.text.replace(o.e.lineBreakRegex,"\n"),void 0===n.style&&(f.style=f.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),f.labelStyle=f.labelStyle.replace("color:","fill:"),f.id=d,f.classes="flowchart-link "+p+" "+u,t.setEdge(n.start,n.end,f,i)})},w=async function(e,t,n,i){let c,s;o.l.info("Drawing flowchart");let d=i.db.getDirection();void 0===d&&(d="TD");let{securityLevel:p,flowchart:b}=(0,o.c)(),w=b.nodeSpacing||50,h=b.rankSpacing||50;"sandbox"===p&&(c=(0,l.Ys)("#i"+t));let g="sandbox"===p?(0,l.Ys)(c.nodes()[0].contentDocument.body):(0,l.Ys)("body"),y="sandbox"===p?c.nodes()[0].contentDocument:document,k=new r.k({multigraph:!0,compound:!0}).setGraph({rankdir:d,nodesep:w,ranksep:h,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}}),x=i.db.getSubGraphs();o.l.info("Subgraphs - ",x);for(let e=x.length-1;e>=0;e--)s=x[e],o.l.info("Subgraph - ",s),i.db.addVertex(s.id,{text:s.title,type:s.labelType},"group",void 0,s.classes,s.dir);let v=i.db.getVertices(),m=i.db.getEdges();o.l.info("Edges",m);let S=0;for(S=x.length-1;S>=0;S--){s=x[S],(0,l.td_)("cluster").append("text");for(let e=0;e<s.nodes.length;e++)o.l.info("Setting up subgraphs",s.nodes[e],s.id),k.setParent(s.nodes[e],s.id)}u(v,k,t,g,y,i),f(m,k);let T=g.select('[id="'.concat(t,'"]')),_=g.select("#"+t+" g");if(await (0,a.r)(_,k,["point","circle","cross"],"flowchart",t),o.u.insertTitle(T,"flowchartTitleText",b.titleTopMargin,i.db.getDiagramTitle()),(0,o.o)(k,T,b.diagramPadding,b.useMaxWidth),i.db.indexNodes("subGraph"+S),!b.htmlLabels)for(let e of y.querySelectorAll('[id="'+t+'"] .edgeLabel .label')){let t=e.getBBox(),n=y.createElementNS("http://www.w3.org/2000/svg","rect");n.setAttribute("rx",0),n.setAttribute("ry",0),n.setAttribute("width",t.width),n.setAttribute("height",t.height),e.insertBefore(n,e.firstChild)}Object.keys(v).forEach(function(e){let n=v[e];if(n.link){let r=(0,l.Ys)("#"+t+' [id="'+e+'"]');if(r){let e=y.createElementNS("http://www.w3.org/2000/svg","a");e.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),e.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),e.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===p?e.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):n.linkTarget&&e.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);let t=r.insert(function(){return e},":first-child"),l=r.select(".label-container");l&&t.append(function(){return l.node()});let o=r.select(".label");o&&t.append(function(){return o.node()})}}})},h={setConf:function(e){for(let t of Object.keys(e))b[t]=e[t]},addVertices:u,addEdges:f,getClasses:function(e,t){return t.db.getClasses()},draw:w},g=(e,t)=>{let n=d(e,"r"),r=d(e,"g"),l=d(e,"b");return p.Z(n,r,l,t)},y=e=>".label {\n font-family: ".concat(e.fontFamily,";\n color: ").concat(e.nodeTextColor||e.textColor,";\n }\n .cluster-label text {\n fill: ").concat(e.titleColor,";\n }\n .cluster-label span,p {\n color: ").concat(e.titleColor,";\n }\n\n .label text,span,p {\n fill: ").concat(e.nodeTextColor||e.textColor,";\n color: ").concat(e.nodeTextColor||e.textColor,";\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(e.mainBkg,";\n stroke: ").concat(e.nodeBorder,";\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(e.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(e.lineColor,";\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ").concat(e.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(e.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n background-color: ").concat(e.edgeLabelBackground,";\n fill: ").concat(e.edgeLabelBackground,";\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ").concat(g(e.edgeLabelBackground,.5),";\n // background-color: \n }\n\n .cluster rect {\n fill: ").concat(e.clusterBkg,";\n stroke: ").concat(e.clusterBorder,";\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ").concat(e.titleColor,";\n }\n\n .cluster span,p {\n color: ").concat(e.titleColor,";\n }\n /* .cluster div {\n color: ").concat(e.titleColor,";\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ").concat(e.fontFamily,";\n font-size: 12px;\n background: ").concat(e.tertiaryColor,";\n border: 1px solid ").concat(e.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ").concat(e.textColor,";\n }\n")}}]);