optio-dashboard 0.1.5 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/public/assets/{arc-CsRGgy7J.js → arc-B0izc5gU.js} +1 -1
  2. package/dist/public/assets/{architectureDiagram-3BPJPVTR-CzWB7fgP.js → architectureDiagram-3BPJPVTR-DP6-aNAa.js} +1 -1
  3. package/dist/public/assets/{blockDiagram-GPEHLZMM-Iy_GtHFo.js → blockDiagram-GPEHLZMM-e2nscQC5.js} +1 -1
  4. package/dist/public/assets/{c4Diagram-AAUBKEIU-7Na3P-kZ.js → c4Diagram-AAUBKEIU-CI_WHnrE.js} +1 -1
  5. package/dist/public/assets/channel-D4PrAudT.js +1 -0
  6. package/dist/public/assets/{chunk-2J33WTMH-CjAgXvcb.js → chunk-2J33WTMH-2xgOa2Yb.js} +1 -1
  7. package/dist/public/assets/{chunk-4BX2VUAB-CxRvQfP4.js → chunk-4BX2VUAB-Cb41Zl7c.js} +1 -1
  8. package/dist/public/assets/{chunk-55IACEB6-DK_xnW4L.js → chunk-55IACEB6-DoxS7_ud.js} +1 -1
  9. package/dist/public/assets/{chunk-727SXJPM-D0DxTmIY.js → chunk-727SXJPM-Dm49Gn_q.js} +1 -1
  10. package/dist/public/assets/{chunk-AQP2D5EJ-ww794e93.js → chunk-AQP2D5EJ-Ch9Xd2Jp.js} +1 -1
  11. package/dist/public/assets/{chunk-FMBD7UC4-CePgPEQZ.js → chunk-FMBD7UC4-BGx9SpKa.js} +1 -1
  12. package/dist/public/assets/{chunk-ND2GUHAM-BwTWhr0t.js → chunk-ND2GUHAM-CYidZK1i.js} +1 -1
  13. package/dist/public/assets/{chunk-QZHKN3VN-6tkVhtei.js → chunk-QZHKN3VN-BdmDPkG8.js} +1 -1
  14. package/dist/public/assets/classDiagram-4FO5ZUOK-CTewEgrE.js +1 -0
  15. package/dist/public/assets/classDiagram-v2-Q7XG4LA2-CTewEgrE.js +1 -0
  16. package/dist/public/assets/{cose-bilkent-S5V4N54A-Cs6fpB7P.js → cose-bilkent-S5V4N54A-BLgQgbpB.js} +1 -1
  17. package/dist/public/assets/{dagre-BM42HDAG-CDHZECic.js → dagre-BM42HDAG-Dq1Zk1WA.js} +1 -1
  18. package/dist/public/assets/{diagram-2AECGRRQ-CkuG87Ds.js → diagram-2AECGRRQ-BEGf4hZt.js} +1 -1
  19. package/dist/public/assets/{diagram-5GNKFQAL-DL_heS1V.js → diagram-5GNKFQAL-CpQ8v6Gk.js} +1 -1
  20. package/dist/public/assets/{diagram-KO2AKTUF-C7DTFOLq.js → diagram-KO2AKTUF-BJCrkyuo.js} +1 -1
  21. package/dist/public/assets/{diagram-LMA3HP47-BHMX7mDD.js → diagram-LMA3HP47-C9J3k7m5.js} +1 -1
  22. package/dist/public/assets/{diagram-OG6HWLK6-Bw6DhtUH.js → diagram-OG6HWLK6-BR4-7yVy.js} +1 -1
  23. package/dist/public/assets/{erDiagram-TEJ5UH35-CCFnLCuI.js → erDiagram-TEJ5UH35-BF5jb9tg.js} +1 -1
  24. package/dist/public/assets/{flowDiagram-I6XJVG4X-XXjCvVe9.js → flowDiagram-I6XJVG4X-B6AwQZ9h.js} +1 -1
  25. package/dist/public/assets/{ganttDiagram-6RSMTGT7-DySx1LhW.js → ganttDiagram-6RSMTGT7-8XevLpQ2.js} +1 -1
  26. package/dist/public/assets/{gitGraphDiagram-PVQCEYII-DEJqJScw.js → gitGraphDiagram-PVQCEYII-CjKzjGW2.js} +1 -1
  27. package/dist/public/assets/index-DjHKj0dH.js +739 -0
  28. package/dist/public/assets/{infoDiagram-5YYISTIA-BHZsuat4.js → infoDiagram-5YYISTIA-D1EY6tMP.js} +1 -1
  29. package/dist/public/assets/{ishikawaDiagram-YF4QCWOH-CwyCO4fo.js → ishikawaDiagram-YF4QCWOH-BkPZRRgM.js} +1 -1
  30. package/dist/public/assets/{journeyDiagram-JHISSGLW-ChohV-KT.js → journeyDiagram-JHISSGLW-zRbo7xgy.js} +1 -1
  31. package/dist/public/assets/{kanban-definition-UN3LZRKU-CLuwth_y.js → kanban-definition-UN3LZRKU-De6vLQmM.js} +1 -1
  32. package/dist/public/assets/{linear-CvtM6yGJ.js → linear-DnWUzIqR.js} +1 -1
  33. package/dist/public/assets/{mermaid.core-CEyyJRA8.js → mermaid.core-BfXQ4mav.js} +40 -40
  34. package/dist/public/assets/{mindmap-definition-RKZ34NQL-BptECfHD.js → mindmap-definition-RKZ34NQL-D4IUASx-.js} +1 -1
  35. package/dist/public/assets/{pieDiagram-4H26LBE5-DMPmMTH1.js → pieDiagram-4H26LBE5-Ceq-60P6.js} +1 -1
  36. package/dist/public/assets/{quadrantDiagram-W4KKPZXB-11C8I9VP.js → quadrantDiagram-W4KKPZXB-CjJi7S36.js} +1 -1
  37. package/dist/public/assets/{requirementDiagram-4Y6WPE33-jSHqXpl9.js → requirementDiagram-4Y6WPE33-C9pzk5Si.js} +1 -1
  38. package/dist/public/assets/{sankeyDiagram-5OEKKPKP-b7ZKi5nP.js → sankeyDiagram-5OEKKPKP-D5uJ3lHO.js} +1 -1
  39. package/dist/public/assets/{sequenceDiagram-3UESZ5HK-BgXo_1c4.js → sequenceDiagram-3UESZ5HK-BsYzexS5.js} +1 -1
  40. package/dist/public/assets/{stateDiagram-AJRCARHV-BuhqVVAi.js → stateDiagram-AJRCARHV-BS0VgbxN.js} +1 -1
  41. package/dist/public/assets/stateDiagram-v2-BHNVJYJU-DOBMdgZp.js +1 -0
  42. package/dist/public/assets/{timeline-definition-PNZ67QCA-DhUWow5s.js → timeline-definition-PNZ67QCA-Bmq52fq4.js} +1 -1
  43. package/dist/public/assets/{vennDiagram-CIIHVFJN-CaTBu0Ox.js → vennDiagram-CIIHVFJN-aOBxQyZi.js} +1 -1
  44. package/dist/public/assets/{wardley-L42UT6IY-oD_ZkL5Z.js → wardley-L42UT6IY-BUtbdzPE.js} +1 -1
  45. package/dist/public/assets/{wardleyDiagram-YWT4CUSO-1wNaGTE5.js → wardleyDiagram-YWT4CUSO-BCit449v.js} +1 -1
  46. package/dist/public/assets/{xychartDiagram-2RQKCTM6-6y29SLTt.js → xychartDiagram-2RQKCTM6-By6pgy4_.js} +1 -1
  47. package/dist/public/index.html +1 -1
  48. package/package.json +7 -8
  49. package/dist/public/assets/channel-B3SLVArR.js +0 -1
  50. package/dist/public/assets/classDiagram-4FO5ZUOK-C3-eaR-O.js +0 -1
  51. package/dist/public/assets/classDiagram-v2-Q7XG4LA2-C3-eaR-O.js +0 -1
  52. package/dist/public/assets/index-Crmem08A.js +0 -674
  53. package/dist/public/assets/stateDiagram-v2-BHNVJYJU-73kXjnOg.js +0 -1
@@ -1,9 +1,9 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Crmem08A.js","assets/index-BYZTj3zW.css","assets/dagre-BM42HDAG-CDHZECic.js","assets/graph-CAnANduQ.js","assets/layout-DGIYPm2g.js","assets/cose-bilkent-S5V4N54A-Cs6fpB7P.js","assets/cytoscape.esm-DTSO7Bv0.js","assets/c4Diagram-AAUBKEIU-7Na3P-kZ.js","assets/chunk-ND2GUHAM-BwTWhr0t.js","assets/flowDiagram-I6XJVG4X-XXjCvVe9.js","assets/chunk-FMBD7UC4-CePgPEQZ.js","assets/chunk-55IACEB6-DK_xnW4L.js","assets/chunk-2J33WTMH-CjAgXvcb.js","assets/channel-B3SLVArR.js","assets/erDiagram-TEJ5UH35-CCFnLCuI.js","assets/gitGraphDiagram-PVQCEYII-DEJqJScw.js","assets/chunk-4BX2VUAB-CxRvQfP4.js","assets/chunk-QZHKN3VN-6tkVhtei.js","assets/wardley-L42UT6IY-oD_ZkL5Z.js","assets/ganttDiagram-6RSMTGT7-DySx1LhW.js","assets/linear-CvtM6yGJ.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-5YYISTIA-BHZsuat4.js","assets/pieDiagram-4H26LBE5-DMPmMTH1.js","assets/arc-CsRGgy7J.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-W4KKPZXB-11C8I9VP.js","assets/xychartDiagram-2RQKCTM6-6y29SLTt.js","assets/requirementDiagram-4Y6WPE33-jSHqXpl9.js","assets/sequenceDiagram-3UESZ5HK-BgXo_1c4.js","assets/classDiagram-4FO5ZUOK-C3-eaR-O.js","assets/chunk-727SXJPM-D0DxTmIY.js","assets/classDiagram-v2-Q7XG4LA2-C3-eaR-O.js","assets/stateDiagram-AJRCARHV-BuhqVVAi.js","assets/chunk-AQP2D5EJ-ww794e93.js","assets/stateDiagram-v2-BHNVJYJU-73kXjnOg.js","assets/journeyDiagram-JHISSGLW-ChohV-KT.js","assets/timeline-definition-PNZ67QCA-DhUWow5s.js","assets/mindmap-definition-RKZ34NQL-BptECfHD.js","assets/kanban-definition-UN3LZRKU-CLuwth_y.js","assets/sankeyDiagram-5OEKKPKP-b7ZKi5nP.js","assets/diagram-LMA3HP47-BHMX7mDD.js","assets/diagram-2AECGRRQ-CkuG87Ds.js","assets/blockDiagram-GPEHLZMM-Iy_GtHFo.js","assets/diagram-5GNKFQAL-DL_heS1V.js","assets/architectureDiagram-3BPJPVTR-CzWB7fgP.js","assets/diagram-KO2AKTUF-C7DTFOLq.js","assets/ishikawaDiagram-YF4QCWOH-CwyCO4fo.js","assets/vennDiagram-CIIHVFJN-CaTBu0Ox.js","assets/diagram-OG6HWLK6-Bw6DhtUH.js","assets/wardleyDiagram-YWT4CUSO-1wNaGTE5.js"])))=>i.map(i=>d[i]);
2
- var Lm=Object.defineProperty;var Fm=(e,t,r)=>t in e?Lm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var St=(e,t,r)=>Fm(e,typeof t!="symbol"?t+"":t,r);import{s as Am,g as Em,_ as gt,a as Mm,c as $m,b as Om,K as _l,M as Im,S as Dm,L as Rm,d as Pm,C as Nm}from"./index-Crmem08A.js";function qm(e){var t=Am(e);return function(r,i,s,a){for(var o="",n=0;n<t;n++)o+=e[n](r,i,s,a)||"";return o}}var Bs={exports:{}},Wm=Bs.exports,Bl;function zm(){return Bl||(Bl=1,(function(e,t){(function(r,i){e.exports=i()})(Wm,(function(){var r=1e3,i=6e4,s=36e5,a="millisecond",o="second",n="minute",l="hour",h="day",c="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+)?$/,C=/\[([^\]]+)]|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 A=["th","st","nd","rd"],B=I%100;return"["+I+(A[(B-20)%10]||A[B]||A[0])+"]"}},k=function(I,A,B){var M=String(I);return!M||M.length>=A?I:""+Array(A+1-M.length).join(B)+I},_={s:k,z:function(I){var A=-I.utcOffset(),B=Math.abs(A),M=Math.floor(B/60),F=B%60;return(A<=0?"+":"-")+k(M,2,"0")+":"+k(F,2,"0")},m:function I(A,B){if(A.date()<B.date())return-I(B,A);var M=12*(B.year()-A.year())+(B.month()-A.month()),F=A.clone().add(M,u),S=B-F<0,q=A.clone().add(M+(S?-1:1),u);return+(-(M+(B-F)/(S?F-q:q-F))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:u,y:d,w:c,d:h,D:g,h:l,m:n,s:o,ms:a,Q:p}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},w="en",v={};v[w]=b;var $="$isDayjsObject",E=function(I){return I instanceof Y||!(!I||!I[$])},W=function I(A,B,M){var F;if(!A)return w;if(typeof A=="string"){var S=A.toLowerCase();v[S]&&(F=S),B&&(v[S]=B,F=S);var q=A.split("-");if(!F&&q.length>1)return I(q[0])}else{var ot=A.name;v[ot]=A,F=ot}return!M&&F&&(w=F),F||!M&&w},P=function(I,A){if(E(I))return I.clone();var B=typeof A=="object"?A:{};return B.date=I,B.args=arguments,new Y(B)},O=_;O.l=W,O.i=E,O.w=function(I,A){return P(I,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var Y=(function(){function I(B){this.$L=W(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[$]=!0}var A=I.prototype;return A.parse=function(B){this.$d=(function(M){var F=M.date,S=M.utc;if(F===null)return new Date(NaN);if(O.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var q=F.match(y);if(q){var ot=q[2]-1||0,ut=(q[7]||"0").substring(0,3);return S?new Date(Date.UTC(q[1],ot,q[3]||1,q[4]||0,q[5]||0,q[6]||0,ut)):new Date(q[1],ot,q[3]||1,q[4]||0,q[5]||0,q[6]||0,ut)}}return new Date(F)})(B),this.init()},A.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},A.$utils=function(){return O},A.isValid=function(){return this.$d.toString()!==m},A.isSame=function(B,M){var F=P(B);return this.startOf(M)<=F&&F<=this.endOf(M)},A.isAfter=function(B,M){return P(B)<this.startOf(M)},A.isBefore=function(B,M){return this.endOf(M)<P(B)},A.$g=function(B,M,F){return O.u(B)?this[M]:this.set(F,B)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(B,M){var F=this,S=!!O.u(M)||M,q=O.p(B),ot=function(te,U){var st=O.w(F.$u?Date.UTC(F.$y,U,te):new Date(F.$y,U,te),F);return S?st:st.endOf(h)},ut=function(te,U){return O.w(F.toDate()[te].apply(F.toDate("s"),(S?[0,0,0,0]:[23,59,59,999]).slice(U)),F)},dt=this.$W,pt=this.$M,mt=this.$D,nt="set"+(this.$u?"UTC":"");switch(q){case d:return S?ot(1,0):ot(31,11);case u:return S?ot(1,pt):ot(0,pt+1);case c:var $t=this.$locale().weekStart||0,xt=(dt<$t?dt+7:dt)-$t;return ot(S?mt-xt:mt+(6-xt),pt);case h:case g:return ut(nt+"Hours",0);case l:return ut(nt+"Minutes",1);case n:return ut(nt+"Seconds",2);case o:return ut(nt+"Milliseconds",3);default:return this.clone()}},A.endOf=function(B){return this.startOf(B,!1)},A.$set=function(B,M){var F,S=O.p(B),q="set"+(this.$u?"UTC":""),ot=(F={},F[h]=q+"Date",F[g]=q+"Date",F[u]=q+"Month",F[d]=q+"FullYear",F[l]=q+"Hours",F[n]=q+"Minutes",F[o]=q+"Seconds",F[a]=q+"Milliseconds",F)[S],ut=S===h?this.$D+(M-this.$W):M;if(S===u||S===d){var dt=this.clone().set(g,1);dt.$d[ot](ut),dt.init(),this.$d=dt.set(g,Math.min(this.$D,dt.daysInMonth())).$d}else ot&&this.$d[ot](ut);return this.init(),this},A.set=function(B,M){return this.clone().$set(B,M)},A.get=function(B){return this[O.p(B)]()},A.add=function(B,M){var F,S=this;B=Number(B);var q=O.p(M),ot=function(pt){var mt=P(S);return O.w(mt.date(mt.date()+Math.round(pt*B)),S)};if(q===u)return this.set(u,this.$M+B);if(q===d)return this.set(d,this.$y+B);if(q===h)return ot(1);if(q===c)return ot(7);var ut=(F={},F[n]=i,F[l]=s,F[o]=r,F)[q]||1,dt=this.$d.getTime()+B*ut;return O.w(dt,this)},A.subtract=function(B,M){return this.add(-1*B,M)},A.format=function(B){var M=this,F=this.$locale();if(!this.isValid())return F.invalidDate||m;var S=B||"YYYY-MM-DDTHH:mm:ssZ",q=O.z(this),ot=this.$H,ut=this.$m,dt=this.$M,pt=F.weekdays,mt=F.months,nt=F.meridiem,$t=function(U,st,kt,wt){return U&&(U[st]||U(M,S))||kt[st].slice(0,wt)},xt=function(U){return O.s(ot%12||12,U,"0")},te=nt||function(U,st,kt){var wt=U<12?"AM":"PM";return kt?wt.toLowerCase():wt};return S.replace(C,(function(U,st){return st||(function(kt){switch(kt){case"YY":return String(M.$y).slice(-2);case"YYYY":return O.s(M.$y,4,"0");case"M":return dt+1;case"MM":return O.s(dt+1,2,"0");case"MMM":return $t(F.monthsShort,dt,mt,3);case"MMMM":return $t(mt,dt);case"D":return M.$D;case"DD":return O.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return $t(F.weekdaysMin,M.$W,pt,2);case"ddd":return $t(F.weekdaysShort,M.$W,pt,3);case"dddd":return pt[M.$W];case"H":return String(ot);case"HH":return O.s(ot,2,"0");case"h":return xt(1);case"hh":return xt(2);case"a":return te(ot,ut,!0);case"A":return te(ot,ut,!1);case"m":return String(ut);case"mm":return O.s(ut,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 q}return null})(U)||q.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(B,M,F){var S,q=this,ot=O.p(M),ut=P(B),dt=(ut.utcOffset()-this.utcOffset())*i,pt=this-ut,mt=function(){return O.m(q,ut)};switch(ot){case d:S=mt()/12;break;case u:S=mt();break;case p:S=mt()/3;break;case c:S=(pt-dt)/6048e5;break;case h:S=(pt-dt)/864e5;break;case l:S=pt/s;break;case n:S=pt/i;break;case o:S=pt/r;break;default:S=pt}return F?S:O.a(S)},A.daysInMonth=function(){return this.endOf(u).$D},A.$locale=function(){return v[this.$L]},A.locale=function(B,M){if(!B)return this.$L;var F=this.clone(),S=W(B,M,!0);return S&&(F.$L=S),F},A.clone=function(){return O.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},I})(),H=Y.prototype;return P.prototype=H,[["$ms",a],["$s",o],["$m",n],["$H",l],["$W",h],["$M",u],["$y",d],["$D",g]].forEach((function(I){H[I[1]]=function(A){return this.$g(A,I[0],I[1])}})),P.extend=function(I,A){return I.$i||(I(A,Y,P),I.$i=!0),P},P.locale=W,P.isDayjs=E,P.unix=function(I){return P(1e3*I)},P.en=v[w],P.Ls=v,P.p={},P}))})(Bs)),Bs.exports}var Hm=zm();const Ym=Em(Hm);var oc=Object.defineProperty,f=(e,t)=>oc(e,"name",{value:t,configurable:!0}),Um=(e,t)=>{for(var r in t)oc(e,r,{get:t[r],enumerable:!0})},Pe={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},z={trace:f((...e)=>{},"trace"),debug:f((...e)=>{},"debug"),info:f((...e)=>{},"info"),warn:f((...e)=>{},"warn"),error:f((...e)=>{},"error"),fatal:f((...e)=>{},"fatal")},ln=f(function(e="fatal"){let t=Pe.fatal;typeof e=="string"?e.toLowerCase()in Pe&&(t=Pe[e]):typeof e=="number"&&(t=e),z.trace=()=>{},z.debug=()=>{},z.info=()=>{},z.warn=()=>{},z.error=()=>{},z.fatal=()=>{},t<=Pe.fatal&&(z.fatal=console.error?console.error.bind(console,ue("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ue("FATAL"))),t<=Pe.error&&(z.error=console.error?console.error.bind(console,ue("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ue("ERROR"))),t<=Pe.warn&&(z.warn=console.warn?console.warn.bind(console,ue("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ue("WARN"))),t<=Pe.info&&(z.info=console.info?console.info.bind(console,ue("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ue("INFO"))),t<=Pe.debug&&(z.debug=console.debug?console.debug.bind(console,ue("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ue("DEBUG"))),t<=Pe.trace&&(z.trace=console.debug?console.debug.bind(console,ue("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ue("TRACE")))},"setLogLevel"),ue=f(e=>`%c${Ym().format("ss.SSS")} : ${e} : `,"format");const vs={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 s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return vs.hue2rgb(a,s,e+1/3)*255;case"g":return vs.hue2rgb(a,s,e)*255;case"b":return vs.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),o=(s+a)/2;if(i==="l")return o*100;if(s===a)return 0;const n=s-a,l=o>.5?n/(2-s-a):n/(s+a);if(i==="s")return l*100;switch(s){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}}},Gm={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},jm={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},at={channel:vs,lang:Gm,unit:jm},Ve={};for(let e=0;e<=255;e++)Ve[e]=at.unit.dec2hex(e);const Yt={ALL:0,RGB:1,HSL:2};class Xm{constructor(){this.type=Yt.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=Yt.ALL}is(t){return this.type===t}}class Vm{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Xm}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Yt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=at.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=at.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=at.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=at.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=at.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=at.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Yt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Yt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Yt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Yt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Yt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Yt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Yt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Yt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Yt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Yt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Yt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Yt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const ga=new Vm({r:0,g:0,b:0,a:0},"transparent"),Yr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Yr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,o=s>4,n=o?1:17,l=o?8:4,h=a?0:-1,c=o?255:15;return ga.set({r:(i>>l*(h+3)&c)*n,g:(i>>l*(h+2)&c)*n,b:(i>>l*(h+1)&c)*n,a:a?(i&c)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Ve[Math.round(t)]}${Ve[Math.round(r)]}${Ve[Math.round(i)]}${Ve[Math.round(s*255)]}`:`#${Ve[Math.round(t)]}${Ve[Math.round(r)]}${Ve[Math.round(i)]}`}},dr={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(dr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return at.channel.clamp.h(parseFloat(r)*.9);case"rad":return at.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return at.channel.clamp.h(parseFloat(r)*360)}}return at.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(dr.re);if(!r)return;const[,i,s,a,o,n]=r;return ga.set({h:dr._hue2deg(i),s:at.channel.clamp.s(parseFloat(s)),l:at.channel.clamp.l(parseFloat(a)),a:o?at.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%, ${s})`:`hsl(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%)`}},Di={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=Di.colors[e];if(t)return Yr.parse(t)},stringify:e=>{const t=Yr.stringify(e);for(const r in Di.colors)if(Di.colors[r]===t)return r}},vi={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(vi.re);if(!r)return;const[,i,s,a,o,n,l,h,c]=r;return ga.set({r:at.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:at.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:at.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:h?at.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)}, ${at.lang.round(s)})`:`rgb(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)})`}},Me={format:{keyword:Di,hex:Yr,rgb:vi,rgba:vi,hsl:dr,hsla:dr},parse:e=>{if(typeof e!="string")return e;const t=Yr.parse(e)||vi.parse(e)||dr.parse(e)||Di.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Yt.HSL)||e.data.r===void 0?dr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?vi.stringify(e):Yr.stringify(e)},nc=(e,t)=>{const r=Me.parse(e);for(const i in t)r[i]=at.channel.clamp[i](t[i]);return Me.stringify(r)},Qe=(e,t,r=0,i=1)=>{if(typeof e!="number")return nc(e,{a:t});const s=ga.set({r:at.channel.clamp.r(e),g:at.channel.clamp.g(t),b:at.channel.clamp.b(r),a:at.channel.clamp.a(i)});return Me.stringify(s)},Zm=e=>{const{r:t,g:r,b:i}=Me.parse(e),s=.2126*at.channel.toLinear(t)+.7152*at.channel.toLinear(r)+.0722*at.channel.toLinear(i);return at.lang.round(s)},Km=e=>Zm(e)>=.5,Te=e=>!Km(e),lc=(e,t,r)=>{const i=Me.parse(e),s=i[t],a=at.channel.clamp[t](s+r);return s!==a&&(i[t]=a),Me.stringify(i)},D=(e,t)=>lc(e,"l",t),R=(e,t)=>lc(e,"l",-t),x=(e,t)=>{const r=Me.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return nc(e,i)},Qm=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=Me.parse(e),{r:n,g:l,b:h,a:c}=Me.parse(t),u=r/100,p=u*2-1,d=o-c,m=((p*d===-1?p:(p+d)/(1+p*d))+1)/2,y=1-m,C=i*m+n*y,b=s*m+l*y,k=a*m+h*y,_=o*u+c*(1-u);return Qe(C,b,k,_)},L=(e,t=100)=>{const r=Me.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Qm(r,e,t)};/*! @license DOMPurify 3.4.8 | (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.8/LICENSE */function vl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function Jm(e){if(Array.isArray(e))return e}function ty(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,a,o,n=[],l=!0,h=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(i=a.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(c){h=!0,s=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(h)throw s}}return n}}function ey(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ry(e,t){return Jm(e)||ty(e,t)||iy(e,t)||ey()}function iy(e,t){if(e){if(typeof e=="string")return vl(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vl(e,t):void 0}}const hc=Object.entries,Ll=Object.setPrototypeOf,sy=Object.isFrozen,ay=Object.getPrototypeOf,oy=Object.getOwnPropertyDescriptor;let Qt=Object.freeze,de=Object.seal,Pr=Object.create,cc=typeof Reflect<"u"&&Reflect,co=cc.apply,uo=cc.construct;Qt||(Qt=function(t){return t});de||(de=function(t){return t});co||(co=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),a=2;a<i;a++)s[a-2]=arguments[a];return t.apply(r,s)});uo||(uo=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return new t(...i)});const nr=Mt(Array.prototype.forEach),ny=Mt(Array.prototype.lastIndexOf),Fl=Mt(Array.prototype.pop),Mr=Mt(Array.prototype.push),ly=Mt(Array.prototype.splice),Vt=Array.isArray,Li=Mt(String.prototype.toLowerCase),Ua=Mt(String.prototype.toString),Al=Mt(String.prototype.match),$r=Mt(String.prototype.replace),El=Mt(String.prototype.indexOf),hy=Mt(String.prototype.trim),cy=Mt(Number.prototype.toString),uy=Mt(Boolean.prototype.toString),Ml=typeof BigInt>"u"?null:Mt(BigInt.prototype.toString),$l=typeof Symbol>"u"?null:Mt(Symbol.prototype.toString),Ft=Mt(Object.prototype.hasOwnProperty),xi=Mt(Object.prototype.toString),qt=Mt(RegExp.prototype.test),Or=dy(TypeError);function Mt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return co(e,t,i)}}function dy(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return uo(e,r)}}function lt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Li;if(Ll&&Ll(e,null),!Vt(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const a=r(s);a!==s&&(sy(t)||(t[i]=a),s=a)}e[s]=!0}return e}function py(e){for(let t=0;t<e.length;t++)Ft(e,t)||(e[t]=null);return e}function Ht(e){const t=Pr(null);for(const i of hc(e)){var r=ry(i,2);const s=r[0],a=r[1];Ft(e,s)&&(Vt(a)?t[s]=py(a):a&&typeof a=="object"&&a.constructor===Object?t[s]=Ht(a):t[s]=a)}return t}function fy(e){switch(typeof e){case"string":return e;case"number":return cy(e);case"boolean":return uy(e);case"bigint":return Ml?Ml(e):"0";case"symbol":return $l?$l(e):"Symbol()";case"undefined":return xi(e);case"function":case"object":{if(e===null)return xi(e);const t=e,r=Le(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:xi(i)}return xi(e)}default:return xi(e)}}function Le(e,t){for(;e!==null;){const i=oy(e,t);if(i){if(i.get)return Mt(i.get);if(typeof i.value=="function")return Mt(i.value)}e=ay(e)}function r(){return null}return r}function gy(e){try{return qt(e,""),!0}catch{return!1}}const Ol=Qt(["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"]),Ga=Qt(["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"]),ja=Qt(["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"]),my=Qt(["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"]),Xa=Qt(["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"]),yy=Qt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Il=Qt(["#text"]),Dl=Qt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),Va=Qt(["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"]),Rl=Qt(["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"]),fs=Qt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Cy=de(/{{[\w\W]*|^[\w\W]*}}/g),xy=de(/<%[\w\W]*|^[\w\W]*%>/g),by=de(/\${[\w\W]*/g),ky=de(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ty=de(/^aria-[\-\w]+$/),Pl=de(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Sy=de(/^(?:\w+script|data):/i),wy=de(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_y=de(/^html$/i),By=de(/^[a-z][.\w]*(-[.\w]+)+$/i),ve={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},vy=function(){return typeof window>"u"?null:window},Ly=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Nl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function uc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:vy();const t=Q=>uc(Q);if(t.version="3.4.8",t.removed=[],!e||!e.document||e.document.nodeType!==ve.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,o=e.Node,n=e.Element,l=e.NodeFilter,h=e.NamedNodeMap;h===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,u=e.trustedTypes,p=n.prototype,d=Le(p,"cloneNode"),g=Le(p,"remove"),m=Le(p,"nextSibling"),y=Le(p,"childNodes"),C=Le(p,"parentNode"),b=Le(p,"shadowRoot"),k=Le(p,"attributes"),_=o&&o.prototype?Le(o.prototype,"nodeType"):null,w=o&&o.prototype?Le(o.prototype,"nodeName"):null;if(typeof a=="function"){const Q=r.createElement("template");Q.content&&Q.content.ownerDocument&&(r=Q.content.ownerDocument)}let v,$="",E=0;const W=function(T){if(E>0)throw Or('The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');E++;try{return v.createHTML(T)}finally{E--}},P=r,O=P.implementation,Y=P.createNodeIterator,H=P.createDocumentFragment,I=P.getElementsByTagName,A=i.importNode;let B=Nl();t.isSupported=typeof hc=="function"&&typeof C=="function"&&O&&O.createHTMLDocument!==void 0;const M=Cy,F=xy,S=by,q=ky,ot=Ty,ut=Sy,dt=wy,pt=By;let mt=Pl,nt=null;const $t=lt({},[...Ol,...Ga,...ja,...Xa,...Il]);let xt=null;const te=lt({},[...Dl,...Va,...Rl,...fs]);let U=Object.seal(Pr(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}})),st=null,kt=null;const wt=Object.seal(Pr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let we=!0,le=!0,gi=!1,Ma=!0,he=!1,mi=!0,ar=!1,$a=!1,Oa=!1,Br=!1,ns=!1,ls=!1,ll=!0,hl=!1;const cl="user-content-";let Ia=!0,yi=!1,vr={},_e=null;const Da=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 dl=lt({},["audio","video","img","source","image","track"]);let Ra=null;const pl=lt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),hs="http://www.w3.org/1998/Math/MathML",cs="http://www.w3.org/2000/svg",Be="http://www.w3.org/1999/xhtml";let Lr=Be,Pa=!1,Na=null;const km=lt({},[hs,cs,Be],Ua);let qa=lt({},["mi","mo","mn","ms","mtext"]),Wa=lt({},["annotation-xml"]);const Tm=lt({},["title","style","font","a","script"]);let Ci=null;const Sm=["application/xhtml+xml","text/html"],wm="text/html";let At=null,Fr=null;const _m=r.createElement("form"),fl=function(T){return T instanceof RegExp||T instanceof Function},za=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Fr&&Fr===T)return;(!T||typeof T!="object")&&(T={}),T=Ht(T),Ci=Sm.indexOf(T.PARSER_MEDIA_TYPE)===-1?wm:T.PARSER_MEDIA_TYPE,At=Ci==="application/xhtml+xml"?Ua:Li,nt=Ft(T,"ALLOWED_TAGS")&&Vt(T.ALLOWED_TAGS)?lt({},T.ALLOWED_TAGS,At):$t,xt=Ft(T,"ALLOWED_ATTR")&&Vt(T.ALLOWED_ATTR)?lt({},T.ALLOWED_ATTR,At):te,Na=Ft(T,"ALLOWED_NAMESPACES")&&Vt(T.ALLOWED_NAMESPACES)?lt({},T.ALLOWED_NAMESPACES,Ua):km,Ra=Ft(T,"ADD_URI_SAFE_ATTR")&&Vt(T.ADD_URI_SAFE_ATTR)?lt(Ht(pl),T.ADD_URI_SAFE_ATTR,At):pl,ul=Ft(T,"ADD_DATA_URI_TAGS")&&Vt(T.ADD_DATA_URI_TAGS)?lt(Ht(dl),T.ADD_DATA_URI_TAGS,At):dl,_e=Ft(T,"FORBID_CONTENTS")&&Vt(T.FORBID_CONTENTS)?lt({},T.FORBID_CONTENTS,At):Da,st=Ft(T,"FORBID_TAGS")&&Vt(T.FORBID_TAGS)?lt({},T.FORBID_TAGS,At):Ht({}),kt=Ft(T,"FORBID_ATTR")&&Vt(T.FORBID_ATTR)?lt({},T.FORBID_ATTR,At):Ht({}),vr=Ft(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?Ht(T.USE_PROFILES):T.USE_PROFILES:!1,we=T.ALLOW_ARIA_ATTR!==!1,le=T.ALLOW_DATA_ATTR!==!1,gi=T.ALLOW_UNKNOWN_PROTOCOLS||!1,Ma=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,he=T.SAFE_FOR_TEMPLATES||!1,mi=T.SAFE_FOR_XML!==!1,ar=T.WHOLE_DOCUMENT||!1,Br=T.RETURN_DOM||!1,ns=T.RETURN_DOM_FRAGMENT||!1,ls=T.RETURN_TRUSTED_TYPE||!1,Oa=T.FORCE_BODY||!1,ll=T.SANITIZE_DOM!==!1,hl=T.SANITIZE_NAMED_PROPS||!1,Ia=T.KEEP_CONTENT!==!1,yi=T.IN_PLACE||!1,mt=gy(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:Pl,Lr=typeof T.NAMESPACE=="string"?T.NAMESPACE:Be,qa=Ft(T,"MATHML_TEXT_INTEGRATION_POINTS")&&T.MATHML_TEXT_INTEGRATION_POINTS&&typeof T.MATHML_TEXT_INTEGRATION_POINTS=="object"?Ht(T.MATHML_TEXT_INTEGRATION_POINTS):lt({},["mi","mo","mn","ms","mtext"]),Wa=Ft(T,"HTML_INTEGRATION_POINTS")&&T.HTML_INTEGRATION_POINTS&&typeof T.HTML_INTEGRATION_POINTS=="object"?Ht(T.HTML_INTEGRATION_POINTS):lt({},["annotation-xml"]);const N=Ft(T,"CUSTOM_ELEMENT_HANDLING")&&T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING=="object"?Ht(T.CUSTOM_ELEMENT_HANDLING):Pr(null);if(U=Pr(null),Ft(N,"tagNameCheck")&&fl(N.tagNameCheck)&&(U.tagNameCheck=N.tagNameCheck),Ft(N,"attributeNameCheck")&&fl(N.attributeNameCheck)&&(U.attributeNameCheck=N.attributeNameCheck),Ft(N,"allowCustomizedBuiltInElements")&&typeof N.allowCustomizedBuiltInElements=="boolean"&&(U.allowCustomizedBuiltInElements=N.allowCustomizedBuiltInElements),he&&(le=!1),ns&&(Br=!0),vr&&(nt=lt({},Il),xt=Pr(null),vr.html===!0&&(lt(nt,Ol),lt(xt,Dl)),vr.svg===!0&&(lt(nt,Ga),lt(xt,Va),lt(xt,fs)),vr.svgFilters===!0&&(lt(nt,ja),lt(xt,Va),lt(xt,fs)),vr.mathMl===!0&&(lt(nt,Xa),lt(xt,Rl),lt(xt,fs))),wt.tagCheck=null,wt.attributeCheck=null,Ft(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?wt.tagCheck=T.ADD_TAGS:Vt(T.ADD_TAGS)&&(nt===$t&&(nt=Ht(nt)),lt(nt,T.ADD_TAGS,At))),Ft(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?wt.attributeCheck=T.ADD_ATTR:Vt(T.ADD_ATTR)&&(xt===te&&(xt=Ht(xt)),lt(xt,T.ADD_ATTR,At))),Ft(T,"ADD_URI_SAFE_ATTR")&&Vt(T.ADD_URI_SAFE_ATTR)&&lt(Ra,T.ADD_URI_SAFE_ATTR,At),Ft(T,"FORBID_CONTENTS")&&Vt(T.FORBID_CONTENTS)&&(_e===Da&&(_e=Ht(_e)),lt(_e,T.FORBID_CONTENTS,At)),Ft(T,"ADD_FORBID_CONTENTS")&&Vt(T.ADD_FORBID_CONTENTS)&&(_e===Da&&(_e=Ht(_e)),lt(_e,T.ADD_FORBID_CONTENTS,At)),Ia&&(nt["#text"]=!0),ar&&lt(nt,["html","head","body"]),nt.table&&(lt(nt,["tbody"]),delete st.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw Or('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Or('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const G=v;v=T.TRUSTED_TYPES_POLICY;try{$=W("")}catch(bt){throw v=G,bt}}else v===void 0&&T.TRUSTED_TYPES_POLICY!==null&&(v=Ly(u,s)),v&&typeof $=="string"&&($=W(""));(B.uponSanitizeElement.length>0||B.uponSanitizeAttribute.length>0)&&nt===$t&&(nt=Ht(nt)),B.uponSanitizeAttribute.length>0&&xt===te&&(xt=Ht(xt)),Qt&&Qt(T),Fr=T},gl=lt({},[...Ga,...ja,...my]),ml=lt({},[...Xa,...yy]),Bm=function(T){let N=C(T);(!N||!N.tagName)&&(N={namespaceURI:Lr,tagName:"template"});const G=Li(T.tagName),bt=Li(N.tagName);return Na[T.namespaceURI]?T.namespaceURI===cs?N.namespaceURI===Be?G==="svg":N.namespaceURI===hs?G==="svg"&&(bt==="annotation-xml"||qa[bt]):!!gl[G]:T.namespaceURI===hs?N.namespaceURI===Be?G==="math":N.namespaceURI===cs?G==="math"&&Wa[bt]:!!ml[G]:T.namespaceURI===Be?N.namespaceURI===cs&&!Wa[bt]||N.namespaceURI===hs&&!qa[bt]?!1:!ml[G]&&(Tm[G]||!gl[G]):!!(Ci==="application/xhtml+xml"&&Na[T.namespaceURI]):!1},pe=function(T){Mr(t.removed,{element:T});try{C(T).removeChild(T)}catch{g(T)}},or=function(T,N){try{Mr(t.removed,{attribute:N.getAttributeNode(T),from:N})}catch{Mr(t.removed,{attribute:null,from:N})}if(N.removeAttribute(T),T==="is")if(Br||ns)try{pe(N)}catch{}else try{N.setAttribute(T,"")}catch{}},yl=function(T){let N=null,G=null;if(Oa)T="<remove></remove>"+T;else{const _t=Al(T,/^[\r\n\t ]+/);G=_t&&_t[0]}Ci==="application/xhtml+xml"&&Lr===Be&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const bt=v?W(T):T;if(Lr===Be)try{N=new c().parseFromString(bt,Ci)}catch{}if(!N||!N.documentElement){N=O.createDocument(Lr,"template",null);try{N.documentElement.innerHTML=Pa?$:bt}catch{}}const ct=N.body||N.documentElement;return T&&G&&ct.insertBefore(r.createTextNode(G),ct.childNodes[0]||null),Lr===Be?I.call(N,ar?"html":"body")[0]:ar?N.documentElement:ct},Cl=function(T){return Y.call(T.ownerDocument||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Ha=function(T){var N,G;T.normalize();const bt=Y.call(T.ownerDocument||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let ct=bt.nextNode();for(;ct;){let Ot=ct.data;nr([M,F,S],ce=>{Ot=$r(Ot,ce," ")}),ct.data=Ot,ct=bt.nextNode()}const _t=(N=(G=T.querySelectorAll)===null||G===void 0?void 0:G.call(T,"template"))!==null&&N!==void 0?N:[];nr(Array.from(_t),Ot=>{Ar(Ot.content)&&Ha(Ot.content)})},us=function(T){const N=w?w(T):null;return typeof N!="string"||At(N)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==k(T)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==_(T)||T.childNodes!==y(T)},Ar=function(T){if(!_||typeof T!="object"||T===null)return!1;try{return _(T)===ve.documentFragment}catch{return!1}},ds=function(T){if(!_||typeof T!="object"||T===null)return!1;try{return typeof _(T)=="number"}catch{return!1}};function Re(Q,T,N){nr(Q,G=>{G.call(t,T,N,Fr)})}const xl=function(T){let N=null;if(Re(B.beforeSanitizeElements,T,null),us(T))return pe(T),!0;const G=At(w?w(T):T.nodeName);if(Re(B.uponSanitizeElement,T,{tagName:G,allowedTags:nt}),mi&&T.hasChildNodes()&&!ds(T.firstElementChild)&&qt(/<[/\w!]/g,T.innerHTML)&&qt(/<[/\w!]/g,T.textContent)||mi&&T.namespaceURI===Be&&G==="style"&&ds(T.firstElementChild)||T.nodeType===ve.progressingInstruction||mi&&T.nodeType===ve.comment&&qt(/<[/\w]/g,T.data))return pe(T),!0;if(st[G]||!(wt.tagCheck instanceof Function&&wt.tagCheck(G))&&!nt[G]){if(!st[G]&&kl(G)&&(U.tagNameCheck instanceof RegExp&&qt(U.tagNameCheck,G)||U.tagNameCheck instanceof Function&&U.tagNameCheck(G)))return!1;if(Ia&&!_e[G]){const ct=C(T),_t=y(T);if(_t&&ct){const Ot=_t.length;for(let ce=Ot-1;ce>=0;--ce){const fe=d(_t[ce],!0);ct.insertBefore(fe,m(T))}}}return pe(T),!0}return(_?_(T):T.nodeType)===ve.element&&!Bm(T)||(G==="noscript"||G==="noembed"||G==="noframes")&&qt(/<\/no(script|embed|frames)/i,T.innerHTML)?(pe(T),!0):(he&&T.nodeType===ve.text&&(N=T.textContent,nr([M,F,S],ct=>{N=$r(N,ct," ")}),T.textContent!==N&&(Mr(t.removed,{element:T.cloneNode()}),T.textContent=N)),Re(B.afterSanitizeElements,T,null),!1)},bl=function(T,N,G){if(kt[N]||ll&&(N==="id"||N==="name")&&(G in r||G in _m))return!1;const bt=xt[N]||wt.attributeCheck instanceof Function&&wt.attributeCheck(N,T);if(!(le&&!kt[N]&&qt(q,N))){if(!(we&&qt(ot,N))){if(!bt||kt[N]){if(!(kl(T)&&(U.tagNameCheck instanceof RegExp&&qt(U.tagNameCheck,T)||U.tagNameCheck instanceof Function&&U.tagNameCheck(T))&&(U.attributeNameCheck instanceof RegExp&&qt(U.attributeNameCheck,N)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(N,T))||N==="is"&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&qt(U.tagNameCheck,G)||U.tagNameCheck instanceof Function&&U.tagNameCheck(G))))return!1}else if(!Ra[N]){if(!qt(mt,$r(G,dt,""))){if(!((N==="src"||N==="xlink:href"||N==="href")&&T!=="script"&&El(G,"data:")===0&&ul[T])){if(!(gi&&!qt(ut,$r(G,dt,"")))){if(G)return!1}}}}}}return!0},vm=lt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),kl=function(T){return!vm[Li(T)]&&qt(pt,T)},Tl=function(T){Re(B.beforeSanitizeAttributes,T,null);const N=T.attributes;if(!N||us(T))return;const G={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xt,forceKeepAttr:void 0};let bt=N.length;for(;bt--;){const ct=N[bt],_t=ct.name,Ot=ct.namespaceURI,ce=ct.value,fe=At(_t),Ya=ce;let Pt=_t==="value"?Ya:hy(Ya);if(G.attrName=fe,G.attrValue=Pt,G.keepAttr=!0,G.forceKeepAttr=void 0,Re(B.uponSanitizeAttribute,T,G),Pt=G.attrValue,hl&&(fe==="id"||fe==="name")&&El(Pt,cl)!==0&&(or(_t,T),Pt=cl+Pt),mi&&qt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Pt)){or(_t,T);continue}if(fe==="attributename"&&Al(Pt,"href")){or(_t,T);continue}if(G.forceKeepAttr)continue;if(!G.keepAttr){or(_t,T);continue}if(!Ma&&qt(/\/>/i,Pt)){or(_t,T);continue}he&&nr([M,F,S],wl=>{Pt=$r(Pt,wl," ")});const Sl=At(T.nodeName);if(!bl(Sl,fe,Pt)){or(_t,T);continue}if(v&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!Ot)switch(u.getAttributeType(Sl,fe)){case"TrustedHTML":{Pt=W(Pt);break}case"TrustedScriptURL":{Pt=v.createScriptURL(Pt);break}}if(Pt!==Ya)try{Ot?T.setAttributeNS(Ot,_t,Pt):T.setAttribute(_t,Pt),us(T)?pe(T):Fl(t.removed)}catch{or(_t,T)}}Re(B.afterSanitizeAttributes,T,null)},ps=function(T){let N=null;const G=Cl(T);for(Re(B.beforeSanitizeShadowDOM,T,null);N=G.nextNode();)if(Re(B.uponSanitizeShadowNode,N,null),xl(N),Tl(N),Ar(N.content)&&ps(N.content),(_?_(N):N.nodeType)===ve.element){const ct=b?b(N):N.shadowRoot;Ar(ct)&&(Er(ct),ps(ct))}Re(B.afterSanitizeShadowDOM,T,null)},Er=function(T){const N=_?_(T):T.nodeType;if(N===ve.element){const ct=b?b(T):T.shadowRoot;Ar(ct)&&(Er(ct),ps(ct))}const G=y?y(T):T.childNodes;if(!G)return;const bt=[];nr(G,ct=>{Mr(bt,ct)});for(const ct of bt)Er(ct);if(N===ve.element){const ct=w?w(T):null;if(typeof ct=="string"&&At(ct)==="template"){const _t=T.content;Ar(_t)&&Er(_t)}}};return t.sanitize=function(Q){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},N=null,G=null,bt=null,ct=null;if(Pa=!Q,Pa&&(Q="<!-->"),typeof Q!="string"&&!ds(Q)&&(Q=fy(Q),typeof Q!="string"))throw Or("dirty is not a string, aborting");if(!t.isSupported)return Q;if($a||za(T),t.removed=[],typeof Q=="string"&&(yi=!1),yi){const ce=w?w(Q):Q.nodeName;if(typeof ce=="string"){const fe=At(ce);if(!nt[fe]||st[fe])throw Or("root node is forbidden and cannot be sanitized in-place")}if(us(Q))throw Or("root node is clobbered and cannot be sanitized in-place");Er(Q)}else if(ds(Q))N=yl("<!---->"),G=N.ownerDocument.importNode(Q,!0),G.nodeType===ve.element&&G.nodeName==="BODY"||G.nodeName==="HTML"?N=G:N.appendChild(G),Er(G);else{if(!Br&&!he&&!ar&&Q.indexOf("<")===-1)return v&&ls?W(Q):Q;if(N=yl(Q),!N)return Br?null:ls?$:""}N&&Oa&&pe(N.firstChild);const _t=Cl(yi?Q:N);for(;bt=_t.nextNode();)xl(bt),Tl(bt),Ar(bt.content)&&ps(bt.content);if(yi)return he&&Ha(Q),Q;if(Br){if(he&&Ha(N),ns)for(ct=H.call(N.ownerDocument);N.firstChild;)ct.appendChild(N.firstChild);else ct=N;return(xt.shadowroot||xt.shadowrootmode)&&(ct=A.call(i,ct,!0)),ct}let Ot=ar?N.outerHTML:N.innerHTML;return ar&&nt["!doctype"]&&N.ownerDocument&&N.ownerDocument.doctype&&N.ownerDocument.doctype.name&&qt(_y,N.ownerDocument.doctype.name)&&(Ot="<!DOCTYPE "+N.ownerDocument.doctype.name+`>
4
- `+Ot),he&&nr([M,F,S],ce=>{Ot=$r(Ot,ce," ")}),v&&ls?W(Ot):Ot},t.setConfig=function(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};za(Q),$a=!0},t.clearConfig=function(){Fr=null,$a=!1},t.isValidAttribute=function(Q,T,N){Fr||za({});const G=At(Q),bt=At(T);return bl(G,bt,N)},t.addHook=function(Q,T){typeof T=="function"&&Mr(B[Q],T)},t.removeHook=function(Q,T){if(T!==void 0){const N=ny(B[Q],T);return N===-1?void 0:ly(B[Q],N,1)[0]}return Fl(B[Q])},t.removeHooks=function(Q){B[Q]=[]},t.removeAllHooks=function(){B=Nl()},t}var oi=uc(),dc=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Ri=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Fy=/\s*%%.*\n/gm,Gr,pc=(Gr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},f(Gr,"UnknownDiagramError"),Gr),Cr={},hn=f(function(e,t){e=e.replace(dc,"").replace(Ri,"").replace(Fy,`
5
- `);for(const[r,{detector:i}]of Object.entries(Cr))if(i(e,t))return r;throw new pc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),po=f((...e)=>{for(const{id:t,detector:r,loader:i}of e)fc(t,r,i)},"registerLazyLoadedDiagrams"),fc=f((e,t,r)=>{Cr[e]&&z.warn(`Detector with key ${e} already exists. Overwriting.`),Cr[e]={detector:t,loader:r},z.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Ay=f(e=>Cr[e].loader,"getDiagramLoader"),fo=f((e,t,{depth:r=2,clobber:i=!1}={})=>{const s={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>fo(e,a,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),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(a=>{typeof t[a]=="object"&&t[a]!==null&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=fo(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Dt=fo,Oe="#ffffff",Ie="#f2f2f2",it=f((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),jr,Ey=(jr=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(){var r,i,s,a,o,n,l,h,c,u,p,d,g,m,y,C,b,k,_,w,v,$,E,W,P,O,Y,H,I,A,B,M,F,S;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||it(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||it(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||it(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||D(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||R(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,10)):(this.rowOdd=this.rowOdd||D(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||D(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScale"+q]=R(this["cScale"+q],75);else for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScale"+q]=R(this["cScale"+q],25);for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScaleInv"+q]=this["cScaleInv"+q]||L(this["cScale"+q]);for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this.darkMode?this["cScalePeer"+q]=this["cScalePeer"+q]||D(this["cScale"+q],10):this["cScalePeer"+q]=this["cScalePeer"+q]||R(this["cScale"+q],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScaleLabel"+q]=this["cScaleLabel"+q]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let q=0;q<5;q++)this["surface"+q]=this["surface"+q]||x(this.mainBkg,{h:180,s:-15,l:t*(5+q*3)}),this["surfacePeer"+q]=this["surfacePeer"+q]||x(this.mainBkg,{h:180,s:-15,l:t*(8+q*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((s=this.radar)==null?void 0:s.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((h=this.radar)==null?void 0:h.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((u=this.radar)==null?void 0:u.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((p=this.wardley)==null?void 0:p.backgroundColor)||this.background,axisColor:((d=this.wardley)==null?void 0:d.axisColor)||this.lineColor,axisTextColor:((g=this.wardley)==null?void 0:g.axisTextColor)||this.primaryTextColor,gridColor:((m=this.wardley)==null?void 0:m.gridColor)||this.gridColor,componentFill:((y=this.wardley)==null?void 0:y.componentFill)||this.background,componentStroke:((C=this.wardley)==null?void 0:C.componentStroke)||this.lineColor,componentLabelColor:((b=this.wardley)==null?void 0:b.componentLabelColor)||this.primaryTextColor,linkStroke:((k=this.wardley)==null?void 0:k.linkStroke)||this.lineColor,evolutionStroke:((_=this.wardley)==null?void 0:_.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((w=this.wardley)==null?void 0:w.annotationStroke)||this.lineColor,annotationTextColor:((v=this.wardley)==null?void 0:v.annotationTextColor)||this.primaryTextColor,annotationFill:(($=this.wardley)==null?void 0:$.annotationFill)||this.background},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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((E=this.xyChart)==null?void 0:E.backgroundColor)||this.background,titleColor:((W=this.xyChart)==null?void 0:W.titleColor)||this.primaryTextColor,dataLabelColor:((P=this.xyChart)==null?void 0:P.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((O=this.xyChart)==null?void 0:O.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Y=this.xyChart)==null?void 0:Y.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((H=this.xyChart)==null?void 0:H.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((I=this.xyChart)==null?void 0:I.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((A=this.xyChart)==null?void 0:A.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((B=this.xyChart)==null?void 0:B.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((M=this.xyChart)==null?void 0:M.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((F=this.xyChart)==null?void 0:F.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((S=this.xyChart)==null?void 0:S.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?R(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie,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(jr,"Theme"),jr),My=f(e=>{const t=new Ey;return t.calculate(e),t},"getThemeVariables"),Xr,$y=(Xr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=D(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=it(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=D(L("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Qe(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=R("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=R(this.sectionBkgColor,10),this.taskBorderColor=Qe(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Qe(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||D(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(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(){var t,r,i,s,a,o,n,l,h,c,u,p,d,g,m,y,C,b,k,_,w,v,$,E,W,P,O,Y,H,I,A,B,M,F;this.secondBkg=D(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=D(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=D(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=L(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleInv"+S]=this["cScaleInv"+S]||L(this["cScale"+S]);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScalePeer"+S]=this["cScalePeer"+S]||D(this["cScale"+S],10);for(let S=0;S<5;S++)this["surface"+S]=this["surface"+S]||x(this.mainBkg,{h:30,s:-30,l:-(-10+S*4)}),this["surfacePeer"+S]=this["surfacePeer"+S]||x(this.mainBkg,{h:30,s:-30,l:-(-7+S*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleLabel"+S]=this["cScaleLabel"+S]||this.scaleLabelColor;for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["pie"+S]=this["cScale"+S];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 S=0;S<8;S++)this["venn"+(S+1)]=this["venn"+(S+1)]??D(this["cScale"+S],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((g=this.radar)==null?void 0:g.axisStrokeWidth)||2,axisLabelFontSize:((m=this.radar)==null?void 0:m.axisLabelFontSize)||12,curveOpacity:((y=this.radar)==null?void 0:y.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((_=this.radar)==null?void 0:_.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((v=this.radar)==null?void 0:v.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:(($=this.wardley)==null?void 0:$.backgroundColor)||this.background,axisColor:((E=this.wardley)==null?void 0:E.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((P=this.wardley)==null?void 0:P.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.componentFill)||this.mainBkg,componentStroke:((Y=this.wardley)==null?void 0:Y.componentStroke)||this.lineColor,componentLabelColor:((H=this.wardley)==null?void 0:H.componentLabelColor)||this.primaryTextColor,linkStroke:((I=this.wardley)==null?void 0:I.linkStroke)||this.lineColor,evolutionStroke:((A=this.wardley)==null?void 0:A.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((B=this.wardley)==null?void 0:B.annotationStroke)||this.lineColor,annotationTextColor:((M=this.wardley)==null?void 0:M.annotationTextColor)||this.primaryTextColor,annotationFill:((F=this.wardley)==null?void 0:F.annotationFill)||this.mainBkg},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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=D(this.secondaryColor,20),this.git1=D(this.pie2||this.secondaryColor,20),this.git2=D(this.pie3||this.tertiaryColor,20),this.git3=D(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=D(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=D(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=D(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=D(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||D("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||D("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||D("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||D("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||D(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||D(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||D(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||D(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(Xr,"Theme"),Xr),Oy=f(e=>{const t=new $y;return t.calculate(e),t},"getThemeVariables"),Vr,Iy=(Vr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=it(this.primaryColor,this.darkMode),this.secondaryBorderColor=it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=it(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=it(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=Qe(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(){var t,r,i,s,a,o,n,l,h,c,u,p,d,g,m,y,C,b,k,_,w,v,$,E,W,P,O,Y,H,I,A,B,M,F;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScale"+S]=R(this["cScale"+S],10),this["cScalePeer"+S]=this["cScalePeer"+S]||R(this["cScale"+S],25);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleInv"+S]=this["cScaleInv"+S]||x(this["cScale"+S],{h:180});for(let S=0;S<5;S++)this["surface"+S]=this["surface"+S]||x(this.mainBkg,{h:30,l:-(5+S*5)}),this["surfacePeer"+S]=this["surfacePeer"+S]||x(this.mainBkg,{h:30,l:-(7+S*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||L(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||L(this.labelTextColor);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleLabel"+S]=this["cScaleLabel"+S]||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||D(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||D(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||x(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||x(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||x(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??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((u=this.wardley)==null?void 0:u.backgroundColor)||this.background,axisColor:((p=this.wardley)==null?void 0:p.axisColor)||this.lineColor,axisTextColor:((d=this.wardley)==null?void 0:d.axisTextColor)||this.primaryTextColor,gridColor:((g=this.wardley)==null?void 0:g.gridColor)||this.gridColor,componentFill:((m=this.wardley)==null?void 0:m.componentFill)||this.background,componentStroke:((y=this.wardley)==null?void 0:y.componentStroke)||this.lineColor,componentLabelColor:((C=this.wardley)==null?void 0:C.componentLabelColor)||this.primaryTextColor,linkStroke:((b=this.wardley)==null?void 0:b.linkStroke)||this.lineColor,evolutionStroke:((k=this.wardley)==null?void 0:k.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((_=this.wardley)==null?void 0:_.annotationStroke)||this.lineColor,annotationTextColor:((w=this.wardley)==null?void 0:w.annotationTextColor)||this.primaryTextColor,annotationFill:((v=this.wardley)==null?void 0:v.annotationFill)||this.background},this.xyChart={backgroundColor:(($=this.xyChart)==null?void 0:$.backgroundColor)||this.background,titleColor:((E=this.xyChart)==null?void 0:E.titleColor)||this.primaryTextColor,dataLabelColor:((W=this.xyChart)==null?void 0:W.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((P=this.xyChart)==null?void 0:P.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((O=this.xyChart)==null?void 0:O.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Y=this.xyChart)==null?void 0:Y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((H=this.xyChart)==null?void 0:H.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((I=this.xyChart)==null?void 0:I.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((A=this.xyChart)==null?void 0:A.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((B=this.xyChart)==null?void 0:B.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((M=this.xyChart)==null?void 0:M.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((F=this.xyChart)==null?void 0:F.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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||R(L(this.git0),25),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}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(Vr,"Theme"),Vr),Dy=f(e=>{const t=new Iy;return t.calculate(e),t},"getThemeVariables"),Zr,Ry=(Zr=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=D("#cde498",10),this.primaryBorderColor=it(this.primaryColor,this.darkMode),this.secondaryBorderColor=it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=it(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.primaryColor),this.lineColor=L(this.background),this.textColor=L(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(){var t,r,i,s,a,o,n,l,h,c,u,p,d,g,m,y,C,b,k,_,w,v,$,E,W,P,O,Y,H,I,A,B,M,F;this.actorBorder=R(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScale"+S]=R(this["cScale"+S],10),this["cScalePeer"+S]=this["cScalePeer"+S]||R(this["cScale"+S],25);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleInv"+S]=this["cScaleInv"+S]||x(this["cScale"+S],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleLabel"+S]=this["cScaleLabel"+S]||this.scaleLabelColor;for(let S=0;S<5;S++)this["surface"+S]=this["surface"+S]||x(this.mainBkg,{h:30,s:-30,l:-(5+S*5)}),this["surfacePeer"+S]=this["surfacePeer"+S]||x(this.mainBkg,{h:30,s:-30,l:-(8+S*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||D(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||D(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(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||x(this.primaryColor,{l:-30}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||x(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??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((u=this.wardley)==null?void 0:u.backgroundColor)||this.background,axisColor:((p=this.wardley)==null?void 0:p.axisColor)||this.lineColor,axisTextColor:((d=this.wardley)==null?void 0:d.axisTextColor)||this.primaryTextColor,gridColor:((g=this.wardley)==null?void 0:g.gridColor)||this.gridColor,componentFill:((m=this.wardley)==null?void 0:m.componentFill)||this.background,componentStroke:((y=this.wardley)==null?void 0:y.componentStroke)||this.lineColor,componentLabelColor:((C=this.wardley)==null?void 0:C.componentLabelColor)||this.primaryTextColor,linkStroke:((b=this.wardley)==null?void 0:b.linkStroke)||this.lineColor,evolutionStroke:((k=this.wardley)==null?void 0:k.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((_=this.wardley)==null?void 0:_.annotationStroke)||this.lineColor,annotationTextColor:((w=this.wardley)==null?void 0:w.annotationTextColor)||this.primaryTextColor,annotationFill:((v=this.wardley)==null?void 0:v.annotationFill)||this.background},this.xyChart={backgroundColor:(($=this.xyChart)==null?void 0:$.backgroundColor)||this.background,titleColor:((E=this.xyChart)==null?void 0:E.titleColor)||this.primaryTextColor,dataLabelColor:((W=this.xyChart)==null?void 0:W.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((P=this.xyChart)==null?void 0:P.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((O=this.xyChart)==null?void 0:O.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Y=this.xyChart)==null?void 0:Y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((H=this.xyChart)==null?void 0:H.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((I=this.xyChart)==null?void 0:I.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((A=this.xyChart)==null?void 0:A.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((B=this.xyChart)==null?void 0:B.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((M=this.xyChart)==null?void 0:M.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((F=this.xyChart)==null?void 0:F.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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}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(Zr,"Theme"),Zr),Py=f(e=>{const t=new Ry;return t.calculate(e),t},"getThemeVariables"),Kr,Ny=(Kr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=D(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=it(this.primaryColor,this.darkMode),this.secondaryBorderColor=it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=it(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(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||D(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(){var t,r,i,s,a,o,n,l,h,c,u,p,d,g,m,y,C,b,k,_,w,v,$,E,W,P,O,Y,H,I,A,B,M,F;this.secondBkg=D(this.contrast,55),this.border2=this.contrast,this.actorBorder=D(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 S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleInv"+S]=this["cScaleInv"+S]||L(this["cScale"+S]);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this.darkMode?this["cScalePeer"+S]=this["cScalePeer"+S]||D(this["cScale"+S],10):this["cScalePeer"+S]=this["cScalePeer"+S]||R(this["cScale"+S],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleLabel"+S]=this["cScaleLabel"+S]||this.scaleLabelColor;for(let S=0;S<5;S++)this["surface"+S]=this["surface"+S]||x(this.mainBkg,{l:-(5+S*5)}),this["surfacePeer"+S]=this["surfacePeer"+S]||x(this.mainBkg,{l:-(8+S*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=D(this.contrast,30),this.sectionBkgColor2=D(this.contrast,30),this.taskBorderColor=R(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=D(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=R(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128});for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["pie"+S]=this["cScale"+S];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 S=0;S<8;S++)this["venn"+(S+1)]=this["venn"+(S+1)]??this["cScale"+S];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((g=this.radar)==null?void 0:g.axisStrokeWidth)||2,axisLabelFontSize:((m=this.radar)==null?void 0:m.axisLabelFontSize)||12,curveOpacity:((y=this.radar)==null?void 0:y.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((_=this.radar)==null?void 0:_.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((v=this.radar)==null?void 0:v.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:(($=this.wardley)==null?void 0:$.backgroundColor)||this.background,axisColor:((E=this.wardley)==null?void 0:E.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((P=this.wardley)==null?void 0:P.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.componentFill)||this.background,componentStroke:((Y=this.wardley)==null?void 0:Y.componentStroke)||this.lineColor,componentLabelColor:((H=this.wardley)==null?void 0:H.componentLabelColor)||this.primaryTextColor,linkStroke:((I=this.wardley)==null?void 0:I.linkStroke)||this.lineColor,evolutionStroke:((A=this.wardley)==null?void 0:A.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((B=this.wardley)==null?void 0:B.annotationStroke)||this.lineColor,annotationTextColor:((M=this.wardley)==null?void 0:M.annotationTextColor)||this.primaryTextColor,annotationFill:((F=this.wardley)==null?void 0:F.annotationFill)||this.background},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=R(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||x(this.primaryColor,{h:-30}),this.git4=this.pie5||x(this.primaryColor,{h:-60}),this.git5=this.pie6||x(this.primaryColor,{h:-90}),this.git6=this.pie7||x(this.primaryColor,{h:60}),this.git7=this.pie8||x(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}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),qy=f(e=>{const t=new Ny;return t.calculate(e),t},"getThemeVariables"),Qr,Wy=(Qr=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=it(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(){var a,o,n,l,h,c,u,p,d,g,m;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||it(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||it(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||it(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(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||D(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||x(t,{h:30}),this.cScale4=this.cScale4||x(t,{h:60}),this.cScale5=this.cScale5||x(t,{h:90}),this.cScale6=this.cScale6||x(t,{h:120}),this.cScale7=this.cScale7||x(t,{h:150}),this.cScale8=this.cScale8||x(t,{h:210,l:150}),this.cScale9=this.cScale9||x(t,{h:270}),this.cScale10=this.cScale10||x(t,{h:300}),this.cScale11=this.cScale11||x(t,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=R(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=R(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||L(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||D(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||R(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.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?R(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||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}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),zy=f(e=>{const t=new Wy;return t.calculate(e),t},"getThemeVariables"),Jr,Hy=(Jr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=D(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=it(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=D(L("#323D47"),10),this.border1="#ccc",this.border2=Qe(255,255,255,.25),this.arrowheadColor=L(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(){var r,i,s,a,o,n,l,h,c,u,p;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||it(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||it(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||it(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||D(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||L(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||D(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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?R(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=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}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(Jr,"Theme"),Jr),Yy=f(e=>{const t=new Hy;return t.calculate(e),t},"getThemeVariables"),ti,Uy=(ti=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=it("#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(){var a,o,n,l,h,c,u,p,d,g,m;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||it(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||it(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||it(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(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||D(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 y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=this.mainBkg;if(this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=R(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=R(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||L(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||D(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||R(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.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?R(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||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}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),Gy=f(e=>{const t=new Uy;return t.calculate(e),t},"getThemeVariables"),ei,jy=(ei=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=D(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=it(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=D(L("#323D47"),10),this.border1="#ccc",this.border2=Qe(255,255,255,.25),this.arrowheadColor=L(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(){var r,i,s,a,o,n,l,h,c,u,p;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||it(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||it(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||it(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||D(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||L(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||D(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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?R(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}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),Xy=f(e=>{const t=new jy;return t.calculate(e),t},"getThemeVariables"),ri,Vy=(ri=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=it(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(){var a,o,n,l,h,c,u,p,d,g,m;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||it(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||it(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||it(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(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||D(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 y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||L(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||D(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||R(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.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?R(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||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}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),Zy=f(e=>{const t=new Vy;return t.calculate(e),t},"getThemeVariables"),ii,Ky=(ii=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=D(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=it(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=D(L("#323D47"),10),this.border1="#ccc",this.border2=Qe(255,255,255,.25),this.arrowheadColor=L(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(){var r,i,s,a,o,n,l,h,c,u,p;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||it(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||it(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||it(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||D(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 d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||L(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||D(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=R(this["cScale"+d],75);const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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?R(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}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),Qy=f(e=>{const t=new Ky;return t.calculate(e),t},"getThemeVariables"),ze={base:{getThemeVariables:My},dark:{getThemeVariables:Oy},default:{getThemeVariables:Dy},forest:{getThemeVariables:Py},neutral:{getThemeVariables:qy},neo:{getThemeVariables:zy},"neo-dark":{getThemeVariables:Yy},redux:{getThemeVariables:Gy},"redux-dark":{getThemeVariables:Xy},"redux-color":{getThemeVariables:Zy},"redux-dark-color":{getThemeVariables:Qy}},Xt={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,hierarchicalNamespaces:!0},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:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},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,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},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},gc={...Xt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:ze.default.getThemeVariables(),sequence:{...Xt.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,hierarchicalNamespaces:!0},gantt:{...Xt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Xt.c4,useWidth:void 0,personFont:f(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Xt.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:{...Xt.pie,useWidth:984},xyChart:{...Xt.xyChart,useWidth:void 0},requirement:{...Xt.requirement,useWidth:void 0},packet:{...Xt.packet},eventmodeling:{...Xt.eventmodeling},treeView:{...Xt.treeView,useWidth:void 0},radar:{...Xt.radar},ishikawa:{...Xt.ishikawa},sankey:{...Xt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Xt.venn}},mc=f((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...mc(e[i],"")]:[...r,t+i],[]),"keyify"),Jy=new Set(mc(gc,"")),yc=gc,Ps=f(e=>{if(z.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Ps(t));return}for(const t of Object.keys(e)){if(z.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Jy.has(t)||e[t]==null){z.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){if(t==="nodeColors"){const i=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(const s of Object.keys(e[t]))(typeof e[t][s]!="string"||!i.test(e[t][s]))&&(z.debug("sanitize deleting invalid color:",s,e[t][s]),delete e[t][s])}else z.debug("sanitizing object",t),Ps(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(z.debug("sanitizing css option",t),e[t]=Cc(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}z.debug("After sanitization",e)}},"sanitizeDirective"),Cc=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"),ni=Object.freeze(yc),Ge=f(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),re=Dt({},ni),Ns,xr=[],Pi=Dt({},ni),ma=f((e,t)=>{let r=Dt({},e),i={};for(const s of t)kc(s),i=Dt(i,s);if(r=Dt(r,i),i.theme&&i.theme in ze){const s=Dt({},Ns),a=Dt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in ze&&(r.themeVariables=ze[r.theme].getThemeVariables(a))}return Pi=r,Sc(Pi),Pi},"updateCurrentConfig"),t0=f(e=>(re=Dt({},ni),re=Dt(re,e),e.theme&&ze[e.theme]&&(re.themeVariables=ze[e.theme].getThemeVariables(e.themeVariables)),ma(re,xr),re),"setSiteConfig"),e0=f(e=>{Ns=Dt({},e)},"saveConfigFromInitialize"),r0=f(e=>(re=Dt(re,e),ma(re,xr),re),"updateSiteConfig"),xc=f(()=>Dt({},re),"getSiteConfig"),bc=f(e=>(Sc(e),Dt(Pi,e),vt()),"setConfig"),vt=f(()=>Dt({},Pi),"getConfig"),kc=f(e=>{e&&(["secure",...re.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(z.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"&&kc(e[t])}))},"sanitize"),i0=f(e=>{var t;Ps(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),xr.push(e),ma(re,xr)},"addDirective"),qs=f((e=re)=>{xr=[],ma(e,xr)},"reset"),s0={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."},ql={},Tc=f(e=>{ql[e]||(z.warn(s0[e]),ql[e]=!0)},"issueWarning"),Sc=f(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Tc("LAZY_LOAD_DEPRECATED")},"checkConfig"),rv=f(()=>{let e={};Ns&&(e=Dt(e,Ns));for(const t of xr)e=Dt(e,t);return e},"getUserDefinedConfig"),Jt=f(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Tc("FLOWCHART_HTML_LABELS_DEPRECATED"),Ge(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Qi=/<br\s*\/?>/gi,a0=f(e=>e?Bc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),o0=(()=>{let e=!1;return()=>{e||(wc(),e=!0)}})();function wc(){const e="data-temp-href-target";oi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),oi.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(wc,"setupDompurifyHooks");var _c=f(e=>(o0(),oi.sanitize(e)),"removeScript"),Wl=f((e,t)=>{if(Jt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=_c(e):r!=="loose"&&(e=Bc(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=c0(e))}return e},"sanitizeMore"),ke=f((e,t)=>e&&(t.dompurifyConfig?e=oi.sanitize(Wl(e,t),t.dompurifyConfig).toString():e=oi.sanitize(Wl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),n0=f((e,t)=>typeof e=="string"?ke(e,t):e.flat().map(r=>ke(r,t)),"sanitizeTextOrArray"),l0=f(e=>Qi.test(e),"hasBreaks"),h0=f(e=>e.split(Qi),"splitBreaks"),c0=f(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Bc=f(e=>e.replace(Qi,"#br#"),"breakToPlaceholder"),u0=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"),d0=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),p0=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),zl=f(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const a=t[i-1],o=t[i+1];f0(a,o)&&(s=a+","+o,i++,r.pop())}r.push(g0(s))}return r.join("")},"parseGenericTypes"),go=f((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),f0=f((e,t)=>{const r=go(e,"~"),i=go(t,"~");return r===1&&i===1},"shouldCombineSets"),g0=f(e=>{const t=go(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Hl=f(()=>window.MathMLElement!==void 0,"isMathMLSupported"),mo=/\$\$(.*)\$\$/g,Wi=f(e=>{var t;return(((t=e.match(mo))==null?void 0:t.length)??0)>0},"hasKatex"),iv=f(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await vc(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),m0=f(async(e,t)=>{if(!Wi(e))return e;if(!(Hl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(mo,"MathML is unsupported in this environment.");{const{default:r}=await gt(async()=>{const{default:s}=await import("./index-Crmem08A.js").then(a=>a.k);return{default:s}},__vite__mapDeps([0,1])),i=t.forceLegacyMathML||!Hl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Qi).map(s=>Wi(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(mo,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),vc=f(async(e,t)=>ke(await m0(e,t),t),"renderKatexSanitized"),Ji={getRows:a0,sanitizeText:ke,sanitizeTextOrArray:n0,hasBreaks:l0,splitBreaks:h0,lineBreakRegex:Qi,removeScript:_c,getUrl:u0,evaluate:Ge,getMax:d0,getMin:p0},y0=f(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),C0=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"),Lc=f(function(e,t,r,i){const s=C0(t,r,i);y0(e,s)},"configureSvgSize"),x0=f(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,o=s.height;z.info(`SVG bounds: ${a}x${o}`,s);let n=0,l=0;z.info(`Graph bounds: ${n}x${l}`,e),n=a+r*2,l=o+r*2,z.info(`Calculated bounds: ${n}x${l}`),Lc(t,l,n,i);const h=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),Ls={};function yo(e){return[...e.cssRules].map(t=>t.cssText).join(`
6
- `)}f(yo,"cssStyleSheetToString");var b0=f((e,t,r,i)=>{let s="";return e in Ls&&Ls[e]?s=Ls[e]({...r,svgId:i}):z.warn(`No theme found for ${e}`),` & {
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DjHKj0dH.js","assets/index-BYZTj3zW.css","assets/dagre-BM42HDAG-Dq1Zk1WA.js","assets/graph-CAnANduQ.js","assets/layout-DGIYPm2g.js","assets/cose-bilkent-S5V4N54A-BLgQgbpB.js","assets/cytoscape.esm-DTSO7Bv0.js","assets/c4Diagram-AAUBKEIU-CI_WHnrE.js","assets/chunk-ND2GUHAM-CYidZK1i.js","assets/flowDiagram-I6XJVG4X-B6AwQZ9h.js","assets/chunk-FMBD7UC4-BGx9SpKa.js","assets/chunk-55IACEB6-DoxS7_ud.js","assets/chunk-2J33WTMH-2xgOa2Yb.js","assets/channel-D4PrAudT.js","assets/erDiagram-TEJ5UH35-BF5jb9tg.js","assets/gitGraphDiagram-PVQCEYII-CjKzjGW2.js","assets/chunk-4BX2VUAB-Cb41Zl7c.js","assets/chunk-QZHKN3VN-BdmDPkG8.js","assets/wardley-L42UT6IY-BUtbdzPE.js","assets/ganttDiagram-6RSMTGT7-8XevLpQ2.js","assets/linear-DnWUzIqR.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-5YYISTIA-D1EY6tMP.js","assets/pieDiagram-4H26LBE5-Ceq-60P6.js","assets/arc-B0izc5gU.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-W4KKPZXB-CjJi7S36.js","assets/xychartDiagram-2RQKCTM6-By6pgy4_.js","assets/requirementDiagram-4Y6WPE33-C9pzk5Si.js","assets/sequenceDiagram-3UESZ5HK-BsYzexS5.js","assets/classDiagram-4FO5ZUOK-CTewEgrE.js","assets/chunk-727SXJPM-Dm49Gn_q.js","assets/classDiagram-v2-Q7XG4LA2-CTewEgrE.js","assets/stateDiagram-AJRCARHV-BS0VgbxN.js","assets/chunk-AQP2D5EJ-Ch9Xd2Jp.js","assets/stateDiagram-v2-BHNVJYJU-DOBMdgZp.js","assets/journeyDiagram-JHISSGLW-zRbo7xgy.js","assets/timeline-definition-PNZ67QCA-Bmq52fq4.js","assets/mindmap-definition-RKZ34NQL-D4IUASx-.js","assets/kanban-definition-UN3LZRKU-De6vLQmM.js","assets/sankeyDiagram-5OEKKPKP-D5uJ3lHO.js","assets/diagram-LMA3HP47-C9J3k7m5.js","assets/diagram-2AECGRRQ-BEGf4hZt.js","assets/blockDiagram-GPEHLZMM-e2nscQC5.js","assets/diagram-5GNKFQAL-CpQ8v6Gk.js","assets/architectureDiagram-3BPJPVTR-DP6-aNAa.js","assets/diagram-KO2AKTUF-BJCrkyuo.js","assets/ishikawaDiagram-YF4QCWOH-BkPZRRgM.js","assets/vennDiagram-CIIHVFJN-aOBxQyZi.js","assets/diagram-OG6HWLK6-BR4-7yVy.js","assets/wardleyDiagram-YWT4CUSO-BCit449v.js"])))=>i.map(i=>d[i]);
2
+ var Lm=Object.defineProperty;var Fm=(e,t,r)=>t in e?Lm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var St=(e,t,r)=>Fm(e,typeof t!="symbol"?t+"":t,r);import{g as Am,_ as gt,s as Em,m as Mm,a as $m,K as _l,M as Om,S as Im,L as Dm,b as Rm,C as Pm,c as Nm}from"./index-DjHKj0dH.js";var Bs={exports:{}},qm=Bs.exports,Bl;function Wm(){return Bl||(Bl=1,(function(e,t){(function(r,i){e.exports=i()})(qm,(function(){var r=1e3,i=6e4,s=36e5,a="millisecond",o="second",n="minute",l="hour",h="day",c="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+)?$/,C=/\[([^\]]+)]|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 A=["th","st","nd","rd"],B=I%100;return"["+I+(A[(B-20)%10]||A[B]||A[0])+"]"}},k=function(I,A,B){var M=String(I);return!M||M.length>=A?I:""+Array(A+1-M.length).join(B)+I},_={s:k,z:function(I){var A=-I.utcOffset(),B=Math.abs(A),M=Math.floor(B/60),F=B%60;return(A<=0?"+":"-")+k(M,2,"0")+":"+k(F,2,"0")},m:function I(A,B){if(A.date()<B.date())return-I(B,A);var M=12*(B.year()-A.year())+(B.month()-A.month()),F=A.clone().add(M,u),S=B-F<0,q=A.clone().add(M+(S?-1:1),u);return+(-(M+(B-F)/(S?F-q:q-F))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:u,y:d,w:c,d:h,D:g,h:l,m:n,s:o,ms:a,Q:p}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},w="en",v={};v[w]=b;var $="$isDayjsObject",E=function(I){return I instanceof Y||!(!I||!I[$])},W=function I(A,B,M){var F;if(!A)return w;if(typeof A=="string"){var S=A.toLowerCase();v[S]&&(F=S),B&&(v[S]=B,F=S);var q=A.split("-");if(!F&&q.length>1)return I(q[0])}else{var ot=A.name;v[ot]=A,F=ot}return!M&&F&&(w=F),F||!M&&w},P=function(I,A){if(E(I))return I.clone();var B=typeof A=="object"?A:{};return B.date=I,B.args=arguments,new Y(B)},O=_;O.l=W,O.i=E,O.w=function(I,A){return P(I,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var Y=(function(){function I(B){this.$L=W(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[$]=!0}var A=I.prototype;return A.parse=function(B){this.$d=(function(M){var F=M.date,S=M.utc;if(F===null)return new Date(NaN);if(O.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var q=F.match(y);if(q){var ot=q[2]-1||0,ut=(q[7]||"0").substring(0,3);return S?new Date(Date.UTC(q[1],ot,q[3]||1,q[4]||0,q[5]||0,q[6]||0,ut)):new Date(q[1],ot,q[3]||1,q[4]||0,q[5]||0,q[6]||0,ut)}}return new Date(F)})(B),this.init()},A.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},A.$utils=function(){return O},A.isValid=function(){return this.$d.toString()!==m},A.isSame=function(B,M){var F=P(B);return this.startOf(M)<=F&&F<=this.endOf(M)},A.isAfter=function(B,M){return P(B)<this.startOf(M)},A.isBefore=function(B,M){return this.endOf(M)<P(B)},A.$g=function(B,M,F){return O.u(B)?this[M]:this.set(F,B)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(B,M){var F=this,S=!!O.u(M)||M,q=O.p(B),ot=function(te,U){var st=O.w(F.$u?Date.UTC(F.$y,U,te):new Date(F.$y,U,te),F);return S?st:st.endOf(h)},ut=function(te,U){return O.w(F.toDate()[te].apply(F.toDate("s"),(S?[0,0,0,0]:[23,59,59,999]).slice(U)),F)},dt=this.$W,pt=this.$M,mt=this.$D,nt="set"+(this.$u?"UTC":"");switch(q){case d:return S?ot(1,0):ot(31,11);case u:return S?ot(1,pt):ot(0,pt+1);case c:var $t=this.$locale().weekStart||0,xt=(dt<$t?dt+7:dt)-$t;return ot(S?mt-xt:mt+(6-xt),pt);case h:case g:return ut(nt+"Hours",0);case l:return ut(nt+"Minutes",1);case n:return ut(nt+"Seconds",2);case o:return ut(nt+"Milliseconds",3);default:return this.clone()}},A.endOf=function(B){return this.startOf(B,!1)},A.$set=function(B,M){var F,S=O.p(B),q="set"+(this.$u?"UTC":""),ot=(F={},F[h]=q+"Date",F[g]=q+"Date",F[u]=q+"Month",F[d]=q+"FullYear",F[l]=q+"Hours",F[n]=q+"Minutes",F[o]=q+"Seconds",F[a]=q+"Milliseconds",F)[S],ut=S===h?this.$D+(M-this.$W):M;if(S===u||S===d){var dt=this.clone().set(g,1);dt.$d[ot](ut),dt.init(),this.$d=dt.set(g,Math.min(this.$D,dt.daysInMonth())).$d}else ot&&this.$d[ot](ut);return this.init(),this},A.set=function(B,M){return this.clone().$set(B,M)},A.get=function(B){return this[O.p(B)]()},A.add=function(B,M){var F,S=this;B=Number(B);var q=O.p(M),ot=function(pt){var mt=P(S);return O.w(mt.date(mt.date()+Math.round(pt*B)),S)};if(q===u)return this.set(u,this.$M+B);if(q===d)return this.set(d,this.$y+B);if(q===h)return ot(1);if(q===c)return ot(7);var ut=(F={},F[n]=i,F[l]=s,F[o]=r,F)[q]||1,dt=this.$d.getTime()+B*ut;return O.w(dt,this)},A.subtract=function(B,M){return this.add(-1*B,M)},A.format=function(B){var M=this,F=this.$locale();if(!this.isValid())return F.invalidDate||m;var S=B||"YYYY-MM-DDTHH:mm:ssZ",q=O.z(this),ot=this.$H,ut=this.$m,dt=this.$M,pt=F.weekdays,mt=F.months,nt=F.meridiem,$t=function(U,st,kt,wt){return U&&(U[st]||U(M,S))||kt[st].slice(0,wt)},xt=function(U){return O.s(ot%12||12,U,"0")},te=nt||function(U,st,kt){var wt=U<12?"AM":"PM";return kt?wt.toLowerCase():wt};return S.replace(C,(function(U,st){return st||(function(kt){switch(kt){case"YY":return String(M.$y).slice(-2);case"YYYY":return O.s(M.$y,4,"0");case"M":return dt+1;case"MM":return O.s(dt+1,2,"0");case"MMM":return $t(F.monthsShort,dt,mt,3);case"MMMM":return $t(mt,dt);case"D":return M.$D;case"DD":return O.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return $t(F.weekdaysMin,M.$W,pt,2);case"ddd":return $t(F.weekdaysShort,M.$W,pt,3);case"dddd":return pt[M.$W];case"H":return String(ot);case"HH":return O.s(ot,2,"0");case"h":return xt(1);case"hh":return xt(2);case"a":return te(ot,ut,!0);case"A":return te(ot,ut,!1);case"m":return String(ut);case"mm":return O.s(ut,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 q}return null})(U)||q.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(B,M,F){var S,q=this,ot=O.p(M),ut=P(B),dt=(ut.utcOffset()-this.utcOffset())*i,pt=this-ut,mt=function(){return O.m(q,ut)};switch(ot){case d:S=mt()/12;break;case u:S=mt();break;case p:S=mt()/3;break;case c:S=(pt-dt)/6048e5;break;case h:S=(pt-dt)/864e5;break;case l:S=pt/s;break;case n:S=pt/i;break;case o:S=pt/r;break;default:S=pt}return F?S:O.a(S)},A.daysInMonth=function(){return this.endOf(u).$D},A.$locale=function(){return v[this.$L]},A.locale=function(B,M){if(!B)return this.$L;var F=this.clone(),S=W(B,M,!0);return S&&(F.$L=S),F},A.clone=function(){return O.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},I})(),H=Y.prototype;return P.prototype=H,[["$ms",a],["$s",o],["$m",n],["$H",l],["$W",h],["$M",u],["$y",d],["$D",g]].forEach((function(I){H[I[1]]=function(A){return this.$g(A,I[0],I[1])}})),P.extend=function(I,A){return I.$i||(I(A,Y,P),I.$i=!0),P},P.locale=W,P.isDayjs=E,P.unix=function(I){return P(1e3*I)},P.en=v[w],P.Ls=v,P.p={},P}))})(Bs)),Bs.exports}var zm=Wm();const Hm=Am(zm);var oc=Object.defineProperty,f=(e,t)=>oc(e,"name",{value:t,configurable:!0}),Ym=(e,t)=>{for(var r in t)oc(e,r,{get:t[r],enumerable:!0})},Pe={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},z={trace:f((...e)=>{},"trace"),debug:f((...e)=>{},"debug"),info:f((...e)=>{},"info"),warn:f((...e)=>{},"warn"),error:f((...e)=>{},"error"),fatal:f((...e)=>{},"fatal")},ln=f(function(e="fatal"){let t=Pe.fatal;typeof e=="string"?e.toLowerCase()in Pe&&(t=Pe[e]):typeof e=="number"&&(t=e),z.trace=()=>{},z.debug=()=>{},z.info=()=>{},z.warn=()=>{},z.error=()=>{},z.fatal=()=>{},t<=Pe.fatal&&(z.fatal=console.error?console.error.bind(console,ue("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ue("FATAL"))),t<=Pe.error&&(z.error=console.error?console.error.bind(console,ue("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ue("ERROR"))),t<=Pe.warn&&(z.warn=console.warn?console.warn.bind(console,ue("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ue("WARN"))),t<=Pe.info&&(z.info=console.info?console.info.bind(console,ue("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ue("INFO"))),t<=Pe.debug&&(z.debug=console.debug?console.debug.bind(console,ue("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ue("DEBUG"))),t<=Pe.trace&&(z.trace=console.debug?console.debug.bind(console,ue("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ue("TRACE")))},"setLogLevel"),ue=f(e=>`%c${Hm().format("ss.SSS")} : ${e} : `,"format");const vs={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 s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return vs.hue2rgb(a,s,e+1/3)*255;case"g":return vs.hue2rgb(a,s,e)*255;case"b":return vs.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),o=(s+a)/2;if(i==="l")return o*100;if(s===a)return 0;const n=s-a,l=o>.5?n/(2-s-a):n/(s+a);if(i==="s")return l*100;switch(s){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}}},Um={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},Gm={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},at={channel:vs,lang:Um,unit:Gm},Ve={};for(let e=0;e<=255;e++)Ve[e]=at.unit.dec2hex(e);const Yt={ALL:0,RGB:1,HSL:2};class jm{constructor(){this.type=Yt.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=Yt.ALL}is(t){return this.type===t}}class Xm{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new jm}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Yt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=at.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=at.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=at.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=at.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=at.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=at.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Yt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Yt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Yt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Yt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Yt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Yt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Yt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Yt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Yt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Yt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Yt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Yt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const ga=new Xm({r:0,g:0,b:0,a:0},"transparent"),Yr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Yr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,o=s>4,n=o?1:17,l=o?8:4,h=a?0:-1,c=o?255:15;return ga.set({r:(i>>l*(h+3)&c)*n,g:(i>>l*(h+2)&c)*n,b:(i>>l*(h+1)&c)*n,a:a?(i&c)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Ve[Math.round(t)]}${Ve[Math.round(r)]}${Ve[Math.round(i)]}${Ve[Math.round(s*255)]}`:`#${Ve[Math.round(t)]}${Ve[Math.round(r)]}${Ve[Math.round(i)]}`}},dr={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(dr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return at.channel.clamp.h(parseFloat(r)*.9);case"rad":return at.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return at.channel.clamp.h(parseFloat(r)*360)}}return at.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(dr.re);if(!r)return;const[,i,s,a,o,n]=r;return ga.set({h:dr._hue2deg(i),s:at.channel.clamp.s(parseFloat(s)),l:at.channel.clamp.l(parseFloat(a)),a:o?at.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%, ${s})`:`hsl(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%)`}},Di={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=Di.colors[e];if(t)return Yr.parse(t)},stringify:e=>{const t=Yr.stringify(e);for(const r in Di.colors)if(Di.colors[r]===t)return r}},vi={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(vi.re);if(!r)return;const[,i,s,a,o,n,l,h,c]=r;return ga.set({r:at.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:at.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:at.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:h?at.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)}, ${at.lang.round(s)})`:`rgb(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)})`}},Me={format:{keyword:Di,hex:Yr,rgb:vi,rgba:vi,hsl:dr,hsla:dr},parse:e=>{if(typeof e!="string")return e;const t=Yr.parse(e)||vi.parse(e)||dr.parse(e)||Di.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Yt.HSL)||e.data.r===void 0?dr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?vi.stringify(e):Yr.stringify(e)},nc=(e,t)=>{const r=Me.parse(e);for(const i in t)r[i]=at.channel.clamp[i](t[i]);return Me.stringify(r)},Qe=(e,t,r=0,i=1)=>{if(typeof e!="number")return nc(e,{a:t});const s=ga.set({r:at.channel.clamp.r(e),g:at.channel.clamp.g(t),b:at.channel.clamp.b(r),a:at.channel.clamp.a(i)});return Me.stringify(s)},Vm=e=>{const{r:t,g:r,b:i}=Me.parse(e),s=.2126*at.channel.toLinear(t)+.7152*at.channel.toLinear(r)+.0722*at.channel.toLinear(i);return at.lang.round(s)},Zm=e=>Vm(e)>=.5,Te=e=>!Zm(e),lc=(e,t,r)=>{const i=Me.parse(e),s=i[t],a=at.channel.clamp[t](s+r);return s!==a&&(i[t]=a),Me.stringify(i)},D=(e,t)=>lc(e,"l",t),R=(e,t)=>lc(e,"l",-t),x=(e,t)=>{const r=Me.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return nc(e,i)},Km=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=Me.parse(e),{r:n,g:l,b:h,a:c}=Me.parse(t),u=r/100,p=u*2-1,d=o-c,m=((p*d===-1?p:(p+d)/(1+p*d))+1)/2,y=1-m,C=i*m+n*y,b=s*m+l*y,k=a*m+h*y,_=o*u+c*(1-u);return Qe(C,b,k,_)},L=(e,t=100)=>{const r=Me.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Km(r,e,t)};/*! @license DOMPurify 3.4.8 | (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.8/LICENSE */function vl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function Qm(e){if(Array.isArray(e))return e}function Jm(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,a,o,n=[],l=!0,h=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(i=a.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(c){h=!0,s=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(h)throw s}}return n}}function ty(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ey(e,t){return Qm(e)||Jm(e,t)||ry(e,t)||ty()}function ry(e,t){if(e){if(typeof e=="string")return vl(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vl(e,t):void 0}}const hc=Object.entries,Ll=Object.setPrototypeOf,iy=Object.isFrozen,sy=Object.getPrototypeOf,ay=Object.getOwnPropertyDescriptor;let Qt=Object.freeze,de=Object.seal,Pr=Object.create,cc=typeof Reflect<"u"&&Reflect,co=cc.apply,uo=cc.construct;Qt||(Qt=function(t){return t});de||(de=function(t){return t});co||(co=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),a=2;a<i;a++)s[a-2]=arguments[a];return t.apply(r,s)});uo||(uo=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return new t(...i)});const nr=Mt(Array.prototype.forEach),oy=Mt(Array.prototype.lastIndexOf),Fl=Mt(Array.prototype.pop),Mr=Mt(Array.prototype.push),ny=Mt(Array.prototype.splice),Vt=Array.isArray,Li=Mt(String.prototype.toLowerCase),Ua=Mt(String.prototype.toString),Al=Mt(String.prototype.match),$r=Mt(String.prototype.replace),El=Mt(String.prototype.indexOf),ly=Mt(String.prototype.trim),hy=Mt(Number.prototype.toString),cy=Mt(Boolean.prototype.toString),Ml=typeof BigInt>"u"?null:Mt(BigInt.prototype.toString),$l=typeof Symbol>"u"?null:Mt(Symbol.prototype.toString),Ft=Mt(Object.prototype.hasOwnProperty),xi=Mt(Object.prototype.toString),qt=Mt(RegExp.prototype.test),Or=uy(TypeError);function Mt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return co(e,t,i)}}function uy(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return uo(e,r)}}function lt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Li;if(Ll&&Ll(e,null),!Vt(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const a=r(s);a!==s&&(iy(t)||(t[i]=a),s=a)}e[s]=!0}return e}function dy(e){for(let t=0;t<e.length;t++)Ft(e,t)||(e[t]=null);return e}function Ht(e){const t=Pr(null);for(const i of hc(e)){var r=ey(i,2);const s=r[0],a=r[1];Ft(e,s)&&(Vt(a)?t[s]=dy(a):a&&typeof a=="object"&&a.constructor===Object?t[s]=Ht(a):t[s]=a)}return t}function py(e){switch(typeof e){case"string":return e;case"number":return hy(e);case"boolean":return cy(e);case"bigint":return Ml?Ml(e):"0";case"symbol":return $l?$l(e):"Symbol()";case"undefined":return xi(e);case"function":case"object":{if(e===null)return xi(e);const t=e,r=Le(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:xi(i)}return xi(e)}default:return xi(e)}}function Le(e,t){for(;e!==null;){const i=ay(e,t);if(i){if(i.get)return Mt(i.get);if(typeof i.value=="function")return Mt(i.value)}e=sy(e)}function r(){return null}return r}function fy(e){try{return qt(e,""),!0}catch{return!1}}const Ol=Qt(["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"]),Ga=Qt(["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"]),ja=Qt(["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"]),gy=Qt(["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"]),Xa=Qt(["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"]),my=Qt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Il=Qt(["#text"]),Dl=Qt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),Va=Qt(["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"]),Rl=Qt(["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"]),fs=Qt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),yy=de(/{{[\w\W]*|^[\w\W]*}}/g),Cy=de(/<%[\w\W]*|^[\w\W]*%>/g),xy=de(/\${[\w\W]*/g),by=de(/^data-[\-\w.\u00B7-\uFFFF]+$/),ky=de(/^aria-[\-\w]+$/),Pl=de(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ty=de(/^(?:\w+script|data):/i),Sy=de(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),wy=de(/^html$/i),_y=de(/^[a-z][.\w]*(-[.\w]+)+$/i),ve={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},By=function(){return typeof window>"u"?null:window},vy=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Nl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function uc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:By();const t=Q=>uc(Q);if(t.version="3.4.8",t.removed=[],!e||!e.document||e.document.nodeType!==ve.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,o=e.Node,n=e.Element,l=e.NodeFilter,h=e.NamedNodeMap;h===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,u=e.trustedTypes,p=n.prototype,d=Le(p,"cloneNode"),g=Le(p,"remove"),m=Le(p,"nextSibling"),y=Le(p,"childNodes"),C=Le(p,"parentNode"),b=Le(p,"shadowRoot"),k=Le(p,"attributes"),_=o&&o.prototype?Le(o.prototype,"nodeType"):null,w=o&&o.prototype?Le(o.prototype,"nodeName"):null;if(typeof a=="function"){const Q=r.createElement("template");Q.content&&Q.content.ownerDocument&&(r=Q.content.ownerDocument)}let v,$="",E=0;const W=function(T){if(E>0)throw Or('The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');E++;try{return v.createHTML(T)}finally{E--}},P=r,O=P.implementation,Y=P.createNodeIterator,H=P.createDocumentFragment,I=P.getElementsByTagName,A=i.importNode;let B=Nl();t.isSupported=typeof hc=="function"&&typeof C=="function"&&O&&O.createHTMLDocument!==void 0;const M=yy,F=Cy,S=xy,q=by,ot=ky,ut=Ty,dt=Sy,pt=_y;let mt=Pl,nt=null;const $t=lt({},[...Ol,...Ga,...ja,...Xa,...Il]);let xt=null;const te=lt({},[...Dl,...Va,...Rl,...fs]);let U=Object.seal(Pr(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}})),st=null,kt=null;const wt=Object.seal(Pr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let we=!0,le=!0,gi=!1,Ma=!0,he=!1,mi=!0,ar=!1,$a=!1,Oa=!1,Br=!1,ns=!1,ls=!1,ll=!0,hl=!1;const cl="user-content-";let Ia=!0,yi=!1,vr={},_e=null;const Da=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 dl=lt({},["audio","video","img","source","image","track"]);let Ra=null;const pl=lt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),hs="http://www.w3.org/1998/Math/MathML",cs="http://www.w3.org/2000/svg",Be="http://www.w3.org/1999/xhtml";let Lr=Be,Pa=!1,Na=null;const km=lt({},[hs,cs,Be],Ua);let qa=lt({},["mi","mo","mn","ms","mtext"]),Wa=lt({},["annotation-xml"]);const Tm=lt({},["title","style","font","a","script"]);let Ci=null;const Sm=["application/xhtml+xml","text/html"],wm="text/html";let At=null,Fr=null;const _m=r.createElement("form"),fl=function(T){return T instanceof RegExp||T instanceof Function},za=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Fr&&Fr===T)return;(!T||typeof T!="object")&&(T={}),T=Ht(T),Ci=Sm.indexOf(T.PARSER_MEDIA_TYPE)===-1?wm:T.PARSER_MEDIA_TYPE,At=Ci==="application/xhtml+xml"?Ua:Li,nt=Ft(T,"ALLOWED_TAGS")&&Vt(T.ALLOWED_TAGS)?lt({},T.ALLOWED_TAGS,At):$t,xt=Ft(T,"ALLOWED_ATTR")&&Vt(T.ALLOWED_ATTR)?lt({},T.ALLOWED_ATTR,At):te,Na=Ft(T,"ALLOWED_NAMESPACES")&&Vt(T.ALLOWED_NAMESPACES)?lt({},T.ALLOWED_NAMESPACES,Ua):km,Ra=Ft(T,"ADD_URI_SAFE_ATTR")&&Vt(T.ADD_URI_SAFE_ATTR)?lt(Ht(pl),T.ADD_URI_SAFE_ATTR,At):pl,ul=Ft(T,"ADD_DATA_URI_TAGS")&&Vt(T.ADD_DATA_URI_TAGS)?lt(Ht(dl),T.ADD_DATA_URI_TAGS,At):dl,_e=Ft(T,"FORBID_CONTENTS")&&Vt(T.FORBID_CONTENTS)?lt({},T.FORBID_CONTENTS,At):Da,st=Ft(T,"FORBID_TAGS")&&Vt(T.FORBID_TAGS)?lt({},T.FORBID_TAGS,At):Ht({}),kt=Ft(T,"FORBID_ATTR")&&Vt(T.FORBID_ATTR)?lt({},T.FORBID_ATTR,At):Ht({}),vr=Ft(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?Ht(T.USE_PROFILES):T.USE_PROFILES:!1,we=T.ALLOW_ARIA_ATTR!==!1,le=T.ALLOW_DATA_ATTR!==!1,gi=T.ALLOW_UNKNOWN_PROTOCOLS||!1,Ma=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,he=T.SAFE_FOR_TEMPLATES||!1,mi=T.SAFE_FOR_XML!==!1,ar=T.WHOLE_DOCUMENT||!1,Br=T.RETURN_DOM||!1,ns=T.RETURN_DOM_FRAGMENT||!1,ls=T.RETURN_TRUSTED_TYPE||!1,Oa=T.FORCE_BODY||!1,ll=T.SANITIZE_DOM!==!1,hl=T.SANITIZE_NAMED_PROPS||!1,Ia=T.KEEP_CONTENT!==!1,yi=T.IN_PLACE||!1,mt=fy(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:Pl,Lr=typeof T.NAMESPACE=="string"?T.NAMESPACE:Be,qa=Ft(T,"MATHML_TEXT_INTEGRATION_POINTS")&&T.MATHML_TEXT_INTEGRATION_POINTS&&typeof T.MATHML_TEXT_INTEGRATION_POINTS=="object"?Ht(T.MATHML_TEXT_INTEGRATION_POINTS):lt({},["mi","mo","mn","ms","mtext"]),Wa=Ft(T,"HTML_INTEGRATION_POINTS")&&T.HTML_INTEGRATION_POINTS&&typeof T.HTML_INTEGRATION_POINTS=="object"?Ht(T.HTML_INTEGRATION_POINTS):lt({},["annotation-xml"]);const N=Ft(T,"CUSTOM_ELEMENT_HANDLING")&&T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING=="object"?Ht(T.CUSTOM_ELEMENT_HANDLING):Pr(null);if(U=Pr(null),Ft(N,"tagNameCheck")&&fl(N.tagNameCheck)&&(U.tagNameCheck=N.tagNameCheck),Ft(N,"attributeNameCheck")&&fl(N.attributeNameCheck)&&(U.attributeNameCheck=N.attributeNameCheck),Ft(N,"allowCustomizedBuiltInElements")&&typeof N.allowCustomizedBuiltInElements=="boolean"&&(U.allowCustomizedBuiltInElements=N.allowCustomizedBuiltInElements),he&&(le=!1),ns&&(Br=!0),vr&&(nt=lt({},Il),xt=Pr(null),vr.html===!0&&(lt(nt,Ol),lt(xt,Dl)),vr.svg===!0&&(lt(nt,Ga),lt(xt,Va),lt(xt,fs)),vr.svgFilters===!0&&(lt(nt,ja),lt(xt,Va),lt(xt,fs)),vr.mathMl===!0&&(lt(nt,Xa),lt(xt,Rl),lt(xt,fs))),wt.tagCheck=null,wt.attributeCheck=null,Ft(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?wt.tagCheck=T.ADD_TAGS:Vt(T.ADD_TAGS)&&(nt===$t&&(nt=Ht(nt)),lt(nt,T.ADD_TAGS,At))),Ft(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?wt.attributeCheck=T.ADD_ATTR:Vt(T.ADD_ATTR)&&(xt===te&&(xt=Ht(xt)),lt(xt,T.ADD_ATTR,At))),Ft(T,"ADD_URI_SAFE_ATTR")&&Vt(T.ADD_URI_SAFE_ATTR)&&lt(Ra,T.ADD_URI_SAFE_ATTR,At),Ft(T,"FORBID_CONTENTS")&&Vt(T.FORBID_CONTENTS)&&(_e===Da&&(_e=Ht(_e)),lt(_e,T.FORBID_CONTENTS,At)),Ft(T,"ADD_FORBID_CONTENTS")&&Vt(T.ADD_FORBID_CONTENTS)&&(_e===Da&&(_e=Ht(_e)),lt(_e,T.ADD_FORBID_CONTENTS,At)),Ia&&(nt["#text"]=!0),ar&&lt(nt,["html","head","body"]),nt.table&&(lt(nt,["tbody"]),delete st.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw Or('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Or('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const G=v;v=T.TRUSTED_TYPES_POLICY;try{$=W("")}catch(bt){throw v=G,bt}}else v===void 0&&T.TRUSTED_TYPES_POLICY!==null&&(v=vy(u,s)),v&&typeof $=="string"&&($=W(""));(B.uponSanitizeElement.length>0||B.uponSanitizeAttribute.length>0)&&nt===$t&&(nt=Ht(nt)),B.uponSanitizeAttribute.length>0&&xt===te&&(xt=Ht(xt)),Qt&&Qt(T),Fr=T},gl=lt({},[...Ga,...ja,...gy]),ml=lt({},[...Xa,...my]),Bm=function(T){let N=C(T);(!N||!N.tagName)&&(N={namespaceURI:Lr,tagName:"template"});const G=Li(T.tagName),bt=Li(N.tagName);return Na[T.namespaceURI]?T.namespaceURI===cs?N.namespaceURI===Be?G==="svg":N.namespaceURI===hs?G==="svg"&&(bt==="annotation-xml"||qa[bt]):!!gl[G]:T.namespaceURI===hs?N.namespaceURI===Be?G==="math":N.namespaceURI===cs?G==="math"&&Wa[bt]:!!ml[G]:T.namespaceURI===Be?N.namespaceURI===cs&&!Wa[bt]||N.namespaceURI===hs&&!qa[bt]?!1:!ml[G]&&(Tm[G]||!gl[G]):!!(Ci==="application/xhtml+xml"&&Na[T.namespaceURI]):!1},pe=function(T){Mr(t.removed,{element:T});try{C(T).removeChild(T)}catch{g(T)}},or=function(T,N){try{Mr(t.removed,{attribute:N.getAttributeNode(T),from:N})}catch{Mr(t.removed,{attribute:null,from:N})}if(N.removeAttribute(T),T==="is")if(Br||ns)try{pe(N)}catch{}else try{N.setAttribute(T,"")}catch{}},yl=function(T){let N=null,G=null;if(Oa)T="<remove></remove>"+T;else{const _t=Al(T,/^[\r\n\t ]+/);G=_t&&_t[0]}Ci==="application/xhtml+xml"&&Lr===Be&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const bt=v?W(T):T;if(Lr===Be)try{N=new c().parseFromString(bt,Ci)}catch{}if(!N||!N.documentElement){N=O.createDocument(Lr,"template",null);try{N.documentElement.innerHTML=Pa?$:bt}catch{}}const ct=N.body||N.documentElement;return T&&G&&ct.insertBefore(r.createTextNode(G),ct.childNodes[0]||null),Lr===Be?I.call(N,ar?"html":"body")[0]:ar?N.documentElement:ct},Cl=function(T){return Y.call(T.ownerDocument||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Ha=function(T){var N,G;T.normalize();const bt=Y.call(T.ownerDocument||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let ct=bt.nextNode();for(;ct;){let Ot=ct.data;nr([M,F,S],ce=>{Ot=$r(Ot,ce," ")}),ct.data=Ot,ct=bt.nextNode()}const _t=(N=(G=T.querySelectorAll)===null||G===void 0?void 0:G.call(T,"template"))!==null&&N!==void 0?N:[];nr(Array.from(_t),Ot=>{Ar(Ot.content)&&Ha(Ot.content)})},us=function(T){const N=w?w(T):null;return typeof N!="string"||At(N)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==k(T)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==_(T)||T.childNodes!==y(T)},Ar=function(T){if(!_||typeof T!="object"||T===null)return!1;try{return _(T)===ve.documentFragment}catch{return!1}},ds=function(T){if(!_||typeof T!="object"||T===null)return!1;try{return typeof _(T)=="number"}catch{return!1}};function Re(Q,T,N){nr(Q,G=>{G.call(t,T,N,Fr)})}const xl=function(T){let N=null;if(Re(B.beforeSanitizeElements,T,null),us(T))return pe(T),!0;const G=At(w?w(T):T.nodeName);if(Re(B.uponSanitizeElement,T,{tagName:G,allowedTags:nt}),mi&&T.hasChildNodes()&&!ds(T.firstElementChild)&&qt(/<[/\w!]/g,T.innerHTML)&&qt(/<[/\w!]/g,T.textContent)||mi&&T.namespaceURI===Be&&G==="style"&&ds(T.firstElementChild)||T.nodeType===ve.progressingInstruction||mi&&T.nodeType===ve.comment&&qt(/<[/\w]/g,T.data))return pe(T),!0;if(st[G]||!(wt.tagCheck instanceof Function&&wt.tagCheck(G))&&!nt[G]){if(!st[G]&&kl(G)&&(U.tagNameCheck instanceof RegExp&&qt(U.tagNameCheck,G)||U.tagNameCheck instanceof Function&&U.tagNameCheck(G)))return!1;if(Ia&&!_e[G]){const ct=C(T),_t=y(T);if(_t&&ct){const Ot=_t.length;for(let ce=Ot-1;ce>=0;--ce){const fe=d(_t[ce],!0);ct.insertBefore(fe,m(T))}}}return pe(T),!0}return(_?_(T):T.nodeType)===ve.element&&!Bm(T)||(G==="noscript"||G==="noembed"||G==="noframes")&&qt(/<\/no(script|embed|frames)/i,T.innerHTML)?(pe(T),!0):(he&&T.nodeType===ve.text&&(N=T.textContent,nr([M,F,S],ct=>{N=$r(N,ct," ")}),T.textContent!==N&&(Mr(t.removed,{element:T.cloneNode()}),T.textContent=N)),Re(B.afterSanitizeElements,T,null),!1)},bl=function(T,N,G){if(kt[N]||ll&&(N==="id"||N==="name")&&(G in r||G in _m))return!1;const bt=xt[N]||wt.attributeCheck instanceof Function&&wt.attributeCheck(N,T);if(!(le&&!kt[N]&&qt(q,N))){if(!(we&&qt(ot,N))){if(!bt||kt[N]){if(!(kl(T)&&(U.tagNameCheck instanceof RegExp&&qt(U.tagNameCheck,T)||U.tagNameCheck instanceof Function&&U.tagNameCheck(T))&&(U.attributeNameCheck instanceof RegExp&&qt(U.attributeNameCheck,N)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(N,T))||N==="is"&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&qt(U.tagNameCheck,G)||U.tagNameCheck instanceof Function&&U.tagNameCheck(G))))return!1}else if(!Ra[N]){if(!qt(mt,$r(G,dt,""))){if(!((N==="src"||N==="xlink:href"||N==="href")&&T!=="script"&&El(G,"data:")===0&&ul[T])){if(!(gi&&!qt(ut,$r(G,dt,"")))){if(G)return!1}}}}}}return!0},vm=lt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),kl=function(T){return!vm[Li(T)]&&qt(pt,T)},Tl=function(T){Re(B.beforeSanitizeAttributes,T,null);const N=T.attributes;if(!N||us(T))return;const G={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xt,forceKeepAttr:void 0};let bt=N.length;for(;bt--;){const ct=N[bt],_t=ct.name,Ot=ct.namespaceURI,ce=ct.value,fe=At(_t),Ya=ce;let Pt=_t==="value"?Ya:ly(Ya);if(G.attrName=fe,G.attrValue=Pt,G.keepAttr=!0,G.forceKeepAttr=void 0,Re(B.uponSanitizeAttribute,T,G),Pt=G.attrValue,hl&&(fe==="id"||fe==="name")&&El(Pt,cl)!==0&&(or(_t,T),Pt=cl+Pt),mi&&qt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Pt)){or(_t,T);continue}if(fe==="attributename"&&Al(Pt,"href")){or(_t,T);continue}if(G.forceKeepAttr)continue;if(!G.keepAttr){or(_t,T);continue}if(!Ma&&qt(/\/>/i,Pt)){or(_t,T);continue}he&&nr([M,F,S],wl=>{Pt=$r(Pt,wl," ")});const Sl=At(T.nodeName);if(!bl(Sl,fe,Pt)){or(_t,T);continue}if(v&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!Ot)switch(u.getAttributeType(Sl,fe)){case"TrustedHTML":{Pt=W(Pt);break}case"TrustedScriptURL":{Pt=v.createScriptURL(Pt);break}}if(Pt!==Ya)try{Ot?T.setAttributeNS(Ot,_t,Pt):T.setAttribute(_t,Pt),us(T)?pe(T):Fl(t.removed)}catch{or(_t,T)}}Re(B.afterSanitizeAttributes,T,null)},ps=function(T){let N=null;const G=Cl(T);for(Re(B.beforeSanitizeShadowDOM,T,null);N=G.nextNode();)if(Re(B.uponSanitizeShadowNode,N,null),xl(N),Tl(N),Ar(N.content)&&ps(N.content),(_?_(N):N.nodeType)===ve.element){const ct=b?b(N):N.shadowRoot;Ar(ct)&&(Er(ct),ps(ct))}Re(B.afterSanitizeShadowDOM,T,null)},Er=function(T){const N=_?_(T):T.nodeType;if(N===ve.element){const ct=b?b(T):T.shadowRoot;Ar(ct)&&(Er(ct),ps(ct))}const G=y?y(T):T.childNodes;if(!G)return;const bt=[];nr(G,ct=>{Mr(bt,ct)});for(const ct of bt)Er(ct);if(N===ve.element){const ct=w?w(T):null;if(typeof ct=="string"&&At(ct)==="template"){const _t=T.content;Ar(_t)&&Er(_t)}}};return t.sanitize=function(Q){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},N=null,G=null,bt=null,ct=null;if(Pa=!Q,Pa&&(Q="<!-->"),typeof Q!="string"&&!ds(Q)&&(Q=py(Q),typeof Q!="string"))throw Or("dirty is not a string, aborting");if(!t.isSupported)return Q;if($a||za(T),t.removed=[],typeof Q=="string"&&(yi=!1),yi){const ce=w?w(Q):Q.nodeName;if(typeof ce=="string"){const fe=At(ce);if(!nt[fe]||st[fe])throw Or("root node is forbidden and cannot be sanitized in-place")}if(us(Q))throw Or("root node is clobbered and cannot be sanitized in-place");Er(Q)}else if(ds(Q))N=yl("<!---->"),G=N.ownerDocument.importNode(Q,!0),G.nodeType===ve.element&&G.nodeName==="BODY"||G.nodeName==="HTML"?N=G:N.appendChild(G),Er(G);else{if(!Br&&!he&&!ar&&Q.indexOf("<")===-1)return v&&ls?W(Q):Q;if(N=yl(Q),!N)return Br?null:ls?$:""}N&&Oa&&pe(N.firstChild);const _t=Cl(yi?Q:N);for(;bt=_t.nextNode();)xl(bt),Tl(bt),Ar(bt.content)&&ps(bt.content);if(yi)return he&&Ha(Q),Q;if(Br){if(he&&Ha(N),ns)for(ct=H.call(N.ownerDocument);N.firstChild;)ct.appendChild(N.firstChild);else ct=N;return(xt.shadowroot||xt.shadowrootmode)&&(ct=A.call(i,ct,!0)),ct}let Ot=ar?N.outerHTML:N.innerHTML;return ar&&nt["!doctype"]&&N.ownerDocument&&N.ownerDocument.doctype&&N.ownerDocument.doctype.name&&qt(wy,N.ownerDocument.doctype.name)&&(Ot="<!DOCTYPE "+N.ownerDocument.doctype.name+`>
4
+ `+Ot),he&&nr([M,F,S],ce=>{Ot=$r(Ot,ce," ")}),v&&ls?W(Ot):Ot},t.setConfig=function(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};za(Q),$a=!0},t.clearConfig=function(){Fr=null,$a=!1},t.isValidAttribute=function(Q,T,N){Fr||za({});const G=At(Q),bt=At(T);return bl(G,bt,N)},t.addHook=function(Q,T){typeof T=="function"&&Mr(B[Q],T)},t.removeHook=function(Q,T){if(T!==void 0){const N=oy(B[Q],T);return N===-1?void 0:ny(B[Q],N,1)[0]}return Fl(B[Q])},t.removeHooks=function(Q){B[Q]=[]},t.removeAllHooks=function(){B=Nl()},t}var oi=uc(),dc=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Ri=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Ly=/\s*%%.*\n/gm,Gr,pc=(Gr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},f(Gr,"UnknownDiagramError"),Gr),Cr={},hn=f(function(e,t){e=e.replace(dc,"").replace(Ri,"").replace(Ly,`
5
+ `);for(const[r,{detector:i}]of Object.entries(Cr))if(i(e,t))return r;throw new pc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),po=f((...e)=>{for(const{id:t,detector:r,loader:i}of e)fc(t,r,i)},"registerLazyLoadedDiagrams"),fc=f((e,t,r)=>{Cr[e]&&z.warn(`Detector with key ${e} already exists. Overwriting.`),Cr[e]={detector:t,loader:r},z.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Fy=f(e=>Cr[e].loader,"getDiagramLoader"),fo=f((e,t,{depth:r=2,clobber:i=!1}={})=>{const s={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>fo(e,a,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),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(a=>{typeof t[a]=="object"&&t[a]!==null&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=fo(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Dt=fo,Oe="#ffffff",Ie="#f2f2f2",it=f((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),jr,Ay=(jr=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(){var r,i,s,a,o,n,l,h,c,u,p,d,g,m,y,C,b,k,_,w,v,$,E,W,P,O,Y,H,I,A,B,M,F,S;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||it(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||it(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||it(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||D(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||R(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,10)):(this.rowOdd=this.rowOdd||D(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||D(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScale"+q]=R(this["cScale"+q],75);else for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScale"+q]=R(this["cScale"+q],25);for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScaleInv"+q]=this["cScaleInv"+q]||L(this["cScale"+q]);for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this.darkMode?this["cScalePeer"+q]=this["cScalePeer"+q]||D(this["cScale"+q],10):this["cScalePeer"+q]=this["cScalePeer"+q]||R(this["cScale"+q],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScaleLabel"+q]=this["cScaleLabel"+q]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let q=0;q<5;q++)this["surface"+q]=this["surface"+q]||x(this.mainBkg,{h:180,s:-15,l:t*(5+q*3)}),this["surfacePeer"+q]=this["surfacePeer"+q]||x(this.mainBkg,{h:180,s:-15,l:t*(8+q*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((s=this.radar)==null?void 0:s.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((h=this.radar)==null?void 0:h.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((u=this.radar)==null?void 0:u.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((p=this.wardley)==null?void 0:p.backgroundColor)||this.background,axisColor:((d=this.wardley)==null?void 0:d.axisColor)||this.lineColor,axisTextColor:((g=this.wardley)==null?void 0:g.axisTextColor)||this.primaryTextColor,gridColor:((m=this.wardley)==null?void 0:m.gridColor)||this.gridColor,componentFill:((y=this.wardley)==null?void 0:y.componentFill)||this.background,componentStroke:((C=this.wardley)==null?void 0:C.componentStroke)||this.lineColor,componentLabelColor:((b=this.wardley)==null?void 0:b.componentLabelColor)||this.primaryTextColor,linkStroke:((k=this.wardley)==null?void 0:k.linkStroke)||this.lineColor,evolutionStroke:((_=this.wardley)==null?void 0:_.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((w=this.wardley)==null?void 0:w.annotationStroke)||this.lineColor,annotationTextColor:((v=this.wardley)==null?void 0:v.annotationTextColor)||this.primaryTextColor,annotationFill:(($=this.wardley)==null?void 0:$.annotationFill)||this.background},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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((E=this.xyChart)==null?void 0:E.backgroundColor)||this.background,titleColor:((W=this.xyChart)==null?void 0:W.titleColor)||this.primaryTextColor,dataLabelColor:((P=this.xyChart)==null?void 0:P.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((O=this.xyChart)==null?void 0:O.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Y=this.xyChart)==null?void 0:Y.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((H=this.xyChart)==null?void 0:H.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((I=this.xyChart)==null?void 0:I.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((A=this.xyChart)==null?void 0:A.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((B=this.xyChart)==null?void 0:B.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((M=this.xyChart)==null?void 0:M.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((F=this.xyChart)==null?void 0:F.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((S=this.xyChart)==null?void 0:S.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?R(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie,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(jr,"Theme"),jr),Ey=f(e=>{const t=new Ay;return t.calculate(e),t},"getThemeVariables"),Xr,My=(Xr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=D(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=it(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=D(L("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Qe(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=R("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=R(this.sectionBkgColor,10),this.taskBorderColor=Qe(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Qe(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||D(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(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(){var t,r,i,s,a,o,n,l,h,c,u,p,d,g,m,y,C,b,k,_,w,v,$,E,W,P,O,Y,H,I,A,B,M,F;this.secondBkg=D(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=D(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=D(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=L(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleInv"+S]=this["cScaleInv"+S]||L(this["cScale"+S]);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScalePeer"+S]=this["cScalePeer"+S]||D(this["cScale"+S],10);for(let S=0;S<5;S++)this["surface"+S]=this["surface"+S]||x(this.mainBkg,{h:30,s:-30,l:-(-10+S*4)}),this["surfacePeer"+S]=this["surfacePeer"+S]||x(this.mainBkg,{h:30,s:-30,l:-(-7+S*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleLabel"+S]=this["cScaleLabel"+S]||this.scaleLabelColor;for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["pie"+S]=this["cScale"+S];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 S=0;S<8;S++)this["venn"+(S+1)]=this["venn"+(S+1)]??D(this["cScale"+S],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((g=this.radar)==null?void 0:g.axisStrokeWidth)||2,axisLabelFontSize:((m=this.radar)==null?void 0:m.axisLabelFontSize)||12,curveOpacity:((y=this.radar)==null?void 0:y.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((_=this.radar)==null?void 0:_.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((v=this.radar)==null?void 0:v.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:(($=this.wardley)==null?void 0:$.backgroundColor)||this.background,axisColor:((E=this.wardley)==null?void 0:E.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((P=this.wardley)==null?void 0:P.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.componentFill)||this.mainBkg,componentStroke:((Y=this.wardley)==null?void 0:Y.componentStroke)||this.lineColor,componentLabelColor:((H=this.wardley)==null?void 0:H.componentLabelColor)||this.primaryTextColor,linkStroke:((I=this.wardley)==null?void 0:I.linkStroke)||this.lineColor,evolutionStroke:((A=this.wardley)==null?void 0:A.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((B=this.wardley)==null?void 0:B.annotationStroke)||this.lineColor,annotationTextColor:((M=this.wardley)==null?void 0:M.annotationTextColor)||this.primaryTextColor,annotationFill:((F=this.wardley)==null?void 0:F.annotationFill)||this.mainBkg},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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=D(this.secondaryColor,20),this.git1=D(this.pie2||this.secondaryColor,20),this.git2=D(this.pie3||this.tertiaryColor,20),this.git3=D(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=D(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=D(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=D(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=D(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||D("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||D("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||D("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||D("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||D(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||D(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||D(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||D(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(Xr,"Theme"),Xr),$y=f(e=>{const t=new My;return t.calculate(e),t},"getThemeVariables"),Vr,Oy=(Vr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=it(this.primaryColor,this.darkMode),this.secondaryBorderColor=it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=it(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=it(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=Qe(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(){var t,r,i,s,a,o,n,l,h,c,u,p,d,g,m,y,C,b,k,_,w,v,$,E,W,P,O,Y,H,I,A,B,M,F;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScale"+S]=R(this["cScale"+S],10),this["cScalePeer"+S]=this["cScalePeer"+S]||R(this["cScale"+S],25);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleInv"+S]=this["cScaleInv"+S]||x(this["cScale"+S],{h:180});for(let S=0;S<5;S++)this["surface"+S]=this["surface"+S]||x(this.mainBkg,{h:30,l:-(5+S*5)}),this["surfacePeer"+S]=this["surfacePeer"+S]||x(this.mainBkg,{h:30,l:-(7+S*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||L(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||L(this.labelTextColor);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleLabel"+S]=this["cScaleLabel"+S]||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||D(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||D(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||x(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||x(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||x(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??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((u=this.wardley)==null?void 0:u.backgroundColor)||this.background,axisColor:((p=this.wardley)==null?void 0:p.axisColor)||this.lineColor,axisTextColor:((d=this.wardley)==null?void 0:d.axisTextColor)||this.primaryTextColor,gridColor:((g=this.wardley)==null?void 0:g.gridColor)||this.gridColor,componentFill:((m=this.wardley)==null?void 0:m.componentFill)||this.background,componentStroke:((y=this.wardley)==null?void 0:y.componentStroke)||this.lineColor,componentLabelColor:((C=this.wardley)==null?void 0:C.componentLabelColor)||this.primaryTextColor,linkStroke:((b=this.wardley)==null?void 0:b.linkStroke)||this.lineColor,evolutionStroke:((k=this.wardley)==null?void 0:k.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((_=this.wardley)==null?void 0:_.annotationStroke)||this.lineColor,annotationTextColor:((w=this.wardley)==null?void 0:w.annotationTextColor)||this.primaryTextColor,annotationFill:((v=this.wardley)==null?void 0:v.annotationFill)||this.background},this.xyChart={backgroundColor:(($=this.xyChart)==null?void 0:$.backgroundColor)||this.background,titleColor:((E=this.xyChart)==null?void 0:E.titleColor)||this.primaryTextColor,dataLabelColor:((W=this.xyChart)==null?void 0:W.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((P=this.xyChart)==null?void 0:P.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((O=this.xyChart)==null?void 0:O.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Y=this.xyChart)==null?void 0:Y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((H=this.xyChart)==null?void 0:H.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((I=this.xyChart)==null?void 0:I.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((A=this.xyChart)==null?void 0:A.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((B=this.xyChart)==null?void 0:B.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((M=this.xyChart)==null?void 0:M.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((F=this.xyChart)==null?void 0:F.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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||R(L(this.git0),25),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}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(Vr,"Theme"),Vr),Iy=f(e=>{const t=new Oy;return t.calculate(e),t},"getThemeVariables"),Zr,Dy=(Zr=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=D("#cde498",10),this.primaryBorderColor=it(this.primaryColor,this.darkMode),this.secondaryBorderColor=it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=it(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.primaryColor),this.lineColor=L(this.background),this.textColor=L(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(){var t,r,i,s,a,o,n,l,h,c,u,p,d,g,m,y,C,b,k,_,w,v,$,E,W,P,O,Y,H,I,A,B,M,F;this.actorBorder=R(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScale"+S]=R(this["cScale"+S],10),this["cScalePeer"+S]=this["cScalePeer"+S]||R(this["cScale"+S],25);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleInv"+S]=this["cScaleInv"+S]||x(this["cScale"+S],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleLabel"+S]=this["cScaleLabel"+S]||this.scaleLabelColor;for(let S=0;S<5;S++)this["surface"+S]=this["surface"+S]||x(this.mainBkg,{h:30,s:-30,l:-(5+S*5)}),this["surfacePeer"+S]=this["surfacePeer"+S]||x(this.mainBkg,{h:30,s:-30,l:-(8+S*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||D(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||D(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(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||x(this.primaryColor,{l:-30}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||x(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??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((u=this.wardley)==null?void 0:u.backgroundColor)||this.background,axisColor:((p=this.wardley)==null?void 0:p.axisColor)||this.lineColor,axisTextColor:((d=this.wardley)==null?void 0:d.axisTextColor)||this.primaryTextColor,gridColor:((g=this.wardley)==null?void 0:g.gridColor)||this.gridColor,componentFill:((m=this.wardley)==null?void 0:m.componentFill)||this.background,componentStroke:((y=this.wardley)==null?void 0:y.componentStroke)||this.lineColor,componentLabelColor:((C=this.wardley)==null?void 0:C.componentLabelColor)||this.primaryTextColor,linkStroke:((b=this.wardley)==null?void 0:b.linkStroke)||this.lineColor,evolutionStroke:((k=this.wardley)==null?void 0:k.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((_=this.wardley)==null?void 0:_.annotationStroke)||this.lineColor,annotationTextColor:((w=this.wardley)==null?void 0:w.annotationTextColor)||this.primaryTextColor,annotationFill:((v=this.wardley)==null?void 0:v.annotationFill)||this.background},this.xyChart={backgroundColor:(($=this.xyChart)==null?void 0:$.backgroundColor)||this.background,titleColor:((E=this.xyChart)==null?void 0:E.titleColor)||this.primaryTextColor,dataLabelColor:((W=this.xyChart)==null?void 0:W.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((P=this.xyChart)==null?void 0:P.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((O=this.xyChart)==null?void 0:O.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Y=this.xyChart)==null?void 0:Y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((H=this.xyChart)==null?void 0:H.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((I=this.xyChart)==null?void 0:I.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((A=this.xyChart)==null?void 0:A.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((B=this.xyChart)==null?void 0:B.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((M=this.xyChart)==null?void 0:M.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((F=this.xyChart)==null?void 0:F.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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}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(Zr,"Theme"),Zr),Ry=f(e=>{const t=new Dy;return t.calculate(e),t},"getThemeVariables"),Kr,Py=(Kr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=D(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=it(this.primaryColor,this.darkMode),this.secondaryBorderColor=it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=it(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(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||D(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(){var t,r,i,s,a,o,n,l,h,c,u,p,d,g,m,y,C,b,k,_,w,v,$,E,W,P,O,Y,H,I,A,B,M,F;this.secondBkg=D(this.contrast,55),this.border2=this.contrast,this.actorBorder=D(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 S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleInv"+S]=this["cScaleInv"+S]||L(this["cScale"+S]);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this.darkMode?this["cScalePeer"+S]=this["cScalePeer"+S]||D(this["cScale"+S],10):this["cScalePeer"+S]=this["cScalePeer"+S]||R(this["cScale"+S],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleLabel"+S]=this["cScaleLabel"+S]||this.scaleLabelColor;for(let S=0;S<5;S++)this["surface"+S]=this["surface"+S]||x(this.mainBkg,{l:-(5+S*5)}),this["surfacePeer"+S]=this["surfacePeer"+S]||x(this.mainBkg,{l:-(8+S*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=D(this.contrast,30),this.sectionBkgColor2=D(this.contrast,30),this.taskBorderColor=R(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=D(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=R(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128});for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["pie"+S]=this["cScale"+S];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 S=0;S<8;S++)this["venn"+(S+1)]=this["venn"+(S+1)]??this["cScale"+S];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((g=this.radar)==null?void 0:g.axisStrokeWidth)||2,axisLabelFontSize:((m=this.radar)==null?void 0:m.axisLabelFontSize)||12,curveOpacity:((y=this.radar)==null?void 0:y.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((_=this.radar)==null?void 0:_.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((v=this.radar)==null?void 0:v.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:(($=this.wardley)==null?void 0:$.backgroundColor)||this.background,axisColor:((E=this.wardley)==null?void 0:E.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((P=this.wardley)==null?void 0:P.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.componentFill)||this.background,componentStroke:((Y=this.wardley)==null?void 0:Y.componentStroke)||this.lineColor,componentLabelColor:((H=this.wardley)==null?void 0:H.componentLabelColor)||this.primaryTextColor,linkStroke:((I=this.wardley)==null?void 0:I.linkStroke)||this.lineColor,evolutionStroke:((A=this.wardley)==null?void 0:A.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((B=this.wardley)==null?void 0:B.annotationStroke)||this.lineColor,annotationTextColor:((M=this.wardley)==null?void 0:M.annotationTextColor)||this.primaryTextColor,annotationFill:((F=this.wardley)==null?void 0:F.annotationFill)||this.background},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=R(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||x(this.primaryColor,{h:-30}),this.git4=this.pie5||x(this.primaryColor,{h:-60}),this.git5=this.pie6||x(this.primaryColor,{h:-90}),this.git6=this.pie7||x(this.primaryColor,{h:60}),this.git7=this.pie8||x(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}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),Ny=f(e=>{const t=new Py;return t.calculate(e),t},"getThemeVariables"),Qr,qy=(Qr=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=it(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(){var a,o,n,l,h,c,u,p,d,g,m;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||it(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||it(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||it(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(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||D(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||x(t,{h:30}),this.cScale4=this.cScale4||x(t,{h:60}),this.cScale5=this.cScale5||x(t,{h:90}),this.cScale6=this.cScale6||x(t,{h:120}),this.cScale7=this.cScale7||x(t,{h:150}),this.cScale8=this.cScale8||x(t,{h:210,l:150}),this.cScale9=this.cScale9||x(t,{h:270}),this.cScale10=this.cScale10||x(t,{h:300}),this.cScale11=this.cScale11||x(t,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=R(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=R(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||L(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||D(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||R(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.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?R(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||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}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),Wy=f(e=>{const t=new qy;return t.calculate(e),t},"getThemeVariables"),Jr,zy=(Jr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=D(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=it(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=D(L("#323D47"),10),this.border1="#ccc",this.border2=Qe(255,255,255,.25),this.arrowheadColor=L(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(){var r,i,s,a,o,n,l,h,c,u,p;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||it(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||it(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||it(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||D(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||L(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||D(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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?R(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=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}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(Jr,"Theme"),Jr),Hy=f(e=>{const t=new zy;return t.calculate(e),t},"getThemeVariables"),ti,Yy=(ti=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=it("#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(){var a,o,n,l,h,c,u,p,d,g,m;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||it(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||it(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||it(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(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||D(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 y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=this.mainBkg;if(this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=R(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=R(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||L(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||D(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||R(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.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?R(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||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}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),Uy=f(e=>{const t=new Yy;return t.calculate(e),t},"getThemeVariables"),ei,Gy=(ei=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=D(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=it(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=D(L("#323D47"),10),this.border1="#ccc",this.border2=Qe(255,255,255,.25),this.arrowheadColor=L(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(){var r,i,s,a,o,n,l,h,c,u,p;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||it(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||it(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||it(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||D(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||L(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||D(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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?R(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}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),jy=f(e=>{const t=new Gy;return t.calculate(e),t},"getThemeVariables"),ri,Xy=(ri=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=it(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(){var a,o,n,l,h,c,u,p,d,g,m;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||it(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||it(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||it(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(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||D(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 y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||L(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||D(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||R(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.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?R(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||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}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),Vy=f(e=>{const t=new Xy;return t.calculate(e),t},"getThemeVariables"),ii,Zy=(ii=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=D(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=it(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=D(L("#323D47"),10),this.border1="#ccc",this.border2=Qe(255,255,255,.25),this.arrowheadColor=L(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(){var r,i,s,a,o,n,l,h,c,u,p;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||it(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||it(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||it(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||it(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||D(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 d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||L(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||D(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=R(this["cScale"+d],75);const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?D(this.quadrant1Fill):R(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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?R(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}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),Ky=f(e=>{const t=new Zy;return t.calculate(e),t},"getThemeVariables"),ze={base:{getThemeVariables:Ey},dark:{getThemeVariables:$y},default:{getThemeVariables:Iy},forest:{getThemeVariables:Ry},neutral:{getThemeVariables:Ny},neo:{getThemeVariables:Wy},"neo-dark":{getThemeVariables:Hy},redux:{getThemeVariables:Uy},"redux-dark":{getThemeVariables:jy},"redux-color":{getThemeVariables:Vy},"redux-dark-color":{getThemeVariables:Ky}},Xt={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,hierarchicalNamespaces:!0},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:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},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,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},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},gc={...Xt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:ze.default.getThemeVariables(),sequence:{...Xt.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,hierarchicalNamespaces:!0},gantt:{...Xt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Xt.c4,useWidth:void 0,personFont:f(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Xt.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:{...Xt.pie,useWidth:984},xyChart:{...Xt.xyChart,useWidth:void 0},requirement:{...Xt.requirement,useWidth:void 0},packet:{...Xt.packet},eventmodeling:{...Xt.eventmodeling},treeView:{...Xt.treeView,useWidth:void 0},radar:{...Xt.radar},ishikawa:{...Xt.ishikawa},sankey:{...Xt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Xt.venn}},mc=f((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...mc(e[i],"")]:[...r,t+i],[]),"keyify"),Qy=new Set(mc(gc,"")),yc=gc,Ps=f(e=>{if(z.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Ps(t));return}for(const t of Object.keys(e)){if(z.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Qy.has(t)||e[t]==null){z.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){if(t==="nodeColors"){const i=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(const s of Object.keys(e[t]))(typeof e[t][s]!="string"||!i.test(e[t][s]))&&(z.debug("sanitize deleting invalid color:",s,e[t][s]),delete e[t][s])}else z.debug("sanitizing object",t),Ps(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(z.debug("sanitizing css option",t),e[t]=Cc(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}z.debug("After sanitization",e)}},"sanitizeDirective"),Cc=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"),ni=Object.freeze(yc),Ge=f(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),re=Dt({},ni),Ns,xr=[],Pi=Dt({},ni),ma=f((e,t)=>{let r=Dt({},e),i={};for(const s of t)kc(s),i=Dt(i,s);if(r=Dt(r,i),i.theme&&i.theme in ze){const s=Dt({},Ns),a=Dt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in ze&&(r.themeVariables=ze[r.theme].getThemeVariables(a))}return Pi=r,Sc(Pi),Pi},"updateCurrentConfig"),Jy=f(e=>(re=Dt({},ni),re=Dt(re,e),e.theme&&ze[e.theme]&&(re.themeVariables=ze[e.theme].getThemeVariables(e.themeVariables)),ma(re,xr),re),"setSiteConfig"),t0=f(e=>{Ns=Dt({},e)},"saveConfigFromInitialize"),e0=f(e=>(re=Dt(re,e),ma(re,xr),re),"updateSiteConfig"),xc=f(()=>Dt({},re),"getSiteConfig"),bc=f(e=>(Sc(e),Dt(Pi,e),vt()),"setConfig"),vt=f(()=>Dt({},Pi),"getConfig"),kc=f(e=>{e&&(["secure",...re.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(z.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"&&kc(e[t])}))},"sanitize"),r0=f(e=>{var t;Ps(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),xr.push(e),ma(re,xr)},"addDirective"),qs=f((e=re)=>{xr=[],ma(e,xr)},"reset"),i0={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."},ql={},Tc=f(e=>{ql[e]||(z.warn(i0[e]),ql[e]=!0)},"issueWarning"),Sc=f(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Tc("LAZY_LOAD_DEPRECATED")},"checkConfig"),ev=f(()=>{let e={};Ns&&(e=Dt(e,Ns));for(const t of xr)e=Dt(e,t);return e},"getUserDefinedConfig"),Jt=f(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Tc("FLOWCHART_HTML_LABELS_DEPRECATED"),Ge(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Qi=/<br\s*\/?>/gi,s0=f(e=>e?Bc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),a0=(()=>{let e=!1;return()=>{e||(wc(),e=!0)}})();function wc(){const e="data-temp-href-target";oi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),oi.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(wc,"setupDompurifyHooks");var _c=f(e=>(a0(),oi.sanitize(e)),"removeScript"),Wl=f((e,t)=>{if(Jt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=_c(e):r!=="loose"&&(e=Bc(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=h0(e))}return e},"sanitizeMore"),ke=f((e,t)=>e&&(t.dompurifyConfig?e=oi.sanitize(Wl(e,t),t.dompurifyConfig).toString():e=oi.sanitize(Wl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),o0=f((e,t)=>typeof e=="string"?ke(e,t):e.flat().map(r=>ke(r,t)),"sanitizeTextOrArray"),n0=f(e=>Qi.test(e),"hasBreaks"),l0=f(e=>e.split(Qi),"splitBreaks"),h0=f(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Bc=f(e=>e.replace(Qi,"#br#"),"breakToPlaceholder"),c0=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"),u0=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),d0=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),zl=f(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const a=t[i-1],o=t[i+1];p0(a,o)&&(s=a+","+o,i++,r.pop())}r.push(f0(s))}return r.join("")},"parseGenericTypes"),go=f((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),p0=f((e,t)=>{const r=go(e,"~"),i=go(t,"~");return r===1&&i===1},"shouldCombineSets"),f0=f(e=>{const t=go(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Hl=f(()=>window.MathMLElement!==void 0,"isMathMLSupported"),mo=/\$\$(.*)\$\$/g,Wi=f(e=>{var t;return(((t=e.match(mo))==null?void 0:t.length)??0)>0},"hasKatex"),rv=f(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await vc(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),g0=f(async(e,t)=>{if(!Wi(e))return e;if(!(Hl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(mo,"MathML is unsupported in this environment.");{const{default:r}=await gt(async()=>{const{default:s}=await import("./index-DjHKj0dH.js").then(a=>a.k);return{default:s}},__vite__mapDeps([0,1])),i=t.forceLegacyMathML||!Hl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Qi).map(s=>Wi(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(mo,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),vc=f(async(e,t)=>ke(await g0(e,t),t),"renderKatexSanitized"),Ji={getRows:s0,sanitizeText:ke,sanitizeTextOrArray:o0,hasBreaks:n0,splitBreaks:l0,lineBreakRegex:Qi,removeScript:_c,getUrl:c0,evaluate:Ge,getMax:u0,getMin:d0},m0=f(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),y0=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"),Lc=f(function(e,t,r,i){const s=y0(t,r,i);m0(e,s)},"configureSvgSize"),C0=f(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,o=s.height;z.info(`SVG bounds: ${a}x${o}`,s);let n=0,l=0;z.info(`Graph bounds: ${n}x${l}`,e),n=a+r*2,l=o+r*2,z.info(`Calculated bounds: ${n}x${l}`),Lc(t,l,n,i);const h=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),Ls={};function yo(e){return[...e.cssRules].map(t=>t.cssText).join(`
6
+ `)}f(yo,"cssStyleSheetToString");var x0=f((e,t,r,i)=>{let s="";return e in Ls&&Ls[e]?s=Ls[e]({...r,svgId:i}):z.warn(`No theme found for ${e}`),` & {
7
7
  font-family: ${r.fontFamily};
8
8
  font-size: ${r.fontSize};
9
9
  fill: ${r.textColor}
@@ -121,27 +121,27 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
121
121
  }
122
122
 
123
123
  ${t}
124
- `},"getStyles"),k0=f((e,t)=>{t!==void 0&&(Ls[e]=t)},"addStylesForDiagram"),T0=b0,Fc={};Um(Fc,{clear:()=>S0,getAccDescription:()=>v0,getAccTitle:()=>_0,getDiagramTitle:()=>F0,setAccDescription:()=>B0,setAccTitle:()=>w0,setDiagramTitle:()=>L0});var cn="",un="",dn="",pn=f(e=>ke(e,vt()),"sanitizeText"),S0=f(()=>{cn="",dn="",un=""},"clear"),w0=f(e=>{cn=pn(e).replace(/^\s+/g,"")},"setAccTitle"),_0=f(()=>cn,"getAccTitle"),B0=f(e=>{dn=pn(e).replace(/\n\s+/g,`
125
- `)},"setAccDescription"),v0=f(()=>dn,"getAccDescription"),L0=f(e=>{un=pn(e)},"setDiagramTitle"),F0=f(()=>un,"getDiagramTitle"),Yl=z,A0=ln,yt=vt,sv=bc,av=ni,fn=f(e=>ke(e,yt()),"sanitizeText"),E0=x0,M0=f(()=>Fc,"getCommonDb"),Ws={},zs=f((e,t,r)=>{var i;Ws[e]&&Yl.warn(`Diagram with id ${e} already registered. Overwriting.`),Ws[e]=t,r&&fc(e,r),k0(e,t.styles),(i=t.injectUtils)==null||i.call(t,Yl,A0,yt,fn,E0,M0(),()=>{})},"registerDiagram"),Co=f(e=>{if(e in Ws)return Ws[e];throw new $0(e)},"getDiagram"),si,$0=(si=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},f(si,"DiagramNotFoundError"),si),O0={value:()=>{}};function Ac(){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 Fs(r)}function Fs(e){this._=e}function I0(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");if(s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Fs.prototype=Ac.prototype={constructor:Fs,on:function(e,t){var r=this._,i=I0(e+"",r),s,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((s=(e=i[a]).type)&&(s=D0(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(s=(e=i[a]).type)r[s]=Ul(r[s],e.name,t);else if(t==null)for(s in r)r[s]=Ul(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Fs(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,a;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,s=a.length;i<s;++i)a[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],s=0,a=i.length;s<a;++s)i[s].value.apply(t,r)}};function D0(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function Ul(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=O0,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var xo="http://www.w3.org/1999/xhtml";const Gl={svg:"http://www.w3.org/2000/svg",xhtml:xo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ya(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Gl.hasOwnProperty(t)?{space:Gl[t],local:e}:e}function R0(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===xo&&t.documentElement.namespaceURI===xo?t.createElement(e):t.createElementNS(r,e)}}function P0(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ec(e){var t=ya(e);return(t.local?P0:R0)(t)}function N0(){}function gn(e){return e==null?N0:function(){return this.querySelector(e)}}function q0(e){typeof e!="function"&&(e=gn(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=new Array(o),l,h,c=0;c<o;++c)(l=a[c])&&(h=e.call(l,l.__data__,c,a))&&("__data__"in l&&(h.__data__=l.__data__),n[c]=h);return new ne(i,this._parents)}function W0(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function z0(){return[]}function Mc(e){return e==null?z0:function(){return this.querySelectorAll(e)}}function H0(e){return function(){return W0(e.apply(this,arguments))}}function Y0(e){typeof e=="function"?e=H0(e):e=Mc(e);for(var t=this._groups,r=t.length,i=[],s=[],a=0;a<r;++a)for(var o=t[a],n=o.length,l,h=0;h<n;++h)(l=o[h])&&(i.push(e.call(l,l.__data__,h,o)),s.push(l));return new ne(i,s)}function $c(e){return function(){return this.matches(e)}}function Oc(e){return function(t){return t.matches(e)}}var U0=Array.prototype.find;function G0(e){return function(){return U0.call(this.children,e)}}function j0(){return this.firstElementChild}function X0(e){return this.select(e==null?j0:G0(typeof e=="function"?e:Oc(e)))}var V0=Array.prototype.filter;function Z0(){return Array.from(this.children)}function K0(e){return function(){return V0.call(this.children,e)}}function Q0(e){return this.selectAll(e==null?Z0:K0(typeof e=="function"?e:Oc(e)))}function J0(e){typeof e!="function"&&(e=$c(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],l,h=0;h<o;++h)(l=a[h])&&e.call(l,l.__data__,h,a)&&n.push(l);return new ne(i,this._parents)}function Ic(e){return new Array(e.length)}function tC(){return new ne(this._enter||this._groups.map(Ic),this._parents)}function Hs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Hs.prototype={constructor:Hs,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 eC(e){return function(){return e}}function rC(e,t,r,i,s,a){for(var o=0,n,l=t.length,h=a.length;o<h;++o)(n=t[o])?(n.__data__=a[o],i[o]=n):r[o]=new Hs(e,a[o]);for(;o<l;++o)(n=t[o])&&(s[o]=n)}function iC(e,t,r,i,s,a,o){var n,l,h=new Map,c=t.length,u=a.length,p=new Array(c),d;for(n=0;n<c;++n)(l=t[n])&&(p[n]=d=o.call(l,l.__data__,n,t)+"",h.has(d)?s[n]=l:h.set(d,l));for(n=0;n<u;++n)d=o.call(e,a[n],n,a)+"",(l=h.get(d))?(i[n]=l,l.__data__=a[n],h.delete(d)):r[n]=new Hs(e,a[n]);for(n=0;n<c;++n)(l=t[n])&&h.get(p[n])===l&&(s[n]=l)}function sC(e){return e.__data__}function aC(e,t){if(!arguments.length)return Array.from(this,sC);var r=t?iC:rC,i=this._parents,s=this._groups;typeof e!="function"&&(e=eC(e));for(var a=s.length,o=new Array(a),n=new Array(a),l=new Array(a),h=0;h<a;++h){var c=i[h],u=s[h],p=u.length,d=oC(e.call(c,c&&c.__data__,h,i)),g=d.length,m=n[h]=new Array(g),y=o[h]=new Array(g),C=l[h]=new Array(p);r(c,u,m,y,C,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 ne(o,i),o._enter=n,o._exit=l,o}function oC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function nC(){return new ne(this._exit||this._groups.map(Ic),this._parents)}function lC(e,t,r){var i=this.enter(),s=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?a.remove():r(a),i&&s?i.merge(s).order():s}function hC(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,a=i.length,o=Math.min(s,a),n=new Array(s),l=0;l<o;++l)for(var h=r[l],c=i[l],u=h.length,p=n[l]=new Array(u),d,g=0;g<u;++g)(d=h[g]||c[g])&&(p[g]=d);for(;l<s;++l)n[l]=r[l];return new ne(n,this._parents)}function cC(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,a=i[s],o;--s>=0;)(o=i[s])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function uC(e){e||(e=dC);function t(u,p){return u&&p?e(u.__data__,p.__data__):!u-!p}for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a){for(var o=r[a],n=o.length,l=s[a]=new Array(n),h,c=0;c<n;++c)(h=o[c])&&(l[c]=h);l.sort(t)}return new ne(s,this._parents).order()}function dC(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function pC(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function fC(){return Array.from(this)}function gC(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length;s<a;++s){var o=i[s];if(o)return o}return null}function mC(){let e=0;for(const t of this)++e;return e}function yC(){return!this.node()}function CC(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],a=0,o=s.length,n;a<o;++a)(n=s[a])&&e.call(n,n.__data__,a,s);return this}function xC(e){return function(){this.removeAttribute(e)}}function bC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function kC(e,t){return function(){this.setAttribute(e,t)}}function TC(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function SC(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function wC(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 _C(e,t){var r=ya(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?bC:xC:typeof t=="function"?r.local?wC:SC:r.local?TC:kC)(r,t))}function Dc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function BC(e){return function(){this.style.removeProperty(e)}}function vC(e,t,r){return function(){this.style.setProperty(e,t,r)}}function LC(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function FC(e,t,r){return arguments.length>1?this.each((t==null?BC:typeof t=="function"?LC:vC)(e,t,r??"")):li(this.node(),e)}function li(e,t){return e.style.getPropertyValue(t)||Dc(e).getComputedStyle(e,null).getPropertyValue(t)}function AC(e){return function(){delete this[e]}}function EC(e,t){return function(){this[e]=t}}function MC(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function $C(e,t){return arguments.length>1?this.each((t==null?AC:typeof t=="function"?MC:EC)(e,t)):this.node()[e]}function Rc(e){return e.trim().split(/^|\s+/)}function mn(e){return e.classList||new Pc(e)}function Pc(e){this._node=e,this._names=Rc(e.getAttribute("class")||"")}Pc.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 Nc(e,t){for(var r=mn(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function qc(e,t){for(var r=mn(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function OC(e){return function(){Nc(this,e)}}function IC(e){return function(){qc(this,e)}}function DC(e,t){return function(){(t.apply(this,arguments)?Nc:qc)(this,e)}}function RC(e,t){var r=Rc(e+"");if(arguments.length<2){for(var i=mn(this.node()),s=-1,a=r.length;++s<a;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?DC:t?OC:IC)(r,t))}function PC(){this.textContent=""}function NC(e){return function(){this.textContent=e}}function qC(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function WC(e){return arguments.length?this.each(e==null?PC:(typeof e=="function"?qC:NC)(e)):this.node().textContent}function zC(){this.innerHTML=""}function HC(e){return function(){this.innerHTML=e}}function YC(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function UC(e){return arguments.length?this.each(e==null?zC:(typeof e=="function"?YC:HC)(e)):this.node().innerHTML}function GC(){this.nextSibling&&this.parentNode.appendChild(this)}function jC(){return this.each(GC)}function XC(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function VC(){return this.each(XC)}function ZC(e){var t=typeof e=="function"?e:Ec(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function KC(){return null}function QC(e,t){var r=typeof e=="function"?e:Ec(e),i=t==null?KC:typeof t=="function"?t:gn(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function JC(){var e=this.parentNode;e&&e.removeChild(this)}function tx(){return this.each(JC)}function ex(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function rx(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ix(e){return this.select(e?rx:ex)}function sx(e){return arguments.length?this.property("__data__",e):this.node().__data__}function ax(e){return function(t){e.call(this,t,this.__data__)}}function ox(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 nx(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,a;r<s;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function lx(e,t,r){return function(){var i=this.__on,s,a=ax(t);if(i){for(var o=0,n=i.length;o<n;++o)if((s=i[o]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=r),s.value=t;return}}this.addEventListener(e.type,a,r),s={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(s):this.__on=[s]}}function hx(e,t,r){var i=ox(e+""),s,a=i.length,o;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,h=n.length,c;l<h;++l)for(s=0,c=n[l];s<a;++s)if((o=i[s]).type===c.type&&o.name===c.name)return c.value}return}for(n=t?lx:nx,s=0;s<a;++s)this.each(n(i[s],t,r));return this}function Wc(e,t,r){var i=Dc(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function cx(e,t){return function(){return Wc(this,e,t)}}function ux(e,t){return function(){return Wc(this,e,t.apply(this,arguments))}}function dx(e,t){return this.each((typeof t=="function"?ux:cx)(e,t))}function*px(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length,o;s<a;++s)(o=i[s])&&(yield o)}var zc=[null];function ne(e,t){this._groups=e,this._parents=t}function ts(){return new ne([[document.documentElement]],zc)}function fx(){return this}ne.prototype=ts.prototype={constructor:ne,select:q0,selectAll:Y0,selectChild:X0,selectChildren:Q0,filter:J0,data:aC,enter:tC,exit:nC,join:lC,merge:hC,selection:fx,order:cC,sort:uC,call:pC,nodes:fC,node:gC,size:mC,empty:yC,each:CC,attr:_C,style:FC,property:$C,classed:RC,text:WC,html:UC,raise:jC,lower:VC,append:ZC,insert:QC,remove:tx,clone:ix,datum:sx,on:hx,dispatch:dx,[Symbol.iterator]:px};function ht(e){return typeof e=="string"?new ne([[document.querySelector(e)]],[document.documentElement]):new ne([[e]],zc)}function yn(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Hc(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function es(){}var zi=.7,Ys=1/zi,Ur="\\s*([+-]?\\d+)\\s*",Hi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ee="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",gx=/^#([0-9a-f]{3,8})$/,mx=new RegExp(`^rgb\\(${Ur},${Ur},${Ur}\\)$`),yx=new RegExp(`^rgb\\(${Ee},${Ee},${Ee}\\)$`),Cx=new RegExp(`^rgba\\(${Ur},${Ur},${Ur},${Hi}\\)$`),xx=new RegExp(`^rgba\\(${Ee},${Ee},${Ee},${Hi}\\)$`),bx=new RegExp(`^hsl\\(${Hi},${Ee},${Ee}\\)$`),kx=new RegExp(`^hsla\\(${Hi},${Ee},${Ee},${Hi}\\)$`),jl={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};yn(es,Yi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Xl,formatHex:Xl,formatHex8:Tx,formatHsl:Sx,formatRgb:Vl,toString:Vl});function Xl(){return this.rgb().formatHex()}function Tx(){return this.rgb().formatHex8()}function Sx(){return Yc(this).formatHsl()}function Vl(){return this.rgb().formatRgb()}function Yi(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=gx.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Zl(t):r===3?new se(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?gs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?gs(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=mx.exec(e))?new se(t[1],t[2],t[3],1):(t=yx.exec(e))?new se(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Cx.exec(e))?gs(t[1],t[2],t[3],t[4]):(t=xx.exec(e))?gs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=bx.exec(e))?Jl(t[1],t[2]/100,t[3]/100,1):(t=kx.exec(e))?Jl(t[1],t[2]/100,t[3]/100,t[4]):jl.hasOwnProperty(e)?Zl(jl[e]):e==="transparent"?new se(NaN,NaN,NaN,0):null}function Zl(e){return new se(e>>16&255,e>>8&255,e&255,1)}function gs(e,t,r,i){return i<=0&&(e=t=r=NaN),new se(e,t,r,i)}function wx(e){return e instanceof es||(e=Yi(e)),e?(e=e.rgb(),new se(e.r,e.g,e.b,e.opacity)):new se}function bo(e,t,r,i){return arguments.length===1?wx(e):new se(e,t,r,i??1)}function se(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}yn(se,bo,Hc(es,{brighter(e){return e=e==null?Ys:Math.pow(Ys,e),new se(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?zi:Math.pow(zi,e),new se(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new se(mr(this.r),mr(this.g),mr(this.b),Us(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:Kl,formatHex:Kl,formatHex8:_x,formatRgb:Ql,toString:Ql}));function Kl(){return`#${pr(this.r)}${pr(this.g)}${pr(this.b)}`}function _x(){return`#${pr(this.r)}${pr(this.g)}${pr(this.b)}${pr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ql(){const e=Us(this.opacity);return`${e===1?"rgb(":"rgba("}${mr(this.r)}, ${mr(this.g)}, ${mr(this.b)}${e===1?")":`, ${e})`}`}function Us(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function mr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function pr(e){return e=mr(e),(e<16?"0":"")+e.toString(16)}function Jl(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ce(e,t,r,i)}function Yc(e){if(e instanceof Ce)return new Ce(e.h,e.s,e.l,e.opacity);if(e instanceof es||(e=Yi(e)),!e)return new Ce;if(e instanceof Ce)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,n=a-s,l=(a+s)/2;return n?(t===a?o=(r-i)/n+(r<i)*6:r===a?o=(i-t)/n+2:o=(t-r)/n+4,n/=l<.5?a+s:2-a-s,o*=60):n=l>0&&l<1?0:o,new Ce(o,n,l,e.opacity)}function Bx(e,t,r,i){return arguments.length===1?Yc(e):new Ce(e,t,r,i??1)}function Ce(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}yn(Ce,Bx,Hc(es,{brighter(e){return e=e==null?Ys:Math.pow(Ys,e),new Ce(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?zi:Math.pow(zi,e),new Ce(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,s=2*r-i;return new se(Za(e>=240?e-240:e+120,s,i),Za(e,s,i),Za(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new Ce(th(this.h),ms(this.s),ms(this.l),Us(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=Us(this.opacity);return`${e===1?"hsl(":"hsla("}${th(this.h)}, ${ms(this.s)*100}%, ${ms(this.l)*100}%${e===1?")":`, ${e})`}`}}));function th(e){return e=(e||0)%360,e<0?e+360:e}function ms(e){return Math.max(0,Math.min(1,e||0))}function Za(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 Cn=e=>()=>e;function Uc(e,t){return function(r){return e+r*t}}function vx(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 ov(e,t){var r=t-e;return r?Uc(e,r>180||r<-180?r-360*Math.round(r/360):r):Cn(isNaN(e)?t:e)}function Lx(e){return(e=+e)==1?Gc:function(t,r){return r-t?vx(t,r,e):Cn(isNaN(t)?r:t)}}function Gc(e,t){var r=t-e;return r?Uc(e,r):Cn(isNaN(e)?t:e)}const eh=(function e(t){var r=Lx(t);function i(s,a){var o=r((s=bo(s)).r,(a=bo(a)).r),n=r(s.g,a.g),l=r(s.b,a.b),h=Gc(s.opacity,a.opacity);return function(c){return s.r=o(c),s.g=n(c),s.b=l(c),s.opacity=h(c),s+""}}return i.gamma=e,i})(1);function Ze(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var ko=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ka=new RegExp(ko.source,"g");function Fx(e){return function(){return e}}function Ax(e){return function(t){return e(t)+""}}function Ex(e,t){var r=ko.lastIndex=Ka.lastIndex=0,i,s,a,o=-1,n=[],l=[];for(e=e+"",t=t+"";(i=ko.exec(e))&&(s=Ka.exec(t));)(a=s.index)>r&&(a=t.slice(r,a),n[o]?n[o]+=a:n[++o]=a),(i=i[0])===(s=s[0])?n[o]?n[o]+=s:n[++o]=s:(n[++o]=null,l.push({i:o,x:Ze(i,s)})),r=Ka.lastIndex;return r<t.length&&(a=t.slice(r),n[o]?n[o]+=a:n[++o]=a),n.length<2?l[0]?Ax(l[0].x):Fx(t):(t=l.length,function(h){for(var c=0,u;c<t;++c)n[(u=l[c]).i]=u.x(h);return n.join("")})}var rh=180/Math.PI,To={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function jc(e,t,r,i,s,a){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:s,translateY:a,rotate:Math.atan2(t,e)*rh,skewX:Math.atan(l)*rh,scaleX:o,scaleY:n}}var ys;function Mx(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?To:jc(t.a,t.b,t.c,t.d,t.e,t.f)}function $x(e){return e==null||(ys||(ys=document.createElementNS("http://www.w3.org/2000/svg","g")),ys.setAttribute("transform",e),!(e=ys.transform.baseVal.consolidate()))?To:(e=e.matrix,jc(e.a,e.b,e.c,e.d,e.e,e.f))}function Xc(e,t,r,i){function s(h){return h.length?h.pop()+" ":""}function a(h,c,u,p,d,g){if(h!==u||c!==p){var m=d.push("translate(",null,t,null,r);g.push({i:m-4,x:Ze(h,u)},{i:m-2,x:Ze(c,p)})}else(u||p)&&d.push("translate("+u+t+p+r)}function o(h,c,u,p){h!==c?(h-c>180?c+=360:c-h>180&&(h+=360),p.push({i:u.push(s(u)+"rotate(",null,i)-2,x:Ze(h,c)})):c&&u.push(s(u)+"rotate("+c+i)}function n(h,c,u,p){h!==c?p.push({i:u.push(s(u)+"skewX(",null,i)-2,x:Ze(h,c)}):c&&u.push(s(u)+"skewX("+c+i)}function l(h,c,u,p,d,g){if(h!==u||c!==p){var m=d.push(s(d)+"scale(",null,",",null,")");g.push({i:m-4,x:Ze(h,u)},{i:m-2,x:Ze(c,p)})}else(u!==1||p!==1)&&d.push(s(d)+"scale("+u+","+p+")")}return function(h,c){var u=[],p=[];return h=e(h),c=e(c),a(h.translateX,h.translateY,c.translateX,c.translateY,u,p),o(h.rotate,c.rotate,u,p),n(h.skewX,c.skewX,u,p),l(h.scaleX,h.scaleY,c.scaleX,c.scaleY,u,p),h=c=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 Ox=Xc(Mx,"px, ","px)","deg)"),Ix=Xc($x,", ",")",")"),hi=0,Fi=0,bi=0,Vc=1e3,Gs,Ai,js=0,br=0,Ca=0,Ui=typeof performance=="object"&&performance.now?performance:Date,Zc=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function xn(){return br||(Zc(Dx),br=Ui.now()+Ca)}function Dx(){br=0}function Xs(){this._call=this._time=this._next=null}Xs.prototype=Kc.prototype={constructor:Xs,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?xn():+r)+(t==null?0:+t),!this._next&&Ai!==this&&(Ai?Ai._next=this:Gs=this,Ai=this),this._call=e,this._time=r,So()},stop:function(){this._call&&(this._call=null,this._time=1/0,So())}};function Kc(e,t,r){var i=new Xs;return i.restart(e,t,r),i}function Rx(){xn(),++hi;for(var e=Gs,t;e;)(t=br-e._time)>=0&&e._call.call(void 0,t),e=e._next;--hi}function ih(){br=(js=Ui.now())+Ca,hi=Fi=0;try{Rx()}finally{hi=0,Nx(),br=0}}function Px(){var e=Ui.now(),t=e-js;t>Vc&&(Ca-=t,js=e)}function Nx(){for(var e,t=Gs,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:Gs=r);Ai=e,So(i)}function So(e){if(!hi){Fi&&(Fi=clearTimeout(Fi));var t=e-br;t>24?(e<1/0&&(Fi=setTimeout(ih,e-Ui.now()-Ca)),bi&&(bi=clearInterval(bi))):(bi||(js=Ui.now(),bi=setInterval(Px,Vc)),hi=1,Zc(ih))}}function sh(e,t,r){var i=new Xs;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var qx=Ac("start","end","cancel","interrupt"),Wx=[],Qc=0,ah=1,wo=2,As=3,oh=4,_o=5,Es=6;function xa(e,t,r,i,s,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;zx(e,r,{name:t,index:i,group:s,on:qx,tween:Wx,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Qc})}function bn(e,t){var r=Se(e,t);if(r.state>Qc)throw new Error("too late; already scheduled");return r}function De(e,t){var r=Se(e,t);if(r.state>As)throw new Error("too late; already running");return r}function Se(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function zx(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=Kc(a,0,r.time);function a(h){r.state=ah,r.timer.restart(o,r.delay,r.time),r.delay<=h&&o(h-r.delay)}function o(h){var c,u,p,d;if(r.state!==ah)return l();for(c in i)if(d=i[c],d.name===r.name){if(d.state===As)return sh(o);d.state===oh?(d.state=Es,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[c]):+c<t&&(d.state=Es,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[c])}if(sh(function(){r.state===As&&(r.state=oh,r.timer.restart(n,r.delay,r.time),n(h))}),r.state=wo,r.on.call("start",e,e.__data__,r.index,r.group),r.state===wo){for(r.state=As,s=new Array(p=r.tween.length),c=0,u=-1;c<p;++c)(d=r.tween[c].value.call(e,e.__data__,r.index,r.group))&&(s[++u]=d);s.length=u+1}}function n(h){for(var c=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(l),r.state=_o,1),u=-1,p=s.length;++u<p;)s[u].call(e,c);r.state===_o&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Es,r.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function Hx(e,t){var r=e.__transition,i,s,a=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){a=!1;continue}s=i.state>wo&&i.state<_o,i.state=Es,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function Yx(e){return this.each(function(){Hx(this,e)})}function Ux(e,t){var r,i;return function(){var s=De(this,e),a=s.tween;if(a!==r){i=r=a;for(var o=0,n=i.length;o<n;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}s.tween=i}}function Gx(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var a=De(this,e),o=a.tween;if(o!==i){s=(i=o).slice();for(var n={name:t,value:r},l=0,h=s.length;l<h;++l)if(s[l].name===t){s[l]=n;break}l===h&&s.push(n)}a.tween=s}}function jx(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Se(this.node(),r).tween,s=0,a=i.length,o;s<a;++s)if((o=i[s]).name===e)return o.value;return null}return this.each((t==null?Ux:Gx)(r,e,t))}function kn(e,t,r){var i=e._id;return e.each(function(){var s=De(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return Se(s,i).value[t]}}function Jc(e,t){var r;return(typeof t=="number"?Ze:t instanceof Yi?eh:(r=Yi(t))?(t=r,eh):Ex)(e,t)}function Xx(e){return function(){this.removeAttribute(e)}}function Vx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Zx(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttribute(e);return o===s?null:o===i?a:a=t(i=o,r)}}function Kx(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===s?null:o===i?a:a=t(i=o,r)}}function Qx(e,t,r){var i,s,a;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===s?a:(s=l,a=t(i=o,n)))}}function Jx(e,t,r){var i,s,a;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===s?a:(s=l,a=t(i=o,n)))}}function tb(e,t){var r=ya(e),i=r==="transform"?Ix:Jc;return this.attrTween(e,typeof t=="function"?(r.local?Jx:Qx)(r,i,kn(this,"attr."+e,t)):t==null?(r.local?Vx:Xx)(r):(r.local?Kx:Zx)(r,i,t))}function eb(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function rb(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function ib(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&rb(e,a)),r}return s._value=t,s}function sb(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&eb(e,a)),r}return s._value=t,s}function ab(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=ya(e);return this.tween(r,(i.local?ib:sb)(i,t))}function ob(e,t){return function(){bn(this,e).delay=+t.apply(this,arguments)}}function nb(e,t){return t=+t,function(){bn(this,e).delay=t}}function lb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ob:nb)(t,e)):Se(this.node(),t).delay}function hb(e,t){return function(){De(this,e).duration=+t.apply(this,arguments)}}function cb(e,t){return t=+t,function(){De(this,e).duration=t}}function ub(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?hb:cb)(t,e)):Se(this.node(),t).duration}function db(e,t){if(typeof t!="function")throw new Error;return function(){De(this,e).ease=t}}function pb(e){var t=this._id;return arguments.length?this.each(db(t,e)):Se(this.node(),t).ease}function fb(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;De(this,e).ease=r}}function gb(e){if(typeof e!="function")throw new Error;return this.each(fb(this._id,e))}function mb(e){typeof e!="function"&&(e=$c(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],l,h=0;h<o;++h)(l=a[h])&&e.call(l,l.__data__,h,a)&&n.push(l);return new Ye(i,this._parents,this._name,this._id)}function yb(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,a=Math.min(i,s),o=new Array(i),n=0;n<a;++n)for(var l=t[n],h=r[n],c=l.length,u=o[n]=new Array(c),p,d=0;d<c;++d)(p=l[d]||h[d])&&(u[d]=p);for(;n<i;++n)o[n]=t[n];return new Ye(o,this._parents,this._name,this._id)}function Cb(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 xb(e,t,r){var i,s,a=Cb(t)?bn:De;return function(){var o=a(this,e),n=o.on;n!==i&&(s=(i=n).copy()).on(t,r),o.on=s}}function bb(e,t){var r=this._id;return arguments.length<2?Se(this.node(),r).on.on(e):this.each(xb(r,e,t))}function kb(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Tb(){return this.on("end.remove",kb(this._id))}function Sb(e){var t=this._name,r=this._id;typeof e!="function"&&(e=gn(e));for(var i=this._groups,s=i.length,a=new Array(s),o=0;o<s;++o)for(var n=i[o],l=n.length,h=a[o]=new Array(l),c,u,p=0;p<l;++p)(c=n[p])&&(u=e.call(c,c.__data__,p,n))&&("__data__"in c&&(u.__data__=c.__data__),h[p]=u,xa(h[p],t,r,p,h,Se(c,r)));return new Ye(a,this._parents,t,r)}function wb(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Mc(e));for(var i=this._groups,s=i.length,a=[],o=[],n=0;n<s;++n)for(var l=i[n],h=l.length,c,u=0;u<h;++u)if(c=l[u]){for(var p=e.call(c,c.__data__,u,l),d,g=Se(c,r),m=0,y=p.length;m<y;++m)(d=p[m])&&xa(d,t,r,m,p,g);a.push(p),o.push(c)}return new Ye(a,o,t,r)}var _b=ts.prototype.constructor;function Bb(){return new _b(this._groups,this._parents)}function vb(e,t){var r,i,s;return function(){var a=li(this,e),o=(this.style.removeProperty(e),li(this,e));return a===o?null:a===r&&o===i?s:s=t(r=a,i=o)}}function tu(e){return function(){this.style.removeProperty(e)}}function Lb(e,t,r){var i,s=r+"",a;return function(){var o=li(this,e);return o===s?null:o===i?a:a=t(i=o,r)}}function Fb(e,t,r){var i,s,a;return function(){var o=li(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),li(this,e))),o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n))}}function Ab(e,t){var r,i,s,a="style."+t,o="end."+a,n;return function(){var l=De(this,e),h=l.on,c=l.value[a]==null?n||(n=tu(t)):void 0;(h!==r||s!==c)&&(i=(r=h).copy()).on(o,s=c),l.on=i}}function Eb(e,t,r){var i=(e+="")=="transform"?Ox:Jc;return t==null?this.styleTween(e,vb(e,i)).on("end.style."+e,tu(e)):typeof t=="function"?this.styleTween(e,Fb(e,i,kn(this,"style."+e,t))).each(Ab(this._id,e)):this.styleTween(e,Lb(e,i,t),r).on("end.style."+e,null)}function Mb(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function $b(e,t,r){var i,s;function a(){var o=t.apply(this,arguments);return o!==s&&(i=(s=o)&&Mb(e,o,r)),i}return a._value=t,a}function Ob(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,$b(e,t,r??""))}function Ib(e){return function(){this.textContent=e}}function Db(e){return function(){var t=e(this);this.textContent=t??""}}function Rb(e){return this.tween("text",typeof e=="function"?Db(kn(this,"text",e)):Ib(e==null?"":e+""))}function Pb(e){return function(t){this.textContent=e.call(this,t)}}function Nb(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&Pb(s)),t}return i._value=e,i}function qb(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,Nb(e))}function Wb(){for(var e=this._name,t=this._id,r=eu(),i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,l,h=0;h<n;++h)if(l=o[h]){var c=Se(l,t);xa(l,e,r,h,o,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ye(i,this._parents,e,r)}function zb(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(a,o){var n={value:o},l={value:function(){--s===0&&a()}};r.each(function(){var h=De(this,i),c=h.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(l)),h.on=t}),s===0&&a()})}var Hb=0;function Ye(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function eu(){return++Hb}var Ne=ts.prototype;Ye.prototype={constructor:Ye,select:Sb,selectAll:wb,selectChild:Ne.selectChild,selectChildren:Ne.selectChildren,filter:mb,merge:yb,selection:Bb,transition:Wb,call:Ne.call,nodes:Ne.nodes,node:Ne.node,size:Ne.size,empty:Ne.empty,each:Ne.each,on:bb,attr:tb,attrTween:ab,style:Eb,styleTween:Ob,text:Rb,textTween:qb,remove:Tb,tween:jx,delay:lb,duration:ub,ease:pb,easeVarying:gb,end:zb,[Symbol.iterator]:Ne[Symbol.iterator]};function Yb(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Ub={time:null,delay:0,duration:250,ease:Yb};function Gb(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 jb(e){var t,r;e instanceof Ye?(t=e._id,e=e._name):(t=eu(),(r=Ub).time=xn(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,l,h=0;h<n;++h)(l=o[h])&&xa(l,e,t,h,o,r||Gb(l,t));return new Ye(i,this._parents,e,t)}ts.prototype.interrupt=Yx;ts.prototype.transition=jb;const Bo=Math.PI,vo=2*Bo,cr=1e-6,Xb=vo-cr;function ru(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Vb(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ru;const r=10**t;return function(i){this._+=i[0];for(let s=1,a=i.length;s<a;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class Zb{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?ru:Vb(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,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,a,o){this._append`C${+t},${+r},${+i},${+s},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,i,s,a){if(t=+t,r=+r,i=+i,s=+s,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,n=this._y1,l=i-t,h=s-r,c=o-t,u=n-r,p=c*c+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>cr)if(!(Math.abs(u*l-h*c)>cr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-o,g=s-n,m=l*l+h*h,y=d*d+g*g,C=Math.sqrt(m),b=Math.sqrt(p),k=a*Math.tan((Bo-Math.acos((m+p-y)/(2*C*b)))/2),_=k/b,w=k/C;Math.abs(_-1)>cr&&this._append`L${t+_*c},${r+_*u}`,this._append`A${a},${a},0,0,${+(u*d>c*g)},${this._x1=t+w*l},${this._y1=r+w*h}`}}arc(t,r,i,s,a,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),h=t+n,c=r+l,u=1^o,p=o?s-a:a-s;this._x1===null?this._append`M${h},${c}`:(Math.abs(this._x1-h)>cr||Math.abs(this._y1-c)>cr)&&this._append`L${h},${c}`,i&&(p<0&&(p=p%vo+vo),p>Xb?this._append`A${i},${i},0,1,${u},${t-n},${r-l}A${i},${i},0,1,${u},${this._x1=h},${this._y1=c}`:p>cr&&this._append`A${i},${i},0,${+(p>=Bo)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function Ir(e){return function(){return e}}const nv=Math.abs,lv=Math.atan2,hv=Math.cos,cv=Math.max,uv=Math.min,dv=Math.sin,pv=Math.sqrt,nh=1e-12,Tn=Math.PI,lh=Tn/2,fv=2*Tn;function gv(e){return e>1?0:e<-1?Tn:Math.acos(e)}function mv(e){return e>=1?lh:e<=-1?-lh:Math.asin(e)}function Kb(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 Zb(t)}function Qb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function iu(e){this._context=e}iu.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 Ni(e){return new iu(e)}function Jb(e){return e[0]}function tk(e){return e[1]}function ek(e,t){var r=Ir(!0),i=null,s=Ni,a=null,o=Kb(n);e=typeof e=="function"?e:e===void 0?Jb:Ir(e),t=typeof t=="function"?t:t===void 0?tk:Ir(t);function n(l){var h,c=(l=Qb(l)).length,u,p=!1,d;for(i==null&&(a=s(d=o())),h=0;h<=c;++h)!(h<c&&r(u=l[h],h,l))===p&&((p=!p)?a.lineStart():a.lineEnd()),p&&a.point(+e(u,h,l),+t(u,h,l));if(d)return a=null,d+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:Ir(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Ir(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Ir(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(a=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=a=null:a=s(i=l),n):i},n}class su{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 au(e){return new su(e,!0)}function ou(e){return new su(e,!1)}function tr(){}function Vs(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 ba(e){this._context=e}ba.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:Vs(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:Vs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Lo(e){return new ba(e)}function nu(e){this._context=e}nu.prototype={areaStart:tr,areaEnd:tr,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:Vs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function rk(e){return new nu(e)}function lu(e){this._context=e}lu.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:Vs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ik(e){return new lu(e)}function hu(e,t){this._basis=new ba(e),this._beta=t}hu.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],s=t[0],a=e[r]-i,o=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*a),this._beta*t[n]+(1-this._beta)*(s+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const sk=(function e(t){function r(i){return t===1?new ba(i):new hu(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Zs(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 Sn(e,t){this._context=e,this._k=(1-t)/6}Sn.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:Zs(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:Zs(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 cu=(function e(t){function r(i){return new Sn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function wn(e,t){this._context=e,this._k=(1-t)/6}wn.prototype={areaStart:tr,areaEnd:tr,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:Zs(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 ak=(function e(t){function r(i){return new wn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function _n(e,t){this._context=e,this._k=(1-t)/6}_n.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:Zs(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 ok=(function e(t){function r(i){return new _n(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Bn(e,t,r){var i=e._x1,s=e._y1,a=e._x2,o=e._y2;if(e._l01_a>nh){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,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>nh){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*h+e._x1*e._l23_2a-t*e._l12_2a)/c,o=(o*h+e._y1*e._l23_2a-r*e._l12_2a)/c}e._context.bezierCurveTo(i,s,a,o,e._x2,e._y2)}function uu(e,t){this._context=e,this._alpha=t}uu.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:Bn(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 du=(function e(t){function r(i){return t?new uu(i,t):new Sn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function pu(e,t){this._context=e,this._alpha=t}pu.prototype={areaStart:tr,areaEnd:tr,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:Bn(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 nk=(function e(t){function r(i){return t?new pu(i,t):new wn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function fu(e,t){this._context=e,this._alpha=t}fu.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:Bn(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 lk=(function e(t){function r(i){return t?new fu(i,t):new _n(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function gu(e){this._context=e}gu.prototype={areaStart:tr,areaEnd:tr,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 hk(e){return new gu(e)}function hh(e){return e<0?-1:1}function ch(e,t,r){var i=e._x1-e._x0,s=t-e._x1,a=(e._y1-e._y0)/(i||s<0&&-0),o=(r-e._y1)/(s||i<0&&-0),n=(a*s+o*i)/(i+s);return(hh(a)+hh(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(n))||0}function uh(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Qa(e,t,r){var i=e._x0,s=e._y0,a=e._x1,o=e._y1,n=(a-i)/3;e._context.bezierCurveTo(i+n,s+n*t,a-n,o-n*r,a,o)}function Ks(e){this._context=e}Ks.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:Qa(this,this._t0,uh(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,Qa(this,uh(this,r=ch(this,e,t)),r);break;default:Qa(this,this._t0,r=ch(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function mu(e){this._context=new yu(e)}(mu.prototype=Object.create(Ks.prototype)).point=function(e,t){Ks.prototype.point.call(this,t,e)};function yu(e){this._context=e}yu.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,s,a){this._context.bezierCurveTo(t,e,i,r,a,s)}};function Cu(e){return new Ks(e)}function xu(e){return new mu(e)}function bu(e){this._context=e}bu.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=dh(e),s=dh(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],s[0][a],i[1][a],s[1][a],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 dh(e){var t,r=e.length-1,i,s=new Array(r),a=new Array(r),o=new Array(r);for(s[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/a[t-1],a[t]-=i,o[t]-=i*o[t-1];for(s[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)s[t]=(o[t]-s[t+1])/a[t];for(a[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-s[t+1];return[s,a]}function ku(e){return new bu(e)}function ka(e,t){this._context=e,this._t=t}ka.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 Tu(e){return new ka(e,.5)}function Su(e){return new ka(e,0)}function wu(e){return new ka(e,1)}function Ei(e,t,r){this.k=e,this.x=t,this.y=r}Ei.prototype={constructor:Ei,scale:function(e){return e===1?this:new Ei(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ei(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+")"}};Ei.prototype;var ck=f(e=>{var s;const{securityLevel:t}=yt();let r=ht("body");if(t==="sandbox"){const o=((s=ht(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=ht(o.body)}return r.select(`#${e}`)},"selectSvgElement");function vn(e){return typeof e>"u"||e===null}f(vn,"isNothing");function _u(e){return typeof e=="object"&&e!==null}f(_u,"isObject");function Bu(e){return Array.isArray(e)?e:vn(e)?[]:[e]}f(Bu,"toArray");function vu(e,t){var r,i,s,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)s=a[r],e[s]=t[s];return e}f(vu,"extend");function Lu(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}f(Lu,"repeat");function Fu(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}f(Fu,"isNegativeZero");var uk=vn,dk=_u,pk=Bu,fk=Lu,gk=Fu,mk=vu,Rt={isNothing:uk,isObject:dk,toArray:pk,repeat:fk,isNegativeZero:gk,extend:mk};function Ln(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+=`
124
+ `},"getStyles"),b0=f((e,t)=>{t!==void 0&&(Ls[e]=t)},"addStylesForDiagram"),k0=x0,Fc={};Ym(Fc,{clear:()=>T0,getAccDescription:()=>B0,getAccTitle:()=>w0,getDiagramTitle:()=>L0,setAccDescription:()=>_0,setAccTitle:()=>S0,setDiagramTitle:()=>v0});var cn="",un="",dn="",pn=f(e=>ke(e,vt()),"sanitizeText"),T0=f(()=>{cn="",dn="",un=""},"clear"),S0=f(e=>{cn=pn(e).replace(/^\s+/g,"")},"setAccTitle"),w0=f(()=>cn,"getAccTitle"),_0=f(e=>{dn=pn(e).replace(/\n\s+/g,`
125
+ `)},"setAccDescription"),B0=f(()=>dn,"getAccDescription"),v0=f(e=>{un=pn(e)},"setDiagramTitle"),L0=f(()=>un,"getDiagramTitle"),Yl=z,F0=ln,yt=vt,iv=bc,sv=ni,fn=f(e=>ke(e,yt()),"sanitizeText"),A0=C0,E0=f(()=>Fc,"getCommonDb"),Ws={},zs=f((e,t,r)=>{var i;Ws[e]&&Yl.warn(`Diagram with id ${e} already registered. Overwriting.`),Ws[e]=t,r&&fc(e,r),b0(e,t.styles),(i=t.injectUtils)==null||i.call(t,Yl,F0,yt,fn,A0,E0(),()=>{})},"registerDiagram"),Co=f(e=>{if(e in Ws)return Ws[e];throw new M0(e)},"getDiagram"),si,M0=(si=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},f(si,"DiagramNotFoundError"),si),$0={value:()=>{}};function Ac(){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 Fs(r)}function Fs(e){this._=e}function O0(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");if(s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Fs.prototype=Ac.prototype={constructor:Fs,on:function(e,t){var r=this._,i=O0(e+"",r),s,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((s=(e=i[a]).type)&&(s=I0(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(s=(e=i[a]).type)r[s]=Ul(r[s],e.name,t);else if(t==null)for(s in r)r[s]=Ul(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Fs(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,a;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,s=a.length;i<s;++i)a[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],s=0,a=i.length;s<a;++s)i[s].value.apply(t,r)}};function I0(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function Ul(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=$0,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var xo="http://www.w3.org/1999/xhtml";const Gl={svg:"http://www.w3.org/2000/svg",xhtml:xo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ya(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Gl.hasOwnProperty(t)?{space:Gl[t],local:e}:e}function D0(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===xo&&t.documentElement.namespaceURI===xo?t.createElement(e):t.createElementNS(r,e)}}function R0(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ec(e){var t=ya(e);return(t.local?R0:D0)(t)}function P0(){}function gn(e){return e==null?P0:function(){return this.querySelector(e)}}function N0(e){typeof e!="function"&&(e=gn(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=new Array(o),l,h,c=0;c<o;++c)(l=a[c])&&(h=e.call(l,l.__data__,c,a))&&("__data__"in l&&(h.__data__=l.__data__),n[c]=h);return new ne(i,this._parents)}function q0(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function W0(){return[]}function Mc(e){return e==null?W0:function(){return this.querySelectorAll(e)}}function z0(e){return function(){return q0(e.apply(this,arguments))}}function H0(e){typeof e=="function"?e=z0(e):e=Mc(e);for(var t=this._groups,r=t.length,i=[],s=[],a=0;a<r;++a)for(var o=t[a],n=o.length,l,h=0;h<n;++h)(l=o[h])&&(i.push(e.call(l,l.__data__,h,o)),s.push(l));return new ne(i,s)}function $c(e){return function(){return this.matches(e)}}function Oc(e){return function(t){return t.matches(e)}}var Y0=Array.prototype.find;function U0(e){return function(){return Y0.call(this.children,e)}}function G0(){return this.firstElementChild}function j0(e){return this.select(e==null?G0:U0(typeof e=="function"?e:Oc(e)))}var X0=Array.prototype.filter;function V0(){return Array.from(this.children)}function Z0(e){return function(){return X0.call(this.children,e)}}function K0(e){return this.selectAll(e==null?V0:Z0(typeof e=="function"?e:Oc(e)))}function Q0(e){typeof e!="function"&&(e=$c(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],l,h=0;h<o;++h)(l=a[h])&&e.call(l,l.__data__,h,a)&&n.push(l);return new ne(i,this._parents)}function Ic(e){return new Array(e.length)}function J0(){return new ne(this._enter||this._groups.map(Ic),this._parents)}function Hs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Hs.prototype={constructor:Hs,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 tC(e){return function(){return e}}function eC(e,t,r,i,s,a){for(var o=0,n,l=t.length,h=a.length;o<h;++o)(n=t[o])?(n.__data__=a[o],i[o]=n):r[o]=new Hs(e,a[o]);for(;o<l;++o)(n=t[o])&&(s[o]=n)}function rC(e,t,r,i,s,a,o){var n,l,h=new Map,c=t.length,u=a.length,p=new Array(c),d;for(n=0;n<c;++n)(l=t[n])&&(p[n]=d=o.call(l,l.__data__,n,t)+"",h.has(d)?s[n]=l:h.set(d,l));for(n=0;n<u;++n)d=o.call(e,a[n],n,a)+"",(l=h.get(d))?(i[n]=l,l.__data__=a[n],h.delete(d)):r[n]=new Hs(e,a[n]);for(n=0;n<c;++n)(l=t[n])&&h.get(p[n])===l&&(s[n]=l)}function iC(e){return e.__data__}function sC(e,t){if(!arguments.length)return Array.from(this,iC);var r=t?rC:eC,i=this._parents,s=this._groups;typeof e!="function"&&(e=tC(e));for(var a=s.length,o=new Array(a),n=new Array(a),l=new Array(a),h=0;h<a;++h){var c=i[h],u=s[h],p=u.length,d=aC(e.call(c,c&&c.__data__,h,i)),g=d.length,m=n[h]=new Array(g),y=o[h]=new Array(g),C=l[h]=new Array(p);r(c,u,m,y,C,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 ne(o,i),o._enter=n,o._exit=l,o}function aC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function oC(){return new ne(this._exit||this._groups.map(Ic),this._parents)}function nC(e,t,r){var i=this.enter(),s=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?a.remove():r(a),i&&s?i.merge(s).order():s}function lC(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,a=i.length,o=Math.min(s,a),n=new Array(s),l=0;l<o;++l)for(var h=r[l],c=i[l],u=h.length,p=n[l]=new Array(u),d,g=0;g<u;++g)(d=h[g]||c[g])&&(p[g]=d);for(;l<s;++l)n[l]=r[l];return new ne(n,this._parents)}function hC(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,a=i[s],o;--s>=0;)(o=i[s])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function cC(e){e||(e=uC);function t(u,p){return u&&p?e(u.__data__,p.__data__):!u-!p}for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a){for(var o=r[a],n=o.length,l=s[a]=new Array(n),h,c=0;c<n;++c)(h=o[c])&&(l[c]=h);l.sort(t)}return new ne(s,this._parents).order()}function uC(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function dC(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function pC(){return Array.from(this)}function fC(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length;s<a;++s){var o=i[s];if(o)return o}return null}function gC(){let e=0;for(const t of this)++e;return e}function mC(){return!this.node()}function yC(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],a=0,o=s.length,n;a<o;++a)(n=s[a])&&e.call(n,n.__data__,a,s);return this}function CC(e){return function(){this.removeAttribute(e)}}function xC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function bC(e,t){return function(){this.setAttribute(e,t)}}function kC(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function TC(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function SC(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 wC(e,t){var r=ya(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?xC:CC:typeof t=="function"?r.local?SC:TC:r.local?kC:bC)(r,t))}function Dc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function _C(e){return function(){this.style.removeProperty(e)}}function BC(e,t,r){return function(){this.style.setProperty(e,t,r)}}function vC(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function LC(e,t,r){return arguments.length>1?this.each((t==null?_C:typeof t=="function"?vC:BC)(e,t,r??"")):li(this.node(),e)}function li(e,t){return e.style.getPropertyValue(t)||Dc(e).getComputedStyle(e,null).getPropertyValue(t)}function FC(e){return function(){delete this[e]}}function AC(e,t){return function(){this[e]=t}}function EC(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function MC(e,t){return arguments.length>1?this.each((t==null?FC:typeof t=="function"?EC:AC)(e,t)):this.node()[e]}function Rc(e){return e.trim().split(/^|\s+/)}function mn(e){return e.classList||new Pc(e)}function Pc(e){this._node=e,this._names=Rc(e.getAttribute("class")||"")}Pc.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 Nc(e,t){for(var r=mn(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function qc(e,t){for(var r=mn(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function $C(e){return function(){Nc(this,e)}}function OC(e){return function(){qc(this,e)}}function IC(e,t){return function(){(t.apply(this,arguments)?Nc:qc)(this,e)}}function DC(e,t){var r=Rc(e+"");if(arguments.length<2){for(var i=mn(this.node()),s=-1,a=r.length;++s<a;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?IC:t?$C:OC)(r,t))}function RC(){this.textContent=""}function PC(e){return function(){this.textContent=e}}function NC(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function qC(e){return arguments.length?this.each(e==null?RC:(typeof e=="function"?NC:PC)(e)):this.node().textContent}function WC(){this.innerHTML=""}function zC(e){return function(){this.innerHTML=e}}function HC(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function YC(e){return arguments.length?this.each(e==null?WC:(typeof e=="function"?HC:zC)(e)):this.node().innerHTML}function UC(){this.nextSibling&&this.parentNode.appendChild(this)}function GC(){return this.each(UC)}function jC(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function XC(){return this.each(jC)}function VC(e){var t=typeof e=="function"?e:Ec(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function ZC(){return null}function KC(e,t){var r=typeof e=="function"?e:Ec(e),i=t==null?ZC:typeof t=="function"?t:gn(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function QC(){var e=this.parentNode;e&&e.removeChild(this)}function JC(){return this.each(QC)}function tx(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ex(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function rx(e){return this.select(e?ex:tx)}function ix(e){return arguments.length?this.property("__data__",e):this.node().__data__}function sx(e){return function(t){e.call(this,t,this.__data__)}}function ax(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 ox(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,a;r<s;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function nx(e,t,r){return function(){var i=this.__on,s,a=sx(t);if(i){for(var o=0,n=i.length;o<n;++o)if((s=i[o]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=r),s.value=t;return}}this.addEventListener(e.type,a,r),s={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(s):this.__on=[s]}}function lx(e,t,r){var i=ax(e+""),s,a=i.length,o;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,h=n.length,c;l<h;++l)for(s=0,c=n[l];s<a;++s)if((o=i[s]).type===c.type&&o.name===c.name)return c.value}return}for(n=t?nx:ox,s=0;s<a;++s)this.each(n(i[s],t,r));return this}function Wc(e,t,r){var i=Dc(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function hx(e,t){return function(){return Wc(this,e,t)}}function cx(e,t){return function(){return Wc(this,e,t.apply(this,arguments))}}function ux(e,t){return this.each((typeof t=="function"?cx:hx)(e,t))}function*dx(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length,o;s<a;++s)(o=i[s])&&(yield o)}var zc=[null];function ne(e,t){this._groups=e,this._parents=t}function ts(){return new ne([[document.documentElement]],zc)}function px(){return this}ne.prototype=ts.prototype={constructor:ne,select:N0,selectAll:H0,selectChild:j0,selectChildren:K0,filter:Q0,data:sC,enter:J0,exit:oC,join:nC,merge:lC,selection:px,order:hC,sort:cC,call:dC,nodes:pC,node:fC,size:gC,empty:mC,each:yC,attr:wC,style:LC,property:MC,classed:DC,text:qC,html:YC,raise:GC,lower:XC,append:VC,insert:KC,remove:JC,clone:rx,datum:ix,on:lx,dispatch:ux,[Symbol.iterator]:dx};function ht(e){return typeof e=="string"?new ne([[document.querySelector(e)]],[document.documentElement]):new ne([[e]],zc)}function yn(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Hc(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function es(){}var zi=.7,Ys=1/zi,Ur="\\s*([+-]?\\d+)\\s*",Hi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ee="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fx=/^#([0-9a-f]{3,8})$/,gx=new RegExp(`^rgb\\(${Ur},${Ur},${Ur}\\)$`),mx=new RegExp(`^rgb\\(${Ee},${Ee},${Ee}\\)$`),yx=new RegExp(`^rgba\\(${Ur},${Ur},${Ur},${Hi}\\)$`),Cx=new RegExp(`^rgba\\(${Ee},${Ee},${Ee},${Hi}\\)$`),xx=new RegExp(`^hsl\\(${Hi},${Ee},${Ee}\\)$`),bx=new RegExp(`^hsla\\(${Hi},${Ee},${Ee},${Hi}\\)$`),jl={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};yn(es,Yi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Xl,formatHex:Xl,formatHex8:kx,formatHsl:Tx,formatRgb:Vl,toString:Vl});function Xl(){return this.rgb().formatHex()}function kx(){return this.rgb().formatHex8()}function Tx(){return Yc(this).formatHsl()}function Vl(){return this.rgb().formatRgb()}function Yi(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=fx.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Zl(t):r===3?new se(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?gs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?gs(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=gx.exec(e))?new se(t[1],t[2],t[3],1):(t=mx.exec(e))?new se(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=yx.exec(e))?gs(t[1],t[2],t[3],t[4]):(t=Cx.exec(e))?gs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=xx.exec(e))?Jl(t[1],t[2]/100,t[3]/100,1):(t=bx.exec(e))?Jl(t[1],t[2]/100,t[3]/100,t[4]):jl.hasOwnProperty(e)?Zl(jl[e]):e==="transparent"?new se(NaN,NaN,NaN,0):null}function Zl(e){return new se(e>>16&255,e>>8&255,e&255,1)}function gs(e,t,r,i){return i<=0&&(e=t=r=NaN),new se(e,t,r,i)}function Sx(e){return e instanceof es||(e=Yi(e)),e?(e=e.rgb(),new se(e.r,e.g,e.b,e.opacity)):new se}function bo(e,t,r,i){return arguments.length===1?Sx(e):new se(e,t,r,i??1)}function se(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}yn(se,bo,Hc(es,{brighter(e){return e=e==null?Ys:Math.pow(Ys,e),new se(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?zi:Math.pow(zi,e),new se(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new se(mr(this.r),mr(this.g),mr(this.b),Us(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:Kl,formatHex:Kl,formatHex8:wx,formatRgb:Ql,toString:Ql}));function Kl(){return`#${pr(this.r)}${pr(this.g)}${pr(this.b)}`}function wx(){return`#${pr(this.r)}${pr(this.g)}${pr(this.b)}${pr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ql(){const e=Us(this.opacity);return`${e===1?"rgb(":"rgba("}${mr(this.r)}, ${mr(this.g)}, ${mr(this.b)}${e===1?")":`, ${e})`}`}function Us(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function mr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function pr(e){return e=mr(e),(e<16?"0":"")+e.toString(16)}function Jl(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ce(e,t,r,i)}function Yc(e){if(e instanceof Ce)return new Ce(e.h,e.s,e.l,e.opacity);if(e instanceof es||(e=Yi(e)),!e)return new Ce;if(e instanceof Ce)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,n=a-s,l=(a+s)/2;return n?(t===a?o=(r-i)/n+(r<i)*6:r===a?o=(i-t)/n+2:o=(t-r)/n+4,n/=l<.5?a+s:2-a-s,o*=60):n=l>0&&l<1?0:o,new Ce(o,n,l,e.opacity)}function _x(e,t,r,i){return arguments.length===1?Yc(e):new Ce(e,t,r,i??1)}function Ce(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}yn(Ce,_x,Hc(es,{brighter(e){return e=e==null?Ys:Math.pow(Ys,e),new Ce(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?zi:Math.pow(zi,e),new Ce(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,s=2*r-i;return new se(Za(e>=240?e-240:e+120,s,i),Za(e,s,i),Za(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new Ce(th(this.h),ms(this.s),ms(this.l),Us(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=Us(this.opacity);return`${e===1?"hsl(":"hsla("}${th(this.h)}, ${ms(this.s)*100}%, ${ms(this.l)*100}%${e===1?")":`, ${e})`}`}}));function th(e){return e=(e||0)%360,e<0?e+360:e}function ms(e){return Math.max(0,Math.min(1,e||0))}function Za(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 Cn=e=>()=>e;function Uc(e,t){return function(r){return e+r*t}}function Bx(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 av(e,t){var r=t-e;return r?Uc(e,r>180||r<-180?r-360*Math.round(r/360):r):Cn(isNaN(e)?t:e)}function vx(e){return(e=+e)==1?Gc:function(t,r){return r-t?Bx(t,r,e):Cn(isNaN(t)?r:t)}}function Gc(e,t){var r=t-e;return r?Uc(e,r):Cn(isNaN(e)?t:e)}const eh=(function e(t){var r=vx(t);function i(s,a){var o=r((s=bo(s)).r,(a=bo(a)).r),n=r(s.g,a.g),l=r(s.b,a.b),h=Gc(s.opacity,a.opacity);return function(c){return s.r=o(c),s.g=n(c),s.b=l(c),s.opacity=h(c),s+""}}return i.gamma=e,i})(1);function Ze(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var ko=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ka=new RegExp(ko.source,"g");function Lx(e){return function(){return e}}function Fx(e){return function(t){return e(t)+""}}function Ax(e,t){var r=ko.lastIndex=Ka.lastIndex=0,i,s,a,o=-1,n=[],l=[];for(e=e+"",t=t+"";(i=ko.exec(e))&&(s=Ka.exec(t));)(a=s.index)>r&&(a=t.slice(r,a),n[o]?n[o]+=a:n[++o]=a),(i=i[0])===(s=s[0])?n[o]?n[o]+=s:n[++o]=s:(n[++o]=null,l.push({i:o,x:Ze(i,s)})),r=Ka.lastIndex;return r<t.length&&(a=t.slice(r),n[o]?n[o]+=a:n[++o]=a),n.length<2?l[0]?Fx(l[0].x):Lx(t):(t=l.length,function(h){for(var c=0,u;c<t;++c)n[(u=l[c]).i]=u.x(h);return n.join("")})}var rh=180/Math.PI,To={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function jc(e,t,r,i,s,a){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:s,translateY:a,rotate:Math.atan2(t,e)*rh,skewX:Math.atan(l)*rh,scaleX:o,scaleY:n}}var ys;function Ex(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?To:jc(t.a,t.b,t.c,t.d,t.e,t.f)}function Mx(e){return e==null||(ys||(ys=document.createElementNS("http://www.w3.org/2000/svg","g")),ys.setAttribute("transform",e),!(e=ys.transform.baseVal.consolidate()))?To:(e=e.matrix,jc(e.a,e.b,e.c,e.d,e.e,e.f))}function Xc(e,t,r,i){function s(h){return h.length?h.pop()+" ":""}function a(h,c,u,p,d,g){if(h!==u||c!==p){var m=d.push("translate(",null,t,null,r);g.push({i:m-4,x:Ze(h,u)},{i:m-2,x:Ze(c,p)})}else(u||p)&&d.push("translate("+u+t+p+r)}function o(h,c,u,p){h!==c?(h-c>180?c+=360:c-h>180&&(h+=360),p.push({i:u.push(s(u)+"rotate(",null,i)-2,x:Ze(h,c)})):c&&u.push(s(u)+"rotate("+c+i)}function n(h,c,u,p){h!==c?p.push({i:u.push(s(u)+"skewX(",null,i)-2,x:Ze(h,c)}):c&&u.push(s(u)+"skewX("+c+i)}function l(h,c,u,p,d,g){if(h!==u||c!==p){var m=d.push(s(d)+"scale(",null,",",null,")");g.push({i:m-4,x:Ze(h,u)},{i:m-2,x:Ze(c,p)})}else(u!==1||p!==1)&&d.push(s(d)+"scale("+u+","+p+")")}return function(h,c){var u=[],p=[];return h=e(h),c=e(c),a(h.translateX,h.translateY,c.translateX,c.translateY,u,p),o(h.rotate,c.rotate,u,p),n(h.skewX,c.skewX,u,p),l(h.scaleX,h.scaleY,c.scaleX,c.scaleY,u,p),h=c=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 $x=Xc(Ex,"px, ","px)","deg)"),Ox=Xc(Mx,", ",")",")"),hi=0,Fi=0,bi=0,Vc=1e3,Gs,Ai,js=0,br=0,Ca=0,Ui=typeof performance=="object"&&performance.now?performance:Date,Zc=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function xn(){return br||(Zc(Ix),br=Ui.now()+Ca)}function Ix(){br=0}function Xs(){this._call=this._time=this._next=null}Xs.prototype=Kc.prototype={constructor:Xs,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?xn():+r)+(t==null?0:+t),!this._next&&Ai!==this&&(Ai?Ai._next=this:Gs=this,Ai=this),this._call=e,this._time=r,So()},stop:function(){this._call&&(this._call=null,this._time=1/0,So())}};function Kc(e,t,r){var i=new Xs;return i.restart(e,t,r),i}function Dx(){xn(),++hi;for(var e=Gs,t;e;)(t=br-e._time)>=0&&e._call.call(void 0,t),e=e._next;--hi}function ih(){br=(js=Ui.now())+Ca,hi=Fi=0;try{Dx()}finally{hi=0,Px(),br=0}}function Rx(){var e=Ui.now(),t=e-js;t>Vc&&(Ca-=t,js=e)}function Px(){for(var e,t=Gs,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:Gs=r);Ai=e,So(i)}function So(e){if(!hi){Fi&&(Fi=clearTimeout(Fi));var t=e-br;t>24?(e<1/0&&(Fi=setTimeout(ih,e-Ui.now()-Ca)),bi&&(bi=clearInterval(bi))):(bi||(js=Ui.now(),bi=setInterval(Rx,Vc)),hi=1,Zc(ih))}}function sh(e,t,r){var i=new Xs;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var Nx=Ac("start","end","cancel","interrupt"),qx=[],Qc=0,ah=1,wo=2,As=3,oh=4,_o=5,Es=6;function xa(e,t,r,i,s,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;Wx(e,r,{name:t,index:i,group:s,on:Nx,tween:qx,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Qc})}function bn(e,t){var r=Se(e,t);if(r.state>Qc)throw new Error("too late; already scheduled");return r}function De(e,t){var r=Se(e,t);if(r.state>As)throw new Error("too late; already running");return r}function Se(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Wx(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=Kc(a,0,r.time);function a(h){r.state=ah,r.timer.restart(o,r.delay,r.time),r.delay<=h&&o(h-r.delay)}function o(h){var c,u,p,d;if(r.state!==ah)return l();for(c in i)if(d=i[c],d.name===r.name){if(d.state===As)return sh(o);d.state===oh?(d.state=Es,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[c]):+c<t&&(d.state=Es,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[c])}if(sh(function(){r.state===As&&(r.state=oh,r.timer.restart(n,r.delay,r.time),n(h))}),r.state=wo,r.on.call("start",e,e.__data__,r.index,r.group),r.state===wo){for(r.state=As,s=new Array(p=r.tween.length),c=0,u=-1;c<p;++c)(d=r.tween[c].value.call(e,e.__data__,r.index,r.group))&&(s[++u]=d);s.length=u+1}}function n(h){for(var c=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(l),r.state=_o,1),u=-1,p=s.length;++u<p;)s[u].call(e,c);r.state===_o&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Es,r.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function zx(e,t){var r=e.__transition,i,s,a=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){a=!1;continue}s=i.state>wo&&i.state<_o,i.state=Es,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function Hx(e){return this.each(function(){zx(this,e)})}function Yx(e,t){var r,i;return function(){var s=De(this,e),a=s.tween;if(a!==r){i=r=a;for(var o=0,n=i.length;o<n;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}s.tween=i}}function Ux(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var a=De(this,e),o=a.tween;if(o!==i){s=(i=o).slice();for(var n={name:t,value:r},l=0,h=s.length;l<h;++l)if(s[l].name===t){s[l]=n;break}l===h&&s.push(n)}a.tween=s}}function Gx(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Se(this.node(),r).tween,s=0,a=i.length,o;s<a;++s)if((o=i[s]).name===e)return o.value;return null}return this.each((t==null?Yx:Ux)(r,e,t))}function kn(e,t,r){var i=e._id;return e.each(function(){var s=De(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return Se(s,i).value[t]}}function Jc(e,t){var r;return(typeof t=="number"?Ze:t instanceof Yi?eh:(r=Yi(t))?(t=r,eh):Ax)(e,t)}function jx(e){return function(){this.removeAttribute(e)}}function Xx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Vx(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttribute(e);return o===s?null:o===i?a:a=t(i=o,r)}}function Zx(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===s?null:o===i?a:a=t(i=o,r)}}function Kx(e,t,r){var i,s,a;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===s?a:(s=l,a=t(i=o,n)))}}function Qx(e,t,r){var i,s,a;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===s?a:(s=l,a=t(i=o,n)))}}function Jx(e,t){var r=ya(e),i=r==="transform"?Ox:Jc;return this.attrTween(e,typeof t=="function"?(r.local?Qx:Kx)(r,i,kn(this,"attr."+e,t)):t==null?(r.local?Xx:jx)(r):(r.local?Zx:Vx)(r,i,t))}function tb(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function eb(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function rb(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&eb(e,a)),r}return s._value=t,s}function ib(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&tb(e,a)),r}return s._value=t,s}function sb(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=ya(e);return this.tween(r,(i.local?rb:ib)(i,t))}function ab(e,t){return function(){bn(this,e).delay=+t.apply(this,arguments)}}function ob(e,t){return t=+t,function(){bn(this,e).delay=t}}function nb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ab:ob)(t,e)):Se(this.node(),t).delay}function lb(e,t){return function(){De(this,e).duration=+t.apply(this,arguments)}}function hb(e,t){return t=+t,function(){De(this,e).duration=t}}function cb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?lb:hb)(t,e)):Se(this.node(),t).duration}function ub(e,t){if(typeof t!="function")throw new Error;return function(){De(this,e).ease=t}}function db(e){var t=this._id;return arguments.length?this.each(ub(t,e)):Se(this.node(),t).ease}function pb(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;De(this,e).ease=r}}function fb(e){if(typeof e!="function")throw new Error;return this.each(pb(this._id,e))}function gb(e){typeof e!="function"&&(e=$c(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],l,h=0;h<o;++h)(l=a[h])&&e.call(l,l.__data__,h,a)&&n.push(l);return new Ye(i,this._parents,this._name,this._id)}function mb(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,a=Math.min(i,s),o=new Array(i),n=0;n<a;++n)for(var l=t[n],h=r[n],c=l.length,u=o[n]=new Array(c),p,d=0;d<c;++d)(p=l[d]||h[d])&&(u[d]=p);for(;n<i;++n)o[n]=t[n];return new Ye(o,this._parents,this._name,this._id)}function yb(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 Cb(e,t,r){var i,s,a=yb(t)?bn:De;return function(){var o=a(this,e),n=o.on;n!==i&&(s=(i=n).copy()).on(t,r),o.on=s}}function xb(e,t){var r=this._id;return arguments.length<2?Se(this.node(),r).on.on(e):this.each(Cb(r,e,t))}function bb(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function kb(){return this.on("end.remove",bb(this._id))}function Tb(e){var t=this._name,r=this._id;typeof e!="function"&&(e=gn(e));for(var i=this._groups,s=i.length,a=new Array(s),o=0;o<s;++o)for(var n=i[o],l=n.length,h=a[o]=new Array(l),c,u,p=0;p<l;++p)(c=n[p])&&(u=e.call(c,c.__data__,p,n))&&("__data__"in c&&(u.__data__=c.__data__),h[p]=u,xa(h[p],t,r,p,h,Se(c,r)));return new Ye(a,this._parents,t,r)}function Sb(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Mc(e));for(var i=this._groups,s=i.length,a=[],o=[],n=0;n<s;++n)for(var l=i[n],h=l.length,c,u=0;u<h;++u)if(c=l[u]){for(var p=e.call(c,c.__data__,u,l),d,g=Se(c,r),m=0,y=p.length;m<y;++m)(d=p[m])&&xa(d,t,r,m,p,g);a.push(p),o.push(c)}return new Ye(a,o,t,r)}var wb=ts.prototype.constructor;function _b(){return new wb(this._groups,this._parents)}function Bb(e,t){var r,i,s;return function(){var a=li(this,e),o=(this.style.removeProperty(e),li(this,e));return a===o?null:a===r&&o===i?s:s=t(r=a,i=o)}}function tu(e){return function(){this.style.removeProperty(e)}}function vb(e,t,r){var i,s=r+"",a;return function(){var o=li(this,e);return o===s?null:o===i?a:a=t(i=o,r)}}function Lb(e,t,r){var i,s,a;return function(){var o=li(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),li(this,e))),o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n))}}function Fb(e,t){var r,i,s,a="style."+t,o="end."+a,n;return function(){var l=De(this,e),h=l.on,c=l.value[a]==null?n||(n=tu(t)):void 0;(h!==r||s!==c)&&(i=(r=h).copy()).on(o,s=c),l.on=i}}function Ab(e,t,r){var i=(e+="")=="transform"?$x:Jc;return t==null?this.styleTween(e,Bb(e,i)).on("end.style."+e,tu(e)):typeof t=="function"?this.styleTween(e,Lb(e,i,kn(this,"style."+e,t))).each(Fb(this._id,e)):this.styleTween(e,vb(e,i,t),r).on("end.style."+e,null)}function Eb(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function Mb(e,t,r){var i,s;function a(){var o=t.apply(this,arguments);return o!==s&&(i=(s=o)&&Eb(e,o,r)),i}return a._value=t,a}function $b(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,Mb(e,t,r??""))}function Ob(e){return function(){this.textContent=e}}function Ib(e){return function(){var t=e(this);this.textContent=t??""}}function Db(e){return this.tween("text",typeof e=="function"?Ib(kn(this,"text",e)):Ob(e==null?"":e+""))}function Rb(e){return function(t){this.textContent=e.call(this,t)}}function Pb(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&Rb(s)),t}return i._value=e,i}function Nb(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,Pb(e))}function qb(){for(var e=this._name,t=this._id,r=eu(),i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,l,h=0;h<n;++h)if(l=o[h]){var c=Se(l,t);xa(l,e,r,h,o,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ye(i,this._parents,e,r)}function Wb(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(a,o){var n={value:o},l={value:function(){--s===0&&a()}};r.each(function(){var h=De(this,i),c=h.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(l)),h.on=t}),s===0&&a()})}var zb=0;function Ye(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function eu(){return++zb}var Ne=ts.prototype;Ye.prototype={constructor:Ye,select:Tb,selectAll:Sb,selectChild:Ne.selectChild,selectChildren:Ne.selectChildren,filter:gb,merge:mb,selection:_b,transition:qb,call:Ne.call,nodes:Ne.nodes,node:Ne.node,size:Ne.size,empty:Ne.empty,each:Ne.each,on:xb,attr:Jx,attrTween:sb,style:Ab,styleTween:$b,text:Db,textTween:Nb,remove:kb,tween:Gx,delay:nb,duration:cb,ease:db,easeVarying:fb,end:Wb,[Symbol.iterator]:Ne[Symbol.iterator]};function Hb(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Yb={time:null,delay:0,duration:250,ease:Hb};function Ub(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 Gb(e){var t,r;e instanceof Ye?(t=e._id,e=e._name):(t=eu(),(r=Yb).time=xn(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,l,h=0;h<n;++h)(l=o[h])&&xa(l,e,t,h,o,r||Ub(l,t));return new Ye(i,this._parents,e,t)}ts.prototype.interrupt=Hx;ts.prototype.transition=Gb;const Bo=Math.PI,vo=2*Bo,cr=1e-6,jb=vo-cr;function ru(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Xb(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ru;const r=10**t;return function(i){this._+=i[0];for(let s=1,a=i.length;s<a;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class Vb{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?ru:Xb(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,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,a,o){this._append`C${+t},${+r},${+i},${+s},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,i,s,a){if(t=+t,r=+r,i=+i,s=+s,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,n=this._y1,l=i-t,h=s-r,c=o-t,u=n-r,p=c*c+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>cr)if(!(Math.abs(u*l-h*c)>cr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-o,g=s-n,m=l*l+h*h,y=d*d+g*g,C=Math.sqrt(m),b=Math.sqrt(p),k=a*Math.tan((Bo-Math.acos((m+p-y)/(2*C*b)))/2),_=k/b,w=k/C;Math.abs(_-1)>cr&&this._append`L${t+_*c},${r+_*u}`,this._append`A${a},${a},0,0,${+(u*d>c*g)},${this._x1=t+w*l},${this._y1=r+w*h}`}}arc(t,r,i,s,a,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),h=t+n,c=r+l,u=1^o,p=o?s-a:a-s;this._x1===null?this._append`M${h},${c}`:(Math.abs(this._x1-h)>cr||Math.abs(this._y1-c)>cr)&&this._append`L${h},${c}`,i&&(p<0&&(p=p%vo+vo),p>jb?this._append`A${i},${i},0,1,${u},${t-n},${r-l}A${i},${i},0,1,${u},${this._x1=h},${this._y1=c}`:p>cr&&this._append`A${i},${i},0,${+(p>=Bo)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function Ir(e){return function(){return e}}const ov=Math.abs,nv=Math.atan2,lv=Math.cos,hv=Math.max,cv=Math.min,uv=Math.sin,dv=Math.sqrt,nh=1e-12,Tn=Math.PI,lh=Tn/2,pv=2*Tn;function fv(e){return e>1?0:e<-1?Tn:Math.acos(e)}function gv(e){return e>=1?lh:e<=-1?-lh:Math.asin(e)}function Zb(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 Vb(t)}function Kb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function iu(e){this._context=e}iu.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 Ni(e){return new iu(e)}function Qb(e){return e[0]}function Jb(e){return e[1]}function tk(e,t){var r=Ir(!0),i=null,s=Ni,a=null,o=Zb(n);e=typeof e=="function"?e:e===void 0?Qb:Ir(e),t=typeof t=="function"?t:t===void 0?Jb:Ir(t);function n(l){var h,c=(l=Kb(l)).length,u,p=!1,d;for(i==null&&(a=s(d=o())),h=0;h<=c;++h)!(h<c&&r(u=l[h],h,l))===p&&((p=!p)?a.lineStart():a.lineEnd()),p&&a.point(+e(u,h,l),+t(u,h,l));if(d)return a=null,d+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:Ir(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Ir(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Ir(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(a=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=a=null:a=s(i=l),n):i},n}class su{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 au(e){return new su(e,!0)}function ou(e){return new su(e,!1)}function tr(){}function Vs(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 ba(e){this._context=e}ba.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:Vs(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:Vs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Lo(e){return new ba(e)}function nu(e){this._context=e}nu.prototype={areaStart:tr,areaEnd:tr,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:Vs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ek(e){return new nu(e)}function lu(e){this._context=e}lu.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:Vs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function rk(e){return new lu(e)}function hu(e,t){this._basis=new ba(e),this._beta=t}hu.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],s=t[0],a=e[r]-i,o=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*a),this._beta*t[n]+(1-this._beta)*(s+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const ik=(function e(t){function r(i){return t===1?new ba(i):new hu(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Zs(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 Sn(e,t){this._context=e,this._k=(1-t)/6}Sn.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:Zs(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:Zs(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 cu=(function e(t){function r(i){return new Sn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function wn(e,t){this._context=e,this._k=(1-t)/6}wn.prototype={areaStart:tr,areaEnd:tr,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:Zs(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 sk=(function e(t){function r(i){return new wn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function _n(e,t){this._context=e,this._k=(1-t)/6}_n.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:Zs(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 ak=(function e(t){function r(i){return new _n(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Bn(e,t,r){var i=e._x1,s=e._y1,a=e._x2,o=e._y2;if(e._l01_a>nh){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,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>nh){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*h+e._x1*e._l23_2a-t*e._l12_2a)/c,o=(o*h+e._y1*e._l23_2a-r*e._l12_2a)/c}e._context.bezierCurveTo(i,s,a,o,e._x2,e._y2)}function uu(e,t){this._context=e,this._alpha=t}uu.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:Bn(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 du=(function e(t){function r(i){return t?new uu(i,t):new Sn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function pu(e,t){this._context=e,this._alpha=t}pu.prototype={areaStart:tr,areaEnd:tr,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:Bn(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 ok=(function e(t){function r(i){return t?new pu(i,t):new wn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function fu(e,t){this._context=e,this._alpha=t}fu.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:Bn(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 nk=(function e(t){function r(i){return t?new fu(i,t):new _n(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function gu(e){this._context=e}gu.prototype={areaStart:tr,areaEnd:tr,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 lk(e){return new gu(e)}function hh(e){return e<0?-1:1}function ch(e,t,r){var i=e._x1-e._x0,s=t-e._x1,a=(e._y1-e._y0)/(i||s<0&&-0),o=(r-e._y1)/(s||i<0&&-0),n=(a*s+o*i)/(i+s);return(hh(a)+hh(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(n))||0}function uh(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Qa(e,t,r){var i=e._x0,s=e._y0,a=e._x1,o=e._y1,n=(a-i)/3;e._context.bezierCurveTo(i+n,s+n*t,a-n,o-n*r,a,o)}function Ks(e){this._context=e}Ks.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:Qa(this,this._t0,uh(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,Qa(this,uh(this,r=ch(this,e,t)),r);break;default:Qa(this,this._t0,r=ch(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function mu(e){this._context=new yu(e)}(mu.prototype=Object.create(Ks.prototype)).point=function(e,t){Ks.prototype.point.call(this,t,e)};function yu(e){this._context=e}yu.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,s,a){this._context.bezierCurveTo(t,e,i,r,a,s)}};function Cu(e){return new Ks(e)}function xu(e){return new mu(e)}function bu(e){this._context=e}bu.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=dh(e),s=dh(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],s[0][a],i[1][a],s[1][a],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 dh(e){var t,r=e.length-1,i,s=new Array(r),a=new Array(r),o=new Array(r);for(s[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/a[t-1],a[t]-=i,o[t]-=i*o[t-1];for(s[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)s[t]=(o[t]-s[t+1])/a[t];for(a[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-s[t+1];return[s,a]}function ku(e){return new bu(e)}function ka(e,t){this._context=e,this._t=t}ka.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 Tu(e){return new ka(e,.5)}function Su(e){return new ka(e,0)}function wu(e){return new ka(e,1)}function Ei(e,t,r){this.k=e,this.x=t,this.y=r}Ei.prototype={constructor:Ei,scale:function(e){return e===1?this:new Ei(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ei(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+")"}};Ei.prototype;var hk=f(e=>{var s;const{securityLevel:t}=yt();let r=ht("body");if(t==="sandbox"){const o=((s=ht(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=ht(o.body)}return r.select(`#${e}`)},"selectSvgElement");function vn(e){return typeof e>"u"||e===null}f(vn,"isNothing");function _u(e){return typeof e=="object"&&e!==null}f(_u,"isObject");function Bu(e){return Array.isArray(e)?e:vn(e)?[]:[e]}f(Bu,"toArray");function vu(e,t){var r,i,s,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)s=a[r],e[s]=t[s];return e}f(vu,"extend");function Lu(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}f(Lu,"repeat");function Fu(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}f(Fu,"isNegativeZero");var ck=vn,uk=_u,dk=Bu,pk=Lu,fk=Fu,gk=vu,Rt={isNothing:ck,isObject:uk,toArray:dk,repeat:pk,isNegativeZero:fk,extend:gk};function Ln(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+=`
126
126
 
127
127
  `+e.mark.snippet),i+" "+r):i}f(Ln,"formatError");function ci(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Ln(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}f(ci,"YAMLException$1");ci.prototype=Object.create(Error.prototype);ci.prototype.constructor=ci;ci.prototype.toString=f(function(t){return this.name+": "+Ln(this,t)},"toString");var ie=ci;function Ms(e,t,r,i,s){var a="",o="",n=Math.floor(s/2)-1;return i-t>n&&(a=" ... ",t=i-n+a.length),r-i>n&&(o=" ...",r=i+n-o.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+a.length}}f(Ms,"getLine");function $s(e,t){return Rt.repeat(" ",t-e.length)+e}f($s,"padStart");function Au(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],s=[],a,o=-1;a=r.exec(e.buffer);)s.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var n="",l,h,c=Math.min(e.line+t.linesAfter,s.length).toString().length,u=t.maxLength-(t.indent+c+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)h=Ms(e.buffer,i[o-l],s[o-l],e.position-(i[o]-i[o-l]),u),n=Rt.repeat(" ",t.indent)+$s((e.line-l+1).toString(),c)+" | "+h.str+`
128
128
  `+n;for(h=Ms(e.buffer,i[o],s[o],e.position,u),n+=Rt.repeat(" ",t.indent)+$s((e.line+1).toString(),c)+" | "+h.str+`
129
129
  `,n+=Rt.repeat("-",t.indent+c+3+h.pos)+`^
130
130
  `,l=1;l<=t.linesAfter&&!(o+l>=s.length);l++)h=Ms(e.buffer,i[o+l],s[o+l],e.position-(i[o]-i[o+l]),u),n+=Rt.repeat(" ",t.indent)+$s((e.line+l+1).toString(),c)+" | "+h.str+`
131
- `;return n.replace(/\n$/,"")}f(Au,"makeSnippet");var yk=Au,Ck=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],xk=["scalar","sequence","mapping"];function Eu(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}f(Eu,"compileStyleAliases");function Mu(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Ck.indexOf(r)===-1)throw new ie('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=Eu(t.styleAliases||null),xk.indexOf(this.kind)===-1)throw new ie('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}f(Mu,"Type$1");var Gt=Mu;function Fo(e,t){var r=[];return e[t].forEach(function(i){var s=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(s=o)}),r[s]=i}),r}f(Fo,"compileList");function $u(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(f(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}f($u,"compileMap");function Qs(e){return this.extend(e)}f(Qs,"Schema$1");Qs.prototype.extend=f(function(t){var r=[],i=[];if(t instanceof Gt)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 ie("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Gt))throw new ie("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new ie("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new ie("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof Gt))throw new ie("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(Qs.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=Fo(s,"implicit"),s.compiledExplicit=Fo(s,"explicit"),s.compiledTypeMap=$u(s.compiledImplicit,s.compiledExplicit),s},"extend");var bk=Qs,kk=new Gt("tag:yaml.org,2002:str",{kind:"scalar",construct:f(function(e){return e!==null?e:""},"construct")}),Tk=new Gt("tag:yaml.org,2002:seq",{kind:"sequence",construct:f(function(e){return e!==null?e:[]},"construct")}),Sk=new Gt("tag:yaml.org,2002:map",{kind:"mapping",construct:f(function(e){return e!==null?e:{}},"construct")}),wk=new bk({explicit:[kk,Tk,Sk]});function Ou(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}f(Ou,"resolveYamlNull");function Iu(){return null}f(Iu,"constructYamlNull");function Du(e){return e===null}f(Du,"isNull");var _k=new Gt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Ou,construct:Iu,predicate:Du,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 Ru(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(Ru,"resolveYamlBoolean");function Pu(e){return e==="true"||e==="True"||e==="TRUE"}f(Pu,"constructYamlBoolean");function Nu(e){return Object.prototype.toString.call(e)==="[object Boolean]"}f(Nu,"isBoolean");var Bk=new Gt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Ru,construct:Pu,predicate:Nu,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 qu(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}f(qu,"isHexCode");function Wu(e){return 48<=e&&e<=55}f(Wu,"isOctCode");function zu(e){return 48<=e&&e<=57}f(zu,"isDecCode");function Hu(e){if(e===null)return!1;var t=e.length,r=0,i=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;i=!0}return i&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!qu(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Wu(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!zu(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}f(Hu,"resolveYamlInteger");function Yu(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(Yu,"constructYamlInteger");function Uu(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Rt.isNegativeZero(e)}f(Uu,"isInteger");var vk=new Gt("tag:yaml.org,2002:int",{kind:"scalar",resolve:Hu,construct:Yu,predicate:Uu,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"]}}),Lk=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Gu(e){return!(e===null||!Lk.test(e)||e[e.length-1]==="_")}f(Gu,"resolveYamlFloat");function ju(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(ju,"constructYamlFloat");var Fk=/^[-+]?[0-9]+e/;function Xu(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(Rt.isNegativeZero(e))return"-0.0";return r=e.toString(10),Fk.test(r)?r.replace("e",".e"):r}f(Xu,"representYamlFloat");function Vu(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Rt.isNegativeZero(e))}f(Vu,"isFloat");var Ak=new Gt("tag:yaml.org,2002:float",{kind:"scalar",resolve:Gu,construct:ju,predicate:Vu,represent:Xu,defaultStyle:"lowercase"}),Zu=wk.extend({implicit:[_k,Bk,vk,Ak]}),Ek=Zu,Ku=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Qu=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 Ju(e){return e===null?!1:Ku.exec(e)!==null||Qu.exec(e)!==null}f(Ju,"resolveYamlTimestamp");function td(e){var t,r,i,s,a,o,n,l=0,h=null,c,u,p;if(t=Ku.exec(e),t===null&&(t=Qu.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,i,s));if(a=+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]&&(c=+t[10],u=+(t[11]||0),h=(c*60+u)*6e4,t[9]==="-"&&(h=-h)),p=new Date(Date.UTC(r,i,s,a,o,n,l)),h&&p.setTime(p.getTime()-h),p}f(td,"constructYamlTimestamp");function ed(e){return e.toISOString()}f(ed,"representYamlTimestamp");var Mk=new Gt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ju,construct:td,instanceOf:Date,represent:ed});function rd(e){return e==="<<"||e===null}f(rd,"resolveYamlMerge");var $k=new Gt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:rd}),Fn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
132
- \r`;function id(e){if(e===null)return!1;var t,r,i=0,s=e.length,a=Fn;for(r=0;r<s;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}f(id,"resolveYamlBinary");function sd(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,a=Fn,o=0,n=[];for(t=0;t<s;t++)t%4===0&&t&&(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));return r=s%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(sd,"constructYamlBinary");function ad(e){var t="",r=0,i,s,a=e.length,o=Fn;for(i=0;i<a;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 s=a%3,s===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):s===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):s===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}f(ad,"representYamlBinary");function od(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}f(od,"isBinary");var Ok=new Gt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:id,construct:sd,predicate:od,represent:ad}),Ik=Object.prototype.hasOwnProperty,Dk=Object.prototype.toString;function nd(e){if(e===null)return!0;var t=[],r,i,s,a,o,n=e;for(r=0,i=n.length;r<i;r+=1){if(s=n[r],o=!1,Dk.call(s)!=="[object Object]")return!1;for(a in s)if(Ik.call(s,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}f(nd,"resolveYamlOmap");function ld(e){return e!==null?e:[]}f(ld,"constructYamlOmap");var Rk=new Gt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:nd,construct:ld}),Pk=Object.prototype.toString;function hd(e){if(e===null)return!0;var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],Pk.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;a[t]=[s[0],i[s[0]]]}return!0}f(hd,"resolveYamlPairs");function cd(e){if(e===null)return[];var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],s=Object.keys(i),a[t]=[s[0],i[s[0]]];return a}f(cd,"constructYamlPairs");var Nk=new Gt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:hd,construct:cd}),qk=Object.prototype.hasOwnProperty;function ud(e){if(e===null)return!0;var t,r=e;for(t in r)if(qk.call(r,t)&&r[t]!==null)return!1;return!0}f(ud,"resolveYamlSet");function dd(e){return e!==null?e:{}}f(dd,"constructYamlSet");var Wk=new Gt("tag:yaml.org,2002:set",{kind:"mapping",resolve:ud,construct:dd}),pd=Ek.extend({implicit:[Mk,$k],explicit:[Ok,Rk,Nk,Wk]}),er=Object.prototype.hasOwnProperty,Js=1,fd=2,gd=3,ta=4,Ja=1,zk=2,ph=3,Hk=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Yk=/[\x85\u2028\u2029]/,Uk=/[,\[\]\{\}]/,md=/^(?:!|!!|![a-z\-]+!)$/i,yd=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ao(e){return Object.prototype.toString.call(e)}f(Ao,"_class");function be(e){return e===10||e===13}f(be,"is_EOL");function Je(e){return e===9||e===32}f(Je,"is_WHITE_SPACE");function Zt(e){return e===9||e===32||e===10||e===13}f(Zt,"is_WS_OR_EOL");function fr(e){return e===44||e===91||e===93||e===123||e===125}f(fr,"is_FLOW_INDICATOR");function Cd(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}f(Cd,"fromHexCode");function xd(e){return e===120?2:e===117?4:e===85?8:0}f(xd,"escapedHexLen");function bd(e){return 48<=e&&e<=57?e-48:-1}f(bd,"fromDecimalCode");function Eo(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
133
- `: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(Eo,"simpleEscapeSequence");function kd(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}f(kd,"charFromCodepoint");function An(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}f(An,"setProperty");var Td=new Array(256),Sd=new Array(256);for(lr=0;lr<256;lr++)Td[lr]=Eo(lr)?1:0,Sd[lr]=Eo(lr);var lr;function wd(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||pd,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(wd,"State$1");function En(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=yk(r),new ie(t,r)}f(En,"generateError");function J(e,t){throw En(e,t)}f(J,"throwError");function Gi(e,t){e.onWarning&&e.onWarning.call(null,En(e,t))}f(Gi,"throwWarning");var fh={YAML:f(function(t,r,i){var s,a,o;t.version!==null&&J(t,"duplication of %YAML directive"),i.length!==1&&J(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&J(t,"ill-formed argument of the YAML directive"),a=parseInt(s[1],10),o=parseInt(s[2],10),a!==1&&J(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&Gi(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:f(function(t,r,i){var s,a;i.length!==2&&J(t,"TAG directive accepts exactly two arguments"),s=i[0],a=i[1],md.test(s)||J(t,"ill-formed tag handle (first argument) of the TAG directive"),er.call(t.tagMap,s)&&J(t,'there is a previously declared suffix for "'+s+'" tag handle'),yd.test(a)||J(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{J(t,"tag prefix is malformed: "+a)}t.tagMap[s]=a},"handleTagDirective")};function He(e,t,r,i){var s,a,o,n;if(t<r){if(n=e.input.slice(t,r),i)for(s=0,a=n.length;s<a;s+=1)o=n.charCodeAt(s),o===9||32<=o&&o<=1114111||J(e,"expected valid JSON character");else Hk.test(n)&&J(e,"the stream contains non-printable characters");e.result+=n}}f(He,"captureSegment");function Mo(e,t,r,i){var s,a,o,n;for(Rt.isObject(r)||J(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),o=0,n=s.length;o<n;o+=1)a=s[o],er.call(t,a)||(An(t,a,r[a]),i[a]=!0)}f(Mo,"mergeMappings");function gr(e,t,r,i,s,a,o,n,l){var h,c;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),h=0,c=s.length;h<c;h+=1)Array.isArray(s[h])&&J(e,"nested arrays are not supported inside keys"),typeof s=="object"&&Ao(s[h])==="[object Object]"&&(s[h]="[object Object]");if(typeof s=="object"&&Ao(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(h=0,c=a.length;h<c;h+=1)Mo(e,t,a[h],r);else Mo(e,t,a,r);else!e.json&&!er.call(r,s)&&er.call(t,s)&&(e.line=o||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,J(e,"duplicated mapping key")),An(t,s,a),delete r[s];return t}f(gr,"storeMappingPair");function Ta(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++):J(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}f(Ta,"readLineBreak");function Et(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;Je(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(be(s))for(Ta(e),s=e.input.charCodeAt(e.position),i++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Gi(e,"deficient indentation"),i}f(Et,"skipSeparationSpace");function rs(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||Zt(r)))}f(rs,"testDocumentSeparator");function Sa(e,t){t===1?e.result+=" ":t>1&&(e.result+=Rt.repeat(`
134
- `,t-1))}f(Sa,"writeFoldedLines");function _d(e,t,r){var i,s,a,o,n,l,h,c,u=e.kind,p=e.result,d;if(d=e.input.charCodeAt(e.position),Zt(d)||fr(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)&&(s=e.input.charCodeAt(e.position+1),Zt(s)||r&&fr(s)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,n=!1;d!==0;){if(d===58){if(s=e.input.charCodeAt(e.position+1),Zt(s)||r&&fr(s))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),Zt(i))break}else{if(e.position===e.lineStart&&rs(e)||r&&fr(d))break;if(be(d))if(l=e.line,h=e.lineStart,c=e.lineIndent,Et(e,!1,-1),e.lineIndent>=t){n=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=h,e.lineIndent=c;break}}n&&(He(e,a,o,!1),Sa(e,e.line-l),a=o=e.position,n=!1),Je(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return He(e,a,o,!1),e.result?!0:(e.kind=u,e.result=p,!1)}f(_d,"readPlainScalar");function Bd(e,t){var r,i,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(He(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,s=e.position;else return!0;else be(r)?(He(e,i,s,!0),Sa(e,Et(e,!1,t)),i=s=e.position):e.position===e.lineStart&&rs(e)?J(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);J(e,"unexpected end of the stream within a single quoted scalar")}f(Bd,"readSingleQuotedScalar");function vd(e,t){var r,i,s,a,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 He(e,r,e.position,!0),e.position++,!0;if(n===92){if(He(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),be(n))Et(e,!1,t);else if(n<256&&Td[n])e.result+=Sd[n],e.position++;else if((o=xd(n))>0){for(s=o,a=0;s>0;s--)n=e.input.charCodeAt(++e.position),(o=Cd(n))>=0?a=(a<<4)+o:J(e,"expected hexadecimal character");e.result+=kd(a),e.position++}else J(e,"unknown escape sequence");r=i=e.position}else be(n)?(He(e,r,i,!0),Sa(e,Et(e,!1,t)),r=i=e.position):e.position===e.lineStart&&rs(e)?J(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}J(e,"unexpected end of the stream within a double quoted scalar")}f(vd,"readDoubleQuotedScalar");function Ld(e,t){var r=!0,i,s,a,o=e.tag,n,l=e.anchor,h,c,u,p,d,g=Object.create(null),m,y,C,b;if(b=e.input.charCodeAt(e.position),b===91)c=93,d=!1,n=[];else if(b===123)c=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(Et(e,!0,t),b=e.input.charCodeAt(e.position),b===c)return e.position++,e.tag=o,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=n,!0;r?b===44&&J(e,"expected the node content, but found ','"):J(e,"missed comma between flow collection entries"),y=m=C=null,u=p=!1,b===63&&(h=e.input.charCodeAt(e.position+1),Zt(h)&&(u=p=!0,e.position++,Et(e,!0,t))),i=e.line,s=e.lineStart,a=e.position,kr(e,t,Js,!1,!0),y=e.tag,m=e.result,Et(e,!0,t),b=e.input.charCodeAt(e.position),(p||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),Et(e,!0,t),kr(e,t,Js,!1,!0),C=e.result),d?gr(e,n,g,y,m,C,i,s,a):u?n.push(gr(e,null,g,y,m,C,i,s,a)):n.push(m),Et(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}J(e,"unexpected end of the stream within a flow collection")}f(Ld,"readFlowCollection");function Fd(e,t){var r,i,s=Ja,a=!1,o=!1,n=t,l=0,h=!1,c,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)Ja===s?s=u===43?ph:zk:J(e,"repeat of a chomping mode identifier");else if((c=bd(u))>=0)c===0?J(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?J(e,"repeat of an indentation width identifier"):(n=t+c-1,o=!0);else break;if(Je(u)){do u=e.input.charCodeAt(++e.position);while(Je(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!be(u)&&u!==0)}for(;u!==0;){for(Ta(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),be(u)){l++;continue}if(e.lineIndent<n){s===ph?e.result+=Rt.repeat(`
131
+ `;return n.replace(/\n$/,"")}f(Au,"makeSnippet");var mk=Au,yk=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Ck=["scalar","sequence","mapping"];function Eu(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}f(Eu,"compileStyleAliases");function Mu(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(yk.indexOf(r)===-1)throw new ie('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=Eu(t.styleAliases||null),Ck.indexOf(this.kind)===-1)throw new ie('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}f(Mu,"Type$1");var Gt=Mu;function Fo(e,t){var r=[];return e[t].forEach(function(i){var s=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(s=o)}),r[s]=i}),r}f(Fo,"compileList");function $u(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(f(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}f($u,"compileMap");function Qs(e){return this.extend(e)}f(Qs,"Schema$1");Qs.prototype.extend=f(function(t){var r=[],i=[];if(t instanceof Gt)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 ie("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Gt))throw new ie("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new ie("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new ie("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof Gt))throw new ie("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(Qs.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=Fo(s,"implicit"),s.compiledExplicit=Fo(s,"explicit"),s.compiledTypeMap=$u(s.compiledImplicit,s.compiledExplicit),s},"extend");var xk=Qs,bk=new Gt("tag:yaml.org,2002:str",{kind:"scalar",construct:f(function(e){return e!==null?e:""},"construct")}),kk=new Gt("tag:yaml.org,2002:seq",{kind:"sequence",construct:f(function(e){return e!==null?e:[]},"construct")}),Tk=new Gt("tag:yaml.org,2002:map",{kind:"mapping",construct:f(function(e){return e!==null?e:{}},"construct")}),Sk=new xk({explicit:[bk,kk,Tk]});function Ou(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}f(Ou,"resolveYamlNull");function Iu(){return null}f(Iu,"constructYamlNull");function Du(e){return e===null}f(Du,"isNull");var wk=new Gt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Ou,construct:Iu,predicate:Du,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 Ru(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(Ru,"resolveYamlBoolean");function Pu(e){return e==="true"||e==="True"||e==="TRUE"}f(Pu,"constructYamlBoolean");function Nu(e){return Object.prototype.toString.call(e)==="[object Boolean]"}f(Nu,"isBoolean");var _k=new Gt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Ru,construct:Pu,predicate:Nu,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 qu(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}f(qu,"isHexCode");function Wu(e){return 48<=e&&e<=55}f(Wu,"isOctCode");function zu(e){return 48<=e&&e<=57}f(zu,"isDecCode");function Hu(e){if(e===null)return!1;var t=e.length,r=0,i=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;i=!0}return i&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!qu(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Wu(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!zu(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}f(Hu,"resolveYamlInteger");function Yu(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(Yu,"constructYamlInteger");function Uu(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Rt.isNegativeZero(e)}f(Uu,"isInteger");var Bk=new Gt("tag:yaml.org,2002:int",{kind:"scalar",resolve:Hu,construct:Yu,predicate:Uu,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"]}}),vk=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Gu(e){return!(e===null||!vk.test(e)||e[e.length-1]==="_")}f(Gu,"resolveYamlFloat");function ju(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(ju,"constructYamlFloat");var Lk=/^[-+]?[0-9]+e/;function Xu(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(Rt.isNegativeZero(e))return"-0.0";return r=e.toString(10),Lk.test(r)?r.replace("e",".e"):r}f(Xu,"representYamlFloat");function Vu(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Rt.isNegativeZero(e))}f(Vu,"isFloat");var Fk=new Gt("tag:yaml.org,2002:float",{kind:"scalar",resolve:Gu,construct:ju,predicate:Vu,represent:Xu,defaultStyle:"lowercase"}),Zu=Sk.extend({implicit:[wk,_k,Bk,Fk]}),Ak=Zu,Ku=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Qu=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 Ju(e){return e===null?!1:Ku.exec(e)!==null||Qu.exec(e)!==null}f(Ju,"resolveYamlTimestamp");function td(e){var t,r,i,s,a,o,n,l=0,h=null,c,u,p;if(t=Ku.exec(e),t===null&&(t=Qu.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,i,s));if(a=+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]&&(c=+t[10],u=+(t[11]||0),h=(c*60+u)*6e4,t[9]==="-"&&(h=-h)),p=new Date(Date.UTC(r,i,s,a,o,n,l)),h&&p.setTime(p.getTime()-h),p}f(td,"constructYamlTimestamp");function ed(e){return e.toISOString()}f(ed,"representYamlTimestamp");var Ek=new Gt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ju,construct:td,instanceOf:Date,represent:ed});function rd(e){return e==="<<"||e===null}f(rd,"resolveYamlMerge");var Mk=new Gt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:rd}),Fn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
132
+ \r`;function id(e){if(e===null)return!1;var t,r,i=0,s=e.length,a=Fn;for(r=0;r<s;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}f(id,"resolveYamlBinary");function sd(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,a=Fn,o=0,n=[];for(t=0;t<s;t++)t%4===0&&t&&(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));return r=s%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(sd,"constructYamlBinary");function ad(e){var t="",r=0,i,s,a=e.length,o=Fn;for(i=0;i<a;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 s=a%3,s===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):s===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):s===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}f(ad,"representYamlBinary");function od(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}f(od,"isBinary");var $k=new Gt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:id,construct:sd,predicate:od,represent:ad}),Ok=Object.prototype.hasOwnProperty,Ik=Object.prototype.toString;function nd(e){if(e===null)return!0;var t=[],r,i,s,a,o,n=e;for(r=0,i=n.length;r<i;r+=1){if(s=n[r],o=!1,Ik.call(s)!=="[object Object]")return!1;for(a in s)if(Ok.call(s,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}f(nd,"resolveYamlOmap");function ld(e){return e!==null?e:[]}f(ld,"constructYamlOmap");var Dk=new Gt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:nd,construct:ld}),Rk=Object.prototype.toString;function hd(e){if(e===null)return!0;var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],Rk.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;a[t]=[s[0],i[s[0]]]}return!0}f(hd,"resolveYamlPairs");function cd(e){if(e===null)return[];var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],s=Object.keys(i),a[t]=[s[0],i[s[0]]];return a}f(cd,"constructYamlPairs");var Pk=new Gt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:hd,construct:cd}),Nk=Object.prototype.hasOwnProperty;function ud(e){if(e===null)return!0;var t,r=e;for(t in r)if(Nk.call(r,t)&&r[t]!==null)return!1;return!0}f(ud,"resolveYamlSet");function dd(e){return e!==null?e:{}}f(dd,"constructYamlSet");var qk=new Gt("tag:yaml.org,2002:set",{kind:"mapping",resolve:ud,construct:dd}),pd=Ak.extend({implicit:[Ek,Mk],explicit:[$k,Dk,Pk,qk]}),er=Object.prototype.hasOwnProperty,Js=1,fd=2,gd=3,ta=4,Ja=1,Wk=2,ph=3,zk=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Hk=/[\x85\u2028\u2029]/,Yk=/[,\[\]\{\}]/,md=/^(?:!|!!|![a-z\-]+!)$/i,yd=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ao(e){return Object.prototype.toString.call(e)}f(Ao,"_class");function be(e){return e===10||e===13}f(be,"is_EOL");function Je(e){return e===9||e===32}f(Je,"is_WHITE_SPACE");function Zt(e){return e===9||e===32||e===10||e===13}f(Zt,"is_WS_OR_EOL");function fr(e){return e===44||e===91||e===93||e===123||e===125}f(fr,"is_FLOW_INDICATOR");function Cd(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}f(Cd,"fromHexCode");function xd(e){return e===120?2:e===117?4:e===85?8:0}f(xd,"escapedHexLen");function bd(e){return 48<=e&&e<=57?e-48:-1}f(bd,"fromDecimalCode");function Eo(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
133
+ `: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(Eo,"simpleEscapeSequence");function kd(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}f(kd,"charFromCodepoint");function An(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}f(An,"setProperty");var Td=new Array(256),Sd=new Array(256);for(lr=0;lr<256;lr++)Td[lr]=Eo(lr)?1:0,Sd[lr]=Eo(lr);var lr;function wd(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||pd,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(wd,"State$1");function En(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=mk(r),new ie(t,r)}f(En,"generateError");function J(e,t){throw En(e,t)}f(J,"throwError");function Gi(e,t){e.onWarning&&e.onWarning.call(null,En(e,t))}f(Gi,"throwWarning");var fh={YAML:f(function(t,r,i){var s,a,o;t.version!==null&&J(t,"duplication of %YAML directive"),i.length!==1&&J(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&J(t,"ill-formed argument of the YAML directive"),a=parseInt(s[1],10),o=parseInt(s[2],10),a!==1&&J(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&Gi(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:f(function(t,r,i){var s,a;i.length!==2&&J(t,"TAG directive accepts exactly two arguments"),s=i[0],a=i[1],md.test(s)||J(t,"ill-formed tag handle (first argument) of the TAG directive"),er.call(t.tagMap,s)&&J(t,'there is a previously declared suffix for "'+s+'" tag handle'),yd.test(a)||J(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{J(t,"tag prefix is malformed: "+a)}t.tagMap[s]=a},"handleTagDirective")};function He(e,t,r,i){var s,a,o,n;if(t<r){if(n=e.input.slice(t,r),i)for(s=0,a=n.length;s<a;s+=1)o=n.charCodeAt(s),o===9||32<=o&&o<=1114111||J(e,"expected valid JSON character");else zk.test(n)&&J(e,"the stream contains non-printable characters");e.result+=n}}f(He,"captureSegment");function Mo(e,t,r,i){var s,a,o,n;for(Rt.isObject(r)||J(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),o=0,n=s.length;o<n;o+=1)a=s[o],er.call(t,a)||(An(t,a,r[a]),i[a]=!0)}f(Mo,"mergeMappings");function gr(e,t,r,i,s,a,o,n,l){var h,c;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),h=0,c=s.length;h<c;h+=1)Array.isArray(s[h])&&J(e,"nested arrays are not supported inside keys"),typeof s=="object"&&Ao(s[h])==="[object Object]"&&(s[h]="[object Object]");if(typeof s=="object"&&Ao(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(h=0,c=a.length;h<c;h+=1)Mo(e,t,a[h],r);else Mo(e,t,a,r);else!e.json&&!er.call(r,s)&&er.call(t,s)&&(e.line=o||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,J(e,"duplicated mapping key")),An(t,s,a),delete r[s];return t}f(gr,"storeMappingPair");function Ta(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++):J(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}f(Ta,"readLineBreak");function Et(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;Je(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(be(s))for(Ta(e),s=e.input.charCodeAt(e.position),i++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Gi(e,"deficient indentation"),i}f(Et,"skipSeparationSpace");function rs(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||Zt(r)))}f(rs,"testDocumentSeparator");function Sa(e,t){t===1?e.result+=" ":t>1&&(e.result+=Rt.repeat(`
134
+ `,t-1))}f(Sa,"writeFoldedLines");function _d(e,t,r){var i,s,a,o,n,l,h,c,u=e.kind,p=e.result,d;if(d=e.input.charCodeAt(e.position),Zt(d)||fr(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)&&(s=e.input.charCodeAt(e.position+1),Zt(s)||r&&fr(s)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,n=!1;d!==0;){if(d===58){if(s=e.input.charCodeAt(e.position+1),Zt(s)||r&&fr(s))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),Zt(i))break}else{if(e.position===e.lineStart&&rs(e)||r&&fr(d))break;if(be(d))if(l=e.line,h=e.lineStart,c=e.lineIndent,Et(e,!1,-1),e.lineIndent>=t){n=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=h,e.lineIndent=c;break}}n&&(He(e,a,o,!1),Sa(e,e.line-l),a=o=e.position,n=!1),Je(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return He(e,a,o,!1),e.result?!0:(e.kind=u,e.result=p,!1)}f(_d,"readPlainScalar");function Bd(e,t){var r,i,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(He(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,s=e.position;else return!0;else be(r)?(He(e,i,s,!0),Sa(e,Et(e,!1,t)),i=s=e.position):e.position===e.lineStart&&rs(e)?J(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);J(e,"unexpected end of the stream within a single quoted scalar")}f(Bd,"readSingleQuotedScalar");function vd(e,t){var r,i,s,a,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 He(e,r,e.position,!0),e.position++,!0;if(n===92){if(He(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),be(n))Et(e,!1,t);else if(n<256&&Td[n])e.result+=Sd[n],e.position++;else if((o=xd(n))>0){for(s=o,a=0;s>0;s--)n=e.input.charCodeAt(++e.position),(o=Cd(n))>=0?a=(a<<4)+o:J(e,"expected hexadecimal character");e.result+=kd(a),e.position++}else J(e,"unknown escape sequence");r=i=e.position}else be(n)?(He(e,r,i,!0),Sa(e,Et(e,!1,t)),r=i=e.position):e.position===e.lineStart&&rs(e)?J(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}J(e,"unexpected end of the stream within a double quoted scalar")}f(vd,"readDoubleQuotedScalar");function Ld(e,t){var r=!0,i,s,a,o=e.tag,n,l=e.anchor,h,c,u,p,d,g=Object.create(null),m,y,C,b;if(b=e.input.charCodeAt(e.position),b===91)c=93,d=!1,n=[];else if(b===123)c=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(Et(e,!0,t),b=e.input.charCodeAt(e.position),b===c)return e.position++,e.tag=o,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=n,!0;r?b===44&&J(e,"expected the node content, but found ','"):J(e,"missed comma between flow collection entries"),y=m=C=null,u=p=!1,b===63&&(h=e.input.charCodeAt(e.position+1),Zt(h)&&(u=p=!0,e.position++,Et(e,!0,t))),i=e.line,s=e.lineStart,a=e.position,kr(e,t,Js,!1,!0),y=e.tag,m=e.result,Et(e,!0,t),b=e.input.charCodeAt(e.position),(p||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),Et(e,!0,t),kr(e,t,Js,!1,!0),C=e.result),d?gr(e,n,g,y,m,C,i,s,a):u?n.push(gr(e,null,g,y,m,C,i,s,a)):n.push(m),Et(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}J(e,"unexpected end of the stream within a flow collection")}f(Ld,"readFlowCollection");function Fd(e,t){var r,i,s=Ja,a=!1,o=!1,n=t,l=0,h=!1,c,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)Ja===s?s=u===43?ph:Wk:J(e,"repeat of a chomping mode identifier");else if((c=bd(u))>=0)c===0?J(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?J(e,"repeat of an indentation width identifier"):(n=t+c-1,o=!0);else break;if(Je(u)){do u=e.input.charCodeAt(++e.position);while(Je(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!be(u)&&u!==0)}for(;u!==0;){for(Ta(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),be(u)){l++;continue}if(e.lineIndent<n){s===ph?e.result+=Rt.repeat(`
135
135
  `,a?1+l:l):s===Ja&&a&&(e.result+=`
136
136
  `);break}for(i?Je(u)?(h=!0,e.result+=Rt.repeat(`
137
137
  `,a?1+l:l)):h?(h=!1,e.result+=Rt.repeat(`
138
138
  `,l+1)):l===0?a&&(e.result+=" "):e.result+=Rt.repeat(`
139
139
  `,l):e.result+=Rt.repeat(`
140
- `,a?1+l:l),a=!0,o=!0,l=0,r=e.position;!be(u)&&u!==0;)u=e.input.charCodeAt(++e.position);He(e,r,e.position,!1)}return!0}f(Fd,"readBlockScalar");function $o(e,t){var r,i=e.tag,s=e.anchor,a=[],o,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,J(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!Zt(o))));){if(n=!0,e.position++,Et(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,kr(e,t,gd,!1,!0),a.push(e.result),Et(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)J(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=s,e.kind="sequence",e.result=a,!0):!1}f($o,"readBlockSequence");function Ad(e,t,r){var i,s,a,o,n,l,h=e.tag,c=e.anchor,u={},p=Object.create(null),d=null,g=null,m=null,y=!1,C=!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,J(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&Zt(i))b===63?(y&&(gr(e,u,p,d,g,null,o,n,l),d=g=m=null),C=!0,y=!0,s=!0):y?(y=!1,s=!0):J(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,!kr(e,r,fd,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);Je(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Zt(b)||J(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(gr(e,u,p,d,g,null,o,n,l),d=g=m=null),C=!0,y=!1,s=!1,d=e.tag,g=e.result;else if(C)J(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=h,e.anchor=c,!0}else if(C)J(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=h,e.anchor=c,!0}if((e.line===a||e.lineIndent>t)&&(y&&(o=e.line,n=e.lineStart,l=e.position),kr(e,t,ta,!0,s)&&(y?g=e.result:m=e.result),y||(gr(e,u,p,d,g,m,o,n,l),d=g=m=null),Et(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)J(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&gr(e,u,p,d,g,null,o,n,l),C&&(e.tag=h,e.anchor=c,e.kind="mapping",e.result=u),C}f(Ad,"readBlockMapping");function Ed(e){var t,r=!1,i=!1,s,a,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&J(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,s="!!",o=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):J(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Zt(o);)o===33&&(i?J(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),md.test(s)||J(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),Uk.test(a)&&J(e,"tag suffix cannot contain flow indicator characters")}a&&!yd.test(a)&&J(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{J(e,"tag name is malformed: "+a)}return r?e.tag=a:er.call(e.tagMap,s)?e.tag=e.tagMap[s]+a:s==="!"?e.tag="!"+a:s==="!!"?e.tag="tag:yaml.org,2002:"+a:J(e,'undeclared tag handle "'+s+'"'),!0}f(Ed,"readTagProperty");function Md(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&J(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Zt(r)&&!fr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&J(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}f(Md,"readAnchorProperty");function $d(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&&!Zt(i)&&!fr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&J(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),er.call(e.anchorMap,r)||J(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Et(e,!0,-1),!0}f($d,"readAlias");function kr(e,t,r,i,s){var a,o,n,l=1,h=!1,c=!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,a=o=n=ta===r||gd===r,i&&Et(e,!0,-1)&&(h=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Ed(e)||Md(e);)Et(e,!0,-1)?(h=!0,n=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=h||s),(l===1||ta===r)&&(Js===r||fd===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?n&&($o(e,y)||Ad(e,y,m))||Ld(e,m)?c=!0:(o&&Fd(e,m)||Bd(e,m)||vd(e,m)?c=!0:$d(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&J(e,"alias node should not have any properties")):_d(e,m,Js===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=n&&$o(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"&&J(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(er.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||J(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&J(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)):J(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}f(kr,"composeNode");function Od(e){var t=e.position,r,i,s,a=!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&&(Et(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!Zt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&J(e,"directive name must not be less than one character in length");o!==0;){for(;Je(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!be(o));break}if(be(o))break;for(r=e.position;o!==0&&!Zt(o);)o=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}o!==0&&Ta(e),er.call(fh,i)?fh[i](e,i,s):Gi(e,'unknown document directive "'+i+'"')}if(Et(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,Et(e,!0,-1)):a&&J(e,"directives end mark is expected"),kr(e,e.lineIndent-1,ta,!1,!0),Et(e,!0,-1),e.checkLineBreaks&&Yk.test(e.input.slice(t,e.position))&&Gi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&rs(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Et(e,!0,-1));return}if(e.position<e.length-1)J(e,"end of the stream or a document separator is expected");else return}f(Od,"readDocument");function Mn(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
141
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new wd(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,J(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;)Od(r);return r.documents}f(Mn,"loadDocuments");function Gk(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Mn(e,r);if(typeof t!="function")return i;for(var s=0,a=i.length;s<a;s+=1)t(i[s])}f(Gk,"loadAll$1");function Id(e,t){var r=Mn(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new ie("expected a single document in the stream, but found more")}}f(Id,"load$1");var jk=Id,Xk={load:jk},Dd=Object.prototype.toString,Rd=Object.prototype.hasOwnProperty,$n=65279,Vk=9,ji=10,Zk=13,Kk=32,Qk=33,Jk=34,Oo=35,t1=37,e1=38,r1=39,i1=42,Pd=44,s1=45,ea=58,a1=61,o1=62,n1=63,l1=64,Nd=91,qd=93,h1=96,Wd=123,c1=124,zd=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 u1=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],d1=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Hd(e,t){var r,i,s,a,o,n,l;if(t===null)return{};for(r={},i=Object.keys(t),s=0,a=i.length;s<a;s+=1)o=i[s],n=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Rd.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[o]=n;return r}f(Hd,"compileStyleMap");function Yd(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 ie("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Rt.repeat("0",i-t.length)+t}f(Yd,"encodeHex");var p1=1,Xi=2;function Ud(e){this.schema=e.schema||pd,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Rt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Hd(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==='"'?Xi:p1,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(Ud,"State");function Io(e,t){for(var r=Rt.repeat(" ",t),i=0,s=-1,a="",o,n=e.length;i<n;)s=e.indexOf(`
140
+ `,a?1+l:l),a=!0,o=!0,l=0,r=e.position;!be(u)&&u!==0;)u=e.input.charCodeAt(++e.position);He(e,r,e.position,!1)}return!0}f(Fd,"readBlockScalar");function $o(e,t){var r,i=e.tag,s=e.anchor,a=[],o,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,J(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!Zt(o))));){if(n=!0,e.position++,Et(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,kr(e,t,gd,!1,!0),a.push(e.result),Et(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)J(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=s,e.kind="sequence",e.result=a,!0):!1}f($o,"readBlockSequence");function Ad(e,t,r){var i,s,a,o,n,l,h=e.tag,c=e.anchor,u={},p=Object.create(null),d=null,g=null,m=null,y=!1,C=!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,J(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&Zt(i))b===63?(y&&(gr(e,u,p,d,g,null,o,n,l),d=g=m=null),C=!0,y=!0,s=!0):y?(y=!1,s=!0):J(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,!kr(e,r,fd,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);Je(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Zt(b)||J(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(gr(e,u,p,d,g,null,o,n,l),d=g=m=null),C=!0,y=!1,s=!1,d=e.tag,g=e.result;else if(C)J(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=h,e.anchor=c,!0}else if(C)J(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=h,e.anchor=c,!0}if((e.line===a||e.lineIndent>t)&&(y&&(o=e.line,n=e.lineStart,l=e.position),kr(e,t,ta,!0,s)&&(y?g=e.result:m=e.result),y||(gr(e,u,p,d,g,m,o,n,l),d=g=m=null),Et(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)J(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&gr(e,u,p,d,g,null,o,n,l),C&&(e.tag=h,e.anchor=c,e.kind="mapping",e.result=u),C}f(Ad,"readBlockMapping");function Ed(e){var t,r=!1,i=!1,s,a,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&J(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,s="!!",o=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):J(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Zt(o);)o===33&&(i?J(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),md.test(s)||J(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),Yk.test(a)&&J(e,"tag suffix cannot contain flow indicator characters")}a&&!yd.test(a)&&J(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{J(e,"tag name is malformed: "+a)}return r?e.tag=a:er.call(e.tagMap,s)?e.tag=e.tagMap[s]+a:s==="!"?e.tag="!"+a:s==="!!"?e.tag="tag:yaml.org,2002:"+a:J(e,'undeclared tag handle "'+s+'"'),!0}f(Ed,"readTagProperty");function Md(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&J(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Zt(r)&&!fr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&J(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}f(Md,"readAnchorProperty");function $d(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&&!Zt(i)&&!fr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&J(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),er.call(e.anchorMap,r)||J(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Et(e,!0,-1),!0}f($d,"readAlias");function kr(e,t,r,i,s){var a,o,n,l=1,h=!1,c=!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,a=o=n=ta===r||gd===r,i&&Et(e,!0,-1)&&(h=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Ed(e)||Md(e);)Et(e,!0,-1)?(h=!0,n=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=h||s),(l===1||ta===r)&&(Js===r||fd===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?n&&($o(e,y)||Ad(e,y,m))||Ld(e,m)?c=!0:(o&&Fd(e,m)||Bd(e,m)||vd(e,m)?c=!0:$d(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&J(e,"alias node should not have any properties")):_d(e,m,Js===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=n&&$o(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"&&J(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(er.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||J(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&J(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)):J(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}f(kr,"composeNode");function Od(e){var t=e.position,r,i,s,a=!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&&(Et(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!Zt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&J(e,"directive name must not be less than one character in length");o!==0;){for(;Je(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!be(o));break}if(be(o))break;for(r=e.position;o!==0&&!Zt(o);)o=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}o!==0&&Ta(e),er.call(fh,i)?fh[i](e,i,s):Gi(e,'unknown document directive "'+i+'"')}if(Et(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,Et(e,!0,-1)):a&&J(e,"directives end mark is expected"),kr(e,e.lineIndent-1,ta,!1,!0),Et(e,!0,-1),e.checkLineBreaks&&Hk.test(e.input.slice(t,e.position))&&Gi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&rs(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Et(e,!0,-1));return}if(e.position<e.length-1)J(e,"end of the stream or a document separator is expected");else return}f(Od,"readDocument");function Mn(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
141
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new wd(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,J(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;)Od(r);return r.documents}f(Mn,"loadDocuments");function Uk(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Mn(e,r);if(typeof t!="function")return i;for(var s=0,a=i.length;s<a;s+=1)t(i[s])}f(Uk,"loadAll$1");function Id(e,t){var r=Mn(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new ie("expected a single document in the stream, but found more")}}f(Id,"load$1");var Gk=Id,jk={load:Gk},Dd=Object.prototype.toString,Rd=Object.prototype.hasOwnProperty,$n=65279,Xk=9,ji=10,Vk=13,Zk=32,Kk=33,Qk=34,Oo=35,Jk=37,t1=38,e1=39,r1=42,Pd=44,i1=45,ea=58,s1=61,a1=62,o1=63,n1=64,Nd=91,qd=93,l1=96,Wd=123,h1=124,zd=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 c1=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],u1=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Hd(e,t){var r,i,s,a,o,n,l;if(t===null)return{};for(r={},i=Object.keys(t),s=0,a=i.length;s<a;s+=1)o=i[s],n=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Rd.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[o]=n;return r}f(Hd,"compileStyleMap");function Yd(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 ie("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Rt.repeat("0",i-t.length)+t}f(Yd,"encodeHex");var d1=1,Xi=2;function Ud(e){this.schema=e.schema||pd,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Rt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Hd(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==='"'?Xi:d1,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(Ud,"State");function Io(e,t){for(var r=Rt.repeat(" ",t),i=0,s=-1,a="",o,n=e.length;i<n;)s=e.indexOf(`
142
142
  `,i),s===-1?(o=e.slice(i),i=n):(o=e.slice(i,s+1),i=s+1),o.length&&o!==`
143
143
  `&&(a+=r),a+=o;return a}f(Io,"indentString");function ra(e,t){return`
144
- `+Rt.repeat(" ",e.indent*t)}f(ra,"generateNextLine");function Gd(e,t){var r,i,s;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}f(Gd,"testImplicitResolving");function Vi(e){return e===Kk||e===Vk}f(Vi,"isWhitespace");function ui(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==$n||65536<=e&&e<=1114111}f(ui,"isPrintable");function Do(e){return ui(e)&&e!==$n&&e!==Zk&&e!==ji}f(Do,"isNsCharOrWhitespace");function Ro(e,t,r){var i=Do(e),s=i&&!Vi(e);return(r?i:i&&e!==Pd&&e!==Nd&&e!==qd&&e!==Wd&&e!==zd)&&e!==Oo&&!(t===ea&&!s)||Do(t)&&!Vi(t)&&e===Oo||t===ea&&s}f(Ro,"isPlainSafe");function jd(e){return ui(e)&&e!==$n&&!Vi(e)&&e!==s1&&e!==n1&&e!==ea&&e!==Pd&&e!==Nd&&e!==qd&&e!==Wd&&e!==zd&&e!==Oo&&e!==e1&&e!==i1&&e!==Qk&&e!==c1&&e!==a1&&e!==o1&&e!==r1&&e!==Jk&&e!==t1&&e!==l1&&e!==h1}f(jd,"isPlainSafeFirst");function Xd(e){return!Vi(e)&&e!==ea}f(Xd,"isPlainSafeLast");function zr(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(zr,"codePointAt");function On(e){var t=/^\n* /;return t.test(e)}f(On,"needIndentIndicator");var Vd=1,Po=2,Zd=3,Kd=4,Nr=5;function Qd(e,t,r,i,s,a,o,n){var l,h=0,c=null,u=!1,p=!1,d=i!==-1,g=-1,m=jd(zr(e,0))&&Xd(zr(e,e.length-1));if(t||o)for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=zr(e,l),!ui(h))return Nr;m=m&&Ro(h,c,n),c=h}else{for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=zr(e,l),h===ji)u=!0,d&&(p=p||l-g-1>i&&e[g+1]!==" ",g=l);else if(!ui(h))return Nr;m=m&&Ro(h,c,n),c=h}p=p||d&&l-g-1>i&&e[g+1]!==" "}return!u&&!p?m&&!o&&!s(e)?Vd:a===Xi?Nr:Po:r>9&&On(e)?Nr:o?a===Xi?Nr:Po:p?Kd:Zd}f(Qd,"chooseScalarStyle");function Jd(e,t,r,i,s){e.dump=(function(){if(t.length===0)return e.quotingType===Xi?'""':"''";if(!e.noCompatMode&&(u1.indexOf(t)!==-1||d1.test(t)))return e.quotingType===Xi?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(h){return Gd(e,h)}switch(f(l,"testAmbiguity"),Qd(t,n,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,s)){case Vd:return t;case Po:return"'"+t.replace(/'/g,"''")+"'";case Zd:return"|"+No(t,e.indent)+qo(Io(t,a));case Kd:return">"+No(t,e.indent)+qo(Io(tp(t,o),a));case Nr:return'"'+ep(t)+'"';default:throw new ie("impossible error: invalid scalar style")}})()}f(Jd,"writeScalar");function No(e,t){var r=On(e)?String(t):"",i=e[e.length-1]===`
144
+ `+Rt.repeat(" ",e.indent*t)}f(ra,"generateNextLine");function Gd(e,t){var r,i,s;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}f(Gd,"testImplicitResolving");function Vi(e){return e===Zk||e===Xk}f(Vi,"isWhitespace");function ui(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==$n||65536<=e&&e<=1114111}f(ui,"isPrintable");function Do(e){return ui(e)&&e!==$n&&e!==Vk&&e!==ji}f(Do,"isNsCharOrWhitespace");function Ro(e,t,r){var i=Do(e),s=i&&!Vi(e);return(r?i:i&&e!==Pd&&e!==Nd&&e!==qd&&e!==Wd&&e!==zd)&&e!==Oo&&!(t===ea&&!s)||Do(t)&&!Vi(t)&&e===Oo||t===ea&&s}f(Ro,"isPlainSafe");function jd(e){return ui(e)&&e!==$n&&!Vi(e)&&e!==i1&&e!==o1&&e!==ea&&e!==Pd&&e!==Nd&&e!==qd&&e!==Wd&&e!==zd&&e!==Oo&&e!==t1&&e!==r1&&e!==Kk&&e!==h1&&e!==s1&&e!==a1&&e!==e1&&e!==Qk&&e!==Jk&&e!==n1&&e!==l1}f(jd,"isPlainSafeFirst");function Xd(e){return!Vi(e)&&e!==ea}f(Xd,"isPlainSafeLast");function zr(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(zr,"codePointAt");function On(e){var t=/^\n* /;return t.test(e)}f(On,"needIndentIndicator");var Vd=1,Po=2,Zd=3,Kd=4,Nr=5;function Qd(e,t,r,i,s,a,o,n){var l,h=0,c=null,u=!1,p=!1,d=i!==-1,g=-1,m=jd(zr(e,0))&&Xd(zr(e,e.length-1));if(t||o)for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=zr(e,l),!ui(h))return Nr;m=m&&Ro(h,c,n),c=h}else{for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=zr(e,l),h===ji)u=!0,d&&(p=p||l-g-1>i&&e[g+1]!==" ",g=l);else if(!ui(h))return Nr;m=m&&Ro(h,c,n),c=h}p=p||d&&l-g-1>i&&e[g+1]!==" "}return!u&&!p?m&&!o&&!s(e)?Vd:a===Xi?Nr:Po:r>9&&On(e)?Nr:o?a===Xi?Nr:Po:p?Kd:Zd}f(Qd,"chooseScalarStyle");function Jd(e,t,r,i,s){e.dump=(function(){if(t.length===0)return e.quotingType===Xi?'""':"''";if(!e.noCompatMode&&(c1.indexOf(t)!==-1||u1.test(t)))return e.quotingType===Xi?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(h){return Gd(e,h)}switch(f(l,"testAmbiguity"),Qd(t,n,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,s)){case Vd:return t;case Po:return"'"+t.replace(/'/g,"''")+"'";case Zd:return"|"+No(t,e.indent)+qo(Io(t,a));case Kd:return">"+No(t,e.indent)+qo(Io(tp(t,o),a));case Nr:return'"'+ep(t)+'"';default:throw new ie("impossible error: invalid scalar style")}})()}f(Jd,"writeScalar");function No(e,t){var r=On(e)?String(t):"",i=e[e.length-1]===`
145
145
  `,s=i&&(e[e.length-2]===`
146
146
  `||e===`
147
147
  `),a=s?"+":i?"":"-";return r+a+`
@@ -152,17 +152,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
152
152
  `:"")+Wo(l,t),s=a}return i}f(tp,"foldString");function Wo(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,s=0,a,o=0,n=0,l="";i=r.exec(e);)n=i.index,n-s>t&&(a=o>s?o:n,l+=`
153
153
  `+e.slice(s,a),s=a+1),o=n;return l+=`
154
154
  `,e.length-s>t&&o>s?l+=e.slice(s,o)+`
155
- `+e.slice(o+1):l+=e.slice(s),l.slice(1)}f(Wo,"foldLine");function ep(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=zr(e,s),i=jt[r],!i&&ui(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||Yd(r);return t}f(ep,"escapeString");function rp(e,t,r){var i="",s=e.tag,a,o,n;for(a=0,o=r.length;a<o;a+=1)n=r[a],e.replacer&&(n=e.replacer.call(r,String(a),n)),($e(e,t,n,!1,!1)||typeof n>"u"&&$e(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}f(rp,"writeFlowSequence");function zo(e,t,r,i){var s="",a=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)),($e(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&$e(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=ra(e,t)),e.dump&&ji===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=a,e.dump=s||"[]"}f(zo,"writeBlockSequence");function ip(e,t,r){var i="",s=e.tag,a=Object.keys(r),o,n,l,h,c;for(o=0,n=a.length;o<n;o+=1)c="",i!==""&&(c+=", "),e.condenseFlow&&(c+='"'),l=a[o],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),$e(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),$e(e,t,h,!1,!1)&&(c+=e.dump,i+=c));e.tag=s,e.dump="{"+i+"}"}f(ip,"writeFlowMapping");function sp(e,t,r,i){var s="",a=e.tag,o=Object.keys(r),n,l,h,c,u,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new ie("sortKeys must be a boolean or a function");for(n=0,l=o.length;n<l;n+=1)p="",(!i||s!=="")&&(p+=ra(e,t)),h=o[n],c=r[h],e.replacer&&(c=e.replacer.call(r,h,c)),$e(e,t+1,h,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&ji===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,u&&(p+=ra(e,t)),$e(e,t+1,c,!0,u)&&(e.dump&&ji===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,s+=p));e.tag=a,e.dump=s||"{}"}f(sp,"writeBlockMapping");function Ho(e,t,r){var i,s,a,o,n,l;for(s=r?e.explicitTypes:e.implicitTypes,a=0,o=s.length;a<o;a+=1)if(n=s[a],(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,Dd.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(Rd.call(n.represent,l))i=n.represent[l](t,l);else throw new ie("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}f(Ho,"detectType");function $e(e,t,r,i,s,a,o){e.tag=null,e.dump=r,Ho(e,r,!1)||Ho(e,r,!0);var n=Dd.call(e.dump),l=i,h;i&&(i=e.flowLevel<0||e.flowLevel>t);var c=n==="[object Object]"||n==="[object Array]",u,p;if(c&&(u=e.duplicates.indexOf(r),p=u!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(s=!1),p&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(c&&p&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(sp(e,t,e.dump,s),p&&(e.dump="&ref_"+u+e.dump)):(ip(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?zo(e,t-1,e.dump,s):zo(e,t,e.dump,s),p&&(e.dump="&ref_"+u+e.dump)):(rp(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&Jd(e,e.dump,t,a,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ie("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}f($e,"writeNode");function ap(e,t){var r=[],i=[],s,a;for(ia(e,r,i),s=0,a=i.length;s<a;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(a)}f(ap,"getDuplicateReferences");function ia(e,t,r){var i,s,a;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,a=e.length;s<a;s+=1)ia(e[s],t,r);else for(i=Object.keys(e),s=0,a=i.length;s<a;s+=1)ia(e[i[s]],t,r)}f(ia,"inspectNode");function f1(e,t){t=t||{};var r=new Ud(t);r.noRefs||ap(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),$e(r,0,i,!0,!0)?r.dump+`
156
- `:""}f(f1,"dump$1");function g1(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(g1,"renamed");var m1=Zu,y1=Xk.load;/*! Bundled license information:
155
+ `+e.slice(o+1):l+=e.slice(s),l.slice(1)}f(Wo,"foldLine");function ep(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=zr(e,s),i=jt[r],!i&&ui(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||Yd(r);return t}f(ep,"escapeString");function rp(e,t,r){var i="",s=e.tag,a,o,n;for(a=0,o=r.length;a<o;a+=1)n=r[a],e.replacer&&(n=e.replacer.call(r,String(a),n)),($e(e,t,n,!1,!1)||typeof n>"u"&&$e(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}f(rp,"writeFlowSequence");function zo(e,t,r,i){var s="",a=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)),($e(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&$e(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=ra(e,t)),e.dump&&ji===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=a,e.dump=s||"[]"}f(zo,"writeBlockSequence");function ip(e,t,r){var i="",s=e.tag,a=Object.keys(r),o,n,l,h,c;for(o=0,n=a.length;o<n;o+=1)c="",i!==""&&(c+=", "),e.condenseFlow&&(c+='"'),l=a[o],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),$e(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),$e(e,t,h,!1,!1)&&(c+=e.dump,i+=c));e.tag=s,e.dump="{"+i+"}"}f(ip,"writeFlowMapping");function sp(e,t,r,i){var s="",a=e.tag,o=Object.keys(r),n,l,h,c,u,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new ie("sortKeys must be a boolean or a function");for(n=0,l=o.length;n<l;n+=1)p="",(!i||s!=="")&&(p+=ra(e,t)),h=o[n],c=r[h],e.replacer&&(c=e.replacer.call(r,h,c)),$e(e,t+1,h,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&ji===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,u&&(p+=ra(e,t)),$e(e,t+1,c,!0,u)&&(e.dump&&ji===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,s+=p));e.tag=a,e.dump=s||"{}"}f(sp,"writeBlockMapping");function Ho(e,t,r){var i,s,a,o,n,l;for(s=r?e.explicitTypes:e.implicitTypes,a=0,o=s.length;a<o;a+=1)if(n=s[a],(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,Dd.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(Rd.call(n.represent,l))i=n.represent[l](t,l);else throw new ie("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}f(Ho,"detectType");function $e(e,t,r,i,s,a,o){e.tag=null,e.dump=r,Ho(e,r,!1)||Ho(e,r,!0);var n=Dd.call(e.dump),l=i,h;i&&(i=e.flowLevel<0||e.flowLevel>t);var c=n==="[object Object]"||n==="[object Array]",u,p;if(c&&(u=e.duplicates.indexOf(r),p=u!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(s=!1),p&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(c&&p&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(sp(e,t,e.dump,s),p&&(e.dump="&ref_"+u+e.dump)):(ip(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?zo(e,t-1,e.dump,s):zo(e,t,e.dump,s),p&&(e.dump="&ref_"+u+e.dump)):(rp(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&Jd(e,e.dump,t,a,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ie("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}f($e,"writeNode");function ap(e,t){var r=[],i=[],s,a;for(ia(e,r,i),s=0,a=i.length;s<a;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(a)}f(ap,"getDuplicateReferences");function ia(e,t,r){var i,s,a;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,a=e.length;s<a;s+=1)ia(e[s],t,r);else for(i=Object.keys(e),s=0,a=i.length;s<a;s+=1)ia(e[i[s]],t,r)}f(ia,"inspectNode");function p1(e,t){t=t||{};var r=new Ud(t);r.noRefs||ap(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),$e(r,0,i,!0,!0)?r.dump+`
156
+ `:""}f(p1,"dump$1");function f1(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(f1,"renamed");var g1=Zu,m1=jk.load;/*! Bundled license information:
157
157
 
158
158
  js-yaml/dist/js-yaml.mjs:
159
159
  (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
160
- */var ki=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"),Ut={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},gh={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Mi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Bt(e),t=Bt(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],o=s-r,n=a-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}f(Mi,"calculateDeltaAndAngle");var Bt=f(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),C1=f(e=>({x:f(function(t,r,i){let s=0;const a=Bt(i[0]).x<Bt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Ut,e.arrowTypeStart)){const{angle:d,deltaX:g}=Mi(i[0],i[1]);s=Ut[e.arrowTypeStart]*Math.cos(d)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ut,e.arrowTypeEnd)){const{angle:d,deltaX:g}=Mi(i[i.length-1],i[i.length-2]);s=Ut[e.arrowTypeEnd]*Math.cos(d)*(g>=0?1:-1)}const o=Math.abs(Bt(t).x-Bt(i[i.length-1]).x),n=Math.abs(Bt(t).y-Bt(i[i.length-1]).y),l=Math.abs(Bt(t).x-Bt(i[0]).x),h=Math.abs(Bt(t).y-Bt(i[0]).y),c=Ut[e.arrowTypeStart],u=Ut[e.arrowTypeEnd],p=1;if(o<u&&o>0&&n<u){let d=u+p-o;d*=a==="right"?-1:1,s-=d}if(l<c&&l>0&&h<c){let d=c+p-l;d*=a==="right"?-1:1,s+=d}return Bt(t).x+s},"x"),y:f(function(t,r,i){let s=0;const a=Bt(i[0]).y<Bt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Ut,e.arrowTypeStart)){const{angle:d,deltaY:g}=Mi(i[0],i[1]);s=Ut[e.arrowTypeStart]*Math.abs(Math.sin(d))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ut,e.arrowTypeEnd)){const{angle:d,deltaY:g}=Mi(i[i.length-1],i[i.length-2]);s=Ut[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(g>=0?1:-1)}const o=Math.abs(Bt(t).y-Bt(i[i.length-1]).y),n=Math.abs(Bt(t).x-Bt(i[i.length-1]).x),l=Math.abs(Bt(t).y-Bt(i[0]).y),h=Math.abs(Bt(t).x-Bt(i[0]).x),c=Ut[e.arrowTypeStart],u=Ut[e.arrowTypeEnd],p=1;if(o<u&&o>0&&n<u){let d=u+p-o;d*=a==="up"?-1:1,s-=d}if(l<c&&l>0&&h<c){let d=c+p-l;d*=a==="up"?-1:1,s+=d}return Bt(t).y+s},"y")}),"getLineFunctionsWithOffset"),Cs={},It={},mh;function x1(){return mh||(mh=1,Object.defineProperty(It,"__esModule",{value:!0}),It.BLANK_URL=It.relativeFirstCharacters=It.whitespaceEscapeCharsRegex=It.urlSchemeRegex=It.ctrlCharactersRegex=It.htmlCtrlEntityRegex=It.htmlEntitiesRegex=It.invalidProtocolRegex=void 0,It.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,It.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,It.htmlCtrlEntityRegex=/&(newline|tab);/gi,It.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,It.urlSchemeRegex=/^.+(:|&colon;)/gim,It.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,It.relativeFirstCharacters=[".","/"],It.BLANK_URL="about:blank"),It}var yh;function b1(){if(yh)return Cs;yh=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.sanitizeUrl=a;var e=x1();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,h){return String.fromCharCode(h)})}function i(o){return URL.canParse(o)}function s(o){try{return decodeURIComponent(o)}catch{return o}}function a(o){if(!o)return e.BLANK_URL;var n,l=s(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var h=l;if(!h)return e.BLANK_URL;if(t(h))return h;var c=h.trimStart(),u=c.match(e.urlSchemeRegex);if(!u)return h;var p=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(p))return e.BLANK_URL;var d=c.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 Cs}var k1=b1();function to(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function T1(){}function op(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function In(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const S1="[object RegExp]",np="[object String]",lp="[object Number]",hp="[object Boolean]",cp="[object Arguments]",w1="[object Symbol]",_1="[object Date]",B1="[object Map]",v1="[object Set]",L1="[object Array]",F1="[object ArrayBuffer]",A1="[object Object]",E1="[object DataView]",M1="[object Uint8Array]",$1="[object Uint8ClampedArray]",O1="[object Uint16Array]",I1="[object Uint32Array]",D1="[object Int8Array]",R1="[object Int16Array]",P1="[object Int32Array]",N1="[object Float32Array]",q1="[object Float64Array]",Ch=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")();function Dn(e){return typeof Ch.Buffer<"u"&&Ch.Buffer.isBuffer(e)}function W1(e){return Number.isSafeInteger(e)&&e>=0}function up(e){return e!=null&&typeof e!="function"&&W1(e.length)}function z1(e){return e==="__proto__"}function Rn(e){return e==null||typeof e!="object"&&typeof e!="function"}function Pn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function H1(e,t){return Hr(e,void 0,e,new Map,t)}function Hr(e,t,r,i=new Map,s=void 0){const a=s==null?void 0:s(e,t,r,i);if(a!==void 0)return a;if(Rn(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const o=new Array(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Hr(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;i.set(e,o);for(const[n,l]of e)o.set(n,Hr(l,n,r,i,s));return o}if(e instanceof Set){const o=new Set;i.set(e,o);for(const n of e)o.add(Hr(n,void 0,r,i,s));return o}if(Dn(e))return e.subarray();if(Pn(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Hr(e[n],n,r,i,s);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,o),ge(o,e,r,i,s),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return i.set(e,o),ge(o,e,r,i,s),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return i.set(e,o),ge(o,e,r,i,s),o}if(e instanceof Error){const o=structuredClone(e);return i.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,ge(o,e,r,i,s),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return i.set(e,o),ge(o,e,r,i,s),o}if(e instanceof Number){const o=new Number(e.valueOf());return i.set(e,o),ge(o,e,r,i,s),o}if(e instanceof String){const o=new String(e.valueOf());return i.set(e,o),ge(o,e,r,i,s),o}if(typeof e=="object"&&Y1(e)){const o=Object.create(Object.getPrototypeOf(e));return i.set(e,o),ge(o,e,r,i,s),o}return e}function ge(e,t,r=e,i,s){const a=[...Object.keys(t),...op(t)];for(let o=0;o<a.length;o++){const n=a[o],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Hr(t[n],n,r,i,s))}}function Y1(e){switch(In(e)){case cp:case L1:case F1:case E1:case hp:case _1:case N1:case q1:case D1:case R1:case P1:case B1:case lp:case A1:case S1:case v1:case np:case w1:case M1:case $1:case O1:case I1:return!0;default:return!1}}function U1(e,t){return H1(e,(r,i,s,a)=>{if(typeof e=="object"){if(In(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return a.set(e,o),ge(o,e,s,a),o}switch(Object.prototype.toString.call(e)){case lp:case np:case hp:{const o=new e.constructor(e==null?void 0:e.valueOf());return ge(o,e),o}case cp:{const o={};return ge(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function xh(e){return U1(e)}function Yo(e){return e!==null&&typeof e=="object"&&In(e)==="[object Arguments]"}function Uo(e){return typeof e=="object"&&e!==null}function G1(e){return Uo(e)&&up(e)}function is(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);const o=e.apply(this,i);return r.cache=a.set(s,o)||a,o};return r.cache=new(is.Cache||Map),r}is.Cache=Map;function Os(e){return Pn(e)}function j1(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function X1(e){if(Rn(e))return e;if(Array.isArray(e)||Pn(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function V1(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;a<r.length;a++){const o=r[a];s=Is(s,o,i,new Map)}return s}function Is(e,t,r,i){if(Rn(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return X1(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const s=[...Object.keys(t),...op(t)];for(let a=0;a<s.length;a++){const o=s[a];if(z1(o))continue;let n=t[o],l=e[o];if(Yo(n)&&(n={...n}),Yo(l)&&(l={...l}),Dn(n)&&(n=xh(n)),Array.isArray(n))if(Array.isArray(l)){const c=[],u=Reflect.ownKeys(l);for(let p=0;p<u.length;p++){const d=u[p];c[d]=l[d]}l=c}else if(G1(l)){const c=[];for(let u=0;u<l.length;u++)c[u]=l[u];l=c}else l=[];const h=r(l,n,o,e,t,i);h!==void 0?e[o]=h:Array.isArray(n)||Uo(l)&&Uo(n)&&(to(l)||to(n)||Os(l)||Os(n))?e[o]=Is(l,n,r,i):l==null&&to(n)?e[o]=Is({},n,r,i):l==null&&Os(n)?e[o]=xh(n):(l===void 0||n!==void 0)&&(e[o]=n)}return e}function Z1(e,...t){return V1(e,...t,T1)}function bh(e){if(e==null)return!0;if(up(e))return typeof e.splice!="function"&&typeof e!="string"&&!Dn(e)&&!Os(e)&&!Yo(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return j1(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var K1="​",Q1={curveBasis:Lo,curveBasisClosed:rk,curveBasisOpen:ik,curveBumpX:au,curveBumpY:ou,curveBundle:sk,curveCardinalClosed:ak,curveCardinalOpen:ok,curveCardinal:cu,curveCatmullRomClosed:nk,curveCatmullRomOpen:lk,curveCatmullRom:du,curveLinear:Ni,curveLinearClosed:hk,curveMonotoneX:Cu,curveMonotoneY:xu,curveNatural:ku,curveStep:Tu,curveStepAfter:wu,curveStepBefore:Su},J1=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,t2=f(function(e,t){const r=dp(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);Ps(o),i=Dt(i,[...o])}else i=r.args;if(!i)return;let s=hn(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),dp=f(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${J1.source})(?=[}][%]{2}).*
161
- `,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),z.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=Ri.exec(e))!==null;)if(a.index===Ri.lastIndex&&Ri.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const n=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:n,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(s){return z.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),e2=f(function(e){return e.replace(Ri,"")},"removeDirectives"),r2=f(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Nn(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Q1[r]??t}f(Nn,"interpolateToCurve");function pp(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?k1.sanitizeUrl(r):r}f(pp,"formatUrl");var i2=f((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){z.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function qn(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}f(qn,"distance");function fp(e){let t,r=0;e.forEach(s=>{r+=qn(s,t),t=s});const i=r/2;return Wn(e,i)}f(fp,"traverseEdge");function gp(e){return e.length===1?e[0]:fp(e)}f(gp,"calcLabelPosition");var kh=f((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Wn=f((e,t)=>{let r,i=t;for(const s of e){if(r){const a=qn(s,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:s.x,y:s.y};if(o>0&&o<1)return{x:kh((1-o)*r.x+o*s.x,5),y:kh((1-o)*r.y+o*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),s2=f((e,t,r)=>{z.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=Wn(t,25),a=e?10:5,o=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(o)*a+(t[0].x+s.x)/2,n.y=-Math.cos(o)*a+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function mp(e,t,r){const i=structuredClone(r);z.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=Wn(i,s),o=10+e*.5,n=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2),l}f(mp,"calcTerminalLabelPosition");function yp(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(yp,"getStylesFromArray");var Th=0,a2=f(()=>(Th++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Th),"generateId");function Cp(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}f(Cp,"makeRandomHex");var o2=f(e=>Cp(e.length),"random"),n2=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"),l2=f(function(e,t){const r=t.text.replace(Ji.lineBreakRegex," "),[,i]=wa(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),h2=is((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ji.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((o,n)=>{const l=Ue(`${o} `,r),h=Ue(a,r);if(l>t){const{hyphenatedStrings:p,remainingWord:d}=c2(o,t,"-",r);s.push(a,...p),a=d}else h+l>=t?(s.push(a),a=o):a=[a,o].filter(Boolean).join(" ");n+1===i.length&&s.push(a)}),s.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),c2=is((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let o="";return s.forEach((n,l)=>{const h=`${o}${n}`;if(Ue(h,i)>=t){const u=l+1,p=s.length===u,d=`${h}${r}`;a.push(p?h:d),o=""}else o=h}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function xp(e,t){return zn(e,t).height}f(xp,"calculateTextHeight");function Ue(e,t){return zn(e,t).width}f(Ue,"calculateTextWidth");var zn=is((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=wa(r),o=["sans-serif",i],n=e.split(Ji.lineBreakRegex),l=[],h=ht("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.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=n2();y.text=m||K1;const C=l2(c,y).style("font-size",a).style("font-weight",s).style("font-family",p),b=(C._groups||C)[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)}c.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}`),ai,u2=(ai=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},f(ai,"InitIDGenerator"),ai),xs,d2=f(function(e){return xs=xs||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),xs.innerHTML=e,unescape(xs.textContent)},"entityDecode");function Hn(e){return"str"in e}f(Hn,"isDetailedError");var p2=f((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),wa=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 Yn(e,t){return Z1({},e,t)}f(Yn,"cleanAndMerge");var xe={assignWithDepth:Dt,wrapLabel:h2,calculateTextHeight:xp,calculateTextWidth:Ue,calculateTextDimensions:zn,cleanAndMerge:Yn,detectInit:t2,detectDirective:dp,isSubstringInArray:r2,interpolateToCurve:Nn,calcLabelPosition:gp,calcCardinalityPosition:s2,calcTerminalLabelPosition:mp,formatUrl:pp,getStylesFromArray:yp,generateId:a2,random:o2,runFunc:i2,entityDecode:d2,insertTitle:p2,isLabelCoordinateInPath:bp,parseFontSize:wa,InitIDGenerator:u2},f2=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"),Tr=f(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),yv=f((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function Nt(e){return e??null}f(Nt,"handleUndefinedAttr");function bp(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}f(bp,"isLabelCoordinateInPath");var Un=f(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function kp(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(s=>new Promise(a=>{function o(){if(s.style.display="flex",s.style.flexDirection="column",i){const n=yt().fontSize?yt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[h=yc.fontSize]=wa(n),c=h*l+"px";s.style.minWidth=c,s.style.maxWidth=c}else s.style.width="100%";a(s)}f(o,"setupImage"),setTimeout(()=>{s.complete&&o()}),s.addEventListener("error",o),s.addEventListener("load",o)})))}f(kp,"configureLabelImages");var g2=f(e=>{const{handDrawnSeed:t}=yt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),di=f(e=>{const t=m2([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),m2=f(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),Tp=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"),Z=f(e=>{const{stylesArray:t}=di(e),r=[],i=[],s=[],a=[];return t.forEach(o=>{const n=o[0];Tp(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&s.push(o.join(":")+" !important"),n==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),V=f((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=yt(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:o}=di(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||s,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:y2(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),y2=f(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const C2=Object.freeze({left:0,top:0,width:16,height:16}),sa=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Sp=Object.freeze({...C2,...sa}),x2=Object.freeze({...Sp,body:"",hidden:!1}),b2=Object.freeze({width:null,height:null}),k2=Object.freeze({...b2,...sa}),T2=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),h={provider:s.length>0?s[0]:i,prefix:l,name:n};return eo(h)?h:null}const a=s[0],o=a.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return eo(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:a};return eo(n,r)?n:null}return null},eo=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function S2(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 Sh(e,t){const r=S2(e,t);for(const i in x2)i in sa?i in e&&!(i in r)&&(r[i]=sa[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function w2(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(o){if(r[o])return s[o]=[];if(!(o in s)){s[o]=null;const n=i[o]&&i[o].parent,l=n&&a(n);l&&(s[o]=[n].concat(l))}return s[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function wh(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function o(n){a=Sh(i[n]||s[n],a)}return o(t),r.forEach(o),Sh(e,a)}function _2(e,t){if(e.icons[t])return wh(e,t,[]);const r=w2(e,[t])[t];return r?wh(e,t,r):null}const B2=/(-?[0-9.]*[0-9]+[0-9.]*)/g,v2=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function _h(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(B2);if(i===null||!i.length)return e;const s=[];let a=i.shift(),o=v2.test(a);for(;;){if(o){const n=parseFloat(a);isNaN(n)?s.push(a):s.push(Math.ceil(n*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");o=!o}}function L2(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function F2(e,t){return e?"<defs>"+e+"</defs>"+t:t}function A2(e,t,r){const i=L2(e);return F2(i.defs,t+i.content+r)}const E2=e=>e==="unset"||e==="undefined"||e==="none";function M2(e,t){const r={...Sp,...e},i={...k2,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const y=[],C=m.hFlip,b=m.vFlip;let k=m.rotate;C?b?k+=2:(y.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),y.push("scale(-1 1)"),s.top=s.left=0):b&&(y.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),y.push("scale(1 -1)"),s.top=s.left=0);let _;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:_=s.height/2+s.top,y.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:y.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:_=s.width/2+s.left,y.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")");break}k%2===1&&(s.left!==s.top&&(_=s.left,s.left=s.top,s.top=_),s.width!==s.height&&(_=s.width,s.width=s.height,s.height=_)),y.length&&(a=A2(a,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=s.width,h=s.height;let c,u;o===null?(u=n===null?"1em":n==="auto"?h:n,c=_h(u,l/h)):(c=o==="auto"?l:o,u=n===null?_h(c,h/l):n==="auto"?h:n);const p={},d=(m,y)=>{E2(y)||(p[m]=y.toString())};d("width",c),d("height",u);const g=[s.left,s.top,l,h];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:a}}const $2=/\sid="(\S+)"/g,Bh=new Map;function O2(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Bh.get(e)||0;return Bh.set(e,t+1),t?`${e}${t}`:e}function I2(e){const t=[];let r;for(;r=$2.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=O2(s),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function D2(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 Gn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var _r=Gn();function wp(e){_r=e}var qi={exec:()=>null};function Ct(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(Kt.caret,"$1"),r=r.replace(s,o),i},getRegex:()=>new RegExp(r,t)};return i}var R2=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Kt={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")},P2=/^(?:[ \t]*(?:\n|$))+/,N2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,q2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ss=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,W2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,jn=/(?:[*+-]|\d{1,9}[.)])/,_p=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Bp=Ct(_p).replace(/bull/g,jn).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(),z2=Ct(_p).replace(/bull/g,jn).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(),Xn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,H2=/^[^\n]+/,Vn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Y2=Ct(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Vn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),U2=Ct(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,jn).getRegex(),_a="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",Zn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,G2=Ct("^ {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",Zn).replace("tag",_a).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),vp=Ct(Xn).replace("hr",ss).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",_a).getRegex(),j2=Ct(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",vp).getRegex(),Kn={blockquote:j2,code:N2,def:Y2,fences:q2,heading:W2,hr:ss,html:G2,lheading:Bp,list:U2,newline:P2,paragraph:vp,table:qi,text:H2},vh=Ct("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ss).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",_a).getRegex(),X2={...Kn,lheading:z2,table:vh,paragraph:Ct(Xn).replace("hr",ss).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",vh).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",_a).getRegex()},V2={...Kn,html:Ct(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Zn).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:qi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ct(Xn).replace("hr",ss).replace("heading",` *#{1,6} *[^
162
- ]`).replace("lheading",Bp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Z2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,K2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Lp=/^( {2,}|\\)\n(?!\s*$)/,Q2=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ba=/[\p{P}\p{S}]/u,Qn=/[\s\p{P}\p{S}]/u,Fp=/[^\s\p{P}\p{S}]/u,J2=Ct(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Qn).getRegex(),Ap=/(?!~)[\p{P}\p{S}]/u,tT=/(?!~)[\s\p{P}\p{S}]/u,eT=/(?:[^\s\p{P}\p{S}]|~)/u,rT=Ct(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",R2?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Ep=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,iT=Ct(Ep,"u").replace(/punct/g,Ba).getRegex(),sT=Ct(Ep,"u").replace(/punct/g,Ap).getRegex(),Mp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",aT=Ct(Mp,"gu").replace(/notPunctSpace/g,Fp).replace(/punctSpace/g,Qn).replace(/punct/g,Ba).getRegex(),oT=Ct(Mp,"gu").replace(/notPunctSpace/g,eT).replace(/punctSpace/g,tT).replace(/punct/g,Ap).getRegex(),nT=Ct("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Fp).replace(/punctSpace/g,Qn).replace(/punct/g,Ba).getRegex(),lT=Ct(/\\(punct)/,"gu").replace(/punct/g,Ba).getRegex(),hT=Ct(/^<(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(),cT=Ct(Zn).replace("(?:-->|$)","-->").getRegex(),uT=Ct("^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",cT).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),aa=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,dT=Ct(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",aa).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),$p=Ct(/^!?\[(label)\]\[(ref)\]/).replace("label",aa).replace("ref",Vn).getRegex(),Op=Ct(/^!?\[(ref)\](?:\[\])?/).replace("ref",Vn).getRegex(),pT=Ct("reflink|nolink(?!\\()","g").replace("reflink",$p).replace("nolink",Op).getRegex(),Lh=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Jn={_backpedal:qi,anyPunctuation:lT,autolink:hT,blockSkip:rT,br:Lp,code:K2,del:qi,emStrongLDelim:iT,emStrongRDelimAst:aT,emStrongRDelimUnd:nT,escape:Z2,link:dT,nolink:Op,punctuation:J2,reflink:$p,reflinkSearch:pT,tag:uT,text:Q2,url:qi},fT={...Jn,link:Ct(/^!?\[(label)\]\((.*?)\)/).replace("label",aa).getRegex(),reflink:Ct(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",aa).getRegex()},Go={...Jn,emStrongRDelimAst:oT,emStrongLDelim:sT,url:Ct(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Lh).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:Ct(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Lh).getRegex()},gT={...Go,br:Ct(Lp).replace("{2,}","*").getRegex(),text:Ct(Go.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},bs={normal:Kn,gfm:X2,pedantic:V2},Ti={normal:Jn,gfm:Go,breaks:gT,pedantic:fT},mT={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Fh=e=>mT[e];function Fe(e,t){if(t){if(Kt.escapeTest.test(e))return e.replace(Kt.escapeReplace,Fh)}else if(Kt.escapeTestNoEncode.test(e))return e.replace(Kt.escapeReplaceNoEncode,Fh);return e}function Ah(e){try{e=encodeURI(e).replace(Kt.percentDecode,"%")}catch{return null}return e}function Eh(e,t){var a;let r=e.replace(Kt.findPipe,(o,n,l)=>{let h=!1,c=n;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(Kt.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(Kt.slashPipe,"|");return i}function Si(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function yT(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 Mh(e,t,r,i,s){let a=t.href,o=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function CT(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
160
+ */var ki=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"),Ut={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},gh={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Mi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Bt(e),t=Bt(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],o=s-r,n=a-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}f(Mi,"calculateDeltaAndAngle");var Bt=f(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),y1=f(e=>({x:f(function(t,r,i){let s=0;const a=Bt(i[0]).x<Bt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Ut,e.arrowTypeStart)){const{angle:d,deltaX:g}=Mi(i[0],i[1]);s=Ut[e.arrowTypeStart]*Math.cos(d)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ut,e.arrowTypeEnd)){const{angle:d,deltaX:g}=Mi(i[i.length-1],i[i.length-2]);s=Ut[e.arrowTypeEnd]*Math.cos(d)*(g>=0?1:-1)}const o=Math.abs(Bt(t).x-Bt(i[i.length-1]).x),n=Math.abs(Bt(t).y-Bt(i[i.length-1]).y),l=Math.abs(Bt(t).x-Bt(i[0]).x),h=Math.abs(Bt(t).y-Bt(i[0]).y),c=Ut[e.arrowTypeStart],u=Ut[e.arrowTypeEnd],p=1;if(o<u&&o>0&&n<u){let d=u+p-o;d*=a==="right"?-1:1,s-=d}if(l<c&&l>0&&h<c){let d=c+p-l;d*=a==="right"?-1:1,s+=d}return Bt(t).x+s},"x"),y:f(function(t,r,i){let s=0;const a=Bt(i[0]).y<Bt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Ut,e.arrowTypeStart)){const{angle:d,deltaY:g}=Mi(i[0],i[1]);s=Ut[e.arrowTypeStart]*Math.abs(Math.sin(d))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ut,e.arrowTypeEnd)){const{angle:d,deltaY:g}=Mi(i[i.length-1],i[i.length-2]);s=Ut[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(g>=0?1:-1)}const o=Math.abs(Bt(t).y-Bt(i[i.length-1]).y),n=Math.abs(Bt(t).x-Bt(i[i.length-1]).x),l=Math.abs(Bt(t).y-Bt(i[0]).y),h=Math.abs(Bt(t).x-Bt(i[0]).x),c=Ut[e.arrowTypeStart],u=Ut[e.arrowTypeEnd],p=1;if(o<u&&o>0&&n<u){let d=u+p-o;d*=a==="up"?-1:1,s-=d}if(l<c&&l>0&&h<c){let d=c+p-l;d*=a==="up"?-1:1,s+=d}return Bt(t).y+s},"y")}),"getLineFunctionsWithOffset"),Cs={},It={},mh;function C1(){return mh||(mh=1,Object.defineProperty(It,"__esModule",{value:!0}),It.BLANK_URL=It.relativeFirstCharacters=It.whitespaceEscapeCharsRegex=It.urlSchemeRegex=It.ctrlCharactersRegex=It.htmlCtrlEntityRegex=It.htmlEntitiesRegex=It.invalidProtocolRegex=void 0,It.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,It.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,It.htmlCtrlEntityRegex=/&(newline|tab);/gi,It.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,It.urlSchemeRegex=/^.+(:|&colon;)/gim,It.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,It.relativeFirstCharacters=[".","/"],It.BLANK_URL="about:blank"),It}var yh;function x1(){if(yh)return Cs;yh=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.sanitizeUrl=a;var e=C1();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,h){return String.fromCharCode(h)})}function i(o){return URL.canParse(o)}function s(o){try{return decodeURIComponent(o)}catch{return o}}function a(o){if(!o)return e.BLANK_URL;var n,l=s(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var h=l;if(!h)return e.BLANK_URL;if(t(h))return h;var c=h.trimStart(),u=c.match(e.urlSchemeRegex);if(!u)return h;var p=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(p))return e.BLANK_URL;var d=c.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 Cs}var b1=x1();function to(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function k1(){}function op(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function In(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const T1="[object RegExp]",np="[object String]",lp="[object Number]",hp="[object Boolean]",cp="[object Arguments]",S1="[object Symbol]",w1="[object Date]",_1="[object Map]",B1="[object Set]",v1="[object Array]",L1="[object ArrayBuffer]",F1="[object Object]",A1="[object DataView]",E1="[object Uint8Array]",M1="[object Uint8ClampedArray]",$1="[object Uint16Array]",O1="[object Uint32Array]",I1="[object Int8Array]",D1="[object Int16Array]",R1="[object Int32Array]",P1="[object Float32Array]",N1="[object Float64Array]",Ch=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")();function Dn(e){return typeof Ch.Buffer<"u"&&Ch.Buffer.isBuffer(e)}function q1(e){return Number.isSafeInteger(e)&&e>=0}function up(e){return e!=null&&typeof e!="function"&&q1(e.length)}function W1(e){return e==="__proto__"}function Rn(e){return e==null||typeof e!="object"&&typeof e!="function"}function Pn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function z1(e,t){return Hr(e,void 0,e,new Map,t)}function Hr(e,t,r,i=new Map,s=void 0){const a=s==null?void 0:s(e,t,r,i);if(a!==void 0)return a;if(Rn(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const o=new Array(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Hr(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;i.set(e,o);for(const[n,l]of e)o.set(n,Hr(l,n,r,i,s));return o}if(e instanceof Set){const o=new Set;i.set(e,o);for(const n of e)o.add(Hr(n,void 0,r,i,s));return o}if(Dn(e))return e.subarray();if(Pn(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Hr(e[n],n,r,i,s);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,o),ge(o,e,r,i,s),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return i.set(e,o),ge(o,e,r,i,s),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return i.set(e,o),ge(o,e,r,i,s),o}if(e instanceof Error){const o=structuredClone(e);return i.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,ge(o,e,r,i,s),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return i.set(e,o),ge(o,e,r,i,s),o}if(e instanceof Number){const o=new Number(e.valueOf());return i.set(e,o),ge(o,e,r,i,s),o}if(e instanceof String){const o=new String(e.valueOf());return i.set(e,o),ge(o,e,r,i,s),o}if(typeof e=="object"&&H1(e)){const o=Object.create(Object.getPrototypeOf(e));return i.set(e,o),ge(o,e,r,i,s),o}return e}function ge(e,t,r=e,i,s){const a=[...Object.keys(t),...op(t)];for(let o=0;o<a.length;o++){const n=a[o],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Hr(t[n],n,r,i,s))}}function H1(e){switch(In(e)){case cp:case v1:case L1:case A1:case hp:case w1:case P1:case N1:case I1:case D1:case R1:case _1:case lp:case F1:case T1:case B1:case np:case S1:case E1:case M1:case $1:case O1:return!0;default:return!1}}function Y1(e,t){return z1(e,(r,i,s,a)=>{if(typeof e=="object"){if(In(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return a.set(e,o),ge(o,e,s,a),o}switch(Object.prototype.toString.call(e)){case lp:case np:case hp:{const o=new e.constructor(e==null?void 0:e.valueOf());return ge(o,e),o}case cp:{const o={};return ge(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function xh(e){return Y1(e)}function Yo(e){return e!==null&&typeof e=="object"&&In(e)==="[object Arguments]"}function Uo(e){return typeof e=="object"&&e!==null}function U1(e){return Uo(e)&&up(e)}function is(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);const o=e.apply(this,i);return r.cache=a.set(s,o)||a,o};return r.cache=new(is.Cache||Map),r}is.Cache=Map;function Os(e){return Pn(e)}function G1(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function j1(e){if(Rn(e))return e;if(Array.isArray(e)||Pn(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function X1(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;a<r.length;a++){const o=r[a];s=Is(s,o,i,new Map)}return s}function Is(e,t,r,i){if(Rn(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return j1(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const s=[...Object.keys(t),...op(t)];for(let a=0;a<s.length;a++){const o=s[a];if(W1(o))continue;let n=t[o],l=e[o];if(Yo(n)&&(n={...n}),Yo(l)&&(l={...l}),Dn(n)&&(n=xh(n)),Array.isArray(n))if(Array.isArray(l)){const c=[],u=Reflect.ownKeys(l);for(let p=0;p<u.length;p++){const d=u[p];c[d]=l[d]}l=c}else if(U1(l)){const c=[];for(let u=0;u<l.length;u++)c[u]=l[u];l=c}else l=[];const h=r(l,n,o,e,t,i);h!==void 0?e[o]=h:Array.isArray(n)||Uo(l)&&Uo(n)&&(to(l)||to(n)||Os(l)||Os(n))?e[o]=Is(l,n,r,i):l==null&&to(n)?e[o]=Is({},n,r,i):l==null&&Os(n)?e[o]=xh(n):(l===void 0||n!==void 0)&&(e[o]=n)}return e}function V1(e,...t){return X1(e,...t,k1)}function bh(e){if(e==null)return!0;if(up(e))return typeof e.splice!="function"&&typeof e!="string"&&!Dn(e)&&!Os(e)&&!Yo(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return G1(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var Z1="​",K1={curveBasis:Lo,curveBasisClosed:ek,curveBasisOpen:rk,curveBumpX:au,curveBumpY:ou,curveBundle:ik,curveCardinalClosed:sk,curveCardinalOpen:ak,curveCardinal:cu,curveCatmullRomClosed:ok,curveCatmullRomOpen:nk,curveCatmullRom:du,curveLinear:Ni,curveLinearClosed:lk,curveMonotoneX:Cu,curveMonotoneY:xu,curveNatural:ku,curveStep:Tu,curveStepAfter:wu,curveStepBefore:Su},Q1=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,J1=f(function(e,t){const r=dp(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);Ps(o),i=Dt(i,[...o])}else i=r.args;if(!i)return;let s=hn(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),dp=f(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${Q1.source})(?=[}][%]{2}).*
161
+ `,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),z.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=Ri.exec(e))!==null;)if(a.index===Ri.lastIndex&&Ri.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const n=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:n,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(s){return z.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),t2=f(function(e){return e.replace(Ri,"")},"removeDirectives"),e2=f(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Nn(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return K1[r]??t}f(Nn,"interpolateToCurve");function pp(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?b1.sanitizeUrl(r):r}f(pp,"formatUrl");var r2=f((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){z.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function qn(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}f(qn,"distance");function fp(e){let t,r=0;e.forEach(s=>{r+=qn(s,t),t=s});const i=r/2;return Wn(e,i)}f(fp,"traverseEdge");function gp(e){return e.length===1?e[0]:fp(e)}f(gp,"calcLabelPosition");var kh=f((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Wn=f((e,t)=>{let r,i=t;for(const s of e){if(r){const a=qn(s,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:s.x,y:s.y};if(o>0&&o<1)return{x:kh((1-o)*r.x+o*s.x,5),y:kh((1-o)*r.y+o*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),i2=f((e,t,r)=>{z.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=Wn(t,25),a=e?10:5,o=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(o)*a+(t[0].x+s.x)/2,n.y=-Math.cos(o)*a+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function mp(e,t,r){const i=structuredClone(r);z.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=Wn(i,s),o=10+e*.5,n=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2),l}f(mp,"calcTerminalLabelPosition");function yp(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(yp,"getStylesFromArray");var Th=0,s2=f(()=>(Th++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Th),"generateId");function Cp(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}f(Cp,"makeRandomHex");var a2=f(e=>Cp(e.length),"random"),o2=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"),n2=f(function(e,t){const r=t.text.replace(Ji.lineBreakRegex," "),[,i]=wa(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),l2=is((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ji.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((o,n)=>{const l=Ue(`${o} `,r),h=Ue(a,r);if(l>t){const{hyphenatedStrings:p,remainingWord:d}=h2(o,t,"-",r);s.push(a,...p),a=d}else h+l>=t?(s.push(a),a=o):a=[a,o].filter(Boolean).join(" ");n+1===i.length&&s.push(a)}),s.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),h2=is((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let o="";return s.forEach((n,l)=>{const h=`${o}${n}`;if(Ue(h,i)>=t){const u=l+1,p=s.length===u,d=`${h}${r}`;a.push(p?h:d),o=""}else o=h}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function xp(e,t){return zn(e,t).height}f(xp,"calculateTextHeight");function Ue(e,t){return zn(e,t).width}f(Ue,"calculateTextWidth");var zn=is((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=wa(r),o=["sans-serif",i],n=e.split(Ji.lineBreakRegex),l=[],h=ht("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.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=o2();y.text=m||Z1;const C=n2(c,y).style("font-size",a).style("font-weight",s).style("font-family",p),b=(C._groups||C)[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)}c.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}`),ai,c2=(ai=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},f(ai,"InitIDGenerator"),ai),xs,u2=f(function(e){return xs=xs||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),xs.innerHTML=e,unescape(xs.textContent)},"entityDecode");function Hn(e){return"str"in e}f(Hn,"isDetailedError");var d2=f((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),wa=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 Yn(e,t){return V1({},e,t)}f(Yn,"cleanAndMerge");var xe={assignWithDepth:Dt,wrapLabel:l2,calculateTextHeight:xp,calculateTextWidth:Ue,calculateTextDimensions:zn,cleanAndMerge:Yn,detectInit:J1,detectDirective:dp,isSubstringInArray:e2,interpolateToCurve:Nn,calcLabelPosition:gp,calcCardinalityPosition:i2,calcTerminalLabelPosition:mp,formatUrl:pp,getStylesFromArray:yp,generateId:s2,random:a2,runFunc:r2,entityDecode:u2,insertTitle:d2,isLabelCoordinateInPath:bp,parseFontSize:wa,InitIDGenerator:c2},p2=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"),Tr=f(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),mv=f((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function Nt(e){return e??null}f(Nt,"handleUndefinedAttr");function bp(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}f(bp,"isLabelCoordinateInPath");var Un=f(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function kp(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(s=>new Promise(a=>{function o(){if(s.style.display="flex",s.style.flexDirection="column",i){const n=yt().fontSize?yt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[h=yc.fontSize]=wa(n),c=h*l+"px";s.style.minWidth=c,s.style.maxWidth=c}else s.style.width="100%";a(s)}f(o,"setupImage"),setTimeout(()=>{s.complete&&o()}),s.addEventListener("error",o),s.addEventListener("load",o)})))}f(kp,"configureLabelImages");var f2=f(e=>{const{handDrawnSeed:t}=yt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),di=f(e=>{const t=g2([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),g2=f(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),Tp=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"),Z=f(e=>{const{stylesArray:t}=di(e),r=[],i=[],s=[],a=[];return t.forEach(o=>{const n=o[0];Tp(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&s.push(o.join(":")+" !important"),n==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),V=f((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=yt(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:o}=di(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||s,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:m2(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),m2=f(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const y2=Object.freeze({left:0,top:0,width:16,height:16}),sa=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Sp=Object.freeze({...y2,...sa}),C2=Object.freeze({...Sp,body:"",hidden:!1}),x2=Object.freeze({width:null,height:null}),b2=Object.freeze({...x2,...sa}),k2=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),h={provider:s.length>0?s[0]:i,prefix:l,name:n};return eo(h)?h:null}const a=s[0],o=a.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return eo(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:a};return eo(n,r)?n:null}return null},eo=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function T2(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 Sh(e,t){const r=T2(e,t);for(const i in C2)i in sa?i in e&&!(i in r)&&(r[i]=sa[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function S2(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(o){if(r[o])return s[o]=[];if(!(o in s)){s[o]=null;const n=i[o]&&i[o].parent,l=n&&a(n);l&&(s[o]=[n].concat(l))}return s[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function wh(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function o(n){a=Sh(i[n]||s[n],a)}return o(t),r.forEach(o),Sh(e,a)}function w2(e,t){if(e.icons[t])return wh(e,t,[]);const r=S2(e,[t])[t];return r?wh(e,t,r):null}const _2=/(-?[0-9.]*[0-9]+[0-9.]*)/g,B2=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function _h(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(_2);if(i===null||!i.length)return e;const s=[];let a=i.shift(),o=B2.test(a);for(;;){if(o){const n=parseFloat(a);isNaN(n)?s.push(a):s.push(Math.ceil(n*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");o=!o}}function v2(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function L2(e,t){return e?"<defs>"+e+"</defs>"+t:t}function F2(e,t,r){const i=v2(e);return L2(i.defs,t+i.content+r)}const A2=e=>e==="unset"||e==="undefined"||e==="none";function E2(e,t){const r={...Sp,...e},i={...b2,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const y=[],C=m.hFlip,b=m.vFlip;let k=m.rotate;C?b?k+=2:(y.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),y.push("scale(-1 1)"),s.top=s.left=0):b&&(y.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),y.push("scale(1 -1)"),s.top=s.left=0);let _;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:_=s.height/2+s.top,y.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:y.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:_=s.width/2+s.left,y.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")");break}k%2===1&&(s.left!==s.top&&(_=s.left,s.left=s.top,s.top=_),s.width!==s.height&&(_=s.width,s.width=s.height,s.height=_)),y.length&&(a=F2(a,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=s.width,h=s.height;let c,u;o===null?(u=n===null?"1em":n==="auto"?h:n,c=_h(u,l/h)):(c=o==="auto"?l:o,u=n===null?_h(c,h/l):n==="auto"?h:n);const p={},d=(m,y)=>{A2(y)||(p[m]=y.toString())};d("width",c),d("height",u);const g=[s.left,s.top,l,h];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:a}}const M2=/\sid="(\S+)"/g,Bh=new Map;function $2(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Bh.get(e)||0;return Bh.set(e,t+1),t?`${e}${t}`:e}function O2(e){const t=[];let r;for(;r=M2.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=$2(s),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function I2(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 Gn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var _r=Gn();function wp(e){_r=e}var qi={exec:()=>null};function Ct(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(Kt.caret,"$1"),r=r.replace(s,o),i},getRegex:()=>new RegExp(r,t)};return i}var D2=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Kt={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")},R2=/^(?:[ \t]*(?:\n|$))+/,P2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,N2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ss=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,q2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,jn=/(?:[*+-]|\d{1,9}[.)])/,_p=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Bp=Ct(_p).replace(/bull/g,jn).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(),W2=Ct(_p).replace(/bull/g,jn).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(),Xn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,z2=/^[^\n]+/,Vn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,H2=Ct(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Vn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Y2=Ct(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,jn).getRegex(),_a="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",Zn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,U2=Ct("^ {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",Zn).replace("tag",_a).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),vp=Ct(Xn).replace("hr",ss).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",_a).getRegex(),G2=Ct(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",vp).getRegex(),Kn={blockquote:G2,code:P2,def:H2,fences:N2,heading:q2,hr:ss,html:U2,lheading:Bp,list:Y2,newline:R2,paragraph:vp,table:qi,text:z2},vh=Ct("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ss).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",_a).getRegex(),j2={...Kn,lheading:W2,table:vh,paragraph:Ct(Xn).replace("hr",ss).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",vh).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",_a).getRegex()},X2={...Kn,html:Ct(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Zn).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:qi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ct(Xn).replace("hr",ss).replace("heading",` *#{1,6} *[^
162
+ ]`).replace("lheading",Bp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},V2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Z2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Lp=/^( {2,}|\\)\n(?!\s*$)/,K2=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ba=/[\p{P}\p{S}]/u,Qn=/[\s\p{P}\p{S}]/u,Fp=/[^\s\p{P}\p{S}]/u,Q2=Ct(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Qn).getRegex(),Ap=/(?!~)[\p{P}\p{S}]/u,J2=/(?!~)[\s\p{P}\p{S}]/u,tT=/(?:[^\s\p{P}\p{S}]|~)/u,eT=Ct(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",D2?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Ep=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,rT=Ct(Ep,"u").replace(/punct/g,Ba).getRegex(),iT=Ct(Ep,"u").replace(/punct/g,Ap).getRegex(),Mp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",sT=Ct(Mp,"gu").replace(/notPunctSpace/g,Fp).replace(/punctSpace/g,Qn).replace(/punct/g,Ba).getRegex(),aT=Ct(Mp,"gu").replace(/notPunctSpace/g,tT).replace(/punctSpace/g,J2).replace(/punct/g,Ap).getRegex(),oT=Ct("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Fp).replace(/punctSpace/g,Qn).replace(/punct/g,Ba).getRegex(),nT=Ct(/\\(punct)/,"gu").replace(/punct/g,Ba).getRegex(),lT=Ct(/^<(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(),hT=Ct(Zn).replace("(?:-->|$)","-->").getRegex(),cT=Ct("^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",hT).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),aa=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,uT=Ct(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",aa).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),$p=Ct(/^!?\[(label)\]\[(ref)\]/).replace("label",aa).replace("ref",Vn).getRegex(),Op=Ct(/^!?\[(ref)\](?:\[\])?/).replace("ref",Vn).getRegex(),dT=Ct("reflink|nolink(?!\\()","g").replace("reflink",$p).replace("nolink",Op).getRegex(),Lh=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Jn={_backpedal:qi,anyPunctuation:nT,autolink:lT,blockSkip:eT,br:Lp,code:Z2,del:qi,emStrongLDelim:rT,emStrongRDelimAst:sT,emStrongRDelimUnd:oT,escape:V2,link:uT,nolink:Op,punctuation:Q2,reflink:$p,reflinkSearch:dT,tag:cT,text:K2,url:qi},pT={...Jn,link:Ct(/^!?\[(label)\]\((.*?)\)/).replace("label",aa).getRegex(),reflink:Ct(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",aa).getRegex()},Go={...Jn,emStrongRDelimAst:aT,emStrongLDelim:iT,url:Ct(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Lh).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:Ct(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Lh).getRegex()},fT={...Go,br:Ct(Lp).replace("{2,}","*").getRegex(),text:Ct(Go.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},bs={normal:Kn,gfm:j2,pedantic:X2},Ti={normal:Jn,gfm:Go,breaks:fT,pedantic:pT},gT={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Fh=e=>gT[e];function Fe(e,t){if(t){if(Kt.escapeTest.test(e))return e.replace(Kt.escapeReplace,Fh)}else if(Kt.escapeTestNoEncode.test(e))return e.replace(Kt.escapeReplaceNoEncode,Fh);return e}function Ah(e){try{e=encodeURI(e).replace(Kt.percentDecode,"%")}catch{return null}return e}function Eh(e,t){var a;let r=e.replace(Kt.findPipe,(o,n,l)=>{let h=!1,c=n;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(Kt.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(Kt.slashPipe,"|");return i}function Si(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function mT(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 Mh(e,t,r,i,s){let a=t.href,o=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function yT(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
163
163
  `).map(a=>{let o=a.match(r.other.beginningSpace);if(o===null)return a;let[n]=o;return n.length>=s.length?a.slice(s.length):a}).join(`
164
164
  `)}var oa=class{constructor(t){St(this,"options");St(this,"rules");St(this,"lexer");this.options=t||_r}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:Si(i,`
165
- `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=CT(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:s}}}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 s=Si(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.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:Si(r[0],`
165
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=yT(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:s}}}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 s=Si(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.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:Si(r[0],`
166
166
  `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Si(r[0],`
167
167
  `).split(`
168
168
  `),s="",a="",o=[];for(;i.length>0;){let n=!1,l=[],h;for(h=0;h<i.length;h++)if(this.rules.other.blockquoteStart.test(i[h]))l.push(i[h]),n=!0;else if(!n)l.push(i[h]);else break;i=i.slice(h);let c=l.join(`
@@ -183,7 +183,7 @@ ${u}`:u;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
183
183
  `+d}!g&&!d.trim()&&(g=!0),c+=$+`
184
184
  `,t=t.substring($.length+1),p=E.slice(m)}}a.loose||(n?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(n=!0));let y=null,C;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(C=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:c,task:!!y,checked:C,loose:!1,text:u,tokens:[]}),a.raw+=c}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let h=0;h<a.items.length;h++)if(this.lexer.state.top=!1,a.items[h].tokens=this.lexer.blockTokens(a.items[h].text,[]),!a.loose){let c=a.items[h].tokens.filter(p=>p.type==="space"),u=c.length>0&&c.some(p=>this.rules.other.anyLine.test(p.raw));a.loose=u}if(a.loose)for(let h=0;h<a.items.length;h++)a.items[h].loose=!0;return a}}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," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=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:s,title:a}}}table(t){var n;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Eh(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(n=r[3])!=null&&n.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
185
185
  `):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<i.length;l++)o.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:o.align[l]});for(let l of a)o.rows.push(Eh(l,o.header.length).map((h,c)=>({text:h,tokens:this.lexer.inline(h),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)===`
186
- `?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=Si(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=yT(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 s=r[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),Mh(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.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 s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return Mh(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,o,n,l=a,h=0,c=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,r=r.slice(-1*t.length+a);(s=c.exec(r))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(n=[...o].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&a%3&&!((a+n)%3)){h+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+h);let u=[...s[0]][0].length,p=t.slice(0,a+s.index+u+n);if(Math.min(a,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," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(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,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}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}}}},me=class jo{constructor(t){St(this,"tokens");St(this,"options");St(this,"state");St(this,"tokenizer");St(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||_r,this.options.tokenizer=this.options.tokenizer||new oa,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:Kt,block:bs.normal,inline:Ti.normal};this.options.pedantic?(r.block=bs.pedantic,r.inline=Ti.pedantic):this.options.gfm&&(r.block=bs.gfm,this.options.breaks?r.inline=Ti.breaks:r.inline=Ti.gfm),this.tokenizer.rules=r}static get rules(){return{block:bs,inline:Ti}}static lex(t,r){return new jo(r).lex(t)}static lexInline(t,r){return new jo(r).inlineTokens(t)}lex(t){t=t.replace(Kt.carriageReturn,`
186
+ `?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=Si(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=mT(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 s=r[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),Mh(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.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 s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return Mh(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,o,n,l=a,h=0,c=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,r=r.slice(-1*t.length+a);(s=c.exec(r))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(n=[...o].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&a%3&&!((a+n)%3)){h+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+h);let u=[...s[0]][0].length,p=t.slice(0,a+s.index+u+n);if(Math.min(a,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," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(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,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}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}}}},me=class jo{constructor(t){St(this,"tokens");St(this,"options");St(this,"state");St(this,"tokenizer");St(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||_r,this.options.tokenizer=this.options.tokenizer||new oa,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:Kt,block:bs.normal,inline:Ti.normal};this.options.pedantic?(r.block=bs.pedantic,r.inline=Ti.pedantic):this.options.gfm&&(r.block=bs.gfm,this.options.breaks?r.inline=Ti.breaks:r.inline=Ti.gfm),this.tokenizer.rules=r}static get rules(){return{block:bs,inline:Ti}}static lex(t,r){return new jo(r).lex(t)}static lexInline(t,r){return new jo(r).inlineTokens(t)}lex(t){t=t.replace(Kt.carriageReturn,`
187
187
  `),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){var s,a,o;for(this.options.pedantic&&(t=t.replace(Kt.tabCharGlobal," ").replace(Kt.spaceLine,""));t;){let n;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(h=>(n=h.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let h=r.at(-1);n.raw.length===1&&h!==void 0?h.raw+=`
188
188
  `:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
189
189
  `)?"":`
@@ -216,27 +216,27 @@ ${this.parser.parse(t)}</blockquote>
216
216
  ${t}</tr>
217
217
  `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
218
218
  `}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>${Fe(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 s=this.parser.parseInline(i),a=Ah(t);if(a===null)return s;t=a;let o='<a href="'+t+'"';return r&&(o+=' title="'+Fe(r)+'"'),o+=">"+s+"</a>",o}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=Ah(t);if(a===null)return Fe(i);t=a;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${Fe(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Fe(t.text)}},tl=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""}},ye=class Xo{constructor(t){St(this,"options");St(this,"renderer");St(this,"textRenderer");this.options=t||_r,this.options.renderer=this.options.renderer||new na,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new tl}static parse(t,r){return new Xo(r).parse(t)}static parseInline(t,r){return new Xo(r).parseInline(t)}parse(t,r=!0){var s,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let h=n,c=this.options.extensions.renderers[h.type].call({parser:this},h);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){i+=c||"";continue}}let l=n;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let h=l,c=this.renderer.text(h);for(;o+1<t.length&&t[o+1].type==="text";)h=t[++o],c+=`
219
- `+this.renderer.text(h);r?i+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):i+=c;continue}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}parseInline(t,r=this.renderer){var s,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let h=this.options.extensions.renderers[n.type].call({parser:this},n);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=h||"";continue}}let l=n;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},_s,$i=(_s=class{constructor(t){St(this,"options");St(this,"block");this.options=t||_r}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?me.lex:me.lexInline}provideParser(){return this.block?ye.parse:ye.parseInline}},St(_s,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),St(_s,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),_s),xT=class{constructor(...t){St(this,"defaults",Gn());St(this,"options",this.setOptions);St(this,"parse",this.parseMarkdown(!0));St(this,"parseInline",this.parseMarkdown(!1));St(this,"Parser",ye);St(this,"Renderer",na);St(this,"TextRenderer",tl);St(this,"Lexer",me);St(this,"Tokenizer",oa);St(this,"Hooks",$i);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let n=o;for(let l of n.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of n.rows)for(let h of l)i=i.concat(this.walkTokens(h.tokens,r));break}case"list":{let n=o;i=i.concat(this.walkTokens(n.items,r));break}default:{let n=o;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let h=n[l].flat(1/0);i=i.concat(this.walkTokens(h,r))}):n.tokens&&(i=i.concat(this.walkTokens(n.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=r.renderers[a.name];o?r.renderers[a.name]=function(...n){let l=a.renderer.apply(this,n);return l===!1&&(l=o.apply(this,n)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new na(this.defaults);for(let o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let n=o,l=i.renderer[n],h=a[n];a[n]=(...c)=>{let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new oa(this.defaults);for(let o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let n=o,l=i.tokenizer[n],h=a[n];a[n]=(...c)=>{let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new $i;for(let o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let n=o,l=i.hooks[n],h=a[n];$i.passThroughHooks.has(o)?a[n]=c=>{if(this.defaults.async&&$i.passThroughHooksRespectAsync.has(o))return(async()=>{let p=await l.call(a,c);return h.call(a,p)})();let u=l.call(a,c);return h.call(a,u)}:a[n]=(...c)=>{if(this.defaults.async)return(async()=>{let p=await l.apply(a,c);return p===!1&&(p=await h.apply(a,c)),p})();let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,o=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(o.call(this,n)),a&&(l=l.concat(a.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return me.lex(t,r??this.defaults)}parser(t,r){return ye.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.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(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let n=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?me.lex:me.lexInline)(n,a),h=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(h,a.walkTokens));let c=await(a.hooks?await a.hooks.provideParser():t?ye.parse:ye.parseInline)(h,a);return a.hooks?await a.hooks.postprocess(c):c})().catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let n=(a.hooks?a.hooks.provideLexer():t?me.lex:me.lexInline)(r,a);a.hooks&&(n=a.hooks.processAllTokens(n)),a.walkTokens&&this.walkTokens(n,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?ye.parse:ye.parseInline)(n,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(n){return o(n)}}}onError(t,r){return i=>{if(i.message+=`
220
- Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Fe(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},Sr=new xT;function Tt(e,t){return Sr.parse(e,t)}Tt.options=Tt.setOptions=function(e){return Sr.setOptions(e),Tt.defaults=Sr.defaults,wp(Tt.defaults),Tt};Tt.getDefaults=Gn;Tt.defaults=_r;Tt.use=function(...e){return Sr.use(...e),Tt.defaults=Sr.defaults,wp(Tt.defaults),Tt};Tt.walkTokens=function(e,t){return Sr.walkTokens(e,t)};Tt.parseInline=Sr.parseInline;Tt.Parser=ye;Tt.parser=ye.parse;Tt.Renderer=na;Tt.TextRenderer=tl;Tt.Lexer=me;Tt.lexer=me.lex;Tt.Tokenizer=oa;Tt.Hooks=$i;Tt.parse=Tt;Tt.options;Tt.setOptions;Tt.use;Tt.walkTokens;Tt.parseInline;ye.parse;me.lex;function Ip(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 s=i.reduce(function(n,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?n.concat(h.map(function(c){var u,p;return(p=(u=c.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&p!==void 0?p:0})):n},[]);if(s.length){var a=new RegExp(`
219
+ `+this.renderer.text(h);r?i+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):i+=c;continue}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}parseInline(t,r=this.renderer){var s,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let h=this.options.extensions.renderers[n.type].call({parser:this},n);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=h||"";continue}}let l=n;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},_s,$i=(_s=class{constructor(t){St(this,"options");St(this,"block");this.options=t||_r}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?me.lex:me.lexInline}provideParser(){return this.block?ye.parse:ye.parseInline}},St(_s,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),St(_s,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),_s),CT=class{constructor(...t){St(this,"defaults",Gn());St(this,"options",this.setOptions);St(this,"parse",this.parseMarkdown(!0));St(this,"parseInline",this.parseMarkdown(!1));St(this,"Parser",ye);St(this,"Renderer",na);St(this,"TextRenderer",tl);St(this,"Lexer",me);St(this,"Tokenizer",oa);St(this,"Hooks",$i);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let n=o;for(let l of n.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of n.rows)for(let h of l)i=i.concat(this.walkTokens(h.tokens,r));break}case"list":{let n=o;i=i.concat(this.walkTokens(n.items,r));break}default:{let n=o;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let h=n[l].flat(1/0);i=i.concat(this.walkTokens(h,r))}):n.tokens&&(i=i.concat(this.walkTokens(n.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=r.renderers[a.name];o?r.renderers[a.name]=function(...n){let l=a.renderer.apply(this,n);return l===!1&&(l=o.apply(this,n)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new na(this.defaults);for(let o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let n=o,l=i.renderer[n],h=a[n];a[n]=(...c)=>{let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new oa(this.defaults);for(let o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let n=o,l=i.tokenizer[n],h=a[n];a[n]=(...c)=>{let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new $i;for(let o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let n=o,l=i.hooks[n],h=a[n];$i.passThroughHooks.has(o)?a[n]=c=>{if(this.defaults.async&&$i.passThroughHooksRespectAsync.has(o))return(async()=>{let p=await l.call(a,c);return h.call(a,p)})();let u=l.call(a,c);return h.call(a,u)}:a[n]=(...c)=>{if(this.defaults.async)return(async()=>{let p=await l.apply(a,c);return p===!1&&(p=await h.apply(a,c)),p})();let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,o=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(o.call(this,n)),a&&(l=l.concat(a.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return me.lex(t,r??this.defaults)}parser(t,r){return ye.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.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(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let n=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?me.lex:me.lexInline)(n,a),h=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(h,a.walkTokens));let c=await(a.hooks?await a.hooks.provideParser():t?ye.parse:ye.parseInline)(h,a);return a.hooks?await a.hooks.postprocess(c):c})().catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let n=(a.hooks?a.hooks.provideLexer():t?me.lex:me.lexInline)(r,a);a.hooks&&(n=a.hooks.processAllTokens(n)),a.walkTokens&&this.walkTokens(n,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?ye.parse:ye.parseInline)(n,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(n){return o(n)}}}onError(t,r){return i=>{if(i.message+=`
220
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Fe(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},Sr=new CT;function Tt(e,t){return Sr.parse(e,t)}Tt.options=Tt.setOptions=function(e){return Sr.setOptions(e),Tt.defaults=Sr.defaults,wp(Tt.defaults),Tt};Tt.getDefaults=Gn;Tt.defaults=_r;Tt.use=function(...e){return Sr.use(...e),Tt.defaults=Sr.defaults,wp(Tt.defaults),Tt};Tt.walkTokens=function(e,t){return Sr.walkTokens(e,t)};Tt.parseInline=Sr.parseInline;Tt.Parser=ye;Tt.parser=ye.parse;Tt.Renderer=na;Tt.TextRenderer=tl;Tt.Lexer=me;Tt.lexer=me.lex;Tt.Tokenizer=oa;Tt.Hooks=$i;Tt.parse=Tt;Tt.options;Tt.setOptions;Tt.use;Tt.walkTokens;Tt.parseInline;ye.parse;me.lex;function Ip(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 s=i.reduce(function(n,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?n.concat(h.map(function(c){var u,p;return(p=(u=c.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&p!==void 0?p:0})):n},[]);if(s.length){var a=new RegExp(`
221
221
  [ ]{`+Math.min.apply(Math,s)+"}","g");i=i.map(function(n){return n.replace(a,`
222
222
  `)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(n,l){var h=o.match(/(?:^|\n)( *)$/),c=h?h[1]:"",u=n;typeof n=="string"&&n.includes(`
223
223
  `)&&(u=String(n).split(`
224
224
  `).map(function(p,d){return d===0?p:""+c+p}).join(`
225
- `)),o+=u+i[l+1]}),o}var bT={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},Vo=new Map,Dp=new Map,kT=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(z.debug("Registering icon pack:",t.name),"loader"in t)Dp.set(t.name,t.loader);else if("icons"in t)Vo.set(t.name,t.icons);else throw z.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Rp=f(async(e,t)=>{const r=T2(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 s=Vo.get(i);if(!s){const o=Dp.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await o(),prefix:i},Vo.set(i,s)}catch(n){throw z.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=_2(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),TT=f(async e=>{try{return await Rp(e),!0}catch{return!1}},"isIconAvailable"),as=f(async(e,t,r)=>{let i;try{i=await Rp(e,t==null?void 0:t.fallbackPrefix)}catch(o){z.error(o),i=bT}const s=M2(i,t),a=D2(I2(s.body),{...s.attributes,...r});return ke(a,vt())},"getIconSVG");function Pp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
225
+ `)),o+=u+i[l+1]}),o}var xT={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},Vo=new Map,Dp=new Map,bT=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(z.debug("Registering icon pack:",t.name),"loader"in t)Dp.set(t.name,t.loader);else if("icons"in t)Vo.set(t.name,t.icons);else throw z.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Rp=f(async(e,t)=>{const r=k2(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 s=Vo.get(i);if(!s){const o=Dp.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await o(),prefix:i},Vo.set(i,s)}catch(n){throw z.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=w2(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),kT=f(async e=>{try{return await Rp(e),!0}catch{return!1}},"isIconAvailable"),as=f(async(e,t,r)=>{let i;try{i=await Rp(e,t==null?void 0:t.fallbackPrefix)}catch(o){z.error(o),i=xT}const s=E2(i,t),a=I2(O2(s.body),{...s.attributes,...r});return ke(a,vt())},"getIconSVG");function Pp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
226
226
  `).replace(/\n{2,}/g,`
227
227
  `);return Ip(i)}f(Pp,"preprocessMarkdown");function Np(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}f(Np,"nonMarkdownToLines");function qp(e,t={}){const r=Pp(e,t),i=Tt.lexer(r),s=[[]];let a=0;function o(n,l="normal"){n.type==="text"?n.text.split(`
228
228
  `).forEach((c,u)=>{u!==0&&(a++,s.push([])),c.split(" ").forEach(p=>{p=p.replace(/&#39;/g,"'"),p&&s[a].push({content:p,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(h=>{o(h,n.type)}):n.type==="html"&&s[a].push({content:n.text,type:"normal"})}return f(o,"processNode"),i.forEach(n=>{var l;n.type==="paragraph"?(l=n.tokens)==null||l.forEach(h=>{o(h)}):n.type==="html"?s[a].push({content:n.text,type:"normal"}):s[a].push({content:n.raw,type:"normal"})}),s}f(qp,"markdownToLines");function Wp(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}f(Wp,"nonMarkdownToHTML");function zp(e,{markdownAutoWrap:t}={}){const r=Tt.lexer(e);function i(s){var a,o,n;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(a=s.tokens)==null?void 0:a.map(i).join("")}</strong>`:s.type==="em"?`<em>${(o=s.tokens)==null?void 0:o.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(n=s.tokens)==null?void 0:n.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(z.warn(`Unsupported markdown: ${s.type}`),s.raw)}return f(i,"output"),r.map(i).join("")}f(zp,"markdownToHTML");function Hp(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}f(Hp,"splitTextToChars");function Yp(e,t){const r=Hp(t.content);return el(e,[],r,t.type)}f(Yp,"splitWordToFitWidth");function el(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...a]=r,o=[...t,s];return e([{content:o.join(""),type:i}])?el(e,o,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}f(el,"splitWordToFitWidthRecursion");function Up(e,t){if(e.some(({content:r})=>r.includes(`
229
229
  `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return la(e,t)}f(Up,"splitLineToFitWidth");function la(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(s!==""&&o.push({content:s,type:"normal"}),o.push(a),t(o))return la(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[n,l]=Yp(t,a);r.push([n]),l.content&&e.unshift(l)}return la(e,t,r)}f(la,"splitLineToFitWidthRecursion");function Zo(e,t){t&&e.attr("style",t)}f(Zo,"applyStyle");var $h=16384;async function Gp(e,t,r,i,s=!1,a=vt()){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,$h)}px`),o.attr("height",`${Math.min(10*r,$h)}px`);const n=o.append("xhtml:div"),l=Wi(t.label)?await vc(t.label.replace(Ji.lineBreakRegex,`
230
- `),a):ke(t.label,a),h=t.isNode?"nodeLabel":"edgeLabel",c=n.append("span");c.html(l),Zo(c,t.labelStyle),c.attr("class",`${h} ${i}`),Zo(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"),s&&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(Gp,"addHtmlSpan");function va(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}f(va,"createTspan");function jp(e,t,r){const i=e.append("text"),s=va(i,1,t);La(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}f(jp,"computeWidthOfText");function ST(e,t,r){var o;const i=e.append("text"),s=va(i,1,t);La(s,[{content:r,type:"normal"}]);const a=(o=s.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}f(ST,"computeDimensionOfText");function Xp(e,t,r,i=!1,s=!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");s&&l.attr("text-anchor","middle");let h=0;for(const c of r){const u=f(d=>jp(o,1.1,d)<=e,"checkWidth"),p=u(c)?[c]:Up(c,u);for(const d of p){const g=va(l,h,1.1,s);La(g,d),h++}}if(i){const c=l.node().getBBox(),u=2;return n.attr("x",c.x-u).attr("y",c.y-u).attr("width",c.width+2*u).attr("height",c.height+2*u),o.node()}else return l.node()}f(Xp,"createFormattedText");function Ko(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(Ko,"decodeHTMLEntities");function La(e,t){e.text(""),t.forEach((r,i)=>{const s=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?s.text(Ko(r.content)):s.text(" "+Ko(r.content))})}f(La,"updateTextContentAndStyles");async function Vp(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,o)=>(r.push((async()=>{const n=`${a}:${o}`;return await TT(n)?await as(n,void 0,{class:"label-icon"}):`<i class='${ke(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}f(Vp,"replaceIconSubstring");var je=f(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:h=!1}={},c)=>{if(z.debug("XYZ createText",t,r,i,s,a,n,"addSvgBackground: ",h),a){const u=o?zp(t,c):Wp(t),p=await Vp(Tr(u),c),d=t.replace(/\\\\/g,"\\"),g={isNode:n,label:Wi(t)?d:p,labelStyle:r.replace("fill:","color:")};return await Gp(e,g,l,s,h,c)}else{const u=Tr(t.replace(/<br\s*\/?>/g,"<br/>")),p=o?qp(u.replace("<br>","<br/>"),c):Np(u),d=Xp(l,e,p,t?h:!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:");ht(d).attr("style",g)}else{const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ht(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:");ht(d).select("text").attr("style",m)}return i?ht(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ht(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function ro(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,o=Math.cos(a),n=Math.sin(a);for(const l of e){const[h,c]=l;l[0]=(h-i)*o-(c-s)*n+i,l[1]=(h-i)*n+(c-s)*o+s}}}function wT(e,t){return e[0]===t[0]&&e[1]===t[1]}function _T(e,t,r,i=1){const s=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const h of o)ro(h,n,s);const l=(function(h,c,u){const p=[];for(const b of h){const k=[...b];wT(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&p.push(k)}const d=[];c=Math.max(c,.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,C=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||C%c==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})),C++}return d})(o,a,i);if(s){for(const h of o)ro(h,n,-s);(function(h,c,u){const p=[];h.forEach((d=>p.push(...d))),ro(p,c,u)})(l,n,-s)}return l}function os(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),_T(e,s,i,a||1)}class rl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=os(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function Fa(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 BT extends rl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=os(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[h,c]of s)Fa([h,c])&&o.push([[h[0]-n,h[1]+l],[...c]],[[h[0]+n,h[1]-l],[...c]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class vT extends rl{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class LT{constructor(t){this.helper=t}fillPolygons(t,r){const i=os(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=s/4;for(const n of t){const l=Fa(n),h=l/s,c=Math.ceil(h)-1,u=l-c*s,p=(n[0][0]+n[1][0])/2-s/4,d=Math.min(n[0][1],n[1][1]);for(let g=0;g<c;g++){const m=d+u+g*s,y=p-o+2*Math.random()*o,C=m-o+2*Math.random()*o,b=this.helper.ellipse(y,C,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class FT{constructor(t){this.helper=t}fillPolygons(t,r){const i=os(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,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((o=>{const n=Fa(o),l=Math.floor(n/(i+s)),h=(n+s-l*(i+s))/2;let c=o[0],u=o[1];c[0]>u[0]&&(c=o[1],u=o[0]);const p=Math.atan((u[1]-c[1])/(u[0]-c[0]));for(let d=0;d<l;d++){const g=d*(i+s),m=g+i,y=[c[0]+g*Math.cos(p)+h*Math.cos(p),c[1]+g*Math.sin(p)+h*Math.sin(p)],C=[c[0]+m*Math.cos(p)+h*Math.cos(p),c[1]+m*Math.sin(p)+h*Math.sin(p)];a.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],r))}})),a}}class AT{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,a=os(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((a=>{const o=Fa(a),n=Math.round(o/(2*r));let l=a[0],h=a[1];l[0]>h[0]&&(l=a[1],h=a[0]);const c=Math.atan((h[1]-l[1])/(h[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(c),l[1]+p*Math.sin(c)],y=[l[0]+d*Math.cos(c),l[1]+d*Math.sin(c)],C=[m[0]+g*Math.cos(c+Math.PI/4),m[1]+g*Math.sin(c+Math.PI/4)];s.push(...this.helper.doubleLineOps(m[0],m[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],y[0],y[1],i))}})),s}}const ee={};class ET{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const MT=0,io=1,Oh=2,ks={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 so(e,t){return e.type===t}function il(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:MT,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:io,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:Oh,text:""},n})(e);let i="BOD",s=0,a=r[s];for(;!so(a,Oh);){let o=0;const n=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return il("M0,0"+e);s++,o=ks[a.text],i=a.text}else so(a,io)?o=ks[i]:(s++,o=ks[a.text],i=a.text);if(!(s+o<r.length))throw new Error("Path data ended short");for(let l=s;l<s+o;l++){const h=r[l];if(!so(h,io))throw new Error("Param not a number: "+i+","+h.text);n[n.length]=+h.text}if(typeof ks[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=o,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Zp(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:o,data:n}of e)switch(o){case"M":a.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((h,c)=>c%2?h+r:h+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((h,c)=>c%2?h+r:h+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":a.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((h,c)=>c%2?h+r:h+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function Kp(e){const t=[];let r="",i=0,s=0,a=0,o=0,n=0,l=0;for(const{key:h,data:c}of e){switch(h){case"M":t.push({key:"M",data:[...c]}),[i,s]=c,[a,o]=c;break;case"C":t.push({key:"C",data:[...c]}),i=c[4],s=c[5],n=c[2],l=c[3];break;case"L":t.push({key:"L",data:[...c]}),[i,s]=c;break;case"H":i=c[0],t.push({key:"L",data:[i,s]});break;case"V":s=c[0],t.push({key:"L",data:[i,s]});break;case"S":{let u=0,p=0;r==="C"||r==="S"?(u=i+(i-n),p=s+(s-l)):(u=i,p=s),t.push({key:"C",data:[u,p,...c]}),n=c[0],l=c[1],i=c[2],s=c[3];break}case"T":{const[u,p]=c;let d=0,g=0;r==="Q"||r==="T"?(d=i+(i-n),g=s+(s-l)):(d=i,g=s);const m=i+2*(d-i)/3,y=s+2*(g-s)/3,C=u+2*(d-u)/3,b=p+2*(g-p)/3;t.push({key:"C",data:[m,y,C,b,u,p]}),n=d,l=g,i=u,s=p;break}case"Q":{const[u,p,d,g]=c,m=i+2*(u-i)/3,y=s+2*(p-s)/3,C=d+2*(u-d)/3,b=g+2*(p-g)/3;t.push({key:"C",data:[m,y,C,b,d,g]}),n=u,l=p,i=d,s=g;break}case"A":{const u=Math.abs(c[0]),p=Math.abs(c[1]),d=c[2],g=c[3],m=c[4],y=c[5],C=c[6];u===0||p===0?(t.push({key:"C",data:[i,s,y,C,y,C]}),i=y,s=C):(i!==y||s!==C)&&(Qp(i,s,y,C,u,p,d,g,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=o}r=h}return t}function wi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Qp(e,t,r,i,s,a,o,n,l,h){const c=(u=o,Math.PI*u/180);var u;let p=[],d=0,g=0,m=0,y=0;if(h)[d,g,m,y]=h;else{[e,t]=wi(e,t,-c),[r,i]=wi(r,i,-c);const H=(e-r)/2,I=(t-i)/2;let A=H*H/(s*s)+I*I/(a*a);A>1&&(A=Math.sqrt(A),s*=A,a*=A);const B=s*s,M=a*a,F=B*M-B*I*I-M*H*H,S=B*I*I+M*H*H,q=(n===l?-1:1)*Math.sqrt(Math.abs(F/S));m=q*s*I/a+(e+r)/2,y=q*-a*H/s+(t+i)/2,d=Math.asin(parseFloat(((t-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).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 C=g-d;if(Math.abs(C)>120*Math.PI/180){const H=g,I=r,A=i;g=l&&g>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,p=Qp(r=m+s*Math.cos(g),i=y+a*Math.sin(g),I,A,s,a,o,0,l,[g,H,m,y])}C=g-d;const b=Math.cos(d),k=Math.sin(d),_=Math.cos(g),w=Math.sin(g),v=Math.tan(C/4),$=4/3*s*v,E=4/3*a*v,W=[e,t],P=[e+$*k,t-E*b],O=[r+$*w,i-E*_],Y=[r,i];if(P[0]=2*W[0]-P[0],P[1]=2*W[1]-P[1],h)return[P,O,Y].concat(p);{p=[P,O,Y].concat(p);const H=[];for(let I=0;I<p.length;I+=3){const A=wi(p[I][0],p[I][1],c),B=wi(p[I+1][0],p[I+1][1],c),M=wi(p[I+2][0],p[I+2][1],c);H.push([A[0],A[1],B[0],B[1],M[0],M[1]])}return H}}const $T={randOffset:function(e,t){return rt(e,t)},randOffsetWithRange:function(e,t,r){return ha(e,t,r)},ellipse:function(e,t,r,i,s){const a=tf(r,i,s);return Qo(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return rr(e,t,r,i,s,!0)}};function Jp(e,t,r,i,s){return{type:"path",ops:rr(e,t,r,i,s)}}function Ds(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...rr(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...rr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Jp(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function OT(e,t,r,i,s){return(function(a,o){return Ds(a,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function Ih(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Ts(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Ts(r[0],1.5*(1+.22*t.roughness),Ph(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const n=Ts(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Ts(o,1.5*(1+.22*t.roughness),Ph(t));for(const h of n)h.op!=="move"&&i.push(h);for(const h of l)h.op!=="move"&&s.push(h)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function tf(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=rt(o*l,r),n+=rt(n*l,r),{increment:a,rx:o,ry:n}}function Qo(e,t,r,i){const[s,a]=Nh(i.increment,e,t,i.rx,i.ry,1,i.increment*ha(.1,ha(.4,1,r),r),r);let o=ca(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Nh(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=ca(n,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function Dh(e,t,r,i,s,a,o,n,l){const h=e,c=t;let u=Math.abs(r/2),p=Math.abs(i/2);u+=rt(.01*u,l),p+=rt(.01*p,l);let d=s,g=a;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),C=qh(y,h,c,u,p,d,g,1,l);if(!l.disableMultiStroke){const b=qh(y,h,c,u,p,d,g,1.5,l);C.push(...b)}return o&&(n?C.push(...rr(h,c,h+u*Math.cos(d),c+p*Math.sin(d),l),...rr(h,c,h+u*Math.cos(g),c+p*Math.sin(g),l)):C.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+u*Math.cos(d),c+p*Math.sin(d)]})),{type:"path",ops:C}}function Rh(e,t){const r=Kp(Zp(il(e))),i=[];let s=[0,0],a=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":a=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...rr(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]];break;case"C":{const[l,h,c,u,p,d]=n;i.push(...IT(l,h,c,u,p,d,a,t)),a=[p,d];break}case"Z":i.push(...rr(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function ao(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+rt(s,t),i[0][1]+rt(s,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+rt(s,t),i[o][1]+rt(s,t)]})}}return{type:"fillPath",ops:r}}function Dr(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!ee[s])switch(s){case"zigzag":ee[s]||(ee[s]=new BT(i));break;case"cross-hatch":ee[s]||(ee[s]=new vT(i));break;case"dots":ee[s]||(ee[s]=new LT(i));break;case"dashed":ee[s]||(ee[s]=new FT(i));break;case"zigzag-line":ee[s]||(ee[s]=new AT(i));break;default:s="hachure",ee[s]||(ee[s]=new rl(i))}return ee[s]})(t,$T).fillPolygons(e,t)}function Ph(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function ef(e){return e.randomizer||(e.randomizer=new ET(e.seed||0)),e.randomizer.next()}function ha(e,t,r,i=1){return r.roughness*i*(ef(r)*(t-e)+e)}function rt(e,t,r=1){return ha(-e,e,t,r)}function rr(e,t,r,i,s,a=!1){const o=a?s.disableMultiStrokeFill:s.disableMultiStroke,n=Jo(e,t,r,i,s,!0,!1);if(o)return n;const l=Jo(e,t,r,i,s,!0,!0);return n.concat(l)}function Jo(e,t,r,i,s,a,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=s.maxRandomnessOffset||0;c*c*100>n&&(c=l/10);const u=c/2,p=.2+.2*ef(s);let d=s.bowing*s.maxRandomnessOffset*(i-t)/200,g=s.bowing*s.maxRandomnessOffset*(e-r)/200;d=rt(d,s,h),g=rt(g,s,h);const m=[],y=()=>rt(u,s,h),C=()=>rt(c,s,h),b=s.preserveVertices;return o?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:rt(c,s,h)),t+(b?0:rt(c,s,h))]}),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+C(),g+t+(i-t)*p+C(),d+e+2*(r-e)*p+C(),g+t+2*(i-t)*p+C(),r+(b?0:C()),i+(b?0:C())]}),m}function Ts(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+rt(t,r),e[0][1]+rt(t,r)]),i.push([e[0][0]+rt(t,r),e[0][1]+rt(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+rt(t,r),e[s][1]+rt(t,r)]),s===e.length-1&&i.push([e[s][0]+rt(t,r),e[s][1]+rt(t,r)]);return ca(i,null,r)}function ca(e,t,r){const i=e.length,s=[];if(i>3){const a=[],o=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];a[0]=[l[0],l[1]],a[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],a[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],a[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...Jo(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function Nh(e,t,r,i,s,a,o,n){const l=[],h=[];if(n.roughness===0){e/=4,h.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let c=0;c<=2*Math.PI;c+=e){const u=[t+i*Math.cos(c),r+s*Math.sin(c)];l.push(u),h.push(u)}h.push([t+i*Math.cos(0),r+s*Math.sin(0)]),h.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const c=rt(.5,n)-Math.PI/2;h.push([rt(a,n)+t+.9*i*Math.cos(c-e),rt(a,n)+r+.9*s*Math.sin(c-e)]);const u=2*Math.PI+c-.01;for(let p=c;p<u;p+=e){const d=[rt(a,n)+t+i*Math.cos(p),rt(a,n)+r+s*Math.sin(p)];l.push(d),h.push(d)}h.push([rt(a,n)+t+i*Math.cos(c+2*Math.PI+.5*o),rt(a,n)+r+s*Math.sin(c+2*Math.PI+.5*o)]),h.push([rt(a,n)+t+.98*i*Math.cos(c+o),rt(a,n)+r+.98*s*Math.sin(c+o)]),h.push([rt(a,n)+t+.9*i*Math.cos(c+.5*o),rt(a,n)+r+.9*s*Math.sin(c+.5*o)])}return[h,l]}function qh(e,t,r,i,s,a,o,n,l){const h=a+rt(.1,l),c=[];c.push([rt(n,l)+t+.9*i*Math.cos(h-e),rt(n,l)+r+.9*s*Math.sin(h-e)]);for(let u=h;u<=o;u+=e)c.push([rt(n,l)+t+i*Math.cos(u),rt(n,l)+r+s*Math.sin(u)]);return c.push([t+i*Math.cos(o),r+s*Math.sin(o)]),c.push([t+i*Math.cos(o),r+s*Math.sin(o)]),ca(c,null,l)}function IT(e,t,r,i,s,a,o,n){const l=[],h=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let c=[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:rt(h[0],n)),o[1]+(p?0:rt(h[0],n))]}),c=p?[s,a]:[s+rt(h[d],n),a+rt(h[d],n)],l.push({op:"bcurveTo",data:[e+rt(h[d],n),t+rt(h[d],n),r+rt(h[d],n),i+rt(h[d],n),c[0],c[1]]});return l}function _i(e){return[...e]}function Wh(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(_i(e[0]),_i(e[1]),_i(e[2]),_i(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const a=[],o=1-t;i.push(_i(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*s[n+1][0]-o*s[n-1][0])/6,l[1]+(o*s[n+1][1]-o*s[n-1][1])/6],a[2]=[s[n+1][0]+(o*s[n][0]-o*s[n+2][0])/6,s[n+1][1]+(o*s[n][1]-o*s[n+2][1])/6],a[3]=[s[n+1][0],s[n+1][1]],i.push(a[1],a[2],a[3])}}return i}function Rs(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function DT(e,t,r){const i=Rs(t,r);if(i===0)return Rs(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),Rs(e,ur(t,r,s))}function ur(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function tn(e,t,r,i){const s=i||[];if((function(n,l){const h=n[l+0],c=n[l+1],u=n[l+2],p=n[l+3];let d=3*c[0]-2*h[0]-p[0];d*=d;let g=3*c[1]-2*h[1]-p[1];g*=g;let m=3*u[0]-2*p[0]-h[0];m*=m;let y=3*u[1]-2*p[1]-h[1];return y*=y,d<m&&(d=m),g<y&&(g=y),d+g})(e,t)<r){const n=e[t+0];s.length?(a=s[s.length-1],o=n,Math.sqrt(Rs(a,o))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],h=e[t+1],c=e[t+2],u=e[t+3],p=ur(l,h,.5),d=ur(h,c,.5),g=ur(c,u,.5),m=ur(p,d,.5),y=ur(d,g,.5),C=ur(m,y,.5);tn([l,p,m,C],0,r,s),tn([C,y,g,u],0,r,s)}var a,o;return s}function RT(e,t){return ua(e,0,e.length,t)}function ua(e,t,r,i,s){const a=s||[],o=e[t],n=e[r-1];let l=0,h=1;for(let c=t+1;c<r-1;++c){const u=DT(e[c],o,n);u>l&&(l=u,h=c)}return Math.sqrt(l)>i?(ua(e,t,h+1,i,a),ua(e,h,r,i,a)):(a.length||a.push(o),a.push(n)),a}function oo(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)tn(e,3*a,t,i);return r&&r>0?ua(i,0,i.length,r):i}const ae="none";class da{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,s,a){const o=this._o(a);return this._d("line",[Jp(t,r,i,s,o)],o)}rectangle(t,r,i,s,a){const o=this._o(a),n=[],l=OT(t,r,i,s,o);if(o.fill){const h=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];o.fillStyle==="solid"?n.push(ao([h],o)):n.push(Dr([h],o))}return o.stroke!==ae&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,s,a){const o=this._o(a),n=[],l=tf(i,s,o),h=Qo(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const c=Qo(t,r,o,l).opset;c.type="fillPath",n.push(c)}else n.push(Dr([h.estimatedPoints],o));return o.stroke!==ae&&n.push(h.opset),this._d("ellipse",n,o)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Ds(t,!1,i)],i)}arc(t,r,i,s,a,o,n=!1,l){const h=this._o(l),c=[],u=Dh(t,r,i,s,a,o,n,!0,h);if(n&&h.fill)if(h.fillStyle==="solid"){const p=Object.assign({},h);p.disableMultiStroke=!0;const d=Dh(t,r,i,s,a,o,!0,!1,p);d.type="fillPath",c.push(d)}else c.push((function(p,d,g,m,y,C,b){const k=p,_=d;let w=Math.abs(g/2),v=Math.abs(m/2);w+=rt(.01*w,b),v+=rt(.01*v,b);let $=y,E=C;for(;$<0;)$+=2*Math.PI,E+=2*Math.PI;E-$>2*Math.PI&&($=0,E=2*Math.PI);const W=(E-$)/b.curveStepCount,P=[];for(let O=$;O<=E;O+=W)P.push([k+w*Math.cos(O),_+v*Math.sin(O)]);return P.push([k+w*Math.cos(E),_+v*Math.sin(E)]),P.push([k,_]),Dr([P],b)})(t,r,i,s,a,o,h));return h.stroke!==ae&&c.push(u),this._d("arc",c,h)}curve(t,r){const i=this._o(r),s=[],a=Ih(t,i);if(i.fill&&i.fill!==ae)if(i.fillStyle==="solid"){const o=Ih(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.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 h of l)h.length<3?o.push(...h):h.length===3?o.push(...oo(Wh([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):o.push(...oo(Wh(h),10,(1+i.roughness)/2))}o.length&&s.push(Dr([o],i))}return i.stroke!==ae&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=Ds(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(ao([t],i)):s.push(Dr([t],i))),i.stroke!==ae&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==ae,o=i.stroke!==ae,n=!!(i.simplification&&i.simplification<1),l=(function(c,u,p){const d=Kp(Zp(il(c))),g=[];let m=[],y=[0,0],C=[];const b=()=>{C.length>=4&&m.push(...oo(C,u)),C=[]},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(!C.length){const $=m.length?m[m.length-1]:y;C.push([$[0],$[1]])}C.push([v[0],v[1]]),C.push([v[2],v[3]]),C.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=RT(w,p);v.length&&_.push(v)}return _})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),h=Rh(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const c=Rh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else s.push(ao(l,i));else s.push(Dr(l,i));return o&&(n?l.forEach((c=>{s.push(Ds(c,!1,i))})):s.push(h)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map((o=>+o.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:ae};break;case"fillPath":o={d:this.opsToPath(a),stroke:ae,strokeWidth:0,fill:i.fill||ae};break;case"fillSketch":o=this.fillSketch(a,i)}o&&s.push(o)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||ae,strokeWidth:i,fill:ae}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class PT{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new da(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,o,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,o,a,n),s.restore();break}case"fillSketch":this.fillSketch(s,o,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map((n=>+n.toFixed(i))):a.data;switch(a.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(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o),o}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o),o}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o),o}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}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,s,a,o,n=!1,l){const h=this.gen.arc(t,r,i,s,a,o,n,l);return this.draw(h),h}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 Ss="http://www.w3.org/2000/svg";class NT{constructor(t,r){this.svg=t,this.gen=new da(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(Ss,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(Ss,"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=s.createElementNS(Ss,"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(s,n,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(Ss,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o)}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o)}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}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,s,a,o,n=!1,l){const h=this.gen.arc(t,r,i,s,a,o,n,l);return this.draw(h)}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 X={canvas:(e,t)=>new PT(e,t),svg:(e,t)=>new NT(e,t),generator:e=>new da(e),newSeed:()=>da.newSeed()},et=f(async(e,t,r)=>{var d,g;let i;const s=t.useHtmlLabels||Ge((d=yt())==null?void 0:d.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",Nt(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,h=t.labelType==="markdown",c=await je(o,ke(Tr(n),yt()),{useHtmlLabels:s,width:t.width||((g=yt().flowchart)==null?void 0:g.wrappingWidth),classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:h},yt());let u=c.getBBox();const p=((t==null?void 0:t.padding)??0)/2;if(s){const m=c.children[0],y=ht(c);await kp(m,n),u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height)}return s?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:a,bbox:u,halfPadding:p,label:o}},"labelHelper"),no=f(async(e,t,r)=>{var l,h;const i=r.useHtmlLabels??Jt(yt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await je(s,ke(Tr(t),yt()),{useHtmlLabels:i,width:r.width||((h=(l=yt())==null?void 0:l.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const n=r.padding/2;if(Jt(yt())){const c=a.children[0],u=ht(a);o=c.getBoundingClientRect(),u.attr("width",o.width),u.attr("height",o.height)}return i?s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):s.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:s}},"insertLabel"),K=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 ft(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}f(ft,"createPathFromPoints");function ir(e,t,r,i,s,a){const o=[],l=r-e,h=i-t,c=l/a,u=2*Math.PI/c,p=t+h/2;for(let d=0;d<=50;d++){const g=d/50,m=e+g*l,y=p+s*Math.sin(u*(m-e));o.push({x:m,y})}return o}f(ir,"generateFullSineWavePoints");function Zi(e,t,r,i,s,a){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*c,d=e+r*Math.cos(p),g=t+r*Math.sin(p);o.push({x:-d,y:-g})}return o}f(Zi,"generateCirclePoints");function en(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 s=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),o=f((l,h)=>(l==null?void 0:l.getAttribute(h))??void 0,"getAttr");if(s){const l={fill:o(s,"fill"),"fill-opacity":o(s,"fill-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}if(a){const l={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"stroke-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}f(en,"mergePaths");var qT=f((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,o=e.width/2,n=e.height/2,l,h;return Math.abs(a)*o>Math.abs(s)*n?(a<0&&(n=-n),l=a===0?0:n*s/a,h=n):(s<0&&(o=-o),l=o,h=s===0?0:o*a/s),{x:r+l,y:i+h}},"intersectRect"),pi=qT,WT=f(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const o=yt(),n=Jt(o);return await je(e,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},o)},"createLabel"),Ke=WT,sr=f((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),rf=f(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);const r=yt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Z(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=Jt(r),d=u.insert("g").attr("class","cluster-label ");let g;t.labelType==="markdown"?g=await je(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):g=await Ke(d,t.label,t.labelStyle||"",!1,!0);let m=g.getBBox();if(Jt(r)){const $=g.children[0],E=ht(g);m=$.getBoundingClientRect(),E.attr("width",m.width),E.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 C=t.height,b=t.x-y/2,k=t.y-C/2;z.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const $=X.svg(u),E=V(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:s}),W=$.path(sr(b,k,y,C,0),E);_=u.insert(()=>(z.debug("Rough node insert CXC",W),W),":first-child"),_.select("path:nth-child(2)").attr("style",h.join(";")),_.select("path").attr("style",c.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",C);const{subGraphTitleTopMargin:w}=Un(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),n){const $=d.select("span");$&&$.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($){return pi(t,$)},{cluster:u,labelBBox:m}},"rect"),zT=f((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return pi(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),HT=f(async(e,t)=>{const r=yt(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:n,nodeBorder:l}=i,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),c=h.insert("g",":first-child"),u=h.insert("g").attr("class","cluster-label");let p=h.append("rect");const d=await Ke(u,t.label,t.labelStyle,void 0,!0);let g=d.getBBox();if(Jt(r)){const W=d.children[0],P=ht(d);g=W.getBoundingClientRect(),P.attr("width",g.width),P.attr("height",g.height)}const m=0*t.padding,y=m/2,C=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,k=t.height+m-g.height-6,_=t.x-C/2,w=t.y-b/2;t.width=C;const v=t.y-t.height/2-y+g.height+2;let $;if(t.look==="handDrawn"){const W=t.cssClasses.includes("statediagram-cluster-alt"),P=X.svg(h),O=t.rx||t.ry?P.path(sr(_,w,C,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):P.rectangle(_,w,C,b,{seed:s});$=h.insert(()=>O,":first-child");const Y=P.rectangle(_,v,C,k,{fill:W?a:o,fillStyle:W?"hachure":"solid",stroke:l,seed:s});$=h.insert(()=>O,":first-child"),p=h.insert(()=>Y)}else $=c.insert("rect",":first-child"),$.attr("class","outer").attr("x",_).attr("y",w).attr("width",C).attr("height",b).attr("data-look",t.look),p.attr("class","inner").attr("x",_).attr("y",v).attr("width",C).attr("height",k);u.attr("transform",`translate(${t.x-g.width/2}, ${w+1-(Jt(r)?0:3)})`);const E=$.node().getBBox();return t.height=E.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(W){return pi(t,W)},{cluster:h,labelBBox:g}},"roundedWithTitle"),YT=f(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);const r=yt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Z(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=Jt(r),d=u.insert("g").attr("class","cluster-label "),g=await je(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let m=g.getBBox();if(Jt(r)){const $=g.children[0],E=ht(g);m=$.getBoundingClientRect(),E.attr("width",m.width),E.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 C=t.height,b=t.x-y/2,k=t.y-C/2;z.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const $=X.svg(u),E=V(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:s}),W=$.path(sr(b,k,y,C,t.rx),E);_=u.insert(()=>(z.debug("Rough node insert CXC",W),W),":first-child"),_.select("path:nth-child(2)").attr("style",h.join(";")),_.select("path").attr("style",c.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",C);const{subGraphTitleTopMargin:w}=Un(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),n){const $=d.select("span");$&&$.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($){return pi(t,$)},{cluster:u,labelBBox:m}},"kanbanSection"),UT=f((e,t)=>{const r=yt(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:a}=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,h=t.width+l;t.diff=-t.padding;const c=t.height+l,u=t.x-h/2,p=t.y-c/2;t.width=h;let d;if(t.look==="handDrawn"){const y=X.svg(o).rectangle(u,p,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:s});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",h).attr("height",c).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 pi(t,m)},{cluster:o,labelBBox:{}}},"divider"),GT=rf,jT={rect:rf,squareRect:GT,roundedWithTitle:HT,noteGroup:zT,divider:UT,kanbanSection:YT},sf=new Map,XT=f(async(e,t)=>{const r=t.shape||"rect",i=await jT[r](e,t);return sf.set(t.id,i),i},"insertCluster"),Sv=f(()=>{sf=new Map},"clear");function af(e,t){return e.intersect(t)}f(af,"intersectNode");var VT=af;function of(e,t,r,i){var s=e.x,a=e.y,o=s-i.x,n=a-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),h=Math.abs(t*r*o/l);i.x<s&&(h=-h);var c=Math.abs(t*r*n/l);return i.y<a&&(c=-c),{x:s+h,y:a+c}}f(of,"intersectEllipse");var nf=of;function lf(e,t,r){return nf(e,t,t,r)}f(lf,"intersectCircle");var ZT=lf;function hf(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,n=s*r.x+a*r.y+o,l=s*i.x+a*i.y+o,h=1e-6;if(n!==0&&l!==0&&rn(n,l))return;const c=i.y-r.y,u=r.x-i.x,p=i.x*r.y-r.x*i.y,d=c*e.x+u*e.y+p,g=c*t.x+u*t.y+p;if(Math.abs(d)<h&&Math.abs(g)<h&&rn(d,g))return;const m=s*u-c*a;if(m===0)return;const y=Math.abs(m/2);let C=a*p-u*o;const b=C<0?(C-y)/m:(C+y)/m;C=c*o-s*p;const k=C<0?(C-y)/m:(C+y)/m;return{x:b,y:k}}}f(hf,"intersectLine");function rn(e,t){return e*t>0}f(rn,"sameSign");var KT=hf;function cf(e,t,r){let i=e.x,s=e.y,a=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(c){o=Math.min(o,c.x),n=Math.min(n,c.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,h=s-e.height/2-n;for(let c=0;c<t.length;c++){let u=t[c],p=t[c<t.length-1?c+1:0],d=KT(e,r,{x:l+u.x,y:h+u.y},{x:l+p.x,y:h+p.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort(function(c,u){let p=c.x-r.x,d=c.y-r.y,g=Math.sqrt(p*p+d*d),m=u.x-r.x,y=u.y-r.y,C=Math.sqrt(m*m+y*y);return g<C?-1:g===C?0:1}),a[0]):e}f(cf,"intersectPolygon");var QT=cf,j={node:VT,circle:ZT,ellipse:nf,polygon:QT,rect:pi};function uf(e,t){const{labelStyles:r}=Z(t);t.labelStyle=r;const i=tt(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=X.svg(a),h=V(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const c=l.circle(0,0,o*2,h),u=a.insert(()=>c,":first-child");return u.attr("class","anchor").attr("style",Nt(n)),K(t,u),t.intersect=function(p){return z.info("Circle intersect",t,o,p),j.circle(t,o,p)},a}f(uf,"anchor");function sn(e,t,r,i,s,a,o){const l=(e+r)/2,h=(t+i)/2,c=Math.atan2(i-t,r-e),u=(r-e)/2,p=(i-t)/2,d=u/s,g=p/a,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),C=l+y*a*Math.sin(c)*(o?-1:1),b=h-y*s*Math.cos(c)*(o?-1:1),k=Math.atan2((t-b)/a,(e-C)/s);let w=Math.atan2((i-b)/a,(r-C)/s)-k;o&&w<0&&(w+=2*Math.PI),!o&&w>0&&(w-=2*Math.PI);const v=[];for(let $=0;$<20;$++){const E=$/19,W=k+E*w,P=C+s*Math.cos(W),O=b+a*Math.sin(W);v.push({x:P,y:O})}return v}f(sn,"generateArcPoints");function df(e,t,r){const[i,s]=[t,r].sort((a,o)=>o-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}f(df,"calculateArcSagitta");async function pf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=f(W=>W+o,"calcTotalHeight"),l=f(W=>{const P=W/2;return[P/(2.5+W/50),P]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await et(e,t,tt(t)),u=n(t!=null&&t.height?t==null?void 0:t.height:c.height),[p,d]=l(u),g=df(u,p,d),y=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+g-g,C=u,{cssStyles:b}=t,k=[{x:y/2,y:-C/2},{x:-y/2,y:-C/2},...sn(-y/2,-C/2,-y/2,C/2,p,d,!1),{x:y/2,y:C/2},...sn(y/2,C/2,y/2,-C/2,p,d,!0)],_=X.svg(h),w=V(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=ft(k),$=_.path(v,w),E=h.insert(()=>$,":first-child");return E.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(${p/2}, 0)`),K(t,E),t.intersect=function(W){return j.polygon(t,k,W)},h}f(pf,"bowTieRect");function Xe(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}f(Xe,"insertPolygonShape");var ws=12;async function ff(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,o=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+ws),c=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),u=0,p=h,d=-c,g=0,m=[{x:u+ws,y:d},{x:p,y:d},{x:p,y:g},{x:u,y:g},{x:u,y:d+ws},{x:u+ws,y:d}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=X.svg(n),k=V(t,{}),_=ft(m),w=b.path(_,k);y=n.insert(()=>w,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&y.attr("style",C)}else y=Xe(n,h,c,m);return i&&y.attr("style",i),K(t,y),t.intersect=function(b){return j.polygon(t,m,b)},n}f(ff,"card");function gf(e,t){const{nodeStyles:r}=Z(t);t.label="";const i=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=X.svg(i),l=V(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=ft(o),c=n.path(h,l),u=i.insert(()=>c,":first-child");return s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),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(gf,"choice");async function sl(e,t,r){const{labelStyles:i,nodeStyles:s}=Z(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:n}=await et(e,t,tt(t)),l=16,h=(r==null?void 0:r.padding)??n,c=t.look==="neo"?o.width/2+l*2:o.width/2+h;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=X.svg(a),g=V(t,{}),m=d.circle(0,0,c*2,g);u=a.insert(()=>m,":first-child"),u.attr("class","basic label-container").attr("style",Nt(p))}else u=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",c).attr("cx",0).attr("cy",0);return K(t,u),t.calcIntersect=function(d,g){const m=d.width/2;return j.circle(d,m,g)},t.intersect=function(d){return z.info("Circle intersect",t,c,d),j.circle(t,c,d)},a}f(sl,"circle");function mf(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},a={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 ${a.x},${a.y} L ${n.x},${n.y}
231
- M ${s.x},${s.y} L ${o.x},${o.y}`}f(mf,"createLine");function yf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=X.svg(s),l=V(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=n.circle(0,0,a*2,l),c=mf(a),u=n.path(c,l),p=s.insert(()=>h,":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),K(t,p),t.intersect=function(d){return z.info("crossedCircle intersect",t,{radius:a,point:d}),j.circle(t,a,d)},s}f(yf,"crossedCircle");function qe(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*c,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 Cf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await et(e,t,tt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+n,c=a.height+l,u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...qe(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...qe(h/2+u*2,-u,u,20,-180,-270),...qe(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...qe(h/2,c/2,u,20,0,90)],g=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...qe(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...qe(h/2+h*.1,-u,u,20,-180,-270),...qe(h/2+h*.1,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...qe(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2,y:c/2+u}],m=X.svg(s),y=V(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=ft(d).replace("Z",""),k=m.path(b,y),_=ft(g),w=m.path(_,{...y}),v=s.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(${-h/2+u-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),K(t,v),t.intersect=function($){return j.polygon(t,g,$)},s}f(Cf,"curlyBraceLeft");function We(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*c,d=e+r*Math.cos(p),g=t+r*Math.sin(p);o.push({x:d,y:g})}return o}f(We,"generateCirclePoints");async function xf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await et(e,t,tt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?n*2:n),c=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...We(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...We(h/2+u*2,-u,u,20,-180,-270),...We(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...We(h/2,c/2,u,20,0,90)],g=[{x:-h/2,y:-c/2-u},{x:h/2,y:-c/2-u},...We(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...We(h/2+u*2,-u,u,20,-180,-270),...We(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...We(h/2,c/2,u,20,0,90),{x:h/2,y:c/2+u},{x:-h/2,y:c/2+u}],m=X.svg(s),y=V(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=ft(d).replace("Z",""),k=m.path(b,y),_=ft(g),w=m.path(_,{...y}),v=s.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(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),K(t,v),t.intersect=function($){return j.polygon(t,g,$)},s}f(xf,"curlyBraceRight");function Wt(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*c,d=e+r*Math.cos(p),g=t+r*Math.sin(p);o.push({x:-d,y:-g})}return o}f(Wt,"generateCirclePoints");async function bf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await et(e,t,tt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?n*2:n),c=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...Wt(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...Wt(h/2+u*2,-u,u,20,-180,-270),...Wt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...Wt(h/2,c/2,u,20,0,90)],g=[...Wt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...Wt(-h/2-u/2,-u,u,20,0,90),...Wt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...Wt(-h/2+u+u/2,c/2,u,30,-180,-270)],m=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...Wt(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...Wt(h/2+u*2,-u,u,20,-180,-270),...Wt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...Wt(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2-u-u/2,y:c/2+u},...Wt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...Wt(-h/2-u/2,-u,u,20,0,90),...Wt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...Wt(-h/2+u+u/2,c/2,u,30,-180,-270)],y=X.svg(s),C=V(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=ft(d).replace("Z",""),_=y.path(k,C),v=ft(g).replace("Z",""),$=y.path(v,C),E=ft(m),W=y.path(E,{...C}),P=s.insert("g",":first-child");return P.insert(()=>W,":first-child").attr("stroke-opacity",0),P.insert(()=>_,":first-child"),P.insert(()=>$,":first-child"),P.attr("class","text"),p&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(${u-u/4}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),K(t,P),t.intersect=function(O){return j.polygon(t,m,O)},s}f(bf,"curlyBraces");async function kf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:h,bbox:c}=await et(e,t,tt(t)),u=Math.max(n,(c.width+a*2)*1.25,(t==null?void 0:t.width)??0),p=Math.max(l,c.height+o*2,(t==null?void 0:t.height)??0),d=p/2,{cssStyles:g}=t,m=X.svg(h),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=u,b=p,k=C-d,_=b/4,w=[{x:k,y:0},{x:_,y:0},{x:0,y:b/2},{x:_,y:b},{x:k,y:b},...Zi(-k,-b/2,d,50,270,90)],v=ft(w),$=m.path(v,y),E=h.insert(()=>$,":first-child");return E.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",i),E.attr("transform",`translate(${-u/2}, ${-p/2})`),K(t,E),t.intersect=function(W){return j.polygon(t,w,W)},h}f(kf,"curvedTrapezoid");var JT=f((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),tS=f((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),eS=f((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),zh=8,Hh=8;async function Tf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,o=t.look==="neo"?24:s;if(t.width||t.height){const y=t.width??0;t.width=(t.width??0)-o,t.width<Hh&&(t.width=Hh);const b=y/2/(2.5+y/50);t.height=(t.height??0)-a-b*3,t.height<zh&&(t.height=zh)}const{shapeSvg:n,bbox:l,label:h}=await et(e,t,tt(t)),c=(t.width?t.width:l.width)+o,u=c/2,p=u/(2.5+c/50),d=(t.height?t.height:l.height)+a+p;let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=X.svg(n),C=tS(0,0,c,d,u,p),b=eS(0,p,c,d,u,p),k=V(t,{}),_=y.path(C,k),w=y.path(b,V(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=JT(0,0,c,d,u,p);g=n.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",Nt(m)).attr("style",i)}return g.attr("label-offset-y",p),g.attr("transform",`translate(${-c/2}, ${-(d/2+p)})`),K(t,g),h.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 C=j.rect(t,y),b=C.x-(t.x??0);if(u!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(C.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),C.y+=k}return C},n}f(Tf,"cylinder");async function fi(e,t,r){const{labelStyles:i,nodeStyles:s}=Z(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await et(e,t,tt(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-n/2,c=-l/2;let u,{rx:p,ry:d}=t;const{cssStyles:g}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,d=r.ry),t.look==="handDrawn"){const m=X.svg(a),y=V(t,{}),C=p||d?m.path(sr(h,c,n,l,p||0),y):m.rectangle(h,c,n,l,y);u=a.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",Nt(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",Nt(p)).attr("ry",Nt(d)).attr("x",h).attr("y",c).attr("width",n).attr("height",l);return K(t,u),t.calcIntersect=function(m,y){return j.rect(m,y)},t.intersect=function(m){return j.rect(t,m)},a}f(fi,"drawRect");async function Sf(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:o,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},h=await fi(e,t,l);if(t.look==="handDrawn"){const d=X.svg(h),g=V(t,{}),m=h.select(".basic.label-container > path:nth-child(2)"),y=m.node();if(!y)return h;let C=null;if(y instanceof SVGGraphicsElement)C=y.getBBox();else return h;return h.insert(()=>d.line(C.x,C.y,C.x+C.width,C.y,g),".basic.label-container g.label"),h.insert(()=>d.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,g),".basic.label-container g.label"),m.remove(),h}const c=h.select(".basic.label-container"),u=(Number(c.attr("width"))||o)??0,p=(Number(c.attr("height"))||n)??0;return u>0&&p>0&&c.attr("stroke-dasharray",`${u} ${p}`),h}f(Sf,"datastore");async function wf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),h=n.width+s,c=n.height+a,u=c*.2,p=-h/2,d=-c/2-u/2,{cssStyles:g}=t,m=X.svg(o),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{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(C.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))})`),K(t,k),t.intersect=function(_){return j.rect(t,_)},o}f(wf,"dividedRectangle");async function _f(e,t){var d,g;const{labelStyles:r,nodeStyles:i}=Z(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(o??0),c=h-s;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const m=X.svg(n),y=V(t,{roughness:.2,strokeWidth:2.5}),C=V(t,{roughness:.2,strokeWidth:1.5}),b=m.circle(0,0,h*2,y),k=m.circle(0,0,c*2,C);u=n.insert("g",":first-child"),u.attr("class",Nt(t.cssClasses)).attr("style",Nt(p)),(d=u.node())==null||d.appendChild(b),(g=u.node())==null||g.appendChild(k)}else{u=n.insert("g",":first-child");const m=u.insert("circle",":first-child"),y=u.insert("circle");u.attr("class","basic label-container").attr("style",i),m.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),y.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return K(t,u),t.intersect=function(m){return z.info("DoubleCircle intersect",t,h,m),j.circle(t,h,m)},n}f(_f,"doublecircle");function Bf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=Z(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=X.svg(a),{nodeBorder:h}=r,c=V(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const u=l.circle(0,0,o*2,c),p=a.insert(()=>u,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),K(t,p),t.intersect=function(d){return z.info("filledCircle intersect",t,{radius:o,point:d}),j.circle(t,o,d)},a}f(Bf,"filledCircle");var Yh=10,Uh=10;async function vf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<Yh&&(t.height=Yh),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<Uh&&(t.width=Uh));const{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(a??0),c=t!=null&&t.height?t==null?void 0:t.height:h+n.height,u=c,p=[{x:0,y:-c},{x:u,y:-c},{x:u/2,y:0}],{cssStyles:d}=t,g=X.svg(o),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=ft(p),C=g.path(y,m),b=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${c/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=h,t.height=c,K(t,b),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-c/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(k){return z.info("Triangle intersect",t,p,k),j.polygon(t,p,k)},o}f(vf,"flippedTriangle");function Lf(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=Z(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==null?void 0:t.width)??0),h=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),h=Math.max(70,(t==null?void 0:t.height)??0));const c=-1*l/2,u=-1*h/2,p=X.svg(o),d=V(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=p.rectangle(c,u,l,h,d),m=o.insert(()=>g,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),K(t,m);const y=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(C){return j.rect(t,C)},o}f(Lf,"forkJoin");async function Ff(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=15,a=10,o=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-o*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:h}=await et(e,t,tt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,h.width))+o*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,h.height))+n*2,p=u/2,{cssStyles:d}=t,g=X.svg(l),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-c/2,y:-u/2},{x:c/2-p,y:-u/2},...Zi(-c/2+p,0,p,50,90,270),{x:c/2-p,y:u/2},{x:-c/2,y:u/2}],C=ft(y),b=g.path(C,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),K(t,k),t.intersect=function(_){return z.info("Pill intersect",t,{radius:p,point:_}),j.polygon(t,y,_)},l}f(Ff,"halfRoundedRectangle");var rS=f((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Af(e,t){const{labelStyles:r,nodeStyles:i}=Z(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,o=70,n=32,l=t.look==="neo"?o:a,h=t.look==="neo"?n:a;if(t.width||t.height){const k=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*k-h,t.height=(t.height??0)-l}const{shapeSvg:c,bbox:u}=await et(e,t,tt(t)),p=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=p/s,g=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+h,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:C}=t;if(t.look==="handDrawn"){const b=X.svg(c),k=V(t,{}),_=rS(0,0,g,p,d),w=b.path(_,k);y=c.insert(()=>w,":first-child").attr("transform",`translate(${-g/2}, ${p/2})`),C&&y.attr("style",C)}else y=Xe(c,g,p,m);return i&&y.attr("style",i),t.width=g,t.height=p,K(t,y),t.intersect=function(b){return j.polygon(t,m,b)},c}f(Af,"hexagon");async function Ef(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await et(e,t,tt(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=X.svg(s),h=V(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=ft(c),p=l.path(u,h),d=s.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(${-a/2}, ${-o/2})`),K(t,d),t.intersect=function(g){return z.info("Pill intersect",t,{points:c}),j.polygon(t,c,g)},s}f(Ef,"hourglass");async function Mf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Z(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:u}=await et(e,t,"icon-shape default"),p=t.pos==="t",d=n,g=n,{nodeBorder:m}=r,{stylesMap:y}=di(t),C=-g/2,b=-d/2,k=t.label?8:0,_=X.svg(h),w=V(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=_.rectangle(C,b,g,d,w),$=Math.max(g,c.width),E=d+c.height+k,W=_.rectangle(-$/2,-E/2,$,E,{...w,fill:"transparent",stroke:"none"}),P=h.insert(()=>v,":first-child"),O=h.insert(()=>W);if(t.icon){const Y=h.append("g");Y.html(`<g>${await as(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const H=Y.node().getBBox(),I=H.width,A=H.height,B=H.x,M=H.y;Y.attr("transform",`translate(${-I/2-B},${p?c.height/2+k/2-A/2-M:-c.height/2-k/2-A/2-M})`),Y.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-E/2:E/2-c.height})`),P.attr("transform",`translate(0,${p?c.height/2+k/2:-c.height/2-k/2})`),K(t,O),t.intersect=function(Y){if(z.info("iconSquare intersect",t,Y),!t.label)return j.rect(t,Y);const H=t.x??0,I=t.y??0,A=t.height??0;let B=[];return p?B=[{x:H-c.width/2,y:I-A/2},{x:H+c.width/2,y:I-A/2},{x:H+c.width/2,y:I-A/2+c.height+k},{x:H+g/2,y:I-A/2+c.height+k},{x:H+g/2,y:I+A/2},{x:H-g/2,y:I+A/2},{x:H-g/2,y:I-A/2+c.height+k},{x:H-c.width/2,y:I-A/2+c.height+k}]:B=[{x:H-g/2,y:I-A/2},{x:H+g/2,y:I-A/2},{x:H+g/2,y:I-A/2+d},{x:H+c.width/2,y:I-A/2+d},{x:H+c.width/2/2,y:I+A/2},{x:H-c.width/2,y:I+A/2},{x:H-c.width/2,y:I-A/2+d},{x:H-g/2,y:I-A/2+d}],j.polygon(t,B,Y)},h}f(Mf,"icon");async function $f(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Z(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:u}=await et(e,t,"icon-shape default"),p=20,d=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:C}=di(t),b=X.svg(h),k=V(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=C.get("fill");k.stroke=_??y;const w=h.append("g");t.icon&&w.html(`<g>${await as(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=w.node().getBBox(),$=v.width,E=v.height,W=v.x,P=v.y,O=Math.max($,E)*Math.SQRT2+p*2,Y=b.circle(0,0,O,k),H=Math.max(O,c.width),I=O+c.height+d,A=b.rectangle(-H/2,-I/2,H,I,{...k,fill:"transparent",stroke:"none"}),B=h.insert(()=>Y,":first-child"),M=h.insert(()=>A);return w.attr("transform",`translate(${-$/2-W},${g?c.height/2+d/2-E/2-P:-c.height/2-d/2-E/2-P})`),w.attr("style",`color: ${C.get("stroke")??m};`),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${g?-I/2:I/2-c.height})`),B.attr("transform",`translate(0,${g?c.height/2+d/2:-c.height/2-d/2})`),K(t,M),t.intersect=function(F){return z.info("iconSquare intersect",t,F),j.rect(t,F)},h}f($f,"iconCircle");async function Of(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Z(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:p}=await et(e,t,"icon-shape default"),d=t.pos==="t",g=n+u*2,m=n+u*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=di(t),k=-m/2,_=-g/2,w=t.label?8:0,v=X.svg(h),$=V(t,{});t.look!=="handDrawn"&&($.roughness=0,$.fillStyle="solid");const E=b.get("fill");$.stroke=E??C;const W=v.path(sr(k,_,m,g,5),$),P=Math.max(m,c.width),O=g+c.height+w,Y=v.rectangle(-P/2,-O/2,P,O,{...$,fill:"transparent",stroke:"none"}),H=h.insert(()=>W,":first-child").attr("class","icon-shape2"),I=h.insert(()=>Y);if(t.icon){const A=h.append("g");A.html(`<g>${await as(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=A.node().getBBox(),M=B.width,F=B.height,S=B.x,q=B.y;A.attr("transform",`translate(${-M/2-S},${d?c.height/2+w/2-F/2-q:-c.height/2-w/2-F/2-q})`),A.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-O/2:O/2-c.height})`),H.attr("transform",`translate(0,${d?c.height/2+w/2:-c.height/2-w/2})`),K(t,I),t.intersect=function(A){if(z.info("iconSquare intersect",t,A),!t.label)return j.rect(t,A);const B=t.x??0,M=t.y??0,F=t.height??0;let S=[];return d?S=[{x:B-c.width/2,y:M-F/2},{x:B+c.width/2,y:M-F/2},{x:B+c.width/2,y:M-F/2+c.height+w},{x:B+m/2,y:M-F/2+c.height+w},{x:B+m/2,y:M+F/2},{x:B-m/2,y:M+F/2},{x:B-m/2,y:M-F/2+c.height+w},{x:B-c.width/2,y:M-F/2+c.height+w}]:S=[{x:B-m/2,y:M-F/2},{x:B+m/2,y:M-F/2},{x:B+m/2,y:M-F/2+g},{x:B+c.width/2,y:M-F/2+g},{x:B+c.width/2/2,y:M+F/2},{x:B-c.width/2,y:M+F/2},{x:B-c.width/2,y:M-F/2+g},{x:B-m/2,y:M-F/2+g}],j.polygon(t,S,A)},h}f(Of,"iconRounded");async function If(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Z(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:p}=await et(e,t,"icon-shape default"),d=t.pos==="t",g=n+u*2,m=n+u*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=di(t),k=-m/2,_=-g/2,w=t.label?8:0,v=X.svg(h),$=V(t,{});t.look!=="handDrawn"&&($.roughness=0,$.fillStyle="solid");const E=b.get("fill");$.stroke=E??C;const W=v.path(sr(k,_,m,g,.1),$),P=Math.max(m,c.width),O=g+c.height+w,Y=v.rectangle(-P/2,-O/2,P,O,{...$,fill:"transparent",stroke:"none"}),H=h.insert(()=>W,":first-child"),I=h.insert(()=>Y);if(t.icon){const A=h.append("g");A.html(`<g>${await as(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=A.node().getBBox(),M=B.width,F=B.height,S=B.x,q=B.y;A.attr("transform",`translate(${-M/2-S},${d?c.height/2+w/2-F/2-q:-c.height/2-w/2-F/2-q})`),A.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-O/2:O/2-c.height})`),H.attr("transform",`translate(0,${d?c.height/2+w/2:-c.height/2-w/2})`),K(t,I),t.intersect=function(A){if(z.info("iconSquare intersect",t,A),!t.label)return j.rect(t,A);const B=t.x??0,M=t.y??0,F=t.height??0;let S=[];return d?S=[{x:B-c.width/2,y:M-F/2},{x:B+c.width/2,y:M-F/2},{x:B+c.width/2,y:M-F/2+c.height+w},{x:B+m/2,y:M-F/2+c.height+w},{x:B+m/2,y:M+F/2},{x:B-m/2,y:M+F/2},{x:B-m/2,y:M-F/2+c.height+w},{x:B-c.width/2,y:M-F/2+c.height+w}]:S=[{x:B-m/2,y:M-F/2},{x:B+m/2,y:M-F/2},{x:B+m/2,y:M-F/2+g},{x:B+c.width/2,y:M-F/2+g},{x:B+c.width/2/2,y:M+F/2},{x:B-c.width/2,y:M+F/2},{x:B-c.width/2,y:M-F/2+g},{x:B-m/2,y:M-F/2+g}],j.polygon(t,S,A)},h}f(If,"iconSquare");async function Df(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:o}=Z(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??s),h=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,c=t.constraint==="on"?h/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(h,n??0);const{shapeSvg:u,bbox:p,label:d}=await et(e,t,"image-shape default"),g=t.pos==="t",m=-h/2,y=-c/2,C=t.label?8:0,b=X.svg(u),k=V(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=b.rectangle(m,y,h,c,k),w=Math.max(h,p.width),v=c+p.height+C,$=b.rectangle(-w/2,-v/2,w,v,{...k,fill:"none",stroke:"none"}),E=u.insert(()=>_,":first-child"),W=u.insert(()=>$);if(t.img){const P=u.append("image");P.attr("href",t.img),P.attr("width",h),P.attr("height",c),P.attr("preserveAspectRatio","none"),P.attr("transform",`translate(${-h/2},${g?v/2-c:-v/2})`)}return d.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${g?-c/2-p.height/2-C/2:c/2-p.height/2+C/2})`),E.attr("transform",`translate(0,${g?p.height/2+C/2:-p.height/2-C/2})`),K(t,W),t.intersect=function(P){if(z.info("iconSquare intersect",t,P),!t.label)return j.rect(t,P);const O=t.x??0,Y=t.y??0,H=t.height??0;let I=[];return g?I=[{x:O-p.width/2,y:Y-H/2},{x:O+p.width/2,y:Y-H/2},{x:O+p.width/2,y:Y-H/2+p.height+C},{x:O+h/2,y:Y-H/2+p.height+C},{x:O+h/2,y:Y+H/2},{x:O-h/2,y:Y+H/2},{x:O-h/2,y:Y-H/2+p.height+C},{x:O-p.width/2,y:Y-H/2+p.height+C}]:I=[{x:O-h/2,y:Y-H/2},{x:O+h/2,y:Y-H/2},{x:O+h/2,y:Y-H/2+c},{x:O+p.width/2,y:Y-H/2+c},{x:O+p.width/2/2,y:Y+H/2},{x:O-p.width/2,y:Y+H/2},{x:O-p.width/2,y:Y-H/2+c},{x:O-h/2,y:Y-H/2+c}],j.polygon(t,I,P)},u}f(Df,"imageSquare");async function Rf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=Math.max(l.width+(o??0)*2,(t==null?void 0:t.width)??0),c=Math.max(l.height+(a??0)*2,(t==null?void 0:t.height)??0),u=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=X.svg(n),m=V(t,{}),y=ft(u),C=g.path(y,m);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=Xe(n,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,K(t,p),t.intersect=function(g){return j.polygon(t,u,g)},n}f(Rf,"inv_trapezoid");async function Pf(e,t){const{shapeSvg:r,bbox:i,label:s}=await et(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),K(t,a),t.intersect=function(l){return j.rect(t,l)},r}f(Pf,"labelRect");async function Nf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,u=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-(3*h)/6,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=X.svg(n),m=V(t,{}),y=ft(u),C=g.path(y,m);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Xe(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,K(t,p),t.intersect=function(g){return j.polygon(t,u,g)},n}f(Nf,"lean_left");async function qf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,u=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=X.svg(n),m=V(t,{}),y=ft(u),C=g.path(y,m);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Xe(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,K(t,p),t.intersect=function(g){return j.polygon(t,u,g)},n}f(qf,"lean_right");function Wf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,h=[{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}],c=X.svg(s),u=V(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const p=ft(h),d=c.path(p,u),g=s.insert(()=>d,":first-child");return g.attr("class","outer-path"),a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-n})`),K(t,g),t.intersect=function(m){return z.info("lightningBolt intersect",t,m),j.polygon(t,h,m)},s}f(Wf,"lightningBolt");var iS=f((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),sS=f((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),aS=f((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Gh=10,jh=10;async function zf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-a,t.width<jh&&(t.width=jh);const k=C/2/(2.5+C/50);t.height=(t.height??0)-o-k*3,t.height<Gh&&(t.height=Gh)}const{shapeSvg:n,bbox:l,label:h}=await et(e,t,tt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=c/2,p=u/(2.5+c/50),d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+p+o*2,g=d*.1;let m;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=X.svg(n),b=sS(0,0,c,d,u,p,g),k=aS(0,p,c,d,u,p),_=V(t,{}),w=C.path(b,_),v=C.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 C=iS(0,0,c,d,u,p,g);m=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",Nt(y)).attr("style",i)}return m.attr("label-offset-y",p),m.attr("transform",`translate(${-c/2}, ${-(d/2+p)})`),K(t,m),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(C){const b=j.rect(t,C),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-_,C.y-(t.y??0)>0&&(_=-_),b.y+=_}return b},n}f(zf,"linedCylinder");async function Hf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;if(t.width||t.height){const _=t.width;t.width=(_??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:h}=await et(e,t,tt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(a??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(o??0)*2,p=t.look==="neo"?u/4:u/8,d=u+p,{cssStyles:g}=t,m=X.svg(n),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-c/2-c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:d/2},...ir(-c/2-c/2*.1,d/2,c/2+c/2*.1,d/2,p,.8),{x:c/2+c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:-d/2},{x:-c/2,y:-d/2},{x:-c/2,y:d/2*1.1},{x:-c/2,y:-d/2}],b=m.polygon(C.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})`),h.attr("transform",`translate(${-c/2+(t.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-p/2-(l.y-(l.top??0))})`),K(t,k),t.intersect=function(_){return j.polygon(t,C,_)},n}f(Hf,"linedWaveEdgedRect");async function Yf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*n,10));const{shapeSvg:l,bbox:h,label:c}=await et(e,t,tt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+2*n,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+o*2+2*n,d=u-2*n,g=p-2*n,m=-d/2,y=-g/2,{cssStyles:C}=t,b=X.svg(l),k=V(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=ft(_);let $=b.path(v,k);const E=ft(w);let W=b.path(E,k);t.look!=="handDrawn"&&($=en($),W=en(W));const P=l.insert("g",":first-child");return P.insert(()=>$),P.insert(()=>W),P.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(h.width/2)-n-(h.x-(h.left??0))}, ${-(h.height/2)+n-(h.y-(h.top??0))})`),K(t,P),t.intersect=function(O){return j.polygon(t,_,O)},l}f(Yf,"multiRect");async function Uf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await et(e,t,tt(t)),n=t.padding??0,l=t.look==="neo"?16:n,h=t.look==="neo"?12:n;let c=!0;(t.width||t.height)&&(c=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-h*3);const u=Math.max(a.width,(t==null?void 0:t.width)??0)+l*2,p=Math.max(a.height,(t==null?void 0:t.height)??0)+h*3,d=t.look==="neo"?p/4:p/8,g=p+(c?d/2:-d/2),m=-u/2,y=-g/2,C=10,{cssStyles:b}=t,k=ir(m-C,y+g+C,m+u-C,y+g+C,d,.8),_=k==null?void 0:k[k.length-1],w=[{x:m-C,y:y+C},{x:m-C,y:y+g+C},...k,{x:m+u-C,y:_.y-C},{x:m+u,y:_.y-C},{x:m+u,y:_.y-2*C},{x:m+u+C,y:_.y-2*C},{x:m+u+C,y:y-C},{x:m+C,y:y-C},{x:m+C,y},{x:m,y},{x:m,y:y+C}],v=[{x:m,y:y+C},{x:m+u-C,y:y+C},{x:m+u-C,y:_.y-C},{x:m+u,y:_.y-C},{x:m+u,y},{x:m,y}],$=X.svg(s),E=V(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const W=ft(w),P=$.path(W,E),O=ft(v),Y=$.path(O,E),H=s.insert(()=>P,":first-child");return H.insert(()=>Y),H.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&H.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&H.selectAll("path").attr("style",i),H.attr("transform",`translate(0,${-d/2})`),o.attr("transform",`translate(${-(a.width/2)-C-(a.x-(a.left??0))}, ${-(a.height/2)+C-d/2-(a.y-(a.top??0))})`),K(t,H),t.intersect=function(I){return j.polygon(t,w,I)},s}f(Uf,"multiWaveEdgedRectangle");async function Gf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=Z(t);t.labelStyle=i,t.useHtmlLabels||Jt(vt())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),h=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-h/2,p=-c/2,{cssStyles:d}=t,g=X.svg(o),m=V(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(u,p,h,c,m),C=o.insert(()=>y,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",d),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),K(t,C),t.intersect=function(b){return j.rect(t,b)},o}f(Gf,"note");var oS=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 jf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await et(e,t,tt(t)),o=a.width+(t.padding??0),n=a.height+(t.padding??0),l=o+n,h=.5,c=[{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=X.svg(s),g=V(t,{}),m=oS(0,0,l),y=d.path(m,g);u=s.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+h}, ${l/2})`),p&&u.attr("style",p)}else u=Xe(s,l,l,c),u.attr("transform",`translate(${-l/2+h}, ${l/2})`);return i&&u.attr("style",i),K(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}],C=j.polygon(d,y,g);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},s}f(jf,"question");async function Xf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,o=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:h}=await et(e,t,tt(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a),u=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),p=-c/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,C=X.svg(n),b=V(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=ft(m),_=C.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)`),h.attr("transform",`translate(${-g/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),K(t,w),t.intersect=function(v){return j.polygon(t,m,v)},n}f(Xf,"rect_left_inv_arrow");async function Vf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",i),l=t.description,h=t.label,c=await Ke(n,h,t.labelStyle,!0,!0);let u={width:0,height:0};if(Jt(yt())){const E=c.children[0],W=ht(c);u=E.getBoundingClientRect(),W.attr("width",u.width),W.attr("height",u.height)}z.info("Text 2",l);const p=l||[],d=c.getBBox(),g=await Ke(n,Array.isArray(p)?p.join("<br/>"):p,t.labelStyle,!0,!0),m=g.children[0],y=ht(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const C=(t.padding||0)/2;ht(g).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+C+5)+")"),ht(c).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-C+3)+")");const b=u.width+(t.padding||0),k=u.height+(t.padding||0),_=-u.width/2-C,w=-u.height/2-C;let v,$;if(t.look==="handDrawn"){const E=X.svg(a),W=V(t,{}),P=E.path(sr(_,w,b,k,t.rx||0),W),O=E.line(-u.width/2-C,-u.height/2-C+d.height+C,u.width/2+C,-u.height/2-C+d.height+C,W);$=a.insert(()=>(z.debug("Rough node insert CXC",P),O),":first-child"),v=a.insert(()=>(z.debug("Rough node insert CXC",P),P),":first-child")}else v=o.insert("rect",":first-child"),$=o.insert("line"),v.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-C).attr("y",-u.height/2-C).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),$.attr("class","divider").attr("x1",-u.width/2-C).attr("x2",u.width/2+C).attr("y1",-u.height/2-C+d.height+C).attr("y2",-u.height/2-C+d.height+C);return K(t,v),t.intersect=function(E){return j.rect(t,E)},a}f(Vf,"rectWithTitle");async function Zf(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return fi(e,t,s)}f(Zf,"roundedRect");var hr=8;async function Kf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),h=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?hr:hr*2),c=((t==null?void 0:t.height)??n.height)+a*2,u=h-hr,p=c,d=hr-h/2,g=-c/2,{cssStyles:m}=t,y=X.svg(o),C=V(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:d,y:g},{x:d+u,y:g},{x:d+u,y:g+p},{x:d-hr,y:g+p},{x:d-hr,y:g},{x:d,y:g},{x:d,y:g+p}],k=y.polygon(b.map(w=>[w.x,w.y]),C),_=o.insert(()=>k,":first-child");return _.attr("class","basic label-container outer-path").attr("style",Nt(m)),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),m&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),l.attr("transform",`translate(${hr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),K(t,_),t.intersect=function(w){return j.rect(t,w)},o}f(Kf,"shadedProcess");async function Qf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-o*2,10));const{shapeSvg:n,bbox:l,label:h}=await et(e,t,tt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2)*1.5,p=c,d=u/1.5,g=-p/2,m=-d/2,{cssStyles:y}=t,C=X.svg(n),b=V(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}],_=ft(k),w=C.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})`),h.attr("transform",`translate(${-p/2+(t.padding??0)-(l.x-(l.left??0))}, ${-d/4+(t.padding??0)-(l.y-(l.top??0))})`),K(t,v),t.intersect=function($){return j.polygon(t,k,$)},n}f(Qf,"slopedRect");async function Jf(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return fi(e,t,a)}f(Jf,"squareRect");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?20:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=l.height+(t.look==="neo"?o*2:o),c=l.width+h/4+(t.look==="neo"?a*2:a),u=h/2,{cssStyles:p}=t,d=X.svg(n),g=V(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-c/2+u,y:-h/2},{x:c/2-u,y:-h/2},...Zi(-c/2+u,0,u,50,90,270),{x:c/2-u,y:h/2},...Zi(c/2-u,0,u,50,270,450)],y=ft(m),C=d.path(y,g),b=n.insert(()=>C,":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),K(t,b),t.intersect=function(k){return j.polygon(t,m,k)},n}f(tg,"stadium");async function eg(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return fi(e,t,r)}f(eg,"state");function rg(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:s}=Z(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:n,nodeBorder:l,nodeShadow:h}=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 c=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=X.svg(c),p=V(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"}),C=c.insert(()=>d,":first-child");if(C.insert(()=>y),t.look!=="handDrawn"&&C.attr("class","outer-path"),a&&C.selectAll("path").attr("style",a),s&&C.selectAll("path").attr("style",s),t.width<25&&h&&t.look!=="handDrawn"){const _=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",w=_?`${_}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${w})`)}return K(t,C),t.intersect=function(_){return j.circle(t,(t.width??0)/2,_)},c}f(rg,"stateEnd");function ig(e,t,{config:{themeVariables:r}}){var n,l;const{lineColor:i,nodeShadow:s}=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 a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const c=X.svg(a).circle(0,0,t.width,g2(i));o=a.insert(()=>c),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=a.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&&s&&t.look!=="handDrawn"){const h=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",c=h?`${h}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${c})`)}return K(t,o),t.intersect=function(h){return j.circle(t,(t.width??7)/2,h)},a}f(ig,"stateStart");var Rr=8;async function sg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=((t==null?void 0:t.width)??l.width)+2*Rr+a,c=((t==null?void 0:t.height)??l.height)+o,u=h-2*Rr,p=c,d=-h/2,g=-c/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=X.svg(n),C=V(t,{}),b=y.rectangle(d,g,u+16,p,C),k=y.line(d+Rr,g,d+Rr,g+p,C),_=y.line(d+Rr+u,g,d+Rr+u,g+p,C);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",Nt(v)),K(t,w)}else{const y=Xe(n,u,p,m);i&&y.attr("style",i),K(t,y)}return t.intersect=function(y){return j.polygon(t,m,y)},n}f(sg,"subroutine");var lo=.2;async function ag(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-o*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-lo*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,c=lo*h,u=lo*h,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+c-c,g=h,m=-d/2,y=-g/2,{cssStyles:C}=t,b=X.svg(n),k=V(t,{}),_=[{x:m-c/2,y},{x:m+d+c/2,y},{x:m+d+c/2,y:y+g},{x:m-c/2,y:y+g}],w=[{x:m+d-c/2,y:y+g},{x:m+d+c/2,y:y+g},{x:m+d+c/2,y:y+g-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=ft(_),$=b.path(v,k),E=ft(w),W=b.path(E,{...k,fillStyle:"solid"}),P=n.insert(()=>W,":first-child");return P.insert(()=>$,":first-child"),P.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),K(t,P),t.intersect=function(O){return j.polygon(t,_,O)},n}f(ag,"taggedRect");async function og(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await et(e,t,tt(t)),n=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/8,c=.2*n,u=.2*l,p=l+h,{cssStyles:d}=t,g=X.svg(s),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:p/2},...ir(-n/2-n/2*.1,p/2,n/2+n/2*.1,p/2,h,.8),{x:n/2+n/2*.1,y:-p/2},{x:-n/2-n/2*.1,y:-p/2}],C=-n/2+n/2*.1,b=-p/2-u*.4,k=[{x:C+n-c,y:(b+l)*1.3},{x:C+n,y:b+l-u},{x:C+n,y:(b+l)*.9},...ir(C+n,(b+l)*1.25,C+n-c,(b+l)*1.3,-l*.02,.5)],_=ft(y),w=g.path(_,m),v=ft(k),$=g.path(v,{...m,fillStyle:"solid"}),E=s.insert(()=>$,":first-child");return E.insert(()=>w,":first-child"),E.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-h/2-(a.y-(a.top??0))})`),K(t,E),t.intersect=function(W){return j.polygon(t,y,W)},s}f(og,"taggedWaveEdgedRectangle");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await et(e,t,tt(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-o/2,h=-n/2,c=s.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",o).attr("height",n),K(t,c),t.intersect=function(u){return j.rect(t,u)},s}f(ng,"text");var nS=f((e,t,r,i,s,a)=>`M${e},${t}
230
+ `),a):ke(t.label,a),h=t.isNode?"nodeLabel":"edgeLabel",c=n.append("span");c.html(l),Zo(c,t.labelStyle),c.attr("class",`${h} ${i}`),Zo(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"),s&&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(Gp,"addHtmlSpan");function va(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}f(va,"createTspan");function jp(e,t,r){const i=e.append("text"),s=va(i,1,t);La(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}f(jp,"computeWidthOfText");function TT(e,t,r){var o;const i=e.append("text"),s=va(i,1,t);La(s,[{content:r,type:"normal"}]);const a=(o=s.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}f(TT,"computeDimensionOfText");function Xp(e,t,r,i=!1,s=!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");s&&l.attr("text-anchor","middle");let h=0;for(const c of r){const u=f(d=>jp(o,1.1,d)<=e,"checkWidth"),p=u(c)?[c]:Up(c,u);for(const d of p){const g=va(l,h,1.1,s);La(g,d),h++}}if(i){const c=l.node().getBBox(),u=2;return n.attr("x",c.x-u).attr("y",c.y-u).attr("width",c.width+2*u).attr("height",c.height+2*u),o.node()}else return l.node()}f(Xp,"createFormattedText");function Ko(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(Ko,"decodeHTMLEntities");function La(e,t){e.text(""),t.forEach((r,i)=>{const s=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?s.text(Ko(r.content)):s.text(" "+Ko(r.content))})}f(La,"updateTextContentAndStyles");async function Vp(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,o)=>(r.push((async()=>{const n=`${a}:${o}`;return await kT(n)?await as(n,void 0,{class:"label-icon"}):`<i class='${ke(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}f(Vp,"replaceIconSubstring");var je=f(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:h=!1}={},c)=>{if(z.debug("XYZ createText",t,r,i,s,a,n,"addSvgBackground: ",h),a){const u=o?zp(t,c):Wp(t),p=await Vp(Tr(u),c),d=t.replace(/\\\\/g,"\\"),g={isNode:n,label:Wi(t)?d:p,labelStyle:r.replace("fill:","color:")};return await Gp(e,g,l,s,h,c)}else{const u=Tr(t.replace(/<br\s*\/?>/g,"<br/>")),p=o?qp(u.replace("<br>","<br/>"),c):Np(u),d=Xp(l,e,p,t?h:!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:");ht(d).attr("style",g)}else{const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ht(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:");ht(d).select("text").attr("style",m)}return i?ht(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ht(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function ro(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,o=Math.cos(a),n=Math.sin(a);for(const l of e){const[h,c]=l;l[0]=(h-i)*o-(c-s)*n+i,l[1]=(h-i)*n+(c-s)*o+s}}}function ST(e,t){return e[0]===t[0]&&e[1]===t[1]}function wT(e,t,r,i=1){const s=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const h of o)ro(h,n,s);const l=(function(h,c,u){const p=[];for(const b of h){const k=[...b];ST(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&p.push(k)}const d=[];c=Math.max(c,.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,C=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||C%c==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})),C++}return d})(o,a,i);if(s){for(const h of o)ro(h,n,-s);(function(h,c,u){const p=[];h.forEach((d=>p.push(...d))),ro(p,c,u)})(l,n,-s)}return l}function os(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),wT(e,s,i,a||1)}class rl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=os(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function Fa(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 _T extends rl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=os(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[h,c]of s)Fa([h,c])&&o.push([[h[0]-n,h[1]+l],[...c]],[[h[0]+n,h[1]-l],[...c]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class BT extends rl{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class vT{constructor(t){this.helper=t}fillPolygons(t,r){const i=os(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=s/4;for(const n of t){const l=Fa(n),h=l/s,c=Math.ceil(h)-1,u=l-c*s,p=(n[0][0]+n[1][0])/2-s/4,d=Math.min(n[0][1],n[1][1]);for(let g=0;g<c;g++){const m=d+u+g*s,y=p-o+2*Math.random()*o,C=m-o+2*Math.random()*o,b=this.helper.ellipse(y,C,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class LT{constructor(t){this.helper=t}fillPolygons(t,r){const i=os(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,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((o=>{const n=Fa(o),l=Math.floor(n/(i+s)),h=(n+s-l*(i+s))/2;let c=o[0],u=o[1];c[0]>u[0]&&(c=o[1],u=o[0]);const p=Math.atan((u[1]-c[1])/(u[0]-c[0]));for(let d=0;d<l;d++){const g=d*(i+s),m=g+i,y=[c[0]+g*Math.cos(p)+h*Math.cos(p),c[1]+g*Math.sin(p)+h*Math.sin(p)],C=[c[0]+m*Math.cos(p)+h*Math.cos(p),c[1]+m*Math.sin(p)+h*Math.sin(p)];a.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],r))}})),a}}class FT{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,a=os(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((a=>{const o=Fa(a),n=Math.round(o/(2*r));let l=a[0],h=a[1];l[0]>h[0]&&(l=a[1],h=a[0]);const c=Math.atan((h[1]-l[1])/(h[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(c),l[1]+p*Math.sin(c)],y=[l[0]+d*Math.cos(c),l[1]+d*Math.sin(c)],C=[m[0]+g*Math.cos(c+Math.PI/4),m[1]+g*Math.sin(c+Math.PI/4)];s.push(...this.helper.doubleLineOps(m[0],m[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],y[0],y[1],i))}})),s}}const ee={};class AT{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const ET=0,io=1,Oh=2,ks={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 so(e,t){return e.type===t}function il(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:ET,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:io,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:Oh,text:""},n})(e);let i="BOD",s=0,a=r[s];for(;!so(a,Oh);){let o=0;const n=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return il("M0,0"+e);s++,o=ks[a.text],i=a.text}else so(a,io)?o=ks[i]:(s++,o=ks[a.text],i=a.text);if(!(s+o<r.length))throw new Error("Path data ended short");for(let l=s;l<s+o;l++){const h=r[l];if(!so(h,io))throw new Error("Param not a number: "+i+","+h.text);n[n.length]=+h.text}if(typeof ks[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=o,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Zp(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:o,data:n}of e)switch(o){case"M":a.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((h,c)=>c%2?h+r:h+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((h,c)=>c%2?h+r:h+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":a.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((h,c)=>c%2?h+r:h+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function Kp(e){const t=[];let r="",i=0,s=0,a=0,o=0,n=0,l=0;for(const{key:h,data:c}of e){switch(h){case"M":t.push({key:"M",data:[...c]}),[i,s]=c,[a,o]=c;break;case"C":t.push({key:"C",data:[...c]}),i=c[4],s=c[5],n=c[2],l=c[3];break;case"L":t.push({key:"L",data:[...c]}),[i,s]=c;break;case"H":i=c[0],t.push({key:"L",data:[i,s]});break;case"V":s=c[0],t.push({key:"L",data:[i,s]});break;case"S":{let u=0,p=0;r==="C"||r==="S"?(u=i+(i-n),p=s+(s-l)):(u=i,p=s),t.push({key:"C",data:[u,p,...c]}),n=c[0],l=c[1],i=c[2],s=c[3];break}case"T":{const[u,p]=c;let d=0,g=0;r==="Q"||r==="T"?(d=i+(i-n),g=s+(s-l)):(d=i,g=s);const m=i+2*(d-i)/3,y=s+2*(g-s)/3,C=u+2*(d-u)/3,b=p+2*(g-p)/3;t.push({key:"C",data:[m,y,C,b,u,p]}),n=d,l=g,i=u,s=p;break}case"Q":{const[u,p,d,g]=c,m=i+2*(u-i)/3,y=s+2*(p-s)/3,C=d+2*(u-d)/3,b=g+2*(p-g)/3;t.push({key:"C",data:[m,y,C,b,d,g]}),n=u,l=p,i=d,s=g;break}case"A":{const u=Math.abs(c[0]),p=Math.abs(c[1]),d=c[2],g=c[3],m=c[4],y=c[5],C=c[6];u===0||p===0?(t.push({key:"C",data:[i,s,y,C,y,C]}),i=y,s=C):(i!==y||s!==C)&&(Qp(i,s,y,C,u,p,d,g,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=o}r=h}return t}function wi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Qp(e,t,r,i,s,a,o,n,l,h){const c=(u=o,Math.PI*u/180);var u;let p=[],d=0,g=0,m=0,y=0;if(h)[d,g,m,y]=h;else{[e,t]=wi(e,t,-c),[r,i]=wi(r,i,-c);const H=(e-r)/2,I=(t-i)/2;let A=H*H/(s*s)+I*I/(a*a);A>1&&(A=Math.sqrt(A),s*=A,a*=A);const B=s*s,M=a*a,F=B*M-B*I*I-M*H*H,S=B*I*I+M*H*H,q=(n===l?-1:1)*Math.sqrt(Math.abs(F/S));m=q*s*I/a+(e+r)/2,y=q*-a*H/s+(t+i)/2,d=Math.asin(parseFloat(((t-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).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 C=g-d;if(Math.abs(C)>120*Math.PI/180){const H=g,I=r,A=i;g=l&&g>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,p=Qp(r=m+s*Math.cos(g),i=y+a*Math.sin(g),I,A,s,a,o,0,l,[g,H,m,y])}C=g-d;const b=Math.cos(d),k=Math.sin(d),_=Math.cos(g),w=Math.sin(g),v=Math.tan(C/4),$=4/3*s*v,E=4/3*a*v,W=[e,t],P=[e+$*k,t-E*b],O=[r+$*w,i-E*_],Y=[r,i];if(P[0]=2*W[0]-P[0],P[1]=2*W[1]-P[1],h)return[P,O,Y].concat(p);{p=[P,O,Y].concat(p);const H=[];for(let I=0;I<p.length;I+=3){const A=wi(p[I][0],p[I][1],c),B=wi(p[I+1][0],p[I+1][1],c),M=wi(p[I+2][0],p[I+2][1],c);H.push([A[0],A[1],B[0],B[1],M[0],M[1]])}return H}}const MT={randOffset:function(e,t){return rt(e,t)},randOffsetWithRange:function(e,t,r){return ha(e,t,r)},ellipse:function(e,t,r,i,s){const a=tf(r,i,s);return Qo(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return rr(e,t,r,i,s,!0)}};function Jp(e,t,r,i,s){return{type:"path",ops:rr(e,t,r,i,s)}}function Ds(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...rr(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...rr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Jp(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function $T(e,t,r,i,s){return(function(a,o){return Ds(a,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function Ih(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Ts(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Ts(r[0],1.5*(1+.22*t.roughness),Ph(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const n=Ts(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Ts(o,1.5*(1+.22*t.roughness),Ph(t));for(const h of n)h.op!=="move"&&i.push(h);for(const h of l)h.op!=="move"&&s.push(h)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function tf(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=rt(o*l,r),n+=rt(n*l,r),{increment:a,rx:o,ry:n}}function Qo(e,t,r,i){const[s,a]=Nh(i.increment,e,t,i.rx,i.ry,1,i.increment*ha(.1,ha(.4,1,r),r),r);let o=ca(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Nh(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=ca(n,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function Dh(e,t,r,i,s,a,o,n,l){const h=e,c=t;let u=Math.abs(r/2),p=Math.abs(i/2);u+=rt(.01*u,l),p+=rt(.01*p,l);let d=s,g=a;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),C=qh(y,h,c,u,p,d,g,1,l);if(!l.disableMultiStroke){const b=qh(y,h,c,u,p,d,g,1.5,l);C.push(...b)}return o&&(n?C.push(...rr(h,c,h+u*Math.cos(d),c+p*Math.sin(d),l),...rr(h,c,h+u*Math.cos(g),c+p*Math.sin(g),l)):C.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+u*Math.cos(d),c+p*Math.sin(d)]})),{type:"path",ops:C}}function Rh(e,t){const r=Kp(Zp(il(e))),i=[];let s=[0,0],a=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":a=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...rr(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]];break;case"C":{const[l,h,c,u,p,d]=n;i.push(...OT(l,h,c,u,p,d,a,t)),a=[p,d];break}case"Z":i.push(...rr(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function ao(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+rt(s,t),i[0][1]+rt(s,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+rt(s,t),i[o][1]+rt(s,t)]})}}return{type:"fillPath",ops:r}}function Dr(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!ee[s])switch(s){case"zigzag":ee[s]||(ee[s]=new _T(i));break;case"cross-hatch":ee[s]||(ee[s]=new BT(i));break;case"dots":ee[s]||(ee[s]=new vT(i));break;case"dashed":ee[s]||(ee[s]=new LT(i));break;case"zigzag-line":ee[s]||(ee[s]=new FT(i));break;default:s="hachure",ee[s]||(ee[s]=new rl(i))}return ee[s]})(t,MT).fillPolygons(e,t)}function Ph(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function ef(e){return e.randomizer||(e.randomizer=new AT(e.seed||0)),e.randomizer.next()}function ha(e,t,r,i=1){return r.roughness*i*(ef(r)*(t-e)+e)}function rt(e,t,r=1){return ha(-e,e,t,r)}function rr(e,t,r,i,s,a=!1){const o=a?s.disableMultiStrokeFill:s.disableMultiStroke,n=Jo(e,t,r,i,s,!0,!1);if(o)return n;const l=Jo(e,t,r,i,s,!0,!0);return n.concat(l)}function Jo(e,t,r,i,s,a,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=s.maxRandomnessOffset||0;c*c*100>n&&(c=l/10);const u=c/2,p=.2+.2*ef(s);let d=s.bowing*s.maxRandomnessOffset*(i-t)/200,g=s.bowing*s.maxRandomnessOffset*(e-r)/200;d=rt(d,s,h),g=rt(g,s,h);const m=[],y=()=>rt(u,s,h),C=()=>rt(c,s,h),b=s.preserveVertices;return o?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:rt(c,s,h)),t+(b?0:rt(c,s,h))]}),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+C(),g+t+(i-t)*p+C(),d+e+2*(r-e)*p+C(),g+t+2*(i-t)*p+C(),r+(b?0:C()),i+(b?0:C())]}),m}function Ts(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+rt(t,r),e[0][1]+rt(t,r)]),i.push([e[0][0]+rt(t,r),e[0][1]+rt(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+rt(t,r),e[s][1]+rt(t,r)]),s===e.length-1&&i.push([e[s][0]+rt(t,r),e[s][1]+rt(t,r)]);return ca(i,null,r)}function ca(e,t,r){const i=e.length,s=[];if(i>3){const a=[],o=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];a[0]=[l[0],l[1]],a[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],a[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],a[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...Jo(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function Nh(e,t,r,i,s,a,o,n){const l=[],h=[];if(n.roughness===0){e/=4,h.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let c=0;c<=2*Math.PI;c+=e){const u=[t+i*Math.cos(c),r+s*Math.sin(c)];l.push(u),h.push(u)}h.push([t+i*Math.cos(0),r+s*Math.sin(0)]),h.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const c=rt(.5,n)-Math.PI/2;h.push([rt(a,n)+t+.9*i*Math.cos(c-e),rt(a,n)+r+.9*s*Math.sin(c-e)]);const u=2*Math.PI+c-.01;for(let p=c;p<u;p+=e){const d=[rt(a,n)+t+i*Math.cos(p),rt(a,n)+r+s*Math.sin(p)];l.push(d),h.push(d)}h.push([rt(a,n)+t+i*Math.cos(c+2*Math.PI+.5*o),rt(a,n)+r+s*Math.sin(c+2*Math.PI+.5*o)]),h.push([rt(a,n)+t+.98*i*Math.cos(c+o),rt(a,n)+r+.98*s*Math.sin(c+o)]),h.push([rt(a,n)+t+.9*i*Math.cos(c+.5*o),rt(a,n)+r+.9*s*Math.sin(c+.5*o)])}return[h,l]}function qh(e,t,r,i,s,a,o,n,l){const h=a+rt(.1,l),c=[];c.push([rt(n,l)+t+.9*i*Math.cos(h-e),rt(n,l)+r+.9*s*Math.sin(h-e)]);for(let u=h;u<=o;u+=e)c.push([rt(n,l)+t+i*Math.cos(u),rt(n,l)+r+s*Math.sin(u)]);return c.push([t+i*Math.cos(o),r+s*Math.sin(o)]),c.push([t+i*Math.cos(o),r+s*Math.sin(o)]),ca(c,null,l)}function OT(e,t,r,i,s,a,o,n){const l=[],h=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let c=[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:rt(h[0],n)),o[1]+(p?0:rt(h[0],n))]}),c=p?[s,a]:[s+rt(h[d],n),a+rt(h[d],n)],l.push({op:"bcurveTo",data:[e+rt(h[d],n),t+rt(h[d],n),r+rt(h[d],n),i+rt(h[d],n),c[0],c[1]]});return l}function _i(e){return[...e]}function Wh(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(_i(e[0]),_i(e[1]),_i(e[2]),_i(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const a=[],o=1-t;i.push(_i(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*s[n+1][0]-o*s[n-1][0])/6,l[1]+(o*s[n+1][1]-o*s[n-1][1])/6],a[2]=[s[n+1][0]+(o*s[n][0]-o*s[n+2][0])/6,s[n+1][1]+(o*s[n][1]-o*s[n+2][1])/6],a[3]=[s[n+1][0],s[n+1][1]],i.push(a[1],a[2],a[3])}}return i}function Rs(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function IT(e,t,r){const i=Rs(t,r);if(i===0)return Rs(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),Rs(e,ur(t,r,s))}function ur(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function tn(e,t,r,i){const s=i||[];if((function(n,l){const h=n[l+0],c=n[l+1],u=n[l+2],p=n[l+3];let d=3*c[0]-2*h[0]-p[0];d*=d;let g=3*c[1]-2*h[1]-p[1];g*=g;let m=3*u[0]-2*p[0]-h[0];m*=m;let y=3*u[1]-2*p[1]-h[1];return y*=y,d<m&&(d=m),g<y&&(g=y),d+g})(e,t)<r){const n=e[t+0];s.length?(a=s[s.length-1],o=n,Math.sqrt(Rs(a,o))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],h=e[t+1],c=e[t+2],u=e[t+3],p=ur(l,h,.5),d=ur(h,c,.5),g=ur(c,u,.5),m=ur(p,d,.5),y=ur(d,g,.5),C=ur(m,y,.5);tn([l,p,m,C],0,r,s),tn([C,y,g,u],0,r,s)}var a,o;return s}function DT(e,t){return ua(e,0,e.length,t)}function ua(e,t,r,i,s){const a=s||[],o=e[t],n=e[r-1];let l=0,h=1;for(let c=t+1;c<r-1;++c){const u=IT(e[c],o,n);u>l&&(l=u,h=c)}return Math.sqrt(l)>i?(ua(e,t,h+1,i,a),ua(e,h,r,i,a)):(a.length||a.push(o),a.push(n)),a}function oo(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)tn(e,3*a,t,i);return r&&r>0?ua(i,0,i.length,r):i}const ae="none";class da{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,s,a){const o=this._o(a);return this._d("line",[Jp(t,r,i,s,o)],o)}rectangle(t,r,i,s,a){const o=this._o(a),n=[],l=$T(t,r,i,s,o);if(o.fill){const h=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];o.fillStyle==="solid"?n.push(ao([h],o)):n.push(Dr([h],o))}return o.stroke!==ae&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,s,a){const o=this._o(a),n=[],l=tf(i,s,o),h=Qo(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const c=Qo(t,r,o,l).opset;c.type="fillPath",n.push(c)}else n.push(Dr([h.estimatedPoints],o));return o.stroke!==ae&&n.push(h.opset),this._d("ellipse",n,o)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Ds(t,!1,i)],i)}arc(t,r,i,s,a,o,n=!1,l){const h=this._o(l),c=[],u=Dh(t,r,i,s,a,o,n,!0,h);if(n&&h.fill)if(h.fillStyle==="solid"){const p=Object.assign({},h);p.disableMultiStroke=!0;const d=Dh(t,r,i,s,a,o,!0,!1,p);d.type="fillPath",c.push(d)}else c.push((function(p,d,g,m,y,C,b){const k=p,_=d;let w=Math.abs(g/2),v=Math.abs(m/2);w+=rt(.01*w,b),v+=rt(.01*v,b);let $=y,E=C;for(;$<0;)$+=2*Math.PI,E+=2*Math.PI;E-$>2*Math.PI&&($=0,E=2*Math.PI);const W=(E-$)/b.curveStepCount,P=[];for(let O=$;O<=E;O+=W)P.push([k+w*Math.cos(O),_+v*Math.sin(O)]);return P.push([k+w*Math.cos(E),_+v*Math.sin(E)]),P.push([k,_]),Dr([P],b)})(t,r,i,s,a,o,h));return h.stroke!==ae&&c.push(u),this._d("arc",c,h)}curve(t,r){const i=this._o(r),s=[],a=Ih(t,i);if(i.fill&&i.fill!==ae)if(i.fillStyle==="solid"){const o=Ih(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.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 h of l)h.length<3?o.push(...h):h.length===3?o.push(...oo(Wh([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):o.push(...oo(Wh(h),10,(1+i.roughness)/2))}o.length&&s.push(Dr([o],i))}return i.stroke!==ae&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=Ds(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(ao([t],i)):s.push(Dr([t],i))),i.stroke!==ae&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==ae,o=i.stroke!==ae,n=!!(i.simplification&&i.simplification<1),l=(function(c,u,p){const d=Kp(Zp(il(c))),g=[];let m=[],y=[0,0],C=[];const b=()=>{C.length>=4&&m.push(...oo(C,u)),C=[]},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(!C.length){const $=m.length?m[m.length-1]:y;C.push([$[0],$[1]])}C.push([v[0],v[1]]),C.push([v[2],v[3]]),C.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=DT(w,p);v.length&&_.push(v)}return _})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),h=Rh(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const c=Rh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else s.push(ao(l,i));else s.push(Dr(l,i));return o&&(n?l.forEach((c=>{s.push(Ds(c,!1,i))})):s.push(h)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map((o=>+o.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:ae};break;case"fillPath":o={d:this.opsToPath(a),stroke:ae,strokeWidth:0,fill:i.fill||ae};break;case"fillSketch":o=this.fillSketch(a,i)}o&&s.push(o)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||ae,strokeWidth:i,fill:ae}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class RT{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new da(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,o,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,o,a,n),s.restore();break}case"fillSketch":this.fillSketch(s,o,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map((n=>+n.toFixed(i))):a.data;switch(a.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(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o),o}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o),o}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o),o}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}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,s,a,o,n=!1,l){const h=this.gen.arc(t,r,i,s,a,o,n,l);return this.draw(h),h}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 Ss="http://www.w3.org/2000/svg";class PT{constructor(t,r){this.svg=t,this.gen=new da(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(Ss,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(Ss,"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=s.createElementNS(Ss,"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(s,n,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(Ss,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o)}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o)}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}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,s,a,o,n=!1,l){const h=this.gen.arc(t,r,i,s,a,o,n,l);return this.draw(h)}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 X={canvas:(e,t)=>new RT(e,t),svg:(e,t)=>new PT(e,t),generator:e=>new da(e),newSeed:()=>da.newSeed()},et=f(async(e,t,r)=>{var d,g;let i;const s=t.useHtmlLabels||Ge((d=yt())==null?void 0:d.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",Nt(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,h=t.labelType==="markdown",c=await je(o,ke(Tr(n),yt()),{useHtmlLabels:s,width:t.width||((g=yt().flowchart)==null?void 0:g.wrappingWidth),classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:h},yt());let u=c.getBBox();const p=((t==null?void 0:t.padding)??0)/2;if(s){const m=c.children[0],y=ht(c);await kp(m,n),u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height)}return s?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:a,bbox:u,halfPadding:p,label:o}},"labelHelper"),no=f(async(e,t,r)=>{var l,h;const i=r.useHtmlLabels??Jt(yt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await je(s,ke(Tr(t),yt()),{useHtmlLabels:i,width:r.width||((h=(l=yt())==null?void 0:l.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const n=r.padding/2;if(Jt(yt())){const c=a.children[0],u=ht(a);o=c.getBoundingClientRect(),u.attr("width",o.width),u.attr("height",o.height)}return i?s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):s.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:s}},"insertLabel"),K=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 ft(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}f(ft,"createPathFromPoints");function ir(e,t,r,i,s,a){const o=[],l=r-e,h=i-t,c=l/a,u=2*Math.PI/c,p=t+h/2;for(let d=0;d<=50;d++){const g=d/50,m=e+g*l,y=p+s*Math.sin(u*(m-e));o.push({x:m,y})}return o}f(ir,"generateFullSineWavePoints");function Zi(e,t,r,i,s,a){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*c,d=e+r*Math.cos(p),g=t+r*Math.sin(p);o.push({x:-d,y:-g})}return o}f(Zi,"generateCirclePoints");function en(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 s=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),o=f((l,h)=>(l==null?void 0:l.getAttribute(h))??void 0,"getAttr");if(s){const l={fill:o(s,"fill"),"fill-opacity":o(s,"fill-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}if(a){const l={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"stroke-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}f(en,"mergePaths");var NT=f((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,o=e.width/2,n=e.height/2,l,h;return Math.abs(a)*o>Math.abs(s)*n?(a<0&&(n=-n),l=a===0?0:n*s/a,h=n):(s<0&&(o=-o),l=o,h=s===0?0:o*a/s),{x:r+l,y:i+h}},"intersectRect"),pi=NT,qT=f(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const o=yt(),n=Jt(o);return await je(e,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},o)},"createLabel"),Ke=qT,sr=f((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),rf=f(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);const r=yt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Z(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=Jt(r),d=u.insert("g").attr("class","cluster-label ");let g;t.labelType==="markdown"?g=await je(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):g=await Ke(d,t.label,t.labelStyle||"",!1,!0);let m=g.getBBox();if(Jt(r)){const $=g.children[0],E=ht(g);m=$.getBoundingClientRect(),E.attr("width",m.width),E.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 C=t.height,b=t.x-y/2,k=t.y-C/2;z.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const $=X.svg(u),E=V(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:s}),W=$.path(sr(b,k,y,C,0),E);_=u.insert(()=>(z.debug("Rough node insert CXC",W),W),":first-child"),_.select("path:nth-child(2)").attr("style",h.join(";")),_.select("path").attr("style",c.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",C);const{subGraphTitleTopMargin:w}=Un(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),n){const $=d.select("span");$&&$.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($){return pi(t,$)},{cluster:u,labelBBox:m}},"rect"),WT=f((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return pi(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),zT=f(async(e,t)=>{const r=yt(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:n,nodeBorder:l}=i,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),c=h.insert("g",":first-child"),u=h.insert("g").attr("class","cluster-label");let p=h.append("rect");const d=await Ke(u,t.label,t.labelStyle,void 0,!0);let g=d.getBBox();if(Jt(r)){const W=d.children[0],P=ht(d);g=W.getBoundingClientRect(),P.attr("width",g.width),P.attr("height",g.height)}const m=0*t.padding,y=m/2,C=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,k=t.height+m-g.height-6,_=t.x-C/2,w=t.y-b/2;t.width=C;const v=t.y-t.height/2-y+g.height+2;let $;if(t.look==="handDrawn"){const W=t.cssClasses.includes("statediagram-cluster-alt"),P=X.svg(h),O=t.rx||t.ry?P.path(sr(_,w,C,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):P.rectangle(_,w,C,b,{seed:s});$=h.insert(()=>O,":first-child");const Y=P.rectangle(_,v,C,k,{fill:W?a:o,fillStyle:W?"hachure":"solid",stroke:l,seed:s});$=h.insert(()=>O,":first-child"),p=h.insert(()=>Y)}else $=c.insert("rect",":first-child"),$.attr("class","outer").attr("x",_).attr("y",w).attr("width",C).attr("height",b).attr("data-look",t.look),p.attr("class","inner").attr("x",_).attr("y",v).attr("width",C).attr("height",k);u.attr("transform",`translate(${t.x-g.width/2}, ${w+1-(Jt(r)?0:3)})`);const E=$.node().getBBox();return t.height=E.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(W){return pi(t,W)},{cluster:h,labelBBox:g}},"roundedWithTitle"),HT=f(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);const r=yt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Z(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=Jt(r),d=u.insert("g").attr("class","cluster-label "),g=await je(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let m=g.getBBox();if(Jt(r)){const $=g.children[0],E=ht(g);m=$.getBoundingClientRect(),E.attr("width",m.width),E.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 C=t.height,b=t.x-y/2,k=t.y-C/2;z.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const $=X.svg(u),E=V(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:s}),W=$.path(sr(b,k,y,C,t.rx),E);_=u.insert(()=>(z.debug("Rough node insert CXC",W),W),":first-child"),_.select("path:nth-child(2)").attr("style",h.join(";")),_.select("path").attr("style",c.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",C);const{subGraphTitleTopMargin:w}=Un(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),n){const $=d.select("span");$&&$.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($){return pi(t,$)},{cluster:u,labelBBox:m}},"kanbanSection"),YT=f((e,t)=>{const r=yt(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:a}=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,h=t.width+l;t.diff=-t.padding;const c=t.height+l,u=t.x-h/2,p=t.y-c/2;t.width=h;let d;if(t.look==="handDrawn"){const y=X.svg(o).rectangle(u,p,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:s});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",h).attr("height",c).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 pi(t,m)},{cluster:o,labelBBox:{}}},"divider"),UT=rf,GT={rect:rf,squareRect:UT,roundedWithTitle:zT,noteGroup:WT,divider:YT,kanbanSection:HT},sf=new Map,jT=f(async(e,t)=>{const r=t.shape||"rect",i=await GT[r](e,t);return sf.set(t.id,i),i},"insertCluster"),Tv=f(()=>{sf=new Map},"clear");function af(e,t){return e.intersect(t)}f(af,"intersectNode");var XT=af;function of(e,t,r,i){var s=e.x,a=e.y,o=s-i.x,n=a-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),h=Math.abs(t*r*o/l);i.x<s&&(h=-h);var c=Math.abs(t*r*n/l);return i.y<a&&(c=-c),{x:s+h,y:a+c}}f(of,"intersectEllipse");var nf=of;function lf(e,t,r){return nf(e,t,t,r)}f(lf,"intersectCircle");var VT=lf;function hf(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,n=s*r.x+a*r.y+o,l=s*i.x+a*i.y+o,h=1e-6;if(n!==0&&l!==0&&rn(n,l))return;const c=i.y-r.y,u=r.x-i.x,p=i.x*r.y-r.x*i.y,d=c*e.x+u*e.y+p,g=c*t.x+u*t.y+p;if(Math.abs(d)<h&&Math.abs(g)<h&&rn(d,g))return;const m=s*u-c*a;if(m===0)return;const y=Math.abs(m/2);let C=a*p-u*o;const b=C<0?(C-y)/m:(C+y)/m;C=c*o-s*p;const k=C<0?(C-y)/m:(C+y)/m;return{x:b,y:k}}}f(hf,"intersectLine");function rn(e,t){return e*t>0}f(rn,"sameSign");var ZT=hf;function cf(e,t,r){let i=e.x,s=e.y,a=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(c){o=Math.min(o,c.x),n=Math.min(n,c.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,h=s-e.height/2-n;for(let c=0;c<t.length;c++){let u=t[c],p=t[c<t.length-1?c+1:0],d=ZT(e,r,{x:l+u.x,y:h+u.y},{x:l+p.x,y:h+p.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort(function(c,u){let p=c.x-r.x,d=c.y-r.y,g=Math.sqrt(p*p+d*d),m=u.x-r.x,y=u.y-r.y,C=Math.sqrt(m*m+y*y);return g<C?-1:g===C?0:1}),a[0]):e}f(cf,"intersectPolygon");var KT=cf,j={node:XT,circle:VT,ellipse:nf,polygon:KT,rect:pi};function uf(e,t){const{labelStyles:r}=Z(t);t.labelStyle=r;const i=tt(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=X.svg(a),h=V(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const c=l.circle(0,0,o*2,h),u=a.insert(()=>c,":first-child");return u.attr("class","anchor").attr("style",Nt(n)),K(t,u),t.intersect=function(p){return z.info("Circle intersect",t,o,p),j.circle(t,o,p)},a}f(uf,"anchor");function sn(e,t,r,i,s,a,o){const l=(e+r)/2,h=(t+i)/2,c=Math.atan2(i-t,r-e),u=(r-e)/2,p=(i-t)/2,d=u/s,g=p/a,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),C=l+y*a*Math.sin(c)*(o?-1:1),b=h-y*s*Math.cos(c)*(o?-1:1),k=Math.atan2((t-b)/a,(e-C)/s);let w=Math.atan2((i-b)/a,(r-C)/s)-k;o&&w<0&&(w+=2*Math.PI),!o&&w>0&&(w-=2*Math.PI);const v=[];for(let $=0;$<20;$++){const E=$/19,W=k+E*w,P=C+s*Math.cos(W),O=b+a*Math.sin(W);v.push({x:P,y:O})}return v}f(sn,"generateArcPoints");function df(e,t,r){const[i,s]=[t,r].sort((a,o)=>o-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}f(df,"calculateArcSagitta");async function pf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=f(W=>W+o,"calcTotalHeight"),l=f(W=>{const P=W/2;return[P/(2.5+W/50),P]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await et(e,t,tt(t)),u=n(t!=null&&t.height?t==null?void 0:t.height:c.height),[p,d]=l(u),g=df(u,p,d),y=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+g-g,C=u,{cssStyles:b}=t,k=[{x:y/2,y:-C/2},{x:-y/2,y:-C/2},...sn(-y/2,-C/2,-y/2,C/2,p,d,!1),{x:y/2,y:C/2},...sn(y/2,C/2,y/2,-C/2,p,d,!0)],_=X.svg(h),w=V(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=ft(k),$=_.path(v,w),E=h.insert(()=>$,":first-child");return E.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(${p/2}, 0)`),K(t,E),t.intersect=function(W){return j.polygon(t,k,W)},h}f(pf,"bowTieRect");function Xe(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}f(Xe,"insertPolygonShape");var ws=12;async function ff(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,o=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+ws),c=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),u=0,p=h,d=-c,g=0,m=[{x:u+ws,y:d},{x:p,y:d},{x:p,y:g},{x:u,y:g},{x:u,y:d+ws},{x:u+ws,y:d}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=X.svg(n),k=V(t,{}),_=ft(m),w=b.path(_,k);y=n.insert(()=>w,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&y.attr("style",C)}else y=Xe(n,h,c,m);return i&&y.attr("style",i),K(t,y),t.intersect=function(b){return j.polygon(t,m,b)},n}f(ff,"card");function gf(e,t){const{nodeStyles:r}=Z(t);t.label="";const i=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=X.svg(i),l=V(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=ft(o),c=n.path(h,l),u=i.insert(()=>c,":first-child");return s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),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(gf,"choice");async function sl(e,t,r){const{labelStyles:i,nodeStyles:s}=Z(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:n}=await et(e,t,tt(t)),l=16,h=(r==null?void 0:r.padding)??n,c=t.look==="neo"?o.width/2+l*2:o.width/2+h;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=X.svg(a),g=V(t,{}),m=d.circle(0,0,c*2,g);u=a.insert(()=>m,":first-child"),u.attr("class","basic label-container").attr("style",Nt(p))}else u=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",c).attr("cx",0).attr("cy",0);return K(t,u),t.calcIntersect=function(d,g){const m=d.width/2;return j.circle(d,m,g)},t.intersect=function(d){return z.info("Circle intersect",t,c,d),j.circle(t,c,d)},a}f(sl,"circle");function mf(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},a={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 ${a.x},${a.y} L ${n.x},${n.y}
231
+ M ${s.x},${s.y} L ${o.x},${o.y}`}f(mf,"createLine");function yf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=X.svg(s),l=V(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=n.circle(0,0,a*2,l),c=mf(a),u=n.path(c,l),p=s.insert(()=>h,":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),K(t,p),t.intersect=function(d){return z.info("crossedCircle intersect",t,{radius:a,point:d}),j.circle(t,a,d)},s}f(yf,"crossedCircle");function qe(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*c,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 Cf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await et(e,t,tt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+n,c=a.height+l,u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...qe(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...qe(h/2+u*2,-u,u,20,-180,-270),...qe(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...qe(h/2,c/2,u,20,0,90)],g=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...qe(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...qe(h/2+h*.1,-u,u,20,-180,-270),...qe(h/2+h*.1,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...qe(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2,y:c/2+u}],m=X.svg(s),y=V(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=ft(d).replace("Z",""),k=m.path(b,y),_=ft(g),w=m.path(_,{...y}),v=s.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(${-h/2+u-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),K(t,v),t.intersect=function($){return j.polygon(t,g,$)},s}f(Cf,"curlyBraceLeft");function We(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*c,d=e+r*Math.cos(p),g=t+r*Math.sin(p);o.push({x:d,y:g})}return o}f(We,"generateCirclePoints");async function xf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await et(e,t,tt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?n*2:n),c=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...We(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...We(h/2+u*2,-u,u,20,-180,-270),...We(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...We(h/2,c/2,u,20,0,90)],g=[{x:-h/2,y:-c/2-u},{x:h/2,y:-c/2-u},...We(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...We(h/2+u*2,-u,u,20,-180,-270),...We(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...We(h/2,c/2,u,20,0,90),{x:h/2,y:c/2+u},{x:-h/2,y:c/2+u}],m=X.svg(s),y=V(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=ft(d).replace("Z",""),k=m.path(b,y),_=ft(g),w=m.path(_,{...y}),v=s.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(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),K(t,v),t.intersect=function($){return j.polygon(t,g,$)},s}f(xf,"curlyBraceRight");function Wt(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*c,d=e+r*Math.cos(p),g=t+r*Math.sin(p);o.push({x:-d,y:-g})}return o}f(Wt,"generateCirclePoints");async function bf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await et(e,t,tt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?n*2:n),c=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...Wt(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...Wt(h/2+u*2,-u,u,20,-180,-270),...Wt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...Wt(h/2,c/2,u,20,0,90)],g=[...Wt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...Wt(-h/2-u/2,-u,u,20,0,90),...Wt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...Wt(-h/2+u+u/2,c/2,u,30,-180,-270)],m=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...Wt(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...Wt(h/2+u*2,-u,u,20,-180,-270),...Wt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...Wt(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2-u-u/2,y:c/2+u},...Wt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...Wt(-h/2-u/2,-u,u,20,0,90),...Wt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...Wt(-h/2+u+u/2,c/2,u,30,-180,-270)],y=X.svg(s),C=V(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=ft(d).replace("Z",""),_=y.path(k,C),v=ft(g).replace("Z",""),$=y.path(v,C),E=ft(m),W=y.path(E,{...C}),P=s.insert("g",":first-child");return P.insert(()=>W,":first-child").attr("stroke-opacity",0),P.insert(()=>_,":first-child"),P.insert(()=>$,":first-child"),P.attr("class","text"),p&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(${u-u/4}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),K(t,P),t.intersect=function(O){return j.polygon(t,m,O)},s}f(bf,"curlyBraces");async function kf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:h,bbox:c}=await et(e,t,tt(t)),u=Math.max(n,(c.width+a*2)*1.25,(t==null?void 0:t.width)??0),p=Math.max(l,c.height+o*2,(t==null?void 0:t.height)??0),d=p/2,{cssStyles:g}=t,m=X.svg(h),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=u,b=p,k=C-d,_=b/4,w=[{x:k,y:0},{x:_,y:0},{x:0,y:b/2},{x:_,y:b},{x:k,y:b},...Zi(-k,-b/2,d,50,270,90)],v=ft(w),$=m.path(v,y),E=h.insert(()=>$,":first-child");return E.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",i),E.attr("transform",`translate(${-u/2}, ${-p/2})`),K(t,E),t.intersect=function(W){return j.polygon(t,w,W)},h}f(kf,"curvedTrapezoid");var QT=f((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),JT=f((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),tS=f((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),zh=8,Hh=8;async function Tf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,o=t.look==="neo"?24:s;if(t.width||t.height){const y=t.width??0;t.width=(t.width??0)-o,t.width<Hh&&(t.width=Hh);const b=y/2/(2.5+y/50);t.height=(t.height??0)-a-b*3,t.height<zh&&(t.height=zh)}const{shapeSvg:n,bbox:l,label:h}=await et(e,t,tt(t)),c=(t.width?t.width:l.width)+o,u=c/2,p=u/(2.5+c/50),d=(t.height?t.height:l.height)+a+p;let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=X.svg(n),C=JT(0,0,c,d,u,p),b=tS(0,p,c,d,u,p),k=V(t,{}),_=y.path(C,k),w=y.path(b,V(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=QT(0,0,c,d,u,p);g=n.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",Nt(m)).attr("style",i)}return g.attr("label-offset-y",p),g.attr("transform",`translate(${-c/2}, ${-(d/2+p)})`),K(t,g),h.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 C=j.rect(t,y),b=C.x-(t.x??0);if(u!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(C.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),C.y+=k}return C},n}f(Tf,"cylinder");async function fi(e,t,r){const{labelStyles:i,nodeStyles:s}=Z(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await et(e,t,tt(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-n/2,c=-l/2;let u,{rx:p,ry:d}=t;const{cssStyles:g}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,d=r.ry),t.look==="handDrawn"){const m=X.svg(a),y=V(t,{}),C=p||d?m.path(sr(h,c,n,l,p||0),y):m.rectangle(h,c,n,l,y);u=a.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",Nt(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",Nt(p)).attr("ry",Nt(d)).attr("x",h).attr("y",c).attr("width",n).attr("height",l);return K(t,u),t.calcIntersect=function(m,y){return j.rect(m,y)},t.intersect=function(m){return j.rect(t,m)},a}f(fi,"drawRect");async function Sf(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:o,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},h=await fi(e,t,l);if(t.look==="handDrawn"){const d=X.svg(h),g=V(t,{}),m=h.select(".basic.label-container > path:nth-child(2)"),y=m.node();if(!y)return h;let C=null;if(y instanceof SVGGraphicsElement)C=y.getBBox();else return h;return h.insert(()=>d.line(C.x,C.y,C.x+C.width,C.y,g),".basic.label-container g.label"),h.insert(()=>d.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,g),".basic.label-container g.label"),m.remove(),h}const c=h.select(".basic.label-container"),u=(Number(c.attr("width"))||o)??0,p=(Number(c.attr("height"))||n)??0;return u>0&&p>0&&c.attr("stroke-dasharray",`${u} ${p}`),h}f(Sf,"datastore");async function wf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),h=n.width+s,c=n.height+a,u=c*.2,p=-h/2,d=-c/2-u/2,{cssStyles:g}=t,m=X.svg(o),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{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(C.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))})`),K(t,k),t.intersect=function(_){return j.rect(t,_)},o}f(wf,"dividedRectangle");async function _f(e,t){var d,g;const{labelStyles:r,nodeStyles:i}=Z(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(o??0),c=h-s;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const m=X.svg(n),y=V(t,{roughness:.2,strokeWidth:2.5}),C=V(t,{roughness:.2,strokeWidth:1.5}),b=m.circle(0,0,h*2,y),k=m.circle(0,0,c*2,C);u=n.insert("g",":first-child"),u.attr("class",Nt(t.cssClasses)).attr("style",Nt(p)),(d=u.node())==null||d.appendChild(b),(g=u.node())==null||g.appendChild(k)}else{u=n.insert("g",":first-child");const m=u.insert("circle",":first-child"),y=u.insert("circle");u.attr("class","basic label-container").attr("style",i),m.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),y.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return K(t,u),t.intersect=function(m){return z.info("DoubleCircle intersect",t,h,m),j.circle(t,h,m)},n}f(_f,"doublecircle");function Bf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=Z(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=X.svg(a),{nodeBorder:h}=r,c=V(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const u=l.circle(0,0,o*2,c),p=a.insert(()=>u,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),K(t,p),t.intersect=function(d){return z.info("filledCircle intersect",t,{radius:o,point:d}),j.circle(t,o,d)},a}f(Bf,"filledCircle");var Yh=10,Uh=10;async function vf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<Yh&&(t.height=Yh),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<Uh&&(t.width=Uh));const{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(a??0),c=t!=null&&t.height?t==null?void 0:t.height:h+n.height,u=c,p=[{x:0,y:-c},{x:u,y:-c},{x:u/2,y:0}],{cssStyles:d}=t,g=X.svg(o),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=ft(p),C=g.path(y,m),b=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${c/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=h,t.height=c,K(t,b),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-c/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(k){return z.info("Triangle intersect",t,p,k),j.polygon(t,p,k)},o}f(vf,"flippedTriangle");function Lf(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=Z(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==null?void 0:t.width)??0),h=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),h=Math.max(70,(t==null?void 0:t.height)??0));const c=-1*l/2,u=-1*h/2,p=X.svg(o),d=V(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=p.rectangle(c,u,l,h,d),m=o.insert(()=>g,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),K(t,m);const y=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(C){return j.rect(t,C)},o}f(Lf,"forkJoin");async function Ff(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=15,a=10,o=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-o*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:h}=await et(e,t,tt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,h.width))+o*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,h.height))+n*2,p=u/2,{cssStyles:d}=t,g=X.svg(l),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-c/2,y:-u/2},{x:c/2-p,y:-u/2},...Zi(-c/2+p,0,p,50,90,270),{x:c/2-p,y:u/2},{x:-c/2,y:u/2}],C=ft(y),b=g.path(C,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),K(t,k),t.intersect=function(_){return z.info("Pill intersect",t,{radius:p,point:_}),j.polygon(t,y,_)},l}f(Ff,"halfRoundedRectangle");var eS=f((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Af(e,t){const{labelStyles:r,nodeStyles:i}=Z(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,o=70,n=32,l=t.look==="neo"?o:a,h=t.look==="neo"?n:a;if(t.width||t.height){const k=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*k-h,t.height=(t.height??0)-l}const{shapeSvg:c,bbox:u}=await et(e,t,tt(t)),p=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=p/s,g=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+h,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:C}=t;if(t.look==="handDrawn"){const b=X.svg(c),k=V(t,{}),_=eS(0,0,g,p,d),w=b.path(_,k);y=c.insert(()=>w,":first-child").attr("transform",`translate(${-g/2}, ${p/2})`),C&&y.attr("style",C)}else y=Xe(c,g,p,m);return i&&y.attr("style",i),t.width=g,t.height=p,K(t,y),t.intersect=function(b){return j.polygon(t,m,b)},c}f(Af,"hexagon");async function Ef(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await et(e,t,tt(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=X.svg(s),h=V(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=ft(c),p=l.path(u,h),d=s.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(${-a/2}, ${-o/2})`),K(t,d),t.intersect=function(g){return z.info("Pill intersect",t,{points:c}),j.polygon(t,c,g)},s}f(Ef,"hourglass");async function Mf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Z(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:u}=await et(e,t,"icon-shape default"),p=t.pos==="t",d=n,g=n,{nodeBorder:m}=r,{stylesMap:y}=di(t),C=-g/2,b=-d/2,k=t.label?8:0,_=X.svg(h),w=V(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=_.rectangle(C,b,g,d,w),$=Math.max(g,c.width),E=d+c.height+k,W=_.rectangle(-$/2,-E/2,$,E,{...w,fill:"transparent",stroke:"none"}),P=h.insert(()=>v,":first-child"),O=h.insert(()=>W);if(t.icon){const Y=h.append("g");Y.html(`<g>${await as(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const H=Y.node().getBBox(),I=H.width,A=H.height,B=H.x,M=H.y;Y.attr("transform",`translate(${-I/2-B},${p?c.height/2+k/2-A/2-M:-c.height/2-k/2-A/2-M})`),Y.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-E/2:E/2-c.height})`),P.attr("transform",`translate(0,${p?c.height/2+k/2:-c.height/2-k/2})`),K(t,O),t.intersect=function(Y){if(z.info("iconSquare intersect",t,Y),!t.label)return j.rect(t,Y);const H=t.x??0,I=t.y??0,A=t.height??0;let B=[];return p?B=[{x:H-c.width/2,y:I-A/2},{x:H+c.width/2,y:I-A/2},{x:H+c.width/2,y:I-A/2+c.height+k},{x:H+g/2,y:I-A/2+c.height+k},{x:H+g/2,y:I+A/2},{x:H-g/2,y:I+A/2},{x:H-g/2,y:I-A/2+c.height+k},{x:H-c.width/2,y:I-A/2+c.height+k}]:B=[{x:H-g/2,y:I-A/2},{x:H+g/2,y:I-A/2},{x:H+g/2,y:I-A/2+d},{x:H+c.width/2,y:I-A/2+d},{x:H+c.width/2/2,y:I+A/2},{x:H-c.width/2,y:I+A/2},{x:H-c.width/2,y:I-A/2+d},{x:H-g/2,y:I-A/2+d}],j.polygon(t,B,Y)},h}f(Mf,"icon");async function $f(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Z(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:u}=await et(e,t,"icon-shape default"),p=20,d=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:C}=di(t),b=X.svg(h),k=V(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=C.get("fill");k.stroke=_??y;const w=h.append("g");t.icon&&w.html(`<g>${await as(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=w.node().getBBox(),$=v.width,E=v.height,W=v.x,P=v.y,O=Math.max($,E)*Math.SQRT2+p*2,Y=b.circle(0,0,O,k),H=Math.max(O,c.width),I=O+c.height+d,A=b.rectangle(-H/2,-I/2,H,I,{...k,fill:"transparent",stroke:"none"}),B=h.insert(()=>Y,":first-child"),M=h.insert(()=>A);return w.attr("transform",`translate(${-$/2-W},${g?c.height/2+d/2-E/2-P:-c.height/2-d/2-E/2-P})`),w.attr("style",`color: ${C.get("stroke")??m};`),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${g?-I/2:I/2-c.height})`),B.attr("transform",`translate(0,${g?c.height/2+d/2:-c.height/2-d/2})`),K(t,M),t.intersect=function(F){return z.info("iconSquare intersect",t,F),j.rect(t,F)},h}f($f,"iconCircle");async function Of(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Z(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:p}=await et(e,t,"icon-shape default"),d=t.pos==="t",g=n+u*2,m=n+u*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=di(t),k=-m/2,_=-g/2,w=t.label?8:0,v=X.svg(h),$=V(t,{});t.look!=="handDrawn"&&($.roughness=0,$.fillStyle="solid");const E=b.get("fill");$.stroke=E??C;const W=v.path(sr(k,_,m,g,5),$),P=Math.max(m,c.width),O=g+c.height+w,Y=v.rectangle(-P/2,-O/2,P,O,{...$,fill:"transparent",stroke:"none"}),H=h.insert(()=>W,":first-child").attr("class","icon-shape2"),I=h.insert(()=>Y);if(t.icon){const A=h.append("g");A.html(`<g>${await as(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=A.node().getBBox(),M=B.width,F=B.height,S=B.x,q=B.y;A.attr("transform",`translate(${-M/2-S},${d?c.height/2+w/2-F/2-q:-c.height/2-w/2-F/2-q})`),A.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-O/2:O/2-c.height})`),H.attr("transform",`translate(0,${d?c.height/2+w/2:-c.height/2-w/2})`),K(t,I),t.intersect=function(A){if(z.info("iconSquare intersect",t,A),!t.label)return j.rect(t,A);const B=t.x??0,M=t.y??0,F=t.height??0;let S=[];return d?S=[{x:B-c.width/2,y:M-F/2},{x:B+c.width/2,y:M-F/2},{x:B+c.width/2,y:M-F/2+c.height+w},{x:B+m/2,y:M-F/2+c.height+w},{x:B+m/2,y:M+F/2},{x:B-m/2,y:M+F/2},{x:B-m/2,y:M-F/2+c.height+w},{x:B-c.width/2,y:M-F/2+c.height+w}]:S=[{x:B-m/2,y:M-F/2},{x:B+m/2,y:M-F/2},{x:B+m/2,y:M-F/2+g},{x:B+c.width/2,y:M-F/2+g},{x:B+c.width/2/2,y:M+F/2},{x:B-c.width/2,y:M+F/2},{x:B-c.width/2,y:M-F/2+g},{x:B-m/2,y:M-F/2+g}],j.polygon(t,S,A)},h}f(Of,"iconRounded");async function If(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Z(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:p}=await et(e,t,"icon-shape default"),d=t.pos==="t",g=n+u*2,m=n+u*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=di(t),k=-m/2,_=-g/2,w=t.label?8:0,v=X.svg(h),$=V(t,{});t.look!=="handDrawn"&&($.roughness=0,$.fillStyle="solid");const E=b.get("fill");$.stroke=E??C;const W=v.path(sr(k,_,m,g,.1),$),P=Math.max(m,c.width),O=g+c.height+w,Y=v.rectangle(-P/2,-O/2,P,O,{...$,fill:"transparent",stroke:"none"}),H=h.insert(()=>W,":first-child"),I=h.insert(()=>Y);if(t.icon){const A=h.append("g");A.html(`<g>${await as(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=A.node().getBBox(),M=B.width,F=B.height,S=B.x,q=B.y;A.attr("transform",`translate(${-M/2-S},${d?c.height/2+w/2-F/2-q:-c.height/2-w/2-F/2-q})`),A.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-O/2:O/2-c.height})`),H.attr("transform",`translate(0,${d?c.height/2+w/2:-c.height/2-w/2})`),K(t,I),t.intersect=function(A){if(z.info("iconSquare intersect",t,A),!t.label)return j.rect(t,A);const B=t.x??0,M=t.y??0,F=t.height??0;let S=[];return d?S=[{x:B-c.width/2,y:M-F/2},{x:B+c.width/2,y:M-F/2},{x:B+c.width/2,y:M-F/2+c.height+w},{x:B+m/2,y:M-F/2+c.height+w},{x:B+m/2,y:M+F/2},{x:B-m/2,y:M+F/2},{x:B-m/2,y:M-F/2+c.height+w},{x:B-c.width/2,y:M-F/2+c.height+w}]:S=[{x:B-m/2,y:M-F/2},{x:B+m/2,y:M-F/2},{x:B+m/2,y:M-F/2+g},{x:B+c.width/2,y:M-F/2+g},{x:B+c.width/2/2,y:M+F/2},{x:B-c.width/2,y:M+F/2},{x:B-c.width/2,y:M-F/2+g},{x:B-m/2,y:M-F/2+g}],j.polygon(t,S,A)},h}f(If,"iconSquare");async function Df(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:o}=Z(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??s),h=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,c=t.constraint==="on"?h/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(h,n??0);const{shapeSvg:u,bbox:p,label:d}=await et(e,t,"image-shape default"),g=t.pos==="t",m=-h/2,y=-c/2,C=t.label?8:0,b=X.svg(u),k=V(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=b.rectangle(m,y,h,c,k),w=Math.max(h,p.width),v=c+p.height+C,$=b.rectangle(-w/2,-v/2,w,v,{...k,fill:"none",stroke:"none"}),E=u.insert(()=>_,":first-child"),W=u.insert(()=>$);if(t.img){const P=u.append("image");P.attr("href",t.img),P.attr("width",h),P.attr("height",c),P.attr("preserveAspectRatio","none"),P.attr("transform",`translate(${-h/2},${g?v/2-c:-v/2})`)}return d.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${g?-c/2-p.height/2-C/2:c/2-p.height/2+C/2})`),E.attr("transform",`translate(0,${g?p.height/2+C/2:-p.height/2-C/2})`),K(t,W),t.intersect=function(P){if(z.info("iconSquare intersect",t,P),!t.label)return j.rect(t,P);const O=t.x??0,Y=t.y??0,H=t.height??0;let I=[];return g?I=[{x:O-p.width/2,y:Y-H/2},{x:O+p.width/2,y:Y-H/2},{x:O+p.width/2,y:Y-H/2+p.height+C},{x:O+h/2,y:Y-H/2+p.height+C},{x:O+h/2,y:Y+H/2},{x:O-h/2,y:Y+H/2},{x:O-h/2,y:Y-H/2+p.height+C},{x:O-p.width/2,y:Y-H/2+p.height+C}]:I=[{x:O-h/2,y:Y-H/2},{x:O+h/2,y:Y-H/2},{x:O+h/2,y:Y-H/2+c},{x:O+p.width/2,y:Y-H/2+c},{x:O+p.width/2/2,y:Y+H/2},{x:O-p.width/2,y:Y+H/2},{x:O-p.width/2,y:Y-H/2+c},{x:O-h/2,y:Y-H/2+c}],j.polygon(t,I,P)},u}f(Df,"imageSquare");async function Rf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=Math.max(l.width+(o??0)*2,(t==null?void 0:t.width)??0),c=Math.max(l.height+(a??0)*2,(t==null?void 0:t.height)??0),u=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=X.svg(n),m=V(t,{}),y=ft(u),C=g.path(y,m);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=Xe(n,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,K(t,p),t.intersect=function(g){return j.polygon(t,u,g)},n}f(Rf,"inv_trapezoid");async function Pf(e,t){const{shapeSvg:r,bbox:i,label:s}=await et(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),K(t,a),t.intersect=function(l){return j.rect(t,l)},r}f(Pf,"labelRect");async function Nf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,u=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-(3*h)/6,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=X.svg(n),m=V(t,{}),y=ft(u),C=g.path(y,m);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Xe(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,K(t,p),t.intersect=function(g){return j.polygon(t,u,g)},n}f(Nf,"lean_left");async function qf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,u=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=X.svg(n),m=V(t,{}),y=ft(u),C=g.path(y,m);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Xe(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,K(t,p),t.intersect=function(g){return j.polygon(t,u,g)},n}f(qf,"lean_right");function Wf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,h=[{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}],c=X.svg(s),u=V(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const p=ft(h),d=c.path(p,u),g=s.insert(()=>d,":first-child");return g.attr("class","outer-path"),a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-n})`),K(t,g),t.intersect=function(m){return z.info("lightningBolt intersect",t,m),j.polygon(t,h,m)},s}f(Wf,"lightningBolt");var rS=f((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),iS=f((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),sS=f((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Gh=10,jh=10;async function zf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-a,t.width<jh&&(t.width=jh);const k=C/2/(2.5+C/50);t.height=(t.height??0)-o-k*3,t.height<Gh&&(t.height=Gh)}const{shapeSvg:n,bbox:l,label:h}=await et(e,t,tt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=c/2,p=u/(2.5+c/50),d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+p+o*2,g=d*.1;let m;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=X.svg(n),b=iS(0,0,c,d,u,p,g),k=sS(0,p,c,d,u,p),_=V(t,{}),w=C.path(b,_),v=C.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 C=rS(0,0,c,d,u,p,g);m=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",Nt(y)).attr("style",i)}return m.attr("label-offset-y",p),m.attr("transform",`translate(${-c/2}, ${-(d/2+p)})`),K(t,m),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(C){const b=j.rect(t,C),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-_,C.y-(t.y??0)>0&&(_=-_),b.y+=_}return b},n}f(zf,"linedCylinder");async function Hf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;if(t.width||t.height){const _=t.width;t.width=(_??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:h}=await et(e,t,tt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(a??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(o??0)*2,p=t.look==="neo"?u/4:u/8,d=u+p,{cssStyles:g}=t,m=X.svg(n),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-c/2-c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:d/2},...ir(-c/2-c/2*.1,d/2,c/2+c/2*.1,d/2,p,.8),{x:c/2+c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:-d/2},{x:-c/2,y:-d/2},{x:-c/2,y:d/2*1.1},{x:-c/2,y:-d/2}],b=m.polygon(C.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})`),h.attr("transform",`translate(${-c/2+(t.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-p/2-(l.y-(l.top??0))})`),K(t,k),t.intersect=function(_){return j.polygon(t,C,_)},n}f(Hf,"linedWaveEdgedRect");async function Yf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*n,10));const{shapeSvg:l,bbox:h,label:c}=await et(e,t,tt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+2*n,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+o*2+2*n,d=u-2*n,g=p-2*n,m=-d/2,y=-g/2,{cssStyles:C}=t,b=X.svg(l),k=V(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=ft(_);let $=b.path(v,k);const E=ft(w);let W=b.path(E,k);t.look!=="handDrawn"&&($=en($),W=en(W));const P=l.insert("g",":first-child");return P.insert(()=>$),P.insert(()=>W),P.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(h.width/2)-n-(h.x-(h.left??0))}, ${-(h.height/2)+n-(h.y-(h.top??0))})`),K(t,P),t.intersect=function(O){return j.polygon(t,_,O)},l}f(Yf,"multiRect");async function Uf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await et(e,t,tt(t)),n=t.padding??0,l=t.look==="neo"?16:n,h=t.look==="neo"?12:n;let c=!0;(t.width||t.height)&&(c=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-h*3);const u=Math.max(a.width,(t==null?void 0:t.width)??0)+l*2,p=Math.max(a.height,(t==null?void 0:t.height)??0)+h*3,d=t.look==="neo"?p/4:p/8,g=p+(c?d/2:-d/2),m=-u/2,y=-g/2,C=10,{cssStyles:b}=t,k=ir(m-C,y+g+C,m+u-C,y+g+C,d,.8),_=k==null?void 0:k[k.length-1],w=[{x:m-C,y:y+C},{x:m-C,y:y+g+C},...k,{x:m+u-C,y:_.y-C},{x:m+u,y:_.y-C},{x:m+u,y:_.y-2*C},{x:m+u+C,y:_.y-2*C},{x:m+u+C,y:y-C},{x:m+C,y:y-C},{x:m+C,y},{x:m,y},{x:m,y:y+C}],v=[{x:m,y:y+C},{x:m+u-C,y:y+C},{x:m+u-C,y:_.y-C},{x:m+u,y:_.y-C},{x:m+u,y},{x:m,y}],$=X.svg(s),E=V(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const W=ft(w),P=$.path(W,E),O=ft(v),Y=$.path(O,E),H=s.insert(()=>P,":first-child");return H.insert(()=>Y),H.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&H.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&H.selectAll("path").attr("style",i),H.attr("transform",`translate(0,${-d/2})`),o.attr("transform",`translate(${-(a.width/2)-C-(a.x-(a.left??0))}, ${-(a.height/2)+C-d/2-(a.y-(a.top??0))})`),K(t,H),t.intersect=function(I){return j.polygon(t,w,I)},s}f(Uf,"multiWaveEdgedRectangle");async function Gf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=Z(t);t.labelStyle=i,t.useHtmlLabels||Jt(vt())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),h=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-h/2,p=-c/2,{cssStyles:d}=t,g=X.svg(o),m=V(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(u,p,h,c,m),C=o.insert(()=>y,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",d),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),K(t,C),t.intersect=function(b){return j.rect(t,b)},o}f(Gf,"note");var aS=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 jf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await et(e,t,tt(t)),o=a.width+(t.padding??0),n=a.height+(t.padding??0),l=o+n,h=.5,c=[{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=X.svg(s),g=V(t,{}),m=aS(0,0,l),y=d.path(m,g);u=s.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+h}, ${l/2})`),p&&u.attr("style",p)}else u=Xe(s,l,l,c),u.attr("transform",`translate(${-l/2+h}, ${l/2})`);return i&&u.attr("style",i),K(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}],C=j.polygon(d,y,g);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},s}f(jf,"question");async function Xf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,o=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:h}=await et(e,t,tt(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a),u=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),p=-c/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,C=X.svg(n),b=V(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=ft(m),_=C.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)`),h.attr("transform",`translate(${-g/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),K(t,w),t.intersect=function(v){return j.polygon(t,m,v)},n}f(Xf,"rect_left_inv_arrow");async function Vf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",i),l=t.description,h=t.label,c=await Ke(n,h,t.labelStyle,!0,!0);let u={width:0,height:0};if(Jt(yt())){const E=c.children[0],W=ht(c);u=E.getBoundingClientRect(),W.attr("width",u.width),W.attr("height",u.height)}z.info("Text 2",l);const p=l||[],d=c.getBBox(),g=await Ke(n,Array.isArray(p)?p.join("<br/>"):p,t.labelStyle,!0,!0),m=g.children[0],y=ht(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const C=(t.padding||0)/2;ht(g).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+C+5)+")"),ht(c).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-C+3)+")");const b=u.width+(t.padding||0),k=u.height+(t.padding||0),_=-u.width/2-C,w=-u.height/2-C;let v,$;if(t.look==="handDrawn"){const E=X.svg(a),W=V(t,{}),P=E.path(sr(_,w,b,k,t.rx||0),W),O=E.line(-u.width/2-C,-u.height/2-C+d.height+C,u.width/2+C,-u.height/2-C+d.height+C,W);$=a.insert(()=>(z.debug("Rough node insert CXC",P),O),":first-child"),v=a.insert(()=>(z.debug("Rough node insert CXC",P),P),":first-child")}else v=o.insert("rect",":first-child"),$=o.insert("line"),v.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-C).attr("y",-u.height/2-C).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),$.attr("class","divider").attr("x1",-u.width/2-C).attr("x2",u.width/2+C).attr("y1",-u.height/2-C+d.height+C).attr("y2",-u.height/2-C+d.height+C);return K(t,v),t.intersect=function(E){return j.rect(t,E)},a}f(Vf,"rectWithTitle");async function Zf(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return fi(e,t,s)}f(Zf,"roundedRect");var hr=8;async function Kf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),h=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?hr:hr*2),c=((t==null?void 0:t.height)??n.height)+a*2,u=h-hr,p=c,d=hr-h/2,g=-c/2,{cssStyles:m}=t,y=X.svg(o),C=V(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:d,y:g},{x:d+u,y:g},{x:d+u,y:g+p},{x:d-hr,y:g+p},{x:d-hr,y:g},{x:d,y:g},{x:d,y:g+p}],k=y.polygon(b.map(w=>[w.x,w.y]),C),_=o.insert(()=>k,":first-child");return _.attr("class","basic label-container outer-path").attr("style",Nt(m)),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),m&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),l.attr("transform",`translate(${hr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),K(t,_),t.intersect=function(w){return j.rect(t,w)},o}f(Kf,"shadedProcess");async function Qf(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-o*2,10));const{shapeSvg:n,bbox:l,label:h}=await et(e,t,tt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2)*1.5,p=c,d=u/1.5,g=-p/2,m=-d/2,{cssStyles:y}=t,C=X.svg(n),b=V(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}],_=ft(k),w=C.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})`),h.attr("transform",`translate(${-p/2+(t.padding??0)-(l.x-(l.left??0))}, ${-d/4+(t.padding??0)-(l.y-(l.top??0))})`),K(t,v),t.intersect=function($){return j.polygon(t,k,$)},n}f(Qf,"slopedRect");async function Jf(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return fi(e,t,a)}f(Jf,"squareRect");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?20:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=l.height+(t.look==="neo"?o*2:o),c=l.width+h/4+(t.look==="neo"?a*2:a),u=h/2,{cssStyles:p}=t,d=X.svg(n),g=V(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-c/2+u,y:-h/2},{x:c/2-u,y:-h/2},...Zi(-c/2+u,0,u,50,90,270),{x:c/2-u,y:h/2},...Zi(c/2-u,0,u,50,270,450)],y=ft(m),C=d.path(y,g),b=n.insert(()=>C,":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),K(t,b),t.intersect=function(k){return j.polygon(t,m,k)},n}f(tg,"stadium");async function eg(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return fi(e,t,r)}f(eg,"state");function rg(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:s}=Z(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:n,nodeBorder:l,nodeShadow:h}=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 c=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=X.svg(c),p=V(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"}),C=c.insert(()=>d,":first-child");if(C.insert(()=>y),t.look!=="handDrawn"&&C.attr("class","outer-path"),a&&C.selectAll("path").attr("style",a),s&&C.selectAll("path").attr("style",s),t.width<25&&h&&t.look!=="handDrawn"){const _=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",w=_?`${_}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${w})`)}return K(t,C),t.intersect=function(_){return j.circle(t,(t.width??0)/2,_)},c}f(rg,"stateEnd");function ig(e,t,{config:{themeVariables:r}}){var n,l;const{lineColor:i,nodeShadow:s}=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 a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const c=X.svg(a).circle(0,0,t.width,f2(i));o=a.insert(()=>c),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=a.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&&s&&t.look!=="handDrawn"){const h=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",c=h?`${h}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${c})`)}return K(t,o),t.intersect=function(h){return j.circle(t,(t.width??7)/2,h)},a}f(ig,"stateStart");var Rr=8;async function sg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=((t==null?void 0:t.width)??l.width)+2*Rr+a,c=((t==null?void 0:t.height)??l.height)+o,u=h-2*Rr,p=c,d=-h/2,g=-c/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=X.svg(n),C=V(t,{}),b=y.rectangle(d,g,u+16,p,C),k=y.line(d+Rr,g,d+Rr,g+p,C),_=y.line(d+Rr+u,g,d+Rr+u,g+p,C);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",Nt(v)),K(t,w)}else{const y=Xe(n,u,p,m);i&&y.attr("style",i),K(t,y)}return t.intersect=function(y){return j.polygon(t,m,y)},n}f(sg,"subroutine");var lo=.2;async function ag(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-o*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-lo*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,c=lo*h,u=lo*h,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+c-c,g=h,m=-d/2,y=-g/2,{cssStyles:C}=t,b=X.svg(n),k=V(t,{}),_=[{x:m-c/2,y},{x:m+d+c/2,y},{x:m+d+c/2,y:y+g},{x:m-c/2,y:y+g}],w=[{x:m+d-c/2,y:y+g},{x:m+d+c/2,y:y+g},{x:m+d+c/2,y:y+g-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=ft(_),$=b.path(v,k),E=ft(w),W=b.path(E,{...k,fillStyle:"solid"}),P=n.insert(()=>W,":first-child");return P.insert(()=>$,":first-child"),P.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),K(t,P),t.intersect=function(O){return j.polygon(t,_,O)},n}f(ag,"taggedRect");async function og(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await et(e,t,tt(t)),n=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/8,c=.2*n,u=.2*l,p=l+h,{cssStyles:d}=t,g=X.svg(s),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:p/2},...ir(-n/2-n/2*.1,p/2,n/2+n/2*.1,p/2,h,.8),{x:n/2+n/2*.1,y:-p/2},{x:-n/2-n/2*.1,y:-p/2}],C=-n/2+n/2*.1,b=-p/2-u*.4,k=[{x:C+n-c,y:(b+l)*1.3},{x:C+n,y:b+l-u},{x:C+n,y:(b+l)*.9},...ir(C+n,(b+l)*1.25,C+n-c,(b+l)*1.3,-l*.02,.5)],_=ft(y),w=g.path(_,m),v=ft(k),$=g.path(v,{...m,fillStyle:"solid"}),E=s.insert(()=>$,":first-child");return E.insert(()=>w,":first-child"),E.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-h/2-(a.y-(a.top??0))})`),K(t,E),t.intersect=function(W){return j.polygon(t,y,W)},s}f(og,"taggedWaveEdgedRectangle");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await et(e,t,tt(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-o/2,h=-n/2,c=s.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",o).attr("height",n),K(t,c),t.intersect=function(u){return j.rect(t,u)},s}f(ng,"text");var oS=f((e,t,r,i,s,a)=>`M${e},${t}
232
232
  a${s},${a} 0,0,1 0,${-i}
233
233
  l${r},0
234
234
  a${s},${a} 0,0,1 0,${i}
235
235
  M${r},${-i}
236
236
  a${s},${a} 0,0,0 0,${i}
237
- l${-r},0`,"createCylinderPathD"),lS=f((e,t,r,i,s,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),hS=f((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Xh=5,Vh=10;async function lg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2;if(t.width||t.height){const m=t.height??0;t.height=(t.height??0)-a,t.height<Xh&&(t.height=Xh);const C=m/2/(2.5+m/50);t.width=(t.width??0)-a-C*3,t.width<Vh&&(t.width=Vh)}const{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),h=(t.height?t.height:n.height)+a,c=h/2,u=c/(2.5+h/50),p=(t.width?t.width:n.width)+u+a,{cssStyles:d}=t;let g;if(t.look==="handDrawn"){const m=X.svg(o),y=lS(0,0,p,h,u,c),C=hS(0,0,p,h,u,c),b=m.path(y,V(t,{})),k=m.path(C,V(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=nS(0,0,p,h,u,c);g=o.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Nt(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}, ${h/2} )`),l.attr("transform",`translate(${-(n.width/2)-u-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),K(t,g),t.intersect=function(m){const y=j.rect(t,m),C=y.y-(t.y??0);if(c!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-C*C/(c*c));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(lg,"tiltedCylinder");async function hg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,u=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=X.svg(n),m=V(t,{}),y=ft(u),C=g.path(y,m);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Xe(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,K(t,p),t.intersect=function(g){return j.polygon(t,u,g)},n}f(hg,"trapezoid");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,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)-a*2,t.width<n&&(t.width=n));const{shapeSvg:h,bbox:c}=await et(e,t,tt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,p=(t!=null&&t.height?t==null?void 0:t.height:c.height)+o*2,{cssStyles:d}=t,g=X.svg(h),m=V(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}],C=ft(y),b=g.path(C,m),k=h.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),K(t,k),t.intersect=function(_){return j.polygon(t,y,_)},h}f(cg,"trapezoidalPentagon");var Zh=10,Kh=10;async function ug(e,t){var _;const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-a)/2,t.width<Kh&&(t.width=Kh),t.height=(t==null?void 0:t.height)??0,t.height<Zh&&(t.height=Zh));const{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),h=Ge((_=yt().flowchart)==null?void 0:_.htmlLabels),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+a,u=t!=null&&t.height?t==null?void 0:t.height:c+n.height,p=u,d=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-u}],{cssStyles:g}=t,m=X.svg(o),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=ft(d),b=m.path(C,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=c,t.height=u,K(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${u/2-(n.height+(t.padding??0)/(h?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(w){return z.info("Triangle intersect",t,d,w),j.polygon(t,d,w)},o}f(ug,"triangle");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=((t==null?void 0:t.width)??0)-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:h,label:c}=await et(e,t,tt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(a??0)*2,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(o??0)*2,d=t.look==="neo"?p/4:p/8,g=p+(n?d:-d),{cssStyles:m}=t,C=14-u,b=C>0?C/2:0,k=X.svg(l),_=V(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=[{x:-u/2-b,y:g/2},...ir(-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=ft(w),$=k.path(v,_),E=l.insert(()=>$,":first-child");return E.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-u/2+(t.padding??0)-(h.x-(h.left??0))},${-p/2+(t.padding??0)-d-(h.y-(h.top??0))})`),K(t,E),t.intersect=function(W){return j.polygon(t,w,W)},l}f(dg,"waveEdgedRectangle");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0: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-a*2}const{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o,u=c/8,p=c+u*2,{cssStyles:d}=t,g=X.svg(n),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2,y:p/2},...ir(-h/2,p/2,h/2,p/2,u,1),{x:h/2,y:-p/2},...ir(h/2,-p/2,-h/2,-p/2,u,-1)],C=ft(y),b=g.path(C,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),K(t,k),t.intersect=function(_){return j.polygon(t,y,_)},n}f(pg,"waveRectangle");var Lt=10;async function fg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-Lt,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-Lt,10));const{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+Lt,c=(t!=null&&t.height?t==null?void 0:t.height:n.height)+a*2+Lt,u=h-Lt,p=c-Lt,d=-u/2,g=-p/2,{cssStyles:m}=t,y=X.svg(o),C=V(t,{}),b=[{x:d-Lt,y:g-Lt},{x:d-Lt,y:g+p},{x:d+u,y:g+p},{x:d+u,y:g-Lt}],k=`M${d-Lt},${g-Lt} L${d+u},${g-Lt} L${d+u},${g+p} L${d-Lt},${g+p} L${d-Lt},${g-Lt}
237
+ l${-r},0`,"createCylinderPathD"),nS=f((e,t,r,i,s,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),lS=f((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Xh=5,Vh=10;async function lg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2;if(t.width||t.height){const m=t.height??0;t.height=(t.height??0)-a,t.height<Xh&&(t.height=Xh);const C=m/2/(2.5+m/50);t.width=(t.width??0)-a-C*3,t.width<Vh&&(t.width=Vh)}const{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),h=(t.height?t.height:n.height)+a,c=h/2,u=c/(2.5+h/50),p=(t.width?t.width:n.width)+u+a,{cssStyles:d}=t;let g;if(t.look==="handDrawn"){const m=X.svg(o),y=nS(0,0,p,h,u,c),C=lS(0,0,p,h,u,c),b=m.path(y,V(t,{})),k=m.path(C,V(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=oS(0,0,p,h,u,c);g=o.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Nt(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}, ${h/2} )`),l.attr("transform",`translate(${-(n.width/2)-u-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),K(t,g),t.intersect=function(m){const y=j.rect(t,m),C=y.y-(t.y??0);if(c!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-C*C/(c*c));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(lg,"tiltedCylinder");async function hg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,u=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=X.svg(n),m=V(t,{}),y=ft(u),C=g.path(y,m);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Xe(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,K(t,p),t.intersect=function(g){return j.polygon(t,u,g)},n}f(hg,"trapezoid");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,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)-a*2,t.width<n&&(t.width=n));const{shapeSvg:h,bbox:c}=await et(e,t,tt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,p=(t!=null&&t.height?t==null?void 0:t.height:c.height)+o*2,{cssStyles:d}=t,g=X.svg(h),m=V(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}],C=ft(y),b=g.path(C,m),k=h.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),K(t,k),t.intersect=function(_){return j.polygon(t,y,_)},h}f(cg,"trapezoidalPentagon");var Zh=10,Kh=10;async function ug(e,t){var _;const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-a)/2,t.width<Kh&&(t.width=Kh),t.height=(t==null?void 0:t.height)??0,t.height<Zh&&(t.height=Zh));const{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),h=Ge((_=yt().flowchart)==null?void 0:_.htmlLabels),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+a,u=t!=null&&t.height?t==null?void 0:t.height:c+n.height,p=u,d=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-u}],{cssStyles:g}=t,m=X.svg(o),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=ft(d),b=m.path(C,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=c,t.height=u,K(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${u/2-(n.height+(t.padding??0)/(h?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(w){return z.info("Triangle intersect",t,d,w),j.polygon(t,d,w)},o}f(ug,"triangle");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=((t==null?void 0:t.width)??0)-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:h,label:c}=await et(e,t,tt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(a??0)*2,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(o??0)*2,d=t.look==="neo"?p/4:p/8,g=p+(n?d:-d),{cssStyles:m}=t,C=14-u,b=C>0?C/2:0,k=X.svg(l),_=V(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=[{x:-u/2-b,y:g/2},...ir(-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=ft(w),$=k.path(v,_),E=l.insert(()=>$,":first-child");return E.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-u/2+(t.padding??0)-(h.x-(h.left??0))},${-p/2+(t.padding??0)-d-(h.y-(h.top??0))})`),K(t,E),t.intersect=function(W){return j.polygon(t,w,W)},l}f(dg,"waveEdgedRectangle");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0: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-a*2}const{shapeSvg:n,bbox:l}=await et(e,t,tt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o,u=c/8,p=c+u*2,{cssStyles:d}=t,g=X.svg(n),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2,y:p/2},...ir(-h/2,p/2,h/2,p/2,u,1),{x:h/2,y:-p/2},...ir(h/2,-p/2,-h/2,-p/2,u,-1)],C=ft(y),b=g.path(C,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),K(t,k),t.intersect=function(_){return j.polygon(t,y,_)},n}f(pg,"waveRectangle");var Lt=10;async function fg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-Lt,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-Lt,10));const{shapeSvg:o,bbox:n,label:l}=await et(e,t,tt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+Lt,c=(t!=null&&t.height?t==null?void 0:t.height:n.height)+a*2+Lt,u=h-Lt,p=c-Lt,d=-u/2,g=-p/2,{cssStyles:m}=t,y=X.svg(o),C=V(t,{}),b=[{x:d-Lt,y:g-Lt},{x:d-Lt,y:g+p},{x:d+u,y:g+p},{x:d+u,y:g-Lt}],k=`M${d-Lt},${g-Lt} L${d+u},${g-Lt} L${d+u},${g+p} L${d-Lt},${g+p} L${d-Lt},${g-Lt}
238
238
  M${d-Lt},${g} L${d+u},${g}
239
- M${d},${g-Lt} L${d},${g+p}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=y.path(k,C),w=o.insert(()=>_,":first-child");return w.attr("transform",`translate(${Lt/2}, ${Lt/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)+Lt/2-(n.x-(n.left??0))}, ${-(n.height/2)+Lt/2-(n.y-(n.top??0))})`),K(t,w),t.intersect=function(v){return j.polygon(t,b,v)},o}f(fg,"windowPane");var Qh=new Set(["redux-color","redux-dark-color"]),cS=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function al(e,t){var nt,$t,xt,te;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=vt(),{rowEven:a,rowOdd:o,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:U}=vt(),{background:st}=U,kt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${st}`]};await al(e,kt)}const h=vt();t.useHtmlLabels=h.htmlLabels;let c=((nt=h.er)==null?void 0:nt.diagramPadding)??10,u=(($t=h.er)==null?void 0:$t.entityPadding)??6;const{cssStyles:p}=t,{labelStyles:d,nodeStyles:g}=Z(t);if(r.attributes.length===0&&t.label){const U={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5};Ue(t.label,h)+U.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const st=await fi(e,t,U);if(i!=null&&Qh.has(i)){const kt=r.colorIndex??0;st.attr("data-color-id",`color-${kt%l.length}`)}if(!Ge(h.htmlLabels)){const kt=st.select("text"),wt=(xt=kt.node())==null?void 0:xt.getBBox();kt.attr("transform",`translate(${-wt.width/2}, 0)`)}return st}h.htmlLabels||(c*=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),C=await qr(y,t.label??"",h,0,0,["name"],d);C.height+=u;let b=0;const k=[],_=[];let w=0,v=0,$=0,E=0,W=!0,P=!0;for(const U of r.attributes){const st=await qr(y,U.type,h,0,b,["attribute-type"],d);w=Math.max(w,st.width+c);const kt=await qr(y,U.name,h,0,b,["attribute-name"],d);v=Math.max(v,kt.width+c);const wt=await qr(y,U.keys.join(),h,0,b,["attribute-keys"],d);$=Math.max($,wt.width+c);const we=await qr(y,U.comment,h,0,b,["attribute-comment"],d);E=Math.max(E,we.width+c);const le=Math.max(st.height,kt.height,wt.height,we.height)+u;_.push({yOffset:b,rowHeight:le}),b+=le}let O=4;$<=c&&(W=!1,$=0,O--),E<=c&&(P=!1,E=0,O--);const Y=y.node().getBBox();if(C.width+c*2-(w+v+$+E)>0){const U=C.width+c*2-(w+v+$+E);w+=U/O,v+=U/O,$>0&&($+=U/O),E>0&&(E+=U/O)}const H=w+v+$+E,I=X.svg(y),A=V(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let B=0;_.length>0&&(B=_.reduce((U,st)=>U+((st==null?void 0:st.rowHeight)??0),0));const M=Math.max(Y.width+c*2,(t==null?void 0:t.width)||0,H),F=Math.max((B??0)+C.height,(t==null?void 0:t.height)||0),S=-M/2,q=-F/2;if(y.selectAll("g:not(:first-child)").each((U,st,kt)=>{const wt=ht(kt[st]),we=wt.attr("transform");let le=0,gi=0;if(we){const he=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(we);he&&(le=parseFloat(he[1]),gi=parseFloat(he[2]),wt.attr("class").includes("attribute-name")?le+=w:wt.attr("class").includes("attribute-keys")?le+=w+v:wt.attr("class").includes("attribute-comment")&&(le+=w+v+$))}wt.attr("transform",`translate(${S+c/2+le}, ${gi+q+C.height+u/2})`)}),y.select(".name").attr("transform","translate("+-C.width/2+", "+(q+u/2)+")"),i!=null&&Qh.has(i)){const U=r.colorIndex??0;y.attr("data-color-id",`color-${U%l.length}`)}const ot=I.rectangle(S,q,M,F,A),ut=y.insert(()=>ot,":first-child").attr("class","outer-path").attr("style",p.join(""));k.push(0);for(const[U,st]of _.entries()){const wt=(U+1)%2===0&&st.yOffset!==0,we=I.rectangle(S,C.height+q+(st==null?void 0:st.yOffset),M,st==null?void 0:st.rowHeight,{...A,fill:wt?a:o,stroke:n});y.insert(()=>we,"g.label").attr("style",p.join("")).attr("class",`row-rect-${wt?"even":"odd"}`)}const dt=1e-4;let pt=Wr(S,C.height+q,M+S,C.height+q,dt),mt=I.polygon(pt.map(U=>[U.x,U.y]),A);if(y.insert(()=>mt).attr("class","divider"),pt=Wr(w+S,C.height+q,w+S,F+q,dt),mt=I.polygon(pt.map(U=>[U.x,U.y]),A),y.insert(()=>mt).attr("class","divider"),W){const U=w+v+S;pt=Wr(U,C.height+q,U,F+q,dt),mt=I.polygon(pt.map(st=>[st.x,st.y]),A),y.insert(()=>mt).attr("class","divider")}if(P){const U=w+v+$+S;pt=Wr(U,C.height+q,U,F+q,dt),mt=I.polygon(pt.map(st=>[st.x,st.y]),A),y.insert(()=>mt).attr("class","divider")}for(const U of k){const st=C.height+q+U;pt=Wr(S,st,M+S,st,dt),mt=I.polygon(pt.map(kt=>[kt.x,kt.y]),A),y.insert(()=>mt).attr("class","divider")}if(K(t,ut),g&&t.look!=="handDrawn")if(i!=null&&cS.has(i))y.selectAll("path").attr("style",g);else{const U=g.split(";"),st=(te=U==null?void 0:U.filter(kt=>kt.includes("stroke")))==null?void 0:te.map(kt=>`${kt}`).join("; ");y.selectAll("path").attr("style",st??""),y.selectAll(".row-rect-even path").attr("style",g)}return t.intersect=function(U){return j.rect(t,U)},y}f(al,"erBox");async function qr(e,t,r,i=0,s=0,a=[],o=""){const n=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",o);t!==zl(t)&&(t=zl(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await je(n,t,{width:Ue(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let c=l.children[0];for(c.textContent=c.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");c.childNodes[0];)c=c.childNodes[0],c.textContent=c.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let h=l.getBBox();if(Ge(r.htmlLabels)){const c=l.children[0];c.style.textAlign="start";const u=ht(l);h=c.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)}return h}f(qr,"addText");function Wr(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}f(Wr,"lineToPolygon");async function gg(e,t,r,i,s=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",tt(t)).attr("id",t.domId||t.id);let n=null,l=null,h=null,c=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 Oi(n,{text:`«${b}»`},0),u=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Oi(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();p=g.height,h=o.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const k=await Oi(h,b,m,[b.parseClassifier()]);m+=k+a}d=h.node().getBBox().height,d<=0&&(d=s/2),c=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const k=await Oi(c,b,y,[b.parseClassifier()]);y+=k+a}let C=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})`),C=o.node().getBBox(),h.attr("transform",`translate(0, ${u+p+s*2})`),C=o.node().getBBox(),c.attr("transform",`translate(0, ${u+p+(d?d+s*4:s*2)})`),C=o.node().getBBox(),{shapeSvg:o,bbox:C}}f(gg,"textHelper");async function Oi(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=vt();let o="useHtmlLabels"in t?t.useHtmlLabels:Ge(a.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),Wi(n)&&(o=!0);const l=await je(s,fn(Tr(n)),{width:Ue(n,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let h,c=1;if(o){const u=l.children[0],p=ht(l);c=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(c+=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 C(){var b;if(m.style.display="flex",m.style.flexDirection="column",g){const k=((b=a.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,w=parseInt(k,10)*5+"px";m.style.minWidth=w,m.style.maxWidth=w}else m.style.width="100%";y(m)}f(C,"setupImage"),setTimeout(()=>{m.complete&&C()}),m.addEventListener("error",C),m.addEventListener("load",C)})))}h=u.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{i.includes("font-weight: bolder")&&ht(l).selectAll("tspan").attr("font-weight",""),c=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=""),h=l.getBBox()}return s.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}f(Oi,"addText");async function mg(e,t){var I,A;const r=yt(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,o=a,n=t.useHtmlLabels??Ge(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await gg(e,t,r,n,o),{labelStyles:u,nodeStyles:p}=Z(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=((I=l.styles)==null?void 0:I.join(";"))||p||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const g=l.members.length===0&&l.methods.length===0&&!((A=r.class)!=null&&A.hideEmptyMembersBox),m=X.svg(h),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=Math.max(t.width??0,c.width);let b=Math.max(t.height??0,c.height);const k=(t.height??0)>c.height;l.members.length===0&&l.methods.length===0?b+=o:l.members.length>0&&l.methods.length===0&&(b+=o*2);const _=-C/2,w=-b/2;let v=g?a*2:l.members.length===0&&l.methods.length===0?-a:0;k&&(v=a*2);const $=m.rectangle(_-a,w-a-(g?a:l.members.length===0&&l.methods.length===0?-a/2:0),C+2*a,b+2*a+v,y),E=h.insert(()=>$,":first-child");E.attr("class","basic label-container outer-path");const W=E.node().getBBox(),P=h.select(".annotation-group").node().getBBox().height-(g?a/2:0)||0,O=h.select(".label-group").node().getBBox().height-(g?a/2:0)||0,Y=h.select(".members-group").node().getBBox().height-(g?a/2:0)||0,H=(P+O+w+a-(w-a-(g?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(h.selectAll(".text").each((B,M,F)=>{var pt,mt;const S=ht(F[M]),q=S.attr("transform");let ot=0;if(q){const $t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(q);$t&&(ot=parseFloat($t[2]))}let ut=ot+w+a-(g?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(S.attr("class").includes("methods-group")){const nt=Math.max(Y,o/2);k?ut=Math.max(H,P+O+nt+w+o*2+a)+o*2:ut=P+O+nt+w+o*4+a}l.members.length===0&&l.methods.length===0&&((pt=r.class)!=null&&pt.hideEmptyMembersBox)&&(l.annotations.length>0?ut=ot-o:ut=ot),n||(ut-=4);let dt=_;(S.attr("class").includes("label-group")||S.attr("class").includes("annotation-group"))&&(dt=-((mt=S.node())==null?void 0:mt.getBBox().width)/2||0,h.selectAll("text").each(function(nt,$t,xt){window.getComputedStyle(xt[$t]).textAnchor==="middle"&&(dt=0)})),S.attr("transform",`translate(${dt}, ${ut})`)}),l.members.length>0||l.methods.length>0||g){const B=P+O+w+a,M=m.line(W.x,B,W.x+W.width,B+.001,y);h.insert(()=>M).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(g||l.members.length>0||l.methods.length>0){const B=P+O+Y+w+o*2+a,M=m.line(W.x,k?Math.max(H,B):B,W.x+W.width,(k?Math.max(H,B):B)+.001,y);h.insert(()=>M).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&h.selectAll("path").attr("style",d),E.select(":nth-child(2)").attr("style",d),h.selectAll(".divider").select("path").attr("style",d),t.labelStyle?h.selectAll("span").attr("style",t.labelStyle):h.selectAll("span").attr("style",d),!n){const B=RegExp(/color\s*:\s*([^;]*)/),M=B.exec(d);if(M){const F=M[0].replace("color","fill");h.selectAll("tspan").attr("style",F)}else if(u){const F=B.exec(u);if(F){const S=F[0].replace("color","fill");h.selectAll("tspan").attr("style",S)}}}return K(t,E),t.intersect=function(B){return j.rect(t,B)},h}f(mg,"classBox");async function yg(e,t){var W,P;const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t,a=t,o=20,n=20,l="verifyMethod"in t,h=tt(t),{themeVariables:c}=yt(),{borderColorArray:u,requirementEdgeLabelBackground:p}=c,d=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let g;l?g=await Ae(d,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):g=await Ae(d,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let m=g;const y=await Ae(d,s.name,m,t.labelStyle+"; font-weight: bold;");if(m+=y+n,l){const O=await Ae(d,`${s.requirementId?`ID: ${s.requirementId}`:""}`,m,t.labelStyle);m+=O;const Y=await Ae(d,`${s.text?`Text: ${s.text}`:""}`,m,t.labelStyle);m+=Y;const H=await Ae(d,`${s.risk?`Risk: ${s.risk}`:""}`,m,t.labelStyle);m+=H,await Ae(d,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,m,t.labelStyle)}else{const O=await Ae(d,`${a.type?`Type: ${a.type}`:""}`,m,t.labelStyle);m+=O,await Ae(d,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,m,t.labelStyle)}const C=(((W=d.node())==null?void 0:W.getBBox().width)??200)+o,b=(((P=d.node())==null?void 0:P.getBBox().height)??200)+o,k=-C/2,_=-b/2,w=X.svg(d),v=V(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const $=w.rectangle(k,_,C,b,v),E=d.insert(()=>$,":first-child");if(E.attr("class","basic label-container outer-path").attr("style",i),u!=null&&u.length){const O=t.colorIndex??0;d.attr("data-color-id",`color-${O%u.length}`)}if(d.selectAll(".label").each((O,Y,H)=>{const I=ht(H[Y]),A=I.attr("transform");let B=0,M=0;if(A){const ot=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(A);ot&&(B=parseFloat(ot[1]),M=parseFloat(ot[2]))}const F=M-b/2;let S=k+o/2;(Y===0||Y===1)&&(S=B),I.attr("transform",`translate(${S}, ${F+o})`)}),m>g+y+n){const O=_+g+y+n;let Y;if(t.look==="neo"){const A=[[k,O],[k+C,O],[k+C,O+.001],[k,O+.001]];Y=w.polygon(A,v)}else Y=w.line(k,O,k+C,O,v);d.insert(()=>Y).attr("class","divider")}return K(t,E),t.intersect=function(O){return j.rect(t,O)},i&&t.look!=="handDrawn"&&(p||u!=null&&u.length)&&d.selectAll("path").attr("style",i),d}f(yg,"requirementBox");async function Ae(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),a=yt(),o=a.htmlLabels??!0,n=await je(s,fn(Tr(t)),{width:Ue(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let l;if(o){const h=n.children[0],c=ht(n);l=h.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height)}else{const h=n.children[0];for(const c of h.children)i&&c.setAttribute("style",i);l=n.getBBox(),l.height+=6}return s.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}f(Ae,"addText");var uS=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 Cg(e,t,{config:r}){var Y,H;const{labelStyles:i,nodeStyles:s}=Z(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:h}=await et(e,t,tt(t)),c=t.padding||10;let u="",p;"ticket"in t&&t.ticket&&((Y=r==null?void 0:r.kanban)!=null&&Y.ticketBaseUrl)&&(u=(H=r==null?void 0:r.kanban)==null?void 0:H.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 no(p,"ticket"in t&&t.ticket||"",d):{label:g,bbox:m}=await no(n,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:C}=await no(n,"assigned"in t&&t.assigned||"",d);t.width=o;const b=10,k=(t==null?void 0:t.width)||0,_=Math.max(m.height,C.height)/2,w=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+_,v=-k/2,$=-w/2;h.attr("transform","translate("+(c-k/2)+", "+(-_-l.height/2)+")"),g.attr("transform","translate("+(c-k/2)+", "+(-_+l.height/2)+")"),y.attr("transform","translate("+(c+k/2-C.width-2*a)+", "+(-_+l.height/2)+")");let E;const{rx:W,ry:P}=t,{cssStyles:O}=t;if(t.look==="handDrawn"){const I=X.svg(n),A=V(t,{}),B=W||P?I.path(sr(v,$,k,w,W||0),A):I.rectangle(v,$,k,w,A);E=n.insert(()=>B,":first-child"),E.attr("class","basic label-container").attr("style",O||null)}else{E=n.insert("rect",":first-child"),E.attr("class","basic label-container __APA__").attr("style",s).attr("rx",W??5).attr("ry",P??5).attr("x",v).attr("y",$).attr("width",k).attr("height",w);const I="priority"in t&&t.priority;if(I){const A=n.append("line"),B=v+2,M=$+Math.floor((W??0)/2),F=$+w-Math.floor((W??0)/2);A.attr("x1",B).attr("y1",M).attr("x2",B).attr("y2",F).attr("stroke-width","4").attr("stroke",uS(I))}}return K(t,E),t.height=w,t.intersect=function(I){return j.rect(t,I)},n}f(Cg,"kanbanItem");async function xg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await et(e,t,tt(t)),l=a.width+10*o,h=a.height+8*o,c=.15*l,{cssStyles:u}=t,p=a.width+20,d=a.height+20,g=Math.max(l,p),m=Math.max(h,d);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let y;const C=`M0 0
239
+ M${d},${g-Lt} L${d},${g+p}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=y.path(k,C),w=o.insert(()=>_,":first-child");return w.attr("transform",`translate(${Lt/2}, ${Lt/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)+Lt/2-(n.x-(n.left??0))}, ${-(n.height/2)+Lt/2-(n.y-(n.top??0))})`),K(t,w),t.intersect=function(v){return j.polygon(t,b,v)},o}f(fg,"windowPane");var Qh=new Set(["redux-color","redux-dark-color"]),hS=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function al(e,t){var nt,$t,xt,te;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=vt(),{rowEven:a,rowOdd:o,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:U}=vt(),{background:st}=U,kt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${st}`]};await al(e,kt)}const h=vt();t.useHtmlLabels=h.htmlLabels;let c=((nt=h.er)==null?void 0:nt.diagramPadding)??10,u=(($t=h.er)==null?void 0:$t.entityPadding)??6;const{cssStyles:p}=t,{labelStyles:d,nodeStyles:g}=Z(t);if(r.attributes.length===0&&t.label){const U={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5};Ue(t.label,h)+U.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const st=await fi(e,t,U);if(i!=null&&Qh.has(i)){const kt=r.colorIndex??0;st.attr("data-color-id",`color-${kt%l.length}`)}if(!Ge(h.htmlLabels)){const kt=st.select("text"),wt=(xt=kt.node())==null?void 0:xt.getBBox();kt.attr("transform",`translate(${-wt.width/2}, 0)`)}return st}h.htmlLabels||(c*=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),C=await qr(y,t.label??"",h,0,0,["name"],d);C.height+=u;let b=0;const k=[],_=[];let w=0,v=0,$=0,E=0,W=!0,P=!0;for(const U of r.attributes){const st=await qr(y,U.type,h,0,b,["attribute-type"],d);w=Math.max(w,st.width+c);const kt=await qr(y,U.name,h,0,b,["attribute-name"],d);v=Math.max(v,kt.width+c);const wt=await qr(y,U.keys.join(),h,0,b,["attribute-keys"],d);$=Math.max($,wt.width+c);const we=await qr(y,U.comment,h,0,b,["attribute-comment"],d);E=Math.max(E,we.width+c);const le=Math.max(st.height,kt.height,wt.height,we.height)+u;_.push({yOffset:b,rowHeight:le}),b+=le}let O=4;$<=c&&(W=!1,$=0,O--),E<=c&&(P=!1,E=0,O--);const Y=y.node().getBBox();if(C.width+c*2-(w+v+$+E)>0){const U=C.width+c*2-(w+v+$+E);w+=U/O,v+=U/O,$>0&&($+=U/O),E>0&&(E+=U/O)}const H=w+v+$+E,I=X.svg(y),A=V(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let B=0;_.length>0&&(B=_.reduce((U,st)=>U+((st==null?void 0:st.rowHeight)??0),0));const M=Math.max(Y.width+c*2,(t==null?void 0:t.width)||0,H),F=Math.max((B??0)+C.height,(t==null?void 0:t.height)||0),S=-M/2,q=-F/2;if(y.selectAll("g:not(:first-child)").each((U,st,kt)=>{const wt=ht(kt[st]),we=wt.attr("transform");let le=0,gi=0;if(we){const he=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(we);he&&(le=parseFloat(he[1]),gi=parseFloat(he[2]),wt.attr("class").includes("attribute-name")?le+=w:wt.attr("class").includes("attribute-keys")?le+=w+v:wt.attr("class").includes("attribute-comment")&&(le+=w+v+$))}wt.attr("transform",`translate(${S+c/2+le}, ${gi+q+C.height+u/2})`)}),y.select(".name").attr("transform","translate("+-C.width/2+", "+(q+u/2)+")"),i!=null&&Qh.has(i)){const U=r.colorIndex??0;y.attr("data-color-id",`color-${U%l.length}`)}const ot=I.rectangle(S,q,M,F,A),ut=y.insert(()=>ot,":first-child").attr("class","outer-path").attr("style",p.join(""));k.push(0);for(const[U,st]of _.entries()){const wt=(U+1)%2===0&&st.yOffset!==0,we=I.rectangle(S,C.height+q+(st==null?void 0:st.yOffset),M,st==null?void 0:st.rowHeight,{...A,fill:wt?a:o,stroke:n});y.insert(()=>we,"g.label").attr("style",p.join("")).attr("class",`row-rect-${wt?"even":"odd"}`)}const dt=1e-4;let pt=Wr(S,C.height+q,M+S,C.height+q,dt),mt=I.polygon(pt.map(U=>[U.x,U.y]),A);if(y.insert(()=>mt).attr("class","divider"),pt=Wr(w+S,C.height+q,w+S,F+q,dt),mt=I.polygon(pt.map(U=>[U.x,U.y]),A),y.insert(()=>mt).attr("class","divider"),W){const U=w+v+S;pt=Wr(U,C.height+q,U,F+q,dt),mt=I.polygon(pt.map(st=>[st.x,st.y]),A),y.insert(()=>mt).attr("class","divider")}if(P){const U=w+v+$+S;pt=Wr(U,C.height+q,U,F+q,dt),mt=I.polygon(pt.map(st=>[st.x,st.y]),A),y.insert(()=>mt).attr("class","divider")}for(const U of k){const st=C.height+q+U;pt=Wr(S,st,M+S,st,dt),mt=I.polygon(pt.map(kt=>[kt.x,kt.y]),A),y.insert(()=>mt).attr("class","divider")}if(K(t,ut),g&&t.look!=="handDrawn")if(i!=null&&hS.has(i))y.selectAll("path").attr("style",g);else{const U=g.split(";"),st=(te=U==null?void 0:U.filter(kt=>kt.includes("stroke")))==null?void 0:te.map(kt=>`${kt}`).join("; ");y.selectAll("path").attr("style",st??""),y.selectAll(".row-rect-even path").attr("style",g)}return t.intersect=function(U){return j.rect(t,U)},y}f(al,"erBox");async function qr(e,t,r,i=0,s=0,a=[],o=""){const n=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",o);t!==zl(t)&&(t=zl(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await je(n,t,{width:Ue(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let c=l.children[0];for(c.textContent=c.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");c.childNodes[0];)c=c.childNodes[0],c.textContent=c.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let h=l.getBBox();if(Ge(r.htmlLabels)){const c=l.children[0];c.style.textAlign="start";const u=ht(l);h=c.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)}return h}f(qr,"addText");function Wr(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}f(Wr,"lineToPolygon");async function gg(e,t,r,i,s=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",tt(t)).attr("id",t.domId||t.id);let n=null,l=null,h=null,c=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 Oi(n,{text:`«${b}»`},0),u=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Oi(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();p=g.height,h=o.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const k=await Oi(h,b,m,[b.parseClassifier()]);m+=k+a}d=h.node().getBBox().height,d<=0&&(d=s/2),c=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const k=await Oi(c,b,y,[b.parseClassifier()]);y+=k+a}let C=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})`),C=o.node().getBBox(),h.attr("transform",`translate(0, ${u+p+s*2})`),C=o.node().getBBox(),c.attr("transform",`translate(0, ${u+p+(d?d+s*4:s*2)})`),C=o.node().getBBox(),{shapeSvg:o,bbox:C}}f(gg,"textHelper");async function Oi(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=vt();let o="useHtmlLabels"in t?t.useHtmlLabels:Ge(a.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),Wi(n)&&(o=!0);const l=await je(s,fn(Tr(n)),{width:Ue(n,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let h,c=1;if(o){const u=l.children[0],p=ht(l);c=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(c+=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 C(){var b;if(m.style.display="flex",m.style.flexDirection="column",g){const k=((b=a.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,w=parseInt(k,10)*5+"px";m.style.minWidth=w,m.style.maxWidth=w}else m.style.width="100%";y(m)}f(C,"setupImage"),setTimeout(()=>{m.complete&&C()}),m.addEventListener("error",C),m.addEventListener("load",C)})))}h=u.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{i.includes("font-weight: bolder")&&ht(l).selectAll("tspan").attr("font-weight",""),c=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=""),h=l.getBBox()}return s.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}f(Oi,"addText");async function mg(e,t){var I,A;const r=yt(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,o=a,n=t.useHtmlLabels??Ge(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await gg(e,t,r,n,o),{labelStyles:u,nodeStyles:p}=Z(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=((I=l.styles)==null?void 0:I.join(";"))||p||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const g=l.members.length===0&&l.methods.length===0&&!((A=r.class)!=null&&A.hideEmptyMembersBox),m=X.svg(h),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=Math.max(t.width??0,c.width);let b=Math.max(t.height??0,c.height);const k=(t.height??0)>c.height;l.members.length===0&&l.methods.length===0?b+=o:l.members.length>0&&l.methods.length===0&&(b+=o*2);const _=-C/2,w=-b/2;let v=g?a*2:l.members.length===0&&l.methods.length===0?-a:0;k&&(v=a*2);const $=m.rectangle(_-a,w-a-(g?a:l.members.length===0&&l.methods.length===0?-a/2:0),C+2*a,b+2*a+v,y),E=h.insert(()=>$,":first-child");E.attr("class","basic label-container outer-path");const W=E.node().getBBox(),P=h.select(".annotation-group").node().getBBox().height-(g?a/2:0)||0,O=h.select(".label-group").node().getBBox().height-(g?a/2:0)||0,Y=h.select(".members-group").node().getBBox().height-(g?a/2:0)||0,H=(P+O+w+a-(w-a-(g?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(h.selectAll(".text").each((B,M,F)=>{var pt,mt;const S=ht(F[M]),q=S.attr("transform");let ot=0;if(q){const $t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(q);$t&&(ot=parseFloat($t[2]))}let ut=ot+w+a-(g?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(S.attr("class").includes("methods-group")){const nt=Math.max(Y,o/2);k?ut=Math.max(H,P+O+nt+w+o*2+a)+o*2:ut=P+O+nt+w+o*4+a}l.members.length===0&&l.methods.length===0&&((pt=r.class)!=null&&pt.hideEmptyMembersBox)&&(l.annotations.length>0?ut=ot-o:ut=ot),n||(ut-=4);let dt=_;(S.attr("class").includes("label-group")||S.attr("class").includes("annotation-group"))&&(dt=-((mt=S.node())==null?void 0:mt.getBBox().width)/2||0,h.selectAll("text").each(function(nt,$t,xt){window.getComputedStyle(xt[$t]).textAnchor==="middle"&&(dt=0)})),S.attr("transform",`translate(${dt}, ${ut})`)}),l.members.length>0||l.methods.length>0||g){const B=P+O+w+a,M=m.line(W.x,B,W.x+W.width,B+.001,y);h.insert(()=>M).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(g||l.members.length>0||l.methods.length>0){const B=P+O+Y+w+o*2+a,M=m.line(W.x,k?Math.max(H,B):B,W.x+W.width,(k?Math.max(H,B):B)+.001,y);h.insert(()=>M).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&h.selectAll("path").attr("style",d),E.select(":nth-child(2)").attr("style",d),h.selectAll(".divider").select("path").attr("style",d),t.labelStyle?h.selectAll("span").attr("style",t.labelStyle):h.selectAll("span").attr("style",d),!n){const B=RegExp(/color\s*:\s*([^;]*)/),M=B.exec(d);if(M){const F=M[0].replace("color","fill");h.selectAll("tspan").attr("style",F)}else if(u){const F=B.exec(u);if(F){const S=F[0].replace("color","fill");h.selectAll("tspan").attr("style",S)}}}return K(t,E),t.intersect=function(B){return j.rect(t,B)},h}f(mg,"classBox");async function yg(e,t){var W,P;const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const s=t,a=t,o=20,n=20,l="verifyMethod"in t,h=tt(t),{themeVariables:c}=yt(),{borderColorArray:u,requirementEdgeLabelBackground:p}=c,d=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let g;l?g=await Ae(d,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):g=await Ae(d,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let m=g;const y=await Ae(d,s.name,m,t.labelStyle+"; font-weight: bold;");if(m+=y+n,l){const O=await Ae(d,`${s.requirementId?`ID: ${s.requirementId}`:""}`,m,t.labelStyle);m+=O;const Y=await Ae(d,`${s.text?`Text: ${s.text}`:""}`,m,t.labelStyle);m+=Y;const H=await Ae(d,`${s.risk?`Risk: ${s.risk}`:""}`,m,t.labelStyle);m+=H,await Ae(d,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,m,t.labelStyle)}else{const O=await Ae(d,`${a.type?`Type: ${a.type}`:""}`,m,t.labelStyle);m+=O,await Ae(d,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,m,t.labelStyle)}const C=(((W=d.node())==null?void 0:W.getBBox().width)??200)+o,b=(((P=d.node())==null?void 0:P.getBBox().height)??200)+o,k=-C/2,_=-b/2,w=X.svg(d),v=V(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const $=w.rectangle(k,_,C,b,v),E=d.insert(()=>$,":first-child");if(E.attr("class","basic label-container outer-path").attr("style",i),u!=null&&u.length){const O=t.colorIndex??0;d.attr("data-color-id",`color-${O%u.length}`)}if(d.selectAll(".label").each((O,Y,H)=>{const I=ht(H[Y]),A=I.attr("transform");let B=0,M=0;if(A){const ot=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(A);ot&&(B=parseFloat(ot[1]),M=parseFloat(ot[2]))}const F=M-b/2;let S=k+o/2;(Y===0||Y===1)&&(S=B),I.attr("transform",`translate(${S}, ${F+o})`)}),m>g+y+n){const O=_+g+y+n;let Y;if(t.look==="neo"){const A=[[k,O],[k+C,O],[k+C,O+.001],[k,O+.001]];Y=w.polygon(A,v)}else Y=w.line(k,O,k+C,O,v);d.insert(()=>Y).attr("class","divider")}return K(t,E),t.intersect=function(O){return j.rect(t,O)},i&&t.look!=="handDrawn"&&(p||u!=null&&u.length)&&d.selectAll("path").attr("style",i),d}f(yg,"requirementBox");async function Ae(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),a=yt(),o=a.htmlLabels??!0,n=await je(s,fn(Tr(t)),{width:Ue(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let l;if(o){const h=n.children[0],c=ht(n);l=h.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height)}else{const h=n.children[0];for(const c of h.children)i&&c.setAttribute("style",i);l=n.getBBox(),l.height+=6}return s.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}f(Ae,"addText");var cS=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 Cg(e,t,{config:r}){var Y,H;const{labelStyles:i,nodeStyles:s}=Z(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:h}=await et(e,t,tt(t)),c=t.padding||10;let u="",p;"ticket"in t&&t.ticket&&((Y=r==null?void 0:r.kanban)!=null&&Y.ticketBaseUrl)&&(u=(H=r==null?void 0:r.kanban)==null?void 0:H.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 no(p,"ticket"in t&&t.ticket||"",d):{label:g,bbox:m}=await no(n,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:C}=await no(n,"assigned"in t&&t.assigned||"",d);t.width=o;const b=10,k=(t==null?void 0:t.width)||0,_=Math.max(m.height,C.height)/2,w=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+_,v=-k/2,$=-w/2;h.attr("transform","translate("+(c-k/2)+", "+(-_-l.height/2)+")"),g.attr("transform","translate("+(c-k/2)+", "+(-_+l.height/2)+")"),y.attr("transform","translate("+(c+k/2-C.width-2*a)+", "+(-_+l.height/2)+")");let E;const{rx:W,ry:P}=t,{cssStyles:O}=t;if(t.look==="handDrawn"){const I=X.svg(n),A=V(t,{}),B=W||P?I.path(sr(v,$,k,w,W||0),A):I.rectangle(v,$,k,w,A);E=n.insert(()=>B,":first-child"),E.attr("class","basic label-container").attr("style",O||null)}else{E=n.insert("rect",":first-child"),E.attr("class","basic label-container __APA__").attr("style",s).attr("rx",W??5).attr("ry",P??5).attr("x",v).attr("y",$).attr("width",k).attr("height",w);const I="priority"in t&&t.priority;if(I){const A=n.append("line"),B=v+2,M=$+Math.floor((W??0)/2),F=$+w-Math.floor((W??0)/2);A.attr("x1",B).attr("y1",M).attr("x2",B).attr("y2",F).attr("stroke-width","4").attr("stroke",cS(I))}}return K(t,E),t.height=w,t.intersect=function(I){return j.rect(t,I)},n}f(Cg,"kanbanItem");async function xg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await et(e,t,tt(t)),l=a.width+10*o,h=a.height+8*o,c=.15*l,{cssStyles:u}=t,p=a.width+20,d=a.height+20,g=Math.max(l,p),m=Math.max(h,d);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let y;const C=`M0 0
240
240
  a${c},${c} 1 0,0 ${g*.25},${-1*m*.1}
241
241
  a${c},${c} 1 0,0 ${g*.25},0
242
242
  a${c},${c} 1 0,0 ${g*.25},0
@@ -288,22 +288,22 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
288
288
  h${-(l-2*c)}
289
289
  q${-c},0 ${-c},${-c}
290
290
  Z
291
- `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const p=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",h/2).attr("x2",l/2).attr("y2",h/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>n.node()),K(t,p),t.calcIntersect=function(d,g){return j.rect(d,g)},t.intersect=function(d){return j.rect(t,d)},s}f(kg,"defaultMindmapNode");async function Tg(e,t){const r={padding:t.padding??0};return sl(e,t,r)}f(Tg,"mindmapCircle");var dS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Jf},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Zf},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:tg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:sg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Tf},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Sf},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:sl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:xg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:bg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:jf},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Af},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:qf},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Nf},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:hg},{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:Rf},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:_f},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:ng},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:ff},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Kf},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:ig},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:rg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Lf},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Ef},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Cf},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:xf},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:bf},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Wf},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:dg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Ff},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:lg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:zf},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:kf},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:wf},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ug},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:fg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Bf},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:cg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:vf},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Qf},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Uf},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Yf},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:pf},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:yf},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:og},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:ag},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:pg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Xf},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Hf}],pS=f(()=>{const t=[...Object.entries({state:eg,choice:gf,note:Gf,rectWithTitle:Vf,labelRect:Pf,iconSquare:If,iconCircle:$f,icon:Mf,iconRounded:Of,imageSquare:Df,anchor:uf,kanbanItem:Cg,mindmapCircle:Tg,defaultMindmapNode:kg,classBox:mg,erBox:al,requirementBox:yg}),...dS.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Sg=pS();function fS(e){return e in Sg}f(fS,"isValidShape");var Aa=new Map;async function wg(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?Sg[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",Nt(t.look)),t.tooltip&&s.attr("title",t.tooltip),Aa.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}f(wg,"insertNode");var wv=f((e,t)=>{Aa.set(t.id,e)},"setNodeElem"),_v=f(()=>{Aa.clear()},"clear"),Bv=f(e=>{const t=Aa.get(e.id);z.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"),gS=f((e,t,r,i,s,a=!1,o)=>{t.arrowTypeStart&&Jh(e,"start",t.arrowTypeStart,r,i,s,a,o),t.arrowTypeEnd&&Jh(e,"end",t.arrowTypeEnd,r,i,s,a,o)},"addEdgeMarkers"),mS={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}},yS=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Jh=f((e,t,r,i,s,a,o=!1,n)=>{var g;const l=mS[r],h=l&&yS.includes(l.type);if(!l){z.warn(`Unknown arrow type: ${r}`);return}const c=l.type,d=`${s}_${a}-${c}${t==="start"?"Start":"End"}${o&&h?"-margin":""}`;if(n&&n.trim()!==""){const m=n.replace(/[^\dA-Za-z]/g,"_"),y=`${d}_${m}`;if(!document.getElementById(y)){const C=document.getElementById(d);if(C){const b=C.cloneNode(!0);b.id=y,b.querySelectorAll("path, circle, line").forEach(_=>{_.setAttribute("stroke",n),l.fill&&_.setAttribute("fill",n)}),(g=C.parentNode)==null||g.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),CS=f(e=>{var t,r;return typeof e=="string"?e:(r=(t=yt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),pa=new Map,zt=new Map,vv=f(()=>{pa.clear(),zt.clear()},"clear"),Bi=f(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),xS=f(async(e,t)=>{const r=yt();let i=Jt(r);const{labelStyles:s}=Z(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",h=await je(e,t.label,{style:Bi(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(h),z.info("abc82",t,t.labelType);let c=h.getBBox(),u=c;if(i){const d=h.children[0],g=ht(h);c=d.getBoundingClientRect(),u=c,g.attr("width",c.width),g.attr("height",c.height)}else{const d=ht(h).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}o.attr("transform",ki(u,i)),pa.set(t.id,a),t.width=c.width,t.height=c.height;let p;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await Ke(g,t.startLabelLeft,Bi(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){const C=m.children[0],b=ht(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",ki(y,i)),zt.get(t.id)||zt.set(t.id,{}),zt.get(t.id).startLeft=d,Ii(p,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await Ke(g,t.startLabelRight,Bi(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){const C=m.children[0],b=ht(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",ki(y,i)),zt.get(t.id)||zt.set(t.id,{}),zt.get(t.id).startRight=d,Ii(p,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await Ke(d,t.endLabelLeft,Bi(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){const C=m.children[0],b=ht(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",ki(y,i)),zt.get(t.id)||zt.set(t.id,{}),zt.get(t.id).endLeft=d,Ii(p,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await Ke(d,t.endLabelRight,Bi(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){const C=m.children[0],b=ht(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",ki(y,i)),zt.get(t.id)||zt.set(t.id,{}),zt.get(t.id).endRight=d,Ii(p,t.endLabelRight)}return h},"insertEdgeLabel");function Ii(e,t){Jt(yt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}f(Ii,"setTerminalWidth");var bS=f((e,t)=>{z.debug("Moving label abc88 ",e.id,e.label,pa.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=yt(),{subGraphTitleTotalMargin:s}=Un(i);if(e.label){const a=pa.get(e.id);let o=e.x,n=e.y;if(r){const l=xe.calcLabelPosition(r);z.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e.startLabelLeft){const a=zt.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=zt.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=zt.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=zt.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),kS=f((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return s>=o||a>=n},"outsideNode"),TS=f((e,t,r)=>{z.debug(`intersection calc abc89:
291
+ `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const p=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",h/2).attr("x2",l/2).attr("y2",h/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>n.node()),K(t,p),t.calcIntersect=function(d,g){return j.rect(d,g)},t.intersect=function(d){return j.rect(t,d)},s}f(kg,"defaultMindmapNode");async function Tg(e,t){const r={padding:t.padding??0};return sl(e,t,r)}f(Tg,"mindmapCircle");var uS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Jf},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Zf},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:tg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:sg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Tf},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Sf},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:sl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:xg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:bg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:jf},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Af},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:qf},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Nf},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:hg},{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:Rf},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:_f},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:ng},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:ff},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Kf},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:ig},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:rg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Lf},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Ef},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Cf},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:xf},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:bf},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Wf},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:dg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Ff},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:lg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:zf},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:kf},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:wf},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ug},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:fg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Bf},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:cg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:vf},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Qf},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Uf},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Yf},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:pf},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:yf},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:og},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:ag},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:pg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Xf},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Hf}],dS=f(()=>{const t=[...Object.entries({state:eg,choice:gf,note:Gf,rectWithTitle:Vf,labelRect:Pf,iconSquare:If,iconCircle:$f,icon:Mf,iconRounded:Of,imageSquare:Df,anchor:uf,kanbanItem:Cg,mindmapCircle:Tg,defaultMindmapNode:kg,classBox:mg,erBox:al,requirementBox:yg}),...uS.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Sg=dS();function pS(e){return e in Sg}f(pS,"isValidShape");var Aa=new Map;async function wg(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?Sg[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",Nt(t.look)),t.tooltip&&s.attr("title",t.tooltip),Aa.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}f(wg,"insertNode");var Sv=f((e,t)=>{Aa.set(t.id,e)},"setNodeElem"),wv=f(()=>{Aa.clear()},"clear"),_v=f(e=>{const t=Aa.get(e.id);z.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"),fS=f((e,t,r,i,s,a=!1,o)=>{t.arrowTypeStart&&Jh(e,"start",t.arrowTypeStart,r,i,s,a,o),t.arrowTypeEnd&&Jh(e,"end",t.arrowTypeEnd,r,i,s,a,o)},"addEdgeMarkers"),gS={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}},mS=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Jh=f((e,t,r,i,s,a,o=!1,n)=>{var g;const l=gS[r],h=l&&mS.includes(l.type);if(!l){z.warn(`Unknown arrow type: ${r}`);return}const c=l.type,d=`${s}_${a}-${c}${t==="start"?"Start":"End"}${o&&h?"-margin":""}`;if(n&&n.trim()!==""){const m=n.replace(/[^\dA-Za-z]/g,"_"),y=`${d}_${m}`;if(!document.getElementById(y)){const C=document.getElementById(d);if(C){const b=C.cloneNode(!0);b.id=y,b.querySelectorAll("path, circle, line").forEach(_=>{_.setAttribute("stroke",n),l.fill&&_.setAttribute("fill",n)}),(g=C.parentNode)==null||g.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),yS=f(e=>{var t,r;return typeof e=="string"?e:(r=(t=yt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),pa=new Map,zt=new Map,Bv=f(()=>{pa.clear(),zt.clear()},"clear"),Bi=f(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),CS=f(async(e,t)=>{const r=yt();let i=Jt(r);const{labelStyles:s}=Z(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",h=await je(e,t.label,{style:Bi(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(h),z.info("abc82",t,t.labelType);let c=h.getBBox(),u=c;if(i){const d=h.children[0],g=ht(h);c=d.getBoundingClientRect(),u=c,g.attr("width",c.width),g.attr("height",c.height)}else{const d=ht(h).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}o.attr("transform",ki(u,i)),pa.set(t.id,a),t.width=c.width,t.height=c.height;let p;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await Ke(g,t.startLabelLeft,Bi(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){const C=m.children[0],b=ht(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",ki(y,i)),zt.get(t.id)||zt.set(t.id,{}),zt.get(t.id).startLeft=d,Ii(p,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await Ke(g,t.startLabelRight,Bi(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){const C=m.children[0],b=ht(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",ki(y,i)),zt.get(t.id)||zt.set(t.id,{}),zt.get(t.id).startRight=d,Ii(p,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await Ke(d,t.endLabelLeft,Bi(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){const C=m.children[0],b=ht(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",ki(y,i)),zt.get(t.id)||zt.set(t.id,{}),zt.get(t.id).endLeft=d,Ii(p,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await Ke(d,t.endLabelRight,Bi(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){const C=m.children[0],b=ht(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",ki(y,i)),zt.get(t.id)||zt.set(t.id,{}),zt.get(t.id).endRight=d,Ii(p,t.endLabelRight)}return h},"insertEdgeLabel");function Ii(e,t){Jt(yt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}f(Ii,"setTerminalWidth");var xS=f((e,t)=>{z.debug("Moving label abc88 ",e.id,e.label,pa.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=yt(),{subGraphTitleTotalMargin:s}=Un(i);if(e.label){const a=pa.get(e.id);let o=e.x,n=e.y;if(r){const l=xe.calcLabelPosition(r);z.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e.startLabelLeft){const a=zt.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=zt.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=zt.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=zt.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),bS=f((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return s>=o||a>=n},"outsideNode"),kS=f((e,t,r)=>{z.debug(`intersection calc abc89:
292
292
  outsidePoint: ${JSON.stringify(t)}
293
293
  insidePoint : ${JSON.stringify(r)}
294
- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-a:o+a;const l=e.height/2,h=Math.abs(t.y-r.y),c=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-s:s-l-t.y;n=c*u/h;const p={x:r.x<t.x?r.x+n:r.x-c+n,y:r.y<t.y?r.y+h-u:r.y-h+u};return n===0&&(p.x=t.x,p.y=t.y),c===0&&(p.x=t.x),h===0&&(p.y=t.y),z.debug(`abc89 top/bottom calc, Q ${h}, q ${u}, R ${c}, r ${n}`,p),p}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let u=h*n/c,p=r.x<t.x?r.x+c-n:r.x-c+n,d=r.y<t.y?r.y+u:r.y-u;return z.debug(`sides calc abc89, Q ${h}, q ${u}, R ${c}, r ${n}`,{_x:p,_y:d}),n===0&&(p=t.x,d=t.y),c===0&&(p=t.x),h===0&&(d=t.y),{x:p,y:d}}},"intersection"),tc=f((e,t)=>{z.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(z.info("abc88 checking point",a,t),!kS(t,a)&&!s){const o=TS(t,i,a);z.debug("abc88 inside",a,i,o),z.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)?z.warn("abc88 no intersect",o,r):r.push(o),s=!0}else z.warn("abc88 outside",a,i),i=a,s||r.push(a)}),z.debug("returning points",r),r},"cutPathAtIntersect");function _g(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],o=e[i+1];(s.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===o.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}f(_g,"extractCornerPoints");var ec=f(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),o=r/a;return{x:t.x-o*i,y:t.y-o*s}},"findAdjacentPoint"),SS=f(function(e){const{cornerPointPositions:t}=_g(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],o=e[i],n=ec(s,o,5),l=ec(a,o,5),h=l.x-n.x,c=l.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let p={x:o.x,y:o.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){z.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const d=5;o.x===n.x?p={x:h<0?n.x-d+u:n.x+d-u,y:c<0?n.y-u:n.y+u}:p={x:h<0?n.x-u:n.x+u,y:c<0?n.y-d+u:n.y+d-u}}else z.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(p,l)}else r.push(e[i]);return r},"fixCorners"),wS=f((e,t,r)=>{const i=e-t-r,s=2,a=2,o=s+a,n=Math.floor(i/o),l=Array(n).fill(`${s} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),_S=f(function(e,t,r,i,s,a,o,n=!1){var M;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=yt();let h=t.points,c=!1;const u=s;var p=a;const d=[];for(const F in t.cssCompiledStyles)Tp(F)||d.push(t.cssCompiledStyles[F]);z.debug("UIO intersect check",t.points,p.x,u.x),p.intersect&&u.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(u.intersect(h[0])),z.debug("Last point UIO",t.start,"-->",t.end,h[h.length-1],p,p.intersect(h[h.length-1])),h.push(p.intersect(h[h.length-1])));const g=btoa(JSON.stringify(h));t.toCluster&&(z.info("to cluster abc88",r.get(t.toCluster)),h=tc(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(z.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=tc(h.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let m=h.filter(F=>!Number.isNaN(F.y));const y=CS(t.curve);y!=="rounded"&&(m=SS(m));let C=Ni;switch(y){case"linear":C=Ni;break;case"basis":C=Lo;break;case"cardinal":C=cu;break;case"bumpX":C=au;break;case"bumpY":C=ou;break;case"catmullRom":C=du;break;case"monotoneX":C=Cu;break;case"monotoneY":C=xu;break;case"natural":C=ku;break;case"step":C=Tu;break;case"stepAfter":C=wu;break;case"stepBefore":C=Su;break;case"rounded":C=Ni;break;default:C=Lo}const{x:b,y:k}=C1(t),_=ek().x(b).y(k).curve(C);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,$=y==="rounded"?Bg(vg(m,t),5):_(m);const E=Array.isArray(t.style)?t.style:[t.style];let W=E.find(F=>F==null?void 0:F.startsWith("stroke:")),P="";t.animate&&(P="edge-animation-fast"),t.animation&&(P="edge-animation-"+t.animation);let O=!1;if(t.look==="handDrawn"){const F=X.svg(e);Object.assign([],m);const S=F.path($,{roughness:.3,seed:l});w+=" transition",v=ht(S).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(P?" "+P:"")).attr("style",E?E.reduce((ot,ut)=>ot+";"+ut,""):"");let q=v.attr("d");v.attr("d",q),e.node().appendChild(v.node())}else{const F=d.join(";"),S=E?E.reduce((mt,nt)=>mt+nt+";",""):"",q=(F?F+";"+S+";":S)+";"+(E?E.reduce((mt,nt)=>mt+";"+nt,""):"");v=e.append("path").attr("d",$).attr("id",`${o}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(P?" "+P:"")).attr("style",q),W=(M=q.match(/stroke:([^;]+)/))==null?void 0:M[1],O=t.animate===!0||!!t.animation||F.includes("animation");const ot=v.node(),ut=typeof ot.getTotalLength=="function"?ot.getTotalLength():0,dt=gh[t.arrowTypeStart]||0,pt=gh[t.arrowTypeEnd]||0;if(t.look==="neo"&&!O){const nt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?wS(ut,dt,pt):`0 ${dt} ${ut-dt-pt} ${pt}`}; stroke-dashoffset: 0;`;v.attr("style",nt+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",Nt(t.look)),t.showPoints&&m.forEach(F=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",F.x).attr("cy",F.y)});let Y="";(yt().flowchart.arrowMarkerAbsolute||yt().state.arrowMarkerAbsolute)&&(Y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,Y=Y.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),z.info("arrowTypeStart",t.arrowTypeStart),z.info("arrowTypeEnd",t.arrowTypeEnd);const H=!O&&(t==null?void 0:t.look)==="neo";gS(v,t,Y,o,i,H,W);const I=Math.floor(h.length/2),A=h[I];xe.isLabelCoordinateInPath(A,v.attr("d"))||(c=!0);let B={};return c&&(B.updatedPath=h),B.originalPath=t.points,B},"insertEdge");function Bg(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const o=e[a],n=e[a-1],l=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const h=o.x-n.x,c=o.y-n.y,u=l.x-o.x,p=l.y-o.y,d=Math.hypot(h,c),g=Math.hypot(u,p);if(d<s||g<s){r+=`L${o.x},${o.y}`;continue}const m=h/d,y=c/d,C=u/g,b=p/g,k=m*C+y*b,_=Math.max(-1,Math.min(1,k)),w=Math.acos(_);if(w<s||Math.abs(Math.PI-w)<s){r+=`L${o.x},${o.y}`;continue}const v=Math.min(t/Math.sin(w/2),d/2,g/2),$=o.x-m*v,E=o.y-y*v,W=o.x+C*v,P=o.y+b*v;r+=`L${$},${E}`,r+=`Q${o.x},${o.y} ${W},${P}`}}return r}f(Bg,"generateRoundedPath");function an(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(an,"calculateDeltaAndAngle");function vg(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Ut[t.arrowTypeStart]){const s=Ut[t.arrowTypeStart],a=e[0],o=e[1],{angle:n}=an(a,o),l=s*Math.cos(n),h=s*Math.sin(n);r[0].x=a.x+l,r[0].y=a.y+h}const i=e.length;if(i>=2&&Ut[t.arrowTypeEnd]){const s=Ut[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:n}=an(o,a),l=s*Math.cos(n),h=s*Math.sin(n);r[i-1].x=a.x-l,r[i-1].y=a.y-h}return r}f(vg,"applyMarkerOffsetsToPoints");var BS=f((e,t,r,i)=>{t.forEach(s=>{VS[s](e,r,i)})},"insertMarkers"),vS=f((e,t,r)=>{z.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",20).attr("markerHeight",28).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"),LS=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"),FS=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"),AS=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"),ES=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"),MS=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"),$S=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"),OS=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"),IS=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"),DS=f((e,t,r)=>{const i=vt(),{themeVariables:s}=i,{transitionColor:a}=s;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",`${a}`)},"barbNeo"),RS=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"),PS=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 s=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");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),NS=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"),qS=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 s=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");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),WS=f((e,t,r)=>{const i=vt(),{themeVariables:s}=i,{strokeWidth:a}=s;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",`${a}`),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",`${a}`)},"only_one_neo"),zS=f((e,t,r)=>{const i=vt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,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",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);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",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),HS=f((e,t,r)=>{const i=vt(),{themeVariables:s}=i,{strokeWidth:a}=s;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",`${a}`),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",`${a}`)},"one_or_more_neo"),YS=f((e,t,r)=>{const i=vt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,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",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);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",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),US=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
294
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-a:o+a;const l=e.height/2,h=Math.abs(t.y-r.y),c=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-s:s-l-t.y;n=c*u/h;const p={x:r.x<t.x?r.x+n:r.x-c+n,y:r.y<t.y?r.y+h-u:r.y-h+u};return n===0&&(p.x=t.x,p.y=t.y),c===0&&(p.x=t.x),h===0&&(p.y=t.y),z.debug(`abc89 top/bottom calc, Q ${h}, q ${u}, R ${c}, r ${n}`,p),p}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let u=h*n/c,p=r.x<t.x?r.x+c-n:r.x-c+n,d=r.y<t.y?r.y+u:r.y-u;return z.debug(`sides calc abc89, Q ${h}, q ${u}, R ${c}, r ${n}`,{_x:p,_y:d}),n===0&&(p=t.x,d=t.y),c===0&&(p=t.x),h===0&&(d=t.y),{x:p,y:d}}},"intersection"),tc=f((e,t)=>{z.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(z.info("abc88 checking point",a,t),!bS(t,a)&&!s){const o=kS(t,i,a);z.debug("abc88 inside",a,i,o),z.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)?z.warn("abc88 no intersect",o,r):r.push(o),s=!0}else z.warn("abc88 outside",a,i),i=a,s||r.push(a)}),z.debug("returning points",r),r},"cutPathAtIntersect");function _g(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],o=e[i+1];(s.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===o.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}f(_g,"extractCornerPoints");var ec=f(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),o=r/a;return{x:t.x-o*i,y:t.y-o*s}},"findAdjacentPoint"),TS=f(function(e){const{cornerPointPositions:t}=_g(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],o=e[i],n=ec(s,o,5),l=ec(a,o,5),h=l.x-n.x,c=l.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let p={x:o.x,y:o.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){z.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const d=5;o.x===n.x?p={x:h<0?n.x-d+u:n.x+d-u,y:c<0?n.y-u:n.y+u}:p={x:h<0?n.x-u:n.x+u,y:c<0?n.y-d+u:n.y+d-u}}else z.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(p,l)}else r.push(e[i]);return r},"fixCorners"),SS=f((e,t,r)=>{const i=e-t-r,s=2,a=2,o=s+a,n=Math.floor(i/o),l=Array(n).fill(`${s} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),wS=f(function(e,t,r,i,s,a,o,n=!1){var M;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=yt();let h=t.points,c=!1;const u=s;var p=a;const d=[];for(const F in t.cssCompiledStyles)Tp(F)||d.push(t.cssCompiledStyles[F]);z.debug("UIO intersect check",t.points,p.x,u.x),p.intersect&&u.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(u.intersect(h[0])),z.debug("Last point UIO",t.start,"-->",t.end,h[h.length-1],p,p.intersect(h[h.length-1])),h.push(p.intersect(h[h.length-1])));const g=btoa(JSON.stringify(h));t.toCluster&&(z.info("to cluster abc88",r.get(t.toCluster)),h=tc(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(z.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=tc(h.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let m=h.filter(F=>!Number.isNaN(F.y));const y=yS(t.curve);y!=="rounded"&&(m=TS(m));let C=Ni;switch(y){case"linear":C=Ni;break;case"basis":C=Lo;break;case"cardinal":C=cu;break;case"bumpX":C=au;break;case"bumpY":C=ou;break;case"catmullRom":C=du;break;case"monotoneX":C=Cu;break;case"monotoneY":C=xu;break;case"natural":C=ku;break;case"step":C=Tu;break;case"stepAfter":C=wu;break;case"stepBefore":C=Su;break;case"rounded":C=Ni;break;default:C=Lo}const{x:b,y:k}=y1(t),_=tk().x(b).y(k).curve(C);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,$=y==="rounded"?Bg(vg(m,t),5):_(m);const E=Array.isArray(t.style)?t.style:[t.style];let W=E.find(F=>F==null?void 0:F.startsWith("stroke:")),P="";t.animate&&(P="edge-animation-fast"),t.animation&&(P="edge-animation-"+t.animation);let O=!1;if(t.look==="handDrawn"){const F=X.svg(e);Object.assign([],m);const S=F.path($,{roughness:.3,seed:l});w+=" transition",v=ht(S).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(P?" "+P:"")).attr("style",E?E.reduce((ot,ut)=>ot+";"+ut,""):"");let q=v.attr("d");v.attr("d",q),e.node().appendChild(v.node())}else{const F=d.join(";"),S=E?E.reduce((mt,nt)=>mt+nt+";",""):"",q=(F?F+";"+S+";":S)+";"+(E?E.reduce((mt,nt)=>mt+";"+nt,""):"");v=e.append("path").attr("d",$).attr("id",`${o}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(P?" "+P:"")).attr("style",q),W=(M=q.match(/stroke:([^;]+)/))==null?void 0:M[1],O=t.animate===!0||!!t.animation||F.includes("animation");const ot=v.node(),ut=typeof ot.getTotalLength=="function"?ot.getTotalLength():0,dt=gh[t.arrowTypeStart]||0,pt=gh[t.arrowTypeEnd]||0;if(t.look==="neo"&&!O){const nt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?SS(ut,dt,pt):`0 ${dt} ${ut-dt-pt} ${pt}`}; stroke-dashoffset: 0;`;v.attr("style",nt+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",Nt(t.look)),t.showPoints&&m.forEach(F=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",F.x).attr("cy",F.y)});let Y="";(yt().flowchart.arrowMarkerAbsolute||yt().state.arrowMarkerAbsolute)&&(Y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,Y=Y.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),z.info("arrowTypeStart",t.arrowTypeStart),z.info("arrowTypeEnd",t.arrowTypeEnd);const H=!O&&(t==null?void 0:t.look)==="neo";fS(v,t,Y,o,i,H,W);const I=Math.floor(h.length/2),A=h[I];xe.isLabelCoordinateInPath(A,v.attr("d"))||(c=!0);let B={};return c&&(B.updatedPath=h),B.originalPath=t.points,B},"insertEdge");function Bg(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const o=e[a],n=e[a-1],l=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const h=o.x-n.x,c=o.y-n.y,u=l.x-o.x,p=l.y-o.y,d=Math.hypot(h,c),g=Math.hypot(u,p);if(d<s||g<s){r+=`L${o.x},${o.y}`;continue}const m=h/d,y=c/d,C=u/g,b=p/g,k=m*C+y*b,_=Math.max(-1,Math.min(1,k)),w=Math.acos(_);if(w<s||Math.abs(Math.PI-w)<s){r+=`L${o.x},${o.y}`;continue}const v=Math.min(t/Math.sin(w/2),d/2,g/2),$=o.x-m*v,E=o.y-y*v,W=o.x+C*v,P=o.y+b*v;r+=`L${$},${E}`,r+=`Q${o.x},${o.y} ${W},${P}`}}return r}f(Bg,"generateRoundedPath");function an(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(an,"calculateDeltaAndAngle");function vg(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Ut[t.arrowTypeStart]){const s=Ut[t.arrowTypeStart],a=e[0],o=e[1],{angle:n}=an(a,o),l=s*Math.cos(n),h=s*Math.sin(n);r[0].x=a.x+l,r[0].y=a.y+h}const i=e.length;if(i>=2&&Ut[t.arrowTypeEnd]){const s=Ut[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:n}=an(o,a),l=s*Math.cos(n),h=s*Math.sin(n);r[i-1].x=a.x-l,r[i-1].y=a.y-h}return r}f(vg,"applyMarkerOffsetsToPoints");var _S=f((e,t,r,i)=>{t.forEach(s=>{XS[s](e,r,i)})},"insertMarkers"),BS=f((e,t,r)=>{z.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",20).attr("markerHeight",28).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"),vS=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"),LS=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"),FS=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"),AS=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"),ES=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"),MS=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"),$S=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"),OS=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"),IS=f((e,t,r)=>{const i=vt(),{themeVariables:s}=i,{transitionColor:a}=s;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",`${a}`)},"barbNeo"),DS=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"),RS=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 s=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");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),PS=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"),NS=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 s=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");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),qS=f((e,t,r)=>{const i=vt(),{themeVariables:s}=i,{strokeWidth:a}=s;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",`${a}`),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",`${a}`)},"only_one_neo"),WS=f((e,t,r)=>{const i=vt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,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",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);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",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),zS=f((e,t,r)=>{const i=vt(),{themeVariables:s}=i,{strokeWidth:a}=s;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",`${a}`),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",`${a}`)},"one_or_more_neo"),HS=f((e,t,r)=>{const i=vt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,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",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);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",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),YS=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
295
295
  L20,10
296
296
  M20,10
297
- L0,20`)},"requirement_arrow"),GS=f((e,t,r)=>{const i=vt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
297
+ L0,20`)},"requirement_arrow"),US=f((e,t,r)=>{const i=vt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
298
298
  L20,10
299
299
  M20,10
300
- L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),jS=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"),XS=f((e,t,r)=>{const i=vt(),{themeVariables:s}=i,{strokeWidth:a}=s,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),VS={extension:vS,composition:LS,aggregation:FS,dependency:AS,lollipop:ES,point:MS,circle:$S,cross:OS,barb:IS,barbNeo:DS,only_one:RS,zero_or_one:PS,one_or_more:NS,zero_or_more:qS,only_one_neo:WS,zero_or_one_neo:zS,one_or_more_neo:HS,zero_or_more_neo:YS,requirement_arrow:US,requirement_contains:jS,requirement_arrow_neo:GS,requirement_contains_neo:XS},ZS=BS,KS={common:Ji,getConfig:vt,insertCluster:XT,insertEdge:_S,insertEdgeLabel:xS,insertMarkers:ZS,insertNode:wg,interpolateToCurve:Nn,labelHelper:et,log:z,positionEdgeLabel:bS},Ki={},Lg=f(e=>{for(const t of e)Ki[t.name]=t},"registerLayoutLoaders"),QS=f(()=>{Lg([{name:"dagre",loader:f(async()=>await gt(()=>import("./dagre-BM42HDAG-CDHZECic.js"),__vite__mapDeps([2,3,4,0,1])),"loader")},{name:"cose-bilkent",loader:f(async()=>await gt(()=>import("./cose-bilkent-S5V4N54A-Cs6fpB7P.js"),__vite__mapDeps([5,6,0,1])),"loader")}])},"registerDefaultLayoutLoaders");QS();var Lv=f(async(e,t)=>{if(!(e.layoutAlgorithm in Ki))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const c of e.nodes){const u=c.domId||c.id;c.domId=`${e.diagramId}-${u}`}const r=Ki[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:o,gradientStart:n,gradientStop:l}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-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",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-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",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),o){const c=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");c.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,KS,{algorithm:r.algorithm})},"render"),Fv=f((e="",{fallback:t="dagre"}={})=>{if(e in Ki)return e;if(t in Ki)return z.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"),Fg="c4",JS=f(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),tw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./c4Diagram-AAUBKEIU-7Na3P-kZ.js");return{diagram:t}},__vite__mapDeps([7,8,0,1]));return{id:Fg,diagram:e}},"loader"),ew={id:Fg,detector:JS,loader:tw},rw=ew,Ag="flowchart",iw=f((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),sw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-XXjCvVe9.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,0,1]));return{id:Ag,diagram:e}},"loader"),aw={id:Ag,detector:iw,loader:sw},ow=aw,Eg="flowchart-v2",nw=f((e,t)=>{var r,i,s;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),lw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-XXjCvVe9.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,0,1]));return{id:Eg,diagram:e}},"loader"),hw={id:Eg,detector:nw,loader:lw},cw=hw,Mg="er",uw=f(e=>/^\s*erDiagram/.test(e),"detector"),dw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./erDiagram-TEJ5UH35-CCFnLCuI.js");return{diagram:t}},__vite__mapDeps([14,11,12,13,0,1]));return{id:Mg,diagram:e}},"loader"),pw={id:Mg,detector:uw,loader:dw},fw=pw,$g="gitGraph",gw=f(e=>/^\s*gitGraph/.test(e),"detector"),mw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-PVQCEYII-DEJqJScw.js");return{diagram:t}},__vite__mapDeps([15,16,17,18,0,1]));return{id:$g,diagram:e}},"loader"),yw={id:$g,detector:gw,loader:mw},Cw=yw,Og="gantt",xw=f(e=>/^\s*gantt/.test(e),"detector"),bw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./ganttDiagram-6RSMTGT7-DySx1LhW.js");return{diagram:t}},__vite__mapDeps([19,0,1,20,21,22]));return{id:Og,diagram:e}},"loader"),kw={id:Og,detector:xw,loader:bw},Tw=kw,Ig="info",Sw=f(e=>/^\s*info/.test(e),"detector"),ww=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./infoDiagram-5YYISTIA-BHZsuat4.js");return{diagram:t}},__vite__mapDeps([23,18,0,1]));return{id:Ig,diagram:e}},"loader"),_w={id:Ig,detector:Sw,loader:ww},Dg="pie",Bw=f(e=>/^\s*pie/.test(e),"detector"),vw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./pieDiagram-4H26LBE5-DMPmMTH1.js");return{diagram:t}},__vite__mapDeps([24,16,18,0,1,25,26,21]));return{id:Dg,diagram:e}},"loader"),Lw={id:Dg,detector:Bw,loader:vw},Rg="quadrantChart",Fw=f(e=>/^\s*quadrantChart/.test(e),"detector"),Aw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./quadrantDiagram-W4KKPZXB-11C8I9VP.js");return{diagram:t}},__vite__mapDeps([27,20,21,22,0,1]));return{id:Rg,diagram:e}},"loader"),Ew={id:Rg,detector:Fw,loader:Aw},Mw=Ew,Pg="xychart",$w=f(e=>/^\s*xychart(-beta)?/.test(e),"detector"),Ow=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./xychartDiagram-2RQKCTM6-6y29SLTt.js");return{diagram:t}},__vite__mapDeps([28,21,26,20,22,0,1]));return{id:Pg,diagram:e}},"loader"),Iw={id:Pg,detector:$w,loader:Ow},Dw=Iw,Ng="requirement",Rw=f(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),Pw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./requirementDiagram-4Y6WPE33-jSHqXpl9.js");return{diagram:t}},__vite__mapDeps([29,11,12,0,1]));return{id:Ng,diagram:e}},"loader"),Nw={id:Ng,detector:Rw,loader:Pw},qw=Nw,qg="sequence",Ww=f(e=>/^\s*sequenceDiagram/.test(e),"detector"),zw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sequenceDiagram-3UESZ5HK-BgXo_1c4.js");return{diagram:t}},__vite__mapDeps([30,8,17,0,1]));return{id:qg,diagram:e}},"loader"),Hw={id:qg,detector:Ww,loader:zw},Yw=Hw,Wg="class",Uw=f((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),Gw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-4FO5ZUOK-C3-eaR-O.js");return{diagram:t}},__vite__mapDeps([31,32,10,8,11,12,0,1]));return{id:Wg,diagram:e}},"loader"),jw={id:Wg,detector:Uw,loader:Gw},Xw=jw,zg="classDiagram",Vw=f((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),Zw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-v2-Q7XG4LA2-C3-eaR-O.js");return{diagram:t}},__vite__mapDeps([33,32,10,8,11,12,0,1]));return{id:zg,diagram:e}},"loader"),Kw={id:zg,detector:Vw,loader:Zw},Qw=Kw,Hg="state",Jw=f((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),t_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-AJRCARHV-BuhqVVAi.js");return{diagram:t}},__vite__mapDeps([34,35,11,12,3,4,0,1]));return{id:Hg,diagram:e}},"loader"),e_={id:Hg,detector:Jw,loader:t_},r_=e_,Yg="stateDiagram",i_=f((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),s_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-BHNVJYJU-73kXjnOg.js");return{diagram:t}},__vite__mapDeps([36,35,11,12,0,1]));return{id:Yg,diagram:e}},"loader"),a_={id:Yg,detector:i_,loader:s_},o_=a_,Ug="journey",n_=f(e=>/^\s*journey/.test(e),"detector"),l_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./journeyDiagram-JHISSGLW-ChohV-KT.js");return{diagram:t}},__vite__mapDeps([37,10,8,25,0,1]));return{id:Ug,diagram:e}},"loader"),h_={id:Ug,detector:n_,loader:l_},c_=h_,u_=f((e,t,r)=>{z.debug(`rendering svg for syntax error
301
- `);const i=ck(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Lc(i,100,512,!0),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),Gg={draw:u_},d_=Gg,p_={db:{},renderer:Gg,parser:{parse:f(()=>{},"parse")}},f_=p_,jg="flowchart-elk",g_=f((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),m_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-XXjCvVe9.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,0,1]));return{id:jg,diagram:e}},"loader"),y_={id:jg,detector:g_,loader:m_},C_=y_,Xg="timeline",x_=f(e=>/^\s*timeline/.test(e),"detector"),b_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./timeline-definition-PNZ67QCA-DhUWow5s.js");return{diagram:t}},__vite__mapDeps([38,25,0,1]));return{id:Xg,diagram:e}},"loader"),k_={id:Xg,detector:x_,loader:b_},T_=k_,Vg="mindmap",S_=f(e=>/^\s*mindmap/.test(e),"detector"),w_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./mindmap-definition-RKZ34NQL-BptECfHD.js");return{diagram:t}},__vite__mapDeps([39,11,12,0,1]));return{id:Vg,diagram:e}},"loader"),__={id:Vg,detector:S_,loader:w_},B_=__,Zg="kanban",v_=f(e=>/^\s*kanban/.test(e),"detector"),L_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./kanban-definition-UN3LZRKU-CLuwth_y.js");return{diagram:t}},__vite__mapDeps([40,10,0,1]));return{id:Zg,diagram:e}},"loader"),F_={id:Zg,detector:v_,loader:L_},A_=F_,Kg="sankey",E_=f(e=>/^\s*sankey(-beta)?/.test(e),"detector"),M_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sankeyDiagram-5OEKKPKP-b7ZKi5nP.js");return{diagram:t}},__vite__mapDeps([41,26,21,0,1]));return{id:Kg,diagram:e}},"loader"),$_={id:Kg,detector:E_,loader:M_},O_=$_,Qg="packet",I_=f(e=>/^\s*packet(-beta)?/.test(e),"detector"),D_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-LMA3HP47-BHMX7mDD.js");return{diagram:t}},__vite__mapDeps([42,16,18,0,1]));return{id:Qg,diagram:e}},"loader"),R_={id:Qg,detector:I_,loader:D_},Jg="radar",P_=f(e=>/^\s*radar-beta/.test(e),"detector"),N_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-2AECGRRQ-CkuG87Ds.js");return{diagram:t}},__vite__mapDeps([43,16,18,0,1]));return{id:Jg,diagram:e}},"loader"),q_={id:Jg,detector:P_,loader:N_},tm="block",W_=f(e=>/^\s*block(-beta)?/.test(e),"detector"),z_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./blockDiagram-GPEHLZMM-Iy_GtHFo.js");return{diagram:t}},__vite__mapDeps([44,10,3,13,0,1]));return{id:tm,diagram:e}},"loader"),H_={id:tm,detector:W_,loader:z_},Y_=H_,em="treeView",U_=f(e=>/^\s*treeView-beta/.test(e),"detector"),G_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-5GNKFQAL-DL_heS1V.js");return{diagram:t}},__vite__mapDeps([45,16,17,18,0,1]));return{id:em,diagram:e}},"loader"),j_={id:em,detector:U_,loader:G_},X_=j_,rm="architecture",V_=f(e=>/^\s*architecture/.test(e),"detector"),Z_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./architectureDiagram-3BPJPVTR-CzWB7fgP.js");return{diagram:t}},__vite__mapDeps([46,16,18,0,1,6]));return{id:rm,diagram:e}},"loader"),K_={id:rm,detector:V_,loader:Z_},Q_=K_,im="eventmodeling",J_=f(e=>/^\s*eventmodeling/.test(e),"detector"),tB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-KO2AKTUF-C7DTFOLq.js");return{diagram:t}},__vite__mapDeps([47,16,18,0,1]));return{id:im,diagram:e}},"loader"),eB={id:im,detector:J_,loader:tB},rB=eB,sm="ishikawa",iB=f(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),sB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-YF4QCWOH-CwyCO4fo.js");return{diagram:t}},__vite__mapDeps([48,0,1]));return{id:sm,diagram:e}},"loader"),aB={id:sm,detector:iB,loader:sB},am="venn",oB=f(e=>/^\s*venn-beta/.test(e),"detector"),nB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./vennDiagram-CIIHVFJN-CaTBu0Ox.js");return{diagram:t}},__vite__mapDeps([49,0,1]));return{id:am,diagram:e}},"loader"),lB={id:am,detector:oB,loader:nB},hB=lB,om="treemap",cB=f(e=>/^\s*treemap/.test(e),"detector"),uB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-OG6HWLK6-Bw6DhtUH.js");return{diagram:t}},__vite__mapDeps([50,12,16,18,0,1,22,26,21]));return{id:om,diagram:e}},"loader"),dB={id:om,detector:cB,loader:uB},nm="wardley-beta",pB=f(e=>/^\s*wardley-beta/i.test(e),"detector"),fB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./wardleyDiagram-YWT4CUSO-1wNaGTE5.js");return{diagram:t}},__vite__mapDeps([51,16,18,0,1]));return{id:nm,diagram:e}},"loader"),gB={id:nm,detector:pB,loader:fB},mB=gB,rc=!1,Ea=f(()=>{rc||(rc=!0,zs("error",f_,e=>e.toLowerCase().trim()==="error"),zs("---",{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("---")),po(C_,B_,Q_),po(rw,A_,Qw,Xw,fw,Tw,_w,Lw,qw,Yw,cw,ow,T_,Cw,o_,r_,c_,Mw,O_,R_,Dw,Y_,rB,X_,q_,aB,dB,hB,mB))},"addDiagrams"),yB=f(async()=>{z.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Cr).map(async([r,{detector:i,loader:s}])=>{if(s)try{Co(r)}catch{try{const{diagram:a,id:o}=await s();zs(o,a,i)}catch(a){throw z.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Cr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){z.error(`Failed to load ${t.length} external diagrams`);for(const r of t)z.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),CB="graphics-document document";function lm(e,t){e.attr("role",CB),t!==""&&e.attr("aria-roledescription",t)}f(lm,"setA11yDiagramInfo");function hm(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}f(hm,"addSVGa11yTitleDescription");var yr,on=(yr=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var h,c;const i=vt(),s=hn(t,i);t=f2(t)+`
302
- `;try{Co(s)}catch{const u=Ay(s);if(!u)throw new pc(`Diagram ${s} not found.`);const{id:p,diagram:d}=await u();zs(p,d)}const{db:a,parser:o,renderer:n,init:l}=Co(s);return o.parser&&(o.parser.yy=a),(h=a.clear)==null||h.call(a),l==null||l(i),r.title&&((c=a.setDiagramTitle)==null||c.call(a,r.title)),await o.parse(t),new yr(s,t,a,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},f(yr,"Diagram"),yr),ic=[],xB=f(()=>{ic.forEach(e=>{e()}),ic=[]},"attachFunctions"),bB=f(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function cm(e){const t=e.match(dc);if(!t)return{text:e,metadata:{}};let r=y1(t[1],{schema:m1})??{};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(cm,"extractFrontMatter");var kB=f(e=>e.replace(/\r\n?/g,`
303
- `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),TB=f(e=>{const{text:t,metadata:r}=cm(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:t}},"processFrontmatter"),SB=f(e=>{const t=xe.detectInit(e)??{},r=xe.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:e2(e),directive:t}},"processDirectives");function ol(e){const t=kB(e),r=TB(t),i=SB(r.text),s=Yn(r.config,i.directive);return e=bB(i.text),{code:e,title:r.title,config:s}}f(ol,"preprocessDiagram");function um(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}f(um,"toBase64");var wB=5e4,_B="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",BB="sandbox",vB="loose",LB="http://www.w3.org/2000/svg",FB="http://www.w3.org/1999/xlink",AB="http://www.w3.org/1999/xhtml",EB="100%",MB="100%",$B="border:0;margin:0;",OB="margin:0",IB="allow-top-navigation-by-user-activation allow-popups",DB='The "iframe" tag is not supported by your browser.',RB=["foreignobject"],PB=["dominant-baseline"];function nl(e){const t=ol(e);return qs(),i0(t.config??{}),t}f(nl,"processAndSetConfigs");async function dm(e,t){Ea();try{const{code:r,config:i}=nl(e);return{diagramType:(await fm(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}f(dm,"parse");var sc=f((e,t,r=[])=>{const i=Cc(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),NB=f((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=Jt(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{bh(l.styles)||n.forEach(h=>{r.insertRule(sc(l.id,h,l.styles),r.cssRules.length)}),bh(l.textStyles)||r.insertRule(sc(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(h=>h.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=yo(s)+`
300
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),GS=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"),jS=f((e,t,r)=>{const i=vt(),{themeVariables:s}=i,{strokeWidth:a}=s,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),XS={extension:BS,composition:vS,aggregation:LS,dependency:FS,lollipop:AS,point:ES,circle:MS,cross:$S,barb:OS,barbNeo:IS,only_one:DS,zero_or_one:RS,one_or_more:PS,zero_or_more:NS,only_one_neo:qS,zero_or_one_neo:WS,one_or_more_neo:zS,zero_or_more_neo:HS,requirement_arrow:YS,requirement_contains:GS,requirement_arrow_neo:US,requirement_contains_neo:jS},VS=_S,ZS={common:Ji,getConfig:vt,insertCluster:jT,insertEdge:wS,insertEdgeLabel:CS,insertMarkers:VS,insertNode:wg,interpolateToCurve:Nn,labelHelper:et,log:z,positionEdgeLabel:xS},Ki={},Lg=f(e=>{for(const t of e)Ki[t.name]=t},"registerLayoutLoaders"),KS=f(()=>{Lg([{name:"dagre",loader:f(async()=>await gt(()=>import("./dagre-BM42HDAG-Dq1Zk1WA.js"),__vite__mapDeps([2,3,4,0,1])),"loader")},{name:"cose-bilkent",loader:f(async()=>await gt(()=>import("./cose-bilkent-S5V4N54A-BLgQgbpB.js"),__vite__mapDeps([5,6,0,1])),"loader")}])},"registerDefaultLayoutLoaders");KS();var vv=f(async(e,t)=>{if(!(e.layoutAlgorithm in Ki))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const c of e.nodes){const u=c.domId||c.id;c.domId=`${e.diagramId}-${u}`}const r=Ki[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:o,gradientStart:n,gradientStop:l}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-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",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-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",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),o){const c=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");c.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,ZS,{algorithm:r.algorithm})},"render"),Lv=f((e="",{fallback:t="dagre"}={})=>{if(e in Ki)return e;if(t in Ki)return z.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"),Fg="c4",QS=f(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),JS=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./c4Diagram-AAUBKEIU-CI_WHnrE.js");return{diagram:t}},__vite__mapDeps([7,8,0,1]));return{id:Fg,diagram:e}},"loader"),tw={id:Fg,detector:QS,loader:JS},ew=tw,Ag="flowchart",rw=f((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),iw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-B6AwQZ9h.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,0,1]));return{id:Ag,diagram:e}},"loader"),sw={id:Ag,detector:rw,loader:iw},aw=sw,Eg="flowchart-v2",ow=f((e,t)=>{var r,i,s;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),nw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-B6AwQZ9h.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,0,1]));return{id:Eg,diagram:e}},"loader"),lw={id:Eg,detector:ow,loader:nw},hw=lw,Mg="er",cw=f(e=>/^\s*erDiagram/.test(e),"detector"),uw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./erDiagram-TEJ5UH35-BF5jb9tg.js");return{diagram:t}},__vite__mapDeps([14,11,12,13,0,1]));return{id:Mg,diagram:e}},"loader"),dw={id:Mg,detector:cw,loader:uw},pw=dw,$g="gitGraph",fw=f(e=>/^\s*gitGraph/.test(e),"detector"),gw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-PVQCEYII-CjKzjGW2.js");return{diagram:t}},__vite__mapDeps([15,16,17,18,0,1]));return{id:$g,diagram:e}},"loader"),mw={id:$g,detector:fw,loader:gw},yw=mw,Og="gantt",Cw=f(e=>/^\s*gantt/.test(e),"detector"),xw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./ganttDiagram-6RSMTGT7-8XevLpQ2.js");return{diagram:t}},__vite__mapDeps([19,0,1,20,21,22]));return{id:Og,diagram:e}},"loader"),bw={id:Og,detector:Cw,loader:xw},kw=bw,Ig="info",Tw=f(e=>/^\s*info/.test(e),"detector"),Sw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./infoDiagram-5YYISTIA-D1EY6tMP.js");return{diagram:t}},__vite__mapDeps([23,18,0,1]));return{id:Ig,diagram:e}},"loader"),ww={id:Ig,detector:Tw,loader:Sw},Dg="pie",_w=f(e=>/^\s*pie/.test(e),"detector"),Bw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./pieDiagram-4H26LBE5-Ceq-60P6.js");return{diagram:t}},__vite__mapDeps([24,16,18,0,1,25,26,21]));return{id:Dg,diagram:e}},"loader"),vw={id:Dg,detector:_w,loader:Bw},Rg="quadrantChart",Lw=f(e=>/^\s*quadrantChart/.test(e),"detector"),Fw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./quadrantDiagram-W4KKPZXB-CjJi7S36.js");return{diagram:t}},__vite__mapDeps([27,20,21,22,0,1]));return{id:Rg,diagram:e}},"loader"),Aw={id:Rg,detector:Lw,loader:Fw},Ew=Aw,Pg="xychart",Mw=f(e=>/^\s*xychart(-beta)?/.test(e),"detector"),$w=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./xychartDiagram-2RQKCTM6-By6pgy4_.js");return{diagram:t}},__vite__mapDeps([28,21,26,20,22,0,1]));return{id:Pg,diagram:e}},"loader"),Ow={id:Pg,detector:Mw,loader:$w},Iw=Ow,Ng="requirement",Dw=f(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),Rw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./requirementDiagram-4Y6WPE33-C9pzk5Si.js");return{diagram:t}},__vite__mapDeps([29,11,12,0,1]));return{id:Ng,diagram:e}},"loader"),Pw={id:Ng,detector:Dw,loader:Rw},Nw=Pw,qg="sequence",qw=f(e=>/^\s*sequenceDiagram/.test(e),"detector"),Ww=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sequenceDiagram-3UESZ5HK-BsYzexS5.js");return{diagram:t}},__vite__mapDeps([30,8,17,0,1]));return{id:qg,diagram:e}},"loader"),zw={id:qg,detector:qw,loader:Ww},Hw=zw,Wg="class",Yw=f((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),Uw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-4FO5ZUOK-CTewEgrE.js");return{diagram:t}},__vite__mapDeps([31,32,10,8,11,12,0,1]));return{id:Wg,diagram:e}},"loader"),Gw={id:Wg,detector:Yw,loader:Uw},jw=Gw,zg="classDiagram",Xw=f((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),Vw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-v2-Q7XG4LA2-CTewEgrE.js");return{diagram:t}},__vite__mapDeps([33,32,10,8,11,12,0,1]));return{id:zg,diagram:e}},"loader"),Zw={id:zg,detector:Xw,loader:Vw},Kw=Zw,Hg="state",Qw=f((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),Jw=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-AJRCARHV-BS0VgbxN.js");return{diagram:t}},__vite__mapDeps([34,35,11,12,3,4,0,1]));return{id:Hg,diagram:e}},"loader"),t_={id:Hg,detector:Qw,loader:Jw},e_=t_,Yg="stateDiagram",r_=f((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),i_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-BHNVJYJU-DOBMdgZp.js");return{diagram:t}},__vite__mapDeps([36,35,11,12,0,1]));return{id:Yg,diagram:e}},"loader"),s_={id:Yg,detector:r_,loader:i_},a_=s_,Ug="journey",o_=f(e=>/^\s*journey/.test(e),"detector"),n_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./journeyDiagram-JHISSGLW-zRbo7xgy.js");return{diagram:t}},__vite__mapDeps([37,10,8,25,0,1]));return{id:Ug,diagram:e}},"loader"),l_={id:Ug,detector:o_,loader:n_},h_=l_,c_=f((e,t,r)=>{z.debug(`rendering svg for syntax error
301
+ `);const i=hk(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Lc(i,100,512,!0),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),Gg={draw:c_},u_=Gg,d_={db:{},renderer:Gg,parser:{parse:f(()=>{},"parse")}},p_=d_,jg="flowchart-elk",f_=f((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),g_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-B6AwQZ9h.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,0,1]));return{id:jg,diagram:e}},"loader"),m_={id:jg,detector:f_,loader:g_},y_=m_,Xg="timeline",C_=f(e=>/^\s*timeline/.test(e),"detector"),x_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./timeline-definition-PNZ67QCA-Bmq52fq4.js");return{diagram:t}},__vite__mapDeps([38,25,0,1]));return{id:Xg,diagram:e}},"loader"),b_={id:Xg,detector:C_,loader:x_},k_=b_,Vg="mindmap",T_=f(e=>/^\s*mindmap/.test(e),"detector"),S_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./mindmap-definition-RKZ34NQL-D4IUASx-.js");return{diagram:t}},__vite__mapDeps([39,11,12,0,1]));return{id:Vg,diagram:e}},"loader"),w_={id:Vg,detector:T_,loader:S_},__=w_,Zg="kanban",B_=f(e=>/^\s*kanban/.test(e),"detector"),v_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./kanban-definition-UN3LZRKU-De6vLQmM.js");return{diagram:t}},__vite__mapDeps([40,10,0,1]));return{id:Zg,diagram:e}},"loader"),L_={id:Zg,detector:B_,loader:v_},F_=L_,Kg="sankey",A_=f(e=>/^\s*sankey(-beta)?/.test(e),"detector"),E_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sankeyDiagram-5OEKKPKP-D5uJ3lHO.js");return{diagram:t}},__vite__mapDeps([41,26,21,0,1]));return{id:Kg,diagram:e}},"loader"),M_={id:Kg,detector:A_,loader:E_},$_=M_,Qg="packet",O_=f(e=>/^\s*packet(-beta)?/.test(e),"detector"),I_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-LMA3HP47-C9J3k7m5.js");return{diagram:t}},__vite__mapDeps([42,16,18,0,1]));return{id:Qg,diagram:e}},"loader"),D_={id:Qg,detector:O_,loader:I_},Jg="radar",R_=f(e=>/^\s*radar-beta/.test(e),"detector"),P_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-2AECGRRQ-BEGf4hZt.js");return{diagram:t}},__vite__mapDeps([43,16,18,0,1]));return{id:Jg,diagram:e}},"loader"),N_={id:Jg,detector:R_,loader:P_},tm="block",q_=f(e=>/^\s*block(-beta)?/.test(e),"detector"),W_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./blockDiagram-GPEHLZMM-e2nscQC5.js");return{diagram:t}},__vite__mapDeps([44,10,3,13,0,1]));return{id:tm,diagram:e}},"loader"),z_={id:tm,detector:q_,loader:W_},H_=z_,em="treeView",Y_=f(e=>/^\s*treeView-beta/.test(e),"detector"),U_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-5GNKFQAL-CpQ8v6Gk.js");return{diagram:t}},__vite__mapDeps([45,16,17,18,0,1]));return{id:em,diagram:e}},"loader"),G_={id:em,detector:Y_,loader:U_},j_=G_,rm="architecture",X_=f(e=>/^\s*architecture/.test(e),"detector"),V_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./architectureDiagram-3BPJPVTR-DP6-aNAa.js");return{diagram:t}},__vite__mapDeps([46,16,18,0,1,6]));return{id:rm,diagram:e}},"loader"),Z_={id:rm,detector:X_,loader:V_},K_=Z_,im="eventmodeling",Q_=f(e=>/^\s*eventmodeling/.test(e),"detector"),J_=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-KO2AKTUF-BJCrkyuo.js");return{diagram:t}},__vite__mapDeps([47,16,18,0,1]));return{id:im,diagram:e}},"loader"),tB={id:im,detector:Q_,loader:J_},eB=tB,sm="ishikawa",rB=f(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),iB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-YF4QCWOH-BkPZRRgM.js");return{diagram:t}},__vite__mapDeps([48,0,1]));return{id:sm,diagram:e}},"loader"),sB={id:sm,detector:rB,loader:iB},am="venn",aB=f(e=>/^\s*venn-beta/.test(e),"detector"),oB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./vennDiagram-CIIHVFJN-aOBxQyZi.js");return{diagram:t}},__vite__mapDeps([49,0,1]));return{id:am,diagram:e}},"loader"),nB={id:am,detector:aB,loader:oB},lB=nB,om="treemap",hB=f(e=>/^\s*treemap/.test(e),"detector"),cB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-OG6HWLK6-BR4-7yVy.js");return{diagram:t}},__vite__mapDeps([50,12,16,18,0,1,22,26,21]));return{id:om,diagram:e}},"loader"),uB={id:om,detector:hB,loader:cB},nm="wardley-beta",dB=f(e=>/^\s*wardley-beta/i.test(e),"detector"),pB=f(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./wardleyDiagram-YWT4CUSO-BCit449v.js");return{diagram:t}},__vite__mapDeps([51,16,18,0,1]));return{id:nm,diagram:e}},"loader"),fB={id:nm,detector:dB,loader:pB},gB=fB,rc=!1,Ea=f(()=>{rc||(rc=!0,zs("error",p_,e=>e.toLowerCase().trim()==="error"),zs("---",{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("---")),po(y_,__,K_),po(ew,F_,Kw,jw,pw,kw,ww,vw,Nw,Hw,hw,aw,k_,yw,a_,e_,h_,Ew,$_,D_,Iw,H_,eB,j_,N_,sB,uB,lB,gB))},"addDiagrams"),mB=f(async()=>{z.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Cr).map(async([r,{detector:i,loader:s}])=>{if(s)try{Co(r)}catch{try{const{diagram:a,id:o}=await s();zs(o,a,i)}catch(a){throw z.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Cr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){z.error(`Failed to load ${t.length} external diagrams`);for(const r of t)z.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),yB="graphics-document document";function lm(e,t){e.attr("role",yB),t!==""&&e.attr("aria-roledescription",t)}f(lm,"setA11yDiagramInfo");function hm(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}f(hm,"addSVGa11yTitleDescription");var yr,on=(yr=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var h,c;const i=vt(),s=hn(t,i);t=p2(t)+`
302
+ `;try{Co(s)}catch{const u=Fy(s);if(!u)throw new pc(`Diagram ${s} not found.`);const{id:p,diagram:d}=await u();zs(p,d)}const{db:a,parser:o,renderer:n,init:l}=Co(s);return o.parser&&(o.parser.yy=a),(h=a.clear)==null||h.call(a),l==null||l(i),r.title&&((c=a.setDiagramTitle)==null||c.call(a,r.title)),await o.parse(t),new yr(s,t,a,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},f(yr,"Diagram"),yr),ic=[],CB=f(()=>{ic.forEach(e=>{e()}),ic=[]},"attachFunctions"),xB=f(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function cm(e){const t=e.match(dc);if(!t)return{text:e,metadata:{}};let r=m1(t[1],{schema:g1})??{};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(cm,"extractFrontMatter");var bB=f(e=>e.replace(/\r\n?/g,`
303
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),kB=f(e=>{const{text:t,metadata:r}=cm(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:t}},"processFrontmatter"),TB=f(e=>{const t=xe.detectInit(e)??{},r=xe.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:t2(e),directive:t}},"processDirectives");function ol(e){const t=bB(e),r=kB(t),i=TB(r.text),s=Yn(r.config,i.directive);return e=xB(i.text),{code:e,title:r.title,config:s}}f(ol,"preprocessDiagram");function um(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}f(um,"toBase64");var SB=5e4,wB="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",_B="sandbox",BB="loose",vB="http://www.w3.org/2000/svg",LB="http://www.w3.org/1999/xlink",FB="http://www.w3.org/1999/xhtml",AB="100%",EB="100%",MB="border:0;margin:0;",$B="margin:0",OB="allow-top-navigation-by-user-activation allow-popups",IB='The "iframe" tag is not supported by your browser.',DB=["foreignobject"],RB=["dominant-baseline"];function nl(e){const t=ol(e);return qs(),r0(t.config??{}),t}f(nl,"processAndSetConfigs");async function dm(e,t){Ea();try{const{code:r,config:i}=nl(e);return{diagramType:(await fm(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}f(dm,"parse");var sc=f((e,t,r=[])=>{const i=Cc(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),PB=f((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=Jt(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{bh(l.styles)||n.forEach(h=>{r.insertRule(sc(l.id,h,l.styles),r.cssRules.length)}),bh(l.textStyles)||r.insertRule(sc(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(h=>h.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=yo(s)+`
304
304
  `}else i+=`${e.themeCSS}
305
- `;return i+yo(r)},"createCssStyles"),qB=f((e,t)=>Mm($m(`${e}{${t}}`),qm([f(function(i,s,a,o){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===_l)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[Im,Dm,Rm,Pm,"@container","@starting-style"],_l].includes(i.type)||(z.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=Nm))},"addNamespace"),Om])),"compileCSS"),WB=f((e,t,r,i)=>{const s=NB(e,r),a=T0(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return qB(i,a)},"createUserStyles"),zB=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=Tr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),HB=f((e="",t)=>{var s,a;const r=(a=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":MB,i=um(`<body style="${OB}">${e}</body>`);return`<iframe style="width:${EB};height:${r};${$B}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${IB}">
306
- ${DB}
307
- </iframe>`},"putIntoIFrame"),ac=f((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",LB);return s&&o.attr("xmlns:xlink",s),o.append("g"),e},"appendDivSvgG");function nn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}f(nn,"sandboxedIframe");var YB=f((e,t,r,i)=>{var s,a,o;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),UB=f(async function(e,t,r){var Y,H,I,A,B,M;Ea();const i=nl(t);t=i.code;const s=vt();z.debug(s),t.length>((s==null?void 0:s.maxTextSize)??wB)&&(t=_B);const a=`#${e}`,o="i"+e,n="#"+o,l="d"+e,h="#"+l,c=f(()=>{const S=ht(p?n:h).node();S&&"remove"in S&&S.remove()},"removeTempElements");let u=ht(document.body);const p=s.securityLevel===BB,d=s.securityLevel===vB,g=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const F=nn(ht(r),o);u=ht(F.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=ht(r);ac(u,e,l,`font-family: ${g}`,FB)}else{if(YB(document,e,l,o),p){const F=nn(ht(document.body),o);u=ht(F.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=ht("body");ac(u,e,l)}let m,y;try{m=await on.fromText(t,{title:i.title})}catch(F){if(s.suppressErrorRendering)throw c(),F;m=await on.fromText("error"),y=F}const C=u.select(h).node(),b=m.type,k=C.firstChild,_=k.firstChild,w=(H=(Y=m.renderer).getClasses)==null?void 0:H.call(Y,t,m),v=WB(s,b,w,a),$=document.createElement("style");$.innerHTML=v,k.insertBefore($,_);try{await m.renderer.draw(t,e,"11.15.0",m)}catch(F){throw s.suppressErrorRendering?c():d_.draw(t,e,"11.15.0"),F}const E=u.select(`${h} svg`),W=(A=(I=m.db).getAccTitle)==null?void 0:A.call(I),P=(M=(B=m.db).getAccDescription)==null?void 0:M.call(B);gm(b,E,W,P),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",AB);let O=u.select(h).node().innerHTML;if(z.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),O=zB(O,p,Ge(s.arrowMarkerAbsolute)),p){const F=u.select(h+" svg").node();O=HB(O,F)}else d||(O=oi.sanitize(O,{ADD_TAGS:RB,ADD_ATTR:PB,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(xB(),y)throw y;return c(),{diagramType:b,svg:O,bindFunctions:m.db.bindFunctions}},"render");function pm(e={}){var i;const t=Dt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),e0(t),t!=null&&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"?t0(t):xc();ln(r.logLevel),Ea()}f(pm,"initialize");var fm=f((e,t={})=>{const{code:r}=ol(e);return on.fromText(r,t)},"getDiagramFromText");function gm(e,t,r,i){lm(t,e),hm(t,r,i,t.attr("id"))}f(gm,"addA11yInfo");var wr=Object.freeze({render:UB,parse:dm,getDiagramFromText:fm,initialize:pm,getConfig:vt,setConfig:bc,getSiteConfig:xc,updateSiteConfig:r0,reset:f(()=>{qs()},"reset"),globalReset:f(()=>{qs(ni)},"globalReset"),defaultConfig:ni});ln(vt().logLevel);qs(vt());var GB=f((e,t,r)=>{z.warn(e),Hn(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"),mm=f(async function(e={querySelector:".mermaid"}){try{await jB(e)}catch(t){if(Hn(t)&&z.error(t.str),oe.parseError&&oe.parseError(t),!e.suppressErrors)throw z.error("Use the suppressErrors option to suppress these errors"),t}},"run"),jB=f(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=wr.getConfig();z.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");z.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(z.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),wr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new xe.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(s)){if(z.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${a.next()}`;o=l.innerHTML,o=Ip(xe.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const c=xe.detectInit(o);c&&z.debug("Detected early reinit: ",c);try{const{svg:u,bindFunctions:p}=await bm(h,o,l);l.innerHTML=u,e&&await e(h),p&&p(l)}catch(u){GB(u,n,oe.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),ym=f(function(e){wr.initialize(e)},"initialize"),XB=f(async function(e,t,r){z.warn("mermaid.init is deprecated. Please use run instead."),e&&ym(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await mm(i)},"init"),VB=f(async(e,{lazyLoad:t=!0}={})=>{Ea(),po(...e),t===!1&&await yB()},"registerExternalDiagrams"),Cm=f(function(){if(oe.startOnLoad){const{startOnLoad:e}=wr.getConfig();e&&oe.run().catch(t=>z.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Cm,!1);var ZB=f(function(e){oe.parseError=e},"setParseErrorHandler"),fa=[],ho=!1,xm=f(async()=>{if(!ho){for(ho=!0;fa.length>0;){const e=fa.shift();if(e)try{await e()}catch(t){z.error("Error executing queue",t)}}ho=!1}},"executeQueue"),KB=f(async(e,t)=>new Promise((r,i)=>{const s=f(()=>new Promise((a,o)=>{wr.parse(e,t).then(n=>{a(n),r(n)},n=>{var l;z.error("Error parsing",n),(l=oe.parseError)==null||l.call(oe,n),o(n),i(n)})}),"performCall");fa.push(s),xm().catch(i)}),"parse"),bm=f((e,t,r)=>new Promise((i,s)=>{const a=f(()=>new Promise((o,n)=>{wr.render(e,t,r).then(l=>{o(l),i(l)},l=>{var h;z.error("Error parsing",l),(h=oe.parseError)==null||h.call(oe,l),n(l),s(l)})}),"performCall");fa.push(a),xm().catch(s)}),"render"),QB=f(()=>Object.keys(Cr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),oe={startOnLoad:!0,mermaidAPI:wr,parse:KB,render:bm,init:XB,run:mm,registerExternalDiagrams:VB,registerLayoutLoaders:Lg,initialize:ym,parseError:void 0,contentLoaded:Cm,setParseErrorHandler:ZB,detectType:hn,registerIconPacks:kT,getRegisteredDiagramsMetadata:QB},JB=oe;/*! Check if previously processed *//*!
305
+ `;return i+yo(r)},"createCssStyles"),NB=f((e,t)=>Em(Nm(`${e}{${t}}`),Mm([f(function(i,s,a,o){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===_l)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[Om,Im,Dm,Rm,"@container","@starting-style"],_l].includes(i.type)||(z.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=Pm))},"addNamespace"),$m])),"compileCSS"),qB=f((e,t,r,i)=>{const s=PB(e,r),a=k0(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return NB(i,a)},"createUserStyles"),WB=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=Tr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),zB=f((e="",t)=>{var s,a;const r=(a=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":EB,i=um(`<body style="${$B}">${e}</body>`);return`<iframe style="width:${AB};height:${r};${MB}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${OB}">
306
+ ${IB}
307
+ </iframe>`},"putIntoIFrame"),ac=f((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",vB);return s&&o.attr("xmlns:xlink",s),o.append("g"),e},"appendDivSvgG");function nn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}f(nn,"sandboxedIframe");var HB=f((e,t,r,i)=>{var s,a,o;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),YB=f(async function(e,t,r){var Y,H,I,A,B,M;Ea();const i=nl(t);t=i.code;const s=vt();z.debug(s),t.length>((s==null?void 0:s.maxTextSize)??SB)&&(t=wB);const a=`#${e}`,o="i"+e,n="#"+o,l="d"+e,h="#"+l,c=f(()=>{const S=ht(p?n:h).node();S&&"remove"in S&&S.remove()},"removeTempElements");let u=ht(document.body);const p=s.securityLevel===_B,d=s.securityLevel===BB,g=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const F=nn(ht(r),o);u=ht(F.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=ht(r);ac(u,e,l,`font-family: ${g}`,LB)}else{if(HB(document,e,l,o),p){const F=nn(ht(document.body),o);u=ht(F.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=ht("body");ac(u,e,l)}let m,y;try{m=await on.fromText(t,{title:i.title})}catch(F){if(s.suppressErrorRendering)throw c(),F;m=await on.fromText("error"),y=F}const C=u.select(h).node(),b=m.type,k=C.firstChild,_=k.firstChild,w=(H=(Y=m.renderer).getClasses)==null?void 0:H.call(Y,t,m),v=qB(s,b,w,a),$=document.createElement("style");$.innerHTML=v,k.insertBefore($,_);try{await m.renderer.draw(t,e,"11.15.0",m)}catch(F){throw s.suppressErrorRendering?c():u_.draw(t,e,"11.15.0"),F}const E=u.select(`${h} svg`),W=(A=(I=m.db).getAccTitle)==null?void 0:A.call(I),P=(M=(B=m.db).getAccDescription)==null?void 0:M.call(B);gm(b,E,W,P),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",FB);let O=u.select(h).node().innerHTML;if(z.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),O=WB(O,p,Ge(s.arrowMarkerAbsolute)),p){const F=u.select(h+" svg").node();O=zB(O,F)}else d||(O=oi.sanitize(O,{ADD_TAGS:DB,ADD_ATTR:RB,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(CB(),y)throw y;return c(),{diagramType:b,svg:O,bindFunctions:m.db.bindFunctions}},"render");function pm(e={}){var i;const t=Dt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),t0(t),t!=null&&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"?Jy(t):xc();ln(r.logLevel),Ea()}f(pm,"initialize");var fm=f((e,t={})=>{const{code:r}=ol(e);return on.fromText(r,t)},"getDiagramFromText");function gm(e,t,r,i){lm(t,e),hm(t,r,i,t.attr("id"))}f(gm,"addA11yInfo");var wr=Object.freeze({render:YB,parse:dm,getDiagramFromText:fm,initialize:pm,getConfig:vt,setConfig:bc,getSiteConfig:xc,updateSiteConfig:e0,reset:f(()=>{qs()},"reset"),globalReset:f(()=>{qs(ni)},"globalReset"),defaultConfig:ni});ln(vt().logLevel);qs(vt());var UB=f((e,t,r)=>{z.warn(e),Hn(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"),mm=f(async function(e={querySelector:".mermaid"}){try{await GB(e)}catch(t){if(Hn(t)&&z.error(t.str),oe.parseError&&oe.parseError(t),!e.suppressErrors)throw z.error("Use the suppressErrors option to suppress these errors"),t}},"run"),GB=f(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=wr.getConfig();z.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");z.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(z.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),wr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new xe.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(s)){if(z.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${a.next()}`;o=l.innerHTML,o=Ip(xe.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const c=xe.detectInit(o);c&&z.debug("Detected early reinit: ",c);try{const{svg:u,bindFunctions:p}=await bm(h,o,l);l.innerHTML=u,e&&await e(h),p&&p(l)}catch(u){UB(u,n,oe.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),ym=f(function(e){wr.initialize(e)},"initialize"),jB=f(async function(e,t,r){z.warn("mermaid.init is deprecated. Please use run instead."),e&&ym(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await mm(i)},"init"),XB=f(async(e,{lazyLoad:t=!0}={})=>{Ea(),po(...e),t===!1&&await mB()},"registerExternalDiagrams"),Cm=f(function(){if(oe.startOnLoad){const{startOnLoad:e}=wr.getConfig();e&&oe.run().catch(t=>z.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Cm,!1);var VB=f(function(e){oe.parseError=e},"setParseErrorHandler"),fa=[],ho=!1,xm=f(async()=>{if(!ho){for(ho=!0;fa.length>0;){const e=fa.shift();if(e)try{await e()}catch(t){z.error("Error executing queue",t)}}ho=!1}},"executeQueue"),ZB=f(async(e,t)=>new Promise((r,i)=>{const s=f(()=>new Promise((a,o)=>{wr.parse(e,t).then(n=>{a(n),r(n)},n=>{var l;z.error("Error parsing",n),(l=oe.parseError)==null||l.call(oe,n),o(n),i(n)})}),"performCall");fa.push(s),xm().catch(i)}),"parse"),bm=f((e,t,r)=>new Promise((i,s)=>{const a=f(()=>new Promise((o,n)=>{wr.render(e,t,r).then(l=>{o(l),i(l)},l=>{var h;z.error("Error parsing",l),(h=oe.parseError)==null||h.call(oe,l),n(l),s(l)})}),"performCall");fa.push(a),xm().catch(s)}),"render"),KB=f(()=>Object.keys(Cr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),oe={startOnLoad:!0,mermaidAPI:wr,parse:ZB,render:bm,init:jB,run:mm,registerExternalDiagrams:XB,registerLayoutLoaders:Lg,initialize:ym,parseError:void 0,contentLoaded:Cm,setParseErrorHandler:VB,detectType:hn,registerIconPacks:bT,getRegisteredDiagramsMetadata:KB},QB=oe;/*! Check if previously processed *//*!
308
308
  * Wait for document loaded before starting the execution
309
- */const Av=Object.freeze(Object.defineProperty({__proto__:null,default:JB},Symbol.toStringTag,{value:"Module"}));export{Fc as $,av as A,Qe as B,Um as C,vt as D,E0 as E,Yn as F,yc as G,o2 as H,ck as I,m1 as J,Dy as K,Wi as L,iv as M,wa as N,u0 as O,vc as P,zl as Q,ek as R,Lo as S,a2 as T,Qi as U,Te as V,D as W,R as X,x0 as Y,K1 as Z,f as _,_0 as a,_S as a$,Kb as a0,Tn as a1,hv as a2,dv as a3,Ir as a4,lh as a5,nh as a6,fv as a7,pv as a8,uv as a9,B1 as aA,P1 as aB,R1 as aC,D1 as aD,q1 as aE,N1 as aF,_1 as aG,hp as aH,E1 as aI,F1 as aJ,L1 as aK,cp as aL,C1 as aM,Jt as aN,je as aO,ki as aP,Un as aQ,yp as aR,Tr as aS,kp as aT,lc as aU,ZS as aV,_v as aW,vv as aX,Sv as aY,K as aZ,wv as a_,nv as aa,lv as ab,cv as ac,mv as ad,gv as ae,XT as af,wg as ag,Bv as ah,at as ai,Me as aj,zn as ak,X as al,ST as am,Rn as an,In as ao,Os as ap,I1 as aq,O1 as ar,$1 as as,M1 as at,w1 as au,np as av,v1 as aw,S1 as ax,A1 as ay,lp as az,w0 as b,bS as b0,xS as b1,Qb as b2,rv as b3,as as b4,kT as b5,bT as b6,Cn as b7,Ze as b8,Yi as b9,eh as ba,Ex as bb,Z as bc,Tp as bd,se as be,wx as bf,yn as bg,Hc as bh,es as bi,Gc as bj,ov as bk,Ym as bl,Av as bm,yt as c,ht as d,Lc as e,Dt as f,v0 as g,Ue as h,ke as i,k1 as j,Ji as k,z as l,xp as m,sv as n,Fv as o,L0 as p,F0 as q,Lv as r,B0 as s,y1 as t,xe as u,fS as v,h2 as w,yv as x,oi as y,S0 as z};
309
+ */const Fv=Object.freeze(Object.defineProperty({__proto__:null,default:QB},Symbol.toStringTag,{value:"Module"}));export{Fc as $,sv as A,Qe as B,Ym as C,vt as D,A0 as E,Yn as F,yc as G,a2 as H,hk as I,g1 as J,Iy as K,Wi as L,rv as M,wa as N,c0 as O,vc as P,zl as Q,tk as R,Lo as S,s2 as T,Qi as U,Te as V,D as W,R as X,C0 as Y,Z1 as Z,f as _,w0 as a,wS as a$,Zb as a0,Tn as a1,lv as a2,uv as a3,Ir as a4,lh as a5,nh as a6,pv as a7,dv as a8,cv as a9,_1 as aA,R1 as aB,D1 as aC,I1 as aD,N1 as aE,P1 as aF,w1 as aG,hp as aH,A1 as aI,L1 as aJ,v1 as aK,cp as aL,y1 as aM,Jt as aN,je as aO,ki as aP,Un as aQ,yp as aR,Tr as aS,kp as aT,lc as aU,VS as aV,wv as aW,Bv as aX,Tv as aY,K as aZ,Sv as a_,ov as aa,nv as ab,hv as ac,gv as ad,fv as ae,jT as af,wg as ag,_v as ah,at as ai,Me as aj,zn as ak,X as al,TT as am,Rn as an,In as ao,Os as ap,O1 as aq,$1 as ar,M1 as as,E1 as at,S1 as au,np as av,B1 as aw,T1 as ax,F1 as ay,lp as az,S0 as b,xS as b0,CS as b1,Kb as b2,ev as b3,as as b4,bT as b5,xT as b6,Cn as b7,Ze as b8,Yi as b9,eh as ba,Ax as bb,Z as bc,Tp as bd,se as be,Sx as bf,yn as bg,Hc as bh,es as bi,Gc as bj,av as bk,Hm as bl,Fv as bm,yt as c,ht as d,Lc as e,Dt as f,B0 as g,Ue as h,ke as i,b1 as j,Ji as k,z as l,xp as m,iv as n,Lv as o,v0 as p,L0 as q,vv as r,_0 as s,m1 as t,xe as u,pS as v,l2 as w,mv as x,oi as y,T0 as z};