"-"+f)].join(",");return r.enable(""),h}function s(h){if(h[h.length-1]==="*")return!0;let f,d;for(f=0,d=r.skips.length;f ${this.parser.parseInline(e)} An error occurred: ${i.tokens?.map(n).join("")}0)for(var r=new Array(i),n=0,i,a;n{cG()});var y4,PC,BC=F(()=>{y4="http://www.w3.org/1999/xhtml",PC={svg:"http://www.w3.org/2000/svg",xhtml:y4,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function lu(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),PC.hasOwnProperty(e)?{space:PC[e],local:t}:t}var x4=F(()=>{BC()});function Sxe(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===y4&&e.documentElement.namespaceURI===y4?e.createElement(t):e.createElementNS(r,t)}}function Cxe(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function b4(t){var e=lu(t);return(e.local?Cxe:Sxe)(e)}var FC=F(()=>{x4();BC()});function Axe(){}function Yf(t){return t==null?Axe:function(){return this.querySelector(t)}}var w4=F(()=>{});function uG(t){typeof t!="function"&&(t=Yf(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{ol()});function IG(){for(var t=this._groups,e=-1,r=t.length;++e0;){if(u=Y1(s,o,r),u===l)return n[i]=s,n[a]=o,e(n);if(u>0)s=Math.floor(s/u)*u,o=Math.ceil(o/u)*u;else if(u<0)s=Math.ceil(s*u)/u,o=Math.floor(o*u)/u;else break;l=u}return t},t}function hl(){var t=gv();return t.copy=function(){return Z4(t,hl())},bh.apply(t,arguments),D4e(t)}var yH=F(()=>{gh();z7();pv();vH()});function G7(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],a=t[n],s;return a{});function fn(t,e,r,n){function i(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{let s=i(a),o=i.ceil(a);return a-s0))return l;let u;do l.push(u=new Date(+a)),e(a,o),t(a);while(ufn(s=>{if(s>=s)for(;t(s),!a(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;e(s,-1),!a(s););else for(;--o>=0;)for(;e(s,1),!a(s););}),r&&(i.count=(a,s)=>(U7.setTime(+a),V7.setTime(+s),t(U7),t(V7),Math.floor(r(U7,V7))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}var U7,V7,pu=F(()=>{U7=new Date,V7=new Date});var ac,bH,W7=F(()=>{pu();ac=fn(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);ac.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?fn(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):ac);bH=ac.range});var Ws,wH,H7=F(()=>{pu();Ws=fn(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),wH=Ws.range});var gu,O4e,Q4,P4e,q7=F(()=>{pu();gu=fn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),O4e=gu.range,Q4=fn(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),P4e=Q4.range});var mu,B4e,J4,F4e,Y7=F(()=>{pu();mu=fn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),B4e=mu.range,J4=fn(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),F4e=J4.range});var wo,z4e,vv,$4e,e3,G4e,X7=F(()=>{pu();wo=fn(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),z4e=wo.range,vv=fn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),$4e=vv.range,e3=fn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),G4e=e3.range});function sd(t){return fn(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}function od(t){return fn(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/6048e5)}var fl,wh,t3,r3,oc,n3,i3,TH,U4e,V4e,W4e,H4e,q4e,Y4e,ld,Sp,EH,SH,kh,CH,AH,_H,X4e,j4e,K4e,Z4e,Q4e,J4e,j7=F(()=>{pu();fl=sd(0),wh=sd(1),t3=sd(2),r3=sd(3),oc=sd(4),n3=sd(5),i3=sd(6),TH=fl.range,U4e=wh.range,V4e=t3.range,W4e=r3.range,H4e=oc.range,q4e=n3.range,Y4e=i3.range;ld=od(0),Sp=od(1),EH=od(2),SH=od(3),kh=od(4),CH=od(5),AH=od(6),_H=ld.range,X4e=Sp.range,j4e=EH.range,K4e=SH.range,Z4e=kh.range,Q4e=CH.range,J4e=AH.range});var vu,e3e,a3,t3e,K7=F(()=>{pu();vu=fn(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),e3e=vu.range,a3=fn(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),t3e=a3.range});var Hs,r3e,dl,n3e,Z7=F(()=>{pu();Hs=fn(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Hs.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:fn(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});r3e=Hs.range,dl=fn(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());dl.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:fn(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});n3e=dl.range});function RH(t,e,r,n,i,a){let s=[[Ws,1,1e3],[Ws,5,5*1e3],[Ws,15,15*1e3],[Ws,30,30*1e3],[a,1,6e4],[a,5,5*6e4],[a,15,15*6e4],[a,30,30*6e4],[i,1,36e5],[i,3,3*36e5],[i,6,6*36e5],[i,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function o(u,h,f){let d=hy).right(s,d);if(p===s.length)return t.every(dp(u/31536e6,h/31536e6,f));if(p===0)return ac.every(Math.max(dp(u,h,f),1));let[g,m]=s[d/s[p-1][2]{gh();W7();H7();q7();Y7();X7();j7();K7();Z7();[a3e,s3e]=RH(dl,a3,ld,e3,J4,Q4),[Q7,J7]=RH(Hs,vu,fl,wo,mu,gu)});var s3=F(()=>{W7();H7();q7();Y7();X7();j7();K7();Z7();NH()});function e8(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function t8(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function yv(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function r8(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,s=t.shortDays,o=t.months,l=t.shortMonths,u=xv(i),h=bv(i),f=xv(a),d=bv(a),p=xv(s),g=bv(s),m=xv(o),y=bv(o),x=xv(l),b=bv(l),w={a:O,A:B,b:P,B:$,c:null,d:BH,e:BH,f:L3e,g:z3e,G:G3e,H:C3e,I:A3e,j:_3e,L:UH,m:R3e,M:N3e,p:z,q:H,Q:$H,s:GH,S:I3e,u:M3e,U:D3e,V:O3e,w:P3e,W:B3e,x:null,X:null,y:F3e,Y:$3e,Z:U3e,"%":zH},_={a:J,A:X,b:oe,B:K,c:null,d:FH,e:FH,f:q3e,g:r5e,G:i5e,H:V3e,I:W3e,j:H3e,L:WH,m:Y3e,M:X3e,p:ee,q:Q,Q:$H,s:GH,S:j3e,u:K3e,U:Z3e,V:Q3e,w:J3e,W:e5e,x:null,X:null,y:t5e,Y:n5e,Z:a5e,"%":zH},k={a:M,A:R,b:T,B:I,c:A,d:OH,e:OH,f:k3e,g:DH,G:MH,H:PH,I:PH,j:y3e,L:w3e,m:v3e,M:x3e,p:C,q:m3e,Q:E3e,s:S3e,S:b3e,u:h3e,U:f3e,V:d3e,w:u3e,W:p3e,x:D,X:N,y:DH,Y:MH,Z:g3e,"%":T3e};w.x=E(r,w),w.X=E(n,w),w.c=E(e,w),_.x=E(r,_),_.X=E(n,_),_.c=E(e,_);function E(W,Y){return function(Z){var se=[],ce=-1,ue=0,te=W.length,Ne,ae,we;for(Z instanceof Date||(Z=new Date(+Z));++ce{qp();Bp();Lo=Yke});function Xke(t,e){for(var r=-1,n=Array(t);++r
"},r),Xe.lineBreakRegex.test(t)))return t;let n=t.split(" ").filter(Boolean),i=[],a="";return n.forEach((s,o)=>{let l=bs(`${s} `,r),u=bs(a,r);if(l>e){let{hyphenatedStrings:d,remainingWord:p}=RTe(s,e,"-",r);i.push(a,...d),a=p}else u+l>=e?(i.push(a),a=s):a=[a,s].filter(Boolean).join(" ");o+1===n.length&&i.push(a)}),i.filter(s=>s!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),RTe=Dp((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);let i=[...t],a=[],s="";return i.forEach((o,l)=>{let u=`${s}${o}`;if(bs(u,n)>=e){let f=l+1,d=i.length===f,p=`${u}${r}`;a.push(d?u:p),s=""}else s=u}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);v(Gv,"calculateTextHeight");v(bs,"calculateTextWidth");uA=Dp((t,e)=>{let{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};let[,a]=Ro(r),s=["sans-serif",n],o=t.split(Xe.lineBreakRegex),l=[],u=Ve("body");if(!u.remove)return{width:0,height:0,lineHeight:0};let h=u.append("svg");for(let d of s){let p=0,g={width:0,height:0,lineHeight:0};for(let m of o){let y=_Te();y.text=m||iA;let x=LTe(h,y).style("font-size",a).style("font-weight",i).style("font-family",d),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),p=Math.round(b.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}l.push(g)}h.remove();let f=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[f]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),NTe=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{v(this,"InitIDGenerator")}},ITe=v(function(t){return z3=z3||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),z3.innerHTML=t,unescape(z3.textContent)},"entityDecode");v(U3,"isDetailedError");MTe=v((t,e,r,n)=>{if(!n)return;let i=t.node()?.getBBox();i&&t.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),Ro=v(t=>{if(typeof t=="number")return[t,t+"px"];let e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");v(ws,"cleanAndMerge");Ut={assignWithDepth:Hn,wrapLabel:cA,calculateTextHeight:Gv,calculateTextWidth:bs,calculateTextDimensions:uA,cleanAndMerge:ws,detectInit:ETe,detectDirective:UX,isSubstringInArray:STe,interpolateToCurve:$3,calcLabelPosition:qX,calcCardinalityPosition:ATe,calcTerminalLabelPosition:YX,formatUrl:WX,getStylesFromArray:G3,generateId:oA,random:lA,runFunc:CTe,entityDecode:ITe,insertTitle:MTe,parseFontSize:Ro,InitIDGenerator:NTe},jX=v(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){let n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"\uFB02\xB0\xB0"+n+"\xB6\xDF":"\uFB02\xB0"+n+"\xB6\xDF"}),e},"encodeEntities"),Xs=v(function(t){return t.replace(/fl°°/g,"").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),V3=v((t,e,{counter:r=0,prefix:n,suffix:i})=>`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`,"getEdgeId");v(Aa,"handleUndefinedAttr")});function dA(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function tj(t){xd=t}function js(t,e){if(e){if(rj.test(t))return t.replace(DTe,KX)}else if(nj.test(t))return t.replace(OTe,KX);return t}function FTe(t){return t.replace(BTe,(e,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}function sn(t,e){let r=typeof t=="string"?t:t.source;e=e||"";let n={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(zTe,"$1"),r=r.replace(i,s),n},getRegex:()=>new RegExp(r,e)};return n}function ZX(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}function QX(t,e){let r=t.replace(/\|/g,(a,s,o)=>{let l=!1,u=s;for(;--u>=0&&o[u]==="\\";)l=!l;return l?"|":" |"}),n=r.split(/ \|/),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length
`:"'+(n?a:js(a,!0))+`
`}blockquote({tokens:e}){return`"+(n?a:js(a,!0))+`
${this.parser.parse(e)}
`}html({text:e}){return e}heading({tokens:e,depth:r}){return`
`}list(e){let r=e.ordered,n=e.start,i="";for(let o=0;o
`+r+`
`+i+`
`}tablerow({text:e}){return`
${e}
`}tablecell(e){let r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`${n}>
`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${e}
`}br(e){return"
"}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:r,tokens:n}){let i=this.parser.parseInline(n),a=ZX(e);if(a===null)return i;e=a;let s='"+i+"",s}image({href:e,title:r,text:n}){let i=ZX(e);if(i===null)return n;e=i;let a=`",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):e.text}},Hv=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},Tu=class t{options;renderer;textRenderer;constructor(e){this.options=e||xd,this.options.renderer=this.options.renderer||new Kp,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Hv}static parse(e,r){return new t(r).parse(e)}static parseInline(e,r){return new t(r).parseInline(e)}parse(e,r=!0){let n="";for(let i=0;i
"+js(n.message+"",!0)+"
";return r?Promise.resolve(i):i}if(r)return Promise.reject(n);throw n}}},yd=new fA;Yr.options=Yr.setOptions=function(t){return yd.setOptions(t),Yr.defaults=yd.defaults,tj(Yr.defaults),Yr};Yr.getDefaults=dA;Yr.defaults=xd;Yr.use=function(...t){return yd.use(...t),Yr.defaults=yd.defaults,tj(Yr.defaults),Yr};Yr.walkTokens=function(t,e){return yd.walkTokens(t,e)};Yr.parseInline=yd.parseInline;Yr.Parser=Tu;Yr.parser=Tu.parse;Yr.Renderer=Kp;Yr.TextRenderer=Hv;Yr.Lexer=ku;Yr.lexer=ku.lex;Yr.Tokenizer=jp;Yr.Hooks=Xp;Yr.parse=Yr;gvt=Yr.options,mvt=Yr.setOptions,vvt=Yr.use,yvt=Yr.walkTokens,xvt=Yr.parseInline,bvt=Tu.parse,wvt=ku.lex});function Y3(t){for(var e=[],r=1;r
/g,`
`).replace(/\n{2,}/g,`
`),i=Y3(n);return e===!1?i.replace(/ /g," "):i}function dj(t,e={}){let r=fj(t,e),n=Yr.lexer(r),i=[[]],a=0;function s(o,l="normal"){o.type==="text"?o.text.split(`
`).forEach((h,f)=>{f!==0&&(a++,i.push([])),h.split(" ").forEach(d=>{d=d.replace(/'/g,"'"),d&&i[a].push({content:d,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(u=>{s(u,o.type)}):o.type==="html"&&i[a].push({content:o.text,type:"normal"})}return v(s,"processNode"),n.forEach(o=>{o.type==="paragraph"?o.tokens?.forEach(l=>{s(l)}):o.type==="html"&&i[a].push({content:o.text,type:"normal"})}),i}function pj(t,{markdownAutoWrap:e}={}){let r=Yr.lexer(t);function n(i){return i.type==="text"?e===!1?i.text.replace(/\n */g,"
").replace(/ /g," "):i.text.replace(/\n */g,"
"):i.type==="strong"?`${i.tokens?.map(n).join("")}`:i.type==="em"?`${i.tokens?.map(n).join("")}`:i.type==="paragraph"?`
/g,"
"),f=dj(h.replace("
","
"),u),d=bj(o,t,f,e?l:!1);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Ve(d).attr("style",p)}else{let p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Ve(d).select("rect").attr("style",p.replace(/background:/g,"fill:"));let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Ve(d).select("text").attr("style",g)}return d}},"createText")});function TA(t,e,r){if(t&&t.length){let[n,i]=e,a=Math.PI/180*r,s=Math.cos(a),o=Math.sin(a);for(let l of t){let[u,h]=l;l[0]=(u-n)*s-(h-i)*o+n,l[1]=(u-n)*o+(h-i)*s+i}}}function p6e(t,e){return t[0]===e[0]&&t[1]===e[1]}function g6e(t,e,r,n=1){let i=r,a=Math.max(e,.1),s=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,o=[0,0];if(i)for(let u of s)TA(u,o,i);let l=function(u,h,f){let d=[];for(let b of u){let w=[...b];p6e(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&d.push(w)}let p=[];h=Math.max(h,.1);let g=[];for(let b of d)for(let w=0;w
"):d,e.labelStyle,!0,!0)),m=g.children[0],y=Ve(g);f=m.getBoundingClientRect(),y.attr("width",f.width),y.attr("height",f.height);let x=(e.padding||0)/2;Ve(g).attr("transform","translate( "+(f.width>p.width?0:(p.width-f.width)/2)+", "+(p.height+x+5)+")"),Ve(h).attr("transform","translate( "+(f.width
").length,f.innerHTML.includes("")&&(h+=f.innerHTML.split("]*>/g,"").trim()==="";await Promise.all([...p].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){let b=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,_=parseInt(b,10)*5+"px";m.style.minWidth=_,m.style.maxWidth=_}else m.style.width="100%";y(m)}v(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}u=f.getBoundingClientRect(),d.attr("width",u.width),d.attr("height",u.height)}else{n.includes("font-weight: bolder")&&Ve(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;let f=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(f.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(f.textContent=f.textContent[0]+" "+f.textContent.substring(1))),f.textContent==="undefined"&&(f.textContent=""),u=l.getBBox()}return i.attr("transform","translate(0,"+(-u.height/(2*h)+r)+")"),u.height}async function KK(t,e){let r=pe(),n=r.class.padding??12,i=n,a=e.useHtmlLabels??Wr(r.htmlLabels)??!0,s=e;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];let{shapeSvg:o,bbox:l}=await jK(t,e,r,a,i),{labelStyles:u,nodeStyles:h}=Vt(e);e.labelStyle=u,e.cssStyles=s.styles||"";let f=s.styles?.join(";")||h||"";e.cssStyles||(e.cssStyles=f.replaceAll("!important","").split(";"));let d=s.members.length===0&&s.methods.length===0&&!r.class?.hideEmptyMembersBox,p=Ye.svg(o),g=Bt(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let m=l.width,y=l.height;s.members.length===0&&s.methods.length===0?y+=i:s.members.length>0&&s.methods.length===0&&(y+=i*2);let x=-m/2,b=-y/2,w=p.rectangle(x-n,b-n-(d?n:s.members.length===0&&s.methods.length===0?-n/2:0),m+2*n,y+2*n+(d?n*2:s.members.length===0&&s.methods.length===0?-n:0),g),_=o.insert(()=>w,":first-child");_.attr("class","basic label-container");let k=_.node().getBBox();o.selectAll(".text").each((C,M,R)=>{let T=Ve(R[M]),I=T.attr("transform"),A=0;if(I){let B=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(I);B&&(A=parseFloat(B[2]))}let D=A+b+n-(d?n:s.members.length===0&&s.methods.length===0?-n/2:0);a||(D-=4);let N=x;(T.attr("class").includes("label-group")||T.attr("class").includes("annotation-group"))&&(N=-T.node()?.getBBox().width/2||0,o.selectAll("text").each(function(O,B,P){window.getComputedStyle(P[B]).textAnchor==="middle"&&(N=0)})),T.attr("transform",`translate(${N}, ${D})`)});let E=o.select(".annotation-group").node().getBBox().height-(d?n/2:0)||0,L=o.select(".label-group").node().getBBox().height-(d?n/2:0)||0,S=o.select(".members-group").node().getBBox().height-(d?n/2:0)||0;if(s.members.length>0||s.methods.length>0||d){let C=p.line(k.x,E+L+b+n,k.x+k.width,E+L+b+n,g);o.insert(()=>C).attr("class","divider").attr("style",f)}if(d||s.members.length>0||s.methods.length>0){let C=p.line(k.x,E+L+S+b+i*2+n,k.x+k.width,E+L+S+b+n+i*2,g);o.insert(()=>C).attr("class","divider").attr("style",f)}if(s.look!=="handDrawn"&&o.selectAll("path").attr("style",f),_.select(":nth-child(2)").attr("style",f),o.selectAll(".divider").select("path").attr("style",f),e.labelStyle?o.selectAll("span").attr("style",e.labelStyle):o.selectAll("span").attr("style",f),!a){let C=RegExp(/color\s*:\s*([^;]*)/),M=C.exec(f);if(M){let R=M[0].replace("color","fill");o.selectAll("tspan").attr("style",R)}else if(u){let R=C.exec(u);if(R){let T=R[0].replace("color","fill");o.selectAll("tspan").attr("style",T)}}}return Pt(e,_),e.intersect=function(C){return Nt.rect(e,C)},o}async function ZK(t,e,{config:r}){let{labelStyles:n,nodeStyles:i}=Vt(e);e.labelStyle=n||"";let a=10,s=e.width;e.width=(e.width??200)-10;let{shapeSvg:o,bbox:l,label:u}=await tr(t,e,rr(e)),h=e.padding||10,f="",d;"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(f=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),d=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",f).attr("target","_blank"));let p={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},g,m;d?{label:g,bbox:m}=await $A(d,"ticket"in e&&e.ticket||"",p):{label:g,bbox:m}=await $A(o,"ticket"in e&&e.ticket||"",p);let{label:y,bbox:x}=await $A(o,"assigned"in e&&e.assigned||"",p);e.width=s;let b=10,w=e?.width||0,_=Math.max(m.height,x.height)/2,k=Math.max(l.height+b*2,e?.height||0)+_,E=-w/2,L=-k/2;u.attr("transform","translate("+(h-w/2)+", "+(-_-l.height/2)+")"),g.attr("transform","translate("+(h-w/2)+", "+(-_+l.height/2)+")"),y.attr("transform","translate("+(h+w/2-x.width-2*a)+", "+(-_+l.height/2)+")");let S,{rx:C,ry:M}=e,{cssStyles:R}=e;if(e.look==="handDrawn"){let T=Ye.svg(o),I=Bt(e,{}),A=C||M?T.path(Cu(E,L,w,k,C||0),I):T.rectangle(E,L,w,k,I);S=o.insert(()=>A,":first-child"),S.attr("class","basic label-container").attr("style",R||null)}else{S=o.insert("rect",":first-child"),S.attr("class","basic label-container __APA__").attr("style",i).attr("rx",C??5).attr("ry",M??5).attr("x",E).attr("y",L).attr("width",w).attr("height",k);let T="priority"in e&&e.priority;if(T){let I=o.append("line"),A=E+2,D=L+Math.floor((C??0)/2),N=L+k-Math.floor((C??0)/2);I.attr("x1",A).attr("y1",D).attr("x2",A).attr("y2",N).attr("stroke-width","4").attr("stroke",Y6e(T))}}return Pt(e,S),e.height=k,e.intersect=function(T){return Nt.rect(e,T)},o}function WA(t){return t in QK}async function wd(t,e,r){let n,i;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let a=e.shape?QK[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;r.config.securityLevel==="sandbox"?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s??null),i=await a(n,e,r)}else i=await a(t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),l5.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var tr,$A,Pt,rr,k6e,Jp,T6e,Ph,Cu,E6e,eg,S6e,Vt,Bt,Bj,C6e,A6e,_6e,L6e,R6e,N6e,Fj,tg,zj,I6e,Uj,M6e,D6e,O6e,Nt,P6e,B6e,F6e,z6e,$6e,G6e,U6e,V6e,W6e,H6e,q6e,Y6e,X6e,j6e,QK,l5,JK,eZ,Jv,yl=F(()=>{sl();bo();Ya();kn();or();lr();lr();$t();lr();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();lr();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();$t();lr();$t();lr();$t();tr=v(async(t,e,r)=>{let n,i=e.useHtmlLabels||Wr(pe()?.htmlLabels);r?n=r:n="node default";let a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),s=a.insert("g").attr("class","label").attr("style",Aa(e.labelStyle)),o;e.label===void 0?o="":o=typeof e.label=="string"?e.label:e.label[0];let l=await oa(s,yr(Xs(o),pe()),{useHtmlLabels:i,width:e.width||pe().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img}),u=l.getBBox(),h=(e?.padding??0)/2;if(i){let f=l.children[0],d=Ve(l),p=f.getElementsByTagName("img");if(p){let g=o.replace(/
]*>/g,"").trim()==="";await Promise.all([...p].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){let b=pe().fontSize?pe().fontSize:window.getComputedStyle(document.body).fontSize,w=5,[_=sr.fontSize]=Ro(b),k=_*w+"px";m.style.minWidth=k,m.style.maxWidth=k}else m.style.width="100%";y(m)}v(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}u=f.getBoundingClientRect(),d.attr("width",u.width),d.attr("height",u.height)}return i?s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):s.attr("transform","translate(0, "+-u.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:u,halfPadding:h,label:s}},"labelHelper"),$A=v(async(t,e,r)=>{let n=r.useHtmlLabels||Wr(pe()?.flowchart?.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await oa(i,yr(Xs(e),pe()),{useHtmlLabels:n,width:r.width||pe()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),o=r.padding/2;if(Wr(pe()?.flowchart?.htmlLabels)){let l=a.children[0],u=Ve(a);s=l.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}return n?i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):i.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:o,label:i}},"insertLabel"),Pt=v((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),rr=v((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");v(Er,"createPathFromPoints");v(Oh,"generateFullSineWavePoints");v(VA,"generateCirclePoints");k6e=v((t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,o=t.height/2,l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=a===0?0:o*i/a,u=o):(i<0&&(s=-s),l=s,u=i===0?0:s*a/i),{x:r+l,y:n+u}},"intersectRect"),Jp=k6e;v(Oj,"applyStyle");v(Pj,"addHtmlLabel");T6e=v(async(t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),Wr(pe().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
"),re.info("vertexText"+i);let a={isNode:n,label:Xs(i).replace(/fa[blrs]?:fa-[\w-]+/g,o=>``),labelStyle:e&&e.replace("fill:","color:")};return await Pj(a)}else{let a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n|
/gi):Array.isArray(i)?s=i:s=[];for(let o of s){let l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),a.appendChild(l)}return a}},"createLabel"),Ph=T6e,Cu=v((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD"),E6e=v(t=>{let{handDrawnSeed:e}=pe();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),eg=v(t=>{let e=S6e([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),S6e=v(t=>{let e=new Map;return t.forEach(r=>{let[n,i]=r.split(":");e.set(n.trim(),i?.trim())}),e},"styles2Map"),Vt=v(t=>{let{stylesArray:e}=eg(t),r=[],n=[],i=[],a=[];return e.forEach(s=>{let o=s[0];o==="color"||o==="font-size"||o==="font-family"||o==="font-weight"||o==="font-style"||o==="text-decoration"||o==="text-align"||o==="text-transform"||o==="line-height"||o==="letter-spacing"||o==="word-spacing"||o==="text-shadow"||o==="text-overflow"||o==="white-space"||o==="word-wrap"||o==="word-break"||o==="overflow-wrap"||o==="hyphens"?r.push(s.join(":")+" !important"):(n.push(s.join(":")+" !important"),o.includes("stroke")&&i.push(s.join(":")+" !important"),o==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),Bt=v((t,e)=>{let{themeVariables:r,handDrawnSeed:n}=pe(),{nodeBorder:i,mainBkg:a}=r,{stylesMap:s}=eg(t);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||i,seed:n,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},e)},"userNodeOverrides"),Bj=v(async(t,e)=>{re.info("Creating subgraph rect for ",e.id,e);let r=pe(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:u,backgroundStyles:h}=Vt(e),f=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),d=Wr(r.flowchart.htmlLabels),p=f.insert("g").attr("class","cluster-label "),g=await oa(p,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0}),m=g.getBBox();if(Wr(r.flowchart.htmlLabels)){let L=g.children[0],S=Ve(g);m=L.getBoundingClientRect(),S.attr("width",m.width),S.attr("height",m.height)}let y=e.width<=m.width+e.padding?m.width+e.padding:e.width;e.width<=m.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;let x=e.height,b=e.x-y/2,w=e.y-x/2;re.trace("Data ",e,JSON.stringify(e));let _;if(e.look==="handDrawn"){let L=Ye.svg(f),S=Bt(e,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),C=L.path(Cu(b,w,y,x,0),S);_=f.insert(()=>(re.debug("Rough node insert CXC",C),C),":first-child"),_.select("path:nth-child(2)").attr("style",u.join(";")),_.select("path").attr("style",h.join(";").replace("fill","stroke"))}else _=f.insert("rect",":first-child"),_.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",w).attr("width",y).attr("height",x);let{subGraphTitleTopMargin:k}=ou(r);if(p.attr("transform",`translate(${e.x-m.width/2}, ${e.y-e.height/2+k})`),o){let L=p.select("span");L&&L.attr("style",o)}let E=_.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=m.height-e.padding/2,e.intersect=function(L){return Jp(e,L)},{cluster:f,labelBBox:m}},"rect"),C6e=v((t,e)=>{let r=t.insert("g").attr("class","note-cluster").attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");let s=n.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(o){return Jp(e,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),A6e=v(async(t,e)=>{let r=pe(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:o,nodeBorder:l}=n,u=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),h=u.insert("g",":first-child"),f=u.insert("g").attr("class","cluster-label"),d=u.append("rect"),p=f.node().appendChild(await Ph(e.label,e.labelStyle,void 0,!0)),g=p.getBBox();if(Wr(r.flowchart.htmlLabels)){let C=p.children[0],M=Ve(p);g=C.getBoundingClientRect(),M.attr("width",g.width),M.attr("height",g.height)}let m=0*e.padding,y=m/2,x=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+m;e.width<=g.width+e.padding?e.diff=(x-e.width)/2-e.padding:e.diff=-e.padding;let b=e.height+m,w=e.height+m-g.height-6,_=e.x-x/2,k=e.y-b/2;e.width=x;let E=e.y-e.height/2-y+g.height+2,L;if(e.look==="handDrawn"){let C=e.cssClasses.includes("statediagram-cluster-alt"),M=Ye.svg(u),R=e.rx||e.ry?M.path(Cu(_,k,x,b,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:i}):M.rectangle(_,k,x,b,{seed:i});L=u.insert(()=>R,":first-child");let T=M.rectangle(_,E,x,w,{fill:C?a:s,fillStyle:C?"hachure":"solid",stroke:l,seed:i});L=u.insert(()=>R,":first-child"),d=u.insert(()=>T)}else L=h.insert("rect",":first-child"),L.attr("class","outer").attr("x",_).attr("y",k).attr("width",x).attr("height",b).attr("data-look",e.look),d.attr("class","inner").attr("x",_).attr("y",E).attr("width",x).attr("height",w);f.attr("transform",`translate(${e.x-g.width/2}, ${k+1-(Wr(r.flowchart.htmlLabels)?0:3)})`);let S=L.node().getBBox();return e.height=S.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(C){return Jp(e,C)},{cluster:u,labelBBox:g}},"roundedWithTitle"),_6e=v(async(t,e)=>{re.info("Creating subgraph rect for ",e.id,e);let r=pe(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:u,backgroundStyles:h}=Vt(e),f=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),d=Wr(r.flowchart.htmlLabels),p=f.insert("g").attr("class","cluster-label "),g=await oa(p,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0,width:e.width}),m=g.getBBox();if(Wr(r.flowchart.htmlLabels)){let L=g.children[0],S=Ve(g);m=L.getBoundingClientRect(),S.attr("width",m.width),S.attr("height",m.height)}let y=e.width<=m.width+e.padding?m.width+e.padding:e.width;e.width<=m.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;let x=e.height,b=e.x-y/2,w=e.y-x/2;re.trace("Data ",e,JSON.stringify(e));let _;if(e.look==="handDrawn"){let L=Ye.svg(f),S=Bt(e,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:i}),C=L.path(Cu(b,w,y,x,e.rx),S);_=f.insert(()=>(re.debug("Rough node insert CXC",C),C),":first-child"),_.select("path:nth-child(2)").attr("style",u.join(";")),_.select("path").attr("style",h.join(";").replace("fill","stroke"))}else _=f.insert("rect",":first-child"),_.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",w).attr("width",y).attr("height",x);let{subGraphTitleTopMargin:k}=ou(r);if(p.attr("transform",`translate(${e.x-m.width/2}, ${e.y-e.height/2+k})`),o){let L=p.select("span");L&&L.attr("style",o)}let E=_.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=m.height-e.padding/2,e.intersect=function(L){return Jp(e,L)},{cluster:f,labelBBox:m}},"kanbanSection"),L6e=v((t,e)=>{let r=pe(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),o=s.insert("g",":first-child"),l=0*e.padding,u=e.width+l;e.diff=-e.padding;let h=e.height+l,f=e.x-u/2,d=e.y-h/2;e.width=u;let p;if(e.look==="handDrawn"){let y=Ye.svg(s).rectangle(f,d,u,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});p=s.insert(()=>y,":first-child")}else p=o.insert("rect",":first-child"),p.attr("class","divider").attr("x",f).attr("y",d).attr("width",u).attr("height",h).attr("data-look",e.look);let g=p.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(m){return Jp(e,m)},{cluster:s,labelBBox:{}}},"divider"),R6e=Bj,N6e={rect:Bj,squareRect:R6e,roundedWithTitle:A6e,noteGroup:C6e,divider:L6e,kanbanSection:_6e},Fj=new Map,tg=v(async(t,e)=>{let r=e.shape||"rect",n=await N6e[r](t,e);return Fj.set(e.id,n),n},"insertCluster"),zj=v(()=>{Fj=new Map},"clear");v($j,"intersectNode");I6e=$j;v(Gj,"intersectEllipse");Uj=Gj;v(Vj,"intersectCircle");M6e=Vj;v(Wj,"intersectLine");v(GA,"sameSign");D6e=Wj;v(Hj,"intersectPolygon");O6e=Hj,Nt={node:I6e,circle:M6e,ellipse:Uj,polygon:O6e,rect:Jp};v(qj,"anchor");v(UA,"generateArcPoints");v(Yj,"bowTieRect");v(Au,"insertPolygonShape");v(Xj,"card");v(jj,"choice");v(Kj,"circle");v(Zj,"createLine");v(Qj,"crossedCircle");v(Eu,"generateCirclePoints");v(Jj,"curlyBraceLeft");v(Su,"generateCirclePoints");v(eK,"curlyBraceRight");v(la,"generateCirclePoints");v(tK,"curlyBraces");v(rK,"curvedTrapezoid");P6e=v((t,e,r,n,i,a)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),B6e=v((t,e,r,n,i,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),F6e=v((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");v(nK,"cylinder");v(iK,"dividedRectangle");v(aK,"doublecircle");v(sK,"filledCircle");v(oK,"flippedTriangle");v(lK,"forkJoin");v(cK,"halfRoundedRectangle");z6e=v((t,e,r,n,i)=>[`M${t+i},${e}`,`L${t+r-i},${e}`,`L${t+r},${e-n/2}`,`L${t+r-i},${e-n}`,`L${t+i},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" "),"createHexagonPathD");v(uK,"hexagon");v(hK,"hourglass");v(fK,"icon");v(dK,"iconCircle");v(pK,"iconRounded");v(gK,"iconSquare");v(mK,"imageSquare");v(vK,"inv_trapezoid");v(o5,"drawRect");v(yK,"labelRect");v(xK,"lean_left");v(bK,"lean_right");v(wK,"lightningBolt");$6e=v((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),G6e=v((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),U6e=v((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");v(kK,"linedCylinder");v(TK,"linedWaveEdgedRect");v(EK,"multiRect");v(SK,"multiWaveEdgedRectangle");v(CK,"note");V6e=v((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");v(AK,"question");v(_K,"rect_left_inv_arrow");v(LK,"rectWithTitle");v(RK,"roundedRect");v(NK,"shadedProcess");v(IK,"slopedRect");v(MK,"squareRect");v(DK,"stadium");v(OK,"state");v(PK,"stateEnd");v(BK,"stateStart");v(FK,"subroutine");v(zK,"taggedRect");v($K,"taggedWaveEdgedRectangle");v(GK,"text");W6e=v((t,e,r,n,i,a)=>`M${t},${e}
a${i},${a} 0,0,1 0,${-n}
l${r},0
a${i},${a} 0,0,1 0,${n}
M${r},${-n}
a${i},${a} 0,0,0 0,${n}
l${-r},0`,"createCylinderPathD"),H6e=v((t,e,r,n,i,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${i},${a} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${a} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),q6e=v((t,e,r,n,i,a)=>[`M${t+r/2},${-n/2}`,`a${i},${a} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");v(UK,"tiltedCylinder");v(VK,"trapezoid");v(WK,"trapezoidalPentagon");v(HK,"triangle");v(qK,"waveEdgedRectangle");v(YK,"waveRectangle");v(XK,"windowPane");v(jK,"textHelper");v(Qv,"addText");v(KK,"classBox");Y6e=v(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");v(ZK,"kanbanItem");X6e=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:MK},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:RK},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:DK},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:FK},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:nK},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Kj},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:AK},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:uK},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:bK},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:xK},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:VK},{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:vK},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:aK},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:GK},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Xj},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:NK},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:BK},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:PK},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:lK},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:hK},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Jj},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:eK},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:tK},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:wK},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:qK},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:cK},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:UK},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:kK},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:rK},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:iK},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:HK},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:XK},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:sK},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:WK},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:oK},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:IK},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:SK},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:EK},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Yj},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Qj},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:$K},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:zK},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:YK},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:_K},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:TK}],j6e=v(()=>{let e=[...Object.entries({state:OK,choice:jj,note:CK,rectWithTitle:LK,labelRect:yK,iconSquare:gK,iconCircle:dK,icon:fK,iconRounded:pK,imageSquare:mK,anchor:qj,kanbanItem:ZK,classBox:KK}),...X6e.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),QK=j6e();v(WA,"isValidShape");l5=new Map;v(wd,"insertNode");JK=v((t,e)=>{l5.set(e.id,t)},"setNodeElem"),eZ=v(()=>{l5.clear()},"clear"),Jv=v(t=>{let e=l5.get(t.id);re.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode")});function ey(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=Pn(t),e=Pn(e);let[r,n]=[t.x,t.y],[i,a]=[e.x,e.y],s=i-r,o=a-n;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}var No,Pn,c5,pc=F(()=>{or();No={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};v(ey,"calculateDeltaAndAngle");Pn=v(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),c5=v(t=>({x:v(function(e,r,n){let i=0,a=Pn(n[0]).x0&&r(o)?e>1?PZ(o,e-1,r,n,i):lg(i,o):n||(i[i.length]=o)}return i}var yc,cg=F(()=>{T5();OZ();yc=PZ});function sSe(t){var e=t==null?0:t.length;return e?yc(t,1):[]}var Br,E5=F(()=>{cg();Br=sSe});function oSe(t){return B3(P3(t,void 0,Br),t+"")}var BZ,FZ=F(()=>{E5();J8();tA();BZ=oSe});function lSe(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(i);++n{S5=lSe});function vSe(t){return mSe.test(t)}var cSe,uSe,hSe,fSe,dSe,pSe,gSe,mSe,zZ,$Z=F(()=>{cSe="\\ud800-\\udfff",uSe="\\u0300-\\u036f",hSe="\\ufe20-\\ufe2f",fSe="\\u20d0-\\u20ff",dSe=uSe+hSe+fSe,pSe="\\ufe0e\\ufe0f",gSe="\\u200d",mSe=RegExp("["+gSe+cSe+dSe+pSe+"]");zZ=vSe});function ySe(t,e,r,n){var i=-1,a=t==null?0:t.length;for(n&&a&&(r=t[++i]);++i{GZ=ySe});function xSe(t,e){return t&&Lo(e,Nr(e),t)}var VZ,WZ=F(()=>{md();mc();VZ=xSe});function bSe(t,e){return t&&Lo(e,ys(e),t)}var HZ,qZ=F(()=>{md();Ih();HZ=bSe});function wSe(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r=o)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return t.index-e.index}var pee,gee=F(()=>{dee();pee=uAe});function hAe(t,e,r){e.length?e=Ts(e,function(a){return Et(a)?function(s){return Fh(s,a.length===1?a[0]:a)}:a}):e=[qi];var n=-1;e=Ts(e,Ao(on));var i=tw(t,function(a,s,o){var l=Ts(e,function(u){return u(a)});return{criteria:l,index:++n,value:a}});return uee(i,function(a,s){return pee(a,s,r)})}var mee,vee=F(()=>{Td();iy();Xa();x_();hee();gd();gee();wu();On();mee=hAe});var fAe,yee,xee=F(()=>{g_();fAe=X5("length"),yee=fAe});function EAe(t){for(var e=bee.lastIndex=0;bee.test(t);)++e;return e}var wee,dAe,pAe,gAe,mAe,vAe,yAe,__,L_,xAe,kee,Tee,Eee,bAe,See,Cee,wAe,kAe,TAe,bee,Aee,_ee=F(()=>{wee="\\ud800-\\udfff",dAe="\\u0300-\\u036f",pAe="\\ufe20-\\ufe2f",gAe="\\u20d0-\\u20ff",mAe=dAe+pAe+gAe,vAe="\\ufe0e\\ufe0f",yAe="["+wee+"]",__="["+mAe+"]",L_="\\ud83c[\\udffb-\\udfff]",xAe="(?:"+__+"|"+L_+")",kee="[^"+wee+"]",Tee="(?:\\ud83c[\\udde6-\\uddff]){2}",Eee="[\\ud800-\\udbff][\\udc00-\\udfff]",bAe="\\u200d",See=xAe+"?",Cee="["+vAe+"]?",wAe="(?:"+bAe+"(?:"+[kee,Tee,Eee].join("|")+")"+Cee+See+")*",kAe=Cee+See+wAe,TAe="(?:"+[kee+__+"?",__,Tee,Eee,yAe].join("|")+")",bee=RegExp(L_+"(?="+L_+")|"+TAe+kAe,"g");Aee=EAe});function SAe(t){return zZ(t)?Aee(t):yee(t)}var Lee,Ree=F(()=>{xee();$Z();_ee();Lee=SAe});function CAe(t,e){return ow(t,e,function(r,n){return Y5(t,n)})}var Nee,Iee=F(()=>{A_();p_();Nee=CAe});var AAe,_d,Mee=F(()=>{Iee();FZ();AAe=BZ(function(t,e){return t==null?{}:Nee(t,e)}),_d=AAe});function RAe(t,e,r,n){for(var i=-1,a=LAe(_Ae((e-t)/(r||1)),0),s=Array(a);a--;)s[n?a:++i]=t,t+=r;return s}var _Ae,LAe,Dee,Oee=F(()=>{_Ae=Math.ceil,LAe=Math.max;Dee=RAe});function NAe(t){return function(e,r,n){return n&&typeof n!="number"&&Ys(e,r,n)&&(r=n=void 0),e=rg(e),r===void 0?(r=e,e=0):r=rg(r),n=n===void 0?e{Ot();kc()});function Tte(t){var e=t.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&Ste(t)}function Ete(t){var e=t.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&s_e(t),(e==="lr"||e==="rl")&&(o_e(t),Ste(t))}function Ste(t){Te(t.nodes(),function(e){kte(t.node(e))}),Te(t.edges(),function(e){kte(t.edge(e))})}function kte(t){var e=t.width;t.width=t.height,t.height=e}function s_e(t){Te(t.nodes(),function(e){$_(t.node(e))}),Te(t.edges(),function(e){var r=t.edge(e);Te(r.points,$_),Object.prototype.hasOwnProperty.call(r,"y")&&$_(r)})}function $_(t){t.y=-t.y}function o_e(t){Te(t.nodes(),function(e){G_(t.node(e))}),Te(t.edges(),function(e){var r=t.edge(e);Te(r.points,G_),Object.prototype.hasOwnProperty.call(r,"x")&&G_(r)})}function G_(t){var e=t.x;t.x=t.y,t.y=e}var Cte=F(()=>{Ot()});function Ate(t){t.graph().dummyChains=[],Te(t.edges(),function(e){c_e(t,e)})}function c_e(t,e){var r=e.v,n=t.node(r).rank,i=e.w,a=t.node(i).rank,s=e.name,o=t.edge(e),l=o.labelRank;if(a!==n+1){t.removeEdge(e);var u=void 0,h,f;for(f=0,++n;n{Ot();kc()});function ly(t){var e={};function r(n){var i=t.node(n);if(Object.prototype.hasOwnProperty.call(e,n))return i.rank;e[n]=!0;var a=xl(je(t.outEdges(n),function(s){return r(s.w)-t.edge(s).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),i.rank=a}Te(t.sources(),r)}function Nd(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var dw=F(()=>{Ot()});function pw(t){var e=new Sr({directed:!1}),r=t.nodes()[0],n=t.nodeCount();e.setNode(r,{});for(var i,a;u_e(e,t)u)&&bre(r,d,h)})})}function i(a,s){var o=-1,l,u=0;return Te(s,function(h,f){if(t.node(h).dummy==="border"){var d=t.predecessors(h);d.length&&(l=t.node(d[0]).order,n(s,u,f,o,l),u=f,o=l)}n(s,u,s.length,l,a.length)}),s}return zr(e,i),r}function B_e(t,e){if(t.node(e).dummy)return ja(t.predecessors(e),function(r){return t.node(r).dummy})}function bre(t,e,r){if(e>r){var n=e;e=r,r=n}var i=t[e];i||(t[e]=i={}),i[r]=!0}function F_e(t,e,r){if(e>r){var n=e;e=r,r=n}return!!t[e]&&Object.prototype.hasOwnProperty.call(t[e],r)}function z_e(t,e,r,n){var i={},a={},s={};return Te(e,function(o){Te(o,function(l,u){i[l]=l,a[l]=l,s[l]=u})}),Te(e,function(o){var l=-1;Te(o,function(u){var h=n(u);if(h.length){h=bc(h,function(m){return s[m]});for(var f=(h.length-1)/2,d=Math.floor(f),p=Math.ceil(f);d<=p;++d){var g=h[d];a[u]===u&&l{Ot();As();kc()});function Tre(t){t=fw(t),Y_e(t),k_(wre(t),function(e,r){t.node(r).x=e})}function Y_e(t){var e=Wh(t),r=t.graph().ranksep,n=0;Te(e,function(i){var a=Ss(je(i,function(s){return t.node(s).height}));Te(i,function(s){t.node(s).y=n+a/2}),n+=a+r})}var Ere=F(()=>{Ot();kc();kre()});function Ru(t,e){var r=e&&e.debugTiming?vte:yte;r("layout",()=>{var n=r(" buildLayoutGraph",()=>i9e(t));r(" runLayout",()=>X_e(n,r)),r(" updateInputGraph",()=>j_e(t,n))})}function X_e(t,e){e(" makeSpaceForEdgeLabels",()=>a9e(t)),e(" removeSelfEdges",()=>p9e(t)),e(" acyclic",()=>ute(t)),e(" nestingGraph.run",()=>Xte(t)),e(" rank",()=>e9(fw(t))),e(" injectEdgeLabelProxies",()=>s9e(t)),e(" removeEmptyRanks",()=>gte(t)),e(" nestingGraph.cleanup",()=>Kte(t)),e(" normalizeRanks",()=>pte(t)),e(" assignRankMinMax",()=>o9e(t)),e(" removeEdgeLabelProxies",()=>l9e(t)),e(" normalize.run",()=>Ate(t)),e(" parentDummyChains",()=>yre(t)),e(" addBorderSegments",()=>bte(t)),e(" order",()=>mre(t)),e(" insertSelfEdges",()=>g9e(t)),e(" adjustCoordinateSystem",()=>Tte(t)),e(" position",()=>Tre(t)),e(" positionSelfEdges",()=>m9e(t)),e(" removeBorderNodes",()=>d9e(t)),e(" normalize.undo",()=>_te(t)),e(" fixupEdgeLabelCoords",()=>h9e(t)),e(" undoCoordinateSystem",()=>Ete(t)),e(" translateGraph",()=>c9e(t)),e(" assignNodeIntersects",()=>u9e(t)),e(" reversePoints",()=>f9e(t)),e(" acyclic.undo",()=>hte(t))}function j_e(t,e){Te(t.nodes(),function(r){var n=t.node(r),i=e.node(r);n&&(n.x=i.x,n.y=i.y,e.children(r).length&&(n.width=i.width,n.height=i.height))}),Te(t.edges(),function(r){var n=t.edge(r),i=e.edge(r);n.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(n.x=i.x,n.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}function i9e(t){var e=new Sr({multigraph:!0,compound:!0}),r=i9(t.graph());return e.setGraph(Mh({},Z_e,n9(r,K_e),_d(r,Q_e))),Te(t.nodes(),function(n){var i=i9(t.node(n));e.setNode(n,Gh(n9(i,J_e),e9e)),e.setParent(n,t.parent(n))}),Te(t.edges(),function(n){var i=i9(t.edge(n));e.setEdge(n,Mh({},r9e,n9(i,t9e),_d(i,n9e)))}),e}function a9e(t){var e=t.graph();e.ranksep/=2,Te(t.edges(),function(r){var n=t.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function s9e(t){Te(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),i=t.node(e.w),a={rank:(i.rank-n.rank)/2+n.rank,e};wc(t,"edge-proxy",a,"_ep")}})}function o9e(t){var e=0;Te(t.nodes(),function(r){var n=t.node(r);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,e=Ss(e,n.maxRank))}),t.graph().maxRank=e}function l9e(t){Te(t.nodes(),function(e){var r=t.node(e);r.dummy==="edge-proxy"&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}function c9e(t){var e=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,a=t.graph(),s=a.marginx||0,o=a.marginy||0;function l(u){var h=u.x,f=u.y,d=u.width,p=u.height;e=Math.min(e,h-d/2),r=Math.max(r,h+d/2),n=Math.min(n,f-p/2),i=Math.max(i,f+p/2)}Te(t.nodes(),function(u){l(t.node(u))}),Te(t.edges(),function(u){var h=t.edge(u);Object.prototype.hasOwnProperty.call(h,"x")&&l(h)}),e-=s,n-=o,Te(t.nodes(),function(u){var h=t.node(u);h.x-=e,h.y-=n}),Te(t.edges(),function(u){var h=t.edge(u);Te(h.points,function(f){f.x-=e,f.y-=n}),Object.prototype.hasOwnProperty.call(h,"x")&&(h.x-=e),Object.prototype.hasOwnProperty.call(h,"y")&&(h.y-=n)}),a.width=r-e+s,a.height=i-n+o}function u9e(t){Te(t.edges(),function(e){var r=t.edge(e),n=t.node(e.v),i=t.node(e.w),a,s;r.points?(a=r.points[0],s=r.points[r.points.length-1]):(r.points=[],a=i,s=n),r.points.unshift(B_(n,a)),r.points.push(B_(i,s))})}function h9e(t){Te(t.edges(),function(e){var r=t.edge(e);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function f9e(t){Te(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}function d9e(t){Te(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),n=t.node(r.borderTop),i=t.node(r.borderBottom),a=t.node(ha(r.borderLeft)),s=t.node(ha(r.borderRight));r.width=Math.abs(s.x-a.x),r.height=Math.abs(i.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2}}),Te(t.nodes(),function(e){t.node(e).dummy==="border"&&t.removeNode(e)})}function p9e(t){Te(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}function g9e(t){var e=Wh(t);Te(e,function(r){var n=0;Te(r,function(i,a){var s=t.node(i);s.order=a+n,Te(s.selfEdges,function(o){wc(t,"selfedge",{width:o.label.width,height:o.label.height,rank:s.rank,order:a+ ++n,e:o.e,label:o.label},"_se")}),delete s.selfEdges})})}function m9e(t){Te(t.nodes(),function(e){var r=t.node(e);if(r.dummy==="selfedge"){var n=t.node(r.e.v),i=n.x+n.width/2,a=n.y,s=r.x-i,o=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:i+2*s/3,y:a-o},{x:i+5*s/6,y:a-o},{x:i+s,y:a},{x:i+5*s/6,y:a+o},{x:i+2*s/3,y:a+o}],r.label.x=r.x,r.label.y=r.y}})}function n9(t,e){return Cd(_d(t,e),Number)}function i9(t){var e={};return Te(t,function(r,n){e[n.toLowerCase()]=r}),e}var K_e,Z_e,Q_e,J_e,e9e,t9e,r9e,n9e,Sre=F(()=>{Ot();As();wte();Cte();P_();U_();t9();Zte();vre();xre();Ere();kc();K_e=["nodesep","edgesep","ranksep","marginx","marginy"],Z_e={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Q_e=["acyclicer","ranker","rankdir","align"],J_e=["width","height"],e9e={width:0,height:0},t9e=["minlen","weight","width","height","labeloffset"],r9e={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},n9e=["labelpos"]});var uy=F(()=>{P_();Sre();U_();t9()});function Do(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:v9e(t),edges:y9e(t)};return ar(t.graph())||(e.value=jr(t.graph())),e}function v9e(t){return je(t.nodes(),function(e){var r=t.node(e),n=t.parent(e),i={v:e};return ar(r)||(i.value=r),ar(n)||(i.parent=n),i})}function y9e(t){return je(t.edges(),function(e){var r=t.edge(e),n={v:e.v,w:e.w};return ar(e.name)||(n.name=e.name),ar(r)||(n.value=r),n})}var a9=F(()=>{Ot();uw()});var Dre={};vr(Dre,{render:()=>E9e});var dr,Id,_re,x9e,mw,b9e,Lre,Rre,w9e,hy,Are,k9e,Nre,Ire,T9e,Mre,E9e,Ore=F(()=>{_u();yl();sl();pc();bo();Ya();kn();or();uy();a9();As();As();a9();dr=new Map,Id=new Map,_re=new Map,x9e=v(()=>{Id.clear(),_re.clear(),dr.clear()},"clear"),mw=v((t,e)=>{let r=Id.get(e)||[];return re.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),b9e=v((t,e)=>{let r=Id.get(e)||[];return re.info("Descendants of ",e," is ",r),re.info("Edge is ",t),t.v===e||t.w===e?!1:r?r.includes(t.v)||mw(t.v,e)||mw(t.w,e)||r.includes(t.w):(re.debug("Tilt, ",e,",not in descendants"),!1)},"edgeInCluster"),Lre=v((t,e,r,n)=>{re.warn("Copying children of ",t,"root",n,"data",e.node(t),n);let i=e.children(t)||[];t!==n&&i.push(t),re.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach(a=>{if(e.children(a).length>0)Lre(a,e,r,n);else{let s=e.node(a);re.info("cp ",a," to ",n," with parent ",t),r.setNode(a,s),n!==e.parent(a)&&(re.warn("Setting parent",a,e.parent(a)),r.setParent(a,e.parent(a))),t!==n&&a!==t?(re.debug("Setting parent",a,t),r.setParent(a,t)):(re.info("In copy ",t,"root",n,"data",e.node(t),n),re.debug("Not Setting parent for node=",a,"cluster!==rootId",t!==n,"node!==clusterId",a!==t));let o=e.edges(a);re.debug("Copying Edges",o),o.forEach(l=>{re.info("Edge",l);let u=e.edge(l.v,l.w,l.name);re.info("Edge data",u,n);try{b9e(l,n)?(re.info("Copying as ",l.v,l.w,u,l.name),r.setEdge(l.v,l.w,u,l.name),re.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):re.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",n," clusterId:",t)}catch(h){re.error(h)}})}re.debug("Removing node",a),e.removeNode(a)})},"copy"),Rre=v((t,e)=>{let r=e.children(t),n=[...r];for(let i of r)_re.set(i,t),n=[...n,...Rre(i,e)];return n},"extractDescendants"),w9e=v((t,e,r)=>{let n=t.edges().filter(l=>l.v===e||l.w===e),i=t.edges().filter(l=>l.v===r||l.w===r),a=n.map(l=>({v:l.v===e?r:l.v,w:l.w===e?e:l.w})),s=i.map(l=>({v:l.v,w:l.w}));return a.filter(l=>s.some(u=>l.v===u.v&&l.w===u.w))},"findCommonEdges"),hy=v((t,e,r)=>{let n=e.children(t);if(re.trace("Searching children of id ",t,n),n.length<1)return t;let i;for(let a of n){let s=hy(a,e,r),o=w9e(e,r,s);if(s)if(o.length>0)i=s;else return s}return i},"findNonClusterChild"),Are=v(t=>!dr.has(t)||!dr.get(t).externalConnections?t:dr.has(t)?dr.get(t).id:t,"getAnchorId"),k9e=v((t,e)=>{if(!t||e>10){re.debug("Opting out, no graph ");return}else re.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(re.warn("Cluster identified",r," Replacement id in edges: ",hy(r,t,r)),Id.set(r,Rre(r,t)),dr.set(r,{id:hy(r,t,r),clusterData:t.node(r)}))}),t.nodes().forEach(function(r){let n=t.children(r),i=t.edges();n.length>0?(re.debug("Cluster identified",r,Id),i.forEach(a=>{let s=mw(a.v,r),o=mw(a.w,r);s^o&&(re.warn("Edge: ",a," leaves cluster ",r),re.warn("Descendants of XXX ",r,": ",Id.get(r)),dr.get(r).externalConnections=!0)})):re.debug("Not a cluster ",r,Id)});for(let r of dr.keys()){let n=dr.get(r).id,i=t.parent(n);i!==r&&dr.has(i)&&!dr.get(i).externalConnections&&(dr.get(r).id=i)}t.edges().forEach(function(r){let n=t.edge(r);re.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),re.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let i=r.v,a=r.w;if(re.warn("Fix XXX",dr,"ids:",r.v,r.w,"Translating: ",dr.get(r.v)," --- ",dr.get(r.w)),dr.get(r.v)||dr.get(r.w)){if(re.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),i=Are(r.v),a=Are(r.w),t.removeEdge(r.v,r.w,r.name),i!==r.v){let s=t.parent(i);dr.get(s).externalConnections=!0,n.fromCluster=r.v}if(a!==r.w){let s=t.parent(a);dr.get(s).externalConnections=!0,n.toCluster=r.w}re.warn("Fix Replacing with XXX",i,a,r.name),t.setEdge(i,a,n,r.name)}}),re.warn("Adjusted Graph",Do(t)),Nre(t,0),re.trace(dr)},"adjustClustersAndEdges"),Nre=v((t,e)=>{if(re.warn("extractor - ",e,Do(t),t.children("D")),e>10){re.error("Bailing out");return}let r=t.nodes(),n=!1;for(let i of r){let a=t.children(i);n=n||a.length>0}if(!n){re.debug("Done, no node has children",t.nodes());return}re.debug("Nodes = ",r,e);for(let i of r)if(re.debug("Extracting node",i,dr,dr.has(i)&&!dr.get(i).externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),!dr.has(i))re.debug("Not a cluster",i,e);else if(!dr.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){re.warn("Cluster without external connections, without a parent and with children",i,e);let s=t.graph().rankdir==="TB"?"LR":"TB";dr.get(i)?.clusterData?.dir&&(s=dr.get(i).clusterData.dir,re.warn("Fixing dir",dr.get(i).clusterData.dir,s));let o=new Sr({multigraph:!0,compound:!0}).setGraph({rankdir:s,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});re.warn("Old graph before copy",Do(t)),Lre(i,t,o,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:dr.get(i).clusterData,label:dr.get(i).label,graph:o}),re.warn("New graph after copy node: (",i,")",Do(o)),re.debug("Old graph after copy",Do(t))}else re.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!dr.get(i).externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),re.debug(dr);r=t.nodes(),re.warn("New list of nodes",r);for(let i of r){let a=t.node(i);re.warn(" Now next level",i,a),a?.clusterNode&&Nre(a.graph,e+1)}},"extractor"),Ire=v((t,e)=>{if(e.length===0)return[];let r=Object.assign([],e);return e.forEach(n=>{let i=t.children(n),a=Ire(t,i);r=[...r,...a]}),r},"sorter"),T9e=v(t=>Ire(t,t.children()),"sortNodesByHierarchy"),Mre=v(async(t,e,r,n,i,a)=>{re.warn("Graph in recursive render:XAX",Do(e),i);let s=e.graph().rankdir;re.trace("Dir in recursive render - dir:",s);let o=t.insert("g").attr("class","root");e.nodes()?re.info("Recursive render XXX",e.nodes()):re.info("No nodes found for",e),e.edges().length>0&&re.info("Recursive edges",e.edge(e.edges()[0]));let l=o.insert("g").attr("class","clusters"),u=o.insert("g").attr("class","edgePaths"),h=o.insert("g").attr("class","edgeLabels"),f=o.insert("g").attr("class","nodes");await Promise.all(e.nodes().map(async function(m){let y=e.node(m);if(i!==void 0){let x=JSON.parse(JSON.stringify(i.clusterData));re.trace(`Setting data for parent cluster XXX
Node.id = `,m,`
data=`,x.height,`
Parent cluster`,i.height),e.setNode(i.id,x),e.parent(m)||(re.trace("Setting parent",m,i.id),e.setParent(m,i.id,x))}if(re.info("(Insert) Node XXX"+m+": "+JSON.stringify(e.node(m))),y?.clusterNode){re.info("Cluster identified XBX",m,y.width,e.node(m));let{ranksep:x,nodesep:b}=e.graph();y.graph.setGraph({...y.graph.graph(),ranksep:x+25,nodesep:b});let w=await Mre(f,y.graph,r,n,e.node(m),a),_=w.elem;Pt(y,_),y.diff=w.diff||0,re.info("New compound node after recursive render XAX",m,"width",y.width,"height",y.height),JK(_,y)}else e.children(m).length>0?(re.trace("Cluster - the non recursive path XBX",m,y.id,y,y.width,"Graph:",e),re.trace(hy(y.id,e)),dr.set(y.id,{id:hy(y.id,e),node:y})):(re.trace("Node - the non recursive path XAX",m,f,e.node(m),s),await wd(f,e.node(m),{config:a,dir:s}))})),await v(async()=>{let m=e.edges().map(async function(y){let x=e.edge(y.v,y.w,y.name);re.info("Edge "+y.v+" -> "+y.w+": "+JSON.stringify(y)),re.info("Edge "+y.v+" -> "+y.w+": ",y," ",JSON.stringify(e.edge(y))),re.info("Fix",dr,"ids:",y.v,y.w,"Translating: ",dr.get(y.v),dr.get(y.w)),await h5(h,x)});await Promise.all(m)},"processEdges")(),re.info("Graph before layout:",JSON.stringify(Do(e))),re.info("############################################# XXX"),re.info("### Layout ### XXX"),re.info("############################################# XXX"),Ru(e),re.info("Graph after layout:",JSON.stringify(Do(e)));let p=0,{subGraphTitleTotalMargin:g}=ou(a);return await Promise.all(T9e(e).map(async function(m){let y=e.node(m);if(re.info("Position XBX => "+m+": ("+y.x,","+y.y,") width: ",y.width," height: ",y.height),y?.clusterNode)y.y+=g,re.info("A tainted cluster node XBX1",m,y.id,y.width,y.height,y.x,y.y,e.parent(m)),dr.get(y.id).node=y,Jv(y);else if(e.children(m).length>0){re.info("A pure cluster node XBX1",m,y.id,y.x,y.y,y.width,y.height,e.parent(m)),y.height+=g,e.node(y.parentId);let x=y?.padding/2||0,b=y?.labelBBox?.height||0,w=b-x||0;re.debug("OffsetY",w,"labelHeight",b,"halfPadding",x),await tg(l,y),dr.get(y.id).node=y}else{let x=e.node(y.parentId);y.y+=g/2,re.info("A regular node XBX1 - using the padding",y.id,"parent",y.parentId,y.width,y.height,y.x,y.y,"offsetY",y.offsetY,"parent",x,x?.offsetY,y),Jv(y)}})),e.edges().forEach(function(m){let y=e.edge(m);re.info("Edge "+m.v+" -> "+m.w+": "+JSON.stringify(y),y),y.points.forEach(_=>_.y+=g/2);let x=e.node(m.v);var b=e.node(m.w);let w=d5(u,y,dr,r,x,b,n);f5(y,w)}),e.nodes().forEach(function(m){let y=e.node(m);re.info(m,y.type,y.diff),y.isGroup&&(p=y.diff)}),re.warn("Returning from recursive render XAX",o,p),{elem:o,diff:p}},"recursiveRender"),E9e=v(async(t,e)=>{let r=new Sr({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),n=e.select("g");p5(n,t.markers,t.type,t.diagramId),eZ(),iZ(),zj(),x9e(),t.nodes.forEach(a=>{r.setNode(a.id,{...a}),a.parentId&&r.setParent(a.id,a.parentId)}),re.debug("Edges:",t.edges),t.edges.forEach(a=>{if(a.start===a.end){let s=a.start,o=s+"---"+s+"---1",l=s+"---"+s+"---2",u=r.node(s);r.setNode(o,{domId:o,id:o,parentId:u.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),r.setParent(o,u.parentId),r.setNode(l,{domId:l,id:l,parentId:u.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),r.setParent(l,u.parentId);let h=structuredClone(a),f=structuredClone(a),d=structuredClone(a);h.label="",h.arrowTypeEnd="none",h.id=s+"-cyclic-special-1",f.arrowTypeEnd="none",f.id=s+"-cyclic-special-mid",d.label="",u.isGroup&&(h.fromCluster=s,d.toCluster=s),d.id=s+"-cyclic-special-2",r.setEdge(s,o,h,s+"-cyclic-special-0"),r.setEdge(o,l,f,s+"-cyclic-special-1"),r.setEdge(l,s,d,s+"-cyc