code-server
Version:
Run VS Code on a remote server.
63 lines • 106 kB
JavaScript
import{a as v}from"./chunk-KANRR4GQ.js";import{a as Ut,b as Mt,d as L,e as H}from"./chunk-KI4BUBHJ.js";import{b as Bt,d as ft}from"./chunk-GXXPGOGS.js";import{d as Dt}from"./chunk-LB6FF7YJ.js";import{k as Nt,n as Qt,r as St,t as Q}from"./chunk-N5VMO4QT.js";import{H as At,J as It,K as Kt,_ as K,ba as Lt,k as Jt,o as dt,u as bt,y as mt}from"./chunk-5Z3D3SW5.js";import{b as J}from"./chunk-SNB7PWCV.js";import{e as V}from"./chunk-CU3WNRKO.js";import{a as $}from"./chunk-5ZAMBDF5.js";var Ys=1,Xs=3;async function jt(g){let t=g.getElementsByTagName("img");if(!t||t.length===0)return;let r=!Gt(g);await Promise.all([...t].map(c=>new Promise(h=>{function l(){if(c.style.display="flex",c.style.flexDirection="column",r){let f=K().fontSize?K().fontSize:window.getComputedStyle(document.body).fontSize,i=5,[n=Jt.fontSize]=Qt(f),e=n*i+"px";c.style.minWidth=e,c.style.maxWidth=e}else c.style.width="100%";h(c)}$(l,"setupImage"),setTimeout(()=>{c.complete&&l()}),c.addEventListener("error",l),c.addEventListener("load",l)})))}$(jt,"configureLabelImages");function Gt(g){return g.nodeType===Xs?g.textContent?.trim()!=="":g.nodeType!==Ys||g.tagName.toLowerCase()==="img"?!1:[...g.childNodes].some(Gt)}$(Gt,"hasTextBesidesImages");var ta=3,Os=32,Fs=$(async(g,t,r)=>{let c=K(),h=g.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),l=h.insert("g").attr("class","label").attr("style",Q(t.labelStyle)),i=[{text:typeof t.label=="string"?t.label:t.label?.[0]??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(m=>({text:m,cssClass:"c4-descr"}))].filter(m=>m.text),n=t.width?Math.max(t.width-2*(t.padding??0),Os):K().flowchart?.wrappingWidth??200,e=c.wrap?n:Number.POSITIVE_INFINITY,a=await Promise.all(i.map(async m=>{let d=l.append("g").attr("class",m.cssClass),x=await ft(d,At(St(m.text??""),c),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:e,style:t.labelStyle},c);return V(x).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),V(x).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:d,box:d.node().getBBox()}})),s=Math.max(...a.map(({box:m})=>m.width),0),o=0;for(let{el:m,box:d}of a)m.attr("transform",`translate(${s/2-d.x-d.width/2}, ${o-d.y})`),o+=d.height+ta;let y=a.length>0?o-ta:0;l.insert("rect",":first-child"),l.attr("transform",`translate(${-s/2}, ${-y/2})`);let p=l.node().getBBox(),u=(t.padding??0)/2;return{shapeSvg:h,bbox:p,halfPadding:u,label:l}},"c4LabelHelper"),X=$(async(g,t,r)=>{if(t.stereotype!==void 0)return Fs(g,t,r);let c,h=t.useHtmlLabels||dt(K()?.htmlLabels);r?c=r:c="node default";let l=g.insert("g").attr("class",c).attr("id",t.domId||t.id),f=l.insert("g").attr("class","label").attr("style",Q(t.labelStyle)),i;t.label===void 0?i="":i=typeof t.label=="string"?t.label:t.label[0];let n=!!t.icon||!!t.img,e=t.labelType==="markdown",a=await ft(f,At(St(i),K()),{useHtmlLabels:h,width:t.width||t.wrappingWidth||K().flowchart?.wrappingWidth,classes:e?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:n,markdown:e},K()),s=(t?.padding??0)/2,o;if(h){let y=a.children[0],p=V(a);await jt(y),o=await Bt.measure(()=>y.getBoundingClientRect()),p.attr("width",o.width),p.attr("height",o.height)}else o=await Bt.measure(()=>a.getBBox());return h?f.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):f.attr("transform","translate(0, "+-o.height/2+")"),t.centerLabel&&f.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),f.insert("rect",":first-child"),{shapeSvg:l,bbox:o,halfPadding:s,label:f}},"labelHelper"),Wt=$(async(g,t,r)=>{let c=r.useHtmlLabels??mt(K()),h=g.insert("g").attr("class","label").attr("style",r.labelStyle||""),l=await ft(h,At(St(t),K()),{useHtmlLabels:c,width:r.width||K()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),f=r.padding/2,i;if(mt(K())){let n=l.children[0],e=V(l);i=await Bt.measure(()=>n.getBoundingClientRect()),e.attr("width",i.width),e.attr("height",i.height)}else i=await Bt.measure(()=>l.getBBox());return c?h.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"):h.attr("transform","translate(0, "+-i.height/2+")"),r.centerLabel&&h.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),h.insert("rect",":first-child"),{shapeSvg:g,bbox:i,halfPadding:f,label:h}},"insertLabel"),C=$((g,t,r)=>{if(r){g.width=r.width,g.height=r.height;return}let c=t.node().getBBox();g.width=c.width,g.height=c.height},"updateNodeBounds"),Y=$((g,t)=>(g.look==="handDrawn"?"rough-node":"node")+" "+g.cssClasses+" "+(t||""),"getNodeClasses");function j(g){let t=g.map((r,c)=>`${c===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}$(j,"createPathFromPoints");function pt(g,t,r,c,h,l){let f=[],n=r-g,e=c-t,a=n/l,s=2*Math.PI/a,o=t+e/2;for(let y=0;y<=50;y++){let p=y/50,u=g+p*n,m=o+h*Math.sin(s*(u-g));f.push({x:u,y:m})}return f}$(pt,"generateFullSineWavePoints");function it(g,t,r,c,h,l){let f=[],i=h*Math.PI/180,a=(l*Math.PI/180-i)/(c-1);for(let s=0;s<c;s++){let o=i+s*a,y=g+r*Math.cos(o),p=t+r*Math.sin(o);f.push({x:-y,y:-p})}return f}$(it,"generateCirclePoints");function Xt(g){let t=Array.from(g.childNodes).filter(n=>n.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),c=t.map(n=>n.getAttribute("d")).filter(n=>n!==null).join(" ");r.setAttribute("d",c);let h=t.find(n=>n.getAttribute("fill")!=="none"),l=t.find(n=>n.getAttribute("stroke")!=="none"),f=$((n,e)=>n?.getAttribute(e)??void 0,"getAttr");if(h){let n={fill:f(h,"fill"),"fill-opacity":f(h,"fill-opacity")??"1"};Object.entries(n).forEach(([e,a])=>{a&&r.setAttribute(e,a)})}if(l){let n={stroke:f(l,"stroke"),"stroke-width":f(l,"stroke-width")??"1","stroke-opacity":f(l,"stroke-opacity")??"1"};Object.entries(n).forEach(([e,a])=>{a&&r.setAttribute(e,a)})}let i=document.createElementNS("http://www.w3.org/2000/svg","g");return i.appendChild(r),i}$(Xt,"mergePaths");var js=$((g,t)=>{var r=g.x,c=g.y,h=t.x-r,l=t.y-c,f=g.width/2,i=g.height/2,n,e;return Math.abs(l)*f>Math.abs(h)*i?(l<0&&(i=-i),n=l===0?0:i*h/l,e=i):(h<0&&(f=-f),n=f,e=h===0?0:f*l/h),{x:r+n,y:c+e}},"intersectRect"),Gs=js,gt=$((g,t,r,c,h)=>["M",g+h,t,"H",g+r-h,"A",h,h,0,0,1,g+r,t+h,"V",t+c-h,"A",h,h,0,0,1,g+r-h,t+c,"H",g+h,"A",h,h,0,0,1,g,t+c-h,"V",t+h,"A",h,h,0,0,1,g+h,t,"Z"].join(" "),"createRoundedRectPathD"),qs=$(async(g,t,r,c=!1,h=!1)=>{let l=t||"";typeof l=="object"&&(l=l[0]);let f=K(),i=mt(f);return await ft(g,l,{style:r,isTitle:c,useHtmlLabels:i,markdown:!1,isNode:h,width:Number.POSITIVE_INFINITY},f)},"createLabel"),aa=qs;function pa(g,t){return g.intersect(t)}$(pa,"intersectNode");var zs=pa;function ua(g,t,r,c){var h=g.x,l=g.y,f=h-c.x,i=l-c.y,n=Math.sqrt(t*t*i*i+r*r*f*f),e=Math.abs(t*r*f/n);c.x<h&&(e=-e);var a=Math.abs(t*r*i/n);return c.y<l&&(a=-a),{x:h+e,y:l+a}}$(ua,"intersectEllipse");var da=ua;function ma(g,t,r){return da(g,t,t,r)}$(ma,"intersectCircle");var Vs=ma;function xa(g,t,r,c){{let h=t.y-g.y,l=g.x-t.x,f=t.x*g.y-g.x*t.y,i=h*r.x+l*r.y+f,n=h*c.x+l*c.y+f,e=1e-6;if(i!==0&&n!==0&&Ot(i,n))return;let a=c.y-r.y,s=r.x-c.x,o=c.x*r.y-r.x*c.y,y=a*g.x+s*g.y+o,p=a*t.x+s*t.y+o;if(Math.abs(y)<e&&Math.abs(p)<e&&Ot(y,p))return;let u=h*s-a*l;if(u===0)return;let m=Math.abs(u/2),d=l*o-s*f,x=d<0?(d-m)/u:(d+m)/u;d=a*f-h*o;let w=d<0?(d-m)/u:(d+m)/u;return{x,y:w}}}$(xa,"intersectLine");function Ot(g,t){return g*t>0}$(Ot,"sameSign");var Zs=xa;function wa(g,t,r){let c=g.x,h=g.y,l=[],f=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(a){f=Math.min(f,a.x),i=Math.min(i,a.y)}):(f=Math.min(f,t.x),i=Math.min(i,t.y));let n=c-g.width/2-f,e=h-g.height/2-i;for(let a=0;a<t.length;a++){let s=t[a],o=t[a<t.length-1?a+1:0],y=Zs(g,r,{x:n+s.x,y:e+s.y},{x:n+o.x,y:e+o.y});y&&l.push(y)}return l.length?(l.length>1&&l.sort(function(a,s){let o=a.x-r.x,y=a.y-r.y,p=Math.sqrt(o*o+y*y),u=s.x-r.x,m=s.y-r.y,d=Math.sqrt(u*u+m*m);return p<d?-1:p===d?0:1}),l[0]):g}$(wa,"intersectPolygon");var Js=wa,N={node:zs,circle:Vs,ellipse:da,polygon:Js,rect:Gs};function ba(g,t){let{labelStyles:r}=L(t);t.labelStyle=r;let c=Y(t),h=c;c||(h="anchor");let l=g.insert("g").attr("class",h).attr("id",t.domId||t.id),f=1,{cssStyles:i}=t,n=v.svg(l),e=H(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(e.roughness=0);let a=n.circle(0,0,f*2,e),s=l.insert(()=>a,":first-child");return s.attr("class","anchor").attr("style",Q(i)),C(t,s),t.intersect=function(o){return J.info("Circle intersect",t,f,o),N.circle(t,f,o)},l}$(ba,"anchor");function Ft(g,t,r,c,h,l,f){let n=(g+r)/2,e=(t+c)/2,a=Math.atan2(c-t,r-g),s=(r-g)/2,o=(c-t)/2,y=s/h,p=o/l,u=Math.sqrt(y**2+p**2);if(u>1)throw new Error("The given radii are too small to create an arc between the points.");let m=Math.sqrt(1-u**2),d=n+m*l*Math.sin(a)*(f?-1:1),x=e-m*h*Math.cos(a)*(f?-1:1),w=Math.atan2((t-x)/l,(g-d)/h),b=Math.atan2((c-x)/l,(r-d)/h)-w;f&&b<0&&(b+=2*Math.PI),!f&&b>0&&(b-=2*Math.PI);let k=[];for(let M=0;M<20;M++){let P=M/19,W=w+P*b,B=d+h*Math.cos(W),D=x+l*Math.sin(W);k.push({x:B,y:D})}return k}$(Ft,"generateArcPoints");function Sa(g,t,r){let[c,h]=[t,r].sort((l,f)=>f-l);return h*(1-Math.sqrt(1-(g/c/2)**2))}$(Sa,"calculateArcSagitta");async function $a(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?16:h,f=t.look==="neo"?12:h,i=$(W=>W+f,"calcTotalHeight"),n=$(W=>{let B=W/2;return[B/(2.5+W/50),B]},"calcEllipseRadius"),{shapeSvg:e,bbox:a}=await X(g,t,Y(t)),s=i(t?.height?t?.height:a.height),[o,y]=n(s),p=Sa(s,o,y),m=(t?.width?t?.width:a.width)+l*2+p-p,d=s,{cssStyles:x}=t,w=[{x:m/2,y:-d/2},{x:-m/2,y:-d/2},...Ft(-m/2,-d/2,-m/2,d/2,o,y,!1),{x:m/2,y:d/2},...Ft(m/2,d/2,m/2,-d/2,o,y,!0)],S=v.svg(e),b=H(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let k=j(w),M=S.path(k,b),P=e.insert(()=>M,":first-child");return P.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",x),c&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",c),P.attr("transform",`translate(${o/2}, 0)`),C(t,P),t.intersect=function(W){return N.polygon(t,w,W)},e}$($a,"bowTieRect");async function va(g,t,{config:{themeVariables:r}}){let{labelStyles:c,nodeStyles:h}=L(t);t.labelStyle=c;let{shapeSvg:l,bbox:f,label:i}=await X(g,t,Y(t)),n=r?.nodeBorder??r?.lineColor??"currentColor",e=t.padding??12,a=Math.max(f.width+e*2,t.width??0,80),s=Math.max(Math.min(a*.08,12),5),o=Math.max(f.height+e*2+s,t.height??0),y=-o/2+s,p=o/2,u=a*.72,m=[`M${-a/2},${y}`,`L${-u/2},${p}`,`A${u/2},${s} 0 0 0 ${u/2},${p}`,`L${a/2},${y}`,`A${a/2},${s} 0 0 0 ${-a/2},${y}`,"Z"].join(" "),{cssStyles:d}=t,x=l.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){let P=v.svg(l).path(m,H(t,{}));x.node()?.appendChild(P),d&&x.attr("style",d)}else x.append("path").attr("d",m).attr("style",h);x.append("ellipse").attr("cx",0).attr("cy",y).attr("rx",a/2).attr("ry",s).attr("style",`fill:none;stroke:${n};stroke-width:1px`),C(t,x);let w=y+(p-y)/2;i.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${w-f.height/2-(f.y-(f.top??0))})`);let S=12,b=$((M,P,W)=>Array.from({length:S+1},(B,D)=>{let T=Math.PI-D*Math.PI/S;return{x:M*Math.cos(T),y:P+W*s*Math.sin(T)}}),"arc"),k=[...b(a/2,y,-1),...b(u/2,p,1).reverse()];return t.intersect=function(M){return N.polygon(t,k,M)},l}$(va,"bucket");var Et=20,Tt=8,Ks=80,_t=8;async function ka(g,t){let{themeVariables:r}=K(),c=r.clusterBkg,h=r.clusterBorder,{nodeStyles:l}=L(t),{shapeSvg:f,bbox:i}=await X(g,t,Y(t)),n=t.padding??8,e=i.height,a=Math.max(i.width+n*2,Ks,t?.width??0),s=Math.max(e+Tt+Et+n*2,t?.height??0),o=-a/2,y=-s/2,p=-(Tt+Et)/2,u=f.select(".label");u&&(t.useHtmlLabels??mt(K())?u.attr("transform",`translate(${-i.width/2}, ${-i.height/2+p})`):u.attr("transform",`translate(0, ${-i.height/2+p})`));let m;if(t.look==="handDrawn"){let b=v.svg(f),k=H(t,{fill:c,stroke:h,fillStyle:"solid"}),M=b.path(gt(o,y,a,s,_t),k);m=f.insert(()=>M,":first-child"),m.attr("class","basic label-container collapsed-group").attr("style",Q(t.cssStyles))}else m=f.insert("rect",":first-child"),m.attr("class","basic label-container collapsed-group").attr("style",l).attr("rx",_t).attr("ry",_t).attr("x",o).attr("y",y).attr("width",a).attr("height",s).attr("fill",c).attr("stroke",h);let d=y+n+e+Tt;f.append("line").attr("class","collapsed-separator").attr("x1",o+8).attr("y1",d).attr("x2",o+a-8).attr("y2",d).attr("stroke",h).attr("stroke-dasharray","3, 3");let x=d+Et/2,w=2.5,S=10;for(let b=-1;b<=1;b++)f.append("circle").attr("class","collapsed-indicator").attr("cx",b*S).attr("cy",x).attr("r",w).attr("fill",h);return C(t,m),t.calcIntersect=function(b,k){return N.rect(b,k)},t.intersect=function(b){return N.rect(t,b)},f}$(ka,"collapsedGroup");function lt(g,t,r,c){return g.insert("polygon",":first-child").attr("points",c.map(function(h){return h.x+","+h.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}$(lt,"insertPolygonShape");var Us=["right","left","up","down"],qt="point",Qs=$(g=>{let t=new Set;for(let r of g)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),te=$(g=>Us.filter(t=>g.has(t)).join("|")||qt,"getDirectionKey"),sa={"right|left|up|down":$(({height:g,midpoint:t,padding:r,width:c})=>[{x:0,y:0},{x:t,y:0},{x:c/2,y:2*r},{x:c-t,y:0},{x:c,y:0},{x:c,y:-g/3},{x:c+2*r,y:-g/2},{x:c,y:-2*g/3},{x:c,y:-g},{x:c-t,y:-g},{x:c/2,y:-g-2*r},{x:t,y:-g},{x:0,y:-g},{x:0,y:-2*g/3},{x:-2*r,y:-g/2},{x:0,y:-g/3}],"right|left|up|down"),"right|left|up":$(({height:g,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-g/2},{x:r-t,y:-g},{x:t,y:-g},{x:0,y:-g/2}],"right|left|up"),"right|left|down":$(({height:g,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-g},{x:r-t,y:-g},{x:r,y:0}],"right|left|down"),"right|up|down":$(({height:g,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-g+t},{x:0,y:-g}],"right|up|down"),"left|up|down":$(({height:g,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-g+t},{x:r,y:-g}],"left|up|down"),"right|left":$(({height:g,midpoint:t,padding:r,width:c})=>[{x:t,y:0},{x:t,y:-r},{x:c-t,y:-r},{x:c-t,y:0},{x:c,y:-g/2},{x:c-t,y:-g},{x:c-t,y:-g+r},{x:t,y:-g+r},{x:t,y:-g},{x:0,y:-g/2}],"right|left"),"up|down":$(({height:g,midpoint:t,padding:r,width:c})=>[{x:c/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-g+r},{x:0,y:-g+r},{x:c/2,y:-g},{x:c,y:-g+r},{x:c-t,y:-g+r},{x:c-t,y:-r},{x:c,y:-r}],"up|down"),"right|up":$(({height:g,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-g}],"right|up"),"right|down":$(({height:g,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-g}],"right|down"),"left|up":$(({height:g,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-g}],"left|up"),"left|down":$(({height:g,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-g}],"left|down"),right:$(({height:g,midpoint:t,padding:r,width:c})=>[{x:t,y:-r},{x:t,y:-r},{x:c-t,y:-r},{x:c-t,y:0},{x:c,y:-g/2},{x:c-t,y:-g},{x:c-t,y:-g+r},{x:t,y:-g+r},{x:t,y:-g+r}],"right"),left:$(({height:g,midpoint:t,padding:r,width:c})=>[{x:t,y:0},{x:t,y:-r},{x:c-t,y:-r},{x:c-t,y:-g+r},{x:t,y:-g+r},{x:t,y:-g},{x:0,y:-g/2}],"left"),up:$(({height:g,midpoint:t,padding:r,width:c})=>[{x:t,y:-r},{x:t,y:-g+r},{x:0,y:-g+r},{x:c/2,y:-g},{x:c,y:-g+r},{x:c-t,y:-g+r},{x:c-t,y:-r}],"up"),down:$(({height:g,midpoint:t,padding:r,width:c})=>[{x:c/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-g+r},{x:c-t,y:-g+r},{x:c-t,y:-r},{x:c,y:-r}],"down"),[qt]:()=>[{x:0,y:0}]},ae=$((g,t,r,c)=>{let h=Qs(g),l=(r.padding??0)/2,f=t.height+4*l,i=f/2,n=c??t.width+2*i+2*l,e=te(h);return(sa[e]??sa[qt])({height:f,midpoint:i,padding:l,width:n})},"getArrowPoints");async function Pa(g,t){let r=t,{shapeSvg:c,bbox:h}=await X(g,r,Y(r)),l=r.padding??0,f=h.height+2*l,i=f/2,n=h.width+2*i+l,e=r.width??0,s=r.positioned&&(r.widthInColumns??1)>1&&e>n?e:n,o=ae(r.directions??[],h,r,s),y=lt(c,s,f,o);return y.attr("style",r.style??null),C(r,y),r.intersect=function(p){return N.polygon(r,o,p)},c}$(Pa,"block_arrow");async function Ma(g,t,{config:{themeVariables:r}}){let{labelStyles:c,nodeStyles:h}=L(t);t.labelStyle=c;let{shapeSvg:l,bbox:f,label:i}=await X(g,t,Y(t)),n=r?.nodeBorder??r?.lineColor??"currentColor",e=t.padding??12,a=18,s=12,o=Math.max(f.width+e*2,t.width??0,90),y=Math.max(f.height+e*2+a,t.height??0),p=-y/2,{cssStyles:u}=t,m=l.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){let w=v.svg(l).path(gt(-o/2,p,o,y,s),H(t,{}));m.node()?.appendChild(w),u&&m.attr("style",u)}else m.append("rect").attr("x",-o/2).attr("y",p).attr("width",o).attr("height",y).attr("rx",s).attr("ry",s).attr("style",h);m.append("line").attr("x1",-o/2).attr("y1",p+a).attr("x2",o/2).attr("y2",p+a).attr("style",`stroke:${n};stroke-width:1px`);for(let x=0;x<3;x++)m.append("circle").attr("cx",-o/2+12+x*9).attr("cy",p+a/2).attr("r",2.5).attr("style",`fill:${n};stroke:none`);m.append("rect").attr("class","browser-address-bar").attr("x",-o/2+44).attr("y",p+4).attr("width",Math.max(o-56,10)).attr("height",a-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${n};stroke-width:1px;opacity:0.6`),C(t,m);let d=p+a+(y-a)/2;return i.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${d-f.height/2-(f.y-(f.top??0))})`),t.intersect=function(x){return N.rect(t,x)},l}$(Ma,"browser");var Rt=12;async function Da(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?28:h,f=t.look==="neo"?24:h,{shapeSvg:i,bbox:n}=await X(g,t,Y(t)),e=(t?.width??n.width)+(t.look==="neo"?l*2:l+Rt),a=(t?.height??n.height)+(t.look==="neo"?f*2:f),s=0,o=e,y=-a,p=0,u=[{x:s+Rt,y},{x:o,y},{x:o,y:p},{x:s,y:p},{x:s,y:y+Rt},{x:s+Rt,y}],m,{cssStyles:d}=t;if(t.look==="handDrawn"){let x=v.svg(i),w=H(t,{}),S=j(u),b=x.path(S,w);m=i.insert(()=>b,":first-child").attr("transform",`translate(${-e/2}, ${a/2})`),d&&m.attr("style",d)}else m=lt(i,e,a,u);return c&&m.attr("style",c),C(t,m),t.intersect=function(x){return N.polygon(t,u,x)},i}$(Da,"card");function Na(g,t){let{nodeStyles:r}=L(t);t.label="";let c=g.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),{cssStyles:h}=t,l=Math.max(28,t.width??0),f=[{x:0,y:l/2},{x:l/2,y:0},{x:0,y:-l/2},{x:-l/2,y:0}],i=v.svg(c),n=H(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let e=j(f),a=i.path(e,n),s=c.insert(()=>a,":first-child");return h&&t.look!=="handDrawn"&&s.selectAll("path").attr("style",h),r&&t.look!=="handDrawn"&&s.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(o){return N.polygon(t,f,o)},c}$(Na,"choice");async function zt(g,t,r){let{labelStyles:c,nodeStyles:h}=L(t);t.labelStyle=c;let{shapeSvg:l,bbox:f,halfPadding:i}=await X(g,t,Y(t)),n=16,e=r?.padding??i,a=t.look==="neo"?f.width/2+n*2:f.width/2+e,s,{cssStyles:o}=t;if(t.look==="handDrawn"){let y=v.svg(l),p=H(t,{}),u=y.circle(0,0,a*2,p);s=l.insert(()=>u,":first-child"),s.attr("class","basic label-container").attr("style",Q(o))}else s=l.insert("circle",":first-child").attr("class","basic label-container").attr("style",h).attr("r",a).attr("cx",0).attr("cy",0);return C(t,s),t.calcIntersect=function(y,p){let u=y.width/2;return N.circle(y,u,p)},t.intersect=function(y){return J.info("Circle intersect",t,a,y),N.circle(t,a,y)},l}$(zt,"circle");async function Ba(g,t){let r=t,c=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:h,bbox:l,halfPadding:f}=await X(g,r,c),i=h.insert("rect",":first-child"),n=r.padding??0,e=r.positioned?r.width??0:l.width+n,a=r.positioned?r.height??0:l.height+n,s=r.positioned?-e/2:-l.width/2-f,o=r.positioned?-a/2:-l.height/2-f;return i.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",s).attr("y",o).attr("width",e).attr("height",a),C(r,i),r.intersect=function(y){return N.rect(r,y)},h}$(Ba,"composite");async function Ca(g,t,{config:{themeVariables:r}}){let{labelStyles:c,nodeStyles:h}=L(t);t.labelStyle=c;let{shapeSvg:l,bbox:f,label:i}=await X(g,t,Y(t)),n=r?.nodeBorder??r?.lineColor??"currentColor",e=t.padding??12,a=20,s=12,o=Math.max(f.width+e*2,t.width??0,90),y=Math.max(f.height+e*2+a,t.height??0),p=-y/2,{cssStyles:u}=t,m=l.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){let w=v.svg(l).path(gt(-o/2,p,o,y,s),H(t,{}));m.node()?.appendChild(w),u&&m.attr("style",u)}else m.append("rect").attr("x",-o/2).attr("y",p).attr("width",o).attr("height",y).attr("rx",s).attr("ry",s).attr("style",h);m.append("text").attr("x",-o/2+12).attr("y",p+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${n}`).text(">_"),C(t,m);let d=p+a+(y-a)/2;return i.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${d-f.height/2-(f.y-(f.top??0))})`),t.intersect=function(x){return N.rect(t,x)},l}$(Ca,"consoleWindow");function Aa(g){let t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),c=g*2,h={x:c/2*t,y:c/2*r},l={x:-(c/2)*t,y:c/2*r},f={x:-(c/2)*t,y:-(c/2)*r},i={x:c/2*t,y:-(c/2)*r};return`M ${l.x},${l.y} L ${i.x},${i.y}
M ${h.x},${h.y} L ${f.x},${f.y}`}$(Aa,"createLine");function Ra(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r,t.label="";let h=g.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),l=Math.max(30,t?.width??0),{cssStyles:f}=t,i=v.svg(h),n=H(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let e=i.circle(0,0,l*2,n),a=Aa(l),s=i.path(a,n),o=h.insert(()=>e,":first-child");return o.insert(()=>s),o.attr("class","outer-path"),f&&t.look!=="handDrawn"&&o.selectAll("path").attr("style",f),c&&t.look!=="handDrawn"&&o.selectAll("path").attr("style",c),C(t,o),t.intersect=function(y){return J.info("crossedCircle intersect",t,{radius:l,point:y}),N.circle(t,l,y)},h}$(Ra,"crossedCircle");function ot(g,t,r,c=100,h=0,l=180){let f=[],i=h*Math.PI/180,a=(l*Math.PI/180-i)/(c-1);for(let s=0;s<c;s++){let o=i+s*a,y=g+r*Math.cos(o),p=t+r*Math.sin(o);f.push({x:-y,y:-p})}return f}$(ot,"generateCirclePoints");async function Ha(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let{shapeSvg:h,bbox:l,label:f}=await X(g,t,Y(t)),i=t.look==="neo"?18:t.padding??0,n=t.look==="neo"?12:t.padding??0,e=l.width+i,a=l.height+n,s=Math.max(5,a*.1),{cssStyles:o}=t,y=[...ot(e/2,-a/2,s,30,-90,0),{x:-e/2-s,y:s},...ot(e/2+s*2,-s,s,20,-180,-270),...ot(e/2+s*2,s,s,20,-90,-180),{x:-e/2-s,y:-a/2},...ot(e/2,a/2,s,20,0,90)],p=[{x:e/2,y:-a/2-s},{x:-e/2,y:-a/2-s},...ot(e/2,-a/2,s,20,-90,0),{x:-e/2-s,y:-s},...ot(e/2+e*.1,-s,s,20,-180,-270),...ot(e/2+e*.1,s,s,20,-90,-180),{x:-e/2-s,y:a/2},...ot(e/2,a/2,s,20,0,90),{x:-e/2,y:a/2+s},{x:e/2,y:a/2+s}],u=v.svg(h),m=H(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let x=j(y).replace("Z",""),w=u.path(x,m),S=j(p),b=u.path(S,{...m}),k=h.insert("g",":first-child");return k.insert(()=>b,":first-child").attr("stroke-opacity",0),k.insert(()=>w,":first-child"),k.attr("class","text"),o&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",o),c&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",c),k.attr("transform",`translate(${s}, 0)`),f.attr("transform",`translate(${-e/2+s-(l.x-(l.left??0))},${-a/2+(t.padding??0)/2-(l.y-(l.top??0))})`),C(t,k),t.intersect=function(M){return N.polygon(t,p,M)},h}$(Ha,"curlyBraceLeft");function ht(g,t,r,c=100,h=0,l=180){let f=[],i=h*Math.PI/180,a=(l*Math.PI/180-i)/(c-1);for(let s=0;s<c;s++){let o=i+s*a,y=g+r*Math.cos(o),p=t+r*Math.sin(o);f.push({x:y,y:p})}return f}$(ht,"generateCirclePoints");async function Ia(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let{shapeSvg:h,bbox:l,label:f}=await X(g,t,Y(t)),i=t.look==="neo"?18:t.padding??0,n=t.look==="neo"?12:t.padding??0,e=l.width+(t.look==="neo"?i*2:i),a=l.height+(t.look==="neo"?n*2:n),s=Math.max(5,a*.1),{cssStyles:o}=t,y=[...ht(e/2,-a/2,s,20,-90,0),{x:e/2+s,y:-s},...ht(e/2+s*2,-s,s,20,-180,-270),...ht(e/2+s*2,s,s,20,-90,-180),{x:e/2+s,y:a/2},...ht(e/2,a/2,s,20,0,90)],p=[{x:-e/2,y:-a/2-s},{x:e/2,y:-a/2-s},...ht(e/2,-a/2,s,20,-90,0),{x:e/2+s,y:-s},...ht(e/2+s*2,-s,s,20,-180,-270),...ht(e/2+s*2,s,s,20,-90,-180),{x:e/2+s,y:a/2},...ht(e/2,a/2,s,20,0,90),{x:e/2,y:a/2+s},{x:-e/2,y:a/2+s}],u=v.svg(h),m=H(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let x=j(y).replace("Z",""),w=u.path(x,m),S=j(p),b=u.path(S,{...m}),k=h.insert("g",":first-child");return k.insert(()=>b,":first-child").attr("stroke-opacity",0),k.insert(()=>w,":first-child"),k.attr("class","text"),o&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",o),c&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",c),k.attr("transform",`translate(${-s}, 0)`),f.attr("transform",`translate(${-e/2+(t.padding??0)/2-(l.x-(l.left??0))},${-a/2+(t.padding??0)/2-(l.y-(l.top??0))})`),C(t,k),t.intersect=function(M){return N.polygon(t,p,M)},h}$(Ia,"curlyBraceRight");function tt(g,t,r,c=100,h=0,l=180){let f=[],i=h*Math.PI/180,a=(l*Math.PI/180-i)/(c-1);for(let s=0;s<c;s++){let o=i+s*a,y=g+r*Math.cos(o),p=t+r*Math.sin(o);f.push({x:-y,y:-p})}return f}$(tt,"generateCirclePoints");async function La(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let{shapeSvg:h,bbox:l,label:f}=await X(g,t,Y(t)),i=t.look==="neo"?18:t.padding??0,n=t.look==="neo"?12:t.padding??0,e=l.width+(t.look==="neo"?i*2:i),a=l.height+(t.look==="neo"?n*2:n),s=Math.max(5,a*.1),{cssStyles:o}=t,y=[...tt(e/2,-a/2,s,30,-90,0),{x:-e/2-s,y:s},...tt(e/2+s*2,-s,s,20,-180,-270),...tt(e/2+s*2,s,s,20,-90,-180),{x:-e/2-s,y:-a/2},...tt(e/2,a/2,s,20,0,90)],p=[...tt(-e/2+s+s/2,-a/2,s,20,-90,-180),{x:e/2-s/2,y:s},...tt(-e/2-s/2,-s,s,20,0,90),...tt(-e/2-s/2,s,s,20,-90,0),{x:e/2-s/2,y:-s},...tt(-e/2+s+s/2,a/2,s,30,-180,-270)],u=[{x:e/2,y:-a/2-s},{x:-e/2,y:-a/2-s},...tt(e/2,-a/2,s,20,-90,0),{x:-e/2-s,y:-s},...tt(e/2+s*2,-s,s,20,-180,-270),...tt(e/2+s*2,s,s,20,-90,-180),{x:-e/2-s,y:a/2},...tt(e/2,a/2,s,20,0,90),{x:-e/2,y:a/2+s},{x:e/2-s-s/2,y:a/2+s},...tt(-e/2+s+s/2,-a/2,s,20,-90,-180),{x:e/2-s/2,y:s},...tt(-e/2-s/2,-s,s,20,0,90),...tt(-e/2-s/2,s,s,20,-90,0),{x:e/2-s/2,y:-s},...tt(-e/2+s+s/2,a/2,s,30,-180,-270)],m=v.svg(h),d=H(t,{fill:"none"});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let w=j(y).replace("Z",""),S=m.path(w,d),k=j(p).replace("Z",""),M=m.path(k,d),P=j(u),W=m.path(P,{...d}),B=h.insert("g",":first-child");return B.insert(()=>W,":first-child").attr("stroke-opacity",0),B.insert(()=>S,":first-child"),B.insert(()=>M,":first-child"),B.attr("class","text"),o&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",o),c&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",c),B.attr("transform",`translate(${s-s/4}, 0)`),f.attr("transform",`translate(${-e/2+(t.padding??0)/2-(l.x-(l.left??0))},${-a/2+(t.padding??0)/2-(l.y-(l.top??0))})`),C(t,B),t.intersect=function(D){return N.polygon(t,u,D)},h}$(La,"curlyBraces");async function Wa(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?16:h,f=t.look==="neo"?12:h,i=20,n=5,{shapeSvg:e,bbox:a}=await X(g,t,Y(t)),s=Math.max(i,(a.width+l*2)*1.25,t?.width??0),o=Math.max(n,a.height+f*2,t?.height??0),y=o/2,{cssStyles:p}=t,u=v.svg(e),m=H(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let d=s,x=o,w=d-y,S=x/4,b=[{x:w,y:0},{x:S,y:0},{x:0,y:x/2},{x:S,y:x},{x:w,y:x},...it(-w,-x/2,y,50,270,90)],k=j(b),M=u.path(k,m),P=e.insert(()=>M,":first-child");return P.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&P.selectChildren("path").attr("style",p),c&&t.look!=="handDrawn"&&P.selectChildren("path").attr("style",c),P.attr("transform",`translate(${-s/2}, ${-o/2})`),C(t,P),t.intersect=function(W){return N.polygon(t,b,W)},e}$(Wa,"curvedTrapezoid");async function Ea(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let{shapeSvg:h,bbox:l,label:f}=await X(g,t,Y(t)),i=t.padding??20,n=Math.max(l.width+i*2,t.width??0,100),e=Math.min(Math.max(n*.23,16),56),a=e*.27,s=Math.max(l.height+i*2,t.height?t.height-(2*e-a):0),o=Math.min(n*.177,s*.45),y=s+2*e-a,p=-y/2,u=p+2*e-a,m=h.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:d}=t;if(t.look==="handDrawn"){let P=v.svg(h),W=H(t,{}),B=P.path(gt(-n/2,u,n,s,o),W),D=P.circle(0,p+e,e*2,W);m.insert(()=>D,":first-child"),m.insert(()=>B,":first-child"),d&&m.attr("style",d)}else m.append("rect").attr("x",-n/2).attr("y",u).attr("width",n).attr("height",s).attr("rx",o).attr("ry",o).attr("style",c),m.append("circle").attr("cx",0).attr("cy",p+e).attr("r",e).attr("style",c);C(t,m);let x=u+s/2;f.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${x-l.height/2-(l.y-(l.top??0))})`);let w=p+e,S=Math.asin(Math.min(1,(u-w)/e))*180/Math.PI,M=[...it(0,-w,e,24,180+S,-S),...it(-(-n/2+o),-(u+o),o,12,90,0),...it(-(-n/2+o),-(y/2-o),o,12,360,270),...it(-(n/2-o),-(y/2-o),o,12,270,180),...it(-(n/2-o),-(u+o),o,12,180,90)];return t.intersect=function(P){return N.polygon(t,M,P)},h}$(Ea,"person");var se=$((g,t,r,c,h,l)=>[`M${g},${t+l}`,`a${h},${l} 0,0,0 ${r},0`,`a${h},${l} 0,0,0 ${-r},0`,`l0,${c}`,`a${h},${l} 0,0,0 ${r},0`,`l0,${-c}`].join(" "),"createCylinderPathD"),ee=$((g,t,r,c,h,l)=>[`M${g},${t+l}`,`M${g+r},${t+l}`,`a${h},${l} 0,0,0 ${-r},0`,`l0,${c}`,`a${h},${l} 0,0,0 ${r},0`,`l0,${-c}`].join(" "),"createOuterCylinderPathD"),re=$((g,t,r,c,h,l)=>[`M${g-r/2},${-c/2}`,`a${h},${l} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),ea=8,ra=8;async function Ta(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?24:h,f=t.look==="neo"?24:h,i=t.width??0;if(t.width&&(t.width=t.width-f,t.width<ra&&(t.width=ra)),t.height){let x=i/2/(2.5+i/50);t.height=t.height-l-x*3,t.height<ea&&(t.height=ea)}let{shapeSvg:n,bbox:e,label:a}=await X(g,t,Y(t)),s=Math.max(t.width??0,e.width)+f,o=s/2,y=o/(2.5+s/50),p=Math.max(t.height??0,e.height)+l+y,u,{cssStyles:m}=t;if(t.look==="handDrawn"){let d=v.svg(n),x=ee(0,0,s,p,o,y),w=re(0,y,s,p,o,y),S=H(t,{}),b=d.path(x,S),k=d.path(w,H(t,{fill:"none"}));u=n.insert(()=>k,":first-child"),u=n.insert(()=>b,":first-child"),u.attr("class","basic label-container"),m&&u.attr("style",m)}else{let d=se(0,0,s,p,o,y);u=n.insert("path",":first-child").attr("d",d).attr("class","basic label-container outer-path").attr("style",Q(m)).attr("style",c)}return u.attr("label-offset-y",y),u.attr("transform",`translate(${-s/2}, ${-(p/2+y)})`),C(t,u),a.attr("transform",`translate(${-(e.width/2)-(e.x-(e.left??0))}, ${-(e.height/2)+(t.padding??0)/1.5-(e.y-(e.top??0))})`),t.intersect=function(d){let x=N.rect(t,d),w=x.x-(t.x??0);if(o!=0&&(Math.abs(w)<(t.width??0)/2||Math.abs(w)==(t.width??0)/2&&Math.abs(x.y-(t.y??0))>(t.height??0)/2-y)){let S=y*y*(1-w*w/(o*o));S>0&&(S=Math.sqrt(S)),S=y-S,d.y-(t.y??0)>0&&(S=-S),x.y+=S}return x},n}$(Ta,"cylinder");async function Pt(g,t,r){let{labelStyles:c,nodeStyles:h}=L(t);t.labelStyle=c;let{shapeSvg:l,bbox:f}=await X(g,t,Y(t)),i=Math.max(f.width+r.labelPaddingX*2,t?.width||0),n=Math.max(f.height+r.labelPaddingY*2,t?.height||0),e=-i/2,a=-n/2,s,{rx:o,ry:y}=t,{cssStyles:p}=t;if(r?.rx&&r.ry&&(o=r.rx,y=r.ry),t.look==="handDrawn"){let u=v.svg(l),m=H(t,{}),d=o||y?u.path(gt(e,a,i,n,o||0),m):u.rectangle(e,a,i,n,m);s=l.insert(()=>d,":first-child"),s.attr("class","basic label-container").attr("style",Q(p))}else s=l.insert("rect",":first-child"),s.attr("class","basic label-container").attr("style",h).attr("rx",Q(o)).attr("ry",Q(y)).attr("x",e).attr("y",a).attr("width",i).attr("height",n);return C(t,s,t.look==="handDrawn"?void 0:{width:i,height:n}),t.calcIntersect=function(u,m){return N.rect(u,m)},t.intersect=function(u){return N.rect(t,u)},l}$(Pt,"drawRect");async function _a(g,t){let{cssClasses:r,labelPaddingX:c,labelPaddingY:h,padding:l,width:f,height:i}=t,n={rx:0,ry:0,classes:r??"",labelPaddingX:c??(l??0)*2,labelPaddingY:h??l??0},e=await Pt(g,t,n);if(t.look==="handDrawn"){let y=v.svg(e),p=H(t,{}),u=e.select(".basic.label-container > path:nth-child(2)"),m=u.node();if(!m)return e;let d=null;if(m instanceof SVGGraphicsElement)d=m.getBBox();else return e;return e.insert(()=>y.line(d.x,d.y,d.x+d.width,d.y,p),".basic.label-container g.label"),e.insert(()=>y.line(d.x,d.y+d.height,d.x+d.width,d.y+d.height,p),".basic.label-container g.label"),u.remove(),e}let a=e.select(".basic.label-container"),s=(Number(a.attr("width"))||f)??0,o=(Number(a.attr("height"))||i)??0;return s>0&&o>0&&a.attr("stroke-dasharray",`${s} ${o}`),e}$(_a,"datastore");async function Ya(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?16:t.padding??0,{shapeSvg:f,bbox:i,label:n}=await X(g,t,Y(t)),e=i.width+h,a=i.height+l,s=a*.2,o=-e/2,y=-a/2-s/2,{cssStyles:p}=t,u=v.svg(f),m=H(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let d=[{x:o,y:y+s},{x:-o,y:y+s},{x:-o,y:-y},{x:o,y:-y},{x:o,y},{x:-o,y},{x:-o,y:y+s}],x=u.polygon(d.map(S=>[S.x,S.y]),m),w=f.insert(()=>x,":first-child");return w.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",p),c&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",c),n.attr("transform",`translate(${o+(t.padding??0)/2-(i.x-(i.left??0))}, ${y+s+(t.padding??0)/2-(i.y-(i.top??0))})`),C(t,w),t.intersect=function(S){return N.rect(t,S)},f}$(Ya,"dividedRectangle");async function Xa(g,t){let{labelStyles:r,nodeStyles:c}=L(t),h=t.look==="neo"?12:5;t.labelStyle=r;let l=t.padding??0,f=t.look==="neo"?16:l,{shapeSvg:i,bbox:n}=await X(g,t,Y(t)),e=(t?.width?t?.width/2:n.width/2)+(f??0),a=e-h,s,{cssStyles:o}=t;if(t.look==="handDrawn"){let y=v.svg(i),p=H(t,{roughness:.2,strokeWidth:2.5}),u=H(t,{roughness:.2,strokeWidth:1.5}),m=y.circle(0,0,e*2,p),d=y.circle(0,0,a*2,u);s=i.insert("g",":first-child"),s.attr("class",Q(t.cssClasses)).attr("style",Q(o)),s.node()?.appendChild(m),s.node()?.appendChild(d)}else{s=i.insert("g",":first-child");let y=s.insert("circle",":first-child"),p=s.insert("circle");s.attr("class","basic label-container").attr("style",c),y.attr("class","outer-circle").attr("style",c).attr("r",e).attr("cx",0).attr("cy",0),p.attr("class","inner-circle").attr("style",c).attr("r",a).attr("cx",0).attr("cy",0)}return C(t,s),t.intersect=function(y){return J.info("DoubleCircle intersect",t,e,y),N.circle(t,e,y)},i}$(Xa,"doublecircle");function Oa(g,t,{config:{themeVariables:r}}){let{labelStyles:c,nodeStyles:h}=L(t);t.label="",t.labelStyle=c;let l=g.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),f=7,{cssStyles:i}=t,n=v.svg(l),{nodeBorder:e}=r,a=H(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(a.roughness=0);let s=n.circle(0,0,f*2,a),o=l.insert(()=>s,":first-child");return o.selectAll("path").attr("style",`fill: ${e} !important;`),i&&i.length>0&&t.look!=="handDrawn"&&o.selectAll("path").attr("style",i),h&&t.look!=="handDrawn"&&o.selectAll("path").attr("style",h),C(t,o),t.intersect=function(y){return J.info("filledCircle intersect",t,{radius:f,point:y}),N.circle(t,f,y)},l}$(Oa,"filledCircle");var ia=10,la=10;async function Fa(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?h*2:h;(t.width||t.height)&&(t.height=t?.height??0,t.height<ia&&(t.height=ia),t.width=(t?.width??0)-l-l/2,t.width<la&&(t.width=la));let{shapeSvg:f,bbox:i,label:n}=await X(g,t,Y(t)),e=(t?.width?t?.width:i.width)+(l??0),a=t?.height?t?.height:e+i.height,s=a,o=[{x:0,y:-a},{x:s,y:-a},{x:s/2,y:0}],{cssStyles:y}=t,p=v.svg(f),u=H(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let m=j(o),d=p.path(m,u),x=f.insert(()=>d,":first-child").attr("transform",`translate(${-a/2}, ${a/2})`).attr("class","outer-path");return y&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",y),c&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",c),t.width=e,t.height=a,C(t,x),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-a/2+(t.padding??0)/2+(i.y-(i.top??0))})`),t.intersect=function(w){return J.info("Triangle intersect",t,o,w),N.polygon(t,o,w)},f}$(Fa,"flippedTriangle");async function ja(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let{shapeSvg:h,bbox:l,label:f}=await X(g,t,Y(t)),i=t.padding??12,n=Math.max(l.width+i*2,t.width??0,90),e=l.height+i*2,a=Math.max(Math.min(e*.16,14),8),s=Math.max(e+a,t.height??0),o=s-a,y=Math.max(n*.38,28),p=-s/2,u=[{x:-n/2,y:p},{x:-n/2+y,y:p},{x:-n/2+y,y:p+a},{x:n/2,y:p+a},{x:n/2,y:s/2},{x:-n/2,y:s/2}],m=[`M${u[0].x},${u[0].y}`,...u.slice(1).map(S=>`L${S.x},${S.y}`),"Z"].join(" "),{cssStyles:d}=t,x;if(t.look==="handDrawn"){let b=v.svg(h).path(m,H(t,{}));x=h.insert(()=>b,":first-child").attr("class","basic label-container"),d&&x.attr("style",d)}else x=h.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",c);t.look==="handDrawn"?C(t,x):C(t,x,{width:n,height:s});let w=p+a+o/2;return f.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${w-l.height/2-(l.y-(l.top??0))})`),t.intersect=function(S){return N.polygon(t,u,S)},h}$(ja,"folder");function Ga(g,t,{dir:r,config:{state:c,themeVariables:h}}){let{nodeStyles:l}=L(t);t.label="";let f=g.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),{cssStyles:i}=t,n=Math.max(70,t?.width??0),e=Math.max(10,t?.height??0);r==="LR"&&(n=Math.max(10,t?.width??0),e=Math.max(70,t?.height??0));let a=-1*n/2,s=-1*e/2,o=v.svg(f),y=H(t,{stroke:h.lineColor,fill:h.lineColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let p=o.rectangle(a,s,n,e,y),u=f.insert(()=>p,":first-child");i&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",i),l&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",l),C(t,u);let m=c?.padding??0;return t.width&&t.height&&(t.width+=m/2||0,t.height+=m/2||0),t.intersect=function(d){return N.rect(t,d)},f}$(Ga,"forkJoin");async function qa(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=15,l=10,f=t.look==="neo"?16:t.padding??0,i=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-i*2,t.height<l&&(t.height=l),t.width=(t?.width??0)-f*2,t.width<h&&(t.width=h));let{shapeSvg:n,bbox:e}=await X(g,t,Y(t)),a=(t?.width?t?.width:Math.max(h,e.width))+f*2,s=(t?.height?t?.height:Math.max(l,e.height))+i*2,o=s/2,{cssStyles:y}=t,p=v.svg(n),u=H(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let m=[{x:-a/2,y:-s/2},{x:a/2-o,y:-s/2},...it(-a/2+o,0,o,50,90,270),{x:a/2-o,y:s/2},{x:-a/2,y:s/2}],d=j(m),x=p.path(d,u),w=n.insert(()=>x,":first-child");return w.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",y),c&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",c),C(t,w),t.intersect=function(S){return J.info("Pill intersect",t,{radius:o,point:S}),N.polygon(t,m,S)},n}$(qa,"halfRoundedRectangle");var ie=$((g,t,r,c,h)=>[`M${g+h},${t}`,`L${g+r-h},${t}`,`L${g+r},${t-c/2}`,`L${g+r-h},${t-c}`,`L${g+h},${t-c}`,`L${g},${t-c/2}`,"Z"].join(" "),"createHexagonPathD");async function za(g,t){let{labelStyles:r,nodeStyles:c}=L(t),h=t.look==="neo"?3.5:4;t.labelStyle=r;let l=t.padding??0,f=70,i=32,n=t.look==="neo"?f:l,e=t.look==="neo"?i:l;if(t.width||t.height){let w=(t.height??0)/h;t.width=(t?.width??0)-2*w-e,t.height=(t.height??0)-n}let{shapeSvg:a,bbox:s}=await X(g,t,Y(t)),o=(t?.height?t?.height:s.height)+n,y=o/h,p=(t?.width?t?.width:s.width)+2*y+e,u=[{x:y,y:0},{x:p-y,y:0},{x:p,y:-o/2},{x:p-y,y:-o},{x:y,y:-o},{x:0,y:-o/2}],m,{cssStyles:d}=t;if(t.look==="handDrawn"){let x=v.svg(a),w=H(t,{}),S=ie(0,0,p,o,y),b=x.path(S,w);m=a.insert(()=>b,":first-child").attr("transform",`translate(${-p/2}, ${o/2})`),d&&m.attr("style",d)}else m=lt(a,p,o,u);return c&&m.attr("style",c),t.width=p,t.height=o,C(t,m),t.intersect=function(x){return N.polygon(t,u,x)},a}$(za,"hexagon");async function Va(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.label="",t.labelStyle=r;let{shapeSvg:h}=await X(g,t,Y(t)),l=Math.max(30,t?.width??0),f=Math.max(30,t?.height??0),{cssStyles:i}=t,n=v.svg(h),e=H(t,{});t.look!=="handDrawn"&&(e.roughness=0,e.fillStyle="solid");let a=[{x:0,y:0},{x:l,y:0},{x:0,y:f},{x:l,y:f}],s=j(a),o=n.path(s,e),y=h.insert(()=>o,":first-child");return y.attr("class","basic label-container outer-path"),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),c&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",c),y.attr("transform",`translate(${-l/2}, ${-f/2})`),C(t,y),t.intersect=function(p){return J.info("Pill intersect",t,{points:a}),N.polygon(t,a,p)},h}$(Va,"hourglass");async function Za(g,t,{config:{themeVariables:r,flowchart:c}}){let{labelStyles:h}=L(t);t.labelStyle=h;let l=t.assetHeight??48,f=t.assetWidth??48,i=Math.max(l,f),n=c?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:e,bbox:a,label:s}=await X(g,t,"icon-shape default"),o=t.pos==="t",y=i,p=i,{nodeBorder:u}=r,{stylesMap:m}=Mt(t),d=-p/2,x=-y/2,w=t.label?8:0,S=v.svg(e),b=H(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let k=S.rectangle(d,x,p,y,b),M=Math.max(p,a.width),P=y+a.height+w,W=S.rectangle(-M/2,-P/2,M,P,{...b,fill:"transparent",stroke:"none"}),B=e.insert(()=>k,":first-child"),D=e.insert(()=>W);if(t.icon){let T=e.append("g");T.html(`<g>${await Dt(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);let A=T.node().getBBox(),E=A.width,I=A.height,R=A.x,_=A.y;T.attr("transform",`translate(${-E/2-R},${o?a.height/2+w/2-I/2-_:-a.height/2-w/2-I/2-_})`),T.attr("style",`color: ${m.get("stroke")??u};`)}return s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))},${o?-P/2:P/2-a.height})`),B.attr("transform",`translate(0,${o?a.height/2+w/2:-a.height/2-w/2})`),C(t,D),t.intersect=function(T){if(J.info("iconSquare intersect",t,T),!t.label)return N.rect(t,T);let A=t.x??0,E=t.y??0,I=t.height??0,R=[];return o?R=[{x:A-a.width/2,y:E-I/2},{x:A+a.width/2,y:E-I/2},{x:A+a.width/2,y:E-I/2+a.height+w},{x:A+p/2,y:E-I/2+a.height+w},{x:A+p/2,y:E+I/2},{x:A-p/2,y:E+I/2},{x:A-p/2,y:E-I/2+a.height+w},{x:A-a.width/2,y:E-I/2+a.height+w}]:R=[{x:A-p/2,y:E-I/2},{x:A+p/2,y:E-I/2},{x:A+p/2,y:E-I/2+y},{x:A+a.width/2,y:E-I/2+y},{x:A+a.width/2/2,y:E+I/2},{x:A-a.width/2,y:E+I/2},{x:A-a.width/2,y:E-I/2+y},{x:A-p/2,y:E-I/2+y}],N.polygon(t,R,T)},e}$(Za,"icon");async function Ja(g,t,{config:{themeVariables:r,flowchart:c}}){let{labelStyles:h}=L(t);t.labelStyle=h;let l=t.assetHeight??48,f=t.assetWidth??48,i=Math.max(l,f),n=c?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:e,bbox:a,label:s}=await X(g,t,"icon-shape default"),o=20,y=t.label?8:0,p=t.pos==="t",{nodeBorder:u,mainBkg:m}=r,{stylesMap:d}=Mt(t),x=v.svg(e),w=H(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let S=d.get("fill");w.stroke=S??m;let b=e.append("g");t.icon&&b.html(`<g>${await Dt(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);let k=b.node().getBBox(),M=k.width,P=k.height,W=k.x,B=k.y,D=Math.max(M,P)*Math.SQRT2+o*2,T=x.circle(0,0,D,w),A=Math.max(D,a.width),E=D+a.height+y,I=x.rectangle(-A/2,-E/2,A,E,{...w,fill:"transparent",stroke:"none"}),R=e.insert(()=>T,":first-child"),_=e.insert(()=>I);return b.attr("transform",`translate(${-M/2-W},${p?a.height/2+y/2-P/2-B:-a.height/2-y/2-P/2-B})`),b.attr("style",`color: ${d.get("stroke")??u};`),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))},${p?-E/2:E/2-a.height})`),R.attr("transform",`translate(0,${p?a.height/2+y/2:-a.height/2-y/2})`),C(t,_),t.intersect=function(O){return J.info("iconSquare intersect",t,O),N.rect(t,O)},e}$(Ja,"iconCircle");async function Ka(g,t,{config:{themeVariables:r,flowchart:c}}){let{labelStyles:h}=L(t);t.labelStyle=h;let l=t.assetHeight??48,f=t.assetWidth??48,i=Math.max(l,f),n=c?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:e,bbox:a,halfPadding:s,label:o}=await X(g,t,"icon-shape default"),y=t.pos==="t",p=i+s*2,u=i+s*2,{nodeBorder:m,mainBkg:d}=r,{stylesMap:x}=Mt(t),w=-u/2,S=-p/2,b=t.label?8:0,k=v.svg(e),M=H(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");let P=x.get("fill");M.stroke=P??d;let W=k.path(gt(w,S,u,p,5),M),B=Math.max(u,a.width),D=p+a.height+b,T=k.rectangle(-B/2,-D/2,B,D,{...M,fill:"transparent",stroke:"none"}),A=e.insert(()=>W,":first-child").attr("class","icon-shape2"),E=e.insert(()=>T);if(t.icon){let I=e.append("g");I.html(`<g>${await Dt(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);let R=I.node().getBBox(),_=R.width,O=R.height,G=R.x,q=R.y;I.attr("transform",`translate(${-_/2-G},${y?a.height/2+b/2-O/2-q:-a.height/2-b/2-O/2-q})`),I.attr("style",`color: ${x.get("stroke")??m};`)}return o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))},${y?-D/2:D/2-a.height})`),A.attr("transform",`translate(0,${y?a.height/2+b/2:-a.height/2-b/2})`),C(t,E),t.intersect=function(I){if(J.info("iconSquare intersect",t,I),!t.label)return N.rect(t,I);let R=t.x??0,_=t.y??0,O=t.height??0,G=[];return y?G=[{x:R-a.width/2,y:_-O/2},{x:R+a.width/2,y:_-O/2},{x:R+a.width/2,y:_-O/2+a.height+b},{x:R+u/2,y:_-O/2+a.height+b},{x:R+u/2,y:_+O/2},{x:R-u/2,y:_+O/2},{x:R-u/2,y:_-O/2+a.height+b},{x:R-a.width/2,y:_-O/2+a.height+b}]:G=[{x:R-u/2,y:_-O/2},{x:R+u/2,y:_-O/2},{x:R+u/2,y:_-O/2+p},{x:R+a.width/2,y:_-O/2+p},{x:R+a.width/2/2,y:_+O/2},{x:R-a.width/2,y:_+O/2},{x:R-a.width/2,y:_-O/2+p},{x:R-u/2,y:_-O/2+p}],N.polygon(t,G,I)},e}$(Ka,"iconRounded");async function Ua(g,t,{config:{themeVariables:r,flowchart:c}}){let{labelStyles:h}=L(t);t.labelStyle=h;let l=t.assetHeight??48,f=t.assetWidth??48,i=Math.max(l,f),n=c?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:e,bbox:a,halfPadding:s,label:o}=await X(g,t,"icon-shape default"),y=t.pos==="t",p=i+s*2,u=i+s*2,{nodeBorder:m,mainBkg:d}=r,{stylesMap:x}=Mt(t),w=-u/2,S=-p/2,b=t.label?8:0,k=v.svg(e),M=H(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");let P=x.get("fill");M.stroke=P??d;let W=k.path(gt(w,S,u,p,.1),M),B=Math.max(u,a.width),D=p+a.height+b,T=k.rectangle(-B/2,-D/2,B,D,{...M,fill:"transparent",stroke:"none"}),A=e.insert(()=>W,":first-child"),E=e.insert(()=>T);if(t.icon){let I=e.append("g");I.html(`<g>${await Dt(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);let R=I.node().getBBox(),_=R.width,O=R.height,G=R.x,q=R.y;I.attr("transform",`translate(${-_/2-G},${y?a.height/2+b/2-O/2-q:-a.height/2-b/2-O/2-q})`),I.attr("style",`color: ${x.get("stroke")??m};`)}return o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))},${y?-D/2:D/2-a.height})`),A.attr("transform",`translate(0,${y?a.height/2+b/2:-a.height/2-b/2})`),C(t,E),t.intersect=function(I){if(J.info("iconSquare intersect",t,I),!t.label)return N.rect(t,I);let R=t.x??0,_=t.y??0,O=t.height??0,G=[];return y?G=[{x:R-a.width/2,y:_-O/2},{x:R+a.width/2,y:_-O/2},{x:R+a.width/2,y:_-O/2+a.height+b},{x:R+u/2,y:_-O/2+a.height+b},{x:R+u/2,y:_+O/2},{x:R-u/2,y:_+O/2},{x:R-u/2,y:_-O/2+a.height+b},{x:R-a.width/2,y:_-O/2+a.height+b}]:G=[{x:R-u/2,y:_-O/2},{x:R+u/2,y:_-O/2},{x:R+u/2,y:_-O/2+p},{x:R+a.width/2,y:_-O/2+p},{x:R+a.width/2/2,y:_+O/2},{x:R-a.width/2,y:_+O/2},{x:R-a.width/2,y:_-O/2+p},{x:R-u/2,y:_-O/2+p}],N.polygon(t,G,I)},e}$(Ua,"iconSquare");async function Qa(g,t,{config:{flowchart:r}}){let c=new Image;c.src=t?.img??"",await c.decode();let h=Number(c.naturalWidth.toString().replace("px","")),l=Number(c.naturalHeight.toString().replace("px",""));t.imageAspectRatio=h/l;let{labelStyles:f}=L(t);t.labelStyle=f;let i=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;let n=Math.max(t.label?i??0:0,t?.assetWidth??h),e=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:n,a=t.constraint==="on"?e/t.imageAspectRatio:t?.assetHeight??l;t.width=Math.max(e,i??0);let{shapeSvg:s,bbox:o,label:y}=await X(g,t,"image-shape default"),p=t.pos==="t",u=-e/2,m=-a/2,d=t.label?8:0,x=v.svg(s),w=H(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let S=x.rectangle(u,m,e,a,w),b=Math.max(e,o.width),k=a+o.height+d,M=x.rectangle(-b/2,-k/2,b,k,{...w,fill:"none",stroke:"none"}),P=s.insert(()=>S,":first-child"),W=s.insert(()=>M);if(t.img){let B=s.append("image");B.attr("href",t.img),B.attr("width",e),B.attr("height",a),B.attr("preserveAspectRatio","none"),B.attr("transform",`translate(${-e/2},${p?k/2-a:-k/2})`)}return y.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))},${p?-a/2-o.height/2-d/2:a/2-o.height/2+d/2})`),P.attr("transform",`translate(0,${p?o.height/2+d/2:-o.height/2-d/2})`),C(t,W),t.intersect=function(B){if(J.info("iconSquare intersect",t,B),!t.label)return N.rect(t,B);let D=t.x??0,T=t.y??0,A=t.height??0,E=[];return p?E=[{x:D-o.width/2,y:T-A/2},{x:D+o.width/2,y:T-A/2},{x:D+o.width/2,y:T-A/2+o.height+d},{x:D+e/2,y:T-A/2+o.height+d},{x:D+e/2,y:T+A/2},{x:D-e/2,y:T+A/2},{x:D-e/2,y:T-A/2+o.height+d},{x:D-o.width/2,y:T-A/2+o.height+d}]:E=[{x:D-e/2,y:T-A/2},{x:D+e/2,y:T-A/2},{x:D+e/2,y:T-A/2+a},{x:D+o.width/2,y:T-A/2+a},{x:D+o.width/2/2,y:T+A/2},{x:D-o.width/2,y:T+A/2},{x:D-o.width/2,y:T-A/2+a},{x:D-e/2,y:T-A/2+a}],N.polygon(t,E,B)},s}$(Qa,"imageSquare");async function ts(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=h,f=t.look==="neo"?h*2:h,{shapeSvg:i,bbox:n}=await X(g,t,Y(t)),e=Math.max(n.height+l*2,t.height??0),a=Math.max(n.width+f*2,(t.width??0)-e),s=[{x:0,y:0},{x:a,y:0},{x:a+3*e/6,y:-e},{x:-3*e/6,y:-e}],o,{cssStyles:y}=t;if(t.look==="handDrawn"){let p=v.svg(i),u=H(t,{}),m=j(s),d=p.path(m,u);o=i.insert(()=>d,":first-child").attr("transform",`translate(${-a/2}, ${e/2})`),y&&o.attr("style",y)}else o=lt(i,a,e,s);return c&&o.attr("style",c),t.width=a,t.height=e,C(t,o),t.intersect=function(p){return N.polygon(t,s,p)},i}$(ts,"inv_trapezoid");async function as(g,t){let{shapeSvg:r,bbox:c,label:h}=await X(g,t,"label"),l=r.insert("rect",":first-child");return l.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),C(t,l),t.intersect=function(n){return N.rect(t,n)},r}$(as,"labelRect");async function ss(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=h,f=t.look==="neo"?h*2:h,{shapeSvg:i,bbox:n}=await X(g,t,Y(t)),e=Math.max(n.height+l,t.height??0),a=Math.max(n.width+f,(t.width??0)-e),s=[{x:0,y:0},{x:a+3*e/6,y:0},{x:a,y:-e},{x:-(3*e)/6,y:-e}],o,{cssStyles:y}=t;if(t.look==="handDrawn"){let p=v.svg(i),u=H(t,{}),m=j(s),d=p.path(m,u);o=i.insert(()=>d,":first-child").attr("transform",`translate(${-a/2}, ${e/2})`),y&&o.attr("style",y)}else o=lt(i,a,e,s);return c&&o.attr("style",c),t.width=a,t.height=e,C(t,o),t.intersect=function(p){return N.polygon(t,s,p)},i}$(ss,"lean_left");async function es(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=h,f=t.look==="neo"?h*2:h,{shapeSvg:i,bbox:n}=await X(g,t,Y(t)),e=Math.max(n.height+l,t.height??0),a=Math.max(n.width+f,(t.width??0)-e),s=[{x:-3*e/6,y:0},{x:a,y:0},{x:a+3*e/6,y:-e},{x:0,y:-e}],o,{cssStyles:y}=t;if(t.look==="handDrawn"){let p=v.svg(i),u=H(t,{}),m=j(s),d=p.path(m,u);o=i.insert(()=>d,":first-child").attr("transform",`translate(${-a/2}, ${e/2})`),y&&o.attr("style",y)}else o=lt(i,a,e,s);return c&&o.attr("style",c),t.width=a,t.height=e,C(t,o),t.intersect=function(p){return N.polygon(t,s,p)},i}$(es,"lean_right");function rs(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.label="",t.labelStyle=r;let h=g.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),{cssStyles:l}=t,f=Math.max(35,t?.width??0),i=Math.max(35,t?.height??0),n=7,e=[{x:f,y:0},{x:0,y:i+n/2},{x:f-2*n,y:i+n/2},{x:0,y:2*i},{x:f,y:i-n/2},{x:2*n,y:i-n/2}],a=v.svg(h),s=H(t,{});t.look!=="handDrawn"&&(s.roughness=0,s.fillStyle="solid");let o=j(e),y=a.path(o,s),p=h.insert(()=>y,":first-child");return p.attr("class","outer-path"),l&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",l),c&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",c),p.attr("transform",`translate(-${f/2},${-i})`),C(t,p),t.intersect=function(u){return J.info("lightningBolt intersect",t,u),N.polygon(t,e,u)},h}$(rs,"lightningBolt");var le=$((g,t,r,c,h,l,f)=>[`M${g},${t+l}`,`a${h},${l} 0,0,0 ${r},0`,`a${h},${l} 0,0,0 ${-r},0`,`l0,${c}`,`a${h},${l} 0,0,0 ${r},0`,`l0,${-c}`,`M${g},${t+l+f}`,`a${h},${l} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),ne=$((g,t,r,c,h,l,f)=>[`M${g},${t+l}`,`M${g+r},${t+l}`,`a${h},${l} 0,0,0 ${-r},0`,`l0,${c}`,`a${h},${l} 0,0,0 ${r},0`,`l0,${-c}`,`M${g},${t+l+f}`,`a${h},${l} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),ce=$((g,t,r,c,h,l)=>[`M${g-r/2},${-c/2}`,`a${h},${l} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),na=10,ca=10;async function is(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?16:h,f=t.look==="neo"?24:h;if(t.width||t.height){let d=t.width??0;t.width=(t.width??0)-l,t.width<ca&&(t.width=ca);let w=d/2/(2.5+d/50);t.height=(t.height??0)-f-w*3,t.height<na&&(t.height=na)}let{shapeSvg:i,bbox:n,label:e}=await X(g,t,Y(t)),a=(t?.width?t?.width:n.width)+l*2,s=a/2,o=s/(2.5+a/50),y=(t?.height?t?.height:n.height)+o+f*2,p=y*.1,u,{cssStyles:m}=t;if(t.look==="handDrawn"){let d=v.svg(i),x=ne(0,0,a,y,s,o,p),w=ce(0,o,a,y,s,o),S=H(t,{}),b=d.path(x,S),k=d.path(w,S);i.insert(()=>k,":first-child").attr("class","line"),u=i.insert(()=>b,":first-child"),u.attr("class","basic label-container"),m&&u.attr("style",m)}else{let d=le(0,0,a,y,s,o,p);u=i.insert("path",":first-child").attr("d",d).attr("class","basic label-container outer-path").attr("style",Q(m)).attr("style",c)}return u.attr("label-offset-y",o),u.attr("transform",`translate(${-a/2}, ${-(y/2+o)})`),C(t,u),e.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+o-(n.y-(n.top??0))})`),t.intersect=function(d){let x=N.rect(t,d),w=x.x-(t.x??0);if(s!=0&&(Math.abs(w)<(t.width??0)/2||Math.abs(w)==(t.width??0)/2&&Math.abs(x.y-(t.y??0))>(t.height??0)/2-o)){let S=o*o*(1-w*w/(s*s));S>0&&(S=Math.sqrt(S)),S=o-S,d.y-(t.y??0)>0&&(S=-S),x.y+=S}return x},i}$(is,"linedCylinder");async function ls(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?16:h,f=t.look==="neo"?12:h;if(t.width||t.height){let S=t.width;t.width=(S??0)*10/11-l*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-f*2,t.height<10&&(t.height=10)}let{shapeSvg:i,bbox:n,label:e}=await X(g,t,Y(t)),a=(t?.width?t?.width:n.width)+(l??0)*2,s=(t?.height?t?.height:n.height)+(f??0)*2,o=t.look==="neo"?s/4:s/8,y=s+o,{cssStyles:p}=t,u=v.svg(i),m=H(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let d=[{x:-a/2-a/2*.1,y:-y/2},{x:-a/2-a/2*.1,y:y/2},...pt(-a/2-a/2*.1,y/2,a/2+a/2*.1,y/2,o,.8),{x:a/2+a/2*.1,y:-y/2},{x:-a/2-a/2*.1,y:-y/2},{x:-a/2,y:-y/2},{x:-a/2,y:y/2*1.1},{x:-a/2,y:-y/2}],x=u.polygon(d.map(S=>[S.x,S.y]),m),w=i.insert(()=>x,":first-child");return w.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",p),c&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",c),w.attr("transform",`translate(0,${-o/2})`),e.attr("transform",`translate(${-a/2+(t.padding??0)+a/2*.1/2-(n.x-(n.left??0))},${-s/2+(t.padding??0)-o/2-(n.y-(n.top??0))})`),C(t,w),t.intersect=function(S){return N.polygon(t,d,S)},i}$(ls,"linedWaveEdgedRect");async function ns(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?16:h,f=t.look==="neo"?12:h,i=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-l*2-2*i,10),t.height=Math.max((t?.height??0)-f*2-2*i,10));let{shapeSvg:n,bbox:e,label:a}=await X(g,t,Y(t)),s=(t?.width?t?.width:e.width)+l*2+2*i,o=(t?.height?t?.height:e.height)+f*2+2*i,y=s-2*i,p=o-2*i,u=-y/2,m=-p/2,{cssStyles:d}=t,x=v.svg(n),w=H(t,{}),S=[{x:u-i,y:m+i},{x:u-i,y:m+p+i},{x:u+y-i,y:m+p+i},{x:u+y-i,y:m+p},{x:u+y,y:m+p},{x:u+y,y:m+p-i},{x:u+y+i,y:m+p-i},{x:u+y+i,y:m-i},{x:u+i,y:m-i},{x:u+i,y:m},{x:u,y:m},{x:u,y:m+i}],b=[{x:u,y:m+i},{x:u+y-i,y:m+i},{x:u+y-i,y:m+p},{x:u+y,y:m+p},{x:u+y,y:m},{x:u,y:m}];t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let k=j(S),M=x.path(k,w),P=j(b),W=x.path(P,w);t.look!=="handDrawn"&&(M=Xt(M),W=Xt(W));let B=n.insert("g",":first-child");return B.insert(()=>M),B.insert(()=>W),B.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",d),c&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",c),a.attr("transform",`translate(${-(e.width/2)-i-(e.x-(e.left??0))}, ${-(e.height/2)+i-(e.y-(e.top??0))})`),C(t,B),t.intersect=function(D){return N.polygon(t,S,D)},n}$(ns,"multiRect");async function cs(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let{shapeSvg:h,bbox:l,label:f}=await X(g,t,Y(t)),i=t.padding??0,n=t.look==="neo"?16:i,e=t.look==="neo"?12:i,a=!0;(t.width||t.height)&&(a=!1,t.width=(t?.width??0)-n*2,t.height=(t?.height??0)-e*3);let s=Math.max(l.width,t?.width??0)+n*2,o=Math.max(l.height,t?.height??0)+e*3,y=t.look==="neo"?o/4:o/8,p=o+(a?y/2:-y/2),u=-s/2,m=-p/2,d=10,{cssStyles:x}=t,w=pt(u-d,m+p+d,u+s-d,m+p+d,y,.8),S=w?.[w.length-1],b=[{x:u-d,y:m+d},{x:u-d,y:m+p+d},...w,{x:u+s-d,y:S.y-d},{x:u+s,y:S.y-d},{x:u+s,y:S.y-2*d},{x:u+s+d,y:S.y-2*d},{x:u+s+d,y:m-d},{x:u+d,y:m-d},{x:u+d,y:m},{x:u,y:m},{x:u,y:m+d}],k=[{x:u,y:m+d},{x:u+s-d,y:m+d},{x:u+s-d,y:S.y-d},{x:u+s,y:S.y-d},{x:u+s,y:m},{x:u,y:m}],M=v.svg(h),P=H(t,{});t.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid");let W=j(b),B=M.path(W,P),D=j(k),T=M.path(D,P),A=h.insert(()=>B,":first-child");return A.insert(()=>T),A.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",x),c&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",c),A.attr("transform",`translate(0,${-y/2})`),f.attr("transform",`translate(${-(l.width/2)-d-(l.x-(l.left??0))}, ${-(l.height/2)+d-y/2-(l.y-(l.top??0))})`),C(t,A),t.intersect=function(E){return N.polygon(t,b,E)},h}$(cs,"multiWaveEdgedRectangle");async function os(g,t,{config:{themeVariables:r}}){let{labelStyles:c,nodeStyles:h}=L(t);t.labelStyle=c,t.useHtmlLabels||mt(bt())||(t.centerLabel=!0);let{shapeSvg:f,bbox:i,label:n}=await X(g,t,Y(t)),e=Math.max(i.width+(t.padding??0)*2,t?.width??0),a=Math.max(i.height+(t.padding??0)*2,t?.height??0),s=-e/2,o=-a/2,{cssStyles:y}=t,p=v.svg(f),u=H(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let m=p.rectangle(s,o,e,a,u),d=f.insert(()=>m,":first-child");return d.attr("class","basic label-container outer-path"),n.attr("class","label noteLabel"),y&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",y),h&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",h),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),C(t,d),t.intersect=function(x){return N.rect(t,x)},f}$(os,"note");var oe=$((g,t,r)=>[`M${g+r/2},${t}`,`L${g+r},${t-r/2}`,`L${g+r/2},${t-r}`,`L${g},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function hs(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let{shapeSvg:h,bbox:l}=await X(g,t,Y(t)),f=l.width+(t.padding??0),i=l.height+(t.padding??0),n=f+i,e=.5,a=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],s,{cssStyles:o}=t;if(t.look==="handDrawn"){let y=v.svg(h),p=H(t,{}),u=oe(0,0,n),m=y.path(u,p);s=h.insert(()=>m,":first-child").attr("transform",`translate(${-n/2+e}, ${n/2})`),o&&s.attr("style",o)}else s=lt(h,n,n,a),s.attr("transform",`translate(${-n/2+e}, ${n/2})`);return c&&s.attr("style",c),C(t,s),t.calcIntersect=function(y,p){let u=y.width,m=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}],d=N.polygon(y,m,p);return{x:d.x-.5,y:d.y-.5}},t.intersect=function(y){return this.calcIntersect(t,y)},h}$(hs,"question");async function gs(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?21:h??0,f=t.look==="neo"?12:h??0,{shapeSvg:i,bbox:n,label:e}=await X(g,t,Y(t)),a=n.width+(t.look==="neo"?l*2:l),s=Math.max(n.height+(t.look==="neo"?f*2:f),t.height??0),o=s/4,p=-Math.max(a,(t.width??0)-o)/2,u=-s/2,m=u/2,d=[{x:p+m,y:u},{x:p,y:0},{x:p+m,y:-u},{x:-p,y:-u},{x:-p,y:u}],{cssStyles:x}=t,w=v.svg(i),S=H(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");let b=j(d),k=w.path(b,S),M=i.insert(()=>k,":first-child");return M.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",x),c&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",c),M.attr("transform",`translate(${-m/2},0)`),e.attr("transform",`translate(${-m/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),C(t,M),t.intersect=function(P){return N.polygon(t,d,P)},i}$(gs,"rect_left_inv_arrow");async function ys(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h;t.cssClasses?h="node "+t.cssClasses:h="node default";let l=g.insert("g").attr("class",h).attr("id",t.domId||t.id),f=l.insert("g"),i=l.insert("g").attr("class","label").attr("style",c),n=t.description,e=t.label,a=await aa(i,e,t.labelStyle,!0,!0),s={width:0,height:0};if(mt(K())){let P=a.children[0],W=V(a);s=P.getBoundingClientRect(),W.attr("width",s.width),W.attr("height",s.height)}J.info("Text 2",n);let o=n||[],y=a.getBBox(),p=await aa(i,Array.isArray(o)?o.join("<br/>"):o,t.labelStyle,!0,!0),u=p.children[0],m=V(p);s=u.getBoundingClientRect(),m.attr("width",s.width),m.attr("height",s.height);let d=(t.padding||0)/2;V(p).attr("transform","translate( "+(s.width>y.width?0:(y.width-s.width)/2)+", "+(y.height+d+5)+")"),V(a).attr("transform","translate( "+(s.width<y.width?0:-(y.width-s.width)/2)+", 0)"),s=i.node().getBBox(),i.attr("transform","translate("+-s.width/2+", "+(-s.height/2-d+3)+")");let x=s.width+(t.padding||0),w=s.height+(t.padding||0),S=-s.width/2-d,b=-s.height/2-d,k,M;if(t.look==="handDrawn"){let P=v.svg(l),W=H(t,{}),B=P.path(gt(S,b,x,w,t.rx||0),W),D=P.line(-s.width/2-d,-s.height/2-d+y.height+d,s.width/2+d,-s.height/2-d+y.height+d,W);M=l.insert(()=>(J.debug("Rough node insert CXC",B),D),":first-child"),k=l.insert(()=>(J.debug("Rough node insert CXC",B),B),":first-child")}else k=f.insert("rect",":first-child"),M=f.insert("line"),k.attr("class","outer title-state").attr("style",c).attr("x",-s.width/2-d).attr("y",-s.height/2-d).attr("width",s.width+(t.padding||0)).attr("height",s.height+(t.padding||0)),M.attr("class","divider").attr("x1",-s.width/2-d).attr("x2",s.width/2+d).attr("y1",-s.height/2-d+y.height+d).attr("y2",-s.height/2-d+y.height+d);return C(t,k),t.intersect=function(P){return N.rect(t,P)},l}$(ys,"rectWithTitle");async function fs(g,t,{config:{themeVariables:r}}){let c=r?.radius??5,h={rx:c,ry:c,classes:"",labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return Pt(g,t,h)}$(fs,"roundedRect");var xt=8;async function ps(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?12:t.padding??0,{shapeSvg:f,bbox:i,label:n}=await X(g,t,Y(t)),e=(t?.width??i.width)+h*2+(t.look==="neo"?xt:xt*2),a=(t?.height??i.height)+l*2,s=e-xt,o=a,y=xt-e/2,p=-a/2,{cssStyles:u}=t,m=v.svg(f),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let x=[{x:y,y:p},{x:y+s,y:p},{x:y+s,y:p+o},{x:y-xt,y:p+o},{x:y-xt,y:p},{x:y,y:p},{x:y,y:p+o}],w=m.polygon(x.map(b=>[b.x,b.y]),d),S=f.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path").attr("style",Q(u)),c&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",c),u&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",c),n.attr("transform",`translate(${xt/2-i.width/2-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),C(t,S),t.intersect=function(b){return N.rect(t,b)},f}$(ps,"shadedProcess");async function us(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?16:h,f=t.look==="neo"?12:h;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-l*2,10),t.height=Math.max((t?.height??0)/1.5-f*2,10));let{shapeSvg:i,bbox:n,label:e}=await X(g,t,Y(t)),a=(t?.width?t?.width:n.width)+l*2,s=((t?.height?t?.height:n.height)+f*2)*1.5,o=a,y=s/1.5,p=-o/2,u=-y/2,{cssStyles:m}=t,d=v.svg(i),x=H(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let w=[{x:p,y:u},{x:p,y:u+y},{x:p+o,y:u+y},{x:p+o,y:u-y/2}],S=j(w),b=d.path(S,x),k=i.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",m),c&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",c),k.attr("transform",`translate(0, ${y/4})`),e.attr("transform",`translate(${-o/2+(t.padding??0)-(n.x-(n.left??0))}, ${-y/4+(t.padding??0)-(n.y-(n.top??0))})`),C(t,k),t.intersect=function(M){return N.polygon(t,w,M)},i}$(us,"slopedRect");async function ds(g,t){let r=t.padding??0,c=t.look==="neo"?16:r*2,h=t.look==="neo"?12:r,l={rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??c,labelPaddingY:h};return Pt(g,t,l)}$(ds,"squareRect");async function ms(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?20:h,f=t.look==="neo"?12:h,{shapeSvg:i,bbox:n}=await X(g,t,Y(t)),e=n.height+(t.look==="neo"?f*2:f),a=n.width+e/4+(t.look==="neo"?l*2:l),s=e/2,{cssStyles:o}=t,y=v.svg(i),p=H(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let u=[{x:-a/2+s,y:-e/2},{x:a/2-s,y:-e/2},...it(-a/2+s,0,s,50,90,270),{x:a/2-s,y:e/2},...it(a/2-s,0,s,50,270,450)],m=j(u),d=y.path(m,p),x=i.insert(()=>d,":first-child");return x.attr("class","basic label-container outer-path"),o&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",o),c&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",c),C(t,x),t.intersect=function(w){return N.polygon(t,u,w)},i}$(ms,"stadium");async function xs(g,t){let r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5,classes:"flowchart-node"};return Pt(g,t,r)}$(xs,"state");function ws(g,t,{config:{themeVariables:r}}){let{labelStyles:c,nodeStyles:h}=L(t);t.labelStyle=c;let{cssStyles:l}=t,{lineColor:f,stateBorder:i,nodeBorder:n,nodeShadow:e}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let a=g.insert("g").attr("class","node default").attr("id",t.domId??t.id),s=v.svg(a),o=H(t,{});t.look!=="handDrawn"&&(o.roughness=0,o.fillStyle="solid");let y=s.circle(0,0,t.width,{...o,stroke:f,strokeWidth:2}),p=i??n,u=(t.width??0)*5/14,m=s.circle(0,0,u,{...o,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),d=a.insert(()=>y,":first-child");if(d.insert(()=>m),t.look!=="handDrawn"&&d.attr("class","outer-path"),l&&d.selectAll("path").attr("style",l),h&&d.selectAll("path").attr("style",h),t.width<25&&e&&t.look!=="handDrawn"){let x=g.node()?.ownerSVGElement?.id??"",w=x?`${x}-drop-shadow-small`:"drop-shadow-small";d.attr("style",`filter:url(#${w})`)}return C(t,d),t.intersect=function(x){return N.circle(t,(t.width??0)/2,x)},a}$(ws,"stateEnd");function bs(g,t,{config:{themeVariables:r}}){let{lineColor:c,nodeShadow:h}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let l=g.insert("g").attr("class","node default").attr("id",t.domId||t.id),f;if(t.look==="handDrawn"){let n=v.svg(l).circle(0,0,t.width,Ut(c));f=l.insert(()=>n),f.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else f=l.insert("circle",":first-child"),f.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&h&&t.look!=="handDrawn"){let i=g.node()?.ownerSVGElement?.id??"",n=i?`${i}-drop-shadow-small`:"drop-shadow-small";f.attr("style",`filter:url(#${n})`)}return C(t,f),t.intersect=function(i){return N.circle(t,(t.width??7)/2,i)},l}$(bs,"stateStart");var $t=8;async function Ss(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t?.padding??8,l=t.look==="neo"?28:h,f=t.look==="neo"?12:h,{shapeSvg:i,bbox:n}=await X(g,t,Y(t)),e=Math.max(n.width+2*$t+l,t.width??0),a=Math.max(n.height+f,t.height??0),s=e-2*$t,o=a,y=-e/2,p=-a/2,u=[{x:0,y:0},{x:s,y:0},{x:s,y:-o},{x:0,y:-o},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-o},{x:-8,y:-o},{x:-8,y:0}];if(t.look==="handDrawn"){let m=v.svg(i),d=H(t,{}),x=m.rectangle(y,p,s+16,o,d),w=m.line(y+$t,p,y+$t,p+o,d),S=m.line(y+$t+s,p,y+$t+s,p+o,d);i.insert(()=>w,":first-child"),i.insert(()=>S,":first-child");let b=i.insert(()=>x,":first-child"),{cssStyles:k}=t;b.attr("class","basic label-container").attr("style",Q(k)),C(t,b)}else{let m=lt(i,s,o,u);c&&m.attr("style",c),C(t,m)}return t.intersect=function(m){return N.polygon(t,u,m)},i}$(Ss,"subroutine");var Yt=.2;async function $s(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?16:h,f=t.look==="neo"?12:h;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-f*2,10),t.width=Math.max((t?.width??0)-l*2-Yt*(t.height+f*2),10));let{shapeSvg:i,bbox:n}=await X(g,t,Y(t)),e=(t?.height?t?.height:n.height)+f*2,a=Yt*e,s=Yt*e,y=(t?.width?t?.width:n.width)+l*2+a-a,p=e,u=-y/2,m=-p/2,{cssStyles:d}=t,x=v.svg(i),w=H(t,{}),S=[{x:u-a/2,y:m},{x:u+y+a/2,y:m},{x:u+y+a/2,y:m+p},{x:u-a/2,y:m+p}],b=[{x:u+y-a/2,y:m+p},{x:u+y+a/2,y:m+p},{x:u+y+a/2,y:m+p-s}];t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let k=j(S),M=x.path(k,w),P=j(b),W=x.path(P,{...w,fillStyle:"solid"}),B=i.insert(()=>W,":first-child");return B.insert(()=>M,":first-child"),B.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",d),c&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",c),C(t,B),t.intersect=function(D){return N.polygon(t,S,D)},i}$($s,"taggedRect");async function vs(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let{shapeSvg:h,bbox:l,label:f}=await X(g,t,Y(t)),i=Math.max(l.width+(t.padding??0)*2,t?.width??0),n=Math.max(l.height+(t.padding??0)*2,t?.height??0),e=n/8,a=.2*i,s=.2*n,o=n+e,{cssStyles:y}=t,p=v.svg(h),u=H(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let m=[{x:-i/2-i/2*.1,y:o/2},...pt(-i/2-i/2*.1,o/2,i/2+i/2*.1,o/2,e,.8),{x:i/2+i/2*.1,y:-o/2},{x:-i/2-i/2*.1,y:-o/2}],d=-i/2+i/2*.1,x=-o/2-s*.4,w=[{x:d+i-a,y:(x+n)*1.3},{x:d+i,y:x+n-s},{x:d+i,y:(x+n)*.9},...pt(d+i,(x+n)*1.25,d+i-a,(x+n)*1.3,-n*.02,.5)],S=j(m),b=p.path(S,u),k=j(w),M=p.path(k,{...u,fillStyle:"solid"}),P=h.insert(()=>M,":first-child");return P.insert(()=>b,":first-child"),P.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",y),c&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",c),P.attr("transform",`translate(0,${-e/2})`),f.attr("transform",`translate(${-i/2+(t.padding??0)-(l.x-(l.left??0))},${-n/2+(t.padding??0)-e/2-(l.y-(l.top??0))})`),C(t,P),t.intersect=function(W){return N.polygon(t,m,W)},h}$(vs,"taggedWaveEdgedRectangle");async function ks(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let{shapeSvg:h,bbox:l}=await X(g,t,Y(t)),f=Math.max(l.width+(t.padding??0),t?.width||0),i=Math.max(l.height+(t.padding??0),t?.height||0),n=-f/2,e=-i/2,a=h.insert("rect",":first-child");return a.attr("class","text").attr("style",c).attr("rx",0).attr("ry",0).attr("x",n).attr("y",e).attr("width",f).attr("height",i),C(t,a),t.intersect=function(s){return N.rect(t,s)},h}$(ks,"text");var he=$((g,t,r,c,h,l)=>`M${g},${t}
a${h},${l} 0,0,1 0,${-c}
l${r},0
a${h},${l} 0,0,1 0,${c}
M${r},${-c}
a${h},${l} 0,0,0 0,${c}
l${-r},0`,"createCylinderPathD"),ge=$((g,t,r,c,h,l)=>[`M${g},${t}`,`M${g+r},${t}`,`a${h},${l} 0,0,0 0,${-c}`,`l${-r},0`,`a${h},${l} 0,0,0 0,${c}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),ye=$((g,t,r,c,h,l)=>[`M${g+r/2},${-c/2}`,`a${h},${l} 0,0,0 0,${c}`].join(" "),"createInnerCylinderPathD"),oa=5,ha=10;async function Ps(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?12:h/2,f=t.height??0;if(t.height&&(t.height=t.height-l,t.height<oa&&(t.height=oa)),t.width){let d=f/2/(2.5+f/50);t.width=t.width-l-d*3,t.width<ha&&(t.width=ha)}let{shapeSvg:i,bbox:n,label:e}=await X(g,t,Y(t)),a=Math.max(t.height??0,n.height)+l,s=a/2,o=s/(2.5+a/50),y=Math.max(t.width??0,n.width)+o+l,{cssStyles:p}=t,u;if(t.look==="handDrawn"){let m=v.svg(i),d=ge(0,0,y,a,o,s),x=ye(0,0,y,a,o,s),w=m.path(d,H(t,{})),S=m.path(x,H(t,{fill:"none"}));u=i.insert(()=>S,":first-child"),u=i.insert(()=>w,":first-child"),u.attr("class","basic label-container"),p&&u.attr("style",p)}else{let m=he(0,0,y,a,o,s);u=i.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Q(p)).attr("style",c),u.attr("class","basic label-container outer-path"),p&&u.selectAll("path").attr("style",p),c&&u.selectAll("path").attr("style",c)}return u.attr("label-offset-x",o),u.attr("transform",`translate(${-y/2}, ${a/2} )`),e.attr("transform",`translate(${-(n.width/2)-o-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),C(t,u),t.intersect=function(m){let d=N.rect(t,m),x=d.y-(t.y??0);if(s!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(d.x-(t.x??0))>(t.width??0)/2-o)){let w=o*o*(1-x*x/(s*s));w!=0&&(w=Math.sqrt(Math.abs(w))),w=o-w,m.x-(t.x??0)>0&&(w=-w),d.x+=w}return d},i}$(Ps,"tiltedCylinder");async function Ms(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=(t.look==="neo",h),f=t.look==="neo"?h*2:h,{shapeSvg:i,bbox:n}=await X(g,t,Y(t)),e=Math.max(n.height+l,t.height??0),a=Math.max(n.width+f,(t.width??0)-e),s=[{x:-3*e/6,y:0},{x:a+3*e/6,y:0},{x:a,y:-e},{x:0,y:-e}],o,{cssStyles:y}=t;if(t.look==="handDrawn"){let p=v.svg(i),u=H(t,{}),m=j(s),d=p.path(m,u);o=i.insert(()=>d,":first-child").attr("transform",`translate(${-a/2}, ${e/2})`),y&&o.attr("style",y)}else o=lt(i,a,e,s);return c&&o.attr("style",c),t.width=a,t.height=e,C(t,o),t.intersect=function(p){return N.polygon(t,s,p)},i}$(Ms,"trapezoid");async function Ds(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?16:h,f=t.look==="neo"?12:h,i=15,n=5;(t.width||t.height)&&(t.height=(t.height??0)-f*2,t.height<n&&(t.height=n),t.width=(t.width??0)-l*2,t.width<i&&(t.width=i));let{shapeSvg:e,bbox:a}=await X(g,t,Y(t)),s=(t?.width?t?.width:a.width)+l*2,o=(t?.height?t?.height:a.height)+f*2,{cssStyles:y}=t,p=v.svg(e),u=H(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let m=[{x:-s/2*.8,y:-o/2},{x:s/2*.8,y:-o/2},{x:s/2,y:-o/2*.6},{x:s/2,y:o/2},{x:-s/2,y:o/2},{x:-s/2,y:-o/2*.6}],d=j(m),x=p.path(d,u),w=e.insert(()=>x,":first-child");return w.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",y),c&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",c),C(t,w),t.intersect=function(S){return N.polygon(t,m,S)},e}$(Ds,"trapezoidalPentagon");var ga=10,ya=10;async function Ns(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?h*2:h;(t.width||t.height)&&(t.width=((t?.width??0)-l)/2,t.width<ya&&(t.width=ya),t.height=t?.height??0,t.height<ga&&(t.height=ga));let{shapeSvg:f,bbox:i,label:n}=await X(g,t,Y(t)),e=dt(K().flowchart?.htmlLabels),a=(t?.width?t?.width:i.width)+l,s=t?.height?t?.height:a+i.height,o=s,y=[{x:0,y:0},{x:o,y:0},{x:o/2,y:-s}],{cssStyles:p}=t,u=v.svg(f),m=H(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let d=j(y),x=u.path(d,m),w=f.insert(()=>x,":first-child").attr("transform",`translate(${-s/2}, ${s/2})`).attr("class","outer-path");return p&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",p),c&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",c),t.width=a,t.height=s,C(t,w),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${s/2-(i.height+(t.padding??0)/(e?2:1)-(i.y-(i.top??0)))})`),t.intersect=function(S){return J.info("Triangle intersect",t,y,S),N.polygon(t,y,S)},f}$(Ns,"triangle");async function Bs(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?16:h,f=t.look==="neo"?12:h,i=!0;(t.width||t.height)&&(i=!1,t.width=(t?.width??0)-l*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-f*2,t.height<10&&(t.height=10));let{shapeSvg:n,bbox:e,label:a}=await X(g,t,Y(t)),s=(t?.width?t?.width:e.width)+(l??0)*2,o=(t?.height?t?.height:e.height)+(f??0)*2,y=t.look==="neo"?o/4:o/8,p=o+(i?y:-y),{cssStyles:u}=t,d=14-s,x=d>0?d/2:0,w=v.svg(n),S=H(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");let b=[{x:-s/2-x,y:p/2},...pt(-s/2-x,p/2,s/2+x,p/2,y,.8),{x:s/2+x,y:-p/2},{x:-s/2-x,y:-p/2}],k=j(b),M=w.path(k,S),P=n.insert(()=>M,":first-child");return P.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",u),c&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",c),P.attr("transform",`translate(0,${-y/2})`),a.attr("transform",`translate(${-s/2+(t.padding??0)-(e.x-(e.left??0))},${-o/2+(t.padding??0)-y-(e.y-(e.top??0))})`),C(t,P),t.intersect=function(W){return N.polygon(t,b,W)},n}$(Bs,"waveEdgedRectangle");async function Cs(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.padding??0,l=t.look==="neo"?16:h,f=t.look==="neo"?20:h;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);let S=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-f-S*(20/9)),t.width=t.width-l*2}let{shapeSvg:i,bbox:n}=await X(g,t,Y(t)),e=(t?.width?t?.width:n.width)+l*2,a=(t?.height?t?.height:n.height)+f,s=a/8,o=a+s*2,{cssStyles:y}=t,p=v.svg(i),u=H(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let m=[{x:-e/2,y:o/2},...pt(-e/2,o/2,e/2,o/2,s,1),{x:e/2,y:-o/2},...pt(e/2,-o/2,-e/2,-o/2,s,-1)],d=j(m),x=p.path(d,u),w=i.insert(()=>x,":first-child");return w.attr("class","basic label-container"),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",y),c&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",c),C(t,w),t.intersect=function(S){return N.polygon(t,m,S)},i}$(Cs,"waveRectangle");var Z=10;async function As(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-h*2-Z,10),t.height=Math.max((t?.height??0)-l*2-Z,10));let{shapeSvg:f,bbox:i,label:n}=await X(g,t,Y(t)),e=(t?.width?t?.width:i.width)+h*2+Z,a=(t?.height?t?.height:i.height)+l*2+Z,s=e-Z,o=a-Z,y=-s/2,p=-o/2,{cssStyles:u}=t,m=v.svg(f),d=H(t,{}),x=[{x:y-Z,y:p-Z},{x:y-Z,y:p+o},{x:y+s,y:p+o},{x:y+s,y:p-Z}],w=`M${y-Z},${p-Z} L${y+s},${p-Z} L${y+s},${p+o} L${y-Z},${p+o} L${y-Z},${p-Z}
M${y-Z},${p} L${y+s},${p}
M${y},${p-Z} L${y},${p+o}`;t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let S=m.path(w,d),b=f.insert(()=>S,":first-child");return b.attr("transform",`translate(${Z/2}, ${Z/2})`),b.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",u),c&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",c),n.attr("transform",`translate(${-(i.width/2)+Z/2-(i.x-(i.left??0))}, ${-(i.height/2)+Z/2-(i.y-(i.top??0))})`),C(t,b),t.intersect=function(k){return N.polygon(t,x,k)},f}$(As,"windowPane");var fa=new Set(["redux-color","redux-dark-color"]),fe=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Vt(g,t){let r=t;r.alias&&(t.label=r.alias);let{theme:c,themeVariables:h}=bt(),{rowEven:l,rowOdd:f,nodeBorder:i,borderColorArray:n}=h;if(t.look==="handDrawn"){let{themeVariables:F}=bt(),{background:z}=F,U={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${z}`]};await Vt(g,U)}let e=bt();t.useHtmlLabels=e.htmlLabels;let a=e.er?.diagramPadding??10,s=e.er?.entityPadding??6,{cssStyles:o}=t,{labelStyles:y,nodeStyles:p}=L(t);if(r.attributes.length===0&&t.label){let F={rx:0,ry:0,labelPaddingX:a,labelPaddingY:a*1.5,classes:""};Nt(t.label,e)+F.labelPaddingX*2<e.er.minEntityWidth&&(t.width=e.er.minEntityWidth);let z=await Pt(g,t,F);if(c!=null&&fa.has(c)){let U=r.colorIndex??0;z.attr("data-color-id",`color-${U%n.length}`)}if(!dt(e.htmlLabels)){let U=z.select("text"),at=U.node()?.getBBox();U.attr("transform",`translate(${-at.width/2}, 0)`)}return z}e.htmlLabels||(a*=1.25,s*=1.25);let u=Y(t);u||(u="node default");let m=g.insert("g").attr("class",u).attr("id",t.domId||t.id),d=await vt(m,t.label??"",e,0,0,["name"],y);d.height+=s;let x=0,w=[],S=[],b=0,k=0,M=0,P=0,W=!0,B=!0;for(let F of r.attributes){let z=await vt(m,F.type,e,0,x,["attribute-type"],y);b=Math.max(b,z.width+a);let U=await vt(m,F.name,e,0,x,["attribute-name"],y);k=Math.max(k,U.width+a);let at=await vt(m,F.keys.join(),e,0,x,["attribute-keys"],y);M=Math.max(M,at.width+a);let ut=await vt(m,F.comment,e,0,x,["attribute-comment"],y);P=Math.max(P,ut.width+a);let yt=Math.max(z.height,U.height,at.height,ut.height)+s;S.push({yOffset:x,rowHeight:yt}),x+=yt}let D=4;M<=a&&(W=!1,M=0,D--),P<=a&&(B=!1,P=0,D--);let T=m.node().getBBox();if(d.width+a*2-(b+k+M+P)>0){let F=d.width+a*2-(b+k+M+P);b+=F/D,k+=F/D,M>0&&(M+=F/D),P>0&&(P+=F/D)}let A=b+k+M+P,E=v.svg(m),I=H(t,{});t.look!=="handDrawn"&&(I.roughness=0,I.fillStyle="solid");let R=0;S.length>0&&(R=S.reduce((F,z)=>F+(z?.rowHeight??0),0));let _=Math.max(T.width+a*2,t?.width||0,A),O=Math.max((R??0)+d.height,t?.height||0),G=-_/2,q=-O/2;if(m.selectAll("g:not(:first-child)").each((F,z,U)=>{let at=V(U[z]),ut=at.attr("transform"),yt=0,Zt=0;if(ut){let Ht=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ut);Ht&&(yt=parseFloat(Ht[1]),Zt=parseFloat(Ht[2]),at.attr("class").includes("attribute-name")?yt+=b:at.attr("class").includes("attribute-keys")?yt+=b+k:at.attr("class").includes("attribute-comment")&&(yt+=b+k+M))}at.attr("transform",`translate(${G+a/2+yt}, ${Zt+q+d.height+s/2})`)}),m.select(".name").attr("transform","translate("+-d.width/2+", "+(q+s/2)+")"),c!=null&&fa.has(c)){let F=r.colorIndex??0;m.attr("data-color-id",`color-${F%n.length}`)}let nt=E.rectangle(G,q,_,O,I),wt=m.insert(()=>nt,":first-child").attr("class","outer-path").attr("style",o.join(""));w.push(0);for(let[F,z]of S.entries()){let at=(F+1)%2===0&&z.yOffset!==0,ut=E.rectangle(G,d.height+q+z?.yOffset,_,z?.rowHeight,{...I,fill:at?l:f,stroke:i});m.insert(()=>ut,"g.label").attr("style",o.join("")).attr("class",`row-rect-${at?"even":"odd"}`)}let et=1e-4,st=kt(G,d.height+q,_+G,d.height+q,et),ct=E.polygon(st.map(F=>[F.x,F.y]),I);if(m.insert(()=>ct).attr("class","divider"),st=kt(b+G,d.height+q,b+G,O+q,et),ct=E.polygon(st.map(F=>[F.x,F.y]),I),m.insert(()=>ct).attr("class","divider"),W){let F=b+k+G;st=kt(F,d.height+q,F,O+q,et),ct=E.polygon(st.map(z=>[z.x,z.y]),I),m.insert(()=>ct).attr("class","divider")}if(B){let F=b+k+M+G;st=kt(F,d.height+q,F,O+q,et),ct=E.polygon(st.map(z=>[z.x,z.y]),I),m.insert(()=>ct).attr("class","divider")}for(let F of w){let z=d.height+q+F;st=kt(G,z,_+G,z,et),ct=E.polygon(st.map(U=>[U.x,U.y]),I),m.insert(()=>ct).attr("class","divider")}if(C(t,wt),p&&t.look!=="handDrawn")if(c!=null&&fe.has(c))m.selectAll("path").attr("style",p);else{let z=p.split(";")?.filter(U=>U.includes("stroke"))?.map(U=>`${U}`).join("; ");m.selectAll("path").attr("style",z??""),m.selectAll(".row-rect-even path").attr("style",p)}return t.intersect=function(F){return N.rect(t,F)},m}$(Vt,"erBox");async function vt(g,t,r,c=0,h=0,l=[],f=""){let i=g.insert("g").attr("class",`label ${l.join(" ")}`).attr("transform",`translate(${c}, ${h})`).attr("style",f);t!==It(t)&&(t=It(t),t=t.replaceAll("<","<").replaceAll(">",">"));let n=i.node().appendChild(await ft(i,t,{width:Nt(t,r)+100,style:f,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let a=n.children[0];for(a.textContent=a.textContent.replaceAll("<","<").replaceAll(">",">");a.childNodes[0];)a=a.childNodes[0],a.textContent=a.textContent.replaceAll("<","<").replaceAll(">",">")}let e=n.getBBox();if(dt(r.htmlLabels)){let a=n.children[0];a.style.textAlign="start";let s=V(n);e=a.getBoundingClientRect(),s.attr("width",e.width),s.attr("height",e.height)}return e}$(vt,"addText");function kt(g,t,r,c,h){return g===r?[{x:g-h/2,y:t},{x:g+h/2,y:t},{x:r+h/2,y:c},{x:r-h/2,y:c}]:[{x:g,y:t-h/2},{x:g,y:t+h/2},{x:r,y:c+h/2},{x:r,y:c-h/2}]}$(kt,"lineToPolygon");async function Rs(g,t,r,c,h=r.class.padding??12){let l=c?0:3,f=g.insert("g").attr("class",Y(t)).attr("id",t.domId||t.id),i=null,n=null,e=null,a=null,s=0,o=0,y=0;if(i=f.insert("g").attr("class","annotation-group text"),t.annotations.length>0){let x=t.annotations[0];await Ct(i,{text:`\xAB${x}\xBB`},0),s=i.node().getBBox().height}n=f.insert("g").attr("class","label-group text"),await Ct(n,t,0,["font-weight: bolder"]);let p=n.node().getBBox();o=p.height,e=f.insert("g").attr("class","members-group text");let u=0;for(let x of t.members){let w=await Ct(e,x,u,[x.parseClassifier()]);u+=w+l}y=e.node().getBBox().height,y<=0&&(y=h/2),a=f.insert("g").attr("class","methods-group text");let m=0;for(let x of t.methods){let w=await Ct(a,x,m,[x.parseClassifier()]);m+=w+l}let d=f.node().getBBox();if(i!==null){let x=i.node().getBBox();i.attr("transform",`translate(${-x.width/2})`)}return n.attr("transform",`translate(${-p.width/2}, ${s})`),d=f.node().getBBox(),e.attr("transform",`translate(0, ${s+o+h*2})`),d=f.node().getBBox(),a.attr("transform",`translate(0, ${s+o+(y?y+h*4:h*2)})`),d=f.node().getBBox(),{shapeSvg:f,bbox:d}}$(Rs,"textHelper");async function Ct(g,t,r,c=[]){let h=g.insert("g").attr("class","label").attr("style",c.join("; ")),l=bt(),f="useHtmlLabels"in t?t.useHtmlLabels:dt(l.htmlLabels)??!0,i="";"text"in t?i=t.text:i=t.label,!f&&i.startsWith("\\")&&(i=i.substring(1)),Kt(i)&&(f=!0);let n=await ft(h,Lt(St(i)),{width:Nt(i,l)+50,classes:"markdown-node-label",useHtmlLabels:f},l),e,a=1;if(f){let s=n.children[0],o=V(n);a=s.innerHTML.split("<br>").length,s.innerHTML.includes("</math>")&&(a+=s.innerHTML.split("<mrow>").length-1),await jt(s),e=s.getBoundingClientRect(),o.attr("width",e.width),o.attr("height",e.height)}else{c.includes("font-weight: bolder")&&V(n).selectAll("tspan").attr("font-weight",""),a=n.children.length;let s=n.children[0];(n.textContent===""||n.textContent.includes(">"))&&(s.textContent=i[0]+i.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),i[1]===" "&&(s.textContent=s.textContent[0]+" "+s.textContent.substring(1))),s.textContent==="undefined"&&(s.textContent=""),e=n.getBBox()}return h.attr("transform","translate(0,"+(-e.height/(2*a)+r)+")"),e.height}$(Ct,"addText");async function Hs(g,t){let r=K(),{themeVariables:c}=r,{useGradient:h}=c,l=r.class.padding??12,f=l,i=t.useHtmlLabels??dt(r.htmlLabels)??!0,n=t;n.annotations=n.annotations??[],n.members=n.members??[],n.methods=n.methods??[];let{shapeSvg:e,bbox:a}=await Rs(g,t,r,i,f),{labelStyles:s,nodeStyles:o}=L(t);t.labelStyle=s,t.cssStyles=n.styles||"";let y=n.styles?.join(";")||o||"";t.cssStyles||(t.cssStyles=y.replaceAll("!important","").split(";"));let p=n.members.length===0&&n.methods.length===0&&!r.class?.hideEmptyMembersBox,u=v.svg(e),m=H(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let d=Math.max(t.width??0,a.width),x=Math.max(t.height??0,a.height),w=(t.height??0)>a.height;n.members.length===0&&n.methods.length===0?x+=f:n.members.length>0&&n.methods.length===0&&(x+=f*2);let S=-d/2,b=-x/2,k=p?l*2:n.members.length===0&&n.methods.length===0?-l:0;w&&(k=l*2);let M=u.rectangle(S-l,b-l-(p?l:n.members.length===0&&n.methods.length===0?-l/2:0),d+2*l,x+2*l+k,m),P=e.insert(()=>M,":first-child");P.attr("class","basic label-container outer-path");let W=P.node().getBBox(),B=e.select(".annotation-group").node().getBBox().height-(p?l/2:0)||0,D=e.select(".label-group").node().getBBox().height-(p?l/2:0)||0,T=e.select(".members-group").node().getBBox().height-(p?l/2:0)||0,A=(B+D+b+l-(b-l-(p?l:n.members.length===0&&n.methods.length===0?-l/2:0)))/2;if(e.selectAll(".text").each((E,I,R)=>{let _=V(R[I]),O=_.attr("transform"),G=0;if(O){let et=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(O);et&&(G=parseFloat(et[2]))}let q=G+b+l-(p?l:n.members.length===0&&n.methods.length===0?-l/2:0);if(_.attr("class").includes("methods-group")){let wt=Math.max(T,f/2);w?q=Math.max(A,B+D+wt+b+f*2+l)+f*2:q=B+D+wt+b+f*4+l}n.members.length===0&&n.methods.length===0&&r.class?.hideEmptyMembersBox&&(n.annotations.length>0?q=G-f:q=G),i||(q-=4);let nt=S;(_.attr("class").includes("label-group")||_.attr("class").includes("annotation-group"))&&(nt=-_.node()?.getBBox().width/2||0,e.selectAll("text").each(function(wt,et,st){window.getComputedStyle(st[et]).textAnchor==="middle"&&(nt=0)})),_.attr("transform",`translate(${nt}, ${q})`)}),n.members.length>0||n.methods.length>0||p){let E=B+D+b+l,I=u.line(W.x,E,W.x+W.width,E+.001,m);e.insert(()=>I).attr("class",`divider${t.look==="neo"&&!h?" neo-line":""}`).attr("style",y)}if(p||n.members.length>0||n.methods.length>0){let E=B+D+T+b+f*2+l,I=u.line(W.x,w?Math.max(A,E):E,W.x+W.width,(w?Math.max(A,E):E)+.001,m);e.insert(()=>I).attr("class",`divider${t.look==="neo"&&!h?" neo-line":""}`).attr("style",y)}if(n.look!=="handDrawn"&&e.selectAll("path").attr("style",y),P.select(":nth-child(2)").attr("style",y),e.selectAll(".divider").select("path").attr("style",y),t.labelStyle?e.selectAll("span").attr("style",t.labelStyle):e.selectAll("span").attr("style",y),!i){let E=RegExp(/color\s*:\s*([^;]*)/),I=E.exec(y);if(I){let R=I[0].replace("color","fill");e.selectAll("tspan").attr("style",R)}else if(s){let R=E.exec(s);if(R){let _=R[0].replace("color","fill");e.selectAll("tspan").attr("style",_)}}}return C(t,P),t.intersect=function(E){return N.rect(t,E)},e}$(Hs,"classBox");async function Is(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let h=t,l=t,f=20,i=20,n="verifyMethod"in t,e=Y(t),a=K(),{themeVariables:s}=a,{borderColorArray:o,requirementEdgeLabelBackground:y}=s,p=a.layout==="elk"?"start":"center",u=g.insert("g").attr("class",e).attr("id",t.domId??t.id),m;n?m=await rt(u,`<<${h.type}>>`,0,t.labelStyle):m=await rt(u,"<<Element>>",0,t.labelStyle);let d=m,x=await rt(u,h.name,d,t.labelStyle+"; font-weight: bold;");if(d+=x+i,n){let D=await rt(u,`${h.requirementId?`ID: ${h.requirementId}`:""}`,d,t.labelStyle,p);d+=D;let T=await rt(u,`${h.text?`Text: ${h.text}`:""}`,d,t.labelStyle,p);d+=T;let A=await rt(u,`${h.risk?`Risk: ${h.risk}`:""}`,d,t.labelStyle,p);d+=A,await rt(u,`${h.verifyMethod?`Verification: ${h.verifyMethod}`:""}`,d,t.labelStyle,p)}else{let D=await rt(u,`${l.type?`Type: ${l.type}`:""}`,d,t.labelStyle,p);d+=D,await rt(u,`${l.docRef?`Doc Ref: ${l.docRef}`:""}`,d,t.labelStyle,p)}let w=(u.node()?.getBBox().width??200)+f,S=(u.node()?.getBBox().height??200)+f,b=-w/2,k=-S/2,M=v.svg(u),P=H(t,{});t.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid");let W=M.rectangle(b,k,w,S,P),B=u.insert(()=>W,":first-child");if(B.attr("class","basic label-container outer-path").attr("style",c),o?.length){let D=t.colorIndex??0;u.attr("data-color-id",`color-${D%o.length}`)}if(u.selectAll(".label").each((D,T,A)=>{let E=V(A[T]),I=E.attr("transform"),R=0,_=0;if(I){let nt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(I);nt&&(R=parseFloat(nt[1]),_=parseFloat(nt[2]))}let O=_-S/2,G=b+f/2;(T===0||T===1)&&(G=R),E.attr("transform",`translate(${G}, ${O+f})`)}),d>m+x+i){let D=k+m+x+i,T;if(t.look==="neo"){let I=[[b,D],[b+w,D],[b+w,D+.001],[b,D+.001]];T=M.polygon(I,P)}else T=M.line(b,D,b+w,D,P);u.insert(()=>T).attr("class","divider")}return C(t,B),t.intersect=function(D){return N.rect(t,D)},c&&t.look!=="handDrawn"&&(y||o?.length)&&u.selectAll("path").attr("style",c),u}$(Is,"requirementBox");async function rt(g,t,r,c="",h="center"){if(t==="")return 0;let l=g.insert("g").attr("class","label").attr("style",c),f=K(),i=f.htmlLabels??!0,n=await ft(l,Lt(St(t)),{width:Nt(t,f)+50,classes:"markdown-node-label",useHtmlLabels:i,style:c},f),e;if(i){let a=n.children[0],s=V(n);h==="start"&&V(a).style("text-align","left"),e=a.getBoundingClientRect(),s.attr("width",e.width),s.attr("height",e.height)}else{let a=n.children[0];for(let s of a.children)c&&s.setAttribute("style",c);if(h==="start"){a.setAttribute("text-anchor","start");for(let s of a.children)s.setAttribute("text-anchor","start")}e=n.getBBox(),e.height+=6}return l.attr("transform",`translate(${-e.width/2},${-e.height/2+r})`),e.height}$(rt,"addText");var pe=$(g=>{switch(g){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 Ls(g,t,{config:r}){let{labelStyles:c,nodeStyles:h}=L(t);t.labelStyle=c||"";let l=10,f=t.width;t.width=(t.width??200)-10;let{shapeSvg:i,bbox:n,label:e}=await X(g,t,Y(t)),a=t.padding||10,s="",o;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(s=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),o=i.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",s).attr("target","_blank"));let y={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},p,u;o?{label:p,bbox:u}=await Wt(o,"ticket"in t&&t.ticket||"",y):{label:p,bbox:u}=await Wt(i,"ticket"in t&&t.ticket||"",y);let{label:m,bbox:d}=await Wt(i,"assigned"in t&&t.assigned||"",y);t.width=f;let x=10,w=t?.width||0,S=Math.max(u.height,d.height)/2,b=Math.max(n.height+x*2,t?.height||0)+S,k=-w/2,M=-b/2;e.attr("transform","translate("+(a-w/2)+", "+(-S-n.height/2)+")"),p.attr("transform","translate("+(a-w/2)+", "+(-S+n.height/2)+")"),m.attr("transform","translate("+(a+w/2-d.width-2*l)+", "+(-S+n.height/2)+")");let P,{rx:W,ry:B}=t,{cssStyles:D}=t;if(t.look==="handDrawn"){let T=v.svg(i),A=H(t,{}),E=W||B?T.path(gt(k,M,w,b,W||0),A):T.rectangle(k,M,w,b,A);P=i.insert(()=>E,":first-child"),P.attr("class","basic label-container").attr("style",D||null)}else{P=i.insert("rect",":first-child"),P.attr("class","basic label-container __APA__").attr("style",h).attr("rx",W??5).attr("ry",B??5).attr("x",k).attr("y",M).attr("width",w).attr("height",b);let T="priority"in t&&t.priority;if(T){let A=i.append("line"),E=k+2,I=M+Math.floor((W??0)/2),R=M+b-Math.floor((W??0)/2);A.attr("x1",E).attr("y1",I).attr("x2",E).attr("y2",R).attr("stroke-width","4").attr("stroke",pe(T))}}return C(t,P),t.height=b,t.intersect=function(T){return N.rect(t,T)},i}$(Ls,"kanbanItem");async function Ws(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let{shapeSvg:h,bbox:l,halfPadding:f,label:i}=await X(g,t,Y(t)),n=l.width+10*f,e=l.height+8*f,a=.15*n,{cssStyles:s}=t,o=l.width+20,y=l.height+20,p=Math.max(n,o),u=Math.max(e,y);i.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`);let m,d=`M0 0
a${a},${a} 1 0,0 ${p*.25},${-1*u*.1}
a${a},${a} 1 0,0 ${p*.25},0
a${a},${a} 1 0,0 ${p*.25},0
a${a},${a} 1 0,0 ${p*.25},${u*.1}
a${a},${a} 1 0,0 ${p*.15},${u*.33}
a${a*.8},${a*.8} 1 0,0 0,${u*.34}
a${a},${a} 1 0,0 ${-1*p*.15},${u*.33}
a${a},${a} 1 0,0 ${-1*p*.25},${u*.15}
a${a},${a} 1 0,0 ${-1*p*.25},0
a${a},${a} 1 0,0 ${-1*p*.25},0
a${a},${a} 1 0,0 ${-1*p*.25},${-1*u*.15}
a${a},${a} 1 0,0 ${-1*p*.1},${-1*u*.33}
a${a*.8},${a*.8} 1 0,0 0,${-1*u*.34}
a${a},${a} 1 0,0 ${p*.1},${-1*u*.33}
H0 V0 Z`;if(t.look==="handDrawn"){let x=v.svg(h),w=H(t,{}),S=x.path(d,w);m=h.insert(()=>S,":first-child"),m.attr("class","basic label-container").attr("style",Q(s))}else m=h.insert("path",":first-child").attr("class","basic label-container").attr("style",c).attr("d",d);return m.attr("transform",`translate(${-p/2}, ${-u/2})`),C(t,m),t.calcIntersect=function(x,w){return N.rect(x,w)},t.intersect=function(x){return J.info("Bang intersect",t,x),N.rect(t,x)},h}$(Ws,"bang");async function Es(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let{shapeSvg:h,bbox:l,halfPadding:f,label:i}=await X(g,t,Y(t)),n=l.width+2*f,e=l.height+2*f,a=.15*n,s=.25*n,o=.35*n,y=.2*n,{cssStyles:p}=t,u,m=`M0 0
a${a},${a} 0 0,1 ${n*.25},${-1*n*.1}
a${o},${o} 1 0,1 ${n*.4},${-1*n*.1}
a${s},${s} 1 0,1 ${n*.35},${n*.2}
a${a},${a} 1 0,1 ${n*.15},${e*.35}
a${y},${y} 1 0,1 ${-1*n*.15},${e*.65}
a${s},${a} 1 0,1 ${-1*n*.25},${n*.15}
a${o},${o} 1 0,1 ${-1*n*.5},0
a${a},${a} 1 0,1 ${-1*n*.25},${-1*n*.15}
a${a},${a} 1 0,1 ${-1*n*.1},${-1*e*.35}
a${y},${y} 1 0,1 ${n*.1},${-1*e*.65}
H0 V0 Z`;if(t.look==="handDrawn"){let d=v.svg(h),x=H(t,{}),w=d.path(m,x);u=h.insert(()=>w,":first-child"),u.attr("class","basic label-container").attr("style",Q(p))}else u=h.insert("path",":first-child").attr("class","basic label-container").attr("style",c).attr("d",m);return i.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`),u.attr("transform",`translate(${-n/2}, ${-e/2})`),C(t,u),t.calcIntersect=function(d,x){return N.rect(d,x)},t.intersect=function(d){return J.info("Cloud intersect",t,d),N.rect(t,d)},h}$(Es,"cloud");async function Ts(g,t){let{labelStyles:r,nodeStyles:c}=L(t);t.labelStyle=r;let{shapeSvg:h,bbox:l,halfPadding:f,label:i}=await X(g,t,Y(t)),n=l.width+8*f,e=l.height+2*f,a=5,s=t.look==="neo"?`
M${-n/2} ${e/2-a}
v${-e+2*a}
q0,-${a} ${a},-${a}
h${n-2*a}
q${a},0 ${a},${a}
v${e-a}
H${-n/2}
Z
`:`
M${-n/2} ${e/2-a}
v${-e+2*a}
q0,-${a} ${a},-${a}
h${n-2*a}
q${a},0 ${a},${a}
v${e-2*a}
q0,${a} ${-a},${a}
h${-(n-2*a)}
q${-a},0 ${-a},${-a}
Z
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let o=h.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",c).attr("d",s);return h.append("line").attr("class","node-line-").attr("x1",-n/2).attr("y1",e/2).attr("x2",n/2).attr("y2",e/2),i.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`),h.append(()=>i.node()),C(t,o),t.calcIntersect=function(y,p){return N.rect(y,p)},t.intersect=function(y){return N.rect(t,y)},h}$(Ts,"defaultMindmapNode");async function _s(g,t){let r={padding:t.padding??0};return zt(g,t,r)}$(_s,"mindmapCircle");var ue=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:ds},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:fs},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:ms},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Ss},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Ta},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:_a},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:ja},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:va},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:Ca},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:Ma},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:Ea},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:zt},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Ws},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Es},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:hs},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:za},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:es},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:ss},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Ms},{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:ts},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Xa},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:ks},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Da},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:ps},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:bs},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:ws},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Ga},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Va},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Ha},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Ia},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:La},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:rs},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Bs},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:qa},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Ps},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:is},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Wa},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Ya},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Ns},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:As},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Oa},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Ds},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Fa},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:us},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:cs},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:ns},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:$a},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Ra},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:vs},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:$s},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Cs},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:gs},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:ls}],de=$(()=>{let t=[...Object.entries({state:xs,choice:Na,note:os,composite:Ba,rectWithTitle:ys,labelRect:as,block_arrow:Pa,collapsedGroup:ka,iconSquare:Ua,iconCircle:Ja,icon:Za,iconRounded:Ka,imageSquare:Qa,anchor:ba,kanbanItem:Ls,mindmapCircle:_s,defaultMindmapNode:Ts,classBox:Hs,erBox:Vt,requirementBox:Is}),...ue.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(h=>[h,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),me=de();function xe(g){return g in me}$(xe,"isValidShape");export{X as a,C as b,Gs as c,gt as d,aa as e,me as f,xe as g};