Files
static-php-cli/assets/chunks/mermaid.core.FcP8wBwW.js
2026-05-07 08:31:20 +00:00

310 lines
588 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunks/dagre-KV5264BT.Dzyh3PBi.js","assets/chunks/graph.DaVWZV7z.js","assets/chunks/baseUniq.CeiE9d8M.js","assets/chunks/layout.DhiXUKzi.js","assets/chunks/min.CT2il0xb.js","assets/chunks/clone.lkrBMtqg.js","assets/chunks/framework.C2AwuPrQ.js","assets/chunks/cose-bilkent-S5V4N54A.BTJXqd_j.js","assets/chunks/cytoscape.esm.BM_eiZzj.js","assets/chunks/c4Diagram-AHTNJAMY.D9XLip-k.js","assets/chunks/chunk-YZCP3GAM.KLB9Sa1c.js","assets/chunks/flowDiagram-DWJPFMVM.BOiZuCBe.js","assets/chunks/chunk-FMBD7UC4.BR2APasi.js","assets/chunks/chunk-55IACEB6.Ch1hJtyD.js","assets/chunks/chunk-EDXVE4YY.nt7vYGzC.js","assets/chunks/channel.CX85guNc.js","assets/chunks/erDiagram-SMLLAGMA.BObTJjrO.js","assets/chunks/gitGraphDiagram-UUTBAWPF.T55o_OZe.js","assets/chunks/chunk-4BX2VUAB.DRMGnluz.js","assets/chunks/chunk-QZHKN3VN.DynBHGSI.js","assets/chunks/wardley-RL74JXVD.BA-8CGC6.js","assets/chunks/ganttDiagram-T4ZO3ILL.ZyVGbZyU.js","assets/chunks/linear.BLeVQ8gA.js","assets/chunks/init.Gi6I4Gst.js","assets/chunks/defaultLocale.DX6XiGOO.js","assets/chunks/infoDiagram-42DDH7IO.ClyVFDpn.js","assets/chunks/pieDiagram-DEJITSTG.D3Yf2d7p.js","assets/chunks/arc.CBHvmMDx.js","assets/chunks/ordinal.BYWQX77i.js","assets/chunks/quadrantDiagram-34T5L4WZ.Dk93g3U7.js","assets/chunks/xychartDiagram-5P7HB3ND.BRakMHHi.js","assets/chunks/requirementDiagram-MS252O5E.DG0FTVHA.js","assets/chunks/sequenceDiagram-FGHM5R23.BNFcR9qe.js","assets/chunks/classDiagram-6PBFFD2Q.BzO8UvP8.js","assets/chunks/chunk-4TB4RGXK.Cn3s89lD.js","assets/chunks/classDiagram-v2-HSJHXN6E.BzO8UvP8.js","assets/chunks/stateDiagram-FHFEXIEX.KxjqYfNL.js","assets/chunks/chunk-OYMX7WX6.CIIFgoWj.js","assets/chunks/stateDiagram-v2-QKLJ7IA2.CS4DWscx.js","assets/chunks/journeyDiagram-VCZTEJTY.BmkfNblc.js","assets/chunks/timeline-definition-GMOUNBTQ.BsGTkzdk.js","assets/chunks/mindmap-definition-QFDTVHPH.Db1CW-aX.js","assets/chunks/kanban-definition-6JOO6SKY.DMOK7bzJ.js","assets/chunks/sankeyDiagram-XADWPNL6.B49IC-gh.js","assets/chunks/diagram-TYMM5635.BjNPV6NQ.js","assets/chunks/diagram-MMDJMWI5.CoyJYWwi.js","assets/chunks/blockDiagram-DXYQGD6D.ByBX24mM.js","assets/chunks/diagram-5BDNPKRD.Cxuyd23g.js","assets/chunks/architectureDiagram-Q4EWVU46.DdWOD9Cd.js","assets/chunks/ishikawaDiagram-UXIWVN3A.C5DoIbOa.js","assets/chunks/vennDiagram-DHZGUBPP.ClhBN1CI.js","assets/chunks/diagram-G4DWMVQ6.DNFPplE9.js","assets/chunks/wardleyDiagram-NUSXRM2D.CtyamWnD.js"])))=>i.map(i=>d[i]);
import{W as gt}from"./framework.C2AwuPrQ.js";function Py(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function CA(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function i(){var a=!1;try{a=this instanceof i}catch{}return a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var a=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,a.get?a:{enumerable:!0,get:function(){return e[i]}})}),r}var za={exports:{}},Ry=za.exports,nh;function Ny(){return nh||(nh=1,(function(e,t){(function(r,i){e.exports=i()})(Ry,(function(){var r=1e3,i=6e4,a=36e5,s="millisecond",o="second",n="minute",l="hour",c="day",h="week",u="month",p="quarter",d="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(I){var F=["th","st","nd","rd"],L=I%100;return"["+I+(F[(L-20)%10]||F[L]||F[0])+"]"}},k=function(I,F,L){var M=String(I);return!M||M.length>=F?I:""+Array(F+1-M.length).join(L)+I},_={s:k,z:function(I){var F=-I.utcOffset(),L=Math.abs(F),M=Math.floor(L/60),P=L%60;return(F<=0?"+":"-")+k(M,2,"0")+":"+k(P,2,"0")},m:function I(F,L){if(F.date()<L.date())return-I(L,F);var M=12*(L.year()-F.year())+(L.month()-F.month()),P=F.clone().add(M,u),H=L-P<0,Y=F.clone().add(M+(H?-1:1),u);return+(-(M+(L-P)/(H?P-Y:Y-P))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:u,y:d,w:h,d:c,D:g,h:l,m:n,s:o,ms:s,Q:p}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},w="en",v={};v[w]=b;var E="$isDayjsObject",B=function(I){return I instanceof W||!(!I||!I[E])},N=function I(F,L,M){var P;if(!F)return w;if(typeof F=="string"){var H=F.toLowerCase();v[H]&&(P=H),L&&(v[H]=L,P=H);var Y=F.split("-");if(!P&&Y.length>1)return I(Y[0])}else{var Q=F.name;v[Q]=F,P=Q}return!M&&P&&(w=P),P||!M&&w},D=function(I,F){if(B(I))return I.clone();var L=typeof F=="object"?F:{};return L.date=I,L.args=arguments,new W(L)},O=_;O.l=N,O.i=B,O.w=function(I,F){return D(I,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var W=(function(){function I(L){this.$L=N(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[E]=!0}var F=I.prototype;return F.parse=function(L){this.$d=(function(M){var P=M.date,H=M.utc;if(P===null)return new Date(NaN);if(O.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var Y=P.match(y);if(Y){var Q=Y[2]-1||0,dt=(Y[7]||"0").substring(0,3);return H?new Date(Date.UTC(Y[1],Q,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,dt)):new Date(Y[1],Q,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,dt)}}return new Date(P)})(L),this.init()},F.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},F.$utils=function(){return O},F.isValid=function(){return this.$d.toString()!==m},F.isSame=function(L,M){var P=D(L);return this.startOf(M)<=P&&P<=this.endOf(M)},F.isAfter=function(L,M){return D(L)<this.startOf(M)},F.isBefore=function(L,M){return this.endOf(M)<D(L)},F.$g=function(L,M,P){return O.u(L)?this[M]:this.set(P,L)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(L,M){var P=this,H=!!O.u(M)||M,Y=O.p(L),Q=function(Tt,xt){var Lt=O.w(P.$u?Date.UTC(P.$y,xt,Tt):new Date(P.$y,xt,Tt),P);return H?Lt:Lt.endOf(c)},dt=function(Tt,xt){return O.w(P.toDate()[Tt].apply(P.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(xt)),P)},et=this.$W,ut=this.$M,it=this.$D,rt="set"+(this.$u?"UTC":"");switch(Y){case d:return H?Q(1,0):Q(31,11);case u:return H?Q(1,ut):Q(0,ut+1);case h:var ht=this.$locale().weekStart||0,ft=(et<ht?et+7:et)-ht;return Q(H?it-ft:it+(6-ft),ut);case c:case g:return dt(rt+"Hours",0);case l:return dt(rt+"Minutes",1);case n:return dt(rt+"Seconds",2);case o:return dt(rt+"Milliseconds",3);default:return this.clone()}},F.endOf=function(L){return this.startOf(L,!1)},F.$set=function(L,M){var P,H=O.p(L),Y="set"+(this.$u?"UTC":""),Q=(P={},P[c]=Y+"Date",P[g]=Y+"Date",P[u]=Y+"Month",P[d]=Y+"FullYear",P[l]=Y+"Hours",P[n]=Y+"Minutes",P[o]=Y+"Seconds",P[s]=Y+"Milliseconds",P)[H],dt=H===c?this.$D+(M-this.$W):M;if(H===u||H===d){var et=this.clone().set(g,1);et.$d[Q](dt),et.init(),this.$d=et.set(g,Math.min(this.$D,et.daysInMonth())).$d}else Q&&this.$d[Q](dt);return this.init(),this},F.set=function(L,M){return this.clone().$set(L,M)},F.get=function(L){return this[O.p(L)]()},F.add=function(L,M){var P,H=this;L=Number(L);var Y=O.p(M),Q=function(ut){var it=D(H);return O.w(it.date(it.date()+Math.round(ut*L)),H)};if(Y===u)return this.set(u,this.$M+L);if(Y===d)return this.set(d,this.$y+L);if(Y===c)return Q(1);if(Y===h)return Q(7);var dt=(P={},P[n]=i,P[l]=a,P[o]=r,P)[Y]||1,et=this.$d.getTime()+L*dt;return O.w(et,this)},F.subtract=function(L,M){return this.add(-1*L,M)},F.format=function(L){var M=this,P=this.$locale();if(!this.isValid())return P.invalidDate||m;var H=L||"YYYY-MM-DDTHH:mm:ssZ",Y=O.z(this),Q=this.$H,dt=this.$m,et=this.$M,ut=P.weekdays,it=P.months,rt=P.meridiem,ht=function(xt,Lt,ue,ie){return xt&&(xt[Lt]||xt(M,H))||ue[Lt].slice(0,ie)},ft=function(xt){return O.s(Q%12||12,xt,"0")},Tt=rt||function(xt,Lt,ue){var ie=xt<12?"AM":"PM";return ue?ie.toLowerCase():ie};return H.replace(x,(function(xt,Lt){return Lt||(function(ue){switch(ue){case"YY":return String(M.$y).slice(-2);case"YYYY":return O.s(M.$y,4,"0");case"M":return et+1;case"MM":return O.s(et+1,2,"0");case"MMM":return ht(P.monthsShort,et,it,3);case"MMMM":return ht(it,et);case"D":return M.$D;case"DD":return O.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return ht(P.weekdaysMin,M.$W,ut,2);case"ddd":return ht(P.weekdaysShort,M.$W,ut,3);case"dddd":return ut[M.$W];case"H":return String(Q);case"HH":return O.s(Q,2,"0");case"h":return ft(1);case"hh":return ft(2);case"a":return Tt(Q,dt,!0);case"A":return Tt(Q,dt,!1);case"m":return String(dt);case"mm":return O.s(dt,2,"0");case"s":return String(M.$s);case"ss":return O.s(M.$s,2,"0");case"SSS":return O.s(M.$ms,3,"0");case"Z":return Y}return null})(xt)||Y.replace(":","")}))},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(L,M,P){var H,Y=this,Q=O.p(M),dt=D(L),et=(dt.utcOffset()-this.utcOffset())*i,ut=this-dt,it=function(){return O.m(Y,dt)};switch(Q){case d:H=it()/12;break;case u:H=it();break;case p:H=it()/3;break;case h:H=(ut-et)/6048e5;break;case c:H=(ut-et)/864e5;break;case l:H=ut/a;break;case n:H=ut/i;break;case o:H=ut/r;break;default:H=ut}return P?H:O.a(H)},F.daysInMonth=function(){return this.endOf(u).$D},F.$locale=function(){return v[this.$L]},F.locale=function(L,M){if(!L)return this.$L;var P=this.clone(),H=N(L,M,!0);return H&&(P.$L=H),P},F.clone=function(){return O.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},I})(),z=W.prototype;return D.prototype=z,[["$ms",s],["$s",o],["$m",n],["$H",l],["$W",c],["$M",u],["$y",d],["$D",g]].forEach((function(I){z[I[1]]=function(F){return this.$g(F,I[0],I[1])}})),D.extend=function(I,F){return I.$i||(I(F,W,D),I.$i=!0),D},D.locale=N,D.isDayjs=B,D.unix=function(I){return D(1e3*I)},D.en=v[w],D.Ls=v,D.p={},D}))})(za)),za.exports}var qy=Ny();const zy=Py(qy);var au=Object.defineProperty,f=(e,t)=>au(e,"name",{value:t,configurable:!0}),Wy=(e,t)=>{for(var r in t)au(e,r,{get:t[r],enumerable:!0})},Pe={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},R={trace:f((...e)=>{},"trace"),debug:f((...e)=>{},"debug"),info:f((...e)=>{},"info"),warn:f((...e)=>{},"warn"),error:f((...e)=>{},"error"),fatal:f((...e)=>{},"fatal")},Wn=f(function(e="fatal"){let t=Pe.fatal;typeof e=="string"?e.toLowerCase()in Pe&&(t=Pe[e]):typeof e=="number"&&(t=e),R.trace=()=>{},R.debug=()=>{},R.info=()=>{},R.warn=()=>{},R.error=()=>{},R.fatal=()=>{},t<=Pe.fatal&&(R.fatal=console.error?console.error.bind(console,le("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",le("FATAL"))),t<=Pe.error&&(R.error=console.error?console.error.bind(console,le("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",le("ERROR"))),t<=Pe.warn&&(R.warn=console.warn?console.warn.bind(console,le("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",le("WARN"))),t<=Pe.info&&(R.info=console.info?console.info.bind(console,le("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",le("INFO"))),t<=Pe.debug&&(R.debug=console.debug?console.debug.bind(console,le("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",le("DEBUG"))),t<=Pe.trace&&(R.trace=console.debug?console.debug.bind(console,le("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",le("TRACE")))},"setLogLevel"),le=f(e=>`%c${zy().format("ss.SSS")} : ${e} : `,"format");const Wa={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const a=r<.5?r*(1+t):r+t-r*t,s=2*r-a;switch(i){case"r":return Wa.hue2rgb(s,a,e+1/3)*255;case"g":return Wa.hue2rgb(s,a,e)*255;case"b":return Wa.hue2rgb(s,a,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const a=Math.max(e,t,r),s=Math.min(e,t,r),o=(a+s)/2;if(i==="l")return o*100;if(a===s)return 0;const n=a-s,l=o>.5?n/(2-a-s):n/(a+s);if(i==="s")return l*100;switch(a){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},Hy={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Yy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},nt={channel:Wa,lang:Hy,unit:Yy},Ze={};for(let e=0;e<=255;e++)Ze[e]=nt.unit.dec2hex(e);const Wt={ALL:0,RGB:1,HSL:2};class jy{constructor(){this.type=Wt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Wt.ALL}is(t){return this.type===t}}class Uy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new jy}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Wt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:a}=t;r===void 0&&(t.h=nt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=nt.channel.rgb2hsl(t,"s")),a===void 0&&(t.l=nt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:a}=t;r===void 0&&(t.r=nt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=nt.channel.hsl2rgb(t,"g")),a===void 0&&(t.b=nt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Wt.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Wt.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Wt.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Wt.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Wt.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Wt.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Wt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Wt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Wt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Wt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Wt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Wt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Os=new Uy({r:0,g:0,b:0,a:0},"transparent"),Gr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Gr.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,s=a%4===0,o=a>4,n=o?1:17,l=o?8:4,c=s?0:-1,h=o?255:15;return Os.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:s?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${Ze[Math.round(t)]}${Ze[Math.round(r)]}${Ze[Math.round(i)]}${Ze[Math.round(a*255)]}`:`#${Ze[Math.round(t)]}${Ze[Math.round(r)]}${Ze[Math.round(i)]}`}},gr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(gr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return nt.channel.clamp.h(parseFloat(r)*.9);case"rad":return nt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return nt.channel.clamp.h(parseFloat(r)*360)}}return nt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(gr.re);if(!r)return;const[,i,a,s,o,n]=r;return Os.set({h:gr._hue2deg(i),s:nt.channel.clamp.s(parseFloat(a)),l:nt.channel.clamp.l(parseFloat(s)),a:o?nt.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a}=e;return a<1?`hsla(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%, ${a})`:`hsl(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%)`}},Ui={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Ui.colors[e];if(t)return Gr.parse(t)},stringify:e=>{const t=Gr.stringify(e);for(const r in Ui.colors)if(Ui.colors[r]===t)return r}},Pi={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Pi.re);if(!r)return;const[,i,a,s,o,n,l,c,h]=r;return Os.set({r:nt.channel.clamp.r(a?parseFloat(i)*2.55:parseFloat(i)),g:nt.channel.clamp.g(o?parseFloat(s)*2.55:parseFloat(s)),b:nt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?nt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`rgba(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)}, ${nt.lang.round(a)})`:`rgb(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)})`}},Fe={format:{keyword:Ui,hex:Gr,rgb:Pi,rgba:Pi,hsl:gr,hsla:gr},parse:e=>{if(typeof e!="string")return e;const t=Gr.parse(e)||Pi.parse(e)||gr.parse(e)||Ui.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Wt.HSL)||e.data.r===void 0?gr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Pi.stringify(e):Gr.stringify(e)},su=(e,t)=>{const r=Fe.parse(e);for(const i in t)r[i]=nt.channel.clamp[i](t[i]);return Fe.stringify(r)},tr=(e,t,r=0,i=1)=>{if(typeof e!="number")return su(e,{a:t});const a=Os.set({r:nt.channel.clamp.r(e),g:nt.channel.clamp.g(t),b:nt.channel.clamp.b(r),a:nt.channel.clamp.a(i)});return Fe.stringify(a)},Gy=e=>{const{r:t,g:r,b:i}=Fe.parse(e),a=.2126*nt.channel.toLinear(t)+.7152*nt.channel.toLinear(r)+.0722*nt.channel.toLinear(i);return nt.lang.round(a)},Xy=e=>Gy(e)>=.5,ke=e=>!Xy(e),ou=(e,t,r)=>{const i=Fe.parse(e),a=i[t],s=nt.channel.clamp[t](a+r);return a!==s&&(i[t]=s),Fe.stringify(i)},$=(e,t)=>ou(e,"l",t),A=(e,t)=>ou(e,"l",-t),C=(e,t)=>{const r=Fe.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return su(e,i)},Vy=(e,t,r=50)=>{const{r:i,g:a,b:s,a:o}=Fe.parse(e),{r:n,g:l,b:c,a:h}=Fe.parse(t),u=r/100,p=u*2-1,d=o-h,m=((p*d===-1?p:(p+d)/(1+p*d))+1)/2,y=1-m,x=i*m+n*y,b=a*m+l*y,k=s*m+c*y,_=o*u+h*(1-u);return tr(x,b,k,_)},S=(e,t=100)=>{const r=Fe.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Vy(r,e,t)};/*! @license DOMPurify 3.4.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.2/LICENSE */const{entries:nu,setPrototypeOf:lh,isFrozen:Zy,getPrototypeOf:Ky,getOwnPropertyDescriptor:Qy}=Object;let{freeze:Vt,seal:he,create:zr}=Object,{apply:No,construct:qo}=typeof Reflect<"u"&&Reflect;Vt||(Vt=function(t){return t});he||(he=function(t){return t});No||(No=function(t,r){for(var i=arguments.length,a=new Array(i>2?i-2:0),s=2;s<i;s++)a[s-2]=arguments[s];return t.apply(r,a)});qo||(qo=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return new t(...i)});const Si=Et(Array.prototype.forEach),Jy=Et(Array.prototype.lastIndexOf),hh=Et(Array.prototype.pop),vi=Et(Array.prototype.push),t0=Et(Array.prototype.splice),Ut=Array.isArray,Ri=Et(String.prototype.toLowerCase),Co=Et(String.prototype.toString),ch=Et(String.prototype.match),Pr=Et(String.prototype.replace),uh=Et(String.prototype.indexOf),e0=Et(String.prototype.trim),r0=Et(Number.prototype.toString),i0=Et(Boolean.prototype.toString),dh=typeof BigInt>"u"?null:Et(BigInt.prototype.toString),ph=typeof Symbol>"u"?null:Et(Symbol.prototype.toString),vt=Et(Object.prototype.hasOwnProperty),Bi=Et(Object.prototype.toString),Rt=Et(RegExp.prototype.test),La=a0(TypeError);function Et(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return No(e,t,i)}}function a0(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return qo(e,r)}}function lt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ri;if(lh&&lh(e,null),!Ut(t))return e;let i=t.length;for(;i--;){let a=t[i];if(typeof a=="string"){const s=r(a);s!==a&&(Zy(t)||(t[i]=s),a=s)}e[a]=!0}return e}function s0(e){for(let t=0;t<e.length;t++)vt(e,t)||(e[t]=null);return e}function Jt(e){const t=zr(null);for(const[r,i]of nu(e))vt(e,r)&&(Ut(i)?t[r]=s0(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=Jt(i):t[r]=i);return t}function o0(e){switch(typeof e){case"string":return e;case"number":return r0(e);case"boolean":return i0(e);case"bigint":return dh?dh(e):"0";case"symbol":return ph?ph(e):"Symbol()";case"undefined":return Bi(e);case"function":case"object":{if(e===null)return Bi(e);const t=e,r=Wr(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:Bi(i)}return Bi(e)}default:return Bi(e)}}function Wr(e,t){for(;e!==null;){const i=Qy(e,t);if(i){if(i.get)return Et(i.get);if(typeof i.value=="function")return Et(i.value)}e=Ky(e)}function r(){return null}return r}function n0(e){try{return Rt(e,""),!0}catch{return!1}}const fh=Vt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),xo=Vt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),bo=Vt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),l0=Vt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ko=Vt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),h0=Vt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),gh=Vt(["#text"]),mh=Vt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),To=Vt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),yh=Vt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Fa=Vt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),c0=he(/\{\{[\w\W]*|[\w\W]*\}\}/gm),u0=he(/<%[\w\W]*|[\w\W]*%>/gm),d0=he(/\$\{[\w\W]*/gm),p0=he(/^data-[\-\w.\u00B7-\uFFFF]+$/),f0=he(/^aria-[\-\w]+$/),lu=he(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),g0=he(/^(?:\w+script|data):/i),m0=he(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hu=he(/^html$/i),y0=he(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ch=Object.freeze({__proto__:null,ARIA_ATTR:f0,ATTR_WHITESPACE:m0,CUSTOM_ELEMENT:y0,DATA_ATTR:p0,DOCTYPE_NAME:hu,ERB_EXPR:u0,IS_ALLOWED_URI:lu,IS_SCRIPT_OR_DATA:g0,MUSTACHE_EXPR:c0,TMPLIT_EXPR:d0});const Li={element:1,text:3,progressingInstruction:7,comment:8,document:9},C0=function(){return typeof window>"u"?null:window},x0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(i=r.getAttribute(a));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},xh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function cu(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:C0();const t=J=>cu(J);if(t.version="3.4.2",t.removed=[],!e||!e.document||e.document.nodeType!==Li.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,a=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:n,Element:l,NodeFilter:c,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:p,trustedTypes:d}=e,g=l.prototype,m=Wr(g,"cloneNode"),y=Wr(g,"remove"),x=Wr(g,"nextSibling"),b=Wr(g,"childNodes"),k=Wr(g,"parentNode");if(typeof o=="function"){const J=r.createElement("template");J.content&&J.content.ownerDocument&&(r=J.content.ownerDocument)}let _,w="";const{implementation:v,createNodeIterator:E,createDocumentFragment:B,getElementsByTagName:N}=r,{importNode:D}=i;let O=xh();t.isSupported=typeof nu=="function"&&typeof k=="function"&&v&&v.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:W,ERB_EXPR:z,TMPLIT_EXPR:I,DATA_ATTR:F,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:M,ATTR_WHITESPACE:P,CUSTOM_ELEMENT:H}=Ch;let{IS_ALLOWED_URI:Y}=Ch,Q=null;const dt=lt({},[...fh,...xo,...bo,...ko,...gh]);let et=null;const ut=lt({},[...mh,...To,...yh,...Fa]);let it=Object.seal(zr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),rt=null,ht=null;const ft=Object.seal(zr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Tt=!0,xt=!0,Lt=!1,ue=!0,ie=!1,Ie=!0,lr=!1,ao=!1,so=!1,$r=!1,wa=!1,Sa=!1,Hl=!0,Yl=!1;const jl="user-content-";let oo=!0,_i=!1,Or={},_e=null;const no=lt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ul=null;const Gl=lt({},["audio","video","img","source","image","track"]);let lo=null;const Xl=lt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),va="http://www.w3.org/1998/Math/MathML",Ba="http://www.w3.org/2000/svg",we="http://www.w3.org/1999/xhtml";let Ir=we,ho=!1,co=null;const Ay=lt({},[va,Ba,we],Co);let uo=lt({},["mi","mo","mn","ms","mtext"]),po=lt({},["annotation-xml"]);const Ey=lt({},["title","style","font","a","script"]);let wi=null;const My=["application/xhtml+xml","text/html"],$y="text/html";let Mt=null,Dr=null;const Oy=r.createElement("form"),Vl=function(T){return T instanceof RegExp||T instanceof Function},fo=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Dr&&Dr===T)return;(!T||typeof T!="object")&&(T={}),T=Jt(T),wi=My.indexOf(T.PARSER_MEDIA_TYPE)===-1?$y:T.PARSER_MEDIA_TYPE,Mt=wi==="application/xhtml+xml"?Co:Ri,Q=vt(T,"ALLOWED_TAGS")&&Ut(T.ALLOWED_TAGS)?lt({},T.ALLOWED_TAGS,Mt):dt,et=vt(T,"ALLOWED_ATTR")&&Ut(T.ALLOWED_ATTR)?lt({},T.ALLOWED_ATTR,Mt):ut,co=vt(T,"ALLOWED_NAMESPACES")&&Ut(T.ALLOWED_NAMESPACES)?lt({},T.ALLOWED_NAMESPACES,Co):Ay,lo=vt(T,"ADD_URI_SAFE_ATTR")&&Ut(T.ADD_URI_SAFE_ATTR)?lt(Jt(Xl),T.ADD_URI_SAFE_ATTR,Mt):Xl,Ul=vt(T,"ADD_DATA_URI_TAGS")&&Ut(T.ADD_DATA_URI_TAGS)?lt(Jt(Gl),T.ADD_DATA_URI_TAGS,Mt):Gl,_e=vt(T,"FORBID_CONTENTS")&&Ut(T.FORBID_CONTENTS)?lt({},T.FORBID_CONTENTS,Mt):no,rt=vt(T,"FORBID_TAGS")&&Ut(T.FORBID_TAGS)?lt({},T.FORBID_TAGS,Mt):Jt({}),ht=vt(T,"FORBID_ATTR")&&Ut(T.FORBID_ATTR)?lt({},T.FORBID_ATTR,Mt):Jt({}),Or=vt(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?Jt(T.USE_PROFILES):T.USE_PROFILES:!1,Tt=T.ALLOW_ARIA_ATTR!==!1,xt=T.ALLOW_DATA_ATTR!==!1,Lt=T.ALLOW_UNKNOWN_PROTOCOLS||!1,ue=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ie=T.SAFE_FOR_TEMPLATES||!1,Ie=T.SAFE_FOR_XML!==!1,lr=T.WHOLE_DOCUMENT||!1,$r=T.RETURN_DOM||!1,wa=T.RETURN_DOM_FRAGMENT||!1,Sa=T.RETURN_TRUSTED_TYPE||!1,so=T.FORCE_BODY||!1,Hl=T.SANITIZE_DOM!==!1,Yl=T.SANITIZE_NAMED_PROPS||!1,oo=T.KEEP_CONTENT!==!1,_i=T.IN_PLACE||!1,Y=n0(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:lu,Ir=typeof T.NAMESPACE=="string"?T.NAMESPACE:we,uo=vt(T,"MATHML_TEXT_INTEGRATION_POINTS")&&T.MATHML_TEXT_INTEGRATION_POINTS&&typeof T.MATHML_TEXT_INTEGRATION_POINTS=="object"?Jt(T.MATHML_TEXT_INTEGRATION_POINTS):lt({},["mi","mo","mn","ms","mtext"]),po=vt(T,"HTML_INTEGRATION_POINTS")&&T.HTML_INTEGRATION_POINTS&&typeof T.HTML_INTEGRATION_POINTS=="object"?Jt(T.HTML_INTEGRATION_POINTS):lt({},["annotation-xml"]);const q=vt(T,"CUSTOM_ELEMENT_HANDLING")&&T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING=="object"?Jt(T.CUSTOM_ELEMENT_HANDLING):zr(null);if(it=zr(null),vt(q,"tagNameCheck")&&Vl(q.tagNameCheck)&&(it.tagNameCheck=q.tagNameCheck),vt(q,"attributeNameCheck")&&Vl(q.attributeNameCheck)&&(it.attributeNameCheck=q.attributeNameCheck),vt(q,"allowCustomizedBuiltInElements")&&typeof q.allowCustomizedBuiltInElements=="boolean"&&(it.allowCustomizedBuiltInElements=q.allowCustomizedBuiltInElements),ie&&(xt=!1),wa&&($r=!0),Or&&(Q=lt({},gh),et=zr(null),Or.html===!0&&(lt(Q,fh),lt(et,mh)),Or.svg===!0&&(lt(Q,xo),lt(et,To),lt(et,Fa)),Or.svgFilters===!0&&(lt(Q,bo),lt(et,To),lt(et,Fa)),Or.mathMl===!0&&(lt(Q,ko),lt(et,yh),lt(et,Fa))),ft.tagCheck=null,ft.attributeCheck=null,vt(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?ft.tagCheck=T.ADD_TAGS:Ut(T.ADD_TAGS)&&(Q===dt&&(Q=Jt(Q)),lt(Q,T.ADD_TAGS,Mt))),vt(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?ft.attributeCheck=T.ADD_ATTR:Ut(T.ADD_ATTR)&&(et===ut&&(et=Jt(et)),lt(et,T.ADD_ATTR,Mt))),vt(T,"ADD_URI_SAFE_ATTR")&&Ut(T.ADD_URI_SAFE_ATTR)&&lt(lo,T.ADD_URI_SAFE_ATTR,Mt),vt(T,"FORBID_CONTENTS")&&Ut(T.FORBID_CONTENTS)&&(_e===no&&(_e=Jt(_e)),lt(_e,T.FORBID_CONTENTS,Mt)),vt(T,"ADD_FORBID_CONTENTS")&&Ut(T.ADD_FORBID_CONTENTS)&&(_e===no&&(_e=Jt(_e)),lt(_e,T.ADD_FORBID_CONTENTS,Mt)),oo&&(Q["#text"]=!0),lr&&lt(Q,["html","head","body"]),Q.table&&(lt(Q,["tbody"]),delete rt.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw La('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw La('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=T.TRUSTED_TYPES_POLICY,w=_.createHTML("")}else _===void 0&&(_=x0(d,a)),_!==null&&typeof w=="string"&&(w=_.createHTML(""));Vt&&Vt(T),Dr=T},Zl=lt({},[...xo,...bo,...l0]),Kl=lt({},[...ko,...h0]),Iy=function(T){let q=k(T);(!q||!q.tagName)&&(q={namespaceURI:Ir,tagName:"template"});const G=Ri(T.tagName),bt=Ri(q.tagName);return co[T.namespaceURI]?T.namespaceURI===Ba?q.namespaceURI===we?G==="svg":q.namespaceURI===va?G==="svg"&&(bt==="annotation-xml"||uo[bt]):!!Zl[G]:T.namespaceURI===va?q.namespaceURI===we?G==="math":q.namespaceURI===Ba?G==="math"&&po[bt]:!!Kl[G]:T.namespaceURI===we?q.namespaceURI===Ba&&!po[bt]||q.namespaceURI===va&&!uo[bt]?!1:!Kl[G]&&(Ey[G]||!Zl[G]):!!(wi==="application/xhtml+xml"&&co[T.namespaceURI]):!1},de=function(T){vi(t.removed,{element:T});try{k(T).removeChild(T)}catch{y(T)}},hr=function(T,q){try{vi(t.removed,{attribute:q.getAttributeNode(T),from:q})}catch{vi(t.removed,{attribute:null,from:q})}if(q.removeAttribute(T),T==="is")if($r||wa)try{de(q)}catch{}else try{q.setAttribute(T,"")}catch{}},Ql=function(T){let q=null,G=null;if(so)T="<remove></remove>"+T;else{const Ft=ch(T,/^[\r\n\t ]+/);G=Ft&&Ft[0]}wi==="application/xhtml+xml"&&Ir===we&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const bt=_?_.createHTML(T):T;if(Ir===we)try{q=new p().parseFromString(bt,wi)}catch{}if(!q||!q.documentElement){q=v.createDocument(Ir,"template",null);try{q.documentElement.innerHTML=ho?w:bt}catch{}}const zt=q.body||q.documentElement;return T&&G&&zt.insertBefore(r.createTextNode(G),zt.childNodes[0]||null),Ir===we?N.call(q,lr?"html":"body")[0]:lr?q.documentElement:zt},Jl=function(T){return E.call(T.ownerDocument||T,T,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},go=function(T){return T instanceof u&&(typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||!(T.attributes instanceof h)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function")},mo=function(T){return typeof n=="function"&&T instanceof n};function De(J,T,q){Si(J,G=>{G.call(t,T,q,Dr)})}const th=function(T){let q=null;if(De(O.beforeSanitizeElements,T,null),go(T))return de(T),!0;const G=Mt(T.nodeName);if(De(O.uponSanitizeElement,T,{tagName:G,allowedTags:Q}),Ie&&T.hasChildNodes()&&!mo(T.firstElementChild)&&Rt(/<[/\w!]/g,T.innerHTML)&&Rt(/<[/\w!]/g,T.textContent)||Ie&&T.namespaceURI===we&&G==="style"&&mo(T.firstElementChild)||T.nodeType===Li.progressingInstruction||Ie&&T.nodeType===Li.comment&&Rt(/<[/\w]/g,T.data))return de(T),!0;if(rt[G]||!(ft.tagCheck instanceof Function&&ft.tagCheck(G))&&!Q[G]){if(!rt[G]&&rh(G)&&(it.tagNameCheck instanceof RegExp&&Rt(it.tagNameCheck,G)||it.tagNameCheck instanceof Function&&it.tagNameCheck(G)))return!1;if(oo&&!_e[G]){const bt=k(T)||T.parentNode,zt=b(T)||T.childNodes;if(zt&&bt){const Ft=zt.length;for(let Kt=Ft-1;Kt>=0;--Kt){const ne=m(zt[Kt],!0);bt.insertBefore(ne,x(T))}}}return de(T),!0}return T instanceof l&&!Iy(T)||(G==="noscript"||G==="noembed"||G==="noframes")&&Rt(/<\/no(script|embed|frames)/i,T.innerHTML)?(de(T),!0):(ie&&T.nodeType===Li.text&&(q=T.textContent,Si([W,z,I],bt=>{q=Pr(q,bt," ")}),T.textContent!==q&&(vi(t.removed,{element:T.cloneNode()}),T.textContent=q)),De(O.afterSanitizeElements,T,null),!1)},eh=function(T,q,G){if(ht[q]||Hl&&(q==="id"||q==="name")&&(G in r||G in Oy))return!1;const bt=et[q]||ft.attributeCheck instanceof Function&&ft.attributeCheck(q,T);if(!(xt&&!ht[q]&&Rt(F,q))){if(!(Tt&&Rt(L,q))){if(!bt||ht[q]){if(!(rh(T)&&(it.tagNameCheck instanceof RegExp&&Rt(it.tagNameCheck,T)||it.tagNameCheck instanceof Function&&it.tagNameCheck(T))&&(it.attributeNameCheck instanceof RegExp&&Rt(it.attributeNameCheck,q)||it.attributeNameCheck instanceof Function&&it.attributeNameCheck(q,T))||q==="is"&&it.allowCustomizedBuiltInElements&&(it.tagNameCheck instanceof RegExp&&Rt(it.tagNameCheck,G)||it.tagNameCheck instanceof Function&&it.tagNameCheck(G))))return!1}else if(!lo[q]){if(!Rt(Y,Pr(G,P,""))){if(!((q==="src"||q==="xlink:href"||q==="href")&&T!=="script"&&uh(G,"data:")===0&&Ul[T])){if(!(Lt&&!Rt(M,Pr(G,P,"")))){if(G)return!1}}}}}}return!0},Dy=lt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),rh=function(T){return!Dy[Ri(T)]&&Rt(H,T)},ih=function(T){De(O.beforeSanitizeAttributes,T,null);const{attributes:q}=T;if(!q||go(T))return;const G={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:et,forceKeepAttr:void 0};let bt=q.length;for(;bt--;){const zt=q[bt],{name:Ft,namespaceURI:Kt,value:ne}=zt,pe=Mt(Ft),yo=ne;let Dt=Ft==="value"?yo:e0(yo);if(G.attrName=pe,G.attrValue=Dt,G.keepAttr=!0,G.forceKeepAttr=void 0,De(O.uponSanitizeAttribute,T,G),Dt=G.attrValue,Yl&&(pe==="id"||pe==="name")&&uh(Dt,jl)!==0&&(hr(Ft,T),Dt=jl+Dt),Ie&&Rt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Dt)){hr(Ft,T);continue}if(pe==="attributename"&&ch(Dt,"href")){hr(Ft,T);continue}if(G.forceKeepAttr)continue;if(!G.keepAttr){hr(Ft,T);continue}if(!ue&&Rt(/\/>/i,Dt)){hr(Ft,T);continue}ie&&Si([W,z,I],oh=>{Dt=Pr(Dt,oh," ")});const sh=Mt(T.nodeName);if(!eh(sh,pe,Dt)){hr(Ft,T);continue}if(_&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Kt)switch(d.getAttributeType(sh,pe)){case"TrustedHTML":{Dt=_.createHTML(Dt);break}case"TrustedScriptURL":{Dt=_.createScriptURL(Dt);break}}if(Dt!==yo)try{Kt?T.setAttributeNS(Kt,Ft,Dt):T.setAttribute(Ft,Dt),go(T)?de(T):hh(t.removed)}catch{hr(Ft,T)}}De(O.afterSanitizeAttributes,T,null)},ah=function(T){let q=null;const G=Jl(T);for(De(O.beforeSanitizeShadowDOM,T,null);q=G.nextNode();)De(O.uponSanitizeShadowNode,q,null),th(q),ih(q),q.content instanceof s&&ah(q.content);De(O.afterSanitizeShadowDOM,T,null)};return t.sanitize=function(J){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=null,G=null,bt=null,zt=null;if(ho=!J,ho&&(J="<!-->"),typeof J!="string"&&!mo(J)&&(J=o0(J),typeof J!="string"))throw La("dirty is not a string, aborting");if(!t.isSupported)return J;if(ao||fo(T),t.removed=[],typeof J=="string"&&(_i=!1),_i){const ne=J.nodeName;if(typeof ne=="string"){const pe=Mt(ne);if(!Q[pe]||rt[pe])throw La("root node is forbidden and cannot be sanitized in-place")}}else if(J instanceof n)q=Ql("<!---->"),G=q.ownerDocument.importNode(J,!0),G.nodeType===Li.element&&G.nodeName==="BODY"||G.nodeName==="HTML"?q=G:q.appendChild(G);else{if(!$r&&!ie&&!lr&&J.indexOf("<")===-1)return _&&Sa?_.createHTML(J):J;if(q=Ql(J),!q)return $r?null:Sa?w:""}q&&so&&de(q.firstChild);const Ft=Jl(_i?J:q);for(;bt=Ft.nextNode();)th(bt),ih(bt),bt.content instanceof s&&ah(bt.content);if(_i)return J;if($r){if(ie){q.normalize();let ne=q.innerHTML;Si([W,z,I],pe=>{ne=Pr(ne,pe," ")}),q.innerHTML=ne}if(wa)for(zt=B.call(q.ownerDocument);q.firstChild;)zt.appendChild(q.firstChild);else zt=q;return(et.shadowroot||et.shadowrootmode)&&(zt=D.call(i,zt,!0)),zt}let Kt=lr?q.outerHTML:q.innerHTML;return lr&&Q["!doctype"]&&q.ownerDocument&&q.ownerDocument.doctype&&q.ownerDocument.doctype.name&&Rt(hu,q.ownerDocument.doctype.name)&&(Kt="<!DOCTYPE "+q.ownerDocument.doctype.name+`>
`+Kt),ie&&Si([W,z,I],ne=>{Kt=Pr(Kt,ne," ")}),_&&Sa?_.createHTML(Kt):Kt},t.setConfig=function(){let J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};fo(J),ao=!0},t.clearConfig=function(){Dr=null,ao=!1},t.isValidAttribute=function(J,T,q){Dr||fo({});const G=Mt(J),bt=Mt(T);return eh(G,bt,q)},t.addHook=function(J,T){typeof T=="function"&&vi(O[J],T)},t.removeHook=function(J,T){if(T!==void 0){const q=Jy(O[J],T);return q===-1?void 0:t0(O[J],q,1)[0]}return hh(O[J])},t.removeHooks=function(J){O[J]=[]},t.removeAllHooks=function(){O=xh()},t}var ci=cu(),uu=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Gi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,b0=/\s*%%.*\n/gm,Zr,du=(Zr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},f(Zr,"UnknownDiagramError"),Zr),kr={},Hn=f(function(e,t){e=e.replace(uu,"").replace(Gi,"").replace(b0,`
`);for(const[r,{detector:i}]of Object.entries(kr))if(i(e,t))return r;throw new du(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),zo=f((...e)=>{for(const{id:t,detector:r,loader:i}of e)pu(t,r,i)},"registerLazyLoadedDiagrams"),pu=f((e,t,r)=>{kr[e]&&R.warn(`Detector with key ${e} already exists. Overwriting.`),kr[e]={detector:t,loader:r},R.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),k0=f(e=>kr[e].loader,"getDiagramLoader"),Wo=f((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>Wo(e,s,a)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(s=>{typeof t[s]=="object"&&t[s]!==null&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=Wo(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),Ot=Wo,Ee="#ffffff",Me="#f2f2f2",ot=f((e,t)=>t?C(e,{s:-40,l:10}):C(e,{s:-40,l:-10}),"mkBorder"),Kr,T0=(Kr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||S(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||S(this.tertiaryColor),this.lineColor=this.lineColor||S(this.background),this.arrowheadColor=this.arrowheadColor||S(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||S(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||$(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||A(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||A(this.mainBkg,10)):(this.rowOdd=this.rowOdd||$(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||$(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=A(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=A(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||S(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||$(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||C(this.primaryColor,{h:64}),this.fillType3=this.fillType3||C(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||C(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||C(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||C(this.primaryColor,{h:128}),this.fillType7=this.fillType7||C(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-10}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||C(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??C(this.primaryColor,{l:-30}),this.venn2=this.venn2??C(this.secondaryColor,{l:-30}),this.venn3=this.venn3??C(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??C(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??C(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??C(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??C(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??C(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||S(this.git0),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ee,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Me,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Kr,"Theme"),Kr),_0=f(e=>{const t=new T0;return t.calculate(e),t},"getThemeVariables"),Qr,w0=(Qr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=$(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=S(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=S(this.primaryColor),this.secondaryTextColor=S(this.secondaryColor),this.tertiaryTextColor=S(this.tertiaryColor),this.lineColor=S(this.background),this.textColor=S(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=$(S("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=A("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=A(this.sectionBkgColor,10),this.taskBorderColor=tr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=tr(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||$(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||A(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=$(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=$(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=$(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=S(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||S(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||$(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||C(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||C(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??$(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=$(this.secondaryColor,20),this.git1=$(this.pie2||this.secondaryColor,20),this.git2=$(this.pie3||this.tertiaryColor,20),this.git3=$(this.pie4||C(this.primaryColor,{h:-30}),20),this.git4=$(this.pie5||C(this.primaryColor,{h:-60}),20),this.git5=$(this.pie6||C(this.primaryColor,{h:-90}),10),this.git6=$(this.pie7||C(this.primaryColor,{h:60}),10),this.git7=$(this.pie8||C(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||S(this.git0),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||S(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||S(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Qr,"Theme"),Qr),S0=f(e=>{const t=new w0;return t.calculate(e),t},"getThemeVariables"),Jr,v0=(Jr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=C(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=S(this.primaryColor),this.secondaryTextColor=S(this.secondaryColor),this.tertiaryTextColor=S(this.tertiaryColor),this.lineColor=S(this.background),this.textColor=S(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=tr(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=A(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||A(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||C(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||C(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||C(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||S(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||S(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||$(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||$(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||C(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-30}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||C(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||C(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??C(this.primaryColor,{l:-30}),this.venn2=this.venn2??C(this.secondaryColor,{l:-30}),this.venn3=this.venn3??C(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??C(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??C(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??C(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??C(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??C(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||A(S(this.git0),25),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||S(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||S(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ee,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Me}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Jr,"Theme"),Jr),B0=f(e=>{const t=new v0;return t.calculate(e),t},"getThemeVariables"),ti,L0=(ti=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=$("#cde498",10),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=S(this.primaryColor),this.secondaryTextColor=S(this.secondaryColor),this.tertiaryTextColor=S(this.primaryColor),this.lineColor=S(this.background),this.textColor=S(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=A(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=A(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||A(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||C(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||C(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||C(this.mainBkg,{h:30,s:-30,l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||$(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||$(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||C(this.primaryColor,{l:-30}),this.pie5=this.pie5||C(this.secondaryColor,{l:-30}),this.pie6=this.pie6||C(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||C(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??C(this.primaryColor,{l:-30}),this.venn2=this.venn2??C(this.secondaryColor,{l:-30}),this.venn3=this.venn3??C(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??C(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??C(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??C(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??C(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??C(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||S(this.git0),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||S(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||S(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ee,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Me}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ti,"Theme"),ti),F0=f(e=>{const t=new L0;return t.calculate(e),t},"getThemeVariables"),ei,A0=(ei=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=$(this.contrast,55),this.background="#ffffff",this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=S(this.primaryColor),this.secondaryTextColor=S(this.secondaryColor),this.tertiaryTextColor=S(this.tertiaryColor),this.lineColor=S(this.background),this.textColor=S(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||$(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=$(this.contrast,55),this.border2=this.contrast,this.actorBorder=$(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||S(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||$(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||A(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||C(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||C(this.mainBkg,{l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=$(this.contrast,30),this.sectionBkgColor2=$(this.contrast,30),this.taskBorderColor=A(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=$(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=A(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=A(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||C(this.primaryColor,{h:-30}),this.git4=this.pie5||C(this.primaryColor,{h:-60}),this.git5=this.pie6||C(this.primaryColor,{h:-90}),this.git6=this.pie7||C(this.primaryColor,{h:60}),this.git7=this.pie8||C(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||S(this.git0),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ee,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Me}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ei,"Theme"),ei),E0=f(e=>{const t=new A0;return t.calculate(e),t},"getThemeVariables"),ri,M0=(ri=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||S(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||S(this.tertiaryColor),this.lineColor=this.lineColor||S(this.background),this.arrowheadColor=this.arrowheadColor||S(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||S(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=C(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||$(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||C(t,{h:30}),this.cScale4=this.cScale4||C(t,{h:60}),this.cScale5=this.cScale5||C(t,{h:90}),this.cScale6=this.cScale6||C(t,{h:120}),this.cScale7=this.cScale7||C(t,{h:150}),this.cScale8=this.cScale8||C(t,{h:210,l:150}),this.cScale9=this.cScale9||C(t,{h:270}),this.cScale10=this.cScale10||C(t,{h:300}),this.cScale11=this.cScale11||C(t,{h:330}),this.darkMode)for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=A(this["cScale"+s],75);else for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=A(this["cScale"+s],25);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||S(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||$(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||A(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||C(this.mainBkg,{h:180,s:-15,l:a*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||C(this.mainBkg,{h:180,s:-15,l:a*(8+s*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||C(t,{h:64}),this.fillType3=this.fillType3||C(r,{h:64}),this.fillType4=this.fillType4||C(t,{h:-64}),this.fillType5=this.fillType5||C(r,{h:-64}),this.fillType6=this.fillType6||C(t,{h:128}),this.fillType7=this.fillType7||C(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||C(t,{l:-10}),this.pie5=this.pie5||C(r,{l:-10}),this.pie6=this.pie6||C(i,{l:-10}),this.pie7=this.pie7||C(t,{h:60,l:-10}),this.pie8=this.pie8||C(t,{h:-60,l:-10}),this.pie9=this.pie9||C(t,{h:120,l:0}),this.pie10=this.pie10||C(t,{h:60,l:-20}),this.pie11=this.pie11||C(t,{h:-60,l:-20}),this.pie12=this.pie12||C(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||C(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||C(t,{h:-30}),this.git4=this.git4||C(t,{h:-60}),this.git5=this.git5||C(t,{h:-90}),this.git6=this.git6||C(t,{h:60}),this.git7=this.git7||C(t,{h:120}),this.darkMode?(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||S(this.git0),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ee,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Me}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ri,"Theme"),ri),$0=f(e=>{const t=new M0;return t.calculate(e),t},"getThemeVariables"),ii,O0=(ii=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=$(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=S(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=S(this.primaryColor),this.secondaryTextColor=S(this.secondaryColor),this.tertiaryTextColor=S(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=$(S("#323D47"),10),this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor=S(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||S(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||S(this.tertiaryColor),this.lineColor=this.lineColor||S(this.background),this.arrowheadColor=this.arrowheadColor||S(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||S(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||$(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=A(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=A(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||S(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||$(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||C(this.primaryColor,{h:64}),this.fillType3=this.fillType3||C(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||C(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||C(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||C(this.primaryColor,{h:128}),this.fillType7=this.fillType7||C(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-10}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||C(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||S(this.git0),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ee,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Me}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ii,"Theme"),ii),I0=f(e=>{const t=new O0;return t.calculate(e),t},"getThemeVariables"),ai,D0=(ai=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ot("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||S(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||S(this.tertiaryColor),this.lineColor=this.lineColor||S(this.background),this.arrowheadColor=this.arrowheadColor||S(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||S(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=C(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||$(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=this.mainBkg;if(this.darkMode)for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=A(this["cScale"+s],75);else for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=A(this["cScale"+s],25);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||S(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||$(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||A(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||C(this.mainBkg,{h:180,s:-15,l:a*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||C(this.mainBkg,{h:180,s:-15,l:a*(8+s*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||C(t,{h:64}),this.fillType3=this.fillType3||C(r,{h:64}),this.fillType4=this.fillType4||C(t,{h:-64}),this.fillType5=this.fillType5||C(r,{h:-64}),this.fillType6=this.fillType6||C(t,{h:128}),this.fillType7=this.fillType7||C(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||C(t,{l:-10}),this.pie5=this.pie5||C(r,{l:-10}),this.pie6=this.pie6||C(i,{l:-10}),this.pie7=this.pie7||C(t,{h:60,l:-10}),this.pie8=this.pie8||C(t,{h:-60,l:-10}),this.pie9=this.pie9||C(t,{h:120,l:0}),this.pie10=this.pie10||C(t,{h:60,l:-20}),this.pie11=this.pie11||C(t,{h:-60,l:-20}),this.pie12=this.pie12||C(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||C(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||C(t,{h:-30}),this.git4=this.git4||C(t,{h:-60}),this.git5=this.git5||C(t,{h:-90}),this.git6=this.git6||C(t,{h:60}),this.git7=this.git7||C(t,{h:120}),this.darkMode?(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||S(this.git0),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ee,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Me}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ai,"Theme"),ai),P0=f(e=>{const t=new D0;return t.calculate(e),t},"getThemeVariables"),si,R0=(si=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=$(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=S(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=S(this.primaryColor),this.secondaryTextColor=S(this.secondaryColor),this.tertiaryTextColor=S(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=$(S("#323D47"),10),this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor=S(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||S(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||S(this.tertiaryColor),this.lineColor=this.lineColor||S(this.background),this.arrowheadColor=this.arrowheadColor||S(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||S(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||$(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=A(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=A(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||S(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||$(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||C(this.primaryColor,{h:64}),this.fillType3=this.fillType3||C(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||C(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||C(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||C(this.primaryColor,{h:128}),this.fillType7=this.fillType7||C(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-10}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||C(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||S(this.git0),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ee,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Me}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(si,"Theme"),si),N0=f(e=>{const t=new R0;return t.calculate(e),t},"getThemeVariables"),oi,q0=(oi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||S(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||S(this.tertiaryColor),this.lineColor=this.lineColor||S(this.background),this.arrowheadColor=this.arrowheadColor||S(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||S(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=C(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||$(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||S(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||$(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||A(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||C(this.mainBkg,{h:180,s:-15,l:a*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||C(this.mainBkg,{h:180,s:-15,l:a*(8+s*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||C(t,{h:64}),this.fillType3=this.fillType3||C(r,{h:64}),this.fillType4=this.fillType4||C(t,{h:-64}),this.fillType5=this.fillType5||C(r,{h:-64}),this.fillType6=this.fillType6||C(t,{h:128}),this.fillType7=this.fillType7||C(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||C(t,{l:-10}),this.pie5=this.pie5||C(r,{l:-10}),this.pie6=this.pie6||C(i,{l:-10}),this.pie7=this.pie7||C(t,{h:60,l:-10}),this.pie8=this.pie8||C(t,{h:-60,l:-10}),this.pie9=this.pie9||C(t,{h:120,l:0}),this.pie10=this.pie10||C(t,{h:60,l:-20}),this.pie11=this.pie11||C(t,{h:-60,l:-20}),this.pie12=this.pie12||C(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||C(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||C(t,{h:-30}),this.git4=this.git4||C(t,{h:-60}),this.git5=this.git5||C(t,{h:-90}),this.git6=this.git6||C(t,{h:60}),this.git7=this.git7||C(t,{h:120}),this.darkMode?(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||S(this.git0),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ee,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Me}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(oi,"Theme"),oi),z0=f(e=>{const t=new q0;return t.calculate(e),t},"getThemeVariables"),ni,W0=(ni=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=$(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=S(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=S(this.primaryColor),this.secondaryTextColor=S(this.secondaryColor),this.tertiaryTextColor=S(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=$(S("#323D47"),10),this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor=S(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||S(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||S(this.tertiaryColor),this.lineColor=this.lineColor||S(this.background),this.arrowheadColor=this.arrowheadColor||S(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||S(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||$(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||S(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||$(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=A(this["cScale"+r],75);const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||C(this.primaryColor,{h:64}),this.fillType3=this.fillType3||C(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||C(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||C(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||C(this.primaryColor,{h:128}),this.fillType7=this.fillType7||C(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-10}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||C(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?$(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||S(this.git0),this.gitInv1=this.gitInv1||S(this.git1),this.gitInv2=this.gitInv2||S(this.git2),this.gitInv3=this.gitInv3||S(this.git3),this.gitInv4=this.gitInv4||S(this.git4),this.gitInv5=this.gitInv5||S(this.git5),this.gitInv6=this.gitInv6||S(this.git6),this.gitInv7=this.gitInv7||S(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ee,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Me}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ni,"Theme"),ni),H0=f(e=>{const t=new W0;return t.calculate(e),t},"getThemeVariables"),ze={base:{getThemeVariables:_0},dark:{getThemeVariables:S0},default:{getThemeVariables:B0},forest:{getThemeVariables:F0},neutral:{getThemeVariables:E0},neo:{getThemeVariables:$0},"neo-dark":{getThemeVariables:I0},redux:{getThemeVariables:P0},"redux-dark":{getThemeVariables:N0},"redux-color":{getThemeVariables:z0},"redux-dark-color":{getThemeVariables:H0}},ae={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},fu={...ae,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:ze.default.getThemeVariables(),sequence:{...ae.sequence,messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:f(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:f(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...ae.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ae.c4,useWidth:void 0,personFont:f(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ae.flowchart,inheritDir:!1},external_personFont:f(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:f(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:f(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:f(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:f(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:f(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:f(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:f(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:f(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:f(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:f(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:f(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:f(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:f(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:f(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:f(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:f(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:f(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:f(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:f(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...ae.pie,useWidth:984},xyChart:{...ae.xyChart,useWidth:void 0},requirement:{...ae.requirement,useWidth:void 0},packet:{...ae.packet},treeView:{...ae.treeView,useWidth:void 0},radar:{...ae.radar},ishikawa:{...ae.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...ae.venn}},gu=f((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...gu(e[i],"")]:[...r,t+i],[]),"keyify"),Y0=new Set(gu(fu,"")),mu=fu,Ja=f(e=>{if(R.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Ja(t));return}for(const t of Object.keys(e)){if(R.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Y0.has(t)||e[t]==null){R.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){R.debug("sanitizing object",t),Ja(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(R.debug("sanitizing css option",t),e[t]=j0(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}R.debug("After sanitization",e)}},"sanitizeDirective"),j0=f(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),ui=Object.freeze(mu),Ue=f(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),te=Ot({},ui),ts,Tr=[],Xi=Ot({},ui),Is=f((e,t)=>{let r=Ot({},e),i={};for(const a of t)xu(a),i=Ot(i,a);if(r=Ot(r,i),i.theme&&i.theme in ze){const a=Ot({},ts),s=Ot(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in ze&&(r.themeVariables=ze[r.theme].getThemeVariables(s))}return Xi=r,ku(Xi),Xi},"updateCurrentConfig"),U0=f(e=>(te=Ot({},ui),te=Ot(te,e),e.theme&&ze[e.theme]&&(te.themeVariables=ze[e.theme].getThemeVariables(e.themeVariables)),Is(te,Tr),te),"setSiteConfig"),G0=f(e=>{ts=Ot({},e)},"saveConfigFromInitialize"),X0=f(e=>(te=Ot(te,e),Is(te,Tr),te),"updateSiteConfig"),yu=f(()=>Ot({},te),"getSiteConfig"),Cu=f(e=>(ku(e),Ot(Xi,e),wt()),"setConfig"),wt=f(()=>Ot({},Xi),"getConfig"),xu=f(e=>{e&&(["secure",...te.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(R.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&xu(e[t])}))},"sanitize"),V0=f(e=>{Ja(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Tr.push(e),Is(te,Tr)},"addDirective"),es=f((e=te)=>{Tr=[],Is(e,Tr)},"reset"),Z0={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},bh={},bu=f(e=>{bh[e]||(R.warn(Z0[e]),bh[e]=!0)},"issueWarning"),ku=f(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&bu("LAZY_LOAD_DEPRECATED")},"checkConfig"),xA=f(()=>{let e={};ts&&(e=Ot(e,ts));for(const t of Tr)e=Ot(e,t);return e},"getUserDefinedConfig"),Zt=f(e=>(e.flowchart?.htmlLabels!=null&&bu("FLOWCHART_HTML_LABELS_DEPRECATED"),Ue(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),pa=/<br\s*\/?>/gi,K0=f(e=>e?wu(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Q0=(()=>{let e=!1;return()=>{e||(Tu(),e=!0)}})();function Tu(){const e="data-temp-href-target";ci.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),ci.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}f(Tu,"setupDompurifyHooks");var _u=f(e=>(Q0(),ci.sanitize(e)),"removeScript"),kh=f((e,t)=>{if(Zt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=_u(e):r!=="loose"&&(e=wu(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=rC(e))}return e},"sanitizeMore"),be=f((e,t)=>e&&(t.dompurifyConfig?e=ci.sanitize(kh(e,t),t.dompurifyConfig).toString():e=ci.sanitize(kh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),J0=f((e,t)=>typeof e=="string"?be(e,t):e.flat().map(r=>be(r,t)),"sanitizeTextOrArray"),tC=f(e=>pa.test(e),"hasBreaks"),eC=f(e=>e.split(pa),"splitBreaks"),rC=f(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),wu=f(e=>e.replace(pa,"#br#"),"breakToPlaceholder"),iC=f(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),aC=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),sC=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Th=f(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let a=t[i];if(a===","&&i>0&&i+1<t.length){const s=t[i-1],o=t[i+1];oC(s,o)&&(a=s+","+o,i++,r.pop())}r.push(nC(a))}return r.join("")},"parseGenericTypes"),Ho=f((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),oC=f((e,t)=>{const r=Ho(e,"~"),i=Ho(t,"~");return r===1&&i===1},"shouldCombineSets"),nC=f(e=>{const t=Ho(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let a=i.indexOf("~"),s=i.lastIndexOf("~");for(;a!==-1&&s!==-1&&a!==s;)i[a]="<",i[s]=">",a=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),_h=f(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Yo=/\$\$(.*)\$\$/g,Ji=f(e=>(e.match(Yo)?.length??0)>0,"hasKatex"),bA=f(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Su(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),lC=f(async(e,t)=>{if(!Ji(e))return e;if(!(_h()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Yo,"MathML is unsupported in this environment.");{const{default:r}=await gt(async()=>{const{default:a}=await import("./katex.DHMw6HUq.js");return{default:a}},[]),i=t.forceLegacyMathML||!_h()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(pa).map(a=>Ji(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(Yo,(a,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Su=f(async(e,t)=>be(await lC(e,t),t),"renderKatexSanitized"),fa={getRows:K0,sanitizeText:be,sanitizeTextOrArray:J0,hasBreaks:tC,splitBreaks:eC,lineBreakRegex:pa,removeScript:_u,getUrl:iC,evaluate:Ue,getMax:aC,getMin:sC},hC=f(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),cC=f(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),vu=f(function(e,t,r,i){const a=cC(t,r,i);hC(e,a)},"configureSvgSize"),uC=f(function(e,t,r,i){const a=t.node().getBBox(),s=a.width,o=a.height;R.info(`SVG bounds: ${s}x${o}`,a);let n=0,l=0;R.info(`Graph bounds: ${n}x${l}`,e),n=s+r*2,l=o+r*2,R.info(`Calculated bounds: ${n}x${l}`),vu(t,l,n,i);const c=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Ha={},dC=f((e,t,r,i)=>{let a="";return e in Ha&&Ha[e]?a=Ha[e]({...r,svgId:i}):R.warn(`No theme found for ${e}`),` & {
font-family: ${r.fontFamily};
font-size: ${r.fontSize};
fill: ${r.textColor}
}
@keyframes edge-animation-frame {
from {
stroke-dashoffset: 0;
}
}
@keyframes dash {
to {
stroke-dashoffset: 0;
}
}
& .edge-animation-slow {
stroke-dasharray: 9,5 !important;
stroke-dashoffset: 900;
animation: dash 50s linear infinite;
stroke-linecap: round;
}
& .edge-animation-fast {
stroke-dasharray: 9,5 !important;
stroke-dashoffset: 900;
animation: dash 20s linear infinite;
stroke-linecap: round;
}
/* Classes common for multiple diagrams */
& .error-icon {
fill: ${r.errorBkgColor};
}
& .error-text {
fill: ${r.errorTextColor};
stroke: ${r.errorTextColor};
}
& .edge-thickness-normal {
stroke-width: ${r.strokeWidth??1}px;
}
& .edge-thickness-thick {
stroke-width: 3.5px
}
& .edge-pattern-solid {
stroke-dasharray: 0;
}
& .edge-thickness-invisible {
stroke-width: 0;
fill: none;
}
& .edge-pattern-dashed{
stroke-dasharray: 3;
}
.edge-pattern-dotted {
stroke-dasharray: 2;
}
& .marker {
fill: ${r.lineColor};
stroke: ${r.lineColor};
}
& .marker.cross {
stroke: ${r.lineColor};
}
& svg {
font-family: ${r.fontFamily};
font-size: ${r.fontSize};
}
& p {
margin: 0
}
${a}
.node .neo-node {
stroke: ${r.nodeBorder};
}
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
}
[data-look="neo"].node path {
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
stroke-width: ${r.strokeWidth??1}px;
}
[data-look="neo"].node .outer-path {
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
}
[data-look="neo"].node .neo-line path {
stroke: ${r.nodeBorder};
filter: none;
}
[data-look="neo"].node circle{
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
}
[data-look="neo"].node circle .state-start{
fill: #000000;
}
[data-look="neo"].icon-shape .icon {
fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
}
[data-look="neo"].icon-shape .icon-neo path {
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
}
${t}
`},"getStyles"),pC=f((e,t)=>{t!==void 0&&(Ha[e]=t)},"addStylesForDiagram"),fC=dC,Bu={};Wy(Bu,{clear:()=>gC,getAccDescription:()=>xC,getAccTitle:()=>yC,getDiagramTitle:()=>kC,setAccDescription:()=>CC,setAccTitle:()=>mC,setDiagramTitle:()=>bC});var Yn="",jn="",Un="",Gn=f(e=>be(e,wt()),"sanitizeText"),gC=f(()=>{Yn="",Un="",jn=""},"clear"),mC=f(e=>{Yn=Gn(e).replace(/^\s+/g,"")},"setAccTitle"),yC=f(()=>Yn,"getAccTitle"),CC=f(e=>{Un=Gn(e).replace(/\n\s+/g,`
`)},"setAccDescription"),xC=f(()=>Un,"getAccDescription"),bC=f(e=>{jn=Gn(e)},"setDiagramTitle"),kC=f(()=>jn,"getDiagramTitle"),wh=R,TC=Wn,mt=wt,kA=Cu,TA=ui,Xn=f(e=>be(e,mt()),"sanitizeText"),_C=uC,wC=f(()=>Bu,"getCommonDb"),rs={},is=f((e,t,r)=>{rs[e]&&wh.warn(`Diagram with id ${e} already registered. Overwriting.`),rs[e]=t,r&&pu(e,r),pC(e,t.styles),t.injectUtils?.(wh,TC,mt,Xn,_C,wC(),()=>{})},"registerDiagram"),jo=f(e=>{if(e in rs)return rs[e];throw new SC(e)},"getDiagram"),li,SC=(li=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},f(li,"DiagramNotFoundError"),li),vC={value:()=>{}};function Lu(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Ya(r)}function Ya(e){this._=e}function BC(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",a=r.indexOf(".");if(a>=0&&(i=r.slice(a+1),r=r.slice(0,a)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Ya.prototype=Lu.prototype={constructor:Ya,on:function(e,t){var r=this._,i=BC(e+"",r),a,s=-1,o=i.length;if(arguments.length<2){for(;++s<o;)if((a=(e=i[s]).type)&&(a=LC(r[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<o;)if(a=(e=i[s]).type)r[a]=Sh(r[a],e.name,t);else if(t==null)for(a in r)r[a]=Sh(r[a],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Ya(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var r=new Array(a),i=0,a,s;i<a;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,a=s.length;i<a;++i)s[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],a=0,s=i.length;a<s;++a)i[a].value.apply(t,r)}};function LC(e,t){for(var r=0,i=e.length,a;r<i;++r)if((a=e[r]).name===t)return a.value}function Sh(e,t,r){for(var i=0,a=e.length;i<a;++i)if(e[i].name===t){e[i]=vC,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Uo="http://www.w3.org/1999/xhtml";const vh={svg:"http://www.w3.org/2000/svg",xhtml:Uo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ds(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),vh.hasOwnProperty(t)?{space:vh[t],local:e}:e}function FC(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Uo&&t.documentElement.namespaceURI===Uo?t.createElement(e):t.createElementNS(r,e)}}function AC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Fu(e){var t=Ds(e);return(t.local?AC:FC)(t)}function EC(){}function Vn(e){return e==null?EC:function(){return this.querySelector(e)}}function MC(e){typeof e!="function"&&(e=Vn(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var s=t[a],o=s.length,n=i[a]=new Array(o),l,c,h=0;h<o;++h)(l=s[h])&&(c=e.call(l,l.__data__,h,s))&&("__data__"in l&&(c.__data__=l.__data__),n[h]=c);return new oe(i,this._parents)}function $C(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function OC(){return[]}function Au(e){return e==null?OC:function(){return this.querySelectorAll(e)}}function IC(e){return function(){return $C(e.apply(this,arguments))}}function DC(e){typeof e=="function"?e=IC(e):e=Au(e);for(var t=this._groups,r=t.length,i=[],a=[],s=0;s<r;++s)for(var o=t[s],n=o.length,l,c=0;c<n;++c)(l=o[c])&&(i.push(e.call(l,l.__data__,c,o)),a.push(l));return new oe(i,a)}function Eu(e){return function(){return this.matches(e)}}function Mu(e){return function(t){return t.matches(e)}}var PC=Array.prototype.find;function RC(e){return function(){return PC.call(this.children,e)}}function NC(){return this.firstElementChild}function qC(e){return this.select(e==null?NC:RC(typeof e=="function"?e:Mu(e)))}var zC=Array.prototype.filter;function WC(){return Array.from(this.children)}function HC(e){return function(){return zC.call(this.children,e)}}function YC(e){return this.selectAll(e==null?WC:HC(typeof e=="function"?e:Mu(e)))}function jC(e){typeof e!="function"&&(e=Eu(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var s=t[a],o=s.length,n=i[a]=[],l,c=0;c<o;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&n.push(l);return new oe(i,this._parents)}function $u(e){return new Array(e.length)}function UC(){return new oe(this._enter||this._groups.map($u),this._parents)}function as(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}as.prototype={constructor:as,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function GC(e){return function(){return e}}function XC(e,t,r,i,a,s){for(var o=0,n,l=t.length,c=s.length;o<c;++o)(n=t[o])?(n.__data__=s[o],i[o]=n):r[o]=new as(e,s[o]);for(;o<l;++o)(n=t[o])&&(a[o]=n)}function VC(e,t,r,i,a,s,o){var n,l,c=new Map,h=t.length,u=s.length,p=new Array(h),d;for(n=0;n<h;++n)(l=t[n])&&(p[n]=d=o.call(l,l.__data__,n,t)+"",c.has(d)?a[n]=l:c.set(d,l));for(n=0;n<u;++n)d=o.call(e,s[n],n,s)+"",(l=c.get(d))?(i[n]=l,l.__data__=s[n],c.delete(d)):r[n]=new as(e,s[n]);for(n=0;n<h;++n)(l=t[n])&&c.get(p[n])===l&&(a[n]=l)}function ZC(e){return e.__data__}function KC(e,t){if(!arguments.length)return Array.from(this,ZC);var r=t?VC:XC,i=this._parents,a=this._groups;typeof e!="function"&&(e=GC(e));for(var s=a.length,o=new Array(s),n=new Array(s),l=new Array(s),c=0;c<s;++c){var h=i[c],u=a[c],p=u.length,d=QC(e.call(h,h&&h.__data__,c,i)),g=d.length,m=n[c]=new Array(g),y=o[c]=new Array(g),x=l[c]=new Array(p);r(h,u,m,y,x,d,t);for(var b=0,k=0,_,w;b<g;++b)if(_=m[b]){for(b>=k&&(k=b+1);!(w=y[k])&&++k<g;);_._next=w||null}}return o=new oe(o,i),o._enter=n,o._exit=l,o}function QC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function JC(){return new oe(this._exit||this._groups.map($u),this._parents)}function tx(e,t,r){var i=this.enter(),a=this,s=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),r==null?s.remove():r(s),i&&a?i.merge(a).order():a}function ex(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,a=r.length,s=i.length,o=Math.min(a,s),n=new Array(a),l=0;l<o;++l)for(var c=r[l],h=i[l],u=c.length,p=n[l]=new Array(u),d,g=0;g<u;++g)(d=c[g]||h[g])&&(p[g]=d);for(;l<a;++l)n[l]=r[l];return new oe(n,this._parents)}function rx(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],a=i.length-1,s=i[a],o;--a>=0;)(o=i[a])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function ix(e){e||(e=ax);function t(u,p){return u&&p?e(u.__data__,p.__data__):!u-!p}for(var r=this._groups,i=r.length,a=new Array(i),s=0;s<i;++s){for(var o=r[s],n=o.length,l=a[s]=new Array(n),c,h=0;h<n;++h)(c=o[h])&&(l[h]=c);l.sort(t)}return new oe(a,this._parents).order()}function ax(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function sx(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function ox(){return Array.from(this)}function nx(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],a=0,s=i.length;a<s;++a){var o=i[a];if(o)return o}return null}function lx(){let e=0;for(const t of this)++e;return e}function hx(){return!this.node()}function cx(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var a=t[r],s=0,o=a.length,n;s<o;++s)(n=a[s])&&e.call(n,n.__data__,s,a);return this}function ux(e){return function(){this.removeAttribute(e)}}function dx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function px(e,t){return function(){this.setAttribute(e,t)}}function fx(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function gx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function mx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function yx(e,t){var r=Ds(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?dx:ux:typeof t=="function"?r.local?mx:gx:r.local?fx:px)(r,t))}function Ou(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Cx(e){return function(){this.style.removeProperty(e)}}function xx(e,t,r){return function(){this.style.setProperty(e,t,r)}}function bx(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function kx(e,t,r){return arguments.length>1?this.each((t==null?Cx:typeof t=="function"?bx:xx)(e,t,r??"")):di(this.node(),e)}function di(e,t){return e.style.getPropertyValue(t)||Ou(e).getComputedStyle(e,null).getPropertyValue(t)}function Tx(e){return function(){delete this[e]}}function _x(e,t){return function(){this[e]=t}}function wx(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Sx(e,t){return arguments.length>1?this.each((t==null?Tx:typeof t=="function"?wx:_x)(e,t)):this.node()[e]}function Iu(e){return e.trim().split(/^|\s+/)}function Zn(e){return e.classList||new Du(e)}function Du(e){this._node=e,this._names=Iu(e.getAttribute("class")||"")}Du.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Pu(e,t){for(var r=Zn(e),i=-1,a=t.length;++i<a;)r.add(t[i])}function Ru(e,t){for(var r=Zn(e),i=-1,a=t.length;++i<a;)r.remove(t[i])}function vx(e){return function(){Pu(this,e)}}function Bx(e){return function(){Ru(this,e)}}function Lx(e,t){return function(){(t.apply(this,arguments)?Pu:Ru)(this,e)}}function Fx(e,t){var r=Iu(e+"");if(arguments.length<2){for(var i=Zn(this.node()),a=-1,s=r.length;++a<s;)if(!i.contains(r[a]))return!1;return!0}return this.each((typeof t=="function"?Lx:t?vx:Bx)(r,t))}function Ax(){this.textContent=""}function Ex(e){return function(){this.textContent=e}}function Mx(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function $x(e){return arguments.length?this.each(e==null?Ax:(typeof e=="function"?Mx:Ex)(e)):this.node().textContent}function Ox(){this.innerHTML=""}function Ix(e){return function(){this.innerHTML=e}}function Dx(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Px(e){return arguments.length?this.each(e==null?Ox:(typeof e=="function"?Dx:Ix)(e)):this.node().innerHTML}function Rx(){this.nextSibling&&this.parentNode.appendChild(this)}function Nx(){return this.each(Rx)}function qx(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function zx(){return this.each(qx)}function Wx(e){var t=typeof e=="function"?e:Fu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Hx(){return null}function Yx(e,t){var r=typeof e=="function"?e:Fu(e),i=t==null?Hx:typeof t=="function"?t:Vn(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function jx(){var e=this.parentNode;e&&e.removeChild(this)}function Ux(){return this.each(jx)}function Gx(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Xx(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Vx(e){return this.select(e?Xx:Gx)}function Zx(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Kx(e){return function(t){e.call(this,t,this.__data__)}}function Qx(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function Jx(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,a=t.length,s;r<a;++r)s=t[r],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++i]=s;++i?t.length=i:delete this.__on}}}function tb(e,t,r){return function(){var i=this.__on,a,s=Kx(t);if(i){for(var o=0,n=i.length;o<n;++o)if((a=i[o]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=s,a.options=r),a.value=t;return}}this.addEventListener(e.type,s,r),a={type:e.type,name:e.name,value:t,listener:s,options:r},i?i.push(a):this.__on=[a]}}function eb(e,t,r){var i=Qx(e+""),a,s=i.length,o;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,c=n.length,h;l<c;++l)for(a=0,h=n[l];a<s;++a)if((o=i[a]).type===h.type&&o.name===h.name)return h.value}return}for(n=t?tb:Jx,a=0;a<s;++a)this.each(n(i[a],t,r));return this}function Nu(e,t,r){var i=Ou(e),a=i.CustomEvent;typeof a=="function"?a=new a(t,r):(a=i.document.createEvent("Event"),r?(a.initEvent(t,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}function rb(e,t){return function(){return Nu(this,e,t)}}function ib(e,t){return function(){return Nu(this,e,t.apply(this,arguments))}}function ab(e,t){return this.each((typeof t=="function"?ib:rb)(e,t))}function*sb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],a=0,s=i.length,o;a<s;++a)(o=i[a])&&(yield o)}var qu=[null];function oe(e,t){this._groups=e,this._parents=t}function ga(){return new oe([[document.documentElement]],qu)}function ob(){return this}oe.prototype=ga.prototype={constructor:oe,select:MC,selectAll:DC,selectChild:qC,selectChildren:YC,filter:jC,data:KC,enter:UC,exit:JC,join:tx,merge:ex,selection:ob,order:rx,sort:ix,call:sx,nodes:ox,node:nx,size:lx,empty:hx,each:cx,attr:yx,style:kx,property:Sx,classed:Fx,text:$x,html:Px,raise:Nx,lower:zx,append:Wx,insert:Yx,remove:Ux,clone:Vx,datum:Zx,on:eb,dispatch:ab,[Symbol.iterator]:sb};function ct(e){return typeof e=="string"?new oe([[document.querySelector(e)]],[document.documentElement]):new oe([[e]],qu)}function Kn(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function zu(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function ma(){}var ta=.7,ss=1/ta,Xr="\\s*([+-]?\\d+)\\s*",ea="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Le="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",nb=/^#([0-9a-f]{3,8})$/,lb=new RegExp(`^rgb\\(${Xr},${Xr},${Xr}\\)$`),hb=new RegExp(`^rgb\\(${Le},${Le},${Le}\\)$`),cb=new RegExp(`^rgba\\(${Xr},${Xr},${Xr},${ea}\\)$`),ub=new RegExp(`^rgba\\(${Le},${Le},${Le},${ea}\\)$`),db=new RegExp(`^hsl\\(${ea},${Le},${Le}\\)$`),pb=new RegExp(`^hsla\\(${ea},${Le},${Le},${ea}\\)$`),Bh={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Kn(ma,ra,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Lh,formatHex:Lh,formatHex8:fb,formatHsl:gb,formatRgb:Fh,toString:Fh});function Lh(){return this.rgb().formatHex()}function fb(){return this.rgb().formatHex8()}function gb(){return Wu(this).formatHsl()}function Fh(){return this.rgb().formatRgb()}function ra(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=nb.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Ah(t):r===3?new re(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Aa(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Aa(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=lb.exec(e))?new re(t[1],t[2],t[3],1):(t=hb.exec(e))?new re(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=cb.exec(e))?Aa(t[1],t[2],t[3],t[4]):(t=ub.exec(e))?Aa(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=db.exec(e))?$h(t[1],t[2]/100,t[3]/100,1):(t=pb.exec(e))?$h(t[1],t[2]/100,t[3]/100,t[4]):Bh.hasOwnProperty(e)?Ah(Bh[e]):e==="transparent"?new re(NaN,NaN,NaN,0):null}function Ah(e){return new re(e>>16&255,e>>8&255,e&255,1)}function Aa(e,t,r,i){return i<=0&&(e=t=r=NaN),new re(e,t,r,i)}function mb(e){return e instanceof ma||(e=ra(e)),e?(e=e.rgb(),new re(e.r,e.g,e.b,e.opacity)):new re}function Go(e,t,r,i){return arguments.length===1?mb(e):new re(e,t,r,i??1)}function re(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Kn(re,Go,zu(ma,{brighter(e){return e=e==null?ss:Math.pow(ss,e),new re(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ta:Math.pow(ta,e),new re(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new re(xr(this.r),xr(this.g),xr(this.b),os(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Eh,formatHex:Eh,formatHex8:yb,formatRgb:Mh,toString:Mh}));function Eh(){return`#${mr(this.r)}${mr(this.g)}${mr(this.b)}`}function yb(){return`#${mr(this.r)}${mr(this.g)}${mr(this.b)}${mr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Mh(){const e=os(this.opacity);return`${e===1?"rgb(":"rgba("}${xr(this.r)}, ${xr(this.g)}, ${xr(this.b)}${e===1?")":`, ${e})`}`}function os(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function mr(e){return e=xr(e),(e<16?"0":"")+e.toString(16)}function $h(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new me(e,t,r,i)}function Wu(e){if(e instanceof me)return new me(e.h,e.s,e.l,e.opacity);if(e instanceof ma||(e=ra(e)),!e)return new me;if(e instanceof me)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,a=Math.min(t,r,i),s=Math.max(t,r,i),o=NaN,n=s-a,l=(s+a)/2;return n?(t===s?o=(r-i)/n+(r<i)*6:r===s?o=(i-t)/n+2:o=(t-r)/n+4,n/=l<.5?s+a:2-s-a,o*=60):n=l>0&&l<1?0:o,new me(o,n,l,e.opacity)}function Cb(e,t,r,i){return arguments.length===1?Wu(e):new me(e,t,r,i??1)}function me(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Kn(me,Cb,zu(ma,{brighter(e){return e=e==null?ss:Math.pow(ss,e),new me(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ta:Math.pow(ta,e),new me(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,a=2*r-i;return new re(_o(e>=240?e-240:e+120,a,i),_o(e,a,i),_o(e<120?e+240:e-120,a,i),this.opacity)},clamp(){return new me(Oh(this.h),Ea(this.s),Ea(this.l),os(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=os(this.opacity);return`${e===1?"hsl(":"hsla("}${Oh(this.h)}, ${Ea(this.s)*100}%, ${Ea(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Oh(e){return e=(e||0)%360,e<0?e+360:e}function Ea(e){return Math.max(0,Math.min(1,e||0))}function _o(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Qn=e=>()=>e;function Hu(e,t){return function(r){return e+r*t}}function xb(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function _A(e,t){var r=t-e;return r?Hu(e,r>180||r<-180?r-360*Math.round(r/360):r):Qn(isNaN(e)?t:e)}function bb(e){return(e=+e)==1?Yu:function(t,r){return r-t?xb(t,r,e):Qn(isNaN(t)?r:t)}}function Yu(e,t){var r=t-e;return r?Hu(e,r):Qn(isNaN(e)?t:e)}const Ih=(function e(t){var r=bb(t);function i(a,s){var o=r((a=Go(a)).r,(s=Go(s)).r),n=r(a.g,s.g),l=r(a.b,s.b),c=Yu(a.opacity,s.opacity);return function(h){return a.r=o(h),a.g=n(h),a.b=l(h),a.opacity=c(h),a+""}}return i.gamma=e,i})(1);function Ke(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Xo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,wo=new RegExp(Xo.source,"g");function kb(e){return function(){return e}}function Tb(e){return function(t){return e(t)+""}}function _b(e,t){var r=Xo.lastIndex=wo.lastIndex=0,i,a,s,o=-1,n=[],l=[];for(e=e+"",t=t+"";(i=Xo.exec(e))&&(a=wo.exec(t));)(s=a.index)>r&&(s=t.slice(r,s),n[o]?n[o]+=s:n[++o]=s),(i=i[0])===(a=a[0])?n[o]?n[o]+=a:n[++o]=a:(n[++o]=null,l.push({i:o,x:Ke(i,a)})),r=wo.lastIndex;return r<t.length&&(s=t.slice(r),n[o]?n[o]+=s:n[++o]=s),n.length<2?l[0]?Tb(l[0].x):kb(t):(t=l.length,function(c){for(var h=0,u;h<t;++h)n[(u=l[h]).i]=u.x(c);return n.join("")})}var Dh=180/Math.PI,Vo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ju(e,t,r,i,a,s){var o,n,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,l/=n),e*i<t*r&&(e=-e,t=-t,l=-l,o=-o),{translateX:a,translateY:s,rotate:Math.atan2(t,e)*Dh,skewX:Math.atan(l)*Dh,scaleX:o,scaleY:n}}var Ma;function wb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Vo:ju(t.a,t.b,t.c,t.d,t.e,t.f)}function Sb(e){return e==null||(Ma||(Ma=document.createElementNS("http://www.w3.org/2000/svg","g")),Ma.setAttribute("transform",e),!(e=Ma.transform.baseVal.consolidate()))?Vo:(e=e.matrix,ju(e.a,e.b,e.c,e.d,e.e,e.f))}function Uu(e,t,r,i){function a(c){return c.length?c.pop()+" ":""}function s(c,h,u,p,d,g){if(c!==u||h!==p){var m=d.push("translate(",null,t,null,r);g.push({i:m-4,x:Ke(c,u)},{i:m-2,x:Ke(h,p)})}else(u||p)&&d.push("translate("+u+t+p+r)}function o(c,h,u,p){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),p.push({i:u.push(a(u)+"rotate(",null,i)-2,x:Ke(c,h)})):h&&u.push(a(u)+"rotate("+h+i)}function n(c,h,u,p){c!==h?p.push({i:u.push(a(u)+"skewX(",null,i)-2,x:Ke(c,h)}):h&&u.push(a(u)+"skewX("+h+i)}function l(c,h,u,p,d,g){if(c!==u||h!==p){var m=d.push(a(d)+"scale(",null,",",null,")");g.push({i:m-4,x:Ke(c,u)},{i:m-2,x:Ke(h,p)})}else(u!==1||p!==1)&&d.push(a(d)+"scale("+u+","+p+")")}return function(c,h){var u=[],p=[];return c=e(c),h=e(h),s(c.translateX,c.translateY,h.translateX,h.translateY,u,p),o(c.rotate,h.rotate,u,p),n(c.skewX,h.skewX,u,p),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,p),c=h=null,function(d){for(var g=-1,m=p.length,y;++g<m;)u[(y=p[g]).i]=y.x(d);return u.join("")}}}var vb=Uu(wb,"px, ","px)","deg)"),Bb=Uu(Sb,", ",")",")"),pi=0,Ni=0,Fi=0,Gu=1e3,ns,qi,ls=0,_r=0,Ps=0,ia=typeof performance=="object"&&performance.now?performance:Date,Xu=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Jn(){return _r||(Xu(Lb),_r=ia.now()+Ps)}function Lb(){_r=0}function hs(){this._call=this._time=this._next=null}hs.prototype=Vu.prototype={constructor:hs,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Jn():+r)+(t==null?0:+t),!this._next&&qi!==this&&(qi?qi._next=this:ns=this,qi=this),this._call=e,this._time=r,Zo()},stop:function(){this._call&&(this._call=null,this._time=1/0,Zo())}};function Vu(e,t,r){var i=new hs;return i.restart(e,t,r),i}function Fb(){Jn(),++pi;for(var e=ns,t;e;)(t=_r-e._time)>=0&&e._call.call(void 0,t),e=e._next;--pi}function Ph(){_r=(ls=ia.now())+Ps,pi=Ni=0;try{Fb()}finally{pi=0,Eb(),_r=0}}function Ab(){var e=ia.now(),t=e-ls;t>Gu&&(Ps-=t,ls=e)}function Eb(){for(var e,t=ns,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:ns=r);qi=e,Zo(i)}function Zo(e){if(!pi){Ni&&(Ni=clearTimeout(Ni));var t=e-_r;t>24?(e<1/0&&(Ni=setTimeout(Ph,e-ia.now()-Ps)),Fi&&(Fi=clearInterval(Fi))):(Fi||(ls=ia.now(),Fi=setInterval(Ab,Gu)),pi=1,Xu(Ph))}}function Rh(e,t,r){var i=new hs;return t=t==null?0:+t,i.restart(a=>{i.stop(),e(a+t)},t,r),i}var Mb=Lu("start","end","cancel","interrupt"),$b=[],Zu=0,Nh=1,Ko=2,ja=3,qh=4,Qo=5,Ua=6;function Rs(e,t,r,i,a,s){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;Ob(e,r,{name:t,index:i,group:a,on:Mb,tween:$b,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Zu})}function tl(e,t){var r=Te(e,t);if(r.state>Zu)throw new Error("too late; already scheduled");return r}function $e(e,t){var r=Te(e,t);if(r.state>ja)throw new Error("too late; already running");return r}function Te(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Ob(e,t,r){var i=e.__transition,a;i[t]=r,r.timer=Vu(s,0,r.time);function s(c){r.state=Nh,r.timer.restart(o,r.delay,r.time),r.delay<=c&&o(c-r.delay)}function o(c){var h,u,p,d;if(r.state!==Nh)return l();for(h in i)if(d=i[h],d.name===r.name){if(d.state===ja)return Rh(o);d.state===qh?(d.state=Ua,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[h]):+h<t&&(d.state=Ua,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[h])}if(Rh(function(){r.state===ja&&(r.state=qh,r.timer.restart(n,r.delay,r.time),n(c))}),r.state=Ko,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Ko){for(r.state=ja,a=new Array(p=r.tween.length),h=0,u=-1;h<p;++h)(d=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(a[++u]=d);a.length=u+1}}function n(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=Qo,1),u=-1,p=a.length;++u<p;)a[u].call(e,h);r.state===Qo&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Ua,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function Ib(e,t){var r=e.__transition,i,a,s=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){s=!1;continue}a=i.state>Ko&&i.state<Qo,i.state=Ua,i.timer.stop(),i.on.call(a?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}s&&delete e.__transition}}function Db(e){return this.each(function(){Ib(this,e)})}function Pb(e,t){var r,i;return function(){var a=$e(this,e),s=a.tween;if(s!==r){i=r=s;for(var o=0,n=i.length;o<n;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}a.tween=i}}function Rb(e,t,r){var i,a;if(typeof r!="function")throw new Error;return function(){var s=$e(this,e),o=s.tween;if(o!==i){a=(i=o).slice();for(var n={name:t,value:r},l=0,c=a.length;l<c;++l)if(a[l].name===t){a[l]=n;break}l===c&&a.push(n)}s.tween=a}}function Nb(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Te(this.node(),r).tween,a=0,s=i.length,o;a<s;++a)if((o=i[a]).name===e)return o.value;return null}return this.each((t==null?Pb:Rb)(r,e,t))}function el(e,t,r){var i=e._id;return e.each(function(){var a=$e(this,i);(a.value||(a.value={}))[t]=r.apply(this,arguments)}),function(a){return Te(a,i).value[t]}}function Ku(e,t){var r;return(typeof t=="number"?Ke:t instanceof ra?Ih:(r=ra(t))?(t=r,Ih):_b)(e,t)}function qb(e){return function(){this.removeAttribute(e)}}function zb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Wb(e,t,r){var i,a=r+"",s;return function(){var o=this.getAttribute(e);return o===a?null:o===i?s:s=t(i=o,r)}}function Hb(e,t,r){var i,a=r+"",s;return function(){var o=this.getAttributeNS(e.space,e.local);return o===a?null:o===i?s:s=t(i=o,r)}}function Yb(e,t,r){var i,a,s;return function(){var o,n=r(this),l;return n==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=n+"",o===l?null:o===i&&l===a?s:(a=l,s=t(i=o,n)))}}function jb(e,t,r){var i,a,s;return function(){var o,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=n+"",o===l?null:o===i&&l===a?s:(a=l,s=t(i=o,n)))}}function Ub(e,t){var r=Ds(e),i=r==="transform"?Bb:Ku;return this.attrTween(e,typeof t=="function"?(r.local?jb:Yb)(r,i,el(this,"attr."+e,t)):t==null?(r.local?zb:qb)(r):(r.local?Hb:Wb)(r,i,t))}function Gb(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Xb(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Vb(e,t){var r,i;function a(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&Xb(e,s)),r}return a._value=t,a}function Zb(e,t){var r,i;function a(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&Gb(e,s)),r}return a._value=t,a}function Kb(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Ds(e);return this.tween(r,(i.local?Vb:Zb)(i,t))}function Qb(e,t){return function(){tl(this,e).delay=+t.apply(this,arguments)}}function Jb(e,t){return t=+t,function(){tl(this,e).delay=t}}function t1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Qb:Jb)(t,e)):Te(this.node(),t).delay}function e1(e,t){return function(){$e(this,e).duration=+t.apply(this,arguments)}}function r1(e,t){return t=+t,function(){$e(this,e).duration=t}}function i1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?e1:r1)(t,e)):Te(this.node(),t).duration}function a1(e,t){if(typeof t!="function")throw new Error;return function(){$e(this,e).ease=t}}function s1(e){var t=this._id;return arguments.length?this.each(a1(t,e)):Te(this.node(),t).ease}function o1(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;$e(this,e).ease=r}}function n1(e){if(typeof e!="function")throw new Error;return this.each(o1(this._id,e))}function l1(e){typeof e!="function"&&(e=Eu(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var s=t[a],o=s.length,n=i[a]=[],l,c=0;c<o;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&n.push(l);return new He(i,this._parents,this._name,this._id)}function h1(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,a=r.length,s=Math.min(i,a),o=new Array(i),n=0;n<s;++n)for(var l=t[n],c=r[n],h=l.length,u=o[n]=new Array(h),p,d=0;d<h;++d)(p=l[d]||c[d])&&(u[d]=p);for(;n<i;++n)o[n]=t[n];return new He(o,this._parents,this._name,this._id)}function c1(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function u1(e,t,r){var i,a,s=c1(t)?tl:$e;return function(){var o=s(this,e),n=o.on;n!==i&&(a=(i=n).copy()).on(t,r),o.on=a}}function d1(e,t){var r=this._id;return arguments.length<2?Te(this.node(),r).on.on(e):this.each(u1(r,e,t))}function p1(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function f1(){return this.on("end.remove",p1(this._id))}function g1(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Vn(e));for(var i=this._groups,a=i.length,s=new Array(a),o=0;o<a;++o)for(var n=i[o],l=n.length,c=s[o]=new Array(l),h,u,p=0;p<l;++p)(h=n[p])&&(u=e.call(h,h.__data__,p,n))&&("__data__"in h&&(u.__data__=h.__data__),c[p]=u,Rs(c[p],t,r,p,c,Te(h,r)));return new He(s,this._parents,t,r)}function m1(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Au(e));for(var i=this._groups,a=i.length,s=[],o=[],n=0;n<a;++n)for(var l=i[n],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var p=e.call(h,h.__data__,u,l),d,g=Te(h,r),m=0,y=p.length;m<y;++m)(d=p[m])&&Rs(d,t,r,m,p,g);s.push(p),o.push(h)}return new He(s,o,t,r)}var y1=ga.prototype.constructor;function C1(){return new y1(this._groups,this._parents)}function x1(e,t){var r,i,a;return function(){var s=di(this,e),o=(this.style.removeProperty(e),di(this,e));return s===o?null:s===r&&o===i?a:a=t(r=s,i=o)}}function Qu(e){return function(){this.style.removeProperty(e)}}function b1(e,t,r){var i,a=r+"",s;return function(){var o=di(this,e);return o===a?null:o===i?s:s=t(i=o,r)}}function k1(e,t,r){var i,a,s;return function(){var o=di(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),di(this,e))),o===l?null:o===i&&l===a?s:(a=l,s=t(i=o,n))}}function T1(e,t){var r,i,a,s="style."+t,o="end."+s,n;return function(){var l=$e(this,e),c=l.on,h=l.value[s]==null?n||(n=Qu(t)):void 0;(c!==r||a!==h)&&(i=(r=c).copy()).on(o,a=h),l.on=i}}function _1(e,t,r){var i=(e+="")=="transform"?vb:Ku;return t==null?this.styleTween(e,x1(e,i)).on("end.style."+e,Qu(e)):typeof t=="function"?this.styleTween(e,k1(e,i,el(this,"style."+e,t))).each(T1(this._id,e)):this.styleTween(e,b1(e,i,t),r).on("end.style."+e,null)}function w1(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function S1(e,t,r){var i,a;function s(){var o=t.apply(this,arguments);return o!==a&&(i=(a=o)&&w1(e,o,r)),i}return s._value=t,s}function v1(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,S1(e,t,r??""))}function B1(e){return function(){this.textContent=e}}function L1(e){return function(){var t=e(this);this.textContent=t??""}}function F1(e){return this.tween("text",typeof e=="function"?L1(el(this,"text",e)):B1(e==null?"":e+""))}function A1(e){return function(t){this.textContent=e.call(this,t)}}function E1(e){var t,r;function i(){var a=e.apply(this,arguments);return a!==r&&(t=(r=a)&&A1(a)),t}return i._value=e,i}function M1(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,E1(e))}function $1(){for(var e=this._name,t=this._id,r=Ju(),i=this._groups,a=i.length,s=0;s<a;++s)for(var o=i[s],n=o.length,l,c=0;c<n;++c)if(l=o[c]){var h=Te(l,t);Rs(l,e,r,c,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new He(i,this._parents,e,r)}function O1(){var e,t,r=this,i=r._id,a=r.size();return new Promise(function(s,o){var n={value:o},l={value:function(){--a===0&&s()}};r.each(function(){var c=$e(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(l)),c.on=t}),a===0&&s()})}var I1=0;function He(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Ju(){return++I1}var Re=ga.prototype;He.prototype={constructor:He,select:g1,selectAll:m1,selectChild:Re.selectChild,selectChildren:Re.selectChildren,filter:l1,merge:h1,selection:C1,transition:$1,call:Re.call,nodes:Re.nodes,node:Re.node,size:Re.size,empty:Re.empty,each:Re.each,on:d1,attr:Ub,attrTween:Kb,style:_1,styleTween:v1,text:F1,textTween:M1,remove:f1,tween:Nb,delay:t1,duration:i1,ease:s1,easeVarying:n1,end:O1,[Symbol.iterator]:Re[Symbol.iterator]};function D1(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var P1={time:null,delay:0,duration:250,ease:D1};function R1(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function N1(e){var t,r;e instanceof He?(t=e._id,e=e._name):(t=Ju(),(r=P1).time=Jn(),e=e==null?null:e+"");for(var i=this._groups,a=i.length,s=0;s<a;++s)for(var o=i[s],n=o.length,l,c=0;c<n;++c)(l=o[c])&&Rs(l,e,t,c,o,r||R1(l,t));return new He(i,this._parents,e,t)}ga.prototype.interrupt=Db;ga.prototype.transition=N1;const Jo=Math.PI,tn=2*Jo,dr=1e-6,q1=tn-dr;function td(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function z1(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return td;const r=10**t;return function(i){this._+=i[0];for(let a=1,s=i.length;a<s;++a)this._+=Math.round(arguments[a]*r)/r+i[a]}}class W1{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?td:z1(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,a){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+a}`}bezierCurveTo(t,r,i,a,s,o){this._append`C${+t},${+r},${+i},${+a},${this._x1=+s},${this._y1=+o}`}arcTo(t,r,i,a,s){if(t=+t,r=+r,i=+i,a=+a,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,n=this._y1,l=i-t,c=a-r,h=o-t,u=n-r,p=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>dr)if(!(Math.abs(u*l-c*h)>dr)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-o,g=a-n,m=l*l+c*c,y=d*d+g*g,x=Math.sqrt(m),b=Math.sqrt(p),k=s*Math.tan((Jo-Math.acos((m+p-y)/(2*x*b)))/2),_=k/b,w=k/x;Math.abs(_-1)>dr&&this._append`L${t+_*h},${r+_*u}`,this._append`A${s},${s},0,0,${+(u*d>h*g)},${this._x1=t+w*l},${this._y1=r+w*c}`}}arc(t,r,i,a,s,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(a),l=i*Math.sin(a),c=t+n,h=r+l,u=1^o,p=o?a-s:s-a;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>dr||Math.abs(this._y1-h)>dr)&&this._append`L${c},${h}`,i&&(p<0&&(p=p%tn+tn),p>q1?this._append`A${i},${i},0,1,${u},${t-n},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:p>dr&&this._append`A${i},${i},0,${+(p>=Jo)},${u},${this._x1=t+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(t,r,i,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+a}h${-i}Z`}toString(){return this._}}function Rr(e){return function(){return e}}const wA=Math.abs,SA=Math.atan2,vA=Math.cos,BA=Math.max,LA=Math.min,FA=Math.sin,AA=Math.sqrt,zh=1e-12,rl=Math.PI,Wh=rl/2,EA=2*rl;function MA(e){return e>1?0:e<-1?rl:Math.acos(e)}function $A(e){return e>=1?Wh:e<=-1?-Wh:Math.asin(e)}function H1(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new W1(t)}function Y1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ed(e){this._context=e}ed.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Vi(e){return new ed(e)}function j1(e){return e[0]}function U1(e){return e[1]}function G1(e,t){var r=Rr(!0),i=null,a=Vi,s=null,o=H1(n);e=typeof e=="function"?e:e===void 0?j1:Rr(e),t=typeof t=="function"?t:t===void 0?U1:Rr(t);function n(l){var c,h=(l=Y1(l)).length,u,p=!1,d;for(i==null&&(s=a(d=o())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===p&&((p=!p)?s.lineStart():s.lineEnd()),p&&s.point(+e(u,c,l),+t(u,c,l));if(d)return s=null,d+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:Rr(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Rr(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Rr(!!l),n):r},n.curve=function(l){return arguments.length?(a=l,i!=null&&(s=a(i)),n):a},n.context=function(l){return arguments.length?(l==null?i=s=null:s=a(i=l),n):i},n}class rd{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function id(e){return new rd(e,!0)}function ad(e){return new rd(e,!1)}function rr(){}function cs(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Ns(e){this._context=e}Ns.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:cs(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:cs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function en(e){return new Ns(e)}function sd(e){this._context=e}sd.prototype={areaStart:rr,areaEnd:rr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:cs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function X1(e){return new sd(e)}function od(e){this._context=e}od.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:cs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function V1(e){return new od(e)}function nd(e,t){this._basis=new Ns(e),this._beta=t}nd.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],a=t[0],s=e[r]-i,o=t[r]-a,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*s),this._beta*t[n]+(1-this._beta)*(a+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Z1=(function e(t){function r(i){return t===1?new Ns(i):new nd(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function us(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function il(e,t){this._context=e,this._k=(1-t)/6}il.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:us(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:us(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ld=(function e(t){function r(i){return new il(i,t)}return r.tension=function(i){return e(+i)},r})(0);function al(e,t){this._context=e,this._k=(1-t)/6}al.prototype={areaStart:rr,areaEnd:rr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:us(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const K1=(function e(t){function r(i){return new al(i,t)}return r.tension=function(i){return e(+i)},r})(0);function sl(e,t){this._context=e,this._k=(1-t)/6}sl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:us(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Q1=(function e(t){function r(i){return new sl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function ol(e,t,r){var i=e._x1,a=e._y1,s=e._x2,o=e._y2;if(e._l01_a>zh){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,a=(a*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>zh){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,a,s,o,e._x2,e._y2)}function hd(e,t){this._context=e,this._alpha=t}hd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:ol(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const cd=(function e(t){function r(i){return t?new hd(i,t):new il(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function ud(e,t){this._context=e,this._alpha=t}ud.prototype={areaStart:rr,areaEnd:rr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ol(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const J1=(function e(t){function r(i){return t?new ud(i,t):new al(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function dd(e,t){this._context=e,this._alpha=t}dd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ol(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const tk=(function e(t){function r(i){return t?new dd(i,t):new sl(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function pd(e){this._context=e}pd.prototype={areaStart:rr,areaEnd:rr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function ek(e){return new pd(e)}function Hh(e){return e<0?-1:1}function Yh(e,t,r){var i=e._x1-e._x0,a=t-e._x1,s=(e._y1-e._y0)/(i||a<0&&-0),o=(r-e._y1)/(a||i<0&&-0),n=(s*a+o*i)/(i+a);return(Hh(s)+Hh(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(n))||0}function jh(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function So(e,t,r){var i=e._x0,a=e._y0,s=e._x1,o=e._y1,n=(s-i)/3;e._context.bezierCurveTo(i+n,a+n*t,s-n,o-n*r,s,o)}function ds(e){this._context=e}ds.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:So(this,this._t0,jh(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,So(this,jh(this,r=Yh(this,e,t)),r);break;default:So(this,this._t0,r=Yh(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function fd(e){this._context=new gd(e)}(fd.prototype=Object.create(ds.prototype)).point=function(e,t){ds.prototype.point.call(this,t,e)};function gd(e){this._context=e}gd.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,a,s){this._context.bezierCurveTo(t,e,i,r,s,a)}};function md(e){return new ds(e)}function yd(e){return new fd(e)}function Cd(e){this._context=e}Cd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Uh(e),a=Uh(t),s=0,o=1;o<r;++s,++o)this._context.bezierCurveTo(i[0][s],a[0][s],i[1][s],a[1][s],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Uh(e){var t,r=e.length-1,i,a=new Array(r),s=new Array(r),o=new Array(r);for(a[0]=0,s[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,s[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,s[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=a[t]/s[t-1],s[t]-=i,o[t]-=i*o[t-1];for(a[r-1]=o[r-1]/s[r-1],t=r-2;t>=0;--t)a[t]=(o[t]-a[t+1])/s[t];for(s[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)s[t]=2*e[t+1]-a[t+1];return[a,s]}function xd(e){return new Cd(e)}function qs(e,t){this._context=e,this._t=t}qs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function bd(e){return new qs(e,.5)}function kd(e){return new qs(e,0)}function Td(e){return new qs(e,1)}function zi(e,t,r){this.k=e,this.x=t,this.y=r}zi.prototype={constructor:zi,scale:function(e){return e===1?this:new zi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new zi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};zi.prototype;var rk=f(e=>{const{securityLevel:t}=mt();let r=ct("body");if(t==="sandbox"){const s=ct(`#i${e}`).node()?.contentDocument??document;r=ct(s.body)}return r.select(`#${e}`)},"selectSvgElement");function nl(e){return typeof e>"u"||e===null}f(nl,"isNothing");function _d(e){return typeof e=="object"&&e!==null}f(_d,"isObject");function wd(e){return Array.isArray(e)?e:nl(e)?[]:[e]}f(wd,"toArray");function Sd(e,t){var r,i,a,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)a=s[r],e[a]=t[a];return e}f(Sd,"extend");function vd(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}f(vd,"repeat");function Bd(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}f(Bd,"isNegativeZero");var ik=nl,ak=_d,sk=wd,ok=vd,nk=Bd,lk=Sd,It={isNothing:ik,isObject:ak,toArray:sk,repeat:ok,isNegativeZero:nk,extend:lk};function ll(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
`+e.mark.snippet),i+" "+r):i}f(ll,"formatError");function fi(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=ll(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}f(fi,"YAMLException$1");fi.prototype=Object.create(Error.prototype);fi.prototype.constructor=fi;fi.prototype.toString=f(function(t){return this.name+": "+ll(this,t)},"toString");var ee=fi;function Ga(e,t,r,i,a){var s="",o="",n=Math.floor(a/2)-1;return i-t>n&&(s=" ... ",t=i-n+s.length),r-i>n&&(o=" ...",r=i+n-o.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+s.length}}f(Ga,"getLine");function Xa(e,t){return It.repeat(" ",t-e.length)+e}f(Xa,"padStart");function Ld(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],a=[],s,o=-1;s=r.exec(e.buffer);)a.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var n="",l,c,h=Math.min(e.line+t.linesAfter,a.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)c=Ga(e.buffer,i[o-l],a[o-l],e.position-(i[o]-i[o-l]),u),n=It.repeat(" ",t.indent)+Xa((e.line-l+1).toString(),h)+" | "+c.str+`
`+n;for(c=Ga(e.buffer,i[o],a[o],e.position,u),n+=It.repeat(" ",t.indent)+Xa((e.line+1).toString(),h)+" | "+c.str+`
`,n+=It.repeat("-",t.indent+h+3+c.pos)+`^
`,l=1;l<=t.linesAfter&&!(o+l>=a.length);l++)c=Ga(e.buffer,i[o+l],a[o+l],e.position-(i[o]-i[o+l]),u),n+=It.repeat(" ",t.indent)+Xa((e.line+l+1).toString(),h)+" | "+c.str+`
`;return n.replace(/\n$/,"")}f(Ld,"makeSnippet");var hk=Ld,ck=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],uk=["scalar","sequence","mapping"];function Fd(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}f(Fd,"compileStyleAliases");function Ad(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(ck.indexOf(r)===-1)throw new ee('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Fd(t.styleAliases||null),uk.indexOf(this.kind)===-1)throw new ee('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}f(Ad,"Type$1");var Yt=Ad;function rn(e,t){var r=[];return e[t].forEach(function(i){var a=r.length;r.forEach(function(s,o){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(a=o)}),r[a]=i}),r}f(rn,"compileList");function Ed(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(a){a.multi?(e.multi[a.kind].push(a),e.multi.fallback.push(a)):e[a.kind][a.tag]=e.fallback[a.tag]=a}for(f(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}f(Ed,"compileMap");function ps(e){return this.extend(e)}f(ps,"Schema$1");ps.prototype.extend=f(function(t){var r=[],i=[];if(t instanceof Yt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new ee("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof Yt))throw new ee("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new ee("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new ee("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof Yt))throw new ee("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(ps.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(i),a.compiledImplicit=rn(a,"implicit"),a.compiledExplicit=rn(a,"explicit"),a.compiledTypeMap=Ed(a.compiledImplicit,a.compiledExplicit),a},"extend");var dk=ps,pk=new Yt("tag:yaml.org,2002:str",{kind:"scalar",construct:f(function(e){return e!==null?e:""},"construct")}),fk=new Yt("tag:yaml.org,2002:seq",{kind:"sequence",construct:f(function(e){return e!==null?e:[]},"construct")}),gk=new Yt("tag:yaml.org,2002:map",{kind:"mapping",construct:f(function(e){return e!==null?e:{}},"construct")}),mk=new dk({explicit:[pk,fk,gk]});function Md(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}f(Md,"resolveYamlNull");function $d(){return null}f($d,"constructYamlNull");function Od(e){return e===null}f(Od,"isNull");var yk=new Yt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Md,construct:$d,predicate:Od,represent:{canonical:f(function(){return"~"},"canonical"),lowercase:f(function(){return"null"},"lowercase"),uppercase:f(function(){return"NULL"},"uppercase"),camelcase:f(function(){return"Null"},"camelcase"),empty:f(function(){return""},"empty")},defaultStyle:"lowercase"});function Id(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}f(Id,"resolveYamlBoolean");function Dd(e){return e==="true"||e==="True"||e==="TRUE"}f(Dd,"constructYamlBoolean");function Pd(e){return Object.prototype.toString.call(e)==="[object Boolean]"}f(Pd,"isBoolean");var Ck=new Yt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Id,construct:Dd,predicate:Pd,represent:{lowercase:f(function(e){return e?"true":"false"},"lowercase"),uppercase:f(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:f(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Rd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}f(Rd,"isHexCode");function Nd(e){return 48<=e&&e<=55}f(Nd,"isOctCode");function qd(e){return 48<=e&&e<=57}f(qd,"isDecCode");function zd(e){if(e===null)return!1;var t=e.length,r=0,i=!1,a;if(!t)return!1;if(a=e[r],(a==="-"||a==="+")&&(a=e[++r]),a==="0"){if(r+1===t)return!0;if(a=e[++r],a==="b"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;i=!0}return i&&a!=="_"}if(a==="x"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!Rd(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}if(a==="o"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!Nd(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}}if(a==="_")return!1;for(;r<t;r++)if(a=e[r],a!=="_"){if(!qd(e.charCodeAt(r)))return!1;i=!0}return!(!i||a==="_")}f(zd,"resolveYamlInteger");function Wd(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}f(Wd,"constructYamlInteger");function Hd(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!It.isNegativeZero(e)}f(Hd,"isInteger");var xk=new Yt("tag:yaml.org,2002:int",{kind:"scalar",resolve:zd,construct:Wd,predicate:Hd,represent:{binary:f(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:f(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:f(function(e){return e.toString(10)},"decimal"),hexadecimal:f(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),bk=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Yd(e){return!(e===null||!bk.test(e)||e[e.length-1]==="_")}f(Yd,"resolveYamlFloat");function jd(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}f(jd,"constructYamlFloat");var kk=/^[-+]?[0-9]+e/;function Ud(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(It.isNegativeZero(e))return"-0.0";return r=e.toString(10),kk.test(r)?r.replace("e",".e"):r}f(Ud,"representYamlFloat");function Gd(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||It.isNegativeZero(e))}f(Gd,"isFloat");var Tk=new Yt("tag:yaml.org,2002:float",{kind:"scalar",resolve:Yd,construct:jd,predicate:Gd,represent:Ud,defaultStyle:"lowercase"}),Xd=mk.extend({implicit:[yk,Ck,xk,Tk]}),_k=Xd,Vd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Zd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Kd(e){return e===null?!1:Vd.exec(e)!==null||Zd.exec(e)!==null}f(Kd,"resolveYamlTimestamp");function Qd(e){var t,r,i,a,s,o,n,l=0,c=null,h,u,p;if(t=Vd.exec(e),t===null&&(t=Zd.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(r,i,a));if(s=+t[4],o=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),p=new Date(Date.UTC(r,i,a,s,o,n,l)),c&&p.setTime(p.getTime()-c),p}f(Qd,"constructYamlTimestamp");function Jd(e){return e.toISOString()}f(Jd,"representYamlTimestamp");var wk=new Yt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Kd,construct:Qd,instanceOf:Date,represent:Jd});function tp(e){return e==="<<"||e===null}f(tp,"resolveYamlMerge");var Sk=new Yt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:tp}),hl=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function ep(e){if(e===null)return!1;var t,r,i=0,a=e.length,s=hl;for(r=0;r<a;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}f(ep,"resolveYamlBinary");function rp(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,s=hl,o=0,n=[];for(t=0;t<a;t++)t%4===0&&t&&(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)),o=o<<6|s.indexOf(i.charAt(t));return r=a%4*6,r===0?(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)):r===18?(n.push(o>>10&255),n.push(o>>2&255)):r===12&&n.push(o>>4&255),new Uint8Array(n)}f(rp,"constructYamlBinary");function ip(e){var t="",r=0,i,a,s=e.length,o=hl;for(i=0;i<s;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return a=s%3,a===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):a===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):a===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}f(ip,"representYamlBinary");function ap(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}f(ap,"isBinary");var vk=new Yt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ep,construct:rp,predicate:ap,represent:ip}),Bk=Object.prototype.hasOwnProperty,Lk=Object.prototype.toString;function sp(e){if(e===null)return!0;var t=[],r,i,a,s,o,n=e;for(r=0,i=n.length;r<i;r+=1){if(a=n[r],o=!1,Lk.call(a)!=="[object Object]")return!1;for(s in a)if(Bk.call(a,s))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}f(sp,"resolveYamlOmap");function op(e){return e!==null?e:[]}f(op,"constructYamlOmap");var Fk=new Yt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:sp,construct:op}),Ak=Object.prototype.toString;function np(e){if(e===null)return!0;var t,r,i,a,s,o=e;for(s=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],Ak.call(i)!=="[object Object]"||(a=Object.keys(i),a.length!==1))return!1;s[t]=[a[0],i[a[0]]]}return!0}f(np,"resolveYamlPairs");function lp(e){if(e===null)return[];var t,r,i,a,s,o=e;for(s=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],a=Object.keys(i),s[t]=[a[0],i[a[0]]];return s}f(lp,"constructYamlPairs");var Ek=new Yt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:np,construct:lp}),Mk=Object.prototype.hasOwnProperty;function hp(e){if(e===null)return!0;var t,r=e;for(t in r)if(Mk.call(r,t)&&r[t]!==null)return!1;return!0}f(hp,"resolveYamlSet");function cp(e){return e!==null?e:{}}f(cp,"constructYamlSet");var $k=new Yt("tag:yaml.org,2002:set",{kind:"mapping",resolve:hp,construct:cp}),up=_k.extend({implicit:[wk,Sk],explicit:[vk,Fk,Ek,$k]}),ir=Object.prototype.hasOwnProperty,fs=1,dp=2,pp=3,gs=4,vo=1,Ok=2,Gh=3,Ik=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Dk=/[\x85\u2028\u2029]/,Pk=/[,\[\]\{\}]/,fp=/^(?:!|!!|![a-z\-]+!)$/i,gp=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function an(e){return Object.prototype.toString.call(e)}f(an,"_class");function Ce(e){return e===10||e===13}f(Ce,"is_EOL");function er(e){return e===9||e===32}f(er,"is_WHITE_SPACE");function Gt(e){return e===9||e===32||e===10||e===13}f(Gt,"is_WS_OR_EOL");function yr(e){return e===44||e===91||e===93||e===123||e===125}f(yr,"is_FLOW_INDICATOR");function mp(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}f(mp,"fromHexCode");function yp(e){return e===120?2:e===117?4:e===85?8:0}f(yp,"escapedHexLen");function Cp(e){return 48<=e&&e<=57?e-48:-1}f(Cp,"fromDecimalCode");function sn(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}f(sn,"simpleEscapeSequence");function xp(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}f(xp,"charFromCodepoint");function cl(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}f(cl,"setProperty");var bp=new Array(256),kp=new Array(256);for(cr=0;cr<256;cr++)bp[cr]=sn(cr)?1:0,kp[cr]=sn(cr);var cr;function Tp(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||up,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}f(Tp,"State$1");function ul(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=hk(r),new ee(t,r)}f(ul,"generateError");function K(e,t){throw ul(e,t)}f(K,"throwError");function aa(e,t){e.onWarning&&e.onWarning.call(null,ul(e,t))}f(aa,"throwWarning");var Xh={YAML:f(function(t,r,i){var a,s,o;t.version!==null&&K(t,"duplication of %YAML directive"),i.length!==1&&K(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),a===null&&K(t,"ill-formed argument of the YAML directive"),s=parseInt(a[1],10),o=parseInt(a[2],10),s!==1&&K(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&aa(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:f(function(t,r,i){var a,s;i.length!==2&&K(t,"TAG directive accepts exactly two arguments"),a=i[0],s=i[1],fp.test(a)||K(t,"ill-formed tag handle (first argument) of the TAG directive"),ir.call(t.tagMap,a)&&K(t,'there is a previously declared suffix for "'+a+'" tag handle'),gp.test(s)||K(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{K(t,"tag prefix is malformed: "+s)}t.tagMap[a]=s},"handleTagDirective")};function We(e,t,r,i){var a,s,o,n;if(t<r){if(n=e.input.slice(t,r),i)for(a=0,s=n.length;a<s;a+=1)o=n.charCodeAt(a),o===9||32<=o&&o<=1114111||K(e,"expected valid JSON character");else Ik.test(n)&&K(e,"the stream contains non-printable characters");e.result+=n}}f(We,"captureSegment");function on(e,t,r,i){var a,s,o,n;for(It.isObject(r)||K(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),o=0,n=a.length;o<n;o+=1)s=a[o],ir.call(t,s)||(cl(t,s,r[s]),i[s]=!0)}f(on,"mergeMappings");function Cr(e,t,r,i,a,s,o,n,l){var c,h;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),c=0,h=a.length;c<h;c+=1)Array.isArray(a[c])&&K(e,"nested arrays are not supported inside keys"),typeof a=="object"&&an(a[c])==="[object Object]"&&(a[c]="[object Object]");if(typeof a=="object"&&an(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(c=0,h=s.length;c<h;c+=1)on(e,t,s[c],r);else on(e,t,s,r);else!e.json&&!ir.call(r,a)&&ir.call(t,a)&&(e.line=o||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,K(e,"duplicated mapping key")),cl(t,a,s),delete r[a];return t}f(Cr,"storeMappingPair");function zs(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):K(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}f(zs,"readLineBreak");function Bt(e,t,r){for(var i=0,a=e.input.charCodeAt(e.position);a!==0;){for(;er(a);)a===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),a=e.input.charCodeAt(++e.position);if(t&&a===35)do a=e.input.charCodeAt(++e.position);while(a!==10&&a!==13&&a!==0);if(Ce(a))for(zs(e),a=e.input.charCodeAt(e.position),i++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&aa(e,"deficient indentation"),i}f(Bt,"skipSeparationSpace");function ya(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Gt(r)))}f(ya,"testDocumentSeparator");function Ws(e,t){t===1?e.result+=" ":t>1&&(e.result+=It.repeat(`
`,t-1))}f(Ws,"writeFoldedLines");function _p(e,t,r){var i,a,s,o,n,l,c,h,u=e.kind,p=e.result,d;if(d=e.input.charCodeAt(e.position),Gt(d)||yr(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(a=e.input.charCodeAt(e.position+1),Gt(a)||r&&yr(a)))return!1;for(e.kind="scalar",e.result="",s=o=e.position,n=!1;d!==0;){if(d===58){if(a=e.input.charCodeAt(e.position+1),Gt(a)||r&&yr(a))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),Gt(i))break}else{if(e.position===e.lineStart&&ya(e)||r&&yr(d))break;if(Ce(d))if(l=e.line,c=e.lineStart,h=e.lineIndent,Bt(e,!1,-1),e.lineIndent>=t){n=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=c,e.lineIndent=h;break}}n&&(We(e,s,o,!1),Ws(e,e.line-l),s=o=e.position,n=!1),er(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return We(e,s,o,!1),e.result?!0:(e.kind=u,e.result=p,!1)}f(_p,"readPlainScalar");function wp(e,t){var r,i,a;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(We(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,a=e.position;else return!0;else Ce(r)?(We(e,i,a,!0),Ws(e,Bt(e,!1,t)),i=a=e.position):e.position===e.lineStart&&ya(e)?K(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);K(e,"unexpected end of the stream within a single quoted scalar")}f(wp,"readSingleQuotedScalar");function Sp(e,t){var r,i,a,s,o,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return We(e,r,e.position,!0),e.position++,!0;if(n===92){if(We(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),Ce(n))Bt(e,!1,t);else if(n<256&&bp[n])e.result+=kp[n],e.position++;else if((o=yp(n))>0){for(a=o,s=0;a>0;a--)n=e.input.charCodeAt(++e.position),(o=mp(n))>=0?s=(s<<4)+o:K(e,"expected hexadecimal character");e.result+=xp(s),e.position++}else K(e,"unknown escape sequence");r=i=e.position}else Ce(n)?(We(e,r,i,!0),Ws(e,Bt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&ya(e)?K(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}K(e,"unexpected end of the stream within a double quoted scalar")}f(Sp,"readDoubleQuotedScalar");function vp(e,t){var r=!0,i,a,s,o=e.tag,n,l=e.anchor,c,h,u,p,d,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,d=!1,n=[];else if(b===123)h=125,d=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(Bt(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=o,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=n,!0;r?b===44&&K(e,"expected the node content, but found ','"):K(e,"missed comma between flow collection entries"),y=m=x=null,u=p=!1,b===63&&(c=e.input.charCodeAt(e.position+1),Gt(c)&&(u=p=!0,e.position++,Bt(e,!0,t))),i=e.line,a=e.lineStart,s=e.position,wr(e,t,fs,!1,!0),y=e.tag,m=e.result,Bt(e,!0,t),b=e.input.charCodeAt(e.position),(p||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),Bt(e,!0,t),wr(e,t,fs,!1,!0),x=e.result),d?Cr(e,n,g,y,m,x,i,a,s):u?n.push(Cr(e,null,g,y,m,x,i,a,s)):n.push(m),Bt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}K(e,"unexpected end of the stream within a flow collection")}f(vp,"readFlowCollection");function Bp(e,t){var r,i,a=vo,s=!1,o=!1,n=t,l=0,c=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)vo===a?a=u===43?Gh:Ok:K(e,"repeat of a chomping mode identifier");else if((h=Cp(u))>=0)h===0?K(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?K(e,"repeat of an indentation width identifier"):(n=t+h-1,o=!0);else break;if(er(u)){do u=e.input.charCodeAt(++e.position);while(er(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!Ce(u)&&u!==0)}for(;u!==0;){for(zs(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<n)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>n&&(n=e.lineIndent),Ce(u)){l++;continue}if(e.lineIndent<n){a===Gh?e.result+=It.repeat(`
`,s?1+l:l):a===vo&&s&&(e.result+=`
`);break}for(i?er(u)?(c=!0,e.result+=It.repeat(`
`,s?1+l:l)):c?(c=!1,e.result+=It.repeat(`
`,l+1)):l===0?s&&(e.result+=" "):e.result+=It.repeat(`
`,l):e.result+=It.repeat(`
`,s?1+l:l),s=!0,o=!0,l=0,r=e.position;!Ce(u)&&u!==0;)u=e.input.charCodeAt(++e.position);We(e,r,e.position,!1)}return!0}f(Bp,"readBlockScalar");function nn(e,t){var r,i=e.tag,a=e.anchor,s=[],o,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,K(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!Gt(o))));){if(n=!0,e.position++,Bt(e,!0,-1)&&e.lineIndent<=t){s.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,wr(e,t,pp,!1,!0),s.push(e.result),Bt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)K(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=a,e.kind="sequence",e.result=s,!0):!1}f(nn,"readBlockSequence");function Lp(e,t,r){var i,a,s,o,n,l,c=e.tag,h=e.anchor,u={},p=Object.create(null),d=null,g=null,m=null,y=!1,x=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,K(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(b===63||b===58)&&Gt(i))b===63?(y&&(Cr(e,u,p,d,g,null,o,n,l),d=g=m=null),x=!0,y=!0,a=!0):y?(y=!1,a=!0):K(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,n=e.lineStart,l=e.position,!wr(e,r,dp,!1,!0))break;if(e.line===s){for(b=e.input.charCodeAt(e.position);er(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Gt(b)||K(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Cr(e,u,p,d,g,null,o,n,l),d=g=m=null),x=!0,y=!1,a=!1,d=e.tag,g=e.result;else if(x)K(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)K(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===s||e.lineIndent>t)&&(y&&(o=e.line,n=e.lineStart,l=e.position),wr(e,t,gs,!0,a)&&(y?g=e.result:m=e.result),y||(Cr(e,u,p,d,g,m,o,n,l),d=g=m=null),Bt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&b!==0)K(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Cr(e,u,p,d,g,null,o,n,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),x}f(Lp,"readBlockMapping");function Fp(e){var t,r=!1,i=!1,a,s,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&K(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,a="!!",o=e.input.charCodeAt(++e.position)):a="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(s=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):K(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Gt(o);)o===33&&(i?K(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),fp.test(a)||K(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),Pk.test(s)&&K(e,"tag suffix cannot contain flow indicator characters")}s&&!gp.test(s)&&K(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{K(e,"tag name is malformed: "+s)}return r?e.tag=s:ir.call(e.tagMap,a)?e.tag=e.tagMap[a]+s:a==="!"?e.tag="!"+s:a==="!!"?e.tag="tag:yaml.org,2002:"+s:K(e,'undeclared tag handle "'+a+'"'),!0}f(Fp,"readTagProperty");function Ap(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&K(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Gt(r)&&!yr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&K(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}f(Ap,"readAnchorProperty");function Ep(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Gt(i)&&!yr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&K(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),ir.call(e.anchorMap,r)||K(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Bt(e,!0,-1),!0}f(Ep,"readAlias");function wr(e,t,r,i,a){var s,o,n,l=1,c=!1,h=!1,u,p,d,g,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=o=n=gs===r||pp===r,i&&Bt(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Fp(e)||Ap(e);)Bt(e,!0,-1)?(c=!0,n=s,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=c||a),(l===1||gs===r)&&(fs===r||dp===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?n&&(nn(e,y)||Lp(e,y,m))||vp(e,m)?h=!0:(o&&Bp(e,m)||wp(e,m)||Sp(e,m)?h=!0:Ep(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&K(e,"alias node should not have any properties")):_p(e,m,fs===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=n&&nn(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&K(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,p=e.implicitTypes.length;u<p;u+=1)if(g=e.implicitTypes[u],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(ir.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,d=e.typeMap.multi[e.kind||"fallback"],u=0,p=d.length;u<p;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){g=d[u];break}g||K(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&K(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):K(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}f(wr,"composeNode");function Mp(e){var t=e.position,r,i,a,s=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(Bt(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(s=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!Gt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),a=[],i.length<1&&K(e,"directive name must not be less than one character in length");o!==0;){for(;er(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!Ce(o));break}if(Ce(o))break;for(r=e.position;o!==0&&!Gt(o);)o=e.input.charCodeAt(++e.position);a.push(e.input.slice(r,e.position))}o!==0&&zs(e),ir.call(Xh,i)?Xh[i](e,i,a):aa(e,'unknown document directive "'+i+'"')}if(Bt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Bt(e,!0,-1)):s&&K(e,"directives end mark is expected"),wr(e,e.lineIndent-1,gs,!1,!0),Bt(e,!0,-1),e.checkLineBreaks&&Dk.test(e.input.slice(t,e.position))&&aa(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ya(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Bt(e,!0,-1));return}if(e.position<e.length-1)K(e,"end of the stream or a document separator is expected");else return}f(Mp,"readDocument");function dl(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Tp(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,K(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Mp(r);return r.documents}f(dl,"loadDocuments");function Rk(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=dl(e,r);if(typeof t!="function")return i;for(var a=0,s=i.length;a<s;a+=1)t(i[a])}f(Rk,"loadAll$1");function $p(e,t){var r=dl(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new ee("expected a single document in the stream, but found more")}}f($p,"load$1");var Nk=$p,qk={load:Nk},Op=Object.prototype.toString,Ip=Object.prototype.hasOwnProperty,pl=65279,zk=9,sa=10,Wk=13,Hk=32,Yk=33,jk=34,ln=35,Uk=37,Gk=38,Xk=39,Vk=42,Dp=44,Zk=45,ms=58,Kk=61,Qk=62,Jk=63,t2=64,Pp=91,Rp=93,e2=96,Np=123,r2=124,qp=125,jt={};jt[0]="\\0";jt[7]="\\a";jt[8]="\\b";jt[9]="\\t";jt[10]="\\n";jt[11]="\\v";jt[12]="\\f";jt[13]="\\r";jt[27]="\\e";jt[34]='\\"';jt[92]="\\\\";jt[133]="\\N";jt[160]="\\_";jt[8232]="\\L";jt[8233]="\\P";var i2=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],a2=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function zp(e,t){var r,i,a,s,o,n,l;if(t===null)return{};for(r={},i=Object.keys(t),a=0,s=i.length;a<s;a+=1)o=i[a],n=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Ip.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[o]=n;return r}f(zp,"compileStyleMap");function Wp(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new ee("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+It.repeat("0",i-t.length)+t}f(Wp,"encodeHex");var s2=1,oa=2;function Hp(e){this.schema=e.schema||up,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=It.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=zp(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?oa:s2,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}f(Hp,"State");function hn(e,t){for(var r=It.repeat(" ",t),i=0,a=-1,s="",o,n=e.length;i<n;)a=e.indexOf(`
`,i),a===-1?(o=e.slice(i),i=n):(o=e.slice(i,a+1),i=a+1),o.length&&o!==`
`&&(s+=r),s+=o;return s}f(hn,"indentString");function ys(e,t){return`
`+It.repeat(" ",e.indent*t)}f(ys,"generateNextLine");function Yp(e,t){var r,i,a;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(a=e.implicitTypes[r],a.resolve(t))return!0;return!1}f(Yp,"testImplicitResolving");function na(e){return e===Hk||e===zk}f(na,"isWhitespace");function gi(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==pl||65536<=e&&e<=1114111}f(gi,"isPrintable");function cn(e){return gi(e)&&e!==pl&&e!==Wk&&e!==sa}f(cn,"isNsCharOrWhitespace");function un(e,t,r){var i=cn(e),a=i&&!na(e);return(r?i:i&&e!==Dp&&e!==Pp&&e!==Rp&&e!==Np&&e!==qp)&&e!==ln&&!(t===ms&&!a)||cn(t)&&!na(t)&&e===ln||t===ms&&a}f(un,"isPlainSafe");function jp(e){return gi(e)&&e!==pl&&!na(e)&&e!==Zk&&e!==Jk&&e!==ms&&e!==Dp&&e!==Pp&&e!==Rp&&e!==Np&&e!==qp&&e!==ln&&e!==Gk&&e!==Vk&&e!==Yk&&e!==r2&&e!==Kk&&e!==Qk&&e!==Xk&&e!==jk&&e!==Uk&&e!==t2&&e!==e2}f(jp,"isPlainSafeFirst");function Up(e){return!na(e)&&e!==ms}f(Up,"isPlainSafeLast");function Ur(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}f(Ur,"codePointAt");function fl(e){var t=/^\n* /;return t.test(e)}f(fl,"needIndentIndicator");var Gp=1,dn=2,Xp=3,Vp=4,Hr=5;function Zp(e,t,r,i,a,s,o,n){var l,c=0,h=null,u=!1,p=!1,d=i!==-1,g=-1,m=jp(Ur(e,0))&&Up(Ur(e,e.length-1));if(t||o)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Ur(e,l),!gi(c))return Hr;m=m&&un(c,h,n),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Ur(e,l),c===sa)u=!0,d&&(p=p||l-g-1>i&&e[g+1]!==" ",g=l);else if(!gi(c))return Hr;m=m&&un(c,h,n),h=c}p=p||d&&l-g-1>i&&e[g+1]!==" "}return!u&&!p?m&&!o&&!a(e)?Gp:s===oa?Hr:dn:r>9&&fl(e)?Hr:o?s===oa?Hr:dn:p?Vp:Xp}f(Zp,"chooseScalarStyle");function Kp(e,t,r,i,a){e.dump=(function(){if(t.length===0)return e.quotingType===oa?'""':"''";if(!e.noCompatMode&&(i2.indexOf(t)!==-1||a2.test(t)))return e.quotingType===oa?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return Yp(e,c)}switch(f(l,"testAmbiguity"),Zp(t,n,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,a)){case Gp:return t;case dn:return"'"+t.replace(/'/g,"''")+"'";case Xp:return"|"+pn(t,e.indent)+fn(hn(t,s));case Vp:return">"+pn(t,e.indent)+fn(hn(Qp(t,o),s));case Hr:return'"'+Jp(t)+'"';default:throw new ee("impossible error: invalid scalar style")}})()}f(Kp,"writeScalar");function pn(e,t){var r=fl(e)?String(t):"",i=e[e.length-1]===`
`,a=i&&(e[e.length-2]===`
`||e===`
`),s=a?"+":i?"":"-";return r+s+`
`}f(pn,"blockHeader");function fn(e){return e[e.length-1]===`
`?e.slice(0,-1):e}f(fn,"dropEndingNewline");function Qp(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
`);return c=c!==-1?c:e.length,r.lastIndex=c,gn(e.slice(0,c),t)})(),a=e[0]===`
`||e[0]===" ",s,o;o=r.exec(e);){var n=o[1],l=o[2];s=l[0]===" ",i+=n+(!a&&!s&&l!==""?`
`:"")+gn(l,t),a=s}return i}f(Qp,"foldString");function gn(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,a=0,s,o=0,n=0,l="";i=r.exec(e);)n=i.index,n-a>t&&(s=o>a?o:n,l+=`
`+e.slice(a,s),a=s+1),o=n;return l+=`
`,e.length-a>t&&o>a?l+=e.slice(a,o)+`
`+e.slice(o+1):l+=e.slice(a),l.slice(1)}f(gn,"foldLine");function Jp(e){for(var t="",r=0,i,a=0;a<e.length;r>=65536?a+=2:a++)r=Ur(e,a),i=jt[r],!i&&gi(r)?(t+=e[a],r>=65536&&(t+=e[a+1])):t+=i||Wp(r);return t}f(Jp,"escapeString");function tf(e,t,r){var i="",a=e.tag,s,o,n;for(s=0,o=r.length;s<o;s+=1)n=r[s],e.replacer&&(n=e.replacer.call(r,String(s),n)),(Ae(e,t,n,!1,!1)||typeof n>"u"&&Ae(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}f(tf,"writeFlowSequence");function mn(e,t,r,i){var a="",s=e.tag,o,n,l;for(o=0,n=r.length;o<n;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(Ae(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Ae(e,t+1,null,!0,!0,!1,!0))&&((!i||a!=="")&&(a+=ys(e,t)),e.dump&&sa===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}f(mn,"writeBlockSequence");function ef(e,t,r){var i="",a=e.tag,s=Object.keys(r),o,n,l,c,h;for(o=0,n=s.length;o<n;o+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=s[o],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),Ae(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ae(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=a,e.dump="{"+i+"}"}f(ef,"writeFlowMapping");function rf(e,t,r,i){var a="",s=e.tag,o=Object.keys(r),n,l,c,h,u,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new ee("sortKeys must be a boolean or a function");for(n=0,l=o.length;n<l;n+=1)p="",(!i||a!=="")&&(p+=ys(e,t)),c=o[n],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),Ae(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&sa===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,u&&(p+=ys(e,t)),Ae(e,t+1,h,!0,u)&&(e.dump&&sa===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,a+=p));e.tag=s,e.dump=a||"{}"}f(rf,"writeBlockMapping");function yn(e,t,r){var i,a,s,o,n,l;for(a=r?e.explicitTypes:e.implicitTypes,s=0,o=a.length;s<o;s+=1)if(n=a[s],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,Op.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(Ip.call(n.represent,l))i=n.represent[l](t,l);else throw new ee("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}f(yn,"detectType");function Ae(e,t,r,i,a,s,o){e.tag=null,e.dump=r,yn(e,r,!1)||yn(e,r,!0);var n=Op.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=n==="[object Object]"||n==="[object Array]",u,p;if(h&&(u=e.duplicates.indexOf(r),p=u!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(a=!1),p&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&p&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(rf(e,t,e.dump,a),p&&(e.dump="&ref_"+u+e.dump)):(ef(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?mn(e,t-1,e.dump,a):mn(e,t,e.dump,a),p&&(e.dump="&ref_"+u+e.dump)):(tf(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&Kp(e,e.dump,t,s,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ee("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}f(Ae,"writeNode");function af(e,t){var r=[],i=[],a,s;for(Cs(e,r,i),a=0,s=i.length;a<s;a+=1)t.duplicates.push(r[i[a]]);t.usedDuplicates=new Array(s)}f(af,"getDuplicateReferences");function Cs(e,t,r){var i,a,s;if(e!==null&&typeof e=="object")if(a=t.indexOf(e),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(t.push(e),Array.isArray(e))for(a=0,s=e.length;a<s;a+=1)Cs(e[a],t,r);else for(i=Object.keys(e),a=0,s=i.length;a<s;a+=1)Cs(e[i[a]],t,r)}f(Cs,"inspectNode");function o2(e,t){t=t||{};var r=new Hp(t);r.noRefs||af(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Ae(r,0,i,!0,!0)?r.dump+`
`:""}f(o2,"dump$1");function n2(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}f(n2,"renamed");var l2=Xd,h2=qk.load;/*! Bundled license information:
js-yaml/dist/js-yaml.mjs:
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
*/var Ai=f((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Ht={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Vh={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Wi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=_t(e),t=_t(t);const[r,i]=[e.x,e.y],[a,s]=[t.x,t.y],o=a-r,n=s-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}f(Wi,"calculateDeltaAndAngle");var _t=f(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),c2=f(e=>({x:f(function(t,r,i){let a=0;const s=_t(i[0]).x<_t(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Ht,e.arrowTypeStart)){const{angle:d,deltaX:g}=Wi(i[0],i[1]);a=Ht[e.arrowTypeStart]*Math.cos(d)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ht,e.arrowTypeEnd)){const{angle:d,deltaX:g}=Wi(i[i.length-1],i[i.length-2]);a=Ht[e.arrowTypeEnd]*Math.cos(d)*(g>=0?1:-1)}const o=Math.abs(_t(t).x-_t(i[i.length-1]).x),n=Math.abs(_t(t).y-_t(i[i.length-1]).y),l=Math.abs(_t(t).x-_t(i[0]).x),c=Math.abs(_t(t).y-_t(i[0]).y),h=Ht[e.arrowTypeStart],u=Ht[e.arrowTypeEnd],p=1;if(o<u&&o>0&&n<u){let d=u+p-o;d*=s==="right"?-1:1,a-=d}if(l<h&&l>0&&c<h){let d=h+p-l;d*=s==="right"?-1:1,a+=d}return _t(t).x+a},"x"),y:f(function(t,r,i){let a=0;const s=_t(i[0]).y<_t(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Ht,e.arrowTypeStart)){const{angle:d,deltaY:g}=Wi(i[0],i[1]);a=Ht[e.arrowTypeStart]*Math.abs(Math.sin(d))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ht,e.arrowTypeEnd)){const{angle:d,deltaY:g}=Wi(i[i.length-1],i[i.length-2]);a=Ht[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(g>=0?1:-1)}const o=Math.abs(_t(t).y-_t(i[i.length-1]).y),n=Math.abs(_t(t).x-_t(i[i.length-1]).x),l=Math.abs(_t(t).y-_t(i[0]).y),c=Math.abs(_t(t).x-_t(i[0]).x),h=Ht[e.arrowTypeStart],u=Ht[e.arrowTypeEnd],p=1;if(o<u&&o>0&&n<u){let d=u+p-o;d*=s==="up"?-1:1,a-=d}if(l<h&&l>0&&c<h){let d=h+p-l;d*=s==="up"?-1:1,a+=d}return _t(t).y+a},"y")}),"getLineFunctionsWithOffset"),$a={},$t={},Zh;function u2(){return Zh||(Zh=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.BLANK_URL=$t.relativeFirstCharacters=$t.whitespaceEscapeCharsRegex=$t.urlSchemeRegex=$t.ctrlCharactersRegex=$t.htmlCtrlEntityRegex=$t.htmlEntitiesRegex=$t.invalidProtocolRegex=void 0,$t.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,$t.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,$t.htmlCtrlEntityRegex=/&(newline|tab);/gi,$t.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,$t.urlSchemeRegex=/^.+(:|&colon;)/gim,$t.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,$t.relativeFirstCharacters=[".","/"],$t.BLANK_URL="about:blank"),$t}var Kh;function d2(){if(Kh)return $a;Kh=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.sanitizeUrl=s;var e=u2();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var n=o.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(o){return URL.canParse(o)}function a(o){try{return decodeURIComponent(o)}catch{return o}}function s(o){if(!o)return e.BLANK_URL;var n,l=a(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=a(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var p=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(p))return e.BLANK_URL;var d=h.replace(/\\/g,"/");if(p==="mailto:"||p.includes("://"))return d;if(p==="http:"||p==="https:"){if(!i(d))return e.BLANK_URL;var g=new URL(d);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return d}return $a}var p2=d2(),sf=typeof global=="object"&&global&&global.Object===Object&&global,f2=typeof self=="object"&&self&&self.Object===Object&&self,Oe=sf||f2||Function("return this")(),xs=Oe.Symbol,of=Object.prototype,g2=of.hasOwnProperty,m2=of.toString,Ei=xs?xs.toStringTag:void 0;function y2(e){var t=g2.call(e,Ei),r=e[Ei];try{e[Ei]=void 0;var i=!0}catch{}var a=m2.call(e);return i&&(t?e[Ei]=r:delete e[Ei]),a}var C2=Object.prototype,x2=C2.toString;function b2(e){return x2.call(e)}var k2="[object Null]",T2="[object Undefined]",Qh=xs?xs.toStringTag:void 0;function Ci(e){return e==null?e===void 0?T2:k2:Qh&&Qh in Object(e)?y2(e):b2(e)}function Fr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var _2="[object AsyncFunction]",w2="[object Function]",S2="[object GeneratorFunction]",v2="[object Proxy]";function gl(e){if(!Fr(e))return!1;var t=Ci(e);return t==w2||t==S2||t==_2||t==v2}var Bo=Oe["__core-js_shared__"],Jh=(function(){var e=/[^.]+$/.exec(Bo&&Bo.keys&&Bo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function B2(e){return!!Jh&&Jh in e}var L2=Function.prototype,F2=L2.toString;function Ar(e){if(e!=null){try{return F2.call(e)}catch{}try{return e+""}catch{}}return""}var A2=/[\\^$.*+?()[\]{}|]/g,E2=/^\[object .+?Constructor\]$/,M2=Function.prototype,$2=Object.prototype,O2=M2.toString,I2=$2.hasOwnProperty,D2=RegExp("^"+O2.call(I2).replace(A2,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function P2(e){if(!Fr(e)||B2(e))return!1;var t=gl(e)?D2:E2;return t.test(Ar(e))}function R2(e,t){return e?.[t]}function Er(e,t){var r=R2(e,t);return P2(r)?r:void 0}var la=Er(Object,"create");function N2(){this.__data__=la?la(null):{},this.size=0}function q2(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var z2="__lodash_hash_undefined__",W2=Object.prototype,H2=W2.hasOwnProperty;function Y2(e){var t=this.__data__;if(la){var r=t[e];return r===z2?void 0:r}return H2.call(t,e)?t[e]:void 0}var j2=Object.prototype,U2=j2.hasOwnProperty;function G2(e){var t=this.__data__;return la?t[e]!==void 0:U2.call(t,e)}var X2="__lodash_hash_undefined__";function V2(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=la&&t===void 0?X2:t,this}function Sr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Sr.prototype.clear=N2;Sr.prototype.delete=q2;Sr.prototype.get=Y2;Sr.prototype.has=G2;Sr.prototype.set=V2;function Z2(){this.__data__=[],this.size=0}function Hs(e,t){return e===t||e!==e&&t!==t}function Ys(e,t){for(var r=e.length;r--;)if(Hs(e[r][0],t))return r;return-1}var K2=Array.prototype,Q2=K2.splice;function J2(e){var t=this.__data__,r=Ys(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():Q2.call(t,r,1),--this.size,!0}function tT(e){var t=this.__data__,r=Ys(t,e);return r<0?void 0:t[r][1]}function eT(e){return Ys(this.__data__,e)>-1}function rT(e,t){var r=this.__data__,i=Ys(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Ge(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Ge.prototype.clear=Z2;Ge.prototype.delete=J2;Ge.prototype.get=tT;Ge.prototype.has=eT;Ge.prototype.set=rT;var ha=Er(Oe,"Map");function iT(){this.size=0,this.__data__={hash:new Sr,map:new(ha||Ge),string:new Sr}}function aT(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function js(e,t){var r=e.__data__;return aT(t)?r[typeof t=="string"?"string":"hash"]:r.map}function sT(e){var t=js(this,e).delete(e);return this.size-=t?1:0,t}function oT(e){return js(this,e).get(e)}function nT(e){return js(this,e).has(e)}function lT(e,t){var r=js(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function or(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}or.prototype.clear=iT;or.prototype.delete=sT;or.prototype.get=oT;or.prototype.has=nT;or.prototype.set=lT;var hT="Expected a function";function Ca(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(hT);var r=function(){var i=arguments,a=t?t.apply(this,i):i[0],s=r.cache;if(s.has(a))return s.get(a);var o=e.apply(this,i);return r.cache=s.set(a,o)||s,o};return r.cache=new(Ca.Cache||or),r}Ca.Cache=or;function cT(){this.__data__=new Ge,this.size=0}function uT(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function dT(e){return this.__data__.get(e)}function pT(e){return this.__data__.has(e)}var fT=200;function gT(e,t){var r=this.__data__;if(r instanceof Ge){var i=r.__data__;if(!ha||i.length<fT-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new or(i)}return r.set(e,t),this.size=r.size,this}function xi(e){var t=this.__data__=new Ge(e);this.size=t.size}xi.prototype.clear=cT;xi.prototype.delete=uT;xi.prototype.get=dT;xi.prototype.has=pT;xi.prototype.set=gT;var bs=(function(){try{var e=Er(Object,"defineProperty");return e({},"",{}),e}catch{}})();function ml(e,t,r){t=="__proto__"&&bs?bs(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Cn(e,t,r){(r!==void 0&&!Hs(e[t],r)||r===void 0&&!(t in e))&&ml(e,t,r)}function mT(e){return function(t,r,i){for(var a=-1,s=Object(t),o=i(t),n=o.length;n--;){var l=o[++a];if(r(s[l],l,s)===!1)break}return t}}var yT=mT(),nf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,tc=nf&&typeof module=="object"&&module&&!module.nodeType&&module,CT=tc&&tc.exports===nf,ec=CT?Oe.Buffer:void 0,rc=ec?ec.allocUnsafe:void 0;function xT(e,t){if(t)return e.slice();var r=e.length,i=rc?rc(r):new e.constructor(r);return e.copy(i),i}var ic=Oe.Uint8Array;function bT(e){var t=new e.constructor(e.byteLength);return new ic(t).set(new ic(e)),t}function kT(e,t){var r=t?bT(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function TT(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var ac=Object.create,_T=(function(){function e(){}return function(t){if(!Fr(t))return{};if(ac)return ac(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function lf(e,t){return function(r){return e(t(r))}}var hf=lf(Object.getPrototypeOf,Object),wT=Object.prototype;function Us(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||wT;return e===r}function ST(e){return typeof e.constructor=="function"&&!Us(e)?_T(hf(e)):{}}function xa(e){return e!=null&&typeof e=="object"}var vT="[object Arguments]";function sc(e){return xa(e)&&Ci(e)==vT}var cf=Object.prototype,BT=cf.hasOwnProperty,LT=cf.propertyIsEnumerable,ks=sc((function(){return arguments})())?sc:function(e){return xa(e)&&BT.call(e,"callee")&&!LT.call(e,"callee")},Ts=Array.isArray,FT=9007199254740991;function uf(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=FT}function Gs(e){return e!=null&&uf(e.length)&&!gl(e)}function AT(e){return xa(e)&&Gs(e)}function ET(){return!1}var df=typeof exports=="object"&&exports&&!exports.nodeType&&exports,oc=df&&typeof module=="object"&&module&&!module.nodeType&&module,MT=oc&&oc.exports===df,nc=MT?Oe.Buffer:void 0,$T=nc?nc.isBuffer:void 0,yl=$T||ET,OT="[object Object]",IT=Function.prototype,DT=Object.prototype,pf=IT.toString,PT=DT.hasOwnProperty,RT=pf.call(Object);function NT(e){if(!xa(e)||Ci(e)!=OT)return!1;var t=hf(e);if(t===null)return!0;var r=PT.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&pf.call(r)==RT}var qT="[object Arguments]",zT="[object Array]",WT="[object Boolean]",HT="[object Date]",YT="[object Error]",jT="[object Function]",UT="[object Map]",GT="[object Number]",XT="[object Object]",VT="[object RegExp]",ZT="[object Set]",KT="[object String]",QT="[object WeakMap]",JT="[object ArrayBuffer]",t_="[object DataView]",e_="[object Float32Array]",r_="[object Float64Array]",i_="[object Int8Array]",a_="[object Int16Array]",s_="[object Int32Array]",o_="[object Uint8Array]",n_="[object Uint8ClampedArray]",l_="[object Uint16Array]",h_="[object Uint32Array]",kt={};kt[e_]=kt[r_]=kt[i_]=kt[a_]=kt[s_]=kt[o_]=kt[n_]=kt[l_]=kt[h_]=!0;kt[qT]=kt[zT]=kt[JT]=kt[WT]=kt[t_]=kt[HT]=kt[YT]=kt[jT]=kt[UT]=kt[GT]=kt[XT]=kt[VT]=kt[ZT]=kt[KT]=kt[QT]=!1;function c_(e){return xa(e)&&uf(e.length)&&!!kt[Ci(e)]}function u_(e){return function(t){return e(t)}}var ff=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Zi=ff&&typeof module=="object"&&module&&!module.nodeType&&module,d_=Zi&&Zi.exports===ff,Lo=d_&&sf.process,lc=(function(){try{var e=Zi&&Zi.require&&Zi.require("util").types;return e||Lo&&Lo.binding&&Lo.binding("util")}catch{}})(),hc=lc&&lc.isTypedArray,Cl=hc?u_(hc):c_;function xn(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var p_=Object.prototype,f_=p_.hasOwnProperty;function g_(e,t,r){var i=e[t];(!(f_.call(e,t)&&Hs(i,r))||r===void 0&&!(t in e))&&ml(e,t,r)}function m_(e,t,r,i){var a=!r;r||(r={});for(var s=-1,o=t.length;++s<o;){var n=t[s],l=void 0;l===void 0&&(l=e[n]),a?ml(r,n,l):g_(r,n,l)}return r}function y_(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var C_=9007199254740991,x_=/^(?:0|[1-9]\d*)$/;function gf(e,t){var r=typeof e;return t=t??C_,!!t&&(r=="number"||r!="symbol"&&x_.test(e))&&e>-1&&e%1==0&&e<t}var b_=Object.prototype,k_=b_.hasOwnProperty;function T_(e,t){var r=Ts(e),i=!r&&ks(e),a=!r&&!i&&yl(e),s=!r&&!i&&!a&&Cl(e),o=r||i||a||s,n=o?y_(e.length,String):[],l=n.length;for(var c in e)(t||k_.call(e,c))&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||gf(c,l)))&&n.push(c);return n}function __(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var w_=Object.prototype,S_=w_.hasOwnProperty;function v_(e){if(!Fr(e))return __(e);var t=Us(e),r=[];for(var i in e)i=="constructor"&&(t||!S_.call(e,i))||r.push(i);return r}function mf(e){return Gs(e)?T_(e,!0):v_(e)}function B_(e){return m_(e,mf(e))}function L_(e,t,r,i,a,s,o){var n=xn(e,r),l=xn(t,r),c=o.get(l);if(c){Cn(e,r,c);return}var h=s?s(n,l,r+"",e,t,o):void 0,u=h===void 0;if(u){var p=Ts(l),d=!p&&yl(l),g=!p&&!d&&Cl(l);h=l,p||d||g?Ts(n)?h=n:AT(n)?h=TT(n):d?(u=!1,h=xT(l,!0)):g?(u=!1,h=kT(l,!0)):h=[]:NT(l)||ks(l)?(h=n,ks(n)?h=B_(n):(!Fr(n)||gl(n))&&(h=ST(l))):u=!1}u&&(o.set(l,h),a(h,l,i,s,o),o.delete(l)),Cn(e,r,h)}function yf(e,t,r,i,a){e!==t&&yT(t,function(s,o){if(a||(a=new xi),Fr(s))L_(e,t,o,r,yf,i,a);else{var n=i?i(xn(e,o),s,o+"",e,t,a):void 0;n===void 0&&(n=s),Cn(e,o,n)}},mf)}function Cf(e){return e}function F_(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var cc=Math.max;function A_(e,t,r){return t=cc(t===void 0?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=cc(i.length-t,0),o=Array(s);++a<s;)o[a]=i[t+a];a=-1;for(var n=Array(t+1);++a<t;)n[a]=i[a];return n[t]=r(o),F_(e,this,n)}}function E_(e){return function(){return e}}var M_=bs?function(e,t){return bs(e,"toString",{configurable:!0,enumerable:!1,value:E_(t),writable:!0})}:Cf,$_=800,O_=16,I_=Date.now;function D_(e){var t=0,r=0;return function(){var i=I_(),a=O_-(i-r);if(r=i,a>0){if(++t>=$_)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var P_=D_(M_);function R_(e,t){return P_(A_(e,t,Cf),e+"")}function N_(e,t,r){if(!Fr(r))return!1;var i=typeof t;return(i=="number"?Gs(r)&&gf(t,r.length):i=="string"&&t in r)?Hs(r[t],e):!1}function q_(e){return R_(function(t,r){var i=-1,a=r.length,s=a>1?r[a-1]:void 0,o=a>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(a--,s):void 0,o&&N_(r[0],r[1],o)&&(s=a<3?void 0:s,a=1),t=Object(t);++i<a;){var n=r[i];n&&e(t,n,i,s)}return t})}var z_=q_(function(e,t,r){yf(e,t,r)}),W_="",H_={curveBasis:en,curveBasisClosed:X1,curveBasisOpen:V1,curveBumpX:id,curveBumpY:ad,curveBundle:Z1,curveCardinalClosed:K1,curveCardinalOpen:Q1,curveCardinal:ld,curveCatmullRomClosed:J1,curveCatmullRomOpen:tk,curveCatmullRom:cd,curveLinear:Vi,curveLinearClosed:ek,curveMonotoneX:md,curveMonotoneY:yd,curveNatural:xd,curveStep:bd,curveStepAfter:Td,curveStepBefore:kd},Y_=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,j_=f(function(e,t){const r=xf(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);Ja(o),i=Ot(i,[...o])}else i=r.args;if(!i)return;let a=Hn(e,t);const s="config";return i[s]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[s],delete i[s]),i},"detectInit"),xf=f(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${Y_.source})(?=[}][%]{2}).*
`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),R.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const a=[];for(;(i=Gi.exec(e))!==null;)if(i.index===Gi.lastIndex&&Gi.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const s=i[1]?i[1]:i[2],o=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;a.push({type:s,args:o})}return a.length===0?{type:e,args:null}:a.length===1?a[0]:a}catch(r){return R.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),U_=f(function(e){return e.replace(Gi,"")},"removeDirectives"),G_=f(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function xl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return H_[r]??t}f(xl,"interpolateToCurve");function bf(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?p2.sanitizeUrl(r):r}f(bf,"formatUrl");var X_=f((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let s=window;for(let o=0;o<i;o++)if(s=s[r[o]],!s){R.error(`Function name: ${e} not found in window`);return}s[a](...t)},"runFunc");function bl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}f(bl,"distance");function kf(e){let t,r=0;e.forEach(a=>{r+=bl(a,t),t=a});const i=r/2;return kl(e,i)}f(kf,"traverseEdge");function Tf(e){return e.length===1?e[0]:kf(e)}f(Tf,"calcLabelPosition");var uc=f((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),kl=f((e,t)=>{let r,i=t;for(const a of e){if(r){const s=bl(a,r);if(s===0)return r;if(s<i)i-=s;else{const o=i/s;if(o<=0)return r;if(o>=1)return{x:a.x,y:a.y};if(o>0&&o<1)return{x:uc((1-o)*r.x+o*a.x,5),y:uc((1-o)*r.y+o*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),V_=f((e,t,r)=>{R.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const a=kl(t,25),s=e?10:5,o=Math.atan2(t[0].y-a.y,t[0].x-a.x),n={x:0,y:0};return n.x=Math.sin(o)*s+(t[0].x+a.x)/2,n.y=-Math.cos(o)*s+(t[0].y+a.y)/2,n},"calcCardinalityPosition");function _f(e,t,r){const i=structuredClone(r);R.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=25+e,s=kl(i,a),o=10+e*.5,n=Math.atan2(i[0].y-s.y,i[0].x-s.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+s.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+s.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+s.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+s.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+s.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+s.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+s.x)/2,l.y=-Math.cos(n)*o+(i[0].y+s.y)/2),l}f(_f,"calcTerminalLabelPosition");function wf(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}f(wf,"getStylesFromArray");var dc=0,Z_=f(()=>(dc++,"id-"+Math.random().toString(36).substr(2,12)+"-"+dc),"generateId");function Sf(e){let t="";const r="0123456789abcdef",i=r.length;for(let a=0;a<e;a++)t+=r.charAt(Math.floor(Math.random()*i));return t}f(Sf,"makeRandomHex");var K_=f(e=>Sf(e.length),"random"),Q_=f(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),J_=f(function(e,t){const r=t.text.replace(fa.lineBreakRegex," "),[,i]=Xs(t.fontSize),a=e.append("text");a.attr("x",t.x),a.attr("y",t.y),a.style("text-anchor",t.anchor),a.style("font-family",t.fontFamily),a.style("font-size",i),a.style("font-weight",t.fontWeight),a.attr("fill",t.fill),t.class!==void 0&&a.attr("class",t.class);const s=a.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),a},"drawSimpleText"),tw=Ca((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),fa.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let s="";return i.forEach((o,n)=>{const l=Ye(`${o} `,r),c=Ye(s,r);if(l>t){const{hyphenatedStrings:p,remainingWord:d}=ew(o,t,"-",r);a.push(s,...p),s=d}else c+l>=t?(a.push(s),s=o):s=[s,o].filter(Boolean).join(" ");n+1===i.length&&a.push(s)}),a.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),ew=Ca((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],s=[];let o="";return a.forEach((n,l)=>{const c=`${o}${n}`;if(Ye(c,i)>=t){const u=l+1,p=a.length===u,d=`${c}${r}`;s.push(p?c:d),o=""}else o=c}),{hyphenatedStrings:s,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function vf(e,t){return Tl(e,t).height}f(vf,"calculateTextHeight");function Ye(e,t){return Tl(e,t).width}f(Ye,"calculateTextWidth");var Tl=Ca((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,s]=Xs(r),o=["sans-serif",i],n=e.split(fa.lineBreakRegex),l=[],c=ct("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const p of o){let d=0;const g={width:0,height:0,lineHeight:0};for(const m of n){const y=Q_();y.text=m||W_;const x=J_(h,y).style("font-size",s).style("font-weight",a).style("font-family",p),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)),d=Math.round(b.height),g.height+=d,g.lineHeight=Math.round(Math.max(g.lineHeight,d))}l.push(g)}h.remove();const u=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[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),hi,rw=(hi=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},f(hi,"InitIDGenerator"),hi),Oa,iw=f(function(e){return Oa=Oa||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Oa.innerHTML=e,unescape(Oa.textContent)},"entityDecode");function _l(e){return"str"in e}f(_l,"isDetailedError");var aw=f((e,t,r,i)=>{if(!i)return;const a=e.node()?.getBBox();a&&e.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Xs=f(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function wl(e,t){return z_({},e,t)}f(wl,"cleanAndMerge");var ye={assignWithDepth:Ot,wrapLabel:tw,calculateTextHeight:vf,calculateTextWidth:Ye,calculateTextDimensions:Tl,cleanAndMerge:wl,detectInit:j_,detectDirective:xf,isSubstringInArray:G_,interpolateToCurve:xl,calcLabelPosition:Tf,calcCardinalityPosition:V_,calcTerminalLabelPosition:_f,formatUrl:bf,getStylesFromArray:wf,generateId:Z_,random:K_,runFunc:X_,entityDecode:iw,insertTitle:aw,isLabelCoordinateInPath:Bf,parseFontSize:Xs,InitIDGenerator:rw},sw=f(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),vr=f(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),OA=f((e,t,{counter:r=0,prefix:i,suffix:a},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function Pt(e){return e??null}f(Pt,"handleUndefinedAttr");function Bf(e,t){const r=Math.round(e.x),i=Math.round(e.y),a=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return a.includes(r.toString())||a.includes(i.toString())}f(Bf,"isLabelCoordinateInPath");var Sl=f(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function Lf(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(a=>new Promise(s=>{function o(){if(a.style.display="flex",a.style.flexDirection="column",i){const n=mt().fontSize?mt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[c=mu.fontSize]=Xs(n),h=c*l+"px";a.style.minWidth=h,a.style.maxWidth=h}else a.style.width="100%";s(a)}f(o,"setupImage"),setTimeout(()=>{a.complete&&o()}),a.addEventListener("error",o),a.addEventListener("load",o)})))}f(Lf,"configureLabelImages");var ow=f(e=>{const{handDrawnSeed:t}=mt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),bi=f(e=>{const t=nw([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),nw=f(e=>{const t=new Map;return e.forEach(r=>{const[i,a]=r.split(":");t.set(i.trim(),a?.trim())}),t},"styles2Map"),Ff=f(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),V=f(e=>{const{stylesArray:t}=bi(e),r=[],i=[],a=[],s=[];return t.forEach(o=>{const n=o[0];Ff(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&a.push(o.join(":")+" !important"),n==="fill"&&s.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:s}},"styles2String"),X=f((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=mt(),{nodeBorder:a,mainBkg:s}=r,{stylesMap:o}=bi(e);return Object.assign({roughness:.7,fill:o.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||a,seed:i,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:lw(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),lw=f(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const a=isNaN(t[0])?0:t[0];return[a,a]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const hw=Object.freeze({left:0,top:0,width:16,height:16}),_s=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Af=Object.freeze({...hw,..._s}),cw=Object.freeze({...Af,body:"",hidden:!1}),uw=Object.freeze({width:null,height:null}),dw=Object.freeze({...uw,..._s}),pw=(e,t,r,i="")=>{const a=e.split(":");if(e.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;i=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const n=a.pop(),l=a.pop(),c={provider:a.length>0?a[0]:i,prefix:l,name:n};return Fo(c)?c:null}const s=a[0],o=s.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return Fo(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:s};return Fo(n,r)?n:null}return null},Fo=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function fw(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function pc(e,t){const r=fw(e,t);for(const i in cw)i in _s?i in e&&!(i in r)&&(r[i]=_s[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function gw(e,t){const r=e.icons,i=e.aliases||Object.create(null),a=Object.create(null);function s(o){if(r[o])return a[o]=[];if(!(o in a)){a[o]=null;const n=i[o]&&i[o].parent,l=n&&s(n);l&&(a[o]=[n].concat(l))}return a[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),a}function fc(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let s={};function o(n){s=pc(i[n]||a[n],s)}return o(t),r.forEach(o),pc(e,s)}function mw(e,t){if(e.icons[t])return fc(e,t,[]);const r=gw(e,[t])[t];return r?fc(e,t,r):null}const yw=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Cw=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function gc(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(yw);if(i===null||!i.length)return e;const a=[];let s=i.shift(),o=Cw.test(s);for(;;){if(o){const n=parseFloat(s);isNaN(n)?a.push(s):a.push(Math.ceil(n*t*r)/r)}else a.push(s);if(s=i.shift(),s===void 0)return a.join("");o=!o}}function xw(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const a=e.indexOf(">",i),s=e.indexOf("</"+t);if(a===-1||s===-1)break;const o=e.indexOf(">",s);if(o===-1)break;r+=e.slice(a+1,s).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function bw(e,t){return e?"<defs>"+e+"</defs>"+t:t}function kw(e,t,r){const i=xw(e);return bw(i.defs,t+i.content+r)}const Tw=e=>e==="unset"||e==="undefined"||e==="none";function _w(e,t){const r={...Af,...e},i={...dw,...t},a={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let k=m.rotate;x?b?k+=2:(y.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),y.push("scale(-1 1)"),a.top=a.left=0):b&&(y.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),y.push("scale(1 -1)"),a.top=a.left=0);let _;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:_=a.height/2+a.top,y.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:y.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:_=a.width/2+a.left,y.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")");break}k%2===1&&(a.left!==a.top&&(_=a.left,a.left=a.top,a.top=_),a.width!==a.height&&(_=a.width,a.width=a.height,a.height=_)),y.length&&(s=kw(s,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=a.width,c=a.height;let h,u;o===null?(u=n===null?"1em":n==="auto"?c:n,h=gc(u,l/c)):(h=o==="auto"?l:o,u=n===null?gc(h,c/l):n==="auto"?c:n);const p={},d=(m,y)=>{Tw(y)||(p[m]=y.toString())};d("width",h),d("height",u);const g=[a.left,a.top,l,c];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:s}}const ww=/\sid="(\S+)"/g,mc=new Map;function Sw(e){e=e.replace(/[0-9]+$/,"")||"a";const t=mc.get(e)||0;return mc.set(e,t+1),t?`${e}${t}`:e}function vw(e){const t=[];let r;for(;r=ww.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(a=>{const s=Sw(a),o=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function Bw(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function vl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Mr=vl();function Ef(e){Mr=e}var Ki={exec:()=>null};function yt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(a,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(Xt.caret,"$1"),r=r.replace(a,o),i},getRegex:()=>new RegExp(r,t)};return i}var Lw=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Xt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Fw=/^(?:[ \t]*(?:\n|$))+/,Aw=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ew=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ba=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Mw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Bl=/(?:[*+-]|\d{1,9}[.)])/,Mf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,$f=yt(Mf).replace(/bull/g,Bl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),$w=yt(Mf).replace(/bull/g,Bl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ll=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ow=/^[^\n]+/,Fl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Iw=yt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Fl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Dw=yt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Bl).getRegex(),Vs="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Al=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Pw=yt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Al).replace("tag",Vs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Of=yt(Ll).replace("hr",ba).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Vs).getRegex(),Rw=yt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Of).getRegex(),El={blockquote:Rw,code:Aw,def:Iw,fences:Ew,heading:Mw,hr:ba,html:Pw,lheading:$f,list:Dw,newline:Fw,paragraph:Of,table:Ki,text:Ow},yc=yt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ba).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Vs).getRegex(),Nw={...El,lheading:$w,table:yc,paragraph:yt(Ll).replace("hr",ba).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",yc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Vs).getRegex()},qw={...El,html:yt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Al).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ki,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:yt(Ll).replace("hr",ba).replace("heading",` *#{1,6} *[^
]`).replace("lheading",$f).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},zw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ww=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,If=/^( {2,}|\\)\n(?!\s*$)/,Hw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Zs=/[\p{P}\p{S}]/u,Ml=/[\s\p{P}\p{S}]/u,Df=/[^\s\p{P}\p{S}]/u,Yw=yt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ml).getRegex(),Pf=/(?!~)[\p{P}\p{S}]/u,jw=/(?!~)[\s\p{P}\p{S}]/u,Uw=/(?:[^\s\p{P}\p{S}]|~)/u,Gw=yt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Lw?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Rf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Xw=yt(Rf,"u").replace(/punct/g,Zs).getRegex(),Vw=yt(Rf,"u").replace(/punct/g,Pf).getRegex(),Nf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Zw=yt(Nf,"gu").replace(/notPunctSpace/g,Df).replace(/punctSpace/g,Ml).replace(/punct/g,Zs).getRegex(),Kw=yt(Nf,"gu").replace(/notPunctSpace/g,Uw).replace(/punctSpace/g,jw).replace(/punct/g,Pf).getRegex(),Qw=yt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Df).replace(/punctSpace/g,Ml).replace(/punct/g,Zs).getRegex(),Jw=yt(/\\(punct)/,"gu").replace(/punct/g,Zs).getRegex(),tS=yt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),eS=yt(Al).replace("(?:-->|$)","-->").getRegex(),rS=yt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",eS).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ws=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,iS=yt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ws).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),qf=yt(/^!?\[(label)\]\[(ref)\]/).replace("label",ws).replace("ref",Fl).getRegex(),zf=yt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Fl).getRegex(),aS=yt("reflink|nolink(?!\\()","g").replace("reflink",qf).replace("nolink",zf).getRegex(),Cc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,$l={_backpedal:Ki,anyPunctuation:Jw,autolink:tS,blockSkip:Gw,br:If,code:Ww,del:Ki,emStrongLDelim:Xw,emStrongRDelimAst:Zw,emStrongRDelimUnd:Qw,escape:zw,link:iS,nolink:zf,punctuation:Yw,reflink:qf,reflinkSearch:aS,tag:rS,text:Hw,url:Ki},sS={...$l,link:yt(/^!?\[(label)\]\((.*?)\)/).replace("label",ws).getRegex(),reflink:yt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ws).getRegex()},bn={...$l,emStrongRDelimAst:Kw,emStrongLDelim:Vw,url:yt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Cc).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:yt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Cc).getRegex()},oS={...bn,br:yt(If).replace("{2,}","*").getRegex(),text:yt(bn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ia={normal:El,gfm:Nw,pedantic:qw},Mi={normal:$l,gfm:bn,breaks:oS,pedantic:sS},nS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},xc=e=>nS[e];function Se(e,t){if(t){if(Xt.escapeTest.test(e))return e.replace(Xt.escapeReplace,xc)}else if(Xt.escapeTestNoEncode.test(e))return e.replace(Xt.escapeReplaceNoEncode,xc);return e}function bc(e){try{e=encodeURI(e).replace(Xt.percentDecode,"%")}catch{return null}return e}function kc(e,t){let r=e.replace(Xt.findPipe,(s,o,n)=>{let l=!1,c=o;for(;--c>=0&&n[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(Xt.splitPipe),a=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;a<i.length;a++)i[a]=i[a].trim().replace(Xt.slashPipe,"|");return i}function $i(e,t,r){let i=e.length;if(i===0)return"";let a=0;for(;a<i&&e.charAt(i-a-1)===t;)a++;return e.slice(0,i-a)}function lS(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function Tc(e,t,r,i,a){let s=t.href,o=t.title||null,n=e[1].replace(a.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function hS(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let a=i[1];return t.split(`
`).map(s=>{let o=s.match(r.other.beginningSpace);if(o===null)return s;let[n]=o;return n.length>=a.length?s.slice(a.length):s}).join(`
`)}var Ss=class{options;rules;lexer;constructor(t){this.options=t||Mr}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:$i(i,`
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],a=hS(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:a}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let a=$i(i,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(i=a.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:$i(r[0],`
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=$i(r[0],`
`).split(`
`),a="",s="",o=[];for(;i.length>0;){let n=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),n=!0;else if(!n)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
`),u=h.replace(this.rules.other.blockquoteSetextReplace,`
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
${h}`:h,s=s?`${s}
${u}`:u;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=p,i.length===0)break;let d=o.at(-1);if(d?.type==="code")break;if(d?.type==="blockquote"){let g=d,m=g.raw+`
`+i.join(`
`),y=this.blockquote(m);o[o.length-1]=y,a=a.substring(0,a.length-g.raw.length)+y.raw,s=s.substring(0,s.length-g.text.length)+y.text;break}else if(d?.type==="list"){let g=d,m=g.raw+`
`+i.join(`
`),y=this.list(m);o[o.length-1]=y,a=a.substring(0,a.length-d.raw.length)+y.raw,s=s.substring(0,s.length-g.raw.length)+y.raw,i=m.substring(o.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:a,tokens:o,text:s}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),a=i.length>1,s={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");let o=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",u="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let p=r[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(`
`,1)[0],g=!p.trim(),m=0;if(this.options.pedantic?(m=2,u=p.trimStart()):g?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,u=p.slice(m),m+=r[1].length),g&&this.rules.other.blankLine.test(d)&&(h+=d+`
`,t=t.substring(d.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(m),k=this.rules.other.hrRegex(m),_=this.rules.other.fencesBeginRegex(m),w=this.rules.other.headingBeginRegex(m),v=this.rules.other.htmlBeginRegex(m);for(;t;){let E=t.split(`
`,1)[0],B;if(d=E,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),B=d):B=d.replace(this.rules.other.tabCharGlobal," "),_.test(d)||w.test(d)||v.test(d)||b.test(d)||k.test(d))break;if(B.search(this.rules.other.nonSpaceChar)>=m||!d.trim())u+=`
`+B.slice(m);else{if(g||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(p)||w.test(p)||k.test(p))break;u+=`
`+d}!g&&!d.trim()&&(g=!0),h+=E+`
`,t=t.substring(E.length+1),p=B.slice(m)}}s.loose||(n?s.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(x=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:u,tokens:[]}),s.raw+=h}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){let h=s.items[c].tokens.filter(p=>p.type==="space"),u=h.length>0&&h.some(p=>this.rules.other.anyLine.test(p.raw));s.loose=u}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:a,title:s}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=kc(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===a.length){for(let n of a)this.rules.other.tableAlignRight.test(n)?o.align.push("right"):this.rules.other.tableAlignCenter.test(n)?o.align.push("center"):this.rules.other.tableAlignLeft.test(n)?o.align.push("left"):o.align.push(null);for(let n=0;n<i.length;n++)o.header.push({text:i[n],tokens:this.lexer.inline(i[n]),header:!0,align:o.align[n]});for(let n of s)o.rows.push(kc(n,o.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[c]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=$i(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=lS(r[2],"()");if(o===-2)return;if(o>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let a=r[2],s="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(a);o&&(a=o[1],s=o[3])}else s=r[3]?r[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?a=a.slice(1):a=a.slice(1,-1)),Tc(r,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let a=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[a.toLowerCase()];if(!s){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return Tc(i,s,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let a=this.rules.inline.emStrongLDelim.exec(t);if(!(!a||a[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!i||this.rules.inline.punctuation.exec(i))){let s=[...a[0]].length-1,o,n,l=s,c=0,h=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+s);(a=h.exec(r))!=null;){if(o=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!o)continue;if(n=[...o].length,a[3]||a[4]){l+=n;continue}else if((a[5]||a[6])&&s%3&&!((s+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let u=[...a[0]][0].length,p=t.slice(0,s+a.index+u+n);if(Math.min(s,n)%2){let g=p.slice(1,-1);return{type:"em",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}let d=p.slice(2,-2);return{type:"strong",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(i),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return a&&s&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,a;return r[2]==="@"?(i=r[1],a="mailto:"+i):(i=r[1],a=i),{type:"link",raw:r[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,a;if(r[2]==="@")i=r[0],a="mailto:"+i;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(s!==r[0]);i=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},fe=class kn{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Mr,this.options.tokenizer=this.options.tokenizer||new Ss,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Xt,block:Ia.normal,inline:Mi.normal};this.options.pedantic?(r.block=Ia.pedantic,r.inline=Mi.pedantic):this.options.gfm&&(r.block=Ia.gfm,this.options.breaks?r.inline=Mi.breaks:r.inline=Mi.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ia,inline:Mi}}static lex(t,r){return new kn(r).lex(t)}static lexInline(t,r){return new kn(r).inlineTokens(t)}lex(t){t=t.replace(Xt.carriageReturn,`
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(Xt.tabCharGlobal," ").replace(Xt.spaceLine,""));t;){let a;if(this.options.extensions?.block?.some(o=>(a=o.call({lexer:this},t,r))?(t=t.substring(a.raw.length),r.push(a),!0):!1))continue;if(a=this.tokenizer.space(t)){t=t.substring(a.raw.length);let o=r.at(-1);a.raw.length===1&&o!==void 0?o.raw+=`
`:r.push(a);continue}if(a=this.tokenizer.code(t)){t=t.substring(a.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
`)?"":`
`)+a.raw,o.text+=`
`+a.text,this.inlineQueue.at(-1).src=o.text):r.push(a);continue}if(a=this.tokenizer.fences(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.heading(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.hr(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.blockquote(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.list(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.html(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.def(t)){t=t.substring(a.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
`)?"":`
`)+a.raw,o.text+=`
`+a.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},r.push(a));continue}if(a=this.tokenizer.table(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.lheading(t)){t=t.substring(a.raw.length),r.push(a);continue}let s=t;if(this.options.extensions?.startBlock){let o=1/0,n=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},n),typeof l=="number"&&l>=0&&(o=Math.min(o,l))}),o<1/0&&o>=0&&(s=t.substring(0,o+1))}if(this.state.top&&(a=this.tokenizer.paragraph(s))){let o=r.at(-1);i&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(`
`)?"":`
`)+a.raw,o.text+=`
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(a),i=s.length!==t.length,t=t.substring(a.raw.length);continue}if(a=this.tokenizer.text(t)){t=t.substring(a.raw.length);let o=r.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
`)?"":`
`)+a.raw,o.text+=`
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(a);continue}if(t){let o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,a=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,a.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)s=a[2]?a[2].length:0,i=i.slice(0,a.index+s)+"["+"a".repeat(a[0].length-s-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let o=!1,n="";for(;t;){o||(n=""),o=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,n)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,u=t.slice(1),p;this.options.extensions.startInline.forEach(d=>{p=d.call({lexer:this},u),typeof p=="number"&&p>=0&&(h=Math.min(h,p))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(n=l.raw.slice(-1)),o=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},vs=class{options;parser;constructor(t){this.options=t||Mr}space(t){return""}code({text:t,lang:r,escaped:i}){let a=(r||"").match(Xt.notSpaceStart)?.[0],s=t.replace(Xt.endingNewline,"")+`
`;return a?'<pre><code class="language-'+Se(a)+'">'+(i?s:Se(s,!0))+`</code></pre>
`:"<pre><code>"+(i?s:Se(s,!0))+`</code></pre>
`}blockquote({tokens:t}){return`<blockquote>
${this.parser.parse(t)}</blockquote>
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
`}hr(t){return`<hr>
`}list(t){let r=t.ordered,i=t.start,a="";for(let n=0;n<t.items.length;n++){let l=t.items[n];a+=this.listitem(l)}let s=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+s+o+`>
`+a+"</"+s+`>
`}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+Se(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
`}table(t){let r="",i="";for(let s=0;s<t.header.length;s++)i+=this.tablecell(t.header[s]);r+=this.tablerow({text:i});let a="";for(let s=0;s<t.rows.length;s++){let o=t.rows[s];i="";for(let n=0;n<o.length;n++)i+=this.tablecell(o[n]);a+=this.tablerow({text:i})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
<thead>
`+r+`</thead>
`+a+`</table>
`}tablerow({text:t}){return`<tr>
${t}</tr>
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Se(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let a=this.parser.parseInline(i),s=bc(t);if(s===null)return a;t=s;let o='<a href="'+t+'"';return r&&(o+=' title="'+Se(r)+'"'),o+=">"+a+"</a>",o}image({href:t,title:r,text:i,tokens:a}){a&&(i=this.parser.parseInline(a,this.parser.textRenderer));let s=bc(t);if(s===null)return Se(i);t=s;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${Se(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Se(t.text)}},Ol=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},ge=class Tn{options;renderer;textRenderer;constructor(t){this.options=t||Mr,this.options.renderer=this.options.renderer||new vs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ol}static parse(t,r){return new Tn(r).parse(t)}static parseInline(t,r){return new Tn(r).parseInline(t)}parse(t,r=!0){let i="";for(let a=0;a<t.length;a++){let s=t[a];if(this.options.extensions?.renderers?.[s.type]){let n=s,l=this.options.extensions.renderers[n.type].call({parser:this},n);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){i+=l||"";continue}}let o=s;switch(o.type){case"space":{i+=this.renderer.space(o);continue}case"hr":{i+=this.renderer.hr(o);continue}case"heading":{i+=this.renderer.heading(o);continue}case"code":{i+=this.renderer.code(o);continue}case"table":{i+=this.renderer.table(o);continue}case"blockquote":{i+=this.renderer.blockquote(o);continue}case"list":{i+=this.renderer.list(o);continue}case"html":{i+=this.renderer.html(o);continue}case"def":{i+=this.renderer.def(o);continue}case"paragraph":{i+=this.renderer.paragraph(o);continue}case"text":{let n=o,l=this.renderer.text(n);for(;a+1<t.length&&t[a+1].type==="text";)n=t[++a],l+=`
`+this.renderer.text(n);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let n='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}parseInline(t,r=this.renderer){let i="";for(let a=0;a<t.length;a++){let s=t[a];if(this.options.extensions?.renderers?.[s.type]){let n=this.options.extensions.renderers[s.type].call({parser:this},s);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=n||"";continue}}let o=s;switch(o.type){case"escape":{i+=r.text(o);break}case"html":{i+=r.html(o);break}case"link":{i+=r.link(o);break}case"image":{i+=r.image(o);break}case"strong":{i+=r.strong(o);break}case"em":{i+=r.em(o);break}case"codespan":{i+=r.codespan(o);break}case"br":{i+=r.br(o);break}case"del":{i+=r.del(o);break}case"text":{i+=r.text(o);break}default:{let n='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}},Hi=class{options;block;constructor(t){this.options=t||Mr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?fe.lex:fe.lexInline}provideParser(){return this.block?ge.parse:ge.parseInline}},cS=class{defaults=vl();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ge;Renderer=vs;TextRenderer=Ol;Lexer=fe;Tokenizer=Ss;Hooks=Hi;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let a of t)switch(i=i.concat(r.call(this,a)),a.type){case"table":{let s=a;for(let o of s.header)i=i.concat(this.walkTokens(o.tokens,r));for(let o of s.rows)for(let n of o)i=i.concat(this.walkTokens(n.tokens,r));break}case"list":{let s=a;i=i.concat(this.walkTokens(s.items,r));break}default:{let s=a;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(o=>{let n=s[o].flat(1/0);i=i.concat(this.walkTokens(n,r))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let a={...i};if(a.async=this.defaults.async||a.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let o=r.renderers[s.name];o?r.renderers[s.name]=function(...n){let l=s.renderer.apply(this,n);return l===!1&&(l=o.apply(this,n)),l}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[s.level];o?o.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),a.extensions=r),i.renderer){let s=this.defaults.renderer||new vs(this.defaults);for(let o in i.renderer){if(!(o in s))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let n=o,l=i.renderer[n],c=s[n];s[n]=(...h)=>{let u=l.apply(s,h);return u===!1&&(u=c.apply(s,h)),u||""}}a.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new Ss(this.defaults);for(let o in i.tokenizer){if(!(o in s))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let n=o,l=i.tokenizer[n],c=s[n];s[n]=(...h)=>{let u=l.apply(s,h);return u===!1&&(u=c.apply(s,h)),u}}a.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new Hi;for(let o in i.hooks){if(!(o in s))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let n=o,l=i.hooks[n],c=s[n];Hi.passThroughHooks.has(o)?s[n]=h=>{if(this.defaults.async&&Hi.passThroughHooksRespectAsync.has(o))return(async()=>{let p=await l.call(s,h);return c.call(s,p)})();let u=l.call(s,h);return c.call(s,u)}:s[n]=(...h)=>{if(this.defaults.async)return(async()=>{let p=await l.apply(s,h);return p===!1&&(p=await c.apply(s,h)),p})();let u=l.apply(s,h);return u===!1&&(u=c.apply(s,h)),u}}a.hooks=s}if(i.walkTokens){let s=this.defaults.walkTokens,o=i.walkTokens;a.walkTokens=function(n){let l=[];return l.push(o.call(this,n)),s&&(l=l.concat(s.call(this,n))),l}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return fe.lex(t,r??this.defaults)}parser(t,r){return ge.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let a={...i},s={...this.defaults,...a},o=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&a.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let n=s.hooks?await s.hooks.preprocess(r):r,l=await(s.hooks?await s.hooks.provideLexer():t?fe.lex:fe.lexInline)(n,s),c=s.hooks?await s.hooks.processAllTokens(l):l;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let h=await(s.hooks?await s.hooks.provideParser():t?ge.parse:ge.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(h):h})().catch(o);try{s.hooks&&(r=s.hooks.preprocess(r));let n=(s.hooks?s.hooks.provideLexer():t?fe.lex:fe.lexInline)(r,s);s.hooks&&(n=s.hooks.processAllTokens(n)),s.walkTokens&&this.walkTokens(n,s.walkTokens);let l=(s.hooks?s.hooks.provideParser():t?ge.parse:ge.parseInline)(n,s);return s.hooks&&(l=s.hooks.postprocess(l)),l}catch(n){return o(n)}}}onError(t,r){return i=>{if(i.message+=`
Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error occurred:</p><pre>"+Se(i.message+"",!0)+"</pre>";return r?Promise.resolve(a):a}if(r)return Promise.reject(i);throw i}}},Br=new cS;function Ct(e,t){return Br.parse(e,t)}Ct.options=Ct.setOptions=function(e){return Br.setOptions(e),Ct.defaults=Br.defaults,Ef(Ct.defaults),Ct};Ct.getDefaults=vl;Ct.defaults=Mr;Ct.use=function(...e){return Br.use(...e),Ct.defaults=Br.defaults,Ef(Ct.defaults),Ct};Ct.walkTokens=function(e,t){return Br.walkTokens(e,t)};Ct.parseInline=Br.parseInline;Ct.Parser=ge;Ct.parser=ge.parse;Ct.Renderer=vs;Ct.TextRenderer=Ol;Ct.Lexer=fe;Ct.lexer=fe.lex;Ct.Tokenizer=Ss;Ct.Hooks=Hi;Ct.parse=Ct;Ct.options;Ct.setOptions;Ct.use;Ct.walkTokens;Ct.parseInline;ge.parse;fe.lex;function Wf(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var a=i.reduce(function(n,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?n.concat(c.map(function(h){var u,p;return(p=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&p!==void 0?p:0})):n},[]);if(a.length){var s=new RegExp(`
[ ]{`+Math.min.apply(Math,a)+"}","g");i=i.map(function(n){return n.replace(s,`
`)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(n,l){var c=o.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=n;typeof n=="string"&&n.includes(`
`)&&(u=String(n).split(`
`).map(function(p,d){return d===0?p:""+h+p}).join(`
`)),o+=u+i[l+1]}),o}var uS={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},_n=new Map,Hf=new Map,dS=f(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(R.debug("Registering icon pack:",t.name),"loader"in t)Hf.set(t.name,t.loader);else if("icons"in t)_n.set(t.name,t.icons);else throw R.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Yf=f(async(e,t)=>{const r=pw(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let a=_n.get(i);if(!a){const o=Hf.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await o(),prefix:i},_n.set(i,a)}catch(n){throw R.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=mw(a,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),pS=f(async e=>{try{return await Yf(e),!0}catch{return!1}},"isIconAvailable"),ka=f(async(e,t,r)=>{let i;try{i=await Yf(e,t?.fallbackPrefix)}catch(o){R.error(o),i=uS}const a=_w(i,t),s=Bw(vw(a.body),{...a.attributes,...r});return be(s,wt())},"getIconSVG");function jf(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
`).replace(/\n{2,}/g,`
`);return Wf(i)}f(jf,"preprocessMarkdown");function Uf(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}f(Uf,"nonMarkdownToLines");function Gf(e,t={}){const r=jf(e,t),i=Ct.lexer(r),a=[[]];let s=0;function o(n,l="normal"){n.type==="text"?n.text.split(`
`).forEach((h,u)=>{u!==0&&(s++,a.push([])),h.split(" ").forEach(p=>{p=p.replace(/&#39;/g,"'"),p&&a[s].push({content:p,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{o(c,n.type)}):n.type==="html"&&a[s].push({content:n.text,type:"normal"})}return f(o,"processNode"),i.forEach(n=>{n.type==="paragraph"?n.tokens?.forEach(l=>{o(l)}):n.type==="html"?a[s].push({content:n.text,type:"normal"}):a[s].push({content:n.raw,type:"normal"})}),a}f(Gf,"markdownToLines");function Xf(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}f(Xf,"nonMarkdownToHTML");function Vf(e,{markdownAutoWrap:t}={}){const r=Ct.lexer(e);function i(a){return a.type==="text"?t===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${a.tokens?.map(i).join("")}</strong>`:a.type==="em"?`<em>${a.tokens?.map(i).join("")}</em>`:a.type==="paragraph"?`<p>${a.tokens?.map(i).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(R.warn(`Unsupported markdown: ${a.type}`),a.raw)}return f(i,"output"),r.map(i).join("")}f(Vf,"markdownToHTML");function Zf(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}f(Zf,"splitTextToChars");function Kf(e,t){const r=Zf(t.content);return Il(e,[],r,t.type)}f(Kf,"splitWordToFitWidth");function Il(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[a,...s]=r,o=[...t,a];return e([{content:o.join(""),type:i}])?Il(e,o,s,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}f(Il,"splitWordToFitWidthRecursion");function Qf(e,t){if(e.some(({content:r})=>r.includes(`
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Bs(e,t)}f(Qf,"splitLineToFitWidth");function Bs(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let a="";e[0].content===" "&&(a=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},o=[...i];if(a!==""&&o.push({content:a,type:"normal"}),o.push(s),t(o))return Bs(e,t,r,o);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[n,l]=Kf(t,s);r.push([n]),l.content&&e.unshift(l)}return Bs(e,t,r)}f(Bs,"splitLineToFitWidthRecursion");function wn(e,t){t&&e.attr("style",t)}f(wn,"applyStyle");var _c=16384;async function Jf(e,t,r,i,a=!1,s=wt()){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,_c)}px`),o.attr("height",`${Math.min(10*r,_c)}px`);const n=o.append("xhtml:div"),l=Ji(t.label)?await Su(t.label.replace(fa.lineBreakRegex,`
`),s):be(t.label,s),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(l),wn(h,t.labelStyle),h.attr("class",`${c} ${i}`),wn(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&n.attr("class","labelBkg");let u=n.node().getBoundingClientRect();return u.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),u=n.node().getBoundingClientRect()),o.node()}f(Jf,"addHtmlSpan");function Ks(e,t,r,i=!1){const a=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&a.attr("text-anchor","middle"),a}f(Ks,"createTspan");function tg(e,t,r){const i=e.append("text"),a=Ks(i,1,t);Qs(a,r);const s=a.node().getComputedTextLength();return i.remove(),s}f(tg,"computeWidthOfText");function fS(e,t,r){const i=e.append("text"),a=Ks(i,1,t);Qs(a,[{content:r,type:"normal"}]);const s=a.node()?.getBoundingClientRect();return s&&i.remove(),s}f(fS,"computeDimensionOfText");function eg(e,t,r,i=!1,a=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");a&&l.attr("text-anchor","middle");let c=0;for(const h of r){const u=f(d=>tg(o,1.1,d)<=e,"checkWidth"),p=u(h)?[h]:Qf(h,u);for(const d of p){const g=Ks(l,c,1.1,a);Qs(g,d),c++}}if(i){const h=l.node().getBBox(),u=2;return n.attr("x",h.x-u).attr("y",h.y-u).attr("width",h.width+2*u).attr("height",h.height+2*u),o.node()}else return l.node()}f(eg,"createFormattedText");function Sn(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}f(Sn,"decodeHTMLEntities");function Qs(e,t){e.text(""),t.forEach((r,i)=>{const a=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?a.text(Sn(r.content)):a.text(" "+Sn(r.content))})}f(Qs,"updateTextContentAndStyles");async function rg(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,s,o)=>(r.push((async()=>{const n=`${s}:${o}`;return await pS(n)?await ka(n,void 0,{class:"label-icon"}):`<i class='${be(a,t).replace(":"," ")}'></i>`})()),a));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}f(rg,"replaceIconSubstring");var Xe=f(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:s=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(R.debug("XYZ createText",t,r,i,a,s,n,"addSvgBackground: ",c),s){const u=o?Vf(t,h):Xf(t),p=await rg(vr(u),h),d=t.replace(/\\\\/g,"\\"),g={isNode:n,label:Ji(t)?d:p,labelStyle:r.replace("fill:","color:")};return await Jf(e,g,l,a,c,h)}else{const u=vr(t.replace(/<br\s*\/?>/g,"<br/>")),p=o?Gf(u.replace("<br>","<br/>"),h):Uf(u),d=eg(l,e,p,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ct(d).attr("style",g)}else{const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ct(d).select("rect").attr("style",g.replace(/background:/g,"fill:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ct(d).select("text").attr("style",m)}return i?ct(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ct(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function Ao(e,t,r){if(e&&e.length){const[i,a]=t,s=Math.PI/180*r,o=Math.cos(s),n=Math.sin(s);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-a)*n+i,l[1]=(c-i)*n+(h-a)*o+a}}}function gS(e,t){return e[0]===t[0]&&e[1]===t[1]}function mS(e,t,r,i=1){const a=r,s=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(a)for(const c of o)Ao(c,n,a);const l=(function(c,h,u){const p=[];for(const b of c){const k=[...b];gS(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&p.push(k)}const d=[];h=Math.max(h,.1);const g=[];for(const b of p)for(let k=0;k<b.length-1;k++){const _=b[k],w=b[k+1];if(_[1]!==w[1]){const v=Math.min(_[1],w[1]);g.push({ymin:v,ymax:Math.max(_[1],w[1]),x:v===_[1]?_[0]:w[0],islope:(w[0]-_[0])/(w[1]-_[1])})}}if(g.sort(((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax))),!g.length)return d;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let k=0;k<g.length&&!(g[k].ymin>y);k++)b=k;g.splice(0,b+1).forEach((k=>{m.push({s:y,edge:k})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(u!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const k=b+1;if(k>=m.length)break;const _=m[b].edge,w=m[k].edge;d.push([[Math.round(_.x),y],[Math.round(w.x),y]])}y+=u,m.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),x++}return d})(o,s,i);if(a){for(const c of o)Ao(c,n,-a);(function(c,h,u){const p=[];c.forEach((d=>p.push(...d))),Ao(p,h,u)})(l,n,-a)}return l}function Ta(e,t){var r;const i=t.hachureAngle+90;let a=t.hachureGap;a<0&&(a=4*t.strokeWidth),a=Math.round(Math.max(a,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=a),mS(e,a,i,s||1)}class Dl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Ta(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const a of t)i.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return i}}function Js(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class yS extends Dl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=Ta(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(s),l=.5*i*Math.sin(s);for(const[c,h]of a)Js([c,h])&&o.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class CS extends Dl{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,a);return i.ops=i.ops.concat(s.ops),i}}class xS{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ta(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const o=a/4;for(const n of t){const l=Js(n),c=l/a,h=Math.ceil(c)-1,u=l-h*a,p=(n[0][0]+n[1][0])/2-a/4,d=Math.min(n[0][1],n[1][1]);for(let g=0;g<h;g++){const m=d+u+g*a,y=p-o+2*Math.random()*o,x=m-o+2*Math.random()*o,b=this.helper.ellipse(y,x,s,s,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class bS{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ta(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,s=[];return t.forEach((o=>{const n=Js(o),l=Math.floor(n/(i+a)),c=(n+a-l*(i+a))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const p=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<l;d++){const g=d*(i+a),m=g+i,y=[h[0]+g*Math.cos(p)+c*Math.cos(p),h[1]+g*Math.sin(p)+c*Math.sin(p)],x=[h[0]+m*Math.cos(p)+c*Math.cos(p),h[1]+m*Math.sin(p)+c*Math.sin(p)];s.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}})),s}}class kS{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?i:r.zigzagOffset,s=Ta(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(s,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach((s=>{const o=Js(s),n=Math.round(o/(2*r));let l=s[0],c=s[1];l[0]>c[0]&&(l=s[1],c=s[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<n;u++){const p=2*u*r,d=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+p*Math.cos(h),l[1]+p*Math.sin(h)],y=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];a.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}})),a}}const Qt={};class TS{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const _S=0,Eo=1,wc=2,Da={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Mo(e,t){return e.type===t}function Pl(e){const t=[],r=(function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:_S,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Eo,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:wc,text:""},n})(e);let i="BOD",a=0,s=r[a];for(;!Mo(s,wc);){let o=0;const n=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return Pl("M0,0"+e);a++,o=Da[s.text],i=s.text}else Mo(s,Eo)?o=Da[i]:(a++,o=Da[s.text],i=s.text);if(!(a+o<r.length))throw new Error("Path data ended short");for(let l=a;l<a+o;l++){const c=r[l];if(!Mo(c,Eo))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof Da[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),a+=o,s=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function ig(e){let t=0,r=0,i=0,a=0;const s=[];for(const{key:o,data:n}of e)switch(o){case"M":s.push({key:"M",data:[...n]}),[t,r]=n,[i,a]=n;break;case"m":t+=n[0],r+=n[1],s.push({key:"M",data:[t,r]}),i=t,a=r;break;case"L":s.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],s.push({key:"L",data:[t,r]});break;case"C":s.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":s.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":s.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],s.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":s.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":s.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=a}return s}function ag(e){const t=[];let r="",i=0,a=0,s=0,o=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,a]=h,[s,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],a=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,a]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,a]});break;case"V":a=h[0],t.push({key:"L",data:[i,a]});break;case"S":{let u=0,p=0;r==="C"||r==="S"?(u=i+(i-n),p=a+(a-l)):(u=i,p=a),t.push({key:"C",data:[u,p,...h]}),n=h[0],l=h[1],i=h[2],a=h[3];break}case"T":{const[u,p]=h;let d=0,g=0;r==="Q"||r==="T"?(d=i+(i-n),g=a+(a-l)):(d=i,g=a);const m=i+2*(d-i)/3,y=a+2*(g-a)/3,x=u+2*(d-u)/3,b=p+2*(g-p)/3;t.push({key:"C",data:[m,y,x,b,u,p]}),n=d,l=g,i=u,a=p;break}case"Q":{const[u,p,d,g]=h,m=i+2*(u-i)/3,y=a+2*(p-a)/3,x=d+2*(u-d)/3,b=g+2*(p-g)/3;t.push({key:"C",data:[m,y,x,b,d,g]}),n=u,l=p,i=d,a=g;break}case"A":{const u=Math.abs(h[0]),p=Math.abs(h[1]),d=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||p===0?(t.push({key:"C",data:[i,a,y,x,y,x]}),i=y,a=x):(i!==y||a!==x)&&(sg(i,a,y,x,u,p,d,g,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,a=x);break}case"Z":t.push({key:"Z",data:[]}),i=s,a=o}r=c}return t}function Oi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function sg(e,t,r,i,a,s,o,n,l,c){const h=(u=o,Math.PI*u/180);var u;let p=[],d=0,g=0,m=0,y=0;if(c)[d,g,m,y]=c;else{[e,t]=Oi(e,t,-h),[r,i]=Oi(r,i,-h);const z=(e-r)/2,I=(t-i)/2;let F=z*z/(a*a)+I*I/(s*s);F>1&&(F=Math.sqrt(F),a*=F,s*=F);const L=a*a,M=s*s,P=L*M-L*I*I-M*z*z,H=L*I*I+M*z*z,Y=(n===l?-1:1)*Math.sqrt(Math.abs(P/H));m=Y*a*I/s+(e+r)/2,y=Y*-s*z/a+(t+i)/2,d=Math.asin(parseFloat(((t-y)/s).toFixed(9))),g=Math.asin(parseFloat(((i-y)/s).toFixed(9))),e<m&&(d=Math.PI-d),r<m&&(g=Math.PI-g),d<0&&(d=2*Math.PI+d),g<0&&(g=2*Math.PI+g),l&&d>g&&(d-=2*Math.PI),!l&&g>d&&(g-=2*Math.PI)}let x=g-d;if(Math.abs(x)>120*Math.PI/180){const z=g,I=r,F=i;g=l&&g>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,p=sg(r=m+a*Math.cos(g),i=y+s*Math.sin(g),I,F,a,s,o,0,l,[g,z,m,y])}x=g-d;const b=Math.cos(d),k=Math.sin(d),_=Math.cos(g),w=Math.sin(g),v=Math.tan(x/4),E=4/3*a*v,B=4/3*s*v,N=[e,t],D=[e+E*k,t-B*b],O=[r+E*w,i-B*_],W=[r,i];if(D[0]=2*N[0]-D[0],D[1]=2*N[1]-D[1],c)return[D,O,W].concat(p);{p=[D,O,W].concat(p);const z=[];for(let I=0;I<p.length;I+=3){const F=Oi(p[I][0],p[I][1],h),L=Oi(p[I+1][0],p[I+1][1],h),M=Oi(p[I+2][0],p[I+2][1],h);z.push([F[0],F[1],L[0],L[1],M[0],M[1]])}return z}}const wS={randOffset:function(e,t){return st(e,t)},randOffsetWithRange:function(e,t,r){return Ls(e,t,r)},ellipse:function(e,t,r,i,a){const s=ng(r,i,a);return vn(e,t,a,s).opset},doubleLineOps:function(e,t,r,i,a){return ar(e,t,r,i,a,!0)}};function og(e,t,r,i,a){return{type:"path",ops:ar(e,t,r,i,a)}}function Va(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let s=0;s<i-1;s++)a.push(...ar(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&a.push(...ar(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?og(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function SS(e,t,r,i,a){return(function(s,o){return Va(s,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],a)}function Sc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Pa(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:Pa(r[0],1.5*(1+.22*t.roughness),Lc(t));for(let s=1;s<r.length;s++){const o=r[s];if(o.length){const n=Pa(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Pa(o,1.5*(1+.22*t.roughness),Lc(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&a.push(c)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function ng(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),s=2*Math.PI/a;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=st(o*l,r),n+=st(n*l,r),{increment:s,rx:o,ry:n}}function vn(e,t,r,i){const[a,s]=Fc(i.increment,e,t,i.rx,i.ry,1,i.increment*Ls(.1,Ls(.4,1,r),r),r);let o=Fs(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Fc(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Fs(n,null,r);o=o.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:o}}}function vc(e,t,r,i,a,s,o,n,l){const c=e,h=t;let u=Math.abs(r/2),p=Math.abs(i/2);u+=st(.01*u,l),p+=st(.01*p,l);let d=a,g=s;for(;d<0;)d+=2*Math.PI,g+=2*Math.PI;g-d>2*Math.PI&&(d=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-d)/2),x=Ac(y,c,h,u,p,d,g,1,l);if(!l.disableMultiStroke){const b=Ac(y,c,h,u,p,d,g,1.5,l);x.push(...b)}return o&&(n?x.push(...ar(c,h,c+u*Math.cos(d),h+p*Math.sin(d),l),...ar(c,h,c+u*Math.cos(g),h+p*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+p*Math.sin(d)]})),{type:"path",ops:x}}function Bc(e,t){const r=ag(ig(Pl(e))),i=[];let a=[0,0],s=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":s=[n[0],n[1]],a=[n[0],n[1]];break;case"L":i.push(...ar(s[0],s[1],n[0],n[1],t)),s=[n[0],n[1]];break;case"C":{const[l,c,h,u,p,d]=n;i.push(...vS(l,c,h,u,p,d,s,t)),s=[p,d];break}case"Z":i.push(...ar(s[0],s[1],a[0],a[1],t)),s=[a[0],a[1]]}return{type:"path",ops:i}}function $o(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+st(a,t),i[0][1]+st(a,t)]});for(let o=1;o<s;o++)r.push({op:"lineTo",data:[i[o][0]+st(a,t),i[o][1]+st(a,t)]})}}return{type:"fillPath",ops:r}}function Nr(e,t){return(function(r,i){let a=r.fillStyle||"hachure";if(!Qt[a])switch(a){case"zigzag":Qt[a]||(Qt[a]=new yS(i));break;case"cross-hatch":Qt[a]||(Qt[a]=new CS(i));break;case"dots":Qt[a]||(Qt[a]=new xS(i));break;case"dashed":Qt[a]||(Qt[a]=new bS(i));break;case"zigzag-line":Qt[a]||(Qt[a]=new kS(i));break;default:a="hachure",Qt[a]||(Qt[a]=new Dl(i))}return Qt[a]})(t,wS).fillPolygons(e,t)}function Lc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function lg(e){return e.randomizer||(e.randomizer=new TS(e.seed||0)),e.randomizer.next()}function Ls(e,t,r,i=1){return r.roughness*i*(lg(r)*(t-e)+e)}function st(e,t,r=1){return Ls(-e,e,t,r)}function ar(e,t,r,i,a,s=!1){const o=s?a.disableMultiStrokeFill:a.disableMultiStroke,n=Bn(e,t,r,i,a,!0,!1);if(o)return n;const l=Bn(e,t,r,i,a,!0,!0);return n.concat(l)}function Bn(e,t,r,i,a,s,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=a.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const u=h/2,p=.2+.2*lg(a);let d=a.bowing*a.maxRandomnessOffset*(i-t)/200,g=a.bowing*a.maxRandomnessOffset*(e-r)/200;d=st(d,a,c),g=st(g,a,c);const m=[],y=()=>st(u,a,c),x=()=>st(h,a,c),b=a.preserveVertices;return o?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:st(h,a,c)),t+(b?0:st(h,a,c))]}),o?m.push({op:"bcurveTo",data:[d+e+(r-e)*p+y(),g+t+(i-t)*p+y(),d+e+2*(r-e)*p+y(),g+t+2*(i-t)*p+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[d+e+(r-e)*p+x(),g+t+(i-t)*p+x(),d+e+2*(r-e)*p+x(),g+t+2*(i-t)*p+x(),r+(b?0:x()),i+(b?0:x())]}),m}function Pa(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+st(t,r),e[0][1]+st(t,r)]),i.push([e[0][0]+st(t,r),e[0][1]+st(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+st(t,r),e[a][1]+st(t,r)]),a===e.length-1&&i.push([e[a][0]+st(t,r),e[a][1]+st(t,r)]);return Fs(i,null,r)}function Fs(e,t,r){const i=e.length,a=[];if(i>3){const s=[],o=1-r.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*e[n+1][0]-o*e[n-1][0])/6,l[1]+(o*e[n+1][1]-o*e[n-1][1])/6],s[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],s[3]=[e[n+1][0],e[n+1][1]],a.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}}else i===3?(a.push({op:"move",data:[e[1][0],e[1][1]]}),a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&a.push(...Bn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return a}function Fc(e,t,r,i,a,s,o,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+a*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+a*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+a*Math.sin(0)]),c.push([t+i*Math.cos(e),r+a*Math.sin(e)])}else{const h=st(.5,n)-Math.PI/2;c.push([st(s,n)+t+.9*i*Math.cos(h-e),st(s,n)+r+.9*a*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let p=h;p<u;p+=e){const d=[st(s,n)+t+i*Math.cos(p),st(s,n)+r+a*Math.sin(p)];l.push(d),c.push(d)}c.push([st(s,n)+t+i*Math.cos(h+2*Math.PI+.5*o),st(s,n)+r+a*Math.sin(h+2*Math.PI+.5*o)]),c.push([st(s,n)+t+.98*i*Math.cos(h+o),st(s,n)+r+.98*a*Math.sin(h+o)]),c.push([st(s,n)+t+.9*i*Math.cos(h+.5*o),st(s,n)+r+.9*a*Math.sin(h+.5*o)])}return[c,l]}function Ac(e,t,r,i,a,s,o,n,l){const c=s+st(.1,l),h=[];h.push([st(n,l)+t+.9*i*Math.cos(c-e),st(n,l)+r+.9*a*Math.sin(c-e)]);for(let u=c;u<=o;u+=e)h.push([st(n,l)+t+i*Math.cos(u),st(n,l)+r+a*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),Fs(h,null,l)}function vS(e,t,r,i,a,s,o,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const u=n.disableMultiStroke?1:2,p=n.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(p?0:st(c[0],n)),o[1]+(p?0:st(c[0],n))]}),h=p?[a,s]:[a+st(c[d],n),s+st(c[d],n)],l.push({op:"bcurveTo",data:[e+st(c[d],n),t+st(c[d],n),r+st(c[d],n),i+st(c[d],n),h[0],h[1]]});return l}function Ii(e){return[...e]}function Ec(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(Ii(e[0]),Ii(e[1]),Ii(e[2]),Ii(e[2]));else{const a=[];a.push(e[0],e[0]);for(let n=1;n<e.length;n++)a.push(e[n]),n===e.length-1&&a.push(e[n]);const s=[],o=1-t;i.push(Ii(a[0]));for(let n=1;n+2<a.length;n++){const l=a[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*a[n+1][0]-o*a[n-1][0])/6,l[1]+(o*a[n+1][1]-o*a[n-1][1])/6],s[2]=[a[n+1][0]+(o*a[n][0]-o*a[n+2][0])/6,a[n+1][1]+(o*a[n][1]-o*a[n+2][1])/6],s[3]=[a[n+1][0],a[n+1][1]],i.push(s[1],s[2],s[3])}}return i}function Za(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function BS(e,t,r){const i=Za(t,r);if(i===0)return Za(e,t);let a=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return a=Math.max(0,Math.min(1,a)),Za(e,pr(t,r,a))}function pr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Ln(e,t,r,i){const a=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],u=n[l+2],p=n[l+3];let d=3*h[0]-2*c[0]-p[0];d*=d;let g=3*h[1]-2*c[1]-p[1];g*=g;let m=3*u[0]-2*p[0]-c[0];m*=m;let y=3*u[1]-2*p[1]-c[1];return y*=y,d<m&&(d=m),g<y&&(g=y),d+g})(e,t)<r){const n=e[t+0];a.length?(s=a[a.length-1],o=n,Math.sqrt(Za(s,o))>1&&a.push(n)):a.push(n),a.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],p=pr(l,c,.5),d=pr(c,h,.5),g=pr(h,u,.5),m=pr(p,d,.5),y=pr(d,g,.5),x=pr(m,y,.5);Ln([l,p,m,x],0,r,a),Ln([x,y,g,u],0,r,a)}var s,o;return a}function LS(e,t){return As(e,0,e.length,t)}function As(e,t,r,i,a){const s=a||[],o=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=BS(e[h],o,n);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(As(e,t,c+1,i,s),As(e,c,r,i,s)):(s.length||s.push(o),s.push(n)),s}function Oo(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let s=0;s<a;s++)Ln(e,3*s,t,i);return r&&r>0?As(i,0,i.length,r):i}const se="none";class Es{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,a,s){const o=this._o(s);return this._d("line",[og(t,r,i,a,o)],o)}rectangle(t,r,i,a,s){const o=this._o(s),n=[],l=SS(t,r,i,a,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+a],[t,r+a]];o.fillStyle==="solid"?n.push($o([c],o)):n.push(Nr([c],o))}return o.stroke!==se&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,a,s){const o=this._o(s),n=[],l=ng(i,a,o),c=vn(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=vn(t,r,o,l).opset;h.type="fillPath",n.push(h)}else n.push(Nr([c.estimatedPoints],o));return o.stroke!==se&&n.push(c.opset),this._d("ellipse",n,o)}circle(t,r,i,a){const s=this.ellipse(t,r,i,i,a);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Va(t,!1,i)],i)}arc(t,r,i,a,s,o,n=!1,l){const c=this._o(l),h=[],u=vc(t,r,i,a,s,o,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const p=Object.assign({},c);p.disableMultiStroke=!0;const d=vc(t,r,i,a,s,o,!0,!1,p);d.type="fillPath",h.push(d)}else h.push((function(p,d,g,m,y,x,b){const k=p,_=d;let w=Math.abs(g/2),v=Math.abs(m/2);w+=st(.01*w,b),v+=st(.01*v,b);let E=y,B=x;for(;E<0;)E+=2*Math.PI,B+=2*Math.PI;B-E>2*Math.PI&&(E=0,B=2*Math.PI);const N=(B-E)/b.curveStepCount,D=[];for(let O=E;O<=B;O+=N)D.push([k+w*Math.cos(O),_+v*Math.sin(O)]);return D.push([k+w*Math.cos(B),_+v*Math.sin(B)]),D.push([k,_]),Nr([D],b)})(t,r,i,a,s,o,c));return c.stroke!==se&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),a=[],s=Sc(t,i);if(i.fill&&i.fill!==se)if(i.fillStyle==="solid"){const o=Sc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...Oo(Ec([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...Oo(Ec(c),10,(1+i.roughness)/2))}o.length&&a.push(Nr([o],i))}return i.stroke!==se&&a.push(s),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],s=Va(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push($o([t],i)):a.push(Nr([t],i))),i.stroke!==se&&a.push(s),this._d("polygon",a,i)}path(t,r){const i=this._o(r),a=[];if(!t)return this._d("path",a,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==se,o=i.stroke!==se,n=!!(i.simplification&&i.simplification<1),l=(function(h,u,p){const d=ag(ig(Pl(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...Oo(x,u)),x=[]},k=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:w,data:v}of d)switch(w){case"M":k(),y=[v[0],v[1]],m.push(y);break;case"L":b(),m.push([v[0],v[1]]);break;case"C":if(!x.length){const E=m.length?m[m.length-1]:y;x.push([E[0],E[1]])}x.push([v[0],v[1]]),x.push([v[2],v[3]]),x.push([v[4],v[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(k(),!p)return g;const _=[];for(const w of g){const v=LS(w,p);v.length&&_.push(v)}return _})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=Bc(t,i);if(s)if(i.fillStyle==="solid")if(l.length===1){const h=Bc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else a.push($o(l,i));else a.push(Nr(l,i));return o&&(n?l.forEach((h=>{a.push(Va(h,!1,i))})):a.push(c)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const s=typeof r=="number"&&r>=0?a.data.map((o=>+o.toFixed(r))):a.data;switch(a.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,a=[];for(const s of r){let o=null;switch(s.type){case"path":o={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:se};break;case"fillPath":o={d:this.opsToPath(s),stroke:se,strokeWidth:0,fill:i.fill||se};break;case"fillSketch":o=this.fillSketch(s,i)}o&&a.push(o)}return a}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||se,strokeWidth:i,fill:se}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class FS{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Es(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":a.save(),a.strokeStyle=i.stroke==="none"?"transparent":i.stroke,a.lineWidth=i.strokeWidth,i.strokeLineDash&&a.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(a.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(a,o,s),a.restore();break;case"fillPath":{a.save(),a.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,o,s,n),a.restore();break}case"fillSketch":this.fillSketch(a,o,i)}}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=a,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,a="nonzero"){t.beginPath();for(const s of r.ops){const o=typeof i=="number"&&i>=0?s.data.map((n=>+n.toFixed(i))):s.data;switch(s.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(a):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,a,s){const o=this.gen.line(t,r,i,a,s);return this.draw(o),o}rectangle(t,r,i,a,s){const o=this.gen.rectangle(t,r,i,a,s);return this.draw(o),o}ellipse(t,r,i,a,s){const o=this.gen.ellipse(t,r,i,a,s);return this.draw(o),o}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s),s}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,a,s,o,n=!1,l){const c=this.gen.arc(t,r,i,a,s,o,n,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Ra="http://www.w3.org/2000/svg";class AS{constructor(t,r){this.svg=t,this.gen=new Es(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,s=a.createElementNS(Ra,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=a.createElementNS(Ra,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=a.createElementNS(Ra,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(a,n,i)}l&&s.appendChild(l)}return s}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const s=t.createElementNS(Ra,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",a+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,a,s){const o=this.gen.line(t,r,i,a,s);return this.draw(o)}rectangle(t,r,i,a,s){const o=this.gen.rectangle(t,r,i,a,s);return this.draw(o)}ellipse(t,r,i,a,s){const o=this.gen.ellipse(t,r,i,a,s);return this.draw(o)}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,a,s,o,n=!1,l){const c=this.gen.arc(t,r,i,a,s,o,n,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var U={canvas:(e,t)=>new FS(e,t),svg:(e,t)=>new AS(e,t),generator:e=>new Es(e),newSeed:()=>Es.newSeed()},at=f(async(e,t,r)=>{let i;const a=t.useHtmlLabels||Ue(mt()?.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",Pt(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await Xe(o,be(vr(n),mt()),{useHtmlLabels:a,width:t.width||mt().flowchart?.wrappingWidth,classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},mt());let u=h.getBBox();const p=(t?.padding??0)/2;if(a){const d=h.children[0],g=ct(h);await Lf(d,n),u=d.getBoundingClientRect(),g.attr("width",u.width),g.attr("height",u.height)}return a?o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):o.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:s,bbox:u,halfPadding:p,label:o}},"labelHelper"),Io=f(async(e,t,r)=>{const i=r.useHtmlLabels??Zt(mt()),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await Xe(a,be(vr(t),mt()),{useHtmlLabels:i,width:r.width||mt()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=s.getBBox();const n=r.padding/2;if(Zt(mt())){const l=s.children[0],c=ct(s);o=l.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}return i?a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):a.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:a}},"insertLabel"),Z=f((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),tt=f((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function pt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}f(pt,"createPathFromPoints");function sr(e,t,r,i,a,s){const o=[],l=r-e,c=i-t,h=l/s,u=2*Math.PI/h,p=t+c/2;for(let d=0;d<=50;d++){const g=d/50,m=e+g*l,y=p+a*Math.sin(u*(m-e));o.push({x:m,y})}return o}f(sr,"generateFullSineWavePoints");function ca(e,t,r,i,a,s){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*h,d=e+r*Math.cos(p),g=t+r*Math.sin(p);o.push({x:-d,y:-g})}return o}f(ca,"generateCirclePoints");function Fn(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const a=t.find(l=>l.getAttribute("fill")!=="none"),s=t.find(l=>l.getAttribute("stroke")!=="none"),o=f((l,c)=>l?.getAttribute(c)??void 0,"getAttr");if(a){const l={fill:o(a,"fill"),"fill-opacity":o(a,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(s){const l={stroke:o(s,"stroke"),"stroke-width":o(s,"stroke-width")??"1","stroke-opacity":o(s,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}f(Fn,"mergePaths");var ES=f((e,t)=>{var r=e.x,i=e.y,a=t.x-r,s=t.y-i,o=e.width/2,n=e.height/2,l,c;return Math.abs(s)*o>Math.abs(a)*n?(s<0&&(n=-n),l=s===0?0:n*a/s,c=n):(a<0&&(o=-o),l=o,c=a===0?0:o*s/a),{x:r+l,y:i+c}},"intersectRect"),ki=ES,MS=f(async(e,t,r,i=!1,a=!1)=>{let s=t||"";typeof s=="object"&&(s=s[0]);const o=mt(),n=Zt(o);return await Xe(e,s,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},o)},"createLabel"),Qe=MS,nr=f((e,t,r,i,a)=>["M",e+a,t,"H",e+r-a,"A",a,a,0,0,1,e+r,t+a,"V",t+i-a,"A",a,a,0,0,1,e+r-a,t+i,"H",e+a,"A",a,a,0,0,1,e,t+i-a,"V",t+a,"A",a,a,0,0,1,e+a,t,"Z"].join(" "),"createRoundedRectPathD"),hg=f(async(e,t)=>{R.info("Creating subgraph rect for ",t.id,t);const r=mt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=V(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=Zt(r),d=u.insert("g").attr("class","cluster-label ");let g;t.labelType==="markdown"?g=await Xe(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):g=await Qe(d,t.label,t.labelStyle||"",!1,!0);let m=g.getBBox();if(Zt(r)){const E=g.children[0],B=ct(g);m=E.getBoundingClientRect(),B.attr("width",m.width),B.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,k=t.y-x/2;R.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const E=U.svg(u),B=X(t,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),N=E.path(nr(b,k,y,x,0),B);_=u.insert(()=>(R.debug("Rough node insert CXC",N),N),":first-child"),_.select("path:nth-child(2)").attr("style",c.join(";")),_.select("path").attr("style",h.join(";").replace("fill","stroke"))}else _=u.insert("rect",":first-child"),_.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:w}=Sl(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),n){const E=d.select("span");E&&E.attr("style",n)}const v=_.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=m.height-t.padding/2,t.intersect=function(E){return ki(t,E)},{cluster:u,labelBBox:m}},"rect"),$S=f((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),a=0*t.padding,s=a/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+a).attr("height",t.height+a).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return ki(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),OS=f(async(e,t)=>{const r=mt(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:s,compositeBackground:o,compositeTitleBackground:n,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let p=c.append("rect");const d=await Qe(u,t.label,t.labelStyle,void 0,!0);let g=d.getBBox();if(Zt(r)){const N=d.children[0],D=ct(d);g=N.getBoundingClientRect(),D.attr("width",g.width),D.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,k=t.height+m-g.height-6,_=t.x-x/2,w=t.y-b/2;t.width=x;const v=t.y-t.height/2-y+g.height+2;let E;if(t.look==="handDrawn"){const N=t.cssClasses.includes("statediagram-cluster-alt"),D=U.svg(c),O=t.rx||t.ry?D.path(nr(_,w,x,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:a}):D.rectangle(_,w,x,b,{seed:a});E=c.insert(()=>O,":first-child");const W=D.rectangle(_,v,x,k,{fill:N?s:o,fillStyle:N?"hachure":"solid",stroke:l,seed:a});E=c.insert(()=>O,":first-child"),p=c.insert(()=>W)}else E=h.insert("rect",":first-child"),E.attr("class","outer").attr("x",_).attr("y",w).attr("width",x).attr("height",b).attr("data-look",t.look),p.attr("class","inner").attr("x",_).attr("y",v).attr("width",x).attr("height",k);u.attr("transform",`translate(${t.x-g.width/2}, ${w+1-(Zt(r)?0:3)})`);const B=E.node().getBBox();return t.height=B.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(N){return ki(t,N)},{cluster:c,labelBBox:g}},"roundedWithTitle"),IS=f(async(e,t)=>{R.info("Creating subgraph rect for ",t.id,t);const r=mt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=V(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=Zt(r),d=u.insert("g").attr("class","cluster-label "),g=await Xe(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let m=g.getBBox();if(Zt(r)){const E=g.children[0],B=ct(g);m=E.getBoundingClientRect(),B.attr("width",m.width),B.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,k=t.y-x/2;R.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const E=U.svg(u),B=X(t,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),N=E.path(nr(b,k,y,x,t.rx),B);_=u.insert(()=>(R.debug("Rough node insert CXC",N),N),":first-child"),_.select("path:nth-child(2)").attr("style",c.join(";")),_.select("path").attr("style",h.join(";").replace("fill","stroke"))}else _=u.insert("rect",":first-child"),_.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:w}=Sl(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),n){const E=d.select("span");E&&E.attr("style",n)}const v=_.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=m.height-t.padding/2,t.intersect=function(E){return ki(t,E)},{cluster:u,labelBBox:m}},"kanbanSection"),DS=f((e,t)=>{const r=mt(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:s}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,p=t.y-h/2;t.width=c;let d;if(t.look==="handDrawn"){const y=U.svg(o).rectangle(u,p,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:a});d=o.insert(()=>y,":first-child")}else{d=n.insert("rect",":first-child");let m="outer";t.look,m="divider",d.attr("class",m).attr("x",u).attr("y",p).attr("width",c).attr("height",h).attr("data-look",t.look)}const g=d.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return ki(t,m)},{cluster:o,labelBBox:{}}},"divider"),PS=hg,RS={rect:hg,squareRect:PS,roundedWithTitle:OS,noteGroup:$S,divider:DS,kanbanSection:IS},cg=new Map,NS=f(async(e,t)=>{const r=t.shape||"rect",i=await RS[r](e,t);return cg.set(t.id,i),i},"insertCluster"),qA=f(()=>{cg=new Map},"clear");function ug(e,t){return e.intersect(t)}f(ug,"intersectNode");var qS=ug;function dg(e,t,r,i){var a=e.x,s=e.y,o=a-i.x,n=s-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),c=Math.abs(t*r*o/l);i.x<a&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<s&&(h=-h),{x:a+c,y:s+h}}f(dg,"intersectEllipse");var pg=dg;function fg(e,t,r){return pg(e,t,t,r)}f(fg,"intersectCircle");var zS=fg;function gg(e,t,r,i){{const a=t.y-e.y,s=e.x-t.x,o=t.x*e.y-e.x*t.y,n=a*r.x+s*r.y+o,l=a*i.x+s*i.y+o,c=1e-6;if(n!==0&&l!==0&&An(n,l))return;const h=i.y-r.y,u=r.x-i.x,p=i.x*r.y-r.x*i.y,d=h*e.x+u*e.y+p,g=h*t.x+u*t.y+p;if(Math.abs(d)<c&&Math.abs(g)<c&&An(d,g))return;const m=a*u-h*s;if(m===0)return;const y=Math.abs(m/2);let x=s*p-u*o;const b=x<0?(x-y)/m:(x+y)/m;x=h*o-a*p;const k=x<0?(x-y)/m:(x+y)/m;return{x:b,y:k}}}f(gg,"intersectLine");function An(e,t){return e*t>0}f(An,"sameSign");var WS=gg;function mg(e,t,r){let i=e.x,a=e.y,s=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),n=Math.min(n,h.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,c=a-e.height/2-n;for(let h=0;h<t.length;h++){let u=t[h],p=t[h<t.length-1?h+1:0],d=WS(e,r,{x:l+u.x,y:c+u.y},{x:l+p.x,y:c+p.y});d&&s.push(d)}return s.length?(s.length>1&&s.sort(function(h,u){let p=h.x-r.x,d=h.y-r.y,g=Math.sqrt(p*p+d*d),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return g<x?-1:g===x?0:1}),s[0]):e}f(mg,"intersectPolygon");var HS=mg,j={node:qS,circle:zS,ellipse:pg,polygon:HS,rect:ki};function yg(e,t){const{labelStyles:r}=V(t);t.labelStyle=r;const i=tt(t);let a=i;i||(a="anchor");const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=U.svg(s),c=X(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=s.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",Pt(n)),Z(t,u),t.intersect=function(p){return R.info("Circle intersect",t,o,p),j.circle(t,o,p)},s}f(yg,"anchor");function En(e,t,r,i,a,s,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,p=(i-t)/2,d=u/a,g=p/s,m=Math.sqrt(d**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*s*Math.sin(h)*(o?-1:1),b=c-y*a*Math.cos(h)*(o?-1:1),k=Math.atan2((t-b)/s,(e-x)/a);let w=Math.atan2((i-b)/s,(r-x)/a)-k;o&&w<0&&(w+=2*Math.PI),!o&&w>0&&(w-=2*Math.PI);const v=[];for(let E=0;E<20;E++){const B=E/19,N=k+B*w,D=x+a*Math.cos(N),O=b+s*Math.sin(N);v.push({x:D,y:O})}return v}f(En,"generateArcPoints");function Cg(e,t,r){const[i,a]=[t,r].sort((s,o)=>o-s);return a*(1-Math.sqrt(1-(e/i/2)**2))}f(Cg,"calculateArcSagitta");async function xg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a,n=f(N=>N+o,"calcTotalHeight"),l=f(N=>{const D=N/2;return[D/(2.5+N/50),D]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await at(e,t,tt(t)),u=n(t?.height?t?.height:h.height),[p,d]=l(u),g=Cg(u,p,d),y=(t?.width?t?.width:h.width)+s*2+g-g,x=u,{cssStyles:b}=t,k=[{x:y/2,y:-x/2},{x:-y/2,y:-x/2},...En(-y/2,-x/2,-y/2,x/2,p,d,!1),{x:y/2,y:x/2},...En(y/2,x/2,y/2,-x/2,p,d,!0)],_=U.svg(c),w=X(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=pt(k),E=_.path(v,w),B=c.insert(()=>E,":first-child");return B.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${p/2}, 0)`),Z(t,B),t.intersect=function(N){return j.polygon(t,k,N)},c}f(xg,"bowTieRect");function Ve(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}f(Ve,"insertPolygonShape");var Na=12;async function bg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?28:a,o=t.look==="neo"?24:a,{shapeSvg:n,bbox:l}=await at(e,t,tt(t)),c=(t?.width??l.width)+(t.look==="neo"?s*2:s+Na),h=(t?.height??l.height)+(t.look==="neo"?o*2:o),u=0,p=c,d=-h,g=0,m=[{x:u+Na,y:d},{x:p,y:d},{x:p,y:g},{x:u,y:g},{x:u,y:d+Na},{x:u+Na,y:d}];let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const b=U.svg(n),k=X(t,{}),_=pt(m),w=b.path(_,k);y=n.insert(()=>w,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),x&&y.attr("style",x)}else y=Ve(n,c,h,m);return i&&y.attr("style",i),Z(t,y),t.intersect=function(b){return j.polygon(t,m,b)},n}f(bg,"card");function kg(e,t){const{nodeStyles:r}=V(t);t.label="";const i=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(28,t.width??0),o=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],n=U.svg(i),l=X(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=pt(o),h=n.path(c,l),u=i.insert(()=>h,":first-child");return a&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",a),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return j.polygon(t,o,p)},i}f(kg,"choice");async function Rl(e,t,r){const{labelStyles:i,nodeStyles:a}=V(t);t.labelStyle=i;const{shapeSvg:s,bbox:o,halfPadding:n}=await at(e,t,tt(t)),l=16,c=r?.padding??n,h=t.look==="neo"?o.width/2+l*2:o.width/2+c;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=U.svg(s),g=X(t,{}),m=d.circle(0,0,h*2,g);u=s.insert(()=>m,":first-child"),u.attr("class","basic label-container").attr("style",Pt(p))}else u=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",h).attr("cx",0).attr("cy",0);return Z(t,u),t.calcIntersect=function(d,g){const m=d.width/2;return j.circle(d,m,g)},t.intersect=function(d){return R.info("Circle intersect",t,h,d),j.circle(t,h,d)},s}f(Rl,"circle");function Tg(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,a={x:i/2*t,y:i/2*r},s={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${s.x},${s.y} L ${n.x},${n.y}
M ${a.x},${a.y} L ${o.x},${o.y}`}f(Tg,"createLine");function _g(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r,t.label="";const a=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),s=Math.max(30,t?.width??0),{cssStyles:o}=t,n=U.svg(a),l=X(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,s*2,l),h=Tg(s),u=n.path(h,l),p=a.insert(()=>c,":first-child");return p.insert(()=>u),p.attr("class","outer-path"),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),Z(t,p),t.intersect=function(d){return R.info("crossedCircle intersect",t,{radius:s,point:d}),j.circle(t,s,d)},a}f(_g,"crossedCircle");function Ne(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*h,d=e+r*Math.cos(p),g=t+r*Math.sin(p);o.push({x:-d,y:-g})}return o}f(Ne,"generateCirclePoints");async function wg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await at(e,t,tt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+n,h=s.height+l,u=Math.max(5,h*.1),{cssStyles:p}=t,d=[...Ne(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...Ne(c/2+u*2,-u,u,20,-180,-270),...Ne(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...Ne(c/2,h/2,u,20,0,90)],g=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...Ne(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...Ne(c/2+c*.1,-u,u,20,-180,-270),...Ne(c/2+c*.1,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...Ne(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2,y:h/2+u}],m=U.svg(a),y=X(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=pt(d).replace("Z",""),k=m.path(b,y),_=pt(g),w=m.path(_,{...y}),v=a.insert("g",":first-child");return v.insert(()=>w,":first-child").attr("stroke-opacity",0),v.insert(()=>k,":first-child"),v.attr("class","text"),p&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${u}, 0)`),o.attr("transform",`translate(${-c/2+u-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Z(t,v),t.intersect=function(E){return j.polygon(t,g,E)},a}f(wg,"curlyBraceLeft");function qe(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*h,d=e+r*Math.cos(p),g=t+r*Math.sin(p);o.push({x:d,y:g})}return o}f(qe,"generateCirclePoints");async function Sg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await at(e,t,tt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+(t.look==="neo"?n*2:n),h=s.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:p}=t,d=[...qe(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...qe(c/2+u*2,-u,u,20,-180,-270),...qe(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...qe(c/2,h/2,u,20,0,90)],g=[{x:-c/2,y:-h/2-u},{x:c/2,y:-h/2-u},...qe(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...qe(c/2+u*2,-u,u,20,-180,-270),...qe(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...qe(c/2,h/2,u,20,0,90),{x:c/2,y:h/2+u},{x:-c/2,y:h/2+u}],m=U.svg(a),y=X(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=pt(d).replace("Z",""),k=m.path(b,y),_=pt(g),w=m.path(_,{...y}),v=a.insert("g",":first-child");return v.insert(()=>w,":first-child").attr("stroke-opacity",0),v.insert(()=>k,":first-child"),v.attr("class","text"),p&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${-u}, 0)`),o.attr("transform",`translate(${-c/2+(t.padding??0)/2-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Z(t,v),t.intersect=function(E){return j.polygon(t,g,E)},a}f(Sg,"curlyBraceRight");function Nt(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*h,d=e+r*Math.cos(p),g=t+r*Math.sin(p);o.push({x:-d,y:-g})}return o}f(Nt,"generateCirclePoints");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await at(e,t,tt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+(t.look==="neo"?n*2:n),h=s.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:p}=t,d=[...Nt(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...Nt(c/2+u*2,-u,u,20,-180,-270),...Nt(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...Nt(c/2,h/2,u,20,0,90)],g=[...Nt(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...Nt(-c/2-u/2,-u,u,20,0,90),...Nt(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...Nt(-c/2+u+u/2,h/2,u,30,-180,-270)],m=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...Nt(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...Nt(c/2+u*2,-u,u,20,-180,-270),...Nt(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...Nt(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2-u-u/2,y:h/2+u},...Nt(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...Nt(-c/2-u/2,-u,u,20,0,90),...Nt(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...Nt(-c/2+u+u/2,h/2,u,30,-180,-270)],y=U.svg(a),x=X(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=pt(d).replace("Z",""),_=y.path(k,x),v=pt(g).replace("Z",""),E=y.path(v,x),B=pt(m),N=y.path(B,{...x}),D=a.insert("g",":first-child");return D.insert(()=>N,":first-child").attr("stroke-opacity",0),D.insert(()=>_,":first-child"),D.insert(()=>E,":first-child"),D.attr("class","text"),p&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${u-u/4}, 0)`),o.attr("transform",`translate(${-c/2+(t.padding??0)/2-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Z(t,D),t.intersect=function(O){return j.polygon(t,m,O)},a}f(vg,"curlyBraces");async function Bg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a,n=20,l=5,{shapeSvg:c,bbox:h}=await at(e,t,tt(t)),u=Math.max(n,(h.width+s*2)*1.25,t?.width??0),p=Math.max(l,h.height+o*2,t?.height??0),d=p/2,{cssStyles:g}=t,m=U.svg(c),y=X(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=u,b=p,k=x-d,_=b/4,w=[{x:k,y:0},{x:_,y:0},{x:0,y:b/2},{x:_,y:b},{x:k,y:b},...ca(-k,-b/2,d,50,270,90)],v=pt(w),E=m.path(v,y),B=c.insert(()=>E,":first-child");return B.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),B.attr("transform",`translate(${-u/2}, ${-p/2})`),Z(t,B),t.intersect=function(N){return j.polygon(t,w,N)},c}f(Bg,"curvedTrapezoid");var YS=f((e,t,r,i,a,s)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),jS=f((e,t,r,i,a,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),US=f((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Mc=8,$c=8;async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?24:a,o=t.look==="neo"?24:a;if(t.width||t.height){const y=t.width??0;t.width=(t.width??0)-o,t.width<$c&&(t.width=$c);const b=y/2/(2.5+y/50);t.height=(t.height??0)-s-b*3,t.height<Mc&&(t.height=Mc)}const{shapeSvg:n,bbox:l,label:c}=await at(e,t,tt(t)),h=(t.width?t.width:l.width)+o,u=h/2,p=u/(2.5+h/50),d=(t.height?t.height:l.height)+s+p;let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=U.svg(n),x=jS(0,0,h,d,u,p),b=US(0,p,h,d,u,p),k=X(t,{}),_=y.path(x,k),w=y.path(b,X(t,{fill:"none"}));g=n.insert(()=>w,":first-child"),g=n.insert(()=>_,":first-child"),g.attr("class","basic label-container"),m&&g.attr("style",m)}else{const y=YS(0,0,h,d,u,p);g=n.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",Pt(m)).attr("style",i)}return g.attr("label-offset-y",p),g.attr("transform",`translate(${-h/2}, ${-(d/2+p)})`),Z(t,g),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(y){const x=j.rect(t,y),b=x.x-(t.x??0);if(u!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(x.y-(t.y??0))>(t.height??0)/2-p)){let k=p*p*(1-b*b/(u*u));k>0&&(k=Math.sqrt(k)),k=p-k,y.y-(t.y??0)>0&&(k=-k),x.y+=k}return x},n}f(Lg,"cylinder");async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await at(e,t,tt(t)),c=n.width+a,h=n.height+s,u=h*.2,p=-c/2,d=-h/2-u/2,{cssStyles:g}=t,m=U.svg(o),y=X(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:p,y:d+u},{x:-p,y:d+u},{x:-p,y:-d},{x:p,y:-d},{x:p,y:d},{x:-p,y:d},{x:-p,y:d+u}],b=m.polygon(x.map(_=>[_.x,_.y]),y),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${p+(t.padding??0)/2-(n.x-(n.left??0))}, ${d+u+(t.padding??0)/2-(n.y-(n.top??0))})`),Z(t,k),t.intersect=function(_){return j.rect(t,_)},o}f(Fg,"dividedRectangle");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=V(t),a=t.look==="neo"?12:5;t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,{shapeSvg:n,bbox:l}=await at(e,t,tt(t)),c=(t?.width?t?.width/2:l.width/2)+(o??0),h=c-a;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=U.svg(n),g=X(t,{roughness:.2,strokeWidth:2.5}),m=X(t,{roughness:.2,strokeWidth:1.5}),y=d.circle(0,0,c*2,g),x=d.circle(0,0,h*2,m);u=n.insert("g",":first-child"),u.attr("class",Pt(t.cssClasses)).attr("style",Pt(p)),u.node()?.appendChild(y),u.node()?.appendChild(x)}else{u=n.insert("g",":first-child");const d=u.insert("circle",":first-child"),g=u.insert("circle");u.attr("class","basic label-container").attr("style",i),d.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),g.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return Z(t,u),t.intersect=function(d){return R.info("DoubleCircle intersect",t,c,d),j.circle(t,c,d)},n}f(Ag,"doublecircle");function Eg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=V(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=U.svg(s),{nodeBorder:c}=r,h=X(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),p=s.insert(()=>u,":first-child");return p.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",a),Z(t,p),t.intersect=function(d){return R.info("filledCircle intersect",t,{radius:o,point:d}),j.circle(t,o,d)},s}f(Eg,"filledCircle");var Oc=10,Ic=10;async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?a*2:a;(t.width||t.height)&&(t.height=t?.height??0,t.height<Oc&&(t.height=Oc),t.width=(t?.width??0)-s-s/2,t.width<Ic&&(t.width=Ic));const{shapeSvg:o,bbox:n,label:l}=await at(e,t,tt(t)),c=(t?.width?t?.width:n.width)+(s??0),h=t?.height?t?.height:c+n.height,u=h,p=[{x:0,y:-h},{x:u,y:-h},{x:u/2,y:0}],{cssStyles:d}=t,g=U.svg(o),m=X(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=pt(p),x=g.path(y,m),b=o.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=c,t.height=h,Z(t,b),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-h/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(k){return R.info("Triangle intersect",t,p,k),j.polygon(t,p,k)},o}f(Mg,"flippedTriangle");function $g(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:s}=V(t);t.label="";const o=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,u=-1*c/2,p=U.svg(o),d=X(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=p.rectangle(h,u,l,c,d),m=o.insert(()=>g,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),Z(t,m);const y=i?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return j.rect(t,x)},o}f($g,"forkJoin");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=15,s=10,o=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-n*2,t.height<s&&(t.height=s),t.width=(t?.width??0)-o*2,t.width<a&&(t.width=a));const{shapeSvg:l,bbox:c}=await at(e,t,tt(t)),h=(t?.width?t?.width:Math.max(a,c.width))+o*2,u=(t?.height?t?.height:Math.max(s,c.height))+n*2,p=u/2,{cssStyles:d}=t,g=U.svg(l),m=X(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2,y:-u/2},{x:h/2-p,y:-u/2},...ca(-h/2+p,0,p,50,90,270),{x:h/2-p,y:u/2},{x:-h/2,y:u/2}],x=pt(y),b=g.path(x,m),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),Z(t,k),t.intersect=function(_){return R.info("Pill intersect",t,{radius:p,point:_}),j.polygon(t,y,_)},l}f(Og,"halfRoundedRectangle");var GS=f((e,t,r,i,a)=>[`M${e+a},${t}`,`L${e+r-a},${t}`,`L${e+r},${t-i/2}`,`L${e+r-a},${t-i}`,`L${e+a},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=V(t),a=t.look==="neo"?3.5:4;t.labelStyle=r;const s=t.padding??0,o=70,n=32,l=t.look==="neo"?o:s,c=t.look==="neo"?n:s;if(t.width||t.height){const k=(t.height??0)/a;t.width=(t?.width??0)-2*k-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:u}=await at(e,t,tt(t)),p=(t?.height?t?.height:u.height)+l,d=p/a,g=(t?.width?t?.width:u.width)+2*d+c,m=[{x:d,y:0},{x:g-d,y:0},{x:g,y:-p/2},{x:g-d,y:-p},{x:d,y:-p},{x:0,y:-p/2}];let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const b=U.svg(h),k=X(t,{}),_=GS(0,0,g,p,d),w=b.path(_,k);y=h.insert(()=>w,":first-child").attr("transform",`translate(${-g/2}, ${p/2})`),x&&y.attr("style",x)}else y=Ve(h,g,p,m);return i&&y.attr("style",i),t.width=g,t.height=p,Z(t,y),t.intersect=function(b){return j.polygon(t,m,b)},h}f(Ig,"hexagon");async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await at(e,t,tt(t)),s=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:n}=t,l=U.svg(a),c=X(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:s,y:0},{x:0,y:o},{x:s,y:o}],u=pt(h),p=l.path(u,c),d=a.insert(()=>p,":first-child");return d.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-s/2}, ${-o/2})`),Z(t,d),t.intersect=function(g){return R.info("Pill intersect",t,{points:h}),j.polygon(t,h,g)},a}f(Dg,"hourglass");async function Pg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=V(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await at(e,t,"icon-shape default"),p=t.pos==="t",d=n,g=n,{nodeBorder:m}=r,{stylesMap:y}=bi(t),x=-g/2,b=-d/2,k=t.label?8:0,_=U.svg(c),w=X(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=_.rectangle(x,b,g,d,w),E=Math.max(g,h.width),B=d+h.height+k,N=_.rectangle(-E/2,-B/2,E,B,{...w,fill:"transparent",stroke:"none"}),D=c.insert(()=>v,":first-child"),O=c.insert(()=>N);if(t.icon){const W=c.append("g");W.html(`<g>${await ka(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const z=W.node().getBBox(),I=z.width,F=z.height,L=z.x,M=z.y;W.attr("transform",`translate(${-I/2-L},${p?h.height/2+k/2-F/2-M:-h.height/2-k/2-F/2-M})`),W.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-B/2:B/2-h.height})`),D.attr("transform",`translate(0,${p?h.height/2+k/2:-h.height/2-k/2})`),Z(t,O),t.intersect=function(W){if(R.info("iconSquare intersect",t,W),!t.label)return j.rect(t,W);const z=t.x??0,I=t.y??0,F=t.height??0;let L=[];return p?L=[{x:z-h.width/2,y:I-F/2},{x:z+h.width/2,y:I-F/2},{x:z+h.width/2,y:I-F/2+h.height+k},{x:z+g/2,y:I-F/2+h.height+k},{x:z+g/2,y:I+F/2},{x:z-g/2,y:I+F/2},{x:z-g/2,y:I-F/2+h.height+k},{x:z-h.width/2,y:I-F/2+h.height+k}]:L=[{x:z-g/2,y:I-F/2},{x:z+g/2,y:I-F/2},{x:z+g/2,y:I-F/2+d},{x:z+h.width/2,y:I-F/2+d},{x:z+h.width/2/2,y:I+F/2},{x:z-h.width/2,y:I+F/2},{x:z-h.width/2,y:I-F/2+d},{x:z-g/2,y:I-F/2+d}],j.polygon(t,L,W)},c}f(Pg,"icon");async function Rg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=V(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await at(e,t,"icon-shape default"),p=20,d=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=bi(t),b=U.svg(c),k=X(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=x.get("fill");k.stroke=_??y;const w=c.append("g");t.icon&&w.html(`<g>${await ka(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=w.node().getBBox(),E=v.width,B=v.height,N=v.x,D=v.y,O=Math.max(E,B)*Math.SQRT2+p*2,W=b.circle(0,0,O,k),z=Math.max(O,h.width),I=O+h.height+d,F=b.rectangle(-z/2,-I/2,z,I,{...k,fill:"transparent",stroke:"none"}),L=c.insert(()=>W,":first-child"),M=c.insert(()=>F);return w.attr("transform",`translate(${-E/2-N},${g?h.height/2+d/2-B/2-D:-h.height/2-d/2-B/2-D})`),w.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-I/2:I/2-h.height})`),L.attr("transform",`translate(0,${g?h.height/2+d/2:-h.height/2-d/2})`),Z(t,M),t.intersect=function(P){return R.info("iconSquare intersect",t,P),j.rect(t,P)},c}f(Rg,"iconCircle");async function Ng(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=V(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:p}=await at(e,t,"icon-shape default"),d=t.pos==="t",g=n+u*2,m=n+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=bi(t),k=-m/2,_=-g/2,w=t.label?8:0,v=U.svg(c),E=X(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const B=b.get("fill");E.stroke=B??x;const N=v.path(nr(k,_,m,g,5),E),D=Math.max(m,h.width),O=g+h.height+w,W=v.rectangle(-D/2,-O/2,D,O,{...E,fill:"transparent",stroke:"none"}),z=c.insert(()=>N,":first-child").attr("class","icon-shape2"),I=c.insert(()=>W);if(t.icon){const F=c.append("g");F.html(`<g>${await ka(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=F.node().getBBox(),M=L.width,P=L.height,H=L.x,Y=L.y;F.attr("transform",`translate(${-M/2-H},${d?h.height/2+w/2-P/2-Y:-h.height/2-w/2-P/2-Y})`),F.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-O/2:O/2-h.height})`),z.attr("transform",`translate(0,${d?h.height/2+w/2:-h.height/2-w/2})`),Z(t,I),t.intersect=function(F){if(R.info("iconSquare intersect",t,F),!t.label)return j.rect(t,F);const L=t.x??0,M=t.y??0,P=t.height??0;let H=[];return d?H=[{x:L-h.width/2,y:M-P/2},{x:L+h.width/2,y:M-P/2},{x:L+h.width/2,y:M-P/2+h.height+w},{x:L+m/2,y:M-P/2+h.height+w},{x:L+m/2,y:M+P/2},{x:L-m/2,y:M+P/2},{x:L-m/2,y:M-P/2+h.height+w},{x:L-h.width/2,y:M-P/2+h.height+w}]:H=[{x:L-m/2,y:M-P/2},{x:L+m/2,y:M-P/2},{x:L+m/2,y:M-P/2+g},{x:L+h.width/2,y:M-P/2+g},{x:L+h.width/2/2,y:M+P/2},{x:L-h.width/2,y:M+P/2},{x:L-h.width/2,y:M-P/2+g},{x:L-m/2,y:M-P/2+g}],j.polygon(t,H,F)},c}f(Ng,"iconRounded");async function qg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=V(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:p}=await at(e,t,"icon-shape default"),d=t.pos==="t",g=n+u*2,m=n+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=bi(t),k=-m/2,_=-g/2,w=t.label?8:0,v=U.svg(c),E=X(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const B=b.get("fill");E.stroke=B??x;const N=v.path(nr(k,_,m,g,.1),E),D=Math.max(m,h.width),O=g+h.height+w,W=v.rectangle(-D/2,-O/2,D,O,{...E,fill:"transparent",stroke:"none"}),z=c.insert(()=>N,":first-child"),I=c.insert(()=>W);if(t.icon){const F=c.append("g");F.html(`<g>${await ka(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=F.node().getBBox(),M=L.width,P=L.height,H=L.x,Y=L.y;F.attr("transform",`translate(${-M/2-H},${d?h.height/2+w/2-P/2-Y:-h.height/2-w/2-P/2-Y})`),F.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-O/2:O/2-h.height})`),z.attr("transform",`translate(0,${d?h.height/2+w/2:-h.height/2-w/2})`),Z(t,I),t.intersect=function(F){if(R.info("iconSquare intersect",t,F),!t.label)return j.rect(t,F);const L=t.x??0,M=t.y??0,P=t.height??0;let H=[];return d?H=[{x:L-h.width/2,y:M-P/2},{x:L+h.width/2,y:M-P/2},{x:L+h.width/2,y:M-P/2+h.height+w},{x:L+m/2,y:M-P/2+h.height+w},{x:L+m/2,y:M+P/2},{x:L-m/2,y:M+P/2},{x:L-m/2,y:M-P/2+h.height+w},{x:L-h.width/2,y:M-P/2+h.height+w}]:H=[{x:L-m/2,y:M-P/2},{x:L+m/2,y:M-P/2},{x:L+m/2,y:M-P/2+g},{x:L+h.width/2,y:M-P/2+g},{x:L+h.width/2/2,y:M+P/2},{x:L-h.width/2,y:M+P/2},{x:L-h.width/2,y:M-P/2+g},{x:L-m/2,y:M-P/2+g}],j.polygon(t,H,F)},c}f(qg,"iconSquare");async function zg(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/s;const{labelStyles:o}=V(t);t.labelStyle=o;const n=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?n??0:0,t?.assetWidth??a),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??s;t.width=Math.max(c,n??0);const{shapeSvg:u,bbox:p,label:d}=await at(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,b=U.svg(u),k=X(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=b.rectangle(m,y,c,h,k),w=Math.max(c,p.width),v=h+p.height+x,E=b.rectangle(-w/2,-v/2,w,v,{...k,fill:"none",stroke:"none"}),B=u.insert(()=>_,":first-child"),N=u.insert(()=>E);if(t.img){const D=u.append("image");D.attr("href",t.img),D.attr("width",c),D.attr("height",h),D.attr("preserveAspectRatio","none"),D.attr("transform",`translate(${-c/2},${g?v/2-h:-v/2})`)}return d.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${g?-h/2-p.height/2-x/2:h/2-p.height/2+x/2})`),B.attr("transform",`translate(0,${g?p.height/2+x/2:-p.height/2-x/2})`),Z(t,N),t.intersect=function(D){if(R.info("iconSquare intersect",t,D),!t.label)return j.rect(t,D);const O=t.x??0,W=t.y??0,z=t.height??0;let I=[];return g?I=[{x:O-p.width/2,y:W-z/2},{x:O+p.width/2,y:W-z/2},{x:O+p.width/2,y:W-z/2+p.height+x},{x:O+c/2,y:W-z/2+p.height+x},{x:O+c/2,y:W+z/2},{x:O-c/2,y:W+z/2},{x:O-c/2,y:W-z/2+p.height+x},{x:O-p.width/2,y:W-z/2+p.height+x}]:I=[{x:O-c/2,y:W-z/2},{x:O+c/2,y:W-z/2},{x:O+c/2,y:W-z/2+h},{x:O+p.width/2,y:W-z/2+h},{x:O+p.width/2/2,y:W+z/2},{x:O-p.width/2,y:W+z/2},{x:O-p.width/2,y:W-z/2+h},{x:O-c/2,y:W-z/2+h}],j.polygon(t,I,D)},u}f(zg,"imageSquare");async function Wg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=a,o=t.look==="neo"?a*2:a,{shapeSvg:n,bbox:l}=await at(e,t,tt(t)),c=Math.max(l.width+(o??0)*2,t?.width??0),h=Math.max(l.height+(s??0)*2,t?.height??0),u=[{x:0,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:-3*h/6,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=U.svg(n),m=X(t,{}),y=pt(u),x=g.path(y,m);p=n.insert(()=>x,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Ve(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,Z(t,p),t.intersect=function(g){return j.polygon(t,u,g)},n}f(Wg,"inv_trapezoid");async function _a(e,t,r){const{labelStyles:i,nodeStyles:a}=V(t);t.labelStyle=i;const{shapeSvg:s,bbox:o}=await at(e,t,tt(t)),n=Math.max(o.width+r.labelPaddingX*2,t?.width||0),l=Math.max(o.height+r.labelPaddingY*2,t?.height||0),c=-n/2,h=-l/2;let u,{rx:p,ry:d}=t;const{cssStyles:g}=t;if(r?.rx&&r.ry&&(p=r.rx,d=r.ry),t.look==="handDrawn"){const m=U.svg(s),y=X(t,{}),x=p||d?m.path(nr(c,h,n,l,p||0),y):m.rectangle(c,h,n,l,y);u=s.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",Pt(g))}else u=s.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",a).attr("rx",Pt(p)).attr("ry",Pt(d)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return Z(t,u),t.calcIntersect=function(m,y){return j.rect(m,y)},t.intersect=function(m){return j.rect(t,m)},s}f(_a,"drawRect");async function Hg(e,t){const{shapeSvg:r,bbox:i,label:a}=await at(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Z(t,s),t.intersect=function(l){return j.rect(t,l)},r}f(Hg,"labelRect");async function Yg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=a,o=t.look==="neo"?a*2:a,{shapeSvg:n,bbox:l}=await at(e,t,tt(t)),c=(t?.height??l.height)+s,h=(t?.width??l.width)+o,u=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=U.svg(n),m=X(t,{}),y=pt(u),x=g.path(y,m);p=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=Ve(n,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,Z(t,p),t.intersect=function(g){return j.polygon(t,u,g)},n}f(Yg,"lean_left");async function jg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=a,o=t.look==="neo"?a*2:a,{shapeSvg:n,bbox:l}=await at(e,t,tt(t)),c=(t?.height??l.height)+s,h=(t?.width??l.width)+o,u=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=U.svg(n),m=X(t,{}),y=pt(u),x=g.path(y,m);p=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=Ve(n,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,Z(t,p),t.intersect=function(g){return j.polygon(t,u,g)},n}f(jg,"lean_right");function Ug(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.label="",t.labelStyle=r;const a=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(35,t?.width??0),n=Math.max(35,t?.height??0),l=7,c=[{x:o,y:0},{x:0,y:n+l/2},{x:o-2*l,y:n+l/2},{x:0,y:2*n},{x:o,y:n-l/2},{x:2*l,y:n-l/2}],h=U.svg(a),u=X(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const p=pt(c),d=h.path(p,u),g=a.insert(()=>d,":first-child");return g.attr("class","outer-path"),s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-n})`),Z(t,g),t.intersect=function(m){return R.info("lightningBolt intersect",t,m),j.polygon(t,c,m)},a}f(Ug,"lightningBolt");var XS=f((e,t,r,i,a,s,o)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+o}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),VS=f((e,t,r,i,a,s,o)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+o}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),ZS=f((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Dc=10,Pc=10;async function Gg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?24:a;if(t.width||t.height){const x=t.width??0;t.width=(t.width??0)-s,t.width<Pc&&(t.width=Pc);const k=x/2/(2.5+x/50);t.height=(t.height??0)-o-k*3,t.height<Dc&&(t.height=Dc)}const{shapeSvg:n,bbox:l,label:c}=await at(e,t,tt(t)),h=(t?.width?t?.width:l.width)+s*2,u=h/2,p=u/(2.5+h/50),d=(t?.height?t?.height:l.height)+p+o*2,g=d*.1;let m;const{cssStyles:y}=t;if(t.look==="handDrawn"){const x=U.svg(n),b=VS(0,0,h,d,u,p,g),k=ZS(0,p,h,d,u,p),_=X(t,{}),w=x.path(b,_),v=x.path(k,_);n.insert(()=>v,":first-child").attr("class","line"),m=n.insert(()=>w,":first-child"),m.attr("class","basic label-container"),y&&m.attr("style",y)}else{const x=XS(0,0,h,d,u,p,g);m=n.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",Pt(y)).attr("style",i)}return m.attr("label-offset-y",p),m.attr("transform",`translate(${-h/2}, ${-(d/2+p)})`),Z(t,m),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(x){const b=j.rect(t,x),k=b.x-(t.x??0);if(u!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-p)){let _=p*p*(1-k*k/(u*u));_>0&&(_=Math.sqrt(_)),_=p-_,x.y-(t.y??0)>0&&(_=-_),b.y+=_}return b},n}f(Gg,"linedCylinder");async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a;if(t.width||t.height){const _=t.width;t.width=(_??0)*10/11-s*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await at(e,t,tt(t)),h=(t?.width?t?.width:l.width)+(s??0)*2,u=(t?.height?t?.height:l.height)+(o??0)*2,p=t.look==="neo"?u/4:u/8,d=u+p,{cssStyles:g}=t,m=U.svg(n),y=X(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-h/2-h/2*.1,y:-d/2},{x:-h/2-h/2*.1,y:d/2},...sr(-h/2-h/2*.1,d/2,h/2+h/2*.1,d/2,p,.8),{x:h/2+h/2*.1,y:-d/2},{x:-h/2-h/2*.1,y:-d/2},{x:-h/2,y:-d/2},{x:-h/2,y:d/2*1.1},{x:-h/2,y:-d/2}],b=m.polygon(x.map(_=>[_.x,_.y]),y),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-p/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-p/2-(l.y-(l.top??0))})`),Z(t,k),t.intersect=function(_){return j.polygon(t,x,_)},n}f(Xg,"linedWaveEdgedRect");async function Vg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2-2*n,10),t.height=Math.max((t?.height??0)-o*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await at(e,t,tt(t)),u=(t?.width?t?.width:c.width)+s*2+2*n,p=(t?.height?t?.height:c.height)+o*2+2*n,d=u-2*n,g=p-2*n,m=-d/2,y=-g/2,{cssStyles:x}=t,b=U.svg(l),k=X(t,{}),_=[{x:m-n,y:y+n},{x:m-n,y:y+g+n},{x:m+d-n,y:y+g+n},{x:m+d-n,y:y+g},{x:m+d,y:y+g},{x:m+d,y:y+g-n},{x:m+d+n,y:y+g-n},{x:m+d+n,y:y-n},{x:m+n,y:y-n},{x:m+n,y},{x:m,y},{x:m,y:y+n}],w=[{x:m,y:y+n},{x:m+d-n,y:y+n},{x:m+d-n,y:y+g},{x:m+d,y:y+g},{x:m+d,y},{x:m,y}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=pt(_);let E=b.path(v,k);const B=pt(w);let N=b.path(B,k);t.look!=="handDrawn"&&(E=Fn(E),N=Fn(N));const D=l.insert("g",":first-child");return D.insert(()=>E),D.insert(()=>N),D.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(c.width/2)-n-(c.x-(c.left??0))}, ${-(c.height/2)+n-(c.y-(c.top??0))})`),Z(t,D),t.intersect=function(O){return j.polygon(t,_,O)},l}f(Vg,"multiRect");async function Zg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await at(e,t,tt(t)),n=t.padding??0,l=t.look==="neo"?16:n,c=t.look==="neo"?12:n;let h=!0;(t.width||t.height)&&(h=!1,t.width=(t?.width??0)-l*2,t.height=(t?.height??0)-c*3);const u=Math.max(s.width,t?.width??0)+l*2,p=Math.max(s.height,t?.height??0)+c*3,d=t.look==="neo"?p/4:p/8,g=p+(h?d/2:-d/2),m=-u/2,y=-g/2,x=10,{cssStyles:b}=t,k=sr(m-x,y+g+x,m+u-x,y+g+x,d,.8),_=k?.[k.length-1],w=[{x:m-x,y:y+x},{x:m-x,y:y+g+x},...k,{x:m+u-x,y:_.y-x},{x:m+u,y:_.y-x},{x:m+u,y:_.y-2*x},{x:m+u+x,y:_.y-2*x},{x:m+u+x,y:y-x},{x:m+x,y:y-x},{x:m+x,y},{x:m,y},{x:m,y:y+x}],v=[{x:m,y:y+x},{x:m+u-x,y:y+x},{x:m+u-x,y:_.y-x},{x:m+u,y:_.y-x},{x:m+u,y},{x:m,y}],E=U.svg(a),B=X(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const N=pt(w),D=E.path(N,B),O=pt(v),W=E.path(O,B),z=a.insert(()=>D,":first-child");return z.insert(()=>W),z.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",i),z.attr("transform",`translate(0,${-d/2})`),o.attr("transform",`translate(${-(s.width/2)-x-(s.x-(s.left??0))}, ${-(s.height/2)+x-d/2-(s.y-(s.top??0))})`),Z(t,z),t.intersect=function(I){return j.polygon(t,w,I)},a}f(Zg,"multiWaveEdgedRectangle");async function Kg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=V(t);t.labelStyle=i,t.useHtmlLabels||Zt(wt())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await at(e,t,tt(t)),c=Math.max(n.width+(t.padding??0)*2,t?.width??0),h=Math.max(n.height+(t.padding??0)*2,t?.height??0),u=-c/2,p=-h/2,{cssStyles:d}=t,g=U.svg(o),m=X(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(u,p,c,h,m),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),a&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",a),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Z(t,x),t.intersect=function(b){return j.rect(t,b)},o}f(Kg,"note");var KS=f((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Qg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await at(e,t,tt(t)),o=s.width+(t.padding??0),n=s.height+(t.padding??0),l=o+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=U.svg(a),g=X(t,{}),m=KS(0,0,l),y=d.path(m,g);u=a.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),p&&u.attr("style",p)}else u=Ve(a,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),Z(t,u),t.calcIntersect=function(d,g){const m=d.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=j.polygon(d,y,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},a}f(Qg,"question");async function Jg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?21:a??0,o=t.look==="neo"?12:a??0,{shapeSvg:n,bbox:l,label:c}=await at(e,t,tt(t)),h=(t?.width??l.width)+(t.look==="neo"?s*2:s),u=(t?.height??l.height)+(t.look==="neo"?o*2:o),p=-h/2,d=-u/2,g=d/2,m=[{x:p+g,y:d},{x:p,y:0},{x:p+g,y:-d},{x:-p,y:-d},{x:-p,y:d}],{cssStyles:y}=t,x=U.svg(n),b=X(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=pt(m),_=x.path(k,b),w=n.insert(()=>_,":first-child");return w.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-g/2},0)`),c.attr("transform",`translate(${-g/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Z(t,w),t.intersect=function(v){return j.polygon(t,m,v)},n}f(Jg,"rect_left_inv_arrow");async function tm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;let a;t.cssClasses?a="node "+t.cssClasses:a="node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=s.insert("g"),n=s.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await Qe(n,c,t.labelStyle,!0,!0);let u={width:0,height:0};if(Zt(mt())){const B=h.children[0],N=ct(h);u=B.getBoundingClientRect(),N.attr("width",u.width),N.attr("height",u.height)}R.info("Text 2",l);const p=l||[],d=h.getBBox(),g=await Qe(n,Array.isArray(p)?p.join("<br/>"):p,t.labelStyle,!0,!0),m=g.children[0],y=ct(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;ct(g).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+x+5)+")"),ct(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),k=u.height+(t.padding||0),_=-u.width/2-x,w=-u.height/2-x;let v,E;if(t.look==="handDrawn"){const B=U.svg(s),N=X(t,{}),D=B.path(nr(_,w,b,k,t.rx||0),N),O=B.line(-u.width/2-x,-u.height/2-x+d.height+x,u.width/2+x,-u.height/2-x+d.height+x,N);E=s.insert(()=>(R.debug("Rough node insert CXC",D),O),":first-child"),v=s.insert(()=>(R.debug("Rough node insert CXC",D),D),":first-child")}else v=o.insert("rect",":first-child"),E=o.insert("line"),v.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),E.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+d.height+x).attr("y2",-u.height/2-x+d.height+x);return Z(t,v),t.intersect=function(B){return j.rect(t,B)},s}f(tm,"rectWithTitle");async function em(e,t,{config:{themeVariables:r}}){const i=r?.radius??5,a={rx:i,ry:i,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return _a(e,t,a)}f(em,"roundedRect");var ur=8;async function rm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await at(e,t,tt(t)),c=(t?.width??n.width)+a*2+(t.look==="neo"?ur:ur*2),h=(t?.height??n.height)+s*2,u=c-ur,p=h,d=ur-c/2,g=-h/2,{cssStyles:m}=t,y=U.svg(o),x=X(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:d,y:g},{x:d+u,y:g},{x:d+u,y:g+p},{x:d-ur,y:g+p},{x:d-ur,y:g},{x:d,y:g},{x:d,y:g+p}],k=y.polygon(b.map(w=>[w.x,w.y]),x),_=o.insert(()=>k,":first-child");return _.attr("class","basic label-container outer-path").attr("style",Pt(m)),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),m&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),l.attr("transform",`translate(${ur/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Z(t,_),t.intersect=function(w){return j.rect(t,w)},o}f(rm,"shadedProcess");async function im(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));const{shapeSvg:n,bbox:l,label:c}=await at(e,t,tt(t)),h=(t?.width?t?.width:l.width)+s*2,u=((t?.height?t?.height:l.height)+o*2)*1.5,p=h,d=u/1.5,g=-p/2,m=-d/2,{cssStyles:y}=t,x=U.svg(n),b=X(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:g,y:m},{x:g,y:m+d},{x:g+p,y:m+d},{x:g+p,y:m-d/2}],_=pt(k),w=x.path(_,b),v=n.insert(()=>w,":first-child");return v.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(0, ${d/4})`),c.attr("transform",`translate(${-p/2+(t.padding??0)-(l.x-(l.left??0))}, ${-d/4+(t.padding??0)-(l.y-(l.top??0))})`),Z(t,v),t.intersect=function(E){return j.polygon(t,k,E)},n}f(im,"slopedRect");async function am(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,a=t.look==="neo"?12:r,s={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:a};return _a(e,t,s)}f(am,"squareRect");async function sm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?20:a,o=t.look==="neo"?12:a,{shapeSvg:n,bbox:l}=await at(e,t,tt(t)),c=l.height+(t.look==="neo"?o*2:o),h=l.width+c/4+(t.look==="neo"?s*2:s),u=c/2,{cssStyles:p}=t,d=U.svg(n),g=X(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-h/2+u,y:-c/2},{x:h/2-u,y:-c/2},...ca(-h/2+u,0,u,50,90,270),{x:h/2-u,y:c/2},...ca(h/2-u,0,u,50,270,450)],y=pt(m),x=d.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),Z(t,b),t.intersect=function(k){return j.polygon(t,m,k)},n}f(sm,"stadium");async function om(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return _a(e,t,r)}f(om,"state");function nm(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=V(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:o,stateBorder:n,nodeBorder:l,nodeShadow:c}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=U.svg(h),p=X(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=u.circle(0,0,t.width,{...p,stroke:o,strokeWidth:2}),g=n??l,m=(t.width??0)*5/14,y=u.circle(0,0,m,{...p,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),x=h.insert(()=>d,":first-child");if(x.insert(()=>y),t.look!=="handDrawn"&&x.attr("class","outer-path"),s&&x.selectAll("path").attr("style",s),a&&x.selectAll("path").attr("style",a),t.width<25&&c&&t.look!=="handDrawn"){const b=e.node()?.ownerSVGElement?.id??"",k=b?`${b}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${k})`)}return Z(t,x),t.intersect=function(b){return j.circle(t,(t.width??0)/2,b)},h}f(nm,"stateEnd");function lm(e,t,{config:{themeVariables:r}}){const{lineColor:i,nodeShadow:a}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const l=U.svg(s).circle(0,0,t.width,ow(i));o=s.insert(()=>l),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=s.insert("circle",":first-child"),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&a&&t.look!=="handDrawn"){const n=e.node()?.ownerSVGElement?.id??"",l=n?`${n}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${l})`)}return Z(t,o),t.intersect=function(n){return j.circle(t,(t.width??7)/2,n)},s}f(lm,"stateStart");var qr=8;async function hm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t?.padding??8,s=t.look==="neo"?28:a,o=t.look==="neo"?12:a,{shapeSvg:n,bbox:l}=await at(e,t,tt(t)),c=(t?.width??l.width)+2*qr+s,h=(t?.height??l.height)+o,u=c-2*qr,p=h,d=-c/2,g=-h/2,m=[{x:0,y:0},{x:u,y:0},{x:u,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look==="handDrawn"){const y=U.svg(n),x=X(t,{}),b=y.rectangle(d,g,u+16,p,x),k=y.line(d+qr,g,d+qr,g+p,x),_=y.line(d+qr+u,g,d+qr+u,g+p,x);n.insert(()=>k,":first-child"),n.insert(()=>_,":first-child");const w=n.insert(()=>b,":first-child"),{cssStyles:v}=t;w.attr("class","basic label-container").attr("style",Pt(v)),Z(t,w)}else{const y=Ve(n,u,p,m);i&&y.attr("style",i),Z(t,y)}return t.intersect=function(y){return j.polygon(t,m,y)},n}f(hm,"subroutine");var Do=.2;async function cm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-s*2-Do*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await at(e,t,tt(t)),c=(t?.height?t?.height:l.height)+o*2,h=Do*c,u=Do*c,d=(t?.width?t?.width:l.width)+s*2+h-h,g=c,m=-d/2,y=-g/2,{cssStyles:x}=t,b=U.svg(n),k=X(t,{}),_=[{x:m-h/2,y},{x:m+d+h/2,y},{x:m+d+h/2,y:y+g},{x:m-h/2,y:y+g}],w=[{x:m+d-h/2,y:y+g},{x:m+d+h/2,y:y+g},{x:m+d+h/2,y:y+g-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=pt(_),E=b.path(v,k),B=pt(w),N=b.path(B,{...k,fillStyle:"solid"}),D=n.insert(()=>N,":first-child");return D.insert(()=>E,":first-child"),D.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),Z(t,D),t.intersect=function(O){return j.polygon(t,_,O)},n}f(cm,"taggedRect");async function um(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await at(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/8,h=.2*n,u=.2*l,p=l+c,{cssStyles:d}=t,g=U.svg(a),m=X(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:p/2},...sr(-n/2-n/2*.1,p/2,n/2+n/2*.1,p/2,c,.8),{x:n/2+n/2*.1,y:-p/2},{x:-n/2-n/2*.1,y:-p/2}],x=-n/2+n/2*.1,b=-p/2-u*.4,k=[{x:x+n-h,y:(b+l)*1.3},{x:x+n,y:b+l-u},{x:x+n,y:(b+l)*.9},...sr(x+n,(b+l)*1.25,x+n-h,(b+l)*1.3,-l*.02,.5)],_=pt(y),w=g.path(_,m),v=pt(k),E=g.path(v,{...m,fillStyle:"solid"}),B=a.insert(()=>E,":first-child");return B.insert(()=>w,":first-child"),B.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c/2-(s.y-(s.top??0))})`),Z(t,B),t.intersect=function(N){return j.polygon(t,y,N)},a}f(um,"taggedWaveEdgedRectangle");async function dm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await at(e,t,tt(t)),o=Math.max(s.width+(t.padding??0),t?.width||0),n=Math.max(s.height+(t.padding??0),t?.height||0),l=-o/2,c=-n/2,h=a.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",n),Z(t,h),t.intersect=function(u){return j.rect(t,u)},a}f(dm,"text");var QS=f((e,t,r,i,a,s)=>`M${e},${t}
a${a},${s} 0,0,1 0,${-i}
l${r},0
a${a},${s} 0,0,1 0,${i}
M${r},${-i}
a${a},${s} 0,0,0 0,${i}
l${-r},0`,"createCylinderPathD"),JS=f((e,t,r,i,a,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${a},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),tv=f((e,t,r,i,a,s)=>[`M${e+r/2},${-i/2}`,`a${a},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Rc=5,Nc=10;async function pm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?12:a/2;if(t.width||t.height){const m=t.height??0;t.height=(t.height??0)-s,t.height<Rc&&(t.height=Rc);const x=m/2/(2.5+m/50);t.width=(t.width??0)-s-x*3,t.width<Nc&&(t.width=Nc)}const{shapeSvg:o,bbox:n,label:l}=await at(e,t,tt(t)),c=(t.height?t.height:n.height)+s,h=c/2,u=h/(2.5+c/50),p=(t.width?t.width:n.width)+u+s,{cssStyles:d}=t;let g;if(t.look==="handDrawn"){const m=U.svg(o),y=JS(0,0,p,c,u,h),x=tv(0,0,p,c,u,h),b=m.path(y,X(t,{})),k=m.path(x,X(t,{fill:"none"}));g=o.insert(()=>k,":first-child"),g=o.insert(()=>b,":first-child"),g.attr("class","basic label-container"),d&&g.attr("style",d)}else{const m=QS(0,0,p,c,u,h);g=o.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Pt(d)).attr("style",i),g.attr("class","basic label-container outer-path"),d&&g.selectAll("path").attr("style",d),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-p/2}, ${c/2} )`),l.attr("transform",`translate(${-(n.width/2)-u-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Z(t,g),t.intersect=function(m){const y=j.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},o}f(pm,"tiltedCylinder");async function fm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=(t.look==="neo",a),o=t.look==="neo"?a*2:a,{shapeSvg:n,bbox:l}=await at(e,t,tt(t)),c=(t?.height??l.height)+s,h=(t?.width??l.width)+o,u=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=U.svg(n),m=X(t,{}),y=pt(u),x=g.path(y,m);p=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=Ve(n,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,Z(t,p),t.intersect=function(g){return j.polygon(t,u,g)},n}f(fm,"trapezoid");async function gm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<l&&(t.height=l),t.width=(t.width??0)-s*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await at(e,t,tt(t)),u=(t?.width?t?.width:h.width)+s*2,p=(t?.height?t?.height:h.height)+o*2,{cssStyles:d}=t,g=U.svg(c),m=X(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-u/2*.8,y:-p/2},{x:u/2*.8,y:-p/2},{x:u/2,y:-p/2*.6},{x:u/2,y:p/2},{x:-u/2,y:p/2},{x:-u/2,y:-p/2*.6}],x=pt(y),b=g.path(x,m),k=c.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),Z(t,k),t.intersect=function(_){return j.polygon(t,y,_)},c}f(gm,"trapezoidalPentagon");var qc=10,zc=10;async function mm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?a*2:a;(t.width||t.height)&&(t.width=((t?.width??0)-s)/2,t.width<zc&&(t.width=zc),t.height=t?.height??0,t.height<qc&&(t.height=qc));const{shapeSvg:o,bbox:n,label:l}=await at(e,t,tt(t)),c=Ue(mt().flowchart?.htmlLabels),h=(t?.width?t?.width:n.width)+s,u=t?.height?t?.height:h+n.height,p=u,d=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-u}],{cssStyles:g}=t,m=U.svg(o),y=X(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=pt(d),b=m.path(x,y),k=o.insert(()=>b,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=h,t.height=u,Z(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${u/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(_){return R.info("Triangle intersect",t,d,_),j.polygon(t,d,_)},o}f(mm,"triangle");async function ym(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a;let n=!0;(t.width||t.height)&&(n=!1,t.width=(t?.width??0)-s*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await at(e,t,tt(t)),u=(t?.width?t?.width:c.width)+(s??0)*2,p=(t?.height?t?.height:c.height)+(o??0)*2,d=t.look==="neo"?p/4:p/8,g=p+(n?d:-d),{cssStyles:m}=t,x=14-u,b=x>0?x/2:0,k=U.svg(l),_=X(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=[{x:-u/2-b,y:g/2},...sr(-u/2-b,g/2,u/2+b,g/2,d,.8),{x:u/2+b,y:-g/2},{x:-u/2-b,y:-g/2}],v=pt(w),E=k.path(v,_),B=l.insert(()=>E,":first-child");return B.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-d/2})`),h.attr("transform",`translate(${-u/2+(t.padding??0)-(c.x-(c.left??0))},${-p/2+(t.padding??0)-d-(c.y-(c.top??0))})`),Z(t,B),t.intersect=function(N){return j.polygon(t,w,N)},l}f(ym,"waveEdgedRectangle");async function Cm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?20:a;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);const _=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-_*(20/9)),t.width=t.width-s*2}const{shapeSvg:n,bbox:l}=await at(e,t,tt(t)),c=(t?.width?t?.width:l.width)+s*2,h=(t?.height?t?.height:l.height)+o,u=h/8,p=h+u*2,{cssStyles:d}=t,g=U.svg(n),m=X(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-c/2,y:p/2},...sr(-c/2,p/2,c/2,p/2,u,1),{x:c/2,y:-p/2},...sr(c/2,-p/2,-c/2,-p/2,u,-1)],x=pt(y),b=g.path(x,m),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),Z(t,k),t.intersect=function(_){return j.polygon(t,y,_)},n}f(Cm,"waveRectangle");var St=10;async function xm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-St,10),t.height=Math.max((t?.height??0)-s*2-St,10));const{shapeSvg:o,bbox:n,label:l}=await at(e,t,tt(t)),c=(t?.width?t?.width:n.width)+a*2+St,h=(t?.height?t?.height:n.height)+s*2+St,u=c-St,p=h-St,d=-u/2,g=-p/2,{cssStyles:m}=t,y=U.svg(o),x=X(t,{}),b=[{x:d-St,y:g-St},{x:d-St,y:g+p},{x:d+u,y:g+p},{x:d+u,y:g-St}],k=`M${d-St},${g-St} L${d+u},${g-St} L${d+u},${g+p} L${d-St},${g+p} L${d-St},${g-St}
M${d-St},${g} L${d+u},${g}
M${d},${g-St} L${d},${g+p}`;t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const _=y.path(k,x),w=o.insert(()=>_,":first-child");return w.attr("transform",`translate(${St/2}, ${St/2})`),w.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+St/2-(n.x-(n.left??0))}, ${-(n.height/2)+St/2-(n.y-(n.top??0))})`),Z(t,w),t.intersect=function(v){return j.polygon(t,b,v)},o}f(xm,"windowPane");var Wc=new Set(["redux-color","redux-dark-color"]),ev=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Nl(e,t){const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:a}=wt(),{rowEven:s,rowOdd:o,nodeBorder:n,borderColorArray:l}=a;if(t.look==="handDrawn"){const{themeVariables:rt}=wt(),{background:ht}=rt,ft={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ht}`]};await Nl(e,ft)}const c=wt();t.useHtmlLabels=c.htmlLabels;let h=c.er?.diagramPadding??10,u=c.er?.entityPadding??6;const{cssStyles:p}=t,{labelStyles:d,nodeStyles:g}=V(t);if(r.attributes.length===0&&t.label){const rt={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};Ye(t.label,c)+rt.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const ht=await _a(e,t,rt);if(i!=null&&Wc.has(i)){const ft=r.colorIndex??0;ht.attr("data-color-id",`color-${ft%l.length}`)}if(!Ue(c.htmlLabels)){const ft=ht.select("text"),Tt=ft.node()?.getBBox();ft.attr("transform",`translate(${-Tt.width/2}, 0)`)}return ht}c.htmlLabels||(h*=1.25,u*=1.25);let m=tt(t);m||(m="node default");const y=e.insert("g").attr("class",m).attr("id",t.domId||t.id),x=await Yr(y,t.label??"",c,0,0,["name"],d);x.height+=u;let b=0;const k=[],_=[];let w=0,v=0,E=0,B=0,N=!0,D=!0;for(const rt of r.attributes){const ht=await Yr(y,rt.type,c,0,b,["attribute-type"],d);w=Math.max(w,ht.width+h);const ft=await Yr(y,rt.name,c,0,b,["attribute-name"],d);v=Math.max(v,ft.width+h);const Tt=await Yr(y,rt.keys.join(),c,0,b,["attribute-keys"],d);E=Math.max(E,Tt.width+h);const xt=await Yr(y,rt.comment,c,0,b,["attribute-comment"],d);B=Math.max(B,xt.width+h);const Lt=Math.max(ht.height,ft.height,Tt.height,xt.height)+u;_.push({yOffset:b,rowHeight:Lt}),b+=Lt}let O=4;E<=h&&(N=!1,E=0,O--),B<=h&&(D=!1,B=0,O--);const W=y.node().getBBox();if(x.width+h*2-(w+v+E+B)>0){const rt=x.width+h*2-(w+v+E+B);w+=rt/O,v+=rt/O,E>0&&(E+=rt/O),B>0&&(B+=rt/O)}const z=w+v+E+B,I=U.svg(y),F=X(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");let L=0;_.length>0&&(L=_.reduce((rt,ht)=>rt+(ht?.rowHeight??0),0));const M=Math.max(W.width+h*2,t?.width||0,z),P=Math.max((L??0)+x.height,t?.height||0),H=-M/2,Y=-P/2;if(y.selectAll("g:not(:first-child)").each((rt,ht,ft)=>{const Tt=ct(ft[ht]),xt=Tt.attr("transform");let Lt=0,ue=0;if(xt){const Ie=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(xt);Ie&&(Lt=parseFloat(Ie[1]),ue=parseFloat(Ie[2]),Tt.attr("class").includes("attribute-name")?Lt+=w:Tt.attr("class").includes("attribute-keys")?Lt+=w+v:Tt.attr("class").includes("attribute-comment")&&(Lt+=w+v+E))}Tt.attr("transform",`translate(${H+h/2+Lt}, ${ue+Y+x.height+u/2})`)}),y.select(".name").attr("transform","translate("+-x.width/2+", "+(Y+u/2)+")"),i!=null&&Wc.has(i)){const rt=r.colorIndex??0;y.attr("data-color-id",`color-${rt%l.length}`)}const Q=I.rectangle(H,Y,M,P,F),dt=y.insert(()=>Q,":first-child").attr("class","outer-path").attr("style",p.join(""));k.push(0);for(const[rt,ht]of _.entries()){const Tt=(rt+1)%2===0&&ht.yOffset!==0,xt=I.rectangle(H,x.height+Y+ht?.yOffset,M,ht?.rowHeight,{...F,fill:Tt?s:o,stroke:n});y.insert(()=>xt,"g.label").attr("style",p.join("")).attr("class",`row-rect-${Tt?"even":"odd"}`)}const et=1e-4;let ut=jr(H,x.height+Y,M+H,x.height+Y,et),it=I.polygon(ut.map(rt=>[rt.x,rt.y]),F);if(y.insert(()=>it).attr("class","divider"),ut=jr(w+H,x.height+Y,w+H,P+Y,et),it=I.polygon(ut.map(rt=>[rt.x,rt.y]),F),y.insert(()=>it).attr("class","divider"),N){const rt=w+v+H;ut=jr(rt,x.height+Y,rt,P+Y,et),it=I.polygon(ut.map(ht=>[ht.x,ht.y]),F),y.insert(()=>it).attr("class","divider")}if(D){const rt=w+v+E+H;ut=jr(rt,x.height+Y,rt,P+Y,et),it=I.polygon(ut.map(ht=>[ht.x,ht.y]),F),y.insert(()=>it).attr("class","divider")}for(const rt of k){const ht=x.height+Y+rt;ut=jr(H,ht,M+H,ht,et),it=I.polygon(ut.map(ft=>[ft.x,ft.y]),F),y.insert(()=>it).attr("class","divider")}if(Z(t,dt),g&&t.look!=="handDrawn")if(i!=null&&ev.has(i))y.selectAll("path").attr("style",g);else{const ht=g.split(";")?.filter(ft=>ft.includes("stroke"))?.map(ft=>`${ft}`).join("; ");y.selectAll("path").attr("style",ht??""),y.selectAll(".row-rect-even path").attr("style",g)}return t.intersect=function(rt){return j.rect(t,rt)},y}f(Nl,"erBox");async function Yr(e,t,r,i=0,a=0,s=[],o=""){const n=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",o);t!==Th(t)&&(t=Th(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await Xe(n,t,{width:Ye(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=l.getBBox();if(Ue(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=ct(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}f(Yr,"addText");function jr(e,t,r,i,a){return e===r?[{x:e-a/2,y:t},{x:e+a/2,y:t},{x:r+a/2,y:i},{x:r-a/2,y:i}]:[{x:e,y:t-a/2},{x:e,y:t+a/2},{x:r,y:i+a/2},{x:r,y:i-a/2}]}f(jr,"lineToPolygon");async function bm(e,t,r,i,a=r.class.padding??12){const s=i?0:3,o=e.insert("g").attr("class",tt(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,u=0,p=0,d=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Yi(n,{text:`«${b}»`},0),u=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Yi(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();p=g.height,c=o.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const k=await Yi(c,b,m,[b.parseClassifier()]);m+=k+s}d=c.node().getBBox().height,d<=0&&(d=a/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const k=await Yi(h,b,y,[b.parseClassifier()]);y+=k+s}let x=o.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=o.node().getBBox(),c.attr("transform",`translate(0, ${u+p+a*2})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+p+(d?d+a*4:a*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}f(bm,"textHelper");async function Yi(e,t,r,i=[]){const a=e.insert("g").attr("class","label").attr("style",i.join("; ")),s=wt();let o="useHtmlLabels"in t?t.useHtmlLabels:Ue(s.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),Ji(n)&&(o=!0);const l=await Xe(a,Xn(vr(n)),{width:Ye(n,s)+50,classes:"markdown-node-label",useHtmlLabels:o},s);let c,h=1;if(o){const u=l.children[0],p=ct(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const g=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=s.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)}f(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),p.attr("width",c.width),p.attr("height",c.height)}else{i.includes("font-weight: bolder")&&ct(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(u.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return a.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}f(Yi,"addText");async function km(e,t){const r=mt(),{themeVariables:i}=r,{useGradient:a}=i,s=r.class.padding??12,o=s,n=t.useHtmlLabels??Ue(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await bm(e,t,r,n,o),{labelStyles:u,nodeStyles:p}=V(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=l.styles?.join(";")||p||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const g=l.members.length===0&&l.methods.length===0&&!r.class?.hideEmptyMembersBox,m=U.svg(c),y=X(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=Math.max(t.width??0,h.width);let b=Math.max(t.height??0,h.height);const k=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?b+=o:l.members.length>0&&l.methods.length===0&&(b+=o*2);const _=-x/2,w=-b/2;let v=g?s*2:l.members.length===0&&l.methods.length===0?-s:0;k&&(v=s*2);const E=m.rectangle(_-s,w-s-(g?s:l.members.length===0&&l.methods.length===0?-s/2:0),x+2*s,b+2*s+v,y),B=c.insert(()=>E,":first-child");B.attr("class","basic label-container outer-path");const N=B.node().getBBox(),D=c.select(".annotation-group").node().getBBox().height-(g?s/2:0)||0,O=c.select(".label-group").node().getBBox().height-(g?s/2:0)||0,W=c.select(".members-group").node().getBBox().height-(g?s/2:0)||0,z=(D+O+w+s-(w-s-(g?s:l.members.length===0&&l.methods.length===0?-s/2:0)))/2;if(c.selectAll(".text").each((I,F,L)=>{const M=ct(L[F]),P=M.attr("transform");let H=0;if(P){const et=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(P);et&&(H=parseFloat(et[2]))}let Y=H+w+s-(g?s:l.members.length===0&&l.methods.length===0?-s/2:0);if(M.attr("class").includes("methods-group")){const dt=Math.max(W,o/2);k?Y=Math.max(z,D+O+dt+w+o*2+s)+o*2:Y=D+O+dt+w+o*4+s}l.members.length===0&&l.methods.length===0&&r.class?.hideEmptyMembersBox&&(l.annotations.length>0?Y=H-o:Y=H),n||(Y-=4);let Q=_;(M.attr("class").includes("label-group")||M.attr("class").includes("annotation-group"))&&(Q=-M.node()?.getBBox().width/2||0,c.selectAll("text").each(function(dt,et,ut){window.getComputedStyle(ut[et]).textAnchor==="middle"&&(Q=0)})),M.attr("transform",`translate(${Q}, ${Y})`)}),l.members.length>0||l.methods.length>0||g){const I=D+O+w+s,F=m.line(N.x,I,N.x+N.width,I+.001,y);c.insert(()=>F).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",d)}if(g||l.members.length>0||l.methods.length>0){const I=D+O+W+w+o*2+s,F=m.line(N.x,k?Math.max(z,I):I,N.x+N.width,(k?Math.max(z,I):I)+.001,y);c.insert(()=>F).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",d),B.select(":nth-child(2)").attr("style",d),c.selectAll(".divider").select("path").attr("style",d),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",d),!n){const I=RegExp(/color\s*:\s*([^;]*)/),F=I.exec(d);if(F){const L=F[0].replace("color","fill");c.selectAll("tspan").attr("style",L)}else if(u){const L=I.exec(u);if(L){const M=L[0].replace("color","fill");c.selectAll("tspan").attr("style",M)}}}return Z(t,B),t.intersect=function(I){return j.rect(t,I)},c}f(km,"classBox");async function Tm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t,s=t,o=20,n=20,l="verifyMethod"in t,c=tt(t),{themeVariables:h}=mt(),{borderColorArray:u,requirementEdgeLabelBackground:p}=h,d=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let g;l?g=await ve(d,`&lt;&lt;${a.type}&gt;&gt;`,0,t.labelStyle):g=await ve(d,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let m=g;const y=await ve(d,a.name,m,t.labelStyle+"; font-weight: bold;");if(m+=y+n,l){const N=await ve(d,`${a.requirementId?`ID: ${a.requirementId}`:""}`,m,t.labelStyle);m+=N;const D=await ve(d,`${a.text?`Text: ${a.text}`:""}`,m,t.labelStyle);m+=D;const O=await ve(d,`${a.risk?`Risk: ${a.risk}`:""}`,m,t.labelStyle);m+=O,await ve(d,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,m,t.labelStyle)}else{const N=await ve(d,`${s.type?`Type: ${s.type}`:""}`,m,t.labelStyle);m+=N,await ve(d,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,m,t.labelStyle)}const x=(d.node()?.getBBox().width??200)+o,b=(d.node()?.getBBox().height??200)+o,k=-x/2,_=-b/2,w=U.svg(d),v=X(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const E=w.rectangle(k,_,x,b,v),B=d.insert(()=>E,":first-child");if(B.attr("class","basic label-container outer-path").attr("style",i),u?.length){const N=t.colorIndex??0;d.attr("data-color-id",`color-${N%u.length}`)}if(d.selectAll(".label").each((N,D,O)=>{const W=ct(O[D]),z=W.attr("transform");let I=0,F=0;if(z){const H=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(z);H&&(I=parseFloat(H[1]),F=parseFloat(H[2]))}const L=F-b/2;let M=k+o/2;(D===0||D===1)&&(M=I),W.attr("transform",`translate(${M}, ${L+o})`)}),m>g+y+n){const N=_+g+y+n;let D;if(t.look==="neo"){const z=[[k,N],[k+x,N],[k+x,N+.001],[k,N+.001]];D=w.polygon(z,v)}else D=w.line(k,N,k+x,N,v);d.insert(()=>D).attr("class","divider")}return Z(t,B),t.intersect=function(N){return j.rect(t,N)},i&&t.look!=="handDrawn"&&(p||u?.length)&&d.selectAll("path").attr("style",i),d}f(Tm,"requirementBox");async function ve(e,t,r,i=""){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),s=mt(),o=s.htmlLabels??!0,n=await Xe(a,Xn(vr(t)),{width:Ye(t,s)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},s);let l;if(o){const c=n.children[0],h=ct(n);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=n.children[0];for(const h of c.children)i&&h.setAttribute("style",i);l=n.getBBox(),l.height+=6}return a.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}f(ve,"addText");var rv=f(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function _m(e,t,{config:r}){const{labelStyles:i,nodeStyles:a}=V(t);t.labelStyle=i||"";const s=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await at(e,t,tt(t)),h=t.padding||10;let u="",p;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(u=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),p=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;p?{label:g,bbox:m}=await Io(p,"ticket"in t&&t.ticket||"",d):{label:g,bbox:m}=await Io(n,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:x}=await Io(n,"assigned"in t&&t.assigned||"",d);t.width=o;const b=10,k=t?.width||0,_=Math.max(m.height,x.height)/2,w=Math.max(l.height+b*2,t?.height||0)+_,v=-k/2,E=-w/2;c.attr("transform","translate("+(h-k/2)+", "+(-_-l.height/2)+")"),g.attr("transform","translate("+(h-k/2)+", "+(-_+l.height/2)+")"),y.attr("transform","translate("+(h+k/2-x.width-2*s)+", "+(-_+l.height/2)+")");let B;const{rx:N,ry:D}=t,{cssStyles:O}=t;if(t.look==="handDrawn"){const W=U.svg(n),z=X(t,{}),I=N||D?W.path(nr(v,E,k,w,N||0),z):W.rectangle(v,E,k,w,z);B=n.insert(()=>I,":first-child"),B.attr("class","basic label-container").attr("style",O||null)}else{B=n.insert("rect",":first-child"),B.attr("class","basic label-container __APA__").attr("style",a).attr("rx",N??5).attr("ry",D??5).attr("x",v).attr("y",E).attr("width",k).attr("height",w);const W="priority"in t&&t.priority;if(W){const z=n.append("line"),I=v+2,F=E+Math.floor((N??0)/2),L=E+w-Math.floor((N??0)/2);z.attr("x1",I).attr("y1",F).attr("x2",I).attr("y2",L).attr("stroke-width","4").attr("stroke",rv(W))}}return Z(t,B),t.height=w,t.intersect=function(W){return j.rect(t,W)},n}f(_m,"kanbanItem");async function wm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:n}=await at(e,t,tt(t)),l=s.width+10*o,c=s.height+8*o,h=.15*l,{cssStyles:u}=t,p=s.width+20,d=s.height+20,g=Math.max(l,p),m=Math.max(c,d);n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let y;const x=`M0 0
a${h},${h} 1 0,0 ${g*.25},${-1*m*.1}
a${h},${h} 1 0,0 ${g*.25},0
a${h},${h} 1 0,0 ${g*.25},0
a${h},${h} 1 0,0 ${g*.25},${m*.1}
a${h},${h} 1 0,0 ${g*.15},${m*.33}
a${h*.8},${h*.8} 1 0,0 0,${m*.34}
a${h},${h} 1 0,0 ${-1*g*.15},${m*.33}
a${h},${h} 1 0,0 ${-1*g*.25},${m*.15}
a${h},${h} 1 0,0 ${-1*g*.25},0
a${h},${h} 1 0,0 ${-1*g*.25},0
a${h},${h} 1 0,0 ${-1*g*.25},${-1*m*.15}
a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33}
a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
a${h},${h} 1 0,0 ${g*.1},${-1*m*.33}
H0 V0 Z`;if(t.look==="handDrawn"){const b=U.svg(a),k=X(t,{}),_=b.path(x,k);y=a.insert(()=>_,":first-child"),y.attr("class","basic label-container").attr("style",Pt(u))}else y=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),Z(t,y),t.calcIntersect=function(b,k){return j.rect(b,k)},t.intersect=function(b){return R.info("Bang intersect",t,b),j.rect(t,b)},a}f(wm,"bang");async function Sm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:n}=await at(e,t,tt(t)),l=s.width+2*o,c=s.height+2*o,h=.15*l,u=.25*l,p=.35*l,d=.2*l,{cssStyles:g}=t;let m;const y=`M0 0
a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
a${p},${p} 1 0,1 ${l*.4},${-1*l*.1}
a${u},${u} 1 0,1 ${l*.35},${l*.2}
a${h},${h} 1 0,1 ${l*.15},${c*.35}
a${d},${d} 1 0,1 ${-1*l*.15},${c*.65}
a${u},${h} 1 0,1 ${-1*l*.25},${l*.15}
a${p},${p} 1 0,1 ${-1*l*.5},0
a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
a${d},${d} 1 0,1 ${l*.1},${-1*c*.65}
H0 V0 Z`;if(t.look==="handDrawn"){const x=U.svg(a),b=X(t,{}),k=x.path(y,b);m=a.insert(()=>k,":first-child"),m.attr("class","basic label-container").attr("style",Pt(g))}else m=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),Z(t,m),t.calcIntersect=function(x,b){return j.rect(x,b)},t.intersect=function(x){return R.info("Cloud intersect",t,x),j.rect(t,x)},a}f(Sm,"cloud");async function vm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:n}=await at(e,t,tt(t)),l=s.width+8*o,c=s.height+2*o,h=5,u=t.look==="neo"?`
M${-l/2} ${c/2-h}
v${-c+2*h}
q0,-${h} ${h},-${h}
h${l-2*h}
q${h},0 ${h},${h}
v${c-h}
H${-l/2}
Z
`:`
M${-l/2} ${c/2-h}
v${-c+2*h}
q0,-${h} ${h},-${h}
h${l-2*h}
q${h},0 ${h},${h}
v${c-2*h}
q0,${h} ${-h},${h}
h${-(l-2*h)}
q${-h},0 ${-h},${-h}
Z
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const p=a.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return a.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),a.append(()=>n.node()),Z(t,p),t.calcIntersect=function(d,g){return j.rect(d,g)},t.intersect=function(d){return j.rect(t,d)},a}f(vm,"defaultMindmapNode");async function Bm(e,t){const r={padding:t.padding??0};return Rl(e,t,r)}f(Bm,"mindmapCircle");var iv=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:am},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:em},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:sm},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:hm},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Lg},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Rl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:wm},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Sm},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Qg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Ig},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:jg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Yg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:fm},{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:Wg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Ag},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:dm},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:bg},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:rm},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:lm},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:nm},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:$g},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Dg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:wg},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Sg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:vg},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Ug},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ym},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Og},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:pm},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Gg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Bg},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Fg},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:mm},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:xm},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Eg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:gm},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Mg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:im},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Zg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Vg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:xg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:_g},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:um},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:cm},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Cm},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Jg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Xg}],av=f(()=>{const t=[...Object.entries({state:om,choice:kg,note:Kg,rectWithTitle:tm,labelRect:Hg,iconSquare:qg,iconCircle:Rg,icon:Pg,iconRounded:Ng,imageSquare:zg,anchor:yg,kanbanItem:_m,mindmapCircle:Bm,defaultMindmapNode:vm,classBox:km,erBox:Nl,requirementBox:Tm}),...iv.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Lm=av();function sv(e){return e in Lm}f(sv,"isValidShape");var to=new Map;async function Fm(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?Lm[t.shape]:void 0;if(!s)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"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),a=await s(i,t,r)}else a=await s(e,t,r),i=a;return i.attr("data-look",Pt(t.look)),t.tooltip&&a.attr("title",t.tooltip),to.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}f(Fm,"insertNode");var zA=f((e,t)=>{to.set(t.id,e)},"setNodeElem"),WA=f(()=>{to.clear()},"clear"),HA=f(e=>{const t=to.get(e.id);R.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),ov=f((e,t,r,i,a,s=!1,o)=>{t.arrowTypeStart&&Hc(e,"start",t.arrowTypeStart,r,i,a,s,o),t.arrowTypeEnd&&Hc(e,"end",t.arrowTypeEnd,r,i,a,s,o)},"addEdgeMarkers"),nv={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},lv=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Hc=f((e,t,r,i,a,s,o=!1,n)=>{const l=nv[r],c=l&&lv.includes(l.type);if(!l){R.warn(`Unknown arrow type: ${r}`);return}const h=l.type,d=`${a}_${s}-${h}${t==="start"?"Start":"End"}${o&&c?"-margin":""}`;if(n&&n.trim()!==""){const g=n.replace(/[^\dA-Za-z]/g,"_"),m=`${d}_${g}`;if(!document.getElementById(m)){const y=document.getElementById(d);if(y){const x=y.cloneNode(!0);x.id=m,x.querySelectorAll("path, circle, line").forEach(k=>{k.setAttribute("stroke",n),l.fill&&k.setAttribute("fill",n)}),y.parentNode?.appendChild(x)}}e.attr(`marker-${t}`,`url(${i}#${m})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),hv=f(e=>typeof e=="string"?e:mt()?.flowchart?.curve,"resolveEdgeCurveType"),Ms=new Map,qt=new Map,YA=f(()=>{Ms.clear(),qt.clear()},"clear"),Di=f(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),cv=f(async(e,t)=>{const r=mt();let i=Zt(r);const{labelStyles:a}=V(t);t.labelStyle=a;const s=e.insert("g").attr("class","edgeLabel"),o=s.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await Xe(e,t.label,{style:Di(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(c),R.info("abc82",t,t.labelType);let h=c.getBBox(),u=h;if(i){const d=c.children[0],g=ct(c);h=d.getBoundingClientRect(),u=h,g.attr("width",h.width),g.attr("height",h.height)}else{const d=ct(c).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}o.attr("transform",Ai(u,i)),Ms.set(t.id,s),t.width=h.width,t.height=h.height;let p;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await Qe(g,t.startLabelLeft,Di(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){const x=m.children[0],b=ct(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",Ai(y,i)),qt.get(t.id)||qt.set(t.id,{}),qt.get(t.id).startLeft=d,ji(p,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await Qe(g,t.startLabelRight,Di(t.labelStyle)||"",!1,!1);p=m,g.node().appendChild(m);let y=m.getBBox();if(i){const x=m.children[0],b=ct(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",Ai(y,i)),qt.get(t.id)||qt.set(t.id,{}),qt.get(t.id).startRight=d,ji(p,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await Qe(g,t.endLabelLeft,Di(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){const x=m.children[0],b=ct(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",Ai(y,i)),d.node().appendChild(m),qt.get(t.id)||qt.set(t.id,{}),qt.get(t.id).endLeft=d,ji(p,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await Qe(g,t.endLabelRight,Di(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){const x=m.children[0],b=ct(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",Ai(y,i)),d.node().appendChild(m),qt.get(t.id)||qt.set(t.id,{}),qt.get(t.id).endRight=d,ji(p,t.endLabelRight)}return c},"insertEdgeLabel");function ji(e,t){Zt(mt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}f(ji,"setTerminalWidth");var uv=f((e,t)=>{R.debug("Moving label abc88 ",e.id,e.label,Ms.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=mt(),{subGraphTitleTotalMargin:a}=Sl(i);if(e.label){const s=Ms.get(e.id);let o=e.x,n=e.y;if(r){const l=ye.calcLabelPosition(r);R.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}s.attr("transform",`translate(${o}, ${n+a/2})`)}if(e.startLabelLeft){const s=qt.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const s=qt.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const s=qt.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const s=qt.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),dv=f((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),s=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return a>=o||s>=n},"outsideNode"),pv=f((e,t,r)=>{R.debug(`intersection calc abc89:
outsidePoint: ${JSON.stringify(t)}
insidePoint : ${JSON.stringify(r)}
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,a=e.y,s=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-s:o+s;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(a-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-a:a-l-t.y;n=h*u/c;const p={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-u:r.y-c+u};return n===0&&(p.x=t.x,p.y=t.y),h===0&&(p.x=t.x),c===0&&(p.y=t.y),R.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${n}`,p),p}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let u=c*n/h,p=r.x<t.x?r.x+h-n:r.x-h+n,d=r.y<t.y?r.y+u:r.y-u;return R.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${n}`,{_x:p,_y:d}),n===0&&(p=t.x,d=t.y),h===0&&(p=t.x),c===0&&(d=t.y),{x:p,y:d}}},"intersection"),Yc=f((e,t)=>{R.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(s=>{if(R.info("abc88 checking point",s,t),!dv(t,s)&&!a){const o=pv(t,i,s);R.debug("abc88 inside",s,i,o),R.debug("abc88 intersection",o,t);let n=!1;r.forEach(l=>{n=n||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?R.warn("abc88 no intersect",o,r):r.push(o),a=!0}else R.warn("abc88 outside",s,i),i=s,a||r.push(s)}),R.debug("returning points",r),r},"cutPathAtIntersect");function Am(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const a=e[i-1],s=e[i],o=e[i+1];(a.x===s.x&&s.y===o.y&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-a.y)>5||a.y===s.y&&s.x===o.x&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-o.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}f(Am,"extractCornerPoints");var jc=f(function(e,t,r){const i=t.x-e.x,a=t.y-e.y,s=Math.sqrt(i*i+a*a),o=r/s;return{x:t.x-o*i,y:t.y-o*a}},"findAdjacentPoint"),fv=f(function(e){const{cornerPointPositions:t}=Am(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const a=e[i-1],s=e[i+1],o=e[i],n=jc(a,o,5),l=jc(s,o,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let p={x:o.x,y:o.y};if(Math.abs(s.x-a.x)>10&&Math.abs(s.y-a.y)>=10){R.debug("Corner point fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));const d=5;o.x===n.x?p={x:c<0?n.x-d+u:n.x+d-u,y:h<0?n.y-u:n.y+u}:p={x:c<0?n.x-u:n.x+u,y:h<0?n.y-d+u:n.y+d-u}}else R.debug("Corner point skipping fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));r.push(p,l)}else r.push(e[i]);return r},"fixCorners"),gv=f((e,t,r)=>{const i=e-t-r,a=2,s=2,o=a+s,n=Math.floor(i/o),l=Array(n).fill(`${a} ${s}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),mv=f(function(e,t,r,i,a,s,o,n=!1){if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=mt();let c=t.points,h=!1;const u=a;var p=s;const d=[];for(const M in t.cssCompiledStyles)Ff(M)||d.push(t.cssCompiledStyles[M]);R.debug("UIO intersect check",t.points,p.x,u.x),p.intersect&&u.intersect&&!n&&(c=c.slice(1,t.points.length-1),c.unshift(u.intersect(c[0])),R.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],p,p.intersect(c[c.length-1])),c.push(p.intersect(c[c.length-1])));const g=btoa(JSON.stringify(c));t.toCluster&&(R.info("to cluster abc88",r.get(t.toCluster)),c=Yc(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(R.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=Yc(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter(M=>!Number.isNaN(M.y));const y=hv(t.curve);y!=="rounded"&&(m=fv(m));let x=Vi;switch(y){case"linear":x=Vi;break;case"basis":x=en;break;case"cardinal":x=ld;break;case"bumpX":x=id;break;case"bumpY":x=ad;break;case"catmullRom":x=cd;break;case"monotoneX":x=md;break;case"monotoneY":x=yd;break;case"natural":x=xd;break;case"step":x=bd;break;case"stepAfter":x=Td;break;case"stepBefore":x=kd;break;case"rounded":x=Vi;break;default:x=en}const{x:b,y:k}=c2(t),_=G1().x(b).y(k).curve(x);let w;switch(t.thickness){case"normal":w="edge-thickness-normal";break;case"thick":w="edge-thickness-thick";break;case"invisible":w="edge-thickness-invisible";break;default:w="edge-thickness-normal"}switch(t.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed";break;default:w+=" edge-pattern-solid"}let v,E=y==="rounded"?Em(Mm(m,t),5):_(m);const B=Array.isArray(t.style)?t.style:[t.style];let N=B.find(M=>M?.startsWith("stroke:")),D="";t.animate&&(D="edge-animation-fast"),t.animation&&(D="edge-animation-"+t.animation);let O=!1;if(t.look==="handDrawn"){const M=U.svg(e);Object.assign([],m);const P=M.path(E,{roughness:.3,seed:l});w+=" transition",v=ct(P).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",B?B.reduce((Y,Q)=>Y+";"+Q,""):"");let H=v.attr("d");v.attr("d",H),e.node().appendChild(v.node())}else{const M=d.join(";"),P=B?B.reduce((ut,it)=>ut+it+";",""):"",H=(M?M+";"+P+";":P)+";"+(B?B.reduce((ut,it)=>ut+";"+it,""):"");v=e.append("path").attr("d",E).attr("id",`${o}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",H),N=H.match(/stroke:([^;]+)/)?.[1],O=t.animate===!0||!!t.animation||M.includes("animation");const Y=v.node(),Q=typeof Y.getTotalLength=="function"?Y.getTotalLength():0,dt=Vh[t.arrowTypeStart]||0,et=Vh[t.arrowTypeEnd]||0;if(t.look==="neo"&&!O){const it=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?gv(Q,dt,et):`0 ${dt} ${Q-dt-et} ${et}`}; stroke-dashoffset: 0;`;v.attr("style",it+v.attr("style"))}}v.attr("data-edge",!0),v.attr("data-et","edge"),v.attr("data-id",t.id),v.attr("data-points",g),v.attr("data-look",Pt(t.look)),t.showPoints&&m.forEach(M=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",M.x).attr("cy",M.y)});let W="";(mt().flowchart.arrowMarkerAbsolute||mt().state.arrowMarkerAbsolute)&&(W=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,W=W.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),R.info("arrowTypeStart",t.arrowTypeStart),R.info("arrowTypeEnd",t.arrowTypeEnd);const z=!O&&t?.look==="neo";ov(v,t,W,o,i,z,N);const I=Math.floor(c.length/2),F=c[I];ye.isLabelCoordinateInPath(F,v.attr("d"))||(h=!0);let L={};return h&&(L.updatedPath=c),L.originalPath=t.points,L},"insertEdge");function Em(e,t){if(e.length<2)return"";let r="";const i=e.length,a=1e-5;for(let s=0;s<i;s++){const o=e[s],n=e[s-1],l=e[s+1];if(s===0)r+=`M${o.x},${o.y}`;else if(s===i-1)r+=`L${o.x},${o.y}`;else{const c=o.x-n.x,h=o.y-n.y,u=l.x-o.x,p=l.y-o.y,d=Math.hypot(c,h),g=Math.hypot(u,p);if(d<a||g<a){r+=`L${o.x},${o.y}`;continue}const m=c/d,y=h/d,x=u/g,b=p/g,k=m*x+y*b,_=Math.max(-1,Math.min(1,k)),w=Math.acos(_);if(w<a||Math.abs(Math.PI-w)<a){r+=`L${o.x},${o.y}`;continue}const v=Math.min(t/Math.sin(w/2),d/2,g/2),E=o.x-m*v,B=o.y-y*v,N=o.x+x*v,D=o.y+b*v;r+=`L${E},${B}`,r+=`Q${o.x},${o.y} ${N},${D}`}}return r}f(Em,"generateRoundedPath");function Mn(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}f(Mn,"calculateDeltaAndAngle");function Mm(e,t){const r=e.map(a=>({...a}));if(e.length>=2&&Ht[t.arrowTypeStart]){const a=Ht[t.arrowTypeStart],s=e[0],o=e[1],{angle:n}=Mn(s,o),l=a*Math.cos(n),c=a*Math.sin(n);r[0].x=s.x+l,r[0].y=s.y+c}const i=e.length;if(i>=2&&Ht[t.arrowTypeEnd]){const a=Ht[t.arrowTypeEnd],s=e[i-1],o=e[i-2],{angle:n}=Mn(o,s),l=a*Math.cos(n),c=a*Math.sin(n);r[i-1].x=s.x-l,r[i-1].y=s.y-c}return r}f(Mm,"applyMarkerOffsetsToPoints");var yv=f((e,t,r,i)=>{t.forEach(a=>{qv[a](e,r,i)})},"insertMarkers"),Cv=f((e,t,r)=>{R.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),xv=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),bv=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),kv=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Tv=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),_v=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),wv=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),Sv=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),vv=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Bv=f((e,t,r)=>{const i=wt(),{themeVariables:a}=i,{transitionColor:s}=a;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${s}`)},"barbNeo"),Lv=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Fv=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Av=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),Ev=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Mv=f((e,t,r)=>{const i=wt(),{themeVariables:a}=i,{strokeWidth:s}=a;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${s}`)},"only_one_neo"),$v=f((e,t,r)=>{const i=wt(),{themeVariables:a}=i,{strokeWidth:s,mainBkg:o}=a,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${s}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${s}`)},"zero_or_one_neo"),Ov=f((e,t,r)=>{const i=wt(),{themeVariables:a}=i,{strokeWidth:s}=a;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${s}`)},"one_or_more_neo"),Iv=f((e,t,r)=>{const i=wt(),{themeVariables:a}=i,{strokeWidth:s,mainBkg:o}=a,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${s}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${s}`)},"zero_or_more_neo"),Dv=f((e,t,r)=>{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").append("path").attr("d",`M0,0
L20,10
M20,10
L0,20`)},"requirement_arrow"),Pv=f((e,t,r)=>{const i=wt(),{themeVariables:a}=i,{strokeWidth:s}=a;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",`${s}`).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"),Rv=f((e,t,r)=>{const i=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");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Nv=f((e,t,r)=>{const i=wt(),{themeVariables:a}=i,{strokeWidth:s}=a,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",`${s}`)},"requirement_contains_neo"),qv={extension:Cv,composition:xv,aggregation:bv,dependency:kv,lollipop:Tv,point:_v,circle:wv,cross:Sv,barb:vv,barbNeo:Bv,only_one:Lv,zero_or_one:Fv,one_or_more:Av,zero_or_more:Ev,only_one_neo:Mv,zero_or_one_neo:$v,one_or_more_neo:Ov,zero_or_more_neo:Iv,requirement_arrow:Dv,requirement_contains:Rv,requirement_arrow_neo:Pv,requirement_contains_neo:Nv},zv=yv,Wv={common:fa,getConfig:wt,insertCluster:NS,insertEdge:mv,insertEdgeLabel:cv,insertMarkers:zv,insertNode:Fm,interpolateToCurve:xl,labelHelper:at,log:R,positionEdgeLabel:uv},ua={},$m=f(e=>{for(const t of e)ua[t.name]=t},"registerLayoutLoaders"),Hv=f(()=>{$m([{name:"dagre",loader:f(async()=>await gt(()=>import("./dagre-KV5264BT.Dzyh3PBi.js"),__vite__mapDeps([0,1,2,3,4,5,6])),"loader")},{name:"cose-bilkent",loader:f(async()=>await gt(()=>import("./cose-bilkent-S5V4N54A.BTJXqd_j.js"),__vite__mapDeps([7,8,6])),"loader")}])},"registerDefaultLayoutLoaders");Hv();var jA=f(async(e,t)=>{if(!(e.layoutAlgorithm in ua))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const u=h.domId||h.id;h.domId=`${e.diagramId}-${u}`}const r=ua[e.layoutAlgorithm],i=await r.loader(),{theme:a,themeVariables:s}=e.config,{useGradient:o,gradientStart:n,gradientStop:l}=s,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a?.includes("dark")?"#FFFFFF":"#000000"}`),o){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,Wv,{algorithm:r.algorithm})},"render"),UA=f((e="",{fallback:t="dagre"}={})=>{if(e in ua)return e;if(t in ua)return R.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Om="comm",Im="rule",Dm="decl",Yv="@import",jv="@namespace",Uv="@keyframes",Gv="@layer",Xv=Math.abs,Qi=String.fromCharCode;function Pm(e){return e.trim()}function $n(e,t,r){return e.replace(t,r)}function Vr(e,t){return e.charCodeAt(t)|0}function mi(e,t,r){return e.slice(t,r)}function Be(e){return e.length}function Vv(e){return e.length}function qa(e,t){return t.push(e),e}var eo=1,yi=1,Rm=0,ce=0,At=0,Ti="";function ql(e,t,r,i,a,s,o,n){return{value:e,root:t,parent:r,type:i,props:a,children:s,line:eo,column:yi,length:o,return:"",siblings:n}}function Zv(){return At}function Kv(){return At=ce>0?Vr(Ti,--ce):0,yi--,At===10&&(yi=1,eo--),At}function xe(){return At=ce<Rm?Vr(Ti,ce++):0,yi++,At===10&&(yi=1,eo++),At}function Je(){return Vr(Ti,ce)}function Ka(){return ce}function ro(e,t){return mi(Ti,e,t)}function da(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Qv(e){return eo=yi=1,Rm=Be(Ti=e),ce=0,[]}function Jv(e){return Ti="",e}function Po(e){return Pm(ro(ce-1,On(e===91?e+2:e===40?e+1:e)))}function tB(e){for(;(At=Je())&&At<33;)xe();return da(e)>2||da(At)>3?"":" "}function eB(e,t){for(;--t&&xe()&&!(At<48||At>102||At>57&&At<65||At>70&&At<97););return ro(e,Ka()+(t<6&&Je()==32&&xe()==32))}function On(e){for(;xe();)switch(At){case e:return ce;case 34:case 39:e!==34&&e!==39&&On(At);break;case 40:e===41&&On(e);break;case 92:xe();break}return ce}function rB(e,t){for(;xe()&&e+At!==57;)if(e+At===84&&Je()===47)break;return"/*"+ro(t,ce-1)+"*"+Qi(e===47?e:xe())}function iB(e){for(;!da(Je());)xe();return ro(e,ce)}function aB(e){return Jv(Qa("",null,null,null,[""],e=Qv(e),0,[0],e))}function Qa(e,t,r,i,a,s,o,n,l){for(var c=0,h=0,u=o,p=0,d=0,g=0,m=1,y=1,x=1,b=0,k=0,_="",w=a,v=s,E=i,B=_;y;)switch(g=k,k=xe()){case 40:g!=108&&Vr(B,u-1)==58?(b++,B+="("):B+=Po(k);break;case 41:b--,B+=")";break;case 34:case 39:case 91:B+=Po(k);break;case 9:case 10:case 13:case 32:if(b>0){B+=Qi(k);break}B+=tB(g);break;case 92:B+=eB(Ka()-1,7);continue;case 47:switch(Je()){case 42:case 47:qa(sB(rB(xe(),Ka()),t,r,l),l),(da(g||1)==5||da(Je()||1)==5)&&Be(B)&&mi(B,-1,void 0)!==" "&&(B+=" ");break;default:B+="/"}break;case 123*m:n[c++]=Be(B)*x;case 125*m:case 59:case 0:if(b>0&&k){B+=Qi(k);break}switch(k){case 0:case 125:y=0;case 59+h:x==-1&&(B=$n(B,/\f/g,"")),d>0&&(Be(B)-u||m===0)&&qa(d>32?Gc(B+";",i,r,u-1,l):Gc($n(B," ","")+";",i,r,u-2,l),l);break;case 59:B+=";";default:if(qa(E=Uc(B,t,r,c,h,a,n,_,w=[],v=[],u,s),s),k===123)if(h===0)Qa(B,t,E,E,w,s,u,n,v);else{switch(p){case 99:if(Vr(B,3)===110)break;case 108:if(Vr(B,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Qa(e,E,E,i&&qa(Uc(e,E,E,0,0,a,n,_,a,w=[],u,v),v),a,v,u,n,i?w:v):Qa(B,E,E,E,[""],v,0,n,v)}}c=h=d=0,m=x=1,_=B="",u=o;break;case 58:u=1+Be(B),d=g;default:if(m<1){if(k==123)--m;else if(k==125&&m++==0&&Kv()==125)continue}switch(B+=Qi(k),k*m){case 38:x=h>0?1:(B+="\f",-1);break;case 44:if(b>0)break;n[c++]=(Be(B)-1)*x,x=1;break;case 64:Je()===45&&(B+=Po(xe())),p=Je(),h=u=Be(_=B+=iB(Ka())),k++;break;case 45:g===45&&Be(B)==2&&(m=0)}}return s}function Uc(e,t,r,i,a,s,o,n,l,c,h,u){for(var p=a-1,d=a===0?s:[""],g=Vv(d),m=0,y=0,x=0;m<i;++m)for(var b=0,k=mi(e,p+1,p=Xv(y=o[m])),_=e;b<g;++b)(_=Pm(y>0?d[b]+" "+k:$n(k,/&\f/g,d[b])))&&(l[x++]=_);return ql(e,t,r,a===0?Im:n,l,c,h,u)}function sB(e,t,r,i){return ql(e,t,r,Om,Qi(Zv()),mi(e,2,-2),0,i)}function Gc(e,t,r,i,a){return ql(e,t,r,Dm,mi(e,0,i),mi(e,i+1,-1),i,a)}function In(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function oB(e,t,r,i){switch(e.type){case Gv:if(e.children.length)break;case Yv:case jv:case Dm:return e.return=e.return||e.value;case Om:return"";case Uv:return e.return=e.value+"{"+In(e.children,i)+"}";case Im:if(!Be(e.value=e.props.join(",")))return""}return Be(r=In(e.children,i))?e.return=e.value+"{"+r+"}":""}var nB=lf(Object.keys,Object),lB=Object.prototype,hB=lB.hasOwnProperty;function cB(e){if(!Us(e))return nB(e);var t=[];for(var r in Object(e))hB.call(e,r)&&r!="constructor"&&t.push(r);return t}var Dn=Er(Oe,"DataView"),Pn=Er(Oe,"Promise"),Rn=Er(Oe,"Set"),Nn=Er(Oe,"WeakMap"),Xc="[object Map]",uB="[object Object]",Vc="[object Promise]",Zc="[object Set]",Kc="[object WeakMap]",Qc="[object DataView]",dB=Ar(Dn),pB=Ar(ha),fB=Ar(Pn),gB=Ar(Rn),mB=Ar(Nn),fr=Ci;(Dn&&fr(new Dn(new ArrayBuffer(1)))!=Qc||ha&&fr(new ha)!=Xc||Pn&&fr(Pn.resolve())!=Vc||Rn&&fr(new Rn)!=Zc||Nn&&fr(new Nn)!=Kc)&&(fr=function(e){var t=Ci(e),r=t==uB?e.constructor:void 0,i=r?Ar(r):"";if(i)switch(i){case dB:return Qc;case pB:return Xc;case fB:return Vc;case gB:return Zc;case mB:return Kc}return t});var yB="[object Map]",CB="[object Set]",xB=Object.prototype,bB=xB.hasOwnProperty;function Jc(e){if(e==null)return!0;if(Gs(e)&&(Ts(e)||typeof e=="string"||typeof e.splice=="function"||yl(e)||Cl(e)||ks(e)))return!e.length;var t=fr(e);if(t==yB||t==CB)return!e.size;if(Us(e))return!cB(e).length;for(var r in e)if(bB.call(e,r))return!1;return!0}var Nm="c4",kB=f(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),TB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./c4Diagram-AHTNJAMY.D9XLip-k.js");return{diagram:t}},__vite__mapDeps([9,10,6]));return{id:Nm,diagram:e}},"loader"),_B={id:Nm,detector:kB,loader:TB},wB=_B,qm="flowchart",SB=f((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),vB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM.BOiZuCBe.js");return{diagram:t}},__vite__mapDeps([11,12,10,13,14,15,6]));return{id:qm,diagram:e}},"loader"),BB={id:qm,detector:SB,loader:vB},LB=BB,zm="flowchart-v2",FB=f((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),AB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM.BOiZuCBe.js");return{diagram:t}},__vite__mapDeps([11,12,10,13,14,15,6]));return{id:zm,diagram:e}},"loader"),EB={id:zm,detector:FB,loader:AB},MB=EB,Wm="er",$B=f(e=>/^\s*erDiagram/.test(e),"detector"),OB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./erDiagram-SMLLAGMA.BObTJjrO.js");return{diagram:t}},__vite__mapDeps([16,13,14,15,6]));return{id:Wm,diagram:e}},"loader"),IB={id:Wm,detector:$B,loader:OB},DB=IB,Hm="gitGraph",PB=f(e=>/^\s*gitGraph/.test(e),"detector"),RB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-UUTBAWPF.T55o_OZe.js");return{diagram:t}},__vite__mapDeps([17,18,19,20,6,4,2]));return{id:Hm,diagram:e}},"loader"),NB={id:Hm,detector:PB,loader:RB},qB=NB,Ym="gantt",zB=f(e=>/^\s*gantt/.test(e),"detector"),WB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./ganttDiagram-T4ZO3ILL.ZyVGbZyU.js");return{diagram:t}},__vite__mapDeps([21,22,23,24,6]));return{id:Ym,diagram:e}},"loader"),HB={id:Ym,detector:zB,loader:WB},YB=HB,jm="info",jB=f(e=>/^\s*info/.test(e),"detector"),UB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./infoDiagram-42DDH7IO.ClyVFDpn.js");return{diagram:t}},__vite__mapDeps([25,20,6,4,2]));return{id:jm,diagram:e}},"loader"),GB={id:jm,detector:jB,loader:UB},Um="pie",XB=f(e=>/^\s*pie/.test(e),"detector"),VB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./pieDiagram-DEJITSTG.D3Yf2d7p.js");return{diagram:t}},__vite__mapDeps([26,18,20,6,4,2,27,28,23]));return{id:Um,diagram:e}},"loader"),ZB={id:Um,detector:XB,loader:VB},Gm="quadrantChart",KB=f(e=>/^\s*quadrantChart/.test(e),"detector"),QB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./quadrantDiagram-34T5L4WZ.Dk93g3U7.js");return{diagram:t}},__vite__mapDeps([29,22,23,24,6]));return{id:Gm,diagram:e}},"loader"),JB={id:Gm,detector:KB,loader:QB},tL=JB,Xm="xychart",eL=f(e=>/^\s*xychart(-beta)?/.test(e),"detector"),rL=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./xychartDiagram-5P7HB3ND.BRakMHHi.js");return{diagram:t}},__vite__mapDeps([30,23,28,22,24,6]));return{id:Xm,diagram:e}},"loader"),iL={id:Xm,detector:eL,loader:rL},aL=iL,Vm="requirement",sL=f(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),oL=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./requirementDiagram-MS252O5E.DG0FTVHA.js");return{diagram:t}},__vite__mapDeps([31,13,14,6]));return{id:Vm,diagram:e}},"loader"),nL={id:Vm,detector:sL,loader:oL},lL=nL,Zm="sequence",hL=f(e=>/^\s*sequenceDiagram/.test(e),"detector"),cL=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sequenceDiagram-FGHM5R23.BNFcR9qe.js");return{diagram:t}},__vite__mapDeps([32,10,19,6]));return{id:Zm,diagram:e}},"loader"),uL={id:Zm,detector:hL,loader:cL},dL=uL,Km="class",pL=f((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),fL=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-6PBFFD2Q.BzO8UvP8.js");return{diagram:t}},__vite__mapDeps([33,34,12,10,13,14,6]));return{id:Km,diagram:e}},"loader"),gL={id:Km,detector:pL,loader:fL},mL=gL,Qm="classDiagram",yL=f((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),CL=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-v2-HSJHXN6E.BzO8UvP8.js");return{diagram:t}},__vite__mapDeps([35,34,12,10,13,14,6]));return{id:Qm,diagram:e}},"loader"),xL={id:Qm,detector:yL,loader:CL},bL=xL,Jm="state",kL=f((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),TL=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-FHFEXIEX.KxjqYfNL.js");return{diagram:t}},__vite__mapDeps([36,37,13,14,1,2,3,4,6]));return{id:Jm,diagram:e}},"loader"),_L={id:Jm,detector:kL,loader:TL},wL=_L,ty="stateDiagram",SL=f((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),vL=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-QKLJ7IA2.CS4DWscx.js");return{diagram:t}},__vite__mapDeps([38,37,13,14,6]));return{id:ty,diagram:e}},"loader"),BL={id:ty,detector:SL,loader:vL},LL=BL,ey="journey",FL=f(e=>/^\s*journey/.test(e),"detector"),AL=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./journeyDiagram-VCZTEJTY.BmkfNblc.js");return{diagram:t}},__vite__mapDeps([39,12,10,27,6]));return{id:ey,diagram:e}},"loader"),EL={id:ey,detector:FL,loader:AL},ML=EL,$L=f((e,t,r)=>{R.debug(`rendering svg for syntax error
`);const i=rk(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),vu(i,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),ry={draw:$L},OL=ry,IL={db:{},renderer:ry,parser:{parse:f(()=>{},"parse")}},DL=IL,iy="flowchart-elk",PL=f((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),RL=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM.BOiZuCBe.js");return{diagram:t}},__vite__mapDeps([11,12,10,13,14,15,6]));return{id:iy,diagram:e}},"loader"),NL={id:iy,detector:PL,loader:RL},qL=NL,ay="timeline",zL=f(e=>/^\s*timeline/.test(e),"detector"),WL=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./timeline-definition-GMOUNBTQ.BsGTkzdk.js");return{diagram:t}},__vite__mapDeps([40,27,6]));return{id:ay,diagram:e}},"loader"),HL={id:ay,detector:zL,loader:WL},YL=HL,sy="mindmap",jL=f(e=>/^\s*mindmap/.test(e),"detector"),UL=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./mindmap-definition-QFDTVHPH.Db1CW-aX.js");return{diagram:t}},__vite__mapDeps([41,13,14,6]));return{id:sy,diagram:e}},"loader"),GL={id:sy,detector:jL,loader:UL},XL=GL,oy="kanban",VL=f(e=>/^\s*kanban/.test(e),"detector"),ZL=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./kanban-definition-6JOO6SKY.DMOK7bzJ.js");return{diagram:t}},__vite__mapDeps([42,12,6]));return{id:oy,diagram:e}},"loader"),KL={id:oy,detector:VL,loader:ZL},QL=KL,ny="sankey",JL=f(e=>/^\s*sankey(-beta)?/.test(e),"detector"),tF=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sankeyDiagram-XADWPNL6.B49IC-gh.js");return{diagram:t}},__vite__mapDeps([43,28,23,6]));return{id:ny,diagram:e}},"loader"),eF={id:ny,detector:JL,loader:tF},rF=eF,ly="packet",iF=f(e=>/^\s*packet(-beta)?/.test(e),"detector"),aF=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-TYMM5635.BjNPV6NQ.js");return{diagram:t}},__vite__mapDeps([44,18,20,6,4,2]));return{id:ly,diagram:e}},"loader"),sF={id:ly,detector:iF,loader:aF},hy="radar",oF=f(e=>/^\s*radar-beta/.test(e),"detector"),nF=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-MMDJMWI5.CoyJYWwi.js");return{diagram:t}},__vite__mapDeps([45,18,20,6,4,2]));return{id:hy,diagram:e}},"loader"),lF={id:hy,detector:oF,loader:nF},cy="block",hF=f(e=>/^\s*block(-beta)?/.test(e),"detector"),cF=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./blockDiagram-DXYQGD6D.ByBX24mM.js");return{diagram:t}},__vite__mapDeps([46,12,5,1,2,15,6]));return{id:cy,diagram:e}},"loader"),uF={id:cy,detector:hF,loader:cF},dF=uF,uy="treeView",pF=f(e=>/^\s*treeView-beta/.test(e),"detector"),fF=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-5BDNPKRD.Cxuyd23g.js");return{diagram:t}},__vite__mapDeps([47,18,19,20,6,4,2]));return{id:uy,diagram:e}},"loader"),gF={id:uy,detector:pF,loader:fF},mF=gF,dy="architecture",yF=f(e=>/^\s*architecture/.test(e),"detector"),CF=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./architectureDiagram-Q4EWVU46.DdWOD9Cd.js");return{diagram:t}},__vite__mapDeps([48,18,20,6,4,2,8]));return{id:dy,diagram:e}},"loader"),xF={id:dy,detector:yF,loader:CF},bF=xF,py="ishikawa",kF=f(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),TF=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-UXIWVN3A.C5DoIbOa.js");return{diagram:t}},__vite__mapDeps([49,6]));return{id:py,diagram:e}},"loader"),_F={id:py,detector:kF,loader:TF},fy="venn",wF=f(e=>/^\s*venn-beta/.test(e),"detector"),SF=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./vennDiagram-DHZGUBPP.ClhBN1CI.js");return{diagram:t}},__vite__mapDeps([50,6]));return{id:fy,diagram:e}},"loader"),vF={id:fy,detector:wF,loader:SF},BF=vF,gy="treemap",LF=f(e=>/^\s*treemap/.test(e),"detector"),FF=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-G4DWMVQ6.DNFPplE9.js");return{diagram:t}},__vite__mapDeps([51,14,18,20,6,4,2,24,28,23]));return{id:gy,diagram:e}},"loader"),AF={id:gy,detector:LF,loader:FF},my="wardley-beta",EF=f(e=>/^\s*wardley-beta/i.test(e),"detector"),MF=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./wardleyDiagram-NUSXRM2D.CtyamWnD.js");return{diagram:t}},__vite__mapDeps([52,18,20,6,4,2]));return{id:my,diagram:e}},"loader"),$F={id:my,detector:EF,loader:MF},OF=$F,tu=!1,io=f(()=>{tu||(tu=!0,is("error",DL,e=>e.toLowerCase().trim()==="error"),is("---",{db:{clear:f(()=>{},"clear")},styles:{},renderer:{draw:f(()=>{},"draw")},parser:{parse:f(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:f(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),zo(qL,XL,bF),zo(wB,QL,bL,mL,DB,YB,GB,ZB,lL,dL,MB,LB,YL,qB,LL,wL,ML,tL,rF,sF,aL,dF,mF,lF,_F,AF,BF,OF))},"addDiagrams"),IF=f(async()=>{R.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(kr).map(async([r,{detector:i,loader:a}])=>{if(a)try{jo(r)}catch{try{const{diagram:s,id:o}=await a();is(o,s,i)}catch(s){throw R.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete kr[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){R.error(`Failed to load ${t.length} external diagrams`);for(const r of t)R.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),DF="graphics-document document";function yy(e,t){e.attr("role",DF),t!==""&&e.attr("aria-roledescription",t)}f(yy,"setA11yDiagramInfo");function Cy(e,t,r,i){if(e.insert!==void 0){if(r){const a=`chart-desc-${i}`;e.attr("aria-describedby",a),e.insert("desc",":first-child").attr("id",a).text(r)}if(t){const a=`chart-title-${i}`;e.attr("aria-labelledby",a),e.insert("title",":first-child").attr("id",a).text(t)}}}f(Cy,"addSVGa11yTitleDescription");var br,qn=(br=class{constructor(t,r,i,a,s){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=s}static async fromText(t,r={}){const i=wt(),a=Hn(t,i);t=sw(t)+`
`;try{jo(a)}catch{const c=k0(a);if(!c)throw new du(`Diagram ${a} not found.`);const{id:h,diagram:u}=await c();is(h,u)}const{db:s,parser:o,renderer:n,init:l}=jo(a);return o.parser&&(o.parser.yy=s),s.clear?.(),l?.(i),r.title&&s.setDiagramTitle?.(r.title),await o.parse(t),new br(a,t,s,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},f(br,"Diagram"),br),eu=[],PF=f(()=>{eu.forEach(e=>{e()}),eu=[]},"attachFunctions"),RF=f(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function xy(e){const t=e.match(uu);if(!t)return{text:e,metadata:{}};let r=h2(t[1],{schema:l2})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}f(xy,"extractFrontMatter");var NF=f(e=>e.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),qF=f(e=>{const{text:t,metadata:r}=xy(e),{displayMode:i,title:a,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:a,config:s,text:t}},"processFrontmatter"),zF=f(e=>{const t=ye.detectInit(e)??{},r=ye.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:U_(e),directive:t}},"processDirectives");function zl(e){const t=NF(e),r=qF(t),i=zF(r.text),a=wl(r.config,i.directive);return e=RF(i.text),{code:e,title:r.title,config:a}}f(zl,"preprocessDiagram");function by(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}f(by,"toBase64");var WF=5e4,HF="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",YF="sandbox",jF="loose",UF="http://www.w3.org/2000/svg",GF="http://www.w3.org/1999/xlink",XF="http://www.w3.org/1999/xhtml",VF="100%",ZF="100%",KF="border:0;margin:0;",QF="margin:0",JF="allow-top-navigation-by-user-activation allow-popups",tA='The "iframe" tag is not supported by your browser.',eA=["foreignobject"],rA=["dominant-baseline"];function Wl(e){const t=zl(e);return es(),V0(t.config??{}),t}f(Wl,"processAndSetConfigs");async function ky(e,t){io();try{const{code:r,config:i}=Wl(e);return{diagramType:(await _y(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}f(ky,"parse");var ru=f((e,t,r=[])=>`
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),iA=f((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const o=Zt(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(n=>{Jc(n.styles)||o.forEach(l=>{r+=ru(n.id,l,n.styles)}),Jc(n.textStyles)||(r+=ru(n.id,"tspan",(n?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),aA=f((e,t,r,i)=>{const a=iA(e,r),s=fC(t,a,{...e.themeVariables,theme:e.theme,look:e.look},i);return In(aB(`${i}{${s}}`),oB)},"createUserStyles"),sA=f((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=vr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),oA=f((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":ZF,i=by(`<body style="${QF}">${e}</body>`);return`<iframe style="width:${VF};height:${r};${KF}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${JF}">
${tA}
</iframe>`},"putIntoIFrame"),iu=f((e,t,r,i,a)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const o=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",UF);return a&&o.attr("xmlns:xlink",a),o.append("g"),e},"appendDivSvgG");function zn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}f(zn,"sandboxedIframe");var nA=f((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),lA=f(async function(e,t,r){io();const i=Wl(t);t=i.code;const a=wt();R.debug(a),t.length>(a?.maxTextSize??WF)&&(t=HF);const s="#"+e,o="i"+e,n="#"+o,l="d"+e,c="#"+l,h=f(()=>{const z=ct(p?n:c).node();z&&"remove"in z&&z.remove()},"removeTempElements");let u=ct("body");const p=a.securityLevel===YF,d=a.securityLevel===jF,g=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const W=zn(ct(r),o);u=ct(W.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ct(r);iu(u,e,l,`font-family: ${g}`,GF)}else{if(nA(document,e,l,o),p){const W=zn(ct("body"),o);u=ct(W.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ct("body");iu(u,e,l)}let m,y;try{m=await qn.fromText(t,{title:i.title})}catch(W){if(a.suppressErrorRendering)throw h(),W;m=await qn.fromText("error"),y=W}const x=u.select(c).node(),b=m.type,k=x.firstChild,_=k.firstChild,w=m.renderer.getClasses?.(t,m),v=aA(a,b,w,s),E=document.createElement("style");E.innerHTML=v,k.insertBefore(E,_);try{await m.renderer.draw(t,e,"11.14.0",m)}catch(W){throw a.suppressErrorRendering?h():OL.draw(t,e,"11.14.0"),W}const B=u.select(`${c} svg`),N=m.db.getAccTitle?.(),D=m.db.getAccDescription?.();wy(b,B,N,D),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",XF);let O=u.select(c).node().innerHTML;if(R.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),O=sA(O,p,Ue(a.arrowMarkerAbsolute)),p){const W=u.select(c+" svg").node();O=oA(O,W)}else d||(O=ci.sanitize(O,{ADD_TAGS:eA,ADD_ATTR:rA,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(PF(),y)throw y;return h(),{diagramType:b,svg:O,bindFunctions:m.db.bindFunctions}},"render");function Ty(e={}){const t=Ot({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),G0(t),t?.theme&&t.theme in ze?t.themeVariables=ze[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ze.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?U0(t):yu();Wn(r.logLevel),io()}f(Ty,"initialize");var _y=f((e,t={})=>{const{code:r}=zl(e);return qn.fromText(r,t)},"getDiagramFromText");function wy(e,t,r,i){yy(t,e),Cy(t,r,i,t.attr("id"))}f(wy,"addA11yInfo");var Lr=Object.freeze({render:lA,parse:ky,getDiagramFromText:_y,initialize:Ty,getConfig:wt,setConfig:Cu,getSiteConfig:yu,updateSiteConfig:X0,reset:f(()=>{es()},"reset"),globalReset:f(()=>{es(ui)},"globalReset"),defaultConfig:ui});Wn(wt().logLevel);es(wt());var hA=f((e,t,r)=>{R.warn(e),_l(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"),Sy=f(async function(e={querySelector:".mermaid"}){try{await cA(e)}catch(t){if(_l(t)&&R.error(t.str),je.parseError&&je.parseError(t),!e.suppressErrors)throw R.error("Use the suppressErrors option to suppress these errors"),t}},"run"),cA=f(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Lr.getConfig();R.debug(`${e?"":"No "}Callback function found`);let a;if(r)a=r;else if(t)a=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");R.debug(`Found ${a.length} diagrams`),i?.startOnLoad!==void 0&&(R.debug("Start On Load: "+i?.startOnLoad),Lr.updateSiteConfig({startOnLoad:i?.startOnLoad}));const s=new ye.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(a)){if(R.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${s.next()}`;o=l.innerHTML,o=Wf(ye.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=ye.detectInit(o);h&&R.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:p}=await Fy(c,o,l);l.innerHTML=u,e&&await e(c),p&&p(l)}catch(u){hA(u,n,je.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),vy=f(function(e){Lr.initialize(e)},"initialize"),uA=f(async function(e,t,r){R.warn("mermaid.init is deprecated. Please use run instead."),e&&vy(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Sy(i)},"init"),dA=f(async(e,{lazyLoad:t=!0}={})=>{io(),zo(...e),t===!1&&await IF()},"registerExternalDiagrams"),By=f(function(){if(je.startOnLoad){const{startOnLoad:e}=Lr.getConfig();e&&je.run().catch(t=>R.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",By,!1);var pA=f(function(e){je.parseError=e},"setParseErrorHandler"),$s=[],Ro=!1,Ly=f(async()=>{if(!Ro){for(Ro=!0;$s.length>0;){const e=$s.shift();if(e)try{await e()}catch(t){R.error("Error executing queue",t)}}Ro=!1}},"executeQueue"),fA=f(async(e,t)=>new Promise((r,i)=>{const a=f(()=>new Promise((s,o)=>{Lr.parse(e,t).then(n=>{s(n),r(n)},n=>{R.error("Error parsing",n),je.parseError?.(n),o(n),i(n)})}),"performCall");$s.push(a),Ly().catch(i)}),"parse"),Fy=f((e,t,r)=>new Promise((i,a)=>{const s=f(()=>new Promise((o,n)=>{Lr.render(e,t,r).then(l=>{o(l),i(l)},l=>{R.error("Error parsing",l),je.parseError?.(l),n(l),a(l)})}),"performCall");$s.push(s),Ly().catch(a)}),"render"),gA=f(()=>Object.keys(kr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),je={startOnLoad:!0,mermaidAPI:Lr,parse:fA,render:Fy,init:uA,run:Sy,registerExternalDiagrams:dA,registerLayoutLoaders:$m,initialize:vy,parseError:void 0,contentLoaded:By,setParseErrorHandler:pA,detectType:Hn,registerIconPacks:dS,getRegisteredDiagramsMetadata:gA},mA=je;/*! Check if previously processed *//*!
* Wait for document loaded before starting the execution
*/const GA=Object.freeze(Object.defineProperty({__proto__:null,default:mA},Symbol.toStringTag,{value:"Module"}));export{BA as $,gC as A,TA as B,tr as C,Fe as D,Wy as E,wt as F,_C as G,wl as H,mu as I,l2 as J,K_ as K,rk as L,H1 as M,rl as N,vA as O,FA as P,Rr as Q,Wh as R,zh as S,EA as T,nt as U,AA as V,LA as W,wA as X,SA as Y,$A as Z,f as _,yC as a,lc as a$,MA as a0,B0 as a1,Ji as a2,bA as a3,Xs as a4,W_ as a5,iC as a6,Su as a7,Th as a8,G1 as a9,uv as aA,cv as aB,fS as aC,ou as aD,Y1 as aE,xA as aF,Gs as aG,Ts as aH,Cf as aI,Py as aJ,ka as aK,dS as aL,uS as aM,Qn as aN,Ke as aO,Ih as aP,_b as aQ,ra as aR,m_ as aS,mf as aT,hf as aU,bT as aV,xs as aW,kT as aX,xa as aY,fr as aZ,u_ as a_,en as aa,Z_ as ab,ke as ac,$ as ad,A as ae,uC as af,Bu as ag,NS as ah,Fm as ai,HA as aj,c2 as ak,Zt as al,Xe as am,Ai as an,Sl as ao,wf as ap,vr as aq,Lf as ar,U as as,zv as at,WA as au,YA as av,qA as aw,Z as ax,zA as ay,mv as az,mC as b,Fr as b0,TT as b1,yl as b2,xT as b3,ST as b4,xi as b5,g_ as b6,R_ as b7,AT as b8,E_ as b9,A_ as bA,N_ as bB,ml as bC,z_ as bD,CA as bE,GA as bF,gl as ba,Jc as bb,V as bc,Ff as bd,re as be,mb as bf,Kn as bg,zu as bh,ma as bi,Yu as bj,_A as bk,zy as bl,Ci as bm,T_ as bn,cB as bo,Ca as bp,ks as bq,or as br,Hs as bs,ic as bt,Cl as bu,uf as bv,gf as bw,yT as bx,Rn as by,P_ as bz,mt as c,ct as d,vu as e,Ot as f,xC as g,Ye as h,be as i,p2 as j,fa as k,R as l,vf as m,pa as n,kA as o,UA as p,bC as q,jA as r,CC as s,kC as t,ye as u,h2 as v,tw as w,sv as x,OA as y,ci as z};