1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[626],{20626:function(e,t,n){n.d(t,{diagram:function(){return C}});var o=n(25216),a=n(23029),l=n(15321),r=n(2341),i=n(97908);n(89539),n(99824),n(99161);let s=(e,t,n)=>{let{parentById:o}=n,a=new Set,l=e;for(;l;){if(a.add(l),l===t)return l;l=o[l]}for(l=t;l;){if(a.has(l))return l;l=o[l]}return"root"},c=new i,d={},h={},p={},u=async function(e,t,n,o,a,i,s){let c=n.select('[id="'.concat(t,'"]')).insert("g").attr("class","nodes"),d=Object.keys(e);return await Promise.all(d.map(async function(t){let n,s;let d=e[t],h="default";d.classes.length>0&&(h=d.classes.join(" ")),h+=" flowchart-label";let u=(0,r.k)(d.styles),b=void 0!==d.text?d.text:d.id,y={width:0,height:0},g=[{id:d.id+"-west",layoutOptions:{"port.side":"WEST"}},{id:d.id+"-east",layoutOptions:{"port.side":"EAST"}},{id:d.id+"-south",layoutOptions:{"port.side":"SOUTH"}},{id:d.id+"-north",layoutOptions:{"port.side":"NORTH"}}],f=0,w="",k={};switch(d.type){case"round":f=5,w="rect";break;case"square":case"group":default:w="rect";break;case"diamond":w="question",k={portConstraints:"FIXED_SIDE"};break;case"hexagon":w="hexagon";break;case"odd":case"odd_right":w="rect_left_inv_arrow";break;case"lean_right":w="lean_right";break;case"lean_left":w="lean_left";break;case"trapezoid":w="trapezoid";break;case"inv_trapezoid":w="inv_trapezoid";break;case"circle":w="circle";break;case"ellipse":w="ellipse";break;case"stadium":w="stadium";break;case"subroutine":w="subroutine";break;case"cylinder":w="cylinder";break;case"doublecircle":w="doublecircle"}let x={labelStyle:u.labelStyle,shape:w,labelText:b,labelType:d.labelType,rx:f,ry:f,class:h,style:u.style,id:d.id,link:d.link,linkTarget:d.linkTarget,tooltip:a.db.getTooltip(d.id)||"",domId:a.db.lookUpDomId(d.id),haveCallback:d.haveCallback,width:"group"===d.type?500:void 0,dir:d.dir,type:d.type,props:d.props,padding:(0,r.F)().flowchart.padding};if("group"!==x.type)n=(s=await (0,l.e)(c,x,d.dir)).node().getBBox();else{o.createElementNS("http://www.w3.org/2000/svg","text");let{shapeSvg:e,bbox:t}=await (0,l.l)(c,x,void 0,!0);y.width=t.width,y.wrappingWidth=(0,r.F)().flowchart.wrappingWidth,y.height=t.height,y.labelNode=e.node(),x.labelData=y}let m={id:d.id,ports:"diamond"===d.type?g:[],layoutOptions:k,labelText:b,labelData:y,domId:a.db.lookUpDomId(d.id),width:null==n?void 0:n.width,height:null==n?void 0:n.height,type:d.type,el:s,parent:i.parentById[d.id]};p[x.id]=m})),s},b=(e,t,n)=>{let o={TB:{in:{north:"north"},out:{south:"west",west:"east",east:"south"}},LR:{in:{west:"west"},out:{east:"south",south:"north",north:"east"}},RL:{in:{east:"east"},out:{west:"north",north:"south",south:"west"}},BT:{in:{south:"south"},out:{north:"east",east:"west",west:"north"}}};return o.TD=o.TB,o[n][t][e]},y=(e,t,n)=>{if(r.l.info("getNextPort",{node:e,edgeDirection:t,graphDirection:n}),!d[e])switch(n){case"TB":case"TD":d[e]={inPosition:"north",outPosition:"south"};break;case"BT":d[e]={inPosition:"south",outPosition:"north"};break;case"RL":d[e]={inPosition:"east",outPosition:"west"};break;case"LR":d[e]={inPosition:"west",outPosition:"east"}}let o="in"===t?d[e].inPosition:d[e].outPosition;return"in"===t?d[e].inPosition=b(d[e].inPosition,t,n):d[e].outPosition=b(d[e].outPosition,t,n),o},g=(e,t)=>{let n=e.start,o=e.end,a=n,l=o,r=p[n],i=p[o];return r&&i?("diamond"===r.type&&(n="".concat(n,"-").concat(y(n,"out",t))),"diamond"===i.type&&(o="".concat(o,"-").concat(y(o,"in",t))),{source:n,target:o,sourceId:a,targetId:l}):{source:n,target:o}},f=function(e,t,n,o){let i,s;r.l.info("abc78 edges = ",e);let c=o.insert("g").attr("class","edgeLabels"),d={},p=t.db.getDirection();if(void 0!==e.defaultStyle){let t=(0,r.k)(e.defaultStyle);i=t.style,s=t.labelStyle}return e.forEach(function(t){let o="L-"+t.start+"-"+t.end;void 0===d[o]?d[o]=0:d[o]++,r.l.info("abc78 new entry",o,d[o]);let u=o+"-"+d[o];r.l.info("abc78 new link id to be used is",o,u,d[o]);let b="LS-"+t.start,y="LE-"+t.end,f={style:"",labelStyle:""};switch(f.minlen=t.length||1,"arrow_open"===t.type?f.arrowhead="none":f.arrowhead="normal",f.arrowTypeStart="arrow_open",f.arrowTypeEnd="arrow_open",t.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="",k="";switch(t.stroke){case"normal":w="fill:none;",void 0!==i&&(w=i),void 0!==s&&(k=s),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;"}if(void 0!==t.style){let e=(0,r.k)(t.style);w=e.style,k=e.labelStyle}f.style=f.style+=w,f.labelStyle=f.labelStyle+=k,void 0!==t.interpolate?f.curve=(0,r.n)(t.interpolate,a.c_6):void 0!==e.defaultInterpolate?f.curve=(0,r.n)(e.defaultInterpolate,a.c_6):f.curve=(0,r.n)(h.curve,a.c_6),void 0===t.text?void 0!==t.style&&(f.arrowheadStyle="fill: #333"):(f.arrowheadStyle="fill: #333",f.labelpos="c"),f.labelType=t.labelType,f.label=t.text.replace(r.e.lineBreakRegex,"\n"),void 0===t.style&&(f.style=f.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),f.labelStyle=f.labelStyle.replace("color:","fill:"),f.id=u,f.classes="flowchart-link "+b+" "+y;
1let x=(0,l.f)(c,f),{source:m,target:v,sourceId:T,targetId:_}=g(t,p);r.l.debug("abc78 source and target",m,v),n.edges.push({id:"e"+t.start+t.end,sources:[m],targets:[v],sourceId:T,targetId:_,labelEl:x,labels:[{width:f.width,height:f.height,orgWidth:f.width,orgHeight:f.height,text:f.label,layoutOptions:{"edgeLabels.inline":"true","edgeLabels.placement":"CENTER"}}],edgeData:f})}),n},w=function(e,t,n,o,a){let r="";o&&(r=(r=(r=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),(0,l.m)(e,t,r,a,n)},k=function(e){let t={parentById:{},childrenById:{}},n=e.getSubGraphs();return r.l.info("Subgraphs - ",n),n.forEach(function(e){e.nodes.forEach(function(n){t.parentById[n]=e.id,void 0===t.childrenById[e.id]&&(t.childrenById[e.id]=[]),t.childrenById[e.id].push(n)})}),n.forEach(function(e){e.id,void 0!==t.parentById[e.id]&&t.parentById[e.id]}),t},x=function(e,t,n){let o=s(e,t,n);if(void 0===o||"root"===o)return{x:0,y:0};let a=p[o].offset;return{x:a.posX,y:a.posY}},m=function(e,t,n,o,r,i){let s=x(t.sourceId,t.targetId,r),c=t.sections[0].startPoint,d=t.sections[0].endPoint,h=(t.sections[0].bendPoints?t.sections[0].bendPoints:[]).map(e=>[e.x+s.x,e.y+s.y]),p=[[c.x+s.x,c.y+s.y],...h,[d.x+s.x,d.y+s.y]],{x:u,y:b}=(0,l.k)(t.edgeData),y=(0,a.jvg)().x(u).y(b).curve(a.c_6),g=e.insert("path").attr("d",y(p)).attr("class","path "+n.classes).attr("fill","none"),f=e.insert("g").attr("class","edgeLabel"),k=(0,a.Ys)(f.node().appendChild(t.labelEl)),m=k.node().firstChild.getBoundingClientRect();k.attr("width",m.width),k.attr("height",m.height),f.attr("transform","translate(".concat(t.labels[0].x+s.x,", ").concat(t.labels[0].y+s.y,")")),w(g,n,o.type,o.arrowMarkerAbsolute,i)},v=(e,t)=>{e.forEach(e=>{e.children||(e.children=[]);let n=t.childrenById[e.id];n&&n.forEach(t=>{e.children.push(p[t])}),v(e.children,t)})},T=async function(e,t,n,o){var i;let s,h;o.db.clear(),p={},d={},o.db.setGen("gen-2"),o.parser.parse(e);let b=(0,a.Ys)("body").append("div").attr("style","height:400px").attr("id","cy"),y={id:"root",layoutOptions:{"elk.hierarchyHandling":"INCLUDE_CHILDREN","org.eclipse.elk.padding":"[top=100, left=100, bottom=110, right=110]","elk.layered.spacing.edgeNodeBetweenLayers":"30","elk.direction":"DOWN"},children:[],edges:[]};switch(r.l.info("Drawing flowchart using v3 renderer",c),o.db.getDirection()){case"BT":y.layoutOptions["elk.direction"]="UP";break;case"TB":y.layoutOptions["elk.direction"]="DOWN";break;case"LR":y.layoutOptions["elk.direction"]="RIGHT";break;case"RL":y.layoutOptions["elk.direction"]="LEFT"}let{securityLevel:g,flowchart:w}=(0,r.F)();"sandbox"===g&&(s=(0,a.Ys)("#i"+t));let x="sandbox"===g?(0,a.Ys)(s.nodes()[0].contentDocument.body):(0,a.Ys)("body"),T="sandbox"===g?s.nodes()[0].contentDocument:document,E=x.select('[id="'.concat(t,'"]'));(0,l.a)(E,["point","circle","cross"],o.type,t);let C=o.db.getVertices(),B=o.db.getSubGraphs();r.l.info("Subgraphs - ",B);for(let e=B.length-1;e>=0;e--)h=B[e],o.db.addVertex(h.id,{text:h.title,type:h.labelType},"group",void 0,h.classes,h.dir);let S=E.insert("g").attr("class","subgraphs"),I=k(o.db);y=await u(C,t,x,T,o,I,y);let P=E.insert("g").attr("class","edges edgePath");y=f(o.db.getEdges(),o,y,E),Object.keys(p).forEach(e=>{let t=p[e];t.parent||y.children.push(t),void 0!==I.childrenById[e]&&(t.labels=[{text:t.labelText,layoutOptions:{"nodeLabels.placement":"[H_CENTER, V_TOP, INSIDE]"},width:t.labelData.width,height:t.labelData.height}],delete t.x,delete t.y,delete t.width,delete t.height)}),v(y.children,I),r.l.info("after layout",JSON.stringify(y,null,2));let D=await c.layout(y);_(0,0,D.children,E,S,o,0),r.l.info("after layout",D),null==(i=D.edges)||i.map(e=>{m(P,e,e.edgeData,o,I,t)}),(0,r.o)({},E,w.diagramPadding,w.useMaxWidth),b.remove()},_=(e,t,n,o,a,l,i)=>{n.forEach(function(n){if(n){if(p[n.id].offset={posX:n.x+e,posY:n.y+t,x:e,y:t,depth:i,width:n.width,height:n.height},"group"===n.type){let o=a.insert("g").attr("class","subgraph");o.insert("rect").attr("class","subgraph subgraph-lvl-"+i%5+" node").attr("x",n.x+e).attr("y",n.y+t).attr("width",n.width).attr("height",n.height);let l=o.insert("g").attr("class","label"),s=(0,r.F)().flowchart.htmlLabels?n.labelData.width/2:0;l.attr("transform","translate(".concat(n.labels[0].x+e+n.x+s,", ").concat(n.labels[0].y+t+n.y+3,")")),l.node().appendChild(n.labelData.labelNode),r.l.info("Id (UGH)= ",n.type,n.labels)}else r.l.info("Id (UGH)= ",n.id),n.el.attr("transform","translate(".concat(n.x+e+n.width/2,", ").concat(n.y+t+n.height/2,")"))}}
1),n.forEach(function(n){n&&"group"===n.type&&_(e+n.x,t+n.y,n.children,o,a,l,i+1)})},E=e=>{let t="";for(let n=0;n<5;n++)t+="\n .subgraph-lvl-".concat(n," {\n fill: ").concat(e["surface".concat(n)],";\n stroke: ").concat(e["surfacePeer".concat(n)],";\n }\n ");return t},C={db:o.d,renderer:{getClasses:function(e,t){return r.l.info("Extracting classes"),t.db.getClasses()},draw:T},parser:o.p,styles: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 {\n color: ").concat(e.titleColor,";\n }\n\n .label text,span {\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\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.85;\n background-color: ").concat(e.edgeLabelBackground,";\n fill: ").concat(e.edgeLabelBackground,";\n }\n text-align: center;\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 {\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 .subgraph {\n stroke-width:2;\n rx:3;\n }\n // .subgraph-lvl-1 {\n // fill:#ccc;\n // // stroke:black;\n // }\n\n .flowchart-label text {\n text-anchor: middle;\n }\n\n ").concat(E(e),"\n")}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.