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