1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6664],{84292:function(t,e,a){a.d(e,{C1:function(){return c},Lf:function(){return ey},XO:function(){return $},Yn:function(){return ef},ZH:function(){return N},aH:function(){return ew},dW:function(){return ec},gU:function(){return eu},jr:function(){return y},us:function(){return C}});var l=a(78178),i=a(2805),r=a(50584),n=a(41740),s=a(74869),h=a(31954),o=a(18987),d=a(90705),c=(0,h.eW)(async(t,e,a)=>{let i,h;let d=e.useHtmlLabels||(0,s.ku)(s.nV()?.htmlLabels);i=a||"node default";let c=t.insert("g").attr("class",i).attr("id",e.domId||e.id),g=c.insert("g").attr("class","label").attr("style",(0,n.R7)(e.labelStyle));h=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let y=!!e.icon||!!e.img,f="markdown"===e.labelType,u=await (0,r.rw)(g,(0,s.oO)((0,n.SH)(h),(0,s.nV)()),{useHtmlLabels:d,width:e.width||s.nV().flowchart?.wrappingWidth,classes:f?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:y,markdown:f},(0,s.nV)()),w=u.getBBox(),p=(e?.padding??0)/2;if(d){let t=u.children[0],e=(0,o.Ys)(u);await (0,l.i)(t,h),w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}return d?g.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"):g.attr("transform","translate(0, "+-w.height/2+")"),e.centerLabel&&g.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:c,bbox:w,halfPadding:p,label:g}},"labelHelper"),g=(0,h.eW)(async(t,e,a)=>{let l=a.useHtmlLabels??(0,s._X)((0,s.nV)()),i=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),h=await (0,r.rw)(i,(0,s.oO)((0,n.SH)(e),(0,s.nV)()),{useHtmlLabels:l,width:a.width||s.nV()?.flowchart?.wrappingWidth,style:a.labelStyle,addSvgBackground:!!a.icon||!!a.img}),d=h.getBBox(),c=a.padding/2;if((0,s._X)((0,s.nV)())){let t=h.children[0],e=(0,o.Ys)(h);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return l?i.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):i.attr("transform","translate(0, "+-d.height/2+")"),a.centerLabel&&i.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:d,halfPadding:c,label:i}},"insertLabel"),y=(0,h.eW)((t,e)=>{let a=e.node().getBBox();t.width=a.width,t.height=a.height},"updateNodeBounds"),f=(0,h.eW)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function u(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function w(t,e,a,l,i,r){let n=[],s=a-t,h=2*Math.PI/(s/r),o=e+(l-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*s,l=o+i*Math.sin(h*(a-t));n.push({x:a,y:l})}return n}function p(t,e,a,l,i,r){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-r,y:-o})}return n}function m(t){let e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),a=document.createElementNS("http://www.w3.org/2000/svg","path"),l=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");a.setAttribute("d",l);let i=e.find(t=>"none"!==t.getAttribute("fill")),r=e.find(t=>"none"!==t.getAttribute("stroke")),n=(0,h.eW)((t,e)=>t?.getAttribute(e)??void 0,"getAttr");i&&Object.entries({fill:n(i,"fill"),"fill-opacity":n(i,"fill-opacity")??"1"}).forEach(([t,e])=>{e&&a.setAttribute(t,e)}),r&&Object.entries({stroke:n(r,"stroke"),"stroke-width":n(r,"stroke-width")??"1","stroke-opacity":n(r,"stroke-opacity")??"1"}).forEach(([t,e])=>{e&&a.setAttribute(t,e)});let s=document.createElementNS("http://www.w3.org/2000/svg","g");return s.appendChild(a),s}(0,h.eW)(u,"createPathFromPoints"),(0,h.eW)(w,"generateFullSineWavePoints"),(0,h.eW)(p,"generateCirclePoints"),(0,h.eW)(m,"mergePaths");var x=(0,h.eW)((t,e)=>{var a,l,i=t.x,r=t.y,n=e.x-i,s=e.y-r,h=t.width/2,o=t.height/2;return Math.abs(s)*h>Math.abs(n)*o?(s<0&&(o=-o),a=0===s?0:o*n/s,l=o):(n<0&&(h=-h),a=h,l=0===n?0:h*s/n),{x:i+a,y:r+l}},"intersectRect"),$=(0,h.eW)(async(t,e,a,l=!1,i=!1)=>{let n=e||"";"object"==typeof n&&(n=n[0]);let h=(0,s.nV)(),o=(0,s._X)(h);return await (0,r.rw)(t,n,{style:a,isTitle:l,useHtmlLabels:o,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},h)},"createLabel"),b=(0,h.eW)((t,e,a,l,i)=>["M",t+i,e,"H",t+a-i,"A",i,i,0,0,1,t+a,e+i,"V",e+l-i,"A",i,i,0,0,1,t+a-i,e+l,"H",t+i,"A",i,i,0,0,1,t,e+l-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD"),k=(0,h.eW)(async(t,e)=>{let a,n;h.cM.info("Creating subgraph rect for ",e.id,e);let c=(0,s.nV)(),{themeVariables:g,handDrawnSeed:y}=c,{clusterBkg:f,clusterBorder:u}=g,{labelStyles:w,nodeStyles:p,borderStyles:m,backgroundStyles:k}=(0,i.UG)(e),M=t.insert("g").attr("class","cluster "+e.cssClasse
1s).attr("id",e.domId).attr("data-look",e.look),S=(0,s._X)(c),D=M.insert("g").attr("class","cluster-label "),W=(a="markdown"===e.labelType?await (0,r.rw)(D,e.label,{style:e.labelStyle,useHtmlLabels:S,isNode:!0,width:e.width}):await $(D,e.label,e.labelStyle||"",!1,!0)).getBBox();if((0,s._X)(c)){let t=a.children[0],e=(0,o.Ys)(a);W=t.getBoundingClientRect(),e.attr("width",W.width),e.attr("height",W.height)}let v=e.width<=W.width+e.padding?W.width+e.padding:e.width;e.width<=W.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let C=e.height,N=e.x-v/2,B=e.y-C/2;if(h.cM.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.Z.svg(M),a=(0,i._q)(e,{roughness:.7,fill:f,stroke:u,fillWeight:3,seed:y}),l=t.path(b(N,B,v,C,0),a);(n=M.insert(()=>(h.cM.debug("Rough node insert CXC",l),l),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),n.select("path").attr("style",k.join(";").replace("fill","stroke"))}else(n=M.insert("rect",":first-child")).attr("style",p).attr("rx",e.rx).attr("ry",e.ry).attr("x",N).attr("y",B).attr("width",v).attr("height",C);let{subGraphTitleTopMargin:A}=(0,l.L)(c);if(D.attr("transform",`translate(${e.x-W.width/2}, ${e.y-e.height/2+A})`),w){let t=D.select("span");t&&t.attr("style",w)}let _=n.node().getBBox();return e.offsetX=0,e.width=_.width,e.height=_.height,e.offsetY=W.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:M,labelBBox:W}},"rect"),M=(0,h.eW)((t,e)=>{let a=t.insert("g").attr("class","note-cluster").attr("id",e.domId),l=a.insert("rect",":first-child"),i=0*e.padding,r=i/2;l.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-r).attr("y",e.y-e.height/2-r).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");let n=l.node().getBBox();return e.width=n.width,e.height=n.height,e.intersect=function(t){return x(e,t)},{cluster:a,labelBBox:{width:0,height:0}}},"noteGroup"),S=(0,h.eW)(async(t,e)=>{let a;let l=(0,s.nV)(),{themeVariables:i,handDrawnSeed:r}=l,{altBackground:n,compositeBackground:h,compositeTitleBackground:c,nodeBorder:g}=i,y=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),f=y.insert("g",":first-child"),u=y.insert("g").attr("class","cluster-label"),w=y.append("rect"),p=await $(u,e.label,e.labelStyle,void 0,!0),m=p.getBBox();if((0,s._X)(l)){let t=p.children[0],e=(0,o.Ys)(p);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}let k=0*e.padding,M=(e.width<=m.width+e.padding?m.width+e.padding:e.width)+k;e.width<=m.width+e.padding?e.diff=(M-e.width)/2-e.padding:e.diff=-e.padding;let S=e.height+k,D=e.height+k-m.height-6,W=e.x-M/2,v=e.y-S/2;e.width=M;let C=e.y-e.height/2-k/2+m.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),l=d.Z.svg(y),i=e.rx||e.ry?l.path(b(W,v,M,S,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:g,seed:r}):l.rectangle(W,v,M,S,{seed:r});a=y.insert(()=>i,":first-child");let s=l.rectangle(W,C,M,D,{fill:t?n:h,fillStyle:t?"hachure":"solid",stroke:g,seed:r});a=y.insert(()=>i,":first-child"),w=y.insert(()=>s)}else(a=f.insert("rect",":first-child")).attr("class","outer").attr("x",W).attr("y",v).attr("width",M).attr("height",S).attr("data-look",e.look),w.attr("class","inner").attr("x",W).attr("y",C).attr("width",M).attr("height",D);u.attr("transform",`translate(${e.x-m.width/2}, ${v+1-((0,s._X)(l)?0:3)})`);let N=a.node().getBBox();return e.height=N.height,e.offsetX=0,e.offsetY=m.height-e.padding/2,e.labelBBox=m,e.intersect=function(t){return x(e,t)},{cluster:y,labelBBox:m}},"roundedWithTitle"),D=(0,h.eW)(async(t,e)=>{let a;h.cM.info("Creating subgraph rect for ",e.id,e);let n=(0,s.nV)(),{themeVariables:c,handDrawnSeed:g}=n,{clusterBkg:y,clusterBorder:f}=c,{labelStyles:u,nodeStyles:w,borderStyles:p,backgroundStyles:m}=(0,i.UG)(e),$=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),k=(0,s._X)(n),M=$.insert("g").attr("class","cluster-label "),S=await (0,r.rw)(M,e.label,{style:e.labelStyle,useHtmlLabels:k,isNode:!0,width:e.width}),D=S.getBBox();if((0,s._X)(n)){let t=S.children[0],e=(0,o.Ys)(S);D=t.getBoundingClientRect(),e.attr("width",D.width),e.attr("height",D.height)}let W=e.width<=D.width+e.padding?D.width+e.padding:e.width;e.width<=D.width+e.padding?e.diff=(W-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,C=e.x-W/2,N=e.y-v/2;if(h.cM.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.Z.svg($),l=(0,i._q)(e,{roughness:.7,fill:y,stroke:f,fillWeight:4,seed:g}),r=t.path(b(C,N,W,v,e.rx),l);(a=$.insert(()=>(h.cM.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",p.join(";")),a.select("path").attr("style",m.join(";").replace("fill","stroke"))}else(a=$.insert("rect",":first-child")).attr("style",w).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",N).attr("width",W).attr("height",v);let{subGraphTitleTopMargin:B}=(0,l.L)(n);if(M.attr("transform",`translate(${e.x-D.width/2}
1, ${e.y-e.height/2+B})`),u){let t=M.select("span");t&&t.attr("style",u)}let A=a.node().getBBox();return e.offsetX=0,e.width=A.width,e.height=A.height,e.offsetY=D.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:$,labelBBox:D}},"kanbanSection"),W={rect:k,squareRect:k,roundedWithTitle:S,noteGroup:M,divider:(0,h.eW)((t,e)=>{let a;let{themeVariables:l,handDrawnSeed:i}=(0,s.nV)(),{nodeBorder:r}=l,n=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),h=n.insert("g",":first-child"),o=0*e.padding,c=e.width+o;e.diff=-e.padding;let g=e.height+o,y=e.x-c/2,f=e.y-g/2;if(e.width=c,"handDrawn"===e.look){let t=d.Z.svg(n).rectangle(y,f,c,g,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:r,seed:i});a=n.insert(()=>t,":first-child")}else{a=h.insert("rect",":first-child");let t="outer";e.look,t="divider",a.attr("class",t).attr("x",y).attr("y",f).attr("width",c).attr("height",g).attr("data-look",e.look)}let u=a.node().getBBox();return e.height=u.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return x(e,t)},{cluster:n,labelBBox:{}}}
1,"divider"),kanbanSection:D},v=new Map,C=(0,h.eW)(async(t,e)=>{let a=e.shape||"rect",l=await W[a](t,e);return v.set(e.id,l),l},"insertCluster"),N=(0,h.eW)(()=>{v=new Map},"clear");function B(t,e,a,l){var i=t.x,r=t.y,n=i-l.x,s=r-l.y,h=Math.sqrt(e*e*s*s+a*a*n*n),o=Math.abs(e*a*n/h);l.x<i&&(o=-o);var d=Math.abs(e*a*s/h);return l.y<r&&(d=-d),{x:i+o,y:r+d}}function A(t,e,a){return B(t,e,e,a)}function _(t,e,a,l){{let i=e.y-t.y,r=t.x-e.x,n=e.x*t.y-t.x*e.y,s=i*a.x+r*a.y+n,h=i*l.x+r*l.y+n;if(0!==s&&0!==h&&q(s,h))return;let o=l.y-a.y,d=a.x-l.x,c=l.x*a.y-a.x*l.y,g=o*t.x+d*t.y+c,y=o*e.x+d*e.y+c;if(1e-6>Math.abs(g)&&1e-6>Math.abs(y)&&q(g,y))return;let f=i*d-o*r;if(0===f)return;let u=Math.abs(f/2),w=r*c-d*n;return{x:w<0?(w-u)/f:(w+u)/f,y:(w=o*n-i*c)<0?(w-u)/f:(w+u)/f}}}function q(t,e){return t*e>0}function R(t,e,a){let l=t.x,i=t.y,r=[],n=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),s=Math.min(s,t.y)}):(n=Math.min(n,e.x),s=Math.min(s,e.y));let h=l-t.width/2-n,o=i-t.height/2-s;for(let l=0;l<e.length;l++){let i=e[l],n=e[l<e.length-1?l+1:0],s=_(t,a,{x:h+i.x,y:o+i.y},{x:h+n.x,y:o+n.y});s&&r.push(s)}return r.length?(r.length>1&&r.sort(function(t,e){let l=t.x-a.x,i=t.y-a.y,r=Math.sqrt(l*l+i*i),n=e.x-a.x,s=e.y-a.y,h=Math.sqrt(n*n+s*s);return r<h?-1:r===h?0:1}),r[0]):t}(0,h.eW)(function(t,e){return t.intersect(e)},"intersectNode"),(0,h.eW)(B,"intersectEllipse"),(0,h.eW)(A,"intersectCircle"),(0,h.eW)(_,"intersectLine"),(0,h.eW)(q,"sameSign"),(0,h.eW)(R,"intersectPolygon");var P={circle:A,polygon:R,rect:x};function I(t,e){let{labelStyles:a}=(0,i.UG)(e);e.labelStyle=a;let l=f(e),r=l;l||(r="anchor");let s=t.insert("g").attr("class",r).attr("id",e.domId||e.id),{cssStyles:o}=e,c=d.Z.svg(s),g=(0,i._q)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let u=c.circle(0,0,2,g),w=s.insert(()=>u,":first-child");return w.attr("class","anchor").attr("style",(0,n.R7)(o)),y(e,w),e.intersect=function(t){return h.cM.info("Circle intersect",e,1,t),P.circle(e,1,t)},s}function L(t,e,a,l,i,r,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/i)**2+((l-e)/2/r)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*r*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*i*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/r,(t-d)/i),y=Math.atan2((l-c)/r,(a-d)/i)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+i*Math.cos(e),l=c+r*Math.sin(e);f.push({x:a,y:l})}return f}function Z(t,e,a){let[l,i]=[e,a].sort((t,e)=>e-t);return i*(1-Math.sqrt(1-(t/l/2)**2))}async function U(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,o=(0,h.eW)(t=>t+s,"calcTotalHeight"),g=(0,h.eW)(t=>{let e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:w,bbox:p}=await c(t,e,f(e)),m=o(e?.height?e?.height:p.height),[x,$]=g(m),b=Z(m,x,$),k=(e?.width?e?.width:p.width)+2*n+b-b,{cssStyles:M}=e,S=[{x:k/2,y:-m/2},{x:-k/2,y:-m/2},...L(-k/2,-m/2,-k/2,m/2,x,$,!1),{x:k/2,y:m/2},...L(k/2,m/2,k/2,-m/2,x,$,!0)],D=d.Z.svg(w),W=(0,i._q)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let v=u(S),C=D.path(v,W),N=w.insert(()=>C,":first-child");return N.attr("class","basic label-container outer-path"),M&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",M),l&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",l),N.attr("transform",`translate(${x/2}, 0)`),y(e,N),e.intersect=function(t){return P.polygon(e,S,t)},w}function G(t,e,a,l){return t.insert("polygon",":first-child").attr("points",l.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}async function T(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?28:n,h="neo"===e.look?24:n,{shapeSvg:o,bbox:g}=await c(t,e,f(e)),w=(e?.width??g.width)+("neo"===e.look?2*s:s+12),p=(e?.height??g.height)+("neo"===e.look?2*h:h),m=-p,x=[{x:12,y:m},{x:w,y:m},{x:w,y:0},{x:0,y:0},{x:0,y:m+12},{x:12,y:m}],{cssStyles:$}=e;
1if("handDrawn"===e.look){let t=d.Z.svg(o),l=(0,i._q)(e,{}),r=u(x),n=t.path(r,l);a=o.insert(()=>n,":first-child").attr("transform",`translate(${-w/2}, ${p/2})`),$&&a.attr("style",$)}else a=G(o,w,p,x);return r&&a.attr("style",r),y(e,a),e.intersect=function(t){return P.polygon(e,x,t)},o}function E(t,e){let{nodeStyles:a}=(0,i.UG)(e);e.label="";let l=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:r}=e,n=Math.max(28,e.width??0),s=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],h=d.Z.svg(l),o=(0,i._q)(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let c=u(s),g=h.path(c,o),y=l.insert(()=>g,":first-child");return r&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",r),a&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",a),e.width=28,e.height=28,e.intersect=function(t){return P.polygon(e,s,t)},l}async function H(t,e,a){let l;let{labelStyles:r,nodeStyles:s}=(0,i.UG)(e);e.labelStyle=r;let{shapeSvg:o,bbox:g,halfPadding:u}=await c(t,e,f(e)),w=a?.padding??u,p="neo"===e.look?g.width/2+32:g.width/2+w,{cssStyles:m}=e;
1if("handDrawn"===e.look){let t=d.Z.svg(o),a=(0,i._q)(e,{}),r=t.circle(0,0,2*p,a);(l=o.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)(m))}else l=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",p).attr("cx",0).attr("cy",0);return y(e,l),e.calcIntersect=function(t,e){let a=t.width/2;return P.circle(t,a,e)},e.intersect=function(t){return h.cM.info("Circle intersect",e,p,t),P.circle(e,p,t)},o}function V(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),l=2*t,i={x:l/2*e,y:l/2*a},r={x:-(l/2)*e,y:l/2*a},n={x:-(l/2)*e,y:-(l/2)*a},s={x:l/2*e,y:-(l/2)*a};return`M ${r.x},${r.y} L ${s.x},${s.y} 2 M ${i.x},${i.y} L ${n.x},${n.y}`}function X(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a,e.label="";let r=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),n=Math.max(30,e?.width??0),{cssStyles:s}=e,o=d.Z.svg(r),c=(0,i._q)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");let g=o.circle(0,0,2*n,c),u=V(n),w=o.path(u,c),p=r.insert(()=>g,":first-child");return p.insert(()=>w),p.attr("class","outer-path"),s&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",s),l&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",l),y(e,p),e.intersect=function(t){return h.cM.info("crossedCircle intersect",e,{radius:n,point:t}),P.circle(e,n,t)},r}function Y(t,e,a,l=100,i=0,r=180){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-r,y:-o})}return n}async function j(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await c(t,e,f(e)),h="neo"===e.look?18:e.padding??0,o="neo"===e.look?12:e.padding??0,g=n.width+h,w=n.height+o,p=Math.max(5,.1*w),{cssStyles:m}=e,x=[...Y(g/2,-w/2,p,30,-90,0),{x:-g/2-p,y:p},...Y(g/2+2*p,-p,p,20,-180,-270),...Y(g/2+2*p,p,p,20,-90,-180),{x:-g/2-p,y:-w/2},...Y(g/2,w/2,p,20,0,90)],$=[{x:g/2,y:-w/2-p},{x:-g/2,y:-w/2-p}
2,...Y(g/2,-w/2,p,20,-90,0),{x:-g/2-p,y:-p},...Y(g/2+.1*g,-p,p,20,-180,-270),...Y(g/2+.1*g,p,p,20,-90,-180),{x:-g/2-p,y:w/2},...Y(g/2,w/2,p,20,0,90),{x:-g/2,y:w/2+p},{x:g/2,y:w/2+p}],b=d.Z.svg(r),k=(0,i._q)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=u(x).replace("Z",""),S=b.path(M,k),D=u($),W=b.path(D,{...k}),v=r.insert("g",":first-child");return v.insert(()=>W,":first-child").attr("stroke-opacity",0),v.insert(()=>S,":first-child"),v.attr("class","text"),m&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",l),v.attr("transform",`translate(${p}, 0)`),s.attr("transform",`translate(${-g/2+p-(n.x-(n.left??0))},${-w/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,v),e.intersect=function(t){return P.polygon(e,$,t)},r}function O(t,e,a,l=100,i=0,r=180){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:r,y:o})}return n}async function F(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await c(t,e,f(e)),h="neo"===e.look?18:e.padding??0,o="neo"===e.look?12:e.padding??0,g=n.width+("neo"===e.look?2*h:h),w=n.height+("neo"===e.look?2*o:o),p=Math.max(5,.1*w),{cssStyles:m}
2=e,x=[...O(g/2,-w/2,p,20,-90,0),{x:g/2+p,y:-p},...O(g/2+2*p,-p,p,20,-180,-270),...O(g/2+2*p,p,p,20,-90,-180),{x:g/2+p,y:w/2},...O(g/2,w/2,p,20,0,90)],$=[{x:-g/2,y:-w/2-p},{x:g/2,y:-w/2-p},...O(g/2,-w/2,p,20,-90,0),{x:g/2+p,y:-p},...O(g/2+2*p,-p,p,20,-180,-270),...O(g/2+2*p,p,p,20,-90,-180),{x:g/2+p,y:w/2},...O(g/2,w/2,p,20,0,90),{x:g/2,y:w/2+p},{x:-g/2,y:w/2+p}],b=d.Z.svg(r),k=(0,i._q)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=u(x).replace("Z",""),S=b.path(M,k),D=u($),W=b.path(D,{...k}),v=r.insert("g",":first-child");return v.insert(()=>W,":first-child").attr("stroke-opacity",0),v.insert(()=>S,":first-child"),v.attr("class","text"),m&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",l),v.attr("transform",`translate(${-p}, 0)`),s.attr("transform",`translate(${-g/2+(e.padding??0)/2-(n.x-(n.left??0))},${-w/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,v),e.intersect=function(t){return P.polygon(e,$,t)},r}function z(t,e,a,l=100,i=0,r=180){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-r,y:-o})}return n}async function J(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await c(t,e,f(e)),h="neo"===e.look?18:e.padding??0,o="neo"===e.look?12:e.padding??0,g=n.width+("neo"===e.look?2*h:h),w=n.height+("neo"===e.look?2*o:o),p=Math.max(5,.1*w),{cssStyles:m}=e,x=[...z(g/2,-w/2,p,30,-90,0),{x:-g/2-p,y:p},...z(g/2+2*p,-p,p,20,-180,-270),...z(g/2+2*p,p,p,20,-90,-180),{x:-g/2-p,y:-w/2},...z(g/2,w/2,p,20,0,90)],$=[...z(-g/2+p+p/2,-w/2,p,20,-90,-180),{x:g/2-p/2,y:p},...z(-g/2-p/2,-p,p,20,0,90),...z(-g/2-p/2,p,p,20,-90,0),{x:g/2-p/2,y:-p},...z(-g/2+p+p/2,w/2,p,30,-180,-270)],b=[{x:g/2,y:-w/2-p},{x:-g/2,y:-w/2-p}
2,...z(g/2,-w/2,p,20,-90,0),{x:-g/2-p,y:-p},...z(g/2+2*p,-p,p,20,-180,-270),...z(g/2+2*p,p,p,20,-90,-180),{x:-g/2-p,y:w/2},...z(g/2,w/2,p,20,0,90),{x:-g/2,y:w/2+p},{x:g/2-p-p/2,y:w/2+p},...z(-g/2+p+p/2,-w/2,p,20,-90,-180),{x:g/2-p/2,y:p},...z(-g/2-p/2,-p,p,20,0,90),...z(-g/2-p/2,p,p,20,-90,0),{x:g/2-p/2,y:-p},...z(-g/2+p+p/2,w/2,p,30,-180,-270)],k=d.Z.svg(r),M=(0,i._q)(e,{fill:"none"});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let S=u(x).replace("Z",""),D=k.path(S,M),W=u($).replace("Z",""),v=k.path(W,M),C=u(b),N=k.path(C,{...M}),B=r.insert("g",":first-child");return B.insert(()=>N,":first-child").attr("stroke-opacity",0),B.insert(()=>D,":first-child"),B.insert(()=>v,":first-child"),B.attr("class","text"),m&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",l),B.attr("transform",`translate(${p-p/4}, 0)`),s.attr("transform",`translate(${-g/2+(e.padding??0)/2-(n.x-(n.left??0))},${-w/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,B),e.intersect=function(t){return P.polygon(e,b,t)},r}async function K(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=Math.max(20,(o.width+2*n)*1.25,e?.width??0),w=Math.max(5,o.height+2*s,e?.height??0),m=w/2,{cssStyles:x}=e,$=d.Z.svg(h),b=(0,i._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=g-m,M=w/4,S=[{x:k,y:0},{x:M,y:0},{x:0,y:w/2},{x:M,y:w},{x:k,y:w},...p(-k,-w/2,m,50,270,90)],D=u(S),W=$.path(D,b),v=h.insert(()=>W,":first-child");return v.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",l),v.attr("transform",`translate(${-g/2}, ${-w/2})`),y(e,v),e.intersect=function(t){return P.polygon(e,S,t)},h}(0,h.eW)(I,"anchor"),(0,h.eW)(L,"generateArcPoints"),(0,h.eW)(Z,"calculateArcSagitta"),(0,h.eW)(U,"bowTieRect"),(0,h.eW)(G,"insertPolygonShape"),(0,h.eW)(T,"card"),(0,h.eW)(E,"choice"),(0,h.eW)(H,"circle"),(0,h.eW)(V,"createLine"),(0,h.eW)(X,"crossedCircle"),(0,h.eW)(Y,"generateCirclePoints"),(0,h.eW)(j,"curlyBraceLeft"),(0,h.eW)(O,"generateCirclePoints"),(0,h.eW)(F,"curlyBraceRight"),(0,h.eW)(z,"generateCirclePoints"),(0,h.eW)(J,"curlyBraces"),(0,h.eW)(K,"curvedTrapezoid");var Q=(0,h.eW)((t,e,a,l,i,r)=>`M${t},${e+r} a${i},${r} 0,0,0 ${a},0 a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l}`,"createCylinderPathD"),tt=(0,h.eW)((t,e,a,l,i,r)=>`M${t},${e+r} M${t+a},${e+r} a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l}`,"createOuterCylinderPathD"),te=(0,h.eW)((t,e,a,l,i,r)=>`M${t-a/2},${-l/2} a${i},${r} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function ta(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let s=e.padding??0,h="neo"===e.look?24:s,o="neo"===e.look?24:s;if(e.width||e.height){let t=e.width??0;e.width=(e.width??0)-o,e.width<8&&(e.width=8),e.height=(e.height??0)-h-t/2/(2.5+t/50)*3,e.height<8&&(e.height=8)}let{shapeSvg:g,bbox:u,label:w}=await c(t,e,f(e)),p=(e.width?e.width:u.width)+o,m=p/2,x=m/(2.5+p/50),$=(e.height?e.height:u.height)+h+x,{cssStyles:b}=e;
2if("handDrawn"===e.look){let t=d.Z.svg(g),l=tt(0,0,p,$,m,x),r=te(0,x,p,$,m,x),n=(0,i._q)(e,{}),s=t.path(l,n),h=t.path(r,(0,i._q)(e,{fill:"none"}));a=g.insert(()=>h,":first-child"),(a=g.insert(()=>s,":first-child")).attr("class","basic label-container"),b&&a.attr("style",b)}else{let t=Q(0,0,p,$,m,x);a=g.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,n.R7)(b)).attr("style",r)}return a.attr("label-offset-y",x),a.attr("transform",`translate(${-p/2}, ${-($/2+x)})`),y(e,a),w.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(e.padding??0)/1.5-(u.y-(u.top??0))})`),e.intersect=function(t){let a=P.rect(e,t),l=a.x-(e.x??0);if(0!=m&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-x)){let i=x*x*(1-l*l/(m*m));i>0&&(i=Math.sqrt(i)),i=x-i,t.y-(e.y??0)>0&&(i=-i),a.y+=i}return a},g}async function tl(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r="neo"===e.look?16:e.padding??0,n="neo"===e.look?16:e.padding??0,{shapeSvg:s,bbox:h,label:o}=await c(t,e,f(e)),g=h.width+r,u=h.height+n,w=.2*u,p=-g/2,m=-u/2-w/2,{cssStyles:x}=e,$=d.Z.svg(s),b=(0,i._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=$.polygon([{x:p,y:m+w},{x:-p,y:m+w},{x:-p,y:-m},{x:p,y:-m},{x:p,y:m},{x:-p,y:m},{x:-p,y:m+w}].map(t=>[t.x,t.y]),b),M=s.insert(()=>k,":first-child");return M.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",x),l&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",l),o.attr("transform",`translate(${p+(e.padding??0)/2-(h.x-(h.left??0))}, ${m+w+(e.padding??0)/2-(h.y-(h.top??0))})`),y(e,M),e.intersect=function(t){return P.rect(e,t)},s}async function ti(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e),s="neo"===e.look?12:5;e.labelStyle=l;let o=e.padding??0,g="neo"===e.look?16:o,{shapeSvg:u,bbox:w}=await c(t,e,f(e)),p=(e?.width?e?.width/2:w.width/2)+(g??0),m=p-s,{cssStyles:x}=e;if("handDrawn"===e.look){let t=d.Z.svg(u),l=(0,i._q)(e,{roughness:.2,strokeWidth:2.5}),r=(0,i._q)(e,{roughness:.2,strokeWidth:1.5}),s=t.circle(0,0,2*p,l),h=t.circle(0,0,2*m,r);(a=u.insert("g",":first-child")).attr("class",(0,n.R7)(e.cssClasses)).attr("style",(0,n.R7)(x)),a.node()?.appendChild(s),a.node()?.appendChild(h)}else{let t=(a=u.insert("g",":first-child")).insert("circle",":first-child"),e=a.insert("circle");a.attr("class","basic label-container").attr("style",r),t.attr("class","outer-circle").attr("style",r).attr("r",p).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",r).attr("r",m).attr("cx",0).attr("cy",0)}return y(e,a),e.intersect=function(t){return h.cM.info("DoubleCircle intersect",e,p,t),P.circle(e,p,t)},u}function tr(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.label="",e.labelStyle=l;let n=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,o=d.Z.svg(n),{nodeBorder:c}=a,g=(0,i._q)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let u=o.circle(0,0,14,g),w=n.insert(()=>u,":first-child");return w.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",s),r&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",r),y(e,w),e.intersect=function(t){return h.cM.info("filledCircle intersect",e,{radius:7,point:t}),P.circle(e,7,t)},n}async function tn(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?2*r:r;(e.width||e.height)&&(e.height=e?.height??0,e.height<10&&(e.height=10),e.width=(e?.width??0)-n-n/2,e.width<10&&(e.width=10));let{shapeSvg:s,bbox:o,label:g}=await c(t,e,f(e)),w=(e?.width?e?.width:o.width)+(n??0),p=e?.height?e?.height:w+o.height,m=[{x:0,y:-p},{x:p,y:-p},{x:p/2,y:0}],{cssStyles:x}=e,$=d.Z.svg(s),b=(0,i._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=u(m),M=$.path(k,b),S=s.insert(()=>M,":first-child").attr("transform",`translate(${-p/2}, ${p/2})`).attr("class","outer-path");return x&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),e.width=w,e.height=p,y(e,S),g.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}
2, ${-p/2+(e.padding??0)/2+(o.y-(o.top??0))})`),e.intersect=function(t){return h.cM.info("Triangle intersect",e,m,t),P.polygon(e,m,t)},s}function ts(t,e,{dir:a,config:{state:l,themeVariables:r}}){let{nodeStyles:n}=(0,i.UG)(e);e.label="";let s=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:h}=e,o=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===a&&(o=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));let g=-1*o/2,u=-1*c/2,w=d.Z.svg(s),p=(0,i._q)(e,{stroke:r.lineColor,fill:r.lineColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let m=w.rectangle(g,u,o,c,p),x=s.insert(()=>m,":first-child");h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),y(e,x);let $=l?.padding??0;return e.width&&e.height&&(e.width+=$/2||0,e.height+=$/2||0),e.intersect=function(t){return P.rect(e,t)},s}async function th(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r="neo"===e.look?16:e.padding??0,n="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.height=(e?.height??0)-2*n,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*r,e.width<15&&(e.width=15));let{shapeSvg:s,bbox:o}=await c(t,e,f(e)),g=(e?.width?e?.width:Math.max(15,o.width))+2*r,w=(e?.height?e?.height:Math.max(10,o.height))+2*n,m=w/2,{cssStyles:x}=e,$=d.Z.svg(s),b=(0,i._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=[{x:-g/2,y:-w/2},{x:g/2-m,y:-w/2},...p(-g/2+m,0,m,50,90,270),{x:g/2-m,y:w/2},{x:-g/2,y:w/2}],M=u(k),S=$.path(M,b),D=s.insert(()=>S,":first-child");return D.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",l),y(e,D),e.intersect=function(t){return h.cM.info("Pill intersect",e,{radius:m,point:t}),P.polygon(e,k,t)},s}(0,h.eW)(ta,"cylinder"),(0,h.eW)(tl,"dividedRectangle"),(0,h.eW)(ti,"doublecircle"),(0,h.eW)(tr,"filledCircle"),(0,h.eW)(tn,"flippedTriangle"),(0,h.eW)(ts,"forkJoin"),(0,h.eW)(th,"halfRoundedRectangle");var to=(0,h.eW)((t,e,a,l,i)=>`M${t+i},${e} L${t+a-i},${e} L${t+a},${e-l/2} L${t+a-i},${e-l} L${t+i},${e-l} L${t},${e-l/2} Z`,"createHexagonPathD");async function td(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e),n="neo"===e.look?3.5:4;e.labelStyle=l;let s=e.padding??0,h="neo"===e.look?70:s,o="neo"===e.look?32:s;if(e.width||e.height){let t=e.height??0;e.width=(e?.width??0)-t/n*2-o,e.height=(e.height??0)-h}let{shapeSvg:g,bbox:u}=await c(t,e,f(e)),w=(e?.height?e?.height:u.height)+h,p=w/n,m=(e?.width?e?.width:u.width)+2*p+o,x=[{x:p,y:0},{x:m-p,y:0},{x:m,y:-w/2},{x:m-p,y:-w},{x:p,y:-w},{x:0,y:-w/2}],{cssStyles:$}=e;
2if("handDrawn"===e.look){let t=d.Z.svg(g),l=(0,i._q)(e,{}),r=to(0,0,m,w,p),n=t.path(r,l);a=g.insert(()=>n,":first-child").attr("transform",`translate(${-m/2}, ${w/2})`),$&&a.attr("style",$)}else a=G(g,m,w,x);return r&&a.attr("style",r),e.width=m,e.height=w,y(e,a),e.intersect=function(t){return P.polygon(e,x,t)},g}async function tc(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.label="",e.labelStyle=a;let{shapeSvg:r}=await c(t,e,f(e)),n=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:o}=e,g=d.Z.svg(r),w=(0,i._q)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let p=[{x:0,y:0},{x:n,y:0},{x:0,y:s},{x:n,y:s}],m=u(p),x=g.path(m,w),$=r.insert(()=>x,":first-child");return $.attr("class","basic label-container outer-path"),o&&"handDrawn"!==e.look&&$.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&$.selectChildren("path").attr("style",l),$.attr("transform",`translate(${-n/2}, ${-s/2})`),y(e,$),e.intersect=function(t){return h.cM.info("Pill intersect",e,{points:p}),P.polygon(e,p,t)},r}async function tg(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,i.UG)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48),o=l?.wrappingWidth;e.width=Math.max(s,o??0);let{shapeSvg:g,bbox:f,label:u}=await c(t,e,"icon-shape default"),w="t"===e.pos,{nodeBorder:p}=a,{stylesMap:m}=(0,i.dT)(e),x=-s/2,$=-s/2,b=e.label?8:0,k=d.Z.svg(g),M=(0,i._q)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let S=k.rectangle(x,$,s,s,M),D=Math.max(s,f.width),W=s+f.height+b,v=k.rectangle(-D/2,-W/2,D,W,{...M,fill:"transparent",stroke:"none"}),C=g.insert(()=>S,":first-child"),N=g.insert(()=>v);if(e.icon){let t=g.append("g");t.html(`<g>${await (0,r.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,i=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${w?f.height/2+b/2-i/2-h:-f.height/2-b/2-i/2-h})`),t.attr("style",`color: ${m.get("stroke")??p};`)}return u.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${w?-W/2:W/2-f.height})`),C.attr("transform",`translate(0,${w?f.height/2+b/2:-f.height/2-b/2})`),y(e,N),e.intersect=function(t){if(h.cM.info("iconSquare intersect",e,t),!e.label)return P.rect(e,t);let a=e.x??0,l=e.y??0,i=e.height??0,r=[];return r=w?[{x:a-f.width/2,y:l-i/2},{x:a+f.width/2,y:l-i/2},{x:a+f.width/2,y:l-i/2+f.height+b},{x:a+s/2,y:l-i/2+f.height+b},{x:a+s/2,y:l+i/2},{x:a-s/2,y:l+i/2},{x:a-s/2,y:l-i/2+f.height+b},{x:a-f.width/2,y:l-i/2+f.height+b}]:[{x:a-s/2,y:l-i/2},{x:a+s/2,y:l-i/2},{x:a+s/2,y:l-i/2+s},{x:a+f.width/2,y:l-i/2+s},{x:a+f.width/2/2,y:l+i/2},{x:a-f.width/2,y:l+i/2},{x:a-f.width/2,y:l-i/2+s},{x:a-s/2,y:l-i/2+s}],P.polygon(e,r,t)},g}async function ty(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,i.UG)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48),o=l?.wrappingWidth;e.width=Math.max(s,o??0);let{shapeSvg:g,bbox:f,label:u}=await c(t,e,"icon-shape default"),w=e.label?8:0,p="t"===e.pos,{nodeBorder:m,mainBkg:x}=a,{stylesMap:$}=(0,i.dT)(e),b=d.Z.svg(g),k=(0,i._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=$.get("fill");k.stroke=M??x;let S=g.append("g");e.icon&&S.html(`<g>${await (0,r.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let D=S.node().getBBox(),W=D.width,v=D.height,C=D.x,N=D.y,B=Math.max(W,v)*Math.SQRT2+40,A=b.circle(0,0,B,k),_=Math.max(B,f.width),q=B+f.height+w,R=b.rectangle(-_/2,-q/2,_,q,{...k,fill:"transparent",stroke:"none"}),I=g.insert(()=>A,":first-child"),L=g.insert(()=>R);return S.attr("transform",`translate(${-W/2-C},${p?f.height/2+w/2-v/2-N:-f.height/2-w/2-v/2-N})`),S.attr("style",`color: ${$.get("stroke")??m};`),u.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-q/2:q/2-f.height})`),I.attr("transform",`translate(0,${p?f.height/2+w/2:-f.height/2-w/2})`),y(e,L),e.intersect=function(t){return h.cM.info("iconSquare intersect",e,t),P.rect(e,t)},g}async function tf(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,i.UG)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48),o=l?.wrappingWidth;e.width=Math.max(s,o??0);let{shapeSvg:g,bbox:f,halfPadding:u,label:w}=await c(t,e,"icon-shape default"),p="t"===e.pos,m=s+2*u,x=s+2*u,{nodeBorder:$,mainBkg:k}=a,{stylesMap:M}=(0,i.dT)(e),S=e.label?8:0,D=d.Z.svg(g),W=(0,i._q)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let v=M.get("fill");W.stroke=v??k;let C=D.path(b(-x/2,-m/2,x,m,5),W),N=Math.max(x,f.width),B=m+f.height+S,A=D.rectangle(-N/2,-B/2,N,B,{...W,fill:"transparent",stroke:"none"}),_=g.insert(()=>C,":first-child").attr("class","icon-shape2"),q=g.insert(()=>A);if(e.icon){let t=g.append("g");t.html(`<g>${await (0,r.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,i=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${p?f.height/2+S/2-i/2-h:-f.height/2-S/2-i/2-h})`),t.attr("style",`color: ${M.get("stroke")??$};`)}return w.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-B/2:B/2-f.height})`),_.attr("transform",`translate(0,${p?f.height/2+S/2:-f.height/2-S/2})`),y(e,q),e.intersect=function(t){if(h.cM.info("iconSquare intersect",e,t),!e.label)return P.rect(e,t);let a=e.x??0,l=e.y??0,i=e.height??0,r=[];return r=p?[{x:a-f.width/2,y:l-i/2},{x:a+f.width/2,y:l-i/2},{x:a+f.width/2,y:l-i/2+f.height+S},{x:a+x/2,y:l-i/2+f.height+S},{x:a+x/2,y:l+i/2},{x:a-x/2,y:l+i/2},{x:a-x/2,y:l-i/2+f.height+S},{x:a-f.width/2,y:l-i/2+f.height+S}]:[{x:a-x/2,y:l-i/2},{x:a+x/2,y:l-i/2},{x:a+x/2,y:l-i/2+m},{x:a+f.width/2,y:l-i/2+m},{x:a+f.width/2/2,y:l+i/2},{x:a-f.width/2,y:l+i/2},{x:a-f.width/2,y:l-i/2+m},{x:a-x/2,y:l-i/2+m}],P.polygon(e,r,t)},g}async function tu(t,e,{config:{themeVariables:a,flowchart:l}}
2){let{labelStyles:n}=(0,i.UG)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48),o=l?.wrappingWidth;e.width=Math.max(s,o??0);let{shapeSvg:g,bbox:f,halfPadding:u,label:w}=await c(t,e,"icon-shape default"),p="t"===e.pos,m=s+2*u,x=s+2*u,{nodeBorder:$,mainBkg:k}=a,{stylesMap:M}=(0,i.dT)(e),S=e.label?8:0,D=d.Z.svg(g),W=(0,i._q)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let v=M.get("fill");W.stroke=v??k;let C=D.path(b(-x/2,-m/2,x,m,.1),W),N=Math.max(x,f.width),B=m+f.height+S,A=D.rectangle(-N/2,-B/2,N,B,{...W,fill:"transparent",stroke:"none"}),_=g.insert(()=>C,":first-child"),q=g.insert(()=>A);if(e.icon){let t=g.append("g");t.html(`<g>${await (0,r.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,i=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${p?f.height/2+S/2-i/2-h:-f.height/2-S/2-i/2-h})`),t.attr("style",`color: ${M.get("stroke")??$};`)}return w.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-B/2:B/2-f.height})`),_.attr("transform",`translate(0,${p?f.height/2+S/2:-f.height/2-S/2})`),y(e,q),e.intersect=function(t){if(h.cM.info("iconSquare intersect",e,t),!e.label)return P.rect(e,t);let a=e.x??0,l=e.y??0,i=e.height??0,r=[];return r=p?[{x:a-f.width/2,y:l-i/2},{x:a+f.width/2,y:l-i/2},{x:a+f.width/2,y:l-i/2+f.height+S},{x:a+x/2,y:l-i/2+f.height+S},{x:a+x/2,y:l+i/2},{x:a-x/2,y:l+i/2},{x:a-x/2,y:l-i/2+f.height+S},{x:a-f.width/2,y:l-i/2+f.height+S}]:[{x:a-x/2,y:l-i/2},{x:a+x/2,y:l-i/2},{x:a+x/2,y:l-i/2+m},{x:a+f.width/2,y:l-i/2+m},{x:a+f.width/2/2,y:l+i/2},{x:a-f.width/2,y:l+i/2},{x:a-f.width/2,y:l-i/2+m},{x:a-x/2,y:l-i/2+m}],P.polygon(e,r,t)},g}async function tw(t,e,{config:{flowchart:a}}){let l=new Image;l.src=e?.img??"",await l.decode();let r=Number(l.naturalWidth.toString().replace("px","")),n=Number(l.naturalHeight.toString().replace("px",""));e.imageAspectRatio=r/n;let{labelStyles:s}=(0,i.UG)(e);e.labelStyle=s;let o=a?.wrappingWidth;e.defaultWidth=a?.wrappingWidth;let g=Math.max(e.label?o??0:0,e?.assetWidth??r),f="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:g,u="on"===e.constraint?f/e.imageAspectRatio:e?.assetHeight??n;e.width=Math.max(f,o??0);let{shapeSvg:w,bbox:p,label:m}=await c(t,e,"image-shape default"),x="t"===e.pos,$=-f/2,b=e.label?8:0,k=d.Z.svg(w),M=(0,i._q)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let S=k.rectangle($,-u/2,f,u,M),D=Math.max(f,p.width),W=u+p.height+b,v=k.rectangle(-D/2,-W/2,D,W,{...M,fill:"none",stroke:"none"}),C=w.insert(()=>S,":first-child"),N=w.insert(()=>v);if(e.img){let t=w.append("image");t.attr("href",e.img),t.attr("width",f),t.attr("height",u),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-f/2},${x?W/2-u:-W/2})`)}return m.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${x?-u/2-p.height/2-b/2:u/2-p.height/2+b/2})`),C.attr("transform",`translate(0,${x?p.height/2+b/2:-p.height/2-b/2})`),y(e,N),e.intersect=function(t){if(h.cM.info("iconSquare intersect",e,t),!e.label)return P.rect(e,t);let a=e.x??0,l=e.y??0,i=e.height??0,r=[];return r=x?[{x:a-p.width/2,y:l-i/2},{x:a+p.width/2,y:l-i/2},{x:a+p.width/2,y:l-i/2+p.height+b},{x:a+f/2,y:l-i/2+p.height+b},{x:a+f/2,y:l+i/2},{x:a-f/2,y:l+i/2},{x:a-f/2,y:l-i/2+p.height+b},{x:a-p.width/2,y:l-i/2+p.height+b}]:[{x:a-f/2,y:l-i/2},{x:a+f/2,y:l-i/2},{x:a+f/2,y:l-i/2+u},{x:a+p.width/2,y:l-i/2+u},{x:a+p.width/2/2,y:l+i/2},{x:a-p.width/2,y:l+i/2},{x:a-p.width/2,y:l-i/2+u},{x:a-f/2,y:l-i/2+u}],P.polygon(e,r,t)},w}async function tp(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=Math.max(o.width+(s??0)*2,e?.width??0),w=Math.max(o.height+(n??0)*2,e?.height??0),p=[{x:0,y:0},{x:g,y:0},{x:g+3*w/6,y:-w},{x:-3*w/6,y:-w}],{cssStyles:m}=e;
2if("handDrawn"===e.look){let t=d.Z.svg(h),l=(0,i._q)(e,{}),r=u(p),n=t.path(r,l);a=h.insert(()=>n,":first-child").attr("transform",`translate(${-g/2}, ${w/2})`),m&&a.attr("style",m)}else a=G(h,g,w,p);return r&&a.attr("style",r),e.width=g,e.height=w,y(e,a),e.intersect=function(t){return P.polygon(e,p,t)},h}async function tm(t,e,a){let l;let{labelStyles:r,nodeStyles:s}=(0,i.UG)(e);e.labelStyle=r;let{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=Math.max(o.width+2*a.labelPaddingX,e?.width||0),u=Math.max(o.height+2*a.labelPaddingY,e?.height||0),w=-g/2,p=-u/2,{rx:m,ry:x}=e,{cssStyles:$}=e;if(a?.rx&&a.ry&&(m=a.rx,x=a.ry),"handDrawn"===e.look){let t=d.Z.svg(h),a=(0,i._q)(e,{}),r=m||x?t.path(b(w,p,g,u,m||0),a):t.rectangle(w,p,g,u,a);(l=h.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)($))}else(l=h.insert("rect",":first-child")).attr("class","basic label-container").attr("style",s).attr("rx",(0,n.R7)(m)).attr("ry",(0,n.R7)(x)).attr("x",w).attr("y",p).attr("width",g).attr("height",u);return y(e,l),e.calcIntersect=function(t,e){return P.rect(t,e)},e.intersect=function(t){return P.rect(e,t)},h}async function tx(t,e){let{shapeSvg:a,bbox:l,label:i}=await c(t,e,"label"),r=a.insert("rect",":first-child");return r.attr("width",.1).attr("height",.1),a.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),y(e,r),e.intersect=function(t){return P.rect(e,t)},a}async function t$(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=(e?.height??o.height)+n,w=(e?.width??o.width)+s,p=[{x:0,y:0},{x:w+3*g/6,y:0},{x:w,y:-g},{x:-(3*g)/6,y:-g}],{cssStyles:m}=e;
2if("handDrawn"===e.look){let t=d.Z.svg(h),l=(0,i._q)(e,{}),r=u(p),n=t.path(r,l);a=h.insert(()=>n,":first-child").attr("transform",`translate(${-w/2}, ${g/2})`),m&&a.attr("style",m)}else a=G(h,w,g,p);return r&&a.attr("style",r),e.width=w,e.height=g,y(e,a),e.intersect=function(t){return P.polygon(e,p,t)},h}async function tb(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=(e?.height??o.height)+n,w=(e?.width??o.width)+s,p=[{x:-3*g/6,y:0},{x:w,y:0},{x:w+3*g/6,y:-g},{x:0,y:-g}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.Z.svg(h),l=(0,i._q)(e,{}),r=u(p),n=t.path(r,l);a=h.insert(()=>n,":first-child").attr("transform",`translate(${-w/2}, ${g/2})`),m&&a.attr("style",m)}else a=G(h,w,g,p);return r&&a.attr("style",r),e.width=w,e.height=g,y(e,a),e.intersect=function(t){return P.polygon(e,p,t)},h}function tk(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.label="",e.labelStyle=a;let r=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,s=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),c=[{x:s,y:0},{x:0,y:o+3.5},{x:s-14,y:o+3.5},{x:0,y:2*o},{x:s,y:o-3.5},{x:14,y:o-3.5}],g=d.Z.svg(r),w=(0,i._q)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let p=u(c),m=g.path(p,w),x=r.insert(()=>m,":first-child");return x.attr("class","outer-path"),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),l&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",l),x.attr("transform",`translate(-${s/2},${-o})`),y(e,x),e.intersect=function(t){return h.cM.info("lightningBolt intersect",e,t),P.polygon(e,c,t)},r}(0,h.eW)(td,"hexagon"),(0,h.eW)(tc,"hourglass"),(0,h.eW)(tg,"icon"),(0,h.eW)(ty,"iconCircle"),(0,h.eW)(tf,"iconRounded"),(0,h.eW)(tu,"iconSquare"),(0,h.eW)(tw,"imageSquare"),(0,h.eW)(tp,"inv_trapezoid"),(0,h.eW)(tm,"drawRect"),(0,h.eW)(tx,"labelRect"),(0,h.eW)(t$,"lean_left"),(0,h.eW)(tb,"lean_right"),(0,h.eW)(tk,"lightningBolt");var tM=(0,h.eW)((t,e,a,l,i,r,n)=>`M${t},${e+r} a${i},${r} 0,0,0 ${a},0 a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l} M${t},${e+r+n} a${i},${r} 0,0,0 ${a},0`,"createCylinderPathD"),tS=(0,h.eW)((t,e,a,l,i,r,n)=>`M${t},${e+r} M${t+a},${e+r} a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l} M${t},${e+r+n} a${i},${r} 0,0,0 ${a},0`,"createOuterCylinderPathD"),tD=(0,h.eW)((t,e,a,l,i,r)=>`M${t-a/2},${-l/2} a${i},${r} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function tW(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let s=e.padding??0,h="neo"===e.look?16:s,o="neo"===e.look?24:s;if(e.width||e.height){let t=e.width??0;e.width=(e.width??0)-h,e.width<10&&(e.width=10),e.height=(e.height??0)-o-t/2/(2.5+t/50)*3,e.height<10&&(e.height=10)}let{shapeSvg:g,bbox:u,label:w}=await c(t,e,f(e)),p=(e?.width?e?.width:u.width)+2*h,m=p/2,x=m/(2.5+p/50),$=(e?.height?e?.height:u.height)+x+2*o,b=.1*$,{cssStyles:k}=e;if("handDrawn"===e.look){let t=d.Z.svg(g),l=tS(0,0,p,$,m,x,b),r=tD(0,x,p,$,m,x),n=(0,i._q)(e,{}),s=t.path(l,n),h=t.path(r,n);g.insert(()=>h,":first-child").attr("class","line"),(a=g.insert(()=>s,":first-child")).attr("class","basic label-container"),k&&a.attr("style",k)}else{let t=tM(0,0,p,$,m,x,b);a=g.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,n.R7)(k)).attr("style",r)}return a.attr("label-offset-y",x),a.attr("transform",`translate(${-p/2}, ${-($/2+x)})`),y(e,a),w.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+x-(u.y-(u.top??0))})`),e.intersect=function(t){let a=P.rect(e,t),l=a.x-(e.x??0);if(0!=m&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-x)){let i=x*x*(1-l*l/(m*m));i>0&&(i=Math.sqrt(i)),i=x-i,t.y-(e.y??0)>0&&(i=-i),a.y+=i}return a},g}async function tv(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;if(e.width||e.height){let t=e.width;e.width=(t??0)*10/11-2*n,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10)}let{shapeSvg:h,bbox:o,label:g}=await c(t,e,f(e)),u=(e?.width?e?.width:o.width)+(n??0)*2,p=(e?.height?e?.height:o.height)+(s??0)*2,m="neo"===e.look?p/4:p/8,x=p+m,{cssStyles:$}=e,b=d.Z.svg(h),k=(0,i._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-u/2-u/2*.1,y:-x/2},{x:-u/2-u/2*.1,y:x/2},...w(-u/2-u/2*.1,x/2,u/2+u/2*.1,x/2,m,.8),{x:u/2+u/2*.1,y:-x/2},{x:-u/2-u/2*.1,y:-x/2},{x:-u/2,y:-x/2},{x:-u/2,y:x/2*1.1},{x:-u/2,y:-x/2}],S=b.polygon(M.map(t=>[t.x,t.y]),k),D=h.insert(()=>S,":first-child");return D.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",$),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),D.attr("transform",`translate(0,${-m/2})`),g.attr("transform",`translate(${-u/2+(e.padding??0)+u/2*.1/2-(o.x-(o.left??0))},${-p/2+(e.padding??0)-m/2-(o.y-(o.top??0))})`),y(e,D),e.intersect=function(t){return P.polygon(e,M,t)},h}async function tC(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,h="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*n-2*h,10),e.height=Math.max((e?.height??0)-2*s-2*h,10));let{shapeSvg:o,bbox:g,label:w}=await c(t,e,f(e)),p=(e?.width?e?.width:g.width)+2*n+2*h,x=(e?.height?e?.height:g.height)+2*s+2*h,$=p-2*h,b=x-2*h,k=-$/2,M=-b/2,{cssStyles:S}
2=e,D=d.Z.svg(o),W=(0,i._q)(e,{}),v=[{x:k-h,y:M+h},{x:k-h,y:M+b+h},{x:k+$-h,y:M+b+h},{x:k+$-h,y:M+b},{x:k+$,y:M+b},{x:k+$,y:M+b-h},{x:k+$+h,y:M+b-h},{x:k+$+h,y:M-h},{x:k+h,y:M-h},{x:k+h,y:M},{x:k,y:M},{x:k,y:M+h}];"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let C=u(v),N=D.path(C,W),B=u([{x:k,y:M+h},{x:k+$-h,y:M+h},{x:k+$-h,y:M+b},{x:k+$,y:M+b},{x:k+$,y:M},{x:k,y:M}]),A=D.path(B,W);"handDrawn"!==e.look&&(N=m(N),A=m(A));let _=o.insert("g",":first-child");return _.insert(()=>N),_.insert(()=>A),_.attr("class","basic label-container outer-path"),S&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",S),l&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",l),w.attr("transform",`translate(${-(g.width/2)-h-(g.x-(g.left??0))}, ${-(g.height/2)+h-(g.y-(g.top??0))})`),y(e,_),e.intersect=function(t){return P.polygon(e,v,t)},o}async function tN(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await c(t,e,f(e)),h=e.padding??0,o="neo"===e.look?16:h,g="neo"===e.look?12:h,p=!0;(e.width||e.height)&&(p=!1,e.width=(e?.width??0)-2*o,e.height=(e?.height??0)-3*g);let m=Math.max(n.width,e?.width??0)+2*o,x=Math.max(n.height,e?.height??0)+3*g,$="neo"===e.look?x/4:x/8,b=x+(p?$/2:-$/2),k=-m/2,M=-b/2,{cssStyles:S}=e,D=w(k-10,M+b+10,k+m-10,M+b+10,$,.8),W=D?.[D.length-1],v=[{x:k-10,y:M+10},{x:k-10,y:M+b+10},...D,{x:k+m-10,y:W.y-10},{x:k+m,y:W.y-10},{x:k+m,y:W.y-20},{x:k+m+10,y:W.y-20},{x:k+m+10,y:M-10},{x:k+10,y:M-10},{x:k+10,y:M},{x:k,y:M},{x:k,y:M+10}],C=[{x:k,y:M+10},{x:k+m-10,y:M+10},{x:k+m-10,y:W.y-10},{x:k+m,y:W.y-10},{x:k+m,y:M},{x:k,y:M}],N=d.Z.svg(r),B=(0,i._q)(e,{});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");let A=u(v),_=N.path(A,B),q=u(C),R=N.path(q,B),I=r.insert(()=>_,":first-child");return I.insert(()=>R),I.attr("class","basic label-container outer-path"),S&&"handDrawn"!==e.look&&I.selectAll("path").attr("style",S),l&&"handDrawn"!==e.look&&I.selectAll("path").attr("style",l),I.attr("transform",`translate(0,${-$/2})`),s.attr("transform",`translate(${-(n.width/2)-10-(n.x-(n.left??0))}, ${-(n.height/2)+10-$/2-(n.y-(n.top??0))})`),y(e,I),e.intersect=function(t){return P.polygon(e,v,t)},r}async function tB(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l,e.useHtmlLabels||(0,s._X)((0,s.iE)())||(e.centerLabel=!0);let{shapeSvg:n,bbox:h,label:o}=await c(t,e,f(e)),g=Math.max(h.width+(e.padding??0)*2,e?.width??0),u=Math.max(h.height+(e.padding??0)*2,e?.height??0),{cssStyles:w}=e,p=d.Z.svg(n),m=(0,i._q)(e,{fill:a.noteBkgColor,stroke:a.noteBorderColor});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let x=p.rectangle(-g/2,-u/2,g,u,m),$=n.insert(()=>x,":first-child");return $.attr("class","basic label-container outer-path"),o.attr("class","label noteLabel"),w&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",w),r&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",r),o.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),y(e,$),e.intersect=function(t){return P.rect(e,t)},n}(0,h.eW)(tW,"linedCylinder"),(0,h.eW)(tv,"linedWaveEdgedRect"),(0,h.eW)(tC,"multiRect"),(0,h.eW)(tN,"multiWaveEdgedRectangle"),(0,h.eW)(tB,"note");var tA=(0,h.eW)((t,e,a)=>`M${t+a/2},${e} L${t+a},${e-a/2} L${t+a/2},${e-a} L${t},${e-a/2} Z`,"createDecisionBoxPathD");async function t_(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.width+(e.padding??0)+(s.height+(e.padding??0)),o=[{x:h/2,y:0},{x:h,y:-h/2},{x:h/2,y:-h},{x:0,y:-h/2}],{cssStyles:g}=e;
2if("handDrawn"===e.look){let t=d.Z.svg(n),l=(0,i._q)(e,{}),r=tA(0,0,h),s=t.path(r,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2+.5}, ${h/2})`),g&&a.attr("style",g)}else(a=G(n,h,h,o)).attr("transform",`translate(${-h/2+.5}, ${h/2})`);return r&&a.attr("style",r),y(e,a),e.calcIntersect=function(t,e){let a=t.width,l=P.polygon(t,[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],e);return{x:l.x-.5,y:l.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},n}async function tq(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?21:r??0,s="neo"===e.look?12:r??0,{shapeSvg:h,bbox:o,label:g}=await c(t,e,f(e)),w=(e?.width??o.width)+("neo"===e.look?2*n:n),p=(e?.height??o.height)+("neo"===e.look?2*s:s),m=-w/2,x=-p/2,$=x/2,b=[{x:m+$,y:x},{x:m,y:0},{x:m+$,y:-x},{x:-m,y:-x},{x:-m,y:x}],{cssStyles:k}=e,M=d.Z.svg(h),S=(0,i._q)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let D=u(b),W=M.path(D,S),v=h.insert(()=>W,":first-child");return v.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",k),l&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",l),v.attr("transform",`translate(${-$/2},0)`),g.attr("transform",`translate(${-$/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),y(e,v),e.intersect=function(t){return P.polygon(e,b,t)},h}async function tR(t,e){let a,l,r;let{labelStyles:n,nodeStyles:c}=(0,i.UG)(e);e.labelStyle=n,a=e.cssClasses?"node "+e.cssClasses:"node default";let g=t.insert("g").attr("class",a).attr("id",e.domId||e.id),f=g.insert("g"),u=g.insert("g").attr("class","label").attr("style",c),w=e.description,p=e.label,m=await $(u,p,e.labelStyle,!0,!0),x={width:0,height:0};if((0,s._X)((0,s.nV)())){let t=m.children[0],e=(0,o.Ys)(m);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}h.cM.info("Text 2",w);let k=w||[],M=m.getBBox(),S=await $(u,Array.isArray(k)?k.join("<br/>"):k,e.labelStyle,!0,!0),D=S.children[0],W=(0,o.Ys)(S);x=D.getBoundingClientRect(),W.attr("width",x.width),W.attr("height",x.height);let v=(e.padding||0)/2;(0,o.Ys)(S).attr("transform","translate( "+(x.width>M.width?0:(M.width-x.width)/2)+", "+(M.height+v+5)+")"),(0,o.Ys)(m).attr("transform","translate( "+(x.width<M.width?0:-(M.width-x.width)/2)+", 0)"),x=u.node().getBBox(),u.attr("transform","translate("+-x.width/2+", "+(-x.height/2-v+3)+")");let C=x.width+(e.padding||0),N=x.height+(e.padding||0),B=-x.width/2-v,A=-x.height/2-v;if("handDrawn"===e.look){let t=d.Z.svg(g),a=(0,i._q)(e,{}),n=t.path(b(B,A,C,N,e.rx||0),a),s=t.line(-x.width/2-v,-x.height/2-v+M.height+v,x.width/2+v,-x.height/2-v+M.height+v,a);r=g.insert(()=>(h.cM.debug("Rough node insert CXC",n),s),":first-child"),l=g.insert(()=>(h.cM.debug("Rough node insert CXC",n),n),":first-child")}else l=f.insert("rect",":first-child"),r=f.insert("line"),l.attr("class","outer title-state").attr("style",c).attr("x",-x.width/2-v).attr("y",-x.height/2-v).attr("width",x.width+(e.padding||0)).attr("height",x.height+(e.padding||0)),r.attr("class","divider").attr("x1",-x.width/2-v).attr("x2",x.width/2+v).attr("y1",-x.height/2-v+M.height+v).attr("y2",-x.height/2-v+M.height+v);return y(e,l),e.intersect=function(t){return P.rect(e,t)},g}async function tP(t,e,{config:{themeVariables:a}}){let l=a?.radius??5,i={rx:l,ry:l,classes:"",labelPaddingX:(e?.padding??0)*1,labelPaddingY:(e?.padding??0)*1};return tm(t,e,i)}async function tI(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0,{shapeSvg:h,bbox:o,label:g}=await c(t,e,f(e)),u=(e?.width??o.width)+2*r+("neo"===e.look?8:16),w=(e?.height??o.height)+2*s,p=u-8,m=8-u/2,x=-w/2,{cssStyles:$}=e,b=d.Z.svg(h),k=(0,i._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=b.polygon([{x:m,y:x},{x:m+p,y:x},{x:m+p,y:x+w},{x:m-8,y:x+w},{x:m-8,y:x},{x:m,y:x},{x:m,y:x+w}].map(t=>[t.x,t.y]),k),S=h.insert(()=>M,":first-child");return S.attr("class","basic label-container outer-path").attr("style",(0,n.R7)($)),l&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",l),$&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",l),g.attr("transform",`translate(${4-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),y(e,S),e.intersect=function(t){return P.rect(e,t)},h}async function tL(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*n,10),e.height=Math.max((e?.height??0)/1.5-2*s,10));let{shapeSvg:h,bbox:o,label:g}=await c(t,e,f(e)),w=(e?.width?e?.width:o.width)+2*n,p=((e?.height?e?.height:o.height)+2*s)*1.5/1.5,m=-w/2,x=-p/2,{cssStyles:$}=e,b=d.Z.svg(h),k=(0,i._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:m,y:x},{x:m,y:x+p},{x:m+w,y:x+p},{x:m+w,y:x-p/2}],S=u(M),D=b.path(S,k),W=h.insert(()=>D,":first-child");return W.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&W.selectChildren("path").attr("style",$),l&&"handDrawn"!==e.look&&W.selectChildren("path").attr("style",l),W.attr("transform",`translate(0, ${p/4})`),g.attr("transform",`translate(${-w/2+(e.padding??0)-(o.x-(o.left??0))}, ${-p/4+(e.padding??0)-(o.y-(o.top??0))})`),y(e,W),e.intersect=function(t){return P.polygon(e,M,t)},h}async function tZ(t,e){let a=e.padding??0,l="neo"===e.look?16:2*a,i="neo"===e.look?12:a,r={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??l,labelPaddingY:i};return tm(t,e,r)}async function tU(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?20:r,s="neo"===e.look?12:r,{shapeSvg:h,bbox:o}
2=await c(t,e,f(e)),g=o.height+("neo"===e.look?2*s:s),w=o.width+g/4+("neo"===e.look?2*n:n),m=g/2,{cssStyles:x}=e,$=d.Z.svg(h),b=(0,i._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=[{x:-w/2+m,y:-g/2},{x:w/2-m,y:-g/2},...p(-w/2+m,0,m,50,90,270),{x:w/2-m,y:g/2},...p(w/2-m,0,m,50,270,450)],M=u(k),S=$.path(M,b),D=h.insert(()=>S,":first-child");return D.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",l),y(e,D),e.intersect=function(t){return P.polygon(e,k,t)},h}async function tG(t,e){let a={rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5,classes:"flowchart-node"};return tm(t,e,a)}function tT(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let{cssStyles:n}=e,{lineColor:s,stateBorder:h,nodeBorder:o,nodeShadow:c}=a;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);let g=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),f=d.Z.svg(g),u=(0,i._q)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let w=f.circle(0,0,e.width,{...u,stroke:s,strokeWidth:2}),p=h??o,m=(e.width??0)*5/14,x=f.circle(0,0,m,{...u,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),$=g.insert(()=>w,":first-child");if($.insert(()=>x),"handDrawn"!==e.look&&$.attr("class","outer-path"),n&&$.selectAll("path").attr("style",n),r&&$.selectAll("path").attr("style",r),e.width<25&&c&&"handDrawn"!==e.look){let e=t.node()?.ownerSVGElement?.id??"",a=e?`${e}-drop-shadow-small`:"drop-shadow-small";$.attr("style",`filter:url(#${a})`)}return y(e,$),e.intersect=function(t){return P.circle(e,(e.width??0)/2,t)},g}function tE(t,e,{config:{themeVariables:a}}){let l;let{lineColor:r,nodeShadow:n}=a;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.
2width||(e.width=14),e.height||(e.height=14);let s=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);if("handDrawn"===e.look){let t=d.Z.svg(s).circle(0,0,e.width,(0,i.TA)(r));(l=s.insert(()=>t)).attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else(l=s.insert("circle",":first-child")).attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&n&&"handDrawn"!==e.look){let e=t.node()?.ownerSVGElement?.id??"",a=e?`${e}-drop-shadow-small`:"drop-shadow-small";l.attr("style",`filter:url(#${a})`)}return y(e,l),e.intersect=function(t){return P.circle(e,(e.width??7)/2,t)},s}async function tH(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e?.padding??8,s="neo"===e.look?28:r,h="neo"===e.look?12:r,{shapeSvg:o,bbox:g}=await c(t,e,f(e)),u=(e?.width??g.width)+16+s,w=(e?.height??g.height)+h,p=u-16,m=-u/2,x=-w/2,$=[{x:0,y:0},{x:p,y:0},{x:p,y:-w},{x:0,y:-w},{x:0,y:0},{x:-8,y:0},{x:p+8,y:0},{x:p+8,y:-w},{x:-8,y:-w},{x:-8,y:0}];if("handDrawn"===e.look){let t=d.Z.svg(o),a=(0,i._q)(e,{}),l=t.rectangle(m,x,p+16,w,a),r=t.line(m+8,x,m+8,x+w,a),s=t.line(m+8+p,x,m+8+p,x+w,a);o.insert(()=>r,":first-child"),o.insert(()=>s,":first-child");let h=o.insert(()=>l,":first-child"),{cssStyles:c}=e;h.attr("class","basic label-container").attr("style",(0,n.R7)(c)),y(e,h)}else{let t=G(o,p,w,$);l&&t.attr("style",l),y(e,t)}return e.intersect=function(t){return P.polygon(e,$,t)},o}async function tV(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;(e.width||e.height)&&(e.height=Math.max((e?.height??0)-2*s,10),e.width=Math.max((e?.width??0)-2*n-.2*(e.height+2*s),10));let{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=(e?.height?e?.height:o.height)+2*s,w=.2*g,p=(e?.width?e?.width:o.width)+2*n+w-w,m=-p/2,x=-g/2,{cssStyles:$}=e,b=d.Z.svg(h),k=(0,i._q)(e,{}),M=[{x:m-w/2,y:x},{x:m+p+w/2,y:x},{x:m+p+w/2,y:x+g},{x:m-w/2,y:x+g}];"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let S=u(M),D=b.path(S,k),W=u([{x:m+p-w/2,y:x+g},{x:m+p+w/2,y:x+g},{x:m+p+w/2,y:x+g-.2*g}]),v=b.path(W,{...k,fillStyle:"solid"}),C=h.insert(()=>v,":first-child");return C.insert(()=>D,":first-child"),C.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",$),l&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",l),y(e,C),e.intersect=function(t){return P.polygon(e,M,t)},h}async function tX(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/8,p=.2*h,m=.2*o,x=o+g,{cssStyles:$}=e,b=d.Z.svg(r),k=(0,i._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-h/2-h/2*.1,y:x/2},...w(-h/2-h/2*.1,x/2,h/2+h/2*.1,x/2,g,.8),{x:h/2+h/2*.1,y:-x/2},{x:-h/2-h/2*.1,y:-x/2}],S=-h/2+h/2*.1,D=-x/2-.4*m,W=[{x:S+h-p,y:(D+o)*1.3},{x:S+h,y:D+o-m},{x:S+h,y:(D+o)*.9}
2,...w(S+h,(D+o)*1.25,S+h-p,(D+o)*1.3,-(.02*o),.5)],v=u(M),C=b.path(v,k),N=u(W),B=b.path(N,{...k,fillStyle:"solid"}),A=r.insert(()=>B,":first-child");return A.insert(()=>C,":first-child"),A.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",$),l&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",l),A.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))},${-o/2+(e.padding??0)-g/2-(n.y-(n.top??0))})`),y(e,A),e.intersect=function(t){return P.polygon(e,M,t)},r}async function tY(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n}=await c(t,e,f(e)),s=Math.max(n.width+(e.padding??0),e?.width||0),h=Math.max(n.height+(e.padding??0),e?.height||0),o=r.insert("rect",":first-child");return o.attr("class","text").attr("style",l).attr("rx",0).attr("ry",0).attr("x",-s/2).attr("y",-h/2).attr("width",s).attr("height",h),y(e,o),e.intersect=function(t){return P.rect(e,t)},r}(0,h.eW)(t_,"question"),(0,h.eW)(tq,"rect_left_inv_arrow"),(0,h.eW)(tR,"rectWithTitle"),(0,h.eW)(tP,"roundedRect"),(0,h.eW)(tI,"shadedProcess"),(0,h.eW)(tL,"slopedRect"),(0,h.eW)(tZ,"squareRect"),(0,h.eW)(tU,"stadium"),(0,h.eW)(tG,"state"),(0,h.eW)(tT,"stateEnd"),(0,h.eW)(tE,"stateStart"),(0,h.eW)(tH,"subroutine"),(0,h.eW)(tV,"taggedRect"),(0,h.eW)(tX,"taggedWaveEdgedRectangle"),(0,h.eW)(tY,"text");var tj=(0,h.eW)((t,e,a,l,i,r)=>`M${t},${e} 3 a${i},${r} 0,0,1 0,${-l} 4 l${a},0 5 a${i},${r} 0,0,1 0,${l} 6 M${a},${-l} 7 a${i},${r} 0,0,0 0,${l} 8 l${-a},0`,"createCylinderPathD"),tO=(0,h.eW)((t,e,a,l,i,r)=>`M${t},${e} M${t+a},${e} a${i},${r} 0,0,0 0,${-l} l${-a},0 a${i},${r} 0,0,0 0,${l} l${a},0`,"createOuterCylinderPathD"),tF=(0,h.eW)((t,e,a,l,i,r)=>`M${t+a/2},${-l/2} a${i},${r} 0,0,0 0,${l}`,"createInnerCylinderPathD");async function tz(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let s=e.padding??0,h="neo"===e.look?12:s/2;if(e.width||e.height){let t=e.height??0;e.height=(e.height??0)-h,e.height<5&&(e.height=5),e.width=(e.width??0)-h-t/2/(2.5+t/50)*3,e.width<10&&(e.width=10)}let{shapeSvg:o,bbox:g,label:u}=await c(t,e,f(e)),w=(e.height?e.height:g.height)+h,p=w/2,m=p/(2.5+w/50),x=(e.width?e.width:g.width)+m+h,{cssStyles:$}=e;
8if("handDrawn"===e.look){let t=d.Z.svg(o),l=tO(0,0,x,w,m,p),r=tF(0,0,x,w,m,p),n=t.path(l,(0,i._q)(e,{})),s=t.path(r,(0,i._q)(e,{fill:"none"}));a=o.insert(()=>s,":first-child"),(a=o.insert(()=>n,":first-child")).attr("class","basic label-container"),$&&a.attr("style",$)}else{let t=tj(0,0,x,w,m,p);(a=o.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.R7)($)).attr("style",r)).attr("class","basic label-container outer-path"),$&&a.selectAll("path").attr("style",$),r&&a.selectAll("path").attr("style",r)}return a.attr("label-offset-x",m),a.attr("transform",`translate(${-x/2}, ${w/2} )`),u.attr("transform",`translate(${-(g.width/2)-m-(g.x-(g.left??0))}, ${-(g.height/2)-(g.y-(g.top??0))})`),y(e,a),e.intersect=function(t){let a=P.rect(e,t),l=a.y-(e.y??0);if(0!=p&&(Math.abs(l)<(e.height??0)/2||Math.abs(l)==(e.height??0)/2&&Math.abs(a.x-(e.x??0))>(e.width??0)/2-m)){let i=m*m*(1-l*l/(p*p));0!=i&&(i=Math.sqrt(Math.abs(i))),i=m-i,t.x-(e.x??0)>0&&(i=-i),a.x+=i}return a},o}async function tJ(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let n=e.padding??0,s=(e.look,n),h="neo"===e.look?2*n:n,{shapeSvg:o,bbox:g}=await c(t,e,f(e)),w=(e?.height??g.height)+s,p=(e?.width??g.width)+h,m=[{x:-3*w/6,y:0},{x:p+3*w/6,y:0},{x:p,y:-w},{x:0,y:-w}],{cssStyles:x}=e;if("handDrawn"===e.look){let t=d.Z.svg(o),l=(0,i._q)(e,{}),r=u(m),n=t.path(r,l);a=o.insert(()=>n,":first-child").attr("transform",`translate(${-p/2}, ${w/2})`),x&&a.attr("style",x)}else a=G(o,p,w,m);return r&&a.attr("style",r),e.width=p,e.height=w,y(e,a),e.intersect=function(t){return P.polygon(e,m,t)},o}async function tK(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;(e.width||e.height)&&(e.height=(e.height??0)-2*s,e.height<5&&(e.height=5),e.width=(e.width??0)-2*n,e.width<15&&(e.width=15));let{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=(e?.width?e?.width:o.width)+2*n,w=(e?.height?e?.height:o.height)+2*s,{cssStyles:p}=e,m=d.Z.svg(h),x=(0,i._q)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let $=[{x:-g/2*.8,y:-w/2},{x:g/2*.8,y:-w/2},{x:g/2,y:-w/2*.6},{x:g/2,y:w/2},{x:-g/2,y:w/2},{x:-g/2,y:-w/2*.6}],b=u($),k=m.path(b,x),M=h.insert(()=>k,":first-child");return M.attr("class","basic label-container outer-path"),p&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",p),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),y(e,M),e.intersect=function(t){return P.polygon(e,$,t)},h}async function tQ(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?2*r:r;(e.width||e.height)&&(e.width=((e?.width??0)-n)/2,e.width<10&&(e.width=10),e.height=e?.height??0,e.height<10&&(e.height=10));let{shapeSvg:o,bbox:g,label:w}=await c(t,e,f(e)),p=(0,s.ku)(s.nV().flowchart?.htmlLabels),m=(e?.width?e?.width:g.width)+n,x=e?.height?e?.height:m+g.height,$=[{x:0,y:0},{x:x,y:0},{x:x/2,y:-x}],{cssStyles:b}=e,k=d.Z.svg(o),M=(0,i._q)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let S=u($),D=k.path(S,M),W=o.insert(()=>D,":first-child").attr("transform",`translate(${-x/2}, ${x/2})`).attr("class","outer-path");return b&&"handDrawn"!==e.look&&W.selectChildren("path").attr("style",b),l&&"handDrawn"!==e.look&&W.selectChildren("path").attr("style",l),e.width=m,e.height=x,y(e,W),w.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))}, ${x/2-(g.height+(e.padding??0)/(p?2:1)-(g.y-(g.top??0)))})`),e.intersect=function(t){return h.cM.info("Triangle intersect",e,$,t),P.polygon(e,$,t)},o}async function t0(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,h=!0;(e.width||e.height)&&(h=!1,e.width=(e?.width??0)-2*n,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10));let{shapeSvg:o,bbox:g,label:p}=await c(t,e,f(e)),m=(e?.width?e?.width:g.width)+(n??0)*2,x=(e?.height?e?.height:g.height)+(s??0)*2,$="neo"===e.look?x/4:x/8,b=x+(h?$:-$),{cssStyles:k}=e,M=14-m,S=M>0?M/2:0,D=d.Z.svg(o),W=(0,i._q)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let v=[{x:-m/2-S,y:b/2},...w(-m/2-S,b/2,m/2+S,b/2,$,.8),{x:m/2+S,y:-b/2},{x:-m/2-S,y:-b/2}],C=u(v),N=D.path(C,W),B=o.insert(()=>N,":first-child");return B.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",k),l&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",l),B.attr("transform",`translate(0,${-$/2})`),p.attr("transform",`translate(${-m/2+(e.padding??0)-(g.x-(g.left??0))},${-x/2+(e.padding??0)-$-(g.y-(g.top??0))})`),y(e,B),e.intersect=function(t){return P.polygon(e,v,t)},o}async function t2(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?20:r;if(e.width||e.height){e.width=e?.width??0,e.width<20&&(e.width=20),e.height=e?.height??0,e.height<10&&(e.height=10);let t=Math.min(.2*e.height,e.height/4);e.height=Math.ceil(e.height-s-20/9*t),e.width=e.width-2*n}let{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=(e?.width?e?.width:o.width)+2*n,p=(e?.height?e?.height:o.height)+s,m=p/8,x=p+2*m,{cssStyles:$}=e,b=d.Z.svg(h),k=(0,i._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-g/2,y:x/2},...w(-g/2,x/2,g/2,x/2,m,1),{x:g/2,y:-x/2},...w(g/2,-x/2,-g/2,-x/2,m,-1)],S=u(M),D=b.path(S,k),W=h.insert(()=>D,":first-child");return W.attr("class","basic label-container"),$&&"handDrawn"!==e.look&&W.selectAll("path").attr("style",$),l&&"handDrawn"!==e.look&&W.selectAll("path").attr("style",l),y(e,W),e.intersect=function(t){return P.polygon(e,M,t)},h}async function t1(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r="neo"===e.look?16:e.padding??0,n="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*r-10,10),e.height=Math.max((e?.height??0)-2*n-10,10));let{shapeSvg:s,bbox:h,label:o}=await c(t,e,f(e)),g=(e?.width?e?.width:h.width)+2*r+10,u=(e?.height?e?.height:h.height)+2*n+10,w=g-10,p=u-10,m=-w/2,x=-p/2,{cssStyles:$}=e,b=d.Z.svg(s),k=(0,i._q)(e,{}),M=[{x:m-10,y:x-10},{x:m-10,y:x+p},{x:m+w,y:x+p},{x:m+w,y:x-10}],S=`M${m-10},${x-10} L${m+w},${x-10} L${m+w},${x+p} L${m-10},${x+p} L${m-10},${x-10} 9 M${m-10},${x} L${m+w},${x} 10 M${m},${x-10} L${m},${x+p}`;"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let D=b.path(S,k),W=s.insert(()=>D,":first-child");return W.attr("transform","translate(5, 5)"),W.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&W.selectAll("path").attr("style",$),l&&"handDrawn"!==e.look&&W.selectAll("path").attr("style",l),o.attr("transform",`translate(${-(h.width/2)+5-(h.x-(h.left??0))}, ${-(h.height/2)+5-(h.y-(h.top??0))})`),y(e,W),e.intersect=function(t){return P.polygon(e,M,t)},s}(0,h.eW)(tz,"tiltedCylinder"),(0,h.eW)(tJ,"trapezoid"),(0,h.eW)(tK,"trapezoidalPentagon"),(0,h.eW)(tQ,"triangle"),(0,h.eW)(t0,"waveEdgedRectangle"),(0,h.eW)(t2,"waveRectangle"),(0,h.eW)(t1,"windowPane");var t5=new Set(["redux-color","redux-dark-color"]),t8=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function t4(t,e){e.alias&&(e.label=e.alias);let{theme:a,themeVariables:l}=(0,s.iE)(),{rowEven:r,rowOdd:h,nodeBorder:c,borderColorArray:g}=l;
10if("handDrawn"===e.look){let{themeVariables:a}=(0,s.iE)(),{background:l}=a,i={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${l}`]};await t4(t,i)}let u=(0,s.iE)();e.useHtmlLabels=u.htmlLabels;let w=u.er?.diagramPadding??10,p=u.er?.entityPadding??6,{cssStyles:m}=e,{labelStyles:x,nodeStyles:$}=(0,i.UG)(e);if(0===e.attributes.length&&e.label){let l={rx:0,ry:0,labelPaddingX:w,labelPaddingY:1.5*w,classes:""};(0,n.Cq)(e.label,u)+2*l.labelPaddingX<u.er.minEntityWidth&&(e.width=u.er.minEntityWidth);let i=await tm(t,e,l);if(null!=a&&t5.has(a)){let t=e.colorIndex??0;i.attr("data-color-id",`color-${t%g.length}`)}if(!(0,s.ku)(u.htmlLabels)){let t=i.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return i}u.htmlLabels||(w*=1.25,p*=1.25);let b=f(e);b||(b="node default");let k=t.insert("g").attr("class",b).attr("id",e.domId||e.id),M=await t3(k,e.label??"",u,0,0,["name"],x);M.height+=p;let S=0,D=[],W=[],v=0,C=0,N=0,B=0,A=!0,_=!0;for(let t of e.attributes){let e=await t3(k,t.type,u,0,S,["attribute-type"],x);v=Math.max(v,e.width+w);let a=await t3(k,t.name,u,0,S,["attribute-name"],x);C=Math.max(C,a.width+w);let l=await t3(k,t.keys.join(),u,0,S,["attribute-keys"],x);N=Math.max(N,l.width+w);let i=await t3(k,t.comment,u,0,S,["attribute-comment"],x);B=Math.max(B,i.width+w);let r=Math.max(e.height,a.height,l.height,i.height)+p;W.push({yOffset:S,rowHeight:r}),S+=r}let q=4;N<=w&&(A=!1,N=0,q--),B<=w&&(_=!1,B=0,q--);let R=k.node().getBBox();if(M.width+2*w-(v+C+N+B)>0){let t=M.width+2*w-(v+C+N+B);v+=t/q,C+=t/q,N>0&&(N+=t/q),B>0&&(B+=t/q)}let I=v+C+N+B,L=d.Z.svg(k),Z=(0,i._q)(e,{});"handDrawn"!==e.look&&(Z.roughness=0,Z.fillStyle="solid");let U=0;W.length>0&&(U=W.reduce((t,e)=>t+(e?.rowHeight??0),0));let G=Math.max(R.width+2*w,e?.width||0,I),T=Math.max((U??0)+M.height,e?.height||0),E=-G/2,H=-T/2;if(k.selectAll("g:not(:first-child)").each((t,e,a)=>{let l=(0,o.Ys)(a[e]),i=l.attr("transform"),r=0,n=0;if(i){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);t&&(r=parseFloat(t[1]),n=parseFloat(t[2]),l.attr("class").includes("attribute-name")?r+=v:l.attr("class").includes("attribute-keys")?r+=v+C:l.attr("class").includes("attribute-comment")&&(r+=v+C+N))}l.attr("transform",`translate(${E+w/2+r}, ${n+H+M.height+p/2})`)}),k.select(".name").attr("transform","translate("+-M.width/2+", "+(H+p/2)+")"),null!=a&&t5.has(a)){let t=e.colorIndex??0;k.attr("data-color-id",`color-${t%g.length}`)}let V=L.rectangle(E,H,G,T,Z),X=k.insert(()=>V,":first-child").attr("class","outer-path").attr("style",m.join(""));for(let[t,e]of(D.push(0),W.entries())){let a=(t+1)%2==0&&0!==e.yOffset,l=L.rectangle(E,M.height+H+e?.yOffset,G,e?.rowHeight,{...Z,fill:a?r:h,stroke:c});k.insert(()=>l,"g.label").attr("style",m.join("")).attr("class",`row-rect-${a?"even":"odd"}`)}let Y=t7(E,M.height+H,G+E,M.height+H,1e-4),j=L.polygon(Y.map(t=>[t.x,t.y]),Z);if(k.insert(()=>j).attr("class","divider"),Y=t7(v+E,M.height+H,v+E,T+H,1e-4),j=L.polygon(Y.map(t=>[t.x,t.y]),Z),k.insert(()=>j).attr("class","divider"),A){let t=v+C+E;Y=t7(t,M.height+H,t,T+H,1e-4),j=L.polygon(Y.map(t=>[t.x,t.y]),Z),k.insert(()=>j).attr("class","divider")}if(_){let t=v+C+N+E;Y=t7(t,M.height+H,t,T+H,1e-4),j=L.polygon(Y.map(t=>[t.x,t.y]),Z),k.insert(()=>j).attr("class","divider")}for(let t of D){let e=M.height+H+t;Y=t7(E,e,G+E,e,1e-4),j=L.polygon(Y.map(t=>[t.x,t.y]),Z),k.insert(()=>j).attr("class","divider")}if(y(e,X),$&&"handDrawn"!==e.look){if(null!=a&&t8.has(a))k.selectAll("path").attr("style",$);else{let t=$.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");k.selectAll("path").attr("style",e??""),k.selectAll(".row-rect-even path").attr("style",$)}}return e.intersect=function(t){return P.rect(e,t)},k}async function t3(t,e,a,l=0,i=0,h=[],d=""){let c=t.insert("g").attr("class",`label ${h.join(" ")}`).attr("transform",`translate(${l}, ${i})`).attr("style",d);e!==(0,s.UO)(e)&&(e=(e=(0,s.UO)(e)).replaceAll("<","<").replaceAll(">",">"));let g=c.node().appendChild(await (0,r.rw)(c,e,{width:(0,n.Cq)(e,a)+100,style:d,useHtmlLabels:a.htmlLabels},a));if(e.includes("<")||e.includes(">")){let t=g.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)(t=t.childNodes[0]).textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let y=g.getBBox();
10if((0,s.ku)(a.htmlLabels)){let t=g.children[0];t.style.textAlign="start";let e=(0,o.Ys)(g);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return y}function t7(t,e,a,l,i){return t===a?[{x:t-i/2,y:e},{x:t+i/2,y:e},{x:a+i/2,y:l},{x:a-i/2,y:l}]:[{x:t,y:e-i/2},{x:t,y:e+i/2},{x:a,y:l+i/2},{x:a,y:l-i/2}]}async function t6(t,e,a,l,i=a.class.padding??12){let r=l?0:3,n=t.insert("g").attr("class",f(e)).attr("id",e.domId||e.id),s=null,h=null,o=null,d=null,c=0,g=0,y=0;if(s=n.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let t=e.annotations[0];await t9(s,{text:`\xab${t}\xbb`},0),c=s.node().getBBox().height}h=n.insert("g").attr("class","label-group text"),await t9(h,e,0,["font-weight: bolder"]);let u=h.node().getBBox();g=u.height,o=n.insert("g").attr("class","members-group text");let w=0;for(let t of e.members){let e=await t9(o,t,w,[t.parseClassifier()]);w+=e+r}(y=o.node().getBBox().height)<=0&&(y=i/2),d=n.insert("g").attr("class","methods-group text");let p=0;for(let t of e.methods){let e=await t9(d,t,p,[t.parseClassifier()]);p+=e+r}let m=n.node().getBBox();if(null!==s){let t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return h.attr("transform",`translate(${-u.width/2}, ${c})`),m=n.node().getBBox(),o.attr("transform",`translate(0, ${c+g+2*i})`),m=n.node().getBBox(),d.attr("transform",`translate(0, ${c+g+(y?y+4*i:2*i)})`),m=n.node().getBBox(),{shapeSvg:n,bbox:m}}async function t9(t,e,a,l=[]){let i;let d=t.insert("g").attr("class","label").attr("style",l.join("; ")),c=(0,s.iE)(),g="useHtmlLabels"in e?e.useHtmlLabels:(0,s.ku)(c.htmlLabels)??!0,y="";y="text"in e?e.text:e.label,!g&&y.startsWith("\\")&&(y=y.substring(1)),(0,s.l0)(y)&&(g=!0);let f=await (0,r.rw)(d,(0,s.uX)((0,n.SH)(y)),{width:(0,n.Cq)(y,c)+50,classes:"markdown-node-label",useHtmlLabels:g},c),u=1;if(g){let t=f.children[0],e=(0,o.Ys)(f);u=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(u+=t.innerHTML.split("<mrow>").length-1);let a=t.getElementsByTagName("img");if(a){let t=""===y.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map(e=>new Promise(a=>{function l(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=5*parseInt(c.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,10)+"px";e.style.minWidth=t,e.style.maxWidth=t}else e.style.width="100%";a(e)}(0,h.eW)(l,"setupImage"),setTimeout(()=>{e.complete&&l()}),e.addEventListener("error",l),e.addEventListener("load",l)})))}i=t.getBoundingClientRect(),e.attr("width",i.width),e.attr("height",i.height)}else{l.includes("font-weight: bolder")&&(0,o.Ys)(f).selectAll("tspan").attr("font-weight",""),u=f.children.length;let t=f.children[0];(""===f.textContent||f.textContent.includes(">"))&&(t.textContent=y[0]+y.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "===y[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))),"undefined"===t.textContent&&(t.textContent=""),i=f.getBBox()}return d.attr("transform","translate(0,"+(-i.height/(2*u)+a)+")"),i.height}async function et(t,e){let a=(0,s.nV)(),{themeVariables:l}=a,{useGradient:r}=l,n=a.class.padding??12,h=e.useHtmlLabels??(0,s.ku)(a.htmlLabels)??!0;e.annotations=e.annotations??[],e.members=e.members??[],e.methods=e.methods??[];let{shapeSvg:c,bbox:g}=await t6(t,e,a,h,n),{labelStyles:f,nodeStyles:u}=(0,i.UG)(e);e.labelStyle=f,e.cssStyles=e.styles||"";let w=e.styles?.join(";")||u||"";e.cssStyles||(e.cssStyles=w.replaceAll("!important","").split(";"));let p=0===e.members.length&&0===e.methods.length&&!a.class?.hideEmptyMembersBox,m=d.Z.svg(c),x=(0,i._q)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let $=Math.max(e.width??0,g.width),b=Math.max(e.height??0,g.height),k=(e.height??0)>g.height;0===e.members.length&&0===e.methods.length?b+=n:e.members.length>0&&0===e.methods.length&&(b+=2*n);let M=-$/2,S=-b/2,D=p?2*n:0===e.members.length&&0===e.methods.length?-n:0;k&&(D=2*n);let W=m.rectangle(M-n,S-n-(p?n:0===e.members.length&&0===e.methods.length?-n/2:0),$+2*n,b+2*n+D,x),v=c.insert(()=>W,":first-child");v.attr("class","basic label-container outer-path");let C=v.node().getBBox(),N=c.select(".annotation-group").node().getBBox().height-(p?n/2:0)||0,B=c.select(".label-group").node().getBBox().height-(p?n/2:0)||0,A=c.select(".members-group").node().getBBox().height-(p?n/2:0)||0,_=(N+B+S+n-(S-n-(p?n:0===e.members.length&&0===e.methods.length?-n/2:0))
10)/2;if(c.selectAll(".text").each((t,l,i)=>{let r=(0,o.Ys)(i[l]),s=r.attr("transform"),d=0;if(s){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(s);t&&(d=parseFloat(t[2]))}let g=d+S+n-(p?n:0===e.members.length&&0===e.methods.length?-n/2:0);if(r.attr("class").includes("methods-group")){let t=Math.max(A,n/2);g=k?Math.max(_,N+B+t+S+2*n+n)+2*n:N+B+t+S+4*n+n}0===e.members.length&&0===e.methods.length&&a.class?.hideEmptyMembersBox&&(g=e.annotations.length>0?d-n:d),h||(g-=4);let y=M;(r.attr("class").includes("label-group")||r.attr("class").includes("annotation-group"))&&(y=-r.node()?.getBBox().width/2||0,c.selectAll("text").each(function(t,e,a){"middle"===window.getComputedStyle(a[e]).textAnchor&&(y=0)})),r.attr("transform",`translate(${y}, ${g})`)}),e.members.length>0||e.methods.length>0||p){let t=N+B+S+n,a=m.line(C.x,t,C.x+C.width,t+.001,x);c.insert(()=>a).attr("class",`divider${"neo"!==e.look||r?"":" neo-line"}`).attr("style",w)}if(p||e.members.length>0||e.methods.length>0){let t=N+B+A+S+2*n+n,a=m.line(C.x,k?Math.max(_,t):t,C.x+C.width,(k?Math.max(_,t):t)+.001,x);c.insert(()=>a).attr("class",`divider${"neo"!==e.look||r?"":" neo-line"}`).attr("style",w)}if("handDrawn"!==e.look&&c.selectAll("path").attr("style",w),v.select(":nth-child(2)").attr("style",w),c.selectAll(".divider").select("path").attr("style",w),e.labelStyle?c.selectAll("span").attr("style",e.labelStyle):c.selectAll("span").attr("style",w),!h){let t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(w);if(e){let t=e[0].replace("color","fill");c.selectAll("tspan").attr("style",t)}else if(f){let e=t.exec(f);if(e){let t=e[0].replace("color","fill");c.selectAll("tspan").attr("style",t)}}}return y(e,v),e.intersect=function(t){return P.rect(e,t)},c}async function ee(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let n="verifyMethod"in e,h=f(e),{themeVariables:c}=(0,s.nV)(),{borderColorArray:g,requirementEdgeLabelBackground:u}=c,w=t.insert("g").attr("class",h).attr("id",e.domId??e.id),p=a=n?await ea(w,`<<${e.type}>>`,0,e.labelStyle):await ea(w,"<<Element>>",0,e.labelStyle),m=await ea(w,e.name,p,e.labelStyle+"; font-weight: bold;");if(p+=m+20,n){let t=await ea(w,`${e.requirementId?`ID: ${e.requirementId}`:""}`,p,e.labelStyle);p+=t;let a=await ea(w,`${e.text?`Text: ${e.text}`:""}`,p,e.labelStyle);p+=a;let l=await ea(w,`${e.risk?`Risk: ${e.risk}`:""}`,p,e.labelStyle);p+=l,await ea(w,`${e.verifyMethod?`Verification: ${e.verifyMethod}`:""}`,p,e.labelStyle)}else{let t=await ea(w,`${e.type?`Type: ${e.type}`:""}`,p,e.labelStyle);p+=t,await ea(w,`${e.docRef?`Doc Ref: ${e.docRef}`:""}`,p,e.labelStyle)}let x=(w.node()?.getBBox().width??200)+20,$=(w.node()?.getBBox().height??200)+20,b=-x/2,k=-$/2,M=d.Z.svg(w),S=(0,i._q)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let D=M.rectangle(b,k,x,$,S),W=w.insert(()=>D,":first-child");if(W.attr("class","basic label-container outer-path").attr("style",r),g?.length){let t=e.colorIndex??0;w.attr("data-color-id",`color-${t%g.length}`)}if(w.selectAll(".label").each((t,e,a)=>{let l=(0,o.Ys)(a[e]),i=l.attr("transform"),r=0,n=0;if(i){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);t&&(r=parseFloat(t[1]),n=parseFloat(t[2]))}let s=n-$/2,h=b+10;(0===e||1===e)&&(h=r),l.attr("transform",`translate(${h}, ${s+20})`)}),p>a+m+20){let t;let l=k+a+m+20;if("neo"===e.look){let e=[[b,l],[b+x,l],[b+x,l+.001],[b,l+.001]];t=M.polygon(e,S)}else t=M.line(b,l,b+x,l,S);w.insert(()=>t).attr("class","divider")}return y(e,W),e.intersect=function(t){return P.rect(e,t)},r&&"handDrawn"!==e.look&&(u||g?.length)&&w.selectAll("path").attr("style",r),w}async function ea(t,e,a,l=""){let i;if(""===e)return 0;let h=t.insert("g").attr("class","label").attr("style",l),d=(0,s.nV)(),c=d.htmlLabels??!0,g=await (0,r.rw)(h,(0,s.uX)((0,n.SH)(e)),{width:(0,n.Cq)(e,d)+50,classes:"markdown-node-label",useHtmlLabels:c,style:l},d);if(c){let t=g.children[0],e=(0,o.Ys)(g);i=t.getBoundingClientRect(),e.attr("width",i.width),e.attr("height",i.height)}else{for(let t of g.children[0].children)l&&t.setAttribute("style",l);i=g.getBBox(),i.height+=6}return h.attr("transform",`translate(${-i.width/2},${-i.height/2+a})`),i.height}(0,h.eW)(t4,"erBox"),(0,h.eW)(t3,"addText"),(0,h.eW)(t7,"lineToPolygon"),(0,h.eW)(t6,"textHelper"),(0,h.eW)(t9,"addText"),(0,h.eW)(et,"classBox"),(0,h.eW)(ee,"requirementBox"),(0,h.eW)(ea,"addText");var el=(0,h.eW)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function ei(t,e,{config:a}){let l,r,n,s;let{labelStyles:h,nodeStyles:o}=(0,i.UG)(e);e.labelStyle=h||"";let u=e.width;e.width=(e.width??200)-10;let{shapeSvg:w,bbox:p,label:m}=await c(t,e,f(e)),x=e.padding||10,$="";"ticket"in e&&e.ticket&&a?.kanban?.ticketBaseUrl&&($=a?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),l=w.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",$).attr("target","_blank"));let k={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};l?{label:r,bbox:n}=await g(l,"ticket"in e&&e.ticket||"",k):{label:r,bbox:n}=await g(w,"ticket"in e&&e.ticket||"",k);let{label:M,bbox:S}=await g(w,"assigned"in e&&e.assigned||"",k);e.width=u;let D=e?.width||0,W=Math.max(n.height,S.height)/2,v=Math.max(p.height+20,e?.height||0)+W,C=-D/2,N=-v/2;m.attr("transform","translate("+(x-D/2)+", "+(-W-p.height/2)+")"),r.attr("transform","translate("+(x-D/2)+", "+(-W+p.height/2)+")"),M.attr("transform","translate("+(x+D/2-S.width-20)+", "+(-W+p.height/2)+")");let{rx:B,ry:A}=e,{cssStyles:_}=e;
10if("handDrawn"===e.look){let t=d.Z.svg(w),a=(0,i._q)(e,{}),l=B||A?t.path(b(C,N,D,v,B||0),a):t.rectangle(C,N,D,v,a);(s=w.insert(()=>l,":first-child")).attr("class","basic label-container").attr("style",_||null)}else{(s=w.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",o).attr("rx",B??5).attr("ry",A??5).attr("x",C).attr("y",N).attr("width",D).attr("height",v);let t="priority"in e&&e.priority;if(t){let e=w.append("line"),a=C+2,l=N+Math.floor((B??0)/2),i=N+v-Math.floor((B??0)/2);e.attr("x1",a).attr("y1",l).attr("x2",a).attr("y2",i).attr("stroke-width","4").attr("stroke",el(t))}}return y(e,s),e.height=v,e.intersect=function(t){return P.rect(e,t)},w}async function er(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let{shapeSvg:s,bbox:o,halfPadding:g,label:u}=await c(t,e,f(e)),w=o.width+10*g,p=o.height+8*g,m=.15*w,{cssStyles:x}=e,$=o.width+20,b=o.height+20,k=Math.max(w,$),M=Math.max(p,b);u.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let S=`M0 0 11 a${m},${m} 1 0,0 ${.25*k},${-1*M*.1} 12 a${m},${m} 1 0,0 ${.25*k},0 13 a${m},${m} 1 0,0 ${.25*k},0 14 a${m},${m} 1 0,0 ${.25*k},${.1*M} 15 16 a${m},${m} 1 0,0 ${.15*k},${.33*M} 17 a${.8*m},${.8*m} 1 0,0 0,${.34*M} 18 a${m},${m} 1 0,0 ${-1*k*.15},${.33*M} 19 20 a${m},${m} 1 0,0 ${-1*k*.25},${.15*M} 21 a${m},${m} 1 0,0 ${-1*k*.25},0 22 a${m},${m} 1 0,0 ${-1*k*.25},0 23 a${m},${m} 1 0,0 ${-1*k*.25},${-1*M*.15} 24 25 a${m},${m} 1 0,0 ${-1*k*.1},${-1*M*.33} 26 a${.8*m},${.8*m} 1 0,0 0,${-1*M*.34} 27 a${m},${m} 1 0,0 ${.1*k},${-1*M*.33} 28 H0 V0 Z`;if("handDrawn"===e.look){let t=d.Z.svg(s),l=(0,i._q)(e,{}),r=t.path(S,l);(a=s.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)(x))}else a=s.insert("path",":first-child").attr("class","basic label-container").attr("style",r).attr("d",S);return a.attr("transform",`translate(${-k/2}, ${-M/2})`),y(e,a),e.calcIntersect=function(t,e){return P.rect(t,e)},e.intersect=function(t){return h.cM.info("Bang intersect",e,t),P.rect(e,t)},s}async function en(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let{shapeSvg:s,bbox:o,halfPadding:g,label:u}=await c(t,e,f(e)),w=o.width+2*g,p=o.height+2*g,m=.15*w,x=.25*w,$=.35*w,b=.2*w,{cssStyles:k}=e,M=`M0 0 29 a${m},${m} 0 0,1 ${.25*w},${-1*w*.1} 30 a${$},${$} 1 0,1 ${.4*w},${-1*w*.1} 31 a${x},${x} 1 0,1 ${.35*w},${.2*w} 32 33 a${m},${m} 1 0,1 ${.15*w},${.35*p} 34 a${b},${b} 1 0,1 ${-1*w*.15},${.65*p} 35 36 a${x},${m} 1 0,1 ${-1*w*.25},${.15*w} 37 a${$},${$} 1 0,1 ${-1*w*.5},0 38 a${m},${m} 1 0,1 ${-1*w*.25},${-1*w*.15} 39 40 a${m},${m} 1 0,1 ${-1*w*.1},${-1*p*.35} 41 a${b},${b} 1 0,1 ${.1*w},${-1*p*.65} 42 H0 V0 Z`;if("handDrawn"===e.look){let t=d.Z.svg(s),l=(0,i._q)(e,{}),r=t.path(M,l);(a=s.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)(k))}else a=s.insert("path",":first-child").attr("class","basic label-container").attr("style",r).attr("d",M);return u.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.attr("transform",`translate(${-w/2}, ${-p/2})`),y(e,a),e.calcIntersect=function(t,e){return P.rect(t,e)},e.intersect=function(t){return h.cM.info("Cloud intersect",e,t),P.rect(e,t)},s}async function es(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,halfPadding:s,label:h}=await c(t,e,f(e)),o=n.width+8*s,d=n.height+2*s,g="neo"===e.look?` 43 M${-o/2} ${d/2-5} 44 v${-d+10} 45 q0,-5 5,-5 46 h${o-10} 47 q5,0 5,5 48 v${d-5} 49 H${-o/2} 50 Z 51 `:` 52 M${-o/2} ${d/2-5} 53 v${-d+10} 54 q0,-5 5,-5 55 h${o-10} 56 q5,0 5,5 57 v${d-10} 58 q0,5 -5,5 59 h${-(o-10)} 60 q-5,0 -5,-5 61 Z 62 `;if(!e.domId)throw Error(`defaultMindmapNode: node "${e.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let u=r.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",l).attr("d",g);return r.append("line").attr("class","node-line-").attr("x1",-o/2).attr("y1",d/2).attr("x2",o/2).attr("y2",d/2),h.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),r.append(()=>h.node()),y(e,u),e.calcIntersect=function(t,e){return P.rect(t,e)},e.intersect=function(t){return P.rect(e,t)},r}async function eh(t,e){let a={padding:e.padding??0};return H(t,e,a)}(0,h.eW)(ei,"kanbanItem"),(0,h.eW)(er,"bang"),(0,h.eW)(en,"cloud"),(0,h.eW)(es,"defaultMindmapNode"),(0,h.eW)(eh,"mindmapCircle");var eo=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:tZ},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:tP},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:tU},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","
62subproc","framed-rectangle","subroutine"],handler:tH},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:ta},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:H},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:er},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:en},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:t_},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:td},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:tb},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:t$},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:tJ},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:tp},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:ti},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:tY}
62,{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:T},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:tI},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:tE},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:tT},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ts},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:tc},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:j},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:F},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:J},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:tk}
62,{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:t0},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:th},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:tz},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:tW},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:K},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:tl},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:tQ},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:t1},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:tr},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:tK},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:tn},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:tL},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:tN},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:tC},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:U},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:X},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:tX},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:tV},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:t2},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:tq},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:tv}],ed=(0,h.eW)(()=>Object.fromEntries([...Object.entries({state:tG,choice:E,note:tB,rectWithTitle:tR,labelRect:tx,iconSquare:tu,iconCircle:ty,icon:tg,iconRounded:tf,imageSquare:tw,anchor:I,kanbanItem:ei,mindmapCircle:eh,defaultMindmapNode:es,classBox:et,erBox:t4,requirementBox:ee}),...eo.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))]),"generateShapeMap")();function ec(t){return t in ed}(0,h.eW)(ec,"isValidShape");var eg=new Map;async function ey(t,e,a){let l,i;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let r=e.shape?ed[e.shape]:void 0;if(!r)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let n;"sandbox"===a.config.securityLevel?n="_top":e.linkTarget&&(n=e.linkTarget||"_blank"),l=t.insert("svg:a").attr("xlink:href",e.link).attr("target",n??null),i=await r(l,e,a)}else l=i=await r(t,e,a);return l.attr("data-look",(0,n.R7)(e.look)),e.tooltip&&i.attr("title",e.tooltip),eg.set(e.id,l),e.haveCallback&&l.attr("class",l.attr("class")+" clickable"),l}
62(0,h.eW)(ey,"insertNode");var ef=(0,h.eW)((t,e)=>{eg.set(e.id,t)},"setNodeElem"),eu=(0,h.eW)(()=>{eg.clear()},"clear"),ew=(0,h.eW)(t=>{let e=eg.get(t.id);h.cM.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let a=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+a-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),a},"positionNode")}}]);
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.