PageSourceSearch

https://dust.tt/_next/static/chunks/a8139f55.051a32dfdedae169.js

js dust.tt collected 2026-10-01 10:22:46 UTC 106,858 bytes, 62 lines download raw bytes

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

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.