@hardikg/mdview 0.7.0 → 0.7.1

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 (57) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/bin/mdview.mjs +4 -4
  3. package/dist/client/assets/{arc-ycQp8V_W.js → arc-DYMLyL-_.js} +1 -1
  4. package/dist/client/assets/{architectureDiagram-3BPJPVTR-CGT8FovT.js → architectureDiagram-3BPJPVTR-iXijJkGs.js} +1 -1
  5. package/dist/client/assets/{blockDiagram-GPEHLZMM-N8A4M5KF.js → blockDiagram-GPEHLZMM-Dmjj2Ajf.js} +1 -1
  6. package/dist/client/assets/{c4Diagram-AAUBKEIU-GOIrZjrm.js → c4Diagram-AAUBKEIU-kJb6eQJJ.js} +1 -1
  7. package/dist/client/assets/channel-DirF0LQF.js +1 -0
  8. package/dist/client/assets/{chunk-2J33WTMH-DMiX8NYo.js → chunk-2J33WTMH-T3vdO-20.js} +1 -1
  9. package/dist/client/assets/{chunk-4BX2VUAB-BXnUK3rw.js → chunk-4BX2VUAB-By-ok8D7.js} +1 -1
  10. package/dist/client/assets/{chunk-55IACEB6-BkF4Ba-V.js → chunk-55IACEB6-BDUDnCl9.js} +1 -1
  11. package/dist/client/assets/{chunk-727SXJPM-DKPIb06m.js → chunk-727SXJPM-Bj1JFNtT.js} +1 -1
  12. package/dist/client/assets/{chunk-AQP2D5EJ-BFOc87IV.js → chunk-AQP2D5EJ-BPZWXvxS.js} +1 -1
  13. package/dist/client/assets/{chunk-FMBD7UC4-IM3YKAF3.js → chunk-FMBD7UC4-BYGwnUQ4.js} +1 -1
  14. package/dist/client/assets/{chunk-ND2GUHAM-UF3KQYdE.js → chunk-ND2GUHAM-TheCoD51.js} +1 -1
  15. package/dist/client/assets/{chunk-QZHKN3VN-OHnkQvdC.js → chunk-QZHKN3VN-Cd7CcXLC.js} +1 -1
  16. package/dist/client/assets/classDiagram-4FO5ZUOK-CdoMz3xi.js +1 -0
  17. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-CdoMz3xi.js +1 -0
  18. package/dist/client/assets/{cose-bilkent-S5V4N54A-D0XjEe4_.js → cose-bilkent-S5V4N54A-Br-CySzr.js} +1 -1
  19. package/dist/client/assets/{dagre-BM42HDAG-1wR5aSmA.js → dagre-BM42HDAG-DcIxclFu.js} +1 -1
  20. package/dist/client/assets/{diagram-2AECGRRQ-B8L1OTOq.js → diagram-2AECGRRQ-C0xPdtMR.js} +1 -1
  21. package/dist/client/assets/{diagram-5GNKFQAL-BPGoGDNx.js → diagram-5GNKFQAL-B9i7DtoQ.js} +1 -1
  22. package/dist/client/assets/{diagram-KO2AKTUF-Zu0g_DOV.js → diagram-KO2AKTUF-mwoLS2TK.js} +1 -1
  23. package/dist/client/assets/{diagram-LMA3HP47-bPbOm4sL.js → diagram-LMA3HP47-4o7ohGjJ.js} +1 -1
  24. package/dist/client/assets/{diagram-OG6HWLK6-DWW4aJ4C.js → diagram-OG6HWLK6-C6rhUBe2.js} +1 -1
  25. package/dist/client/assets/{erDiagram-TEJ5UH35-CUsMs05D.js → erDiagram-TEJ5UH35-smNcu7Lp.js} +1 -1
  26. package/dist/client/assets/{flowDiagram-I6XJVG4X-DZCURXAw.js → flowDiagram-I6XJVG4X-CPuYTxJr.js} +1 -1
  27. package/dist/client/assets/{ganttDiagram-6RSMTGT7-CzMfUd_H.js → ganttDiagram-6RSMTGT7-xaV0Djok.js} +1 -1
  28. package/dist/client/assets/{gitGraphDiagram-PVQCEYII-Du_KX2ik.js → gitGraphDiagram-PVQCEYII-eN40bRnz.js} +1 -1
  29. package/dist/client/assets/index-Cmcberpw.css +1 -0
  30. package/dist/client/assets/index-OFdfWE8x.js +2 -0
  31. package/dist/client/assets/{infoDiagram-5YYISTIA-D81JEsUe.js → infoDiagram-5YYISTIA-xm1BEpfJ.js} +1 -1
  32. package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-DwkHFgb8.js → ishikawaDiagram-YF4QCWOH-BDIzsJJZ.js} +1 -1
  33. package/dist/client/assets/{journeyDiagram-JHISSGLW-nEajRNFZ.js → journeyDiagram-JHISSGLW-BfWwpj1w.js} +1 -1
  34. package/dist/client/assets/{kanban-definition-UN3LZRKU-Dvn5P58B.js → kanban-definition-UN3LZRKU-Cuij1uoR.js} +1 -1
  35. package/dist/client/assets/{linear-BYNRmGYt.js → linear-CZOgGL8m.js} +1 -1
  36. package/dist/client/assets/{mermaid.core-BJg17JjK.js → mermaid.core-B1i-ZGkv.js} +70 -69
  37. package/dist/client/assets/{mindmap-definition-RKZ34NQL-WIFgsLLz.js → mindmap-definition-RKZ34NQL-BbNc5LRE.js} +1 -1
  38. package/dist/client/assets/{pieDiagram-4H26LBE5-DMgTQVGJ.js → pieDiagram-4H26LBE5-oB2YhWwR.js} +1 -1
  39. package/dist/client/assets/{quadrantDiagram-W4KKPZXB-B0Gh1bMy.js → quadrantDiagram-W4KKPZXB-CmJGRE1L.js} +1 -1
  40. package/dist/client/assets/{requirementDiagram-4Y6WPE33-DcIINxfV.js → requirementDiagram-4Y6WPE33-Dp-nBLhC.js} +1 -1
  41. package/dist/client/assets/{sankeyDiagram-5OEKKPKP-CDnHepHs.js → sankeyDiagram-5OEKKPKP-DB5dqk7n.js} +1 -1
  42. package/dist/client/assets/{sequenceDiagram-3UESZ5HK-D7MMEHjm.js → sequenceDiagram-3UESZ5HK-jmqrpzCx.js} +1 -1
  43. package/dist/client/assets/{stateDiagram-AJRCARHV-Dvdvjjk8.js → stateDiagram-AJRCARHV-U6m2A9Wk.js} +1 -1
  44. package/dist/client/assets/stateDiagram-v2-BHNVJYJU-00c0MW6J.js +1 -0
  45. package/dist/client/assets/{timeline-definition-PNZ67QCA-DYWt9asA.js → timeline-definition-PNZ67QCA-uVQ-oiv8.js} +1 -1
  46. package/dist/client/assets/{vennDiagram-CIIHVFJN-Bt0VUni_.js → vennDiagram-CIIHVFJN-By-tXl41.js} +1 -1
  47. package/dist/client/assets/{wardley-L42UT6IY-DVy2v9KS.js → wardley-L42UT6IY-ByB1C5d8.js} +1 -1
  48. package/dist/client/assets/{wardleyDiagram-YWT4CUSO-Ch7IIKOr.js → wardleyDiagram-YWT4CUSO-BQMj40Ao.js} +1 -1
  49. package/dist/client/assets/{xychartDiagram-2RQKCTM6-Byds5kce.js → xychartDiagram-2RQKCTM6-7czjL7-G.js} +1 -1
  50. package/dist/client/index.html +2 -2
  51. package/package.json +1 -1
  52. package/dist/client/assets/channel-DsJAWOzB.js +0 -1
  53. package/dist/client/assets/classDiagram-4FO5ZUOK-BD7T43t0.js +0 -1
  54. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-BD7T43t0.js +0 -1
  55. package/dist/client/assets/index-BCdIdRge.js +0 -2
  56. package/dist/client/assets/index-_GInkOX2.css +0 -1
  57. package/dist/client/assets/stateDiagram-v2-BHNVJYJU-I2g3TqMC.js +0 -1
@@ -1,8 +1,9 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-BM42HDAG-1wR5aSmA.js","assets/graph-CAnANduQ.js","assets/layout-DGIYPm2g.js","assets/index-BCdIdRge.js","assets/index-_GInkOX2.css","assets/cose-bilkent-S5V4N54A-D0XjEe4_.js","assets/cytoscape.esm-D_LviqZs.js","assets/c4Diagram-AAUBKEIU-GOIrZjrm.js","assets/chunk-ND2GUHAM-UF3KQYdE.js","assets/flowDiagram-I6XJVG4X-DZCURXAw.js","assets/chunk-FMBD7UC4-IM3YKAF3.js","assets/chunk-55IACEB6-BkF4Ba-V.js","assets/chunk-2J33WTMH-DMiX8NYo.js","assets/channel-DsJAWOzB.js","assets/erDiagram-TEJ5UH35-CUsMs05D.js","assets/gitGraphDiagram-PVQCEYII-Du_KX2ik.js","assets/chunk-4BX2VUAB-BXnUK3rw.js","assets/chunk-QZHKN3VN-OHnkQvdC.js","assets/wardley-L42UT6IY-DVy2v9KS.js","assets/ganttDiagram-6RSMTGT7-CzMfUd_H.js","assets/linear-BYNRmGYt.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-5YYISTIA-D81JEsUe.js","assets/pieDiagram-4H26LBE5-DMgTQVGJ.js","assets/arc-ycQp8V_W.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-W4KKPZXB-B0Gh1bMy.js","assets/xychartDiagram-2RQKCTM6-Byds5kce.js","assets/requirementDiagram-4Y6WPE33-DcIINxfV.js","assets/sequenceDiagram-3UESZ5HK-D7MMEHjm.js","assets/classDiagram-4FO5ZUOK-BD7T43t0.js","assets/chunk-727SXJPM-DKPIb06m.js","assets/classDiagram-v2-Q7XG4LA2-BD7T43t0.js","assets/stateDiagram-AJRCARHV-Dvdvjjk8.js","assets/chunk-AQP2D5EJ-BFOc87IV.js","assets/stateDiagram-v2-BHNVJYJU-I2g3TqMC.js","assets/journeyDiagram-JHISSGLW-nEajRNFZ.js","assets/timeline-definition-PNZ67QCA-DYWt9asA.js","assets/mindmap-definition-RKZ34NQL-WIFgsLLz.js","assets/kanban-definition-UN3LZRKU-Dvn5P58B.js","assets/sankeyDiagram-5OEKKPKP-CDnHepHs.js","assets/diagram-LMA3HP47-bPbOm4sL.js","assets/diagram-2AECGRRQ-B8L1OTOq.js","assets/blockDiagram-GPEHLZMM-N8A4M5KF.js","assets/diagram-5GNKFQAL-BPGoGDNx.js","assets/architectureDiagram-3BPJPVTR-CGT8FovT.js","assets/diagram-KO2AKTUF-Zu0g_DOV.js","assets/ishikawaDiagram-YF4QCWOH-DwkHFgb8.js","assets/vennDiagram-CIIHVFJN-Bt0VUni_.js","assets/diagram-OG6HWLK6-DWW4aJ4C.js","assets/wardleyDiagram-YWT4CUSO-Ch7IIKOr.js"])))=>i.map(i=>d[i]);
2
- var Km=Object.defineProperty;var Qm=(e,t,r)=>t in e?Km(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var xt=(e,t,r)=>Qm(e,typeof t!="symbol"?t+"":t,r);import{_ as ft}from"./index-BCdIdRge.js";function Jm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Es={exports:{}},ty=Es.exports,ql;function ey(){return ql||(ql=1,(function(e,t){(function(r,i){e.exports=i()})(ty,(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",m="date",g="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 E=["th","st","nd","rd"],F=I%100;return"["+I+(E[(F-20)%10]||E[F]||E[0])+"]"}},k=function(I,E,F){var O=String(I);return!O||O.length>=E?I:""+Array(E+1-O.length).join(F)+I},T={s:k,z:function(I){var E=-I.utcOffset(),F=Math.abs(E),O=Math.floor(F/60),A=F%60;return(E<=0?"+":"-")+k(O,2,"0")+":"+k(A,2,"0")},m:function I(E,F){if(E.date()<F.date())return-I(F,E);var O=12*(F.year()-E.year())+(F.month()-E.month()),A=E.clone().add(O,u),S=F-A<0,N=E.clone().add(O+(S?-1:1),u);return+(-(O+(F-A)/(S?A-N:N-A))||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:m,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",B={};B[w]=b;var $="$isDayjsObject",v=function(I){return I instanceof Y||!(!I||!I[$])},W=function I(E,F,O){var A;if(!E)return w;if(typeof E=="string"){var S=E.toLowerCase();B[S]&&(A=S),F&&(B[S]=F,A=S);var N=E.split("-");if(!A&&N.length>1)return I(N[0])}else{var Z=E.name;B[Z]=E,A=Z}return!O&&A&&(w=A),A||!O&&w},P=function(I,E){if(v(I))return I.clone();var F=typeof E=="object"?E:{};return F.date=I,F.args=arguments,new Y(F)},M=T;M.l=W,M.i=v,M.w=function(I,E){return P(I,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var Y=(function(){function I(F){this.$L=W(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[$]=!0}var E=I.prototype;return E.parse=function(F){this.$d=(function(O){var A=O.date,S=O.utc;if(A===null)return new Date(NaN);if(M.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var N=A.match(y);if(N){var Z=N[2]-1||0,ut=(N[7]||"0").substring(0,3);return S?new Date(Date.UTC(N[1],Z,N[3]||1,N[4]||0,N[5]||0,N[6]||0,ut)):new Date(N[1],Z,N[3]||1,N[4]||0,N[5]||0,N[6]||0,ut)}}return new Date(A)})(F),this.init()},E.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},E.$utils=function(){return M},E.isValid=function(){return this.$d.toString()!==g},E.isSame=function(F,O){var A=P(F);return this.startOf(O)<=A&&A<=this.endOf(O)},E.isAfter=function(F,O){return P(F)<this.startOf(O)},E.isBefore=function(F,O){return this.endOf(O)<P(F)},E.$g=function(F,O,A){return M.u(F)?this[O]:this.set(A,F)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(F,O){var A=this,S=!!M.u(O)||O,N=M.p(F),Z=function(oe,Q){var lt=M.w(A.$u?Date.UTC(A.$y,Q,oe):new Date(A.$y,Q,oe),A);return S?lt:lt.endOf(h)},ut=function(oe,Q){return M.w(A.toDate()[oe].apply(A.toDate("s"),(S?[0,0,0,0]:[23,59,59,999]).slice(Q)),A)},it=this.$W,dt=this.$M,tt=this.$D,bt="set"+(this.$u?"UTC":"");switch(N){case d:return S?Z(1,0):Z(31,11);case u:return S?Z(1,dt):Z(0,dt+1);case c:var Lt=this.$locale().weekStart||0,Mt=(it<Lt?it+7:it)-Lt;return Z(S?tt-Mt:tt+(6-Mt),dt);case h:case m:return ut(bt+"Hours",0);case l:return ut(bt+"Minutes",1);case n:return ut(bt+"Seconds",2);case o:return ut(bt+"Milliseconds",3);default:return this.clone()}},E.endOf=function(F){return this.startOf(F,!1)},E.$set=function(F,O){var A,S=M.p(F),N="set"+(this.$u?"UTC":""),Z=(A={},A[h]=N+"Date",A[m]=N+"Date",A[u]=N+"Month",A[d]=N+"FullYear",A[l]=N+"Hours",A[n]=N+"Minutes",A[o]=N+"Seconds",A[a]=N+"Milliseconds",A)[S],ut=S===h?this.$D+(O-this.$W):O;if(S===u||S===d){var it=this.clone().set(m,1);it.$d[Z](ut),it.init(),this.$d=it.set(m,Math.min(this.$D,it.daysInMonth())).$d}else Z&&this.$d[Z](ut);return this.init(),this},E.set=function(F,O){return this.clone().$set(F,O)},E.get=function(F){return this[M.p(F)]()},E.add=function(F,O){var A,S=this;F=Number(F);var N=M.p(O),Z=function(dt){var tt=P(S);return M.w(tt.date(tt.date()+Math.round(dt*F)),S)};if(N===u)return this.set(u,this.$M+F);if(N===d)return this.set(d,this.$y+F);if(N===h)return Z(1);if(N===c)return Z(7);var ut=(A={},A[n]=i,A[l]=s,A[o]=r,A)[N]||1,it=this.$d.getTime()+F*ut;return M.w(it,this)},E.subtract=function(F,O){return this.add(-1*F,O)},E.format=function(F){var O=this,A=this.$locale();if(!this.isValid())return A.invalidDate||g;var S=F||"YYYY-MM-DDTHH:mm:ssZ",N=M.z(this),Z=this.$H,ut=this.$m,it=this.$M,dt=A.weekdays,tt=A.months,bt=A.meridiem,Lt=function(Q,lt,Ct,kt){return Q&&(Q[lt]||Q(O,S))||Ct[lt].slice(0,kt)},Mt=function(Q){return M.s(Z%12||12,Q,"0")},oe=bt||function(Q,lt,Ct){var kt=Q<12?"AM":"PM";return Ct?kt.toLowerCase():kt};return S.replace(C,(function(Q,lt){return lt||(function(Ct){switch(Ct){case"YY":return String(O.$y).slice(-2);case"YYYY":return M.s(O.$y,4,"0");case"M":return it+1;case"MM":return M.s(it+1,2,"0");case"MMM":return Lt(A.monthsShort,it,tt,3);case"MMMM":return Lt(tt,it);case"D":return O.$D;case"DD":return M.s(O.$D,2,"0");case"d":return String(O.$W);case"dd":return Lt(A.weekdaysMin,O.$W,dt,2);case"ddd":return Lt(A.weekdaysShort,O.$W,dt,3);case"dddd":return dt[O.$W];case"H":return String(Z);case"HH":return M.s(Z,2,"0");case"h":return Mt(1);case"hh":return Mt(2);case"a":return oe(Z,ut,!0);case"A":return oe(Z,ut,!1);case"m":return String(ut);case"mm":return M.s(ut,2,"0");case"s":return String(O.$s);case"ss":return M.s(O.$s,2,"0");case"SSS":return M.s(O.$ms,3,"0");case"Z":return N}return null})(Q)||N.replace(":","")}))},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(F,O,A){var S,N=this,Z=M.p(O),ut=P(F),it=(ut.utcOffset()-this.utcOffset())*i,dt=this-ut,tt=function(){return M.m(N,ut)};switch(Z){case d:S=tt()/12;break;case u:S=tt();break;case p:S=tt()/3;break;case c:S=(dt-it)/6048e5;break;case h:S=(dt-it)/864e5;break;case l:S=dt/s;break;case n:S=dt/i;break;case o:S=dt/r;break;default:S=dt}return A?S:M.a(S)},E.daysInMonth=function(){return this.endOf(u).$D},E.$locale=function(){return B[this.$L]},E.locale=function(F,O){if(!F)return this.$L;var A=this.clone(),S=W(F,O,!0);return S&&(A.$L=S),A},E.clone=function(){return M.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},I})(),z=Y.prototype;return P.prototype=z,[["$ms",a],["$s",o],["$m",n],["$H",l],["$W",h],["$M",u],["$y",d],["$D",m]].forEach((function(I){z[I[1]]=function(E){return this.$g(E,I[0],I[1])}})),P.extend=function(I,E){return I.$i||(I(E,Y,P),I.$i=!0),P},P.locale=W,P.isDayjs=v,P.unix=function(I){return P(1e3*I)},P.en=B[w],P.Ls=B,P.p={},P}))})(Es)),Es.exports}var ry=ey();const iy=Jm(ry);var kc=Object.defineProperty,f=(e,t)=>kc(e,"name",{value:t,configurable:!0}),sy=(e,t)=>{for(var r in t)kc(e,r,{get:t[r],enumerable:!0})},qe={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},q={trace:f((...e)=>{},"trace"),debug:f((...e)=>{},"debug"),info:f((...e)=>{},"info"),warn:f((...e)=>{},"warn"),error:f((...e)=>{},"error"),fatal:f((...e)=>{},"fatal")},bn=f(function(e="fatal"){let t=qe.fatal;typeof e=="string"?e.toLowerCase()in qe&&(t=qe[e]):typeof e=="number"&&(t=e),q.trace=()=>{},q.debug=()=>{},q.info=()=>{},q.warn=()=>{},q.error=()=>{},q.fatal=()=>{},t<=qe.fatal&&(q.fatal=console.error?console.error.bind(console,de("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",de("FATAL"))),t<=qe.error&&(q.error=console.error?console.error.bind(console,de("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",de("ERROR"))),t<=qe.warn&&(q.warn=console.warn?console.warn.bind(console,de("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",de("WARN"))),t<=qe.info&&(q.info=console.info?console.info.bind(console,de("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",de("INFO"))),t<=qe.debug&&(q.debug=console.debug?console.debug.bind(console,de("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",de("DEBUG"))),t<=qe.trace&&(q.trace=console.debug?console.debug.bind(console,de("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",de("TRACE")))},"setLogLevel"),de=f(e=>`%c${iy().format("ss.SSS")} : ${e} : `,"format");const Ms={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 Ms.hue2rgb(a,s,e+1/3)*255;case"g":return Ms.hue2rgb(a,s,e)*255;case"b":return Ms.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}}},ay={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},oy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},nt={channel:Ms,lang:ay,unit:oy},Ke={};for(let e=0;e<=255;e++)Ke[e]=nt.unit.dec2hex(e);const Yt={ALL:0,RGB:1,HSL:2};class ny{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 ly{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new ny}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=nt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=nt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=nt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=nt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=nt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=nt.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(),nt.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(),nt.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(),nt.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(),nt.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(),nt.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(),nt.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 Ta=new ly({r:0,g:0,b:0,a:0},"transparent"),zr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(zr.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 Ta.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?`#${Ke[Math.round(t)]}${Ke[Math.round(r)]}${Ke[Math.round(i)]}${Ke[Math.round(s*255)]}`:`#${Ke[Math.round(t)]}${Ke[Math.round(r)]}${Ke[Math.round(i)]}`}},pr={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(pr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return nt.channel.clamp.h(parseFloat(r)*.9);case"rad":return nt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return nt.channel.clamp.h(parseFloat(r)*360)}}return nt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(pr.re);if(!r)return;const[,i,s,a,o,n]=r;return Ta.set({h:pr._hue2deg(i),s:nt.channel.clamp.s(parseFloat(s)),l:nt.channel.clamp.l(parseFloat(a)),a:o?nt.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(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%, ${s})`:`hsl(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%)`}},Ni={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=Ni.colors[e];if(t)return zr.parse(t)},stringify:e=>{const t=zr.stringify(e);for(const r in Ni.colors)if(Ni.colors[r]===t)return r}},Ai={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(Ai.re);if(!r)return;const[,i,s,a,o,n,l,h,c]=r;return Ta.set({r:nt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:nt.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:nt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:h?nt.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(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)}, ${nt.lang.round(s)})`:`rgb(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)})`}},Oe={format:{keyword:Ni,hex:zr,rgb:Ai,rgba:Ai,hsl:pr,hsla:pr},parse:e=>{if(typeof e!="string")return e;const t=zr.parse(e)||Ai.parse(e)||pr.parse(e)||Ni.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?pr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ai.stringify(e):zr.stringify(e)},Tc=(e,t)=>{const r=Oe.parse(e);for(const i in t)r[i]=nt.channel.clamp[i](t[i]);return Oe.stringify(r)},er=(e,t,r=0,i=1)=>{if(typeof e!="number")return Tc(e,{a:t});const s=Ta.set({r:nt.channel.clamp.r(e),g:nt.channel.clamp.g(t),b:nt.channel.clamp.b(r),a:nt.channel.clamp.a(i)});return Oe.stringify(s)},hy=e=>{const{r:t,g:r,b:i}=Oe.parse(e),s=.2126*nt.channel.toLinear(t)+.7152*nt.channel.toLinear(r)+.0722*nt.channel.toLinear(i);return nt.lang.round(s)},cy=e=>hy(e)>=.5,_e=e=>!cy(e),wc=(e,t,r)=>{const i=Oe.parse(e),s=i[t],a=nt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),Oe.stringify(i)},D=(e,t)=>wc(e,"l",t),R=(e,t)=>wc(e,"l",-t),x=(e,t)=>{const r=Oe.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Tc(e,i)},uy=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=Oe.parse(e),{r:n,g:l,b:h,a:c}=Oe.parse(t),u=r/100,p=u*2-1,d=o-c,g=((p*d===-1?p:(p+d)/(1+p*d))+1)/2,y=1-g,C=i*g+n*y,b=s*g+l*y,k=a*g+h*y,T=o*u+c*(1-u);return er(C,b,k,T)},L=(e,t=100)=>{const r=Oe.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,uy(r,e,t)};/*! @license DOMPurify 3.4.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.2/LICENSE */const{entries:Sc,setPrototypeOf:Wl,isFrozen:dy,getPrototypeOf:py,getOwnPropertyDescriptor:fy}=Object;let{freeze:Qt,seal:pe,create:Ir}=Object,{apply:xo,construct:bo}=typeof Reflect<"u"&&Reflect;Qt||(Qt=function(t){return t});pe||(pe=function(t){return t});xo||(xo=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)});bo||(bo=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 xi=Et(Array.prototype.forEach),gy=Et(Array.prototype.lastIndexOf),zl=Et(Array.prototype.pop),bi=Et(Array.prototype.push),my=Et(Array.prototype.splice),Vt=Array.isArray,Ei=Et(String.prototype.toLowerCase),Qa=Et(String.prototype.toString),Hl=Et(String.prototype.match),Er=Et(String.prototype.replace),Yl=Et(String.prototype.indexOf),yy=Et(String.prototype.trim),Cy=Et(Number.prototype.toString),xy=Et(Boolean.prototype.toString),Ul=typeof BigInt>"u"?null:Et(BigInt.prototype.toString),Gl=typeof Symbol>"u"?null:Et(Symbol.prototype.toString),Bt=Et(Object.prototype.hasOwnProperty),ki=Et(Object.prototype.toString),Nt=Et(RegExp.prototype.test),ys=by(TypeError);function Et(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return xo(e,t,i)}}function by(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return bo(e,r)}}function ht(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ei;if(Wl&&Wl(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&&(dy(t)||(t[i]=a),s=a)}e[s]=!0}return e}function ky(e){for(let t=0;t<e.length;t++)Bt(e,t)||(e[t]=null);return e}function re(e){const t=Ir(null);for(const[r,i]of Sc(e))Bt(e,r)&&(Vt(i)?t[r]=ky(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=re(i):t[r]=i);return t}function Ty(e){switch(typeof e){case"string":return e;case"number":return Cy(e);case"boolean":return xy(e);case"bigint":return Ul?Ul(e):"0";case"symbol":return Gl?Gl(e):"Symbol()";case"undefined":return ki(e);case"function":case"object":{if(e===null)return ki(e);const t=e,r=Dr(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:ki(i)}return ki(e)}default:return ki(e)}}function Dr(e,t){for(;e!==null;){const i=fy(e,t);if(i){if(i.get)return Et(i.get);if(typeof i.value=="function")return Et(i.value)}e=py(e)}function r(){return null}return r}function wy(e){try{return Nt(e,""),!0}catch{return!1}}const Xl=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"]),Ja=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"]),to=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"]),Sy=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"]),eo=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"]),_y=Qt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),jl=Qt(["#text"]),Vl=Qt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),ro=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"]),Zl=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"]),Cs=Qt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),By=pe(/\{\{[\w\W]*|[\w\W]*\}\}/gm),vy=pe(/<%[\w\W]*|[\w\W]*%>/gm),Ly=pe(/\$\{[\w\W]*/gm),Fy=pe(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ay=pe(/^aria-[\-\w]+$/),_c=pe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ey=pe(/^(?:\w+script|data):/i),My=pe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Bc=pe(/^html$/i),$y=pe(/^[a-z][.\w]*(-[.\w]+)+$/i);var Kl=Object.freeze({__proto__:null,ARIA_ATTR:Ay,ATTR_WHITESPACE:My,CUSTOM_ELEMENT:$y,DATA_ATTR:Fy,DOCTYPE_NAME:Bc,ERB_EXPR:vy,IS_ALLOWED_URI:_c,IS_SCRIPT_OR_DATA:Ey,MUSTACHE_EXPR:By,TMPLIT_EXPR:Ly});const Ti={element:1,text:3,progressingInstruction:7,comment:8,document:9},Oy=function(){return typeof window>"u"?null:window},Iy=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}},Ql=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function vc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Oy();const t=et=>vc(et);if(t.version="3.4.2",t.removed=[],!e||!e.document||e.document.nodeType!==Ti.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,s=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:n,Element:l,NodeFilter:h,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:p,trustedTypes:d}=e,m=l.prototype,g=Dr(m,"cloneNode"),y=Dr(m,"remove"),C=Dr(m,"nextSibling"),b=Dr(m,"childNodes"),k=Dr(m,"parentNode");if(typeof o=="function"){const et=r.createElement("template");et.content&&et.content.ownerDocument&&(r=et.content.ownerDocument)}let T,w="";const{implementation:B,createNodeIterator:$,createDocumentFragment:v,getElementsByTagName:W}=r,{importNode:P}=i;let M=Ql();t.isSupported=typeof Sc=="function"&&typeof k=="function"&&B&&B.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Y,ERB_EXPR:z,TMPLIT_EXPR:I,DATA_ATTR:E,ARIA_ATTR:F,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:A,CUSTOM_ELEMENT:S}=Kl;let{IS_ALLOWED_URI:N}=Kl,Z=null;const ut=ht({},[...Xl,...Ja,...to,...eo,...jl]);let it=null;const dt=ht({},[...Vl,...ro,...Zl,...Cs]);let tt=Object.seal(Ir(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}})),bt=null,Lt=null;const Mt=Object.seal(Ir(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let oe=!0,Q=!0,lt=!1,Ct=!0,kt=!1,ne=!0,zt=!1,vr=!1,ds=!1,ve=!1,ps=!1,fs=!1,Tl=!0,wl=!1;const Sl="user-content-";let Wa=!0,yi=!1,Lr={},Le=null;const za=ht({},["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 _l=null;const Bl=ht({},["audio","video","img","source","image","track"]);let Ha=null;const vl=ht({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),gs="http://www.w3.org/1998/Math/MathML",ms="http://www.w3.org/2000/svg",Fe="http://www.w3.org/1999/xhtml";let Fr=Fe,Ya=!1,Ua=null;const Ym=ht({},[gs,ms,Fe],Qa);let Ga=ht({},["mi","mo","mn","ms","mtext"]),Xa=ht({},["annotation-xml"]);const Um=ht({},["title","style","font","a","script"]);let Ci=null;const Gm=["application/xhtml+xml","text/html"],Xm="text/html";let $t=null,Ar=null;const jm=r.createElement("form"),Ll=function(_){return _ instanceof RegExp||_ instanceof Function},ja=function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ar&&Ar===_)return;(!_||typeof _!="object")&&(_={}),_=re(_),Ci=Gm.indexOf(_.PARSER_MEDIA_TYPE)===-1?Xm:_.PARSER_MEDIA_TYPE,$t=Ci==="application/xhtml+xml"?Qa:Ei,Z=Bt(_,"ALLOWED_TAGS")&&Vt(_.ALLOWED_TAGS)?ht({},_.ALLOWED_TAGS,$t):ut,it=Bt(_,"ALLOWED_ATTR")&&Vt(_.ALLOWED_ATTR)?ht({},_.ALLOWED_ATTR,$t):dt,Ua=Bt(_,"ALLOWED_NAMESPACES")&&Vt(_.ALLOWED_NAMESPACES)?ht({},_.ALLOWED_NAMESPACES,Qa):Ym,Ha=Bt(_,"ADD_URI_SAFE_ATTR")&&Vt(_.ADD_URI_SAFE_ATTR)?ht(re(vl),_.ADD_URI_SAFE_ATTR,$t):vl,_l=Bt(_,"ADD_DATA_URI_TAGS")&&Vt(_.ADD_DATA_URI_TAGS)?ht(re(Bl),_.ADD_DATA_URI_TAGS,$t):Bl,Le=Bt(_,"FORBID_CONTENTS")&&Vt(_.FORBID_CONTENTS)?ht({},_.FORBID_CONTENTS,$t):za,bt=Bt(_,"FORBID_TAGS")&&Vt(_.FORBID_TAGS)?ht({},_.FORBID_TAGS,$t):re({}),Lt=Bt(_,"FORBID_ATTR")&&Vt(_.FORBID_ATTR)?ht({},_.FORBID_ATTR,$t):re({}),Lr=Bt(_,"USE_PROFILES")?_.USE_PROFILES&&typeof _.USE_PROFILES=="object"?re(_.USE_PROFILES):_.USE_PROFILES:!1,oe=_.ALLOW_ARIA_ATTR!==!1,Q=_.ALLOW_DATA_ATTR!==!1,lt=_.ALLOW_UNKNOWN_PROTOCOLS||!1,Ct=_.ALLOW_SELF_CLOSE_IN_ATTR!==!1,kt=_.SAFE_FOR_TEMPLATES||!1,ne=_.SAFE_FOR_XML!==!1,zt=_.WHOLE_DOCUMENT||!1,ve=_.RETURN_DOM||!1,ps=_.RETURN_DOM_FRAGMENT||!1,fs=_.RETURN_TRUSTED_TYPE||!1,ds=_.FORCE_BODY||!1,Tl=_.SANITIZE_DOM!==!1,wl=_.SANITIZE_NAMED_PROPS||!1,Wa=_.KEEP_CONTENT!==!1,yi=_.IN_PLACE||!1,N=wy(_.ALLOWED_URI_REGEXP)?_.ALLOWED_URI_REGEXP:_c,Fr=typeof _.NAMESPACE=="string"?_.NAMESPACE:Fe,Ga=Bt(_,"MATHML_TEXT_INTEGRATION_POINTS")&&_.MATHML_TEXT_INTEGRATION_POINTS&&typeof _.MATHML_TEXT_INTEGRATION_POINTS=="object"?re(_.MATHML_TEXT_INTEGRATION_POINTS):ht({},["mi","mo","mn","ms","mtext"]),Xa=Bt(_,"HTML_INTEGRATION_POINTS")&&_.HTML_INTEGRATION_POINTS&&typeof _.HTML_INTEGRATION_POINTS=="object"?re(_.HTML_INTEGRATION_POINTS):ht({},["annotation-xml"]);const H=Bt(_,"CUSTOM_ELEMENT_HANDLING")&&_.CUSTOM_ELEMENT_HANDLING&&typeof _.CUSTOM_ELEMENT_HANDLING=="object"?re(_.CUSTOM_ELEMENT_HANDLING):Ir(null);if(tt=Ir(null),Bt(H,"tagNameCheck")&&Ll(H.tagNameCheck)&&(tt.tagNameCheck=H.tagNameCheck),Bt(H,"attributeNameCheck")&&Ll(H.attributeNameCheck)&&(tt.attributeNameCheck=H.attributeNameCheck),Bt(H,"allowCustomizedBuiltInElements")&&typeof H.allowCustomizedBuiltInElements=="boolean"&&(tt.allowCustomizedBuiltInElements=H.allowCustomizedBuiltInElements),kt&&(Q=!1),ps&&(ve=!0),Lr&&(Z=ht({},jl),it=Ir(null),Lr.html===!0&&(ht(Z,Xl),ht(it,Vl)),Lr.svg===!0&&(ht(Z,Ja),ht(it,ro),ht(it,Cs)),Lr.svgFilters===!0&&(ht(Z,to),ht(it,ro),ht(it,Cs)),Lr.mathMl===!0&&(ht(Z,eo),ht(it,Zl),ht(it,Cs))),Mt.tagCheck=null,Mt.attributeCheck=null,Bt(_,"ADD_TAGS")&&(typeof _.ADD_TAGS=="function"?Mt.tagCheck=_.ADD_TAGS:Vt(_.ADD_TAGS)&&(Z===ut&&(Z=re(Z)),ht(Z,_.ADD_TAGS,$t))),Bt(_,"ADD_ATTR")&&(typeof _.ADD_ATTR=="function"?Mt.attributeCheck=_.ADD_ATTR:Vt(_.ADD_ATTR)&&(it===dt&&(it=re(it)),ht(it,_.ADD_ATTR,$t))),Bt(_,"ADD_URI_SAFE_ATTR")&&Vt(_.ADD_URI_SAFE_ATTR)&&ht(Ha,_.ADD_URI_SAFE_ATTR,$t),Bt(_,"FORBID_CONTENTS")&&Vt(_.FORBID_CONTENTS)&&(Le===za&&(Le=re(Le)),ht(Le,_.FORBID_CONTENTS,$t)),Bt(_,"ADD_FORBID_CONTENTS")&&Vt(_.ADD_FORBID_CONTENTS)&&(Le===za&&(Le=re(Le)),ht(Le,_.ADD_FORBID_CONTENTS,$t)),Wa&&(Z["#text"]=!0),zt&&ht(Z,["html","head","body"]),Z.table&&(ht(Z,["tbody"]),delete bt.tbody),_.TRUSTED_TYPES_POLICY){if(typeof _.TRUSTED_TYPES_POLICY.createHTML!="function")throw ys('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof _.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ys('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=_.TRUSTED_TYPES_POLICY,w=T.createHTML("")}else T===void 0&&(T=Iy(d,s)),T!==null&&typeof w=="string"&&(w=T.createHTML(""));Qt&&Qt(_),Ar=_},Fl=ht({},[...Ja,...to,...Sy]),Al=ht({},[...eo,..._y]),Vm=function(_){let H=k(_);(!H||!H.tagName)&&(H={namespaceURI:Fr,tagName:"template"});const j=Ei(_.tagName),Tt=Ei(H.tagName);return Ua[_.namespaceURI]?_.namespaceURI===ms?H.namespaceURI===Fe?j==="svg":H.namespaceURI===gs?j==="svg"&&(Tt==="annotation-xml"||Ga[Tt]):!!Fl[j]:_.namespaceURI===gs?H.namespaceURI===Fe?j==="math":H.namespaceURI===ms?j==="math"&&Xa[Tt]:!!Al[j]:_.namespaceURI===Fe?H.namespaceURI===ms&&!Xa[Tt]||H.namespaceURI===gs&&!Ga[Tt]?!1:!Al[j]&&(Um[j]||!Fl[j]):!!(Ci==="application/xhtml+xml"&&Ua[_.namespaceURI]):!1},ge=function(_){bi(t.removed,{element:_});try{k(_).removeChild(_)}catch{y(_)}},lr=function(_,H){try{bi(t.removed,{attribute:H.getAttributeNode(_),from:H})}catch{bi(t.removed,{attribute:null,from:H})}if(H.removeAttribute(_),_==="is")if(ve||ps)try{ge(H)}catch{}else try{H.setAttribute(_,"")}catch{}},El=function(_){let H=null,j=null;if(ds)_="<remove></remove>"+_;else{const Ft=Hl(_,/^[\r\n\t ]+/);j=Ft&&Ft[0]}Ci==="application/xhtml+xml"&&Fr===Fe&&(_='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+_+"</body></html>");const Tt=T?T.createHTML(_):_;if(Fr===Fe)try{H=new p().parseFromString(Tt,Ci)}catch{}if(!H||!H.documentElement){H=B.createDocument(Fr,"template",null);try{H.documentElement.innerHTML=Ya?w:Tt}catch{}}const Ht=H.body||H.documentElement;return _&&j&&Ht.insertBefore(r.createTextNode(j),Ht.childNodes[0]||null),Fr===Fe?W.call(H,zt?"html":"body")[0]:zt?H.documentElement:Ht},Ml=function(_){return $.call(_.ownerDocument||_,_,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},Va=function(_){return _ instanceof u&&(typeof _.nodeName!="string"||typeof _.textContent!="string"||typeof _.removeChild!="function"||!(_.attributes instanceof c)||typeof _.removeAttribute!="function"||typeof _.setAttribute!="function"||typeof _.namespaceURI!="string"||typeof _.insertBefore!="function"||typeof _.hasChildNodes!="function")},Za=function(_){return typeof n=="function"&&_ instanceof n};function Ne(et,_,H){xi(et,j=>{j.call(t,_,H,Ar)})}const $l=function(_){let H=null;if(Ne(M.beforeSanitizeElements,_,null),Va(_))return ge(_),!0;const j=$t(_.nodeName);if(Ne(M.uponSanitizeElement,_,{tagName:j,allowedTags:Z}),ne&&_.hasChildNodes()&&!Za(_.firstElementChild)&&Nt(/<[/\w!]/g,_.innerHTML)&&Nt(/<[/\w!]/g,_.textContent)||ne&&_.namespaceURI===Fe&&j==="style"&&Za(_.firstElementChild)||_.nodeType===Ti.progressingInstruction||ne&&_.nodeType===Ti.comment&&Nt(/<[/\w]/g,_.data))return ge(_),!0;if(bt[j]||!(Mt.tagCheck instanceof Function&&Mt.tagCheck(j))&&!Z[j]){if(!bt[j]&&Il(j)&&(tt.tagNameCheck instanceof RegExp&&Nt(tt.tagNameCheck,j)||tt.tagNameCheck instanceof Function&&tt.tagNameCheck(j)))return!1;if(Wa&&!Le[j]){const Tt=k(_)||_.parentNode,Ht=b(_)||_.childNodes;if(Ht&&Tt){const Ft=Ht.length;for(let te=Ft-1;te>=0;--te){const ue=g(Ht[te],!0);Tt.insertBefore(ue,C(_))}}}return ge(_),!0}return _ instanceof l&&!Vm(_)||(j==="noscript"||j==="noembed"||j==="noframes")&&Nt(/<\/no(script|embed|frames)/i,_.innerHTML)?(ge(_),!0):(kt&&_.nodeType===Ti.text&&(H=_.textContent,xi([Y,z,I],Tt=>{H=Er(H,Tt," ")}),_.textContent!==H&&(bi(t.removed,{element:_.cloneNode()}),_.textContent=H)),Ne(M.afterSanitizeElements,_,null),!1)},Ol=function(_,H,j){if(Lt[H]||Tl&&(H==="id"||H==="name")&&(j in r||j in jm))return!1;const Tt=it[H]||Mt.attributeCheck instanceof Function&&Mt.attributeCheck(H,_);if(!(Q&&!Lt[H]&&Nt(E,H))){if(!(oe&&Nt(F,H))){if(!Tt||Lt[H]){if(!(Il(_)&&(tt.tagNameCheck instanceof RegExp&&Nt(tt.tagNameCheck,_)||tt.tagNameCheck instanceof Function&&tt.tagNameCheck(_))&&(tt.attributeNameCheck instanceof RegExp&&Nt(tt.attributeNameCheck,H)||tt.attributeNameCheck instanceof Function&&tt.attributeNameCheck(H,_))||H==="is"&&tt.allowCustomizedBuiltInElements&&(tt.tagNameCheck instanceof RegExp&&Nt(tt.tagNameCheck,j)||tt.tagNameCheck instanceof Function&&tt.tagNameCheck(j))))return!1}else if(!Ha[H]){if(!Nt(N,Er(j,A,""))){if(!((H==="src"||H==="xlink:href"||H==="href")&&_!=="script"&&Yl(j,"data:")===0&&_l[_])){if(!(lt&&!Nt(O,Er(j,A,"")))){if(j)return!1}}}}}}return!0},Zm=ht({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Il=function(_){return!Zm[Ei(_)]&&Nt(S,_)},Dl=function(_){Ne(M.beforeSanitizeAttributes,_,null);const{attributes:H}=_;if(!H||Va(_))return;const j={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:it,forceKeepAttr:void 0};let Tt=H.length;for(;Tt--;){const Ht=H[Tt],{name:Ft,namespaceURI:te,value:ue}=Ht,me=$t(Ft),Ka=ue;let Rt=Ft==="value"?Ka:yy(Ka);if(j.attrName=me,j.attrValue=Rt,j.keepAttr=!0,j.forceKeepAttr=void 0,Ne(M.uponSanitizeAttribute,_,j),Rt=j.attrValue,wl&&(me==="id"||me==="name")&&Yl(Rt,Sl)!==0&&(lr(Ft,_),Rt=Sl+Rt),ne&&Nt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Rt)){lr(Ft,_);continue}if(me==="attributename"&&Hl(Rt,"href")){lr(Ft,_);continue}if(j.forceKeepAttr)continue;if(!j.keepAttr){lr(Ft,_);continue}if(!Ct&&Nt(/\/>/i,Rt)){lr(Ft,_);continue}kt&&xi([Y,z,I],Nl=>{Rt=Er(Rt,Nl," ")});const Pl=$t(_.nodeName);if(!Ol(Pl,me,Rt)){lr(Ft,_);continue}if(T&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!te)switch(d.getAttributeType(Pl,me)){case"TrustedHTML":{Rt=T.createHTML(Rt);break}case"TrustedScriptURL":{Rt=T.createScriptURL(Rt);break}}if(Rt!==Ka)try{te?_.setAttributeNS(te,Ft,Rt):_.setAttribute(Ft,Rt),Va(_)?ge(_):zl(t.removed)}catch{lr(Ft,_)}}Ne(M.afterSanitizeAttributes,_,null)},Rl=function(_){let H=null;const j=Ml(_);for(Ne(M.beforeSanitizeShadowDOM,_,null);H=j.nextNode();)Ne(M.uponSanitizeShadowNode,H,null),$l(H),Dl(H),H.content instanceof a&&Rl(H.content);Ne(M.afterSanitizeShadowDOM,_,null)};return t.sanitize=function(et){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=null,j=null,Tt=null,Ht=null;if(Ya=!et,Ya&&(et="<!-->"),typeof et!="string"&&!Za(et)&&(et=Ty(et),typeof et!="string"))throw ys("dirty is not a string, aborting");if(!t.isSupported)return et;if(vr||ja(_),t.removed=[],typeof et=="string"&&(yi=!1),yi){const ue=et.nodeName;if(typeof ue=="string"){const me=$t(ue);if(!Z[me]||bt[me])throw ys("root node is forbidden and cannot be sanitized in-place")}}else if(et instanceof n)H=El("<!---->"),j=H.ownerDocument.importNode(et,!0),j.nodeType===Ti.element&&j.nodeName==="BODY"||j.nodeName==="HTML"?H=j:H.appendChild(j);else{if(!ve&&!kt&&!zt&&et.indexOf("<")===-1)return T&&fs?T.createHTML(et):et;if(H=El(et),!H)return ve?null:fs?w:""}H&&ds&&ge(H.firstChild);const Ft=Ml(yi?et:H);for(;Tt=Ft.nextNode();)$l(Tt),Dl(Tt),Tt.content instanceof a&&Rl(Tt.content);if(yi)return et;if(ve){if(kt){H.normalize();let ue=H.innerHTML;xi([Y,z,I],me=>{ue=Er(ue,me," ")}),H.innerHTML=ue}if(ps)for(Ht=v.call(H.ownerDocument);H.firstChild;)Ht.appendChild(H.firstChild);else Ht=H;return(it.shadowroot||it.shadowrootmode)&&(Ht=P.call(i,Ht,!0)),Ht}let te=zt?H.outerHTML:H.innerHTML;return zt&&Z["!doctype"]&&H.ownerDocument&&H.ownerDocument.doctype&&H.ownerDocument.doctype.name&&Nt(Bc,H.ownerDocument.doctype.name)&&(te="<!DOCTYPE "+H.ownerDocument.doctype.name+`>
3
- `+te),kt&&xi([Y,z,I],ue=>{te=Er(te,ue," ")}),T&&fs?T.createHTML(te):te},t.setConfig=function(){let et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ja(et),vr=!0},t.clearConfig=function(){Ar=null,vr=!1},t.isValidAttribute=function(et,_,H){Ar||ja({});const j=$t(et),Tt=$t(_);return Ol(j,Tt,H)},t.addHook=function(et,_){typeof _=="function"&&bi(M[et],_)},t.removeHook=function(et,_){if(_!==void 0){const H=gy(M[et],_);return H===-1?void 0:my(M[et],H,1)[0]}return zl(M[et])},t.removeHooks=function(et){M[et]=[]},t.removeAllHooks=function(){M=Ql()},t}var ai=vc(),Lc=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,qi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Dy=/\s*%%.*\n/gm,Ur,Fc=(Ur=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},f(Ur,"UnknownDiagramError"),Ur),xr={},kn=f(function(e,t){e=e.replace(Lc,"").replace(qi,"").replace(Dy,`
4
- `);for(const[r,{detector:i}]of Object.entries(xr))if(i(e,t))return r;throw new Fc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),ko=f((...e)=>{for(const{id:t,detector:r,loader:i}of e)Ac(t,r,i)},"registerLazyLoadedDiagrams"),Ac=f((e,t,r)=>{xr[e]&&q.warn(`Detector with key ${e} already exists. Overwriting.`),xr[e]={detector:t,loader:r},q.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Ry=f(e=>xr[e].loader,"getDiagramLoader"),To=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=>To(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]=To(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),It=To,De="#ffffff",Re="#f2f2f2",ot=f((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),Gr,Py=(Gr=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,m,g,y,C,b,k,T,w,B,$,v,W,P,M,Y,z,I,E,F,O,A,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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||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 N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScale"+N]=R(this["cScale"+N],75);else for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScale"+N]=R(this["cScale"+N],25);for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScaleInv"+N]=this["cScaleInv"+N]||L(this["cScale"+N]);for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this.darkMode?this["cScalePeer"+N]=this["cScalePeer"+N]||D(this["cScale"+N],10):this["cScalePeer"+N]=this["cScalePeer"+N]||R(this["cScale"+N],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScaleLabel"+N]=this["cScaleLabel"+N]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let N=0;N<5;N++)this["surface"+N]=this["surface"+N]||x(this.mainBkg,{h:180,s:-15,l:t*(5+N*3)}),this["surfacePeer"+N]=this["surfacePeer"+N]||x(this.mainBkg,{h:180,s:-15,l:t*(8+N*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:((m=this.wardley)==null?void 0:m.axisTextColor)||this.primaryTextColor,gridColor:((g=this.wardley)==null?void 0:g.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:((T=this.wardley)==null?void 0:T.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((w=this.wardley)==null?void 0:w.annotationStroke)||this.lineColor,annotationTextColor:((B=this.wardley)==null?void 0:B.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||_e(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:((v=this.xyChart)==null?void 0:v.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:((M=this.xyChart)==null?void 0:M.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Y=this.xyChart)==null?void 0:Y.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((z=this.xyChart)==null?void 0:z.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((I=this.xyChart)==null?void 0:I.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((E=this.xyChart)==null?void 0:E.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((F=this.xyChart)==null?void 0:F.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((O=this.xyChart)==null?void 0:O.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((A=this.xyChart)==null?void 0:A.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||De,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re,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(Gr,"Theme"),Gr),Ny=f(e=>{const t=new Py;return t.calculate(e),t},"getThemeVariables"),Xr,qy=(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=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(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=er(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=er(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=er(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,m,g,y,C,b,k,T,w,B,$,v,W,P,M,Y,z,I,E,F,O,A;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||_e(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:((m=this.radar)==null?void 0:m.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.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:((T=this.radar)==null?void 0:T.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:(($=this.wardley)==null?void 0:$.backgroundColor)||this.background,axisColor:((v=this.wardley)==null?void 0:v.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:((M=this.wardley)==null?void 0:M.componentFill)||this.mainBkg,componentStroke:((Y=this.wardley)==null?void 0:Y.componentStroke)||this.lineColor,componentLabelColor:((z=this.wardley)==null?void 0:z.componentLabelColor)||this.primaryTextColor,linkStroke:((I=this.wardley)==null?void 0:I.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((F=this.wardley)==null?void 0:F.annotationStroke)||this.lineColor,annotationTextColor:((O=this.wardley)==null?void 0:O.annotationTextColor)||this.primaryTextColor,annotationFill:((A=this.wardley)==null?void 0:A.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),Wy=f(e=>{const t=new qy;return t.calculate(e),t},"getThemeVariables"),jr,zy=(jr=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=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(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=ot(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=er(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,m,g,y,C,b,k,T,w,B,$,v,W,P,M,Y,z,I,E,F,O,A;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||_e(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:((m=this.wardley)==null?void 0:m.gridColor)||this.gridColor,componentFill:((g=this.wardley)==null?void 0:g.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:((T=this.wardley)==null?void 0:T.annotationStroke)||this.lineColor,annotationTextColor:((w=this.wardley)==null?void 0:w.annotationTextColor)||this.primaryTextColor,annotationFill:((B=this.wardley)==null?void 0:B.annotationFill)||this.background},this.xyChart={backgroundColor:(($=this.xyChart)==null?void 0:$.backgroundColor)||this.background,titleColor:((v=this.xyChart)==null?void 0:v.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:((M=this.xyChart)==null?void 0:M.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Y=this.xyChart)==null?void 0:Y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((z=this.xyChart)==null?void 0:z.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((I=this.xyChart)==null?void 0:I.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((F=this.xyChart)==null?void 0:F.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((O=this.xyChart)==null?void 0:O.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((A=this.xyChart)==null?void 0:A.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||De,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(jr,"Theme"),jr),Hy=f(e=>{const t=new zy;return t.calculate(e),t},"getThemeVariables"),Vr,Yy=(Vr=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=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(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,m,g,y,C,b,k,T,w,B,$,v,W,P,M,Y,z,I,E,F,O,A;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||_e(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:((m=this.wardley)==null?void 0:m.gridColor)||this.gridColor,componentFill:((g=this.wardley)==null?void 0:g.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:((T=this.wardley)==null?void 0:T.annotationStroke)||this.lineColor,annotationTextColor:((w=this.wardley)==null?void 0:w.annotationTextColor)||this.primaryTextColor,annotationFill:((B=this.wardley)==null?void 0:B.annotationFill)||this.background},this.xyChart={backgroundColor:(($=this.xyChart)==null?void 0:$.backgroundColor)||this.background,titleColor:((v=this.xyChart)==null?void 0:v.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:((M=this.xyChart)==null?void 0:M.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Y=this.xyChart)==null?void 0:Y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((z=this.xyChart)==null?void 0:z.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((I=this.xyChart)==null?void 0:I.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((F=this.xyChart)==null?void 0:F.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((O=this.xyChart)==null?void 0:O.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((A=this.xyChart)==null?void 0:A.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||De,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}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(Vr,"Theme"),Vr),Uy=f(e=>{const t=new Yy;return t.calculate(e),t},"getThemeVariables"),Zr,Gy=(Zr=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=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(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,m,g,y,C,b,k,T,w,B,$,v,W,P,M,Y,z,I,E,F,O,A;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||_e(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:((m=this.radar)==null?void 0:m.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.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:((T=this.radar)==null?void 0:T.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:(($=this.wardley)==null?void 0:$.backgroundColor)||this.background,axisColor:((v=this.wardley)==null?void 0:v.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:((M=this.wardley)==null?void 0:M.componentFill)||this.background,componentStroke:((Y=this.wardley)==null?void 0:Y.componentStroke)||this.lineColor,componentLabelColor:((z=this.wardley)==null?void 0:z.componentLabelColor)||this.primaryTextColor,linkStroke:((I=this.wardley)==null?void 0:I.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((F=this.wardley)==null?void 0:F.annotationStroke)||this.lineColor,annotationTextColor:((O=this.wardley)==null?void 0:O.annotationTextColor)||this.primaryTextColor,annotationFill:((A=this.wardley)==null?void 0:A.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||De,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}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),Xy=f(e=>{const t=new Gy;return t.calculate(e),t},"getThemeVariables"),Kr,jy=(Kr=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var a,o,n,l,h,c,u,p,d,m,g;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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||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||_e(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:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.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||De,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}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),Vy=f(e=>{const t=new jy;return t.calculate(e),t},"getThemeVariables"),Qr,Zy=(Qr=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=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(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=er(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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||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||_e(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||De,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}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),Ky=f(e=>{const t=new Zy;return t.calculate(e),t},"getThemeVariables"),Jr,Qy=(Jr=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ot("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var a,o,n,l,h,c,u,p,d,m,g;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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||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||_e(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:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.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||De,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}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),Jy=f(e=>{const t=new Qy;return t.calculate(e),t},"getThemeVariables"),ti,t0=(ti=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=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(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=er(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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||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||_e(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||De,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}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),e0=f(e=>{const t=new t0;return t.calculate(e),t},"getThemeVariables"),ei,r0=(ei=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var a,o,n,l,h,c,u,p,d,m,g;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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||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||_e(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:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.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||De,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}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),i0=f(e=>{const t=new r0;return t.calculate(e),t},"getThemeVariables"),ri,s0=(ri=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=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(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=er(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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||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||_e(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||De,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}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),a0=f(e=>{const t=new s0;return t.calculate(e),t},"getThemeVariables"),Ye={base:{getThemeVariables:Ny},dark:{getThemeVariables:Wy},default:{getThemeVariables:Hy},forest:{getThemeVariables:Uy},neutral:{getThemeVariables:Xy},neo:{getThemeVariables:Vy},"neo-dark":{getThemeVariables:Ky},redux:{getThemeVariables:Jy},"redux-dark":{getThemeVariables:e0},"redux-color":{getThemeVariables:i0},"redux-dark-color":{getThemeVariables:a0}},jt={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},Ec={...jt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Ye.default.getThemeVariables(),sequence:{...jt.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:{...jt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...jt.c4,useWidth:void 0,personFont:f(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...jt.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:{...jt.pie,useWidth:984},xyChart:{...jt.xyChart,useWidth:void 0},requirement:{...jt.requirement,useWidth:void 0},packet:{...jt.packet},eventmodeling:{...jt.eventmodeling},treeView:{...jt.treeView,useWidth:void 0},radar:{...jt.radar},ishikawa:{...jt.ishikawa},sankey:{...jt.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:{...jt.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"),o0=new Set(Mc(Ec,"")),$c=Ec,Us=f(e=>{if(q.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Us(t));return}for(const t of Object.keys(e)){if(q.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!o0.has(t)||e[t]==null){q.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]))&&(q.debug("sanitize deleting invalid color:",s,e[t][s]),delete e[t][s])}else q.debug("sanitizing object",t),Us(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(q.debug("sanitizing css option",t),e[t]=Oc(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]="")}q.debug("After sanitization",e)}},"sanitizeDirective"),Oc=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"),oi=Object.freeze($c),je=f(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ie=It({},oi),Gs,br=[],Wi=It({},oi),wa=f((e,t)=>{let r=It({},e),i={};for(const s of t)Rc(s),i=It(i,s);if(r=It(r,i),i.theme&&i.theme in Ye){const s=It({},Gs),a=It(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in Ye&&(r.themeVariables=Ye[r.theme].getThemeVariables(a))}return Wi=r,Nc(Wi),Wi},"updateCurrentConfig"),n0=f(e=>(ie=It({},oi),ie=It(ie,e),e.theme&&Ye[e.theme]&&(ie.themeVariables=Ye[e.theme].getThemeVariables(e.themeVariables)),wa(ie,br),ie),"setSiteConfig"),l0=f(e=>{Gs=It({},e)},"saveConfigFromInitialize"),h0=f(e=>(ie=It(ie,e),wa(ie,br),ie),"updateSiteConfig"),Ic=f(()=>It({},ie),"getSiteConfig"),Dc=f(e=>(Nc(e),It(Wi,e),St()),"setConfig"),St=f(()=>It({},Wi),"getConfig"),Rc=f(e=>{e&&(["secure",...ie.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(q.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"&&Rc(e[t])}))},"sanitize"),c0=f(e=>{var t;Us(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),br.push(e),wa(ie,br)},"addDirective"),Xs=f((e=ie)=>{br=[],wa(e,br)},"reset"),u0={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."},Jl={},Pc=f(e=>{Jl[e]||(q.warn(u0[e]),Jl[e]=!0)},"issueWarning"),Nc=f(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Pc("LAZY_LOAD_DEPRECATED")},"checkConfig"),Bv=f(()=>{let e={};Gs&&(e=It(e,Gs));for(const t of br)e=It(e,t);return e},"getUserDefinedConfig"),Jt=f(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Pc("FLOWCHART_HTML_LABELS_DEPRECATED"),je(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),is=/<br\s*\/?>/gi,d0=f(e=>e?zc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),p0=(()=>{let e=!1;return()=>{e||(qc(),e=!0)}})();function qc(){const e="data-temp-href-target";ai.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),ai.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(qc,"setupDompurifyHooks");var Wc=f(e=>(p0(),ai.sanitize(e)),"removeScript"),th=f((e,t)=>{if(Jt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Wc(e):r!=="loose"&&(e=zc(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=y0(e))}return e},"sanitizeMore"),Se=f((e,t)=>e&&(t.dompurifyConfig?e=ai.sanitize(th(e,t),t.dompurifyConfig).toString():e=ai.sanitize(th(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),f0=f((e,t)=>typeof e=="string"?Se(e,t):e.flat().map(r=>Se(r,t)),"sanitizeTextOrArray"),g0=f(e=>is.test(e),"hasBreaks"),m0=f(e=>e.split(is),"splitBreaks"),y0=f(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),zc=f(e=>e.replace(is,"#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"),x0=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),b0=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),eh=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];k0(a,o)&&(s=a+","+o,i++,r.pop())}r.push(T0(s))}return r.join("")},"parseGenericTypes"),wo=f((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),k0=f((e,t)=>{const r=wo(e,"~"),i=wo(t,"~");return r===1&&i===1},"shouldCombineSets"),T0=f(e=>{const t=wo(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"),rh=f(()=>window.MathMLElement!==void 0,"isMathMLSupported"),So=/\$\$(.*)\$\$/g,Ui=f(e=>{var t;return(((t=e.match(So))==null?void 0:t.length)??0)>0},"hasKatex"),vv=f(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Hc(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"),w0=f(async(e,t)=>{if(!Ui(e))return e;if(!(rh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(So,"MathML is unsupported in this environment.");{const{default:r}=await ft(async()=>{const{default:s}=await import("./katex-DkKDou_j.js");return{default:s}},[]),i=t.forceLegacyMathML||!rh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(is).map(s=>Ui(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(So,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Hc=f(async(e,t)=>Se(await w0(e,t),t),"renderKatexSanitized"),ss={getRows:d0,sanitizeText:Se,sanitizeTextOrArray:f0,hasBreaks:g0,splitBreaks:m0,lineBreakRegex:is,removeScript:Wc,getUrl:C0,evaluate:je,getMax:x0,getMin:b0},S0=f(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),_0=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"),Yc=f(function(e,t,r,i){const s=_0(t,r,i);S0(e,s)},"configureSvgSize"),B0=f(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,o=s.height;q.info(`SVG bounds: ${a}x${o}`,s);let n=0,l=0;q.info(`Graph bounds: ${n}x${l}`,e),n=a+r*2,l=o+r*2,q.info(`Calculated bounds: ${n}x${l}`),Yc(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"),$s={};function _o(e){return[...e.cssRules].map(t=>t.cssText).join(`
5
- `)}f(_o,"cssStyleSheetToString");var v0=f((e,t,r,i)=>{let s="";return e in $s&&$s[e]?s=$s[e]({...r,svgId:i}):q.warn(`No theme found for ${e}`),` & {
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-BM42HDAG-DcIxclFu.js","assets/graph-CAnANduQ.js","assets/layout-DGIYPm2g.js","assets/index-OFdfWE8x.js","assets/index-Cmcberpw.css","assets/cose-bilkent-S5V4N54A-Br-CySzr.js","assets/cytoscape.esm-D_LviqZs.js","assets/c4Diagram-AAUBKEIU-kJb6eQJJ.js","assets/chunk-ND2GUHAM-TheCoD51.js","assets/flowDiagram-I6XJVG4X-CPuYTxJr.js","assets/chunk-FMBD7UC4-BYGwnUQ4.js","assets/chunk-55IACEB6-BDUDnCl9.js","assets/chunk-2J33WTMH-T3vdO-20.js","assets/channel-DirF0LQF.js","assets/erDiagram-TEJ5UH35-smNcu7Lp.js","assets/gitGraphDiagram-PVQCEYII-eN40bRnz.js","assets/chunk-4BX2VUAB-By-ok8D7.js","assets/chunk-QZHKN3VN-Cd7CcXLC.js","assets/wardley-L42UT6IY-ByB1C5d8.js","assets/ganttDiagram-6RSMTGT7-xaV0Djok.js","assets/linear-CZOgGL8m.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-5YYISTIA-xm1BEpfJ.js","assets/pieDiagram-4H26LBE5-oB2YhWwR.js","assets/arc-DYMLyL-_.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-W4KKPZXB-CmJGRE1L.js","assets/xychartDiagram-2RQKCTM6-7czjL7-G.js","assets/requirementDiagram-4Y6WPE33-Dp-nBLhC.js","assets/sequenceDiagram-3UESZ5HK-jmqrpzCx.js","assets/classDiagram-4FO5ZUOK-CdoMz3xi.js","assets/chunk-727SXJPM-Bj1JFNtT.js","assets/classDiagram-v2-Q7XG4LA2-CdoMz3xi.js","assets/stateDiagram-AJRCARHV-U6m2A9Wk.js","assets/chunk-AQP2D5EJ-BPZWXvxS.js","assets/stateDiagram-v2-BHNVJYJU-00c0MW6J.js","assets/journeyDiagram-JHISSGLW-BfWwpj1w.js","assets/timeline-definition-PNZ67QCA-uVQ-oiv8.js","assets/mindmap-definition-RKZ34NQL-BbNc5LRE.js","assets/kanban-definition-UN3LZRKU-Cuij1uoR.js","assets/sankeyDiagram-5OEKKPKP-DB5dqk7n.js","assets/diagram-LMA3HP47-4o7ohGjJ.js","assets/diagram-2AECGRRQ-C0xPdtMR.js","assets/blockDiagram-GPEHLZMM-Dmjj2Ajf.js","assets/diagram-5GNKFQAL-B9i7DtoQ.js","assets/architectureDiagram-3BPJPVTR-iXijJkGs.js","assets/diagram-KO2AKTUF-mwoLS2TK.js","assets/ishikawaDiagram-YF4QCWOH-BDIzsJJZ.js","assets/vennDiagram-CIIHVFJN-By-tXl41.js","assets/diagram-OG6HWLK6-C6rhUBe2.js","assets/wardleyDiagram-YWT4CUSO-BQMj40Ao.js"])))=>i.map(i=>d[i]);
2
+ var By=Object.defineProperty;var vy=(e,t,r)=>t in e?By(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var St=(e,t,r)=>vy(e,typeof t!="symbol"?t+"":t,r);import{_ as ft}from"./index-OFdfWE8x.js";function Ly(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qs={exports:{}},Fy=qs.exports,ah;function Ay(){return ah||(ah=1,(function(e,t){(function(r,i){e.exports=i()})(Fy,(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",m="date",g="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(R){var E=["th","st","nd","rd"],L=R%100;return"["+R+(E[(L-20)%10]||E[L]||E[0])+"]"}},k=function(R,E,L){var O=String(R);return!O||O.length>=E?R:""+Array(E+1-O.length).join(L)+R},w={s:k,z:function(R){var E=-R.utcOffset(),L=Math.abs(E),O=Math.floor(L/60),A=L%60;return(E<=0?"+":"-")+k(O,2,"0")+":"+k(A,2,"0")},m:function R(E,L){if(E.date()<L.date())return-R(L,E);var O=12*(L.year()-E.year())+(L.month()-E.month()),A=E.clone().add(O,u),_=L-A<0,q=E.clone().add(O+(_?-1:1),u);return+(-(O+(L-A)/(_?A-q:q-A))||0)},a:function(R){return R<0?Math.ceil(R)||0:Math.floor(R)},p:function(R){return{M:u,y:d,w:c,d:h,D:m,h:l,m:n,s:o,ms:a,Q:p}[R]||String(R||"").toLowerCase().replace(/s$/,"")},u:function(R){return R===void 0}},S="en",B={};B[S]=b;var M="$isDayjsObject",v=function(R){return R instanceof Y||!(!R||!R[M])},W=function R(E,L,O){var A;if(!E)return S;if(typeof E=="string"){var _=E.toLowerCase();B[_]&&(A=_),L&&(B[_]=L,A=_);var q=E.split("-");if(!A&&q.length>1)return R(q[0])}else{var V=E.name;B[V]=E,A=V}return!O&&A&&(S=A),A||!O&&S},D=function(R,E){if(v(R))return R.clone();var L=typeof E=="object"?E:{};return L.date=R,L.args=arguments,new Y(L)},I=w;I.l=W,I.i=v,I.w=function(R,E){return D(R,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var Y=(function(){function R(L){this.$L=W(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[M]=!0}var E=R.prototype;return E.parse=function(L){this.$d=(function(O){var A=O.date,_=O.utc;if(A===null)return new Date(NaN);if(I.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var q=A.match(y);if(q){var V=q[2]-1||0,ut=(q[7]||"0").substring(0,3);return _?new Date(Date.UTC(q[1],V,q[3]||1,q[4]||0,q[5]||0,q[6]||0,ut)):new Date(q[1],V,q[3]||1,q[4]||0,q[5]||0,q[6]||0,ut)}}return new Date(A)})(L),this.init()},E.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},E.$utils=function(){return I},E.isValid=function(){return this.$d.toString()!==g},E.isSame=function(L,O){var A=D(L);return this.startOf(O)<=A&&A<=this.endOf(O)},E.isAfter=function(L,O){return D(L)<this.startOf(O)},E.isBefore=function(L,O){return this.endOf(O)<D(L)},E.$g=function(L,O,A){return I.u(L)?this[O]:this.set(A,L)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(L,O){var A=this,_=!!I.u(O)||O,q=I.p(L),V=function(ce,et){var X=I.w(A.$u?Date.UTC(A.$y,et,ce):new Date(A.$y,et,ce),A);return _?X:X.endOf(h)},ut=function(ce,et){return I.w(A.toDate()[ce].apply(A.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(et)),A)},gt=this.$W,dt=this.$M,Ct=this.$D,vt="set"+(this.$u?"UTC":"");switch(q){case d:return _?V(1,0):V(31,11);case u:return _?V(1,dt):V(0,dt+1);case c:var qt=this.$locale().weekStart||0,oe=(gt<qt?gt+7:gt)-qt;return V(_?Ct-oe:Ct+(6-oe),dt);case h:case m:return ut(vt+"Hours",0);case l:return ut(vt+"Minutes",1);case n:return ut(vt+"Seconds",2);case o:return ut(vt+"Milliseconds",3);default:return this.clone()}},E.endOf=function(L){return this.startOf(L,!1)},E.$set=function(L,O){var A,_=I.p(L),q="set"+(this.$u?"UTC":""),V=(A={},A[h]=q+"Date",A[m]=q+"Date",A[u]=q+"Month",A[d]=q+"FullYear",A[l]=q+"Hours",A[n]=q+"Minutes",A[o]=q+"Seconds",A[a]=q+"Milliseconds",A)[_],ut=_===h?this.$D+(O-this.$W):O;if(_===u||_===d){var gt=this.clone().set(m,1);gt.$d[V](ut),gt.init(),this.$d=gt.set(m,Math.min(this.$D,gt.daysInMonth())).$d}else V&&this.$d[V](ut);return this.init(),this},E.set=function(L,O){return this.clone().$set(L,O)},E.get=function(L){return this[I.p(L)]()},E.add=function(L,O){var A,_=this;L=Number(L);var q=I.p(O),V=function(dt){var Ct=D(_);return I.w(Ct.date(Ct.date()+Math.round(dt*L)),_)};if(q===u)return this.set(u,this.$M+L);if(q===d)return this.set(d,this.$y+L);if(q===h)return V(1);if(q===c)return V(7);var ut=(A={},A[n]=i,A[l]=s,A[o]=r,A)[q]||1,gt=this.$d.getTime()+L*ut;return I.w(gt,this)},E.subtract=function(L,O){return this.add(-1*L,O)},E.format=function(L){var O=this,A=this.$locale();if(!this.isValid())return A.invalidDate||g;var _=L||"YYYY-MM-DDTHH:mm:ssZ",q=I.z(this),V=this.$H,ut=this.$m,gt=this.$M,dt=A.weekdays,Ct=A.months,vt=A.meridiem,qt=function(et,X,wt,lt){return et&&(et[X]||et(O,_))||wt[X].slice(0,lt)},oe=function(et){return I.s(V%12||12,et,"0")},ce=vt||function(et,X,wt){var lt=et<12?"AM":"PM";return wt?lt.toLowerCase():lt};return _.replace(C,(function(et,X){return X||(function(wt){switch(wt){case"YY":return String(O.$y).slice(-2);case"YYYY":return I.s(O.$y,4,"0");case"M":return gt+1;case"MM":return I.s(gt+1,2,"0");case"MMM":return qt(A.monthsShort,gt,Ct,3);case"MMMM":return qt(Ct,gt);case"D":return O.$D;case"DD":return I.s(O.$D,2,"0");case"d":return String(O.$W);case"dd":return qt(A.weekdaysMin,O.$W,dt,2);case"ddd":return qt(A.weekdaysShort,O.$W,dt,3);case"dddd":return dt[O.$W];case"H":return String(V);case"HH":return I.s(V,2,"0");case"h":return oe(1);case"hh":return oe(2);case"a":return ce(V,ut,!0);case"A":return ce(V,ut,!1);case"m":return String(ut);case"mm":return I.s(ut,2,"0");case"s":return String(O.$s);case"ss":return I.s(O.$s,2,"0");case"SSS":return I.s(O.$ms,3,"0");case"Z":return q}return null})(et)||q.replace(":","")}))},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(L,O,A){var _,q=this,V=I.p(O),ut=D(L),gt=(ut.utcOffset()-this.utcOffset())*i,dt=this-ut,Ct=function(){return I.m(q,ut)};switch(V){case d:_=Ct()/12;break;case u:_=Ct();break;case p:_=Ct()/3;break;case c:_=(dt-gt)/6048e5;break;case h:_=(dt-gt)/864e5;break;case l:_=dt/s;break;case n:_=dt/i;break;case o:_=dt/r;break;default:_=dt}return A?_:I.a(_)},E.daysInMonth=function(){return this.endOf(u).$D},E.$locale=function(){return B[this.$L]},E.locale=function(L,O){if(!L)return this.$L;var A=this.clone(),_=W(L,O,!0);return _&&(A.$L=_),A},E.clone=function(){return I.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},R})(),H=Y.prototype;return D.prototype=H,[["$ms",a],["$s",o],["$m",n],["$H",l],["$W",h],["$M",u],["$y",d],["$D",m]].forEach((function(R){H[R[1]]=function(E){return this.$g(E,R[0],R[1])}})),D.extend=function(R,E){return R.$i||(R(E,Y,D),R.$i=!0),D},D.locale=W,D.isDayjs=v,D.unix=function(R){return D(1e3*R)},D.en=B[S],D.Ls=B,D.p={},D}))})(qs)),qs.exports}var Ey=Ay();const My=Ly(Ey);var Wc=Object.defineProperty,f=(e,t)=>Wc(e,"name",{value:t,configurable:!0}),$y=(e,t)=>{for(var r in t)Wc(e,r,{get:t[r],enumerable:!0})},ze={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")},Dn=f(function(e="fatal"){let t=ze.fatal;typeof e=="string"?e.toLowerCase()in ze&&(t=ze[e]):typeof e=="number"&&(t=e),z.trace=()=>{},z.debug=()=>{},z.info=()=>{},z.warn=()=>{},z.error=()=>{},z.fatal=()=>{},t<=ze.fatal&&(z.fatal=console.error?console.error.bind(console,pe("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",pe("FATAL"))),t<=ze.error&&(z.error=console.error?console.error.bind(console,pe("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",pe("ERROR"))),t<=ze.warn&&(z.warn=console.warn?console.warn.bind(console,pe("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",pe("WARN"))),t<=ze.info&&(z.info=console.info?console.info.bind(console,pe("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",pe("INFO"))),t<=ze.debug&&(z.debug=console.debug?console.debug.bind(console,pe("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",pe("DEBUG"))),t<=ze.trace&&(z.trace=console.debug?console.debug.bind(console,pe("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",pe("TRACE")))},"setLogLevel"),pe=f(e=>`%c${My().format("ss.SSS")} : ${e} : `,"format");const zs={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 zs.hue2rgb(a,s,e+1/3)*255;case"g":return zs.hue2rgb(a,s,e)*255;case"b":return zs.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}}},Oy={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},Iy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},nt={channel:zs,lang:Oy,unit:Iy},rr={};for(let e=0;e<=255;e++)rr[e]=nt.unit.dec2hex(e);const Gt={ALL:0,RGB:1,HSL:2};class Dy{constructor(){this.type=Gt.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=Gt.ALL}is(t){return this.type===t}}class Ry{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Dy}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Gt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=nt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=nt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=nt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=nt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=nt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=nt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Gt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Gt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Gt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Gt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Gt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Gt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Ea=new Ry({r:0,g:0,b:0,a:0},"transparent"),Zr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Zr.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 Ea.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?`#${rr[Math.round(t)]}${rr[Math.round(r)]}${rr[Math.round(i)]}${rr[Math.round(s*255)]}`:`#${rr[Math.round(t)]}${rr[Math.round(r)]}${rr[Math.round(i)]}`}},kr={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(kr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return nt.channel.clamp.h(parseFloat(r)*.9);case"rad":return nt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return nt.channel.clamp.h(parseFloat(r)*360)}}return nt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(kr.re);if(!r)return;const[,i,s,a,o,n]=r;return Ea.set({h:kr._hue2deg(i),s:nt.channel.clamp.s(parseFloat(s)),l:nt.channel.clamp.l(parseFloat(a)),a:o?nt.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(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%, ${s})`:`hsl(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%)`}},ji={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=ji.colors[e];if(t)return Zr.parse(t)},stringify:e=>{const t=Zr.stringify(e);for(const r in ji.colors)if(ji.colors[r]===t)return r}},Pi={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Pi.re);if(!r)return;const[,i,s,a,o,n,l,h,c]=r;return Ea.set({r:nt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:nt.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:nt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:h?nt.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(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)}, ${nt.lang.round(s)})`:`rgb(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)})`}},Ie={format:{keyword:ji,hex:Zr,rgb:Pi,rgba:Pi,hsl:kr,hsla:kr},parse:e=>{if(typeof e!="string")return e;const t=Zr.parse(e)||Pi.parse(e)||kr.parse(e)||ji.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Gt.HSL)||e.data.r===void 0?kr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Pi.stringify(e):Zr.stringify(e)},Hc=(e,t)=>{const r=Ie.parse(e);for(const i in t)r[i]=nt.channel.clamp[i](t[i]);return Ie.stringify(r)},nr=(e,t,r=0,i=1)=>{if(typeof e!="number")return Hc(e,{a:t});const s=Ea.set({r:nt.channel.clamp.r(e),g:nt.channel.clamp.g(t),b:nt.channel.clamp.b(r),a:nt.channel.clamp.a(i)});return Ie.stringify(s)},Py=e=>{const{r:t,g:r,b:i}=Ie.parse(e),s=.2126*nt.channel.toLinear(t)+.7152*nt.channel.toLinear(r)+.0722*nt.channel.toLinear(i);return nt.lang.round(s)},Ny=e=>Py(e)>=.5,Se=e=>!Ny(e),Yc=(e,t,r)=>{const i=Ie.parse(e),s=i[t],a=nt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),Ie.stringify(i)},P=(e,t)=>Yc(e,"l",t),N=(e,t)=>Yc(e,"l",-t),x=(e,t)=>{const r=Ie.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Hc(e,i)},qy=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=Ie.parse(e),{r:n,g:l,b:h,a:c}=Ie.parse(t),u=r/100,p=u*2-1,d=o-c,g=((p*d===-1?p:(p+d)/(1+p*d))+1)/2,y=1-g,C=i*g+n*y,b=s*g+l*y,k=a*g+h*y,w=o*u+c*(1-u);return nr(C,b,k,w)},F=(e,t=100)=>{const r=Ie.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,qy(r,e,t)};/*! @license DOMPurify 3.4.11 | (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.11/LICENSE */function oh(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 zy(e){if(Array.isArray(e))return e}function Wy(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 Hy(){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 Yy(e,t){return zy(e)||Wy(e,t)||Uy(e,t)||Hy()}function Uy(e,t){if(e){if(typeof e=="string")return oh(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)?oh(e,t):void 0}}const Uc=Object.entries,nh=Object.setPrototypeOf,Gy=Object.isFrozen,jy=Object.getPrototypeOf,Xy=Object.getOwnPropertyDescriptor;let Yt=Object.freeze,Ut=Object.seal,Yr=Object.create,Gc=typeof Reflect<"u"&&Reflect,Io=Gc.apply,Do=Gc.construct;Yt||(Yt=function(t){return t});Ut||(Ut=function(t){return t});Io||(Io=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)});Do||(Do=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 Li=$t(Array.prototype.forEach),Vy=$t(Array.prototype.lastIndexOf),lh=$t(Array.prototype.pop),qr=$t(Array.prototype.push),Zy=$t(Array.prototype.splice),sr=Array.isArray,Ni=$t(String.prototype.toLowerCase),go=$t(String.prototype.toString),hh=$t(String.prototype.match),Fi=$t(String.prototype.replace),ch=$t(String.prototype.indexOf),Ky=$t(String.prototype.trim),Qy=$t(Number.prototype.toString),Jy=$t(Boolean.prototype.toString),uh=typeof BigInt>"u"?null:$t(BigInt.prototype.toString),dh=typeof Symbol>"u"?null:$t(Symbol.prototype.toString),Pt=$t(Object.prototype.hasOwnProperty),Ai=$t(Object.prototype.toString),zt=$t(RegExp.prototype.test),mr=t0(TypeError);function $t(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 Io(e,t,i)}}function t0(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Do(e,r)}}function mt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ni;if(nh&&nh(e,null),!sr(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const a=r(s);a!==s&&(Gy(t)||(t[i]=a),s=a)}e[s]=!0}return e}function e0(e){for(let t=0;t<e.length;t++)Pt(e,t)||(e[t]=null);return e}function Qt(e){const t=Yr(null);for(const i of Uc(e)){var r=Yy(i,2);const s=r[0],a=r[1];Pt(e,s)&&(sr(a)?t[s]=e0(a):a&&typeof a=="object"&&a.constructor===Object?t[s]=Qt(a):t[s]=a)}return t}function r0(e){switch(typeof e){case"string":return e;case"number":return Qy(e);case"boolean":return Jy(e);case"bigint":return uh?uh(e):"0";case"symbol":return dh?dh(e):"Symbol()";case"undefined":return Ai(e);case"function":case"object":{if(e===null)return Ai(e);const t=e,r=Ae(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:Ai(i)}return Ai(e)}default:return Ai(e)}}function Ae(e,t){for(;e!==null;){const i=Xy(e,t);if(i){if(i.get)return $t(i.get);if(typeof i.value=="function")return $t(i.value)}e=jy(e)}function r(){return null}return r}function i0(e){try{return zt(e,""),!0}catch{return!1}}const ph=Yt(["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"]),mo=Yt(["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"]),yo=Yt(["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"]),s0=Yt(["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"]),Co=Yt(["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"]),a0=Yt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),fh=Yt(["#text"]),gh=Yt(["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"]),xo=Yt(["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"]),mh=Yt(["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"]),vs=Yt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),o0=Ut(/{{[\w\W]*|^[\w\W]*}}/g),n0=Ut(/<%[\w\W]*|^[\w\W]*%>/g),l0=Ut(/\${[\w\W]*/g),h0=Ut(/^data-[\-\w.\u00B7-\uFFFF]+$/),c0=Ut(/^aria-[\-\w]+$/),yh=Ut(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),u0=Ut(/^(?:\w+script|data):/i),d0=Ut(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),p0=Ut(/^html$/i),f0=Ut(/^[a-z][.\w]*(-[.\w]+)+$/i),Ch=Ut(/<[/\w!]/g),g0=Ut(/<[/\w]/g),m0=Ut(/<\/no(script|embed|frames)/i),y0=Ut(/\/>/i),Fe={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},C0=function(){return typeof window>"u"?null:window},x0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const 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}},xh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},er=function(t,r,i,s){return Pt(t,r)&&sr(t[r])?mt(s.base?Qt(s.base):{},t[r],s.transform):i};function jc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:C0();const t=G=>jc(G);if(t.version="3.4.11",t.removed=[],!e||!e.document||e.document.nodeType!==Fe.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=Ae(p,"cloneNode"),m=Ae(p,"remove"),g=Ae(p,"nextSibling"),y=Ae(p,"childNodes"),C=Ae(p,"parentNode"),b=Ae(p,"shadowRoot"),k=Ae(p,"attributes"),w=o&&o.prototype?Ae(o.prototype,"nodeType"):null,S=o&&o.prototype?Ae(o.prototype,"nodeName"):null;if(typeof a=="function"){const G=r.createElement("template");G.content&&G.content.ownerDocument&&(r=G.content.ownerDocument)}let B,M="",v,W=!1,D=0;const I=function(){if(D>0)throw mr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Y=function(T){I(),D++;try{return B.createHTML(T)}finally{D--}},H=function(T){I(),D++;try{return B.createScriptURL(T)}finally{D--}},R=function(){return W||(v=x0(u,s),W=!0),v},E=r,L=E.implementation,O=E.createNodeIterator,A=E.createDocumentFragment,_=E.getElementsByTagName,q=i.importNode;let V=xh();t.isSupported=typeof Uc=="function"&&typeof C=="function"&&L&&L.createHTMLDocument!==void 0;const ut=o0,gt=n0,dt=l0,Ct=h0,vt=c0,qt=u0,oe=d0,ce=f0;let et=yh,X=null;const wt=mt({},[...ph,...mo,...yo,...Co,...fh]);let lt=null;const Be=mt({},[...gh,...xo,...mh,...vs]);let kt=Object.seal(Yr(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}})),Qe=null,Za=null;const ue=Object.seal(Yr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Pl=!0,Ka=!0,Nl=!1,ql=!0,Je=!1,_i=!0,fr=!1,Qa=!1,Ja=null,to=null,eo=!1,Ir=!1,bs=!1,ks=!1,zl=!0,Wl=!1;const Hl="user-content-";let ro=!0,io=!1,Dr={},ve=null;const so=mt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Yl=null;const Ul=mt({},["audio","video","img","source","image","track"]);let ao=null;const Gl=mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ts="http://www.w3.org/1998/Math/MathML",ws="http://www.w3.org/2000/svg",Le="http://www.w3.org/1999/xhtml";let Rr=Le,oo=!1,no=null;const cy=mt({},[Ts,ws,Le],go),jl=Yt(["mi","mo","mn","ms","mtext"]);let lo=mt({},jl);const Xl=Yt(["annotation-xml"]);let ho=mt({},Xl);const uy=mt({},["title","style","font","a","script"]);let Bi=null;const dy=["application/xhtml+xml","text/html"],py="text/html";let Lt=null,Pr=null;const fy=r.createElement("form"),Vl=function(T){return T instanceof RegExp||T instanceof Function},co=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Pr&&Pr===T)return;(!T||typeof T!="object")&&(T={}),T=Qt(T),Bi=dy.indexOf(T.PARSER_MEDIA_TYPE)===-1?py:T.PARSER_MEDIA_TYPE,Lt=Bi==="application/xhtml+xml"?go:Ni,X=er(T,"ALLOWED_TAGS",wt,{transform:Lt}),lt=er(T,"ALLOWED_ATTR",Be,{transform:Lt}),no=er(T,"ALLOWED_NAMESPACES",cy,{transform:go}),ao=er(T,"ADD_URI_SAFE_ATTR",Gl,{transform:Lt,base:Gl}),Yl=er(T,"ADD_DATA_URI_TAGS",Ul,{transform:Lt,base:Ul}),ve=er(T,"FORBID_CONTENTS",so,{transform:Lt}),Qe=er(T,"FORBID_TAGS",Qt({}),{transform:Lt}),Za=er(T,"FORBID_ATTR",Qt({}),{transform:Lt}),Dr=Pt(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?Qt(T.USE_PROFILES):T.USE_PROFILES:!1,Pl=T.ALLOW_ARIA_ATTR!==!1,Ka=T.ALLOW_DATA_ATTR!==!1,Nl=T.ALLOW_UNKNOWN_PROTOCOLS||!1,ql=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Je=T.SAFE_FOR_TEMPLATES||!1,_i=T.SAFE_FOR_XML!==!1,fr=T.WHOLE_DOCUMENT||!1,Ir=T.RETURN_DOM||!1,bs=T.RETURN_DOM_FRAGMENT||!1,ks=T.RETURN_TRUSTED_TYPE||!1,eo=T.FORCE_BODY||!1,zl=T.SANITIZE_DOM!==!1,Wl=T.SANITIZE_NAMED_PROPS||!1,ro=T.KEEP_CONTENT!==!1,io=T.IN_PLACE||!1,et=i0(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:yh,Rr=typeof T.NAMESPACE=="string"?T.NAMESPACE:Le,lo=Pt(T,"MATHML_TEXT_INTEGRATION_POINTS")&&T.MATHML_TEXT_INTEGRATION_POINTS&&typeof T.MATHML_TEXT_INTEGRATION_POINTS=="object"?Qt(T.MATHML_TEXT_INTEGRATION_POINTS):mt({},jl),ho=Pt(T,"HTML_INTEGRATION_POINTS")&&T.HTML_INTEGRATION_POINTS&&typeof T.HTML_INTEGRATION_POINTS=="object"?Qt(T.HTML_INTEGRATION_POINTS):mt({},Xl);const $=Pt(T,"CUSTOM_ELEMENT_HANDLING")&&T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING=="object"?Qt(T.CUSTOM_ELEMENT_HANDLING):Yr(null);if(kt=Yr(null),Pt($,"tagNameCheck")&&Vl($.tagNameCheck)&&(kt.tagNameCheck=$.tagNameCheck),Pt($,"attributeNameCheck")&&Vl($.attributeNameCheck)&&(kt.attributeNameCheck=$.attributeNameCheck),Pt($,"allowCustomizedBuiltInElements")&&typeof $.allowCustomizedBuiltInElements=="boolean"&&(kt.allowCustomizedBuiltInElements=$.allowCustomizedBuiltInElements),Ut(kt),Je&&(Ka=!1),bs&&(Ir=!0),Dr&&(X=mt({},fh),lt=Yr(null),Dr.html===!0&&(mt(X,ph),mt(lt,gh)),Dr.svg===!0&&(mt(X,mo),mt(lt,xo),mt(lt,vs)),Dr.svgFilters===!0&&(mt(X,yo),mt(lt,xo),mt(lt,vs)),Dr.mathMl===!0&&(mt(X,Co),mt(lt,mh),mt(lt,vs))),ue.tagCheck=null,ue.attributeCheck=null,Pt(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?ue.tagCheck=T.ADD_TAGS:sr(T.ADD_TAGS)&&(X===wt&&(X=Qt(X)),mt(X,T.ADD_TAGS,Lt))),Pt(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?ue.attributeCheck=T.ADD_ATTR:sr(T.ADD_ATTR)&&(lt===Be&&(lt=Qt(lt)),mt(lt,T.ADD_ATTR,Lt))),Pt(T,"ADD_URI_SAFE_ATTR")&&sr(T.ADD_URI_SAFE_ATTR)&&mt(ao,T.ADD_URI_SAFE_ATTR,Lt),Pt(T,"FORBID_CONTENTS")&&sr(T.FORBID_CONTENTS)&&(ve===so&&(ve=Qt(ve)),mt(ve,T.FORBID_CONTENTS,Lt)),Pt(T,"ADD_FORBID_CONTENTS")&&sr(T.ADD_FORBID_CONTENTS)&&(ve===so&&(ve=Qt(ve)),mt(ve,T.ADD_FORBID_CONTENTS,Lt)),ro&&(X["#text"]=!0),fr&&mt(X,["html","head","body"]),X.table&&(mt(X,["tbody"]),delete Qe.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw mr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw mr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const U=B;B=T.TRUSTED_TYPES_POLICY;try{M=Y("")}catch(tt){throw B=U,tt}}else T.TRUSTED_TYPES_POLICY===null?(B=void 0,M=""):(B===void 0&&(B=R()),B&&typeof M=="string"&&(M=Y("")));Yt&&Yt(T),Pr=T},Zl=mt({},[...mo,...yo,...s0]),Kl=mt({},[...Co,...a0]),gy=function(T,$,U){return $.namespaceURI===Le?T==="svg":$.namespaceURI===Ts?T==="svg"&&(U==="annotation-xml"||lo[U]):!!Zl[T]},my=function(T,$,U){return $.namespaceURI===Le?T==="math":$.namespaceURI===ws?T==="math"&&ho[U]:!!Kl[T]},yy=function(T,$,U){return $.namespaceURI===ws&&!ho[U]||$.namespaceURI===Ts&&!lo[U]?!1:!Kl[T]&&(uy[T]||!Zl[T])},Cy=function(T){let $=C(T);(!$||!$.tagName)&&($={namespaceURI:Rr,tagName:"template"});const U=Ni(T.tagName),tt=Ni($.tagName);return no[T.namespaceURI]?T.namespaceURI===ws?gy(U,$,tt):T.namespaceURI===Ts?my(U,$,tt):T.namespaceURI===Le?yy(U,$,tt):!!(Bi==="application/xhtml+xml"&&no[T.namespaceURI]):!1},tr=function(T){qr(t.removed,{element:T});try{C(T).removeChild(T)}catch{if(m(T),!C(T))throw mr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Ql=function(T){const $=y(T);if($){const tt=[];Li($,ct=>{qr(tt,ct)}),Li(tt,ct=>{try{m(ct)}catch{}})}const U=k(T);if(U)for(let tt=U.length-1;tt>=0;--tt){const ct=U[tt],yt=ct&&ct.name;if(typeof yt=="string")try{T.removeAttribute(yt)}catch{}}},gr=function(T,$){try{qr(t.removed,{attribute:$.getAttributeNode(T),from:$})}catch{qr(t.removed,{attribute:null,from:$})}if($.removeAttribute(T),T==="is")if(Ir||bs)try{tr($)}catch{}else try{$.setAttribute(T,"")}catch{}},xy=function(T){const $=k(T);if($)for(let U=$.length-1;U>=0;--U){const tt=$[U],ct=tt&&tt.name;if(!(typeof ct!="string"||lt[Lt(ct)]))try{T.removeAttribute(ct)}catch{}}},by=function(T){const $=[T];for(;$.length>0;){const U=$.pop();(w?w(U):U.nodeType)===Fe.element&&xy(U);const ct=y(U);if(ct)for(let yt=ct.length-1;yt>=0;--yt)$.push(ct[yt])}},Jl=function(T){let $=null,U=null;if(eo)T="<remove></remove>"+T;else{const yt=hh(T,/^[\r\n\t ]+/);U=yt&&yt[0]}Bi==="application/xhtml+xml"&&Rr===Le&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const tt=B?Y(T):T;if(Rr===Le)try{$=new c().parseFromString(tt,Bi)}catch{}if(!$||!$.documentElement){$=L.createDocument(Rr,"template",null);try{$.documentElement.innerHTML=oo?M:tt}catch{}}const ct=$.body||$.documentElement;return T&&U&&ct.insertBefore(r.createTextNode(U),ct.childNodes[0]||null),Rr===Le?_.call($,fr?"html":"body")[0]:fr?$.documentElement:ct},th=function(T){return O.call(T.ownerDocument||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Ss=function(T){return T=Fi(T,ut," "),T=Fi(T,gt," "),T=Fi(T,dt," "),T},uo=function(T){var $;T.normalize();const U=O.call(T.ownerDocument||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let tt=U.nextNode();for(;tt;)tt.data=Ss(tt.data),tt=U.nextNode();const ct=($=T.querySelectorAll)===null||$===void 0?void 0:$.call(T,"template");ct&&Li(ct,yt=>{Nr(yt.content)&&uo(yt.content)})},_s=function(T){const $=S?S(T):null;return typeof $!="string"||Lt($)!=="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!==w(T)||T.childNodes!==y(T)},Nr=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return w(T)===Fe.documentFragment}catch{return!1}},vi=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return typeof w(T)=="number"}catch{return!1}};function qe(G,T,$){G.length!==0&&Li(G,U=>{U.call(t,T,$,Pr)})}const ky=function(T,$){return!!(_i&&T.hasChildNodes()&&!vi(T.firstElementChild)&&zt(Ch,T.textContent)&&zt(Ch,T.innerHTML)||_i&&T.namespaceURI===Le&&$==="style"&&vi(T.firstElementChild)||T.nodeType===Fe.processingInstruction||_i&&T.nodeType===Fe.comment&&zt(g0,T.data))},Ty=function(T,$){if(!Qe[$]&&ih($)&&(kt.tagNameCheck instanceof RegExp&&zt(kt.tagNameCheck,$)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck($)))return!1;if(ro&&!ve[$]){const U=C(T),tt=y(T);if(tt&&U){const ct=tt.length;for(let yt=ct-1;yt>=0;--yt){const Rt=io?tt[yt]:d(tt[yt],!0);U.insertBefore(Rt,g(T))}}}return tr(T),!0},eh=function(T){if(qe(V.beforeSanitizeElements,T,null),_s(T))return tr(T),!0;const $=Lt(S?S(T):T.nodeName);if(qe(V.uponSanitizeElement,T,{tagName:$,allowedTags:X}),ky(T,$))return tr(T),!0;if(Qe[$]||!(ue.tagCheck instanceof Function&&ue.tagCheck($))&&!X[$])return Ty(T,$);if((w?w(T):T.nodeType)===Fe.element&&!Cy(T)||($==="noscript"||$==="noembed"||$==="noframes")&&zt(m0,T.innerHTML))return tr(T),!0;if(Je&&T.nodeType===Fe.text){const tt=Ss(T.textContent);T.textContent!==tt&&(qr(t.removed,{element:T.cloneNode()}),T.textContent=tt)}return qe(V.afterSanitizeElements,T,null),!1},rh=function(T,$,U){if(Za[$]||zl&&($==="id"||$==="name")&&(U in r||U in fy))return!1;const tt=lt[$]||ue.attributeCheck instanceof Function&&ue.attributeCheck($,T);if(!(Ka&&zt(Ct,$))){if(!(Pl&&zt(vt,$))){if(tt){if(!ao[$]){if(!zt(et,Fi(U,oe,""))){if(!(($==="src"||$==="xlink:href"||$==="href")&&T!=="script"&&ch(U,"data:")===0&&Yl[T])){if(!(Nl&&!zt(qt,Fi(U,oe,"")))){if(U)return!1}}}}}else if(!(ih(T)&&(kt.tagNameCheck instanceof RegExp&&zt(kt.tagNameCheck,T)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(T))&&(kt.attributeNameCheck instanceof RegExp&&zt(kt.attributeNameCheck,$)||kt.attributeNameCheck instanceof Function&&kt.attributeNameCheck($,T))||$==="is"&&kt.allowCustomizedBuiltInElements&&(kt.tagNameCheck instanceof RegExp&&zt(kt.tagNameCheck,U)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(U))))return!1}}return!0},wy=mt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ih=function(T){return!wy[Ni(T)]&&zt(ce,T)},Sy=function(T,$,U,tt){if(B&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!U)switch(u.getAttributeType(T,$)){case"TrustedHTML":return Y(tt);case"TrustedScriptURL":return H(tt)}return tt},_y=function(T,$,U,tt){try{U?T.setAttributeNS(U,$,tt):T.setAttribute($,tt),_s(T)?tr(T):lh(t.removed)}catch{gr($,T)}},sh=function(T){qe(V.beforeSanitizeAttributes,T,null);const $=T.attributes;if(!$||_s(T))return;const U={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:lt,forceKeepAttr:void 0};let tt=$.length;const ct=Lt(T.nodeName);for(;tt--;){const yt=$[tt],Rt=yt.name,Et=yt.namespaceURI,de=yt.value,ge=Lt(Rt),fo=de;let Zt=Rt==="value"?fo:Ky(fo);if(U.attrName=ge,U.attrValue=Zt,U.keepAttr=!0,U.forceKeepAttr=void 0,qe(V.uponSanitizeAttribute,T,U),Zt=U.attrValue,Wl&&(ge==="id"||ge==="name")&&ch(Zt,Hl)!==0&&(gr(Rt,T),Zt=Hl+Zt),_i&&zt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Zt)){gr(Rt,T);continue}if(ge==="attributename"&&hh(Zt,"href")){gr(Rt,T);continue}if(!U.forceKeepAttr){if(!U.keepAttr){gr(Rt,T);continue}if(!ql&&zt(y0,Zt)){gr(Rt,T);continue}if(Je&&(Zt=Ss(Zt)),!rh(ct,ge,Zt)){gr(Rt,T);continue}Zt=Sy(ct,ge,Et,Zt),Zt!==fo&&_y(T,Rt,Et,Zt)}}qe(V.afterSanitizeAttributes,T,null)},Bs=function(T){let $=null;const U=th(T);for(qe(V.beforeSanitizeShadowDOM,T,null);$=U.nextNode();)if(qe(V.uponSanitizeShadowNode,$,null),eh($),sh($),Nr($.content)&&Bs($.content),(w?w($):$.nodeType)===Fe.element){const ct=b($);Nr(ct)&&(po(ct),Bs(ct))}qe(V.afterSanitizeShadowDOM,T,null)},po=function(T){const $=[{node:T,shadow:null}];for(;$.length>0;){const U=$.pop();if(U.shadow){Bs(U.shadow);continue}const tt=U.node,yt=(w?w(tt):tt.nodeType)===Fe.element,Rt=y(tt);if(Rt)for(let Et=Rt.length-1;Et>=0;--Et)$.push({node:Rt[Et],shadow:null});if(yt){const Et=S?S(tt):null;if(typeof Et=="string"&&Lt(Et)==="template"){const de=tt.content;Nr(de)&&$.push({node:de,shadow:null})}}if(yt){const Et=b(tt);Nr(Et)&&$.push({node:null,shadow:Et},{node:Et,shadow:null})}}};return t.sanitize=function(G){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=null,U=null,tt=null,ct=null;if(oo=!G,oo&&(G="<!-->"),typeof G!="string"&&!vi(G)&&(G=r0(G),typeof G!="string"))throw mr("dirty is not a string, aborting");if(!t.isSupported)return G;Qa?(X=Ja,lt=to):co(T),(V.uponSanitizeElement.length>0||V.uponSanitizeAttribute.length>0)&&(X=Qt(X)),V.uponSanitizeAttribute.length>0&&(lt=Qt(lt)),t.removed=[];const yt=io&&typeof G!="string"&&vi(G);if(yt){const de=S?S(G):G.nodeName;if(typeof de=="string"){const ge=Lt(de);if(!X[ge]||Qe[ge])throw mr("root node is forbidden and cannot be sanitized in-place")}if(_s(G))throw mr("root node is clobbered and cannot be sanitized in-place");try{po(G)}catch(ge){throw Ql(G),ge}}else if(vi(G))$=Jl("<!---->"),U=$.ownerDocument.importNode(G,!0),U.nodeType===Fe.element&&U.nodeName==="BODY"||U.nodeName==="HTML"?$=U:$.appendChild(U),po(U);else{if(!Ir&&!Je&&!fr&&G.indexOf("<")===-1)return B&&ks?Y(G):G;if($=Jl(G),!$)return Ir?null:ks?M:""}$&&eo&&tr($.firstChild);const Rt=th(yt?G:$);try{for(;tt=Rt.nextNode();)eh(tt),sh(tt),Nr(tt.content)&&Bs(tt.content)}catch(de){throw yt&&Ql(G),de}if(yt)return Li(t.removed,de=>{de.element&&by(de.element)}),Je&&uo(G),G;if(Ir){if(Je&&uo($),bs)for(ct=A.call($.ownerDocument);$.firstChild;)ct.appendChild($.firstChild);else ct=$;return(lt.shadowroot||lt.shadowrootmode)&&(ct=q.call(i,ct,!0)),ct}let Et=fr?$.outerHTML:$.innerHTML;return fr&&X["!doctype"]&&$.ownerDocument&&$.ownerDocument.doctype&&$.ownerDocument.doctype.name&&zt(p0,$.ownerDocument.doctype.name)&&(Et="<!DOCTYPE "+$.ownerDocument.doctype.name+`>
4
+ `+Et),Je&&(Et=Ss(Et)),B&&ks?Y(Et):Et},t.setConfig=function(){let G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};co(G),Qa=!0,Ja=X,to=lt},t.clearConfig=function(){Pr=null,Qa=!1,Ja=null,to=null,B=v,M=""},t.isValidAttribute=function(G,T,$){Pr||co({});const U=Lt(G),tt=Lt(T);return rh(U,tt,$)},t.addHook=function(G,T){typeof T=="function"&&Pt(V,G)&&qr(V[G],T)},t.removeHook=function(G,T){if(Pt(V,G)){if(T!==void 0){const $=Vy(V[G],T);return $===-1?void 0:Zy(V[G],$,1)[0]}return lh(V[G])}},t.removeHooks=function(G){Pt(V,G)&&(V[G]=[])},t.removeAllHooks=function(){V=xh()},t}var pi=jc(),Xc=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Xi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,b0=/\s*%%.*\n/gm,Jr,Vc=(Jr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},f(Jr,"UnknownDiagramError"),Jr),vr={},Rn=f(function(e,t){e=e.replace(Xc,"").replace(Xi,"").replace(b0,`
5
+ `);for(const[r,{detector:i}]of Object.entries(vr))if(i(e,t))return r;throw new Vc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ro=f((...e)=>{for(const{id:t,detector:r,loader:i}of e)Zc(t,r,i)},"registerLazyLoadedDiagrams"),Zc=f((e,t,r)=>{vr[e]&&z.warn(`Detector with key ${e} already exists. Overwriting.`),vr[e]={detector:t,loader:r},z.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),k0=f(e=>vr[e].loader,"getDiagramLoader"),Po=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=>Po(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]=Po(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),It=Po,Re="#ffffff",Pe="#f2f2f2",ot=f((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),ti,T0=(ti=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,m,g,y,C,b,k,w,S,B,M,v,W,D,I,Y,H,R,E,L,O,A,_;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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?N(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||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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||P(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||N(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||N(this.mainBkg,10)):(this.rowOdd=this.rowOdd||P(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||P(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]=N(this["cScale"+q],75);else for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScale"+q]=N(this["cScale"+q],25);for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScaleInv"+q]=this["cScaleInv"+q]||F(this["cScale"+q]);for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this.darkMode?this["cScalePeer"+q]=this["cScalePeer"+q]||P(this["cScale"+q],10):this["cScalePeer"+q]=this["cScalePeer"+q]||N(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:((m=this.wardley)==null?void 0:m.axisTextColor)||this.primaryTextColor,gridColor:((g=this.wardley)==null?void 0:g.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:((w=this.wardley)==null?void 0:w.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((S=this.wardley)==null?void 0:S.annotationStroke)||this.lineColor,annotationTextColor:((B=this.wardley)==null?void 0:B.annotationTextColor)||this.primaryTextColor,annotationFill:((M=this.wardley)==null?void 0:M.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||Se(this.quadrant1Fill)?P(this.quadrant1Fill):N(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:((v=this.xyChart)==null?void 0:v.backgroundColor)||this.background,titleColor:((W=this.xyChart)==null?void 0:W.titleColor)||this.primaryTextColor,dataLabelColor:((D=this.xyChart)==null?void 0:D.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((I=this.xyChart)==null?void 0:I.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:((R=this.xyChart)==null?void 0:R.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((E=this.xyChart)==null?void 0:E.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((L=this.xyChart)==null?void 0:L.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((O=this.xyChart)==null?void 0:O.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((A=this.xyChart)==null?void 0:A.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_=this.xyChart)==null?void 0:_.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?N(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=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pe,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(ti,"Theme"),ti),w0=f(e=>{const t=new T0;return t.calculate(e),t},"getThemeVariables"),ei,S0=(ei=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(F("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=nr(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=N("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=N(this.sectionBkgColor,10),this.taskBorderColor=nr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=nr(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||P(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||N(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,m,g,y,C,b,k,w,S,B,M,v,W,D,I,Y,H,R,E,L,O,A;this.secondBkg=P(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=P(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=P(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=F(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 _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||F(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScalePeer"+_]=this["cScalePeer"+_]||P(this["cScale"+_],10);for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||x(this.mainBkg,{h:30,s:-30,l:-(-10+_*4)}),this["surfacePeer"+_]=this["surfacePeer"+_]||x(this.mainBkg,{h:30,s:-30,l:-(-7+_*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["pie"+_]=this["cScale"+_];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 _=0;_<8;_++)this["venn"+(_+1)]=this["venn"+(_+1)]??P(this["cScale"+_],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||Se(this.quadrant1Fill)?P(this.quadrant1Fill):N(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:((m=this.radar)==null?void 0:m.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.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:((w=this.radar)==null?void 0:w.graticuleOpacity)||.3,legendBoxSize:((S=this.radar)==null?void 0:S.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((M=this.wardley)==null?void 0:M.backgroundColor)||this.background,axisColor:((v=this.wardley)==null?void 0:v.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((D=this.wardley)==null?void 0:D.gridColor)||this.gridColor,componentFill:((I=this.wardley)==null?void 0:I.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:((R=this.wardley)==null?void 0:R.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((L=this.wardley)==null?void 0:L.annotationStroke)||this.lineColor,annotationTextColor:((O=this.wardley)==null?void 0:O.annotationTextColor)||this.primaryTextColor,annotationFill:((A=this.wardley)==null?void 0:A.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?N(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=P(this.secondaryColor,20),this.git1=P(this.pie2||this.secondaryColor,20),this.git2=P(this.pie3||this.tertiaryColor,20),this.git3=P(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=P(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=P(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=P(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=P(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(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||P("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||P("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||P("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||P("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||P(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||P(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||P(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||P(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(ei,"Theme"),ei),_0=f(e=>{const t=new S0;return t.calculate(e),t},"getThemeVariables"),ri,B0=(ri=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=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=nr(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,m,g,y,C,b,k,w,S,B,M,v,W,D,I,Y,H,R,E,L,O,A;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||N(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||N(this.tertiaryColor,40);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=N(this["cScale"+_],10),this["cScalePeer"+_]=this["cScalePeer"+_]||N(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||x(this["cScale"+_],{h:180});for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||x(this.mainBkg,{h:30,l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||x(this.mainBkg,{h:30,l:-(7+_*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||F(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||F(this.labelTextColor);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||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||P(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||P(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||Se(this.quadrant1Fill)?P(this.quadrant1Fill):N(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:((m=this.wardley)==null?void 0:m.gridColor)||this.gridColor,componentFill:((g=this.wardley)==null?void 0:g.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:((w=this.wardley)==null?void 0:w.annotationStroke)||this.lineColor,annotationTextColor:((S=this.wardley)==null?void 0:S.annotationTextColor)||this.primaryTextColor,annotationFill:((B=this.wardley)==null?void 0:B.annotationFill)||this.background},this.xyChart={backgroundColor:((M=this.xyChart)==null?void 0:M.backgroundColor)||this.background,titleColor:((v=this.xyChart)==null?void 0:v.titleColor)||this.primaryTextColor,dataLabelColor:((W=this.xyChart)==null?void 0:W.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((D=this.xyChart)==null?void 0:D.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((I=this.xyChart)==null?void 0:I.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:((R=this.xyChart)==null?void 0:R.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((L=this.xyChart)==null?void 0:L.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((O=this.xyChart)==null?void 0:O.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((A=this.xyChart)==null?void 0:A.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=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||N(F(this.git0),25),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pe}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(ri,"Theme"),ri),v0=f(e=>{const t=new B0;return t.calculate(e),t},"getThemeVariables"),ii,L0=(ii=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=P("#cde498",10),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.primaryColor),this.lineColor=F(this.background),this.textColor=F(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,m,g,y,C,b,k,w,S,B,M,v,W,D,I,Y,H,R,E,L,O,A;this.actorBorder=N(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||N(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||N(this.tertiaryColor,40);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=N(this["cScale"+_],10),this["cScalePeer"+_]=this["cScalePeer"+_]||N(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||x(this["cScale"+_],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||x(this.mainBkg,{h:30,s:-30,l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||x(this.mainBkg,{h:30,s:-30,l:-(8+_*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||P(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||P(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||Se(this.quadrant1Fill)?P(this.quadrant1Fill):N(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:((m=this.wardley)==null?void 0:m.gridColor)||this.gridColor,componentFill:((g=this.wardley)==null?void 0:g.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:((w=this.wardley)==null?void 0:w.annotationStroke)||this.lineColor,annotationTextColor:((S=this.wardley)==null?void 0:S.annotationTextColor)||this.primaryTextColor,annotationFill:((B=this.wardley)==null?void 0:B.annotationFill)||this.background},this.xyChart={backgroundColor:((M=this.xyChart)==null?void 0:M.backgroundColor)||this.background,titleColor:((v=this.xyChart)==null?void 0:v.titleColor)||this.primaryTextColor,dataLabelColor:((W=this.xyChart)==null?void 0:W.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((D=this.xyChart)==null?void 0:D.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((I=this.xyChart)==null?void 0:I.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:((R=this.xyChart)==null?void 0:R.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((L=this.xyChart)==null?void 0:L.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((O=this.xyChart)==null?void 0:O.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((A=this.xyChart)==null?void 0:A.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=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pe}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),F0=f(e=>{const t=new L0;return t.calculate(e),t},"getThemeVariables"),si,A0=(si=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=P(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(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||P(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,m,g,y,C,b,k,w,S,B,M,v,W,D,I,Y,H,R,E,L,O,A;this.secondBkg=P(this.contrast,55),this.border2=this.contrast,this.actorBorder=P(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 _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||F(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||P(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||N(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||x(this.mainBkg,{l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||x(this.mainBkg,{l:-(8+_*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=P(this.contrast,30),this.sectionBkgColor2=P(this.contrast,30),this.taskBorderColor=N(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=P(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=N(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 _=0;_<this.THEME_COLOR_LIMIT;_++)this["pie"+_]=this["cScale"+_];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 _=0;_<8;_++)this["venn"+(_+1)]=this["venn"+(_+1)]??this["cScale"+_];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||Se(this.quadrant1Fill)?P(this.quadrant1Fill):N(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:((m=this.radar)==null?void 0:m.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.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:((w=this.radar)==null?void 0:w.graticuleOpacity)||.3,legendBoxSize:((S=this.radar)==null?void 0:S.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((M=this.wardley)==null?void 0:M.backgroundColor)||this.background,axisColor:((v=this.wardley)==null?void 0:v.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((D=this.wardley)==null?void 0:D.gridColor)||this.gridColor,componentFill:((I=this.wardley)==null?void 0:I.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:((R=this.wardley)==null?void 0:R.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((L=this.wardley)==null?void 0:L.annotationStroke)||this.lineColor,annotationTextColor:((O=this.wardley)==null?void 0:O.annotationTextColor)||this.primaryTextColor,annotationFill:((A=this.wardley)==null?void 0:A.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=N(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||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(si,"Theme"),si),E0=f(e=>{const t=new A0;return t.calculate(e),t},"getThemeVariables"),ai,M0=(ai=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var a,o,n,l,h,c,u,p,d,m,g;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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?N(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||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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||P(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]=N(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=N(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||F(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||P(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||N(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||Se(this.quadrant1Fill)?P(this.quadrant1Fill):N(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:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.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?N(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=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ai,"Theme"),ai),$0=f(e=>{const t=new M0;return t.calculate(e),t},"getThemeVariables"),oi,O0=(oi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(F("#323D47"),10),this.border1="#ccc",this.border2=nr(255,255,255,.25),this.arrowheadColor=F(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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?N(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||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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||P(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]=N(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=N(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||F(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||P(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||N(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||Se(this.quadrant1Fill)?P(this.quadrant1Fill):N(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?N(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=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(oi,"Theme"),oi),I0=f(e=>{const t=new O0;return t.calculate(e),t},"getThemeVariables"),ni,D0=(ni=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ot("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var a,o,n,l,h,c,u,p,d,m,g;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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?N(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||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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||P(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]=N(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=N(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||F(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||P(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||N(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||Se(this.quadrant1Fill)?P(this.quadrant1Fill):N(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:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.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?N(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=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ni,"Theme"),ni),R0=f(e=>{const t=new D0;return t.calculate(e),t},"getThemeVariables"),li,P0=(li=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(F("#323D47"),10),this.border1="#ccc",this.border2=nr(255,255,255,.25),this.arrowheadColor=F(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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?N(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||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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||P(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]=N(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=N(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||F(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||P(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||N(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||Se(this.quadrant1Fill)?P(this.quadrant1Fill):N(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?N(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=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pe}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(li,"Theme"),li),N0=f(e=>{const t=new P0;return t.calculate(e),t},"getThemeVariables"),hi,q0=(hi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var a,o,n,l,h,c,u,p,d,m,g;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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?N(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||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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||P(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]||F(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||P(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||N(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||Se(this.quadrant1Fill)?P(this.quadrant1Fill):N(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:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.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?N(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=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pe}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(hi,"Theme"),hi),z0=f(e=>{const t=new q0;return t.calculate(e),t},"getThemeVariables"),ci,W0=(ci=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(F("#323D47"),10),this.border1="#ccc",this.border2=nr(255,255,255,.25),this.arrowheadColor=F(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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?N(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||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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||P(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]||F(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||P(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||N(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=N(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||Se(this.quadrant1Fill)?P(this.quadrant1Fill):N(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?N(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=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pe}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(ci,"Theme"),ci),H0=f(e=>{const t=new W0;return t.calculate(e),t},"getThemeVariables"),Ue={base:{getThemeVariables:w0},dark:{getThemeVariables:_0},default:{getThemeVariables:v0},forest:{getThemeVariables:F0},neutral:{getThemeVariables:E0},neo:{getThemeVariables:$0},"neo-dark":{getThemeVariables:I0},redux:{getThemeVariables:R0},"redux-dark":{getThemeVariables:N0},"redux-color":{getThemeVariables:z0},"redux-dark-color":{getThemeVariables:H0}},Kt={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},Kc={...Kt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Ue.default.getThemeVariables(),sequence:{...Kt.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:{...Kt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Kt.c4,useWidth:void 0,personFont:f(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Kt.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:{...Kt.pie,useWidth:984},xyChart:{...Kt.xyChart,useWidth:void 0},requirement:{...Kt.requirement,useWidth:void 0},packet:{...Kt.packet},eventmodeling:{...Kt.eventmodeling},treeView:{...Kt.treeView,useWidth:void 0},radar:{...Kt.radar},ishikawa:{...Kt.ishikawa},sankey:{...Kt.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:{...Kt.venn}},Qc=f((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Qc(e[i],"")]:[...r,t+i],[]),"keyify"),Y0=new Set(Qc(Kc,"")),Jc=Kc,ta=f(e=>{if(z.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>ta(t));return}for(const t of Object.keys(e)){if(z.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Y0.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),ta(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(z.debug("sanitizing css option",t),e[t]=tu(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"),tu=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"),fi=Object.freeze(Jc),Ve=f(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ie=It({},fi),ea,Lr=[],Vi=It({},fi),Ma=f((e,t)=>{let r=It({},e),i={};for(const s of t)iu(s),i=It(i,s);if(r=It(r,i),i.theme&&i.theme in Ue){const s=It({},ea),a=It(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in Ue&&(r.themeVariables=Ue[r.theme].getThemeVariables(a))}return Vi=r,au(Vi),Vi},"updateCurrentConfig"),U0=f(e=>(ie=It({},fi),ie=It(ie,e),e.theme&&Ue[e.theme]&&(ie.themeVariables=Ue[e.theme].getThemeVariables(e.themeVariables)),Ma(ie,Lr),ie),"setSiteConfig"),G0=f(e=>{ea=It({},e)},"saveConfigFromInitialize"),j0=f(e=>(ie=It(ie,e),Ma(ie,Lr),ie),"updateSiteConfig"),eu=f(()=>It({},ie),"getSiteConfig"),ru=f(e=>(au(e),It(Vi,e),Bt()),"setConfig"),Bt=f(()=>It({},Vi),"getConfig"),iu=f(e=>{e&&(["secure",...ie.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"&&iu(e[t])}))},"sanitize"),X0=f(e=>{var t;ta(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Lr.push(e),Ma(ie,Lr)},"addDirective"),ra=f((e=ie)=>{Lr=[],Ma(e,Lr)},"reset"),V0={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},bh={},su=f(e=>{bh[e]||(z.warn(V0[e]),bh[e]=!0)},"issueWarning"),au=f(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&su("LAZY_LOAD_DEPRECATED")},"checkConfig"),cL=f(()=>{let e={};ea&&(e=It(e,ea));for(const t of Lr)e=It(e,t);return e},"getUserDefinedConfig"),ee=f(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&su("FLOWCHART_HTML_LABELS_DEPRECATED"),Ve(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),us=/<br\s*\/?>/gi,Z0=f(e=>e?lu(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),K0=(()=>{let e=!1;return()=>{e||(ou(),e=!0)}})();function ou(){const e="data-temp-href-target";pi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),pi.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(ou,"setupDompurifyHooks");var nu=f(e=>(K0(),pi.sanitize(e)),"removeScript"),kh=f((e,t)=>{if(ee(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=nu(e):r!=="loose"&&(e=lu(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=eC(e))}return e},"sanitizeMore"),we=f((e,t)=>e&&(t.dompurifyConfig?e=pi.sanitize(kh(e,t),t.dompurifyConfig).toString():e=pi.sanitize(kh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Q0=f((e,t)=>typeof e=="string"?we(e,t):e.flat().map(r=>we(r,t)),"sanitizeTextOrArray"),J0=f(e=>us.test(e),"hasBreaks"),tC=f(e=>e.split(us),"splitBreaks"),eC=f(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),lu=f(e=>e.replace(us,"#br#"),"breakToPlaceholder"),rC=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"),iC=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),sC=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Th=f(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const a=t[i-1],o=t[i+1];aC(a,o)&&(s=a+","+o,i++,r.pop())}r.push(oC(s))}return r.join("")},"parseGenericTypes"),No=f((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),aC=f((e,t)=>{const r=No(e,"~"),i=No(t,"~");return r===1&&i===1},"shouldCombineSets"),oC=f(e=>{const t=No(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"),wh=f(()=>window.MathMLElement!==void 0,"isMathMLSupported"),qo=/\$\$(.*)\$\$/g,Ji=f(e=>{var t;return(((t=e.match(qo))==null?void 0:t.length)??0)>0},"hasKatex"),uL=f(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await hu(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"),nC=f(async(e,t)=>{if(!Ji(e))return e;if(!(wh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(qo,"MathML is unsupported in this environment.");{const{default:r}=await ft(async()=>{const{default:s}=await import("./katex-DkKDou_j.js");return{default:s}},[]),i=t.forceLegacyMathML||!wh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(us).map(s=>Ji(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(qo,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),hu=f(async(e,t)=>we(await nC(e,t),t),"renderKatexSanitized"),ds={getRows:Z0,sanitizeText:we,sanitizeTextOrArray:Q0,hasBreaks:J0,splitBreaks:tC,lineBreakRegex:us,removeScript:nu,getUrl:rC,evaluate:Ve,getMax:iC,getMin:sC},lC=f(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),hC=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"),cu=f(function(e,t,r,i){const s=hC(t,r,i);lC(e,s)},"configureSvgSize"),cC=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}`),cu(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"),Ws={};function zo(e){return[...e.cssRules].map(t=>t.cssText).join(`
6
+ `)}f(zo,"cssStyleSheetToString");var uC=f((e,t,r,i)=>{let s="";return e in Ws&&Ws[e]?s=Ws[e]({...r,svgId:i}):z.warn(`No theme found for ${e}`),` & {
6
7
  font-family: ${r.fontFamily};
7
8
  font-size: ${r.fontSize};
8
9
  fill: ${r.textColor}
@@ -120,49 +121,49 @@ var Km=Object.defineProperty;var Qm=(e,t,r)=>t in e?Km(e,t,{enumerable:!0,config
120
121
  }
121
122
 
122
123
  ${t}
123
- `},"getStyles"),L0=f((e,t)=>{t!==void 0&&($s[e]=t)},"addStylesForDiagram"),F0=v0,Uc={};sy(Uc,{clear:()=>A0,getAccDescription:()=>O0,getAccTitle:()=>M0,getDiagramTitle:()=>D0,setAccDescription:()=>$0,setAccTitle:()=>E0,setDiagramTitle:()=>I0});var Tn="",wn="",Sn="",_n=f(e=>Se(e,St()),"sanitizeText"),A0=f(()=>{Tn="",Sn="",wn=""},"clear"),E0=f(e=>{Tn=_n(e).replace(/^\s+/g,"")},"setAccTitle"),M0=f(()=>Tn,"getAccTitle"),$0=f(e=>{Sn=_n(e).replace(/\n\s+/g,`
124
- `)},"setAccDescription"),O0=f(()=>Sn,"getAccDescription"),I0=f(e=>{wn=_n(e)},"setDiagramTitle"),D0=f(()=>wn,"getDiagramTitle"),ih=q,R0=bn,gt=St,Lv=Dc,Fv=oi,Bn=f(e=>Se(e,gt()),"sanitizeText"),P0=B0,N0=f(()=>Uc,"getCommonDb"),js={},Vs=f((e,t,r)=>{var i;js[e]&&ih.warn(`Diagram with id ${e} already registered. Overwriting.`),js[e]=t,r&&Ac(e,r),L0(e,t.styles),(i=t.injectUtils)==null||i.call(t,ih,R0,gt,Bn,P0,N0(),()=>{})},"registerDiagram"),Bo=f(e=>{if(e in js)return js[e];throw new q0(e)},"getDiagram"),ii,q0=(ii=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},f(ii,"DiagramNotFoundError"),ii),W0={value:()=>{}};function Gc(){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 Os(r)}function Os(e){this._=e}function z0(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}})}Os.prototype=Gc.prototype={constructor:Os,on:function(e,t){var r=this._,i=z0(e+"",r),s,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((s=(e=i[a]).type)&&(s=H0(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]=sh(r[s],e.name,t);else if(t==null)for(s in r)r[s]=sh(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 Os(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 H0(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function sh(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=W0,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var vo="http://www.w3.org/1999/xhtml";const ah={svg:"http://www.w3.org/2000/svg",xhtml:vo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Sa(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),ah.hasOwnProperty(t)?{space:ah[t],local:e}:e}function Y0(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===vo&&t.documentElement.namespaceURI===vo?t.createElement(e):t.createElementNS(r,e)}}function U0(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Xc(e){var t=Sa(e);return(t.local?U0:Y0)(t)}function G0(){}function vn(e){return e==null?G0:function(){return this.querySelector(e)}}function X0(e){typeof e!="function"&&(e=vn(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 ce(i,this._parents)}function j0(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function V0(){return[]}function jc(e){return e==null?V0:function(){return this.querySelectorAll(e)}}function Z0(e){return function(){return j0(e.apply(this,arguments))}}function K0(e){typeof e=="function"?e=Z0(e):e=jc(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 ce(i,s)}function Vc(e){return function(){return this.matches(e)}}function Zc(e){return function(t){return t.matches(e)}}var Q0=Array.prototype.find;function J0(e){return function(){return Q0.call(this.children,e)}}function tC(){return this.firstElementChild}function eC(e){return this.select(e==null?tC:J0(typeof e=="function"?e:Zc(e)))}var rC=Array.prototype.filter;function iC(){return Array.from(this.children)}function sC(e){return function(){return rC.call(this.children,e)}}function aC(e){return this.selectAll(e==null?iC:sC(typeof e=="function"?e:Zc(e)))}function oC(e){typeof e!="function"&&(e=Vc(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 ce(i,this._parents)}function Kc(e){return new Array(e.length)}function nC(){return new ce(this._enter||this._groups.map(Kc),this._parents)}function Zs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Zs.prototype={constructor:Zs,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 lC(e){return function(){return e}}function hC(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 Zs(e,a[o]);for(;o<l;++o)(n=t[o])&&(s[o]=n)}function cC(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 Zs(e,a[n]);for(n=0;n<c;++n)(l=t[n])&&h.get(p[n])===l&&(s[n]=l)}function uC(e){return e.__data__}function dC(e,t){if(!arguments.length)return Array.from(this,uC);var r=t?cC:hC,i=this._parents,s=this._groups;typeof e!="function"&&(e=lC(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=pC(e.call(c,c&&c.__data__,h,i)),m=d.length,g=n[h]=new Array(m),y=o[h]=new Array(m),C=l[h]=new Array(p);r(c,u,g,y,C,d,t);for(var b=0,k=0,T,w;b<m;++b)if(T=g[b]){for(b>=k&&(k=b+1);!(w=y[k])&&++k<m;);T._next=w||null}}return o=new ce(o,i),o._enter=n,o._exit=l,o}function pC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function fC(){return new ce(this._exit||this._groups.map(Kc),this._parents)}function gC(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 mC(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,m=0;m<u;++m)(d=h[m]||c[m])&&(p[m]=d);for(;l<s;++l)n[l]=r[l];return new ce(n,this._parents)}function yC(){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=xC);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 ce(s,this._parents).order()}function xC(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function bC(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function kC(){return Array.from(this)}function TC(){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 wC(){let e=0;for(const t of this)++e;return e}function SC(){return!this.node()}function _C(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 BC(e){return function(){this.removeAttribute(e)}}function vC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function LC(e,t){return function(){this.setAttribute(e,t)}}function FC(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function AC(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function EC(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 MC(e,t){var r=Sa(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?vC:BC:typeof t=="function"?r.local?EC:AC:r.local?FC:LC)(r,t))}function Qc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function $C(e){return function(){this.style.removeProperty(e)}}function OC(e,t,r){return function(){this.style.setProperty(e,t,r)}}function IC(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function DC(e,t,r){return arguments.length>1?this.each((t==null?$C:typeof t=="function"?IC:OC)(e,t,r??"")):ni(this.node(),e)}function ni(e,t){return e.style.getPropertyValue(t)||Qc(e).getComputedStyle(e,null).getPropertyValue(t)}function RC(e){return function(){delete this[e]}}function PC(e,t){return function(){this[e]=t}}function NC(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function qC(e,t){return arguments.length>1?this.each((t==null?RC:typeof t=="function"?NC:PC)(e,t)):this.node()[e]}function Jc(e){return e.trim().split(/^|\s+/)}function Ln(e){return e.classList||new tu(e)}function tu(e){this._node=e,this._names=Jc(e.getAttribute("class")||"")}tu.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 eu(e,t){for(var r=Ln(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function ru(e,t){for(var r=Ln(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function WC(e){return function(){eu(this,e)}}function zC(e){return function(){ru(this,e)}}function HC(e,t){return function(){(t.apply(this,arguments)?eu:ru)(this,e)}}function YC(e,t){var r=Jc(e+"");if(arguments.length<2){for(var i=Ln(this.node()),s=-1,a=r.length;++s<a;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?HC:t?WC:zC)(r,t))}function UC(){this.textContent=""}function GC(e){return function(){this.textContent=e}}function XC(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function jC(e){return arguments.length?this.each(e==null?UC:(typeof e=="function"?XC:GC)(e)):this.node().textContent}function VC(){this.innerHTML=""}function ZC(e){return function(){this.innerHTML=e}}function KC(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function QC(e){return arguments.length?this.each(e==null?VC:(typeof e=="function"?KC:ZC)(e)):this.node().innerHTML}function JC(){this.nextSibling&&this.parentNode.appendChild(this)}function tx(){return this.each(JC)}function ex(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function rx(){return this.each(ex)}function ix(e){var t=typeof e=="function"?e:Xc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function sx(){return null}function ax(e,t){var r=typeof e=="function"?e:Xc(e),i=t==null?sx:typeof t=="function"?t:vn(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function ox(){var e=this.parentNode;e&&e.removeChild(this)}function nx(){return this.each(ox)}function lx(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function hx(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function cx(e){return this.select(e?hx:lx)}function ux(e){return arguments.length?this.property("__data__",e):this.node().__data__}function dx(e){return function(t){e.call(this,t,this.__data__)}}function px(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 fx(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 gx(e,t,r){return function(){var i=this.__on,s,a=dx(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 mx(e,t,r){var i=px(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?gx:fx,s=0;s<a;++s)this.each(n(i[s],t,r));return this}function iu(e,t,r){var i=Qc(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 yx(e,t){return function(){return iu(this,e,t)}}function Cx(e,t){return function(){return iu(this,e,t.apply(this,arguments))}}function xx(e,t){return this.each((typeof t=="function"?Cx:yx)(e,t))}function*bx(){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 su=[null];function ce(e,t){this._groups=e,this._parents=t}function as(){return new ce([[document.documentElement]],su)}function kx(){return this}ce.prototype=as.prototype={constructor:ce,select:X0,selectAll:K0,selectChild:eC,selectChildren:aC,filter:oC,data:dC,enter:nC,exit:fC,join:gC,merge:mC,selection:kx,order:yC,sort:CC,call:bC,nodes:kC,node:TC,size:wC,empty:SC,each:_C,attr:MC,style:DC,property:qC,classed:YC,text:jC,html:QC,raise:tx,lower:rx,append:ix,insert:ax,remove:nx,clone:cx,datum:ux,on:mx,dispatch:xx,[Symbol.iterator]:bx};function ct(e){return typeof e=="string"?new ce([[document.querySelector(e)]],[document.documentElement]):new ce([[e]],su)}function Fn(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function au(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function os(){}var Gi=.7,Ks=1/Gi,Hr="\\s*([+-]?\\d+)\\s*",Xi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",$e="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Tx=/^#([0-9a-f]{3,8})$/,wx=new RegExp(`^rgb\\(${Hr},${Hr},${Hr}\\)$`),Sx=new RegExp(`^rgb\\(${$e},${$e},${$e}\\)$`),_x=new RegExp(`^rgba\\(${Hr},${Hr},${Hr},${Xi}\\)$`),Bx=new RegExp(`^rgba\\(${$e},${$e},${$e},${Xi}\\)$`),vx=new RegExp(`^hsl\\(${Xi},${$e},${$e}\\)$`),Lx=new RegExp(`^hsla\\(${Xi},${$e},${$e},${Xi}\\)$`),oh={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};Fn(os,ji,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nh,formatHex:nh,formatHex8:Fx,formatHsl:Ax,formatRgb:lh,toString:lh});function nh(){return this.rgb().formatHex()}function Fx(){return this.rgb().formatHex8()}function Ax(){return ou(this).formatHsl()}function lh(){return this.rgb().formatRgb()}function ji(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Tx.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?hh(t):r===3?new ae(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?xs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?xs(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=wx.exec(e))?new ae(t[1],t[2],t[3],1):(t=Sx.exec(e))?new ae(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=_x.exec(e))?xs(t[1],t[2],t[3],t[4]):(t=Bx.exec(e))?xs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=vx.exec(e))?dh(t[1],t[2]/100,t[3]/100,1):(t=Lx.exec(e))?dh(t[1],t[2]/100,t[3]/100,t[4]):oh.hasOwnProperty(e)?hh(oh[e]):e==="transparent"?new ae(NaN,NaN,NaN,0):null}function hh(e){return new ae(e>>16&255,e>>8&255,e&255,1)}function xs(e,t,r,i){return i<=0&&(e=t=r=NaN),new ae(e,t,r,i)}function Ex(e){return e instanceof os||(e=ji(e)),e?(e=e.rgb(),new ae(e.r,e.g,e.b,e.opacity)):new ae}function Lo(e,t,r,i){return arguments.length===1?Ex(e):new ae(e,t,r,i??1)}function ae(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Fn(ae,Lo,au(os,{brighter(e){return e=e==null?Ks:Math.pow(Ks,e),new ae(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Gi:Math.pow(Gi,e),new ae(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ae(yr(this.r),yr(this.g),yr(this.b),Qs(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:ch,formatHex:ch,formatHex8:Mx,formatRgb:uh,toString:uh}));function ch(){return`#${fr(this.r)}${fr(this.g)}${fr(this.b)}`}function Mx(){return`#${fr(this.r)}${fr(this.g)}${fr(this.b)}${fr((isNaN(this.opacity)?1:this.opacity)*255)}`}function uh(){const e=Qs(this.opacity);return`${e===1?"rgb(":"rgba("}${yr(this.r)}, ${yr(this.g)}, ${yr(this.b)}${e===1?")":`, ${e})`}`}function Qs(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function yr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function fr(e){return e=yr(e),(e<16?"0":"")+e.toString(16)}function dh(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new be(e,t,r,i)}function ou(e){if(e instanceof be)return new be(e.h,e.s,e.l,e.opacity);if(e instanceof os||(e=ji(e)),!e)return new be;if(e instanceof be)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 be(o,n,l,e.opacity)}function $x(e,t,r,i){return arguments.length===1?ou(e):new be(e,t,r,i??1)}function be(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Fn(be,$x,au(os,{brighter(e){return e=e==null?Ks:Math.pow(Ks,e),new be(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Gi:Math.pow(Gi,e),new be(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 ae(io(e>=240?e-240:e+120,s,i),io(e,s,i),io(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new be(ph(this.h),bs(this.s),bs(this.l),Qs(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=Qs(this.opacity);return`${e===1?"hsl(":"hsla("}${ph(this.h)}, ${bs(this.s)*100}%, ${bs(this.l)*100}%${e===1?")":`, ${e})`}`}}));function ph(e){return e=(e||0)%360,e<0?e+360:e}function bs(e){return Math.max(0,Math.min(1,e||0))}function io(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 An=e=>()=>e;function nu(e,t){return function(r){return e+r*t}}function Ox(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?nu(e,r>180||r<-180?r-360*Math.round(r/360):r):An(isNaN(e)?t:e)}function Ix(e){return(e=+e)==1?lu:function(t,r){return r-t?Ox(t,r,e):An(isNaN(t)?r:t)}}function lu(e,t){var r=t-e;return r?nu(e,r):An(isNaN(e)?t:e)}const fh=(function e(t){var r=Ix(t);function i(s,a){var o=r((s=Lo(s)).r,(a=Lo(a)).r),n=r(s.g,a.g),l=r(s.b,a.b),h=lu(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 Qe(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Fo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,so=new RegExp(Fo.source,"g");function Dx(e){return function(){return e}}function Rx(e){return function(t){return e(t)+""}}function Px(e,t){var r=Fo.lastIndex=so.lastIndex=0,i,s,a,o=-1,n=[],l=[];for(e=e+"",t=t+"";(i=Fo.exec(e))&&(s=so.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:Qe(i,s)})),r=so.lastIndex;return r<t.length&&(a=t.slice(r),n[o]?n[o]+=a:n[++o]=a),n.length<2?l[0]?Rx(l[0].x):Dx(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 gh=180/Math.PI,Ao={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function hu(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)*gh,skewX:Math.atan(l)*gh,scaleX:o,scaleY:n}}var ks;function Nx(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ao:hu(t.a,t.b,t.c,t.d,t.e,t.f)}function qx(e){return e==null||(ks||(ks=document.createElementNS("http://www.w3.org/2000/svg","g")),ks.setAttribute("transform",e),!(e=ks.transform.baseVal.consolidate()))?Ao:(e=e.matrix,hu(e.a,e.b,e.c,e.d,e.e,e.f))}function cu(e,t,r,i){function s(h){return h.length?h.pop()+" ":""}function a(h,c,u,p,d,m){if(h!==u||c!==p){var g=d.push("translate(",null,t,null,r);m.push({i:g-4,x:Qe(h,u)},{i:g-2,x:Qe(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:Qe(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:Qe(h,c)}):c&&u.push(s(u)+"skewX("+c+i)}function l(h,c,u,p,d,m){if(h!==u||c!==p){var g=d.push(s(d)+"scale(",null,",",null,")");m.push({i:g-4,x:Qe(h,u)},{i:g-2,x:Qe(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 m=-1,g=p.length,y;++m<g;)u[(y=p[m]).i]=y.x(d);return u.join("")}}}var Wx=cu(Nx,"px, ","px)","deg)"),zx=cu(qx,", ",")",")"),li=0,Mi=0,wi=0,uu=1e3,Js,$i,ta=0,kr=0,_a=0,Vi=typeof performance=="object"&&performance.now?performance:Date,du=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function En(){return kr||(du(Hx),kr=Vi.now()+_a)}function Hx(){kr=0}function ea(){this._call=this._time=this._next=null}ea.prototype=pu.prototype={constructor:ea,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?En():+r)+(t==null?0:+t),!this._next&&$i!==this&&($i?$i._next=this:Js=this,$i=this),this._call=e,this._time=r,Eo()},stop:function(){this._call&&(this._call=null,this._time=1/0,Eo())}};function pu(e,t,r){var i=new ea;return i.restart(e,t,r),i}function Yx(){En(),++li;for(var e=Js,t;e;)(t=kr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--li}function mh(){kr=(ta=Vi.now())+_a,li=Mi=0;try{Yx()}finally{li=0,Gx(),kr=0}}function Ux(){var e=Vi.now(),t=e-ta;t>uu&&(_a-=t,ta=e)}function Gx(){for(var e,t=Js,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:Js=r);$i=e,Eo(i)}function Eo(e){if(!li){Mi&&(Mi=clearTimeout(Mi));var t=e-kr;t>24?(e<1/0&&(Mi=setTimeout(mh,e-Vi.now()-_a)),wi&&(wi=clearInterval(wi))):(wi||(ta=Vi.now(),wi=setInterval(Ux,uu)),li=1,du(mh))}}function yh(e,t,r){var i=new ea;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var Xx=Gc("start","end","cancel","interrupt"),jx=[],fu=0,Ch=1,Mo=2,Is=3,xh=4,$o=5,Ds=6;function Ba(e,t,r,i,s,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;Vx(e,r,{name:t,index:i,group:s,on:Xx,tween:jx,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:fu})}function Mn(e,t){var r=Be(e,t);if(r.state>fu)throw new Error("too late; already scheduled");return r}function Pe(e,t){var r=Be(e,t);if(r.state>Is)throw new Error("too late; already running");return r}function Be(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Vx(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=pu(a,0,r.time);function a(h){r.state=Ch,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!==Ch)return l();for(c in i)if(d=i[c],d.name===r.name){if(d.state===Is)return yh(o);d.state===xh?(d.state=Ds,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[c]):+c<t&&(d.state=Ds,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[c])}if(yh(function(){r.state===Is&&(r.state=xh,r.timer.restart(n,r.delay,r.time),n(h))}),r.state=Mo,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Mo){for(r.state=Is,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=Ds,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>Mo&&i.state<$o,i.state=Ds,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function Kx(e){return this.each(function(){Zx(this,e)})}function Qx(e,t){var r,i;return function(){var s=Pe(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 Jx(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var a=Pe(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 tb(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Be(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?Qx:Jx)(r,e,t))}function $n(e,t,r){var i=e._id;return e.each(function(){var s=Pe(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return Be(s,i).value[t]}}function gu(e,t){var r;return(typeof t=="number"?Qe:t instanceof ji?fh:(r=ji(t))?(t=r,fh):Px)(e,t)}function eb(e){return function(){this.removeAttribute(e)}}function rb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ib(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 sb(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 ab(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 ob(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 nb(e,t){var r=Sa(e),i=r==="transform"?zx:gu;return this.attrTween(e,typeof t=="function"?(r.local?ob:ab)(r,i,$n(this,"attr."+e,t)):t==null?(r.local?rb:eb)(r):(r.local?sb:ib)(r,i,t))}function lb(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function hb(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function cb(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&hb(e,a)),r}return s._value=t,s}function ub(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&lb(e,a)),r}return s._value=t,s}function db(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=Sa(e);return this.tween(r,(i.local?cb:ub)(i,t))}function pb(e,t){return function(){Mn(this,e).delay=+t.apply(this,arguments)}}function fb(e,t){return t=+t,function(){Mn(this,e).delay=t}}function gb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?pb:fb)(t,e)):Be(this.node(),t).delay}function mb(e,t){return function(){Pe(this,e).duration=+t.apply(this,arguments)}}function yb(e,t){return t=+t,function(){Pe(this,e).duration=t}}function Cb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?mb:yb)(t,e)):Be(this.node(),t).duration}function xb(e,t){if(typeof t!="function")throw new Error;return function(){Pe(this,e).ease=t}}function bb(e){var t=this._id;return arguments.length?this.each(xb(t,e)):Be(this.node(),t).ease}function kb(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Pe(this,e).ease=r}}function Tb(e){if(typeof e!="function")throw new Error;return this.each(kb(this._id,e))}function wb(e){typeof e!="function"&&(e=Vc(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 Ge(i,this._parents,this._name,this._id)}function Sb(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 Ge(o,this._parents,this._name,this._id)}function _b(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 Bb(e,t,r){var i,s,a=_b(t)?Mn:Pe;return function(){var o=a(this,e),n=o.on;n!==i&&(s=(i=n).copy()).on(t,r),o.on=s}}function vb(e,t){var r=this._id;return arguments.length<2?Be(this.node(),r).on.on(e):this.each(Bb(r,e,t))}function Lb(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Fb(){return this.on("end.remove",Lb(this._id))}function Ab(e){var t=this._name,r=this._id;typeof e!="function"&&(e=vn(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,Ba(h[p],t,r,p,h,Be(c,r)));return new Ge(a,this._parents,t,r)}function Eb(e){var t=this._name,r=this._id;typeof e!="function"&&(e=jc(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,m=Be(c,r),g=0,y=p.length;g<y;++g)(d=p[g])&&Ba(d,t,r,g,p,m);a.push(p),o.push(c)}return new Ge(a,o,t,r)}var Mb=as.prototype.constructor;function $b(){return new Mb(this._groups,this._parents)}function Ob(e,t){var r,i,s;return function(){var a=ni(this,e),o=(this.style.removeProperty(e),ni(this,e));return a===o?null:a===r&&o===i?s:s=t(r=a,i=o)}}function mu(e){return function(){this.style.removeProperty(e)}}function Ib(e,t,r){var i,s=r+"",a;return function(){var o=ni(this,e);return o===s?null:o===i?a:a=t(i=o,r)}}function Db(e,t,r){var i,s,a;return function(){var o=ni(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),ni(this,e))),o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n))}}function Rb(e,t){var r,i,s,a="style."+t,o="end."+a,n;return function(){var l=Pe(this,e),h=l.on,c=l.value[a]==null?n||(n=mu(t)):void 0;(h!==r||s!==c)&&(i=(r=h).copy()).on(o,s=c),l.on=i}}function Pb(e,t,r){var i=(e+="")=="transform"?Wx:gu;return t==null?this.styleTween(e,Ob(e,i)).on("end.style."+e,mu(e)):typeof t=="function"?this.styleTween(e,Db(e,i,$n(this,"style."+e,t))).each(Rb(this._id,e)):this.styleTween(e,Ib(e,i,t),r).on("end.style."+e,null)}function Nb(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function qb(e,t,r){var i,s;function a(){var o=t.apply(this,arguments);return o!==s&&(i=(s=o)&&Nb(e,o,r)),i}return a._value=t,a}function Wb(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,qb(e,t,r??""))}function zb(e){return function(){this.textContent=e}}function Hb(e){return function(){var t=e(this);this.textContent=t??""}}function Yb(e){return this.tween("text",typeof e=="function"?Hb($n(this,"text",e)):zb(e==null?"":e+""))}function Ub(e){return function(t){this.textContent=e.call(this,t)}}function Gb(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&Ub(s)),t}return i._value=e,i}function Xb(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,Gb(e))}function jb(){for(var e=this._name,t=this._id,r=yu(),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=Be(l,t);Ba(l,e,r,h,o,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ge(i,this._parents,e,r)}function Vb(){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=Pe(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 Ge(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function yu(){return++Zb}var We=as.prototype;Ge.prototype={constructor:Ge,select:Ab,selectAll:Eb,selectChild:We.selectChild,selectChildren:We.selectChildren,filter:wb,merge:Sb,selection:$b,transition:jb,call:We.call,nodes:We.nodes,node:We.node,size:We.size,empty:We.empty,each:We.each,on:vb,attr:nb,attrTween:db,style:Pb,styleTween:Wb,text:Yb,textTween:Xb,remove:Fb,tween:tb,delay:gb,duration:Cb,ease:bb,easeVarying:Tb,end:Vb,[Symbol.iterator]:We[Symbol.iterator]};function Kb(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Qb={time:null,delay:0,duration:250,ease:Kb};function Jb(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 tk(e){var t,r;e instanceof Ge?(t=e._id,e=e._name):(t=yu(),(r=Qb).time=En(),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])&&Ba(l,e,t,h,o,r||Jb(l,t));return new Ge(i,this._parents,e,t)}as.prototype.interrupt=Kx;as.prototype.transition=tk;const Oo=Math.PI,Io=2*Oo,ur=1e-6,ek=Io-ur;function Cu(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function rk(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Cu;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 ik{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Cu:rk(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>ur)if(!(Math.abs(u*l-h*c)>ur)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-o,m=s-n,g=l*l+h*h,y=d*d+m*m,C=Math.sqrt(g),b=Math.sqrt(p),k=a*Math.tan((Oo-Math.acos((g+p-y)/(2*C*b)))/2),T=k/b,w=k/C;Math.abs(T-1)>ur&&this._append`L${t+T*c},${r+T*u}`,this._append`A${a},${a},0,0,${+(u*d>c*m)},${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)>ur||Math.abs(this._y1-c)>ur)&&this._append`L${h},${c}`,i&&(p<0&&(p=p%Io+Io),p>ek?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>ur&&this._append`A${i},${i},0,${+(p>=Oo)},${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 Mr(e){return function(){return e}}const Ev=Math.abs,Mv=Math.atan2,$v=Math.cos,Ov=Math.max,Iv=Math.min,Dv=Math.sin,Rv=Math.sqrt,bh=1e-12,On=Math.PI,kh=On/2,Pv=2*On;function Nv(e){return e>1?0:e<-1?On:Math.acos(e)}function qv(e){return e>=1?kh:e<=-1?-kh:Math.asin(e)}function sk(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 ik(t)}function ak(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xu(e){this._context=e}xu.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 zi(e){return new xu(e)}function ok(e){return e[0]}function nk(e){return e[1]}function lk(e,t){var r=Mr(!0),i=null,s=zi,a=null,o=sk(n);e=typeof e=="function"?e:e===void 0?ok:Mr(e),t=typeof t=="function"?t:t===void 0?nk:Mr(t);function n(l){var h,c=(l=ak(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:Mr(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Mr(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Mr(!!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 bu{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 ku(e){return new bu(e,!0)}function Tu(e){return new bu(e,!1)}function ir(){}function ra(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 va(e){this._context=e}va.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:ra(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:ra(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Do(e){return new va(e)}function wu(e){this._context=e}wu.prototype={areaStart:ir,areaEnd:ir,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:ra(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function hk(e){return new wu(e)}function Su(e){this._context=e}Su.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:ra(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ck(e){return new Su(e)}function _u(e,t){this._basis=new va(e),this._beta=t}_u.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 uk=(function e(t){function r(i){return t===1?new va(i):new _u(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function ia(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 In(e,t){this._context=e,this._k=(1-t)/6}In.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:ia(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:ia(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 Bu=(function e(t){function r(i){return new In(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Dn(e,t){this._context=e,this._k=(1-t)/6}Dn.prototype={areaStart:ir,areaEnd:ir,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:ia(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 dk=(function e(t){function r(i){return new Dn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Rn(e,t){this._context=e,this._k=(1-t)/6}Rn.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:ia(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 pk=(function e(t){function r(i){return new Rn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Pn(e,t,r){var i=e._x1,s=e._y1,a=e._x2,o=e._y2;if(e._l01_a>bh){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>bh){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 vu(e,t){this._context=e,this._alpha=t}vu.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:Pn(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 Lu=(function e(t){function r(i){return t?new vu(i,t):new In(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:ir,areaEnd:ir,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:Pn(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 fk=(function e(t){function r(i){return t?new Fu(i,t):new Dn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Au(e,t){this._context=e,this._alpha=t}Au.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:Pn(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 gk=(function e(t){function r(i){return t?new Au(i,t):new Rn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Eu(e){this._context=e}Eu.prototype={areaStart:ir,areaEnd:ir,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 mk(e){return new Eu(e)}function Th(e){return e<0?-1:1}function wh(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(Th(a)+Th(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(n))||0}function Sh(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ao(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 sa(e){this._context=e}sa.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:ao(this,this._t0,Sh(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,ao(this,Sh(this,r=wh(this,e,t)),r);break;default:ao(this,this._t0,r=wh(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 $u(e)}(Mu.prototype=Object.create(sa.prototype)).point=function(e,t){sa.prototype.point.call(this,t,e)};function $u(e){this._context=e}$u.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 Ou(e){return new sa(e)}function Iu(e){return new Mu(e)}function Du(e){this._context=e}Du.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=_h(e),s=_h(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 _h(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 Ru(e){return new Du(e)}function La(e,t){this._context=e,this._t=t}La.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 Pu(e){return new La(e,.5)}function Nu(e){return new La(e,0)}function qu(e){return new La(e,1)}function Oi(e,t,r){this.k=e,this.x=t,this.y=r}Oi.prototype={constructor:Oi,scale:function(e){return e===1?this:new Oi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Oi(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+")"}};Oi.prototype;var yk=f(e=>{var s;const{securityLevel:t}=gt();let r=ct("body");if(t==="sandbox"){const o=((s=ct(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=ct(o.body)}return r.select(`#${e}`)},"selectSvgElement");function Nn(e){return typeof e>"u"||e===null}f(Nn,"isNothing");function Wu(e){return typeof e=="object"&&e!==null}f(Wu,"isObject");function zu(e){return Array.isArray(e)?e:Nn(e)?[]:[e]}f(zu,"toArray");function Hu(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(Hu,"extend");function Yu(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}f(Yu,"repeat");function Uu(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}f(Uu,"isNegativeZero");var Ck=Nn,xk=Wu,bk=zu,kk=Yu,Tk=Uu,wk=Hu,Dt={isNothing:Ck,isObject:xk,toArray:bk,repeat:kk,isNegativeZero:Tk,extend:wk};function qn(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"),dC=f((e,t)=>{t!==void 0&&(Ws[e]=t)},"addStylesForDiagram"),pC=uC,uu={};$y(uu,{clear:()=>fC,getAccDescription:()=>CC,getAccTitle:()=>mC,getDiagramTitle:()=>bC,setAccDescription:()=>yC,setAccTitle:()=>gC,setDiagramTitle:()=>xC});var Pn="",Nn="",qn="",zn=f(e=>we(e,Bt()),"sanitizeText"),fC=f(()=>{Pn="",qn="",Nn=""},"clear"),gC=f(e=>{Pn=zn(e).replace(/^\s+/g,"")},"setAccTitle"),mC=f(()=>Pn,"getAccTitle"),yC=f(e=>{qn=zn(e).replace(/\n\s+/g,`
125
+ `)},"setAccDescription"),CC=f(()=>qn,"getAccDescription"),xC=f(e=>{Nn=zn(e)},"setDiagramTitle"),bC=f(()=>Nn,"getDiagramTitle"),Sh=z,kC=Dn,xt=Bt,dL=ru,pL=fi,Wn=f(e=>we(e,xt()),"sanitizeText"),TC=cC,wC=f(()=>uu,"getCommonDb"),ia={},sa=f((e,t,r)=>{var i;ia[e]&&Sh.warn(`Diagram with id ${e} already registered. Overwriting.`),ia[e]=t,r&&Zc(e,r),dC(e,t.styles),(i=t.injectUtils)==null||i.call(t,Sh,kC,xt,Wn,TC,wC(),()=>{})},"registerDiagram"),Wo=f(e=>{if(e in ia)return ia[e];throw new SC(e)},"getDiagram"),ui,SC=(ui=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},f(ui,"DiagramNotFoundError"),ui),_C={value:()=>{}};function du(){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 Hs(r)}function Hs(e){this._=e}function BC(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}})}Hs.prototype=du.prototype={constructor:Hs,on:function(e,t){var r=this._,i=BC(e+"",r),s,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((s=(e=i[a]).type)&&(s=vC(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]=_h(r[s],e.name,t);else if(t==null)for(s in r)r[s]=_h(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 Hs(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 vC(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function _h(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=_C,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Ho="http://www.w3.org/1999/xhtml";const Bh={svg:"http://www.w3.org/2000/svg",xhtml:Ho,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function $a(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Bh.hasOwnProperty(t)?{space:Bh[t],local:e}:e}function LC(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Ho&&t.documentElement.namespaceURI===Ho?t.createElement(e):t.createElementNS(r,e)}}function FC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function pu(e){var t=$a(e);return(t.local?FC:LC)(t)}function AC(){}function Hn(e){return e==null?AC:function(){return this.querySelector(e)}}function EC(e){typeof e!="function"&&(e=Hn(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 he(i,this._parents)}function MC(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function $C(){return[]}function fu(e){return e==null?$C:function(){return this.querySelectorAll(e)}}function OC(e){return function(){return MC(e.apply(this,arguments))}}function IC(e){typeof e=="function"?e=OC(e):e=fu(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 he(i,s)}function gu(e){return function(){return this.matches(e)}}function mu(e){return function(t){return t.matches(e)}}var DC=Array.prototype.find;function RC(e){return function(){return DC.call(this.children,e)}}function PC(){return this.firstElementChild}function NC(e){return this.select(e==null?PC:RC(typeof e=="function"?e:mu(e)))}var qC=Array.prototype.filter;function zC(){return Array.from(this.children)}function WC(e){return function(){return qC.call(this.children,e)}}function HC(e){return this.selectAll(e==null?zC:WC(typeof e=="function"?e:mu(e)))}function YC(e){typeof e!="function"&&(e=gu(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 he(i,this._parents)}function yu(e){return new Array(e.length)}function UC(){return new he(this._enter||this._groups.map(yu),this._parents)}function aa(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}aa.prototype={constructor:aa,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function GC(e){return function(){return e}}function jC(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 aa(e,a[o]);for(;o<l;++o)(n=t[o])&&(s[o]=n)}function XC(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 aa(e,a[n]);for(n=0;n<c;++n)(l=t[n])&&h.get(p[n])===l&&(s[n]=l)}function VC(e){return e.__data__}function ZC(e,t){if(!arguments.length)return Array.from(this,VC);var r=t?XC:jC,i=this._parents,s=this._groups;typeof e!="function"&&(e=GC(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=KC(e.call(c,c&&c.__data__,h,i)),m=d.length,g=n[h]=new Array(m),y=o[h]=new Array(m),C=l[h]=new Array(p);r(c,u,g,y,C,d,t);for(var b=0,k=0,w,S;b<m;++b)if(w=g[b]){for(b>=k&&(k=b+1);!(S=y[k])&&++k<m;);w._next=S||null}}return o=new he(o,i),o._enter=n,o._exit=l,o}function KC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function QC(){return new he(this._exit||this._groups.map(yu),this._parents)}function JC(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 tx(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,m=0;m<u;++m)(d=h[m]||c[m])&&(p[m]=d);for(;l<s;++l)n[l]=r[l];return new he(n,this._parents)}function ex(){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 rx(e){e||(e=ix);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 he(s,this._parents).order()}function ix(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function sx(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function ax(){return Array.from(this)}function ox(){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 nx(){let e=0;for(const t of this)++e;return e}function lx(){return!this.node()}function hx(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 cx(e){return function(){this.removeAttribute(e)}}function ux(e){return function(){this.removeAttributeNS(e.space,e.local)}}function dx(e,t){return function(){this.setAttribute(e,t)}}function px(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function fx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function gx(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 mx(e,t){var r=$a(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?ux:cx:typeof t=="function"?r.local?gx:fx:r.local?px:dx)(r,t))}function Cu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function yx(e){return function(){this.style.removeProperty(e)}}function Cx(e,t,r){return function(){this.style.setProperty(e,t,r)}}function xx(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function bx(e,t,r){return arguments.length>1?this.each((t==null?yx:typeof t=="function"?xx:Cx)(e,t,r??"")):gi(this.node(),e)}function gi(e,t){return e.style.getPropertyValue(t)||Cu(e).getComputedStyle(e,null).getPropertyValue(t)}function kx(e){return function(){delete this[e]}}function Tx(e,t){return function(){this[e]=t}}function wx(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Sx(e,t){return arguments.length>1?this.each((t==null?kx:typeof t=="function"?wx:Tx)(e,t)):this.node()[e]}function xu(e){return e.trim().split(/^|\s+/)}function Yn(e){return e.classList||new bu(e)}function bu(e){this._node=e,this._names=xu(e.getAttribute("class")||"")}bu.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 ku(e,t){for(var r=Yn(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function Tu(e,t){for(var r=Yn(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function _x(e){return function(){ku(this,e)}}function Bx(e){return function(){Tu(this,e)}}function vx(e,t){return function(){(t.apply(this,arguments)?ku:Tu)(this,e)}}function Lx(e,t){var r=xu(e+"");if(arguments.length<2){for(var i=Yn(this.node()),s=-1,a=r.length;++s<a;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?vx:t?_x:Bx)(r,t))}function Fx(){this.textContent=""}function Ax(e){return function(){this.textContent=e}}function Ex(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Mx(e){return arguments.length?this.each(e==null?Fx:(typeof e=="function"?Ex:Ax)(e)):this.node().textContent}function $x(){this.innerHTML=""}function Ox(e){return function(){this.innerHTML=e}}function Ix(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Dx(e){return arguments.length?this.each(e==null?$x:(typeof e=="function"?Ix:Ox)(e)):this.node().innerHTML}function Rx(){this.nextSibling&&this.parentNode.appendChild(this)}function Px(){return this.each(Rx)}function Nx(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function qx(){return this.each(Nx)}function zx(e){var t=typeof e=="function"?e:pu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Wx(){return null}function Hx(e,t){var r=typeof e=="function"?e:pu(e),i=t==null?Wx:typeof t=="function"?t:Hn(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Yx(){var e=this.parentNode;e&&e.removeChild(this)}function Ux(){return this.each(Yx)}function Gx(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function jx(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Xx(e){return this.select(e?jx:Gx)}function Vx(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Zx(e){return function(t){e.call(this,t,this.__data__)}}function Kx(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 Qx(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 Jx(e,t,r){return function(){var i=this.__on,s,a=Zx(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 tb(e,t,r){var i=Kx(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?Jx:Qx,s=0;s<a;++s)this.each(n(i[s],t,r));return this}function wu(e,t,r){var i=Cu(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 eb(e,t){return function(){return wu(this,e,t)}}function rb(e,t){return function(){return wu(this,e,t.apply(this,arguments))}}function ib(e,t){return this.each((typeof t=="function"?rb:eb)(e,t))}function*sb(){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 Su=[null];function he(e,t){this._groups=e,this._parents=t}function ps(){return new he([[document.documentElement]],Su)}function ab(){return this}he.prototype=ps.prototype={constructor:he,select:EC,selectAll:IC,selectChild:NC,selectChildren:HC,filter:YC,data:ZC,enter:UC,exit:QC,join:JC,merge:tx,selection:ab,order:ex,sort:rx,call:sx,nodes:ax,node:ox,size:nx,empty:lx,each:hx,attr:mx,style:bx,property:Sx,classed:Lx,text:Mx,html:Dx,raise:Px,lower:qx,append:zx,insert:Hx,remove:Ux,clone:Xx,datum:Vx,on:tb,dispatch:ib,[Symbol.iterator]:sb};function ht(e){return typeof e=="string"?new he([[document.querySelector(e)]],[document.documentElement]):new he([[e]],Su)}function Un(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function _u(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function fs(){}var ts=.7,oa=1/ts,Kr="\\s*([+-]?\\d+)\\s*",es="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Oe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ob=/^#([0-9a-f]{3,8})$/,nb=new RegExp(`^rgb\\(${Kr},${Kr},${Kr}\\)$`),lb=new RegExp(`^rgb\\(${Oe},${Oe},${Oe}\\)$`),hb=new RegExp(`^rgba\\(${Kr},${Kr},${Kr},${es}\\)$`),cb=new RegExp(`^rgba\\(${Oe},${Oe},${Oe},${es}\\)$`),ub=new RegExp(`^hsl\\(${es},${Oe},${Oe}\\)$`),db=new RegExp(`^hsla\\(${es},${Oe},${Oe},${es}\\)$`),vh={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};Un(fs,rs,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Lh,formatHex:Lh,formatHex8:pb,formatHsl:fb,formatRgb:Fh,toString:Fh});function Lh(){return this.rgb().formatHex()}function pb(){return this.rgb().formatHex8()}function fb(){return Bu(this).formatHsl()}function Fh(){return this.rgb().formatRgb()}function rs(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=ob.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Ah(t):r===3?new ae(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Ls(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Ls(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=nb.exec(e))?new ae(t[1],t[2],t[3],1):(t=lb.exec(e))?new ae(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=hb.exec(e))?Ls(t[1],t[2],t[3],t[4]):(t=cb.exec(e))?Ls(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ub.exec(e))?$h(t[1],t[2]/100,t[3]/100,1):(t=db.exec(e))?$h(t[1],t[2]/100,t[3]/100,t[4]):vh.hasOwnProperty(e)?Ah(vh[e]):e==="transparent"?new ae(NaN,NaN,NaN,0):null}function Ah(e){return new ae(e>>16&255,e>>8&255,e&255,1)}function Ls(e,t,r,i){return i<=0&&(e=t=r=NaN),new ae(e,t,r,i)}function gb(e){return e instanceof fs||(e=rs(e)),e?(e=e.rgb(),new ae(e.r,e.g,e.b,e.opacity)):new ae}function Yo(e,t,r,i){return arguments.length===1?gb(e):new ae(e,t,r,i??1)}function ae(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Un(ae,Yo,_u(fs,{brighter(e){return e=e==null?oa:Math.pow(oa,e),new ae(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ts:Math.pow(ts,e),new ae(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ae(_r(this.r),_r(this.g),_r(this.b),na(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Eh,formatHex:Eh,formatHex8:mb,formatRgb:Mh,toString:Mh}));function Eh(){return`#${Tr(this.r)}${Tr(this.g)}${Tr(this.b)}`}function mb(){return`#${Tr(this.r)}${Tr(this.g)}${Tr(this.b)}${Tr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Mh(){const e=na(this.opacity);return`${e===1?"rgb(":"rgba("}${_r(this.r)}, ${_r(this.g)}, ${_r(this.b)}${e===1?")":`, ${e})`}`}function na(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _r(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Tr(e){return e=_r(e),(e<16?"0":"")+e.toString(16)}function $h(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new xe(e,t,r,i)}function Bu(e){if(e instanceof xe)return new xe(e.h,e.s,e.l,e.opacity);if(e instanceof fs||(e=rs(e)),!e)return new xe;if(e instanceof xe)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 xe(o,n,l,e.opacity)}function yb(e,t,r,i){return arguments.length===1?Bu(e):new xe(e,t,r,i??1)}function xe(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Un(xe,yb,_u(fs,{brighter(e){return e=e==null?oa:Math.pow(oa,e),new xe(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ts:Math.pow(ts,e),new xe(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 ae(bo(e>=240?e-240:e+120,s,i),bo(e,s,i),bo(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new xe(Oh(this.h),Fs(this.s),Fs(this.l),na(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=na(this.opacity);return`${e===1?"hsl(":"hsla("}${Oh(this.h)}, ${Fs(this.s)*100}%, ${Fs(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Oh(e){return e=(e||0)%360,e<0?e+360:e}function Fs(e){return Math.max(0,Math.min(1,e||0))}function bo(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 Gn=e=>()=>e;function vu(e,t){return function(r){return e+r*t}}function Cb(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 fL(e,t){var r=t-e;return r?vu(e,r>180||r<-180?r-360*Math.round(r/360):r):Gn(isNaN(e)?t:e)}function xb(e){return(e=+e)==1?Lu:function(t,r){return r-t?Cb(t,r,e):Gn(isNaN(t)?r:t)}}function Lu(e,t){var r=t-e;return r?vu(e,r):Gn(isNaN(e)?t:e)}const Ih=(function e(t){var r=xb(t);function i(s,a){var o=r((s=Yo(s)).r,(a=Yo(a)).r),n=r(s.g,a.g),l=r(s.b,a.b),h=Lu(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 ir(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Uo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ko=new RegExp(Uo.source,"g");function bb(e){return function(){return e}}function kb(e){return function(t){return e(t)+""}}function Tb(e,t){var r=Uo.lastIndex=ko.lastIndex=0,i,s,a,o=-1,n=[],l=[];for(e=e+"",t=t+"";(i=Uo.exec(e))&&(s=ko.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:ir(i,s)})),r=ko.lastIndex;return r<t.length&&(a=t.slice(r),n[o]?n[o]+=a:n[++o]=a),n.length<2?l[0]?kb(l[0].x):bb(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 Dh=180/Math.PI,Go={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Fu(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)*Dh,skewX:Math.atan(l)*Dh,scaleX:o,scaleY:n}}var As;function wb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Go:Fu(t.a,t.b,t.c,t.d,t.e,t.f)}function Sb(e){return e==null||(As||(As=document.createElementNS("http://www.w3.org/2000/svg","g")),As.setAttribute("transform",e),!(e=As.transform.baseVal.consolidate()))?Go:(e=e.matrix,Fu(e.a,e.b,e.c,e.d,e.e,e.f))}function Au(e,t,r,i){function s(h){return h.length?h.pop()+" ":""}function a(h,c,u,p,d,m){if(h!==u||c!==p){var g=d.push("translate(",null,t,null,r);m.push({i:g-4,x:ir(h,u)},{i:g-2,x:ir(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:ir(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:ir(h,c)}):c&&u.push(s(u)+"skewX("+c+i)}function l(h,c,u,p,d,m){if(h!==u||c!==p){var g=d.push(s(d)+"scale(",null,",",null,")");m.push({i:g-4,x:ir(h,u)},{i:g-2,x:ir(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 m=-1,g=p.length,y;++m<g;)u[(y=p[m]).i]=y.x(d);return u.join("")}}}var _b=Au(wb,"px, ","px)","deg)"),Bb=Au(Sb,", ",")",")"),mi=0,qi=0,Ei=0,Eu=1e3,la,zi,ha=0,Fr=0,Oa=0,is=typeof performance=="object"&&performance.now?performance:Date,Mu=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function jn(){return Fr||(Mu(vb),Fr=is.now()+Oa)}function vb(){Fr=0}function ca(){this._call=this._time=this._next=null}ca.prototype=$u.prototype={constructor:ca,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?jn():+r)+(t==null?0:+t),!this._next&&zi!==this&&(zi?zi._next=this:la=this,zi=this),this._call=e,this._time=r,jo()},stop:function(){this._call&&(this._call=null,this._time=1/0,jo())}};function $u(e,t,r){var i=new ca;return i.restart(e,t,r),i}function Lb(){jn(),++mi;for(var e=la,t;e;)(t=Fr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--mi}function Rh(){Fr=(ha=is.now())+Oa,mi=qi=0;try{Lb()}finally{mi=0,Ab(),Fr=0}}function Fb(){var e=is.now(),t=e-ha;t>Eu&&(Oa-=t,ha=e)}function Ab(){for(var e,t=la,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:la=r);zi=e,jo(i)}function jo(e){if(!mi){qi&&(qi=clearTimeout(qi));var t=e-Fr;t>24?(e<1/0&&(qi=setTimeout(Rh,e-is.now()-Oa)),Ei&&(Ei=clearInterval(Ei))):(Ei||(ha=is.now(),Ei=setInterval(Fb,Eu)),mi=1,Mu(Rh))}}function Ph(e,t,r){var i=new ca;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var Eb=du("start","end","cancel","interrupt"),Mb=[],Ou=0,Nh=1,Xo=2,Ys=3,qh=4,Vo=5,Us=6;function Ia(e,t,r,i,s,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;$b(e,r,{name:t,index:i,group:s,on:Eb,tween:Mb,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Ou})}function Xn(e,t){var r=_e(e,t);if(r.state>Ou)throw new Error("too late; already scheduled");return r}function Ne(e,t){var r=_e(e,t);if(r.state>Ys)throw new Error("too late; already running");return r}function _e(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function $b(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=$u(a,0,r.time);function a(h){r.state=Nh,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!==Nh)return l();for(c in i)if(d=i[c],d.name===r.name){if(d.state===Ys)return Ph(o);d.state===qh?(d.state=Us,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[c]):+c<t&&(d.state=Us,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[c])}if(Ph(function(){r.state===Ys&&(r.state=qh,r.timer.restart(n,r.delay,r.time),n(h))}),r.state=Xo,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Xo){for(r.state=Ys,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=Vo,1),u=-1,p=s.length;++u<p;)s[u].call(e,c);r.state===Vo&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Us,r.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function Ob(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>Xo&&i.state<Vo,i.state=Us,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function Ib(e){return this.each(function(){Ob(this,e)})}function Db(e,t){var r,i;return function(){var s=Ne(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 Rb(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var a=Ne(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 Pb(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=_e(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?Db:Rb)(r,e,t))}function Vn(e,t,r){var i=e._id;return e.each(function(){var s=Ne(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return _e(s,i).value[t]}}function Iu(e,t){var r;return(typeof t=="number"?ir:t instanceof rs?Ih:(r=rs(t))?(t=r,Ih):Tb)(e,t)}function Nb(e){return function(){this.removeAttribute(e)}}function qb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function zb(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 Wb(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 Hb(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 Yb(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 Ub(e,t){var r=$a(e),i=r==="transform"?Bb:Iu;return this.attrTween(e,typeof t=="function"?(r.local?Yb:Hb)(r,i,Vn(this,"attr."+e,t)):t==null?(r.local?qb:Nb)(r):(r.local?Wb:zb)(r,i,t))}function Gb(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function jb(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Xb(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&jb(e,a)),r}return s._value=t,s}function Vb(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Gb(e,a)),r}return s._value=t,s}function Zb(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=$a(e);return this.tween(r,(i.local?Xb:Vb)(i,t))}function Kb(e,t){return function(){Xn(this,e).delay=+t.apply(this,arguments)}}function Qb(e,t){return t=+t,function(){Xn(this,e).delay=t}}function Jb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Kb:Qb)(t,e)):_e(this.node(),t).delay}function tk(e,t){return function(){Ne(this,e).duration=+t.apply(this,arguments)}}function ek(e,t){return t=+t,function(){Ne(this,e).duration=t}}function rk(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?tk:ek)(t,e)):_e(this.node(),t).duration}function ik(e,t){if(typeof t!="function")throw new Error;return function(){Ne(this,e).ease=t}}function sk(e){var t=this._id;return arguments.length?this.each(ik(t,e)):_e(this.node(),t).ease}function ak(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Ne(this,e).ease=r}}function ok(e){if(typeof e!="function")throw new Error;return this.each(ak(this._id,e))}function nk(e){typeof e!="function"&&(e=gu(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 je(i,this._parents,this._name,this._id)}function lk(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 je(o,this._parents,this._name,this._id)}function hk(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 ck(e,t,r){var i,s,a=hk(t)?Xn:Ne;return function(){var o=a(this,e),n=o.on;n!==i&&(s=(i=n).copy()).on(t,r),o.on=s}}function uk(e,t){var r=this._id;return arguments.length<2?_e(this.node(),r).on.on(e):this.each(ck(r,e,t))}function dk(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function pk(){return this.on("end.remove",dk(this._id))}function fk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Hn(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,Ia(h[p],t,r,p,h,_e(c,r)));return new je(a,this._parents,t,r)}function gk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=fu(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,m=_e(c,r),g=0,y=p.length;g<y;++g)(d=p[g])&&Ia(d,t,r,g,p,m);a.push(p),o.push(c)}return new je(a,o,t,r)}var mk=ps.prototype.constructor;function yk(){return new mk(this._groups,this._parents)}function Ck(e,t){var r,i,s;return function(){var a=gi(this,e),o=(this.style.removeProperty(e),gi(this,e));return a===o?null:a===r&&o===i?s:s=t(r=a,i=o)}}function Du(e){return function(){this.style.removeProperty(e)}}function xk(e,t,r){var i,s=r+"",a;return function(){var o=gi(this,e);return o===s?null:o===i?a:a=t(i=o,r)}}function bk(e,t,r){var i,s,a;return function(){var o=gi(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),gi(this,e))),o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n))}}function kk(e,t){var r,i,s,a="style."+t,o="end."+a,n;return function(){var l=Ne(this,e),h=l.on,c=l.value[a]==null?n||(n=Du(t)):void 0;(h!==r||s!==c)&&(i=(r=h).copy()).on(o,s=c),l.on=i}}function Tk(e,t,r){var i=(e+="")=="transform"?_b:Iu;return t==null?this.styleTween(e,Ck(e,i)).on("end.style."+e,Du(e)):typeof t=="function"?this.styleTween(e,bk(e,i,Vn(this,"style."+e,t))).each(kk(this._id,e)):this.styleTween(e,xk(e,i,t),r).on("end.style."+e,null)}function wk(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function Sk(e,t,r){var i,s;function a(){var o=t.apply(this,arguments);return o!==s&&(i=(s=o)&&wk(e,o,r)),i}return a._value=t,a}function _k(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,Sk(e,t,r??""))}function Bk(e){return function(){this.textContent=e}}function vk(e){return function(){var t=e(this);this.textContent=t??""}}function Lk(e){return this.tween("text",typeof e=="function"?vk(Vn(this,"text",e)):Bk(e==null?"":e+""))}function Fk(e){return function(t){this.textContent=e.call(this,t)}}function Ak(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&Fk(s)),t}return i._value=e,i}function Ek(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,Ak(e))}function Mk(){for(var e=this._name,t=this._id,r=Ru(),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=_e(l,t);Ia(l,e,r,h,o,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new je(i,this._parents,e,r)}function $k(){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=Ne(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 Ok=0;function je(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Ru(){return++Ok}var We=ps.prototype;je.prototype={constructor:je,select:fk,selectAll:gk,selectChild:We.selectChild,selectChildren:We.selectChildren,filter:nk,merge:lk,selection:yk,transition:Mk,call:We.call,nodes:We.nodes,node:We.node,size:We.size,empty:We.empty,each:We.each,on:uk,attr:Ub,attrTween:Zb,style:Tk,styleTween:_k,text:Lk,textTween:Ek,remove:pk,tween:Pb,delay:Jb,duration:rk,ease:sk,easeVarying:ok,end:$k,[Symbol.iterator]:We[Symbol.iterator]};function Ik(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Dk={time:null,delay:0,duration:250,ease:Ik};function Rk(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 Pk(e){var t,r;e instanceof je?(t=e._id,e=e._name):(t=Ru(),(r=Dk).time=jn(),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])&&Ia(l,e,t,h,o,r||Rk(l,t));return new je(i,this._parents,e,t)}ps.prototype.interrupt=Ib;ps.prototype.transition=Pk;const Zo=Math.PI,Ko=2*Zo,xr=1e-6,Nk=Ko-xr;function Pu(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function qk(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Pu;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 zk{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Pu:qk(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>xr)if(!(Math.abs(u*l-h*c)>xr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-o,m=s-n,g=l*l+h*h,y=d*d+m*m,C=Math.sqrt(g),b=Math.sqrt(p),k=a*Math.tan((Zo-Math.acos((g+p-y)/(2*C*b)))/2),w=k/b,S=k/C;Math.abs(w-1)>xr&&this._append`L${t+w*c},${r+w*u}`,this._append`A${a},${a},0,0,${+(u*d>c*m)},${this._x1=t+S*l},${this._y1=r+S*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)>xr||Math.abs(this._y1-c)>xr)&&this._append`L${h},${c}`,i&&(p<0&&(p=p%Ko+Ko),p>Nk?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>xr&&this._append`A${i},${i},0,${+(p>=Zo)},${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 zr(e){return function(){return e}}const gL=Math.abs,mL=Math.atan2,yL=Math.cos,CL=Math.max,xL=Math.min,bL=Math.sin,kL=Math.sqrt,zh=1e-12,Zn=Math.PI,Wh=Zn/2,TL=2*Zn;function wL(e){return e>1?0:e<-1?Zn:Math.acos(e)}function SL(e){return e>=1?Wh:e<=-1?-Wh:Math.asin(e)}function Wk(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 zk(t)}function Hk(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Nu(e){this._context=e}Nu.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 Zi(e){return new Nu(e)}function Yk(e){return e[0]}function Uk(e){return e[1]}function Gk(e,t){var r=zr(!0),i=null,s=Zi,a=null,o=Wk(n);e=typeof e=="function"?e:e===void 0?Yk:zr(e),t=typeof t=="function"?t:t===void 0?Uk:zr(t);function n(l){var h,c=(l=Hk(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:zr(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:zr(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:zr(!!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 qu{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 zu(e){return new qu(e,!0)}function Wu(e){return new qu(e,!1)}function hr(){}function ua(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 Da(e){this._context=e}Da.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:ua(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:ua(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Qo(e){return new Da(e)}function Hu(e){this._context=e}Hu.prototype={areaStart:hr,areaEnd:hr,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:ua(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function jk(e){return new Hu(e)}function Yu(e){this._context=e}Yu.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:ua(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Xk(e){return new Yu(e)}function Uu(e,t){this._basis=new Da(e),this._beta=t}Uu.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 Vk=(function e(t){function r(i){return t===1?new Da(i):new Uu(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function da(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 Kn(e,t){this._context=e,this._k=(1-t)/6}Kn.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:da(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:da(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 Gu=(function e(t){function r(i){return new Kn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Qn(e,t){this._context=e,this._k=(1-t)/6}Qn.prototype={areaStart:hr,areaEnd:hr,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:da(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 Zk=(function e(t){function r(i){return new Qn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Jn(e,t){this._context=e,this._k=(1-t)/6}Jn.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:da(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 Kk=(function e(t){function r(i){return new Jn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function tl(e,t,r){var i=e._x1,s=e._y1,a=e._x2,o=e._y2;if(e._l01_a>zh){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>zh){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 ju(e,t){this._context=e,this._alpha=t}ju.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:tl(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 Xu=(function e(t){function r(i){return t?new ju(i,t):new Kn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Vu(e,t){this._context=e,this._alpha=t}Vu.prototype={areaStart:hr,areaEnd:hr,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:tl(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 Qk=(function e(t){function r(i){return t?new Vu(i,t):new Qn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Zu(e,t){this._context=e,this._alpha=t}Zu.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:tl(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 Jk=(function e(t){function r(i){return t?new Zu(i,t):new Jn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Ku(e){this._context=e}Ku.prototype={areaStart:hr,areaEnd:hr,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 t1(e){return new Ku(e)}function Hh(e){return e<0?-1:1}function Yh(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 To(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 pa(e){this._context=e}pa.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:To(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,To(this,Uh(this,r=Yh(this,e,t)),r);break;default:To(this,this._t0,r=Yh(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Qu(e){this._context=new Ju(e)}(Qu.prototype=Object.create(pa.prototype)).point=function(e,t){pa.prototype.point.call(this,t,e)};function Ju(e){this._context=e}Ju.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 td(e){return new pa(e)}function ed(e){return new Qu(e)}function rd(e){this._context=e}rd.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=Gh(e),s=Gh(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 Gh(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 id(e){return new rd(e)}function Ra(e,t){this._context=e,this._t=t}Ra.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 sd(e){return new Ra(e,.5)}function ad(e){return new Ra(e,0)}function od(e){return new Ra(e,1)}function Wi(e,t,r){this.k=e,this.x=t,this.y=r}Wi.prototype={constructor:Wi,scale:function(e){return e===1?this:new Wi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Wi(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+")"}};Wi.prototype;var e1=f(e=>{var s;const{securityLevel:t}=xt();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 el(e){return typeof e>"u"||e===null}f(el,"isNothing");function nd(e){return typeof e=="object"&&e!==null}f(nd,"isObject");function ld(e){return Array.isArray(e)?e:el(e)?[]:[e]}f(ld,"toArray");function hd(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(hd,"extend");function cd(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}f(cd,"repeat");function ud(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}f(ud,"isNegativeZero");var r1=el,i1=nd,s1=ld,a1=cd,o1=ud,n1=hd,Dt={isNothing:r1,isObject:i1,toArray:s1,repeat:a1,isNegativeZero:o1,extend:n1};function rl(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+=`
125
126
 
126
- `+e.mark.snippet),i+" "+r):i}f(qn,"formatError");function hi(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=qn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}f(hi,"YAMLException$1");hi.prototype=Object.create(Error.prototype);hi.prototype.constructor=hi;hi.prototype.toString=f(function(t){return this.name+": "+qn(this,t)},"toString");var se=hi;function Rs(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(Rs,"getLine");function Ps(e,t){return Dt.repeat(" ",t-e.length)+e}f(Ps,"padStart");function Gu(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=Rs(e.buffer,i[o-l],s[o-l],e.position-(i[o]-i[o-l]),u),n=Dt.repeat(" ",t.indent)+Ps((e.line-l+1).toString(),c)+" | "+h.str+`
127
- `+n;for(h=Rs(e.buffer,i[o],s[o],e.position,u),n+=Dt.repeat(" ",t.indent)+Ps((e.line+1).toString(),c)+" | "+h.str+`
127
+ `+e.mark.snippet),i+" "+r):i}f(rl,"formatError");function yi(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=rl(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}f(yi,"YAMLException$1");yi.prototype=Object.create(Error.prototype);yi.prototype.constructor=yi;yi.prototype.toString=f(function(t){return this.name+": "+rl(this,t)},"toString");var se=yi;function Gs(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(Gs,"getLine");function js(e,t){return Dt.repeat(" ",t-e.length)+e}f(js,"padStart");function dd(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=Gs(e.buffer,i[o-l],s[o-l],e.position-(i[o]-i[o-l]),u),n=Dt.repeat(" ",t.indent)+js((e.line-l+1).toString(),c)+" | "+h.str+`
128
+ `+n;for(h=Gs(e.buffer,i[o],s[o],e.position,u),n+=Dt.repeat(" ",t.indent)+js((e.line+1).toString(),c)+" | "+h.str+`
128
129
  `,n+=Dt.repeat("-",t.indent+c+3+h.pos)+`^
129
- `,l=1;l<=t.linesAfter&&!(o+l>=s.length);l++)h=Rs(e.buffer,i[o+l],s[o+l],e.position-(i[o]-i[o+l]),u),n+=Dt.repeat(" ",t.indent)+Ps((e.line+l+1).toString(),c)+" | "+h.str+`
130
- `;return n.replace(/\n$/,"")}f(Gu,"makeSnippet");var Sk=Gu,_k=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Bk=["scalar","sequence","mapping"];function Xu(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}f(Xu,"compileStyleAliases");function ju(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(_k.indexOf(r)===-1)throw new se('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=Xu(t.styleAliases||null),Bk.indexOf(this.kind)===-1)throw new se('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}f(ju,"Type$1");var Gt=ju;function Ro(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(Ro,"compileList");function Vu(){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(Vu,"compileMap");function aa(e){return this.extend(e)}f(aa,"Schema$1");aa.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 se("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Gt))throw new se("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new se("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 se("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 se("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(aa.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=Ro(s,"implicit"),s.compiledExplicit=Ro(s,"explicit"),s.compiledTypeMap=Vu(s.compiledImplicit,s.compiledExplicit),s},"extend");var vk=aa,Lk=new Gt("tag:yaml.org,2002:str",{kind:"scalar",construct:f(function(e){return e!==null?e:""},"construct")}),Fk=new Gt("tag:yaml.org,2002:seq",{kind:"sequence",construct:f(function(e){return e!==null?e:[]},"construct")}),Ak=new Gt("tag:yaml.org,2002:map",{kind:"mapping",construct:f(function(e){return e!==null?e:{}},"construct")}),Ek=new vk({explicit:[Lk,Fk,Ak]});function Zu(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}f(Zu,"resolveYamlNull");function Ku(){return null}f(Ku,"constructYamlNull");function Qu(e){return e===null}f(Qu,"isNull");var Mk=new Gt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Zu,construct:Ku,predicate:Qu,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 Ju(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(Ju,"resolveYamlBoolean");function td(e){return e==="true"||e==="True"||e==="TRUE"}f(td,"constructYamlBoolean");function ed(e){return Object.prototype.toString.call(e)==="[object Boolean]"}f(ed,"isBoolean");var $k=new Gt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Ju,construct:td,predicate:ed,represent:{lowercase:f(function(e){return e?"true":"false"},"lowercase"),uppercase:f(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:f(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function rd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}f(rd,"isHexCode");function id(e){return 48<=e&&e<=55}f(id,"isOctCode");function sd(e){return 48<=e&&e<=57}f(sd,"isDecCode");function ad(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(!rd(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!id(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!sd(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}f(ad,"resolveYamlInteger");function od(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(od,"constructYamlInteger");function nd(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Dt.isNegativeZero(e)}f(nd,"isInteger");var Ok=new Gt("tag:yaml.org,2002:int",{kind:"scalar",resolve:ad,construct:od,predicate:nd,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"]}}),Ik=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function ld(e){return!(e===null||!Ik.test(e)||e[e.length-1]==="_")}f(ld,"resolveYamlFloat");function hd(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(hd,"constructYamlFloat");var Dk=/^[-+]?[0-9]+e/;function cd(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(Dt.isNegativeZero(e))return"-0.0";return r=e.toString(10),Dk.test(r)?r.replace("e",".e"):r}f(cd,"representYamlFloat");function ud(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Dt.isNegativeZero(e))}f(ud,"isFloat");var Rk=new Gt("tag:yaml.org,2002:float",{kind:"scalar",resolve:ld,construct:hd,predicate:ud,represent:cd,defaultStyle:"lowercase"}),dd=Ek.extend({implicit:[Mk,$k,Ok,Rk]}),Pk=dd,pd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),fd=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 gd(e){return e===null?!1:pd.exec(e)!==null||fd.exec(e)!==null}f(gd,"resolveYamlTimestamp");function md(e){var t,r,i,s,a,o,n,l=0,h=null,c,u,p;if(t=pd.exec(e),t===null&&(t=fd.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(md,"constructYamlTimestamp");function yd(e){return e.toISOString()}f(yd,"representYamlTimestamp");var Nk=new Gt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:gd,construct:md,instanceOf:Date,represent:yd});function Cd(e){return e==="<<"||e===null}f(Cd,"resolveYamlMerge");var qk=new Gt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Cd}),Wn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
131
- \r`;function xd(e){if(e===null)return!1;var t,r,i=0,s=e.length,a=Wn;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(xd,"resolveYamlBinary");function bd(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,a=Wn,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(bd,"constructYamlBinary");function kd(e){var t="",r=0,i,s,a=e.length,o=Wn;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(kd,"representYamlBinary");function Td(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}f(Td,"isBinary");var Wk=new Gt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:xd,construct:bd,predicate:Td,represent:kd}),zk=Object.prototype.hasOwnProperty,Hk=Object.prototype.toString;function wd(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,Hk.call(s)!=="[object Object]")return!1;for(a in s)if(zk.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(wd,"resolveYamlOmap");function Sd(e){return e!==null?e:[]}f(Sd,"constructYamlOmap");var Yk=new Gt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:wd,construct:Sd}),Uk=Object.prototype.toString;function _d(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],Uk.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;a[t]=[s[0],i[s[0]]]}return!0}f(_d,"resolveYamlPairs");function Bd(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(Bd,"constructYamlPairs");var Gk=new Gt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:_d,construct:Bd}),Xk=Object.prototype.hasOwnProperty;function vd(e){if(e===null)return!0;var t,r=e;for(t in r)if(Xk.call(r,t)&&r[t]!==null)return!1;return!0}f(vd,"resolveYamlSet");function Ld(e){return e!==null?e:{}}f(Ld,"constructYamlSet");var jk=new Gt("tag:yaml.org,2002:set",{kind:"mapping",resolve:vd,construct:Ld}),Fd=Pk.extend({implicit:[Nk,qk],explicit:[Wk,Yk,Gk,jk]}),sr=Object.prototype.hasOwnProperty,oa=1,Ad=2,Ed=3,na=4,oo=1,Vk=2,Bh=3,Zk=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Kk=/[\x85\u2028\u2029]/,Qk=/[,\[\]\{\}]/,Md=/^(?:!|!!|![a-z\-]+!)$/i,$d=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Po(e){return Object.prototype.toString.call(e)}f(Po,"_class");function Te(e){return e===10||e===13}f(Te,"is_EOL");function rr(e){return e===9||e===32}f(rr,"is_WHITE_SPACE");function Zt(e){return e===9||e===32||e===10||e===13}f(Zt,"is_WS_OR_EOL");function gr(e){return e===44||e===91||e===93||e===123||e===125}f(gr,"is_FLOW_INDICATOR");function Od(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}f(Od,"fromHexCode");function Id(e){return e===120?2:e===117?4:e===85?8:0}f(Id,"escapedHexLen");function Dd(e){return 48<=e&&e<=57?e-48:-1}f(Dd,"fromDecimalCode");function No(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
132
- `: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(No,"simpleEscapeSequence");function Rd(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}f(Rd,"charFromCodepoint");function zn(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}f(zn,"setProperty");var Pd=new Array(256),Nd=new Array(256);for(hr=0;hr<256;hr++)Pd[hr]=No(hr)?1:0,Nd[hr]=No(hr);var hr;function qd(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Fd,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(qd,"State$1");function Hn(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=Sk(r),new se(t,r)}f(Hn,"generateError");function J(e,t){throw Hn(e,t)}f(J,"throwError");function Zi(e,t){e.onWarning&&e.onWarning.call(null,Hn(e,t))}f(Zi,"throwWarning");var vh={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&&Zi(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"),sr.call(t.tagMap,s)&&J(t,'there is a previously declared suffix for "'+s+'" tag handle'),$d.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 Ue(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(Ue,"captureSegment");function qo(e,t,r,i){var s,a,o,n;for(Dt.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],sr.call(t,a)||(zn(t,a,r[a]),i[a]=!0)}f(qo,"mergeMappings");function mr(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"&&Po(s[h])==="[object Object]"&&(s[h]="[object Object]");if(typeof s=="object"&&Po(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)qo(e,t,a[h],r);else qo(e,t,a,r);else!e.json&&!sr.call(r,s)&&sr.call(t,s)&&(e.line=o||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,J(e,"duplicated mapping key")),zn(t,s,a),delete r[s];return t}f(mr,"storeMappingPair");function Fa(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(Fa,"readLineBreak");function vt(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;rr(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(Te(s))for(Fa(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&&Zi(e,"deficient indentation"),i}f(vt,"skipSeparationSpace");function ns(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(ns,"testDocumentSeparator");function Aa(e,t){t===1?e.result+=" ":t>1&&(e.result+=Dt.repeat(`
133
- `,t-1))}f(Aa,"writeFoldedLines");function Wd(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)||gr(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&&gr(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&&gr(s))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),Zt(i))break}else{if(e.position===e.lineStart&&ns(e)||r&&gr(d))break;if(Te(d))if(l=e.line,h=e.lineStart,c=e.lineIndent,vt(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&&(Ue(e,a,o,!1),Aa(e,e.line-l),a=o=e.position,n=!1),rr(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return Ue(e,a,o,!1),e.result?!0:(e.kind=u,e.result=p,!1)}f(Wd,"readPlainScalar");function zd(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(Ue(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 Te(r)?(Ue(e,i,s,!0),Aa(e,vt(e,!1,t)),i=s=e.position):e.position===e.lineStart&&ns(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(zd,"readSingleQuotedScalar");function Hd(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 Ue(e,r,e.position,!0),e.position++,!0;if(n===92){if(Ue(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),Te(n))vt(e,!1,t);else if(n<256&&Pd[n])e.result+=Nd[n],e.position++;else if((o=Id(n))>0){for(s=o,a=0;s>0;s--)n=e.input.charCodeAt(++e.position),(o=Od(n))>=0?a=(a<<4)+o:J(e,"expected hexadecimal character");e.result+=Rd(a),e.position++}else J(e,"unknown escape sequence");r=i=e.position}else Te(n)?(Ue(e,r,i,!0),Aa(e,vt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&ns(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(Hd,"readDoubleQuotedScalar");function Yd(e,t){var r=!0,i,s,a,o=e.tag,n,l=e.anchor,h,c,u,p,d,m=Object.create(null),g,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(vt(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=g=C=null,u=p=!1,b===63&&(h=e.input.charCodeAt(e.position+1),Zt(h)&&(u=p=!0,e.position++,vt(e,!0,t))),i=e.line,s=e.lineStart,a=e.position,Tr(e,t,oa,!1,!0),y=e.tag,g=e.result,vt(e,!0,t),b=e.input.charCodeAt(e.position),(p||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),vt(e,!0,t),Tr(e,t,oa,!1,!0),C=e.result),d?mr(e,n,m,y,g,C,i,s,a):u?n.push(mr(e,null,m,y,g,C,i,s,a)):n.push(g),vt(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(Yd,"readFlowCollection");function Ud(e,t){var r,i,s=oo,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)oo===s?s=u===43?Bh:Vk:J(e,"repeat of a chomping mode identifier");else if((c=Dd(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(rr(u)){do u=e.input.charCodeAt(++e.position);while(rr(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!Te(u)&&u!==0)}for(;u!==0;){for(Fa(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),Te(u)){l++;continue}if(e.lineIndent<n){s===Bh?e.result+=Dt.repeat(`
134
- `,a?1+l:l):s===oo&&a&&(e.result+=`
135
- `);break}for(i?rr(u)?(h=!0,e.result+=Dt.repeat(`
130
+ `,l=1;l<=t.linesAfter&&!(o+l>=s.length);l++)h=Gs(e.buffer,i[o+l],s[o+l],e.position-(i[o]-i[o+l]),u),n+=Dt.repeat(" ",t.indent)+js((e.line+l+1).toString(),c)+" | "+h.str+`
131
+ `;return n.replace(/\n$/,"")}f(dd,"makeSnippet");var l1=dd,h1=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],c1=["scalar","sequence","mapping"];function pd(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}f(pd,"compileStyleAliases");function fd(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(h1.indexOf(r)===-1)throw new se('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=pd(t.styleAliases||null),c1.indexOf(this.kind)===-1)throw new se('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}f(fd,"Type$1");var Xt=fd;function Jo(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(Jo,"compileList");function gd(){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(gd,"compileMap");function fa(e){return this.extend(e)}f(fa,"Schema$1");fa.prototype.extend=f(function(t){var r=[],i=[];if(t instanceof Xt)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 se("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Xt))throw new se("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new se("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 se("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 Xt))throw new se("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(fa.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=Jo(s,"implicit"),s.compiledExplicit=Jo(s,"explicit"),s.compiledTypeMap=gd(s.compiledImplicit,s.compiledExplicit),s},"extend");var u1=fa,d1=new Xt("tag:yaml.org,2002:str",{kind:"scalar",construct:f(function(e){return e!==null?e:""},"construct")}),p1=new Xt("tag:yaml.org,2002:seq",{kind:"sequence",construct:f(function(e){return e!==null?e:[]},"construct")}),f1=new Xt("tag:yaml.org,2002:map",{kind:"mapping",construct:f(function(e){return e!==null?e:{}},"construct")}),g1=new u1({explicit:[d1,p1,f1]});function md(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}f(md,"resolveYamlNull");function yd(){return null}f(yd,"constructYamlNull");function Cd(e){return e===null}f(Cd,"isNull");var m1=new Xt("tag:yaml.org,2002:null",{kind:"scalar",resolve:md,construct:yd,predicate:Cd,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 xd(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(xd,"resolveYamlBoolean");function bd(e){return e==="true"||e==="True"||e==="TRUE"}f(bd,"constructYamlBoolean");function kd(e){return Object.prototype.toString.call(e)==="[object Boolean]"}f(kd,"isBoolean");var y1=new Xt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:xd,construct:bd,predicate:kd,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 Td(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}f(Td,"isHexCode");function wd(e){return 48<=e&&e<=55}f(wd,"isOctCode");function Sd(e){return 48<=e&&e<=57}f(Sd,"isDecCode");function _d(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(!Td(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!wd(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!Sd(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}f(_d,"resolveYamlInteger");function Bd(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(Bd,"constructYamlInteger");function vd(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Dt.isNegativeZero(e)}f(vd,"isInteger");var C1=new Xt("tag:yaml.org,2002:int",{kind:"scalar",resolve:_d,construct:Bd,predicate:vd,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"]}}),x1=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Ld(e){return!(e===null||!x1.test(e)||e[e.length-1]==="_")}f(Ld,"resolveYamlFloat");function Fd(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(Fd,"constructYamlFloat");var b1=/^[-+]?[0-9]+e/;function Ad(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(Dt.isNegativeZero(e))return"-0.0";return r=e.toString(10),b1.test(r)?r.replace("e",".e"):r}f(Ad,"representYamlFloat");function Ed(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Dt.isNegativeZero(e))}f(Ed,"isFloat");var k1=new Xt("tag:yaml.org,2002:float",{kind:"scalar",resolve:Ld,construct:Fd,predicate:Ed,represent:Ad,defaultStyle:"lowercase"}),Md=g1.extend({implicit:[m1,y1,C1,k1]}),T1=Md,$d=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Od=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 Id(e){return e===null?!1:$d.exec(e)!==null||Od.exec(e)!==null}f(Id,"resolveYamlTimestamp");function Dd(e){var t,r,i,s,a,o,n,l=0,h=null,c,u,p;if(t=$d.exec(e),t===null&&(t=Od.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(Dd,"constructYamlTimestamp");function Rd(e){return e.toISOString()}f(Rd,"representYamlTimestamp");var w1=new Xt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Id,construct:Dd,instanceOf:Date,represent:Rd});function Pd(e){return e==="<<"||e===null}f(Pd,"resolveYamlMerge");var S1=new Xt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Pd}),il=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
132
+ \r`;function Nd(e){if(e===null)return!1;var t,r,i=0,s=e.length,a=il;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(Nd,"resolveYamlBinary");function qd(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,a=il,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(qd,"constructYamlBinary");function zd(e){var t="",r=0,i,s,a=e.length,o=il;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(zd,"representYamlBinary");function Wd(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}f(Wd,"isBinary");var _1=new Xt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Nd,construct:qd,predicate:Wd,represent:zd}),B1=Object.prototype.hasOwnProperty,v1=Object.prototype.toString;function Hd(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,v1.call(s)!=="[object Object]")return!1;for(a in s)if(B1.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(Hd,"resolveYamlOmap");function Yd(e){return e!==null?e:[]}f(Yd,"constructYamlOmap");var L1=new Xt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Hd,construct:Yd}),F1=Object.prototype.toString;function Ud(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],F1.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;a[t]=[s[0],i[s[0]]]}return!0}f(Ud,"resolveYamlPairs");function Gd(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(Gd,"constructYamlPairs");var A1=new Xt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Ud,construct:Gd}),E1=Object.prototype.hasOwnProperty;function jd(e){if(e===null)return!0;var t,r=e;for(t in r)if(E1.call(r,t)&&r[t]!==null)return!1;return!0}f(jd,"resolveYamlSet");function Xd(e){return e!==null?e:{}}f(Xd,"constructYamlSet");var M1=new Xt("tag:yaml.org,2002:set",{kind:"mapping",resolve:jd,construct:Xd}),Vd=T1.extend({implicit:[w1,S1],explicit:[_1,L1,A1,M1]}),cr=Object.prototype.hasOwnProperty,ga=1,Zd=2,Kd=3,ma=4,wo=1,$1=2,jh=3,O1=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,I1=/[\x85\u2028\u2029]/,D1=/[,\[\]\{\}]/,Qd=/^(?:!|!!|![a-z\-]+!)$/i,Jd=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function tn(e){return Object.prototype.toString.call(e)}f(tn,"_class");function ke(e){return e===10||e===13}f(ke,"is_EOL");function lr(e){return e===9||e===32}f(lr,"is_WHITE_SPACE");function Jt(e){return e===9||e===32||e===10||e===13}f(Jt,"is_WS_OR_EOL");function wr(e){return e===44||e===91||e===93||e===123||e===125}f(wr,"is_FLOW_INDICATOR");function tp(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}f(tp,"fromHexCode");function ep(e){return e===120?2:e===117?4:e===85?8:0}f(ep,"escapedHexLen");function rp(e){return 48<=e&&e<=57?e-48:-1}f(rp,"fromDecimalCode");function en(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(en,"simpleEscapeSequence");function ip(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}f(ip,"charFromCodepoint");function sl(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}f(sl,"setProperty");var sp=new Array(256),ap=new Array(256);for(yr=0;yr<256;yr++)sp[yr]=en(yr)?1:0,ap[yr]=en(yr);var yr;function op(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Vd,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(op,"State$1");function al(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=l1(r),new se(t,r)}f(al,"generateError");function rt(e,t){throw al(e,t)}f(rt,"throwError");function ss(e,t){e.onWarning&&e.onWarning.call(null,al(e,t))}f(ss,"throwWarning");var Xh={YAML:f(function(t,r,i){var s,a,o;t.version!==null&&rt(t,"duplication of %YAML directive"),i.length!==1&&rt(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&rt(t,"ill-formed argument of the YAML directive"),a=parseInt(s[1],10),o=parseInt(s[2],10),a!==1&&rt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&ss(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:f(function(t,r,i){var s,a;i.length!==2&&rt(t,"TAG directive accepts exactly two arguments"),s=i[0],a=i[1],Qd.test(s)||rt(t,"ill-formed tag handle (first argument) of the TAG directive"),cr.call(t.tagMap,s)&&rt(t,'there is a previously declared suffix for "'+s+'" tag handle'),Jd.test(a)||rt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{rt(t,"tag prefix is malformed: "+a)}t.tagMap[s]=a},"handleTagDirective")};function Ge(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||rt(e,"expected valid JSON character");else O1.test(n)&&rt(e,"the stream contains non-printable characters");e.result+=n}}f(Ge,"captureSegment");function rn(e,t,r,i){var s,a,o,n;for(Dt.isObject(r)||rt(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],cr.call(t,a)||(sl(t,a,r[a]),i[a]=!0)}f(rn,"mergeMappings");function Sr(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])&&rt(e,"nested arrays are not supported inside keys"),typeof s=="object"&&tn(s[h])==="[object Object]"&&(s[h]="[object Object]");if(typeof s=="object"&&tn(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)rn(e,t,a[h],r);else rn(e,t,a,r);else!e.json&&!cr.call(r,s)&&cr.call(t,s)&&(e.line=o||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,rt(e,"duplicated mapping key")),sl(t,s,a),delete r[s];return t}f(Sr,"storeMappingPair");function Pa(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++):rt(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}f(Pa,"readLineBreak");function At(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;lr(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(ke(s))for(Pa(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&&ss(e,"deficient indentation"),i}f(At,"skipSeparationSpace");function gs(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||Jt(r)))}f(gs,"testDocumentSeparator");function Na(e,t){t===1?e.result+=" ":t>1&&(e.result+=Dt.repeat(`
134
+ `,t-1))}f(Na,"writeFoldedLines");function np(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),Jt(d)||wr(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),Jt(s)||r&&wr(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),Jt(s)||r&&wr(s))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),Jt(i))break}else{if(e.position===e.lineStart&&gs(e)||r&&wr(d))break;if(ke(d))if(l=e.line,h=e.lineStart,c=e.lineIndent,At(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&&(Ge(e,a,o,!1),Na(e,e.line-l),a=o=e.position,n=!1),lr(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return Ge(e,a,o,!1),e.result?!0:(e.kind=u,e.result=p,!1)}f(np,"readPlainScalar");function lp(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(Ge(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 ke(r)?(Ge(e,i,s,!0),Na(e,At(e,!1,t)),i=s=e.position):e.position===e.lineStart&&gs(e)?rt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);rt(e,"unexpected end of the stream within a single quoted scalar")}f(lp,"readSingleQuotedScalar");function hp(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 Ge(e,r,e.position,!0),e.position++,!0;if(n===92){if(Ge(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),ke(n))At(e,!1,t);else if(n<256&&sp[n])e.result+=ap[n],e.position++;else if((o=ep(n))>0){for(s=o,a=0;s>0;s--)n=e.input.charCodeAt(++e.position),(o=tp(n))>=0?a=(a<<4)+o:rt(e,"expected hexadecimal character");e.result+=ip(a),e.position++}else rt(e,"unknown escape sequence");r=i=e.position}else ke(n)?(Ge(e,r,i,!0),Na(e,At(e,!1,t)),r=i=e.position):e.position===e.lineStart&&gs(e)?rt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}rt(e,"unexpected end of the stream within a double quoted scalar")}f(hp,"readDoubleQuotedScalar");function cp(e,t){var r=!0,i,s,a,o=e.tag,n,l=e.anchor,h,c,u,p,d,m=Object.create(null),g,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(At(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&&rt(e,"expected the node content, but found ','"):rt(e,"missed comma between flow collection entries"),y=g=C=null,u=p=!1,b===63&&(h=e.input.charCodeAt(e.position+1),Jt(h)&&(u=p=!0,e.position++,At(e,!0,t))),i=e.line,s=e.lineStart,a=e.position,Ar(e,t,ga,!1,!0),y=e.tag,g=e.result,At(e,!0,t),b=e.input.charCodeAt(e.position),(p||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),At(e,!0,t),Ar(e,t,ga,!1,!0),C=e.result),d?Sr(e,n,m,y,g,C,i,s,a):u?n.push(Sr(e,null,m,y,g,C,i,s,a)):n.push(g),At(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}rt(e,"unexpected end of the stream within a flow collection")}f(cp,"readFlowCollection");function up(e,t){var r,i,s=wo,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)wo===s?s=u===43?jh:$1:rt(e,"repeat of a chomping mode identifier");else if((c=rp(u))>=0)c===0?rt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?rt(e,"repeat of an indentation width identifier"):(n=t+c-1,o=!0);else break;if(lr(u)){do u=e.input.charCodeAt(++e.position);while(lr(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!ke(u)&&u!==0)}for(;u!==0;){for(Pa(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),ke(u)){l++;continue}if(e.lineIndent<n){s===jh?e.result+=Dt.repeat(`
135
+ `,a?1+l:l):s===wo&&a&&(e.result+=`
136
+ `);break}for(i?lr(u)?(h=!0,e.result+=Dt.repeat(`
136
137
  `,a?1+l:l)):h?(h=!1,e.result+=Dt.repeat(`
137
138
  `,l+1)):l===0?a&&(e.result+=" "):e.result+=Dt.repeat(`
138
139
  `,l):e.result+=Dt.repeat(`
139
- `,a?1+l:l),a=!0,o=!0,l=0,r=e.position;!Te(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Ue(e,r,e.position,!1)}return!0}f(Ud,"readBlockScalar");function Wo(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++,vt(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Tr(e,t,Ed,!1,!0),a.push(e.result),vt(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(Wo,"readBlockSequence");function Gd(e,t,r){var i,s,a,o,n,l,h=e.tag,c=e.anchor,u={},p=Object.create(null),d=null,m=null,g=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&&(mr(e,u,p,d,m,null,o,n,l),d=m=g=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,!Tr(e,r,Ad,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);rr(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&&(mr(e,u,p,d,m,null,o,n,l),d=m=g=null),C=!0,y=!1,s=!1,d=e.tag,m=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),Tr(e,t,na,!0,s)&&(y?m=e.result:g=e.result),y||(mr(e,u,p,d,m,g,o,n,l),d=m=g=null),vt(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&&mr(e,u,p,d,m,null,o,n,l),C&&(e.tag=h,e.anchor=c,e.kind="mapping",e.result=u),C}f(Gd,"readBlockMapping");function Xd(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),Qk.test(a)&&J(e,"tag suffix cannot contain flow indicator characters")}a&&!$d.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:sr.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(Xd,"readTagProperty");function jd(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)&&!gr(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(jd,"readAnchorProperty");function Vd(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)&&!gr(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),sr.call(e.anchorMap,r)||J(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],vt(e,!0,-1),!0}f(Vd,"readAlias");function Tr(e,t,r,i,s){var a,o,n,l=1,h=!1,c=!1,u,p,d,m,g,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=n=na===r||Ed===r,i&&vt(e,!0,-1)&&(h=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Xd(e)||jd(e);)vt(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||na===r)&&(oa===r||Ad===r?g=t:g=t+1,y=e.position-e.lineStart,l===1?n&&(Wo(e,y)||Gd(e,y,g))||Yd(e,g)?c=!0:(o&&Ud(e,g)||zd(e,g)||Hd(e,g)?c=!0:Vd(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&J(e,"alias node should not have any properties")):Wd(e,g,oa===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=n&&Wo(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(m=e.implicitTypes[u],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(sr.call(e.typeMap[e.kind||"fallback"],e.tag))m=e.typeMap[e.kind||"fallback"][e.tag];else for(m=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){m=d[u];break}m||J(e,"unknown tag !<"+e.tag+">"),e.result!==null&&m.kind!==e.kind&&J(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result,e.tag)?(e.result=m.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(Tr,"composeNode");function Zd(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&&(vt(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(;rr(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!Te(o));break}if(Te(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&&Fa(e),sr.call(vh,i)?vh[i](e,i,s):Zi(e,'unknown document directive "'+i+'"')}if(vt(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,vt(e,!0,-1)):a&&J(e,"directives end mark is expected"),Tr(e,e.lineIndent-1,na,!1,!0),vt(e,!0,-1),e.checkLineBreaks&&Kk.test(e.input.slice(t,e.position))&&Zi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ns(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,vt(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(Zd,"readDocument");function Yn(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
140
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new qd(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;)Zd(r);return r.documents}f(Yn,"loadDocuments");function Jk(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Yn(e,r);if(typeof t!="function")return i;for(var s=0,a=i.length;s<a;s+=1)t(i[s])}f(Jk,"loadAll$1");function Kd(e,t){var r=Yn(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new se("expected a single document in the stream, but found more")}}f(Kd,"load$1");var t1=Kd,e1={load:t1},Qd=Object.prototype.toString,Jd=Object.prototype.hasOwnProperty,Un=65279,r1=9,Ki=10,i1=13,s1=32,a1=33,o1=34,zo=35,n1=37,l1=38,h1=39,c1=42,tp=44,u1=45,la=58,d1=61,p1=62,f1=63,g1=64,ep=91,rp=93,m1=96,ip=123,y1=124,sp=125,Xt={};Xt[0]="\\0";Xt[7]="\\a";Xt[8]="\\b";Xt[9]="\\t";Xt[10]="\\n";Xt[11]="\\v";Xt[12]="\\f";Xt[13]="\\r";Xt[27]="\\e";Xt[34]='\\"';Xt[92]="\\\\";Xt[133]="\\N";Xt[160]="\\_";Xt[8232]="\\L";Xt[8233]="\\P";var C1=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],x1=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ap(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&&Jd.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[o]=n;return r}f(ap,"compileStyleMap");function op(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 se("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Dt.repeat("0",i-t.length)+t}f(op,"encodeHex");var b1=1,Qi=2;function np(e){this.schema=e.schema||Fd,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Dt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=ap(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==='"'?Qi:b1,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(np,"State");function Ho(e,t){for(var r=Dt.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;!ke(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Ge(e,r,e.position,!1)}return!0}f(up,"readBlockScalar");function sn(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,rt(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!Jt(o))));){if(n=!0,e.position++,At(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Ar(e,t,Kd,!1,!0),a.push(e.result),At(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)rt(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(sn,"readBlockSequence");function dp(e,t,r){var i,s,a,o,n,l,h=e.tag,c=e.anchor,u={},p=Object.create(null),d=null,m=null,g=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,rt(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&Jt(i))b===63?(y&&(Sr(e,u,p,d,m,null,o,n,l),d=m=g=null),C=!0,y=!0,s=!0):y?(y=!1,s=!0):rt(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,!Ar(e,r,Zd,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);lr(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Jt(b)||rt(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Sr(e,u,p,d,m,null,o,n,l),d=m=g=null),C=!0,y=!1,s=!1,d=e.tag,m=e.result;else if(C)rt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=h,e.anchor=c,!0}else if(C)rt(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),Ar(e,t,ma,!0,s)&&(y?m=e.result:g=e.result),y||(Sr(e,u,p,d,m,g,o,n,l),d=m=g=null),At(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)rt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Sr(e,u,p,d,m,null,o,n,l),C&&(e.tag=h,e.anchor=c,e.kind="mapping",e.result=u),C}f(dp,"readBlockMapping");function pp(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&&rt(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)):rt(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Jt(o);)o===33&&(i?rt(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),Qd.test(s)||rt(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),D1.test(a)&&rt(e,"tag suffix cannot contain flow indicator characters")}a&&!Jd.test(a)&&rt(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{rt(e,"tag name is malformed: "+a)}return r?e.tag=a:cr.call(e.tagMap,s)?e.tag=e.tagMap[s]+a:s==="!"?e.tag="!"+a:s==="!!"?e.tag="tag:yaml.org,2002:"+a:rt(e,'undeclared tag handle "'+s+'"'),!0}f(pp,"readTagProperty");function fp(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&rt(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Jt(r)&&!wr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&rt(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}f(fp,"readAnchorProperty");function gp(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&&!Jt(i)&&!wr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&rt(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),cr.call(e.anchorMap,r)||rt(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],At(e,!0,-1),!0}f(gp,"readAlias");function Ar(e,t,r,i,s){var a,o,n,l=1,h=!1,c=!1,u,p,d,m,g,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=n=ma===r||Kd===r,i&&At(e,!0,-1)&&(h=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;pp(e)||fp(e);)At(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||ma===r)&&(ga===r||Zd===r?g=t:g=t+1,y=e.position-e.lineStart,l===1?n&&(sn(e,y)||dp(e,y,g))||cp(e,g)?c=!0:(o&&up(e,g)||lp(e,g)||hp(e,g)?c=!0:gp(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&rt(e,"alias node should not have any properties")):np(e,g,ga===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=n&&sn(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"&&rt(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,p=e.implicitTypes.length;u<p;u+=1)if(m=e.implicitTypes[u],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(cr.call(e.typeMap[e.kind||"fallback"],e.tag))m=e.typeMap[e.kind||"fallback"][e.tag];else for(m=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){m=d[u];break}m||rt(e,"unknown tag !<"+e.tag+">"),e.result!==null&&m.kind!==e.kind&&rt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):rt(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(Ar,"composeNode");function mp(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&&(At(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&&!Jt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&rt(e,"directive name must not be less than one character in length");o!==0;){for(;lr(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!ke(o));break}if(ke(o))break;for(r=e.position;o!==0&&!Jt(o);)o=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}o!==0&&Pa(e),cr.call(Xh,i)?Xh[i](e,i,s):ss(e,'unknown document directive "'+i+'"')}if(At(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,At(e,!0,-1)):a&&rt(e,"directives end mark is expected"),Ar(e,e.lineIndent-1,ma,!1,!0),At(e,!0,-1),e.checkLineBreaks&&I1.test(e.input.slice(t,e.position))&&ss(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&gs(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,At(e,!0,-1));return}if(e.position<e.length-1)rt(e,"end of the stream or a document separator is expected");else return}f(mp,"readDocument");function ol(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 op(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,rt(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)mp(r);return r.documents}f(ol,"loadDocuments");function R1(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=ol(e,r);if(typeof t!="function")return i;for(var s=0,a=i.length;s<a;s+=1)t(i[s])}f(R1,"loadAll$1");function yp(e,t){var r=ol(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new se("expected a single document in the stream, but found more")}}f(yp,"load$1");var P1=yp,N1={load:P1},Cp=Object.prototype.toString,xp=Object.prototype.hasOwnProperty,nl=65279,q1=9,as=10,z1=13,W1=32,H1=33,Y1=34,an=35,U1=37,G1=38,j1=39,X1=42,bp=44,V1=45,ya=58,Z1=61,K1=62,Q1=63,J1=64,kp=91,Tp=93,t2=96,wp=123,e2=124,Sp=125,Vt={};Vt[0]="\\0";Vt[7]="\\a";Vt[8]="\\b";Vt[9]="\\t";Vt[10]="\\n";Vt[11]="\\v";Vt[12]="\\f";Vt[13]="\\r";Vt[27]="\\e";Vt[34]='\\"';Vt[92]="\\\\";Vt[133]="\\N";Vt[160]="\\_";Vt[8232]="\\L";Vt[8233]="\\P";var r2=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],i2=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function _p(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&&xp.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[o]=n;return r}f(_p,"compileStyleMap");function Bp(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 se("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Dt.repeat("0",i-t.length)+t}f(Bp,"encodeHex");var s2=1,os=2;function vp(e){this.schema=e.schema||Vd,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Dt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=_p(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==='"'?os:s2,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}f(vp,"State");function on(e,t){for(var r=Dt.repeat(" ",t),i=0,s=-1,a="",o,n=e.length;i<n;)s=e.indexOf(`
141
142
  `,i),s===-1?(o=e.slice(i),i=n):(o=e.slice(i,s+1),i=s+1),o.length&&o!==`
142
- `&&(a+=r),a+=o;return a}f(Ho,"indentString");function ha(e,t){return`
143
- `+Dt.repeat(" ",e.indent*t)}f(ha,"generateNextLine");function lp(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(lp,"testImplicitResolving");function Ji(e){return e===s1||e===r1}f(Ji,"isWhitespace");function ci(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Un||65536<=e&&e<=1114111}f(ci,"isPrintable");function Yo(e){return ci(e)&&e!==Un&&e!==i1&&e!==Ki}f(Yo,"isNsCharOrWhitespace");function Uo(e,t,r){var i=Yo(e),s=i&&!Ji(e);return(r?i:i&&e!==tp&&e!==ep&&e!==rp&&e!==ip&&e!==sp)&&e!==zo&&!(t===la&&!s)||Yo(t)&&!Ji(t)&&e===zo||t===la&&s}f(Uo,"isPlainSafe");function hp(e){return ci(e)&&e!==Un&&!Ji(e)&&e!==u1&&e!==f1&&e!==la&&e!==tp&&e!==ep&&e!==rp&&e!==ip&&e!==sp&&e!==zo&&e!==l1&&e!==c1&&e!==a1&&e!==y1&&e!==d1&&e!==p1&&e!==h1&&e!==o1&&e!==n1&&e!==g1&&e!==m1}f(hp,"isPlainSafeFirst");function cp(e){return!Ji(e)&&e!==la}f(cp,"isPlainSafeLast");function qr(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(qr,"codePointAt");function Gn(e){var t=/^\n* /;return t.test(e)}f(Gn,"needIndentIndicator");var up=1,Go=2,dp=3,pp=4,Rr=5;function fp(e,t,r,i,s,a,o,n){var l,h=0,c=null,u=!1,p=!1,d=i!==-1,m=-1,g=hp(qr(e,0))&&cp(qr(e,e.length-1));if(t||o)for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=qr(e,l),!ci(h))return Rr;g=g&&Uo(h,c,n),c=h}else{for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=qr(e,l),h===Ki)u=!0,d&&(p=p||l-m-1>i&&e[m+1]!==" ",m=l);else if(!ci(h))return Rr;g=g&&Uo(h,c,n),c=h}p=p||d&&l-m-1>i&&e[m+1]!==" "}return!u&&!p?g&&!o&&!s(e)?up:a===Qi?Rr:Go:r>9&&Gn(e)?Rr:o?a===Qi?Rr:Go:p?pp:dp}f(fp,"chooseScalarStyle");function gp(e,t,r,i,s){e.dump=(function(){if(t.length===0)return e.quotingType===Qi?'""':"''";if(!e.noCompatMode&&(C1.indexOf(t)!==-1||x1.test(t)))return e.quotingType===Qi?'"'+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 lp(e,h)}switch(f(l,"testAmbiguity"),fp(t,n,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,s)){case up:return t;case Go:return"'"+t.replace(/'/g,"''")+"'";case dp:return"|"+Xo(t,e.indent)+jo(Ho(t,a));case pp:return">"+Xo(t,e.indent)+jo(Ho(mp(t,o),a));case Rr:return'"'+yp(t)+'"';default:throw new se("impossible error: invalid scalar style")}})()}f(gp,"writeScalar");function Xo(e,t){var r=Gn(e)?String(t):"",i=e[e.length-1]===`
143
+ `&&(a+=r),a+=o;return a}f(on,"indentString");function Ca(e,t){return`
144
+ `+Dt.repeat(" ",e.indent*t)}f(Ca,"generateNextLine");function Lp(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(Lp,"testImplicitResolving");function ns(e){return e===W1||e===q1}f(ns,"isWhitespace");function Ci(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==nl||65536<=e&&e<=1114111}f(Ci,"isPrintable");function nn(e){return Ci(e)&&e!==nl&&e!==z1&&e!==as}f(nn,"isNsCharOrWhitespace");function ln(e,t,r){var i=nn(e),s=i&&!ns(e);return(r?i:i&&e!==bp&&e!==kp&&e!==Tp&&e!==wp&&e!==Sp)&&e!==an&&!(t===ya&&!s)||nn(t)&&!ns(t)&&e===an||t===ya&&s}f(ln,"isPlainSafe");function Fp(e){return Ci(e)&&e!==nl&&!ns(e)&&e!==V1&&e!==Q1&&e!==ya&&e!==bp&&e!==kp&&e!==Tp&&e!==wp&&e!==Sp&&e!==an&&e!==G1&&e!==X1&&e!==H1&&e!==e2&&e!==Z1&&e!==K1&&e!==j1&&e!==Y1&&e!==U1&&e!==J1&&e!==t2}f(Fp,"isPlainSafeFirst");function Ap(e){return!ns(e)&&e!==ya}f(Ap,"isPlainSafeLast");function Xr(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(Xr,"codePointAt");function ll(e){var t=/^\n* /;return t.test(e)}f(ll,"needIndentIndicator");var Ep=1,hn=2,Mp=3,$p=4,Ur=5;function Op(e,t,r,i,s,a,o,n){var l,h=0,c=null,u=!1,p=!1,d=i!==-1,m=-1,g=Fp(Xr(e,0))&&Ap(Xr(e,e.length-1));if(t||o)for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=Xr(e,l),!Ci(h))return Ur;g=g&&ln(h,c,n),c=h}else{for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=Xr(e,l),h===as)u=!0,d&&(p=p||l-m-1>i&&e[m+1]!==" ",m=l);else if(!Ci(h))return Ur;g=g&&ln(h,c,n),c=h}p=p||d&&l-m-1>i&&e[m+1]!==" "}return!u&&!p?g&&!o&&!s(e)?Ep:a===os?Ur:hn:r>9&&ll(e)?Ur:o?a===os?Ur:hn:p?$p:Mp}f(Op,"chooseScalarStyle");function Ip(e,t,r,i,s){e.dump=(function(){if(t.length===0)return e.quotingType===os?'""':"''";if(!e.noCompatMode&&(r2.indexOf(t)!==-1||i2.test(t)))return e.quotingType===os?'"'+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 Lp(e,h)}switch(f(l,"testAmbiguity"),Op(t,n,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,s)){case Ep:return t;case hn:return"'"+t.replace(/'/g,"''")+"'";case Mp:return"|"+cn(t,e.indent)+un(on(t,a));case $p:return">"+cn(t,e.indent)+un(on(Dp(t,o),a));case Ur:return'"'+Rp(t)+'"';default:throw new se("impossible error: invalid scalar style")}})()}f(Ip,"writeScalar");function cn(e,t){var r=ll(e)?String(t):"",i=e[e.length-1]===`
144
145
  `,s=i&&(e[e.length-2]===`
145
146
  `||e===`
146
147
  `),a=s?"+":i?"":"-";return r+a+`
147
- `}f(Xo,"blockHeader");function jo(e){return e[e.length-1]===`
148
- `?e.slice(0,-1):e}f(jo,"dropEndingNewline");function mp(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var h=e.indexOf(`
149
- `);return h=h!==-1?h:e.length,r.lastIndex=h,Vo(e.slice(0,h),t)})(),s=e[0]===`
148
+ `}f(cn,"blockHeader");function un(e){return e[e.length-1]===`
149
+ `?e.slice(0,-1):e}f(un,"dropEndingNewline");function Dp(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var h=e.indexOf(`
150
+ `);return h=h!==-1?h:e.length,r.lastIndex=h,dn(e.slice(0,h),t)})(),s=e[0]===`
150
151
  `||e[0]===" ",a,o;o=r.exec(e);){var n=o[1],l=o[2];a=l[0]===" ",i+=n+(!s&&!a&&l!==""?`
151
- `:"")+Vo(l,t),s=a}return i}f(mp,"foldString");function Vo(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+=`
152
+ `:"")+dn(l,t),s=a}return i}f(Dp,"foldString");function dn(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+=`
152
153
  `+e.slice(s,a),s=a+1),o=n;return l+=`
153
154
  `,e.length-s>t&&o>s?l+=e.slice(s,o)+`
154
- `+e.slice(o+1):l+=e.slice(s),l.slice(1)}f(Vo,"foldLine");function yp(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=qr(e,s),i=Xt[r],!i&&ci(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||op(r);return t}f(yp,"escapeString");function Cp(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)),(Ie(e,t,n,!1,!1)||typeof n>"u"&&Ie(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}f(Cp,"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)),(Ie(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Ie(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=ha(e,t)),e.dump&&Ki===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=a,e.dump=s||"[]"}f(Zo,"writeBlockSequence");function xp(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)),Ie(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ie(e,t,h,!1,!1)&&(c+=e.dump,i+=c));e.tag=s,e.dump="{"+i+"}"}f(xp,"writeFlowMapping");function bp(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 se("sortKeys must be a boolean or a function");for(n=0,l=o.length;n<l;n+=1)p="",(!i||s!=="")&&(p+=ha(e,t)),h=o[n],c=r[h],e.replacer&&(c=e.replacer.call(r,h,c)),Ie(e,t+1,h,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&Ki===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,u&&(p+=ha(e,t)),Ie(e,t+1,c,!0,u)&&(e.dump&&Ki===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,s+=p));e.tag=a,e.dump=s||"{}"}f(bp,"writeBlockMapping");function Ko(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,Qd.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(Jd.call(n.represent,l))i=n.represent[l](t,l);else throw new se("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}f(Ko,"detectType");function Ie(e,t,r,i,s,a,o){e.tag=null,e.dump=r,Ko(e,r,!1)||Ko(e,r,!0);var n=Qd.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?(bp(e,t,e.dump,s),p&&(e.dump="&ref_"+u+e.dump)):(xp(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)):(Cp(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&gp(e,e.dump,t,a,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new se("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(Ie,"writeNode");function kp(e,t){var r=[],i=[],s,a;for(ca(e,r,i),s=0,a=i.length;s<a;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(a)}f(kp,"getDuplicateReferences");function ca(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)ca(e[s],t,r);else for(i=Object.keys(e),s=0,a=i.length;s<a;s+=1)ca(e[i[s]],t,r)}f(ca,"inspectNode");function k1(e,t){t=t||{};var r=new np(t);r.noRefs||kp(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Ie(r,0,i,!0,!0)?r.dump+`
155
- `:""}f(k1,"dump$1");function T1(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(T1,"renamed");var w1=dd,S1=e1.load;/*! Bundled license information:
155
+ `+e.slice(o+1):l+=e.slice(s),l.slice(1)}f(dn,"foldLine");function Rp(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=Xr(e,s),i=Vt[r],!i&&Ci(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||Bp(r);return t}f(Rp,"escapeString");function Pp(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)),(De(e,t,n,!1,!1)||typeof n>"u"&&De(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}f(Pp,"writeFlowSequence");function pn(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)),(De(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&De(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=Ca(e,t)),e.dump&&as===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=a,e.dump=s||"[]"}f(pn,"writeBlockSequence");function Np(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)),De(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),De(e,t,h,!1,!1)&&(c+=e.dump,i+=c));e.tag=s,e.dump="{"+i+"}"}f(Np,"writeFlowMapping");function qp(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 se("sortKeys must be a boolean or a function");for(n=0,l=o.length;n<l;n+=1)p="",(!i||s!=="")&&(p+=Ca(e,t)),h=o[n],c=r[h],e.replacer&&(c=e.replacer.call(r,h,c)),De(e,t+1,h,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&as===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,u&&(p+=Ca(e,t)),De(e,t+1,c,!0,u)&&(e.dump&&as===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,s+=p));e.tag=a,e.dump=s||"{}"}f(qp,"writeBlockMapping");function fn(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,Cp.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(xp.call(n.represent,l))i=n.represent[l](t,l);else throw new se("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}f(fn,"detectType");function De(e,t,r,i,s,a,o){e.tag=null,e.dump=r,fn(e,r,!1)||fn(e,r,!0);var n=Cp.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?(qp(e,t,e.dump,s),p&&(e.dump="&ref_"+u+e.dump)):(Np(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?pn(e,t-1,e.dump,s):pn(e,t,e.dump,s),p&&(e.dump="&ref_"+u+e.dump)):(Pp(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&Ip(e,e.dump,t,a,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new se("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(De,"writeNode");function zp(e,t){var r=[],i=[],s,a;for(xa(e,r,i),s=0,a=i.length;s<a;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(a)}f(zp,"getDuplicateReferences");function xa(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)xa(e[s],t,r);else for(i=Object.keys(e),s=0,a=i.length;s<a;s+=1)xa(e[i[s]],t,r)}f(xa,"inspectNode");function a2(e,t){t=t||{};var r=new vp(t);r.noRefs||zp(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),De(r,0,i,!0,!0)?r.dump+`
156
+ `:""}f(a2,"dump$1");function o2(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(o2,"renamed");var n2=Md,l2=N1.load;/*! Bundled license information:
156
157
 
157
158
  js-yaml/dist/js-yaml.mjs:
158
159
  (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
159
- */var Si=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},Lh={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Ii(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=wt(e),t=wt(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(Ii,"calculateDeltaAndAngle");var wt=f(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),_1=f(e=>({x:f(function(t,r,i){let s=0;const a=wt(i[0]).x<wt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Ut,e.arrowTypeStart)){const{angle:d,deltaX:m}=Ii(i[0],i[1]);s=Ut[e.arrowTypeStart]*Math.cos(d)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ut,e.arrowTypeEnd)){const{angle:d,deltaX:m}=Ii(i[i.length-1],i[i.length-2]);s=Ut[e.arrowTypeEnd]*Math.cos(d)*(m>=0?1:-1)}const o=Math.abs(wt(t).x-wt(i[i.length-1]).x),n=Math.abs(wt(t).y-wt(i[i.length-1]).y),l=Math.abs(wt(t).x-wt(i[0]).x),h=Math.abs(wt(t).y-wt(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 wt(t).x+s},"x"),y:f(function(t,r,i){let s=0;const a=wt(i[0]).y<wt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Ut,e.arrowTypeStart)){const{angle:d,deltaY:m}=Ii(i[0],i[1]);s=Ut[e.arrowTypeStart]*Math.abs(Math.sin(d))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ut,e.arrowTypeEnd)){const{angle:d,deltaY:m}=Ii(i[i.length-1],i[i.length-2]);s=Ut[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(m>=0?1:-1)}const o=Math.abs(wt(t).y-wt(i[i.length-1]).y),n=Math.abs(wt(t).x-wt(i[i.length-1]).x),l=Math.abs(wt(t).y-wt(i[0]).y),h=Math.abs(wt(t).x-wt(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 wt(t).y+s},"y")}),"getLineFunctionsWithOffset"),Ts={},Ot={},Fh;function B1(){return Fh||(Fh=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.BLANK_URL=Ot.relativeFirstCharacters=Ot.whitespaceEscapeCharsRegex=Ot.urlSchemeRegex=Ot.ctrlCharactersRegex=Ot.htmlCtrlEntityRegex=Ot.htmlEntitiesRegex=Ot.invalidProtocolRegex=void 0,Ot.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Ot.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Ot.htmlCtrlEntityRegex=/&(newline|tab);/gi,Ot.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Ot.urlSchemeRegex=/^.+(:|&colon;)/gim,Ot.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Ot.relativeFirstCharacters=[".","/"],Ot.BLANK_URL="about:blank"),Ot}var Ah;function v1(){if(Ah)return Ts;Ah=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.sanitizeUrl=a;var e=B1();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 m=new URL(d);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return d}return Ts}var L1=v1();function F1(e){return Number.isSafeInteger(e)&&e>=0}function Tp(e){return e!=null&&typeof e!="function"&&F1(e.length)}function A1(e){return e==="__proto__"}function Xn(e){return e==null||typeof e!="object"&&typeof e!="function"}function wp(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function jn(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const E1="[object RegExp]",Sp="[object String]",_p="[object Number]",Bp="[object Boolean]",vp="[object Arguments]",M1="[object Symbol]",$1="[object Date]",O1="[object Map]",I1="[object Set]",D1="[object Array]",R1="[object ArrayBuffer]",Lp="[object Object]",P1="[object DataView]",N1="[object Uint8Array]",q1="[object Uint8ClampedArray]",W1="[object Uint16Array]",z1="[object Uint32Array]",H1="[object Int8Array]",Y1="[object Int16Array]",U1="[object Int32Array]",G1="[object Float32Array]",X1="[object Float64Array]",Eh=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")();function Vn(e){return typeof Eh.Buffer<"u"&&Eh.Buffer.isBuffer(e)}function Zn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function j1(e,t){return Wr(e,void 0,e,new Map,t)}function Wr(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(Xn(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]=Wr(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,Wr(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(Wr(n,void 0,r,i,s));return o}if(Vn(e))return e.subarray();if(Zn(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Wr(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),ye(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),ye(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),ye(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,ye(o,e,r,i,s),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return i.set(e,o),ye(o,e,r,i,s),o}if(e instanceof Number){const o=new Number(e.valueOf());return i.set(e,o),ye(o,e,r,i,s),o}if(e instanceof String){const o=new String(e.valueOf());return i.set(e,o),ye(o,e,r,i,s),o}if(typeof e=="object"&&V1(e)){const o=Object.create(Object.getPrototypeOf(e));return i.set(e,o),ye(o,e,r,i,s),o}return e}function ye(e,t,r=e,i,s){const a=[...Object.keys(t),...wp(t)];for(let o=0;o<a.length;o++){const n=a[o],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Wr(t[n],n,r,i,s))}}function V1(e){switch(jn(e)){case vp:case D1:case R1:case P1:case Bp:case $1:case G1:case X1:case H1:case Y1:case U1:case O1:case _p:case Lp:case E1:case I1:case Sp:case M1:case N1:case q1:case W1:case z1:return!0;default:return!1}}function Z1(e,t){return j1(e,(r,i,s,a)=>{if(typeof e=="object"){if(jn(e)===Lp&&typeof e.constructor!="function"){const o={};return a.set(e,o),ye(o,e,s,a),o}switch(Object.prototype.toString.call(e)){case _p:case Sp:case Bp:{const o=new e.constructor(e==null?void 0:e.valueOf());return ye(o,e),o}case vp:{const o={};return ye(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function Mh(e){return Z1(e)}function Qo(e){return e!==null&&typeof e=="object"&&jn(e)==="[object Arguments]"}function Jo(e){return typeof e=="object"&&e!==null}function K1(e){return Jo(e)&&Tp(e)}function ls(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...s){const a=t?t.apply(this,s):s[0],o=r.cache;if(o.has(a))return o.get(a);const n=e.apply(this,s);return r.cache=o.set(a,n)||o,n},i=ls.Cache||Map;return r.cache=new i,r}ls.Cache=Map;function Q1(){}function J1(e){const t=e==null?void 0:e.constructor,r=typeof t=="function"?t.prototype:Object.prototype;return e===r}function Ns(e){return Zn(e)}function no(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 t2(e){if(Xn(e))return e;if(Array.isArray(e)||Zn(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}if(typeof File<"u"&&e instanceof File)return new r([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e=="object"){const i=Object.create(t);return Object.assign(i,e)}return e}function e2(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=qs(s,o,i,new Map)}return s}function qs(e,t,r,i){if(Xn(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return t2(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),...wp(t)];for(let a=0;a<s.length;a++){const o=s[a];if(A1(o))continue;let n=t[o],l=e[o];if(Qo(n)&&(n={...n}),Qo(l)&&(l={...l}),Vn(n)&&(n=Mh(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(K1(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)||Jo(l)&&Jo(n)&&(no(l)||no(n)||Ns(l)||Ns(n))?e[o]=qs(l,n,r,i):l==null&&no(n)?e[o]=qs({},n,r,i):l==null&&Ns(n)?e[o]=Mh(n):(l===void 0||n!==void 0)&&(e[o]=n)}return e}function r2(e,...t){return e2(e,...t,Q1)}function $h(e){if(e==null)return!0;if(Tp(e))return typeof e.splice!="function"&&typeof e!="string"&&!Vn(e)&&!Ns(e)&&!Qo(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 i2="​",s2={curveBasis:Do,curveBasisClosed:hk,curveBasisOpen:ck,curveBumpX:ku,curveBumpY:Tu,curveBundle:uk,curveCardinalClosed:dk,curveCardinalOpen:pk,curveCardinal:Bu,curveCatmullRomClosed:fk,curveCatmullRomOpen:gk,curveCatmullRom:Lu,curveLinear:zi,curveLinearClosed:mk,curveMonotoneX:Ou,curveMonotoneY:Iu,curveNatural:Ru,curveStep:Pu,curveStepAfter:qu,curveStepBefore:Nu},a2=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,o2=f(function(e,t){const r=Fp(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);Us(o),i=It(i,[...o])}else i=r.args;if(!i)return;let s=kn(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),Fp=f(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${a2.source})(?=[}][%]{2}).*
160
- `,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),q.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=qi.exec(e))!==null;)if(a.index===qi.lastIndex&&qi.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 q.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),n2=f(function(e){return e.replace(qi,"")},"removeDirectives"),l2=f(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Kn(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return s2[r]??t}f(Kn,"interpolateToCurve");function Ap(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?L1.sanitizeUrl(r):r}f(Ap,"formatUrl");var h2=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){q.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 Ep(e){let t,r=0;e.forEach(s=>{r+=Qn(s,t),t=s});const i=r/2;return Jn(e,i)}f(Ep,"traverseEdge");function Mp(e){return e.length===1?e[0]:Ep(e)}f(Mp,"calcLabelPosition");var Oh=f((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Jn=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:Oh((1-o)*r.x+o*s.x,5),y:Oh((1-o)*r.y+o*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),c2=f((e,t,r)=>{q.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=Jn(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 $p(e,t,r){const i=structuredClone(r);q.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=Jn(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($p,"calcTerminalLabelPosition");function Op(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(Op,"getStylesFromArray");var Ih=0,u2=f(()=>(Ih++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ih),"generateId");function Ip(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(Ip,"makeRandomHex");var d2=f(e=>Ip(e.length),"random"),p2=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"),f2=f(function(e,t){const r=t.text.replace(ss.lineBreakRegex," "),[,i]=Ea(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"),g2=ls((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),ss.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((o,n)=>{const l=Xe(`${o} `,r),h=Xe(a,r);if(l>t){const{hyphenatedStrings:p,remainingWord:d}=m2(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}`),m2=ls((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(Xe(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 Dp(e,t){return tl(e,t).height}f(Dp,"calculateTextHeight");function Xe(e,t){return tl(e,t).width}f(Xe,"calculateTextWidth");var tl=ls((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=Ea(r),o=["sans-serif",i],n=e.split(ss.lineBreakRegex),l=[],h=ct("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 m={width:0,height:0,lineHeight:0};for(const g of n){const y=p2();y.text=g||i2;const C=f2(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");m.width=Math.round(Math.max(m.width,b.width)),d=Math.round(b.height),m.height+=d,m.lineHeight=Math.round(Math.max(m.lineHeight,d))}l.push(m)}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}`),si,y2=(si=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},f(si,"InitIDGenerator"),si),ws,C2=f(function(e){return ws=ws||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ws.innerHTML=e,unescape(ws.textContent)},"entityDecode");function el(e){return"str"in e}f(el,"isDetailedError");var x2=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"),Ea=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 rl(e,t){return r2({},e,t)}f(rl,"cleanAndMerge");var ke={assignWithDepth:It,wrapLabel:g2,calculateTextHeight:Dp,calculateTextWidth:Xe,calculateTextDimensions:tl,cleanAndMerge:rl,detectInit:o2,detectDirective:Fp,isSubstringInArray:l2,interpolateToCurve:Kn,calcLabelPosition:Mp,calcCardinalityPosition:c2,calcTerminalLabelPosition:$p,formatUrl:Ap,getStylesFromArray:Op,generateId:u2,random:d2,runFunc:h2,entityDecode:C2,insertTitle:x2,isLabelCoordinateInPath:Rp,parseFontSize:Ea,InitIDGenerator:y2},b2=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"),wr=f(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Wv=f((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function Pt(e){return e??null}f(Pt,"handleUndefinedAttr");function Rp(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(Rp,"isLabelCoordinateInPath");var il=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 Pp(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=gt().fontSize?gt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[h=$c.fontSize]=Ea(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(Pp,"configureLabelImages");var k2=f(e=>{const{handDrawnSeed:t}=gt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),pi=f(e=>{const t=T2([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),T2=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"),Np=f(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),V=f(e=>{const{stylesArray:t}=pi(e),r=[],i=[],s=[],a=[];return t.forEach(o=>{const n=o[0];Np(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"),X=f((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=gt(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:o}=pi(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:w2(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),w2=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 S2=Object.freeze({left:0,top:0,width:16,height:16}),ua=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),qp=Object.freeze({...S2,...ua}),_2=Object.freeze({...qp,body:"",hidden:!1}),B2=Object.freeze({width:null,height:null}),v2=Object.freeze({...B2,...ua}),L2=(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 lo(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 lo(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:a};return lo(n,r)?n:null}return null},lo=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function F2(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 Dh(e,t){const r=F2(e,t);for(const i in _2)i in ua?i in e&&!(i in r)&&(r[i]=ua[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function A2(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 Rh(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function o(n){a=Dh(i[n]||s[n],a)}return o(t),r.forEach(o),Dh(e,a)}function E2(e,t){if(e.icons[t])return Rh(e,t,[]);const r=A2(e,[t])[t];return r?Rh(e,t,r):null}const M2=/(-?[0-9.]*[0-9]+[0-9.]*)/g,$2=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ph(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(M2);if(i===null||!i.length)return e;const s=[];let a=i.shift(),o=$2.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 O2(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 I2(e,t){return e?"<defs>"+e+"</defs>"+t:t}function D2(e,t,r){const i=O2(e);return I2(i.defs,t+i.content+r)}const R2=e=>e==="unset"||e==="undefined"||e==="none";function P2(e,t){const r={...qp,...e},i={...v2,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(g=>{const y=[],C=g.hFlip,b=g.vFlip;let k=g.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 T;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:T=s.height/2+s.top,y.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:y.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:T=s.width/2+s.left,y.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")");break}k%2===1&&(s.left!==s.top&&(T=s.left,s.left=s.top,s.top=T),s.width!==s.height&&(T=s.width,s.width=s.height,s.height=T)),y.length&&(a=D2(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=Ph(u,l/h)):(c=o==="auto"?l:o,u=n===null?Ph(c,h/l):n==="auto"?h:n);const p={},d=(g,y)=>{R2(y)||(p[g]=y.toString())};d("width",c),d("height",u);const m=[s.left,s.top,l,h];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:a}}const N2=/\sid="(\S+)"/g,Nh=new Map;function q2(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Nh.get(e)||0;return Nh.set(e,t+1),t?`${e}${t}`:e}function W2(e){const t=[];let r;for(;r=N2.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=q2(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 z2(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 sl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Br=sl();function Wp(e){Br=e}var Hi={exec:()=>null};function mt(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 H2=(()=>{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")},Y2=/^(?:[ \t]*(?:\n|$))+/,U2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,G2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,X2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,al=/(?:[*+-]|\d{1,9}[.)])/,zp=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Hp=mt(zp).replace(/bull/g,al).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(),j2=mt(zp).replace(/bull/g,al).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(),ol=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,V2=/^[^\n]+/,nl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Z2=mt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",nl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),K2=mt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,al).getRegex(),Ma="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",ll=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Q2=mt("^ {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",ll).replace("tag",Ma).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Yp=mt(ol).replace("hr",hs).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",Ma).getRegex(),J2=mt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Yp).getRegex(),hl={blockquote:J2,code:U2,def:Z2,fences:G2,heading:X2,hr:hs,html:Q2,lheading:Hp,list:K2,newline:Y2,paragraph:Yp,table:Hi,text:V2},qh=mt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",hs).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",Ma).getRegex(),tT={...hl,lheading:j2,table:qh,paragraph:mt(ol).replace("hr",hs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",qh).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",Ma).getRegex()},eT={...hl,html:mt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ll).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:Hi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:mt(ol).replace("hr",hs).replace("heading",` *#{1,6} *[^
161
- ]`).replace("lheading",Hp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},rT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,iT=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Up=/^( {2,}|\\)\n(?!\s*$)/,sT=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,$a=/[\p{P}\p{S}]/u,cl=/[\s\p{P}\p{S}]/u,Gp=/[^\s\p{P}\p{S}]/u,aT=mt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,cl).getRegex(),Xp=/(?!~)[\p{P}\p{S}]/u,oT=/(?!~)[\s\p{P}\p{S}]/u,nT=/(?:[^\s\p{P}\p{S}]|~)/u,lT=mt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",H2?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),jp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,hT=mt(jp,"u").replace(/punct/g,$a).getRegex(),cT=mt(jp,"u").replace(/punct/g,Xp).getRegex(),Vp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",uT=mt(Vp,"gu").replace(/notPunctSpace/g,Gp).replace(/punctSpace/g,cl).replace(/punct/g,$a).getRegex(),dT=mt(Vp,"gu").replace(/notPunctSpace/g,nT).replace(/punctSpace/g,oT).replace(/punct/g,Xp).getRegex(),pT=mt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Gp).replace(/punctSpace/g,cl).replace(/punct/g,$a).getRegex(),fT=mt(/\\(punct)/,"gu").replace(/punct/g,$a).getRegex(),gT=mt(/^<(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(),mT=mt(ll).replace("(?:-->|$)","-->").getRegex(),yT=mt("^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",mT).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),da=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,CT=mt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",da).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Zp=mt(/^!?\[(label)\]\[(ref)\]/).replace("label",da).replace("ref",nl).getRegex(),Kp=mt(/^!?\[(ref)\](?:\[\])?/).replace("ref",nl).getRegex(),xT=mt("reflink|nolink(?!\\()","g").replace("reflink",Zp).replace("nolink",Kp).getRegex(),Wh=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ul={_backpedal:Hi,anyPunctuation:fT,autolink:gT,blockSkip:lT,br:Up,code:iT,del:Hi,emStrongLDelim:hT,emStrongRDelimAst:uT,emStrongRDelimUnd:pT,escape:rT,link:CT,nolink:Kp,punctuation:aT,reflink:Zp,reflinkSearch:xT,tag:yT,text:sT,url:Hi},bT={...ul,link:mt(/^!?\[(label)\]\((.*?)\)/).replace("label",da).getRegex(),reflink:mt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",da).getRegex()},tn={...ul,emStrongRDelimAst:dT,emStrongLDelim:cT,url:mt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Wh).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:mt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Wh).getRegex()},kT={...tn,br:mt(Up).replace("{2,}","*").getRegex(),text:mt(tn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ss={normal:hl,gfm:tT,pedantic:eT},_i={normal:ul,gfm:tn,breaks:kT,pedantic:bT},TT={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},zh=e=>TT[e];function Ae(e,t){if(t){if(Kt.escapeTest.test(e))return e.replace(Kt.escapeReplace,zh)}else if(Kt.escapeTestNoEncode.test(e))return e.replace(Kt.escapeReplaceNoEncode,zh);return e}function Hh(e){try{e=encodeURI(e).replace(Kt.percentDecode,"%")}catch{return null}return e}function Yh(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 Bi(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 wT(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 Uh(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 ST(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
160
+ */var Mi=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"),jt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Vh={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Hi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=_t(e),t=_t(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],o=s-r,n=a-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}f(Hi,"calculateDeltaAndAngle");var _t=f(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),h2=f(e=>({x:f(function(t,r,i){let s=0;const a=_t(i[0]).x<_t(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(jt,e.arrowTypeStart)){const{angle:d,deltaX:m}=Hi(i[0],i[1]);s=jt[e.arrowTypeStart]*Math.cos(d)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(jt,e.arrowTypeEnd)){const{angle:d,deltaX:m}=Hi(i[i.length-1],i[i.length-2]);s=jt[e.arrowTypeEnd]*Math.cos(d)*(m>=0?1:-1)}const o=Math.abs(_t(t).x-_t(i[i.length-1]).x),n=Math.abs(_t(t).y-_t(i[i.length-1]).y),l=Math.abs(_t(t).x-_t(i[0]).x),h=Math.abs(_t(t).y-_t(i[0]).y),c=jt[e.arrowTypeStart],u=jt[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 _t(t).x+s},"x"),y:f(function(t,r,i){let s=0;const a=_t(i[0]).y<_t(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(jt,e.arrowTypeStart)){const{angle:d,deltaY:m}=Hi(i[0],i[1]);s=jt[e.arrowTypeStart]*Math.abs(Math.sin(d))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(jt,e.arrowTypeEnd)){const{angle:d,deltaY:m}=Hi(i[i.length-1],i[i.length-2]);s=jt[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(m>=0?1:-1)}const o=Math.abs(_t(t).y-_t(i[i.length-1]).y),n=Math.abs(_t(t).x-_t(i[i.length-1]).x),l=Math.abs(_t(t).y-_t(i[0]).y),h=Math.abs(_t(t).x-_t(i[0]).x),c=jt[e.arrowTypeStart],u=jt[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 _t(t).y+s},"y")}),"getLineFunctionsWithOffset"),Es={},Ot={},Zh;function c2(){return Zh||(Zh=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.BLANK_URL=Ot.relativeFirstCharacters=Ot.whitespaceEscapeCharsRegex=Ot.urlSchemeRegex=Ot.ctrlCharactersRegex=Ot.htmlCtrlEntityRegex=Ot.htmlEntitiesRegex=Ot.invalidProtocolRegex=void 0,Ot.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Ot.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Ot.htmlCtrlEntityRegex=/&(newline|tab);/gi,Ot.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Ot.urlSchemeRegex=/^.+(:|&colon;)/gim,Ot.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Ot.relativeFirstCharacters=[".","/"],Ot.BLANK_URL="about:blank"),Ot}var Kh;function u2(){if(Kh)return Es;Kh=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.sanitizeUrl=a;var e=c2();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 m=new URL(d);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return d}return Es}var d2=u2();function p2(e){return Number.isSafeInteger(e)&&e>=0}function Wp(e){return e!=null&&typeof e!="function"&&p2(e.length)}function f2(e){return e==="__proto__"}function hl(e){return e==null||typeof e!="object"&&typeof e!="function"}function Hp(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function cl(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const g2="[object RegExp]",Yp="[object String]",Up="[object Number]",Gp="[object Boolean]",jp="[object Arguments]",m2="[object Symbol]",y2="[object Date]",C2="[object Map]",x2="[object Set]",b2="[object Array]",k2="[object ArrayBuffer]",Xp="[object Object]",T2="[object DataView]",w2="[object Uint8Array]",S2="[object Uint8ClampedArray]",_2="[object Uint16Array]",B2="[object Uint32Array]",v2="[object Int8Array]",L2="[object Int16Array]",F2="[object Int32Array]",A2="[object Float32Array]",E2="[object Float64Array]",Qh=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")();function ul(e){return typeof Qh.Buffer<"u"&&Qh.Buffer.isBuffer(e)}function dl(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function M2(e,t){return Vr(e,void 0,e,new Map,t)}function Vr(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(hl(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]=Vr(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,Vr(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(Vr(n,void 0,r,i,s));return o}if(ul(e))return e.subarray();if(dl(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Vr(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),me(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),me(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),me(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,me(o,e,r,i,s),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return i.set(e,o),me(o,e,r,i,s),o}if(e instanceof Number){const o=new Number(e.valueOf());return i.set(e,o),me(o,e,r,i,s),o}if(e instanceof String){const o=new String(e.valueOf());return i.set(e,o),me(o,e,r,i,s),o}if(typeof e=="object"&&$2(e)){const o=Object.create(Object.getPrototypeOf(e));return i.set(e,o),me(o,e,r,i,s),o}return e}function me(e,t,r=e,i,s){const a=[...Object.keys(t),...Hp(t)];for(let o=0;o<a.length;o++){const n=a[o],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Vr(t[n],n,r,i,s))}}function $2(e){switch(cl(e)){case jp:case b2:case k2:case T2:case Gp:case y2:case A2:case E2:case v2:case L2:case F2:case C2:case Up:case Xp:case g2:case x2:case Yp:case m2:case w2:case S2:case _2:case B2:return!0;default:return!1}}function O2(e,t){return M2(e,(r,i,s,a)=>{if(typeof e=="object"){if(cl(e)===Xp&&typeof e.constructor!="function"){const o={};return a.set(e,o),me(o,e,s,a),o}switch(Object.prototype.toString.call(e)){case Up:case Yp:case Gp:{const o=new e.constructor(e==null?void 0:e.valueOf());return me(o,e),o}case jp:{const o={};return me(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function Jh(e){return O2(e)}function gn(e){return e!==null&&typeof e=="object"&&cl(e)==="[object Arguments]"}function mn(e){return typeof e=="object"&&e!==null}function I2(e){return mn(e)&&Wp(e)}function ms(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...s){const a=t?t.apply(this,s):s[0],o=r.cache;if(o.has(a))return o.get(a);const n=e.apply(this,s);return r.cache=o.set(a,n)||o,n},i=ms.Cache||Map;return r.cache=new i,r}ms.Cache=Map;function D2(){}function R2(e){const t=e==null?void 0:e.constructor,r=typeof t=="function"?t.prototype:Object.prototype;return e===r}function Xs(e){return dl(e)}function So(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 P2(e){if(hl(e))return e;if(Array.isArray(e)||dl(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}if(typeof File<"u"&&e instanceof File)return new r([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e=="object"){const i=Object.create(t);return Object.assign(i,e)}return e}function N2(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=Vs(s,o,i,new Map)}return s}function Vs(e,t,r,i){if(hl(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return P2(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),...Hp(t)];for(let a=0;a<s.length;a++){const o=s[a];if(f2(o))continue;let n=t[o],l=e[o];if(gn(n)&&(n={...n}),gn(l)&&(l={...l}),ul(n)&&(n=Jh(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(I2(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)||mn(l)&&mn(n)&&(So(l)||So(n)||Xs(l)||Xs(n))?e[o]=Vs(l,n,r,i):l==null&&So(n)?e[o]=Vs({},n,r,i):l==null&&Xs(n)?e[o]=Jh(n):(l===void 0||n!==void 0)&&(e[o]=n)}return e}function q2(e,...t){return N2(e,...t,D2)}function tc(e){if(e==null)return!0;if(Wp(e))return typeof e.splice!="function"&&typeof e!="string"&&!ul(e)&&!Xs(e)&&!gn(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 R2(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var z2="​",W2={curveBasis:Qo,curveBasisClosed:jk,curveBasisOpen:Xk,curveBumpX:zu,curveBumpY:Wu,curveBundle:Vk,curveCardinalClosed:Zk,curveCardinalOpen:Kk,curveCardinal:Gu,curveCatmullRomClosed:Qk,curveCatmullRomOpen:Jk,curveCatmullRom:Xu,curveLinear:Zi,curveLinearClosed:t1,curveMonotoneX:td,curveMonotoneY:ed,curveNatural:id,curveStep:sd,curveStepAfter:od,curveStepBefore:ad},H2=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Y2=f(function(e,t){const r=Vp(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);ta(o),i=It(i,[...o])}else i=r.args;if(!i)return;let s=Rn(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),Vp=f(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${H2.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=Xi.exec(e))!==null;)if(a.index===Xi.lastIndex&&Xi.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"),U2=f(function(e){return e.replace(Xi,"")},"removeDirectives"),G2=f(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function pl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return W2[r]??t}f(pl,"interpolateToCurve");function Zp(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?d2.sanitizeUrl(r):r}f(Zp,"formatUrl");var j2=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 fl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}f(fl,"distance");function Kp(e){let t,r=0;e.forEach(s=>{r+=fl(s,t),t=s});const i=r/2;return gl(e,i)}f(Kp,"traverseEdge");function Qp(e){return e.length===1?e[0]:Kp(e)}f(Qp,"calcLabelPosition");var ec=f((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),gl=f((e,t)=>{let r,i=t;for(const s of e){if(r){const a=fl(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:ec((1-o)*r.x+o*s.x,5),y:ec((1-o)*r.y+o*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),X2=f((e,t,r)=>{z.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=gl(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 Jp(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=gl(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(Jp,"calcTerminalLabelPosition");function tf(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(tf,"getStylesFromArray");var rc=0,V2=f(()=>(rc++,"id-"+Math.random().toString(36).substr(2,12)+"-"+rc),"generateId");function ef(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(ef,"makeRandomHex");var Z2=f(e=>ef(e.length),"random"),K2=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"),Q2=f(function(e,t){const r=t.text.replace(ds.lineBreakRegex," "),[,i]=qa(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"),J2=ms((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),ds.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((o,n)=>{const l=Xe(`${o} `,r),h=Xe(a,r);if(l>t){const{hyphenatedStrings:p,remainingWord:d}=tT(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}`),tT=ms((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(Xe(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 rf(e,t){return ml(e,t).height}f(rf,"calculateTextHeight");function Xe(e,t){return ml(e,t).width}f(Xe,"calculateTextWidth");var ml=ms((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=qa(r),o=["sans-serif",i],n=e.split(ds.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 m={width:0,height:0,lineHeight:0};for(const g of n){const y=K2();y.text=g||z2;const C=Q2(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");m.width=Math.round(Math.max(m.width,b.width)),d=Math.round(b.height),m.height+=d,m.lineHeight=Math.round(Math.max(m.lineHeight,d))}l.push(m)}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}`),di,eT=(di=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},f(di,"InitIDGenerator"),di),Ms,rT=f(function(e){return Ms=Ms||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ms.innerHTML=e,unescape(Ms.textContent)},"entityDecode");function yl(e){return"str"in e}f(yl,"isDetailedError");var iT=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"),qa=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 Cl(e,t){return q2({},e,t)}f(Cl,"cleanAndMerge");var be={assignWithDepth:It,wrapLabel:J2,calculateTextHeight:rf,calculateTextWidth:Xe,calculateTextDimensions:ml,cleanAndMerge:Cl,detectInit:Y2,detectDirective:Vp,isSubstringInArray:G2,interpolateToCurve:pl,calcLabelPosition:Qp,calcCardinalityPosition:X2,calcTerminalLabelPosition:Jp,formatUrl:Zp,getStylesFromArray:tf,generateId:V2,random:Z2,runFunc:j2,entityDecode:rT,insertTitle:iT,isLabelCoordinateInPath:sf,parseFontSize:qa,InitIDGenerator:eT},sT=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"),Er=f(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),_L=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 sf(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(sf,"isLabelCoordinateInPath");var xl=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 af(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=xt().fontSize?xt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[h=Jc.fontSize]=qa(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(af,"configureLabelImages");var aT=f(e=>{const{handDrawnSeed:t}=xt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),ki=f(e=>{const t=oT([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),oT=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"),of=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"),Q=f(e=>{const{stylesArray:t}=ki(e),r=[],i=[],s=[],a=[];return t.forEach(o=>{const n=o[0];of(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"),K=f((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=xt(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:o}=ki(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:nT(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),nT=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 lT=Object.freeze({left:0,top:0,width:16,height:16}),ba=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),nf=Object.freeze({...lT,...ba}),hT=Object.freeze({...nf,body:"",hidden:!1}),cT=Object.freeze({width:null,height:null}),uT=Object.freeze({...cT,...ba}),dT=(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 _o(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 _o(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:a};return _o(n,r)?n:null}return null},_o=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function pT(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 ic(e,t){const r=pT(e,t);for(const i in hT)i in ba?i in e&&!(i in r)&&(r[i]=ba[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function fT(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 sc(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function o(n){a=ic(i[n]||s[n],a)}return o(t),r.forEach(o),ic(e,a)}function gT(e,t){if(e.icons[t])return sc(e,t,[]);const r=fT(e,[t])[t];return r?sc(e,t,r):null}const mT=/(-?[0-9.]*[0-9]+[0-9.]*)/g,yT=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ac(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(mT);if(i===null||!i.length)return e;const s=[];let a=i.shift(),o=yT.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 CT(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 xT(e,t){return e?"<defs>"+e+"</defs>"+t:t}function bT(e,t,r){const i=CT(e);return xT(i.defs,t+i.content+r)}const kT=e=>e==="unset"||e==="undefined"||e==="none";function TT(e,t){const r={...nf,...e},i={...uT,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(g=>{const y=[],C=g.hFlip,b=g.vFlip;let k=g.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 w;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:w=s.height/2+s.top,y.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:y.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:w=s.width/2+s.left,y.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}k%2===1&&(s.left!==s.top&&(w=s.left,s.left=s.top,s.top=w),s.width!==s.height&&(w=s.width,s.width=s.height,s.height=w)),y.length&&(a=bT(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=ac(u,l/h)):(c=o==="auto"?l:o,u=n===null?ac(c,h/l):n==="auto"?h:n);const p={},d=(g,y)=>{kT(y)||(p[g]=y.toString())};d("width",c),d("height",u);const m=[s.left,s.top,l,h];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:a}}const wT=/\sid="(\S+)"/g,oc=new Map;function ST(e){e=e.replace(/[0-9]+$/,"")||"a";const t=oc.get(e)||0;return oc.set(e,t+1),t?`${e}${t}`:e}function _T(e){const t=[];let r;for(;r=wT.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=ST(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 BT(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 bl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Or=bl();function lf(e){Or=e}var Ki={exec:()=>null};function bt(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(te.caret,"$1"),r=r.replace(s,o),i},getRegex:()=>new RegExp(r,t)};return i}var vT=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),te={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")},LT=/^(?:[ \t]*(?:\n|$))+/,FT=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,AT=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ys=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ET=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,kl=/(?:[*+-]|\d{1,9}[.)])/,hf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,cf=bt(hf).replace(/bull/g,kl).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(),MT=bt(hf).replace(/bull/g,kl).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(),Tl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,$T=/^[^\n]+/,wl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,OT=bt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",wl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),IT=bt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,kl).getRegex(),za="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",Sl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,DT=bt("^ {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",Sl).replace("tag",za).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),uf=bt(Tl).replace("hr",ys).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",za).getRegex(),RT=bt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",uf).getRegex(),_l={blockquote:RT,code:FT,def:OT,fences:AT,heading:ET,hr:ys,html:DT,lheading:cf,list:IT,newline:LT,paragraph:uf,table:Ki,text:$T},nc=bt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ys).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",za).getRegex(),PT={..._l,lheading:MT,table:nc,paragraph:bt(Tl).replace("hr",ys).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",nc).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",za).getRegex()},NT={..._l,html:bt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Sl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ki,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:bt(Tl).replace("hr",ys).replace("heading",` *#{1,6} *[^
162
+ ]`).replace("lheading",cf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},qT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,zT=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,df=/^( {2,}|\\)\n(?!\s*$)/,WT=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Wa=/[\p{P}\p{S}]/u,Bl=/[\s\p{P}\p{S}]/u,pf=/[^\s\p{P}\p{S}]/u,HT=bt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Bl).getRegex(),ff=/(?!~)[\p{P}\p{S}]/u,YT=/(?!~)[\s\p{P}\p{S}]/u,UT=/(?:[^\s\p{P}\p{S}]|~)/u,GT=bt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",vT?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),gf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,jT=bt(gf,"u").replace(/punct/g,Wa).getRegex(),XT=bt(gf,"u").replace(/punct/g,ff).getRegex(),mf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",VT=bt(mf,"gu").replace(/notPunctSpace/g,pf).replace(/punctSpace/g,Bl).replace(/punct/g,Wa).getRegex(),ZT=bt(mf,"gu").replace(/notPunctSpace/g,UT).replace(/punctSpace/g,YT).replace(/punct/g,ff).getRegex(),KT=bt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,pf).replace(/punctSpace/g,Bl).replace(/punct/g,Wa).getRegex(),QT=bt(/\\(punct)/,"gu").replace(/punct/g,Wa).getRegex(),JT=bt(/^<(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(),tw=bt(Sl).replace("(?:-->|$)","-->").getRegex(),ew=bt("^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",tw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ka=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,rw=bt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ka).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),yf=bt(/^!?\[(label)\]\[(ref)\]/).replace("label",ka).replace("ref",wl).getRegex(),Cf=bt(/^!?\[(ref)\](?:\[\])?/).replace("ref",wl).getRegex(),iw=bt("reflink|nolink(?!\\()","g").replace("reflink",yf).replace("nolink",Cf).getRegex(),lc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,vl={_backpedal:Ki,anyPunctuation:QT,autolink:JT,blockSkip:GT,br:df,code:zT,del:Ki,emStrongLDelim:jT,emStrongRDelimAst:VT,emStrongRDelimUnd:KT,escape:qT,link:rw,nolink:Cf,punctuation:HT,reflink:yf,reflinkSearch:iw,tag:ew,text:WT,url:Ki},sw={...vl,link:bt(/^!?\[(label)\]\((.*?)\)/).replace("label",ka).getRegex(),reflink:bt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ka).getRegex()},yn={...vl,emStrongRDelimAst:ZT,emStrongLDelim:XT,url:bt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",lc).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:bt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",lc).getRegex()},aw={...yn,br:bt(df).replace("{2,}","*").getRegex(),text:bt(yn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},$s={normal:_l,gfm:PT,pedantic:NT},$i={normal:vl,gfm:yn,breaks:aw,pedantic:sw},ow={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},hc=e=>ow[e];function Ee(e,t){if(t){if(te.escapeTest.test(e))return e.replace(te.escapeReplace,hc)}else if(te.escapeTestNoEncode.test(e))return e.replace(te.escapeReplaceNoEncode,hc);return e}function cc(e){try{e=encodeURI(e).replace(te.percentDecode,"%")}catch{return null}return e}function uc(e,t){var a;let r=e.replace(te.findPipe,(o,n,l)=>{let h=!1,c=n;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(te.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(te.slashPipe,"|");return i}function Oi(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 nw(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 dc(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 lw(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
162
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(`
163
- `)}var pa=class{constructor(t){xt(this,"options");xt(this,"rules");xt(this,"lexer");this.options=t||Br}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:Bi(i,`
164
- `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=ST(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=Bi(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:Bi(r[0],`
165
- `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Bi(r[0],`
164
+ `)}var Ta=class{constructor(t){St(this,"options");St(this,"rules");St(this,"lexer");this.options=t||Or}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:Oi(i,`
165
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=lw(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=Oi(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:Oi(r[0],`
166
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Oi(r[0],`
166
167
  `).split(`
167
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(`
168
169
  `),u=c.replace(this.rules.other.blockquoteSetextReplace,`
@@ -176,14 +177,14 @@ ${u}`:u;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
176
177
  `);continue}}return{type:"blockquote",raw:s,tokens:o,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let o=this.rules.other.listItemRegex(i),n=!1;for(;t;){let h=!1,c="",u="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;c=r[0],t=t.substring(c.length);let p=r[2].split(`
177
178
  `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(`
178
179
  `,1)[0],m=!p.trim(),g=0;if(this.options.pedantic?(g=2,u=p.trimStart()):m?g=r[1].length+1:(g=r[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,u=p.slice(g),g+=r[1].length),m&&this.rules.other.blankLine.test(d)&&(c+=d+`
179
- `,t=t.substring(d.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(g),k=this.rules.other.hrRegex(g),T=this.rules.other.fencesBeginRegex(g),w=this.rules.other.headingBeginRegex(g),B=this.rules.other.htmlBeginRegex(g);for(;t;){let $=t.split(`
180
- `,1)[0],v;if(d=$,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),v=d):v=d.replace(this.rules.other.tabCharGlobal," "),T.test(d)||w.test(d)||B.test(d)||b.test(d)||k.test(d))break;if(v.search(this.rules.other.nonSpaceChar)>=g||!d.trim())u+=`
181
- `+v.slice(g);else{if(m||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(p)||w.test(p)||k.test(p))break;u+=`
182
- `+d}!m&&!d.trim()&&(m=!0),c+=$+`
183
- `,t=t.substring($.length+1),p=v.slice(g)}}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=Yh(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(`
184
- `):[],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(Yh(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)===`
185
- `?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=Bi(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=wT(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)),Uh(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 Uh(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 m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}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}}}},Ce=class en{constructor(t){xt(this,"tokens");xt(this,"options");xt(this,"state");xt(this,"tokenizer");xt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Br,this.options.tokenizer=this.options.tokenizer||new pa,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:Ss.normal,inline:_i.normal};this.options.pedantic?(r.block=Ss.pedantic,r.inline=_i.pedantic):this.options.gfm&&(r.block=Ss.gfm,this.options.breaks?r.inline=_i.breaks:r.inline=_i.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ss,inline:_i}}static lex(t,r){return new en(r).lex(t)}static lexInline(t,r){return new en(r).inlineTokens(t)}lex(t){t=t.replace(Kt.carriageReturn,`
186
- `),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+=`
180
+ `,t=t.substring(d.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(g),k=this.rules.other.hrRegex(g),w=this.rules.other.fencesBeginRegex(g),S=this.rules.other.headingBeginRegex(g),B=this.rules.other.htmlBeginRegex(g);for(;t;){let M=t.split(`
181
+ `,1)[0],v;if(d=M,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),v=d):v=d.replace(this.rules.other.tabCharGlobal," "),w.test(d)||S.test(d)||B.test(d)||b.test(d)||k.test(d))break;if(v.search(this.rules.other.nonSpaceChar)>=g||!d.trim())u+=`
182
+ `+v.slice(g);else{if(m||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(p)||S.test(p)||k.test(p))break;u+=`
183
+ `+d}!m&&!d.trim()&&(m=!0),c+=M+`
184
+ `,t=t.substring(M.length+1),p=v.slice(g)}}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=uc(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
+ `):[],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(uc(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=Oi(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=nw(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)),dc(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 dc(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 m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}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}}}},ye=class Cn{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||Or,this.options.tokenizer=this.options.tokenizer||new Ta,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:te,block:$s.normal,inline:$i.normal};this.options.pedantic?(r.block=$s.pedantic,r.inline=$i.pedantic):this.options.gfm&&(r.block=$s.gfm,this.options.breaks?r.inline=$i.breaks:r.inline=$i.gfm),this.tokenizer.rules=r}static get rules(){return{block:$s,inline:$i}}static lex(t,r){return new Cn(r).lex(t)}static lexInline(t,r){return new Cn(r).inlineTokens(t)}lex(t){t=t.replace(te.carriageReturn,`
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(te.tabCharGlobal," ").replace(te.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+=`
187
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(`
188
189
  `)?"":`
189
190
  `)+n.raw,h.text+=`
@@ -196,16 +197,16 @@ ${u}`:u;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
196
197
  `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n),i=l.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
197
198
  `)?"":`
198
199
  `)+n.raw,h.text+=`
199
- `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,h,c,u,p;let i=t,s=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=s[2]?s[2].length:0,i=i.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let o=!1,n="";for(;t;){o||(n=""),o=!1;let d;if((u=(c=this.options.extensions)==null?void 0:c.inline)!=null&&u.some(g=>(d=g.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let g=r.at(-1);d.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,n)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let m=t;if((p=this.options.extensions)!=null&&p.startInline){let g=1/0,y=t.slice(1),C;this.options.extensions.startInline.forEach(b=>{C=b.call({lexer:this},y),typeof C=="number"&&C>=0&&(g=Math.min(g,C))}),g<1/0&&g>=0&&(m=t.substring(0,g+1))}if(d=this.tokenizer.inlineText(m)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(n=d.raw.slice(-1)),o=!0;let g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(t){let g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},fa=class{constructor(t){xt(this,"options");xt(this,"parser");this.options=t||Br}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let s=(o=(r||"").match(Kt.notSpaceStart))==null?void 0:o[0],a=t.replace(Kt.endingNewline,"")+`
200
- `;return s?'<pre><code class="language-'+Ae(s)+'">'+(i?a:Ae(a,!0))+`</code></pre>
201
- `:"<pre><code>"+(i?a:Ae(a,!0))+`</code></pre>
200
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,h,c,u,p;let i=t,s=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=s[2]?s[2].length:0,i=i.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let o=!1,n="";for(;t;){o||(n=""),o=!1;let d;if((u=(c=this.options.extensions)==null?void 0:c.inline)!=null&&u.some(g=>(d=g.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let g=r.at(-1);d.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,n)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let m=t;if((p=this.options.extensions)!=null&&p.startInline){let g=1/0,y=t.slice(1),C;this.options.extensions.startInline.forEach(b=>{C=b.call({lexer:this},y),typeof C=="number"&&C>=0&&(g=Math.min(g,C))}),g<1/0&&g>=0&&(m=t.substring(0,g+1))}if(d=this.tokenizer.inlineText(m)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(n=d.raw.slice(-1)),o=!0;let g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(t){let g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},wa=class{constructor(t){St(this,"options");St(this,"parser");this.options=t||Or}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let s=(o=(r||"").match(te.notSpaceStart))==null?void 0:o[0],a=t.replace(te.endingNewline,"")+`
201
+ `;return s?'<pre><code class="language-'+Ee(s)+'">'+(i?a:Ee(a,!0))+`</code></pre>
202
+ `:"<pre><code>"+(i?a:Ee(a,!0))+`</code></pre>
202
203
  `}blockquote({tokens:t}){return`<blockquote>
203
204
  ${this.parser.parse(t)}</blockquote>
204
205
  `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
205
206
  `}hr(t){return`<hr>
206
207
  `}list(t){let r=t.ordered,i=t.start,s="";for(let n=0;n<t.items.length;n++){let l=t.items[n];s+=this.listitem(l)}let a=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+a+o+`>
207
208
  `+s+"</"+a+`>
208
- `}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+Ae(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
209
+ `}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+Ee(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
209
210
  `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
210
211
  `}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let s="";for(let a=0;a<t.rows.length;a++){let o=t.rows[a];i="";for(let n=0;n<o.length;n++)i+=this.tablecell(o[n]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
211
212
  <thead>
@@ -214,28 +215,28 @@ ${this.parser.parse(t)}</blockquote>
214
215
  `}tablerow({text:t}){return`<tr>
215
216
  ${t}</tr>
216
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}>
217
- `}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>${Ae(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=Hh(t);if(a===null)return s;t=a;let o='<a href="'+t+'"';return r&&(o+=' title="'+Ae(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=Hh(t);if(a===null)return Ae(i);t=a;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${Ae(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Ae(t.text)}},dl=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""}},xe=class rn{constructor(t){xt(this,"options");xt(this,"renderer");xt(this,"textRenderer");this.options=t||Br,this.options.renderer=this.options.renderer||new fa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new dl}static parse(t,r){return new rn(r).parse(t)}static parseInline(t,r){return new rn(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+=`
218
- `+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}},As,Di=(As=class{constructor(t){xt(this,"options");xt(this,"block");this.options=t||Br}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Ce.lex:Ce.lexInline}provideParser(){return this.block?xe.parse:xe.parseInline}},xt(As,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),xt(As,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),As),_T=class{constructor(...t){xt(this,"defaults",sl());xt(this,"options",this.setOptions);xt(this,"parse",this.parseMarkdown(!0));xt(this,"parseInline",this.parseMarkdown(!1));xt(this,"Parser",xe);xt(this,"Renderer",fa);xt(this,"TextRenderer",dl);xt(this,"Lexer",Ce);xt(this,"Tokenizer",pa);xt(this,"Hooks",Di);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 fa(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 pa(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 Di;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];Di.passThroughHooks.has(o)?a[n]=c=>{if(this.defaults.async&&Di.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 Ce.lex(t,r??this.defaults)}parser(t,r){return xe.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?Ce.lex:Ce.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?xe.parse:xe.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?Ce.lex:Ce.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?xe.parse:xe.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+=`
219
- Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Ae(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},Sr=new _T;function yt(e,t){return Sr.parse(e,t)}yt.options=yt.setOptions=function(e){return Sr.setOptions(e),yt.defaults=Sr.defaults,Wp(yt.defaults),yt};yt.getDefaults=sl;yt.defaults=Br;yt.use=function(...e){return Sr.use(...e),yt.defaults=Sr.defaults,Wp(yt.defaults),yt};yt.walkTokens=function(e,t){return Sr.walkTokens(e,t)};yt.parseInline=Sr.parseInline;yt.Parser=xe;yt.parser=xe.parse;yt.Renderer=fa;yt.TextRenderer=dl;yt.Lexer=Ce;yt.lexer=Ce.lex;yt.Tokenizer=pa;yt.Hooks=Di;yt.parse=yt;yt.options;yt.setOptions;yt.use;yt.walkTokens;yt.parseInline;xe.parse;Ce.lex;function Qp(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(`
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>${Ee(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=cc(t);if(a===null)return s;t=a;let o='<a href="'+t+'"';return r&&(o+=' title="'+Ee(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=cc(t);if(a===null)return Ee(i);t=a;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${Ee(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Ee(t.text)}},Ll=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""}},Ce=class xn{constructor(t){St(this,"options");St(this,"renderer");St(this,"textRenderer");this.options=t||Or,this.options.renderer=this.options.renderer||new wa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ll}static parse(t,r){return new xn(r).parse(t)}static parseInline(t,r){return new xn(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}},Ns,Yi=(Ns=class{constructor(t){St(this,"options");St(this,"block");this.options=t||Or}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?ye.lex:ye.lexInline}provideParser(){return this.block?Ce.parse:Ce.parseInline}},St(Ns,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),St(Ns,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ns),hw=class{constructor(...t){St(this,"defaults",bl());St(this,"options",this.setOptions);St(this,"parse",this.parseMarkdown(!0));St(this,"parseInline",this.parseMarkdown(!1));St(this,"Parser",Ce);St(this,"Renderer",wa);St(this,"TextRenderer",Ll);St(this,"Lexer",ye);St(this,"Tokenizer",Ta);St(this,"Hooks",Yi);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 wa(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 Ta(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 Yi;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];Yi.passThroughHooks.has(o)?a[n]=c=>{if(this.defaults.async&&Yi.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 ye.lex(t,r??this.defaults)}parser(t,r){return Ce.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?ye.lex:ye.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?Ce.parse:Ce.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?ye.lex:ye.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?Ce.parse:Ce.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>"+Ee(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},Mr=new hw;function Tt(e,t){return Mr.parse(e,t)}Tt.options=Tt.setOptions=function(e){return Mr.setOptions(e),Tt.defaults=Mr.defaults,lf(Tt.defaults),Tt};Tt.getDefaults=bl;Tt.defaults=Or;Tt.use=function(...e){return Mr.use(...e),Tt.defaults=Mr.defaults,lf(Tt.defaults),Tt};Tt.walkTokens=function(e,t){return Mr.walkTokens(e,t)};Tt.parseInline=Mr.parseInline;Tt.Parser=Ce;Tt.parser=Ce.parse;Tt.Renderer=wa;Tt.TextRenderer=Ll;Tt.Lexer=ye;Tt.lexer=ye.lex;Tt.Tokenizer=Ta;Tt.Hooks=Yi;Tt.parse=Tt;Tt.options;Tt.setOptions;Tt.use;Tt.walkTokens;Tt.parseInline;Ce.parse;ye.lex;function xf(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(`
220
221
  [ ]{`+Math.min.apply(Math,s)+"}","g");i=i.map(function(n){return n.replace(a,`
221
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(`
222
223
  `)&&(u=String(n).split(`
223
224
  `).map(function(p,d){return d===0?p:""+c+p}).join(`
224
- `)),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},sn=new Map,Jp=new Map,vT=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(q.debug("Registering icon pack:",t.name),"loader"in t)Jp.set(t.name,t.loader);else if("icons"in t)sn.set(t.name,t.icons);else throw q.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),tf=f(async(e,t)=>{const r=L2(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=sn.get(i);if(!s){const o=Jp.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await o(),prefix:i},sn.set(i,s)}catch(n){throw q.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=E2(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),LT=f(async e=>{try{return await tf(e),!0}catch{return!1}},"isIconAvailable"),cs=f(async(e,t,r)=>{let i;try{i=await tf(e,t==null?void 0:t.fallbackPrefix)}catch(o){q.error(o),i=BT}const s=P2(i,t),a=z2(W2(s.body),{...s.attributes,...r});return Se(a,St())},"getIconSVG");function ef(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
225
+ `)),o+=u+i[l+1]}),o}var cw={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},bn=new Map,bf=new Map,uw=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)bf.set(t.name,t.loader);else if("icons"in t)bn.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"),kf=f(async(e,t)=>{const r=dT(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=bn.get(i);if(!s){const o=bf.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await o(),prefix:i},bn.set(i,s)}catch(n){throw z.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=gT(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),dw=f(async e=>{try{return await kf(e),!0}catch{return!1}},"isIconAvailable"),Cs=f(async(e,t,r)=>{let i;try{i=await kf(e,t==null?void 0:t.fallbackPrefix)}catch(o){z.error(o),i=cw}const s=TT(i,t),a=BT(_T(s.body),{...s.attributes,...r});return we(a,Bt())},"getIconSVG");function Tf(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
225
226
  `).replace(/\n{2,}/g,`
226
- `);return Qp(i)}f(ef,"preprocessMarkdown");function rf(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(rf,"nonMarkdownToLines");function sf(e,t={}){const r=ef(e,t),i=yt.lexer(r),s=[[]];let a=0;function o(n,l="normal"){n.type==="text"?n.text.split(`
227
- `).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(sf,"markdownToLines");function af(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}f(af,"nonMarkdownToHTML");function of(e,{markdownAutoWrap:t}={}){const r=yt.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:(q.warn(`Unsupported markdown: ${s.type}`),s.raw)}return f(i,"output"),r.map(i).join("")}f(of,"markdownToHTML");function nf(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}f(nf,"splitTextToChars");function lf(e,t){const r=nf(t.content);return pl(e,[],r,t.type)}f(lf,"splitWordToFitWidth");function pl(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}])?pl(e,o,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}f(pl,"splitWordToFitWidthRecursion");function hf(e,t){if(e.some(({content:r})=>r.includes(`
228
- `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ga(e,t)}f(hf,"splitLineToFitWidth");function ga(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 ga(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[n,l]=lf(t,a);r.push([n]),l.content&&e.unshift(l)}return ga(e,t,r)}f(ga,"splitLineToFitWidthRecursion");function an(e,t){t&&e.attr("style",t)}f(an,"applyStyle");var Gh=16384;async function cf(e,t,r,i,s=!1,a=St()){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,Gh)}px`),o.attr("height",`${Math.min(10*r,Gh)}px`);const n=o.append("xhtml:div"),l=Ui(t.label)?await Hc(t.label.replace(ss.lineBreakRegex,`
229
- `),a):Se(t.label,a),h=t.isNode?"nodeLabel":"edgeLabel",c=n.append("span");c.html(l),an(c,t.labelStyle),c.attr("class",`${h} ${i}`),an(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(cf,"addHtmlSpan");function Oa(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(Oa,"createTspan");function uf(e,t,r){const i=e.append("text"),s=Oa(i,1,t);Ia(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}f(uf,"computeWidthOfText");function FT(e,t,r){var o;const i=e.append("text"),s=Oa(i,1,t);Ia(s,[{content:r,type:"normal"}]);const a=(o=s.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}f(FT,"computeDimensionOfText");function df(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=>uf(o,1.1,d)<=e,"checkWidth"),p=u(c)?[c]:hf(c,u);for(const d of p){const m=Oa(l,h,1.1,s);Ia(m,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(df,"createFormattedText");function on(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(on,"decodeHTMLEntities");function Ia(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(on(r.content)):s.text(" "+on(r.content))})}f(Ia,"updateTextContentAndStyles");async function pf(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,o)=>(r.push((async()=>{const n=`${a}:${o}`;return await LT(n)?await cs(n,void 0,{class:"label-icon"}):`<i class='${Se(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}f(pf,"replaceIconSubstring");var Ve=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(q.debug("XYZ createText",t,r,i,s,a,n,"addSvgBackground: ",h),a){const u=o?of(t,c):af(t),p=await pf(wr(u),c),d=t.replace(/\\\\/g,"\\"),m={isNode:n,label:Ui(t)?d:p,labelStyle:r.replace("fill:","color:")};return await cf(e,m,l,s,h,c)}else{const u=wr(t.replace(/<br\s*\/?>/g,"<br/>")),p=o?sf(u.replace("<br>","<br/>"),c):rf(u),d=df(l,e,p,t?h:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ct(d).attr("style",m)}else{const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ct(d).select("rect").attr("style",m.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ct(d).select("text").attr("style",g)}return i?ct(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ct(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function ho(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 AT(e,t){return e[0]===t[0]&&e[1]===t[1]}function ET(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)ho(h,n,s);const l=(function(h,c,u){const p=[];for(const b of h){const k=[...b];AT(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 m=[];for(const b of p)for(let k=0;k<b.length-1;k++){const T=b[k],w=b[k+1];if(T[1]!==w[1]){const B=Math.min(T[1],w[1]);m.push({ymin:B,ymax:Math.max(T[1],w[1]),x:B===T[1]?T[0]:w[0],islope:(w[0]-T[0])/(w[1]-T[1])})}}if(m.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))),!m.length)return d;let g=[],y=m[0].ymin,C=0;for(;g.length||m.length;){if(m.length){let b=-1;for(let k=0;k<m.length&&!(m[k].ymin>y);k++)b=k;m.splice(0,b+1).forEach((k=>{g.push({s:y,edge:k})}))}if(g=g.filter((b=>!(b.edge.ymax<=y))),g.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)&&g.length>1)for(let b=0;b<g.length;b+=2){const k=b+1;if(k>=g.length)break;const T=g[b].edge,w=g[k].edge;d.push([[Math.round(T.x),y],[Math.round(w.x),y]])}y+=u,g.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)ho(h,n,-s);(function(h,c,u){const p=[];h.forEach((d=>p.push(...d))),ho(p,c,u)})(l,n,-s)}return l}function us(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),ET(e,s,i,a||1)}class fl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=us(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 Da(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 MT extends fl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=us(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)Da([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 $T extends fl{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 OT{constructor(t){this.helper=t}fillPolygons(t,r){const i=us(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=Da(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 m=0;m<c;m++){const g=d+u+m*s,y=p-o+2*Math.random()*o,C=g-o+2*Math.random()*o,b=this.helper.ellipse(y,C,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class IT{constructor(t){this.helper=t}fillPolygons(t,r){const i=us(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=Da(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 m=d*(i+s),g=m+i,y=[c[0]+m*Math.cos(p)+h*Math.cos(p),c[1]+m*Math.sin(p)+h*Math.sin(p)],C=[c[0]+g*Math.cos(p)+h*Math.cos(p),c[1]+g*Math.sin(p)+h*Math.sin(p)];a.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],r))}})),a}}class DT{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=us(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=Da(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,m=Math.sqrt(2*Math.pow(r,2)),g=[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=[g[0]+m*Math.cos(c+Math.PI/4),g[1]+m*Math.sin(c+Math.PI/4)];s.push(...this.helper.doubleLineOps(g[0],g[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],y[0],y[1],i))}})),s}}const ee={};class RT{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const PT=0,co=1,Xh=2,_s={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 uo(e,t){return e.type===t}function gl(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:PT,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:co,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:Xh,text:""},n})(e);let i="BOD",s=0,a=r[s];for(;!uo(a,Xh);){let o=0;const n=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return gl("M0,0"+e);s++,o=_s[a.text],i=a.text}else uo(a,co)?o=_s[i]:(s++,o=_s[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(!uo(h,co))throw new Error("Param not a number: "+i+","+h.text);n[n.length]=+h.text}if(typeof _s[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 ff(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 gf(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,m=0;r==="Q"||r==="T"?(d=i+(i-n),m=s+(s-l)):(d=i,m=s);const g=i+2*(d-i)/3,y=s+2*(m-s)/3,C=u+2*(d-u)/3,b=p+2*(m-p)/3;t.push({key:"C",data:[g,y,C,b,u,p]}),n=d,l=m,i=u,s=p;break}case"Q":{const[u,p,d,m]=c,g=i+2*(u-i)/3,y=s+2*(p-s)/3,C=d+2*(u-d)/3,b=m+2*(p-m)/3;t.push({key:"C",data:[g,y,C,b,d,m]}),n=u,l=p,i=d,s=m;break}case"A":{const u=Math.abs(c[0]),p=Math.abs(c[1]),d=c[2],m=c[3],g=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)&&(mf(i,s,y,C,u,p,d,m,g).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 vi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function mf(e,t,r,i,s,a,o,n,l,h){const c=(u=o,Math.PI*u/180);var u;let p=[],d=0,m=0,g=0,y=0;if(h)[d,m,g,y]=h;else{[e,t]=vi(e,t,-c),[r,i]=vi(r,i,-c);const z=(e-r)/2,I=(t-i)/2;let E=z*z/(s*s)+I*I/(a*a);E>1&&(E=Math.sqrt(E),s*=E,a*=E);const F=s*s,O=a*a,A=F*O-F*I*I-O*z*z,S=F*I*I+O*z*z,N=(n===l?-1:1)*Math.sqrt(Math.abs(A/S));g=N*s*I/a+(e+r)/2,y=N*-a*z/s+(t+i)/2,d=Math.asin(parseFloat(((t-y)/a).toFixed(9))),m=Math.asin(parseFloat(((i-y)/a).toFixed(9))),e<g&&(d=Math.PI-d),r<g&&(m=Math.PI-m),d<0&&(d=2*Math.PI+d),m<0&&(m=2*Math.PI+m),l&&d>m&&(d-=2*Math.PI),!l&&m>d&&(m-=2*Math.PI)}let C=m-d;if(Math.abs(C)>120*Math.PI/180){const z=m,I=r,E=i;m=l&&m>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,p=mf(r=g+s*Math.cos(m),i=y+a*Math.sin(m),I,E,s,a,o,0,l,[m,z,g,y])}C=m-d;const b=Math.cos(d),k=Math.sin(d),T=Math.cos(m),w=Math.sin(m),B=Math.tan(C/4),$=4/3*s*B,v=4/3*a*B,W=[e,t],P=[e+$*k,t-v*b],M=[r+$*w,i-v*T],Y=[r,i];if(P[0]=2*W[0]-P[0],P[1]=2*W[1]-P[1],h)return[P,M,Y].concat(p);{p=[P,M,Y].concat(p);const z=[];for(let I=0;I<p.length;I+=3){const E=vi(p[I][0],p[I][1],c),F=vi(p[I+1][0],p[I+1][1],c),O=vi(p[I+2][0],p[I+2][1],c);z.push([E[0],E[1],F[0],F[1],O[0],O[1]])}return z}}const NT={randOffset:function(e,t){return at(e,t)},randOffsetWithRange:function(e,t,r){return ma(e,t,r)},ellipse:function(e,t,r,i,s){const a=Cf(r,i,s);return nn(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return ar(e,t,r,i,s,!0)}};function yf(e,t,r,i,s){return{type:"path",ops:ar(e,t,r,i,s)}}function Ws(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...ar(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...ar(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?yf(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function qT(e,t,r,i,s){return(function(a,o){return Ws(a,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function jh(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Bs(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Bs(r[0],1.5*(1+.22*t.roughness),Kh(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const n=Bs(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Bs(o,1.5*(1+.22*t.roughness),Kh(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 Cf(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+=at(o*l,r),n+=at(n*l,r),{increment:a,rx:o,ry:n}}function nn(e,t,r,i){const[s,a]=Qh(i.increment,e,t,i.rx,i.ry,1,i.increment*ma(.1,ma(.4,1,r),r),r);let o=ya(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Qh(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=ya(n,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function Vh(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+=at(.01*u,l),p+=at(.01*p,l);let d=s,m=a;for(;d<0;)d+=2*Math.PI,m+=2*Math.PI;m-d>2*Math.PI&&(d=0,m=2*Math.PI);const g=2*Math.PI/l.curveStepCount,y=Math.min(g/2,(m-d)/2),C=Jh(y,h,c,u,p,d,m,1,l);if(!l.disableMultiStroke){const b=Jh(y,h,c,u,p,d,m,1.5,l);C.push(...b)}return o&&(n?C.push(...ar(h,c,h+u*Math.cos(d),c+p*Math.sin(d),l),...ar(h,c,h+u*Math.cos(m),c+p*Math.sin(m),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 Zh(e,t){const r=gf(ff(gl(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(...ar(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(...WT(l,h,c,u,p,d,a,t)),a=[p,d];break}case"Z":i.push(...ar(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function po(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]+at(s,t),i[0][1]+at(s,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+at(s,t),i[o][1]+at(s,t)]})}}return{type:"fillPath",ops:r}}function $r(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!ee[s])switch(s){case"zigzag":ee[s]||(ee[s]=new MT(i));break;case"cross-hatch":ee[s]||(ee[s]=new $T(i));break;case"dots":ee[s]||(ee[s]=new OT(i));break;case"dashed":ee[s]||(ee[s]=new IT(i));break;case"zigzag-line":ee[s]||(ee[s]=new DT(i));break;default:s="hachure",ee[s]||(ee[s]=new fl(i))}return ee[s]})(t,NT).fillPolygons(e,t)}function Kh(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function xf(e){return e.randomizer||(e.randomizer=new RT(e.seed||0)),e.randomizer.next()}function ma(e,t,r,i=1){return r.roughness*i*(xf(r)*(t-e)+e)}function at(e,t,r=1){return ma(-e,e,t,r)}function ar(e,t,r,i,s,a=!1){const o=a?s.disableMultiStrokeFill:s.disableMultiStroke,n=ln(e,t,r,i,s,!0,!1);if(o)return n;const l=ln(e,t,r,i,s,!0,!0);return n.concat(l)}function ln(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*xf(s);let d=s.bowing*s.maxRandomnessOffset*(i-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-r)/200;d=at(d,s,h),m=at(m,s,h);const g=[],y=()=>at(u,s,h),C=()=>at(c,s,h),b=s.preserveVertices;return o?g.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):g.push({op:"move",data:[e+(b?0:at(c,s,h)),t+(b?0:at(c,s,h))]}),o?g.push({op:"bcurveTo",data:[d+e+(r-e)*p+y(),m+t+(i-t)*p+y(),d+e+2*(r-e)*p+y(),m+t+2*(i-t)*p+y(),r+(b?0:y()),i+(b?0:y())]}):g.push({op:"bcurveTo",data:[d+e+(r-e)*p+C(),m+t+(i-t)*p+C(),d+e+2*(r-e)*p+C(),m+t+2*(i-t)*p+C(),r+(b?0:C()),i+(b?0:C())]}),g}function Bs(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+at(t,r),e[0][1]+at(t,r)]),i.push([e[0][0]+at(t,r),e[0][1]+at(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+at(t,r),e[s][1]+at(t,r)]),s===e.length-1&&i.push([e[s][0]+at(t,r),e[s][1]+at(t,r)]);return ya(i,null,r)}function ya(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(...ln(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function Qh(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=at(.5,n)-Math.PI/2;h.push([at(a,n)+t+.9*i*Math.cos(c-e),at(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=[at(a,n)+t+i*Math.cos(p),at(a,n)+r+s*Math.sin(p)];l.push(d),h.push(d)}h.push([at(a,n)+t+i*Math.cos(c+2*Math.PI+.5*o),at(a,n)+r+s*Math.sin(c+2*Math.PI+.5*o)]),h.push([at(a,n)+t+.98*i*Math.cos(c+o),at(a,n)+r+.98*s*Math.sin(c+o)]),h.push([at(a,n)+t+.9*i*Math.cos(c+.5*o),at(a,n)+r+.9*s*Math.sin(c+.5*o)])}return[h,l]}function Jh(e,t,r,i,s,a,o,n,l){const h=a+at(.1,l),c=[];c.push([at(n,l)+t+.9*i*Math.cos(h-e),at(n,l)+r+.9*s*Math.sin(h-e)]);for(let u=h;u<=o;u+=e)c.push([at(n,l)+t+i*Math.cos(u),at(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)]),ya(c,null,l)}function WT(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:at(h[0],n)),o[1]+(p?0:at(h[0],n))]}),c=p?[s,a]:[s+at(h[d],n),a+at(h[d],n)],l.push({op:"bcurveTo",data:[e+at(h[d],n),t+at(h[d],n),r+at(h[d],n),i+at(h[d],n),c[0],c[1]]});return l}function Li(e){return[...e]}function tc(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(Li(e[0]),Li(e[1]),Li(e[2]),Li(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(Li(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 zs(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function zT(e,t,r){const i=zs(t,r);if(i===0)return zs(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)),zs(e,dr(t,r,s))}function dr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function hn(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 m=3*c[1]-2*h[1]-p[1];m*=m;let g=3*u[0]-2*p[0]-h[0];g*=g;let y=3*u[1]-2*p[1]-h[1];return y*=y,d<g&&(d=g),m<y&&(m=y),d+m})(e,t)<r){const n=e[t+0];s.length?(a=s[s.length-1],o=n,Math.sqrt(zs(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=dr(l,h,.5),d=dr(h,c,.5),m=dr(c,u,.5),g=dr(p,d,.5),y=dr(d,m,.5),C=dr(g,y,.5);hn([l,p,g,C],0,r,s),hn([C,y,m,u],0,r,s)}var a,o;return s}function HT(e,t){return Ca(e,0,e.length,t)}function Ca(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=zT(e[c],o,n);u>l&&(l=u,h=c)}return Math.sqrt(l)>i?(Ca(e,t,h+1,i,a),Ca(e,h,r,i,a)):(a.length||a.push(o),a.push(n)),a}function fo(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)hn(e,3*a,t,i);return r&&r>0?Ca(i,0,i.length,r):i}const le="none";class xa{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",[yf(t,r,i,s,o)],o)}rectangle(t,r,i,s,a){const o=this._o(a),n=[],l=qT(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(po([h],o)):n.push($r([h],o))}return o.stroke!==le&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,s,a){const o=this._o(a),n=[],l=Cf(i,s,o),h=nn(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const c=nn(t,r,o,l).opset;c.type="fillPath",n.push(c)}else n.push($r([h.estimatedPoints],o));return o.stroke!==le&&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",[Ws(t,!1,i)],i)}arc(t,r,i,s,a,o,n=!1,l){const h=this._o(l),c=[],u=Vh(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=Vh(t,r,i,s,a,o,!0,!1,p);d.type="fillPath",c.push(d)}else c.push((function(p,d,m,g,y,C,b){const k=p,T=d;let w=Math.abs(m/2),B=Math.abs(g/2);w+=at(.01*w,b),B+=at(.01*B,b);let $=y,v=C;for(;$<0;)$+=2*Math.PI,v+=2*Math.PI;v-$>2*Math.PI&&($=0,v=2*Math.PI);const W=(v-$)/b.curveStepCount,P=[];for(let M=$;M<=v;M+=W)P.push([k+w*Math.cos(M),T+B*Math.sin(M)]);return P.push([k+w*Math.cos(v),T+B*Math.sin(v)]),P.push([k,T]),$r([P],b)})(t,r,i,s,a,o,h));return h.stroke!==le&&c.push(u),this._d("arc",c,h)}curve(t,r){const i=this._o(r),s=[],a=jh(t,i);if(i.fill&&i.fill!==le)if(i.fillStyle==="solid"){const o=jh(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(...fo(tc([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):o.push(...fo(tc(h),10,(1+i.roughness)/2))}o.length&&s.push($r([o],i))}return i.stroke!==le&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=Ws(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(po([t],i)):s.push($r([t],i))),i.stroke!==le&&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!==le,o=i.stroke!==le,n=!!(i.simplification&&i.simplification<1),l=(function(c,u,p){const d=gf(ff(gl(c))),m=[];let g=[],y=[0,0],C=[];const b=()=>{C.length>=4&&g.push(...fo(C,u)),C=[]},k=()=>{b(),g.length&&(m.push(g),g=[])};for(const{key:w,data:B}of d)switch(w){case"M":k(),y=[B[0],B[1]],g.push(y);break;case"L":b(),g.push([B[0],B[1]]);break;case"C":if(!C.length){const $=g.length?g[g.length-1]:y;C.push([$[0],$[1]])}C.push([B[0],B[1]]),C.push([B[2],B[3]]),C.push([B[4],B[5]]);break;case"Z":b(),g.push([y[0],y[1]])}if(k(),!p)return m;const T=[];for(const w of m){const B=HT(w,p);B.length&&T.push(B)}return T})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),h=Zh(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const c=Zh(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(po(l,i));else s.push($r(l,i));return o&&(n?l.forEach((c=>{s.push(Ws(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:le};break;case"fillPath":o={d:this.opsToPath(a),stroke:le,strokeWidth:0,fill:i.fill||le};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||le,strokeWidth:i,fill:le}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class YT{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new xa(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 vs="http://www.w3.org/2000/svg";class UT{constructor(t,r){this.svg=t,this.gen=new xa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(vs,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(vs,"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(vs,"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(vs,"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 G={canvas:(e,t)=>new YT(e,t),svg:(e,t)=>new UT(e,t),generator:e=>new xa(e),newSeed:()=>xa.newSeed()},st=f(async(e,t,r)=>{var d,m;let i;const s=t.useHtmlLabels||je((d=gt())==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",Pt(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,h=t.labelType==="markdown",c=await Ve(o,Se(wr(n),gt()),{useHtmlLabels:s,width:t.width||((m=gt().flowchart)==null?void 0:m.wrappingWidth),classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:h},gt());let u=c.getBBox();const p=((t==null?void 0:t.padding)??0)/2;if(s){const g=c.children[0],y=ct(c);await Pp(g,n),u=g.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"),go=f(async(e,t,r)=>{var l,h;const i=r.useHtmlLabels??Jt(gt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Ve(s,Se(wr(t),gt()),{useHtmlLabels:i,width:r.width||((h=(l=gt())==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(gt())){const c=a.children[0],u=ct(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"),rt=f((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function pt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}f(pt,"createPathFromPoints");function or(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 m=d/50,g=e+m*l,y=p+s*Math.sin(u*(g-e));o.push({x:g,y})}return o}f(or,"generateFullSineWavePoints");function ts(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),m=t+r*Math.sin(p);o.push({x:-d,y:-m})}return o}f(ts,"generateCirclePoints");function cn(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(cn,"mergePaths");var GT=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"),fi=GT,XT=f(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const o=gt(),n=Jt(o);return await Ve(e,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},o)},"createLabel"),Je=XT,nr=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"),bf=f(async(e,t)=>{q.info("Creating subgraph rect for ",t.id,t);const r=gt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=V(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 m;t.labelType==="markdown"?m=await Ve(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):m=await Je(d,t.label,t.labelStyle||"",!1,!0);let g=m.getBBox();if(Jt(r)){const $=m.children[0],v=ct(m);g=$.getBoundingClientRect(),v.attr("width",g.width),v.attr("height",g.height)}const y=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.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;q.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const $=G.svg(u),v=X(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:s}),W=$.path(nr(b,k,y,C,0),v);T=u.insert(()=>(q.debug("Rough node insert CXC",W),W),":first-child"),T.select("path:nth-child(2)").attr("style",h.join(";")),T.select("path").attr("style",c.join(";").replace("fill","stroke"))}else T=u.insert("rect",":first-child"),T.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}=il(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+w})`),n){const $=d.select("span");$&&$.attr("style",n)}const B=T.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=g.height-t.padding/2,t.intersect=function($){return fi(t,$)},{cluster:u,labelBBox:g}},"rect"),jT=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 fi(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),VT=f(async(e,t)=>{const r=gt(),{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 Je(u,t.label,t.labelStyle,void 0,!0);let m=d.getBBox();if(Jt(r)){const W=d.children[0],P=ct(d);m=W.getBoundingClientRect(),P.attr("width",m.width),P.attr("height",m.height)}const g=0*t.padding,y=g/2,C=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+g;t.width<=m.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+g,k=t.height+g-m.height-6,T=t.x-C/2,w=t.y-b/2;t.width=C;const B=t.y-t.height/2-y+m.height+2;let $;if(t.look==="handDrawn"){const W=t.cssClasses.includes("statediagram-cluster-alt"),P=G.svg(h),M=t.rx||t.ry?P.path(nr(T,w,C,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):P.rectangle(T,w,C,b,{seed:s});$=h.insert(()=>M,":first-child");const Y=P.rectangle(T,B,C,k,{fill:W?a:o,fillStyle:W?"hachure":"solid",stroke:l,seed:s});$=h.insert(()=>M,":first-child"),p=h.insert(()=>Y)}else $=c.insert("rect",":first-child"),$.attr("class","outer").attr("x",T).attr("y",w).attr("width",C).attr("height",b).attr("data-look",t.look),p.attr("class","inner").attr("x",T).attr("y",B).attr("width",C).attr("height",k);u.attr("transform",`translate(${t.x-m.width/2}, ${w+1-(Jt(r)?0:3)})`);const v=$.node().getBBox();return t.height=v.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(W){return fi(t,W)},{cluster:h,labelBBox:m}},"roundedWithTitle"),ZT=f(async(e,t)=>{q.info("Creating subgraph rect for ",t.id,t);const r=gt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=V(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 "),m=await Ve(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let g=m.getBBox();if(Jt(r)){const $=m.children[0],v=ct(m);g=$.getBoundingClientRect(),v.attr("width",g.width),v.attr("height",g.height)}const y=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.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;q.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const $=G.svg(u),v=X(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:s}),W=$.path(nr(b,k,y,C,t.rx),v);T=u.insert(()=>(q.debug("Rough node insert CXC",W),W),":first-child"),T.select("path:nth-child(2)").attr("style",h.join(";")),T.select("path").attr("style",c.join(";").replace("fill","stroke"))}else T=u.insert("rect",":first-child"),T.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}=il(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+w})`),n){const $=d.select("span");$&&$.attr("style",n)}const B=T.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=g.height-t.padding/2,t.intersect=function($){return fi(t,$)},{cluster:u,labelBBox:g}},"kanbanSection"),KT=f((e,t)=>{const r=gt(),{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=G.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 g="outer";t.look,g="divider",d.attr("class",g).attr("x",u).attr("y",p).attr("width",h).attr("height",c).attr("data-look",t.look)}const m=d.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(g){return fi(t,g)},{cluster:o,labelBBox:{}}},"divider"),QT=bf,JT={rect:bf,squareRect:QT,roundedWithTitle:VT,noteGroup:jT,divider:KT,kanbanSection:ZT},kf=new Map,tw=f(async(e,t)=>{const r=t.shape||"rect",i=await JT[r](e,t);return kf.set(t.id,i),i},"insertCluster"),Xv=f(()=>{kf=new Map},"clear");function Tf(e,t){return e.intersect(t)}f(Tf,"intersectNode");var ew=Tf;function wf(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(wf,"intersectEllipse");var Sf=wf;function _f(e,t,r){return Sf(e,t,t,r)}f(_f,"intersectCircle");var rw=_f;function Bf(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&&un(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,m=c*t.x+u*t.y+p;if(Math.abs(d)<h&&Math.abs(m)<h&&un(d,m))return;const g=s*u-c*a;if(g===0)return;const y=Math.abs(g/2);let C=a*p-u*o;const b=C<0?(C-y)/g:(C+y)/g;C=c*o-s*p;const k=C<0?(C-y)/g:(C+y)/g;return{x:b,y:k}}}f(Bf,"intersectLine");function un(e,t){return e*t>0}f(un,"sameSign");var iw=Bf;function vf(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=iw(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,m=Math.sqrt(p*p+d*d),g=u.x-r.x,y=u.y-r.y,C=Math.sqrt(g*g+y*y);return m<C?-1:m===C?0:1}),a[0]):e}f(vf,"intersectPolygon");var sw=vf,U={node:ew,circle:rw,ellipse:Sf,polygon:sw,rect:fi};function Lf(e,t){const{labelStyles:r}=V(t);t.labelStyle=r;const i=rt(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=G.svg(a),h=X(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",Pt(n)),K(t,u),t.intersect=function(p){return q.info("Circle intersect",t,o,p),U.circle(t,o,p)},a}f(Lf,"anchor");function dn(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,m=p/a,g=Math.sqrt(d**2+m**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-g**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 B=[];for(let $=0;$<20;$++){const v=$/19,W=k+v*w,P=C+s*Math.cos(W),M=b+a*Math.sin(W);B.push({x:P,y:M})}return B}f(dn,"generateArcPoints");function Ff(e,t,r){const[i,s]=[t,r].sort((a,o)=>o-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}f(Ff,"calculateArcSagitta");async function Af(e,t){const{labelStyles:r,nodeStyles:i}=V(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 st(e,t,rt(t)),u=n(t!=null&&t.height?t==null?void 0:t.height:c.height),[p,d]=l(u),m=Ff(u,p,d),y=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+m-m,C=u,{cssStyles:b}=t,k=[{x:y/2,y:-C/2},{x:-y/2,y:-C/2},...dn(-y/2,-C/2,-y/2,C/2,p,d,!1),{x:y/2,y:C/2},...dn(y/2,C/2,y/2,-C/2,p,d,!0)],T=G.svg(h),w=X(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const B=pt(k),$=T.path(B,w),v=h.insert(()=>$,":first-child");return v.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${p/2}, 0)`),K(t,v),t.intersect=function(W){return U.polygon(t,k,W)},h}f(Af,"bowTieRect");function Ze(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(Ze,"insertPolygonShape");var Ls=12;async function Ef(e,t){const{labelStyles:r,nodeStyles:i}=V(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 st(e,t,rt(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+Ls),c=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),u=0,p=h,d=-c,m=0,g=[{x:u+Ls,y:d},{x:p,y:d},{x:p,y:m},{x:u,y:m},{x:u,y:d+Ls},{x:u+Ls,y:d}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=G.svg(n),k=X(t,{}),T=pt(g),w=b.path(T,k);y=n.insert(()=>w,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&y.attr("style",C)}else y=Ze(n,h,c,g);return i&&y.attr("style",i),K(t,y),t.intersect=function(b){return U.polygon(t,g,b)},n}f(Ef,"card");function Mf(e,t){const{nodeStyles:r}=V(t);t.label="";const i=e.insert("g").attr("class",rt(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=G.svg(i),l=X(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=pt(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 U.polygon(t,o,p)},i}f(Mf,"choice");async function ml(e,t,r){const{labelStyles:i,nodeStyles:s}=V(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:n}=await st(e,t,rt(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=G.svg(a),m=X(t,{}),g=d.circle(0,0,c*2,m);u=a.insert(()=>g,":first-child"),u.attr("class","basic label-container").attr("style",Pt(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,m){const g=d.width/2;return U.circle(d,g,m)},t.intersect=function(d){return q.info("Circle intersect",t,c,d),U.circle(t,c,d)},a}f(ml,"circle");function $f(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}
230
- M ${s.x},${s.y} L ${o.x},${o.y}`}f($f,"createLine");function Of(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=G.svg(s),l=X(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=n.circle(0,0,a*2,l),c=$f(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 q.info("crossedCircle intersect",t,{radius:a,point:d}),U.circle(t,a,d)},s}f(Of,"crossedCircle");function ze(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),m=t+r*Math.sin(p);o.push({x:-d,y:-m})}return o}f(ze,"generateCirclePoints");async function If(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,rt(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=[...ze(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...ze(h/2+u*2,-u,u,20,-180,-270),...ze(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...ze(h/2,c/2,u,20,0,90)],m=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...ze(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...ze(h/2+h*.1,-u,u,20,-180,-270),...ze(h/2+h*.1,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...ze(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2,y:c/2+u}],g=G.svg(s),y=X(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=pt(d).replace("Z",""),k=g.path(b,y),T=pt(m),w=g.path(T,{...y}),B=s.insert("g",":first-child");return B.insert(()=>w,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.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,B),t.intersect=function($){return U.polygon(t,m,$)},s}f(If,"curlyBraceLeft");function He(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),m=t+r*Math.sin(p);o.push({x:d,y:m})}return o}f(He,"generateCirclePoints");async function Df(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,rt(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=[...He(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...He(h/2+u*2,-u,u,20,-180,-270),...He(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...He(h/2,c/2,u,20,0,90)],m=[{x:-h/2,y:-c/2-u},{x:h/2,y:-c/2-u},...He(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...He(h/2+u*2,-u,u,20,-180,-270),...He(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...He(h/2,c/2,u,20,0,90),{x:h/2,y:c/2+u},{x:-h/2,y:c/2+u}],g=G.svg(s),y=X(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=pt(d).replace("Z",""),k=g.path(b,y),T=pt(m),w=g.path(T,{...y}),B=s.insert("g",":first-child");return B.insert(()=>w,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.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,B),t.intersect=function($){return U.polygon(t,m,$)},s}f(Df,"curlyBraceRight");function qt(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),m=t+r*Math.sin(p);o.push({x:-d,y:-m})}return o}f(qt,"generateCirclePoints");async function Rf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,rt(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=[...qt(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...qt(h/2+u*2,-u,u,20,-180,-270),...qt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...qt(h/2,c/2,u,20,0,90)],m=[...qt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...qt(-h/2-u/2,-u,u,20,0,90),...qt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...qt(-h/2+u+u/2,c/2,u,30,-180,-270)],g=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...qt(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...qt(h/2+u*2,-u,u,20,-180,-270),...qt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...qt(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},...qt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...qt(-h/2-u/2,-u,u,20,0,90),...qt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...qt(-h/2+u+u/2,c/2,u,30,-180,-270)],y=G.svg(s),C=X(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=pt(d).replace("Z",""),T=y.path(k,C),B=pt(m).replace("Z",""),$=y.path(B,C),v=pt(g),W=y.path(v,{...C}),P=s.insert("g",":first-child");return P.insert(()=>W,":first-child").attr("stroke-opacity",0),P.insert(()=>T,":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(M){return U.polygon(t,g,M)},s}f(Rf,"curlyBraces");async function Pf(e,t){const{labelStyles:r,nodeStyles:i}=V(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 st(e,t,rt(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:m}=t,g=G.svg(h),y=X(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=u,b=p,k=C-d,T=b/4,w=[{x:k,y:0},{x:T,y:0},{x:0,y:b/2},{x:T,y:b},{x:k,y:b},...ts(-k,-b/2,d,50,270,90)],B=pt(w),$=g.path(B,y),v=h.insert(()=>$,":first-child");return v.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-u/2}, ${-p/2})`),K(t,v),t.intersect=function(W){return U.polygon(t,w,W)},h}f(Pf,"curvedTrapezoid");var aw=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"),ow=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"),nw=f((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),ec=8,rc=8;async function Nf(e,t){const{labelStyles:r,nodeStyles:i}=V(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<rc&&(t.width=rc);const b=y/2/(2.5+y/50);t.height=(t.height??0)-a-b*3,t.height<ec&&(t.height=ec)}const{shapeSvg:n,bbox:l,label:h}=await st(e,t,rt(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 m;const{cssStyles:g}=t;if(t.look==="handDrawn"){const y=G.svg(n),C=ow(0,0,c,d,u,p),b=nw(0,p,c,d,u,p),k=X(t,{}),T=y.path(C,k),w=y.path(b,X(t,{fill:"none"}));m=n.insert(()=>w,":first-child"),m=n.insert(()=>T,":first-child"),m.attr("class","basic label-container"),g&&m.attr("style",g)}else{const y=aw(0,0,c,d,u,p);m=n.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",Pt(g)).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)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(y){const C=U.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(Nf,"cylinder");async function gi(e,t,r){const{labelStyles:i,nodeStyles:s}=V(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await st(e,t,rt(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:m}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,d=r.ry),t.look==="handDrawn"){const g=G.svg(a),y=X(t,{}),C=p||d?g.path(nr(h,c,n,l,p||0),y):g.rectangle(h,c,n,l,y);u=a.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",Pt(m))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",Pt(p)).attr("ry",Pt(d)).attr("x",h).attr("y",c).attr("width",n).attr("height",l);return K(t,u),t.calcIntersect=function(g,y){return U.rect(g,y)},t.intersect=function(g){return U.rect(t,g)},a}f(gi,"drawRect");async function qf(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 gi(e,t,l);if(t.look==="handDrawn"){const d=G.svg(h),m=X(t,{}),g=h.select(".basic.label-container > path:nth-child(2)"),y=g.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,m),".basic.label-container g.label"),h.insert(()=>d.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,m),".basic.label-container g.label"),g.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(qf,"datastore");async function Wf(e,t){const{labelStyles:r,nodeStyles:i}=V(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 st(e,t,rt(t)),h=n.width+s,c=n.height+a,u=c*.2,p=-h/2,d=-c/2-u/2,{cssStyles:m}=t,g=G.svg(o),y=X(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=g.polygon(C.map(T=>[T.x,T.y]),y),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),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(T){return U.rect(t,T)},o}f(Wf,"dividedRectangle");async function zf(e,t){var d,m;const{labelStyles:r,nodeStyles:i}=V(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 st(e,t,rt(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 g=G.svg(n),y=X(t,{roughness:.2,strokeWidth:2.5}),C=X(t,{roughness:.2,strokeWidth:1.5}),b=g.circle(0,0,h*2,y),k=g.circle(0,0,c*2,C);u=n.insert("g",":first-child"),u.attr("class",Pt(t.cssClasses)).attr("style",Pt(p)),(d=u.node())==null||d.appendChild(b),(m=u.node())==null||m.appendChild(k)}else{u=n.insert("g",":first-child");const g=u.insert("circle",":first-child"),y=u.insert("circle");u.attr("class","basic label-container").attr("style",i),g.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(g){return q.info("DoubleCircle intersect",t,h,g),U.circle(t,h,g)},n}f(zf,"doublecircle");function Hf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=V(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=G.svg(a),{nodeBorder:h}=r,c=X(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 q.info("filledCircle intersect",t,{radius:o,point:d}),U.circle(t,o,d)},a}f(Hf,"filledCircle");var ic=10,sc=10;async function Yf(e,t){const{labelStyles:r,nodeStyles:i}=V(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<ic&&(t.height=ic),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<sc&&(t.width=sc));const{shapeSvg:o,bbox:n,label:l}=await st(e,t,rt(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,m=G.svg(o),g=X(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=pt(p),C=m.path(y,g),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 q.info("Triangle intersect",t,p,k),U.polygon(t,p,k)},o}f(Yf,"flippedTriangle");function Uf(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=V(t);t.label="";const o=e.insert("g").attr("class",rt(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=G.svg(o),d=X(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=p.rectangle(c,u,l,h,d),g=o.insert(()=>m,":first-child");n&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),K(t,g);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 U.rect(t,C)},o}f(Uf,"forkJoin");async function Gf(e,t){const{labelStyles:r,nodeStyles:i}=V(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 st(e,t,rt(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,m=G.svg(l),g=X(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-c/2,y:-u/2},{x:c/2-p,y:-u/2},...ts(-c/2+p,0,p,50,90,270),{x:c/2-p,y:u/2},{x:-c/2,y:u/2}],C=pt(y),b=m.path(C,g),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(T){return q.info("Pill intersect",t,{radius:p,point:T}),U.polygon(t,y,T)},l}f(Gf,"halfRoundedRectangle");var lw=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 Xf(e,t){const{labelStyles:r,nodeStyles:i}=V(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 st(e,t,rt(t)),p=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=p/s,m=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+h,g=[{x:d,y:0},{x:m-d,y:0},{x:m,y:-p/2},{x:m-d,y:-p},{x:d,y:-p},{x:0,y:-p/2}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=G.svg(c),k=X(t,{}),T=lw(0,0,m,p,d),w=b.path(T,k);y=c.insert(()=>w,":first-child").attr("transform",`translate(${-m/2}, ${p/2})`),C&&y.attr("style",C)}else y=Ze(c,m,p,g);return i&&y.attr("style",i),t.width=m,t.height=p,K(t,y),t.intersect=function(b){return U.polygon(t,g,b)},c}f(Xf,"hexagon");async function jf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await st(e,t,rt(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=G.svg(s),h=X(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=pt(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(m){return q.info("Pill intersect",t,{points:c}),U.polygon(t,c,m)},s}f(jf,"hourglass");async function Vf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=V(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 st(e,t,"icon-shape default"),p=t.pos==="t",d=n,m=n,{nodeBorder:g}=r,{stylesMap:y}=pi(t),C=-m/2,b=-d/2,k=t.label?8:0,T=G.svg(h),w=X(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const B=T.rectangle(C,b,m,d,w),$=Math.max(m,c.width),v=d+c.height+k,W=T.rectangle(-$/2,-v/2,$,v,{...w,fill:"transparent",stroke:"none"}),P=h.insert(()=>B,":first-child"),M=h.insert(()=>W);if(t.icon){const Y=h.append("g");Y.html(`<g>${await cs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const z=Y.node().getBBox(),I=z.width,E=z.height,F=z.x,O=z.y;Y.attr("transform",`translate(${-I/2-F},${p?c.height/2+k/2-E/2-O:-c.height/2-k/2-E/2-O})`),Y.attr("style",`color: ${y.get("stroke")??g};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-v/2:v/2-c.height})`),P.attr("transform",`translate(0,${p?c.height/2+k/2:-c.height/2-k/2})`),K(t,M),t.intersect=function(Y){if(q.info("iconSquare intersect",t,Y),!t.label)return U.rect(t,Y);const z=t.x??0,I=t.y??0,E=t.height??0;let F=[];return p?F=[{x:z-c.width/2,y:I-E/2},{x:z+c.width/2,y:I-E/2},{x:z+c.width/2,y:I-E/2+c.height+k},{x:z+m/2,y:I-E/2+c.height+k},{x:z+m/2,y:I+E/2},{x:z-m/2,y:I+E/2},{x:z-m/2,y:I-E/2+c.height+k},{x:z-c.width/2,y:I-E/2+c.height+k}]:F=[{x:z-m/2,y:I-E/2},{x:z+m/2,y:I-E/2},{x:z+m/2,y:I-E/2+d},{x:z+c.width/2,y:I-E/2+d},{x:z+c.width/2/2,y:I+E/2},{x:z-c.width/2,y:I+E/2},{x:z-c.width/2,y:I-E/2+d},{x:z-m/2,y:I-E/2+d}],U.polygon(t,F,Y)},h}f(Vf,"icon");async function Zf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=V(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 st(e,t,"icon-shape default"),p=20,d=t.label?8:0,m=t.pos==="t",{nodeBorder:g,mainBkg:y}=r,{stylesMap:C}=pi(t),b=G.svg(h),k=X(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=C.get("fill");k.stroke=T??y;const w=h.append("g");t.icon&&w.html(`<g>${await cs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=w.node().getBBox(),$=B.width,v=B.height,W=B.x,P=B.y,M=Math.max($,v)*Math.SQRT2+p*2,Y=b.circle(0,0,M,k),z=Math.max(M,c.width),I=M+c.height+d,E=b.rectangle(-z/2,-I/2,z,I,{...k,fill:"transparent",stroke:"none"}),F=h.insert(()=>Y,":first-child"),O=h.insert(()=>E);return w.attr("transform",`translate(${-$/2-W},${m?c.height/2+d/2-v/2-P:-c.height/2-d/2-v/2-P})`),w.attr("style",`color: ${C.get("stroke")??g};`),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${m?-I/2:I/2-c.height})`),F.attr("transform",`translate(0,${m?c.height/2+d/2:-c.height/2-d/2})`),K(t,O),t.intersect=function(A){return q.info("iconSquare intersect",t,A),U.rect(t,A)},h}f(Zf,"iconCircle");async function Kf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=V(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 st(e,t,"icon-shape default"),d=t.pos==="t",m=n+u*2,g=n+u*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=pi(t),k=-g/2,T=-m/2,w=t.label?8:0,B=G.svg(h),$=X(t,{});t.look!=="handDrawn"&&($.roughness=0,$.fillStyle="solid");const v=b.get("fill");$.stroke=v??C;const W=B.path(nr(k,T,g,m,5),$),P=Math.max(g,c.width),M=m+c.height+w,Y=B.rectangle(-P/2,-M/2,P,M,{...$,fill:"transparent",stroke:"none"}),z=h.insert(()=>W,":first-child").attr("class","icon-shape2"),I=h.insert(()=>Y);if(t.icon){const E=h.append("g");E.html(`<g>${await cs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const F=E.node().getBBox(),O=F.width,A=F.height,S=F.x,N=F.y;E.attr("transform",`translate(${-O/2-S},${d?c.height/2+w/2-A/2-N:-c.height/2-w/2-A/2-N})`),E.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-M/2:M/2-c.height})`),z.attr("transform",`translate(0,${d?c.height/2+w/2:-c.height/2-w/2})`),K(t,I),t.intersect=function(E){if(q.info("iconSquare intersect",t,E),!t.label)return U.rect(t,E);const F=t.x??0,O=t.y??0,A=t.height??0;let S=[];return d?S=[{x:F-c.width/2,y:O-A/2},{x:F+c.width/2,y:O-A/2},{x:F+c.width/2,y:O-A/2+c.height+w},{x:F+g/2,y:O-A/2+c.height+w},{x:F+g/2,y:O+A/2},{x:F-g/2,y:O+A/2},{x:F-g/2,y:O-A/2+c.height+w},{x:F-c.width/2,y:O-A/2+c.height+w}]:S=[{x:F-g/2,y:O-A/2},{x:F+g/2,y:O-A/2},{x:F+g/2,y:O-A/2+m},{x:F+c.width/2,y:O-A/2+m},{x:F+c.width/2/2,y:O+A/2},{x:F-c.width/2,y:O+A/2},{x:F-c.width/2,y:O-A/2+m},{x:F-g/2,y:O-A/2+m}],U.polygon(t,S,E)},h}f(Kf,"iconRounded");async function Qf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=V(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 st(e,t,"icon-shape default"),d=t.pos==="t",m=n+u*2,g=n+u*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=pi(t),k=-g/2,T=-m/2,w=t.label?8:0,B=G.svg(h),$=X(t,{});t.look!=="handDrawn"&&($.roughness=0,$.fillStyle="solid");const v=b.get("fill");$.stroke=v??C;const W=B.path(nr(k,T,g,m,.1),$),P=Math.max(g,c.width),M=m+c.height+w,Y=B.rectangle(-P/2,-M/2,P,M,{...$,fill:"transparent",stroke:"none"}),z=h.insert(()=>W,":first-child"),I=h.insert(()=>Y);if(t.icon){const E=h.append("g");E.html(`<g>${await cs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const F=E.node().getBBox(),O=F.width,A=F.height,S=F.x,N=F.y;E.attr("transform",`translate(${-O/2-S},${d?c.height/2+w/2-A/2-N:-c.height/2-w/2-A/2-N})`),E.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-M/2:M/2-c.height})`),z.attr("transform",`translate(0,${d?c.height/2+w/2:-c.height/2-w/2})`),K(t,I),t.intersect=function(E){if(q.info("iconSquare intersect",t,E),!t.label)return U.rect(t,E);const F=t.x??0,O=t.y??0,A=t.height??0;let S=[];return d?S=[{x:F-c.width/2,y:O-A/2},{x:F+c.width/2,y:O-A/2},{x:F+c.width/2,y:O-A/2+c.height+w},{x:F+g/2,y:O-A/2+c.height+w},{x:F+g/2,y:O+A/2},{x:F-g/2,y:O+A/2},{x:F-g/2,y:O-A/2+c.height+w},{x:F-c.width/2,y:O-A/2+c.height+w}]:S=[{x:F-g/2,y:O-A/2},{x:F+g/2,y:O-A/2},{x:F+g/2,y:O-A/2+m},{x:F+c.width/2,y:O-A/2+m},{x:F+c.width/2/2,y:O+A/2},{x:F-c.width/2,y:O+A/2},{x:F-c.width/2,y:O-A/2+m},{x:F-g/2,y:O-A/2+m}],U.polygon(t,S,E)},h}f(Qf,"iconSquare");async function Jf(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}=V(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 st(e,t,"image-shape default"),m=t.pos==="t",g=-h/2,y=-c/2,C=t.label?8:0,b=G.svg(u),k=X(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=b.rectangle(g,y,h,c,k),w=Math.max(h,p.width),B=c+p.height+C,$=b.rectangle(-w/2,-B/2,w,B,{...k,fill:"none",stroke:"none"}),v=u.insert(()=>T,":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},${m?B/2-c:-B/2})`)}return d.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${m?-c/2-p.height/2-C/2:c/2-p.height/2+C/2})`),v.attr("transform",`translate(0,${m?p.height/2+C/2:-p.height/2-C/2})`),K(t,W),t.intersect=function(P){if(q.info("iconSquare intersect",t,P),!t.label)return U.rect(t,P);const M=t.x??0,Y=t.y??0,z=t.height??0;let I=[];return m?I=[{x:M-p.width/2,y:Y-z/2},{x:M+p.width/2,y:Y-z/2},{x:M+p.width/2,y:Y-z/2+p.height+C},{x:M+h/2,y:Y-z/2+p.height+C},{x:M+h/2,y:Y+z/2},{x:M-h/2,y:Y+z/2},{x:M-h/2,y:Y-z/2+p.height+C},{x:M-p.width/2,y:Y-z/2+p.height+C}]:I=[{x:M-h/2,y:Y-z/2},{x:M+h/2,y:Y-z/2},{x:M+h/2,y:Y-z/2+c},{x:M+p.width/2,y:Y-z/2+c},{x:M+p.width/2/2,y:Y+z/2},{x:M-p.width/2,y:Y+z/2},{x:M-p.width/2,y:Y-z/2+c},{x:M-h/2,y:Y-z/2+c}],U.polygon(t,I,P)},u}f(Jf,"imageSquare");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await st(e,t,rt(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 m=G.svg(n),g=X(t,{}),y=pt(u),C=m.path(y,g);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=Ze(n,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,K(t,p),t.intersect=function(m){return U.polygon(t,u,m)},n}f(tg,"inv_trapezoid");async function eg(e,t){const{shapeSvg:r,bbox:i,label:s}=await st(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 U.rect(t,l)},r}f(eg,"labelRect");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await st(e,t,rt(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 m=G.svg(n),g=X(t,{}),y=pt(u),C=m.path(y,g);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Ze(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,K(t,p),t.intersect=function(m){return U.polygon(t,u,m)},n}f(rg,"lean_left");async function ig(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await st(e,t,rt(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 m=G.svg(n),g=X(t,{}),y=pt(u),C=m.path(y,g);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Ze(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,K(t,p),t.intersect=function(m){return U.polygon(t,u,m)},n}f(ig,"lean_right");function sg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",rt(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=G.svg(s),u=X(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const p=pt(h),d=c.path(p,u),m=s.insert(()=>d,":first-child");return m.attr("class","outer-path"),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${o/2},${-n})`),K(t,m),t.intersect=function(g){return q.info("lightningBolt intersect",t,g),U.polygon(t,h,g)},s}f(sg,"lightningBolt");var hw=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"),cw=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"),uw=f((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),ac=10,oc=10;async function ag(e,t){const{labelStyles:r,nodeStyles:i}=V(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<oc&&(t.width=oc);const k=C/2/(2.5+C/50);t.height=(t.height??0)-o-k*3,t.height<ac&&(t.height=ac)}const{shapeSvg:n,bbox:l,label:h}=await st(e,t,rt(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,m=d*.1;let g;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=G.svg(n),b=cw(0,0,c,d,u,p,m),k=uw(0,p,c,d,u,p),T=X(t,{}),w=C.path(b,T),B=C.path(k,T);n.insert(()=>B,":first-child").attr("class","line"),g=n.insert(()=>w,":first-child"),g.attr("class","basic label-container"),y&&g.attr("style",y)}else{const C=hw(0,0,c,d,u,p,m);g=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",Pt(y)).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)+p-(l.y-(l.top??0))})`),t.intersect=function(C){const b=U.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 T=p*p*(1-k*k/(u*u));T>0&&(T=Math.sqrt(T)),T=p-T,C.y-(t.y??0)>0&&(T=-T),b.y+=T}return b},n}f(ag,"linedCylinder");async function og(e,t){const{labelStyles:r,nodeStyles:i}=V(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=t.width;t.width=(T??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 st(e,t,rt(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:m}=t,g=G.svg(n),y=X(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},...or(-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=g.polygon(C.map(T=>[T.x,T.y]),y),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),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(T){return U.polygon(t,C,T)},n}f(og,"linedWaveEdgedRect");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=V(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 st(e,t,rt(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,m=p-2*n,g=-d/2,y=-m/2,{cssStyles:C}=t,b=G.svg(l),k=X(t,{}),T=[{x:g-n,y:y+n},{x:g-n,y:y+m+n},{x:g+d-n,y:y+m+n},{x:g+d-n,y:y+m},{x:g+d,y:y+m},{x:g+d,y:y+m-n},{x:g+d+n,y:y+m-n},{x:g+d+n,y:y-n},{x:g+n,y:y-n},{x:g+n,y},{x:g,y},{x:g,y:y+n}],w=[{x:g,y:y+n},{x:g+d-n,y:y+n},{x:g+d-n,y:y+m},{x:g+d,y:y+m},{x:g+d,y},{x:g,y}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=pt(T);let $=b.path(B,k);const v=pt(w);let W=b.path(v,k);t.look!=="handDrawn"&&($=cn($),W=cn(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(M){return U.polygon(t,T,M)},l}f(ng,"multiRect");async function lg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,rt(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,m=p+(c?d/2:-d/2),g=-u/2,y=-m/2,C=10,{cssStyles:b}=t,k=or(g-C,y+m+C,g+u-C,y+m+C,d,.8),T=k==null?void 0:k[k.length-1],w=[{x:g-C,y:y+C},{x:g-C,y:y+m+C},...k,{x:g+u-C,y:T.y-C},{x:g+u,y:T.y-C},{x:g+u,y:T.y-2*C},{x:g+u+C,y:T.y-2*C},{x:g+u+C,y:y-C},{x:g+C,y:y-C},{x:g+C,y},{x:g,y},{x:g,y:y+C}],B=[{x:g,y:y+C},{x:g+u-C,y:y+C},{x:g+u-C,y:T.y-C},{x:g+u,y:T.y-C},{x:g+u,y},{x:g,y}],$=G.svg(s),v=X(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const W=pt(w),P=$.path(W,v),M=pt(B),Y=$.path(M,v),z=s.insert(()=>P,":first-child");return z.insert(()=>Y),z.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",i),z.attr("transform",`translate(0,${-d/2})`),o.attr("transform",`translate(${-(a.width/2)-C-(a.x-(a.left??0))}, ${-(a.height/2)+C-d/2-(a.y-(a.top??0))})`),K(t,z),t.intersect=function(I){return U.polygon(t,w,I)},s}f(lg,"multiWaveEdgedRectangle");async function hg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=V(t);t.labelStyle=i,t.useHtmlLabels||Jt(St())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await st(e,t,rt(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,m=G.svg(o),g=X(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=m.rectangle(u,p,h,c,g),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 U.rect(t,b)},o}f(hg,"note");var dw=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 cg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await st(e,t,rt(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=G.svg(s),m=X(t,{}),g=dw(0,0,l),y=d.path(g,m);u=s.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+h}, ${l/2})`),p&&u.attr("style",p)}else u=Ze(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,m){const g=d.width,y=[{x:g/2,y:0},{x:g,y:-g/2},{x:g/2,y:-g},{x:0,y:-g/2}],C=U.polygon(d,y,m);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},s}f(cg,"question");async function ug(e,t){const{labelStyles:r,nodeStyles:i}=V(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 st(e,t,rt(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,m=d/2,g=[{x:p+m,y:d},{x:p,y:0},{x:p+m,y:-d},{x:-p,y:-d},{x:-p,y:d}],{cssStyles:y}=t,C=G.svg(n),b=X(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=pt(g),T=C.path(k,b),w=n.insert(()=>T,":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(${-m/2},0)`),h.attr("transform",`translate(${-m/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),K(t,w),t.intersect=function(B){return U.polygon(t,g,B)},n}f(ug,"rect_left_inv_arrow");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=V(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 Je(n,h,t.labelStyle,!0,!0);let u={width:0,height:0};if(Jt(gt())){const v=c.children[0],W=ct(c);u=v.getBoundingClientRect(),W.attr("width",u.width),W.attr("height",u.height)}q.info("Text 2",l);const p=l||[],d=c.getBBox(),m=await Je(n,Array.isArray(p)?p.join("<br/>"):p,t.labelStyle,!0,!0),g=m.children[0],y=ct(m);u=g.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const C=(t.padding||0)/2;ct(m).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+C+5)+")"),ct(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),T=-u.width/2-C,w=-u.height/2-C;let B,$;if(t.look==="handDrawn"){const v=G.svg(a),W=X(t,{}),P=v.path(nr(T,w,b,k,t.rx||0),W),M=v.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(()=>(q.debug("Rough node insert CXC",P),M),":first-child"),B=a.insert(()=>(q.debug("Rough node insert CXC",P),P),":first-child")}else B=o.insert("rect",":first-child"),$=o.insert("line"),B.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,B),t.intersect=function(v){return U.rect(t,v)},a}f(dg,"rectWithTitle");async function pg(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 gi(e,t,s)}f(pg,"roundedRect");var cr=8;async function fg(e,t){const{labelStyles:r,nodeStyles:i}=V(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 st(e,t,rt(t)),h=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?cr:cr*2),c=((t==null?void 0:t.height)??n.height)+a*2,u=h-cr,p=c,d=cr-h/2,m=-c/2,{cssStyles:g}=t,y=G.svg(o),C=X(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:d,y:m},{x:d+u,y:m},{x:d+u,y:m+p},{x:d-cr,y:m+p},{x:d-cr,y:m},{x:d,y:m},{x:d,y:m+p}],k=y.polygon(b.map(w=>[w.x,w.y]),C),T=o.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path").attr("style",Pt(g)),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),g&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),l.attr("transform",`translate(${cr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),K(t,T),t.intersect=function(w){return U.rect(t,w)},o}f(fg,"shadedProcess");async function gg(e,t){const{labelStyles:r,nodeStyles:i}=V(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 st(e,t,rt(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,m=-p/2,g=-d/2,{cssStyles:y}=t,C=G.svg(n),b=X(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:m,y:g},{x:m,y:g+d},{x:m+p,y:g+d},{x:m+p,y:g-d/2}],T=pt(k),w=C.path(T,b),B=n.insert(()=>w,":first-child");return B.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),B.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,B),t.intersect=function($){return U.polygon(t,k,$)},n}f(gg,"slopedRect");async function mg(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 gi(e,t,a)}f(mg,"squareRect");async function yg(e,t){const{labelStyles:r,nodeStyles:i}=V(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 st(e,t,rt(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=G.svg(n),m=X(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const g=[{x:-c/2+u,y:-h/2},{x:c/2-u,y:-h/2},...ts(-c/2+u,0,u,50,90,270),{x:c/2-u,y:h/2},...ts(c/2-u,0,u,50,270,450)],y=pt(g),C=d.path(y,m),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 U.polygon(t,g,k)},n}f(yg,"stadium");async function Cg(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return gi(e,t,r)}f(Cg,"state");function xg(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:s}=V(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=G.svg(c),p=X(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=u.circle(0,0,t.width,{...p,stroke:o,strokeWidth:2}),m=n??l,g=(t.width??0)*5/14,y=u.circle(0,0,g,{...p,fill:m,stroke:m,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 T=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",w=T?`${T}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${w})`)}return K(t,C),t.intersect=function(T){return U.circle(t,(t.width??0)/2,T)},c}f(xg,"stateEnd");function bg(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=G.svg(a).circle(0,0,t.width,k2(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 U.circle(t,(t.width??7)/2,h)},a}f(bg,"stateStart");var Or=8;async function kg(e,t){const{labelStyles:r,nodeStyles:i}=V(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 st(e,t,rt(t)),h=((t==null?void 0:t.width)??l.width)+2*Or+a,c=((t==null?void 0:t.height)??l.height)+o,u=h-2*Or,p=c,d=-h/2,m=-c/2,g=[{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=G.svg(n),C=X(t,{}),b=y.rectangle(d,m,u+16,p,C),k=y.line(d+Or,m,d+Or,m+p,C),T=y.line(d+Or+u,m,d+Or+u,m+p,C);n.insert(()=>k,":first-child"),n.insert(()=>T,":first-child");const w=n.insert(()=>b,":first-child"),{cssStyles:B}=t;w.attr("class","basic label-container").attr("style",Pt(B)),K(t,w)}else{const y=Ze(n,u,p,g);i&&y.attr("style",i),K(t,y)}return t.intersect=function(y){return U.polygon(t,g,y)},n}f(kg,"subroutine");var mo=.2;async function Tg(e,t){const{labelStyles:r,nodeStyles:i}=V(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-mo*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await st(e,t,rt(t)),h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,c=mo*h,u=mo*h,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+c-c,m=h,g=-d/2,y=-m/2,{cssStyles:C}=t,b=G.svg(n),k=X(t,{}),T=[{x:g-c/2,y},{x:g+d+c/2,y},{x:g+d+c/2,y:y+m},{x:g-c/2,y:y+m}],w=[{x:g+d-c/2,y:y+m},{x:g+d+c/2,y:y+m},{x:g+d+c/2,y:y+m-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=pt(T),$=b.path(B,k),v=pt(w),W=b.path(v,{...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(M){return U.polygon(t,T,M)},n}f(Tg,"taggedRect");async function wg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,rt(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,m=G.svg(s),g=X(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:p/2},...or(-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},...or(C+n,(b+l)*1.25,C+n-c,(b+l)*1.3,-l*.02,.5)],T=pt(y),w=m.path(T,g),B=pt(k),$=m.path(B,{...g,fillStyle:"solid"}),v=s.insert(()=>$,":first-child");return v.insert(()=>w,":first-child"),v.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.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,v),t.intersect=function(W){return U.polygon(t,y,W)},s}f(wg,"taggedWaveEdgedRectangle");async function Sg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await st(e,t,rt(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 U.rect(t,u)},s}f(Sg,"text");var pw=f((e,t,r,i,s,a)=>`M${e},${t}
227
+ `);return xf(i)}f(Tf,"preprocessMarkdown");function wf(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(wf,"nonMarkdownToLines");function Sf(e,t={}){const r=Tf(e,t),i=Tt.lexer(r),s=[[]];let a=0;function o(n,l="normal"){n.type==="text"?n.text.split(`
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(Sf,"markdownToLines");function _f(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}f(_f,"nonMarkdownToHTML");function Bf(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(Bf,"markdownToHTML");function vf(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}f(vf,"splitTextToChars");function Lf(e,t){const r=vf(t.content);return Fl(e,[],r,t.type)}f(Lf,"splitWordToFitWidth");function Fl(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}])?Fl(e,o,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}f(Fl,"splitWordToFitWidthRecursion");function Ff(e,t){if(e.some(({content:r})=>r.includes(`
229
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Sa(e,t)}f(Ff,"splitLineToFitWidth");function Sa(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 Sa(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[n,l]=Lf(t,a);r.push([n]),l.content&&e.unshift(l)}return Sa(e,t,r)}f(Sa,"splitLineToFitWidthRecursion");function kn(e,t){t&&e.attr("style",t)}f(kn,"applyStyle");var pc=16384;async function Af(e,t,r,i,s=!1,a=Bt()){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,pc)}px`),o.attr("height",`${Math.min(10*r,pc)}px`);const n=o.append("xhtml:div"),l=Ji(t.label)?await hu(t.label.replace(ds.lineBreakRegex,`
230
+ `),a):we(t.label,a),h=t.isNode?"nodeLabel":"edgeLabel",c=n.append("span");c.html(l),kn(c,t.labelStyle),c.attr("class",`${h} ${i}`),kn(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(Af,"addHtmlSpan");function Ha(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(Ha,"createTspan");function Ef(e,t,r){const i=e.append("text"),s=Ha(i,1,t);Ya(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}f(Ef,"computeWidthOfText");function pw(e,t,r){var o;const i=e.append("text"),s=Ha(i,1,t);Ya(s,[{content:r,type:"normal"}]);const a=(o=s.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}f(pw,"computeDimensionOfText");function Mf(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=>Ef(o,1.1,d)<=e,"checkWidth"),p=u(c)?[c]:Ff(c,u);for(const d of p){const m=Ha(l,h,1.1,s);Ya(m,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(Mf,"createFormattedText");function Tn(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(Tn,"decodeHTMLEntities");function Ya(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(Tn(r.content)):s.text(" "+Tn(r.content))})}f(Ya,"updateTextContentAndStyles");async function $f(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,o)=>(r.push((async()=>{const n=`${a}:${o}`;return await dw(n)?await Cs(n,void 0,{class:"label-icon"}):`<i class='${we(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}f($f,"replaceIconSubstring");var Ze=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?Bf(t,c):_f(t),p=await $f(Er(u),c),d=t.replace(/\\\\/g,"\\"),m={isNode:n,label:Ji(t)?d:p,labelStyle:r.replace("fill:","color:")};return await Af(e,m,l,s,h,c)}else{const u=Er(t.replace(/<br\s*\/?>/g,"<br/>")),p=o?Sf(u.replace("<br>","<br/>"),c):wf(u),d=Mf(l,e,p,t?h:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ht(d).attr("style",m)}else{const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ht(d).select("rect").attr("style",m.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ht(d).select("text").attr("style",g)}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 Bo(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 fw(e,t){return e[0]===t[0]&&e[1]===t[1]}function gw(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)Bo(h,n,s);const l=(function(h,c,u){const p=[];for(const b of h){const k=[...b];fw(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 m=[];for(const b of p)for(let k=0;k<b.length-1;k++){const w=b[k],S=b[k+1];if(w[1]!==S[1]){const B=Math.min(w[1],S[1]);m.push({ymin:B,ymax:Math.max(w[1],S[1]),x:B===w[1]?w[0]:S[0],islope:(S[0]-w[0])/(S[1]-w[1])})}}if(m.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))),!m.length)return d;let g=[],y=m[0].ymin,C=0;for(;g.length||m.length;){if(m.length){let b=-1;for(let k=0;k<m.length&&!(m[k].ymin>y);k++)b=k;m.splice(0,b+1).forEach((k=>{g.push({s:y,edge:k})}))}if(g=g.filter((b=>!(b.edge.ymax<=y))),g.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)&&g.length>1)for(let b=0;b<g.length;b+=2){const k=b+1;if(k>=g.length)break;const w=g[b].edge,S=g[k].edge;d.push([[Math.round(w.x),y],[Math.round(S.x),y]])}y+=u,g.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)Bo(h,n,-s);(function(h,c,u){const p=[];h.forEach((d=>p.push(...d))),Bo(p,c,u)})(l,n,-s)}return l}function xs(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),gw(e,s,i,a||1)}class Al{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=xs(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 Ua(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 mw extends Al{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=xs(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)Ua([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 yw extends Al{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 Cw{constructor(t){this.helper=t}fillPolygons(t,r){const i=xs(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=Ua(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 m=0;m<c;m++){const g=d+u+m*s,y=p-o+2*Math.random()*o,C=g-o+2*Math.random()*o,b=this.helper.ellipse(y,C,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class xw{constructor(t){this.helper=t}fillPolygons(t,r){const i=xs(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=Ua(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 m=d*(i+s),g=m+i,y=[c[0]+m*Math.cos(p)+h*Math.cos(p),c[1]+m*Math.sin(p)+h*Math.sin(p)],C=[c[0]+g*Math.cos(p)+h*Math.cos(p),c[1]+g*Math.sin(p)+h*Math.sin(p)];a.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],r))}})),a}}class bw{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=xs(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=Ua(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,m=Math.sqrt(2*Math.pow(r,2)),g=[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=[g[0]+m*Math.cos(c+Math.PI/4),g[1]+m*Math.sin(c+Math.PI/4)];s.push(...this.helper.doubleLineOps(g[0],g[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],y[0],y[1],i))}})),s}}const re={};class kw{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Tw=0,vo=1,fc=2,Os={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 Lo(e,t){return e.type===t}function El(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:Tw,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:vo,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:fc,text:""},n})(e);let i="BOD",s=0,a=r[s];for(;!Lo(a,fc);){let o=0;const n=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return El("M0,0"+e);s++,o=Os[a.text],i=a.text}else Lo(a,vo)?o=Os[i]:(s++,o=Os[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(!Lo(h,vo))throw new Error("Param not a number: "+i+","+h.text);n[n.length]=+h.text}if(typeof Os[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 Of(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 If(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,m=0;r==="Q"||r==="T"?(d=i+(i-n),m=s+(s-l)):(d=i,m=s);const g=i+2*(d-i)/3,y=s+2*(m-s)/3,C=u+2*(d-u)/3,b=p+2*(m-p)/3;t.push({key:"C",data:[g,y,C,b,u,p]}),n=d,l=m,i=u,s=p;break}case"Q":{const[u,p,d,m]=c,g=i+2*(u-i)/3,y=s+2*(p-s)/3,C=d+2*(u-d)/3,b=m+2*(p-m)/3;t.push({key:"C",data:[g,y,C,b,d,m]}),n=u,l=p,i=d,s=m;break}case"A":{const u=Math.abs(c[0]),p=Math.abs(c[1]),d=c[2],m=c[3],g=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)&&(Df(i,s,y,C,u,p,d,m,g).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 Ii(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Df(e,t,r,i,s,a,o,n,l,h){const c=(u=o,Math.PI*u/180);var u;let p=[],d=0,m=0,g=0,y=0;if(h)[d,m,g,y]=h;else{[e,t]=Ii(e,t,-c),[r,i]=Ii(r,i,-c);const H=(e-r)/2,R=(t-i)/2;let E=H*H/(s*s)+R*R/(a*a);E>1&&(E=Math.sqrt(E),s*=E,a*=E);const L=s*s,O=a*a,A=L*O-L*R*R-O*H*H,_=L*R*R+O*H*H,q=(n===l?-1:1)*Math.sqrt(Math.abs(A/_));g=q*s*R/a+(e+r)/2,y=q*-a*H/s+(t+i)/2,d=Math.asin(parseFloat(((t-y)/a).toFixed(9))),m=Math.asin(parseFloat(((i-y)/a).toFixed(9))),e<g&&(d=Math.PI-d),r<g&&(m=Math.PI-m),d<0&&(d=2*Math.PI+d),m<0&&(m=2*Math.PI+m),l&&d>m&&(d-=2*Math.PI),!l&&m>d&&(m-=2*Math.PI)}let C=m-d;if(Math.abs(C)>120*Math.PI/180){const H=m,R=r,E=i;m=l&&m>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,p=Df(r=g+s*Math.cos(m),i=y+a*Math.sin(m),R,E,s,a,o,0,l,[m,H,g,y])}C=m-d;const b=Math.cos(d),k=Math.sin(d),w=Math.cos(m),S=Math.sin(m),B=Math.tan(C/4),M=4/3*s*B,v=4/3*a*B,W=[e,t],D=[e+M*k,t-v*b],I=[r+M*S,i-v*w],Y=[r,i];if(D[0]=2*W[0]-D[0],D[1]=2*W[1]-D[1],h)return[D,I,Y].concat(p);{p=[D,I,Y].concat(p);const H=[];for(let R=0;R<p.length;R+=3){const E=Ii(p[R][0],p[R][1],c),L=Ii(p[R+1][0],p[R+1][1],c),O=Ii(p[R+2][0],p[R+2][1],c);H.push([E[0],E[1],L[0],L[1],O[0],O[1]])}return H}}const ww={randOffset:function(e,t){return at(e,t)},randOffsetWithRange:function(e,t,r){return _a(e,t,r)},ellipse:function(e,t,r,i,s){const a=Pf(r,i,s);return wn(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return ur(e,t,r,i,s,!0)}};function Rf(e,t,r,i,s){return{type:"path",ops:ur(e,t,r,i,s)}}function Zs(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...ur(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...ur(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Rf(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function Sw(e,t,r,i,s){return(function(a,o){return Zs(a,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function gc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Is(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Is(r[0],1.5*(1+.22*t.roughness),Cc(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const n=Is(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Is(o,1.5*(1+.22*t.roughness),Cc(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 Pf(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+=at(o*l,r),n+=at(n*l,r),{increment:a,rx:o,ry:n}}function wn(e,t,r,i){const[s,a]=xc(i.increment,e,t,i.rx,i.ry,1,i.increment*_a(.1,_a(.4,1,r),r),r);let o=Ba(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=xc(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Ba(n,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function mc(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+=at(.01*u,l),p+=at(.01*p,l);let d=s,m=a;for(;d<0;)d+=2*Math.PI,m+=2*Math.PI;m-d>2*Math.PI&&(d=0,m=2*Math.PI);const g=2*Math.PI/l.curveStepCount,y=Math.min(g/2,(m-d)/2),C=bc(y,h,c,u,p,d,m,1,l);if(!l.disableMultiStroke){const b=bc(y,h,c,u,p,d,m,1.5,l);C.push(...b)}return o&&(n?C.push(...ur(h,c,h+u*Math.cos(d),c+p*Math.sin(d),l),...ur(h,c,h+u*Math.cos(m),c+p*Math.sin(m),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 yc(e,t){const r=If(Of(El(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(...ur(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(..._w(l,h,c,u,p,d,a,t)),a=[p,d];break}case"Z":i.push(...ur(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function Fo(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]+at(s,t),i[0][1]+at(s,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+at(s,t),i[o][1]+at(s,t)]})}}return{type:"fillPath",ops:r}}function Wr(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!re[s])switch(s){case"zigzag":re[s]||(re[s]=new mw(i));break;case"cross-hatch":re[s]||(re[s]=new yw(i));break;case"dots":re[s]||(re[s]=new Cw(i));break;case"dashed":re[s]||(re[s]=new xw(i));break;case"zigzag-line":re[s]||(re[s]=new bw(i));break;default:s="hachure",re[s]||(re[s]=new Al(i))}return re[s]})(t,ww).fillPolygons(e,t)}function Cc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Nf(e){return e.randomizer||(e.randomizer=new kw(e.seed||0)),e.randomizer.next()}function _a(e,t,r,i=1){return r.roughness*i*(Nf(r)*(t-e)+e)}function at(e,t,r=1){return _a(-e,e,t,r)}function ur(e,t,r,i,s,a=!1){const o=a?s.disableMultiStrokeFill:s.disableMultiStroke,n=Sn(e,t,r,i,s,!0,!1);if(o)return n;const l=Sn(e,t,r,i,s,!0,!0);return n.concat(l)}function Sn(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*Nf(s);let d=s.bowing*s.maxRandomnessOffset*(i-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-r)/200;d=at(d,s,h),m=at(m,s,h);const g=[],y=()=>at(u,s,h),C=()=>at(c,s,h),b=s.preserveVertices;return o?g.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):g.push({op:"move",data:[e+(b?0:at(c,s,h)),t+(b?0:at(c,s,h))]}),o?g.push({op:"bcurveTo",data:[d+e+(r-e)*p+y(),m+t+(i-t)*p+y(),d+e+2*(r-e)*p+y(),m+t+2*(i-t)*p+y(),r+(b?0:y()),i+(b?0:y())]}):g.push({op:"bcurveTo",data:[d+e+(r-e)*p+C(),m+t+(i-t)*p+C(),d+e+2*(r-e)*p+C(),m+t+2*(i-t)*p+C(),r+(b?0:C()),i+(b?0:C())]}),g}function Is(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+at(t,r),e[0][1]+at(t,r)]),i.push([e[0][0]+at(t,r),e[0][1]+at(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+at(t,r),e[s][1]+at(t,r)]),s===e.length-1&&i.push([e[s][0]+at(t,r),e[s][1]+at(t,r)]);return Ba(i,null,r)}function Ba(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(...Sn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function xc(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=at(.5,n)-Math.PI/2;h.push([at(a,n)+t+.9*i*Math.cos(c-e),at(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=[at(a,n)+t+i*Math.cos(p),at(a,n)+r+s*Math.sin(p)];l.push(d),h.push(d)}h.push([at(a,n)+t+i*Math.cos(c+2*Math.PI+.5*o),at(a,n)+r+s*Math.sin(c+2*Math.PI+.5*o)]),h.push([at(a,n)+t+.98*i*Math.cos(c+o),at(a,n)+r+.98*s*Math.sin(c+o)]),h.push([at(a,n)+t+.9*i*Math.cos(c+.5*o),at(a,n)+r+.9*s*Math.sin(c+.5*o)])}return[h,l]}function bc(e,t,r,i,s,a,o,n,l){const h=a+at(.1,l),c=[];c.push([at(n,l)+t+.9*i*Math.cos(h-e),at(n,l)+r+.9*s*Math.sin(h-e)]);for(let u=h;u<=o;u+=e)c.push([at(n,l)+t+i*Math.cos(u),at(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)]),Ba(c,null,l)}function _w(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:at(h[0],n)),o[1]+(p?0:at(h[0],n))]}),c=p?[s,a]:[s+at(h[d],n),a+at(h[d],n)],l.push({op:"bcurveTo",data:[e+at(h[d],n),t+at(h[d],n),r+at(h[d],n),i+at(h[d],n),c[0],c[1]]});return l}function Di(e){return[...e]}function kc(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(Di(e[0]),Di(e[1]),Di(e[2]),Di(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(Di(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 Ks(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function Bw(e,t,r){const i=Ks(t,r);if(i===0)return Ks(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)),Ks(e,br(t,r,s))}function br(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function _n(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 m=3*c[1]-2*h[1]-p[1];m*=m;let g=3*u[0]-2*p[0]-h[0];g*=g;let y=3*u[1]-2*p[1]-h[1];return y*=y,d<g&&(d=g),m<y&&(m=y),d+m})(e,t)<r){const n=e[t+0];s.length?(a=s[s.length-1],o=n,Math.sqrt(Ks(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=br(l,h,.5),d=br(h,c,.5),m=br(c,u,.5),g=br(p,d,.5),y=br(d,m,.5),C=br(g,y,.5);_n([l,p,g,C],0,r,s),_n([C,y,m,u],0,r,s)}var a,o;return s}function vw(e,t){return va(e,0,e.length,t)}function va(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=Bw(e[c],o,n);u>l&&(l=u,h=c)}return Math.sqrt(l)>i?(va(e,t,h+1,i,a),va(e,h,r,i,a)):(a.length||a.push(o),a.push(n)),a}function Ao(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)_n(e,3*a,t,i);return r&&r>0?va(i,0,i.length,r):i}const ne="none";class La{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",[Rf(t,r,i,s,o)],o)}rectangle(t,r,i,s,a){const o=this._o(a),n=[],l=Sw(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(Fo([h],o)):n.push(Wr([h],o))}return o.stroke!==ne&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,s,a){const o=this._o(a),n=[],l=Pf(i,s,o),h=wn(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const c=wn(t,r,o,l).opset;c.type="fillPath",n.push(c)}else n.push(Wr([h.estimatedPoints],o));return o.stroke!==ne&&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",[Zs(t,!1,i)],i)}arc(t,r,i,s,a,o,n=!1,l){const h=this._o(l),c=[],u=mc(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=mc(t,r,i,s,a,o,!0,!1,p);d.type="fillPath",c.push(d)}else c.push((function(p,d,m,g,y,C,b){const k=p,w=d;let S=Math.abs(m/2),B=Math.abs(g/2);S+=at(.01*S,b),B+=at(.01*B,b);let M=y,v=C;for(;M<0;)M+=2*Math.PI,v+=2*Math.PI;v-M>2*Math.PI&&(M=0,v=2*Math.PI);const W=(v-M)/b.curveStepCount,D=[];for(let I=M;I<=v;I+=W)D.push([k+S*Math.cos(I),w+B*Math.sin(I)]);return D.push([k+S*Math.cos(v),w+B*Math.sin(v)]),D.push([k,w]),Wr([D],b)})(t,r,i,s,a,o,h));return h.stroke!==ne&&c.push(u),this._d("arc",c,h)}curve(t,r){const i=this._o(r),s=[],a=gc(t,i);if(i.fill&&i.fill!==ne)if(i.fillStyle==="solid"){const o=gc(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(...Ao(kc([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):o.push(...Ao(kc(h),10,(1+i.roughness)/2))}o.length&&s.push(Wr([o],i))}return i.stroke!==ne&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=Zs(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Fo([t],i)):s.push(Wr([t],i))),i.stroke!==ne&&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!==ne,o=i.stroke!==ne,n=!!(i.simplification&&i.simplification<1),l=(function(c,u,p){const d=If(Of(El(c))),m=[];let g=[],y=[0,0],C=[];const b=()=>{C.length>=4&&g.push(...Ao(C,u)),C=[]},k=()=>{b(),g.length&&(m.push(g),g=[])};for(const{key:S,data:B}of d)switch(S){case"M":k(),y=[B[0],B[1]],g.push(y);break;case"L":b(),g.push([B[0],B[1]]);break;case"C":if(!C.length){const M=g.length?g[g.length-1]:y;C.push([M[0],M[1]])}C.push([B[0],B[1]]),C.push([B[2],B[3]]),C.push([B[4],B[5]]);break;case"Z":b(),g.push([y[0],y[1]])}if(k(),!p)return m;const w=[];for(const S of m){const B=vw(S,p);B.length&&w.push(B)}return w})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),h=yc(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const c=yc(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(Fo(l,i));else s.push(Wr(l,i));return o&&(n?l.forEach((c=>{s.push(Zs(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:ne};break;case"fillPath":o={d:this.opsToPath(a),stroke:ne,strokeWidth:0,fill:i.fill||ne};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||ne,strokeWidth:i,fill:ne}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class Lw{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new La(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 Ds="http://www.w3.org/2000/svg";class Fw{constructor(t,r){this.svg=t,this.gen=new La(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(Ds,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(Ds,"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(Ds,"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(Ds,"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 Z={canvas:(e,t)=>new Lw(e,t),svg:(e,t)=>new Fw(e,t),generator:e=>new La(e),newSeed:()=>La.newSeed()},st=f(async(e,t,r)=>{var d,m;let i;const s=t.useHtmlLabels||Ve((d=xt())==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 Ze(o,we(Er(n),xt()),{useHtmlLabels:s,width:t.width||((m=xt().flowchart)==null?void 0:m.wrappingWidth),classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:h},xt());let u=c.getBBox();const p=((t==null?void 0:t.padding)??0)/2;if(s){const g=c.children[0],y=ht(c);await af(g,n),u=g.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"),Eo=f(async(e,t,r)=>{var l,h;const i=r.useHtmlLabels??ee(xt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Ze(s,we(Er(t),xt()),{useHtmlLabels:i,width:r.width||((h=(l=xt())==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(ee(xt())){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"),J=f((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),it=f((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function pt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}f(pt,"createPathFromPoints");function dr(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 m=d/50,g=e+m*l,y=p+s*Math.sin(u*(g-e));o.push({x:g,y})}return o}f(dr,"generateFullSineWavePoints");function ls(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),m=t+r*Math.sin(p);o.push({x:-d,y:-m})}return o}f(ls,"generateCirclePoints");function Bn(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(Bn,"mergePaths");var Aw=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"),Ti=Aw,Ew=f(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const o=xt(),n=ee(o);return await Ze(e,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},o)},"createLabel"),ar=Ew,pr=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"),qf=f(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);const r=xt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Q(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=ee(r),d=u.insert("g").attr("class","cluster-label ");let m;t.labelType==="markdown"?m=await Ze(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):m=await ar(d,t.label,t.labelStyle||"",!1,!0);let g=m.getBBox();if(ee(r)){const M=m.children[0],v=ht(m);g=M.getBoundingClientRect(),v.attr("width",g.width),v.attr("height",g.height)}const y=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.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 w;if(t.look==="handDrawn"){const M=Z.svg(u),v=K(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:s}),W=M.path(pr(b,k,y,C,0),v);w=u.insert(()=>(z.debug("Rough node insert CXC",W),W),":first-child"),w.select("path:nth-child(2)").attr("style",h.join(";")),w.select("path").attr("style",c.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.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:S}=xl(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),n){const M=d.select("span");M&&M.attr("style",n)}const B=w.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=g.height-t.padding/2,t.intersect=function(M){return Ti(t,M)},{cluster:u,labelBBox:g}},"rect"),Mw=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 Ti(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),$w=f(async(e,t)=>{const r=xt(),{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 ar(u,t.label,t.labelStyle,void 0,!0);let m=d.getBBox();if(ee(r)){const W=d.children[0],D=ht(d);m=W.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const g=0*t.padding,y=g/2,C=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+g;t.width<=m.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+g,k=t.height+g-m.height-6,w=t.x-C/2,S=t.y-b/2;t.width=C;const B=t.y-t.height/2-y+m.height+2;let M;if(t.look==="handDrawn"){const W=t.cssClasses.includes("statediagram-cluster-alt"),D=Z.svg(h),I=t.rx||t.ry?D.path(pr(w,S,C,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):D.rectangle(w,S,C,b,{seed:s});M=h.insert(()=>I,":first-child");const Y=D.rectangle(w,B,C,k,{fill:W?a:o,fillStyle:W?"hachure":"solid",stroke:l,seed:s});M=h.insert(()=>I,":first-child"),p=h.insert(()=>Y)}else M=c.insert("rect",":first-child"),M.attr("class","outer").attr("x",w).attr("y",S).attr("width",C).attr("height",b).attr("data-look",t.look),p.attr("class","inner").attr("x",w).attr("y",B).attr("width",C).attr("height",k);u.attr("transform",`translate(${t.x-m.width/2}, ${S+1-(ee(r)?0:3)})`);const v=M.node().getBBox();return t.height=v.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(W){return Ti(t,W)},{cluster:h,labelBBox:m}},"roundedWithTitle"),Ow=f(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);const r=xt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Q(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=ee(r),d=u.insert("g").attr("class","cluster-label "),m=await Ze(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let g=m.getBBox();if(ee(r)){const M=m.children[0],v=ht(m);g=M.getBoundingClientRect(),v.attr("width",g.width),v.attr("height",g.height)}const y=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.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 w;if(t.look==="handDrawn"){const M=Z.svg(u),v=K(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:s}),W=M.path(pr(b,k,y,C,t.rx),v);w=u.insert(()=>(z.debug("Rough node insert CXC",W),W),":first-child"),w.select("path:nth-child(2)").attr("style",h.join(";")),w.select("path").attr("style",c.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.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:S}=xl(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),n){const M=d.select("span");M&&M.attr("style",n)}const B=w.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=g.height-t.padding/2,t.intersect=function(M){return Ti(t,M)},{cluster:u,labelBBox:g}},"kanbanSection"),Iw=f((e,t)=>{const r=xt(),{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=Z.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 g="outer";t.look,g="divider",d.attr("class",g).attr("x",u).attr("y",p).attr("width",h).attr("height",c).attr("data-look",t.look)}const m=d.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(g){return Ti(t,g)},{cluster:o,labelBBox:{}}},"divider"),Dw=qf,Rw={rect:qf,squareRect:Dw,roundedWithTitle:$w,noteGroup:Mw,divider:Iw,kanbanSection:Ow},zf=new Map,Pw=f(async(e,t)=>{const r=t.shape||"rect",i=await Rw[r](e,t);return zf.set(t.id,i),i},"insertCluster"),EL=f(()=>{zf=new Map},"clear");function Wf(e,t){return e.intersect(t)}f(Wf,"intersectNode");var Nw=Wf;function Hf(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(Hf,"intersectEllipse");var Yf=Hf;function Uf(e,t,r){return Yf(e,t,t,r)}f(Uf,"intersectCircle");var qw=Uf;function Gf(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&&vn(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,m=c*t.x+u*t.y+p;if(Math.abs(d)<h&&Math.abs(m)<h&&vn(d,m))return;const g=s*u-c*a;if(g===0)return;const y=Math.abs(g/2);let C=a*p-u*o;const b=C<0?(C-y)/g:(C+y)/g;C=c*o-s*p;const k=C<0?(C-y)/g:(C+y)/g;return{x:b,y:k}}}f(Gf,"intersectLine");function vn(e,t){return e*t>0}f(vn,"sameSign");var zw=Gf;function jf(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=zw(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,m=Math.sqrt(p*p+d*d),g=u.x-r.x,y=u.y-r.y,C=Math.sqrt(g*g+y*y);return m<C?-1:m===C?0:1}),a[0]):e}f(jf,"intersectPolygon");var Ww=jf,j={node:Nw,circle:qw,ellipse:Yf,polygon:Ww,rect:Ti};function Xf(e,t){const{labelStyles:r}=Q(t);t.labelStyle=r;const i=it(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=Z.svg(a),h=K(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)),J(t,u),t.intersect=function(p){return z.info("Circle intersect",t,o,p),j.circle(t,o,p)},a}f(Xf,"anchor");function Ln(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,m=p/a,g=Math.sqrt(d**2+m**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-g**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 S=Math.atan2((i-b)/a,(r-C)/s)-k;o&&S<0&&(S+=2*Math.PI),!o&&S>0&&(S-=2*Math.PI);const B=[];for(let M=0;M<20;M++){const v=M/19,W=k+v*S,D=C+s*Math.cos(W),I=b+a*Math.sin(W);B.push({x:D,y:I})}return B}f(Ln,"generateArcPoints");function Vf(e,t,r){const[i,s]=[t,r].sort((a,o)=>o-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}f(Vf,"calculateArcSagitta");async function Zf(e,t){const{labelStyles:r,nodeStyles:i}=Q(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 D=W/2;return[D/(2.5+W/50),D]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await st(e,t,it(t)),u=n(t!=null&&t.height?t==null?void 0:t.height:c.height),[p,d]=l(u),m=Vf(u,p,d),y=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+m-m,C=u,{cssStyles:b}=t,k=[{x:y/2,y:-C/2},{x:-y/2,y:-C/2},...Ln(-y/2,-C/2,-y/2,C/2,p,d,!1),{x:y/2,y:C/2},...Ln(y/2,C/2,y/2,-C/2,p,d,!0)],w=Z.svg(h),S=K(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const B=pt(k),M=w.path(B,S),v=h.insert(()=>M,":first-child");return v.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${p/2}, 0)`),J(t,v),t.intersect=function(W){return j.polygon(t,k,W)},h}f(Zf,"bowTieRect");function Ke(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(Ke,"insertPolygonShape");var Rs=12;async function Kf(e,t){const{labelStyles:r,nodeStyles:i}=Q(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 st(e,t,it(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+Rs),c=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),u=0,p=h,d=-c,m=0,g=[{x:u+Rs,y:d},{x:p,y:d},{x:p,y:m},{x:u,y:m},{x:u,y:d+Rs},{x:u+Rs,y:d}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=Z.svg(n),k=K(t,{}),w=pt(g),S=b.path(w,k);y=n.insert(()=>S,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&y.attr("style",C)}else y=Ke(n,h,c,g);return i&&y.attr("style",i),J(t,y),t.intersect=function(b){return j.polygon(t,g,b)},n}f(Kf,"card");function Qf(e,t){const{nodeStyles:r}=Q(t);t.label="";const i=e.insert("g").attr("class",it(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=Z.svg(i),l=K(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=pt(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(Qf,"choice");async function Ml(e,t,r){const{labelStyles:i,nodeStyles:s}=Q(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:n}=await st(e,t,it(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=Z.svg(a),m=K(t,{}),g=d.circle(0,0,c*2,m);u=a.insert(()=>g,":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 J(t,u),t.calcIntersect=function(d,m){const g=d.width/2;return j.circle(d,g,m)},t.intersect=function(d){return z.info("Circle intersect",t,c,d),j.circle(t,c,d)},a}f(Ml,"circle");function Jf(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(Jf,"createLine");function tg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=Z.svg(s),l=K(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=n.circle(0,0,a*2,l),c=Jf(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),J(t,p),t.intersect=function(d){return z.info("crossedCircle intersect",t,{radius:a,point:d}),j.circle(t,a,d)},s}f(tg,"crossedCircle");function He(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),m=t+r*Math.sin(p);o.push({x:-d,y:-m})}return o}f(He,"generateCirclePoints");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,it(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=[...He(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...He(h/2+u*2,-u,u,20,-180,-270),...He(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...He(h/2,c/2,u,20,0,90)],m=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...He(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...He(h/2+h*.1,-u,u,20,-180,-270),...He(h/2+h*.1,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...He(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2,y:c/2+u}],g=Z.svg(s),y=K(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=pt(d).replace("Z",""),k=g.path(b,y),w=pt(m),S=g.path(w,{...y}),B=s.insert("g",":first-child");return B.insert(()=>S,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.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))})`),J(t,B),t.intersect=function(M){return j.polygon(t,m,M)},s}f(eg,"curlyBraceLeft");function Ye(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),m=t+r*Math.sin(p);o.push({x:d,y:m})}return o}f(Ye,"generateCirclePoints");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,it(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=[...Ye(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...Ye(h/2+u*2,-u,u,20,-180,-270),...Ye(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...Ye(h/2,c/2,u,20,0,90)],m=[{x:-h/2,y:-c/2-u},{x:h/2,y:-c/2-u},...Ye(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...Ye(h/2+u*2,-u,u,20,-180,-270),...Ye(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...Ye(h/2,c/2,u,20,0,90),{x:h/2,y:c/2+u},{x:-h/2,y:c/2+u}],g=Z.svg(s),y=K(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=pt(d).replace("Z",""),k=g.path(b,y),w=pt(m),S=g.path(w,{...y}),B=s.insert("g",":first-child");return B.insert(()=>S,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.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))})`),J(t,B),t.intersect=function(M){return j.polygon(t,m,M)},s}f(rg,"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),m=t+r*Math.sin(p);o.push({x:-d,y:-m})}return o}f(Wt,"generateCirclePoints");async function ig(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,it(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)],m=[...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)],g=[{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=Z.svg(s),C=K(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=pt(d).replace("Z",""),w=y.path(k,C),B=pt(m).replace("Z",""),M=y.path(B,C),v=pt(g),W=y.path(v,{...C}),D=s.insert("g",":first-child");return D.insert(()=>W,":first-child").attr("stroke-opacity",0),D.insert(()=>w,":first-child"),D.insert(()=>M,":first-child"),D.attr("class","text"),p&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${u-u/4}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),J(t,D),t.intersect=function(I){return j.polygon(t,g,I)},s}f(ig,"curlyBraces");async function sg(e,t){const{labelStyles:r,nodeStyles:i}=Q(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 st(e,t,it(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:m}=t,g=Z.svg(h),y=K(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=u,b=p,k=C-d,w=b/4,S=[{x:k,y:0},{x:w,y:0},{x:0,y:b/2},{x:w,y:b},{x:k,y:b},...ls(-k,-b/2,d,50,270,90)],B=pt(S),M=g.path(B,y),v=h.insert(()=>M,":first-child");return v.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-u/2}, ${-p/2})`),J(t,v),t.intersect=function(W){return j.polygon(t,S,W)},h}f(sg,"curvedTrapezoid");var Hw=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"),Yw=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"),Uw=f((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Tc=8,wc=8;async function ag(e,t){const{labelStyles:r,nodeStyles:i}=Q(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<wc&&(t.width=wc);const b=y/2/(2.5+y/50);t.height=(t.height??0)-a-b*3,t.height<Tc&&(t.height=Tc)}const{shapeSvg:n,bbox:l,label:h}=await st(e,t,it(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 m;const{cssStyles:g}=t;if(t.look==="handDrawn"){const y=Z.svg(n),C=Yw(0,0,c,d,u,p),b=Uw(0,p,c,d,u,p),k=K(t,{}),w=y.path(C,k),S=y.path(b,K(t,{fill:"none"}));m=n.insert(()=>S,":first-child"),m=n.insert(()=>w,":first-child"),m.attr("class","basic label-container"),g&&m.attr("style",g)}else{const y=Hw(0,0,c,d,u,p);m=n.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",Nt(g)).attr("style",i)}return m.attr("label-offset-y",p),m.attr("transform",`translate(${-c/2}, ${-(d/2+p)})`),J(t,m),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(ag,"cylinder");async function wi(e,t,r){const{labelStyles:i,nodeStyles:s}=Q(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await st(e,t,it(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:m}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,d=r.ry),t.look==="handDrawn"){const g=Z.svg(a),y=K(t,{}),C=p||d?g.path(pr(h,c,n,l,p||0),y):g.rectangle(h,c,n,l,y);u=a.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",Nt(m))}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 J(t,u),t.calcIntersect=function(g,y){return j.rect(g,y)},t.intersect=function(g){return j.rect(t,g)},a}f(wi,"drawRect");async function og(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 wi(e,t,l);if(t.look==="handDrawn"){const d=Z.svg(h),m=K(t,{}),g=h.select(".basic.label-container > path:nth-child(2)"),y=g.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,m),".basic.label-container g.label"),h.insert(()=>d.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,m),".basic.label-container g.label"),g.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(og,"datastore");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=Q(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 st(e,t,it(t)),h=n.width+s,c=n.height+a,u=c*.2,p=-h/2,d=-c/2-u/2,{cssStyles:m}=t,g=Z.svg(o),y=K(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=g.polygon(C.map(w=>[w.x,w.y]),y),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),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))})`),J(t,k),t.intersect=function(w){return j.rect(t,w)},o}f(ng,"dividedRectangle");async function lg(e,t){var d,m;const{labelStyles:r,nodeStyles:i}=Q(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 st(e,t,it(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 g=Z.svg(n),y=K(t,{roughness:.2,strokeWidth:2.5}),C=K(t,{roughness:.2,strokeWidth:1.5}),b=g.circle(0,0,h*2,y),k=g.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),(m=u.node())==null||m.appendChild(k)}else{u=n.insert("g",":first-child");const g=u.insert("circle",":first-child"),y=u.insert("circle");u.attr("class","basic label-container").attr("style",i),g.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 J(t,u),t.intersect=function(g){return z.info("DoubleCircle intersect",t,h,g),j.circle(t,h,g)},n}f(lg,"doublecircle");function hg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=Q(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=Z.svg(a),{nodeBorder:h}=r,c=K(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),J(t,p),t.intersect=function(d){return z.info("filledCircle intersect",t,{radius:o,point:d}),j.circle(t,o,d)},a}f(hg,"filledCircle");var Sc=10,_c=10;async function cg(e,t){const{labelStyles:r,nodeStyles:i}=Q(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<Sc&&(t.height=Sc),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<_c&&(t.width=_c));const{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(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,m=Z.svg(o),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=pt(p),C=m.path(y,g),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,J(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(cg,"flippedTriangle");function ug(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=Q(t);t.label="";const o=e.insert("g").attr("class",it(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=Z.svg(o),d=K(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=p.rectangle(c,u,l,h,d),g=o.insert(()=>m,":first-child");n&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),J(t,g);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(ug,"forkJoin");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=Q(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 st(e,t,it(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,m=Z.svg(l),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-c/2,y:-u/2},{x:c/2-p,y:-u/2},...ls(-c/2+p,0,p,50,90,270),{x:c/2-p,y:u/2},{x:-c/2,y:u/2}],C=pt(y),b=m.path(C,g),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),J(t,k),t.intersect=function(w){return z.info("Pill intersect",t,{radius:p,point:w}),j.polygon(t,y,w)},l}f(dg,"halfRoundedRectangle");var Gw=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 pg(e,t){const{labelStyles:r,nodeStyles:i}=Q(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 st(e,t,it(t)),p=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=p/s,m=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+h,g=[{x:d,y:0},{x:m-d,y:0},{x:m,y:-p/2},{x:m-d,y:-p},{x:d,y:-p},{x:0,y:-p/2}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=Z.svg(c),k=K(t,{}),w=Gw(0,0,m,p,d),S=b.path(w,k);y=c.insert(()=>S,":first-child").attr("transform",`translate(${-m/2}, ${p/2})`),C&&y.attr("style",C)}else y=Ke(c,m,p,g);return i&&y.attr("style",i),t.width=m,t.height=p,J(t,y),t.intersect=function(b){return j.polygon(t,g,b)},c}f(pg,"hexagon");async function fg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await st(e,t,it(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=Z.svg(s),h=K(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=pt(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})`),J(t,d),t.intersect=function(m){return z.info("Pill intersect",t,{points:c}),j.polygon(t,c,m)},s}f(fg,"hourglass");async function gg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Q(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 st(e,t,"icon-shape default"),p=t.pos==="t",d=n,m=n,{nodeBorder:g}=r,{stylesMap:y}=ki(t),C=-m/2,b=-d/2,k=t.label?8:0,w=Z.svg(h),S=K(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const B=w.rectangle(C,b,m,d,S),M=Math.max(m,c.width),v=d+c.height+k,W=w.rectangle(-M/2,-v/2,M,v,{...S,fill:"transparent",stroke:"none"}),D=h.insert(()=>B,":first-child"),I=h.insert(()=>W);if(t.icon){const Y=h.append("g");Y.html(`<g>${await Cs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const H=Y.node().getBBox(),R=H.width,E=H.height,L=H.x,O=H.y;Y.attr("transform",`translate(${-R/2-L},${p?c.height/2+k/2-E/2-O:-c.height/2-k/2-E/2-O})`),Y.attr("style",`color: ${y.get("stroke")??g};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-v/2:v/2-c.height})`),D.attr("transform",`translate(0,${p?c.height/2+k/2:-c.height/2-k/2})`),J(t,I),t.intersect=function(Y){if(z.info("iconSquare intersect",t,Y),!t.label)return j.rect(t,Y);const H=t.x??0,R=t.y??0,E=t.height??0;let L=[];return p?L=[{x:H-c.width/2,y:R-E/2},{x:H+c.width/2,y:R-E/2},{x:H+c.width/2,y:R-E/2+c.height+k},{x:H+m/2,y:R-E/2+c.height+k},{x:H+m/2,y:R+E/2},{x:H-m/2,y:R+E/2},{x:H-m/2,y:R-E/2+c.height+k},{x:H-c.width/2,y:R-E/2+c.height+k}]:L=[{x:H-m/2,y:R-E/2},{x:H+m/2,y:R-E/2},{x:H+m/2,y:R-E/2+d},{x:H+c.width/2,y:R-E/2+d},{x:H+c.width/2/2,y:R+E/2},{x:H-c.width/2,y:R+E/2},{x:H-c.width/2,y:R-E/2+d},{x:H-m/2,y:R-E/2+d}],j.polygon(t,L,Y)},h}f(gg,"icon");async function mg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Q(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 st(e,t,"icon-shape default"),p=20,d=t.label?8:0,m=t.pos==="t",{nodeBorder:g,mainBkg:y}=r,{stylesMap:C}=ki(t),b=Z.svg(h),k=K(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=C.get("fill");k.stroke=w??y;const S=h.append("g");t.icon&&S.html(`<g>${await Cs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=S.node().getBBox(),M=B.width,v=B.height,W=B.x,D=B.y,I=Math.max(M,v)*Math.SQRT2+p*2,Y=b.circle(0,0,I,k),H=Math.max(I,c.width),R=I+c.height+d,E=b.rectangle(-H/2,-R/2,H,R,{...k,fill:"transparent",stroke:"none"}),L=h.insert(()=>Y,":first-child"),O=h.insert(()=>E);return S.attr("transform",`translate(${-M/2-W},${m?c.height/2+d/2-v/2-D:-c.height/2-d/2-v/2-D})`),S.attr("style",`color: ${C.get("stroke")??g};`),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${m?-R/2:R/2-c.height})`),L.attr("transform",`translate(0,${m?c.height/2+d/2:-c.height/2-d/2})`),J(t,O),t.intersect=function(A){return z.info("iconSquare intersect",t,A),j.rect(t,A)},h}f(mg,"iconCircle");async function yg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Q(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 st(e,t,"icon-shape default"),d=t.pos==="t",m=n+u*2,g=n+u*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=ki(t),k=-g/2,w=-m/2,S=t.label?8:0,B=Z.svg(h),M=K(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const v=b.get("fill");M.stroke=v??C;const W=B.path(pr(k,w,g,m,5),M),D=Math.max(g,c.width),I=m+c.height+S,Y=B.rectangle(-D/2,-I/2,D,I,{...M,fill:"transparent",stroke:"none"}),H=h.insert(()=>W,":first-child").attr("class","icon-shape2"),R=h.insert(()=>Y);if(t.icon){const E=h.append("g");E.html(`<g>${await Cs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=E.node().getBBox(),O=L.width,A=L.height,_=L.x,q=L.y;E.attr("transform",`translate(${-O/2-_},${d?c.height/2+S/2-A/2-q:-c.height/2-S/2-A/2-q})`),E.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-I/2:I/2-c.height})`),H.attr("transform",`translate(0,${d?c.height/2+S/2:-c.height/2-S/2})`),J(t,R),t.intersect=function(E){if(z.info("iconSquare intersect",t,E),!t.label)return j.rect(t,E);const L=t.x??0,O=t.y??0,A=t.height??0;let _=[];return d?_=[{x:L-c.width/2,y:O-A/2},{x:L+c.width/2,y:O-A/2},{x:L+c.width/2,y:O-A/2+c.height+S},{x:L+g/2,y:O-A/2+c.height+S},{x:L+g/2,y:O+A/2},{x:L-g/2,y:O+A/2},{x:L-g/2,y:O-A/2+c.height+S},{x:L-c.width/2,y:O-A/2+c.height+S}]:_=[{x:L-g/2,y:O-A/2},{x:L+g/2,y:O-A/2},{x:L+g/2,y:O-A/2+m},{x:L+c.width/2,y:O-A/2+m},{x:L+c.width/2/2,y:O+A/2},{x:L-c.width/2,y:O+A/2},{x:L-c.width/2,y:O-A/2+m},{x:L-g/2,y:O-A/2+m}],j.polygon(t,_,E)},h}f(yg,"iconRounded");async function Cg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Q(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 st(e,t,"icon-shape default"),d=t.pos==="t",m=n+u*2,g=n+u*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=ki(t),k=-g/2,w=-m/2,S=t.label?8:0,B=Z.svg(h),M=K(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const v=b.get("fill");M.stroke=v??C;const W=B.path(pr(k,w,g,m,.1),M),D=Math.max(g,c.width),I=m+c.height+S,Y=B.rectangle(-D/2,-I/2,D,I,{...M,fill:"transparent",stroke:"none"}),H=h.insert(()=>W,":first-child"),R=h.insert(()=>Y);if(t.icon){const E=h.append("g");E.html(`<g>${await Cs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=E.node().getBBox(),O=L.width,A=L.height,_=L.x,q=L.y;E.attr("transform",`translate(${-O/2-_},${d?c.height/2+S/2-A/2-q:-c.height/2-S/2-A/2-q})`),E.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-I/2:I/2-c.height})`),H.attr("transform",`translate(0,${d?c.height/2+S/2:-c.height/2-S/2})`),J(t,R),t.intersect=function(E){if(z.info("iconSquare intersect",t,E),!t.label)return j.rect(t,E);const L=t.x??0,O=t.y??0,A=t.height??0;let _=[];return d?_=[{x:L-c.width/2,y:O-A/2},{x:L+c.width/2,y:O-A/2},{x:L+c.width/2,y:O-A/2+c.height+S},{x:L+g/2,y:O-A/2+c.height+S},{x:L+g/2,y:O+A/2},{x:L-g/2,y:O+A/2},{x:L-g/2,y:O-A/2+c.height+S},{x:L-c.width/2,y:O-A/2+c.height+S}]:_=[{x:L-g/2,y:O-A/2},{x:L+g/2,y:O-A/2},{x:L+g/2,y:O-A/2+m},{x:L+c.width/2,y:O-A/2+m},{x:L+c.width/2/2,y:O+A/2},{x:L-c.width/2,y:O+A/2},{x:L-c.width/2,y:O-A/2+m},{x:L-g/2,y:O-A/2+m}],j.polygon(t,_,E)},h}f(Cg,"iconSquare");async function xg(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}=Q(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 st(e,t,"image-shape default"),m=t.pos==="t",g=-h/2,y=-c/2,C=t.label?8:0,b=Z.svg(u),k=K(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=b.rectangle(g,y,h,c,k),S=Math.max(h,p.width),B=c+p.height+C,M=b.rectangle(-S/2,-B/2,S,B,{...k,fill:"none",stroke:"none"}),v=u.insert(()=>w,":first-child"),W=u.insert(()=>M);if(t.img){const D=u.append("image");D.attr("href",t.img),D.attr("width",h),D.attr("height",c),D.attr("preserveAspectRatio","none"),D.attr("transform",`translate(${-h/2},${m?B/2-c:-B/2})`)}return d.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${m?-c/2-p.height/2-C/2:c/2-p.height/2+C/2})`),v.attr("transform",`translate(0,${m?p.height/2+C/2:-p.height/2-C/2})`),J(t,W),t.intersect=function(D){if(z.info("iconSquare intersect",t,D),!t.label)return j.rect(t,D);const I=t.x??0,Y=t.y??0,H=t.height??0;let R=[];return m?R=[{x:I-p.width/2,y:Y-H/2},{x:I+p.width/2,y:Y-H/2},{x:I+p.width/2,y:Y-H/2+p.height+C},{x:I+h/2,y:Y-H/2+p.height+C},{x:I+h/2,y:Y+H/2},{x:I-h/2,y:Y+H/2},{x:I-h/2,y:Y-H/2+p.height+C},{x:I-p.width/2,y:Y-H/2+p.height+C}]:R=[{x:I-h/2,y:Y-H/2},{x:I+h/2,y:Y-H/2},{x:I+h/2,y:Y-H/2+c},{x:I+p.width/2,y:Y-H/2+c},{x:I+p.width/2/2,y:Y+H/2},{x:I-p.width/2,y:Y+H/2},{x:I-p.width/2,y:Y-H/2+c},{x:I-h/2,y:Y-H/2+c}],j.polygon(t,R,D)},u}f(xg,"imageSquare");async function bg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await st(e,t,it(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 m=Z.svg(n),g=K(t,{}),y=pt(u),C=m.path(y,g);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=Ke(n,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,J(t,p),t.intersect=function(m){return j.polygon(t,u,m)},n}f(bg,"inv_trapezoid");async function kg(e,t){const{shapeSvg:r,bbox:i,label:s}=await st(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))})`),J(t,a),t.intersect=function(l){return j.rect(t,l)},r}f(kg,"labelRect");async function Tg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await st(e,t,it(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 m=Z.svg(n),g=K(t,{}),y=pt(u),C=m.path(y,g);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Ke(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,J(t,p),t.intersect=function(m){return j.polygon(t,u,m)},n}f(Tg,"lean_left");async function wg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await st(e,t,it(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 m=Z.svg(n),g=K(t,{}),y=pt(u),C=m.path(y,g);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Ke(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,J(t,p),t.intersect=function(m){return j.polygon(t,u,m)},n}f(wg,"lean_right");function Sg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",it(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=Z.svg(s),u=K(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const p=pt(h),d=c.path(p,u),m=s.insert(()=>d,":first-child");return m.attr("class","outer-path"),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${o/2},${-n})`),J(t,m),t.intersect=function(g){return z.info("lightningBolt intersect",t,g),j.polygon(t,h,g)},s}f(Sg,"lightningBolt");var jw=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"),Xw=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"),Vw=f((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Bc=10,vc=10;async function _g(e,t){const{labelStyles:r,nodeStyles:i}=Q(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<vc&&(t.width=vc);const k=C/2/(2.5+C/50);t.height=(t.height??0)-o-k*3,t.height<Bc&&(t.height=Bc)}const{shapeSvg:n,bbox:l,label:h}=await st(e,t,it(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,m=d*.1;let g;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=Z.svg(n),b=Xw(0,0,c,d,u,p,m),k=Vw(0,p,c,d,u,p),w=K(t,{}),S=C.path(b,w),B=C.path(k,w);n.insert(()=>B,":first-child").attr("class","line"),g=n.insert(()=>S,":first-child"),g.attr("class","basic label-container"),y&&g.attr("style",y)}else{const C=jw(0,0,c,d,u,p,m);g=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",Nt(y)).attr("style",i)}return g.attr("label-offset-y",p),g.attr("transform",`translate(${-c/2}, ${-(d/2+p)})`),J(t,g),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 w=p*p*(1-k*k/(u*u));w>0&&(w=Math.sqrt(w)),w=p-w,C.y-(t.y??0)>0&&(w=-w),b.y+=w}return b},n}f(_g,"linedCylinder");async function Bg(e,t){const{labelStyles:r,nodeStyles:i}=Q(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 w=t.width;t.width=(w??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 st(e,t,it(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:m}=t,g=Z.svg(n),y=K(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},...dr(-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=g.polygon(C.map(w=>[w.x,w.y]),y),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),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))})`),J(t,k),t.intersect=function(w){return j.polygon(t,C,w)},n}f(Bg,"linedWaveEdgedRect");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=Q(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 st(e,t,it(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,m=p-2*n,g=-d/2,y=-m/2,{cssStyles:C}=t,b=Z.svg(l),k=K(t,{}),w=[{x:g-n,y:y+n},{x:g-n,y:y+m+n},{x:g+d-n,y:y+m+n},{x:g+d-n,y:y+m},{x:g+d,y:y+m},{x:g+d,y:y+m-n},{x:g+d+n,y:y+m-n},{x:g+d+n,y:y-n},{x:g+n,y:y-n},{x:g+n,y},{x:g,y},{x:g,y:y+n}],S=[{x:g,y:y+n},{x:g+d-n,y:y+n},{x:g+d-n,y:y+m},{x:g+d,y:y+m},{x:g+d,y},{x:g,y}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=pt(w);let M=b.path(B,k);const v=pt(S);let W=b.path(v,k);t.look!=="handDrawn"&&(M=Bn(M),W=Bn(W));const D=l.insert("g",":first-child");return D.insert(()=>M),D.insert(()=>W),D.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&D.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))})`),J(t,D),t.intersect=function(I){return j.polygon(t,w,I)},l}f(vg,"multiRect");async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,it(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,m=p+(c?d/2:-d/2),g=-u/2,y=-m/2,C=10,{cssStyles:b}=t,k=dr(g-C,y+m+C,g+u-C,y+m+C,d,.8),w=k==null?void 0:k[k.length-1],S=[{x:g-C,y:y+C},{x:g-C,y:y+m+C},...k,{x:g+u-C,y:w.y-C},{x:g+u,y:w.y-C},{x:g+u,y:w.y-2*C},{x:g+u+C,y:w.y-2*C},{x:g+u+C,y:y-C},{x:g+C,y:y-C},{x:g+C,y},{x:g,y},{x:g,y:y+C}],B=[{x:g,y:y+C},{x:g+u-C,y:y+C},{x:g+u-C,y:w.y-C},{x:g+u,y:w.y-C},{x:g+u,y},{x:g,y}],M=Z.svg(s),v=K(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const W=pt(S),D=M.path(W,v),I=pt(B),Y=M.path(I,v),H=s.insert(()=>D,":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))})`),J(t,H),t.intersect=function(R){return j.polygon(t,S,R)},s}f(Lg,"multiWaveEdgedRectangle");async function Fg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=Q(t);t.labelStyle=i,t.useHtmlLabels||ee(Bt())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(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,m=Z.svg(o),g=K(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=m.rectangle(u,p,h,c,g),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))})`),J(t,C),t.intersect=function(b){return j.rect(t,b)},o}f(Fg,"note");var Zw=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 Ag(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await st(e,t,it(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=Z.svg(s),m=K(t,{}),g=Zw(0,0,l),y=d.path(g,m);u=s.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+h}, ${l/2})`),p&&u.attr("style",p)}else u=Ke(s,l,l,c),u.attr("transform",`translate(${-l/2+h}, ${l/2})`);return i&&u.attr("style",i),J(t,u),t.calcIntersect=function(d,m){const g=d.width,y=[{x:g/2,y:0},{x:g,y:-g/2},{x:g/2,y:-g},{x:0,y:-g/2}],C=j.polygon(d,y,m);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},s}f(Ag,"question");async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=Q(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 st(e,t,it(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,m=d/2,g=[{x:p+m,y:d},{x:p,y:0},{x:p+m,y:-d},{x:-p,y:-d},{x:-p,y:d}],{cssStyles:y}=t,C=Z.svg(n),b=K(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=pt(g),w=C.path(k,b),S=n.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-m/2},0)`),h.attr("transform",`translate(${-m/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),J(t,S),t.intersect=function(B){return j.polygon(t,g,B)},n}f(Eg,"rect_left_inv_arrow");async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=Q(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 ar(n,h,t.labelStyle,!0,!0);let u={width:0,height:0};if(ee(xt())){const v=c.children[0],W=ht(c);u=v.getBoundingClientRect(),W.attr("width",u.width),W.attr("height",u.height)}z.info("Text 2",l);const p=l||[],d=c.getBBox(),m=await ar(n,Array.isArray(p)?p.join("<br/>"):p,t.labelStyle,!0,!0),g=m.children[0],y=ht(m);u=g.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const C=(t.padding||0)/2;ht(m).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),w=-u.width/2-C,S=-u.height/2-C;let B,M;if(t.look==="handDrawn"){const v=Z.svg(a),W=K(t,{}),D=v.path(pr(w,S,b,k,t.rx||0),W),I=v.line(-u.width/2-C,-u.height/2-C+d.height+C,u.width/2+C,-u.height/2-C+d.height+C,W);M=a.insert(()=>(z.debug("Rough node insert CXC",D),I),":first-child"),B=a.insert(()=>(z.debug("Rough node insert CXC",D),D),":first-child")}else B=o.insert("rect",":first-child"),M=o.insert("line"),B.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)),M.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 J(t,B),t.intersect=function(v){return j.rect(t,v)},a}f(Mg,"rectWithTitle");async function $g(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 wi(e,t,s)}f($g,"roundedRect");var Cr=8;async function Og(e,t){const{labelStyles:r,nodeStyles:i}=Q(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 st(e,t,it(t)),h=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?Cr:Cr*2),c=((t==null?void 0:t.height)??n.height)+a*2,u=h-Cr,p=c,d=Cr-h/2,m=-c/2,{cssStyles:g}=t,y=Z.svg(o),C=K(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:d,y:m},{x:d+u,y:m},{x:d+u,y:m+p},{x:d-Cr,y:m+p},{x:d-Cr,y:m},{x:d,y:m},{x:d,y:m+p}],k=y.polygon(b.map(S=>[S.x,S.y]),C),w=o.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path").attr("style",Nt(g)),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),g&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${Cr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),J(t,w),t.intersect=function(S){return j.rect(t,S)},o}f(Og,"shadedProcess");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=Q(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 st(e,t,it(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,m=-p/2,g=-d/2,{cssStyles:y}=t,C=Z.svg(n),b=K(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:m,y:g},{x:m,y:g+d},{x:m+p,y:g+d},{x:m+p,y:g-d/2}],w=pt(k),S=C.path(w,b),B=n.insert(()=>S,":first-child");return B.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),B.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))})`),J(t,B),t.intersect=function(M){return j.polygon(t,k,M)},n}f(Ig,"slopedRect");async function Dg(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 wi(e,t,a)}f(Dg,"squareRect");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=Q(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 st(e,t,it(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=Z.svg(n),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const g=[{x:-c/2+u,y:-h/2},{x:c/2-u,y:-h/2},...ls(-c/2+u,0,u,50,90,270),{x:c/2-u,y:h/2},...ls(c/2-u,0,u,50,270,450)],y=pt(g),C=d.path(y,m),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),J(t,b),t.intersect=function(k){return j.polygon(t,g,k)},n}f(Rg,"stadium");async function Pg(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return wi(e,t,r)}f(Pg,"state");function Ng(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:s}=Q(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=Z.svg(c),p=K(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=u.circle(0,0,t.width,{...p,stroke:o,strokeWidth:2}),m=n??l,g=(t.width??0)*5/14,y=u.circle(0,0,g,{...p,fill:m,stroke:m,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 w=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",S=w?`${w}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${S})`)}return J(t,C),t.intersect=function(w){return j.circle(t,(t.width??0)/2,w)},c}f(Ng,"stateEnd");function qg(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=Z.svg(a).circle(0,0,t.width,aT(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 J(t,o),t.intersect=function(h){return j.circle(t,(t.width??7)/2,h)},a}f(qg,"stateStart");var Hr=8;async function zg(e,t){const{labelStyles:r,nodeStyles:i}=Q(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 st(e,t,it(t)),h=((t==null?void 0:t.width)??l.width)+2*Hr+a,c=((t==null?void 0:t.height)??l.height)+o,u=h-2*Hr,p=c,d=-h/2,m=-c/2,g=[{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=Z.svg(n),C=K(t,{}),b=y.rectangle(d,m,u+16,p,C),k=y.line(d+Hr,m,d+Hr,m+p,C),w=y.line(d+Hr+u,m,d+Hr+u,m+p,C);n.insert(()=>k,":first-child"),n.insert(()=>w,":first-child");const S=n.insert(()=>b,":first-child"),{cssStyles:B}=t;S.attr("class","basic label-container").attr("style",Nt(B)),J(t,S)}else{const y=Ke(n,u,p,g);i&&y.attr("style",i),J(t,y)}return t.intersect=function(y){return j.polygon(t,g,y)},n}f(zg,"subroutine");var Mo=.2;async function Wg(e,t){const{labelStyles:r,nodeStyles:i}=Q(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-Mo*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,c=Mo*h,u=Mo*h,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+c-c,m=h,g=-d/2,y=-m/2,{cssStyles:C}=t,b=Z.svg(n),k=K(t,{}),w=[{x:g-c/2,y},{x:g+d+c/2,y},{x:g+d+c/2,y:y+m},{x:g-c/2,y:y+m}],S=[{x:g+d-c/2,y:y+m},{x:g+d+c/2,y:y+m},{x:g+d+c/2,y:y+m-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=pt(w),M=b.path(B,k),v=pt(S),W=b.path(v,{...k,fillStyle:"solid"}),D=n.insert(()=>W,":first-child");return D.insert(()=>M,":first-child"),D.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),J(t,D),t.intersect=function(I){return j.polygon(t,w,I)},n}f(Wg,"taggedRect");async function Hg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,it(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,m=Z.svg(s),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:p/2},...dr(-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},...dr(C+n,(b+l)*1.25,C+n-c,(b+l)*1.3,-l*.02,.5)],w=pt(y),S=m.path(w,g),B=pt(k),M=m.path(B,{...g,fillStyle:"solid"}),v=s.insert(()=>M,":first-child");return v.insert(()=>S,":first-child"),v.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.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))})`),J(t,v),t.intersect=function(W){return j.polygon(t,y,W)},s}f(Hg,"taggedWaveEdgedRectangle");async function Yg(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await st(e,t,it(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),J(t,c),t.intersect=function(u){return j.rect(t,u)},s}f(Yg,"text");var Kw=f((e,t,r,i,s,a)=>`M${e},${t}
231
232
  a${s},${a} 0,0,1 0,${-i}
232
233
  l${r},0
233
234
  a${s},${a} 0,0,1 0,${i}
234
235
  M${r},${-i}
235
236
  a${s},${a} 0,0,0 0,${i}
236
- l${-r},0`,"createCylinderPathD"),fw=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"),gw=f((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),nc=5,lc=10;async function _g(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2;if(t.width||t.height){const g=t.height??0;t.height=(t.height??0)-a,t.height<nc&&(t.height=nc);const C=g/2/(2.5+g/50);t.width=(t.width??0)-a-C*3,t.width<lc&&(t.width=lc)}const{shapeSvg:o,bbox:n,label:l}=await st(e,t,rt(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 m;if(t.look==="handDrawn"){const g=G.svg(o),y=fw(0,0,p,h,u,c),C=gw(0,0,p,h,u,c),b=g.path(y,X(t,{})),k=g.path(C,X(t,{fill:"none"}));m=o.insert(()=>k,":first-child"),m=o.insert(()=>b,":first-child"),m.attr("class","basic label-container"),d&&m.attr("style",d)}else{const g=pw(0,0,p,h,u,c);m=o.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Pt(d)).attr("style",i),m.attr("class","basic label-container outer-path"),d&&m.selectAll("path").attr("style",d),i&&m.selectAll("path").attr("style",i)}return m.attr("label-offset-x",u),m.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,m),t.intersect=function(g){const y=U.rect(t,g),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,g.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},o}f(_g,"tiltedCylinder");async function Bg(e,t){const{labelStyles:r,nodeStyles:i}=V(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 st(e,t,rt(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 m=G.svg(n),g=X(t,{}),y=pt(u),C=m.path(y,g);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Ze(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,K(t,p),t.intersect=function(m){return U.polygon(t,u,m)},n}f(Bg,"trapezoid");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=V(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 st(e,t,rt(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,m=G.svg(h),g=X(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.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=pt(y),b=m.path(C,g),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(T){return U.polygon(t,y,T)},h}f(vg,"trapezoidalPentagon");var hc=10,cc=10;async function Lg(e,t){var T;const{labelStyles:r,nodeStyles:i}=V(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<cc&&(t.width=cc),t.height=(t==null?void 0:t.height)??0,t.height<hc&&(t.height=hc));const{shapeSvg:o,bbox:n,label:l}=await st(e,t,rt(t)),h=je((T=gt().flowchart)==null?void 0:T.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:m}=t,g=G.svg(o),y=X(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=pt(d),b=g.path(C,y),k=o.insert(()=>b,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",m),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 q.info("Triangle intersect",t,d,w),U.polygon(t,d,w)},o}f(Lg,"triangle");async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=V(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 st(e,t,rt(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,m=p+(n?d:-d),{cssStyles:g}=t,C=14-u,b=C>0?C/2:0,k=G.svg(l),T=X(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const w=[{x:-u/2-b,y:m/2},...or(-u/2-b,m/2,u/2+b,m/2,d,.8),{x:u/2+b,y:-m/2},{x:-u/2-b,y:-m/2}],B=pt(w),$=k.path(B,T),v=l.insert(()=>$,":first-child");return v.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.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,v),t.intersect=function(W){return U.polygon(t,w,W)},l}f(Fg,"waveEdgedRectangle");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=V(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 T=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-T*(20/9)),t.width=t.width-a*2}const{shapeSvg:n,bbox:l}=await st(e,t,rt(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,m=G.svg(n),g=X(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-h/2,y:p/2},...or(-h/2,p/2,h/2,p/2,u,1),{x:h/2,y:-p/2},...or(h/2,-p/2,-h/2,-p/2,u,-1)],C=pt(y),b=m.path(C,g),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(T){return U.polygon(t,y,T)},n}f(Ag,"waveRectangle");var _t=10;async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=V(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-_t,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-_t,10));const{shapeSvg:o,bbox:n,label:l}=await st(e,t,rt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+_t,c=(t!=null&&t.height?t==null?void 0:t.height:n.height)+a*2+_t,u=h-_t,p=c-_t,d=-u/2,m=-p/2,{cssStyles:g}=t,y=G.svg(o),C=X(t,{}),b=[{x:d-_t,y:m-_t},{x:d-_t,y:m+p},{x:d+u,y:m+p},{x:d+u,y:m-_t}],k=`M${d-_t},${m-_t} L${d+u},${m-_t} L${d+u},${m+p} L${d-_t},${m+p} L${d-_t},${m-_t}
237
- M${d-_t},${m} L${d+u},${m}
238
- M${d},${m-_t} L${d},${m+p}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const T=y.path(k,C),w=o.insert(()=>T,":first-child");return w.attr("transform",`translate(${_t/2}, ${_t/2})`),w.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+_t/2-(n.x-(n.left??0))}, ${-(n.height/2)+_t/2-(n.y-(n.top??0))})`),K(t,w),t.intersect=function(B){return U.polygon(t,b,B)},o}f(Eg,"windowPane");var uc=new Set(["redux-color","redux-dark-color"]),mw=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function yl(e,t){var bt,Lt,Mt,oe;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=St(),{rowEven:a,rowOdd:o,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:Q}=St(),{background:lt}=Q,Ct={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${lt}`]};await yl(e,Ct)}const h=St();t.useHtmlLabels=h.htmlLabels;let c=((bt=h.er)==null?void 0:bt.diagramPadding)??10,u=((Lt=h.er)==null?void 0:Lt.entityPadding)??6;const{cssStyles:p}=t,{labelStyles:d,nodeStyles:m}=V(t);if(r.attributes.length===0&&t.label){const Q={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5};Xe(t.label,h)+Q.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const lt=await gi(e,t,Q);if(i!=null&&uc.has(i)){const Ct=r.colorIndex??0;lt.attr("data-color-id",`color-${Ct%l.length}`)}if(!je(h.htmlLabels)){const Ct=lt.select("text"),kt=(Mt=Ct.node())==null?void 0:Mt.getBBox();Ct.attr("transform",`translate(${-kt.width/2}, 0)`)}return lt}h.htmlLabels||(c*=1.25,u*=1.25);let g=rt(t);g||(g="node default");const y=e.insert("g").attr("class",g).attr("id",t.domId||t.id),C=await Pr(y,t.label??"",h,0,0,["name"],d);C.height+=u;let b=0;const k=[],T=[];let w=0,B=0,$=0,v=0,W=!0,P=!0;for(const Q of r.attributes){const lt=await Pr(y,Q.type,h,0,b,["attribute-type"],d);w=Math.max(w,lt.width+c);const Ct=await Pr(y,Q.name,h,0,b,["attribute-name"],d);B=Math.max(B,Ct.width+c);const kt=await Pr(y,Q.keys.join(),h,0,b,["attribute-keys"],d);$=Math.max($,kt.width+c);const ne=await Pr(y,Q.comment,h,0,b,["attribute-comment"],d);v=Math.max(v,ne.width+c);const zt=Math.max(lt.height,Ct.height,kt.height,ne.height)+u;T.push({yOffset:b,rowHeight:zt}),b+=zt}let M=4;$<=c&&(W=!1,$=0,M--),v<=c&&(P=!1,v=0,M--);const Y=y.node().getBBox();if(C.width+c*2-(w+B+$+v)>0){const Q=C.width+c*2-(w+B+$+v);w+=Q/M,B+=Q/M,$>0&&($+=Q/M),v>0&&(v+=Q/M)}const z=w+B+$+v,I=G.svg(y),E=X(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let F=0;T.length>0&&(F=T.reduce((Q,lt)=>Q+((lt==null?void 0:lt.rowHeight)??0),0));const O=Math.max(Y.width+c*2,(t==null?void 0:t.width)||0,z),A=Math.max((F??0)+C.height,(t==null?void 0:t.height)||0),S=-O/2,N=-A/2;if(y.selectAll("g:not(:first-child)").each((Q,lt,Ct)=>{const kt=ct(Ct[lt]),ne=kt.attr("transform");let zt=0,vr=0;if(ne){const ve=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ne);ve&&(zt=parseFloat(ve[1]),vr=parseFloat(ve[2]),kt.attr("class").includes("attribute-name")?zt+=w:kt.attr("class").includes("attribute-keys")?zt+=w+B:kt.attr("class").includes("attribute-comment")&&(zt+=w+B+$))}kt.attr("transform",`translate(${S+c/2+zt}, ${vr+N+C.height+u/2})`)}),y.select(".name").attr("transform","translate("+-C.width/2+", "+(N+u/2)+")"),i!=null&&uc.has(i)){const Q=r.colorIndex??0;y.attr("data-color-id",`color-${Q%l.length}`)}const Z=I.rectangle(S,N,O,A,E),ut=y.insert(()=>Z,":first-child").attr("class","outer-path").attr("style",p.join(""));k.push(0);for(const[Q,lt]of T.entries()){const kt=(Q+1)%2===0&&lt.yOffset!==0,ne=I.rectangle(S,C.height+N+(lt==null?void 0:lt.yOffset),O,lt==null?void 0:lt.rowHeight,{...E,fill:kt?a:o,stroke:n});y.insert(()=>ne,"g.label").attr("style",p.join("")).attr("class",`row-rect-${kt?"even":"odd"}`)}const it=1e-4;let dt=Nr(S,C.height+N,O+S,C.height+N,it),tt=I.polygon(dt.map(Q=>[Q.x,Q.y]),E);if(y.insert(()=>tt).attr("class","divider"),dt=Nr(w+S,C.height+N,w+S,A+N,it),tt=I.polygon(dt.map(Q=>[Q.x,Q.y]),E),y.insert(()=>tt).attr("class","divider"),W){const Q=w+B+S;dt=Nr(Q,C.height+N,Q,A+N,it),tt=I.polygon(dt.map(lt=>[lt.x,lt.y]),E),y.insert(()=>tt).attr("class","divider")}if(P){const Q=w+B+$+S;dt=Nr(Q,C.height+N,Q,A+N,it),tt=I.polygon(dt.map(lt=>[lt.x,lt.y]),E),y.insert(()=>tt).attr("class","divider")}for(const Q of k){const lt=C.height+N+Q;dt=Nr(S,lt,O+S,lt,it),tt=I.polygon(dt.map(Ct=>[Ct.x,Ct.y]),E),y.insert(()=>tt).attr("class","divider")}if(K(t,ut),m&&t.look!=="handDrawn")if(i!=null&&mw.has(i))y.selectAll("path").attr("style",m);else{const Q=m.split(";"),lt=(oe=Q==null?void 0:Q.filter(Ct=>Ct.includes("stroke")))==null?void 0:oe.map(Ct=>`${Ct}`).join("; ");y.selectAll("path").attr("style",lt??""),y.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(Q){return U.rect(t,Q)},y}f(yl,"erBox");async function Pr(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!==eh(t)&&(t=eh(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await Ve(n,t,{width:Xe(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(je(r.htmlLabels)){const c=l.children[0];c.style.textAlign="start";const u=ct(l);h=c.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)}return h}f(Pr,"addText");function Nr(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(Nr,"lineToPolygon");async function Mg(e,t,r,i,s=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",rt(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 Ri(n,{text:`«${b}»`},0),u=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Ri(l,t,0,["font-weight: bolder"]);const m=l.node().getBBox();p=m.height,h=o.insert("g").attr("class","members-group text");let g=0;for(const b of t.members){const k=await Ri(h,b,g,[b.parseClassifier()]);g+=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 Ri(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(${-m.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(Mg,"textHelper");async function Ri(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=St();let o="useHtmlLabels"in t?t.useHtmlLabels:je(a.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),Ui(n)&&(o=!0);const l=await Ve(s,Bn(wr(n)),{width:Xe(n,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let h,c=1;if(o){const u=l.children[0],p=ct(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 m=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(g=>new Promise(y=>{function C(){var b;if(g.style.display="flex",g.style.flexDirection="column",m){const k=((b=a.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,w=parseInt(k,10)*5+"px";g.style.minWidth=w,g.style.maxWidth=w}else g.style.width="100%";y(g)}f(C,"setupImage"),setTimeout(()=>{g.complete&&C()}),g.addEventListener("error",C),g.addEventListener("load",C)})))}h=u.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{i.includes("font-weight: bolder")&&ct(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(Ri,"addText");async function $g(e,t){var I,E;const r=gt(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,o=a,n=t.useHtmlLabels??je(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await Mg(e,t,r,n,o),{labelStyles:u,nodeStyles:p}=V(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 m=l.members.length===0&&l.methods.length===0&&!((E=r.class)!=null&&E.hideEmptyMembersBox),g=G.svg(h),y=X(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 T=-C/2,w=-b/2;let B=m?a*2:l.members.length===0&&l.methods.length===0?-a:0;k&&(B=a*2);const $=g.rectangle(T-a,w-a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0),C+2*a,b+2*a+B,y),v=h.insert(()=>$,":first-child");v.attr("class","basic label-container outer-path");const W=v.node().getBBox(),P=h.select(".annotation-group").node().getBBox().height-(m?a/2:0)||0,M=h.select(".label-group").node().getBBox().height-(m?a/2:0)||0,Y=h.select(".members-group").node().getBBox().height-(m?a/2:0)||0,z=(P+M+w+a-(w-a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(h.selectAll(".text").each((F,O,A)=>{var dt,tt;const S=ct(A[O]),N=S.attr("transform");let Z=0;if(N){const Lt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(N);Lt&&(Z=parseFloat(Lt[2]))}let ut=Z+w+a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(S.attr("class").includes("methods-group")){const bt=Math.max(Y,o/2);k?ut=Math.max(z,P+M+bt+w+o*2+a)+o*2:ut=P+M+bt+w+o*4+a}l.members.length===0&&l.methods.length===0&&((dt=r.class)!=null&&dt.hideEmptyMembersBox)&&(l.annotations.length>0?ut=Z-o:ut=Z),n||(ut-=4);let it=T;(S.attr("class").includes("label-group")||S.attr("class").includes("annotation-group"))&&(it=-((tt=S.node())==null?void 0:tt.getBBox().width)/2||0,h.selectAll("text").each(function(bt,Lt,Mt){window.getComputedStyle(Mt[Lt]).textAnchor==="middle"&&(it=0)})),S.attr("transform",`translate(${it}, ${ut})`)}),l.members.length>0||l.methods.length>0||m){const F=P+M+w+a,O=g.line(W.x,F,W.x+W.width,F+.001,y);h.insert(()=>O).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(m||l.members.length>0||l.methods.length>0){const F=P+M+Y+w+o*2+a,O=g.line(W.x,k?Math.max(z,F):F,W.x+W.width,(k?Math.max(z,F):F)+.001,y);h.insert(()=>O).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&h.selectAll("path").attr("style",d),v.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 F=RegExp(/color\s*:\s*([^;]*)/),O=F.exec(d);if(O){const A=O[0].replace("color","fill");h.selectAll("tspan").attr("style",A)}else if(u){const A=F.exec(u);if(A){const S=A[0].replace("color","fill");h.selectAll("tspan").attr("style",S)}}}return K(t,v),t.intersect=function(F){return U.rect(t,F)},h}f($g,"classBox");async function Og(e,t){var W,P;const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t,a=t,o=20,n=20,l="verifyMethod"in t,h=rt(t),{themeVariables:c}=gt(),{borderColorArray:u,requirementEdgeLabelBackground:p}=c,d=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let m;l?m=await Ee(d,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):m=await Ee(d,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let g=m;const y=await Ee(d,s.name,g,t.labelStyle+"; font-weight: bold;");if(g+=y+n,l){const M=await Ee(d,`${s.requirementId?`ID: ${s.requirementId}`:""}`,g,t.labelStyle);g+=M;const Y=await Ee(d,`${s.text?`Text: ${s.text}`:""}`,g,t.labelStyle);g+=Y;const z=await Ee(d,`${s.risk?`Risk: ${s.risk}`:""}`,g,t.labelStyle);g+=z,await Ee(d,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,g,t.labelStyle)}else{const M=await Ee(d,`${a.type?`Type: ${a.type}`:""}`,g,t.labelStyle);g+=M,await Ee(d,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,g,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,T=-b/2,w=G.svg(d),B=X(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const $=w.rectangle(k,T,C,b,B),v=d.insert(()=>$,":first-child");if(v.attr("class","basic label-container outer-path").attr("style",i),u!=null&&u.length){const M=t.colorIndex??0;d.attr("data-color-id",`color-${M%u.length}`)}if(d.selectAll(".label").each((M,Y,z)=>{const I=ct(z[Y]),E=I.attr("transform");let F=0,O=0;if(E){const Z=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(E);Z&&(F=parseFloat(Z[1]),O=parseFloat(Z[2]))}const A=O-b/2;let S=k+o/2;(Y===0||Y===1)&&(S=F),I.attr("transform",`translate(${S}, ${A+o})`)}),g>m+y+n){const M=T+m+y+n;let Y;if(t.look==="neo"){const E=[[k,M],[k+C,M],[k+C,M+.001],[k,M+.001]];Y=w.polygon(E,B)}else Y=w.line(k,M,k+C,M,B);d.insert(()=>Y).attr("class","divider")}return K(t,v),t.intersect=function(M){return U.rect(t,M)},i&&t.look!=="handDrawn"&&(p||u!=null&&u.length)&&d.selectAll("path").attr("style",i),d}f(Og,"requirementBox");async function Ee(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),a=gt(),o=a.htmlLabels??!0,n=await Ve(s,Bn(wr(t)),{width:Xe(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let l;if(o){const h=n.children[0],c=ct(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(Ee,"addText");var yw=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 Ig(e,t,{config:r}){var Y,z;const{labelStyles:i,nodeStyles:s}=V(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:h}=await st(e,t,rt(t)),c=t.padding||10;let u="",p;"ticket"in t&&t.ticket&&((Y=r==null?void 0:r.kanban)!=null&&Y.ticketBaseUrl)&&(u=(z=r==null?void 0:r.kanban)==null?void 0:z.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 m,g;p?{label:m,bbox:g}=await go(p,"ticket"in t&&t.ticket||"",d):{label:m,bbox:g}=await go(n,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:C}=await go(n,"assigned"in t&&t.assigned||"",d);t.width=o;const b=10,k=(t==null?void 0:t.width)||0,T=Math.max(g.height,C.height)/2,w=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+T,B=-k/2,$=-w/2;h.attr("transform","translate("+(c-k/2)+", "+(-T-l.height/2)+")"),m.attr("transform","translate("+(c-k/2)+", "+(-T+l.height/2)+")"),y.attr("transform","translate("+(c+k/2-C.width-2*a)+", "+(-T+l.height/2)+")");let v;const{rx:W,ry:P}=t,{cssStyles:M}=t;if(t.look==="handDrawn"){const I=G.svg(n),E=X(t,{}),F=W||P?I.path(nr(B,$,k,w,W||0),E):I.rectangle(B,$,k,w,E);v=n.insert(()=>F,":first-child"),v.attr("class","basic label-container").attr("style",M||null)}else{v=n.insert("rect",":first-child"),v.attr("class","basic label-container __APA__").attr("style",s).attr("rx",W??5).attr("ry",P??5).attr("x",B).attr("y",$).attr("width",k).attr("height",w);const I="priority"in t&&t.priority;if(I){const E=n.append("line"),F=B+2,O=$+Math.floor((W??0)/2),A=$+w-Math.floor((W??0)/2);E.attr("x1",F).attr("y1",O).attr("x2",F).attr("y2",A).attr("stroke-width","4").attr("stroke",yw(I))}}return K(t,v),t.height=w,t.intersect=function(I){return U.rect(t,I)},n}f(Ig,"kanbanItem");async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await st(e,t,rt(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,m=Math.max(l,p),g=Math.max(h,d);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let y;const C=`M0 0
237
+ l${-r},0`,"createCylinderPathD"),Qw=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"),Jw=f((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Lc=5,Fc=10;async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2;if(t.width||t.height){const g=t.height??0;t.height=(t.height??0)-a,t.height<Lc&&(t.height=Lc);const C=g/2/(2.5+g/50);t.width=(t.width??0)-a-C*3,t.width<Fc&&(t.width=Fc)}const{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(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 m;if(t.look==="handDrawn"){const g=Z.svg(o),y=Qw(0,0,p,h,u,c),C=Jw(0,0,p,h,u,c),b=g.path(y,K(t,{})),k=g.path(C,K(t,{fill:"none"}));m=o.insert(()=>k,":first-child"),m=o.insert(()=>b,":first-child"),m.attr("class","basic label-container"),d&&m.attr("style",d)}else{const g=Kw(0,0,p,h,u,c);m=o.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Nt(d)).attr("style",i),m.attr("class","basic label-container outer-path"),d&&m.selectAll("path").attr("style",d),i&&m.selectAll("path").attr("style",i)}return m.attr("label-offset-x",u),m.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))})`),J(t,m),t.intersect=function(g){const y=j.rect(t,g),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,g.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},o}f(Ug,"tiltedCylinder");async function Gg(e,t){const{labelStyles:r,nodeStyles:i}=Q(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 st(e,t,it(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 m=Z.svg(n),g=K(t,{}),y=pt(u),C=m.path(y,g);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Ke(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,J(t,p),t.intersect=function(m){return j.polygon(t,u,m)},n}f(Gg,"trapezoid");async function jg(e,t){const{labelStyles:r,nodeStyles:i}=Q(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 st(e,t,it(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,m=Z.svg(h),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.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=pt(y),b=m.path(C,g),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),J(t,k),t.intersect=function(w){return j.polygon(t,y,w)},h}f(jg,"trapezoidalPentagon");var Ac=10,Ec=10;async function Xg(e,t){var w;const{labelStyles:r,nodeStyles:i}=Q(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<Ec&&(t.width=Ec),t.height=(t==null?void 0:t.height)??0,t.height<Ac&&(t.height=Ac));const{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(t)),h=Ve((w=xt().flowchart)==null?void 0:w.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:m}=t,g=Z.svg(o),y=K(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=pt(d),b=g.path(C,y),k=o.insert(()=>b,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=u,J(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(S){return z.info("Triangle intersect",t,d,S),j.polygon(t,d,S)},o}f(Xg,"triangle");async function Vg(e,t){const{labelStyles:r,nodeStyles:i}=Q(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 st(e,t,it(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,m=p+(n?d:-d),{cssStyles:g}=t,C=14-u,b=C>0?C/2:0,k=Z.svg(l),w=K(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=[{x:-u/2-b,y:m/2},...dr(-u/2-b,m/2,u/2+b,m/2,d,.8),{x:u/2+b,y:-m/2},{x:-u/2-b,y:-m/2}],B=pt(S),M=k.path(B,w),v=l.insert(()=>M,":first-child");return v.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.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))})`),J(t,v),t.intersect=function(W){return j.polygon(t,S,W)},l}f(Vg,"waveEdgedRectangle");async function Zg(e,t){const{labelStyles:r,nodeStyles:i}=Q(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 w=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-w*(20/9)),t.width=t.width-a*2}const{shapeSvg:n,bbox:l}=await st(e,t,it(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,m=Z.svg(n),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-h/2,y:p/2},...dr(-h/2,p/2,h/2,p/2,u,1),{x:h/2,y:-p/2},...dr(h/2,-p/2,-h/2,-p/2,u,-1)],C=pt(y),b=m.path(C,g),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),J(t,k),t.intersect=function(w){return j.polygon(t,y,w)},n}f(Zg,"waveRectangle");var Ft=10;async function Kg(e,t){const{labelStyles:r,nodeStyles:i}=Q(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-Ft,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-Ft,10));const{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+Ft,c=(t!=null&&t.height?t==null?void 0:t.height:n.height)+a*2+Ft,u=h-Ft,p=c-Ft,d=-u/2,m=-p/2,{cssStyles:g}=t,y=Z.svg(o),C=K(t,{}),b=[{x:d-Ft,y:m-Ft},{x:d-Ft,y:m+p},{x:d+u,y:m+p},{x:d+u,y:m-Ft}],k=`M${d-Ft},${m-Ft} L${d+u},${m-Ft} L${d+u},${m+p} L${d-Ft},${m+p} L${d-Ft},${m-Ft}
238
+ M${d-Ft},${m} L${d+u},${m}
239
+ M${d},${m-Ft} L${d},${m+p}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=y.path(k,C),S=o.insert(()=>w,":first-child");return S.attr("transform",`translate(${Ft/2}, ${Ft/2})`),S.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+Ft/2-(n.x-(n.left??0))}, ${-(n.height/2)+Ft/2-(n.y-(n.top??0))})`),J(t,S),t.intersect=function(B){return j.polygon(t,b,B)},o}f(Kg,"windowPane");var Mc=new Set(["redux-color","redux-dark-color"]),tS=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function $l(e,t){var vt,qt,oe,ce;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Bt(),{rowEven:a,rowOdd:o,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:et}=Bt(),{background:X}=et,wt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${X}`]};await $l(e,wt)}const h=Bt();t.useHtmlLabels=h.htmlLabels;let c=((vt=h.er)==null?void 0:vt.diagramPadding)??10,u=((qt=h.er)==null?void 0:qt.entityPadding)??6;const{cssStyles:p}=t,{labelStyles:d,nodeStyles:m}=Q(t);if(r.attributes.length===0&&t.label){const et={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5};Xe(t.label,h)+et.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const X=await wi(e,t,et);if(i!=null&&Mc.has(i)){const wt=r.colorIndex??0;X.attr("data-color-id",`color-${wt%l.length}`)}if(!Ve(h.htmlLabels)){const wt=X.select("text"),lt=(oe=wt.node())==null?void 0:oe.getBBox();wt.attr("transform",`translate(${-lt.width/2}, 0)`)}return X}h.htmlLabels||(c*=1.25,u*=1.25);let g=it(t);g||(g="node default");const y=e.insert("g").attr("class",g).attr("id",t.domId||t.id),C=await Gr(y,t.label??"",h,0,0,["name"],d);C.height+=u;let b=0;const k=[],w=[];let S=0,B=0,M=0,v=0,W=!0,D=!0;for(const et of r.attributes){const X=await Gr(y,et.type,h,0,b,["attribute-type"],d);S=Math.max(S,X.width+c);const wt=await Gr(y,et.name,h,0,b,["attribute-name"],d);B=Math.max(B,wt.width+c);const lt=await Gr(y,et.keys.join(),h,0,b,["attribute-keys"],d);M=Math.max(M,lt.width+c);const Be=await Gr(y,et.comment,h,0,b,["attribute-comment"],d);v=Math.max(v,Be.width+c);const kt=Math.max(X.height,wt.height,lt.height,Be.height)+u;w.push({yOffset:b,rowHeight:kt}),b+=kt}let I=4;M<=c&&(W=!1,M=0,I--),v<=c&&(D=!1,v=0,I--);const Y=y.node().getBBox();if(C.width+c*2-(S+B+M+v)>0){const et=C.width+c*2-(S+B+M+v);S+=et/I,B+=et/I,M>0&&(M+=et/I),v>0&&(v+=et/I)}const H=S+B+M+v,R=Z.svg(y),E=K(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let L=0;w.length>0&&(L=w.reduce((et,X)=>et+((X==null?void 0:X.rowHeight)??0),0));const O=Math.max(Y.width+c*2,(t==null?void 0:t.width)||0,H),A=Math.max((L??0)+C.height,(t==null?void 0:t.height)||0),_=-O/2,q=-A/2;if(y.selectAll("g:not(:first-child)").each((et,X,wt)=>{const lt=ht(wt[X]),Be=lt.attr("transform");let kt=0,Qe=0;if(Be){const ue=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Be);ue&&(kt=parseFloat(ue[1]),Qe=parseFloat(ue[2]),lt.attr("class").includes("attribute-name")?kt+=S:lt.attr("class").includes("attribute-keys")?kt+=S+B:lt.attr("class").includes("attribute-comment")&&(kt+=S+B+M))}lt.attr("transform",`translate(${_+c/2+kt}, ${Qe+q+C.height+u/2})`)}),y.select(".name").attr("transform","translate("+-C.width/2+", "+(q+u/2)+")"),i!=null&&Mc.has(i)){const et=r.colorIndex??0;y.attr("data-color-id",`color-${et%l.length}`)}const V=R.rectangle(_,q,O,A,E),ut=y.insert(()=>V,":first-child").attr("class","outer-path").attr("style",p.join(""));k.push(0);for(const[et,X]of w.entries()){const lt=(et+1)%2===0&&X.yOffset!==0,Be=R.rectangle(_,C.height+q+(X==null?void 0:X.yOffset),O,X==null?void 0:X.rowHeight,{...E,fill:lt?a:o,stroke:n});y.insert(()=>Be,"g.label").attr("style",p.join("")).attr("class",`row-rect-${lt?"even":"odd"}`)}const gt=1e-4;let dt=jr(_,C.height+q,O+_,C.height+q,gt),Ct=R.polygon(dt.map(et=>[et.x,et.y]),E);if(y.insert(()=>Ct).attr("class","divider"),dt=jr(S+_,C.height+q,S+_,A+q,gt),Ct=R.polygon(dt.map(et=>[et.x,et.y]),E),y.insert(()=>Ct).attr("class","divider"),W){const et=S+B+_;dt=jr(et,C.height+q,et,A+q,gt),Ct=R.polygon(dt.map(X=>[X.x,X.y]),E),y.insert(()=>Ct).attr("class","divider")}if(D){const et=S+B+M+_;dt=jr(et,C.height+q,et,A+q,gt),Ct=R.polygon(dt.map(X=>[X.x,X.y]),E),y.insert(()=>Ct).attr("class","divider")}for(const et of k){const X=C.height+q+et;dt=jr(_,X,O+_,X,gt),Ct=R.polygon(dt.map(wt=>[wt.x,wt.y]),E),y.insert(()=>Ct).attr("class","divider")}if(J(t,ut),m&&t.look!=="handDrawn")if(i!=null&&tS.has(i))y.selectAll("path").attr("style",m);else{const et=m.split(";"),X=(ce=et==null?void 0:et.filter(wt=>wt.includes("stroke")))==null?void 0:ce.map(wt=>`${wt}`).join("; ");y.selectAll("path").attr("style",X??""),y.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(et){return j.rect(t,et)},y}f($l,"erBox");async function Gr(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!==Th(t)&&(t=Th(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await Ze(n,t,{width:Xe(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(Ve(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(Gr,"addText");function jr(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(jr,"lineToPolygon");async function Qg(e,t,r,i,s=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",it(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 Ui(n,{text:`«${b}»`},0),u=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Ui(l,t,0,["font-weight: bolder"]);const m=l.node().getBBox();p=m.height,h=o.insert("g").attr("class","members-group text");let g=0;for(const b of t.members){const k=await Ui(h,b,g,[b.parseClassifier()]);g+=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 Ui(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(${-m.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(Qg,"textHelper");async function Ui(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Bt();let o="useHtmlLabels"in t?t.useHtmlLabels:Ve(a.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),Ji(n)&&(o=!0);const l=await Ze(s,Wn(Er(n)),{width:Xe(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 m=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(g=>new Promise(y=>{function C(){var b;if(g.style.display="flex",g.style.flexDirection="column",m){const k=((b=a.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,S=parseInt(k,10)*5+"px";g.style.minWidth=S,g.style.maxWidth=S}else g.style.width="100%";y(g)}f(C,"setupImage"),setTimeout(()=>{g.complete&&C()}),g.addEventListener("error",C),g.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(Ui,"addText");async function Jg(e,t){var R,E;const r=xt(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,o=a,n=t.useHtmlLabels??Ve(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await Qg(e,t,r,n,o),{labelStyles:u,nodeStyles:p}=Q(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=((R=l.styles)==null?void 0:R.join(";"))||p||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const m=l.members.length===0&&l.methods.length===0&&!((E=r.class)!=null&&E.hideEmptyMembersBox),g=Z.svg(h),y=K(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 w=-C/2,S=-b/2;let B=m?a*2:l.members.length===0&&l.methods.length===0?-a:0;k&&(B=a*2);const M=g.rectangle(w-a,S-a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0),C+2*a,b+2*a+B,y),v=h.insert(()=>M,":first-child");v.attr("class","basic label-container outer-path");const W=v.node().getBBox(),D=h.select(".annotation-group").node().getBBox().height-(m?a/2:0)||0,I=h.select(".label-group").node().getBBox().height-(m?a/2:0)||0,Y=h.select(".members-group").node().getBBox().height-(m?a/2:0)||0,H=(D+I+S+a-(S-a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(h.selectAll(".text").each((L,O,A)=>{var dt,Ct;const _=ht(A[O]),q=_.attr("transform");let V=0;if(q){const qt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(q);qt&&(V=parseFloat(qt[2]))}let ut=V+S+a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(_.attr("class").includes("methods-group")){const vt=Math.max(Y,o/2);k?ut=Math.max(H,D+I+vt+S+o*2+a)+o*2:ut=D+I+vt+S+o*4+a}l.members.length===0&&l.methods.length===0&&((dt=r.class)!=null&&dt.hideEmptyMembersBox)&&(l.annotations.length>0?ut=V-o:ut=V),n||(ut-=4);let gt=w;(_.attr("class").includes("label-group")||_.attr("class").includes("annotation-group"))&&(gt=-((Ct=_.node())==null?void 0:Ct.getBBox().width)/2||0,h.selectAll("text").each(function(vt,qt,oe){window.getComputedStyle(oe[qt]).textAnchor==="middle"&&(gt=0)})),_.attr("transform",`translate(${gt}, ${ut})`)}),l.members.length>0||l.methods.length>0||m){const L=D+I+S+a,O=g.line(W.x,L,W.x+W.width,L+.001,y);h.insert(()=>O).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(m||l.members.length>0||l.methods.length>0){const L=D+I+Y+S+o*2+a,O=g.line(W.x,k?Math.max(H,L):L,W.x+W.width,(k?Math.max(H,L):L)+.001,y);h.insert(()=>O).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&h.selectAll("path").attr("style",d),v.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 L=RegExp(/color\s*:\s*([^;]*)/),O=L.exec(d);if(O){const A=O[0].replace("color","fill");h.selectAll("tspan").attr("style",A)}else if(u){const A=L.exec(u);if(A){const _=A[0].replace("color","fill");h.selectAll("tspan").attr("style",_)}}}return J(t,v),t.intersect=function(L){return j.rect(t,L)},h}f(Jg,"classBox");async function tm(e,t){var W,D;const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t,a=t,o=20,n=20,l="verifyMethod"in t,h=it(t),{themeVariables:c}=xt(),{borderColorArray:u,requirementEdgeLabelBackground:p}=c,d=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let m;l?m=await Me(d,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):m=await Me(d,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let g=m;const y=await Me(d,s.name,g,t.labelStyle+"; font-weight: bold;");if(g+=y+n,l){const I=await Me(d,`${s.requirementId?`ID: ${s.requirementId}`:""}`,g,t.labelStyle);g+=I;const Y=await Me(d,`${s.text?`Text: ${s.text}`:""}`,g,t.labelStyle);g+=Y;const H=await Me(d,`${s.risk?`Risk: ${s.risk}`:""}`,g,t.labelStyle);g+=H,await Me(d,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,g,t.labelStyle)}else{const I=await Me(d,`${a.type?`Type: ${a.type}`:""}`,g,t.labelStyle);g+=I,await Me(d,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,g,t.labelStyle)}const C=(((W=d.node())==null?void 0:W.getBBox().width)??200)+o,b=(((D=d.node())==null?void 0:D.getBBox().height)??200)+o,k=-C/2,w=-b/2,S=Z.svg(d),B=K(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const M=S.rectangle(k,w,C,b,B),v=d.insert(()=>M,":first-child");if(v.attr("class","basic label-container outer-path").attr("style",i),u!=null&&u.length){const I=t.colorIndex??0;d.attr("data-color-id",`color-${I%u.length}`)}if(d.selectAll(".label").each((I,Y,H)=>{const R=ht(H[Y]),E=R.attr("transform");let L=0,O=0;if(E){const V=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(E);V&&(L=parseFloat(V[1]),O=parseFloat(V[2]))}const A=O-b/2;let _=k+o/2;(Y===0||Y===1)&&(_=L),R.attr("transform",`translate(${_}, ${A+o})`)}),g>m+y+n){const I=w+m+y+n;let Y;if(t.look==="neo"){const E=[[k,I],[k+C,I],[k+C,I+.001],[k,I+.001]];Y=S.polygon(E,B)}else Y=S.line(k,I,k+C,I,B);d.insert(()=>Y).attr("class","divider")}return J(t,v),t.intersect=function(I){return j.rect(t,I)},i&&t.look!=="handDrawn"&&(p||u!=null&&u.length)&&d.selectAll("path").attr("style",i),d}f(tm,"requirementBox");async function Me(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),a=xt(),o=a.htmlLabels??!0,n=await Ze(s,Wn(Er(t)),{width:Xe(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(Me,"addText");var eS=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 em(e,t,{config:r}){var Y,H;const{labelStyles:i,nodeStyles:s}=Q(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:h}=await st(e,t,it(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 m,g;p?{label:m,bbox:g}=await Eo(p,"ticket"in t&&t.ticket||"",d):{label:m,bbox:g}=await Eo(n,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:C}=await Eo(n,"assigned"in t&&t.assigned||"",d);t.width=o;const b=10,k=(t==null?void 0:t.width)||0,w=Math.max(g.height,C.height)/2,S=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+w,B=-k/2,M=-S/2;h.attr("transform","translate("+(c-k/2)+", "+(-w-l.height/2)+")"),m.attr("transform","translate("+(c-k/2)+", "+(-w+l.height/2)+")"),y.attr("transform","translate("+(c+k/2-C.width-2*a)+", "+(-w+l.height/2)+")");let v;const{rx:W,ry:D}=t,{cssStyles:I}=t;if(t.look==="handDrawn"){const R=Z.svg(n),E=K(t,{}),L=W||D?R.path(pr(B,M,k,S,W||0),E):R.rectangle(B,M,k,S,E);v=n.insert(()=>L,":first-child"),v.attr("class","basic label-container").attr("style",I||null)}else{v=n.insert("rect",":first-child"),v.attr("class","basic label-container __APA__").attr("style",s).attr("rx",W??5).attr("ry",D??5).attr("x",B).attr("y",M).attr("width",k).attr("height",S);const R="priority"in t&&t.priority;if(R){const E=n.append("line"),L=B+2,O=M+Math.floor((W??0)/2),A=M+S-Math.floor((W??0)/2);E.attr("x1",L).attr("y1",O).attr("x2",L).attr("y2",A).attr("stroke-width","4").attr("stroke",eS(R))}}return J(t,v),t.height=S,t.intersect=function(R){return j.rect(t,R)},n}f(em,"kanbanItem");async function rm(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await st(e,t,it(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,m=Math.max(l,p),g=Math.max(h,d);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let y;const C=`M0 0
239
240
  a${c},${c} 1 0,0 ${m*.25},${-1*g*.1}
240
241
  a${c},${c} 1 0,0 ${m*.25},0
241
242
  a${c},${c} 1 0,0 ${m*.25},0
@@ -253,7 +254,7 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
253
254
  a${c},${c} 1 0,0 ${-1*m*.1},${-1*g*.33}
254
255
  a${c*.8},${c*.8} 1 0,0 0,${-1*g*.34}
255
256
  a${c},${c} 1 0,0 ${m*.1},${-1*g*.33}
256
- H0 V0 Z`;if(t.look==="handDrawn"){const b=G.svg(s),k=X(t,{}),T=b.path(C,k);y=s.insert(()=>T,":first-child"),y.attr("class","basic label-container").attr("style",Pt(u))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return y.attr("transform",`translate(${-m/2}, ${-g/2})`),K(t,y),t.calcIntersect=function(b,k){return U.rect(b,k)},t.intersect=function(b){return q.info("Bang intersect",t,b),U.rect(t,b)},s}f(Dg,"bang");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await st(e,t,rt(t)),l=a.width+2*o,h=a.height+2*o,c=.15*l,u=.25*l,p=.35*l,d=.2*l,{cssStyles:m}=t;let g;const y=`M0 0
257
+ H0 V0 Z`;if(t.look==="handDrawn"){const b=Z.svg(s),k=K(t,{}),w=b.path(C,k);y=s.insert(()=>w,":first-child"),y.attr("class","basic label-container").attr("style",Nt(u))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return y.attr("transform",`translate(${-m/2}, ${-g/2})`),J(t,y),t.calcIntersect=function(b,k){return j.rect(b,k)},t.intersect=function(b){return z.info("Bang intersect",t,b),j.rect(t,b)},s}f(rm,"bang");async function im(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await st(e,t,it(t)),l=a.width+2*o,h=a.height+2*o,c=.15*l,u=.25*l,p=.35*l,d=.2*l,{cssStyles:m}=t;let g;const y=`M0 0
257
258
  a${c},${c} 0 0,1 ${l*.25},${-1*l*.1}
258
259
  a${p},${p} 1 0,1 ${l*.4},${-1*l*.1}
259
260
  a${u},${u} 1 0,1 ${l*.35},${l*.2}
@@ -267,7 +268,7 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
267
268
 
268
269
  a${c},${c} 1 0,1 ${-1*l*.1},${-1*h*.35}
269
270
  a${d},${d} 1 0,1 ${l*.1},${-1*h*.65}
270
- H0 V0 Z`;if(t.look==="handDrawn"){const C=G.svg(s),b=X(t,{}),k=C.path(y,b);g=s.insert(()=>k,":first-child"),g.attr("class","basic label-container").attr("style",Pt(m))}else g=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),g.attr("transform",`translate(${-l/2}, ${-h/2})`),K(t,g),t.calcIntersect=function(C,b){return U.rect(C,b)},t.intersect=function(C){return q.info("Cloud intersect",t,C),U.rect(t,C)},s}f(Rg,"cloud");async function Pg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await st(e,t,rt(t)),l=a.width+8*o,h=a.height+2*o,c=5,u=t.look==="neo"?`
271
+ H0 V0 Z`;if(t.look==="handDrawn"){const C=Z.svg(s),b=K(t,{}),k=C.path(y,b);g=s.insert(()=>k,":first-child"),g.attr("class","basic label-container").attr("style",Nt(m))}else g=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),g.attr("transform",`translate(${-l/2}, ${-h/2})`),J(t,g),t.calcIntersect=function(C,b){return j.rect(C,b)},t.intersect=function(C){return z.info("Cloud intersect",t,C),j.rect(t,C)},s}f(im,"cloud");async function sm(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await st(e,t,it(t)),l=a.width+8*o,h=a.height+2*o,c=5,u=t.look==="neo"?`
271
272
  M${-l/2} ${h/2-c}
272
273
  v${-h+2*c}
273
274
  q0,-${c} ${c},-${c}
@@ -287,22 +288,22 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
287
288
  h${-(l-2*c)}
288
289
  q${-c},0 ${-c},${-c}
289
290
  Z
290
- `;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,m){return U.rect(d,m)},t.intersect=function(d){return U.rect(t,d)},s}f(Pg,"defaultMindmapNode");async function Ng(e,t){const r={padding:t.padding??0};return ml(e,t,r)}f(Ng,"mindmapCircle");var Cw=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:mg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:pg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:yg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:kg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Nf},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:qf},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:ml},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Dg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Rg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:cg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Xf},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:ig},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:rg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Bg},{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:tg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:zf},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Sg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Ef},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:fg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:bg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:xg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Uf},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:jf},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:If},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Df},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Rf},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:sg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Fg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Gf},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:_g},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:ag},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Pf},{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:Lg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Eg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Hf},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:vg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Yf},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:gg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:lg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:ng},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Af},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Of},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:wg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Tg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Ag},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:ug},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:og}],xw=f(()=>{const t=[...Object.entries({state:Cg,choice:Mf,note:hg,rectWithTitle:dg,labelRect:eg,iconSquare:Qf,iconCircle:Zf,icon:Vf,iconRounded:Kf,imageSquare:Jf,anchor:Lf,kanbanItem:Ig,mindmapCircle:Ng,defaultMindmapNode:Pg,classBox:$g,erBox:yl,requirementBox:Og}),...Cw.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),qg=xw();function bw(e){return e in qg}f(bw,"isValidShape");var Ra=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?qg[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",Pt(t.look)),t.tooltip&&s.attr("title",t.tooltip),Ra.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}f(Wg,"insertNode");var jv=f((e,t)=>{Ra.set(t.id,e)},"setNodeElem"),Vv=f(()=>{Ra.clear()},"clear"),Zv=f(e=>{const t=Ra.get(e.id);q.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"),kw=f((e,t,r,i,s,a=!1,o)=>{t.arrowTypeStart&&dc(e,"start",t.arrowTypeStart,r,i,s,a,o),t.arrowTypeEnd&&dc(e,"end",t.arrowTypeEnd,r,i,s,a,o)},"addEdgeMarkers"),Tw={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}},ww=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],dc=f((e,t,r,i,s,a,o=!1,n)=>{var m;const l=Tw[r],h=l&&ww.includes(l.type);if(!l){q.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 g=n.replace(/[^\dA-Za-z]/g,"_"),y=`${d}_${g}`;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(T=>{T.setAttribute("stroke",n),l.fill&&T.setAttribute("fill",n)}),(m=C.parentNode)==null||m.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),Sw=f(e=>{var t,r;return typeof e=="string"?e:(r=(t=gt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),ba=new Map,Wt=new Map,Kv=f(()=>{ba.clear(),Wt.clear()},"clear"),Fi=f(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),_w=f(async(e,t)=>{const r=gt();let i=Jt(r);const{labelStyles:s}=V(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 Ve(e,t.label,{style:Fi(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(h),q.info("abc82",t,t.labelType);let c=h.getBBox(),u=c;if(i){const d=h.children[0],m=ct(h);c=d.getBoundingClientRect(),u=c,m.attr("width",c.width),m.attr("height",c.height)}else{const d=ct(h).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}o.attr("transform",Si(u,i)),ba.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"),m=d.insert("g").attr("class","inner"),g=await Je(m,t.startLabelLeft,Fi(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const C=g.children[0],b=ct(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Si(y,i)),Wt.get(t.id)||Wt.set(t.id,{}),Wt.get(t.id).startLeft=d,Pi(p,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await Je(m,t.startLabelRight,Fi(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const C=g.children[0],b=ct(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Si(y,i)),Wt.get(t.id)||Wt.set(t.id,{}),Wt.get(t.id).startRight=d,Pi(p,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await Je(d,t.endLabelLeft,Fi(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const C=g.children[0],b=ct(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Si(y,i)),Wt.get(t.id)||Wt.set(t.id,{}),Wt.get(t.id).endLeft=d,Pi(p,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await Je(d,t.endLabelRight,Fi(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const C=g.children[0],b=ct(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Si(y,i)),Wt.get(t.id)||Wt.set(t.id,{}),Wt.get(t.id).endRight=d,Pi(p,t.endLabelRight)}return h},"insertEdgeLabel");function Pi(e,t){Jt(gt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}f(Pi,"setTerminalWidth");var Bw=f((e,t)=>{q.debug("Moving label abc88 ",e.id,e.label,ba.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=gt(),{subGraphTitleTotalMargin:s}=il(i);if(e.label){const a=ba.get(e.id);let o=e.x,n=e.y;if(r){const l=ke.calcLabelPosition(r);q.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=Wt.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=ke.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=Wt.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=ke.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=Wt.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=ke.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=Wt.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=ke.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),vw=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"),Lw=f((e,t,r)=>{q.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()),J(t,p),t.calcIntersect=function(d,m){return j.rect(d,m)},t.intersect=function(d){return j.rect(t,d)},s}f(sm,"defaultMindmapNode");async function am(e,t){const r={padding:t.padding??0};return Ml(e,t,r)}f(am,"mindmapCircle");var rS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Dg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:$g},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Rg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:zg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:ag},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:og},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Ml},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:rm},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:im},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Ag},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:pg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:wg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Tg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Gg},{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:bg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:lg},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Yg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Kf},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Og},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:qg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Ng},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ug},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:fg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:eg},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:rg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:ig},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Sg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Vg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:dg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Ug},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:_g},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:sg},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:ng},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Xg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Kg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:hg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:jg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:cg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Ig},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Lg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:vg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Zf},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:tg},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Hg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Wg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Zg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Eg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Bg}],iS=f(()=>{const t=[...Object.entries({state:Pg,choice:Qf,note:Fg,rectWithTitle:Mg,labelRect:kg,iconSquare:Cg,iconCircle:mg,icon:gg,iconRounded:yg,imageSquare:xg,anchor:Xf,kanbanItem:em,mindmapCircle:am,defaultMindmapNode:sm,classBox:Jg,erBox:$l,requirementBox:tm}),...rS.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),om=iS();function sS(e){return e in om}f(sS,"isValidShape");var Ga=new Map;async function nm(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?om[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),Ga.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}f(nm,"insertNode");var ML=f((e,t)=>{Ga.set(t.id,e)},"setNodeElem"),$L=f(()=>{Ga.clear()},"clear"),OL=f(e=>{const t=Ga.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"),aS=f((e,t,r,i,s,a=!1,o)=>{t.arrowTypeStart&&$c(e,"start",t.arrowTypeStart,r,i,s,a,o),t.arrowTypeEnd&&$c(e,"end",t.arrowTypeEnd,r,i,s,a,o)},"addEdgeMarkers"),oS={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}},nS=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],$c=f((e,t,r,i,s,a,o=!1,n)=>{var m;const l=oS[r],h=l&&nS.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 g=n.replace(/[^\dA-Za-z]/g,"_"),y=`${d}_${g}`;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(w=>{w.setAttribute("stroke",n),l.fill&&w.setAttribute("fill",n)}),(m=C.parentNode)==null||m.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),lS=f(e=>{var t,r;return typeof e=="string"?e:(r=(t=xt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Fa=new Map,Ht=new Map,IL=f(()=>{Fa.clear(),Ht.clear()},"clear"),Ri=f(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),hS=f(async(e,t)=>{const r=xt();let i=ee(r);const{labelStyles:s}=Q(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 Ze(e,t.label,{style:Ri(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],m=ht(h);c=d.getBoundingClientRect(),u=c,m.attr("width",c.width),m.attr("height",c.height)}else{const d=ht(h).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}o.attr("transform",Mi(u,i)),Fa.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"),m=d.insert("g").attr("class","inner"),g=await ar(m,t.startLabelLeft,Ri(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const C=g.children[0],b=ht(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Mi(y,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).startLeft=d,Gi(p,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await ar(m,t.startLabelRight,Ri(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const C=g.children[0],b=ht(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Mi(y,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).startRight=d,Gi(p,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await ar(d,t.endLabelLeft,Ri(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const C=g.children[0],b=ht(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Mi(y,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).endLeft=d,Gi(p,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await ar(d,t.endLabelRight,Ri(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const C=g.children[0],b=ht(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Mi(y,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).endRight=d,Gi(p,t.endLabelRight)}return h},"insertEdgeLabel");function Gi(e,t){ee(xt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}f(Gi,"setTerminalWidth");var cS=f((e,t)=>{z.debug("Moving label abc88 ",e.id,e.label,Fa.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=xt(),{subGraphTitleTotalMargin:s}=xl(i);if(e.label){const a=Fa.get(e.id);let o=e.x,n=e.y;if(r){const l=be.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=Ht.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=be.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=Ht.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=be.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=Ht.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=be.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=Ht.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=be.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),uS=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"),dS=f((e,t,r)=>{z.debug(`intersection calc abc89:
291
292
  outsidePoint: ${JSON.stringify(t)}
292
293
  insidePoint : ${JSON.stringify(r)}
293
- 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),q.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 q.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"),pc=f((e,t)=>{q.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(q.info("abc88 checking point",a,t),!vw(t,a)&&!s){const o=Lw(t,i,a);q.debug("abc88 inside",a,i,o),q.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)?q.warn("abc88 no intersect",o,r):r.push(o),s=!0}else q.warn("abc88 outside",a,i),i=a,s||r.push(a)}),q.debug("returning points",r),r},"cutPathAtIntersect");function zg(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(zg,"extractCornerPoints");var fc=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"),Fw=f(function(e){const{cornerPointPositions:t}=zg(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=fc(s,o,5),l=fc(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){q.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 q.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"),Aw=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"),Ew=f(function(e,t,r,i,s,a,o,n=!1){var O;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=gt();let h=t.points,c=!1;const u=s;var p=a;const d=[];for(const A in t.cssCompiledStyles)Np(A)||d.push(t.cssCompiledStyles[A]);q.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])),q.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 m=btoa(JSON.stringify(h));t.toCluster&&(q.info("to cluster abc88",r.get(t.toCluster)),h=pc(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(q.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=pc(h.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let g=h.filter(A=>!Number.isNaN(A.y));const y=Sw(t.curve);y!=="rounded"&&(g=Fw(g));let C=zi;switch(y){case"linear":C=zi;break;case"basis":C=Do;break;case"cardinal":C=Bu;break;case"bumpX":C=ku;break;case"bumpY":C=Tu;break;case"catmullRom":C=Lu;break;case"monotoneX":C=Ou;break;case"monotoneY":C=Iu;break;case"natural":C=Ru;break;case"step":C=Pu;break;case"stepAfter":C=qu;break;case"stepBefore":C=Nu;break;case"rounded":C=zi;break;default:C=Do}const{x:b,y:k}=_1(t),T=lk().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 B,$=y==="rounded"?Hg(Yg(g,t),5):T(g);const v=Array.isArray(t.style)?t.style:[t.style];let W=v.find(A=>A==null?void 0:A.startsWith("stroke:")),P="";t.animate&&(P="edge-animation-fast"),t.animation&&(P="edge-animation-"+t.animation);let M=!1;if(t.look==="handDrawn"){const A=G.svg(e);Object.assign([],g);const S=A.path($,{roughness:.3,seed:l});w+=" transition",B=ct(S).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(P?" "+P:"")).attr("style",v?v.reduce((Z,ut)=>Z+";"+ut,""):"");let N=B.attr("d");B.attr("d",N),e.node().appendChild(B.node())}else{const A=d.join(";"),S=v?v.reduce((tt,bt)=>tt+bt+";",""):"",N=(A?A+";"+S+";":S)+";"+(v?v.reduce((tt,bt)=>tt+";"+bt,""):"");B=e.append("path").attr("d",$).attr("id",`${o}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(P?" "+P:"")).attr("style",N),W=(O=N.match(/stroke:([^;]+)/))==null?void 0:O[1],M=t.animate===!0||!!t.animation||A.includes("animation");const Z=B.node(),ut=typeof Z.getTotalLength=="function"?Z.getTotalLength():0,it=Lh[t.arrowTypeStart]||0,dt=Lh[t.arrowTypeEnd]||0;if(t.look==="neo"&&!M){const bt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Aw(ut,it,dt):`0 ${it} ${ut-it-dt} ${dt}`}; stroke-dashoffset: 0;`;B.attr("style",bt+B.attr("style"))}}B.attr("data-edge",!0),B.attr("data-et","edge"),B.attr("data-id",t.id),B.attr("data-points",m),B.attr("data-look",Pt(t.look)),t.showPoints&&g.forEach(A=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",A.x).attr("cy",A.y)});let Y="";(gt().flowchart.arrowMarkerAbsolute||gt().state.arrowMarkerAbsolute)&&(Y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,Y=Y.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),q.info("arrowTypeStart",t.arrowTypeStart),q.info("arrowTypeEnd",t.arrowTypeEnd);const z=!M&&(t==null?void 0:t.look)==="neo";kw(B,t,Y,o,i,z,W);const I=Math.floor(h.length/2),E=h[I];ke.isLabelCoordinateInPath(E,B.attr("d"))||(c=!0);let F={};return c&&(F.updatedPath=h),F.originalPath=t.points,F},"insertEdge");function Hg(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),m=Math.hypot(u,p);if(d<s||m<s){r+=`L${o.x},${o.y}`;continue}const g=h/d,y=c/d,C=u/m,b=p/m,k=g*C+y*b,T=Math.max(-1,Math.min(1,k)),w=Math.acos(T);if(w<s||Math.abs(Math.PI-w)<s){r+=`L${o.x},${o.y}`;continue}const B=Math.min(t/Math.sin(w/2),d/2,m/2),$=o.x-g*B,v=o.y-y*B,W=o.x+C*B,P=o.y+b*B;r+=`L${$},${v}`,r+=`Q${o.x},${o.y} ${W},${P}`}}return r}f(Hg,"generateRoundedPath");function pn(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(pn,"calculateDeltaAndAngle");function Yg(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}=pn(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}=pn(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(Yg,"applyMarkerOffsetsToPoints");var Mw=f((e,t,r,i)=>{t.forEach(s=>{eS[s](e,r,i)})},"insertMarkers"),$w=f((e,t,r)=>{q.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"),Ow=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"),Iw=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"),Dw=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"),Rw=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"),Pw=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"),Nw=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"),qw=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"),Ww=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"),zw=f((e,t,r)=>{const i=St(),{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"),Hw=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"),Yw=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"),Uw=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"),Gw=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"),Xw=f((e,t,r)=>{const i=St(),{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"),jw=f((e,t,r)=>{const i=St(),{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"),Vw=f((e,t,r)=>{const i=St(),{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"),Zw=f((e,t,r)=>{const i=St(),{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"),Kw=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"),Oc=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),!uS(t,a)&&!s){const o=dS(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 lm(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(lm,"extractCornerPoints");var Ic=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"),pS=f(function(e){const{cornerPointPositions:t}=lm(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=Ic(s,o,5),l=Ic(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"),fS=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"),gS=f(function(e,t,r,i,s,a,o,n=!1){var O;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=xt();let h=t.points,c=!1;const u=s;var p=a;const d=[];for(const A in t.cssCompiledStyles)of(A)||d.push(t.cssCompiledStyles[A]);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 m=btoa(JSON.stringify(h));t.toCluster&&(z.info("to cluster abc88",r.get(t.toCluster)),h=Oc(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=Oc(h.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let g=h.filter(A=>!Number.isNaN(A.y));const y=lS(t.curve);y!=="rounded"&&(g=pS(g));let C=Zi;switch(y){case"linear":C=Zi;break;case"basis":C=Qo;break;case"cardinal":C=Gu;break;case"bumpX":C=zu;break;case"bumpY":C=Wu;break;case"catmullRom":C=Xu;break;case"monotoneX":C=td;break;case"monotoneY":C=ed;break;case"natural":C=id;break;case"step":C=sd;break;case"stepAfter":C=od;break;case"stepBefore":C=ad;break;case"rounded":C=Zi;break;default:C=Qo}const{x:b,y:k}=h2(t),w=Gk().x(b).y(k).curve(C);let S;switch(t.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-invisible";break;default:S="edge-thickness-normal"}switch(t.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break;default:S+=" edge-pattern-solid"}let B,M=y==="rounded"?hm(cm(g,t),5):w(g);const v=Array.isArray(t.style)?t.style:[t.style];let W=v.find(A=>A==null?void 0:A.startsWith("stroke:")),D="";t.animate&&(D="edge-animation-fast"),t.animation&&(D="edge-animation-"+t.animation);let I=!1;if(t.look==="handDrawn"){const A=Z.svg(e);Object.assign([],g);const _=A.path(M,{roughness:.3,seed:l});S+=" transition",B=ht(_).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",v?v.reduce((V,ut)=>V+";"+ut,""):"");let q=B.attr("d");B.attr("d",q),e.node().appendChild(B.node())}else{const A=d.join(";"),_=v?v.reduce((Ct,vt)=>Ct+vt+";",""):"",q=(A?A+";"+_+";":_)+";"+(v?v.reduce((Ct,vt)=>Ct+";"+vt,""):"");B=e.append("path").attr("d",M).attr("id",`${o}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",q),W=(O=q.match(/stroke:([^;]+)/))==null?void 0:O[1],I=t.animate===!0||!!t.animation||A.includes("animation");const V=B.node(),ut=typeof V.getTotalLength=="function"?V.getTotalLength():0,gt=Vh[t.arrowTypeStart]||0,dt=Vh[t.arrowTypeEnd]||0;if(t.look==="neo"&&!I){const vt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?fS(ut,gt,dt):`0 ${gt} ${ut-gt-dt} ${dt}`}; stroke-dashoffset: 0;`;B.attr("style",vt+B.attr("style"))}}B.attr("data-edge",!0),B.attr("data-et","edge"),B.attr("data-id",t.id),B.attr("data-points",m),B.attr("data-look",Nt(t.look)),t.showPoints&&g.forEach(A=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",A.x).attr("cy",A.y)});let Y="";(xt().flowchart.arrowMarkerAbsolute||xt().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=!I&&(t==null?void 0:t.look)==="neo";aS(B,t,Y,o,i,H,W);const R=Math.floor(h.length/2),E=h[R];be.isLabelCoordinateInPath(E,B.attr("d"))||(c=!0);let L={};return c&&(L.updatedPath=h),L.originalPath=t.points,L},"insertEdge");function hm(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),m=Math.hypot(u,p);if(d<s||m<s){r+=`L${o.x},${o.y}`;continue}const g=h/d,y=c/d,C=u/m,b=p/m,k=g*C+y*b,w=Math.max(-1,Math.min(1,k)),S=Math.acos(w);if(S<s||Math.abs(Math.PI-S)<s){r+=`L${o.x},${o.y}`;continue}const B=Math.min(t/Math.sin(S/2),d/2,m/2),M=o.x-g*B,v=o.y-y*B,W=o.x+C*B,D=o.y+b*B;r+=`L${M},${v}`,r+=`Q${o.x},${o.y} ${W},${D}`}}return r}f(hm,"generateRoundedPath");function Fn(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(Fn,"calculateDeltaAndAngle");function cm(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&jt[t.arrowTypeStart]){const s=jt[t.arrowTypeStart],a=e[0],o=e[1],{angle:n}=Fn(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&&jt[t.arrowTypeEnd]){const s=jt[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:n}=Fn(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(cm,"applyMarkerOffsetsToPoints");var mS=f((e,t,r,i)=>{t.forEach(s=>{NS[s](e,r,i)})},"insertMarkers"),yS=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"),CS=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"),xS=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"),bS=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"),kS=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"),TS=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"),wS=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"),SS=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"),_S=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"),BS=f((e,t,r)=>{const i=Bt(),{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"),vS=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"),LS=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"),FS=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"),AS=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"),ES=f((e,t,r)=>{const i=Bt(),{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"),MS=f((e,t,r)=>{const i=Bt(),{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"),$S=f((e,t,r)=>{const i=Bt(),{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"),OS=f((e,t,r)=>{const i=Bt(),{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"),IS=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
295
  L20,10
295
296
  M20,10
296
- L0,20`)},"requirement_arrow"),Qw=f((e,t,r)=>{const i=St(),{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"),DS=f((e,t,r)=>{const i=Bt(),{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
298
  L20,10
298
299
  M20,10
299
- L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Jw=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"),tS=f((e,t,r)=>{const i=St(),{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"),eS={extension:$w,composition:Ow,aggregation:Iw,dependency:Dw,lollipop:Rw,point:Pw,circle:Nw,cross:qw,barb:Ww,barbNeo:zw,only_one:Hw,zero_or_one:Yw,one_or_more:Uw,zero_or_more:Gw,only_one_neo:Xw,zero_or_one_neo:jw,one_or_more_neo:Vw,zero_or_more_neo:Zw,requirement_arrow:Kw,requirement_contains:Jw,requirement_arrow_neo:Qw,requirement_contains_neo:tS},rS=Mw,iS={common:ss,getConfig:St,insertCluster:tw,insertEdge:Ew,insertEdgeLabel:_w,insertMarkers:rS,insertNode:Wg,interpolateToCurve:Kn,labelHelper:st,log:q,positionEdgeLabel:Bw},es={},Ug=f(e=>{for(const t of e)es[t.name]=t},"registerLayoutLoaders"),sS=f(()=>{Ug([{name:"dagre",loader:f(async()=>await ft(()=>import("./dagre-BM42HDAG-1wR5aSmA.js"),__vite__mapDeps([0,1,2,3,4])),"loader")},{name:"cose-bilkent",loader:f(async()=>await ft(()=>import("./cose-bilkent-S5V4N54A-D0XjEe4_.js"),__vite__mapDeps([5,6,3,4])),"loader")}])},"registerDefaultLayoutLoaders");sS();var Qv=f(async(e,t)=>{if(!(e.layoutAlgorithm in es))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=es[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,iS,{algorithm:r.algorithm})},"render"),Jv=f((e="",{fallback:t="dagre"}={})=>{if(e in es)return e;if(t in es)return q.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"),Cl="comm",Gg="rule",Xg="decl",aS="@media",oS="@import",nS="@supports",lS="@namespace",fn="@keyframes",jg="@layer",hS="@scope",cS=Math.abs,Yi=String.fromCharCode;function Vg(e){return e.trim()}function gn(e,t,r){return e.replace(t,r)}function Yr(e,t){return e.charCodeAt(t)|0}function ui(e,t,r){return e.slice(t,r)}function Me(e){return e.length}function Zg(e){return e.length}function Fs(e,t){return t.push(e),e}var Pa=1,di=1,Kg=0,fe=0,At=0,mi="";function xl(e,t,r,i,s,a,o,n){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:Pa,column:di,length:o,return:"",siblings:n}}function uS(){return At}function dS(){return At=fe>0?Yr(mi,--fe):0,di--,At===10&&(di=1,Pa--),At}function we(){return At=fe<Kg?Yr(mi,fe++):0,di++,At===10&&(di=1,Pa++),At}function tr(){return Yr(mi,fe)}function Hs(){return fe}function Na(e,t){return ui(mi,e,t)}function rs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function pS(e){return Pa=di=1,Kg=Me(mi=e),fe=0,[]}function fS(e){return mi="",e}function yo(e){return Vg(Na(fe-1,mn(e===91?e+2:e===40?e+1:e)))}function gS(e){for(;(At=tr())&&At<33;)we();return rs(e)>2||rs(At)>3?"":" "}function mS(e,t){for(;--t&&we()&&!(At<48||At>102||At>57&&At<65||At>70&&At<97););return Na(e,Hs()+(t<6&&tr()==32&&we()==32))}function mn(e){for(;we();)switch(At){case e:return fe;case 34:case 39:e!==34&&e!==39&&mn(At);break;case 40:e===41&&mn(e);break;case 92:we();break}return fe}function yS(e,t){for(;we()&&e+At!==57;)if(e+At===84&&tr()===47)break;return"/*"+Na(t,fe-1)+"*"+Yi(e===47?e:we())}function CS(e){for(;!rs(tr());)we();return Na(e,fe)}function xS(e){return fS(Ys("",null,null,null,[""],e=pS(e),0,[0],e))}function Ys(e,t,r,i,s,a,o,n,l){for(var h=0,c=0,u=o,p=0,d=0,m=0,g=1,y=1,C=1,b=0,k=0,T="",w=s,B=a,$=i,v=T;y;)switch(m=k,k=we()){case 40:m!=108&&Yr(v,u-1)==58?(b++,v+="("):v+=yo(k);break;case 41:b--,v+=")";break;case 34:case 39:case 91:v+=yo(k);break;case 9:case 10:case 13:case 32:if(b>0){v+=Yi(k);break}v+=gS(m);break;case 92:v+=mS(Hs()-1,7);continue;case 47:switch(tr()){case 42:case 47:Fs(bS(yS(we(),Hs()),t,r,l),l),(rs(m||1)==5||rs(tr()||1)==5)&&Me(v)&&ui(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*g:n[h++]=Me(v)*C;case 125*g:case 59:case 0:if(b>0&&k){v+=Yi(k);break}switch(k){case 0:case 125:y=0;case 59+c:C==-1&&(v=gn(v,/\f/g,"")),d>0&&(Me(v)-u||g===0)&&Fs(d>32?mc(v+";",i,r,u-1,l):mc(gn(v," ","")+";",i,r,u-2,l),l);break;case 59:v+=";";default:if(Fs($=gc(v,t,r,h,c,s,n,T,w=[],B=[],u,a),a),k===123)if(c===0)Ys(v,t,$,$,w,a,u,n,B);else{switch(p){case 99:if(Yr(v,3)===110)break;case 108:if(Yr(v,2)===97)break;default:c=0;case 100:case 109:case 115:}c?Ys(e,$,$,i&&Fs(gc(e,$,$,0,0,s,n,T,s,w=[],u,B),B),s,B,u,n,i?w:B):Ys(v,$,$,$,[""],B,0,n,B)}}h=c=d=0,g=C=1,T=v="",u=o;break;case 58:u=1+Me(v),d=m;default:if(g<1){if(k==123)--g;else if(k==125&&g++==0&&dS()==125)continue}switch(v+=Yi(k),k*g){case 38:C=c>0?1:(v+="\f",-1);break;case 44:if(b>0)break;n[h++]=(Me(v)-1)*C,C=1;break;case 64:tr()===45&&(v+=yo(we())),p=tr(),c=u=Me(T=v+=CS(Hs())),k++;break;case 45:m===45&&Me(v)==2&&(g=0)}}return a}function gc(e,t,r,i,s,a,o,n,l,h,c,u){for(var p=s-1,d=s===0?a:[""],m=Zg(d),g=0,y=0,C=0;g<i;++g)for(var b=0,k=ui(e,p+1,p=cS(y=o[g])),T=e;b<m;++b)(T=Vg(y>0?d[b]+" "+k:gn(k,/&\f/g,d[b])))&&(l[C++]=T);return xl(e,t,r,s===0?Gg:n,l,h,c,u)}function bS(e,t,r,i){return xl(e,t,r,Cl,Yi(uS()),ui(e,2,-2),0,i)}function mc(e,t,r,i,s){return xl(e,t,r,Xg,ui(e,0,i),ui(e,i+1,-1),i,s)}function yn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function kS(e,t,r,i){switch(e.type){case jg:if(e.children.length)break;case oS:case lS:case Xg:return e.return=e.return||e.value;case Cl:return"";case fn:return e.return=e.value+"{"+yn(e.children,i)+"}";case Gg:if(!Me(e.value=e.props.join(",")))return""}return Me(r=yn(e.children,i))?e.return=e.value+"{"+r+"}":""}function TS(e){var t=Zg(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 Qg="c4",wS=f(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),SS=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./c4Diagram-AAUBKEIU-GOIrZjrm.js");return{diagram:t}},__vite__mapDeps([7,8,3,4]));return{id:Qg,diagram:e}},"loader"),_S={id:Qg,detector:wS,loader:SS},BS=_S,Jg="flowchart",vS=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"),LS=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-DZCURXAw.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,3,4]));return{id:Jg,diagram:e}},"loader"),FS={id:Jg,detector:vS,loader:LS},AS=FS,tm="flowchart-v2",ES=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"),MS=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-DZCURXAw.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,3,4]));return{id:tm,diagram:e}},"loader"),$S={id:tm,detector:ES,loader:MS},OS=$S,em="er",IS=f(e=>/^\s*erDiagram/.test(e),"detector"),DS=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./erDiagram-TEJ5UH35-CUsMs05D.js");return{diagram:t}},__vite__mapDeps([14,11,12,13,3,4]));return{id:em,diagram:e}},"loader"),RS={id:em,detector:IS,loader:DS},PS=RS,rm="gitGraph",NS=f(e=>/^\s*gitGraph/.test(e),"detector"),qS=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./gitGraphDiagram-PVQCEYII-Du_KX2ik.js");return{diagram:t}},__vite__mapDeps([15,16,17,18,3,4]));return{id:rm,diagram:e}},"loader"),WS={id:rm,detector:NS,loader:qS},zS=WS,im="gantt",HS=f(e=>/^\s*gantt/.test(e),"detector"),YS=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./ganttDiagram-6RSMTGT7-CzMfUd_H.js");return{diagram:t}},__vite__mapDeps([19,20,21,22,3,4]));return{id:im,diagram:e}},"loader"),US={id:im,detector:HS,loader:YS},GS=US,sm="info",XS=f(e=>/^\s*info/.test(e),"detector"),jS=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./infoDiagram-5YYISTIA-D81JEsUe.js");return{diagram:t}},__vite__mapDeps([23,18,3,4]));return{id:sm,diagram:e}},"loader"),VS={id:sm,detector:XS,loader:jS},am="pie",ZS=f(e=>/^\s*pie/.test(e),"detector"),KS=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./pieDiagram-4H26LBE5-DMgTQVGJ.js");return{diagram:t}},__vite__mapDeps([24,16,18,3,4,25,26,21]));return{id:am,diagram:e}},"loader"),QS={id:am,detector:ZS,loader:KS},om="quadrantChart",JS=f(e=>/^\s*quadrantChart/.test(e),"detector"),t_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./quadrantDiagram-W4KKPZXB-B0Gh1bMy.js");return{diagram:t}},__vite__mapDeps([27,20,21,22,3,4]));return{id:om,diagram:e}},"loader"),e_={id:om,detector:JS,loader:t_},r_=e_,nm="xychart",i_=f(e=>/^\s*xychart(-beta)?/.test(e),"detector"),s_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./xychartDiagram-2RQKCTM6-Byds5kce.js");return{diagram:t}},__vite__mapDeps([28,21,26,20,22,3,4]));return{id:nm,diagram:e}},"loader"),a_={id:nm,detector:i_,loader:s_},o_=a_,lm="requirement",n_=f(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),l_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./requirementDiagram-4Y6WPE33-DcIINxfV.js");return{diagram:t}},__vite__mapDeps([29,11,12,3,4]));return{id:lm,diagram:e}},"loader"),h_={id:lm,detector:n_,loader:l_},c_=h_,hm="sequence",u_=f(e=>/^\s*sequenceDiagram/.test(e),"detector"),d_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./sequenceDiagram-3UESZ5HK-D7MMEHjm.js");return{diagram:t}},__vite__mapDeps([30,8,17,3,4]));return{id:hm,diagram:e}},"loader"),p_={id:hm,detector:u_,loader:d_},f_=p_,cm="class",g_=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"),m_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./classDiagram-4FO5ZUOK-BD7T43t0.js");return{diagram:t}},__vite__mapDeps([31,32,10,8,11,12,3,4]));return{id:cm,diagram:e}},"loader"),y_={id:cm,detector:g_,loader:m_},C_=y_,um="classDiagram",x_=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"),b_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./classDiagram-v2-Q7XG4LA2-BD7T43t0.js");return{diagram:t}},__vite__mapDeps([33,32,10,8,11,12,3,4]));return{id:um,diagram:e}},"loader"),k_={id:um,detector:x_,loader:b_},T_=k_,dm="state",w_=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"),S_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./stateDiagram-AJRCARHV-Dvdvjjk8.js");return{diagram:t}},__vite__mapDeps([34,35,11,12,1,2,3,4]));return{id:dm,diagram:e}},"loader"),__={id:dm,detector:w_,loader:S_},B_=__,pm="stateDiagram",v_=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"),L_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./stateDiagram-v2-BHNVJYJU-I2g3TqMC.js");return{diagram:t}},__vite__mapDeps([36,35,11,12,3,4]));return{id:pm,diagram:e}},"loader"),F_={id:pm,detector:v_,loader:L_},A_=F_,fm="journey",E_=f(e=>/^\s*journey/.test(e),"detector"),M_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./journeyDiagram-JHISSGLW-nEajRNFZ.js");return{diagram:t}},__vite__mapDeps([37,10,8,25,3,4]));return{id:fm,diagram:e}},"loader"),$_={id:fm,detector:E_,loader:M_},O_=$_,I_=f((e,t,r)=>{q.debug(`rendering svg for syntax error
300
- `);const i=yk(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Yc(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"),gm={draw:I_},D_=gm,R_={db:{},renderer:gm,parser:{parse:f(()=>{},"parse")}},P_=R_,mm="flowchart-elk",N_=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"),q_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-DZCURXAw.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,3,4]));return{id:mm,diagram:e}},"loader"),W_={id:mm,detector:N_,loader:q_},z_=W_,ym="timeline",H_=f(e=>/^\s*timeline/.test(e),"detector"),Y_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./timeline-definition-PNZ67QCA-DYWt9asA.js");return{diagram:t}},__vite__mapDeps([38,25,3,4]));return{id:ym,diagram:e}},"loader"),U_={id:ym,detector:H_,loader:Y_},G_=U_,Cm="mindmap",X_=f(e=>/^\s*mindmap/.test(e),"detector"),j_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./mindmap-definition-RKZ34NQL-WIFgsLLz.js");return{diagram:t}},__vite__mapDeps([39,11,12,3,4]));return{id:Cm,diagram:e}},"loader"),V_={id:Cm,detector:X_,loader:j_},Z_=V_,xm="kanban",K_=f(e=>/^\s*kanban/.test(e),"detector"),Q_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./kanban-definition-UN3LZRKU-Dvn5P58B.js");return{diagram:t}},__vite__mapDeps([40,10,3,4]));return{id:xm,diagram:e}},"loader"),J_={id:xm,detector:K_,loader:Q_},tB=J_,bm="sankey",eB=f(e=>/^\s*sankey(-beta)?/.test(e),"detector"),rB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./sankeyDiagram-5OEKKPKP-CDnHepHs.js");return{diagram:t}},__vite__mapDeps([41,26,21,3,4]));return{id:bm,diagram:e}},"loader"),iB={id:bm,detector:eB,loader:rB},sB=iB,km="packet",aB=f(e=>/^\s*packet(-beta)?/.test(e),"detector"),oB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-LMA3HP47-bPbOm4sL.js");return{diagram:t}},__vite__mapDeps([42,16,18,3,4]));return{id:km,diagram:e}},"loader"),nB={id:km,detector:aB,loader:oB},Tm="radar",lB=f(e=>/^\s*radar-beta/.test(e),"detector"),hB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-2AECGRRQ-B8L1OTOq.js");return{diagram:t}},__vite__mapDeps([43,16,18,3,4]));return{id:Tm,diagram:e}},"loader"),cB={id:Tm,detector:lB,loader:hB},wm="block",uB=f(e=>/^\s*block(-beta)?/.test(e),"detector"),dB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./blockDiagram-GPEHLZMM-N8A4M5KF.js");return{diagram:t}},__vite__mapDeps([44,10,1,13,3,4]));return{id:wm,diagram:e}},"loader"),pB={id:wm,detector:uB,loader:dB},fB=pB,Sm="treeView",gB=f(e=>/^\s*treeView-beta/.test(e),"detector"),mB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-5GNKFQAL-BPGoGDNx.js");return{diagram:t}},__vite__mapDeps([45,16,17,18,3,4]));return{id:Sm,diagram:e}},"loader"),yB={id:Sm,detector:gB,loader:mB},CB=yB,_m="architecture",xB=f(e=>/^\s*architecture/.test(e),"detector"),bB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./architectureDiagram-3BPJPVTR-CGT8FovT.js");return{diagram:t}},__vite__mapDeps([46,16,18,3,4,6]));return{id:_m,diagram:e}},"loader"),kB={id:_m,detector:xB,loader:bB},TB=kB,Bm="eventmodeling",wB=f(e=>/^\s*eventmodeling/.test(e),"detector"),SB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-KO2AKTUF-Zu0g_DOV.js");return{diagram:t}},__vite__mapDeps([47,16,18,3,4]));return{id:Bm,diagram:e}},"loader"),_B={id:Bm,detector:wB,loader:SB},BB=_B,vm="ishikawa",vB=f(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),LB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./ishikawaDiagram-YF4QCWOH-DwkHFgb8.js");return{diagram:t}},__vite__mapDeps([48,3,4]));return{id:vm,diagram:e}},"loader"),FB={id:vm,detector:vB,loader:LB},Lm="venn",AB=f(e=>/^\s*venn-beta/.test(e),"detector"),EB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./vennDiagram-CIIHVFJN-Bt0VUni_.js");return{diagram:t}},__vite__mapDeps([49,3,4]));return{id:Lm,diagram:e}},"loader"),MB={id:Lm,detector:AB,loader:EB},$B=MB,Fm="treemap",OB=f(e=>/^\s*treemap/.test(e),"detector"),IB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-OG6HWLK6-DWW4aJ4C.js");return{diagram:t}},__vite__mapDeps([50,12,16,18,3,4,22,26,21]));return{id:Fm,diagram:e}},"loader"),DB={id:Fm,detector:OB,loader:IB},Am="wardley-beta",RB=f(e=>/^\s*wardley-beta/i.test(e),"detector"),PB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./wardleyDiagram-YWT4CUSO-Ch7IIKOr.js");return{diagram:t}},__vite__mapDeps([51,16,18,3,4]));return{id:Am,diagram:e}},"loader"),NB={id:Am,detector:RB,loader:PB},qB=NB,yc=!1,qa=f(()=>{yc||(yc=!0,Vs("error",P_,e=>e.toLowerCase().trim()==="error"),Vs("---",{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("---")),ko(z_,Z_,TB),ko(BS,tB,T_,C_,PS,GS,VS,QS,c_,f_,OS,AS,G_,zS,A_,B_,O_,r_,sB,nB,o_,fB,BB,CB,cB,FB,DB,$B,qB))},"addDiagrams"),WB=f(async()=>{q.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(xr).map(async([r,{detector:i,loader:s}])=>{if(s)try{Bo(r)}catch{try{const{diagram:a,id:o}=await s();Vs(o,a,i)}catch(a){throw q.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete xr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){q.error(`Failed to load ${t.length} external diagrams`);for(const r of t)q.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),zB="graphics-document document";function Em(e,t){e.attr("role",zB),t!==""&&e.attr("aria-roledescription",t)}f(Em,"setA11yDiagramInfo");function Mm(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(Mm,"addSVGa11yTitleDescription");var Cr,Cn=(Cr=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=St(),s=kn(t,i);t=b2(t)+`
301
- `;try{Bo(s)}catch{const u=Ry(s);if(!u)throw new Fc(`Diagram ${s} not found.`);const{id:p,diagram:d}=await u();Vs(p,d)}const{db:a,parser:o,renderer:n,init:l}=Bo(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 Cr(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(Cr,"Diagram"),Cr),Cc=[],HB=f(()=>{Cc.forEach(e=>{e()}),Cc=[]},"attachFunctions"),YB=f(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function $m(e){const t=e.match(Lc);if(!t)return{text:e,metadata:{}};let r=S1(t[1],{schema:w1})??{};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($m,"extractFrontMatter");var UB=f(e=>e.replace(/\r\n?/g,`
302
- `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),GB=f(e=>{const{text:t,metadata:r}=$m(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"),XB=f(e=>{const t=ke.detectInit(e)??{},r=ke.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:n2(e),directive:t}},"processDirectives");function bl(e){const t=UB(e),r=GB(t),i=XB(r.text),s=rl(r.config,i.directive);return e=YB(i.text),{code:e,title:r.title,config:s}}f(bl,"preprocessDiagram");function Om(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}f(Om,"toBase64");var jB=5e4,VB="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",ZB="sandbox",KB="loose",QB="http://www.w3.org/2000/svg",JB="http://www.w3.org/1999/xlink",tv="http://www.w3.org/1999/xhtml",ev="100%",rv="100%",iv="border:0;margin:0;",sv="margin:0",av="allow-top-navigation-by-user-activation allow-popups",ov='The "iframe" tag is not supported by your browser.',nv=["foreignobject"],lv=["dominant-baseline"];function kl(e){const t=bl(e);return Xs(),c0(t.config??{}),t}f(kl,"processAndSetConfigs");async function Im(e,t){qa();try{const{code:r,config:i}=kl(e);return{diagramType:(await Rm(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}f(Im,"parse");var xc=f((e,t,r=[])=>{const i=Oc(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),hv=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=>{$h(l.styles)||n.forEach(h=>{r.insertRule(xc(l.id,h,l.styles),r.cssRules.length)}),$h(l.textStyles)||r.insertRule(xc(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=_o(s)+`
300
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),RS=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"),PS=f((e,t,r)=>{const i=Bt(),{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"),NS={extension:yS,composition:CS,aggregation:xS,dependency:bS,lollipop:kS,point:TS,circle:wS,cross:SS,barb:_S,barbNeo:BS,only_one:vS,zero_or_one:LS,one_or_more:FS,zero_or_more:AS,only_one_neo:ES,zero_or_one_neo:MS,one_or_more_neo:$S,zero_or_more_neo:OS,requirement_arrow:IS,requirement_contains:RS,requirement_arrow_neo:DS,requirement_contains_neo:PS},qS=mS,zS={common:ds,getConfig:Bt,insertCluster:Pw,insertEdge:gS,insertEdgeLabel:hS,insertMarkers:qS,insertNode:nm,interpolateToCurve:pl,labelHelper:st,log:z,positionEdgeLabel:cS},hs={},um=f(e=>{for(const t of e)hs[t.name]=t},"registerLayoutLoaders"),WS=f(()=>{um([{name:"dagre",loader:f(async()=>await ft(()=>import("./dagre-BM42HDAG-DcIxclFu.js"),__vite__mapDeps([0,1,2,3,4])),"loader")},{name:"cose-bilkent",loader:f(async()=>await ft(()=>import("./cose-bilkent-S5V4N54A-Br-CySzr.js"),__vite__mapDeps([5,6,3,4])),"loader")}])},"registerDefaultLayoutLoaders");WS();var DL=f(async(e,t)=>{if(!(e.layoutAlgorithm in hs))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=hs[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"),RL=f((e="",{fallback:t="dagre"}={})=>{if(e in hs)return e;if(t in hs)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"),Ol="comm",dm="rule",pm="decl",HS="@media",YS="@import",US="@supports",GS="@namespace",An="@keyframes",fm="@layer",jS="@scope",XS=Math.abs,Qi=String.fromCharCode;function gm(e){return e.trim()}function En(e,t,r){return e.replace(t,r)}function Qr(e,t){return e.charCodeAt(t)|0}function xi(e,t,r){return e.slice(t,r)}function $e(e){return e.length}function mm(e){return e.length}function Ps(e,t){return t.push(e),e}var ja=1,bi=1,ym=0,fe=0,Mt=0,Si="";function Il(e,t,r,i,s,a,o,n){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:ja,column:bi,length:o,return:"",siblings:n}}function VS(){return Mt}function ZS(){return Mt=fe>0?Qr(Si,--fe):0,bi--,Mt===10&&(bi=1,ja--),Mt}function Te(){return Mt=fe<ym?Qr(Si,fe++):0,bi++,Mt===10&&(bi=1,ja++),Mt}function or(){return Qr(Si,fe)}function Qs(){return fe}function Xa(e,t){return xi(Si,e,t)}function cs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function KS(e){return ja=bi=1,ym=$e(Si=e),fe=0,[]}function QS(e){return Si="",e}function $o(e){return gm(Xa(fe-1,Mn(e===91?e+2:e===40?e+1:e)))}function JS(e){for(;(Mt=or())&&Mt<33;)Te();return cs(e)>2||cs(Mt)>3?"":" "}function t_(e,t){for(;--t&&Te()&&!(Mt<48||Mt>102||Mt>57&&Mt<65||Mt>70&&Mt<97););return Xa(e,Qs()+(t<6&&or()==32&&Te()==32))}function Mn(e){for(;Te();)switch(Mt){case e:return fe;case 34:case 39:e!==34&&e!==39&&Mn(Mt);break;case 40:e===41&&Mn(e);break;case 92:Te();break}return fe}function e_(e,t){for(;Te()&&e+Mt!==57;)if(e+Mt===84&&or()===47)break;return"/*"+Xa(t,fe-1)+"*"+Qi(e===47?e:Te())}function r_(e){for(;!cs(or());)Te();return Xa(e,fe)}function i_(e){return QS(Js("",null,null,null,[""],e=KS(e),0,[0],e))}function Js(e,t,r,i,s,a,o,n,l){for(var h=0,c=0,u=o,p=0,d=0,m=0,g=1,y=1,C=1,b=0,k=0,w="",S=s,B=a,M=i,v=w;y;)switch(m=k,k=Te()){case 40:m!=108&&Qr(v,u-1)==58?(b++,v+="("):v+=$o(k);break;case 41:b--,v+=")";break;case 34:case 39:case 91:v+=$o(k);break;case 9:case 10:case 13:case 32:if(b>0){v+=Qi(k);break}v+=JS(m);break;case 92:v+=t_(Qs()-1,7);continue;case 47:switch(or()){case 42:case 47:Ps(s_(e_(Te(),Qs()),t,r,l),l),(cs(m||1)==5||cs(or()||1)==5)&&$e(v)&&xi(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*g:n[h++]=$e(v)*C;case 125*g:case 59:case 0:if(b>0&&k){v+=Qi(k);break}switch(k){case 0:case 125:y=0;case 59+c:C==-1&&(v=En(v,/\f/g,"")),d>0&&($e(v)-u||g===0)&&Ps(d>32?Rc(v+";",i,r,u-1,l):Rc(En(v," ","")+";",i,r,u-2,l),l);break;case 59:v+=";";default:if(Ps(M=Dc(v,t,r,h,c,s,n,w,S=[],B=[],u,a),a),k===123)if(c===0)Js(v,t,M,M,S,a,u,n,B);else{switch(p){case 99:if(Qr(v,3)===110)break;case 108:if(Qr(v,2)===97)break;default:c=0;case 100:case 109:case 115:}c?Js(e,M,M,i&&Ps(Dc(e,M,M,0,0,s,n,w,s,S=[],u,B),B),s,B,u,n,i?S:B):Js(v,M,M,M,[""],B,0,n,B)}}h=c=d=0,g=C=1,w=v="",u=o;break;case 58:u=1+$e(v),d=m;default:if(g<1){if(k==123)--g;else if(k==125&&g++==0&&ZS()==125)continue}switch(v+=Qi(k),k*g){case 38:C=c>0?1:(v+="\f",-1);break;case 44:if(b>0)break;n[h++]=($e(v)-1)*C,C=1;break;case 64:or()===45&&(v+=$o(Te())),p=or(),c=u=$e(w=v+=r_(Qs())),k++;break;case 45:m===45&&$e(v)==2&&(g=0)}}return a}function Dc(e,t,r,i,s,a,o,n,l,h,c,u){for(var p=s-1,d=s===0?a:[""],m=mm(d),g=0,y=0,C=0;g<i;++g)for(var b=0,k=xi(e,p+1,p=XS(y=o[g])),w=e;b<m;++b)(w=gm(y>0?d[b]+" "+k:En(k,/&\f/g,d[b])))&&(l[C++]=w);return Il(e,t,r,s===0?dm:n,l,h,c,u)}function s_(e,t,r,i){return Il(e,t,r,Ol,Qi(VS()),xi(e,2,-2),0,i)}function Rc(e,t,r,i,s){return Il(e,t,r,pm,xi(e,0,i),xi(e,i+1,-1),i,s)}function $n(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function a_(e,t,r,i){switch(e.type){case fm:if(e.children.length)break;case YS:case GS:case pm:return e.return=e.return||e.value;case Ol:return"";case An:return e.return=e.value+"{"+$n(e.children,i)+"}";case dm:if(!$e(e.value=e.props.join(",")))return""}return $e(r=$n(e.children,i))?e.return=e.value+"{"+r+"}":""}function o_(e){var t=mm(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 Cm="c4",n_=f(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),l_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./c4Diagram-AAUBKEIU-kJb6eQJJ.js");return{diagram:t}},__vite__mapDeps([7,8,3,4]));return{id:Cm,diagram:e}},"loader"),h_={id:Cm,detector:n_,loader:l_},c_=h_,xm="flowchart",u_=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"),d_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-CPuYTxJr.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,3,4]));return{id:xm,diagram:e}},"loader"),p_={id:xm,detector:u_,loader:d_},f_=p_,bm="flowchart-v2",g_=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"),m_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-CPuYTxJr.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,3,4]));return{id:bm,diagram:e}},"loader"),y_={id:bm,detector:g_,loader:m_},C_=y_,km="er",x_=f(e=>/^\s*erDiagram/.test(e),"detector"),b_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./erDiagram-TEJ5UH35-smNcu7Lp.js");return{diagram:t}},__vite__mapDeps([14,11,12,13,3,4]));return{id:km,diagram:e}},"loader"),k_={id:km,detector:x_,loader:b_},T_=k_,Tm="gitGraph",w_=f(e=>/^\s*gitGraph/.test(e),"detector"),S_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./gitGraphDiagram-PVQCEYII-eN40bRnz.js");return{diagram:t}},__vite__mapDeps([15,16,17,18,3,4]));return{id:Tm,diagram:e}},"loader"),__={id:Tm,detector:w_,loader:S_},B_=__,wm="gantt",v_=f(e=>/^\s*gantt/.test(e),"detector"),L_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./ganttDiagram-6RSMTGT7-xaV0Djok.js");return{diagram:t}},__vite__mapDeps([19,20,21,22,3,4]));return{id:wm,diagram:e}},"loader"),F_={id:wm,detector:v_,loader:L_},A_=F_,Sm="info",E_=f(e=>/^\s*info/.test(e),"detector"),M_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./infoDiagram-5YYISTIA-xm1BEpfJ.js");return{diagram:t}},__vite__mapDeps([23,18,3,4]));return{id:Sm,diagram:e}},"loader"),$_={id:Sm,detector:E_,loader:M_},_m="pie",O_=f(e=>/^\s*pie/.test(e),"detector"),I_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./pieDiagram-4H26LBE5-oB2YhWwR.js");return{diagram:t}},__vite__mapDeps([24,16,18,3,4,25,26,21]));return{id:_m,diagram:e}},"loader"),D_={id:_m,detector:O_,loader:I_},Bm="quadrantChart",R_=f(e=>/^\s*quadrantChart/.test(e),"detector"),P_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./quadrantDiagram-W4KKPZXB-CmJGRE1L.js");return{diagram:t}},__vite__mapDeps([27,20,21,22,3,4]));return{id:Bm,diagram:e}},"loader"),N_={id:Bm,detector:R_,loader:P_},q_=N_,vm="xychart",z_=f(e=>/^\s*xychart(-beta)?/.test(e),"detector"),W_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./xychartDiagram-2RQKCTM6-7czjL7-G.js");return{diagram:t}},__vite__mapDeps([28,21,26,20,22,3,4]));return{id:vm,diagram:e}},"loader"),H_={id:vm,detector:z_,loader:W_},Y_=H_,Lm="requirement",U_=f(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),G_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./requirementDiagram-4Y6WPE33-Dp-nBLhC.js");return{diagram:t}},__vite__mapDeps([29,11,12,3,4]));return{id:Lm,diagram:e}},"loader"),j_={id:Lm,detector:U_,loader:G_},X_=j_,Fm="sequence",V_=f(e=>/^\s*sequenceDiagram/.test(e),"detector"),Z_=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./sequenceDiagram-3UESZ5HK-jmqrpzCx.js");return{diagram:t}},__vite__mapDeps([30,8,17,3,4]));return{id:Fm,diagram:e}},"loader"),K_={id:Fm,detector:V_,loader:Z_},Q_=K_,Am="class",J_=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"),tB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./classDiagram-4FO5ZUOK-CdoMz3xi.js");return{diagram:t}},__vite__mapDeps([31,32,10,8,11,12,3,4]));return{id:Am,diagram:e}},"loader"),eB={id:Am,detector:J_,loader:tB},rB=eB,Em="classDiagram",iB=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"),sB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./classDiagram-v2-Q7XG4LA2-CdoMz3xi.js");return{diagram:t}},__vite__mapDeps([33,32,10,8,11,12,3,4]));return{id:Em,diagram:e}},"loader"),aB={id:Em,detector:iB,loader:sB},oB=aB,Mm="state",nB=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"),lB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./stateDiagram-AJRCARHV-U6m2A9Wk.js");return{diagram:t}},__vite__mapDeps([34,35,11,12,1,2,3,4]));return{id:Mm,diagram:e}},"loader"),hB={id:Mm,detector:nB,loader:lB},cB=hB,$m="stateDiagram",uB=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"),dB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./stateDiagram-v2-BHNVJYJU-00c0MW6J.js");return{diagram:t}},__vite__mapDeps([36,35,11,12,3,4]));return{id:$m,diagram:e}},"loader"),pB={id:$m,detector:uB,loader:dB},fB=pB,Om="journey",gB=f(e=>/^\s*journey/.test(e),"detector"),mB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./journeyDiagram-JHISSGLW-BfWwpj1w.js");return{diagram:t}},__vite__mapDeps([37,10,8,25,3,4]));return{id:Om,diagram:e}},"loader"),yB={id:Om,detector:gB,loader:mB},CB=yB,xB=f((e,t,r)=>{z.debug(`rendering svg for syntax error
301
+ `);const i=e1(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),cu(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"),Im={draw:xB},bB=Im,kB={db:{},renderer:Im,parser:{parse:f(()=>{},"parse")}},TB=kB,Dm="flowchart-elk",wB=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"),SB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-CPuYTxJr.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,3,4]));return{id:Dm,diagram:e}},"loader"),_B={id:Dm,detector:wB,loader:SB},BB=_B,Rm="timeline",vB=f(e=>/^\s*timeline/.test(e),"detector"),LB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./timeline-definition-PNZ67QCA-uVQ-oiv8.js");return{diagram:t}},__vite__mapDeps([38,25,3,4]));return{id:Rm,diagram:e}},"loader"),FB={id:Rm,detector:vB,loader:LB},AB=FB,Pm="mindmap",EB=f(e=>/^\s*mindmap/.test(e),"detector"),MB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./mindmap-definition-RKZ34NQL-BbNc5LRE.js");return{diagram:t}},__vite__mapDeps([39,11,12,3,4]));return{id:Pm,diagram:e}},"loader"),$B={id:Pm,detector:EB,loader:MB},OB=$B,Nm="kanban",IB=f(e=>/^\s*kanban/.test(e),"detector"),DB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./kanban-definition-UN3LZRKU-Cuij1uoR.js");return{diagram:t}},__vite__mapDeps([40,10,3,4]));return{id:Nm,diagram:e}},"loader"),RB={id:Nm,detector:IB,loader:DB},PB=RB,qm="sankey",NB=f(e=>/^\s*sankey(-beta)?/.test(e),"detector"),qB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./sankeyDiagram-5OEKKPKP-DB5dqk7n.js");return{diagram:t}},__vite__mapDeps([41,26,21,3,4]));return{id:qm,diagram:e}},"loader"),zB={id:qm,detector:NB,loader:qB},WB=zB,zm="packet",HB=f(e=>/^\s*packet(-beta)?/.test(e),"detector"),YB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-LMA3HP47-4o7ohGjJ.js");return{diagram:t}},__vite__mapDeps([42,16,18,3,4]));return{id:zm,diagram:e}},"loader"),UB={id:zm,detector:HB,loader:YB},Wm="radar",GB=f(e=>/^\s*radar-beta/.test(e),"detector"),jB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-2AECGRRQ-C0xPdtMR.js");return{diagram:t}},__vite__mapDeps([43,16,18,3,4]));return{id:Wm,diagram:e}},"loader"),XB={id:Wm,detector:GB,loader:jB},Hm="block",VB=f(e=>/^\s*block(-beta)?/.test(e),"detector"),ZB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./blockDiagram-GPEHLZMM-Dmjj2Ajf.js");return{diagram:t}},__vite__mapDeps([44,10,1,13,3,4]));return{id:Hm,diagram:e}},"loader"),KB={id:Hm,detector:VB,loader:ZB},QB=KB,Ym="treeView",JB=f(e=>/^\s*treeView-beta/.test(e),"detector"),tv=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-5GNKFQAL-B9i7DtoQ.js");return{diagram:t}},__vite__mapDeps([45,16,17,18,3,4]));return{id:Ym,diagram:e}},"loader"),ev={id:Ym,detector:JB,loader:tv},rv=ev,Um="architecture",iv=f(e=>/^\s*architecture/.test(e),"detector"),sv=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./architectureDiagram-3BPJPVTR-iXijJkGs.js");return{diagram:t}},__vite__mapDeps([46,16,18,3,4,6]));return{id:Um,diagram:e}},"loader"),av={id:Um,detector:iv,loader:sv},ov=av,Gm="eventmodeling",nv=f(e=>/^\s*eventmodeling/.test(e),"detector"),lv=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-KO2AKTUF-mwoLS2TK.js");return{diagram:t}},__vite__mapDeps([47,16,18,3,4]));return{id:Gm,diagram:e}},"loader"),hv={id:Gm,detector:nv,loader:lv},cv=hv,jm="ishikawa",uv=f(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),dv=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./ishikawaDiagram-YF4QCWOH-BDIzsJJZ.js");return{diagram:t}},__vite__mapDeps([48,3,4]));return{id:jm,diagram:e}},"loader"),pv={id:jm,detector:uv,loader:dv},Xm="venn",fv=f(e=>/^\s*venn-beta/.test(e),"detector"),gv=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./vennDiagram-CIIHVFJN-By-tXl41.js");return{diagram:t}},__vite__mapDeps([49,3,4]));return{id:Xm,diagram:e}},"loader"),mv={id:Xm,detector:fv,loader:gv},yv=mv,Vm="treemap",Cv=f(e=>/^\s*treemap/.test(e),"detector"),xv=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-OG6HWLK6-C6rhUBe2.js");return{diagram:t}},__vite__mapDeps([50,12,16,18,3,4,22,26,21]));return{id:Vm,diagram:e}},"loader"),bv={id:Vm,detector:Cv,loader:xv},Zm="wardley-beta",kv=f(e=>/^\s*wardley-beta/i.test(e),"detector"),Tv=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./wardleyDiagram-YWT4CUSO-BQMj40Ao.js");return{diagram:t}},__vite__mapDeps([51,16,18,3,4]));return{id:Zm,diagram:e}},"loader"),wv={id:Zm,detector:kv,loader:Tv},Sv=wv,Pc=!1,Va=f(()=>{Pc||(Pc=!0,sa("error",TB,e=>e.toLowerCase().trim()==="error"),sa("---",{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("---")),Ro(BB,OB,ov),Ro(c_,PB,oB,rB,T_,A_,$_,D_,X_,Q_,C_,f_,AB,B_,fB,cB,CB,q_,WB,UB,Y_,QB,cv,rv,XB,pv,bv,yv,Sv))},"addDiagrams"),_v=f(async()=>{z.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(vr).map(async([r,{detector:i,loader:s}])=>{if(s)try{Wo(r)}catch{try{const{diagram:a,id:o}=await s();sa(o,a,i)}catch(a){throw z.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete vr[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"),Bv="graphics-document document";function Km(e,t){e.attr("role",Bv),t!==""&&e.attr("aria-roledescription",t)}f(Km,"setA11yDiagramInfo");function Qm(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(Qm,"addSVGa11yTitleDescription");var Br,On=(Br=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=Bt(),s=Rn(t,i);t=sT(t)+`
302
+ `;try{Wo(s)}catch{const u=k0(s);if(!u)throw new Vc(`Diagram ${s} not found.`);const{id:p,diagram:d}=await u();sa(p,d)}const{db:a,parser:o,renderer:n,init:l}=Wo(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 Br(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(Br,"Diagram"),Br),Nc=[],vv=f(()=>{Nc.forEach(e=>{e()}),Nc=[]},"attachFunctions"),Lv=f(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Jm(e){const t=e.match(Xc);if(!t)return{text:e,metadata:{}};let r=l2(t[1],{schema:n2})??{};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(Jm,"extractFrontMatter");var Fv=f(e=>e.replace(/\r\n?/g,`
303
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Av=f(e=>{const{text:t,metadata:r}=Jm(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"),Ev=f(e=>{const t=be.detectInit(e)??{},r=be.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:U2(e),directive:t}},"processDirectives");function Dl(e){const t=Fv(e),r=Av(t),i=Ev(r.text),s=Cl(r.config,i.directive);return e=Lv(i.text),{code:e,title:r.title,config:s}}f(Dl,"preprocessDiagram");function ty(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}f(ty,"toBase64");var Mv=5e4,$v="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Ov="sandbox",Iv="loose",Dv="http://www.w3.org/2000/svg",Rv="http://www.w3.org/1999/xlink",Pv="http://www.w3.org/1999/xhtml",Nv="100%",qv="100%",zv="border:0;margin:0;",Wv="margin:0",Hv="allow-top-navigation-by-user-activation allow-popups",Yv='The "iframe" tag is not supported by your browser.',Uv=["foreignobject"],Gv=["dominant-baseline"];function Rl(e){const t=Dl(e);return ra(),X0(t.config??{}),t}f(Rl,"processAndSetConfigs");async function ey(e,t){Va();try{const{code:r,config:i}=Rl(e);return{diagramType:(await iy(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}f(ey,"parse");var qc=f((e,t,r=[])=>{const i=tu(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),jv=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=ee(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{tc(l.styles)||n.forEach(h=>{r.insertRule(qc(l.id,h,l.styles),r.cssRules.length)}),tc(l.textStyles)||r.insertRule(qc(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=zo(s)+`
303
304
  `}else i+=`${e.themeCSS}
304
- `;return i+_o(r)},"createCssStyles"),cv=f((e,t)=>yn(xS(`${e}{${t}}`),TS([f(function(i,s,a,o){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===fn)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[aS,nS,jg,hS,"@container","@starting-style"],fn].includes(i.type)||(q.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=Cl))},"addNamespace"),kS])),"compileCSS"),uv=f((e,t,r,i)=>{const s=hv(e,r),a=F0(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return cv(i,a)},"createUserStyles"),dv=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=wr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),pv=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":rv,i=Om(`<body style="${sv}">${e}</body>`);return`<iframe style="width:${ev};height:${r};${iv}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${av}">
305
- ${ov}
306
- </iframe>`},"putIntoIFrame"),bc=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",QB);return s&&o.attr("xmlns:xlink",s),o.append("g"),e},"appendDivSvgG");function xn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}f(xn,"sandboxedIframe");var fv=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"),gv=f(async function(e,t,r){var Y,z,I,E,F,O;qa();const i=kl(t);t=i.code;const s=St();q.debug(s),t.length>((s==null?void 0:s.maxTextSize)??jB)&&(t=VB);const a=`#${e}`,o="i"+e,n="#"+o,l="d"+e,h="#"+l,c=f(()=>{const S=ct(p?n:h).node();S&&"remove"in S&&S.remove()},"removeTempElements");let u=ct(document.body);const p=s.securityLevel===ZB,d=s.securityLevel===KB,m=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const A=xn(ct(r),o);u=ct(A.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=ct(r);bc(u,e,l,`font-family: ${m}`,JB)}else{if(fv(document,e,l,o),p){const A=xn(ct(document.body),o);u=ct(A.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=ct("body");bc(u,e,l)}let g,y;try{g=await Cn.fromText(t,{title:i.title})}catch(A){if(s.suppressErrorRendering)throw c(),A;g=await Cn.fromText("error"),y=A}const C=u.select(h).node(),b=g.type,k=C.firstChild,T=k.firstChild,w=(z=(Y=g.renderer).getClasses)==null?void 0:z.call(Y,t,g),B=uv(s,b,w,a),$=document.createElement("style");$.innerHTML=B,k.insertBefore($,T);try{await g.renderer.draw(t,e,"11.15.0",g)}catch(A){throw s.suppressErrorRendering?c():D_.draw(t,e,"11.15.0"),A}const v=u.select(`${h} svg`),W=(E=(I=g.db).getAccTitle)==null?void 0:E.call(I),P=(O=(F=g.db).getAccDescription)==null?void 0:O.call(F);Pm(b,v,W,P),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",tv);let M=u.select(h).node().innerHTML;if(q.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),M=dv(M,p,je(s.arrowMarkerAbsolute)),p){const A=u.select(h+" svg").node();M=pv(M,A)}else d||(M=ai.sanitize(M,{ADD_TAGS:nv,ADD_ATTR:lv,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(HB(),y)throw y;return c(),{diagramType:b,svg:M,bindFunctions:g.db.bindFunctions}},"render");function Dm(e={}){var i;const t=It({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),l0(t),t!=null&&t.theme&&t.theme in Ye?t.themeVariables=Ye[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Ye.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?n0(t):Ic();bn(r.logLevel),qa()}f(Dm,"initialize");var Rm=f((e,t={})=>{const{code:r}=bl(e);return Cn.fromText(r,t)},"getDiagramFromText");function Pm(e,t,r,i){Em(t,e),Mm(t,r,i,t.attr("id"))}f(Pm,"addA11yInfo");var _r=Object.freeze({render:gv,parse:Im,getDiagramFromText:Rm,initialize:Dm,getConfig:St,setConfig:Dc,getSiteConfig:Ic,updateSiteConfig:h0,reset:f(()=>{Xs()},"reset"),globalReset:f(()=>{Xs(oi)},"globalReset"),defaultConfig:oi});bn(St().logLevel);Xs(St());var mv=f((e,t,r)=>{q.warn(e),el(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"),Nm=f(async function(e={querySelector:".mermaid"}){try{await yv(e)}catch(t){if(el(t)&&q.error(t.str),he.parseError&&he.parseError(t),!e.suppressErrors)throw q.error("Use the suppressErrors option to suppress these errors"),t}},"run"),yv=f(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=_r.getConfig();q.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");q.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(q.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),_r.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new ke.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(s)){if(q.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${a.next()}`;o=l.innerHTML,o=Qp(ke.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const c=ke.detectInit(o);c&&q.debug("Detected early reinit: ",c);try{const{svg:u,bindFunctions:p}=await Hm(h,o,l);l.innerHTML=u,e&&await e(h),p&&p(l)}catch(u){mv(u,n,he.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),qm=f(function(e){_r.initialize(e)},"initialize"),Cv=f(async function(e,t,r){q.warn("mermaid.init is deprecated. Please use run instead."),e&&qm(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Nm(i)},"init"),xv=f(async(e,{lazyLoad:t=!0}={})=>{qa(),ko(...e),t===!1&&await WB()},"registerExternalDiagrams"),Wm=f(function(){if(he.startOnLoad){const{startOnLoad:e}=_r.getConfig();e&&he.run().catch(t=>q.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Wm,!1);var bv=f(function(e){he.parseError=e},"setParseErrorHandler"),ka=[],Co=!1,zm=f(async()=>{if(!Co){for(Co=!0;ka.length>0;){const e=ka.shift();if(e)try{await e()}catch(t){q.error("Error executing queue",t)}}Co=!1}},"executeQueue"),kv=f(async(e,t)=>new Promise((r,i)=>{const s=f(()=>new Promise((a,o)=>{_r.parse(e,t).then(n=>{a(n),r(n)},n=>{var l;q.error("Error parsing",n),(l=he.parseError)==null||l.call(he,n),o(n),i(n)})}),"performCall");ka.push(s),zm().catch(i)}),"parse"),Hm=f((e,t,r)=>new Promise((i,s)=>{const a=f(()=>new Promise((o,n)=>{_r.render(e,t,r).then(l=>{o(l),i(l)},l=>{var h;q.error("Error parsing",l),(h=he.parseError)==null||h.call(he,l),n(l),s(l)})}),"performCall");ka.push(a),zm().catch(s)}),"render"),Tv=f(()=>Object.keys(xr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),he={startOnLoad:!0,mermaidAPI:_r,parse:kv,render:Hm,init:Cv,run:Nm,registerExternalDiagrams:xv,registerLayoutLoaders:Ug,initialize:qm,parseError:void 0,contentLoaded:Wm,setParseErrorHandler:bv,detectType:kn,registerIconPacks:vT,getRegisteredDiagramsMetadata:Tv},wv=he;/*! Check if previously processed *//*!
305
+ `;return i+zo(r)},"createCssStyles"),Xv=f((e,t)=>$n(i_(`${e}{${t}}`),o_([f(function(i,s,a,o){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===An)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[HS,US,fm,jS,"@container","@starting-style"],An].includes(i.type)||(z.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=Ol))},"addNamespace"),a_])),"compileCSS"),Vv=f((e,t,r,i)=>{const s=jv(e,r),a=pC(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return Xv(i,a)},"createUserStyles"),Zv=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=Er(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),Kv=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":qv,i=ty(`<body style="${Wv}">${e}</body>`);return`<iframe style="width:${Nv};height:${r};${zv}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${Hv}">
306
+ ${Yv}
307
+ </iframe>`},"putIntoIFrame"),zc=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",Dv);return s&&o.attr("xmlns:xlink",s),o.append("g"),e},"appendDivSvgG");function In(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}f(In,"sandboxedIframe");var Qv=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"),Jv=f(async function(e,t,r){var Y,H,R,E,L,O;Va();const i=Rl(t);t=i.code;const s=Bt();z.debug(s),t.length>((s==null?void 0:s.maxTextSize)??Mv)&&(t=$v);const a=`#${e}`,o="i"+e,n="#"+o,l="d"+e,h="#"+l,c=f(()=>{const _=ht(p?n:h).node();_&&"remove"in _&&_.remove()},"removeTempElements");let u=ht(document.body);const p=s.securityLevel===Ov,d=s.securityLevel===Iv,m=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const A=In(ht(r),o);u=ht(A.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=ht(r);zc(u,e,l,`font-family: ${m}`,Rv)}else{if(Qv(document,e,l,o),p){const A=In(ht(document.body),o);u=ht(A.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=ht("body");zc(u,e,l)}let g,y;try{g=await On.fromText(t,{title:i.title})}catch(A){if(s.suppressErrorRendering)throw c(),A;g=await On.fromText("error"),y=A}const C=u.select(h).node(),b=g.type,k=C.firstChild,w=k.firstChild,S=(H=(Y=g.renderer).getClasses)==null?void 0:H.call(Y,t,g),B=Vv(s,b,S,a),M=document.createElement("style");M.innerHTML=B,k.insertBefore(M,w);try{await g.renderer.draw(t,e,"11.15.0",g)}catch(A){throw s.suppressErrorRendering?c():bB.draw(t,e,"11.15.0"),A}const v=u.select(`${h} svg`),W=(E=(R=g.db).getAccTitle)==null?void 0:E.call(R),D=(O=(L=g.db).getAccDescription)==null?void 0:O.call(L);sy(b,v,W,D),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",Pv);let I=u.select(h).node().innerHTML;if(z.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),I=Zv(I,p,Ve(s.arrowMarkerAbsolute)),p){const A=u.select(h+" svg").node();I=Kv(I,A)}else d||(I=pi.sanitize(I,{ADD_TAGS:Uv,ADD_ATTR:Gv,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(vv(),y)throw y;return c(),{diagramType:b,svg:I,bindFunctions:g.db.bindFunctions}},"render");function ry(e={}){var i;const t=It({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),G0(t),t!=null&&t.theme&&t.theme in Ue?t.themeVariables=Ue[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Ue.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?U0(t):eu();Dn(r.logLevel),Va()}f(ry,"initialize");var iy=f((e,t={})=>{const{code:r}=Dl(e);return On.fromText(r,t)},"getDiagramFromText");function sy(e,t,r,i){Km(t,e),Qm(t,r,i,t.attr("id"))}f(sy,"addA11yInfo");var $r=Object.freeze({render:Jv,parse:ey,getDiagramFromText:iy,initialize:ry,getConfig:Bt,setConfig:ru,getSiteConfig:eu,updateSiteConfig:j0,reset:f(()=>{ra()},"reset"),globalReset:f(()=>{ra(fi)},"globalReset"),defaultConfig:fi});Dn(Bt().logLevel);ra(Bt());var tL=f((e,t,r)=>{z.warn(e),yl(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"),ay=f(async function(e={querySelector:".mermaid"}){try{await eL(e)}catch(t){if(yl(t)&&z.error(t.str),le.parseError&&le.parseError(t),!e.suppressErrors)throw z.error("Use the suppressErrors option to suppress these errors"),t}},"run"),eL=f(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=$r.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)),$r.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new be.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=xf(be.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const c=be.detectInit(o);c&&z.debug("Detected early reinit: ",c);try{const{svg:u,bindFunctions:p}=await hy(h,o,l);l.innerHTML=u,e&&await e(h),p&&p(l)}catch(u){tL(u,n,le.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),oy=f(function(e){$r.initialize(e)},"initialize"),rL=f(async function(e,t,r){z.warn("mermaid.init is deprecated. Please use run instead."),e&&oy(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await ay(i)},"init"),iL=f(async(e,{lazyLoad:t=!0}={})=>{Va(),Ro(...e),t===!1&&await _v()},"registerExternalDiagrams"),ny=f(function(){if(le.startOnLoad){const{startOnLoad:e}=$r.getConfig();e&&le.run().catch(t=>z.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",ny,!1);var sL=f(function(e){le.parseError=e},"setParseErrorHandler"),Aa=[],Oo=!1,ly=f(async()=>{if(!Oo){for(Oo=!0;Aa.length>0;){const e=Aa.shift();if(e)try{await e()}catch(t){z.error("Error executing queue",t)}}Oo=!1}},"executeQueue"),aL=f(async(e,t)=>new Promise((r,i)=>{const s=f(()=>new Promise((a,o)=>{$r.parse(e,t).then(n=>{a(n),r(n)},n=>{var l;z.error("Error parsing",n),(l=le.parseError)==null||l.call(le,n),o(n),i(n)})}),"performCall");Aa.push(s),ly().catch(i)}),"parse"),hy=f((e,t,r)=>new Promise((i,s)=>{const a=f(()=>new Promise((o,n)=>{$r.render(e,t,r).then(l=>{o(l),i(l)},l=>{var h;z.error("Error parsing",l),(h=le.parseError)==null||h.call(le,l),n(l),s(l)})}),"performCall");Aa.push(a),ly().catch(s)}),"render"),oL=f(()=>Object.keys(vr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),le={startOnLoad:!0,mermaidAPI:$r,parse:aL,render:hy,init:rL,run:ay,registerExternalDiagrams:iL,registerLayoutLoaders:um,initialize:oy,parseError:void 0,contentLoaded:ny,setParseErrorHandler:sL,detectType:Rn,registerIconPacks:uw,getRegisteredDiagramsMetadata:oL},nL=le;/*! Check if previously processed *//*!
307
308
  * Wait for document loaded before starting the execution
308
- */const tL=Object.freeze(Object.defineProperty({__proto__:null,default:wv},Symbol.toStringTag,{value:"Module"}));export{Uc as $,Fv as A,er as B,sy as C,St as D,P0 as E,rl as F,$c as G,d2 as H,yk as I,w1 as J,Hy as K,Ui as L,vv as M,Ea as N,C0 as O,Hc as P,eh as Q,lk as R,Do as S,u2 as T,is as U,_e as V,D as W,R as X,B0 as Y,i2 as Z,f as _,M0 as a,Ew as a$,sk as a0,On as a1,$v as a2,Dv as a3,Mr as a4,kh as a5,bh as a6,Pv as a7,Rv as a8,Iv as a9,vp as aA,z1 as aB,W1 as aC,q1 as aD,N1 as aE,Lp as aF,U1 as aG,Y1 as aH,H1 as aI,X1 as aJ,G1 as aK,D1 as aL,_1 as aM,Jt as aN,Ve as aO,Si as aP,il as aQ,Op as aR,wr as aS,Pp as aT,wc as aU,rS as aV,Vv as aW,Kv as aX,Xv as aY,K as aZ,jv as a_,Ev as aa,Mv as ab,Ov as ac,qv as ad,Nv as ae,tw as af,Wg as ag,Zv as ah,nt as ai,Oe as aj,tl as ak,G as al,FT as am,Xn as an,jn as ao,Ns as ap,R1 as aq,P1 as ar,Bp as as,_p as at,Sp as au,$1 as av,E1 as aw,M1 as ax,O1 as ay,I1 as az,E0 as b,Bw as b0,_w as b1,ak as b2,Bv as b3,Jm as b4,cs as b5,vT as b6,BT as b7,An as b8,Qe as b9,ji as ba,fh as bb,Px as bc,V as bd,Np as be,ae as bf,Ex as bg,Fn as bh,au as bi,os as bj,lu as bk,Av as bl,iy as bm,tL as bn,gt as c,ct as d,Yc as e,It as f,O0 as g,Xe as h,Se as i,L1 as j,ss as k,q as l,Dp as m,Lv as n,Jv as o,I0 as p,D0 as q,Qv as r,$0 as s,S1 as t,ke as u,bw as v,g2 as w,Wv as x,ai as y,A0 as z};
309
+ */const PL=Object.freeze(Object.defineProperty({__proto__:null,default:nL},Symbol.toStringTag,{value:"Module"}));export{uu as $,pL as A,nr as B,$y as C,Bt as D,TC as E,Cl as F,Jc as G,Z2 as H,e1 as I,n2 as J,v0 as K,Ji as L,uL as M,qa as N,rC as O,hu as P,Th as Q,Gk as R,Qo as S,V2 as T,us as U,Se as V,P as W,N as X,cC as Y,z2 as Z,f as _,mC as a,gS as a$,Wk as a0,Zn as a1,yL as a2,bL as a3,zr as a4,Wh as a5,zh as a6,TL as a7,kL as a8,xL as a9,jp as aA,B2 as aB,_2 as aC,S2 as aD,w2 as aE,Xp as aF,F2 as aG,L2 as aH,v2 as aI,E2 as aJ,A2 as aK,b2 as aL,h2 as aM,ee as aN,Ze as aO,Mi as aP,xl as aQ,tf as aR,Er as aS,af as aT,Yc as aU,qS as aV,$L as aW,IL as aX,EL as aY,J as aZ,ML as a_,gL as aa,mL as ab,CL as ac,SL as ad,wL as ae,Pw as af,nm as ag,OL as ah,nt as ai,Ie as aj,ml as ak,Z as al,pw as am,hl as an,cl as ao,Xs as ap,k2 as aq,T2 as ar,Gp as as,Up as at,Yp as au,y2 as av,g2 as aw,m2 as ax,C2 as ay,x2 as az,gC as b,cS as b0,hS as b1,Hk as b2,cL as b3,Ly as b4,Cs as b5,uw as b6,cw as b7,Gn as b8,ir as b9,rs as ba,Ih as bb,Tb as bc,Q as bd,of as be,ae as bf,gb as bg,Un as bh,_u as bi,fs as bj,Lu as bk,fL as bl,My as bm,PL as bn,xt as c,ht as d,cu as e,It as f,CC as g,Xe as h,we as i,d2 as j,ds as k,z as l,rf as m,dL as n,RL as o,xC as p,bC as q,DL as r,yC as s,l2 as t,be as u,sS as v,J2 as w,_L as x,pi as y,fC as z};