This commit is contained in:
nlohmann committed 2026-08-25 06:17:22 +00:00
1 parent 66e5a65087
commit 834c855608
264 files changed
+568 -519

No files matched your search

+5 -5
View File
@@ -455,7 +455,7 @@ Please report this to https://github.com/markedjs/marked.`,e){let n="<p>An error
`);return ck(n)}function Oae(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}function Bae(e,t={}){let r=ZXe(e,t),n=_n.lexer(r),i=[[]],a=0;function o(l,u="normal"){l.type==="text"?l.text.split(`
`).forEach((d,f)=>{f!==0&&(a++,i.push([])),d.split(" ").forEach(p=>{p=p.replace(/&#39;/g,"'"),p&&i[a].push({content:p,type:u})})}):l.type==="strong"||l.type==="em"?l.tokens.forEach(h=>{o(h,l.type)}):l.type==="html"&&i[a].push({content:l.text,type:"normal"})}return s(o,"processNode"),n.forEach(l=>{l.type==="paragraph"?l.tokens?.forEach(u=>{o(u)}):l.type==="html"?i[a].push({content:l.text,type:"normal"}):i[a].push({content:l.raw,type:"normal"})}),i}function $ae(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}function Fae(e,{markdownAutoWrap:t}={}){let r=_n.lexer(e);function n(i){return i.type==="text"?t===!1?i.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):i.text.replace(/\n */g,"<br/>"):i.type==="strong"?`<strong>${i.tokens?.map(n).join("")}</strong>`:i.type==="em"?`<em>${i.tokens?.map(n).join("")}</em>`:i.type==="paragraph"?`<p>${i.tokens?.map(n).join("")}</p>`:i.type==="space"?"":i.type==="html"?`${i.text}`:i.type==="escape"?i.text:(se.warn(`Unsupported markdown: ${i.type}`),i.raw)}return s(n,"output"),r.map(n).join("")}var Gae=F(()=>{"use strict";Pae();Y7();St();s(ZXe,"preprocessMarkdown");s(Oae,"nonMarkdownToLines");s(Bae,"markdownToLines");s($ae,"nonMarkdownToHTML");s(Fae,"markdownToHTML")});var zae=As((lP,cP)=>{"use strict";(function(e){"use strict";var t=function(){},r=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(h){return setTimeout(h,16)};function n(){var h=this;h.reads=[],h.writes=[],h.raf=r.bind(e),t("initialized",h)}s(n,"FastDom"),n.prototype={constructor:n,runTasks:s(function(h){t("run tasks");for(var d;d=h.shift();)d()},"runTasks"),measure:s(function(h,d){t("measure");var f=d?h.bind(d):h;return this.reads.push(f),i(this),f},"measure"),mutate:s(function(h,d){t("mutate");var f=d?h.bind(d):h;return this.writes.push(f),i(this),f},"mutate"),clear:s(function(h){return t("clear",h),o(this.reads,h)||o(this.writes,h)},"clear"),extend:s(function(h){if(t("extend",h),typeof h!="object")throw new Error("expected object");var d=Object.create(this);return l(d,h),d.fastdom=this,d.initialize&&d.initialize(),d},"extend"),catch:null};function i(h){h.scheduled||(h.scheduled=!0,h.raf(a.bind(null,h)),t("flush scheduled"))}s(i,"scheduleFlush");function a(h){t("flush");var d=h.writes,f=h.reads,p;try{t("flushing reads",f.length),h.runTasks(f),t("flushing writes",d.length),h.runTasks(d)}catch(m){p=m}if(h.scheduled=!1,(f.length||d.length)&&i(h),p)if(t("task errored",p.message),h.catch)h.catch(p);else throw p}s(a,"flush");function o(h,d){var f=h.indexOf(d);return!!~f&&!!h.splice(f,1)}s(o,"remove");function l(h,d){for(var f in d)d.hasOwnProperty(f)&&(h[f]=d[f])}s(l,"mixin");var u=e.fastdom=e.fastdom||new n;typeof define=="function"?define(function(){return u}):typeof cP=="object"&&(cP.exports=u)})(typeof window<"u"?window:typeof lP<"u"?lP:globalThis)});var Vae=As((Prr,uP)=>{"use strict";(function(){var e={initialize:s(function(){this._tasks=new Map},"initialize"),mutate:s(function(r,n){return t(this,"mutate",r,n)},"mutate"),measure:s(function(r,n){return t(this,"measure",r,n)},"measure"),clear:s(function(r){var n=this._tasks,i=n.get(r);this.fastdom.clear(i),n.delete(r)},"clear")};function t(r,n,i,a){var o=r._tasks,l=r.fastdom,u,h=new Promise(function(d,f){u=l[n](function(){o.delete(h);try{d(a?i.call(a):i())}catch(p){f(p)}},a)});return o.set(h,u),h}s(t,"create"),(typeof define)[0]=="f"?define(function(){return e}):(typeof uP)[0]=="o"?uP.exports=e:window.fastdomPromised=e})()});var Wae,qae,QXe,tu,u4=F(()=>{"use strict";Wae=Rs(zae(),1),qae=Rs(Vae(),1),QXe=Wae.default.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(qae.default),tu=QXe});function JXe(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}function eKe(e,t){let r=JXe(t.content);return Hae(e,[],r,t.type)}function Hae(e,t,r,n){if(r.length===0)return[{content:t.join(""),type:n},{content:"",type:n}];let[i,...a]=r,o=[...t,i];return e([{content:o.join(""),type:n}])?Hae(e,o,a,n):(t.length===0&&i&&(t.push(i),r.shift()),[{content:t.join(""),type:n},{content:r.join(""),type:n}])}function Uae(e,t){if(e.some(({content:r})=>r.includes(`
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return hP(e,t)}function hP(e,t,r=[],n=[]){if(e.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let i="";e[0].content===" "&&(i=" ",e.shift());let a=e.shift()??{content:" ",type:"normal"},o=[...n];if(i!==""&&o.push({content:i,type:"normal"}),o.push(a),t(o))return hP(e,t,r,o);if(n.length>0)r.push(n),e.unshift(a);else if(a.content){let[l,u]=eKe(t,a);r.push([l]),u.content&&e.unshift(u)}return hP(e,t,r)}var Yae=F(()=>{"use strict";s(JXe,"splitTextToChars");s(eKe,"splitWordToFitWidth");s(Hae,"splitWordToFitWidthRecursion");s(Uae,"splitLineToFitWidth");s(hP,"splitLineToFitWidthRecursion")});function jae(e,t){t&&e.attr("style",t)}async function tKe(e,t,r,n,i=!1,a=Lt()){let o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,Xae)}px`),o.attr("height",`${Math.min(10*r,Xae)}px`);let l=o.append("xhtml:div"),u=si(t.label)?await J0(t.label.replace(Tt.lineBreakRegex,`
`),a):xr(t.label,a),h=t.isNode?"nodeLabel":"edgeLabel",d=l.append("span");return d.html(u),jae(d,t.labelStyle),d.attr("class",`${h} ${n}`),jae(l,t.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(l.style("max-width",r+"px"),l.style("text-align","center")),l.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&l.attr("class","labelBkg"),(await tu.measure(()=>l.node().getBoundingClientRect())).width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px")),o.node()}function dP(e,t,r,n=!1){let i=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return n&&i.attr("text-anchor","middle"),i}function rKe(e,t,r){let n=e.append("text"),i=dP(n,1,t);fP(i,r);let a=i.node().getComputedTextLength();return n.remove(),a}function Zae(e,t,r){let n=e.append("text"),i=dP(n,1,t);fP(i,[{content:r,type:"normal"}]);let a=i.node()?.getBoundingClientRect();return a&&n.remove(),a}function nKe(e,t,r,n=!1,i=!1){let o=t.append("g"),l=o.insert("rect").attr("class","background").attr("style","stroke: none"),u=o.append("text").attr("y","-10.1");i&&u.attr("text-anchor","middle");let h=0;for(let d of r){let f=s(m=>rKe(o,1.1,m)<=e,"checkWidth"),p=f(d)?[d]:Uae(d,f);for(let m of p){let g=dP(u,h,1.1,i);fP(g,m),h++}}if(n){let d=u.node().getBBox(),f=2;return l.attr("x",d.x-f).attr("y",d.y-f).attr("width",d.width+2*f).attr("height",d.height+2*f),o.node()}else return u.node()}function Kae(e){let t=/&(amp|lt|gt);/g;return e.replace(t,(r,n)=>{switch(n){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}function fP(e,t){e.text(""),t.forEach((r,n)=>{let i=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?i.text(Kae(r.content)):i.text(" "+Kae(r.content))})}async function iKe(e,t={}){let r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(i,a,o)=>(r.push((async()=>{let l=`${a}:${o}`;return await pJ(l)?await ps(l,void 0,{class:"label-icon"}):`<i class='${xr(i,t).replace(":"," ")}'></i>`})()),i));let n=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}var Xae,li,qo=F(()=>{"use strict";Wr();Yr();St();My();Gae();er();u4();Hl();Yae();br();s(jae,"applyStyle");Xae=16384;s(tKe,"addHtmlSpan");s(dP,"createTspan");s(rKe,"computeWidthOfText");s(Zae,"computeDimensionOfText");s(nKe,"createFormattedText");s(Kae,"decodeHTMLEntities");s(fP,"updateTextContentAndStyles");s(iKe,"replaceIconSubstring");li=s(async(e,t="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,markdown:o=!0,isNode:l=!0,width:u=200,addSvgBackground:h=!1}={},d)=>{if(se.debug("XYZ createText",t,r,n,i,a,l,"addSvgBackground: ",h),a){let f=o?Fae(t,d):$ae(t),p=await iKe(lo(f),d),m=t.replace(/\\\\/g,"\\"),g={isNode:l,label:si(t)?m:p,labelStyle:r.replace("fill:","color:")};return await tKe(e,g,u,i,h,d)}else{let f=lo(t.replace(/<br\s*\/?>/g,"<br/>")),p=o?Bae(f.replace("<br>","<br/>"),d):Oae(f),m=nKe(u,e,p,t?h:!1,!l);if(l){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ut(m).attr("style",g)}else{let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ut(m).select("rect").attr("style",g.replace(/background:/g,"fill:"));let y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ut(m).select("text").attr("style",y)}return n?ut(m).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ut(m).selectAll("tspan.text-outer-tspan").classed("row",!0),m}},"createText")});async function h4(e){let t=e.getElementsByTagName("img");if(!t||t.length===0)return;let r=!Qae(e);await Promise.all([...t].map(n=>new Promise(i=>{function a(){if(n.style.display="flex",n.style.flexDirection="column",r){let o=Pe().fontSize?Pe().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[u=mr.fontSize]=Bs(o),h=u*l+"px";n.style.minWidth=h,n.style.maxWidth=h}else n.style.width="100%";i(n)}s(a,"setupImage"),setTimeout(()=>{n.complete&&a()}),n.addEventListener("error",a),n.addEventListener("load",a)})))}function Qae(e){return e.nodeType===sKe?e.textContent?.trim()!=="":e.nodeType!==aKe||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(Qae)}var aKe,sKe,pP=F(()=>{"use strict";Jt();Qi();er();aKe=1,sKe=3;s(h4,"configureLabelImages");s(Qae,"hasTextBesidesImages")});var Jae,oKe,ese,tse=F(()=>{"use strict";Wr();qo();Jt();Yr();er();Jae=3,oKe=32,ese=s(async(e,t,r)=>{let n=Pe(),i=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),a=i.insert("g").attr("class","label").attr("style",un(t.labelStyle)),l=[{text:typeof t.label=="string"?t.label:t.label?.[0]??"",cssClass:"c4-name"},{text:t.stereotype,cssClLine truncated
`),a):xr(t.label,a),h=t.isNode?"nodeLabel":"edgeLabel",d=l.append("span");return d.html(u),jae(d,t.labelStyle),d.attr("class",`${h} ${n}`),jae(l,t.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(l.style("max-width",r+"px"),l.style("text-align","center")),l.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&l.attr("class","labelBkg"),(await tu.measure(()=>l.node().getBoundingClientRect())).width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px")),o.node()}function dP(e,t,r,n=!1){let i=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return n&&i.attr("text-anchor","middle"),i}function rKe(e,t,r){let n=e.append("text"),i=dP(n,1,t);fP(i,r);let a=i.node().getComputedTextLength();return n.remove(),a}function Zae(e,t,r){let n=e.append("text"),i=dP(n,1,t);fP(i,[{content:r,type:"normal"}]);let a=i.node()?.getBoundingClientRect();return a&&n.remove(),a}function nKe(e,t,r,n=!1,i=!1){let o=t.append("g"),l=o.insert("rect").attr("class","background").attr("style","stroke: none"),u=o.append("text").attr("y","-10.1");i&&u.attr("text-anchor","middle");let h=0;for(let d of r){let f=s(m=>rKe(o,1.1,m)<=e,"checkWidth"),p=f(d)?[d]:Uae(d,f);for(let m of p){let g=dP(u,h,1.1,i);fP(g,m),h++}}if(n){let d=u.node().getBBox(),f=2;return l.attr("x",d.x-f).attr("y",d.y-f).attr("width",d.width+2*f).attr("height",d.height+2*f),o.node()}else return u.node()}function Kae(e){let t=/&(amp|lt|gt);/g;return e.replace(t,(r,n)=>{switch(n){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}function fP(e,t){e.text(""),t.forEach((r,n)=>{let i=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?i.text(Kae(r.content)):i.text(" "+Kae(r.content))})}async function iKe(e,t={}){let r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(i,a,o)=>(r.push((async()=>{let l=`${a}:${o}`;return await pJ(l)?await ps(l,void 0,{class:"label-icon"}):`<i class='${xr(i,t).replace(":"," ")}'></i>`})()),i));let n=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}var Xae,li,qo=F(()=>{"use strict";Wr();Yr();St();My();Gae();er();u4();Hl();Yae();br();s(jae,"applyStyle");Xae=16384;s(tKe,"addHtmlSpan");s(dP,"createTspan");s(rKe,"computeWidthOfText");s(Zae,"computeDimensionOfText");s(nKe,"createFormattedText");s(Kae,"decodeHTMLEntities");s(fP,"updateTextContentAndStyles");s(iKe,"replaceIconSubstring");li=s(async(e,t="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,markdown:o=!0,isNode:l=!0,width:u=200,addSvgBackground:h=!1}={},d)=>{if(se.debug("XYZ createText",t,r,n,i,a,l,"addSvgBackground: ",h),a){let f=o?Fae(t,d):$ae(t),p=await iKe(lo(f),d),m=t.replace(/\\\\/g,"\\"),g={isNode:l,label:si(t)?m:p,labelStyle:r.replace("fill:","color:")};return await tKe(e,g,u,i,h,d)}else{let f=lo(t.replace(/<br\s*\/?>/g,"<br/>")),p=o?Bae(f.replace("<br>","<br/>"),d):Oae(f),m=nKe(u,e,p,t?h:!1,!l);if(l){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ut(m).attr("style",g)}else{let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ut(m).select("rect").attr("style",g.replace(/background:/g,"fill:"));let y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ut(m).select("text").attr("style",y)}return n?ut(m).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ut(m).selectAll("tspan.text-outer-tspan").classed("row",!0),m}},"createText")});async function h4(e){let t=e.getElementsByTagName("img");if(!t||t.length===0)return;let r=!Qae(e);await Promise.all([...t].map(n=>new Promise(i=>{function a(){if(n.style.display="flex",n.style.flexDirection="column",r){let o=Pe().fontSize?Pe().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[u=mr.fontSize]=Bs(o),h=u*l+"px";n.style.minWidth=h,n.style.maxWidth=h}else n.style.width="100%";i(n)}s(a,"setupImage"),setTimeout(()=>{n.complete&&a()}),n.addEventListener("error",a),n.addEventListener("load",a)})))}function Qae(e){return e.nodeType===sKe?e.textContent?.trim()!=="":e.nodeType!==aKe||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(Qae)}var aKe,sKe,pP=F(()=>{"use strict";Jt();Qi();er();aKe=1,sKe=3;s(h4,"configureLabelImages");s(Qae,"hasTextBesidesImages")});var Jae,oKe,ese,tse=F(()=>{"use strict";Wr();qo();Jt();Yr();er();Jae=3,oKe=32,ese=s(async(e,t,r)=>{let n=Pe(),i=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),a=i.insert("g").attr("class","label").attr("style",un(t.labelStyle)),l=[{text:typeof t.label=="string"?t.label:t.label?.[0]??"",cssClass:"c4-name"},{text:t.stereotype,cssClLine truncated
M ${i.x},${i.y} L ${o.x},${o.y}`}function jse(e,t){let{labelStyles:r,nodeStyles:n}=st(t);t.labelStyle=r,t.label="";let i=e.insert("g").attr("class",vt(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:o}=t,l=ot.svg(i),u=ft(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=l.circle(0,0,a*2,u),d=DKe(a),f=l.path(d,u),p=i.insert(()=>h,":first-child");return p.insert(()=>f),p.attr("class","outer-path"),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),n&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),ht(t,p),t.intersect=function(m){return se.info("crossedCircle intersect",t,{radius:a,point:m}),it.circle(t,a,m)},i}var Xse=F(()=>{"use strict";St();Ht();Xt();Kt();Zt();s(DKe,"createLine");s(jse,"crossedCircle")});function ef(e,t,r,n=100,i=0,a=180){let o=[],l=i*Math.PI/180,d=(a*Math.PI/180-l)/(n-1);for(let f=0;f<n;f++){let p=l+f*d,m=e+r*Math.cos(p),g=t+r*Math.sin(p);o.push({x:-m,y:-g})}return o}async function Kse(e,t){let{labelStyles:r,nodeStyles:n}=st(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:o}=await yt(e,t,vt(t)),l=t.look==="neo"?18:t.padding??0,u=t.look==="neo"?12:t.padding??0,h=a.width+l,d=a.height+u,f=Math.max(5,d*.1),{cssStyles:p}=t,m=[...ef(h/2,-d/2,f,30,-90,0),{x:-h/2-f,y:f},...ef(h/2+f*2,-f,f,20,-180,-270),...ef(h/2+f*2,f,f,20,-90,-180),{x:-h/2-f,y:-d/2},...ef(h/2,d/2,f,20,0,90)],g=[{x:h/2,y:-d/2-f},{x:-h/2,y:-d/2-f},...ef(h/2,-d/2,f,20,-90,0),{x:-h/2-f,y:-f},...ef(h/2+h*.1,-f,f,20,-180,-270),...ef(h/2+h*.1,f,f,20,-90,-180),{x:-h/2-f,y:d/2},...ef(h/2,d/2,f,20,0,90),{x:-h/2,y:d/2+f},{x:h/2,y:d/2+f}],y=ot.svg(i),v=ft(t,{fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let b=hr(m).replace("Z",""),T=y.path(b,v),w=hr(g),C=y.path(w,{...v}),S=i.insert("g",":first-child");return S.insert(()=>C,":first-child").attr("stroke-opacity",0),S.insert(()=>T,":first-child"),S.attr("class","text"),p&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",p),n&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(${f}, 0)`),o.attr("transform",`translate(${-h/2+f-(a.x-(a.left??0))},${-d/2+(t.padding??0)/2-(a.y-(a.top??0))})`),ht(t,S),t.intersect=function(k){return it.polygon(t,g,k)},i}var Zse=F(()=>{"use strict";Ht();Zt();Xt();Kt();s(ef,"generateCirclePoints");s(Kse,"curlyBraceLeft")});function tf(e,t,r,n=100,i=0,a=180){let o=[],l=i*Math.PI/180,d=(a*Math.PI/180-l)/(n-1);for(let f=0;f<n;f++){let p=l+f*d,m=e+r*Math.cos(p),g=t+r*Math.sin(p);o.push({x:m,y:g})}return o}async function Qse(e,t){let{labelStyles:r,nodeStyles:n}=st(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:o}=await yt(e,t,vt(t)),l=t.look==="neo"?18:t.padding??0,u=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?l*2:l),d=a.height+(t.look==="neo"?u*2:u),f=Math.max(5,d*.1),{cssStyles:p}=t,m=[...tf(h/2,-d/2,f,20,-90,0),{x:h/2+f,y:-f},...tf(h/2+f*2,-f,f,20,-180,-270),...tf(h/2+f*2,f,f,20,-90,-180),{x:h/2+f,y:d/2},...tf(h/2,d/2,f,20,0,90)],g=[{x:-h/2,y:-d/2-f},{x:h/2,y:-d/2-f},...tf(h/2,-d/2,f,20,-90,0),{x:h/2+f,y:-f},...tf(h/2+f*2,-f,f,20,-180,-270),...tf(h/2+f*2,f,f,20,-90,-180),{x:h/2+f,y:d/2},...tf(h/2,d/2,f,20,0,90),{x:h/2,y:d/2+f},{x:-h/2,y:d/2+f}],y=ot.svg(i),v=ft(t,{fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let b=hr(m).replace("Z",""),T=y.path(b,v),w=hr(g),C=y.path(w,{...v}),S=i.insert("g",":first-child");return S.insert(()=>C,":first-child").attr("stroke-opacity",0),S.insert(()=>T,":first-child"),S.attr("class","text"),p&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",p),n&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(${-f}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-d/2+(t.padding??0)/2-(a.y-(a.top??0))})`),ht(t,S),t.intersect=function(k){return it.polygon(t,g,k)},i}var Jse=F(()=>{"use strict";Ht();Zt();Xt();Kt();s(tf,"generateCirclePoints");s(Qse,"curlyBraceRight")});function gs(e,t,r,n=100,i=0,a=180){let o=[],l=i*Math.PI/180,d=(a*Math.PI/180-l)/(n-1);for(let f=0;f<n;f++){let p=l+f*d,m=e+r*Math.cos(p),g=t+r*Math.sin(p);o.push({x:-m,y:-g})}return o}async function eoe(e,t){let{labelStyles:r,nodeStyles:n}=st(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:o}=await yt(e,t,vt(t)),l=t.look==="neo"?18:t.padding??0,u=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?l*2:l),d=a.height+(t.look==="neo"?u*2:u),f=Math.max(5,d*.1),{cssStyles:p}=t,m=[...gs(h/2,-d/2,f,30,-90,0),{x:-h/2-f,y:f},...gs(h/2+f*2,-f,f,20,-180,-270),...gs(h/2+f*2,f,f,20,-90,-180),{x:-h/2-f,y:-d/2},...gs(h/2,d/2,f,20,0,90)],g=[...gs(-h/2+f+f/2,-d/2,f,20,-90,-180),{x:h/2-f/2,y:f},...gs(-h/2-f/2,-f,f,20,0,90),...gs(-h/2-f/2,f,f,20,-90,0),{x:h/2-f/2,y:-f},...gs(-h/2+f+f/2,d/2,f,30,-180,-270)],y=[{x:h/2,y:-d/2-f},{x:-h/2,y:-d/2-f},...gs(h/2,-d/2,f,20,-90,0),{x:-h/2-f,y:-f},...gs(h/2+f*2,-f,f,20,-180,-270),...gs(h/2+f*2,f,f,20,-90,-180),{x:-h/2-f,y:d/2},...gs(h/2,d/2,f,20,0,90),{x:-h/2,y:d/2+f},{x:h/2-f-f/2,y:d/2+f},...gs(-h/2+f+f/2,-d/2,f, Line truncated
a${i},${a} 0,0,1 0,${-n}
l${r},0
@@ -590,13 +590,13 @@ You cannot set this config via configuration inside the diagram as it is a secur
You have to call mermaid.initialize.`)}isLinkData(t){return t!==null&&typeof t=="object"&&"id"in t&&typeof t.id=="string"}addLink(t,r,n){let i=this.isLinkData(n)?n.id.replace("@",""):void 0;se.info("addLink",t,r,i);for(let a of t)for(let o of r){let l=a===t[t.length-1],u=o===r[0];l&&u?this.addSingleLink(a,o,n,i):this.addSingleLink(a,o,n,void 0)}}updateLinkInterpolate(t,r){t.forEach(n=>{n==="default"?this.edges.defaultInterpolate=r:this.edges[n].interpolate=r})}updateLink(t,r){t.forEach(n=>{if(typeof n=="number"&&n>=this.edges.length)throw new Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);n==="default"?this.edges.defaultStyle=r:(this.edges[n].style=r,(this.edges[n]?.style?.length??0)>0&&!this.edges[n]?.style?.some(i=>i?.startsWith("fill"))&&this.edges[n]?.style?.push("fill:none"))})}addClass(t,r){let n=r.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach(i=>{let a=this.classes.get(i);a===void 0&&(a={id:i,styles:[],textStyles:[]},this.classes.set(i,a)),n?.forEach(o=>{if(/color/.exec(o)){let l=o.replace("fill","bgFill");a.textStyles.push(l)}a.styles.push(o)})})}setDirection(t){this.direction=t.trim(),/.*</.exec(this.direction)&&(this.direction="RL"),/.*\^/.exec(this.direction)&&(this.direction="BT"),/.*>/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(t,r){for(let n of t.split(",")){let i=this.vertices.get(n);i&&i.classes.push(r);let a=this.edges.find(l=>l.id===n);a&&a.classes.push(r);let o=this.subGraphLookup.get(n);o&&o.classes.push(r)}}setTooltip(t,r){if(r!==void 0){r=this.sanitizeText(r);for(let n of t.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(n):n,r)}}setClickFun(t,r,n){if(Pe().securityLevel!=="loose"||r===void 0)return;let i=[];if(typeof n=="string"){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o<i.length;o++){let l=i[o].trim();l.startsWith('"')&&l.endsWith('"')&&(l=l.substr(1,l.length-2)),i[o]=l}}i.length===0&&i.push(t);let a=this.vertices.get(t);a&&(a.haveCallback=!0,this.funs.push(()=>{let o=this.lookUpDomId(t),l=document.querySelector(`[id="${o}"]`);l!==null&&l.addEventListener("click",()=>{or.runFunc(r,...i)},!1)}))}setLink(t,r,n){t.split(",").forEach(i=>{let a=this.vertices.get(i);a!==void 0&&(a.link=or.formatUrl(r,this.config),a.linkTarget=n)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,r,n){t.split(",").forEach(i=>{this.setClickFun(i,r,n)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach(r=>{r(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){let r=_y();ut(t).select("svg").selectAll("g.node").on("mouseover",a=>{let o=ut(a.currentTarget),l=o.attr("title");if(l===null)return;let u=a.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(o.attr("title")).style("left",window.scrollX+u.left+(u.right-u.left)/2+"px").style("top",window.scrollY+u.bottom+"px"),r.html(ao.sanitize(l)),o.classed("hover",!0)}).on("mouseout",a=>{r.transition().duration(500).style("opacity",0),ut(a.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=Pe(),Tr()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,r,n){let i=t.text.trim(),a=n.text;t===n&&/\s/.exec(n.text)&&(i=void 0);let l=s(p=>{let m={boolean:{},number:{},string:{}},g=[],y;return{nodeList:p.filter(function(x){let b=typeof x;return x.stmt&&x.stmt==="dir"?(y=x.value,!1):x.trim()===""?!1:b in m?m[b].hasOwnProperty(x)?!1:m[b][x]=!0:g.includes(x)?!1:g.push(x)}),dir:y}},"uniq")(r.flat()),u=l.nodeList,h=l.dir,d=Pe().flowchart??{};if(h=h??(d.inheritDir?this.getDirection()??Pe().direction??void 0:void 0),this.version==="gen-1")for(let p=0;p<u.length;p++)u[p]=this.lookUpDomId(u[p]);i=i??"subGraph"+this.subCount,a=a||"",a=this.sanitizeText(a),this.subCount=this.subCount+1;let f={id:i,nodes:u,title:a.trim(),classes:[],dir:h,labelType:this.sanitizeNodeLabelType(n?.type)};return se.info("Adding",f.id,f.nodes,f.dir),f.nodes=this.makeUniq(f,this.subGraphs).nodes,this.subGraphs.push(f),this.subGraphLookup.set(i,f),i}getPosForId(t){for(let[r,n]of this.subGraphs.entries())if(n.id===t)return r;return-1}indexNodes2(t,r){let n=this.subGraphs[r].nodes;if(this.secCount=this.secCount+1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[ Line truncated
outsidePoint: ${JSON.stringify(t)}
insidePoint : ${JSON.stringify(r)}
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let n=e.x,i=e.y,a=Math.abs(n-r.x),o=e.width/2,l=r.x<t.x?o-a:o+a,u=e.height/2,h=Math.abs(t.y-r.y),d=Math.abs(t.x-r.x);if(Math.abs(i-t.y)*o>Math.abs(n-t.x)*u){let f=r.y<t.y?t.y-u-i:i-u-t.y;l=d*f/h;let p={x:r.x<t.x?r.x+l:r.x-d+l,y:r.y<t.y?r.y+h-f:r.y-h+f};return l===0&&(p.x=t.x,p.y=t.y),d===0&&(p.x=t.x),h===0&&(p.y=t.y),se.debug(`abc89 top/bottom calc, Q ${h}, q ${f}, R ${d}, r ${l}`,p),p}else{r.x<t.x?l=t.x-o-n:l=n-o-t.x;let f=h*l/d,p=r.x<t.x?r.x+d-l:r.x-d+l,m=r.y<t.y?r.y+f:r.y-f;return se.debug(`sides calc abc89, Q ${h}, q ${f}, R ${d}, r ${l}`,{_x:p,_y:m}),l===0&&(p=t.x,m=t.y),d===0&&(p=t.x),h===0&&(m=t.y),{x:p,y:m}}},"intersection"),Nue=s((e,t)=>{se.warn("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(a=>{if(se.info("abc88 checking point",a,t),!IZe(t,a)&&!i){let o=MZe(t,n,a);se.debug("abc88 inside",a,n,o),se.debug("abc88 intersection",o,t);let l=!1;r.forEach(u=>{l=l||u.x===o.x&&u.y===o.y}),r.some(u=>u.x===o.x&&u.y===o.y)?se.warn("abc88 no intersect",o,r):r.push(o),i=!0}else se.warn("abc88 outside",a,n),n=a,i||r.push(a)}),se.debug("returning points",r),r},"cutPathAtIntersect");s(NZe,"extractCornerPoints");Pue=s(function(e,t,r){let n=t.x-e.x,i=t.y-e.y,a=Math.sqrt(n*n+i*i),o=r/a;return{x:t.x-o*n,y:t.y-o*i}},"findAdjacentPoint"),PZe=s(function(e){let{cornerPointPositions:t}=NZe(e),r=[];for(let n=0;n<e.length;n++)if(t.includes(n)){let i=e[n-1],a=e[n+1],o=e[n],l=Pue(i,o,5),u=Pue(a,o,5),h=u.x-l.x,d=u.y-l.y;r.push(l);let f=Math.sqrt(2)*2,p={x:o.x,y:o.y};if(Math.abs(a.x-i.x)>10&&Math.abs(a.y-i.y)>=10){se.debug("Corner point fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));let m=5;o.x===l.x?p={x:h<0?l.x-m+f:l.x+m-f,y:d<0?l.y-f:l.y+f}:p={x:h<0?l.x-f:l.x+f,y:d<0?l.y-m+f:l.y+m-f}}else se.debug("Corner point skipping fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));r.push(p,u)}else r.push(e[n]);return r},"fixCorners"),OZe=s((e,t,r)=>{let n=e-t-r,i=2,a=2,o=i+a,l=Math.floor(n/o),u=Number.isFinite(l)?Math.max(0,l):0,h=Array(u).fill(`${i} ${a}`).join(" ");return`0 ${t} ${h} ${r}`},"generateDashArray"),of=s(function(e,t,r,n,i,a,o,l=!1){if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:u,layout:h}=Pe(),d=t.points,f=!1,p=i;var m=a;let g=[];for(let O in t.cssCompiledStyles)S2(O)||g.push(t.cssCompiledStyles[O]);if(h==="swimlane"){if(m.intersect&&p.intersect&&Array.isArray(d)&&d.length>=2)if(d.length===2)d=[p.intersect(d[0]),m.intersect(d[1])];else{let O=d.slice(1,-1),$=O[0],W=O[O.length-1],V=.5,z=Math.abs(d[d.length-1].x-W.x)<V&&Math.abs(d[d.length-1].y-W.y)<V,H=p.intersect($),K=z?W:m.intersect(W),J=Math.abs(K.x-W.x)<V&&Math.abs(K.y-W.y)<V,Z=Math.abs(H.x-$.x)<V&&Math.abs(H.y-$.y)<V?[]:[H],pe=J?[]:[K];d=[...Z,...O,...pe]}d=DZe(t,d)}else m.intersect&&p.intersect&&!l&&(d=d.slice(1,t.points.length-1),d.unshift(p.intersect(d[0])),d.push(m.intersect(d[d.length-1])));let y=btoa(JSON.stringify(d));t.toCluster&&(se.info("to cluster abc88",r.get(t.toCluster)),d=Nue(t.points,r.get(t.toCluster).node),f=!0),t.fromCluster&&(se.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(d,null,2)),d=Nue(d.reverse(),r.get(t.fromCluster).node).reverse(),f=!0);let v=d.filter(O=>!Number.isNaN(O.y)),x=LZe(t.curve);x!=="rounded"&&(v=PZe(v));let b=Zc;switch(x){case"linear":b=Zc;break;case"basis":b=bh;break;case"cardinal":b=Kb;break;case"bumpX":b=Hb;break;case"bumpY":b=Ub;break;case"catmullRom":b=Jb;break;case"monotoneX":b=e2;break;case"monotoneY":b=t2;break;case"natural":b=Ay;break;case"step":b=Ry;break;case"stepAfter":b=n2;break;case"stepBefore":b=r2;break;case"rounded":b=Zc;break;default:b=bh}let{x:T,y:w}=Lue(t),C=xh().x(T).y(w).curve(b),S;switch(t.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-invisible";break;default:S="edge-thickness-normal"}switch(t.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break;default:S+=" edge-pattern-solid"}let k,R=x==="rounded"?BZe($Ze(v,t),5):C(v),M=Array.isArray(t.style)?t.style:[t.style],P=M.find(O=>O?.startsWith("stroke:")),N="";t.animate&&(N="edge-animation-fast"),t.animation&&(N="edge-animation-"+t.animation);let _=!1;if(t.look==="handDrawn"){let O=ot.svg(e);Object.assign([],v);let $=O.path(R,{roughness:.3,seed:u});S+=" transition",k=ut($).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+(N?" "+N:"")).attr("style",M?M.reduce((V,z)=>V+";"+z,""):"");let W=k.attr("d");k.attr("d",W),e.node().appendChild(k.node())}else{let O=g.join(";"),$=M?M.reduce((J,ne)=>J+ne+";",""):"",W=(O?O+";"+$+";":$)+";"+(M?M.reduce((J,ne)=>J+";"+ne,""):"");k=e.append("path").attr("d",R).attr("id",`${o}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+(N?" "+N:"")).attr("style",W),P=W.match(/stroke:([^;]+)/)?.[1],_=t.animate===!0||!!t.animation|| Line truncated
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let n=e.x,i=e.y,a=Math.abs(n-r.x),o=e.width/2,l=r.x<t.x?o-a:o+a,u=e.height/2,h=Math.abs(t.y-r.y),d=Math.abs(t.x-r.x);if(Math.abs(i-t.y)*o>Math.abs(n-t.x)*u){let f=r.y<t.y?t.y-u-i:i-u-t.y;l=d*f/h;let p={x:r.x<t.x?r.x+l:r.x-d+l,y:r.y<t.y?r.y+h-f:r.y-h+f};return l===0&&(p.x=t.x,p.y=t.y),d===0&&(p.x=t.x),h===0&&(p.y=t.y),se.debug(`abc89 top/bottom calc, Q ${h}, q ${f}, R ${d}, r ${l}`,p),p}else{r.x<t.x?l=t.x-o-n:l=n-o-t.x;let f=h*l/d,p=r.x<t.x?r.x+d-l:r.x-d+l,m=r.y<t.y?r.y+f:r.y-f;return se.debug(`sides calc abc89, Q ${h}, q ${f}, R ${d}, r ${l}`,{_x:p,_y:m}),l===0&&(p=t.x,m=t.y),d===0&&(p=t.x),h===0&&(m=t.y),{x:p,y:m}}},"intersection"),Nue=s((e,t)=>{se.warn("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(a=>{if(se.info("abc88 checking point",a,t),!IZe(t,a)&&!i){let o=MZe(t,n,a);se.debug("abc88 inside",a,n,o),se.debug("abc88 intersection",o,t);let l=!1;r.forEach(u=>{l=l||u.x===o.x&&u.y===o.y}),r.some(u=>u.x===o.x&&u.y===o.y)?se.warn("abc88 no intersect",o,r):r.push(o),i=!0}else se.warn("abc88 outside",a,n),n=a,i||r.push(a)}),se.debug("returning points",r),r},"cutPathAtIntersect");s(NZe,"extractCornerPoints");Pue=s(function(e,t,r){let n=t.x-e.x,i=t.y-e.y,a=Math.sqrt(n*n+i*i),o=r/a;return{x:t.x-o*n,y:t.y-o*i}},"findAdjacentPoint"),PZe=s(function(e){let{cornerPointPositions:t}=NZe(e),r=[];for(let n=0;n<e.length;n++)if(t.includes(n)){let i=e[n-1],a=e[n+1],o=e[n],l=Pue(i,o,5),u=Pue(a,o,5),h=u.x-l.x,d=u.y-l.y;r.push(l);let f=Math.sqrt(2)*2,p={x:o.x,y:o.y};if(Math.abs(a.x-i.x)>10&&Math.abs(a.y-i.y)>=10){se.debug("Corner point fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));let m=5;o.x===l.x?p={x:h<0?l.x-m+f:l.x+m-f,y:d<0?l.y-f:l.y+f}:p={x:h<0?l.x-f:l.x+f,y:d<0?l.y-m+f:l.y+m-f}}else se.debug("Corner point skipping fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));r.push(p,u)}else r.push(e[n]);return r},"fixCorners"),OZe=s((e,t,r)=>{let n=e-t-r,i=2,a=2,o=i+a,l=Math.floor(n/o),u=Number.isFinite(l)?Math.max(0,l):0,h=Array(u).fill(`${i} ${a}`).join(" ");return`0 ${t} ${h} ${r}`},"generateDashArray"),of=s(function(e,t,r,n,i,a,o,l=!1){if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:u,layout:h}=Pe(),d=t.points,f=!1,p=i;var m=a;let g=[];for(let O in t.cssCompiledStyles)S2(O)||g.push(t.cssCompiledStyles[O]);if(h==="swimlane"){if(m.intersect&&p.intersect&&Array.isArray(d)&&d.length>=2)if(d.length===2)d=[p.intersect(d[0]),m.intersect(d[1])];else{let O=d.slice(1,-1),$=O[0],W=O[O.length-1],V=.5,z=Math.abs(d[d.length-1].x-W.x)<V&&Math.abs(d[d.length-1].y-W.y)<V,H=p.intersect($),K=z?W:m.intersect(W),J=Math.abs(K.x-W.x)<V&&Math.abs(K.y-W.y)<V,Z=Math.abs(H.x-$.x)<V&&Math.abs(H.y-$.y)<V?[]:[H],pe=J?[]:[K];d=[...Z,...O,...pe]}d=DZe(t,d)}else m.intersect&&p.intersect&&!l&&(d=d.slice(1,t.points.length-1),d.unshift(p.intersect(d[0])),d.push(m.intersect(d[d.length-1])));let y=btoa(JSON.stringify(d));t.toCluster&&(se.info("to cluster abc88",r.get(t.toCluster)),d=Nue(t.points,r.get(t.toCluster).node),f=!0),t.fromCluster&&(se.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(d,null,2)),d=Nue(d.reverse(),r.get(t.fromCluster).node).reverse(),f=!0);let v=d.filter(O=>!Number.isNaN(O.y)),x=LZe(t.curve);x!=="rounded"&&(v=PZe(v));let b=Zc;switch(x){case"linear":b=Zc;break;case"basis":b=bh;break;case"cardinal":b=Kb;break;case"bumpX":b=Hb;break;case"bumpY":b=Ub;break;case"catmullRom":b=Jb;break;case"monotoneX":b=e2;break;case"monotoneY":b=t2;break;case"natural":b=Ay;break;case"step":b=Ry;break;case"stepAfter":b=n2;break;case"stepBefore":b=r2;break;case"rounded":b=Zc;break;default:b=bh}let{x:T,y:w}=Lue(t),C=xh().x(T).y(w).curve(b),S;switch(t.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-invisible";break;default:S="edge-thickness-normal"}switch(t.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break;default:S+=" edge-pattern-solid"}let k,R=x==="rounded"?BZe($Ze(v,t),5):C(v),M=Array.isArray(t.style)?t.style:[t.style],P=M.find(O=>O?.startsWith("stroke:")),N="";t.animate&&(N="edge-animation-fast"),t.animation&&(N="edge-animation-"+t.animation);let _=!1;if(t.look==="handDrawn"){let O=ot.svg(e);Object.assign([],v);let $=O.path(R,{roughness:.3,seed:u});S+=" transition",k=ut($).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+(N?" "+N:"")).attr("style",M?M.reduce((V,z)=>V+";"+z,""):"");let W=k.attr("d");k.attr("d",W),e.node().appendChild(k.node())}else{let O=g.join(";"),$=M?M.reduce((J,ne)=>J+ne+";",""):"",W=(O?O+";"+$+";":$)+";"+(M?M.reduce((J,ne)=>J+";"+ne,""):"");k=e.append("path").attr("d",R).attr("id",`${o}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+(N?" "+N:"")).attr("style",W),P=W.match(/stroke:([^;]+)/)?.[1],_=t.animate===!0||!!t.animation|| Line truncated
L20,10
M20,10
L0,20`)},"requirement_arrow"),aQe=s((e,t,r)=>{let n=Lt(),{themeVariables:i}=n,{strokeWidth:a}=i;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
L20,10
M20,10
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),sQe=s((e,t,r)=>{let n=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),oQe=s((e,t,r)=>{let n=Lt(),{themeVariables:i}=n,{strokeWidth:a}=i,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),lQe={extension:GZe,composition:zZe,aggregation:VZe,dependency:WZe,lollipop:qZe,point:HZe,circle:UZe,cross:YZe,barb:jZe,barbNeo:XZe,only_one:KZe,zero_or_one:ZZe,one_or_more:QZe,zero_or_more:JZe,only_one_neo:eQe,zero_or_one_neo:tQe,one_or_more_neo:rQe,zero_or_more_neo:nQe,requirement_arrow:iQe,requirement_contains:sQe,requirement_arrow_neo:aQe,requirement_contains_neo:oQe},Gy=FZe});async function Eh(e,t,r){let n,i;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");let a=t.shape?L2[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),i=await a(n,t,r)}else i=await a(e,t,r),n=i;return n.attr("data-look",un(t.look)),t.tooltip&&i.attr("title",t.tooltip),$4.set(t.id,n),t.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var $4,$ue,Fue,au,Lm=F(()=>{"use strict";St();R4();er();$4=new Map;s(Eh,"insertNode");$ue=s((e,t)=>{$4.set(t.id,e)},"setNodeElem"),Fue=s(()=>{$4.clear()},"clear"),au=s(e=>{let t=$4.get(e.id);se.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let r=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode")});var Gue,zue=F(()=>{"use strict";br();Yr();St();B2();Fy();B4();Lm();Ht();er();Gue={common:Tt,getConfig:Lt,insertCluster:sf,insertEdge:of,insertEdgeLabel:oc,insertMarkers:Gy,insertNode:Eh,interpolateToCurve:qN,labelHelper:yt,log:se,positionEdgeLabel:$y}});var cQe,F4,bO=F(()=>{"use strict";cQe=typeof global=="object"&&global&&global.Object===Object&&global,F4=cQe});var uQe,hQe,Oi,bl=F(()=>{"use strict";bO();uQe=typeof self=="object"&&self&&self.Object===Object&&self,hQe=F4||uQe||Function("return this")(),Oi=hQe});var dQe,Pa,Dm=F(()=>{"use strict";bl();dQe=Oi.Symbol,Pa=dQe});function mQe(e){var t=fQe.call(e,F2),r=e[F2];try{e[F2]=void 0;var n=!0}catch{}var i=pQe.call(e);return n&&(t?e[F2]=r:delete e[F2]),i}var Vue,fQe,pQe,F2,Wue,que=F(()=>{"use strict";Dm();Vue=Object.prototype,fQe=Vue.hasOwnProperty,pQe=Vue.toString,F2=Pa?Pa.toStringTag:void 0;s(mQe,"getRawTag");Wue=mQe});function vQe(e){return yQe.call(e)}var gQe,yQe,Hue,Uue=F(()=>{"use strict";gQe=Object.prototype,yQe=gQe.toString;s(vQe,"objectToString");Hue=vQe});function TQe(e){return e==null?e===void 0?bQe:xQe:Yue&&Yue in Object(e)?Wue(e):Hue(e)}var xQe,bQe,Yue,Gs,lf=F(()=>{"use strict";Dm();que();Uue();xQe="[object Null]",bQe="[object Undefined]",Yue=Pa?Pa.toStringTag:void 0;s(TQe,"baseGetTag");Gs=TQe});function CQe(e){return e!=null&&typeof e=="object"}var qi,lc=F(()=>{"use strict";s(CQe,"isObjectLike");qi=CQe});function wQe(e){return typeof e=="symbol"||qi(e)&&Gs(e)==SQe}var SQe,Yo,Im=F(()=>{"use strict";lf();lc();SQe="[object Symbol]";s(wQe,"isSymbol");Yo=wQe});function kQe(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var su,G2=F(()=>{"use strict";s(kQe,"arrayMap");su=kQe});var EQe,Zr,na=F(()=>{"use strict";EQe=Array.isArray,Zr=EQe});function Kue(e){if(typeof e=="string")return e;if(Zr(e))return su(e,Kue)+"";if(Yo(e))return Xue?Xue.call(e):"";var t=e+"";return t=="0"&&1/e==-AQe?"-0":t}var AQe,jue,Xue,Zue,Que=F(()=>{"use strict";Dm();G2();na();Im();AQe=1/0,jue=Pa?Pa.prototype:void 0,Xue=jue?jue.toString:void 0;s(Kue,"baseToString");Zue=Kue});function _Qe(e){for(var t=e.length;t--&&RQe.test(e.charAt(t)););return t}var RQe,Jue,ehe=F(()=>{"use strict";RQe=/\s/;s(_Qe,"trimmedEndIndex");Jue=_Qe});function DQe(e){return e&&e.slice(0,Jue(e)+1).replace(LQe,"")}var LQe,the,rhe=F(()=>{"use strict";ehe();LQe=/^\s+/;s(DQe,"baseTrim");the=DQe});function IQe(e){var t=typeof e;return e!=null&&(t=="object"||t= Line truncated
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),sQe=s((e,t,r)=>{let n=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),oQe=s((e,t,r)=>{let n=Lt(),{themeVariables:i}=n,{strokeWidth:a}=i,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),lQe={extension:GZe,composition:zZe,aggregation:VZe,dependency:WZe,lollipop:qZe,point:HZe,circle:UZe,cross:YZe,barb:jZe,barbNeo:XZe,only_one:KZe,zero_or_one:ZZe,one_or_more:QZe,zero_or_more:JZe,only_one_neo:eQe,zero_or_one_neo:tQe,one_or_more_neo:rQe,zero_or_more_neo:nQe,requirement_arrow:iQe,requirement_contains:sQe,requirement_arrow_neo:aQe,requirement_contains_neo:oQe},Gy=FZe});async function Eh(e,t,r){let n,i;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");let a=t.shape?L2[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),i=await a(n,t,r)}else i=await a(e,t,r),n=i;return n.attr("data-look",un(t.look)),t.tooltip&&i.attr("title",t.tooltip),$4.set(t.id,n),t.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var $4,$ue,Fue,au,Lm=F(()=>{"use strict";St();R4();er();$4=new Map;s(Eh,"insertNode");$ue=s((e,t)=>{$4.set(t.id,e)},"setNodeElem"),Fue=s(()=>{$4.clear()},"clear"),au=s(e=>{let t=$4.get(e.id);se.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let r=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode")});var Gue,zue=F(()=>{"use strict";br();Yr();St();B2();Fy();B4();Lm();Ht();er();Gue={common:Tt,getConfig:Lt,insertCluster:sf,insertEdge:of,insertEdgeLabel:oc,insertMarkers:Gy,insertNode:Eh,interpolateToCurve:qN,labelHelper:yt,log:se,positionEdgeLabel:$y}});var cQe,F4,bO=F(()=>{"use strict";cQe=typeof global=="object"&&global&&global.Object===Object&&global,F4=cQe});var uQe,hQe,Oi,bl=F(()=>{"use strict";bO();uQe=typeof self=="object"&&self&&self.Object===Object&&self,hQe=F4||uQe||Function("return this")(),Oi=hQe});var dQe,Pa,Dm=F(()=>{"use strict";bl();dQe=Oi.Symbol,Pa=dQe});function mQe(e){var t=fQe.call(e,F2),r=e[F2];try{e[F2]=void 0;var n=!0}catch{}var i=pQe.call(e);return n&&(t?e[F2]=r:delete e[F2]),i}var Vue,fQe,pQe,F2,Wue,que=F(()=>{"use strict";Dm();Vue=Object.prototype,fQe=Vue.hasOwnProperty,pQe=Vue.toString,F2=Pa?Pa.toStringTag:void 0;s(mQe,"getRawTag");Wue=mQe});function vQe(e){return yQe.call(e)}var gQe,yQe,Hue,Uue=F(()=>{"use strict";gQe=Object.prototype,yQe=gQe.toString;s(vQe,"objectToString");Hue=vQe});function TQe(e){return e==null?e===void 0?bQe:xQe:Yue&&Yue in Object(e)?Wue(e):Hue(e)}var xQe,bQe,Yue,Gs,lf=F(()=>{"use strict";Dm();que();Uue();xQe="[object Null]",bQe="[object Undefined]",Yue=Pa?Pa.toStringTag:void 0;s(TQe,"baseGetTag");Gs=TQe});function CQe(e){return e!=null&&typeof e=="object"}var qi,lc=F(()=>{"use strict";s(CQe,"isObjectLike");qi=CQe});function wQe(e){return typeof e=="symbol"||qi(e)&&Gs(e)==SQe}var SQe,Yo,Im=F(()=>{"use strict";lf();lc();SQe="[object Symbol]";s(wQe,"isSymbol");Yo=wQe});function kQe(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var su,G2=F(()=>{"use strict";s(kQe,"arrayMap");su=kQe});var EQe,Zr,na=F(()=>{"use strict";EQe=Array.isArray,Zr=EQe});function Kue(e){if(typeof e=="string")return e;if(Zr(e))return su(e,Kue)+"";if(Yo(e))return Xue?Xue.call(e):"";var t=e+"";return t=="0"&&1/e==-AQe?"-0":t}var AQe,jue,Xue,Zue,Que=F(()=>{"use strict";Dm();G2();na();Im();AQe=1/0,jue=Pa?Pa.prototype:void 0,Xue=jue?jue.toString:void 0;s(Kue,"baseToString");Zue=Kue});function _Qe(e){for(var t=e.length;t--&&RQe.test(e.charAt(t)););return t}var RQe,Jue,ehe=F(()=>{"use strict";RQe=/\s/;s(_Qe,"trimmedEndIndex");Jue=_Qe});function DQe(e){return e&&e.slice(0,Jue(e)+1).replace(LQe,"")}var LQe,the,rhe=F(()=>{"use strict";ehe();LQe=/^\s+/;s(DQe,"baseTrim");the=DQe});function IQe(e){var t=typeof e;return e!=null&&(t=="object"||t= Line truncated
Node.id = `,y,`
data=`,x.height,`
Parent cluster`,i.height),t.setNode(i.id,x),t.parent(y)||(se.trace("Setting parent",y,i.id),t.setParent(y,i.id,x))}if(se.info("(Insert) Node XXX"+y+": "+JSON.stringify(t.node(y))),v?.clusterNode){se.info("Cluster identified XBX",y,v.width,t.node(y));let{ranksep:x,nodesep:b}=t.graph();v.graph.setGraph({...v.graph.graph(),ranksep:x+25,nodesep:b});let T=await ult({element:d,graph:v.graph,diagramType:r,id:n,parentCluster:t.node(y),siteConfig:a}),w=T.elem;ht(v,w),v.diff=T.diff||0,se.info("New compound node after recursive render XAX",y,"width",v.width,"height",v.height),$ue(w,v)}else t.children(y).length>0?(se.trace("Cluster - the non recursive path XBX",y,v.id,v,v.width,"Graph:",t),se.trace(qm(v.id,t)),qr.set(v.id,{id:qm(v.id,t),node:v})):(se.trace("Node - the non recursive path XAX",y,d,t.node(y),o),await Y9(d,t.node(y),{config:a,dir:o}))})),await s(async()=>{let y=t.edges().map(async function(v){let x=t.edge(v.v,v.w,v.name);if(se.info("Edge "+v.v+" -> "+v.w+": "+JSON.stringify(v)),se.info("Edge "+v.v+" -> "+v.w+": ",v," ",JSON.stringify(t.edge(v))),se.info("Fix",qr,"ids:",v.v,v.w,"Translating: ",qr.get(v.v),qr.get(v.w)),p&&x.selfLoop){if(x.selfLoop.order!==1)return;let b={...x.originalEdge,...x,id:x.selfLoop.id,startLabelLeft:x.originalEdge?.startLabelLeft??x.startLabelLeft,startLabelRight:x.originalEdge?.startLabelRight??x.startLabelRight,endLabelLeft:x.originalEdge?.endLabelLeft??x.endLabelLeft,endLabelRight:x.originalEdge?.endLabelRight??x.endLabelRight};await oc(h,b),x.width=b.width,x.height=b.height,x.labelStyle=b.labelStyle;return}await oc(h,x)});await Promise.all(y)},"processEdges")();let{subGraphTitleTotalMargin:g}=kh(a);return{elem:f,graph:t,groups:{clusters:l,edgePaths:u,edgeLabels:h,nodes:d,rootGroups:f},diagramType:r,id:n,mergeSelfLoops:p,subGraphTitleTotalMargin:g}},"measureDagreGraph"),yye=s(e=>{se.info("############################################# XXX"),se.info("### Layout ### XXX"),se.info("############################################# XXX"),fT(e)},"runDagreGraphLayout"),olt=s((e,t,r)=>{let n=e.node(t);if(!n)return;let i={...n};return n?.clusterNode?i.y=(n.y??0)+r:e.children(t).length>0?i.height=(n.height??0)+r:i.y=(n.y??0)+r/2,i},"normalizeDagreNode"),mye=s((e,t)=>{nlt.forEach(r=>{t[r]!==void 0&&(e[r]=t[r])})},"applyDagreNodeLayout"),llt=s((e,t,r,n)=>({...e,start:e.start??t,end:e.end??r,points:(e.points??[]).map(i=>({...i,y:typeof i.y=="number"?i.y+n:i.y}))}),"normalizeDagreEdge"),vye=s((e,t)=>{let{graph:r,mergeSelfLoops:n,subGraphTitleTotalMargin:i=0}=t,a=new Map(e.nodes.map(l=>[l.id,l]));q3(r).forEach(l=>{let u=olt(r,l,i);if(!u)return;mye(r.node(l),u);let h=a.get(l);h&&mye(h,u)});let o=i/2;return e.edges=J9(r,o,{mergeSelfLoops:n}).map(({edge:l,start:u,end:h})=>llt(l,u,h,o)),e},"applyDagreLayoutResult"),clt=s(async({elem:e,graph:t,groups:{clusters:r,edgePaths:n},diagramType:i,id:a,mergeSelfLoops:o,subGraphTitleTotalMargin:l})=>{let u=0;await Promise.all(q3(t).map(async function(f){let p=t.node(f);if(se.info("Position XBX => "+f+": ("+p.x,","+p.y,") width: ",p.width," height: ",p.height),p?.clusterNode)p.y+=l,se.info("A tainted cluster node XBX1",f,p.id,p.width,p.height,p.x,p.y,t.parent(f)),qr.get(p.id).node=p,au(p);else if(t.children(f).length>0){se.info("A pure cluster node XBX1",f,p.id,p.x,p.y,p.width,p.height,t.parent(f)),p.height+=l,t.node(p.parentId);let m=p?.padding/2||0,g=p?.labelBBox?.height||0,y=g-m||0;se.debug("OffsetY",y,"labelHeight",g,"halfPadding",m),await sf(r,p),qr.get(p.id).node=p}else{let m=t.node(p.parentId);p.y+=l/2,se.info("A regular node XBX1 - using the padding",p.id,"parent",p.parentId,p.width,p.height,p.x,p.y,"offsetY",p.offsetY,"parent",m,m?.offsetY,p),au(p)}}));let h=l/2;return J9(t,h,{mergeSelfLoops:o}).forEach(function({edge:f,start:p,end:m}){se.info("Edge "+p+" -> "+m+": "+JSON.stringify(f),f),f.points.forEach(x=>x.y+=h);let g=t.node(p),y=t.node(m),v=of(n,f,qr,i,g,y,a);$y(f,v)}),t.nodes().forEach(function(f){let p=t.node(f);se.info(f,p.type,p.diff),p.isGroup&&(u=p.diff)}),se.warn("Returning from recursive render XAX",e,u),{elem:e,diff:u}},"paintDagreLayoutCore"),ult=s(async e=>{let t=await gye(e);return yye(t.graph),await clt(t)},"renderDagreSubgraph"),eB=s(e=>{let t=new Ln({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.nodeSpacing||e.config?.flowchart?.nodeSpacing,ranksep:e.config?.rankSpacing||e.rankSpacing||e.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return e.nodes.forEach(r=>{t.setNode(r.id,{...r}),r.parentId&&t.setParent(r.id,r.parentId)}),se.debug("Edges:",e.edges),e.edges.forEach(r=>{if(r.start===r.end){let n=r.start,i=n+"---"+n+"---1",a=n+"---"+n+"---2",o=t.node(n);t.setNode(i,{domId:i,id:i,parentId:o.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),t.setParent(i,o.parentId),t.setNode(a,{domId:a,id:a,parentId:o.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width: Line truncated
@@ -1758,7 +1758,7 @@ Expecting `+he.join(", ")+", got '"+(this.terminals_[Fe]||Fe)+"'":Te="Parse erro
fill: ${e.titleColor||e.textColor};
font-family: ${e.fontFamily};
}
`,"getStyles"),TIe=O3t});var SIe={};sr(SIe,{diagram:()=>B3t});var B3t,wIe=F(()=>{"use strict";j7e();mIe();bIe();CIe();B3t={parser:Y7e,db:fIe,renderer:xIe,styles:TIe}});var AIe,RIe=F(()=>{"use strict";ls();St();AIe={parse:s(async e=>{let t=await Li("info",e);se.debug(t)},"parse")}});var z3t,V3t,_Ie,LIe=F(()=>{"use strict";z3t={version:"11.17.0"},V3t=s(()=>z3t.version,"getVersion"),_Ie={getVersion:V3t}});var wn,cs=F(()=>{"use strict";Wr();Jt();wn=s(e=>{let{securityLevel:t}=Pe(),r=ut("body");if(t==="sandbox"){let a=ut(`#i${e}`).node()?.contentDocument??document;r=ut(a.body)}return r.select(`#${e}`)},"selectSvgElement")});var W3t,DIe,IIe=F(()=>{"use strict";St();cs();Vn();W3t=s((e,t,r)=>{se.debug(`rendering info diagram
`,"getStyles"),TIe=O3t});var SIe={};sr(SIe,{diagram:()=>B3t});var B3t,wIe=F(()=>{"use strict";j7e();mIe();bIe();CIe();B3t={parser:Y7e,db:fIe,renderer:xIe,styles:TIe}});var AIe,RIe=F(()=>{"use strict";ls();St();AIe={parse:s(async e=>{let t=await Li("info",e);se.debug(t)},"parse")}});var z3t,V3t,_Ie,LIe=F(()=>{"use strict";z3t={version:"11.17.1"},V3t=s(()=>z3t.version,"getVersion"),_Ie={getVersion:V3t}});var wn,cs=F(()=>{"use strict";Wr();Jt();wn=s(e=>{let{securityLevel:t}=Pe(),r=ut("body");if(t==="sandbox"){let a=ut(`#i${e}`).node()?.contentDocument??document;r=ut(a.body)}return r.select(`#${e}`)},"selectSvgElement")});var W3t,DIe,IIe=F(()=>{"use strict";St();cs();Vn();W3t=s((e,t,r)=>{se.debug(`rendering info diagram
`+e);let n=wn(t);jr(n,100,400,!0),n.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`)},"draw"),DIe={draw:W3t}});var MIe={};sr(MIe,{diagram:()=>q3t});var q3t,NIe=F(()=>{"use strict";RIe();LIe();IIe();q3t={parser:AIe,db:_Ie,renderer:DIe}});var BIe,jU,U_,XU,Y3t,j3t,X3t,K3t,Z3t,Q3t,J3t,Y_,KU=F(()=>{"use strict";St();$n();Qi();BIe=mr.pie,jU={sections:new Map,showData:!1,config:BIe},U_=jU.sections,XU=jU.showData,Y3t=structuredClone(BIe),j3t=s(()=>structuredClone(Y3t),"getConfig"),X3t=s(()=>{U_=new Map,XU=jU.showData,Tr()},"clear"),K3t=s(({label:e,value:t})=>{if(t<0)throw new Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);U_.has(e)||(U_.set(e,t),se.debug(`added new section: ${e}, with value: ${t}`))},"addSection"),Z3t=s(()=>U_,"getSections"),Q3t=s(e=>{XU=e},"setShowData"),J3t=s(()=>XU,"getShowData"),Y_={getConfig:j3t,clear:X3t,setDiagramTitle:Gr,getDiagramTitle:Pr,setAccTitle:Lr,getAccTitle:Ir,setAccDescription:Mr,getAccDescription:Nr,addSection:K3t,getSections:Z3t,setShowData:Q3t,getShowData:J3t}});var e5t,$Ie,FIe=F(()=>{"use strict";ls();St();to();KU();e5t=s((e,t)=>{Hn(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),$Ie={parse:s(async e=>{let t=await Li("pie",e);se.debug(t),e5t(t,Y_)},"parse")}});var t5t,GIe,zIe=F(()=>{"use strict";t5t=s(e=>`
.pieCircle{
stroke: ${e.pieStrokeColor};
@@ -3583,7 +3583,7 @@ A`,o,o,0,a.large?1:0,a.sweep?1:0,n(a.p1.x),n(a.p1.y))}return i.join(" ")}functio
`}else n+=`${e.themeCSS}
`;return n+Z7(r)},"createCssStyles"),tNt=s((e,t)=>oD(nGe(`${e}{${t}}`),aGe([s(function(n,i,a,o){if(n.type==="rule"&&Array.isArray(n.props)){if(n.parent&&n.parent.type===cw)return;n.props=n.props.map(l=>l===e&&Array.isArray(n.children)&&n.children.every(h=>h.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(h.props))||(l.startsWith(`${e} `)||l.startsWith(`${e}>`))&&!l.startsWith(`${e} ||`)?l:`${e} ${l}`)}else n.type.startsWith("@")&&([...[GFe,VFe,JL,qFe,"@container","@starting-style"],cw].includes(n.type)||(se.warn(`Removing unsupported at-rule ${n.type} from CSS`),n.type=kx))},"addNamespace"),iGe])),"compileCSS"),rNt=s((e,t,r,n)=>{let i=eNt(e,r),a=xJ(t,i,{...e.themeVariables,theme:e.theme,look:e.look},n);return tNt(n,a)},"createUserStyles"),nNt=s((e="",t,r)=>{let n=e;return!r&&!t&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=lo(n),n=n.replace(/<br>/g,"<br/>"),n},"cleanUpSvgCode"),iNt=s((e="",t)=>{let r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":UMt,n=dGe(`<body style="${jMt}">${e}</body>`);return`<iframe style="width:${HMt};height:${r};${YMt}" src="data:text/html;charset=UTF-8;base64,${n}" sandbox="${XMt}">
${KMt}
</iframe>`},"putIntoIFrame"),pGe=s((e,t,r,n,i)=>{let a=e.append("div");a.attr("id",r),n&&a.attr("style",n);let o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",VMt);return i&&o.attr("xmlns:xlink",i),o.append("g"),e},"appendDivSvgG");function mGe(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}s(mGe,"sandboxedIframe");var aNt=s((e,t,r,n)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(n)?.remove()},"removeExistingElements"),sNt=s(async function(e,t,r){wx();let n=gGe(t);t=n.code;let i=Lt();se.debug(i),t.length>(i?.maxTextSize??$Mt)&&(t=FMt);let a=`#${e}`,o="i"+e,l="#"+o,u="d"+e,h="#"+u,d=s(()=>{let I=ut(p?l:h).node();I&&"remove"in I&&I.remove()},"removeTempElements"),f=ut(document.body),p=i.securityLevel===GMt,m=i.securityLevel===zMt,g=i.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){let A=mGe(ut(r),o);f=ut(A.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=ut(r);pGe(f,e,u,`font-family: ${g}`,WMt)}else{if(aNt(document,e,u,o),p){let A=mGe(ut(document.body),o);f=ut(A.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=ut("body");pGe(f,e,u)}let y,v;try{y=await Dx.fromText(t,{title:n.title})}catch(A){if(i.suppressErrorRendering)throw d(),A;y=await Dx.fromText("error"),v=A}let x=f.select(h).node(),b=y.type,T=x.firstChild,w=T.firstChild,C=y.renderer.getClasses?.(t,y),S=rNt(i,b,C,a),k=document.createElement("style");k.innerHTML=S,T.insertBefore(k,w);try{await y.renderer.draw(t,e,"11.17.0",y)}catch(A){throw i.suppressErrorRendering?d():SNe.draw(t,e,"11.17.0"),A}let R=f.select(`${h} svg`),M=y.db.getAccTitle?.(),P=y.db.getAccDescription?.();lNt(b,R,M,P);let _=s(()=>{f.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",qMt);let A=f.select(h).node().innerHTML;if(se.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),A=nNt(A,p,Aa(i.arrowMarkerAbsolute)),p){let I=f.select(h+" svg").node();A=iNt(A,I)}else m||(A=ao.sanitize(A,{ADD_TAGS:ZMt,ADD_ATTR:QMt,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return cGe(),A},"serializeSvg")();if(v)throw v;return d(),{diagramType:b,svg:_,bindFunctions:y.db.bindFunctions}},"render");function oNt(e={}){let t=ii({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),rZ(t),t?.theme&&t.theme in dl?t.themeVariables=dl[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=dl.default.getThemeVariables(t.themeVariables));let r=typeof t=="object"?GD(t):zD();Mx(r.logLevel),wx()}s(oNt,"initialize");var yGe=s((e,t={})=>{let{code:r}=NX(e);return Dx.fromText(r,t)},"getDiagramFromText");function lNt(e,t,r,n){sGe(t,e),oGe(t,r,n,t.attr("id"))}s(lNt,"addA11yInfo");var $p=Object.freeze({render:sNt,parse:JMt,getDiagramFromText:yGe,initialize:oNt,getConfig:Lt,setConfig:kw,getSiteConfig:zD,updateSiteConfig:nZ,reset:s(()=>{Gx()},"reset"),globalReset:s(()=>{Gx(wd)},"globalReset"),defaultConfig:wd});Mx(Lt().logLevel);Gx(Lt());ep();er();H3();var cNt=s((e,t,r)=>{se.warn(e),XN(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),vGe=s(async function(e={querySelector:".mermaid"}){try{await uNt(e)}catch(t){if(XN(t)&&se.error(t.str),Td.parseError&&Td.parseError(t),!e.suppressErrors)throw se.error("Use the suppressErrors option to suppress these errors"),t}},"run"),uNt=s(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){let n=$p.getConfig();se.debug(`${e?"":"No "}Callback function found`);let i;if(r)i=r;else if(t)i=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");se.debug(`Found ${i.length} diagrams`),n?.startOnLoad!==void 0&&(se.debug("Start On Load: "+n?.startOnLoad),$p.updateSiteConfig({startOnLoad:n?.startOnLoad}));let a=new or.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),o,l=[];for(let u of Array.from(i)){se.info("Rendering diagram: "+u.id);if(u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");let h=`mermaid-${a.next()}`;o=u.innerHTML,o=ck(or.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");let d=or.detectInit(o);d&&se.debug("Detected early reinit: ",d);try{let{svg:f,bindFunctions:p}=await CGe(h,o,u);u.innerHTML=f,e&&await e(h),p&&p(u)}catch(f){cNt(f,l,Td.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),xGe=s(function(e){$p.initialize(e)},"initialize"),hNt=s(async function(e,t,r){se.warn("mermaid.init is deprecated. Please use run instead."),e&&xGe(e);let n={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?n.querySelector=t:t&&(t instanceof HTMLElement?n.nodes=[t]:n.nodes=t),await vGe(n)},"init"),dNt=s(async(e,{lazyLoad:t=!0}={})=>{wx(),tb(...e),t===!1&&await FFe()},"registerExternalDiagrams"),bGe=s(function(){if(Td.startOnLoad){let{startOnLoad:e}=$p.getConfig();e&&Td.run().catch(t=>se.erroLine truncated
</iframe>`},"putIntoIFrame"),pGe=s((e,t,r,n,i)=>{let a=e.append("div");a.attr("id",r),n&&a.attr("style",n);let o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",VMt);return i&&o.attr("xmlns:xlink",i),o.append("g"),e},"appendDivSvgG");function mGe(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}s(mGe,"sandboxedIframe");var aNt=s((e,t,r,n)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(n)?.remove()},"removeExistingElements"),sNt=s(async function(e,t,r){wx();let n=gGe(t);t=n.code;let i=Lt();se.debug(i),t.length>(i?.maxTextSize??$Mt)&&(t=FMt);let a=`#${e}`,o="i"+e,l="#"+o,u="d"+e,h="#"+u,d=s(()=>{let I=ut(p?l:h).node();I&&"remove"in I&&I.remove()},"removeTempElements"),f=ut(document.body),p=i.securityLevel===GMt,m=i.securityLevel===zMt,g=i.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){let A=mGe(ut(r),o);f=ut(A.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=ut(r);pGe(f,e,u,`font-family: ${g}`,WMt)}else{if(aNt(document,e,u,o),p){let A=mGe(ut(document.body),o);f=ut(A.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=ut("body");pGe(f,e,u)}let y,v;try{y=await Dx.fromText(t,{title:n.title})}catch(A){if(i.suppressErrorRendering)throw d(),A;y=await Dx.fromText("error"),v=A}let x=f.select(h).node(),b=y.type,T=x.firstChild,w=T.firstChild,C=y.renderer.getClasses?.(t,y),S=rNt(i,b,C,a),k=document.createElement("style");k.innerHTML=S,T.insertBefore(k,w);try{await y.renderer.draw(t,e,"11.17.1",y)}catch(A){throw i.suppressErrorRendering?d():SNe.draw(t,e,"11.17.1"),A}let R=f.select(`${h} svg`),M=y.db.getAccTitle?.(),P=y.db.getAccDescription?.();lNt(b,R,M,P);let _=s(()=>{f.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",qMt);let A=f.select(h).node().innerHTML;if(se.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),A=nNt(A,p,Aa(i.arrowMarkerAbsolute)),p){let I=f.select(h+" svg").node();A=iNt(A,I)}else m||(A=ao.sanitize(A,{ADD_TAGS:ZMt,ADD_ATTR:QMt,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return cGe(),A},"serializeSvg")();if(v)throw v;return d(),{diagramType:b,svg:_,bindFunctions:y.db.bindFunctions}},"render");function oNt(e={}){let t=ii({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),rZ(t),t?.theme&&t.theme in dl?t.themeVariables=dl[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=dl.default.getThemeVariables(t.themeVariables));let r=typeof t=="object"?GD(t):zD();Mx(r.logLevel),wx()}s(oNt,"initialize");var yGe=s((e,t={})=>{let{code:r}=NX(e);return Dx.fromText(r,t)},"getDiagramFromText");function lNt(e,t,r,n){sGe(t,e),oGe(t,r,n,t.attr("id"))}s(lNt,"addA11yInfo");var $p=Object.freeze({render:sNt,parse:JMt,getDiagramFromText:yGe,initialize:oNt,getConfig:Lt,setConfig:kw,getSiteConfig:zD,updateSiteConfig:nZ,reset:s(()=>{Gx()},"reset"),globalReset:s(()=>{Gx(wd)},"globalReset"),defaultConfig:wd});Mx(Lt().logLevel);Gx(Lt());ep();er();H3();var cNt=s((e,t,r)=>{se.warn(e),XN(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),vGe=s(async function(e={querySelector:".mermaid"}){try{await uNt(e)}catch(t){if(XN(t)&&se.error(t.str),Td.parseError&&Td.parseError(t),!e.suppressErrors)throw se.error("Use the suppressErrors option to suppress these errors"),t}},"run"),uNt=s(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){let n=$p.getConfig();se.debug(`${e?"":"No "}Callback function found`);let i;if(r)i=r;else if(t)i=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");se.debug(`Found ${i.length} diagrams`),n?.startOnLoad!==void 0&&(se.debug("Start On Load: "+n?.startOnLoad),$p.updateSiteConfig({startOnLoad:n?.startOnLoad}));let a=new or.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),o,l=[];for(let u of Array.from(i)){se.info("Rendering diagram: "+u.id);if(u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");let h=`mermaid-${a.next()}`;o=u.innerHTML,o=ck(or.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");let d=or.detectInit(o);d&&se.debug("Detected early reinit: ",d);try{let{svg:f,bindFunctions:p}=await CGe(h,o,u);u.innerHTML=f,e&&await e(h),p&&p(u)}catch(f){cNt(f,l,Td.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),xGe=s(function(e){$p.initialize(e)},"initialize"),hNt=s(async function(e,t,r){se.warn("mermaid.init is deprecated. Please use run instead."),e&&xGe(e);let n={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?n.querySelector=t:t&&(t instanceof HTMLElement?n.nodes=[t]:n.nodes=t),await vGe(n)},"init"),dNt=s(async(e,{lazyLoad:t=!0}={})=>{wx(),tb(...e),t===!1&&await FFe()},"registerExternalDiagrams"),bGe=s(function(){if(Td.startOnLoad){let{startOnLoad:e}=$p.getConfig();e&&Td.run().catch(t=>se.erroLine truncated
/*! Bundled license information:
lodash-es/lodash.js: