@bkm016/basalt 0.1.10 → 0.1.11

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 (188) hide show
  1. package/{chunk-0mjb3sm3.js → chunk-jymx3a77.js} +165 -152
  2. package/{chunk-3mqf9ped.js → chunk-zq32mwxj.js} +110 -110
  3. package/compiled.js +1 -1
  4. package/package.json +1 -1
  5. package/ui-test-worker.js +1 -1
  6. package/web/{chunk-9yfftz38.js → chunk-05mvzx00.js} +1 -1
  7. package/web/chunk-086dshck.js +1 -0
  8. package/web/chunk-0fy590s0.js +1 -0
  9. package/web/{chunk-se4h6wx0.js → chunk-0hvxb5d5.js} +1 -1
  10. package/web/chunk-0mdf1qja.js +1 -0
  11. package/web/{chunk-w3zgfhjb.js → chunk-0y971zgq.js} +2 -2
  12. package/web/{chunk-j89s11x8.js → chunk-1t38sgrk.js} +2 -2
  13. package/web/{chunk-z4bp6p32.js → chunk-1zfxaafq.js} +1 -1
  14. package/web/{chunk-g7kz8f7q.js → chunk-27812gqr.js} +5 -5
  15. package/web/{chunk-rag65pfs.js → chunk-2ds0a2z1.js} +3 -3
  16. package/web/{chunk-rh3xb76f.js → chunk-2f2agfpj.js} +11 -11
  17. package/web/{chunk-wtvch4ad.js → chunk-2tsxj613.js} +3 -3
  18. package/web/{chunk-y2rzeb4v.js → chunk-2weaa3gn.js} +2 -2
  19. package/web/{chunk-8h2x89tw.js → chunk-3020mmp1.js} +1 -1
  20. package/web/{chunk-mykrm8ba.js → chunk-30aeb767.js} +2 -2
  21. package/web/chunk-32zmk3f5.js +1 -0
  22. package/web/{chunk-rxvm70w5.js → chunk-36dc7tcg.js} +2 -2
  23. package/web/{chunk-j37p0b13.js → chunk-3a57m7xm.js} +3 -3
  24. package/web/{chunk-tt93zbn4.js → chunk-3b4wqmnh.js} +7 -7
  25. package/web/chunk-3d3wnh8a.js +2 -0
  26. package/web/{chunk-zse05v6j.js → chunk-3ftb27f3.js} +8 -8
  27. package/web/{chunk-de40q05r.js → chunk-47mbbmst.js} +3 -3
  28. package/web/chunk-48479gnx.js +1 -0
  29. package/web/{chunk-5v5q13hz.js → chunk-4gc663j0.js} +2 -2
  30. package/web/{chunk-88wd49xe.js → chunk-4rwwtfnd.js} +2 -2
  31. package/web/{chunk-eqndhs21.js → chunk-4wwd3pfz.js} +2 -2
  32. package/web/{chunk-myd6sc76.js → chunk-57pyz29y.js} +2 -2
  33. package/web/{chunk-32ty2xfn.js → chunk-59nk506k.js} +1 -1
  34. package/web/{chunk-m4fxd5d9.js → chunk-5ahx98zj.js} +8 -8
  35. package/web/chunk-6cjm2yr7.js +1 -0
  36. package/web/{chunk-frnh4zqf.js → chunk-6jb2zyp6.js} +2 -2
  37. package/web/{chunk-3eexx7y5.js → chunk-793m5jjh.js} +1 -1
  38. package/web/{chunk-p55vhns6.js → chunk-7dycbjxn.js} +4 -4
  39. package/web/chunk-7ycxz39p.js +1 -0
  40. package/web/{chunk-gw8x1g61.js → chunk-8151c970.js} +1 -1
  41. package/web/{chunk-jccz14ye.js → chunk-885kpj14.js} +2 -2
  42. package/web/{chunk-vasppf6b.js → chunk-8csw0mvf.js} +2 -2
  43. package/web/{chunk-x850q01z.js → chunk-8z7texmv.js} +1 -1
  44. package/web/{chunk-sd3xat3r.js → chunk-90fkdzx3.js} +6 -6
  45. package/web/chunk-94denx9h.js +39 -0
  46. package/web/{chunk-zms6mrqk.js → chunk-96xhmmqz.js} +6 -6
  47. package/web/chunk-9jy8nc4r.js +1 -0
  48. package/web/{chunk-dv1berk6.js → chunk-9kkzmss7.js} +3 -3
  49. package/web/chunk-9wr33d0t.js +1 -0
  50. package/web/{chunk-fmmrthpa.js → chunk-a3pye9ag.js} +3 -3
  51. package/web/chunk-a4tdrxdh.js +1 -0
  52. package/web/chunk-a9fvsyc1.js +1 -0
  53. package/web/chunk-apvbvg4d.js +1 -0
  54. package/web/{chunk-wrevb4ew.js → chunk-b3j07x0n.js} +6 -6
  55. package/web/{chunk-0770q5e1.js → chunk-b6sqwmq7.js} +1 -1
  56. package/web/chunk-bkxcc7v5.js +1 -0
  57. package/web/chunk-bve354k7.js +1 -0
  58. package/web/{chunk-nawxgz87.js → chunk-cbwvfedy.js} +8 -8
  59. package/web/{chunk-x5g1yy12.js → chunk-cpshsp24.js} +1 -1
  60. package/web/chunk-cwpxakby.js +1 -0
  61. package/web/chunk-d3f763n7.js +2 -0
  62. package/web/{chunk-grm2208k.js → chunk-d4519smc.js} +14 -14
  63. package/web/chunk-de29pe57.js +1 -0
  64. package/web/chunk-dk0fnj87.js +1 -0
  65. package/web/{chunk-c57f714b.js → chunk-drchr3yn.js} +2 -2
  66. package/web/chunk-dsbyfvwz.js +1 -0
  67. package/web/{chunk-xtn305fd.js → chunk-dtrh40vr.js} +1 -1
  68. package/web/chunk-e68jw0bg.js +1 -0
  69. package/web/{chunk-tfqarvdx.js → chunk-e763h2px.js} +67 -67
  70. package/web/{chunk-pgwf37s2.js → chunk-enryqmj7.js} +5 -5
  71. package/web/{chunk-jke2ev6m.js → chunk-f79ajymt.js} +2 -2
  72. package/web/{chunk-qq6m2my8.js → chunk-fj753yzt.js} +2 -2
  73. package/web/{chunk-5svqfj4g.js → chunk-g0rtcedn.js} +3 -3
  74. package/web/{chunk-18neka5g.js → chunk-g31dbnzm.js} +4 -4
  75. package/web/{chunk-1ev0n3n4.js → chunk-g4as4zzd.js} +4 -4
  76. package/web/{chunk-6e87m0nm.js → chunk-gten0rpx.js} +2 -2
  77. package/web/{chunk-sjkg40ay.js → chunk-gyhr27dm.js} +1 -1
  78. package/web/{chunk-js6kb05s.js → chunk-hjyev38w.js} +6 -6
  79. package/web/{chunk-rwfmccmh.js → chunk-hm8thq7c.js} +4 -4
  80. package/web/{chunk-07agqp8h.js → chunk-j4gvtszc.js} +2 -2
  81. package/web/chunk-jd7npyv9.js +8 -0
  82. package/web/chunk-jhpg2kcf.js +1 -0
  83. package/web/{chunk-qdzy124b.js → chunk-jqqbkdtw.js} +2 -2
  84. package/web/chunk-jzz5htxp.js +1 -0
  85. package/web/chunk-ka3q31t1.js +1 -0
  86. package/web/chunk-kahab58k.js +1139 -0
  87. package/web/{chunk-q4bst4an.js → chunk-kfbgvh0c.js} +1 -1
  88. package/web/chunk-krgvx75q.js +1 -0
  89. package/web/chunk-kxeaj44h.js +1 -0
  90. package/web/chunk-m1rdyvb5.js +1 -0
  91. package/web/{chunk-z5qn0xev.js → chunk-m24yb8md.js} +2 -2
  92. package/web/chunk-m7k4wr3k.js +1 -0
  93. package/web/chunk-mdj3r75b.js +1 -0
  94. package/web/{chunk-h5ckjk48.js → chunk-mpdeqzc9.js} +10 -10
  95. package/web/{chunk-knm82fw9.js → chunk-mykbcvqz.js} +1 -1
  96. package/web/{chunk-1qh7f5kr.js → chunk-n33753da.js} +1 -1
  97. package/web/{chunk-yppgejg7.js → chunk-nafe18y9.js} +10 -10
  98. package/web/chunk-nbcpbqq4.js +1 -0
  99. package/web/{chunk-bc3ajvfg.js → chunk-nhx8pw7p.js} +1 -1
  100. package/web/chunk-nkpdd9hw.js +1 -0
  101. package/web/{chunk-eh7wp62z.js → chunk-p1yc8hwn.js} +1 -1
  102. package/web/chunk-p29brxyt.js +1 -0
  103. package/web/chunk-p8fbes0t.js +1 -0
  104. package/web/chunk-pbp1p5ex.js +1 -0
  105. package/web/{chunk-n4yzs2q0.js → chunk-ppjw1mps.js} +4 -4
  106. package/web/{chunk-7tkgbbf9.js → chunk-pq56b3mq.js} +2 -2
  107. package/web/{chunk-vvvd3grf.js → chunk-pzg25qqe.js} +2 -2
  108. package/web/{chunk-t5nvgz7z.js → chunk-q65zxczs.js} +7 -7
  109. package/web/{chunk-g7dc4hrd.js → chunk-q8v5j963.js} +2 -2
  110. package/web/{chunk-zz1qkaar.js → chunk-qykt7avq.js} +2 -2
  111. package/web/chunk-r6q1301x.js +1 -0
  112. package/web/chunk-r8kghrkb.js +1 -0
  113. package/web/chunk-rhxn7mxg.js +1 -0
  114. package/web/{chunk-46jnkghq.js → chunk-rqympya7.js} +2 -2
  115. package/web/{chunk-k0cg4n2k.js → chunk-s0xy00v5.js} +2 -2
  116. package/web/chunk-svqshmpg.js +1 -0
  117. package/web/chunk-swzxq7r3.css +1 -0
  118. package/web/{chunk-905vw286.js → chunk-t18tn37m.js} +2 -2
  119. package/web/chunk-tbsaseer.js +1 -0
  120. package/web/{chunk-rbqnre6q.js → chunk-tggja45g.js} +3 -3
  121. package/web/chunk-tgkdyxbn.js +1 -0
  122. package/web/{chunk-sc63488q.js → chunk-tpdcrrf1.js} +1 -1
  123. package/web/chunk-v0zfnvc1.js +1 -0
  124. package/web/{chunk-tqze6d6b.js → chunk-v3dn9bfw.js} +1 -1
  125. package/web/chunk-vj31fs16.js +1 -0
  126. package/web/chunk-vr79r8vh.js +1 -0
  127. package/web/chunk-wb9tax0m.js +1 -0
  128. package/web/{chunk-26ecc2xh.js → chunk-wbwets5x.js} +19 -19
  129. package/web/chunk-x9eghjjd.js +1 -0
  130. package/web/{chunk-awkdw9rw.js → chunk-xbyrgyy0.js} +2 -2
  131. package/web/{chunk-qy1zx2yw.js → chunk-xjc5fmcr.js} +24 -24
  132. package/web/{chunk-qh62nkem.js → chunk-ydtrc1ay.js} +2 -2
  133. package/web/chunk-yrh86m0n.js +1 -0
  134. package/web/chunk-z3ky5ews.js +2 -0
  135. package/web/{chunk-ehtmb6sn.js → chunk-zdhyq3ch.js} +13 -13
  136. package/web/{chunk-gsw1tv96.js → chunk-zv73g4qq.js} +2 -2
  137. package/web/index.html +1 -1
  138. package/web/chunk-045d3b5d.js +0 -1
  139. package/web/chunk-12qf1r6m.js +0 -1
  140. package/web/chunk-1ex3wgms.js +0 -2
  141. package/web/chunk-2cz7tx8q.js +0 -1
  142. package/web/chunk-4am8j3k3.js +0 -1
  143. package/web/chunk-5qvmefq2.js +0 -1
  144. package/web/chunk-5z2n4z9x.css +0 -1
  145. package/web/chunk-6y55gk1n.js +0 -1
  146. package/web/chunk-7np1jp3x.js +0 -8
  147. package/web/chunk-7qq1ypvj.js +0 -1
  148. package/web/chunk-87e8d1hv.js +0 -1
  149. package/web/chunk-8y2526ve.js +0 -1
  150. package/web/chunk-918e5t4x.js +0 -2
  151. package/web/chunk-96m2m3e8.js +0 -1
  152. package/web/chunk-9f4zzqbx.js +0 -1
  153. package/web/chunk-a1n4468c.js +0 -1
  154. package/web/chunk-arnzrqnm.js +0 -1
  155. package/web/chunk-b46ws7rf.js +0 -1
  156. package/web/chunk-bwy3e58v.js +0 -1
  157. package/web/chunk-d5gshd1a.js +0 -1
  158. package/web/chunk-dp0k5vhd.js +0 -1
  159. package/web/chunk-et1hytyv.js +0 -1
  160. package/web/chunk-f7jpakwh.js +0 -1
  161. package/web/chunk-f9m9seam.js +0 -1
  162. package/web/chunk-g2erm7k0.js +0 -1
  163. package/web/chunk-g3kbn0t2.js +0 -1
  164. package/web/chunk-ght0t49g.js +0 -1
  165. package/web/chunk-ghwm7bdj.js +0 -2
  166. package/web/chunk-gx340asc.js +0 -1
  167. package/web/chunk-h0c42zy3.js +0 -1
  168. package/web/chunk-h2txs73e.js +0 -39
  169. package/web/chunk-h3tkacc7.js +0 -1
  170. package/web/chunk-je78j3vr.js +0 -1
  171. package/web/chunk-kxdtg9dt.js +0 -1
  172. package/web/chunk-m9xzt9p7.js +0 -1
  173. package/web/chunk-mzzaet63.js +0 -1
  174. package/web/chunk-ngt1j8py.js +0 -1139
  175. package/web/chunk-q34as3v6.js +0 -1
  176. package/web/chunk-qe0bgeda.js +0 -1
  177. package/web/chunk-sat7zyva.js +0 -1
  178. package/web/chunk-sk0hpa80.js +0 -1
  179. package/web/chunk-tj1fn8v2.js +0 -1
  180. package/web/chunk-tvcxrx6h.js +0 -1
  181. package/web/chunk-tzpnh70q.js +0 -1
  182. package/web/chunk-vb7g4xg6.js +0 -1
  183. package/web/chunk-wzfe6jtq.js +0 -1
  184. package/web/chunk-xh4xn1az.js +0 -1
  185. package/web/chunk-xk904wqv.js +0 -1
  186. package/web/chunk-xzwxcxb4.js +0 -1
  187. package/web/chunk-yekaz74b.js +0 -1
  188. package/web/chunk-ys2tns0p.js +0 -1
@@ -1,10 +1,10 @@
1
- import{Se,Te,_}from"./chunk-ngt1j8py.js";var Ia=Te(function(Sh,Th){(function(r,e){typeof Sh=="object"&&typeof Th<"u"?Th.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=e()})(Sh,function(){var r=1000,e=60000,i=3600000,s="millisecond",o="second",n="minute",c="hour",h="day",g="week",y="month",f="quarter",B="year",v="date",q="Invalid Date",W=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,H=/\[([^\]]+)]|YYYY|YY|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,Y={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(bt){var st=["th","st","nd","rd"],at=bt%100;return"["+bt+(st[(at-20)%10]||st[at]||st[0])+"]"}},j=function(bt,st,at){var mt=String(bt);return!mt||mt.length>=st?bt:""+Array(st+1-mt.length).join(at)+bt},X={s:j,z:function(bt){var st=-bt.utcOffset(),at=Math.abs(st),mt=Math.floor(at/60),ot=at%60;return(st<=0?"+":"-")+j(mt,2,"0")+":"+j(ot,2,"0")},m:function bt(st,at){if(st.date()<at.date())return-bt(at,st);var mt=12*(at.year()-st.year())+(at.month()-st.month()),ot=st.clone().add(mt,y),wt=at-ot<0,Lt=st.clone().add(mt+(wt?-1:1),y);return+(-(mt+(at-ot)/(wt?ot-Lt:Lt-ot))||0)},a:function(bt){return bt<0?Math.ceil(bt)||0:Math.floor(bt)},p:function(bt){return{M:y,y:B,w:g,d:h,D:v,h:c,m:n,s:o,ms:s,Q:f}[bt]||String(bt||"").toLowerCase().replace(/s$/,"")},u:function(bt){return bt===void 0}},Q="en",rt={};rt[Q]=Y;var it="$isDayjsObject",ct=function(bt){return bt instanceof Bt||!(!bt||!bt[it])},lt=function bt(st,at,mt){var ot;if(!st)return Q;if(typeof st=="string"){var wt=st.toLowerCase();rt[wt]&&(ot=wt),at&&(rt[wt]=at,ot=wt);var Lt=st.split("-");if(!ot&&Lt.length>1)return bt(Lt[0])}else{var Yt=st.name;rt[Yt]=st,ot=Yt}return!mt&&ot&&(Q=ot),ot||!mt&&Q},dt=function(bt,st){if(ct(bt))return bt.clone();var at=typeof st=="object"?st:{};return at.date=bt,at.args=arguments,new Bt(at)},Ct=X;Ct.l=lt,Ct.i=ct,Ct.w=function(bt,st){return dt(bt,{locale:st.$L,utc:st.$u,x:st.$x,$offset:st.$offset})};var Bt=function(){function bt(at){this.$L=lt(at.locale,null,!0),this.parse(at),this.$x=this.$x||at.x||{},this[it]=!0}var st=bt.prototype;return st.parse=function(at){this.$d=function(mt){var{date:ot,utc:wt}=mt;if(ot===null)return new Date(NaN);if(Ct.u(ot))return new Date;if(ot instanceof Date)return new Date(ot);if(typeof ot=="string"&&!/Z$/i.test(ot)){var Lt=ot.match(W);if(Lt){var Yt=Lt[2]-1||0,Ht=(Lt[7]||"0").substring(0,3);return wt?new Date(Date.UTC(Lt[1],Yt,Lt[3]||1,Lt[4]||0,Lt[5]||0,Lt[6]||0,Ht)):new Date(Lt[1],Yt,Lt[3]||1,Lt[4]||0,Lt[5]||0,Lt[6]||0,Ht)}}return new Date(ot)}(at),this.init()},st.init=function(){var at=this.$d;this.$y=at.getFullYear(),this.$M=at.getMonth(),this.$D=at.getDate(),this.$W=at.getDay(),this.$H=at.getHours(),this.$m=at.getMinutes(),this.$s=at.getSeconds(),this.$ms=at.getMilliseconds()},st.$utils=function(){return Ct},st.isValid=function(){return this.$d.toString()!==q},st.isSame=function(at,mt){var ot=dt(at);return this.startOf(mt)<=ot&&ot<=this.endOf(mt)},st.isAfter=function(at,mt){return dt(at)<this.startOf(mt)},st.isBefore=function(at,mt){return this.endOf(mt)<dt(at)},st.$g=function(at,mt,ot){return Ct.u(at)?this[mt]:this.set(ot,at)},st.unix=function(){return Math.floor(this.valueOf()/1000)},st.valueOf=function(){return this.$d.getTime()},st.startOf=function(at,mt){var ot=this,wt=!!Ct.u(mt)||mt,Lt=Ct.p(at),Yt=function(re,ce){var ue=Ct.w(ot.$u?Date.UTC(ot.$y,ce,re):new Date(ot.$y,ce,re),ot);return wt?ue:ue.endOf(h)},Ht=function(re,ce){return Ct.w(ot.toDate()[re].apply(ot.toDate("s"),(wt?[0,0,0,0]:[23,59,59,999]).slice(ce)),ot)},he=this.$W,ne=this.$M,_e=this.$D,Ae="set"+(this.$u?"UTC":"");switch(Lt){case B:return wt?Yt(1,0):Yt(31,11);case y:return wt?Yt(1,ne):Yt(0,ne+1);case g:var xe=this.$locale().weekStart||0,Wt=(he<xe?he+7:he)-xe;return Yt(wt?_e-Wt:_e+(6-Wt),ne);case h:case v:return Ht(Ae+"Hours",0);case c:return Ht(Ae+"Minutes",1);case n:return Ht(Ae+"Seconds",2);case o:return Ht(Ae+"Milliseconds",3);default:return this.clone()}},st.endOf=function(at){return this.startOf(at,!1)},st.$set=function(at,mt){var ot,wt=Ct.p(at),Lt="set"+(this.$u?"UTC":""),Yt=(ot={},ot[h]=Lt+"Date",ot[v]=Lt+"Date",ot[y]=Lt+"Month",ot[B]=Lt+"FullYear",ot[c]=Lt+"Hours",ot[n]=Lt+"Minutes",ot[o]=Lt+"Seconds",ot[s]=Lt+"Milliseconds",ot)[wt],Ht=wt===h?this.$D+(mt-this.$W):mt;if(wt===y||wt===B){var he=this.clone().set(v,1);he.$d[Yt](Ht),he.init(),this.$d=he.set(v,Math.min(this.$D,he.daysInMonth())).$d}else Yt&&this.$d[Yt](Ht);return this.init(),this},st.set=function(at,mt){return this.clone().$set(at,mt)},st.get=function(at){return this[Ct.p(at)]()},st.add=function(at,mt){var ot,wt=this;at=Number(at);var Lt=Ct.p(mt),Yt=function(ne){var _e=dt(wt);return Ct.w(_e.date(_e.date()+Math.round(ne*at)),wt)};if(Lt===y)return this.set(y,this.$M+at);if(Lt===B)return this.set(B,this.$y+at);if(Lt===h)return Yt(1);if(Lt===g)return Yt(7);var Ht=(ot={},ot[n]=e,ot[c]=i,ot[o]=r,ot)[Lt]||1,he=this.$d.getTime()+at*Ht;return Ct.w(he,this)},st.subtract=function(at,mt){return this.add(-1*at,mt)},st.format=function(at){var mt=this,ot=this.$locale();if(!this.isValid())return ot.invalidDate||q;var wt=at||"YYYY-MM-DDTHH:mm:ssZ",Lt=Ct.z(this),Yt=this.$H,Ht=this.$m,he=this.$M,{weekdays:ne,months:_e,meridiem:Ae}=ot,xe=function(ce,ue,Ke,Xe){return ce&&(ce[ue]||ce(mt,wt))||Ke[ue].slice(0,Xe)},Wt=function(ce){return Ct.s(Yt%12||12,ce,"0")},re=Ae||function(ce,ue,Ke){var Xe=ce<12?"AM":"PM";return Ke?Xe.toLowerCase():Xe};return wt.replace(H,function(ce,ue){return ue||function(Ke){switch(Ke){case"YY":return String(mt.$y).slice(-2);case"YYYY":return Ct.s(mt.$y,4,"0");case"M":return he+1;case"MM":return Ct.s(he+1,2,"0");case"MMM":return xe(ot.monthsShort,he,_e,3);case"MMMM":return xe(_e,he);case"D":return mt.$D;case"DD":return Ct.s(mt.$D,2,"0");case"d":return String(mt.$W);case"dd":return xe(ot.weekdaysMin,mt.$W,ne,2);case"ddd":return xe(ot.weekdaysShort,mt.$W,ne,3);case"dddd":return ne[mt.$W];case"H":return String(Yt);case"HH":return Ct.s(Yt,2,"0");case"h":return Wt(1);case"hh":return Wt(2);case"a":return re(Yt,Ht,!0);case"A":return re(Yt,Ht,!1);case"m":return String(Ht);case"mm":return Ct.s(Ht,2,"0");case"s":return String(mt.$s);case"ss":return Ct.s(mt.$s,2,"0");case"SSS":return Ct.s(mt.$ms,3,"0");case"Z":return Lt}return null}(ce)||Lt.replace(":","")})},st.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},st.diff=function(at,mt,ot){var wt,Lt=this,Yt=Ct.p(mt),Ht=dt(at),he=(Ht.utcOffset()-this.utcOffset())*e,ne=this-Ht,_e=function(){return Ct.m(Lt,Ht)};switch(Yt){case B:wt=_e()/12;break;case y:wt=_e();break;case f:wt=_e()/3;break;case g:wt=(ne-he)/604800000;break;case h:wt=(ne-he)/86400000;break;case c:wt=ne/i;break;case n:wt=ne/e;break;case o:wt=ne/r;break;default:wt=ne}return ot?wt:Ct.a(wt)},st.daysInMonth=function(){return this.endOf(y).$D},st.$locale=function(){return rt[this.$L]},st.locale=function(at,mt){if(!at)return this.$L;var ot=this.clone(),wt=lt(at,mt,!0);return wt&&(ot.$L=wt),ot},st.clone=function(){return Ct.w(this.$d,this)},st.toDate=function(){return new Date(this.valueOf())},st.toJSON=function(){return this.isValid()?this.toISOString():null},st.toISOString=function(){return this.$d.toISOString()},st.toString=function(){return this.$d.toUTCString()},bt}(),kt=Bt.prototype;return dt.prototype=kt,[["$ms",s],["$s",o],["$m",n],["$H",c],["$W",h],["$M",y],["$y",B],["$D",v]].forEach(function(bt){kt[bt[1]]=function(st){return this.$g(st,bt[0],bt[1])}}),dt.extend=function(bt,st){return bt.$i||(bt(st,Bt,dt),bt.$i=!0),dt},dt.locale=lt,dt.isDayjs=ct,dt.unix=function(bt){return dt(1000*bt)},dt.en=rt[Q],dt.Ls=rt,dt.p={},dt})});var sm=Te(function(im){Object.defineProperty(im,"__esModule",{value:!0});im.BLANK_URL=im.relativeFirstCharacters=im.whitespaceEscapeCharsRegex=im.urlSchemeRegex=im.ctrlCharactersRegex=im.htmlCtrlEntityRegex=im.htmlEntitiesRegex=im.invalidProtocolRegex=void 0;im.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;im.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;im.htmlCtrlEntityRegex=/&(newline|tab);/gi;im.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;im.urlSchemeRegex=/^.+(:|&colon;)/gim;im.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;im.relativeFirstCharacters=[".","/"];im.BLANK_URL="about:blank"});var Gn=Te(function(nm){Object.defineProperty(nm,"__esModule",{value:!0});nm.sanitizeUrl=T2;var Br=sm();function k2(r){return Br.relativeFirstCharacters.indexOf(r[0])>-1}function w2(r){var e=r.replace(Br.ctrlCharactersRegex,"");return e.replace(Br.htmlEntitiesRegex,function(i,s){return String.fromCharCode(s)})}function S2(r){return URL.canParse(r)}function am(r){try{return decodeURIComponent(r)}catch(e){return r}}function T2(r){if(!r)return Br.BLANK_URL;var e,i=am(r.trim());do i=w2(i).replace(Br.htmlCtrlEntityRegex,"").replace(Br.ctrlCharactersRegex,"").replace(Br.whitespaceEscapeCharsRegex,"").trim(),i=am(i),e=i.match(Br.ctrlCharactersRegex)||i.match(Br.htmlEntitiesRegex)||i.match(Br.htmlCtrlEntityRegex)||i.match(Br.whitespaceEscapeCharsRegex);while(e&&e.length>0);var s=i;if(!s)return Br.BLANK_URL;if(k2(s))return s;var o=s.trimStart(),n=o.match(Br.urlSchemeRegex);if(!n)return s;var c=n[0].toLowerCase().trim();if(Br.invalidProtocolRegex.test(c))return Br.BLANK_URL;var h=o.replace(/\\/g,"/");if(c==="mailto:"||c.includes("://"))return h;if(c==="http:"||c==="https:"){if(!S2(h))return Br.BLANK_URL;var g=new URL(h);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return h}});var _d=Object.defineProperty,t=(r,e)=>_d(r,"name",{value:e,configurable:!0}),Kt=(r,e)=>{for(var i in e)_d(r,i,{get:e[i],enumerable:!0})};var Bd=Se(Ia(),1),no={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},a={trace:t((...r)=>{},"trace"),debug:t((...r)=>{},"debug"),info:t((...r)=>{},"info"),warn:t((...r)=>{},"warn"),error:t((...r)=>{},"error"),fatal:t((...r)=>{},"fatal")},Vr=t(function(r="fatal"){let e=no.fatal;if(typeof r==="string"){if(r.toLowerCase()in no)e=no[r]}else if(typeof r==="number")e=r;if(a.trace=()=>{},a.debug=()=>{},a.info=()=>{},a.warn=()=>{},a.error=()=>{},a.fatal=()=>{},e<=no.fatal)a.fatal=console.error?console.error.bind(console,gi("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",gi("FATAL"));if(e<=no.error)a.error=console.error?console.error.bind(console,gi("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",gi("ERROR"));if(e<=no.warn)a.warn=console.warn?console.warn.bind(console,gi("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",gi("WARN"));if(e<=no.info)a.info=console.info?console.info.bind(console,gi("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",gi("INFO"));if(e<=no.debug)a.debug=console.debug?console.debug.bind(console,gi("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",gi("DEBUG"));if(e<=no.trace)a.trace=console.debug?console.debug.bind(console,gi("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",gi("TRACE"))},"setLogLevel"),gi=t((r)=>`%c${Bd.default().format("ss.SSS")} : ${r} : `,"format");var On={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:(r)=>r>=255?255:r<0?0:r,g:(r)=>r>=255?255:r<0?0:r,b:(r)=>r>=255?255:r<0?0:r,h:(r)=>r%360,s:(r)=>r>=100?100:r<0?0:r,l:(r)=>r>=100?100:r<0?0:r,a:(r)=>r>=1?1:r<0?0:r},toLinear:(r)=>{let e=r/255;return r>0.03928?Math.pow((e+0.055)/1.055,2.4):e/12.92},hue2rgb:(r,e,i)=>{if(i<0)i+=1;if(i>1)i-=1;if(i<0.16666666666666666)return r+(e-r)*6*i;if(i<0.5)return e;if(i<0.6666666666666666)return r+(e-r)*(0.6666666666666666-i)*6;return r},hsl2rgb:({h:r,s:e,l:i},s)=>{if(!e)return i*2.55;r/=360,e/=100,i/=100;let o=i<0.5?i*(1+e):i+e-i*e,n=2*i-o;switch(s){case"r":return On.hue2rgb(n,o,r+0.3333333333333333)*255;case"g":return On.hue2rgb(n,o,r)*255;case"b":return On.hue2rgb(n,o,r-0.3333333333333333)*255}},rgb2hsl:({r,g:e,b:i},s)=>{r/=255,e/=255,i/=255;let o=Math.max(r,e,i),n=Math.min(r,e,i),c=(o+n)/2;if(s==="l")return c*100;if(o===n)return 0;let h=o-n,g=c>0.5?h/(2-o-n):h/(o+n);if(s==="s")return g*100;switch(o){case r:return((e-i)/h+(e<i?6:0))*60;case e:return((i-r)/h+2)*60;case i:return((r-e)/h+4)*60;default:return-1}}},vd=On;var rC={clamp:(r,e,i)=>{if(e>i)return Math.min(e,Math.max(i,r));return Math.min(i,Math.max(e,r))},round:(r)=>Math.round(r*10000000000)/10000000000},Ld=rC;var iC={dec2hex:(r)=>{let e=Math.round(r).toString(16);return e.length>1?e:`0${e}`}},Fd=iC;var oC={channel:vd,lang:Ld,unit:Fd},z=oC;var lo={};for(let r=0;r<=255;r++)lo[r]=z.unit.dec2hex(r);var lr={ALL:0,RGB:1,HSL:2};class Ad{constructor(){this.type=lr.ALL}get(){return this.type}set(r){if(this.type&&this.type!==r)throw Error("Cannot change both RGB and HSL channels at the same time");this.type=r}reset(){this.type=lr.ALL}is(r){return this.type===r}}var Md=Ad;class Ed{constructor(r,e){this.color=e,this.changed=!1,this.data=r,this.type=new Md}set(r,e){return this.color=e,this.changed=!1,this.data=r,this.type.type=lr.ALL,this}_ensureHSL(){let r=this.data,{h:e,s:i,l:s}=r;if(e===void 0)r.h=z.channel.rgb2hsl(r,"h");if(i===void 0)r.s=z.channel.rgb2hsl(r,"s");if(s===void 0)r.l=z.channel.rgb2hsl(r,"l")}_ensureRGB(){let r=this.data,{r:e,g:i,b:s}=r;if(e===void 0)r.r=z.channel.hsl2rgb(r,"r");if(i===void 0)r.g=z.channel.hsl2rgb(r,"g");if(s===void 0)r.b=z.channel.hsl2rgb(r,"b")}get r(){let r=this.data,e=r.r;if(!this.type.is(lr.HSL)&&e!==void 0)return e;return this._ensureHSL(),z.channel.hsl2rgb(r,"r")}get g(){let r=this.data,e=r.g;if(!this.type.is(lr.HSL)&&e!==void 0)return e;return this._ensureHSL(),z.channel.hsl2rgb(r,"g")}get b(){let r=this.data,e=r.b;if(!this.type.is(lr.HSL)&&e!==void 0)return e;return this._ensureHSL(),z.channel.hsl2rgb(r,"b")}get h(){let r=this.data,e=r.h;if(!this.type.is(lr.RGB)&&e!==void 0)return e;return this._ensureRGB(),z.channel.rgb2hsl(r,"h")}get s(){let r=this.data,e=r.s;if(!this.type.is(lr.RGB)&&e!==void 0)return e;return this._ensureRGB(),z.channel.rgb2hsl(r,"s")}get l(){let r=this.data,e=r.l;if(!this.type.is(lr.RGB)&&e!==void 0)return e;return this._ensureRGB(),z.channel.rgb2hsl(r,"l")}get a(){return this.data.a}set r(r){this.type.set(lr.RGB),this.changed=!0,this.data.r=r}set g(r){this.type.set(lr.RGB),this.changed=!0,this.data.g=r}set b(r){this.type.set(lr.RGB),this.changed=!0,this.data.b=r}set h(r){this.type.set(lr.HSL),this.changed=!0,this.data.h=r}set s(r){this.type.set(lr.HSL),this.changed=!0,this.data.s=r}set l(r){this.type.set(lr.HSL),this.changed=!0,this.data.l=r}set a(r){this.changed=!0,this.data.a=r}}var Od=Ed;var sC=new Od({r:0,g:0,b:0,a:0},"transparent"),Ho=sC;var Id={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:(r)=>{if(r.charCodeAt(0)!==35)return;let e=r.match(Id.re);if(!e)return;let i=e[1],s=parseInt(i,16),o=i.length,n=o%4===0,c=o>4,h=c?1:17,g=c?8:4,y=n?0:-1,f=c?255:15;return Ho.set({r:(s>>g*(y+3)&f)*h,g:(s>>g*(y+2)&f)*h,b:(s>>g*(y+1)&f)*h,a:n?(s&f)*h/255:1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`#${lo[Math.round(e)]}${lo[Math.round(i)]}${lo[Math.round(s)]}${lo[Math.round(o*255)]}`;else return`#${lo[Math.round(e)]}${lo[Math.round(i)]}${lo[Math.round(s)]}`}},Zo=Id;var $n={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:(r)=>{let e=r.match($n.hueRe);if(e){let[,i,s]=e;switch(s){case"grad":return z.channel.clamp.h(parseFloat(i)*0.9);case"rad":return z.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return z.channel.clamp.h(parseFloat(i)*360)}}return z.channel.clamp.h(parseFloat(r))},parse:(r)=>{let e=r.charCodeAt(0);if(e!==104&&e!==72)return;let i=r.match($n.re);if(!i)return;let[,s,o,n,c,h]=i;return Ho.set({h:$n._hue2deg(s),s:z.channel.clamp.s(parseFloat(o)),l:z.channel.clamp.l(parseFloat(n)),a:c?z.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},r)},stringify:(r)=>{let{h:e,s:i,l:s,a:o}=r;if(o<1)return`hsla(${z.lang.round(e)}, ${z.lang.round(i)}%, ${z.lang.round(s)}%, ${o})`;else return`hsl(${z.lang.round(e)}, ${z.lang.round(i)}%, ${z.lang.round(s)}%)`}},Us=$n;var Pn={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:(r)=>{r=r.toLowerCase();let e=Pn.colors[r];if(!e)return;return Zo.parse(e)},stringify:(r)=>{let e=Zo.stringify(r);for(let i in Pn.colors)if(Pn.colors[i]===e)return i;return}},_h=Pn;var $d={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:(r)=>{let e=r.charCodeAt(0);if(e!==114&&e!==82)return;let i=r.match($d.re);if(!i)return;let[,s,o,n,c,h,g,y,f]=i;return Ho.set({r:z.channel.clamp.r(o?parseFloat(s)*2.55:parseFloat(s)),g:z.channel.clamp.g(c?parseFloat(n)*2.55:parseFloat(n)),b:z.channel.clamp.b(g?parseFloat(h)*2.55:parseFloat(h)),a:y?z.channel.clamp.a(f?parseFloat(y)/100:parseFloat(y)):1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`rgba(${z.lang.round(e)}, ${z.lang.round(i)}, ${z.lang.round(s)}, ${z.lang.round(o)})`;else return`rgb(${z.lang.round(e)}, ${z.lang.round(i)}, ${z.lang.round(s)})`}},js=$d;var aC={format:{keyword:_h,hex:Zo,rgb:js,rgba:js,hsl:Us,hsla:Us},parse:(r)=>{if(typeof r!=="string")return r;let e=Zo.parse(r)||js.parse(r)||Us.parse(r)||_h.parse(r);if(e)return e;throw Error(`Unsupported color format: "${r}"`)},stringify:(r)=>{if(!r.changed&&r.color)return r.color;if(r.type.is(lr.HSL)||r.data.r===void 0)return Us.stringify(r);else if(r.a<1||!Number.isInteger(r.r)||!Number.isInteger(r.g)||!Number.isInteger(r.b))return js.stringify(r);else return Zo.stringify(r)}},De=aC;var nC=(r,e)=>{let i=De.parse(r);for(let s in e)i[s]=z.channel.clamp[s](e[s]);return De.stringify(i)},Nn=nC;var lC=(r,e,i=0,s=1)=>{if(typeof r!=="number")return Nn(r,{a:e});let o=Ho.set({r:z.channel.clamp.r(r),g:z.channel.clamp.g(e),b:z.channel.clamp.b(i),a:z.channel.clamp.a(s)});return De.stringify(o)},de=lC;var hC=(r)=>{let{r:e,g:i,b:s}=De.parse(r),o=0.2126*z.channel.toLinear(e)+0.7152*z.channel.toLinear(i)+0.0722*z.channel.toLinear(s);return z.lang.round(o)},Dd=hC;var cC=(r)=>Dd(r)>=0.5,Pd=cC;var uC=(r)=>!Pd(r),K=uC;var fC=(r,e,i)=>{let s=De.parse(r),o=s[e],n=z.channel.clamp[e](o+i);if(o!==n)s[e]=n;return De.stringify(s)},br=fC;var dC=(r,e)=>br(r,"l",e),u=dC;var pC=(r,e)=>br(r,"l",-e),d=pC;var gC=(r,e)=>{let i=De.parse(r),s={};for(let o in e){if(!e[o])continue;s[o]=i[o]+e[o]}return Nn(r,s)},G=gC;var mC=(r,e,i=50)=>{let{r:s,g:o,b:n,a:c}=De.parse(r),{r:h,g,b:y,a:f}=De.parse(e),B=i/100,v=B*2-1,q=c-f,H=((v*q===-1?v:(v+q)/(1+v*q))+1)/2,Y=1-H,j=s*H+h*Y,X=o*H+g*Y,Q=n*H+y*Y,rt=c*B+f*(1-B);return de(j,X,Q,rt)},Rd=mC;var yC=(r,e=100)=>{let i=De.parse(r);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,Rd(i,r,e)},ut=yC;/*! @license DOMPurify 3.4.17 | (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.17/LICENSE */function xC(r,e){this.v=r,this.k=e}function qd(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,s=Array(e);i<e;i++)s[i]=r[i];return s}function CC(r){if(Array.isArray(r))return r}function bC(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var s,o,n,c,h=[],g=!0,y=!1;try{if(n=(i=i.call(r)).next,e===0){if(Object(i)!==i)return;g=!1}else for(;!(g=(s=n.call(i)).done)&&(h.push(s.value),h.length!==e);g=!0);}catch(f){y=!0,o=f}finally{try{if(!g&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(y)throw o}}return h}}function kC(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function wC(r,e){return CC(r)||bC(r,e)||SC(r,e)||kC()}function SC(r,e){if(r){if(typeof r=="string")return qd(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?qd(r,e):void 0}}function Xn(r){var e,i;function s(n,c){try{var h=r[n](c),g=h.value,y=g instanceof xC;Promise.resolve(y?g.v:g).then(function(f){if(y){var B=n==="return"&&g.k?n:"next";if(!g.k||f.done)return s(B,f);f=r[B](f).value}o(!!h.done,f)},function(f){s("throw",f)})}catch(f){o(2,f)}}function o(n,c){n===2?e.reject(c):e.resolve({value:c,done:n}),(e=e.next)?s(e.key,e.arg):i=null}this._invoke=function(n,c){return new Promise(function(h,g){var y={key:n,arg:c,resolve:h,reject:g,next:null};i?i=i.next=y:(e=i=y,s(n,c))})},typeof r.return!="function"&&(this.return=void 0)}Xn.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Xn.prototype.next=function(r){return this._invoke("next",r)},Xn.prototype.throw=function(r){return this._invoke("throw",r)},Xn.prototype.return=function(r){return this._invoke("return",r)};var{entries:tp,setPrototypeOf:Nd,isFrozen:TC,getPrototypeOf:ep,getOwnPropertyDescriptor:rp,freeze:cr,seal:dr,create:ps}=Object,ip=typeof Reflect<"u"&&Reflect,{apply:$h,construct:Dh}=ip;if(!cr)cr=function(e){return e};if(!dr)dr=function(e){return e};if(!$h)$h=function(e,i){for(var s=arguments.length,o=Array(s>2?s-2:0),n=2;n<s;n++)o[n-2]=arguments[n];return e.apply(i,o)};if(!Dh)Dh=function(e){for(var i=arguments.length,s=Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return new e(...s)};var Bo=Qe(Array.prototype.forEach);Array.prototype.indexOf;var _C=Qe(Array.prototype.lastIndexOf),Wd=Qe(Array.prototype.pop),Gs=Qe(Array.prototype.push),BC=Qe(Array.prototype.slice),vC=Qe(Array.prototype.splice),gs=Array.isArray,Bh=op(Set),vh=Qe(Set.prototype.add),Xs=Qe(Set.prototype.has),Qo=Qe(String.prototype.toLowerCase),Lh=Qe(String.prototype.toString),zd=Qe(String.prototype.match),Vs=Qe(String.prototype.replace),Hd=Qe(String.prototype.indexOf),LC=Qe(String.prototype.trim),FC=Qe(Number.prototype.toString),AC=Qe(Boolean.prototype.toString),Yd=typeof BigInt>"u"?null:Qe(BigInt.prototype.toString),Ud=typeof Symbol>"u"?null:Qe(Symbol.prototype.toString),zr=Qe(Object.prototype.hasOwnProperty),Ks=Qe(Object.prototype.toString),fr=Qe(RegExp.prototype.test),Lo=op(TypeError);function Qe(r){return function(e){if(e instanceof RegExp)e.lastIndex=0;for(var i=arguments.length,s=Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return $h(r,e,s)}}function op(r){return function(){for(var e=arguments.length,i=Array(e),s=0;s<e;s++)i[s]=arguments[s];return Dh(r,i)}}function Ie(r,e){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qo;if(Nd)Nd(r,null);if(!gs(e))return r;let s=e.length;while(s--){let o=e[s];if(typeof o==="string"){let n=i(o);if(n!==o){if(!TC(e))e[s]=n;o=n}}r[o]=!0}return r}function MC(r){for(let e=0;e<r.length;e++)if(!zr(r,e))r[e]=null;return r}function hi(r){let e=ps(null);for(let s of tp(r)){var i=wC(s,2);let o=i[0],n=i[1];if(zr(r,o))if(gs(n))e[o]=MC(n);else if(n&&typeof n==="object"&&n.constructor===Object)e[o]=hi(n);else e[o]=n}return e}function EC(r){switch(typeof r){case"string":return r;case"number":return FC(r);case"boolean":return AC(r);case"bigint":return Yd?Yd(r):"0";case"symbol":return Ud?Ud(r):"Symbol()";case"undefined":return Ks(r);case"function":case"object":{if(r===null)return Ks(r);let e=r,i=mi(e,"toString");if(typeof i==="function"){let s=i(e);return typeof s==="string"?s:Ks(s)}return Ks(r)}default:return Ks(r)}}function mi(r,e){while(r!==null){let s=rp(r,e);if(s){if(s.get)return Qe(s.get);if(typeof s.value==="function")return Qe(s.value)}r=ep(r)}function i(){return null}return i}function OC(r,e){while(r!==null){let i=rp(r,e);if(i)return i.get?Qe(i.get):null;r=ep(r)}return null}function IC(r){try{return fr(r,""),!0}catch(e){return!1}}var jd=cr(["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"]),Fh=cr(["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"]),Ah=cr(["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"]),$C=cr(["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"]),Mh=cr(["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"]),DC=cr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Gd=cr(["#text"]),Xd=cr(["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"]),Eh=cr(["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","dominant-baseline","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","pointer-events","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-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","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"]),Vd=cr(["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"]),Kn=cr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),PC=dr(/{{[\w\W]*|^[\w\W]*}}/g),RC=dr(/<%[\w\W]*|^[\w\W]*%>/g),qC=dr(/\${[\w\W]*/g),NC=dr(/^data-[\-\w.\u00B7-\uFFFF]+$/),WC=dr(/^aria-[\-\w]+$/),Kd=dr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),zC=dr(/^(?:\w+script|data):/i),HC=dr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),YC=dr(/^html$/i),UC=dr(/^[a-z][.\w]*(-[.\w]+)+$/i),Oh=dr(/<[/\w!]/g),Zd=dr(/<[/\w]/g),jC=dr(/<\/no(script|embed|frames)/i),Qd=dr(/\/>/i),ar={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},GC=cr(Ie({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),XC=function(){return typeof window>"u"?null:window},VC=function(e,i){if(typeof e!=="object"||typeof e.createPolicy!=="function")return null;let s=null,o="data-tt-policy-suffix";if(i&&i.hasAttribute(o))s=i.getAttribute(o);let n="dompurify"+(s?"#"+s:"");try{return e.createPolicy(n,{createHTML(c){return c},createScriptURL(c){return c}})}catch(c){return console.warn("TrustedTypes policy "+n+" could not be created."),null}},Jd=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Yo=function(e,i,s,o){return zr(e,i)&&gs(e[i])?Ie(o.base?hi(o.base):{},e[i],o.transform):s},Ih=function(e,i,s){let o=zr(e,i)?e[i]:void 0;return o&&typeof o==="object"?hi(o):s()};function sp(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:XC(),e=(Rt)=>sp(Rt);if(e.version="3.4.17",e.removed=[],!r||!r.document||r.document.nodeType!==ar.document||!r.Element)return e.isSupported=!1,e;let i=r.document,s=i,o=s.currentScript;r.DocumentFragment;let{HTMLTemplateElement:n,Node:c,Element:h,NodeFilter:g}=r;r.NamedNodeMap===void 0&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;let{DOMParser:y,trustedTypes:f}=r,B=h.prototype,v=mi(B,"cloneNode"),q=mi(B,"remove"),W=mi(B,"removeAttributeNode"),H=mi(B,"nextSibling"),Y=mi(B,"childNodes"),j=mi(B,"parentNode"),X=mi(B,"shadowRoot"),Q=mi(B,"attributes"),rt=c&&c.prototype?mi(c.prototype,"nodeType"):null,it=c&&c.prototype?mi(c.prototype,"nodeName"):null,ct=c&&c.prototype?mi(c.prototype,"ownerDocument"):null,lt=function(J){return rt?rt(J):J.nodeType},dt=function(J){return it?it(J):J.nodeName},Ct=OC(B,"namespaceURI"),Bt=function(J){return Ct?Ct(J):J.namespaceURI};if(typeof n==="function"){let Rt=i.createElement("template");if(Rt.content&&Rt.content.ownerDocument)i=Rt.content.ownerDocument}let kt,bt="",st,at=!1,mt=0,ot=function(){if(mt>0)throw Lo('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.')},wt=function(J){ot(),mt++;try{return kt.createHTML(J)}finally{mt--}},Lt=function(J){ot(),mt++;try{return kt.createScriptURL(J)}finally{mt--}},Yt=function(){if(!at)st=VC(f,o),at=!0;return st},Ht=i,{implementation:he,createNodeIterator:ne,createDocumentFragment:_e,getElementsByTagName:Ae}=Ht,xe=s.importNode,Wt=Jd();e.isSupported=typeof tp==="function"&&typeof j==="function"&&he&&he.createHTMLDocument!==void 0;let re=PC,ce=RC,ue=qC,Ke=NC,Xe=WC,xi=zC,io=HC,di=UC,Do=Kd,je=null,$r=Ie({},[...jd,...Fh,...Ah,...Mh,...Gd]),Pe=null,oo=Ie({},[...Xd,...Eh,...Vd,...Kn]),ur=Object.seal(ps(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}})),pi=null,Po=null,sr=Object.seal(ps(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ro=!0,_i=!0,so=!1,ao=!0,D=!1,pt=!0,_t=!1,Mt=!1,St=null,Nt=null,Z=!1,xt=!1,Dt=!1,Ft=!1,Ot=!0,qt=!1,Pt="user-content-",Vt=!0,Xt=!1,Zt=null,ee={},ve=null,Ge=Ie({},["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"]),Ws=null,qo=Ie({},["audio","video","img","source","image","track"]),No=null,ld=Ie({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),wn="http://www.w3.org/1998/Math/MathML",_n="http://www.w3.org/2000/svg",vi="http://www.w3.org/1999/xhtml",hs=vi,hh=!1,ch=null,D0=Ie({},[wn,_n,vi],Lh),hd=cr(["mi","mo","mn","ms","mtext"]),uh=Ie({},hd),cd=cr(["annotation-xml"]),fh=Ie({},cd),P0=Ie({},["title","style","font","a","script"]),zs=null,R0=["application/xhtml+xml","text/html"],q0="text/html",ir=null,cs=null,N0=i.createElement("form"),ud=function(J){return J instanceof RegExp||J instanceof Function},dh=function(){let J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(cs&&cs===J)return;if(!J||typeof J!=="object")J={};J=hi(J),zs=R0.indexOf(J.PARSER_MEDIA_TYPE)===-1?q0:J.PARSER_MEDIA_TYPE,ir=zs==="application/xhtml+xml"?Lh:Qo,je=Yo(J,"ALLOWED_TAGS",$r,{transform:ir}),Pe=Yo(J,"ALLOWED_ATTR",oo,{transform:ir}),ch=Yo(J,"ALLOWED_NAMESPACES",D0,{transform:Lh}),No=Yo(J,"ADD_URI_SAFE_ATTR",ld,{transform:ir,base:ld}),Ws=Yo(J,"ADD_DATA_URI_TAGS",qo,{transform:ir,base:qo}),ve=Yo(J,"FORBID_CONTENTS",Ge,{transform:ir}),pi=Yo(J,"FORBID_TAGS",hi({}),{transform:ir}),Po=Yo(J,"FORBID_ATTR",hi({}),{transform:ir}),ee=zr(J,"USE_PROFILES")?J.USE_PROFILES&&typeof J.USE_PROFILES==="object"?hi(J.USE_PROFILES):J.USE_PROFILES:!1,Ro=J.ALLOW_ARIA_ATTR!==!1,_i=J.ALLOW_DATA_ATTR!==!1,so=J.ALLOW_UNKNOWN_PROTOCOLS||!1,ao=J.ALLOW_SELF_CLOSE_IN_ATTR!==!1,D=J.SAFE_FOR_TEMPLATES||!1,pt=J.SAFE_FOR_XML!==!1,_t=J.WHOLE_DOCUMENT||!1,xt=J.RETURN_DOM||!1,Dt=J.RETURN_DOM_FRAGMENT||!1,Ft=J.RETURN_TRUSTED_TYPE||!1,Z=J.FORCE_BODY||!1,Ot=J.SANITIZE_DOM!==!1,qt=J.SANITIZE_NAMED_PROPS||!1,Vt=J.KEEP_CONTENT!==!1,Xt=J.IN_PLACE||!1,Do=IC(J.ALLOWED_URI_REGEXP)?J.ALLOWED_URI_REGEXP:Kd,hs=typeof J.NAMESPACE==="string"?J.NAMESPACE:vi,uh=Ih(J,"MATHML_TEXT_INTEGRATION_POINTS",()=>Ie({},hd)),fh=Ih(J,"HTML_INTEGRATION_POINTS",()=>Ie({},cd));let ft=Ih(J,"CUSTOM_ELEMENT_HANDLING",()=>ps(null));if(ur=ps(null),zr(ft,"tagNameCheck")&&ud(ft.tagNameCheck))ur.tagNameCheck=ft.tagNameCheck;if(zr(ft,"attributeNameCheck")&&ud(ft.attributeNameCheck))ur.attributeNameCheck=ft.attributeNameCheck;if(zr(ft,"allowCustomizedBuiltInElements")&&typeof ft.allowCustomizedBuiltInElements==="boolean")ur.allowCustomizedBuiltInElements=ft.allowCustomizedBuiltInElements;if(dr(ur),D)_i=!1;if(Dt)xt=!0;if(ee){if(je=Ie({},Gd),Pe=ps(null),ee.html===!0)Ie(je,jd),Ie(Pe,Xd);if(ee.svg===!0)Ie(je,Fh),Ie(Pe,Eh),Ie(Pe,Kn);if(ee.svgFilters===!0)Ie(je,Ah),Ie(Pe,Eh),Ie(Pe,Kn);if(ee.mathMl===!0)Ie(je,Mh),Ie(Pe,Vd),Ie(Pe,Kn)}if(sr.tagCheck=null,sr.attributeCheck=null,zr(J,"ADD_TAGS")){if(typeof J.ADD_TAGS==="function")sr.tagCheck=J.ADD_TAGS;else if(gs(J.ADD_TAGS)){if(je===$r)je=hi(je);Ie(je,J.ADD_TAGS,ir)}}if(zr(J,"ADD_ATTR")){if(typeof J.ADD_ATTR==="function")sr.attributeCheck=J.ADD_ATTR;else if(gs(J.ADD_ATTR)){if(Pe===oo)Pe=hi(Pe);Ie(Pe,J.ADD_ATTR,ir)}}if(zr(J,"ADD_FORBID_CONTENTS")&&gs(J.ADD_FORBID_CONTENTS)){if(ve===Ge)ve=hi(ve);Ie(ve,J.ADD_FORBID_CONTENTS,ir)}if(Vt)je["#text"]=!0;if(_t)Ie(je,["html","head","body"]);if(je.table)Ie(je,["tbody"]),delete pi.tbody;if(J.TRUSTED_TYPES_POLICY){if(typeof J.TRUSTED_TYPES_POLICY.createHTML!=="function")throw Lo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof J.TRUSTED_TYPES_POLICY.createScriptURL!=="function")throw Lo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let It=kt;kt=J.TRUSTED_TYPES_POLICY;try{bt=wt("")}catch($t){throw kt=It,$t}}else if(J.TRUSTED_TYPES_POLICY===null)kt=void 0,bt="";else{if(kt===void 0)kt=Yt();if(kt&&typeof bt==="string")bt=wt("")}if(cr)cr(J);cs=J},fd=Ie({},[...Fh,...Ah,...$C]),dd=Ie({},[...Mh,...DC]),W0=function(J,ft,It){if(ft.namespaceURI===vi)return J==="svg";if(ft.namespaceURI===wn)return J==="svg"&&(It==="annotation-xml"||uh[It]);return Boolean(fd[J])},z0=function(J,ft,It){if(ft.namespaceURI===vi)return J==="math";if(ft.namespaceURI===_n)return J==="math"&&fh[It];return Boolean(dd[J])},H0=function(J,ft,It){if(ft.namespaceURI===_n&&!fh[It])return!1;if(ft.namespaceURI===wn&&!uh[It])return!1;return!dd[J]&&(P0[J]||!fd[J])},Y0=function(J){let ft=Bt(J),It=Qo(dt(J)),$t=j(J),ie,we;if($t&&lt($t)===ar.element)ie={namespaceURI:Bt($t)},we=Qo(dt($t));else ie={namespaceURI:hs},we="template";if(!ch[ft])return!1;if(ft===_n)return W0(It,ie,we);if(ft===wn)return z0(It,ie,we);if(ft===vi)return H0(It,ie,we);if(zs==="application/xhtml+xml"&&ch[ft])return!0;return!1},Wo=function(J){Gs(e.removed,{element:J});try{j(J).removeChild(J)}catch(ft){if(q(J),!j(J))throw Lo("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},pd=function(J,ft,It){try{W(J,ft)}catch($t){try{J.removeAttribute(It)}catch(ie){}}},ph=function(J){mh(J);let ft=Y(J);if(ft)Bo(BC(ft),($t)=>{try{q($t)}catch(ie){}});let It=lt(J)===ar.element?Q(J):null;if(It)for(let $t=It.length-1;$t>=0;--$t){let ie=It[$t],we=ie&&ie.name;if(typeof we==="string")pd(J,ie,we)}},us=function(J,ft,It){if(!It)try{It=ft.getAttributeNode(J)}catch($t){It=null}Gs(e.removed,{attribute:It||null,from:ft});try{if(It)W(ft,It);else ft.removeAttribute(J)}catch($t){try{ft.removeAttribute(J)}catch(ie){}}if(J==="is")if(xt||Dt)try{Wo(ft)}catch($t){}else try{ft.setAttribute(J,"")}catch($t){}},gd=function(J){let ft=Q(J);if(!ft)return;for(let It=ft.length-1;It>=0;--It){let $t=ft[It],ie=$t&&$t.name;if(typeof ie!=="string"||Pe[ir(ie)])continue;pd(J,$t,ie)}},gh=function(J,ft){let It=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,$t=[J];while($t.length>0){let ie=$t.pop();if(ft(ie)===!1)continue;if(It&&lt(ie)===ar.element){let Ee=X(ie);if(zo(Ee))$t.push(Ee)}let we=Y(ie);if(we)for(let Ee=we.length-1;Ee>=0;--Ee)$t.push(we[Ee])}},mh=function(J){gh(J,(ft)=>{if(lt(ft)===ar.element)gd(ft)})},yh=function(J){let ft=[];return gh(J,(It)=>{ft.push(It)},!0),ft},U0=function(J,ft){let It=Bh();Bo(yh(J),($t)=>{if(lt($t)===ar.element)vh(It,$t)}),Bo(ft,($t)=>{if(lt($t)===ar.element&&!Xs(It,$t))gd($t)})},md=function(J,ft){let It=!1;return Bo(e.removed,($t)=>{if($t.element)It=It||$t.element===J,mh($t.element)}),U0(J,ft),It},j0=8,G0=function(J,ft){let It=Zt,$t=null,ie=()=>{if(!$t)$t=Bh(),Bo(ft,(we)=>{vh($t,we)});return $t};for(let we=0;;we++){let Ee=yh(J),nr=[J],Li=!1;if(Bo(Ee,(vr)=>{if(lt(vr)===ar.documentFragment)Gs(nr,vr);else if(!Li&&!Xs(It,vr))Li=Xs(ie(),vr)}),!Li)return;if(we>=j0)throw Lo("the tree kept changing during in-place sanitization; refusing to return it");Bo(nr,(vr,Pr)=>{X0(vr,Pr>0,J,ie())})}},X0=function(J,ft,It,$t){let ie=xh(J),we;while(we=ie.nextNode()){if(!Xs($t,we)||Xs(Zt,we))continue;if(ft)Ci(Wt.uponSanitizeShadowNode,we,null);if(bh(we,It),kh(we,It),zo(we.content))Ys(we.content)}},V0=function(J){if(Zt)vh(Zt,J)},yd=function(J,ft){if(!pt)return!1;if(J==="patchsrc")return!0;return J==="for"&&ft!=="label"&&ft!=="output"},K0=function(J){if(!pt)return;gh(J,(ft)=>{let It=lt(ft);if(It===ar.processingInstruction||It===ar.comment&&fr(Zd,ft.data)){try{q(ft)}catch($t){}return!1}if(It===ar.element){let $t=ft,ie=ir(dt(ft));try{if($t.hasAttribute&&$t.hasAttribute("patchsrc"))$t.removeAttribute("patchsrc");if($t.hasAttribute&&$t.hasAttribute("for")&&yd("for",ie))$t.removeAttribute("for")}catch(we){}}return!0})},xd=function(J){let ft=null,It=null;if(Z)J="<remove></remove>"+J;else{let we=zd(J,/^[\r\n\t ]+/);It=we&&we[0]}if(zs==="application/xhtml+xml"&&hs===vi)J='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+J+"</body></html>";let $t=kt?wt(J):J;if(hs===vi)try{ft=new y().parseFromString($t,zs)}catch(we){}if(!ft||!ft.documentElement){ft=he.createDocument(hs,"template",null);try{ft.documentElement.innerHTML=hh?bt:$t}catch(we){}}let ie=ft.body||ft.documentElement;if(J&&It)ie.insertBefore(i.createTextNode(It),ie.childNodes[0]||null);if(hs===vi)return Ae.call(ft,_t?"html":"body")[0];return _t?ft.documentElement:ie},xh=function(J){let ft=ct?ct(J):J.ownerDocument;return ne.call(ft||J,J,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},Bn=function(J){return J=Vs(J,re," "),J=Vs(J,ce," "),J=Vs(J,ue," "),J},Ch=function(J){var ft;Cd(J);let It=(ft=J.querySelectorAll)===null||ft===void 0?void 0:ft.call(J,"template");if(It)Bo(It,($t)=>{if(zo($t.content))Ch($t.content)})},Cd=function(J){J.normalize();let ft=ct?ct(J):J.ownerDocument,It=ne.call(ft||J,J,g.SHOW_TEXT|g.SHOW_COMMENT|g.SHOW_CDATA_SECTION|g.SHOW_PROCESSING_INSTRUCTION,null),$t=It.nextNode();while($t)$t.data=Bn($t.data),$t=It.nextNode()},vn=function(J){let ft=it?it(J):null;if(typeof ft!=="string")return!1;if(ir(ft)!=="form")return!1;return typeof J.nodeName!=="string"||typeof J.textContent!=="string"||typeof J.removeChild!=="function"||J.attributes!==Q(J)||typeof J.removeAttribute!=="function"||typeof J.removeAttributeNode!=="function"||typeof J.getAttributeNode!=="function"||typeof J.setAttribute!=="function"||typeof J.namespaceURI!=="string"||typeof J.insertBefore!=="function"||typeof J.hasChildNodes!=="function"||J.nodeType!==rt(J)||J.childNodes!==Y(J)},zo=function(J){if(!rt||typeof J!=="object"||J===null)return!1;try{return rt(J)===ar.documentFragment}catch(ft){return!1}},Hs=function(J){if(!rt||typeof J!=="object"||J===null)return!1;try{return typeof rt(J)==="number"}catch(ft){return!1}};function Ci(Rt,J,ft){if(Rt.length===0)return;Bo(Rt,(It)=>{It.call(e,J,ft,cs)})}let Z0=function(J,ft){if(pt&&J.hasChildNodes()&&!Hs(J.firstElementChild)&&fr(Oh,J.textContent)&&fr(Oh,J.innerHTML))return!0;if(pt&&GC[ft]&&lt(J)===ar.element&&Bt(J)===vi&&(Hs(J.firstElementChild)||typeof J.textContent==="string"&&fr(Oh,J.textContent)))return!0;if(J.nodeType===ar.processingInstruction)return!0;if(pt&&J.nodeType===ar.comment&&fr(Zd,J.data))return!0;return!1},Mn=function(J,ft){if(J instanceof RegExp)return fr(J,ft);if(J instanceof Function){for(var It=arguments.length,$t=Array(It>2?It-2:0),ie=2;ie<It;ie++)$t[ie-2]=arguments[ie];return Boolean(J(ft,...$t))}return!1},Q0=function(J,ft,It){if(!pi[ft]&&wd(ft)&&Mn(ur.tagNameCheck,ft))return!1;if(Vt&&!ve[ft]&&!ve[Qo(ft)]){let $t=j(J),ie=Y(J);if(ie&&$t){let we=ie.length;for(let Ee=we-1;Ee>=0;--Ee){let nr=J===It?v(ie[Ee],!0):ie[Ee];$t.insertBefore(nr,H(J))}}}return Wo(J),!0},bd=function(J,ft,It,$t){if(J.length===0)return ft;return ft===It||ft===$t?hi(ft):ft},fs=function(J,ft){if(J===ft||j(J)!==null)return!1;if(Xt)mh(J);return!0},bh=function(J,ft){if(V0(J),Ci(Wt.beforeSanitizeElements,J,null),fs(J,ft))return!0;if(vn(J))return Wo(J),!0;let It=ir(dt(J));if(je=bd(Wt.uponSanitizeElement,je,$r,St),Ci(Wt.uponSanitizeElement,J,{tagName:It,allowedTags:je}),fs(J,ft))return!0;if(Z0(J,It))return Wo(J),!0;if(pi[It]||!(sr.tagCheck instanceof Function&&sr.tagCheck(It))&&!je[It]){let $t=Q0(J,It,ft);if($t===!1){if(Ci(Wt.afterSanitizeElements,J,null),fs(J,ft))return!0}return $t}if(lt(J)===ar.element&&!Y0(J))return Wo(J),!0;if((It==="noscript"||It==="noembed"||It==="noframes")&&fr(jC,J.innerHTML))return Wo(J),!0;if(D&&J.nodeType===ar.text){let $t=Bn(J.textContent);if(J.textContent!==$t)Gs(e.removed,{element:J.cloneNode()}),J.textContent=$t}return Ci(Wt.afterSanitizeElements,J,null),fs(J,ft)},kd=function(J,ft,It){if(Po[ft])return!1;if(yd(ft,J))return!1;if(Ot&&(ft==="id"||ft==="name")&&((It in i)||(It in N0)))return!1;let $t=Pe[ft]||sr.attributeCheck instanceof Function&&sr.attributeCheck(ft,J);if(_i&&fr(Ke,ft))return!0;if(Ro&&fr(Xe,ft))return!0;if(!$t)return wd(J)&&Mn(ur.tagNameCheck,J)&&Mn(ur.attributeNameCheck,ft,J)||ft==="is"&&ur.allowCustomizedBuiltInElements&&Mn(ur.tagNameCheck,It);if(No[ft])return!0;if(fr(Do,Vs(It,io,"")))return!0;if((ft==="src"||ft==="xlink:href"||ft==="href")&&J!=="script"&&Hd(It,"data:")===0&&Ws[J])return!0;if(so&&!fr(xi,Vs(It,io,"")))return!0;return!It},J0=Ie({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),wd=function(J){return!J0[Qo(J)]&&fr(di,J)},tC=function(J,ft,It,$t){if(kt&&typeof f==="object"&&typeof f.getAttributeType==="function"&&!It)switch(f.getAttributeType(J,ft)){case"TrustedHTML":return wt($t);case"TrustedScriptURL":return Lt($t)}return $t},eC=function(J,ft,It,$t){try{if(It)J.setAttributeNS(It,ft,$t);else J.setAttribute(ft,$t);if(vn(J))return Wo(J),!1;return!0}catch(ie){return us(ft,J),!1}},Sd=function(J,ft){if(pt&&fr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ft))return!0;return Qo(J)==="attributename"&&zd(ft,"href")!==null},kh=function(J,ft){if(Ci(Wt.beforeSanitizeAttributes,J,null),fs(J,ft))return;let It=J.attributes;if(!It||vn(J))return;Pe=bd(Wt.uponSanitizeAttribute,Pe,oo,Nt);let $t={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Pe,forceKeepAttr:void 0},ie=It.length,we=ir(J.nodeName);while(ie--){let Ee=It[ie],{name:nr,namespaceURI:Li,value:vr}=Ee,Pr=ir(nr),ds=vr,qr=nr==="value"?ds:LC(ds),Td=!1;if($t.attrName=Pr,$t.attrValue=qr,$t.keepAttr=!0,$t.forceKeepAttr=void 0,Ci(Wt.uponSanitizeAttribute,J,$t),qr=$t.attrValue,qt&&(Pr==="id"||Pr==="name")&&Hd(qr,Pt)!==0)us(nr,J,Ee),qr=Pt+qr,Td=!0;if(Sd(nr,qr)){us(nr,J,Ee);continue}if($t.forceKeepAttr)continue;if(!$t.keepAttr){us(nr,J,Ee);continue}if(!ao&&fr(Qd,qr)){us(nr,J,Ee);continue}if(D)qr=Bn(qr);if(!kd(we,Pr,qr)){us(nr,J,Ee);continue}if(qr=tC(we,Pr,Li,qr),qr!==ds){if(eC(J,nr,Li,qr)&&Td)Wd(e.removed)}}Ci(Wt.afterSanitizeAttributes,J,null),fs(J,ft)},Ys=function(J){let ft=null,It=xh(J);Ci(Wt.beforeSanitizeShadowDOM,J,null);while(ft=It.nextNode()){if(Ci(Wt.uponSanitizeShadowNode,ft,null),bh(ft,J),kh(ft,J),zo(ft.content))Ys(ft.content);if(lt(ft)===ar.element){let $t=X(ft);if(zo($t))wh($t),Ys($t)}}if(D)Cd(J);Ci(Wt.afterSanitizeShadowDOM,J,null)},wh=function(J){let ft=[{node:J,shadow:null}];while(ft.length>0){let It=ft.pop();if(It.shadow){Ys(It.shadow);continue}let $t=It.node,ie=lt($t)===ar.element,we=Y($t);if(we)for(let Ee=we.length-1;Ee>=0;--Ee)ft.push({node:we[Ee],shadow:null});if(ie){let Ee=it?it($t):null;if(typeof Ee==="string"&&ir(Ee)==="template"){let nr=$t.content;if(zo(nr))ft.push({node:nr,shadow:null})}}if(ie){let Ee=X($t);if(zo(Ee))ft.push({node:null,shadow:Ee},{node:Ee,shadow:null})}}};return e.sanitize=function(Rt){let J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ft=null,It=null,$t=null,ie=null;if(hh=!Rt,hh)Rt="<!-->";if(typeof Rt!=="string"&&!Hs(Rt)){if(Rt=EC(Rt),typeof Rt!=="string")throw Lo("dirty is not a string, aborting")}if(!e.isSupported)return Rt;if(Mt)je=St,Pe=Nt;else dh(J);if(Wt.uponSanitizeElement.length>0||Wt.uponSanitizeAttribute.length>0)je=hi(je);if(Wt.uponSanitizeAttribute.length>0)Pe=hi(Pe);e.removed=[];let we=Xt&&typeof Rt!=="string"&&Hs(Rt),Ee=[],nr=Zt;if(we){K0(Rt);let Pr=dt(Rt);if(typeof Pr==="string"){let ds=ir(Pr);if(!je[ds]||pi[ds])throw ph(Rt),Lo("root node is forbidden and cannot be sanitized in-place")}if(vn(Rt))throw ph(Rt),Lo("root node is clobbered and cannot be sanitized in-place");Ee=yh(Rt),Zt=Bh()}else if(Hs(Rt)){if(ft=xd("<!---->"),It=ft.ownerDocument.importNode(Rt,!0),It.nodeType===ar.element&&It.nodeName==="BODY")ft=It;else if(It.nodeName==="HTML")ft=It;else ft.appendChild(It);wh(ft)}else{if(!xt&&!D&&!_t&&Rt.indexOf("<")===-1)return kt&&Ft?wt(Rt):Rt;if(ft=xd(Rt),!ft)return xt?null:Ft?bt:""}if(ft&&Z)Wo(ft.firstChild);let Li=we?Rt:ft;try{if(we)wh(Rt);let Pr=xh(Li);while($t=Pr.nextNode())if(bh($t,Li),kh($t,Li),zo($t.content))Ys($t.content);if(we)G0(Rt,Ee)}catch(Pr){if(we)ph(Rt),md(Rt,Ee);throw Pr}finally{Zt=nr}if(we){if(md(Rt,Ee))throw Lo("a node selected for removal could not be safely returned; refusing to sanitize in place");if(D)Ch(Rt);return Rt}if(xt){if(D)Ch(ft);if(Dt){ie=_e.call(ft.ownerDocument);while(ft.firstChild)ie.appendChild(ft.firstChild)}else ie=ft;if(Pe.shadowroot||Pe.shadowrootmode)ie=xe.call(s,ie,!0);return ie}let vr=_t?ft.outerHTML:ft.innerHTML;if(_t&&je["!doctype"]&&ft.ownerDocument&&ft.ownerDocument.doctype&&ft.ownerDocument.doctype.name&&fr(YC,ft.ownerDocument.doctype.name))vr="<!DOCTYPE "+ft.ownerDocument.doctype.name+`>
3
- `+vr;if(D)vr=Bn(vr);return kt&&Ft?wt(vr):vr},e.setConfig=function(){let Rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};dh(Rt),Mt=!0,St=je,Nt=Pe},e.clearConfig=function(){cs=null,Mt=!1,St=null,Nt=null,kt=st,bt=""},e.isValidAttribute=function(Rt,J,ft){if(!cs)dh({});let It=ir(Rt),$t=ir(J);if(typeof ft==="string"&&(Sd(J,ft)||!ao&&fr(Qd,ft)))return!1;return kd(It,$t,ft)},e.addHook=function(Rt,J){if(typeof J!=="function")return;if(!zr(Wt,Rt))return;Gs(Wt[Rt],J)},e.removeHook=function(Rt,J){if(!zr(Wt,Rt))return;if(J!==void 0){let ft=_C(Wt[Rt],J);return ft===-1?void 0:vC(Wt[Rt],ft,1)[0]}return Wd(Wt[Rt])},e.removeHooks=function(Rt){if(!zr(Wt,Rt))return;Wt[Rt]=[]},e.removeAllHooks=function(){Wt=Jd()},e}var Re=sp();var ms=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,el=/\s/,KC=t((r)=>{let e="",i=0,s=0;while(s<r.length){let o=r.indexOf("%%",s);if(o===-1)break;let n=r.indexOf(`
1
+ import{Se,Te,_}from"./chunk-kahab58k.js";var Ra=Te(function(Sh,Th){(function(r,e){typeof Sh=="object"&&typeof Th<"u"?Th.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=e()})(Sh,function(){var r=1000,e=60000,i=3600000,s="millisecond",o="second",n="minute",c="hour",h="day",g="week",y="month",f="quarter",B="year",v="date",q="Invalid Date",W=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,H=/\[([^\]]+)]|YYYY|YY|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,Y={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(Ct){var st=["th","st","nd","rd"],at=Ct%100;return"["+Ct+(st[(at-20)%10]||st[at]||st[0])+"]"}},j=function(Ct,st,at){var pt=String(Ct);return!pt||pt.length>=st?Ct:""+Array(st+1-pt.length).join(at)+Ct},X={s:j,z:function(Ct){var st=-Ct.utcOffset(),at=Math.abs(st),pt=Math.floor(at/60),ot=at%60;return(st<=0?"+":"-")+j(pt,2,"0")+":"+j(ot,2,"0")},m:function Ct(st,at){if(st.date()<at.date())return-Ct(at,st);var pt=12*(at.year()-st.year())+(at.month()-st.month()),ot=st.clone().add(pt,y),wt=at-ot<0,At=st.clone().add(pt+(wt?-1:1),y);return+(-(pt+(at-ot)/(wt?ot-At:At-ot))||0)},a:function(Ct){return Ct<0?Math.ceil(Ct)||0:Math.floor(Ct)},p:function(Ct){return{M:y,y:B,w:g,d:h,D:v,h:c,m:n,s:o,ms:s,Q:f}[Ct]||String(Ct||"").toLowerCase().replace(/s$/,"")},u:function(Ct){return Ct===void 0}},Q="en",et={};et[Q]=Y;var it="$isDayjsObject",ht=function(Ct){return Ct instanceof Lt||!(!Ct||!Ct[it])},lt=function Ct(st,at,pt){var ot;if(!st)return Q;if(typeof st=="string"){var wt=st.toLowerCase();et[wt]&&(ot=wt),at&&(et[wt]=at,ot=wt);var At=st.split("-");if(!ot&&At.length>1)return Ct(At[0])}else{var jt=st.name;et[jt]=st,ot=jt}return!pt&&ot&&(Q=ot),ot||!pt&&Q},ft=function(Ct,st){if(ht(Ct))return Ct.clone();var at=typeof st=="object"?st:{};return at.date=Ct,at.args=arguments,new Lt(at)},xt=X;xt.l=lt,xt.i=ht,xt.w=function(Ct,st){return ft(Ct,{locale:st.$L,utc:st.$u,x:st.$x,$offset:st.$offset})};var Lt=function(){function Ct(at){this.$L=lt(at.locale,null,!0),this.parse(at),this.$x=this.$x||at.x||{},this[it]=!0}var st=Ct.prototype;return st.parse=function(at){this.$d=function(pt){var{date:ot,utc:wt}=pt;if(ot===null)return new Date(NaN);if(xt.u(ot))return new Date;if(ot instanceof Date)return new Date(ot);if(typeof ot=="string"&&!/Z$/i.test(ot)){var At=ot.match(W);if(At){var jt=At[2]-1||0,Yt=(At[7]||"0").substring(0,3);return wt?new Date(Date.UTC(At[1],jt,At[3]||1,At[4]||0,At[5]||0,At[6]||0,Yt)):new Date(At[1],jt,At[3]||1,At[4]||0,At[5]||0,At[6]||0,Yt)}}return new Date(ot)}(at),this.init()},st.init=function(){var at=this.$d;this.$y=at.getFullYear(),this.$M=at.getMonth(),this.$D=at.getDate(),this.$W=at.getDay(),this.$H=at.getHours(),this.$m=at.getMinutes(),this.$s=at.getSeconds(),this.$ms=at.getMilliseconds()},st.$utils=function(){return xt},st.isValid=function(){return this.$d.toString()!==q},st.isSame=function(at,pt){var ot=ft(at);return this.startOf(pt)<=ot&&ot<=this.endOf(pt)},st.isAfter=function(at,pt){return ft(at)<this.startOf(pt)},st.isBefore=function(at,pt){return this.endOf(pt)<ft(at)},st.$g=function(at,pt,ot){return xt.u(at)?this[pt]:this.set(ot,at)},st.unix=function(){return Math.floor(this.valueOf()/1000)},st.valueOf=function(){return this.$d.getTime()},st.startOf=function(at,pt){var ot=this,wt=!!xt.u(pt)||pt,At=xt.p(at),jt=function(ne,me){var xe=xt.w(ot.$u?Date.UTC(ot.$y,me,ne):new Date(ot.$y,me,ne),ot);return wt?xe:xe.endOf(h)},Yt=function(ne,me){return xt.w(ot.toDate()[ne].apply(ot.toDate("s"),(wt?[0,0,0,0]:[23,59,59,999]).slice(me)),ot)},ue=this.$W,ce=this.$M,Ae=this.$D,Oe="set"+(this.$u?"UTC":"");switch(At){case B:return wt?jt(1,0):jt(31,11);case y:return wt?jt(1,ce):jt(0,ce+1);case g:var we=this.$locale().weekStart||0,Ht=(ue<we?ue+7:ue)-we;return jt(wt?Ae-Ht:Ae+(6-Ht),ce);case h:case v:return Yt(Oe+"Hours",0);case c:return Yt(Oe+"Minutes",1);case n:return Yt(Oe+"Seconds",2);case o:return Yt(Oe+"Milliseconds",3);default:return this.clone()}},st.endOf=function(at){return this.startOf(at,!1)},st.$set=function(at,pt){var ot,wt=xt.p(at),At="set"+(this.$u?"UTC":""),jt=(ot={},ot[h]=At+"Date",ot[v]=At+"Date",ot[y]=At+"Month",ot[B]=At+"FullYear",ot[c]=At+"Hours",ot[n]=At+"Minutes",ot[o]=At+"Seconds",ot[s]=At+"Milliseconds",ot)[wt],Yt=wt===h?this.$D+(pt-this.$W):pt;if(wt===y||wt===B){var ue=this.clone().set(v,1);ue.$d[jt](Yt),ue.init(),this.$d=ue.set(v,Math.min(this.$D,ue.daysInMonth())).$d}else jt&&this.$d[jt](Yt);return this.init(),this},st.set=function(at,pt){return this.clone().$set(at,pt)},st.get=function(at){return this[xt.p(at)]()},st.add=function(at,pt){var ot,wt=this;at=Number(at);var At=xt.p(pt),jt=function(ce){var Ae=ft(wt);return xt.w(Ae.date(Ae.date()+Math.round(ce*at)),wt)};if(At===y)return this.set(y,this.$M+at);if(At===B)return this.set(B,this.$y+at);if(At===h)return jt(1);if(At===g)return jt(7);var Yt=(ot={},ot[n]=e,ot[c]=i,ot[o]=r,ot)[At]||1,ue=this.$d.getTime()+at*Yt;return xt.w(ue,this)},st.subtract=function(at,pt){return this.add(-1*at,pt)},st.format=function(at){var pt=this,ot=this.$locale();if(!this.isValid())return ot.invalidDate||q;var wt=at||"YYYY-MM-DDTHH:mm:ssZ",At=xt.z(this),jt=this.$H,Yt=this.$m,ue=this.$M,{weekdays:ce,months:Ae,meridiem:Oe}=ot,we=function(me,xe,Je,Qe){return me&&(me[xe]||me(pt,wt))||Je[xe].slice(0,Qe)},Ht=function(me){return xt.s(jt%12||12,me,"0")},ne=Oe||function(me,xe,Je){var Qe=me<12?"AM":"PM";return Je?Qe.toLowerCase():Qe};return wt.replace(H,function(me,xe){return xe||function(Je){switch(Je){case"YY":return String(pt.$y).slice(-2);case"YYYY":return xt.s(pt.$y,4,"0");case"M":return ue+1;case"MM":return xt.s(ue+1,2,"0");case"MMM":return we(ot.monthsShort,ue,Ae,3);case"MMMM":return we(Ae,ue);case"D":return pt.$D;case"DD":return xt.s(pt.$D,2,"0");case"d":return String(pt.$W);case"dd":return we(ot.weekdaysMin,pt.$W,ce,2);case"ddd":return we(ot.weekdaysShort,pt.$W,ce,3);case"dddd":return ce[pt.$W];case"H":return String(jt);case"HH":return xt.s(jt,2,"0");case"h":return Ht(1);case"hh":return Ht(2);case"a":return ne(jt,Yt,!0);case"A":return ne(jt,Yt,!1);case"m":return String(Yt);case"mm":return xt.s(Yt,2,"0");case"s":return String(pt.$s);case"ss":return xt.s(pt.$s,2,"0");case"SSS":return xt.s(pt.$ms,3,"0");case"Z":return At}return null}(me)||At.replace(":","")})},st.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},st.diff=function(at,pt,ot){var wt,At=this,jt=xt.p(pt),Yt=ft(at),ue=(Yt.utcOffset()-this.utcOffset())*e,ce=this-Yt,Ae=function(){return xt.m(At,Yt)};switch(jt){case B:wt=Ae()/12;break;case y:wt=Ae();break;case f:wt=Ae()/3;break;case g:wt=(ce-ue)/604800000;break;case h:wt=(ce-ue)/86400000;break;case c:wt=ce/i;break;case n:wt=ce/e;break;case o:wt=ce/r;break;default:wt=ce}return ot?wt:xt.a(wt)},st.daysInMonth=function(){return this.endOf(y).$D},st.$locale=function(){return et[this.$L]},st.locale=function(at,pt){if(!at)return this.$L;var ot=this.clone(),wt=lt(at,pt,!0);return wt&&(ot.$L=wt),ot},st.clone=function(){return xt.w(this.$d,this)},st.toDate=function(){return new Date(this.valueOf())},st.toJSON=function(){return this.isValid()?this.toISOString():null},st.toISOString=function(){return this.$d.toISOString()},st.toString=function(){return this.$d.toUTCString()},Ct}(),kt=Lt.prototype;return ft.prototype=kt,[["$ms",s],["$s",o],["$m",n],["$H",c],["$W",h],["$M",y],["$y",B],["$D",v]].forEach(function(Ct){kt[Ct[1]]=function(st){return this.$g(st,Ct[0],Ct[1])}}),ft.extend=function(Ct,st){return Ct.$i||(Ct(st,Lt,ft),Ct.$i=!0),ft},ft.locale=lt,ft.isDayjs=ht,ft.unix=function(Ct){return ft(1000*Ct)},ft.en=et[Q],ft.Ls=et,ft.p={},ft})});var sm=Te(function(im){Object.defineProperty(im,"__esModule",{value:!0});im.BLANK_URL=im.relativeFirstCharacters=im.whitespaceEscapeCharsRegex=im.urlSchemeRegex=im.ctrlCharactersRegex=im.htmlCtrlEntityRegex=im.htmlEntitiesRegex=im.invalidProtocolRegex=void 0;im.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;im.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;im.htmlCtrlEntityRegex=/&(newline|tab);/gi;im.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;im.urlSchemeRegex=/^.+(:|&colon;)/gim;im.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;im.relativeFirstCharacters=[".","/"];im.BLANK_URL="about:blank"});var Vn=Te(function(nm){Object.defineProperty(nm,"__esModule",{value:!0});nm.sanitizeUrl=T2;var Or=sm();function k2(r){return Or.relativeFirstCharacters.indexOf(r[0])>-1}function w2(r){var e=r.replace(Or.ctrlCharactersRegex,"");return e.replace(Or.htmlEntitiesRegex,function(i,s){return String.fromCharCode(s)})}function S2(r){return URL.canParse(r)}function am(r){try{return decodeURIComponent(r)}catch(e){return r}}function T2(r){if(!r)return Or.BLANK_URL;var e,i=am(r.trim());do i=w2(i).replace(Or.htmlCtrlEntityRegex,"").replace(Or.ctrlCharactersRegex,"").replace(Or.whitespaceEscapeCharsRegex,"").trim(),i=am(i),e=i.match(Or.ctrlCharactersRegex)||i.match(Or.htmlEntitiesRegex)||i.match(Or.htmlCtrlEntityRegex)||i.match(Or.whitespaceEscapeCharsRegex);while(e&&e.length>0);var s=i;if(!s)return Or.BLANK_URL;if(k2(s))return s;var o=s.trimStart(),n=o.match(Or.urlSchemeRegex);if(!n)return s;var c=n[0].toLowerCase().trim();if(Or.invalidProtocolRegex.test(c))return Or.BLANK_URL;var h=o.replace(/\\/g,"/");if(c==="mailto:"||c.includes("://"))return h;if(c==="http:"||c==="https:"){if(!S2(h))return Or.BLANK_URL;var g=new URL(h);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return h}});var _d=Object.defineProperty,t=(r,e)=>_d(r,"name",{value:e,configurable:!0}),Zt=(r,e)=>{for(var i in e)_d(r,i,{get:e[i],enumerable:!0})};var Bd=Se(Ra(),1),To={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},a={trace:t((...r)=>{},"trace"),debug:t((...r)=>{},"debug"),info:t((...r)=>{},"info"),warn:t((...r)=>{},"warn"),error:t((...r)=>{},"error"),fatal:t((...r)=>{},"fatal")},jr=t(function(r="fatal"){let e=To.fatal;if(typeof r==="string"){if(r.toLowerCase()in To)e=To[r]}else if(typeof r==="number")e=r;if(a.trace=()=>{},a.debug=()=>{},a.info=()=>{},a.warn=()=>{},a.error=()=>{},a.fatal=()=>{},e<=To.fatal)a.fatal=console.error?console.error.bind(console,mi("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",mi("FATAL"));if(e<=To.error)a.error=console.error?console.error.bind(console,mi("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",mi("ERROR"));if(e<=To.warn)a.warn=console.warn?console.warn.bind(console,mi("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",mi("WARN"));if(e<=To.info)a.info=console.info?console.info.bind(console,mi("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",mi("INFO"));if(e<=To.debug)a.debug=console.debug?console.debug.bind(console,mi("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",mi("DEBUG"));if(e<=To.trace)a.trace=console.debug?console.debug.bind(console,mi("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",mi("TRACE"))},"setLogLevel"),mi=t((r)=>`%c${Bd.default().format("ss.SSS")} : ${r} : `,"format");var Pn={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:(r)=>r>=255?255:r<0?0:r,g:(r)=>r>=255?255:r<0?0:r,b:(r)=>r>=255?255:r<0?0:r,h:(r)=>r%360,s:(r)=>r>=100?100:r<0?0:r,l:(r)=>r>=100?100:r<0?0:r,a:(r)=>r>=1?1:r<0?0:r},toLinear:(r)=>{let e=r/255;return r>0.03928?Math.pow((e+0.055)/1.055,2.4):e/12.92},hue2rgb:(r,e,i)=>{if(i<0)i+=1;if(i>1)i-=1;if(i<0.16666666666666666)return r+(e-r)*6*i;if(i<0.5)return e;if(i<0.6666666666666666)return r+(e-r)*(0.6666666666666666-i)*6;return r},hsl2rgb:({h:r,s:e,l:i},s)=>{if(!e)return i*2.55;r/=360,e/=100,i/=100;let o=i<0.5?i*(1+e):i+e-i*e,n=2*i-o;switch(s){case"r":return Pn.hue2rgb(n,o,r+0.3333333333333333)*255;case"g":return Pn.hue2rgb(n,o,r)*255;case"b":return Pn.hue2rgb(n,o,r-0.3333333333333333)*255}},rgb2hsl:({r,g:e,b:i},s)=>{r/=255,e/=255,i/=255;let o=Math.max(r,e,i),n=Math.min(r,e,i),c=(o+n)/2;if(s==="l")return c*100;if(o===n)return 0;let h=o-n,g=c>0.5?h/(2-o-n):h/(o+n);if(s==="s")return g*100;switch(o){case r:return((e-i)/h+(e<i?6:0))*60;case e:return((i-r)/h+2)*60;case i:return((r-e)/h+4)*60;default:return-1}}},vd=Pn;var rC={clamp:(r,e,i)=>{if(e>i)return Math.min(e,Math.max(i,r));return Math.min(i,Math.max(e,r))},round:(r)=>Math.round(r*10000000000)/10000000000},Ld=rC;var iC={dec2hex:(r)=>{let e=Math.round(r).toString(16);return e.length>1?e:`0${e}`}},Fd=iC;var oC={channel:vd,lang:Ld,unit:Fd},z=oC;var Bo={};for(let r=0;r<=255;r++)Bo[r]=z.unit.dec2hex(r);var cr={ALL:0,RGB:1,HSL:2};class Ad{constructor(){this.type=cr.ALL}get(){return this.type}set(r){if(this.type&&this.type!==r)throw Error("Cannot change both RGB and HSL channels at the same time");this.type=r}reset(){this.type=cr.ALL}is(r){return this.type===r}}var Md=Ad;class Ed{constructor(r,e){this.color=e,this.changed=!1,this.data=r,this.type=new Md}set(r,e){return this.color=e,this.changed=!1,this.data=r,this.type.type=cr.ALL,this}_ensureHSL(){let r=this.data,{h:e,s:i,l:s}=r;if(e===void 0)r.h=z.channel.rgb2hsl(r,"h");if(i===void 0)r.s=z.channel.rgb2hsl(r,"s");if(s===void 0)r.l=z.channel.rgb2hsl(r,"l")}_ensureRGB(){let r=this.data,{r:e,g:i,b:s}=r;if(e===void 0)r.r=z.channel.hsl2rgb(r,"r");if(i===void 0)r.g=z.channel.hsl2rgb(r,"g");if(s===void 0)r.b=z.channel.hsl2rgb(r,"b")}get r(){let r=this.data,e=r.r;if(!this.type.is(cr.HSL)&&e!==void 0)return e;return this._ensureHSL(),z.channel.hsl2rgb(r,"r")}get g(){let r=this.data,e=r.g;if(!this.type.is(cr.HSL)&&e!==void 0)return e;return this._ensureHSL(),z.channel.hsl2rgb(r,"g")}get b(){let r=this.data,e=r.b;if(!this.type.is(cr.HSL)&&e!==void 0)return e;return this._ensureHSL(),z.channel.hsl2rgb(r,"b")}get h(){let r=this.data,e=r.h;if(!this.type.is(cr.RGB)&&e!==void 0)return e;return this._ensureRGB(),z.channel.rgb2hsl(r,"h")}get s(){let r=this.data,e=r.s;if(!this.type.is(cr.RGB)&&e!==void 0)return e;return this._ensureRGB(),z.channel.rgb2hsl(r,"s")}get l(){let r=this.data,e=r.l;if(!this.type.is(cr.RGB)&&e!==void 0)return e;return this._ensureRGB(),z.channel.rgb2hsl(r,"l")}get a(){return this.data.a}set r(r){this.type.set(cr.RGB),this.changed=!0,this.data.r=r}set g(r){this.type.set(cr.RGB),this.changed=!0,this.data.g=r}set b(r){this.type.set(cr.RGB),this.changed=!0,this.data.b=r}set h(r){this.type.set(cr.HSL),this.changed=!0,this.data.h=r}set s(r){this.type.set(cr.HSL),this.changed=!0,this.data.s=r}set l(r){this.type.set(cr.HSL),this.changed=!0,this.data.l=r}set a(r){this.changed=!0,this.data.a=r}}var Od=Ed;var sC=new Od({r:0,g:0,b:0,a:0},"transparent"),Yo=sC;var Id={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:(r)=>{if(r.charCodeAt(0)!==35)return;let e=r.match(Id.re);if(!e)return;let i=e[1],s=parseInt(i,16),o=i.length,n=o%4===0,c=o>4,h=c?1:17,g=c?8:4,y=n?0:-1,f=c?255:15;return Yo.set({r:(s>>g*(y+3)&f)*h,g:(s>>g*(y+2)&f)*h,b:(s>>g*(y+1)&f)*h,a:n?(s&f)*h/255:1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`#${Bo[Math.round(e)]}${Bo[Math.round(i)]}${Bo[Math.round(s)]}${Bo[Math.round(o*255)]}`;else return`#${Bo[Math.round(e)]}${Bo[Math.round(i)]}${Bo[Math.round(s)]}`}},Qo=Id;var Nn={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:(r)=>{let e=r.match(Nn.hueRe);if(e){let[,i,s]=e;switch(s){case"grad":return z.channel.clamp.h(parseFloat(i)*0.9);case"rad":return z.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return z.channel.clamp.h(parseFloat(i)*360)}}return z.channel.clamp.h(parseFloat(r))},parse:(r)=>{let e=r.charCodeAt(0);if(e!==104&&e!==72)return;let i=r.match(Nn.re);if(!i)return;let[,s,o,n,c,h]=i;return Yo.set({h:Nn._hue2deg(s),s:z.channel.clamp.s(parseFloat(o)),l:z.channel.clamp.l(parseFloat(n)),a:c?z.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},r)},stringify:(r)=>{let{h:e,s:i,l:s,a:o}=r;if(o<1)return`hsla(${z.lang.round(e)}, ${z.lang.round(i)}%, ${z.lang.round(s)}%, ${o})`;else return`hsl(${z.lang.round(e)}, ${z.lang.round(i)}%, ${z.lang.round(s)}%)`}},js=Nn;var Yn={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:(r)=>{r=r.toLowerCase();let e=Yn.colors[r];if(!e)return;return Qo.parse(e)},stringify:(r)=>{let e=Qo.stringify(r);for(let i in Yn.colors)if(Yn.colors[i]===e)return i;return}},_h=Yn;var $d={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:(r)=>{let e=r.charCodeAt(0);if(e!==114&&e!==82)return;let i=r.match($d.re);if(!i)return;let[,s,o,n,c,h,g,y,f]=i;return Yo.set({r:z.channel.clamp.r(o?parseFloat(s)*2.55:parseFloat(s)),g:z.channel.clamp.g(c?parseFloat(n)*2.55:parseFloat(n)),b:z.channel.clamp.b(g?parseFloat(h)*2.55:parseFloat(h)),a:y?z.channel.clamp.a(f?parseFloat(y)/100:parseFloat(y)):1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`rgba(${z.lang.round(e)}, ${z.lang.round(i)}, ${z.lang.round(s)}, ${z.lang.round(o)})`;else return`rgb(${z.lang.round(e)}, ${z.lang.round(i)}, ${z.lang.round(s)})`}},Gs=$d;var aC={format:{keyword:_h,hex:Qo,rgb:Gs,rgba:Gs,hsl:js,hsla:js},parse:(r)=>{if(typeof r!=="string")return r;let e=Qo.parse(r)||Gs.parse(r)||js.parse(r)||_h.parse(r);if(e)return e;throw Error(`Unsupported color format: "${r}"`)},stringify:(r)=>{if(!r.changed&&r.color)return r.color;if(r.type.is(cr.HSL)||r.data.r===void 0)return js.stringify(r);else if(r.a<1||!Number.isInteger(r.r)||!Number.isInteger(r.g)||!Number.isInteger(r.b))return Gs.stringify(r);else return Qo.stringify(r)}},De=aC;var nC=(r,e)=>{let i=De.parse(r);for(let s in e)i[s]=z.channel.clamp[s](e[s]);return De.stringify(i)},Xn=nC;var lC=(r,e,i=0,s=1)=>{if(typeof r!=="number")return Xn(r,{a:e});let o=Yo.set({r:z.channel.clamp.r(r),g:z.channel.clamp.g(e),b:z.channel.clamp.b(i),a:z.channel.clamp.a(s)});return De.stringify(o)},de=lC;var hC=(r)=>{let{r:e,g:i,b:s}=De.parse(r),o=0.2126*z.channel.toLinear(e)+0.7152*z.channel.toLinear(i)+0.0722*z.channel.toLinear(s);return z.lang.round(o)},Dd=hC;var cC=(r)=>Dd(r)>=0.5,Pd=cC;var uC=(r)=>!Pd(r),K=uC;var fC=(r,e,i)=>{let s=De.parse(r),o=s[e],n=z.channel.clamp[e](o+i);if(o!==n)s[e]=n;return De.stringify(s)},yr=fC;var dC=(r,e)=>yr(r,"l",e),u=dC;var pC=(r,e)=>yr(r,"l",-e),d=pC;var gC=(r,e)=>{let i=De.parse(r),s={};for(let o in e){if(!e[o])continue;s[o]=i[o]+e[o]}return Xn(r,s)},G=gC;var mC=(r,e,i=50)=>{let{r:s,g:o,b:n,a:c}=De.parse(r),{r:h,g,b:y,a:f}=De.parse(e),B=i/100,v=B*2-1,q=c-f,H=((v*q===-1?v:(v+q)/(1+v*q))+1)/2,Y=1-H,j=s*H+h*Y,X=o*H+g*Y,Q=n*H+y*Y,et=c*B+f*(1-B);return de(j,X,Q,et)},Rd=mC;var yC=(r,e=100)=>{let i=De.parse(r);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,Rd(i,r,e)},ct=yC;/*! @license DOMPurify 3.4.17 | (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.17/LICENSE */function xC(r,e){this.v=r,this.k=e}function qd(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,s=Array(e);i<e;i++)s[i]=r[i];return s}function CC(r){if(Array.isArray(r))return r}function bC(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var s,o,n,c,h=[],g=!0,y=!1;try{if(n=(i=i.call(r)).next,e===0){if(Object(i)!==i)return;g=!1}else for(;!(g=(s=n.call(i)).done)&&(h.push(s.value),h.length!==e);g=!0);}catch(f){y=!0,o=f}finally{try{if(!g&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(y)throw o}}return h}}function kC(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function wC(r,e){return CC(r)||bC(r,e)||SC(r,e)||kC()}function SC(r,e){if(r){if(typeof r=="string")return qd(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?qd(r,e):void 0}}function Kn(r){var e,i;function s(n,c){try{var h=r[n](c),g=h.value,y=g instanceof xC;Promise.resolve(y?g.v:g).then(function(f){if(y){var B=n==="return"&&g.k?n:"next";if(!g.k||f.done)return s(B,f);f=r[B](f).value}o(!!h.done,f)},function(f){s("throw",f)})}catch(f){o(2,f)}}function o(n,c){n===2?e.reject(c):e.resolve({value:c,done:n}),(e=e.next)?s(e.key,e.arg):i=null}this._invoke=function(n,c){return new Promise(function(h,g){var y={key:n,arg:c,resolve:h,reject:g,next:null};i?i=i.next=y:(e=i=y,s(n,c))})},typeof r.return!="function"&&(this.return=void 0)}Kn.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Kn.prototype.next=function(r){return this._invoke("next",r)},Kn.prototype.throw=function(r){return this._invoke("throw",r)},Kn.prototype.return=function(r){return this._invoke("return",r)};var{entries:tp,setPrototypeOf:Nd,isFrozen:TC,getPrototypeOf:ep,getOwnPropertyDescriptor:rp,freeze:fr,seal:gr,create:gs}=Object,ip=typeof Reflect<"u"&&Reflect,{apply:$h,construct:Dh}=ip;if(!fr)fr=function(e){return e};if(!gr)gr=function(e){return e};if(!$h)$h=function(e,i){for(var s=arguments.length,o=Array(s>2?s-2:0),n=2;n<s;n++)o[n-2]=arguments[n];return e.apply(i,o)};if(!Dh)Dh=function(e){for(var i=arguments.length,s=Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return new e(...s)};var Lo=tr(Array.prototype.forEach);Array.prototype.indexOf;var _C=tr(Array.prototype.lastIndexOf),Wd=tr(Array.prototype.pop),Xs=tr(Array.prototype.push),BC=tr(Array.prototype.slice),vC=tr(Array.prototype.splice),ms=Array.isArray,Bh=op(Set),vh=tr(Set.prototype.add),Vs=tr(Set.prototype.has),Jo=tr(String.prototype.toLowerCase),Lh=tr(String.prototype.toString),zd=tr(String.prototype.match),Ks=tr(String.prototype.replace),Hd=tr(String.prototype.indexOf),LC=tr(String.prototype.trim),FC=tr(Number.prototype.toString),AC=tr(Boolean.prototype.toString),Yd=typeof BigInt>"u"?null:tr(BigInt.prototype.toString),Ud=typeof Symbol>"u"?null:tr(Symbol.prototype.toString),li=tr(Object.prototype.hasOwnProperty),Zs=tr(Object.prototype.toString),pr=tr(RegExp.prototype.test),Fo=op(TypeError);function tr(r){return function(e){if(e instanceof RegExp)e.lastIndex=0;for(var i=arguments.length,s=Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return $h(r,e,s)}}function op(r){return function(){for(var e=arguments.length,i=Array(e),s=0;s<e;s++)i[s]=arguments[s];return Dh(r,i)}}function Pe(r,e){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Jo;if(Nd)Nd(r,null);if(!ms(e))return r;let s=e.length;while(s--){let o=e[s];if(typeof o==="string"){let n=i(o);if(n!==o){if(!TC(e))e[s]=n;o=n}}r[o]=!0}return r}function MC(r){for(let e=0;e<r.length;e++)if(!li(r,e))r[e]=null;return r}function ui(r){let e=gs(null);for(let s of tp(r)){var i=wC(s,2);let o=i[0],n=i[1];if(li(r,o))if(ms(n))e[o]=MC(n);else if(n&&typeof n==="object"&&n.constructor===Object)e[o]=ui(n);else e[o]=n}return e}function EC(r){switch(typeof r){case"string":return r;case"number":return FC(r);case"boolean":return AC(r);case"bigint":return Yd?Yd(r):"0";case"symbol":return Ud?Ud(r):"Symbol()";case"undefined":return Zs(r);case"function":case"object":{if(r===null)return Zs(r);let e=r,i=yi(e,"toString");if(typeof i==="function"){let s=i(e);return typeof s==="string"?s:Zs(s)}return Zs(r)}default:return Zs(r)}}function yi(r,e){while(r!==null){let s=rp(r,e);if(s){if(s.get)return tr(s.get);if(typeof s.value==="function")return tr(s.value)}r=ep(r)}function i(){return null}return i}function OC(r,e){while(r!==null){let i=rp(r,e);if(i)return i.get?tr(i.get):null;r=ep(r)}return null}function IC(r){try{return pr(r,""),!0}catch(e){return!1}}var jd=fr(["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"]),Fh=fr(["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"]),Ah=fr(["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"]),$C=fr(["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"]),Mh=fr(["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"]),DC=fr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Gd=fr(["#text"]),Xd=fr(["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"]),Eh=fr(["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","dominant-baseline","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","pointer-events","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-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","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"]),Vd=fr(["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"]),Zn=fr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),PC=gr(/{{[\w\W]*|^[\w\W]*}}/g),RC=gr(/<%[\w\W]*|^[\w\W]*%>/g),qC=gr(/\${[\w\W]*/g),NC=gr(/^data-[\-\w.\u00B7-\uFFFF]+$/),WC=gr(/^aria-[\-\w]+$/),Kd=gr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),zC=gr(/^(?:\w+script|data):/i),HC=gr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),YC=gr(/^html$/i),UC=gr(/^[a-z][.\w]*(-[.\w]+)+$/i),Oh=gr(/<[/\w!]/g),Zd=gr(/<[/\w]/g),jC=gr(/<\/no(script|embed|frames)/i),Qd=gr(/\/>/i),lr={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},GC=fr(Pe({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),XC=function(){return typeof window>"u"?null:window},VC=function(e,i){if(typeof e!=="object"||typeof e.createPolicy!=="function")return null;let s=null,o="data-tt-policy-suffix";if(i&&i.hasAttribute(o))s=i.getAttribute(o);let n="dompurify"+(s?"#"+s:"");try{return e.createPolicy(n,{createHTML(c){return c},createScriptURL(c){return c}})}catch(c){return console.warn("TrustedTypes policy "+n+" could not be created."),null}},Jd=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Uo=function(e,i,s,o){return li(e,i)&&ms(e[i])?Pe(o.base?ui(o.base):{},e[i],o.transform):s},Ih=function(e,i,s){let o=li(e,i)?e[i]:void 0;return o&&typeof o==="object"?ui(o):s()};function sp(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:XC(),e=(qt)=>sp(qt);if(e.version="3.4.17",e.removed=[],!r||!r.document||r.document.nodeType!==lr.document||!r.Element)return e.isSupported=!1,e;let i=r.document,s=i,o=s.currentScript;r.DocumentFragment;let{HTMLTemplateElement:n,Node:c,Element:h,NodeFilter:g}=r;r.NamedNodeMap===void 0&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;let{DOMParser:y,trustedTypes:f}=r,B=h.prototype,v=yi(B,"cloneNode"),q=yi(B,"remove"),W=yi(B,"removeAttributeNode"),H=yi(B,"nextSibling"),Y=yi(B,"childNodes"),j=yi(B,"parentNode"),X=yi(B,"shadowRoot"),Q=yi(B,"attributes"),et=c&&c.prototype?yi(c.prototype,"nodeType"):null,it=c&&c.prototype?yi(c.prototype,"nodeName"):null,ht=c&&c.prototype?yi(c.prototype,"ownerDocument"):null,lt=function(J){return et?et(J):J.nodeType},ft=function(J){return it?it(J):J.nodeName},xt=OC(B,"namespaceURI"),Lt=function(J){return xt?xt(J):J.namespaceURI};if(typeof n==="function"){let qt=i.createElement("template");if(qt.content&&qt.content.ownerDocument)i=qt.content.ownerDocument}let kt,Ct="",st,at=!1,pt=0,ot=function(){if(pt>0)throw Fo('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.')},wt=function(J){ot(),pt++;try{return kt.createHTML(J)}finally{pt--}},At=function(J){ot(),pt++;try{return kt.createScriptURL(J)}finally{pt--}},jt=function(){if(!at)st=VC(f,o),at=!0;return st},Yt=i,{implementation:ue,createNodeIterator:ce,createDocumentFragment:Ae,getElementsByTagName:Oe}=Yt,we=s.importNode,Ht=Jd();e.isSupported=typeof tp==="function"&&typeof j==="function"&&ue&&ue.createHTMLDocument!==void 0;let ne=PC,me=RC,xe=qC,Je=NC,Qe=WC,Ci=zC,oo=HC,pi=UC,Po=Kd,je=null,zr=Pe({},[...jd,...Fh,...Ah,...Mh,...Gd]),He=null,ao=Pe({},[...Xd,...Eh,...Vd,...Zn]),dr=Object.seal(gs(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}})),gi=null,Ro=null,nr=Object.seal(gs(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),qo=!0,vi=!0,no=!1,So=!0,D=!1,dt=!0,Bt=!1,Ot=!1,_t=null,Wt=null,Z=!1,mt=!1,Pt=!1,Mt=!1,It=!0,Nt=!1,Rt="user-content-",te=!0,Vt=!1,ee=null,ie={},Ee=null,Ke=Pe({},["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"]),zs=null,No=Pe({},["audio","video","img","source","image","track"]),Wo=null,ld=Pe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),vn="http://www.w3.org/1998/Math/MathML",Mn="http://www.w3.org/2000/svg",Li="http://www.w3.org/1999/xhtml",cs=Li,hh=!1,ch=null,D0=Pe({},[vn,Mn,Li],Lh),hd=fr(["mi","mo","mn","ms","mtext"]),uh=Pe({},hd),cd=fr(["annotation-xml"]),fh=Pe({},cd),P0=Pe({},["title","style","font","a","script"]),Hs=null,R0=["application/xhtml+xml","text/html"],q0="text/html",sr=null,us=null,N0=i.createElement("form"),ud=function(J){return J instanceof RegExp||J instanceof Function},dh=function(){let J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(us&&us===J)return;if(!J||typeof J!=="object")J={};J=ui(J),Hs=R0.indexOf(J.PARSER_MEDIA_TYPE)===-1?q0:J.PARSER_MEDIA_TYPE,sr=Hs==="application/xhtml+xml"?Lh:Jo,je=Uo(J,"ALLOWED_TAGS",zr,{transform:sr}),He=Uo(J,"ALLOWED_ATTR",ao,{transform:sr}),ch=Uo(J,"ALLOWED_NAMESPACES",D0,{transform:Lh}),Wo=Uo(J,"ADD_URI_SAFE_ATTR",ld,{transform:sr,base:ld}),zs=Uo(J,"ADD_DATA_URI_TAGS",No,{transform:sr,base:No}),Ee=Uo(J,"FORBID_CONTENTS",Ke,{transform:sr}),gi=Uo(J,"FORBID_TAGS",ui({}),{transform:sr}),Ro=Uo(J,"FORBID_ATTR",ui({}),{transform:sr}),ie=li(J,"USE_PROFILES")?J.USE_PROFILES&&typeof J.USE_PROFILES==="object"?ui(J.USE_PROFILES):J.USE_PROFILES:!1,qo=J.ALLOW_ARIA_ATTR!==!1,vi=J.ALLOW_DATA_ATTR!==!1,no=J.ALLOW_UNKNOWN_PROTOCOLS||!1,So=J.ALLOW_SELF_CLOSE_IN_ATTR!==!1,D=J.SAFE_FOR_TEMPLATES||!1,dt=J.SAFE_FOR_XML!==!1,Bt=J.WHOLE_DOCUMENT||!1,mt=J.RETURN_DOM||!1,Pt=J.RETURN_DOM_FRAGMENT||!1,Mt=J.RETURN_TRUSTED_TYPE||!1,Z=J.FORCE_BODY||!1,It=J.SANITIZE_DOM!==!1,Nt=J.SANITIZE_NAMED_PROPS||!1,te=J.KEEP_CONTENT!==!1,Vt=J.IN_PLACE||!1,Po=IC(J.ALLOWED_URI_REGEXP)?J.ALLOWED_URI_REGEXP:Kd,cs=typeof J.NAMESPACE==="string"?J.NAMESPACE:Li,uh=Ih(J,"MATHML_TEXT_INTEGRATION_POINTS",()=>Pe({},hd)),fh=Ih(J,"HTML_INTEGRATION_POINTS",()=>Pe({},cd));let ut=Ih(J,"CUSTOM_ELEMENT_HANDLING",()=>gs(null));if(dr=gs(null),li(ut,"tagNameCheck")&&ud(ut.tagNameCheck))dr.tagNameCheck=ut.tagNameCheck;if(li(ut,"attributeNameCheck")&&ud(ut.attributeNameCheck))dr.attributeNameCheck=ut.attributeNameCheck;if(li(ut,"allowCustomizedBuiltInElements")&&typeof ut.allowCustomizedBuiltInElements==="boolean")dr.allowCustomizedBuiltInElements=ut.allowCustomizedBuiltInElements;if(gr(dr),D)vi=!1;if(Pt)mt=!0;if(ie){if(je=Pe({},Gd),He=gs(null),ie.html===!0)Pe(je,jd),Pe(He,Xd);if(ie.svg===!0)Pe(je,Fh),Pe(He,Eh),Pe(He,Zn);if(ie.svgFilters===!0)Pe(je,Ah),Pe(He,Eh),Pe(He,Zn);if(ie.mathMl===!0)Pe(je,Mh),Pe(He,Vd),Pe(He,Zn)}if(nr.tagCheck=null,nr.attributeCheck=null,li(J,"ADD_TAGS")){if(typeof J.ADD_TAGS==="function")nr.tagCheck=J.ADD_TAGS;else if(ms(J.ADD_TAGS)){if(je===zr)je=ui(je);Pe(je,J.ADD_TAGS,sr)}}if(li(J,"ADD_ATTR")){if(typeof J.ADD_ATTR==="function")nr.attributeCheck=J.ADD_ATTR;else if(ms(J.ADD_ATTR)){if(He===ao)He=ui(He);Pe(He,J.ADD_ATTR,sr)}}if(li(J,"ADD_FORBID_CONTENTS")&&ms(J.ADD_FORBID_CONTENTS)){if(Ee===Ke)Ee=ui(Ee);Pe(Ee,J.ADD_FORBID_CONTENTS,sr)}if(te)je["#text"]=!0;if(Bt)Pe(je,["html","head","body"]);if(je.table)Pe(je,["tbody"]),delete gi.tbody;if(J.TRUSTED_TYPES_POLICY){if(typeof J.TRUSTED_TYPES_POLICY.createHTML!=="function")throw Fo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof J.TRUSTED_TYPES_POLICY.createScriptURL!=="function")throw Fo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let $t=kt;kt=J.TRUSTED_TYPES_POLICY;try{Ct=wt("")}catch(Dt){throw kt=$t,Dt}}else if(J.TRUSTED_TYPES_POLICY===null)kt=void 0,Ct="";else{if(kt===void 0)kt=jt();if(kt&&typeof Ct==="string")Ct=wt("")}if(fr)fr(J);us=J},fd=Pe({},[...Fh,...Ah,...$C]),dd=Pe({},[...Mh,...DC]),W0=function(J,ut,$t){if(ut.namespaceURI===Li)return J==="svg";if(ut.namespaceURI===vn)return J==="svg"&&($t==="annotation-xml"||uh[$t]);return Boolean(fd[J])},z0=function(J,ut,$t){if(ut.namespaceURI===Li)return J==="math";if(ut.namespaceURI===Mn)return J==="math"&&fh[$t];return Boolean(dd[J])},H0=function(J,ut,$t){if(ut.namespaceURI===Mn&&!fh[$t])return!1;if(ut.namespaceURI===vn&&!uh[$t])return!1;return!dd[J]&&(P0[J]||!fd[J])},Y0=function(J){let ut=Lt(J),$t=Jo(ft(J)),Dt=j(J),he,ve;if(Dt&&lt(Dt)===lr.element)he={namespaceURI:Lt(Dt)},ve=Jo(ft(Dt));else he={namespaceURI:cs},ve="template";if(!ch[ut])return!1;if(ut===Mn)return W0($t,he,ve);if(ut===vn)return z0($t,he,ve);if(ut===Li)return H0($t,he,ve);if(Hs==="application/xhtml+xml"&&ch[ut])return!0;return!1},zo=function(J){Xs(e.removed,{element:J});try{j(J).removeChild(J)}catch(ut){if(q(J),!j(J))throw Fo("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},pd=function(J,ut,$t){try{W(J,ut)}catch(Dt){try{J.removeAttribute($t)}catch(he){}}},ph=function(J){mh(J);let ut=Y(J);if(ut)Lo(BC(ut),(Dt)=>{try{q(Dt)}catch(he){}});let $t=lt(J)===lr.element?Q(J):null;if($t)for(let Dt=$t.length-1;Dt>=0;--Dt){let he=$t[Dt],ve=he&&he.name;if(typeof ve==="string")pd(J,he,ve)}},fs=function(J,ut,$t){if(!$t)try{$t=ut.getAttributeNode(J)}catch(Dt){$t=null}Xs(e.removed,{attribute:$t||null,from:ut});try{if($t)W(ut,$t);else ut.removeAttribute(J)}catch(Dt){try{ut.removeAttribute(J)}catch(he){}}if(J==="is")if(mt||Pt)try{zo(ut)}catch(Dt){}else try{ut.setAttribute(J,"")}catch(Dt){}},gd=function(J){let ut=Q(J);if(!ut)return;for(let $t=ut.length-1;$t>=0;--$t){let Dt=ut[$t],he=Dt&&Dt.name;if(typeof he!=="string"||He[sr(he)])continue;pd(J,Dt,he)}},gh=function(J,ut){let $t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Dt=[J];while(Dt.length>0){let he=Dt.pop();if(ut(he)===!1)continue;if($t&&lt(he)===lr.element){let Ie=X(he);if(Ho(Ie))Dt.push(Ie)}let ve=Y(he);if(ve)for(let Ie=ve.length-1;Ie>=0;--Ie)Dt.push(ve[Ie])}},mh=function(J){gh(J,(ut)=>{if(lt(ut)===lr.element)gd(ut)})},yh=function(J){let ut=[];return gh(J,($t)=>{ut.push($t)},!0),ut},U0=function(J,ut){let $t=Bh();Lo(yh(J),(Dt)=>{if(lt(Dt)===lr.element)vh($t,Dt)}),Lo(ut,(Dt)=>{if(lt(Dt)===lr.element&&!Vs($t,Dt))gd(Dt)})},md=function(J,ut){let $t=!1;return Lo(e.removed,(Dt)=>{if(Dt.element)$t=$t||Dt.element===J,mh(Dt.element)}),U0(J,ut),$t},j0=8,G0=function(J,ut){let $t=ee,Dt=null,he=()=>{if(!Dt)Dt=Bh(),Lo(ut,(ve)=>{vh(Dt,ve)});return Dt};for(let ve=0;;ve++){let Ie=yh(J),hr=[J],Ai=!1;if(Lo(Ie,($r)=>{if(lt($r)===lr.documentFragment)Xs(hr,$r);else if(!Ai&&!Vs($t,$r))Ai=Vs(he(),$r)}),!Ai)return;if(ve>=j0)throw Fo("the tree kept changing during in-place sanitization; refusing to return it");Lo(hr,($r,Ur)=>{X0($r,Ur>0,J,he())})}},X0=function(J,ut,$t,Dt){let he=xh(J),ve;while(ve=he.nextNode()){if(!Vs(Dt,ve)||Vs(ee,ve))continue;if(ut)bi(Ht.uponSanitizeShadowNode,ve,null);if(bh(ve,$t),kh(ve,$t),Ho(ve.content))Us(ve.content)}},V0=function(J){if(ee)vh(ee,J)},yd=function(J,ut){if(!dt)return!1;if(J==="patchsrc")return!0;return J==="for"&&ut!=="label"&&ut!=="output"},K0=function(J){if(!dt)return;gh(J,(ut)=>{let $t=lt(ut);if($t===lr.processingInstruction||$t===lr.comment&&pr(Zd,ut.data)){try{q(ut)}catch(Dt){}return!1}if($t===lr.element){let Dt=ut,he=sr(ft(ut));try{if(Dt.hasAttribute&&Dt.hasAttribute("patchsrc"))Dt.removeAttribute("patchsrc");if(Dt.hasAttribute&&Dt.hasAttribute("for")&&yd("for",he))Dt.removeAttribute("for")}catch(ve){}}return!0})},xd=function(J){let ut=null,$t=null;if(Z)J="<remove></remove>"+J;else{let ve=zd(J,/^[\r\n\t ]+/);$t=ve&&ve[0]}if(Hs==="application/xhtml+xml"&&cs===Li)J='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+J+"</body></html>";let Dt=kt?wt(J):J;if(cs===Li)try{ut=new y().parseFromString(Dt,Hs)}catch(ve){}if(!ut||!ut.documentElement){ut=ue.createDocument(cs,"template",null);try{ut.documentElement.innerHTML=hh?Ct:Dt}catch(ve){}}let he=ut.body||ut.documentElement;if(J&&$t)he.insertBefore(i.createTextNode($t),he.childNodes[0]||null);if(cs===Li)return Oe.call(ut,Bt?"html":"body")[0];return Bt?ut.documentElement:he},xh=function(J){let ut=ht?ht(J):J.ownerDocument;return ce.call(ut||J,J,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},On=function(J){return J=Ks(J,ne," "),J=Ks(J,me," "),J=Ks(J,xe," "),J},Ch=function(J){var ut;Cd(J);let $t=(ut=J.querySelectorAll)===null||ut===void 0?void 0:ut.call(J,"template");if($t)Lo($t,(Dt)=>{if(Ho(Dt.content))Ch(Dt.content)})},Cd=function(J){J.normalize();let ut=ht?ht(J):J.ownerDocument,$t=ce.call(ut||J,J,g.SHOW_TEXT|g.SHOW_COMMENT|g.SHOW_CDATA_SECTION|g.SHOW_PROCESSING_INSTRUCTION,null),Dt=$t.nextNode();while(Dt)Dt.data=On(Dt.data),Dt=$t.nextNode()},In=function(J){let ut=it?it(J):null;if(typeof ut!=="string")return!1;if(sr(ut)!=="form")return!1;return typeof J.nodeName!=="string"||typeof J.textContent!=="string"||typeof J.removeChild!=="function"||J.attributes!==Q(J)||typeof J.removeAttribute!=="function"||typeof J.removeAttributeNode!=="function"||typeof J.getAttributeNode!=="function"||typeof J.setAttribute!=="function"||typeof J.namespaceURI!=="string"||typeof J.insertBefore!=="function"||typeof J.hasChildNodes!=="function"||J.nodeType!==et(J)||J.childNodes!==Y(J)},Ho=function(J){if(!et||typeof J!=="object"||J===null)return!1;try{return et(J)===lr.documentFragment}catch(ut){return!1}},Ys=function(J){if(!et||typeof J!=="object"||J===null)return!1;try{return typeof et(J)==="number"}catch(ut){return!1}};function bi(qt,J,ut){if(qt.length===0)return;Lo(qt,($t)=>{$t.call(e,J,ut,us)})}let Z0=function(J,ut){if(dt&&J.hasChildNodes()&&!Ys(J.firstElementChild)&&pr(Oh,J.textContent)&&pr(Oh,J.innerHTML))return!0;if(dt&&GC[ut]&&lt(J)===lr.element&&Lt(J)===Li&&(Ys(J.firstElementChild)||typeof J.textContent==="string"&&pr(Oh,J.textContent)))return!0;if(J.nodeType===lr.processingInstruction)return!0;if(dt&&J.nodeType===lr.comment&&pr(Zd,J.data))return!0;return!1},Dn=function(J,ut){if(J instanceof RegExp)return pr(J,ut);if(J instanceof Function){for(var $t=arguments.length,Dt=Array($t>2?$t-2:0),he=2;he<$t;he++)Dt[he-2]=arguments[he];return Boolean(J(ut,...Dt))}return!1},Q0=function(J,ut,$t){if(!gi[ut]&&wd(ut)&&Dn(dr.tagNameCheck,ut))return!1;if(te&&!Ee[ut]&&!Ee[Jo(ut)]){let Dt=j(J),he=Y(J);if(he&&Dt){let ve=he.length;for(let Ie=ve-1;Ie>=0;--Ie){let hr=J===$t?v(he[Ie],!0):he[Ie];Dt.insertBefore(hr,H(J))}}}return zo(J),!0},bd=function(J,ut,$t,Dt){if(J.length===0)return ut;return ut===$t||ut===Dt?ui(ut):ut},ds=function(J,ut){if(J===ut||j(J)!==null)return!1;if(Vt)mh(J);return!0},bh=function(J,ut){if(V0(J),bi(Ht.beforeSanitizeElements,J,null),ds(J,ut))return!0;if(In(J))return zo(J),!0;let $t=sr(ft(J));if(je=bd(Ht.uponSanitizeElement,je,zr,_t),bi(Ht.uponSanitizeElement,J,{tagName:$t,allowedTags:je}),ds(J,ut))return!0;if(Z0(J,$t))return zo(J),!0;if(gi[$t]||!(nr.tagCheck instanceof Function&&nr.tagCheck($t))&&!je[$t]){let Dt=Q0(J,$t,ut);if(Dt===!1){if(bi(Ht.afterSanitizeElements,J,null),ds(J,ut))return!0}return Dt}if(lt(J)===lr.element&&!Y0(J))return zo(J),!0;if(($t==="noscript"||$t==="noembed"||$t==="noframes")&&pr(jC,J.innerHTML))return zo(J),!0;if(D&&J.nodeType===lr.text){let Dt=On(J.textContent);if(J.textContent!==Dt)Xs(e.removed,{element:J.cloneNode()}),J.textContent=Dt}return bi(Ht.afterSanitizeElements,J,null),ds(J,ut)},kd=function(J,ut,$t){if(Ro[ut])return!1;if(yd(ut,J))return!1;if(It&&(ut==="id"||ut==="name")&&(($t in i)||($t in N0)))return!1;let Dt=He[ut]||nr.attributeCheck instanceof Function&&nr.attributeCheck(ut,J);if(vi&&pr(Je,ut))return!0;if(qo&&pr(Qe,ut))return!0;if(!Dt)return wd(J)&&Dn(dr.tagNameCheck,J)&&Dn(dr.attributeNameCheck,ut,J)||ut==="is"&&dr.allowCustomizedBuiltInElements&&Dn(dr.tagNameCheck,$t);if(Wo[ut])return!0;if(pr(Po,Ks($t,oo,"")))return!0;if((ut==="src"||ut==="xlink:href"||ut==="href")&&J!=="script"&&Hd($t,"data:")===0&&zs[J])return!0;if(no&&!pr(Ci,Ks($t,oo,"")))return!0;return!$t},J0=Pe({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),wd=function(J){return!J0[Jo(J)]&&pr(pi,J)},tC=function(J,ut,$t,Dt){if(kt&&typeof f==="object"&&typeof f.getAttributeType==="function"&&!$t)switch(f.getAttributeType(J,ut)){case"TrustedHTML":return wt(Dt);case"TrustedScriptURL":return At(Dt)}return Dt},eC=function(J,ut,$t,Dt){try{if($t)J.setAttributeNS($t,ut,Dt);else J.setAttribute(ut,Dt);if(In(J))return zo(J),!1;return!0}catch(he){return fs(ut,J),!1}},Sd=function(J,ut){if(dt&&pr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ut))return!0;return Jo(J)==="attributename"&&zd(ut,"href")!==null},kh=function(J,ut){if(bi(Ht.beforeSanitizeAttributes,J,null),ds(J,ut))return;let $t=J.attributes;if(!$t||In(J))return;He=bd(Ht.uponSanitizeAttribute,He,ao,Wt);let Dt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:He,forceKeepAttr:void 0},he=$t.length,ve=sr(J.nodeName);while(he--){let Ie=$t[he],{name:hr,namespaceURI:Ai,value:$r}=Ie,Ur=sr(hr),ps=$r,Jr=hr==="value"?ps:LC(ps),Td=!1;if(Dt.attrName=Ur,Dt.attrValue=Jr,Dt.keepAttr=!0,Dt.forceKeepAttr=void 0,bi(Ht.uponSanitizeAttribute,J,Dt),Jr=Dt.attrValue,Nt&&(Ur==="id"||Ur==="name")&&Hd(Jr,Rt)!==0)fs(hr,J,Ie),Jr=Rt+Jr,Td=!0;if(Sd(hr,Jr)){fs(hr,J,Ie);continue}if(Dt.forceKeepAttr)continue;if(!Dt.keepAttr){fs(hr,J,Ie);continue}if(!So&&pr(Qd,Jr)){fs(hr,J,Ie);continue}if(D)Jr=On(Jr);if(!kd(ve,Ur,Jr)){fs(hr,J,Ie);continue}if(Jr=tC(ve,Ur,Ai,Jr),Jr!==ps){if(eC(J,hr,Ai,Jr)&&Td)Wd(e.removed)}}bi(Ht.afterSanitizeAttributes,J,null),ds(J,ut)},Us=function(J){let ut=null,$t=xh(J);bi(Ht.beforeSanitizeShadowDOM,J,null);while(ut=$t.nextNode()){if(bi(Ht.uponSanitizeShadowNode,ut,null),bh(ut,J),kh(ut,J),Ho(ut.content))Us(ut.content);if(lt(ut)===lr.element){let Dt=X(ut);if(Ho(Dt))wh(Dt),Us(Dt)}}if(D)Cd(J);bi(Ht.afterSanitizeShadowDOM,J,null)},wh=function(J){let ut=[{node:J,shadow:null}];while(ut.length>0){let $t=ut.pop();if($t.shadow){Us($t.shadow);continue}let Dt=$t.node,he=lt(Dt)===lr.element,ve=Y(Dt);if(ve)for(let Ie=ve.length-1;Ie>=0;--Ie)ut.push({node:ve[Ie],shadow:null});if(he){let Ie=it?it(Dt):null;if(typeof Ie==="string"&&sr(Ie)==="template"){let hr=Dt.content;if(Ho(hr))ut.push({node:hr,shadow:null})}}if(he){let Ie=X(Dt);if(Ho(Ie))ut.push({node:null,shadow:Ie},{node:Ie,shadow:null})}}};return e.sanitize=function(qt){let J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ut=null,$t=null,Dt=null,he=null;if(hh=!qt,hh)qt="<!-->";if(typeof qt!=="string"&&!Ys(qt)){if(qt=EC(qt),typeof qt!=="string")throw Fo("dirty is not a string, aborting")}if(!e.isSupported)return qt;if(Ot)je=_t,He=Wt;else dh(J);if(Ht.uponSanitizeElement.length>0||Ht.uponSanitizeAttribute.length>0)je=ui(je);if(Ht.uponSanitizeAttribute.length>0)He=ui(He);e.removed=[];let ve=Vt&&typeof qt!=="string"&&Ys(qt),Ie=[],hr=ee;if(ve){K0(qt);let Ur=ft(qt);if(typeof Ur==="string"){let ps=sr(Ur);if(!je[ps]||gi[ps])throw ph(qt),Fo("root node is forbidden and cannot be sanitized in-place")}if(In(qt))throw ph(qt),Fo("root node is clobbered and cannot be sanitized in-place");Ie=yh(qt),ee=Bh()}else if(Ys(qt)){if(ut=xd("<!---->"),$t=ut.ownerDocument.importNode(qt,!0),$t.nodeType===lr.element&&$t.nodeName==="BODY")ut=$t;else if($t.nodeName==="HTML")ut=$t;else ut.appendChild($t);wh(ut)}else{if(!mt&&!D&&!Bt&&qt.indexOf("<")===-1)return kt&&Mt?wt(qt):qt;if(ut=xd(qt),!ut)return mt?null:Mt?Ct:""}if(ut&&Z)zo(ut.firstChild);let Ai=ve?qt:ut;try{if(ve)wh(qt);let Ur=xh(Ai);while(Dt=Ur.nextNode())if(bh(Dt,Ai),kh(Dt,Ai),Ho(Dt.content))Us(Dt.content);if(ve)G0(qt,Ie)}catch(Ur){if(ve)ph(qt),md(qt,Ie);throw Ur}finally{ee=hr}if(ve){if(md(qt,Ie))throw Fo("a node selected for removal could not be safely returned; refusing to sanitize in place");if(D)Ch(qt);return qt}if(mt){if(D)Ch(ut);if(Pt){he=Ae.call(ut.ownerDocument);while(ut.firstChild)he.appendChild(ut.firstChild)}else he=ut;if(He.shadowroot||He.shadowrootmode)he=we.call(s,he,!0);return he}let $r=Bt?ut.outerHTML:ut.innerHTML;if(Bt&&je["!doctype"]&&ut.ownerDocument&&ut.ownerDocument.doctype&&ut.ownerDocument.doctype.name&&pr(YC,ut.ownerDocument.doctype.name))$r="<!DOCTYPE "+ut.ownerDocument.doctype.name+`>
3
+ `+$r;if(D)$r=On($r);return kt&&Mt?wt($r):$r},e.setConfig=function(){let qt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};dh(qt),Ot=!0,_t=je,Wt=He},e.clearConfig=function(){us=null,Ot=!1,_t=null,Wt=null,kt=st,Ct=""},e.isValidAttribute=function(qt,J,ut){if(!us)dh({});let $t=sr(qt),Dt=sr(J);if(typeof ut==="string"&&(Sd(J,ut)||!So&&pr(Qd,ut)))return!1;return kd($t,Dt,ut)},e.addHook=function(qt,J){if(typeof J!=="function")return;if(!li(Ht,qt))return;Xs(Ht[qt],J)},e.removeHook=function(qt,J){if(!li(Ht,qt))return;if(J!==void 0){let ut=_C(Ht[qt],J);return ut===-1?void 0:vC(Ht[qt],ut,1)[0]}return Wd(Ht[qt])},e.removeHooks=function(qt){if(!li(Ht,qt))return;Ht[qt]=[]},e.removeAllHooks=function(){Ht=Jd()},e}var Re=sp();var ys=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,el=/\s/,KC=t((r)=>{let e="",i=0,s=0;while(s<r.length){let o=r.indexOf("%%",s);if(o===-1)break;let n=r.indexOf(`
4
4
  `,o);if(n===-1)break;let c=o;while(c>i&&el.test(r[c-1]))c--;e+=r.slice(i,c)+`
5
5
  `,i=n+1,s=i}return e+r.slice(i)},"stripAnyComments"),Qn=t((r)=>r===`
6
- `||r==="\r","isLineBreak"),ZC=t((r,e)=>{let i=-1;for(let s=e;s<r.length&&el.test(r[s]);s++)if(Qn(r[s]))i=s;return i},"lastLineBreakInWhitespaceRun"),$i=t((r)=>{let e=0;while(e<r.length&&el.test(r[e])&&!Qn(r[e]))e++;let i=r.slice(0,e);if(!r.startsWith("---",e))return;let s=[];for(let f=e+3;f<r.length&&el.test(r[f]);f++)if(Qn(r[f]))s.push(f);if(s.length===0)return;let o=`${i}---`,n=t((f)=>Qn(r[f])&&r.startsWith(o,f+1)?ZC(r,f+1+o.length):-1,"closingEnd"),c=s[0]+1,h=-1;for(let f=c;f<r.length;f++)if(n(f)!==-1)h=f;if(h===-1)return;let g=s[0];for(let f of s)if(f<h)g=f;let y=g+1;for(let f=y;f<=h;f++){let B=n(f);if(B!==-1)return{indent:i,body:r.slice(y,f),length:B+1}}return},"matchFrontMatter"),Bi=class extends Error{static{t(this,"UnknownDiagramError")}constructor(r){super(r);this.name="UnknownDiagramError"}},Sn={},xr=t(function(r,e){let i=$i(r);r=KC((i?r.slice(i.length):r).replace(ms,""));for(let[s,{detector:o}]of Object.entries(Sn))if(o(r,e))return s;throw new Bi(`No diagram type detected matching given configuration for text: ${r}`)},"detectType"),Da=t((...r)=>{for(let{id:e,detector:i,loader:s}of r)up(e,i,s)},"registerLazyLoadedDiagrams"),up=t((r,e,i)=>{if(Sn[r])a.warn(`Detector with key ${r} already exists. Overwriting.`);Sn[r]={detector:e,loader:i},a.debug(`Detector with key ${r} added${i?" with loader":""}`)},"addDetector"),co=t((r)=>Sn[r].loader,"getDiagramLoader"),Ph=t((r,e,{depth:i=2}={})=>{let s={depth:i};if(Array.isArray(e)&&!Array.isArray(r))return e.forEach((o)=>Ph(r,o,s)),r;else if(Array.isArray(e)&&Array.isArray(r))return e.forEach((o)=>{if(!r.includes(o))r.push(o)}),r;if(r===void 0||r===null||i<=0)if(r!==void 0&&r!==null&&typeof r==="object"&&typeof e==="object")return Object.assign(r,e);else return e;if(e!==void 0&&e!==null&&typeof r==="object"&&typeof e==="object"){let o=r;Object.entries(e).forEach(([n,c])=>{if(typeof c==="object"){if(c===null)return;if(!Object.hasOwn(r,n))Object.defineProperty(r,n,{value:void 0,writable:!0,enumerable:!0,configurable:!0});if(o[n]===void 0)o[n]=Array.isArray(c)?[]:{};if(typeof o[n]==="object")o[n]=Ph(o[n],c,{depth:i-1})}else if(typeof o[n]!=="object")if(Object.hasOwn(r,n))o[n]=c;else Object.defineProperty(r,n,{value:c,writable:!0,enumerable:!0,configurable:!0})})}return r},"assignWithDepth"),oe=Ph,Ai="#ffffff",Mi="#f2f2f2",be=t((r,e)=>e?G(r,{s:-40,l:10}):G(r,{s:-40,l:-10}),"mkBorder"),ap=t((r)=>typeof r==="object"&&r!==null&&!Array.isArray(r),"isPlainObject"),bi=t((r,e)=>ap(r)&&ap(e)?{...r,...e}:e,"applyOverride"),QC=class{static{t(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||be(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||be(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||be(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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?d(this.secondaryColor,30):this.secondaryColor),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||u(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||d(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||d(this.mainBkg,10);else this.rowOdd=this.rowOdd||u(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||u(this.mainBkg,5);if(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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||ut(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||u(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||d(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||G(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||G(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||G(this.primaryColor,{h:64}),this.fillType3=this.fillType3||G(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||G(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||G(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||G(this.primaryColor,{h:128}),this.fillType7=this.fillType7||G(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||G(this.primaryColor,{l:-10}),this.pie5=this.pie5||G(this.secondaryColor,{l:-10}),this.pie6=this.pie6||G(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||G(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||G(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||G(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||G(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||G(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||G(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??G(this.primaryColor,{l:-30}),this.venn2=this.venn2??G(this.secondaryColor,{l:-30}),this.venn3=this.venn3??G(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??G(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??G(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??G(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??G(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??G(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?d(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||G(this.primaryColor,{h:-30}),this.git4=this.git4||G(this.primaryColor,{h:-60}),this.git5=this.git5||G(this.primaryColor,{h:-90}),this.git6=this.git6||G(this.primaryColor,{h:60}),this.git7=this.git7||G(this.primaryColor,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else 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.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Ai,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mi,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);if(e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=bi(this[i],r[i])}),Object.hasOwn(r,"nodeBorder")&&!Object.hasOwn(r,"useGradient"))this.useGradient=!1}},JC=t((r)=>{let e=new QC;return e.calculate(r),e},"getThemeVariables"),tb=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=u(this.primaryColor,16),this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=be(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.lineColor=ut(this.background),this.textColor=ut(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=u(ut("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=de(255,255,255,0.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=d("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=d(this.sectionBkgColor,10),this.taskBorderColor=de(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=de(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||u(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||d(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=u(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=u(this.labelBackground,25),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=u(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=ut(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=G(this.primaryColor,{h:64}),this.fillType3=G(this.secondaryColor,{h:64}),this.fillType4=G(this.primaryColor,{h:-64}),this.fillType5=G(this.secondaryColor,{h:-64}),this.fillType6=G(this.primaryColor,{h:128}),this.fillType7=G(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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||ut(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScalePeer"+r]=this["cScalePeer"+r]||u(this["cScale"+r],10);for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||G(this.mainBkg,{h:30,s:-30,l:-(-10+r*4)}),this["surfacePeer"+r]=this["surfacePeer"+r]||G(this.mainBkg,{h:30,s:-30,l:-(-7+r*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["pie"+r]=this["cScale"+r];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 r=0;r<8;r++)this["venn"+(r+1)]=this["venn"+(r+1)]??u(this["cScale"+r],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.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?d(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=u(this.secondaryColor,20),this.git1=u(this.pie2||this.secondaryColor,20),this.git2=u(this.pie3||this.tertiaryColor,20),this.git3=u(this.pie4||G(this.primaryColor,{h:-30}),20),this.git4=u(this.pie5||G(this.primaryColor,{h:-60}),20),this.git5=u(this.pie6||G(this.primaryColor,{h:-90}),10),this.git6=u(this.pie7||G(this.primaryColor,{h:60}),10),this.git7=u(this.pie8||G(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ut(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ut(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||u("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||u("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||u("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||u("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||u(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||u(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||u(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||u(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=bi(this[i],r[i])})}},eb=t((r)=>{let e=new tb;return e.calculate(r),e},"getThemeVariables"),rb=class{static{t(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=G(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=be(this.primaryColor,this.darkMode),this.secondaryBorderColor=be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=be(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.lineColor=ut(this.background),this.textColor=ut(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=be(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=de(102,102,255,0.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||d(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||d(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=d(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||d(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||G(this["cScale"+r],{h:180});for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||G(this.mainBkg,{h:30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||G(this.mainBkg,{h:30,l:-(7+r*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||ut(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||ut(this.labelTextColor);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.labelTextColor}if(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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||u(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||u(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=G(this.primaryColor,{h:64}),this.fillType3=G(this.secondaryColor,{h:64}),this.fillType4=G(this.primaryColor,{h:-64}),this.fillType5=G(this.secondaryColor,{h:-64}),this.fillType6=G(this.primaryColor,{h:128}),this.fillType7=G(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||G(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||G(this.primaryColor,{l:-10}),this.pie5=this.pie5||G(this.secondaryColor,{l:-30}),this.pie6=this.pie6||G(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||G(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||G(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||G(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||G(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||G(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||G(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??G(this.primaryColor,{l:-30}),this.venn2=this.venn2??G(this.secondaryColor,{l:-30}),this.venn3=this.venn3??G(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??G(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??G(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??G(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??G(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??G(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||G(this.primaryColor,{h:-30}),this.git4=this.git4||G(this.primaryColor,{h:-60}),this.git5=this.git5||G(this.primaryColor,{h:-90}),this.git6=this.git6||G(this.primaryColor,{h:60}),this.git7=this.git7||G(this.primaryColor,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else 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.gitInv0=this.gitInv0||d(ut(this.git0),25),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ut(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ut(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||Ai,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mi}calculate(r){if(Object.keys(this).forEach((i)=>{if(this[i]==="calculated")this[i]=void 0}),typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=bi(this[i],r[i])})}},ke=t((r)=>{let e=new rb;return e.calculate(r),e},"getThemeVariables"),ib=class{static{t(this,"Theme")}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=u("#cde498",10),this.primaryBorderColor=be(this.primaryColor,this.darkMode),this.secondaryBorderColor=be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=be(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.primaryColor),this.lineColor=ut(this.background),this.textColor=ut(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=d(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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||d(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||d(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=d(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||d(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||G(this["cScale"+r],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||G(this.mainBkg,{h:30,s:-30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||G(this.mainBkg,{h:30,s:-30,l:-(8+r*5)});if(this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||u(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||u(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=G(this.primaryColor,{h:64}),this.fillType3=G(this.secondaryColor,{h:64}),this.fillType4=G(this.primaryColor,{h:-64}),this.fillType5=G(this.secondaryColor,{h:-64}),this.fillType6=G(this.primaryColor,{h:128}),this.fillType7=G(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||G(this.primaryColor,{l:-30}),this.pie5=this.pie5||G(this.secondaryColor,{l:-30}),this.pie6=this.pie6||G(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||G(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||G(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||G(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||G(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||G(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||G(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??G(this.primaryColor,{l:-30}),this.venn2=this.venn2??G(this.secondaryColor,{l:-30}),this.venn3=this.venn3??G(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??G(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??G(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??G(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??G(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??G(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||G(this.primaryColor,{h:-30}),this.git4=this.git4||G(this.primaryColor,{h:-60}),this.git5=this.git5||G(this.primaryColor,{h:-90}),this.git6=this.git6||G(this.primaryColor,{h:60}),this.git7=this.git7||G(this.primaryColor,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else 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.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ut(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ut(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||Ai,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mi}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=bi(this[i],r[i])})}},ob=t((r)=>{let e=new ib;return e.calculate(r),e},"getThemeVariables"),sb=class{static{t(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=u(this.contrast,55),this.background="#ffffff",this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=be(this.primaryColor,this.darkMode),this.secondaryBorderColor=be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=be(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.lineColor=ut(this.background),this.textColor=ut(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||u(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=u(this.contrast,55),this.border2=this.contrast,this.actorBorder=u(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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 r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||ut(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)if(this.darkMode)this["cScalePeer"+r]=this["cScalePeer"+r]||u(this["cScale"+r],10);else this["cScalePeer"+r]=this["cScalePeer"+r]||d(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||G(this.mainBkg,{l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||G(this.mainBkg,{l:-(8+r*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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.sectionBkgColor=u(this.contrast,30),this.sectionBkgColor2=u(this.contrast,30),this.taskBorderColor=d(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=u(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=d(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=G(this.primaryColor,{h:64}),this.fillType3=G(this.secondaryColor,{h:64}),this.fillType4=G(this.primaryColor,{h:-64}),this.fillType5=G(this.secondaryColor,{h:-64}),this.fillType6=G(this.primaryColor,{h:128}),this.fillType7=G(this.secondaryColor,{h:128});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["pie"+r]=this["cScale"+r];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 r=0;r<8;r++)this["venn"+(r+1)]=this["venn"+(r+1)]??this["cScale"+r];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.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=d(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||G(this.primaryColor,{h:-30}),this.git4=this.pie5||G(this.primaryColor,{h:-60}),this.git5=this.pie6||G(this.primaryColor,{h:-90}),this.git6=this.pie7||G(this.primaryColor,{h:60}),this.git7=this.pie8||G(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Ai,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mi}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=bi(this[i],r[i])})}},ab=t((r)=>{let e=new sb;return e.calculate(r),e},"getThemeVariables"),nb=class{static{t(this,"Theme")}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=be(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||be(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||be(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||be(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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?d(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor),this.rectBkgColor=this.rectBkgColor||(K(this.background)?u(this.background,4):d(this.background,4));let r="#ECECFE",e="#E9E9F1",i=G(r,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||r,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||u(r,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||r,this.cScale1=this.cScale1||e,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||G(r,{h:30}),this.cScale4=this.cScale4||G(r,{h:60}),this.cScale5=this.cScale5||G(r,{h:90}),this.cScale6=this.cScale6||G(r,{h:120}),this.cScale7=this.cScale7||G(r,{h:150}),this.cScale8=this.cScale8||G(r,{h:210,l:150}),this.cScale9=this.cScale9||G(r,{h:270}),this.cScale10=this.cScale10||G(r,{h:300}),this.cScale11=this.cScale11||G(r,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=d(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=d(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||ut(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||u(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||d(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||G(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||G(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||r,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||G(r,{h:64}),this.fillType3=this.fillType3||G(e,{h:64}),this.fillType4=this.fillType4||G(r,{h:-64}),this.fillType5=this.fillType5||G(e,{h:-64}),this.fillType6=this.fillType6||G(r,{h:128}),this.fillType7=this.fillType7||G(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||G(r,{l:-10}),this.pie5=this.pie5||G(e,{l:-10}),this.pie6=this.pie6||G(i,{l:-10}),this.pie7=this.pie7||G(r,{h:60,l:-10}),this.pie8=this.pie8||G(r,{h:-60,l:-10}),this.pie9=this.pie9||G(r,{h:120,l:0}),this.pie10=this.pie10||G(r,{h:60,l:-20}),this.pie11=this.pie11||G(r,{h:-60,l:-20}),this.pie12=this.pie12||G(r,{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||r,this.quadrant2Fill=this.quadrant2Fill||G(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||r,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?d(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||G(r,{h:-30}),this.git4=this.git4||G(r,{h:-60}),this.git5=this.git5||G(r,{h:-90}),this.git6=this.git6||G(r,{h:60}),this.git7=this.git7||G(r,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else 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.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Ai,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mi}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=bi(this[i],r[i])})}},lb=t((r)=>{let e=new nb;return e.calculate(r),e},"getThemeVariables"),hb=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=u(this.primaryColor,16),this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=be(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=u(ut("#323D47"),10),this.border1="#ccc",this.border2=de(255,255,255,0.25),this.arrowheadColor=ut(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||be(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||be(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||be(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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.secondBkg=this.secondBkg==="calculated"?u(this.mainBkg,16):this.secondBkg,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?d(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||u(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||ut(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||u(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||d(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||G(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||G(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||G(this.primaryColor,{h:64}),this.fillType3=this.fillType3||G(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||G(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||G(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||G(this.primaryColor,{h:128}),this.fillType7=this.fillType7||G(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||G(this.primaryColor,{l:-10}),this.pie5=this.pie5||G(this.secondaryColor,{l:-10}),this.pie6=this.pie6||G(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||G(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||G(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||G(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||G(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||G(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||G(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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?d(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=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else 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.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Ai,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mi}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=bi(this[i],r[i])})}};var cb=t((r)=>{let e=new hb;return e.calculate(r),e},"getThemeVariables"),ub=class{static{t(this,"Theme")}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=be("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||be(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||be(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||be(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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?d(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor),this.rectBkgColor=this.rectBkgColor||(K(this.background)?u(this.background,4):d(this.background,4));let r="#ECECFE",e="#E9E9F1",i=G(r,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||r,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||u(r,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 o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=this.mainBkg;if(this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=d(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=d(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||ut(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||u(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||d(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||G(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||G(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||r,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||G(r,{h:64}),this.fillType3=this.fillType3||G(e,{h:64}),this.fillType4=this.fillType4||G(r,{h:-64}),this.fillType5=this.fillType5||G(e,{h:-64}),this.fillType6=this.fillType6||G(r,{h:128}),this.fillType7=this.fillType7||G(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||G(r,{l:-10}),this.pie5=this.pie5||G(e,{l:-10}),this.pie6=this.pie6||G(i,{l:-10}),this.pie7=this.pie7||G(r,{h:60,l:-10}),this.pie8=this.pie8||G(r,{h:-60,l:-10}),this.pie9=this.pie9||G(r,{h:120,l:0}),this.pie10=this.pie10||G(r,{h:60,l:-20}),this.pie11=this.pie11||G(r,{h:-60,l:-20}),this.pie12=this.pie12||G(r,{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||r,this.quadrant2Fill=this.quadrant2Fill||G(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||r,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?d(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||G(r,{h:-30}),this.git4=this.git4||G(r,{h:-60}),this.git5=this.git5||G(r,{h:-90}),this.git6=this.git6||G(r,{h:60}),this.git7=this.git7||G(r,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else 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.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Ai,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mi}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=bi(this[i],r[i])})}},fb=t((r)=>{let e=new ub;return e.calculate(r),e},"getThemeVariables"),db=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=u(this.primaryColor,16),this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=be(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=u(ut("#323D47"),10),this.border1="#ccc",this.border2=de(255,255,255,0.25),this.arrowheadColor=ut(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||be(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||be(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||be(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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.secondBkg=this.secondBkg==="calculated"?u(this.mainBkg,16):this.secondBkg,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?d(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||u(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||ut(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||u(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||d(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||G(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||G(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||G(this.primaryColor,{h:64}),this.fillType3=this.fillType3||G(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||G(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||G(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||G(this.primaryColor,{h:128}),this.fillType7=this.fillType7||G(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||G(this.primaryColor,{l:-10}),this.pie5=this.pie5||G(this.secondaryColor,{l:-10}),this.pie6=this.pie6||G(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||G(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||G(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||G(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||G(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||G(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||G(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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?d(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||G(this.primaryColor,{h:-30}),this.git4=this.git4||G(this.primaryColor,{h:-60}),this.git5=this.git5||G(this.primaryColor,{h:-90}),this.git6=this.git6||G(this.primaryColor,{h:60}),this.git7=this.git7||G(this.primaryColor,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else 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.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Ai,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mi}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=bi(this[i],r[i])})}},pb=t((r)=>{let e=new db;return e.calculate(r),e},"getThemeVariables"),gb=class{static{t(this,"Theme")}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=be("#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.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.usecaseActorBorder="#A78BFA",this.usecaseActorBkg="#F5F3FF",this.usecaseBorder="#2DD4BF",this.usecaseBkg="#F0FDFA",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseBoundaryBkg="#FAFAFC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||be(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||be(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||be(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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?d(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor),this.rectBkgColor=this.rectBkgColor||(K(this.background)?u(this.background,4):d(this.background,4));let r="#ECECFE",e="#E9E9F1",i=G(r,{h:180,l:5});this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||u(r,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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#FFFFFF",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#F9F9FB",this.compositeTitleBackground=this.compositeTitleBackground||"#F9F9FB",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||"white";for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||ut(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||u(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||d(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||G(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||G(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor;for(let o=0;o<8;o++)this["fillType"+o]=this["fillType"+o]||this.bkgColorArray[o];for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["pie"+(o+1)]=this["pie"+(o+1)]||this["cScale"+o];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 o=0;o<8;o++)this["venn"+(o+1)]=this["venn"+(o+1)]??this.borderColorArray[o%this.borderColorArray.length];if(this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||r,this.quadrant2Fill=this.quadrant2Fill||G(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||r,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?d(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||G(r,{h:-30}),this.git4=this.git4||G(r,{h:-60}),this.git5=this.git5||G(r,{h:-90}),this.git6=this.git6||G(r,{h:60}),this.git7=this.git7||G(r,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else 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.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Ai,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mi}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=bi(this[i],r[i])})}},mb=t((r)=>{let e=new gb;return e.calculate(r),e},"getThemeVariables"),yb=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=u(this.primaryColor,16),this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=be(this.tertiaryColor,this.darkMode),this.primaryTextColor=ut(this.primaryColor),this.secondaryTextColor=ut(this.secondaryColor),this.tertiaryTextColor=ut(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=u(ut("#323D47"),10),this.border1="#ccc",this.border2=de(255,255,255,0.25),this.arrowheadColor=ut(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.usecaseActorBorder="#A78BFA",this.usecaseBorder="#2DD4BF",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||be(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||be(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||be(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||be(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||ut(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ut(this.tertiaryColor),this.lineColor=this.lineColor||ut(this.background),this.arrowheadColor=this.arrowheadColor||ut(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.secondBkg=this.secondBkg==="calculated"?u(this.mainBkg,16):this.secondBkg,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?d(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",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||u(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#16141F",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||"#16141F",this.altBackground=this.altBackground||"#16141F",this.compositeTitleBackground=this.compositeTitleBackground||"#16141F",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||this.background;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleInv"+i]=this["cScaleInv"+i]||ut(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)if(this.darkMode)this["cScalePeer"+i]=this["cScalePeer"+i]||u(this["cScale"+i],10);else this["cScalePeer"+i]=this["cScalePeer"+i]||d(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=d(this["cScale"+i],75);let r=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||G(this.mainBkg,{h:180,s:-15,l:r*(5+i*3)}),this["surfacePeer"+i]=this["surfacePeer"+i]||G(this.mainBkg,{h:180,s:-15,l:r*(8+i*3)});this.classText=this.classText||this.textColor,["#701a75","#134e4a","#7c2d12","#581c87","#14532d","#4c1d95","#7f1d1d","#713f12"].forEach((i,s)=>{this["fillType"+s]=this["fillType"+s]||i});for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["pie"+(i+1)]=this["pie"+(i+1)]||this["cScale"+i];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||"#28253D",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 i=0;i<8;i++)this["venn"+(i+1)]=this["venn"+(i+1)]??this.borderColorArray[i%this.borderColorArray.length];if(this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?d(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||G(this.primaryColor,{h:-30}),this.git4=this.git4||G(this.primaryColor,{h:-60}),this.git5=this.git5||G(this.primaryColor,{h:-90}),this.git6=this.git6||G(this.primaryColor,{h:60}),this.git7=this.git7||G(this.primaryColor,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else 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.gitInv0=this.gitInv0||ut(this.git0),this.gitInv1=this.gitInv1||ut(this.git1),this.gitInv2=this.gitInv2||ut(this.git2),this.gitInv3=this.gitInv3||ut(this.git3),this.gitInv4=this.gitInv4||ut(this.git4),this.gitInv5=this.gitInv5||ut(this.git5),this.gitInv6=this.gitInv6||ut(this.git6),this.gitInv7=this.gitInv7||ut(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||Ai,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mi}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=bi(this[i],r[i])})}},xb=t((r)=>{let e=new yb;return e.calculate(r),e},"getThemeVariables"),Qt={base:{getThemeVariables:JC},dark:{getThemeVariables:eb},default:{getThemeVariables:ke},forest:{getThemeVariables:ob},neutral:{getThemeVariables:ab},neo:{getThemeVariables:lb},"neo-dark":{getThemeVariables:cb},redux:{getThemeVariables:fb},"redux-dark":{getThemeVariables:pb},"redux-color":{getThemeVariables:mb},"redux-dark-color":{getThemeVariables:xb}},or={flowchart:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,wrappingWidth:120,minNodeWidth:120,inheritDir:!1},swimlane:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"swimlane",lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},agentflow:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:8,nodeSpacing:50,rankSpacing:50,wrappingWidth:120,minNodeWidth:120},sequence:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,theme:"redux-color",look:"neo",titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"elk",wrappingWidth:120,minNodeWidth:120,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},er:{useMaxWidth:!0,theme:"redux-color",look:"neo",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:0.75,donutHole:0,legendPosition:"right",highlightSlice:""},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,showLegend:!0,legendFontSize:14,legendPadding:10,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,labelRotation:0},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,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,colorBy:"branch",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,bitOrder:"ascending",paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:0.45,numIter:2500,seed:1},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:0.17},usecase:{useMaxWidth:!0,theme:"redux-color",look:"neo",wrappingWidth:120,minNodeWidth:120,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:"normal",usecaseFontSize:12,usecaseFontFamily:'"Open Sans", sans-serif',usecaseFontWeight:"normal",nodeSpacing:50,rankSpacing:50,diagramPadding:20,colorScheme:"role"},venn:{useMaxWidth:!0,theme:"redux-color",look:"neo",width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"elk",maxTextSize:50000,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},fp={...or,deterministicIDSeed:void 0,elk:{mergeEdges:!1,straightenEdges:!0,lineHops:!0,preset:"default",nodePlacementStrategy:void 0,layeringStrategy:void 0,cycleBreakingStrategy:void 0,layeringLayerBound:4,nodePlacementAlignment:void 0,forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1,orientFeedbackEdges:!0},themeCSS:void 0,themeVariables:Qt.default.getThemeVariables(),sequence:{...or.sequence,messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:t(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:t(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{theme:or.class?.theme,look:or.class?.look,layout:or.class?.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...or.gantt,tickInterval:void 0,useWidth:void 0},c4:{...or.c4,useWidth:void 0,personFont:t(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...or.flowchart,inheritDir:!1},external_personFont:t(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:t(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:t(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:t(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:t(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:t(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:t(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:t(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:t(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:t(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:t(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:t(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:t(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:t(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:t(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:t(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:t(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:t(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:t(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:t(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...or.pie,useWidth:984},xyChart:{...or.xyChart,useWidth:void 0},requirement:{...or.requirement,useWidth:void 0},packet:{...or.packet},eventmodeling:{...or.eventmodeling},treeView:{...or.treeView,useWidth:void 0},radar:{...or.radar},usecase:{...or.usecase},railroad:{...or.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...or.ishikawa},sankey:{...or.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:{...or.venn},cynefin:{...or.cynefin}},dp=t((r,e="")=>Object.keys(r).reduce((i,s)=>{if(Array.isArray(r[s]))return i;else if(typeof r[s]==="object"&&r[s]!==null)return[...i,e+s,...dp(r[s],"")];return[...i,e+s]},[]),"keyify"),Cb=new Set(dp(fp,"")),N=fp,bb={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},kb=t((r)=>bb[r]??r,"getDiagramConfigKey"),wb={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Sb=t((r,e)=>{for(let i of Object.keys(r)){let s=r[i];if(i.startsWith("__")||i.includes("proto")||i.includes("constr")||typeof s!=="string"||!e.test(s))a.debug("sanitize deleting dictionary entry:",i,s),delete r[i]}},"sanitizeDictionaryConfig"),Js=t((r)=>{if(a.debug("sanitizeDirective called with",r),typeof r!=="object"||r==null)return;if(Array.isArray(r)){r.forEach((e)=>Js(e));return}for(let e of Object.keys(r)){if(a.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Cb.has(e)||r[e]==null){a.debug("sanitize deleting key: ",e),delete r[e];continue}if(typeof r[e]==="object"){let s=wb[e];if(s)Sb(r[e],s);else a.debug("sanitizing object",e),Js(r[e]);continue}let i=["themeCSS","fontFamily","altFontFamily"];for(let s of i)if(e.includes(s))a.debug("sanitizing css option",e),r[e]=Fi(r[e])}if(r.themeVariables)for(let e of Object.keys(r.themeVariables)){let i=r.themeVariables[e];if(i?.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/))r.themeVariables[e]=""}a.debug("After sanitization",r)},"sanitizeDirective"),Fi=t((r)=>{let e=0,i=0;for(let s of r){if(e<i)return"{ /* ERROR: Unbalanced CSS */ }";if(s==="{")e++;else if(s==="}")i++}if(e!==i)return"{ /* ERROR: Unbalanced CSS */ }";return r},"sanitizeCss"),on=Object.freeze(N),Tb=["theme","look","layout"],_b=new Set(["classic","handDrawn","neo"]),Bb=t((r,e)=>{if(r==="theme")return e==="null"||Object.hasOwn(Qt,e);return r!=="look"||_b.has(e)},"isUsableAppearance"),vb=t((r,e,i)=>{if(!r)return;return[r[e]?.[i],r[i]].find((o)=>o!==void 0&&Bb(i,o))},"readAppearance"),ht=t((r)=>r===!1||["false","null","0"].includes(String(r).trim().toLowerCase())?!1:!0,"evaluate"),Fr=oe({},on),rl,il={},Fo=[],Zs=oe({},on),Qs,Lb=t((r,e)=>{if(!Qs)return;let i=[e,...[...Fo].reverse(),il,on],s=r[Qs];for(let o of Tb)for(let n of i){let c=vb(n,Qs,o);if(c===void 0)continue;if(r[o]=c,s?.[o]!==void 0)s[o]=c;break}},"resolveAppearance"),ys=t((r,e)=>{let i=oe({},r),s={};for(let n of e)pp(n),s=oe(s,n);if(i=oe(i,s),Lb(i,s),(Boolean(s.theme)||i.theme!==r.theme)&&i.theme&&Object.hasOwn(Qt,i.theme)){let n=oe({},rl),c=oe(n.themeVariables||{},s.themeVariables);i.themeVariables=Qt[i.theme].getThemeVariables(c)}return Zs=i,Ab(Zs),Zs},"updateCurrentConfig"),Na=t((r)=>{Qs=r===void 0?void 0:kb(r),ys(Fr,Fo)},"setDiagramConfigScope"),uo=t((r)=>{if(Fr=oe({},on),Fr=oe(Fr,r),il=oe({},r),r.theme&&Object.hasOwn(Qt,r.theme))Fr.themeVariables=Qt[r.theme].getThemeVariables(r.themeVariables);return ys(Fr,Fo),Fr},"setSiteConfig"),po=t((r)=>{rl=oe({},r)},"saveConfigFromInitialize"),mo=t((r)=>(Fr=oe(Fr,r),il=oe(il,r),ys(Fr,Fo),Fr),"updateSiteConfig"),zi=t(()=>oe({},Fr),"getSiteConfig"),Ui=t((r)=>(ys(Zs,[r]),x()),"setConfig"),x=t(()=>oe({},Zs),"getConfig"),pp=t((r)=>{if(!r)return;["secure",...Fr.secure??[]].forEach((e)=>{if(Object.hasOwn(r,e))a.debug(`Denied attempt to modify a secure key ${e}`,r[e]),delete r[e]}),Object.keys(r).forEach((e)=>{if(e.startsWith("__"))delete r[e]}),Object.keys(r).forEach((e)=>{if(typeof r[e]==="string"&&(r[e].includes("<")||r[e].includes(">")||r[e].includes("url(data:")))delete r[e];if(typeof r[e]==="object")pp(r[e])})},"sanitize"),fo=t((r)=>{if(Js(r),r.fontFamily&&!r.themeVariables?.fontFamily)r.themeVariables={...r.themeVariables,fontFamily:r.fontFamily};Fo.push(r),ys(Fr,Fo)},"addDirective"),Wr=t((r=Fr)=>{Fo=[],Qs=void 0,ys(r,Fo)},"reset"),Fb={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."},np={},gp=t((r)=>{if(np[r])return;a.warn(Fb[r]),np[r]=!0},"issueWarning"),Ab=t((r)=>{if(!r)return;if(r.lazyLoadedDiagrams||r.loadExternalDiagramsAtStartup)gp("LAZY_LOAD_DEPRECATED")},"checkConfig"),ho=t(()=>{let r={};if(rl)r=oe(r,rl);for(let e of Fo)r=oe(r,e);return r},"getUserDefinedConfig"),Ce=t((r)=>{if(r.flowchart?.htmlLabels!=null)gp("FLOWCHART_HTML_LABELS_DEPRECATED");return ht(r.htmlLabels??r.flowchart?.htmlLabels??!0)},"getEffectiveHtmlLabels"),Fn=/<\/?br\s*\/?>/gi,Mb=new RegExp(Fn.source,"i"),Eb=t((r)=>{if(!r)return[""];return xp(r).replace(/\\n/g,"#br#").split("#br#")},"getRows"),Ob=(()=>{let r=!1;return()=>{if(!r)mp(),r=!0}})();function mp(){Re.addHook("beforeSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("target"))e.setAttribute("data-temp-href-target",e.getAttribute("target")??"")}),Re.addHook("afterSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("data-temp-href-target")){if(e.setAttribute("target",e.getAttribute("data-temp-href-target")??""),e.removeAttribute("data-temp-href-target"),e.getAttribute("target")==="_blank")e.setAttribute("rel","noopener")}})}t(mp,"setupDompurifyHooks");var yp=t((r)=>(Ob(),Re.sanitize(r)),"removeScript"),lp=t((r,e)=>{if(Ce(e)){let i=e.securityLevel;if(i==="antiscript"||i==="strict"||i==="sandbox")r=yp(r);else if(i!=="loose")r=xp(r),r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"),r=r.replace(/=/g,"&equals;"),r=Pb(r)}return r},"sanitizeMore"),O=t((r,e)=>{if(!r)return r;if(e.dompurifyConfig)r=Re.sanitize(lp(r,e),e.dompurifyConfig).toString();else r=Re.sanitize(lp(r,e),{FORBID_TAGS:["style"]}).toString();return r},"sanitizeText"),Ib=t((r,e)=>{if(typeof r==="string")return O(r,e);return r.flat().map((i)=>O(i,e))},"sanitizeTextOrArray"),$b=t((r)=>Mb.test(r),"hasBreaks"),Db=t((r)=>r.split(Fn),"splitBreaks"),Pb=t((r)=>r.replace(/#br#/g,"<br/>"),"placeholderToBreak"),xp=t((r)=>r.replace(Fn,"#br#"),"breakToPlaceholder"),ji=t((r)=>{let e="";if(r)e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e);return e},"getUrl"),Rb=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.max(...e)},"getMax"),qb=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.min(...e)},"getMin"),Jt=t(function(r){let e=r.split(/(,)/),i=[];for(let s=0;s<e.length;s++){let o=e[s];if(o===","&&s>0&&s+1<e.length){let n=e[s-1],c=e[s+1];if(Nb(n,c))o=n+","+c,s++,i.pop()}i.push(Wb(o))}return i.join("")},"parseGenericTypes"),Rh=t((r,e)=>Math.max(0,r.split(e).length-1),"countOccurrence"),Nb=t((r,e)=>{let i=Rh(r,"~"),s=Rh(e,"~");return i===1&&s===1},"shouldCombineSets"),Wb=t((r)=>{let e=Rh(r,"~"),i=!1;if(e<=1)return r;if(e%2!==0&&r.startsWith("~"))r=r.substring(1),i=!0;let s=[...r],o=s.indexOf("~"),n=s.lastIndexOf("~");while(o!==-1&&n!==-1&&o!==n)s[o]="<",s[n]=">",o=s.indexOf("~"),n=s.lastIndexOf("~");if(i)s.unshift("~");return s.join("")},"processSet"),hp=t(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Jn=/\$\$(.*?)\$\$/g,fe=t((r)=>(r.match(Jn)?.length??0)>0,"hasKatex"),_r=t(async(r,e)=>{let i=document.createElement("div");i.innerHTML=await wr(r,e),i.id="katex-temp",i.style.visibility="hidden",i.style.position="absolute",i.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",i);let o={width:i.clientWidth,height:i.clientHeight};return i.remove(),o},"calculateMathMLDimensions"),zb=t(async(r,e)=>{if(!fe(r))return r;if(!(hp()||e.legacyMathML||e.forceLegacyMathML))return r.replace(Jn,"MathML is unsupported in this environment.");{let{default:i}=await (_("nj0cv1cq"),import("./chunk-nj0cv1cq.js")),s=e.forceLegacyMathML||!hp()&&e.legacyMathML?"htmlAndMathml":"mathml";return r.split(Fn).map((o)=>fe(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(Jn,(o,n)=>i.renderToString(n,{throwOnError:!0,displayMode:!0,output:s}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}return r.replace(Jn,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),wr=t(async(r,e)=>O(await zb(r,e),e),"renderKatexSanitized"),b={getRows:Eb,sanitizeText:O,sanitizeTextOrArray:Ib,hasBreaks:$b,splitBreaks:Db,lineBreakRegex:Fn,removeScript:yp,getUrl:ji,evaluate:ht,getMax:Rb,getMin:qb},Hb=t(function(r,e){for(let i of e)r.attr(i[0],i[1])},"d3Attrs"),Yb=t(function(r,e,i){let s=new Map;if(i)s.set("width","100%"),s.set("style",`max-width: ${e}px;`);else s.set("height",r),s.set("width",e);return s},"calculateSvgSizeAttrs"),F=t(function(r,e,i,s){let o=Yb(e,i,s);Hb(r,o)},"configureSvgSize"),gt=t(function(r,e,i,s){let o=e.node().getBBox(),{width:n,height:c}=o;a.info(`SVG bounds: ${n}x${c}`,o);let h=0,g=0;a.info(`Graph bounds: ${h}x${g}`,r),h=n+i*2,g=c+i*2,a.info(`Calculated bounds: ${h}x${g}`),F(e,g,h,s);let y=`${o.x-i} ${o.y-i} ${o.width+2*i} ${o.height+2*i}`;e.attr("viewBox",y)},"setupGraphViewbox"),tl={};function Ma(r){return[...r.cssRules].map((e)=>e.cssText).join(`
7
- `)}t(Ma,"cssStyleSheetToString");var Ub=t((r,e,i,s)=>{let o="";if(r in tl&&tl[r])o=tl[r]({...i,svgId:s});else a.warn(`No theme found for ${r}`);return`& {
6
+ `||r==="\r","isLineBreak"),ZC=t((r,e)=>{let i=-1;for(let s=e;s<r.length&&el.test(r[s]);s++)if(Qn(r[s]))i=s;return i},"lastLineBreakInWhitespaceRun"),Pi=t((r)=>{let e=0;while(e<r.length&&el.test(r[e])&&!Qn(r[e]))e++;let i=r.slice(0,e);if(!r.startsWith("---",e))return;let s=[];for(let f=e+3;f<r.length&&el.test(r[f]);f++)if(Qn(r[f]))s.push(f);if(s.length===0)return;let o=`${i}---`,n=t((f)=>Qn(r[f])&&r.startsWith(o,f+1)?ZC(r,f+1+o.length):-1,"closingEnd"),c=s[0]+1,h=-1;for(let f=c;f<r.length;f++)if(n(f)!==-1)h=f;if(h===-1)return;let g=s[0];for(let f of s)if(f<h)g=f;let y=g+1;for(let f=y;f<=h;f++){let B=n(f);if(B!==-1)return{indent:i,body:r.slice(y,f),length:B+1}}return},"matchFrontMatter"),Oi=class extends Error{static{t(this,"UnknownDiagramError")}constructor(r){super(r);this.name="UnknownDiagramError"}},kn={},vr=t(function(r,e){let i=Pi(r);r=KC((i?r.slice(i.length):r).replace(ys,""));for(let[s,{detector:o}]of Object.entries(kn))if(o(r,e))return s;throw new Oi(`No diagram type detected matching given configuration for text: ${r}`)},"detectType"),La=t((...r)=>{for(let{id:e,detector:i,loader:s}of r)up(e,i,s)},"registerLazyLoadedDiagrams"),up=t((r,e,i)=>{if(kn[r])a.warn(`Detector with key ${r} already exists. Overwriting.`);kn[r]={detector:e,loader:i},a.debug(`Detector with key ${r} added${i?" with loader":""}`)},"addDetector"),so=t((r)=>kn[r].loader,"getDiagramLoader"),Ph=t((r,e,{depth:i=2}={})=>{let s={depth:i};if(Array.isArray(e)&&!Array.isArray(r))return e.forEach((o)=>Ph(r,o,s)),r;else if(Array.isArray(e)&&Array.isArray(r))return e.forEach((o)=>{if(!r.includes(o))r.push(o)}),r;if(r===void 0||r===null||i<=0)if(r!==void 0&&r!==null&&typeof r==="object"&&typeof e==="object")return Object.assign(r,e);else return e;if(e!==void 0&&e!==null&&typeof r==="object"&&typeof e==="object"){let o=r;Object.entries(e).forEach(([n,c])=>{if(typeof c==="object"){if(c===null)return;if(!Object.hasOwn(r,n))Object.defineProperty(r,n,{value:void 0,writable:!0,enumerable:!0,configurable:!0});if(o[n]===void 0)o[n]=Array.isArray(c)?[]:{};if(typeof o[n]==="object")o[n]=Ph(o[n],c,{depth:i-1})}else if(typeof o[n]!=="object")if(Object.hasOwn(r,n))o[n]=c;else Object.defineProperty(r,n,{value:c,writable:!0,enumerable:!0,configurable:!0})})}return r},"assignWithDepth"),oe=Ph,Mi="#ffffff",Ei="#f2f2f2",_e=t((r,e)=>e?G(r,{s:-40,l:10}):G(r,{s:-40,l:-10}),"mkBorder"),ap=t((r)=>typeof r==="object"&&r!==null&&!Array.isArray(r),"isPlainObject"),ki=t((r,e)=>ap(r)&&ap(e)?{...r,...e}:e,"applyOverride"),QC=class{static{t(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||_e(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||_e(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||_e(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||_e(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ct(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ct(this.tertiaryColor),this.lineColor=this.lineColor||ct(this.background),this.arrowheadColor=this.arrowheadColor||ct(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?d(this.secondaryColor,30):this.secondaryColor),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ct(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||u(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||d(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||d(this.mainBkg,10);else this.rowOdd=this.rowOdd||u(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||u(this.mainBkg,5);if(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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||ct(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||u(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||d(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||G(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||G(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||G(this.primaryColor,{h:64}),this.fillType3=this.fillType3||G(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||G(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||G(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||G(this.primaryColor,{h:128}),this.fillType7=this.fillType7||G(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||G(this.primaryColor,{l:-10}),this.pie5=this.pie5||G(this.secondaryColor,{l:-10}),this.pie6=this.pie6||G(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||G(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||G(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||G(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||G(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||G(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||G(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??G(this.primaryColor,{l:-30}),this.venn2=this.venn2??G(this.secondaryColor,{l:-30}),this.venn3=this.venn3??G(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??G(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??G(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??G(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??G(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??G(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?d(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||G(this.primaryColor,{h:-30}),this.git4=this.git4||G(this.primaryColor,{h:-60}),this.git5=this.git5||G(this.primaryColor,{h:-90}),this.git6=this.git6||G(this.primaryColor,{h:60}),this.git7=this.git7||G(this.primaryColor,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else 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.gitInv0=this.gitInv0||ct(this.git0),this.gitInv1=this.gitInv1||ct(this.git1),this.gitInv2=this.gitInv2||ct(this.git2),this.gitInv3=this.gitInv3||ct(this.git3),this.gitInv4=this.gitInv4||ct(this.git4),this.gitInv5=this.gitInv5||ct(this.git5),this.gitInv6=this.gitInv6||ct(this.git6),this.gitInv7=this.gitInv7||ct(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||Mi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ei,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);if(e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=ki(this[i],r[i])}),Object.hasOwn(r,"nodeBorder")&&!Object.hasOwn(r,"useGradient"))this.useGradient=!1}},JC=t((r)=>{let e=new QC;return e.calculate(r),e},"getThemeVariables"),tb=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=u(this.primaryColor,16),this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=ct(this.background),this.secondaryBorderColor=_e(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_e(this.tertiaryColor,this.darkMode),this.primaryTextColor=ct(this.primaryColor),this.secondaryTextColor=ct(this.secondaryColor),this.tertiaryTextColor=ct(this.tertiaryColor),this.lineColor=ct(this.background),this.textColor=ct(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=u(ct("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=de(255,255,255,0.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=d("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=d(this.sectionBkgColor,10),this.taskBorderColor=de(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=de(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||u(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||d(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=u(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=u(this.labelBackground,25),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=u(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=ct(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=G(this.primaryColor,{h:64}),this.fillType3=G(this.secondaryColor,{h:64}),this.fillType4=G(this.primaryColor,{h:-64}),this.fillType5=G(this.secondaryColor,{h:-64}),this.fillType6=G(this.primaryColor,{h:128}),this.fillType7=G(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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||ct(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScalePeer"+r]=this["cScalePeer"+r]||u(this["cScale"+r],10);for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||G(this.mainBkg,{h:30,s:-30,l:-(-10+r*4)}),this["surfacePeer"+r]=this["surfacePeer"+r]||G(this.mainBkg,{h:30,s:-30,l:-(-7+r*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["pie"+r]=this["cScale"+r];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 r=0;r<8;r++)this["venn"+(r+1)]=this["venn"+(r+1)]??u(this["cScale"+r],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.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?d(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=u(this.secondaryColor,20),this.git1=u(this.pie2||this.secondaryColor,20),this.git2=u(this.pie3||this.tertiaryColor,20),this.git3=u(this.pie4||G(this.primaryColor,{h:-30}),20),this.git4=u(this.pie5||G(this.primaryColor,{h:-60}),20),this.git5=u(this.pie6||G(this.primaryColor,{h:-90}),10),this.git6=u(this.pie7||G(this.primaryColor,{h:60}),10),this.git7=u(this.pie8||G(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||ct(this.git0),this.gitInv1=this.gitInv1||ct(this.git1),this.gitInv2=this.gitInv2||ct(this.git2),this.gitInv3=this.gitInv3||ct(this.git3),this.gitInv4=this.gitInv4||ct(this.git4),this.gitInv5=this.gitInv5||ct(this.git5),this.gitInv6=this.gitInv6||ct(this.git6),this.gitInv7=this.gitInv7||ct(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ct(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ct(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||u("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||u("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||u("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||u("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||u(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||u(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||u(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||u(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=ki(this[i],r[i])})}},eb=t((r)=>{let e=new tb;return e.calculate(r),e},"getThemeVariables"),rb=class{static{t(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=G(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=_e(this.primaryColor,this.darkMode),this.secondaryBorderColor=_e(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_e(this.tertiaryColor,this.darkMode),this.primaryTextColor=ct(this.primaryColor),this.secondaryTextColor=ct(this.secondaryColor),this.tertiaryTextColor=ct(this.tertiaryColor),this.lineColor=ct(this.background),this.textColor=ct(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=_e(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=de(102,102,255,0.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||d(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||d(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=d(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||d(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||G(this["cScale"+r],{h:180});for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||G(this.mainBkg,{h:30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||G(this.mainBkg,{h:30,l:-(7+r*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||ct(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||ct(this.labelTextColor);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.labelTextColor}if(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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||u(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||u(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=G(this.primaryColor,{h:64}),this.fillType3=G(this.secondaryColor,{h:64}),this.fillType4=G(this.primaryColor,{h:-64}),this.fillType5=G(this.secondaryColor,{h:-64}),this.fillType6=G(this.primaryColor,{h:128}),this.fillType7=G(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||G(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||G(this.primaryColor,{l:-10}),this.pie5=this.pie5||G(this.secondaryColor,{l:-30}),this.pie6=this.pie6||G(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||G(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||G(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||G(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||G(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||G(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||G(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??G(this.primaryColor,{l:-30}),this.venn2=this.venn2??G(this.secondaryColor,{l:-30}),this.venn3=this.venn3??G(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??G(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??G(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??G(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??G(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??G(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||G(this.primaryColor,{h:-30}),this.git4=this.git4||G(this.primaryColor,{h:-60}),this.git5=this.git5||G(this.primaryColor,{h:-90}),this.git6=this.git6||G(this.primaryColor,{h:60}),this.git7=this.git7||G(this.primaryColor,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else 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.gitInv0=this.gitInv0||d(ct(this.git0),25),this.gitInv1=this.gitInv1||ct(this.git1),this.gitInv2=this.gitInv2||ct(this.git2),this.gitInv3=this.gitInv3||ct(this.git3),this.gitInv4=this.gitInv4||ct(this.git4),this.gitInv5=this.gitInv5||ct(this.git5),this.gitInv6=this.gitInv6||ct(this.git6),this.gitInv7=this.gitInv7||ct(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ct(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ct(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||Mi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ei}calculate(r){if(Object.keys(this).forEach((i)=>{if(this[i]==="calculated")this[i]=void 0}),typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=ki(this[i],r[i])})}},ke=t((r)=>{let e=new rb;return e.calculate(r),e},"getThemeVariables"),ib=class{static{t(this,"Theme")}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=u("#cde498",10),this.primaryBorderColor=_e(this.primaryColor,this.darkMode),this.secondaryBorderColor=_e(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_e(this.tertiaryColor,this.darkMode),this.primaryTextColor=ct(this.primaryColor),this.secondaryTextColor=ct(this.secondaryColor),this.tertiaryTextColor=ct(this.primaryColor),this.lineColor=ct(this.background),this.textColor=ct(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=d(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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||d(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||d(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=d(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||d(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||G(this["cScale"+r],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||G(this.mainBkg,{h:30,s:-30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||G(this.mainBkg,{h:30,s:-30,l:-(8+r*5)});if(this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||u(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||u(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=G(this.primaryColor,{h:64}),this.fillType3=G(this.secondaryColor,{h:64}),this.fillType4=G(this.primaryColor,{h:-64}),this.fillType5=G(this.secondaryColor,{h:-64}),this.fillType6=G(this.primaryColor,{h:128}),this.fillType7=G(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||G(this.primaryColor,{l:-30}),this.pie5=this.pie5||G(this.secondaryColor,{l:-30}),this.pie6=this.pie6||G(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||G(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||G(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||G(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||G(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||G(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||G(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??G(this.primaryColor,{l:-30}),this.venn2=this.venn2??G(this.secondaryColor,{l:-30}),this.venn3=this.venn3??G(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??G(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??G(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??G(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??G(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??G(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||G(this.primaryColor,{h:-30}),this.git4=this.git4||G(this.primaryColor,{h:-60}),this.git5=this.git5||G(this.primaryColor,{h:-90}),this.git6=this.git6||G(this.primaryColor,{h:60}),this.git7=this.git7||G(this.primaryColor,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else 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.gitInv0=this.gitInv0||ct(this.git0),this.gitInv1=this.gitInv1||ct(this.git1),this.gitInv2=this.gitInv2||ct(this.git2),this.gitInv3=this.gitInv3||ct(this.git3),this.gitInv4=this.gitInv4||ct(this.git4),this.gitInv5=this.gitInv5||ct(this.git5),this.gitInv6=this.gitInv6||ct(this.git6),this.gitInv7=this.gitInv7||ct(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ct(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ct(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||Mi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ei}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=ki(this[i],r[i])})}},ob=t((r)=>{let e=new ib;return e.calculate(r),e},"getThemeVariables"),sb=class{static{t(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=u(this.contrast,55),this.background="#ffffff",this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=_e(this.primaryColor,this.darkMode),this.secondaryBorderColor=_e(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_e(this.tertiaryColor,this.darkMode),this.primaryTextColor=ct(this.primaryColor),this.secondaryTextColor=ct(this.secondaryColor),this.tertiaryTextColor=ct(this.tertiaryColor),this.lineColor=ct(this.background),this.textColor=ct(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||u(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=u(this.contrast,55),this.border2=this.contrast,this.actorBorder=u(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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 r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||ct(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)if(this.darkMode)this["cScalePeer"+r]=this["cScalePeer"+r]||u(this["cScale"+r],10);else this["cScalePeer"+r]=this["cScalePeer"+r]||d(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||G(this.mainBkg,{l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||G(this.mainBkg,{l:-(8+r*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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.sectionBkgColor=u(this.contrast,30),this.sectionBkgColor2=u(this.contrast,30),this.taskBorderColor=d(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=u(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=d(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=G(this.primaryColor,{h:64}),this.fillType3=G(this.secondaryColor,{h:64}),this.fillType4=G(this.primaryColor,{h:-64}),this.fillType5=G(this.secondaryColor,{h:-64}),this.fillType6=G(this.primaryColor,{h:128}),this.fillType7=G(this.secondaryColor,{h:128});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["pie"+r]=this["cScale"+r];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 r=0;r<8;r++)this["venn"+(r+1)]=this["venn"+(r+1)]??this["cScale"+r];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.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=d(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||G(this.primaryColor,{h:-30}),this.git4=this.pie5||G(this.primaryColor,{h:-60}),this.git5=this.pie6||G(this.primaryColor,{h:-90}),this.git6=this.pie7||G(this.primaryColor,{h:60}),this.git7=this.pie8||G(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||ct(this.git0),this.gitInv1=this.gitInv1||ct(this.git1),this.gitInv2=this.gitInv2||ct(this.git2),this.gitInv3=this.gitInv3||ct(this.git3),this.gitInv4=this.gitInv4||ct(this.git4),this.gitInv5=this.gitInv5||ct(this.git5),this.gitInv6=this.gitInv6||ct(this.git6),this.gitInv7=this.gitInv7||ct(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||Mi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ei}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=ki(this[i],r[i])})}},ab=t((r)=>{let e=new sb;return e.calculate(r),e},"getThemeVariables"),nb=class{static{t(this,"Theme")}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=_e(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||_e(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||_e(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||_e(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||_e(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ct(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ct(this.tertiaryColor),this.lineColor=this.lineColor||ct(this.background),this.arrowheadColor=this.arrowheadColor||ct(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?d(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ct(this.lineColor),this.rectBkgColor=this.rectBkgColor||(K(this.background)?u(this.background,4):d(this.background,4));let r="#ECECFE",e="#E9E9F1",i=G(r,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||r,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||u(r,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||r,this.cScale1=this.cScale1||e,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||G(r,{h:30}),this.cScale4=this.cScale4||G(r,{h:60}),this.cScale5=this.cScale5||G(r,{h:90}),this.cScale6=this.cScale6||G(r,{h:120}),this.cScale7=this.cScale7||G(r,{h:150}),this.cScale8=this.cScale8||G(r,{h:210,l:150}),this.cScale9=this.cScale9||G(r,{h:270}),this.cScale10=this.cScale10||G(r,{h:300}),this.cScale11=this.cScale11||G(r,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=d(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=d(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||ct(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||u(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||d(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||G(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||G(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||r,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||G(r,{h:64}),this.fillType3=this.fillType3||G(e,{h:64}),this.fillType4=this.fillType4||G(r,{h:-64}),this.fillType5=this.fillType5||G(e,{h:-64}),this.fillType6=this.fillType6||G(r,{h:128}),this.fillType7=this.fillType7||G(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||G(r,{l:-10}),this.pie5=this.pie5||G(e,{l:-10}),this.pie6=this.pie6||G(i,{l:-10}),this.pie7=this.pie7||G(r,{h:60,l:-10}),this.pie8=this.pie8||G(r,{h:-60,l:-10}),this.pie9=this.pie9||G(r,{h:120,l:0}),this.pie10=this.pie10||G(r,{h:60,l:-20}),this.pie11=this.pie11||G(r,{h:-60,l:-20}),this.pie12=this.pie12||G(r,{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||r,this.quadrant2Fill=this.quadrant2Fill||G(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||r,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?d(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||G(r,{h:-30}),this.git4=this.git4||G(r,{h:-60}),this.git5=this.git5||G(r,{h:-90}),this.git6=this.git6||G(r,{h:60}),this.git7=this.git7||G(r,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else 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.gitInv0=this.gitInv0||ct(this.git0),this.gitInv1=this.gitInv1||ct(this.git1),this.gitInv2=this.gitInv2||ct(this.git2),this.gitInv3=this.gitInv3||ct(this.git3),this.gitInv4=this.gitInv4||ct(this.git4),this.gitInv5=this.gitInv5||ct(this.git5),this.gitInv6=this.gitInv6||ct(this.git6),this.gitInv7=this.gitInv7||ct(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||Mi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ei}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=ki(this[i],r[i])})}},lb=t((r)=>{let e=new nb;return e.calculate(r),e},"getThemeVariables"),hb=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=u(this.primaryColor,16),this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=ct(this.background),this.secondaryBorderColor=_e(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_e(this.tertiaryColor,this.darkMode),this.primaryTextColor=ct(this.primaryColor),this.secondaryTextColor=ct(this.secondaryColor),this.tertiaryTextColor=ct(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=u(ct("#323D47"),10),this.border1="#ccc",this.border2=de(255,255,255,0.25),this.arrowheadColor=ct(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||_e(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||_e(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||_e(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||_e(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ct(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ct(this.tertiaryColor),this.lineColor=this.lineColor||ct(this.background),this.arrowheadColor=this.arrowheadColor||ct(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.secondBkg=this.secondBkg==="calculated"?u(this.mainBkg,16):this.secondBkg,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?d(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ct(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||u(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||ct(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||u(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||d(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||G(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||G(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||G(this.primaryColor,{h:64}),this.fillType3=this.fillType3||G(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||G(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||G(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||G(this.primaryColor,{h:128}),this.fillType7=this.fillType7||G(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||G(this.primaryColor,{l:-10}),this.pie5=this.pie5||G(this.secondaryColor,{l:-10}),this.pie6=this.pie6||G(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||G(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||G(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||G(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||G(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||G(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||G(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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?d(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=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else 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.gitInv0=this.gitInv0||ct(this.git0),this.gitInv1=this.gitInv1||ct(this.git1),this.gitInv2=this.gitInv2||ct(this.git2),this.gitInv3=this.gitInv3||ct(this.git3),this.gitInv4=this.gitInv4||ct(this.git4),this.gitInv5=this.gitInv5||ct(this.git5),this.gitInv6=this.gitInv6||ct(this.git6),this.gitInv7=this.gitInv7||ct(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||Mi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ei}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=ki(this[i],r[i])})}};var cb=t((r)=>{let e=new hb;return e.calculate(r),e},"getThemeVariables"),ub=class{static{t(this,"Theme")}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=_e("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||_e(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||_e(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||_e(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||_e(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||ct(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ct(this.tertiaryColor),this.lineColor=this.lineColor||ct(this.background),this.arrowheadColor=this.arrowheadColor||ct(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?d(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ct(this.lineColor),this.rectBkgColor=this.rectBkgColor||(K(this.background)?u(this.background,4):d(this.background,4));let r="#ECECFE",e="#E9E9F1",i=G(r,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||r,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||u(r,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 o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=this.mainBkg;if(this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=d(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=d(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||ct(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||u(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||d(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||G(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||G(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||r,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||G(r,{h:64}),this.fillType3=this.fillType3||G(e,{h:64}),this.fillType4=this.fillType4||G(r,{h:-64}),this.fillType5=this.fillType5||G(e,{h:-64}),this.fillType6=this.fillType6||G(r,{h:128}),this.fillType7=this.fillType7||G(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||G(r,{l:-10}),this.pie5=this.pie5||G(e,{l:-10}),this.pie6=this.pie6||G(i,{l:-10}),this.pie7=this.pie7||G(r,{h:60,l:-10}),this.pie8=this.pie8||G(r,{h:-60,l:-10}),this.pie9=this.pie9||G(r,{h:120,l:0}),this.pie10=this.pie10||G(r,{h:60,l:-20}),this.pie11=this.pie11||G(r,{h:-60,l:-20}),this.pie12=this.pie12||G(r,{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||r,this.quadrant2Fill=this.quadrant2Fill||G(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||r,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?d(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||G(r,{h:-30}),this.git4=this.git4||G(r,{h:-60}),this.git5=this.git5||G(r,{h:-90}),this.git6=this.git6||G(r,{h:60}),this.git7=this.git7||G(r,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else 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.gitInv0=this.gitInv0||ct(this.git0),this.gitInv1=this.gitInv1||ct(this.git1),this.gitInv2=this.gitInv2||ct(this.git2),this.gitInv3=this.gitInv3||ct(this.git3),this.gitInv4=this.gitInv4||ct(this.git4),this.gitInv5=this.gitInv5||ct(this.git5),this.gitInv6=this.gitInv6||ct(this.git6),this.gitInv7=this.gitInv7||ct(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||Mi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ei}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=ki(this[i],r[i])})}},fb=t((r)=>{let e=new ub;return e.calculate(r),e},"getThemeVariables"),db=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=u(this.primaryColor,16),this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=ct(this.background),this.secondaryBorderColor=_e(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_e(this.tertiaryColor,this.darkMode),this.primaryTextColor=ct(this.primaryColor),this.secondaryTextColor=ct(this.secondaryColor),this.tertiaryTextColor=ct(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=u(ct("#323D47"),10),this.border1="#ccc",this.border2=de(255,255,255,0.25),this.arrowheadColor=ct(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||_e(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||_e(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||_e(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||_e(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||ct(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ct(this.tertiaryColor),this.lineColor=this.lineColor||ct(this.background),this.arrowheadColor=this.arrowheadColor||ct(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.secondBkg=this.secondBkg==="calculated"?u(this.mainBkg,16):this.secondBkg,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?d(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ct(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||u(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=d(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||ct(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||u(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||d(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||G(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||G(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||G(this.primaryColor,{h:64}),this.fillType3=this.fillType3||G(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||G(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||G(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||G(this.primaryColor,{h:128}),this.fillType7=this.fillType7||G(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||G(this.primaryColor,{l:-10}),this.pie5=this.pie5||G(this.secondaryColor,{l:-10}),this.pie6=this.pie6||G(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||G(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||G(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||G(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||G(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||G(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||G(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||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?d(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||G(this.primaryColor,{h:-30}),this.git4=this.git4||G(this.primaryColor,{h:-60}),this.git5=this.git5||G(this.primaryColor,{h:-90}),this.git6=this.git6||G(this.primaryColor,{h:60}),this.git7=this.git7||G(this.primaryColor,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else 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.gitInv0=this.gitInv0||ct(this.git0),this.gitInv1=this.gitInv1||ct(this.git1),this.gitInv2=this.gitInv2||ct(this.git2),this.gitInv3=this.gitInv3||ct(this.git3),this.gitInv4=this.gitInv4||ct(this.git4),this.gitInv5=this.gitInv5||ct(this.git5),this.gitInv6=this.gitInv6||ct(this.git6),this.gitInv7=this.gitInv7||ct(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||Mi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ei}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=ki(this[i],r[i])})}},pb=t((r)=>{let e=new db;return e.calculate(r),e},"getThemeVariables"),gb=class{static{t(this,"Theme")}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=_e("#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.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.usecaseActorBorder="#A78BFA",this.usecaseActorBkg="#F5F3FF",this.usecaseBorder="#2DD4BF",this.usecaseBkg="#F0FDFA",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseBoundaryBkg="#FAFAFC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||_e(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||_e(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||_e(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||_e(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||ct(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ct(this.tertiaryColor),this.lineColor=this.lineColor||ct(this.background),this.arrowheadColor=this.arrowheadColor||ct(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?d(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ct(this.lineColor),this.rectBkgColor=this.rectBkgColor||(K(this.background)?u(this.background,4):d(this.background,4));let r="#ECECFE",e="#E9E9F1",i=G(r,{h:180,l:5});this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||u(r,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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#FFFFFF",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#F9F9FB",this.compositeTitleBackground=this.compositeTitleBackground||"#F9F9FB",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||"white";for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||ct(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||u(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||d(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||G(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||G(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor;for(let o=0;o<8;o++)this["fillType"+o]=this["fillType"+o]||this.bkgColorArray[o];for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["pie"+(o+1)]=this["pie"+(o+1)]||this["cScale"+o];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 o=0;o<8;o++)this["venn"+(o+1)]=this["venn"+(o+1)]??this.borderColorArray[o%this.borderColorArray.length];if(this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||r,this.quadrant2Fill=this.quadrant2Fill||G(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||r,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?d(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||G(r,{h:-30}),this.git4=this.git4||G(r,{h:-60}),this.git5=this.git5||G(r,{h:-90}),this.git6=this.git6||G(r,{h:60}),this.git7=this.git7||G(r,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else 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.gitInv0=this.gitInv0||ct(this.git0),this.gitInv1=this.gitInv1||ct(this.git1),this.gitInv2=this.gitInv2||ct(this.git2),this.gitInv3=this.gitInv3||ct(this.git3),this.gitInv4=this.gitInv4||ct(this.git4),this.gitInv5=this.gitInv5||ct(this.git5),this.gitInv6=this.gitInv6||ct(this.git6),this.gitInv7=this.gitInv7||ct(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||Mi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ei}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=ki(this[i],r[i])})}},mb=t((r)=>{let e=new gb;return e.calculate(r),e},"getThemeVariables"),yb=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=u(this.primaryColor,16),this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=ct(this.background),this.secondaryBorderColor=_e(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_e(this.tertiaryColor,this.darkMode),this.primaryTextColor=ct(this.primaryColor),this.secondaryTextColor=ct(this.secondaryColor),this.tertiaryTextColor=ct(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=u(ct("#323D47"),10),this.border1="#ccc",this.border2=de(255,255,255,0.25),this.arrowheadColor=ct(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.usecaseActorBorder="#A78BFA",this.usecaseBorder="#2DD4BF",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||_e(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||_e(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||_e(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||_e(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||ct(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ct(this.tertiaryColor),this.lineColor=this.lineColor||ct(this.background),this.arrowheadColor=this.arrowheadColor||ct(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.secondBkg=this.secondBkg==="calculated"?u(this.mainBkg,16):this.secondBkg,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?d(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||d(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ct(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",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||u(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#16141F",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||"#16141F",this.altBackground=this.altBackground||"#16141F",this.compositeTitleBackground=this.compositeTitleBackground||"#16141F",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||this.background;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleInv"+i]=this["cScaleInv"+i]||ct(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)if(this.darkMode)this["cScalePeer"+i]=this["cScalePeer"+i]||u(this["cScale"+i],10);else this["cScalePeer"+i]=this["cScalePeer"+i]||d(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=d(this["cScale"+i],75);let r=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||G(this.mainBkg,{h:180,s:-15,l:r*(5+i*3)}),this["surfacePeer"+i]=this["surfacePeer"+i]||G(this.mainBkg,{h:180,s:-15,l:r*(8+i*3)});this.classText=this.classText||this.textColor,["#701a75","#134e4a","#7c2d12","#581c87","#14532d","#4c1d95","#7f1d1d","#713f12"].forEach((i,s)=>{this["fillType"+s]=this["fillType"+s]||i});for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["pie"+(i+1)]=this["pie"+(i+1)]||this["cScale"+i];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||"#28253D",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 i=0;i<8;i++)this["venn"+(i+1)]=this["venn"+(i+1)]??this.borderColorArray[i%this.borderColorArray.length];if(this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||G(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||G(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||G(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||G(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||G(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||G(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||K(this.quadrant1Fill)?u(this.quadrant1Fill):d(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?d(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||G(this.primaryColor,{h:-30}),this.git4=this.git4||G(this.primaryColor,{h:-60}),this.git5=this.git5||G(this.primaryColor,{h:-90}),this.git6=this.git6||G(this.primaryColor,{h:60}),this.git7=this.git7||G(this.primaryColor,{h:120}),this.darkMode)this.git0=u(this.git0,25),this.git1=u(this.git1,25),this.git2=u(this.git2,25),this.git3=u(this.git3,25),this.git4=u(this.git4,25),this.git5=u(this.git5,25),this.git6=u(this.git6,25),this.git7=u(this.git7,25);else 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.gitInv0=this.gitInv0||ct(this.git0),this.gitInv1=this.gitInv1||ct(this.git1),this.gitInv2=this.gitInv2||ct(this.git2),this.gitInv3=this.gitInv3||ct(this.git3),this.gitInv4=this.gitInv4||ct(this.git4),this.gitInv5=this.gitInv5||ct(this.git5),this.gitInv6=this.gitInv6||ct(this.git6),this.gitInv7=this.gitInv7||ct(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||Mi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ei}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=ki(this[i],r[i])})}},xb=t((r)=>{let e=new yb;return e.calculate(r),e},"getThemeVariables"),Xt={base:{getThemeVariables:JC},dark:{getThemeVariables:eb},default:{getThemeVariables:ke},forest:{getThemeVariables:ob},neutral:{getThemeVariables:ab},neo:{getThemeVariables:lb},"neo-dark":{getThemeVariables:cb},redux:{getThemeVariables:fb},"redux-dark":{getThemeVariables:pb},"redux-color":{getThemeVariables:mb},"redux-dark-color":{getThemeVariables:xb}},ar={flowchart:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,wrappingWidth:120,minNodeWidth:120,inheritDir:!1},swimlane:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"swimlane",lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},agentflow:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:8,nodeSpacing:50,rankSpacing:50,wrappingWidth:120,minNodeWidth:120},sequence:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,theme:"redux-color",look:"neo",titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"elk",wrappingWidth:120,minNodeWidth:120,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},er:{useMaxWidth:!0,theme:"redux-color",look:"neo",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:0.75,donutHole:0,legendPosition:"right",highlightSlice:""},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,showLegend:!0,legendFontSize:14,legendPadding:10,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,labelRotation:0},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,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,colorBy:"branch",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,bitOrder:"ascending",paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:0.45,numIter:2500,seed:1},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:0.17},usecase:{useMaxWidth:!0,theme:"redux-color",look:"neo",wrappingWidth:120,minNodeWidth:120,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:"normal",usecaseFontSize:12,usecaseFontFamily:'"Open Sans", sans-serif',usecaseFontWeight:"normal",nodeSpacing:50,rankSpacing:50,diagramPadding:20,colorScheme:"role"},venn:{useMaxWidth:!0,theme:"redux-color",look:"neo",width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"elk",maxTextSize:50000,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},fp={...ar,deterministicIDSeed:void 0,elk:{mergeEdges:!1,straightenEdges:!0,lineHops:!0,preset:"default",nodePlacementStrategy:void 0,layeringStrategy:void 0,cycleBreakingStrategy:void 0,layeringLayerBound:4,nodePlacementAlignment:void 0,forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1,orientFeedbackEdges:!0},themeCSS:void 0,themeVariables:Xt.default.getThemeVariables(),sequence:{...ar.sequence,messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:t(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:t(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{theme:ar.class?.theme,look:ar.class?.look,layout:ar.class?.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...ar.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ar.c4,useWidth:void 0,personFont:t(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ar.flowchart,inheritDir:!1},external_personFont:t(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:t(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:t(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:t(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:t(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:t(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:t(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:t(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:t(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:t(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:t(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:t(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:t(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:t(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:t(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:t(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:t(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:t(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:t(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:t(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...ar.pie,useWidth:984},xyChart:{...ar.xyChart,useWidth:void 0},requirement:{...ar.requirement,useWidth:void 0},packet:{...ar.packet},eventmodeling:{...ar.eventmodeling},treeView:{...ar.treeView,useWidth:void 0},radar:{...ar.radar},usecase:{...ar.usecase},railroad:{...ar.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...ar.ishikawa},sankey:{...ar.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:{...ar.venn},cynefin:{...ar.cynefin}},dp=t((r,e="")=>Object.keys(r).reduce((i,s)=>{if(Array.isArray(r[s]))return i;else if(typeof r[s]==="object"&&r[s]!==null)return[...i,e+s,...dp(r[s],"")];return[...i,e+s]},[]),"keyify"),Cb=new Set(dp(fp,"")),M=fp,bb={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},kb=t((r)=>bb[r]??r,"getDiagramConfigKey"),wb={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Sb=t((r,e)=>{for(let i of Object.keys(r)){let s=r[i];if(i.startsWith("__")||i.includes("proto")||i.includes("constr")||typeof s!=="string"||!e.test(s))a.debug("sanitize deleting dictionary entry:",i,s),delete r[i]}},"sanitizeDictionaryConfig"),ta=t((r)=>{if(a.debug("sanitizeDirective called with",r),typeof r!=="object"||r==null)return;if(Array.isArray(r)){r.forEach((e)=>ta(e));return}for(let e of Object.keys(r)){if(a.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Cb.has(e)||r[e]==null){a.debug("sanitize deleting key: ",e),delete r[e];continue}if(typeof r[e]==="object"){let s=wb[e];if(s)Sb(r[e],s);else a.debug("sanitizing object",e),ta(r[e]);continue}let i=["themeCSS","fontFamily","altFontFamily"];for(let s of i)if(e.includes(s))a.debug("sanitizing css option",e),r[e]=$i(r[e])}if(r.themeVariables)for(let e of Object.keys(r.themeVariables)){let i=r.themeVariables[e];if(i?.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/))r.themeVariables[e]=""}a.debug("After sanitization",r)},"sanitizeDirective"),$i=t((r)=>{let e=0,i=0;for(let s of r){if(e<i)return"{ /* ERROR: Unbalanced CSS */ }";if(s==="{")e++;else if(s==="}")i++}if(e!==i)return"{ /* ERROR: Unbalanced CSS */ }";return r},"sanitizeCss"),rn=Object.freeze(M),Tb=["theme","look","layout"],_b=new Set(["classic","handDrawn","neo"]),Bb=t((r,e)=>{if(r==="theme")return e==="null"||Object.hasOwn(Xt,e);return r!=="look"||_b.has(e)},"isUsableAppearance"),vb=t((r,e,i)=>{if(!r)return;return[r[e]?.[i],r[i]].find((o)=>o!==void 0&&Bb(i,o))},"readAppearance"),gt=t((r)=>r===!1||["false","null","0"].includes(String(r).trim().toLowerCase())?!1:!0,"evaluate"),Dr=oe({},rn),rl,il={},Ao=[],Qs=oe({},rn),Js,Lb=t((r,e)=>{if(!Js)return;let i=[e,...[...Ao].reverse(),il,rn],s=r[Js];for(let o of Tb)for(let n of i){let c=vb(n,Js,o);if(c===void 0)continue;if(r[o]=c,s?.[o]!==void 0)s[o]=c;break}},"resolveAppearance"),xs=t((r,e)=>{let i=oe({},r),s={};for(let n of e)pp(n),s=oe(s,n);if(i=oe(i,s),Lb(i,s),(Boolean(s.theme)||i.theme!==r.theme)&&i.theme&&Object.hasOwn(Xt,i.theme)){let n=oe({},rl),c=oe(n.themeVariables||{},s.themeVariables);i.themeVariables=Xt[i.theme].getThemeVariables(c)}return Qs=i,Ab(Qs),Qs},"updateCurrentConfig"),Ia=t((r)=>{Js=r===void 0?void 0:kb(r),xs(Dr,Ao)},"setDiagramConfigScope"),lo=t((r)=>{if(Dr=oe({},rn),Dr=oe(Dr,r),il=oe({},r),r.theme&&Object.hasOwn(Xt,r.theme))Dr.themeVariables=Xt[r.theme].getThemeVariables(r.themeVariables);return xs(Dr,Ao),Dr},"setSiteConfig"),co=t((r)=>{rl=oe({},r)},"saveConfigFromInitialize"),uo=t((r)=>(Dr=oe(Dr,r),il=oe(il,r),xs(Dr,Ao),Dr),"updateSiteConfig"),Bi=t(()=>oe({},Dr),"getSiteConfig"),Fi=t((r)=>(xs(Qs,[r]),x()),"setConfig"),x=t(()=>oe({},Qs),"getConfig"),pp=t((r)=>{if(!r)return;["secure",...Dr.secure??[]].forEach((e)=>{if(Object.hasOwn(r,e))a.debug(`Denied attempt to modify a secure key ${e}`,r[e]),delete r[e]}),Object.keys(r).forEach((e)=>{if(e.startsWith("__"))delete r[e]}),Object.keys(r).forEach((e)=>{if(typeof r[e]==="string"&&(r[e].includes("<")||r[e].includes(">")||r[e].includes("url(data:")))delete r[e];if(typeof r[e]==="object")pp(r[e])})},"sanitize"),po=t((r)=>{if(ta(r),r.fontFamily&&!r.themeVariables?.fontFamily)r.themeVariables={...r.themeVariables,fontFamily:r.fontFamily};Ao.push(r),xs(Dr,Ao)},"addDirective"),qr=t((r=Dr)=>{Ao=[],Js=void 0,xs(r,Ao)},"reset"),Fb={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."},np={},gp=t((r)=>{if(np[r])return;a.warn(Fb[r]),np[r]=!0},"issueWarning"),Ab=t((r)=>{if(!r)return;if(r.lazyLoadedDiagrams||r.loadExternalDiagramsAtStartup)gp("LAZY_LOAD_DEPRECATED")},"checkConfig"),mo=t(()=>{let r={};if(rl)r=oe(r,rl);for(let e of Ao)r=oe(r,e);return r},"getUserDefinedConfig"),Ce=t((r)=>{if(r.flowchart?.htmlLabels!=null)gp("FLOWCHART_HTML_LABELS_DEPRECATED");return gt(r.htmlLabels??r.flowchart?.htmlLabels??!0)},"getEffectiveHtmlLabels"),$n=/<\/?br\s*\/?>/gi,Mb=new RegExp($n.source,"i"),Eb=t((r)=>{if(!r)return[""];return xp(r).replace(/\\n/g,"#br#").split("#br#")},"getRows"),Ob=(()=>{let r=!1;return()=>{if(!r)mp(),r=!0}})();function mp(){Re.addHook("beforeSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("target"))e.setAttribute("data-temp-href-target",e.getAttribute("target")??"")}),Re.addHook("afterSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("data-temp-href-target")){if(e.setAttribute("target",e.getAttribute("data-temp-href-target")??""),e.removeAttribute("data-temp-href-target"),e.getAttribute("target")==="_blank")e.setAttribute("rel","noopener")}})}t(mp,"setupDompurifyHooks");var yp=t((r)=>(Ob(),Re.sanitize(r)),"removeScript"),lp=t((r,e)=>{if(Ce(e)){let i=e.securityLevel;if(i==="antiscript"||i==="strict"||i==="sandbox")r=yp(r);else if(i!=="loose")r=xp(r),r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"),r=r.replace(/=/g,"&equals;"),r=Pb(r)}return r},"sanitizeMore"),O=t((r,e)=>{if(!r)return r;if(e.dompurifyConfig)r=Re.sanitize(lp(r,e),e.dompurifyConfig).toString();else r=Re.sanitize(lp(r,e),{FORBID_TAGS:["style"]}).toString();return r},"sanitizeText"),Ib=t((r,e)=>{if(typeof r==="string")return O(r,e);return r.flat().map((i)=>O(i,e))},"sanitizeTextOrArray"),$b=t((r)=>Mb.test(r),"hasBreaks"),Db=t((r)=>r.split($n),"splitBreaks"),Pb=t((r)=>r.replace(/#br#/g,"<br/>"),"placeholderToBreak"),xp=t((r)=>r.replace($n,"#br#"),"breakToPlaceholder"),zi=t((r)=>{let e="";if(r)e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e);return e},"getUrl"),Rb=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.max(...e)},"getMax"),qb=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.min(...e)},"getMin"),Kt=t(function(r){let e=r.split(/(,)/),i=[];for(let s=0;s<e.length;s++){let o=e[s];if(o===","&&s>0&&s+1<e.length){let n=e[s-1],c=e[s+1];if(Nb(n,c))o=n+","+c,s++,i.pop()}i.push(Wb(o))}return i.join("")},"parseGenericTypes"),Rh=t((r,e)=>Math.max(0,r.split(e).length-1),"countOccurrence"),Nb=t((r,e)=>{let i=Rh(r,"~"),s=Rh(e,"~");return i===1&&s===1},"shouldCombineSets"),Wb=t((r)=>{let e=Rh(r,"~"),i=!1;if(e<=1)return r;if(e%2!==0&&r.startsWith("~"))r=r.substring(1),i=!0;let s=[...r],o=s.indexOf("~"),n=s.lastIndexOf("~");while(o!==-1&&n!==-1&&o!==n)s[o]="<",s[n]=">",o=s.indexOf("~"),n=s.lastIndexOf("~");if(i)s.unshift("~");return s.join("")},"processSet"),hp=t(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Jn=/\$\$(.*?)\$\$/g,fe=t((r)=>(r.match(Jn)?.length??0)>0,"hasKatex"),br=t(async(r,e)=>{let i=document.createElement("div");i.innerHTML=await xr(r,e),i.id="katex-temp",i.style.visibility="hidden",i.style.position="absolute",i.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",i);let o={width:i.clientWidth,height:i.clientHeight};return i.remove(),o},"calculateMathMLDimensions"),zb=t(async(r,e)=>{if(!fe(r))return r;if(!(hp()||e.legacyMathML||e.forceLegacyMathML))return r.replace(Jn,"MathML is unsupported in this environment.");{let{default:i}=await (_("nj0cv1cq"),import("./chunk-nj0cv1cq.js")),s=e.forceLegacyMathML||!hp()&&e.legacyMathML?"htmlAndMathml":"mathml";return r.split($n).map((o)=>fe(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(Jn,(o,n)=>i.renderToString(n,{throwOnError:!0,displayMode:!0,output:s}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}return r.replace(Jn,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),xr=t(async(r,e)=>O(await zb(r,e),e),"renderKatexSanitized"),b={getRows:Eb,sanitizeText:O,sanitizeTextOrArray:Ib,hasBreaks:$b,splitBreaks:Db,lineBreakRegex:$n,removeScript:yp,getUrl:zi,evaluate:gt,getMax:Rb,getMin:qb},Hb=t(function(r,e){for(let i of e)r.attr(i[0],i[1])},"d3Attrs"),Yb=t(function(r,e,i){let s=new Map;if(i)s.set("width","100%"),s.set("style",`max-width: ${e}px;`);else s.set("height",r),s.set("width",e);return s},"calculateSvgSizeAttrs"),F=t(function(r,e,i,s){let o=Yb(e,i,s);Hb(r,o)},"configureSvgSize"),yt=t(function(r,e,i,s){let o=e.node().getBBox(),{width:n,height:c}=o;a.info(`SVG bounds: ${n}x${c}`,o);let h=0,g=0;a.info(`Graph bounds: ${h}x${g}`,r),h=n+i*2,g=c+i*2,a.info(`Calculated bounds: ${h}x${g}`),F(e,g,h,s);let y=`${o.x-i} ${o.y-i} ${o.width+2*i} ${o.height+2*i}`;e.attr("viewBox",y)},"setupGraphViewbox"),tl={};function Da(r){return[...r.cssRules].map((e)=>e.cssText).join(`
7
+ `)}t(Da,"cssStyleSheetToString");var Ub=t((r,e,i,s)=>{let o="";if(r in tl&&tl[r])o=tl[r]({...i,svgId:s});else a.warn(`No theme found for ${r}`);return`& {
8
8
  font-family: ${i.fontFamily};
9
9
  font-size: ${i.fontSize};
10
10
  fill: ${i.textColor}
@@ -125,45 +125,45 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
125
125
  }
126
126
 
127
127
  ${e}
128
- `},"getStyles"),jb=t((r,e)=>{if(e!==void 0)tl[r]=e},"addStylesForDiagram"),go=Ub,Pa={};Kt(Pa,{clear:()=>C,getAccDescription:()=>A,getAccTitle:()=>E,getDiagramTitle:()=>R,setAccDescription:()=>T,setAccTitle:()=>S,setDiagramTitle:()=>L});var qh="",Nh="",Wh="",zh=t((r)=>O(r,x()),"sanitizeText"),C=t(()=>{qh="",Wh="",Nh=""},"clear"),S=t((r)=>{qh=zh(r).replace(/^\s+/g,"")},"setAccTitle"),E=t(()=>qh,"getAccTitle"),T=t((r)=>{Wh=zh(r).replace(/\n\s+/g,`
129
- `)},"setAccDescription"),A=t(()=>Wh,"getAccDescription"),L=t((r)=>{Nh=zh(r)},"setDiagramTitle"),R=t(()=>Nh,"getDiagramTitle"),cp=a,Gb=Vr,l=x,sn=Ui,Tn=on,sl=t((r)=>O(r,l()),"sanitizeText"),kr=gt,Xb=t(()=>Pa,"getCommonDb"),ol={},Gr=t((r,e,i)=>{if(ol[r])cp.warn(`Diagram with id ${r} already registered. Overwriting.`);if(ol[r]=e,i)up(r,i);jb(r,e.styles),e.injectUtils?.(cp,Gb,l,sl,kr,Xb(),()=>{})},"registerDiagram"),Oa=t((r)=>{if(r in ol)return ol[r];throw new Vb(r)},"getDiagram"),Vb=class extends Error{static{t(this,"DiagramNotFoundError")}constructor(r){super(`Diagram ${r} not found.`)}};var Kb={value:()=>{}};function bp(){for(var r=0,e=arguments.length,i={},s;r<e;++r){if(!(s=arguments[r]+"")||s in i||/[\s.]/.test(s))throw Error("illegal type: "+s);i[s]=[]}return new al(i)}function al(r){this._=r}function Zb(r,e){return r.trim().split(/^|\s+/).map(function(i){var s="",o=i.indexOf(".");if(o>=0)s=i.slice(o+1),i=i.slice(0,o);if(i&&!e.hasOwnProperty(i))throw Error("unknown type: "+i);return{type:i,name:s}})}al.prototype=bp.prototype={constructor:al,on:function(r,e){var i=this._,s=Zb(r+"",i),o,n=-1,c=s.length;if(arguments.length<2){while(++n<c)if((o=(r=s[n]).type)&&(o=Qb(i[o],r.name)))return o;return}if(e!=null&&typeof e!=="function")throw Error("invalid callback: "+e);while(++n<c)if(o=(r=s[n]).type)i[o]=Cp(i[o],r.name,e);else if(e==null)for(o in i)i[o]=Cp(i[o],r.name,null);return this},copy:function(){var r={},e=this._;for(var i in e)r[i]=e[i].slice();return new al(r)},call:function(r,e){if((o=arguments.length-2)>0)for(var i=Array(o),s=0,o,n;s<o;++s)i[s]=arguments[s+2];if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(n=this._[r],s=0,o=n.length;s<o;++s)n[s].value.apply(e,i)},apply:function(r,e,i){if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(var s=this._[r],o=0,n=s.length;o<n;++o)s[o].value.apply(e,i)}};function Qb(r,e){for(var i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===e)return o.value}function Cp(r,e,i){for(var s=0,o=r.length;s<o;++s)if(r[s].name===e){r[s]=Kb,r=r.slice(0,s).concat(r.slice(s+1));break}if(i!=null)r.push({name:e,value:i});return r}var Hh=bp;var nl="http://www.w3.org/1999/xhtml",Yh={svg:"http://www.w3.org/2000/svg",xhtml:nl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ei(r){var e=r+="",i=e.indexOf(":");if(i>=0&&(e=r.slice(0,i))!=="xmlns")r=r.slice(i+1);return Yh.hasOwnProperty(e)?{space:Yh[e],local:r}:r}function Jb(r){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===nl&&e.documentElement.namespaceURI===nl?e.createElement(r):e.createElementNS(i,r)}}function tk(r){return function(){return this.ownerDocument.createElementNS(r.space,r.local)}}function ta(r){var e=Ei(r);return(e.local?tk:Jb)(e)}function ek(){}function Uo(r){return r==null?ek:function(){return this.querySelector(r)}}function Uh(r){if(typeof r!=="function")r=Uo(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var n=e[o],c=n.length,h=s[o]=Array(c),g,y,f=0;f<c;++f)if((g=n[f])&&(y=r.call(g,g.__data__,f,n))){if("__data__"in g)y.__data__=g.__data__;h[f]=y}return new er(s,this._parents)}function jh(r){return r==null?[]:Array.isArray(r)?r:Array.from(r)}function rk(){return[]}function xs(r){return r==null?rk:function(){return this.querySelectorAll(r)}}function ik(r){return function(){return jh(r.apply(this,arguments))}}function Gh(r){if(typeof r==="function")r=ik(r);else r=xs(r);for(var e=this._groups,i=e.length,s=[],o=[],n=0;n<i;++n)for(var c=e[n],h=c.length,g,y=0;y<h;++y)if(g=c[y])s.push(r.call(g,g.__data__,y,c)),o.push(g);return new er(s,o)}function Cs(r){return function(){return this.matches(r)}}function ll(r){return function(e){return e.matches(r)}}var ok=Array.prototype.find;function sk(r){return function(){return ok.call(this.children,r)}}function ak(){return this.firstElementChild}function Xh(r){return this.select(r==null?ak:sk(typeof r==="function"?r:ll(r)))}var nk=Array.prototype.filter;function lk(){return Array.from(this.children)}function hk(r){return function(){return nk.call(this.children,r)}}function Vh(r){return this.selectAll(r==null?lk:hk(typeof r==="function"?r:ll(r)))}function Kh(r){if(typeof r!=="function")r=Cs(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var n=e[o],c=n.length,h=s[o]=[],g,y=0;y<c;++y)if((g=n[y])&&r.call(g,g.__data__,y,n))h.push(g);return new er(s,this._parents)}function ra(r){return Array(r.length)}function Zh(){return new er(this._enter||this._groups.map(ra),this._parents)}function ia(r,e){this.ownerDocument=r.ownerDocument,this.namespaceURI=r.namespaceURI,this._next=null,this._parent=r,this.__data__=e}ia.prototype={constructor:ia,appendChild:function(r){return this._parent.insertBefore(r,this._next)},insertBefore:function(r,e){return this._parent.insertBefore(r,e)},querySelector:function(r){return this._parent.querySelector(r)},querySelectorAll:function(r){return this._parent.querySelectorAll(r)}};function Qh(r){return function(){return r}}function ck(r,e,i,s,o,n){var c=0,h,g=e.length,y=n.length;for(;c<y;++c)if(h=e[c])h.__data__=n[c],s[c]=h;else i[c]=new ia(r,n[c]);for(;c<g;++c)if(h=e[c])o[c]=h}function uk(r,e,i,s,o,n,c){var h,g,y=new Map,f=e.length,B=n.length,v=Array(f),q;for(h=0;h<f;++h)if(g=e[h])if(v[h]=q=c.call(g,g.__data__,h,e)+"",y.has(q))o[h]=g;else y.set(q,g);for(h=0;h<B;++h)if(q=c.call(r,n[h],h,n)+"",g=y.get(q))s[h]=g,g.__data__=n[h],y.delete(q);else i[h]=new ia(r,n[h]);for(h=0;h<f;++h)if((g=e[h])&&y.get(v[h])===g)o[h]=g}function fk(r){return r.__data__}function Jh(r,e){if(!arguments.length)return Array.from(this,fk);var i=e?uk:ck,s=this._parents,o=this._groups;if(typeof r!=="function")r=Qh(r);for(var n=o.length,c=Array(n),h=Array(n),g=Array(n),y=0;y<n;++y){var f=s[y],B=o[y],v=B.length,q=dk(r.call(f,f&&f.__data__,y,s)),W=q.length,H=h[y]=Array(W),Y=c[y]=Array(W),j=g[y]=Array(v);i(f,B,H,Y,j,q,e);for(var X=0,Q=0,rt,it;X<W;++X)if(rt=H[X]){if(X>=Q)Q=X+1;while(!(it=Y[Q])&&++Q<W);rt._next=it||null}}return c=new er(c,s),c._enter=h,c._exit=g,c}function dk(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function tc(){return new er(this._exit||this._groups.map(ra),this._parents)}function ec(r,e,i){var s=this.enter(),o=this,n=this.exit();if(typeof r==="function"){if(s=r(s),s)s=s.selection()}else s=s.append(r+"");if(e!=null){if(o=e(o),o)o=o.selection()}if(i==null)n.remove();else i(n);return s&&o?s.merge(o).order():o}function rc(r){var e=r.selection?r.selection():r;for(var i=this._groups,s=e._groups,o=i.length,n=s.length,c=Math.min(o,n),h=Array(o),g=0;g<c;++g)for(var y=i[g],f=s[g],B=y.length,v=h[g]=Array(B),q,W=0;W<B;++W)if(q=y[W]||f[W])v[W]=q;for(;g<o;++g)h[g]=i[g];return new er(h,this._parents)}function ic(){for(var r=this._groups,e=-1,i=r.length;++e<i;)for(var s=r[e],o=s.length-1,n=s[o],c;--o>=0;)if(c=s[o]){if(n&&c.compareDocumentPosition(n)^4)n.parentNode.insertBefore(c,n);n=c}return this}function oc(r){if(!r)r=pk;function e(B,v){return B&&v?r(B.__data__,v.__data__):!B-!v}for(var i=this._groups,s=i.length,o=Array(s),n=0;n<s;++n){for(var c=i[n],h=c.length,g=o[n]=Array(h),y,f=0;f<h;++f)if(y=c[f])g[f]=y;g.sort(e)}return new er(o,this._parents).order()}function pk(r,e){return r<e?-1:r>e?1:r>=e?0:NaN}function sc(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this}function ac(){return Array.from(this)}function nc(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,n=s.length;o<n;++o){var c=s[o];if(c)return c}return null}function lc(){let r=0;for(let e of this)++r;return r}function hc(){return!this.node()}function cc(r){for(var e=this._groups,i=0,s=e.length;i<s;++i)for(var o=e[i],n=0,c=o.length,h;n<c;++n)if(h=o[n])r.call(h,h.__data__,n,o);return this}function gk(r){return function(){this.removeAttribute(r)}}function mk(r){return function(){this.removeAttributeNS(r.space,r.local)}}function yk(r,e){return function(){this.setAttribute(r,e)}}function xk(r,e){return function(){this.setAttributeNS(r.space,r.local,e)}}function Ck(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttribute(r);else this.setAttribute(r,i)}}function bk(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttributeNS(r.space,r.local);else this.setAttributeNS(r.space,r.local,i)}}function uc(r,e){var i=Ei(r);if(arguments.length<2){var s=this.node();return i.local?s.getAttributeNS(i.space,i.local):s.getAttribute(i)}return this.each((e==null?i.local?mk:gk:typeof e==="function"?i.local?bk:Ck:i.local?xk:yk)(i,e))}function oa(r){return r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView}function kk(r){return function(){this.style.removeProperty(r)}}function wk(r,e,i){return function(){this.style.setProperty(r,e,i)}}function Sk(r,e,i){return function(){var s=e.apply(this,arguments);if(s==null)this.style.removeProperty(r);else this.style.setProperty(r,s,i)}}function fc(r,e,i){return arguments.length>1?this.each((e==null?kk:typeof e==="function"?Sk:wk)(r,e,i==null?"":i)):jo(this.node(),r)}function jo(r,e){return r.style.getPropertyValue(e)||oa(r).getComputedStyle(r,null).getPropertyValue(e)}function Tk(r){return function(){delete this[r]}}function _k(r,e){return function(){this[r]=e}}function Bk(r,e){return function(){var i=e.apply(this,arguments);if(i==null)delete this[r];else this[r]=i}}function dc(r,e){return arguments.length>1?this.each((e==null?Tk:typeof e==="function"?Bk:_k)(r,e)):this.node()[r]}function kp(r){return r.trim().split(/^|\s+/)}function pc(r){return r.classList||new wp(r)}function wp(r){this._node=r,this._names=kp(r.getAttribute("class")||"")}wp.prototype={add:function(r){var e=this._names.indexOf(r);if(e<0)this._names.push(r),this._node.setAttribute("class",this._names.join(" "))},remove:function(r){var e=this._names.indexOf(r);if(e>=0)this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" "))},contains:function(r){return this._names.indexOf(r)>=0}};function Sp(r,e){var i=pc(r),s=-1,o=e.length;while(++s<o)i.add(e[s])}function Tp(r,e){var i=pc(r),s=-1,o=e.length;while(++s<o)i.remove(e[s])}function vk(r){return function(){Sp(this,r)}}function Lk(r){return function(){Tp(this,r)}}function Fk(r,e){return function(){(e.apply(this,arguments)?Sp:Tp)(this,r)}}function gc(r,e){var i=kp(r+"");if(arguments.length<2){var s=pc(this.node()),o=-1,n=i.length;while(++o<n)if(!s.contains(i[o]))return!1;return!0}return this.each((typeof e==="function"?Fk:e?vk:Lk)(i,e))}function Ak(){this.textContent=""}function Mk(r){return function(){this.textContent=r}}function Ek(r){return function(){var e=r.apply(this,arguments);this.textContent=e==null?"":e}}function mc(r){return arguments.length?this.each(r==null?Ak:(typeof r==="function"?Ek:Mk)(r)):this.node().textContent}function Ok(){this.innerHTML=""}function Ik(r){return function(){this.innerHTML=r}}function $k(r){return function(){var e=r.apply(this,arguments);this.innerHTML=e==null?"":e}}function yc(r){return arguments.length?this.each(r==null?Ok:(typeof r==="function"?$k:Ik)(r)):this.node().innerHTML}function Dk(){if(this.nextSibling)this.parentNode.appendChild(this)}function xc(){return this.each(Dk)}function Pk(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Cc(){return this.each(Pk)}function bc(r){var e=typeof r==="function"?r:ta(r);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Rk(){return null}function kc(r,e){var i=typeof r==="function"?r:ta(r),s=e==null?Rk:typeof e==="function"?e:Uo(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})}function qk(){var r=this.parentNode;if(r)r.removeChild(this)}function wc(){return this.each(qk)}function Nk(){var r=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function Wk(){var r=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function Sc(r){return this.select(r?Wk:Nk)}function Tc(r){return arguments.length?this.property("__data__",r):this.node().__data__}function zk(r){return function(e){r.call(this,e,this.__data__)}}function Hk(r){return r.trim().split(/^|\s+/).map(function(e){var i="",s=e.indexOf(".");if(s>=0)i=e.slice(s+1),e=e.slice(0,s);return{type:e,name:i}})}function Yk(r){return function(){var e=this.__on;if(!e)return;for(var i=0,s=-1,o=e.length,n;i<o;++i)if(n=e[i],(!r.type||n.type===r.type)&&n.name===r.name)this.removeEventListener(n.type,n.listener,n.options);else e[++s]=n;if(++s)e.length=s;else delete this.__on}}function Uk(r,e,i){return function(){var s=this.__on,o,n=zk(e);if(s){for(var c=0,h=s.length;c<h;++c)if((o=s[c]).type===r.type&&o.name===r.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=n,o.options=i),o.value=e;return}}if(this.addEventListener(r.type,n,i),o={type:r.type,name:r.name,value:e,listener:n,options:i},!s)this.__on=[o];else s.push(o)}}function _c(r,e,i){var s=Hk(r+""),o,n=s.length,c;if(arguments.length<2){var h=this.node().__on;if(h){for(var g=0,y=h.length,f;g<y;++g)for(o=0,f=h[g];o<n;++o)if((c=s[o]).type===f.type&&c.name===f.name)return f.value}return}h=e?Uk:Yk;for(o=0;o<n;++o)this.each(h(s[o],e,i));return this}function _p(r,e,i){var s=oa(r),o=s.CustomEvent;if(typeof o==="function")o=new o(e,i);else if(o=s.document.createEvent("Event"),i)o.initEvent(e,i.bubbles,i.cancelable),o.detail=i.detail;else o.initEvent(e,!1,!1);r.dispatchEvent(o)}function jk(r,e){return function(){return _p(this,r,e)}}function Gk(r,e){return function(){return _p(this,r,e.apply(this,arguments))}}function Bc(r,e){return this.each((typeof e==="function"?Gk:jk)(r,e))}function*vc(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,n=s.length,c;o<n;++o)if(c=s[o])yield c}var Lc=[null];function er(r,e){this._groups=r,this._parents=e}function Bp(){return new er([[document.documentElement]],Lc)}function Xk(){return this}er.prototype=Bp.prototype={constructor:er,select:Uh,selectAll:Gh,selectChild:Xh,selectChildren:Vh,filter:Kh,data:Jh,enter:Zh,exit:tc,join:ec,merge:rc,selection:Xk,order:ic,sort:oc,call:sc,nodes:ac,node:nc,size:lc,empty:hc,each:cc,attr:uc,style:fc,property:dc,classed:gc,text:mc,html:yc,raise:xc,lower:Cc,append:bc,insert:kc,remove:wc,clone:Sc,datum:Tc,on:_c,dispatch:Bc,[Symbol.iterator]:vc};var Ao=Bp;function p(r){return typeof r==="string"?new er([[document.querySelector(r)]],[document.documentElement]):new er([[r]],Lc)}function En(r,e,i){r.prototype=e.prototype=i,i.constructor=r}function Cr(r,e){var i=Object.create(r.prototype);for(var s in e)i[s]=e[s];return i}function An(){}var sa=0.7,ul=1/sa,bs="\\s*([+-]?\\d+)\\s*",aa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Oi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vk=/^#([0-9a-f]{3,8})$/,Kk=new RegExp(`^rgb\\(${bs},${bs},${bs}\\)$`),Zk=new RegExp(`^rgb\\(${Oi},${Oi},${Oi}\\)$`),Qk=new RegExp(`^rgba\\(${bs},${bs},${bs},${aa}\\)$`),Jk=new RegExp(`^rgba\\(${Oi},${Oi},${Oi},${aa}\\)$`),t1=new RegExp(`^hsl\\(${aa},${Oi},${Oi}\\)$`),e1=new RegExp(`^hsla\\(${aa},${Oi},${Oi},${aa}\\)$`),vp={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};En(An,zt,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:Lp,formatHex:Lp,formatHex8:r1,formatHsl:i1,formatRgb:Fp,toString:Fp});function Lp(){return this.rgb().formatHex()}function r1(){return this.rgb().formatHex8()}function i1(){return $p(this).formatHsl()}function Fp(){return this.rgb().formatRgb()}function zt(r){var e,i;return r=(r+"").trim().toLowerCase(),(e=Vk.exec(r))?(i=e[1].length,e=parseInt(e[1],16),i===6?Ap(e):i===3?new qe(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):i===8?hl(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):i===4?hl(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Kk.exec(r))?new qe(e[1],e[2],e[3],1):(e=Zk.exec(r))?new qe(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Qk.exec(r))?hl(e[1],e[2],e[3],e[4]):(e=Jk.exec(r))?hl(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=t1.exec(r))?Op(e[1],e[2]/100,e[3]/100,1):(e=e1.exec(r))?Op(e[1],e[2]/100,e[3]/100,e[4]):vp.hasOwnProperty(r)?Ap(vp[r]):r==="transparent"?new qe(NaN,NaN,NaN,0):null}function Ap(r){return new qe(r>>16&255,r>>8&255,r&255,1)}function hl(r,e,i,s){if(s<=0)r=e=i=NaN;return new qe(r,e,i,s)}function qi(r){if(!(r instanceof An))r=zt(r);if(!r)return new qe;return r=r.rgb(),new qe(r.r,r.g,r.b,r.opacity)}function ks(r,e,i,s){return arguments.length===1?qi(r):new qe(r,e,i,s==null?1:s)}function qe(r,e,i,s){this.r=+r,this.g=+e,this.b=+i,this.opacity=+s}En(qe,ks,Cr(An,{brighter(r){return r=r==null?ul:Math.pow(ul,r),new qe(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?sa:Math.pow(sa,r),new qe(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new qe(ts(this.r),ts(this.g),ts(this.b),fl(this.opacity))},displayable(){return-0.5<=this.r&&this.r<255.5&&(-0.5<=this.g&&this.g<255.5)&&(-0.5<=this.b&&this.b<255.5)&&(0<=this.opacity&&this.opacity<=1)},hex:Mp,formatHex:Mp,formatHex8:o1,formatRgb:Ep,toString:Ep}));function Mp(){return`#${Jo(this.r)}${Jo(this.g)}${Jo(this.b)}`}function o1(){return`#${Jo(this.r)}${Jo(this.g)}${Jo(this.b)}${Jo((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ep(){let r=fl(this.opacity);return`${r===1?"rgb(":"rgba("}${ts(this.r)}, ${ts(this.g)}, ${ts(this.b)}${r===1?")":`, ${r})`}`}function fl(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function ts(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function Jo(r){return r=ts(r),(r<16?"0":"")+r.toString(16)}function Op(r,e,i,s){if(s<=0)r=e=i=NaN;else if(i<=0||i>=1)r=e=NaN;else if(e<=0)r=NaN;return new ki(r,e,i,s)}function $p(r){if(r instanceof ki)return new ki(r.h,r.s,r.l,r.opacity);if(!(r instanceof An))r=zt(r);if(!r)return new ki;if(r instanceof ki)return r;r=r.rgb();var e=r.r/255,i=r.g/255,s=r.b/255,o=Math.min(e,i,s),n=Math.max(e,i,s),c=NaN,h=n-o,g=(n+o)/2;if(h){if(e===n)c=(i-s)/h+(i<s)*6;else if(i===n)c=(s-e)/h+2;else c=(e-i)/h+4;h/=g<0.5?n+o:2-n-o,c*=60}else h=g>0&&g<1?0:c;return new ki(c,h,g,r.opacity)}function Dp(r,e,i,s){return arguments.length===1?$p(r):new ki(r,e,i,s==null?1:s)}function ki(r,e,i,s){this.h=+r,this.s=+e,this.l=+i,this.opacity=+s}En(ki,Dp,Cr(An,{brighter(r){return r=r==null?ul:Math.pow(ul,r),new ki(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?sa:Math.pow(sa,r),new ki(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,e=isNaN(r)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<0.5?i:1-i)*e,o=2*i-s;return new qe(Fc(r>=240?r-240:r+120,o,s),Fc(r,o,s),Fc(r<120?r+240:r-120,o,s),this.opacity)},clamp(){return new ki(Ip(this.h),cl(this.s),cl(this.l),fl(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(){let r=fl(this.opacity);return`${r===1?"hsl(":"hsla("}${Ip(this.h)}, ${cl(this.s)*100}%, ${cl(this.l)*100}%${r===1?")":`, ${r})`}`}}));function Ip(r){return r=(r||0)%360,r<0?r+360:r}function cl(r){return Math.max(0,Math.min(1,r||0))}function Fc(r,e,i){return(r<60?e+(i-e)*r/60:r<180?i:r<240?e+(i-e)*(240-r)/60:e)*255}function Ac(r,e,i,s,o){var n=r*r,c=n*r;return((1-3*r+3*n-c)*e+(4-6*n+3*c)*i+(1+3*r+3*n-3*c)*s+c*o)/6}function Mc(r){var e=r.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,e-1):Math.floor(i*e),o=r[s],n=r[s+1],c=s>0?r[s-1]:2*o-n,h=s<e-1?r[s+2]:2*n-o;return Ac((i-s/e)*e,c,o,n,h)}}function Ec(r){var e=r.length;return function(i){var s=Math.floor(((i%=1)<0?++i:i)*e),o=r[(s+e-1)%e],n=r[s%e],c=r[(s+1)%e],h=r[(s+2)%e];return Ac((i-s/e)*e,o,n,c,h)}}var Sr=(r)=>()=>r;function Pp(r,e){return function(i){return r+i*e}}function s1(r,e,i){return r=Math.pow(r,i),e=Math.pow(e,i)-r,i=1/i,function(s){return Math.pow(r+s*e,i)}}function yo(r,e){var i=e-r;return i?Pp(r,i>180||i<-180?i-360*Math.round(i/360):i):Sr(isNaN(r)?e:r)}function Rp(r){return(r=+r)===1?ln:function(e,i){return i-e?s1(e,i,r):Sr(isNaN(e)?i:e)}}function ln(r,e){var i=e-r;return i?Pp(r,i):Sr(isNaN(r)?e:r)}var zn=function r(e){var i=Rp(e);function s(o,n){var c=i((o=ks(o)).r,(n=ks(n)).r),h=i(o.g,n.g),g=i(o.b,n.b),y=ln(o.opacity,n.opacity);return function(f){return o.r=c(f),o.g=h(f),o.b=g(f),o.opacity=y(f),o+""}}return s.gamma=r,s}(1);function qp(r){return function(e){var i=e.length,s=Array(i),o=Array(i),n=Array(i),c,h;for(c=0;c<i;++c)h=ks(e[c]),s[c]=h.r||0,o[c]=h.g||0,n[c]=h.b||0;return s=r(s),o=r(o),n=r(n),h.opacity=1,function(g){return h.r=s(g),h.g=o(g),h.b=n(g),h+""}}}var a1=qp(Mc),n1=qp(Ec);function Be(r,e){return r=+r,e=+e,function(i){return r*(1-i)+e*i}}var Ic=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Oc=new RegExp(Ic.source,"g");function l1(r){return function(){return r}}function h1(r){return function(e){return r(e)+""}}function Tr(r,e){var i=Ic.lastIndex=Oc.lastIndex=0,s,o,n,c=-1,h=[],g=[];r=r+"",e=e+"";while((s=Ic.exec(r))&&(o=Oc.exec(e))){if((n=o.index)>i)if(n=e.slice(i,n),h[c])h[c]+=n;else h[++c]=n;if((s=s[0])===(o=o[0]))if(h[c])h[c]+=o;else h[++c]=o;else h[++c]=null,g.push({i:c,x:Be(s,o)});i=Oc.lastIndex}if(i<e.length)if(n=e.slice(i),h[c])h[c]+=n;else h[++c]=n;return h.length<2?g[0]?h1(g[0].x):l1(e):(e=g.length,function(y){for(var f=0,B;f<e;++f)h[(B=g[f]).i]=B.x(y);return h.join("")})}var Np=180/Math.PI,dl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function pl(r,e,i,s,o,n){var c,h,g;if(c=Math.sqrt(r*r+e*e))r/=c,e/=c;if(g=r*i+e*s)i-=r*g,s-=e*g;if(h=Math.sqrt(i*i+s*s))i/=h,s/=h,g/=h;if(r*s<e*i)r=-r,e=-e,g=-g,c=-c;return{translateX:o,translateY:n,rotate:Math.atan2(e,r)*Np,skewX:Math.atan(g)*Np,scaleX:c,scaleY:h}}var gl;function Wp(r){let e=new(typeof DOMMatrix==="function"?DOMMatrix:WebKitCSSMatrix)(r+"");return e.isIdentity?dl:pl(e.a,e.b,e.c,e.d,e.e,e.f)}function zp(r){if(r==null)return dl;if(!gl)gl=document.createElementNS("http://www.w3.org/2000/svg","g");if(gl.setAttribute("transform",r),!(r=gl.transform.baseVal.consolidate()))return dl;return r=r.matrix,pl(r.a,r.b,r.c,r.d,r.e,r.f)}function Hp(r,e,i,s){function o(y){return y.length?y.pop()+" ":""}function n(y,f,B,v,q,W){if(y!==B||f!==v){var H=q.push("translate(",null,e,null,i);W.push({i:H-4,x:Be(y,B)},{i:H-2,x:Be(f,v)})}else if(B||v)q.push("translate("+B+e+v+i)}function c(y,f,B,v){if(y!==f){if(y-f>180)f+=360;else if(f-y>180)y+=360;v.push({i:B.push(o(B)+"rotate(",null,s)-2,x:Be(y,f)})}else if(f)B.push(o(B)+"rotate("+f+s)}function h(y,f,B,v){if(y!==f)v.push({i:B.push(o(B)+"skewX(",null,s)-2,x:Be(y,f)});else if(f)B.push(o(B)+"skewX("+f+s)}function g(y,f,B,v,q,W){if(y!==B||f!==v){var H=q.push(o(q)+"scale(",null,",",null,")");W.push({i:H-4,x:Be(y,B)},{i:H-2,x:Be(f,v)})}else if(B!==1||v!==1)q.push(o(q)+"scale("+B+","+v+")")}return function(y,f){var B=[],v=[];return y=r(y),f=r(f),n(y.translateX,y.translateY,f.translateX,f.translateY,B,v),c(y.rotate,f.rotate,B,v),h(y.skewX,f.skewX,B,v),g(y.scaleX,y.scaleY,f.scaleX,f.scaleY,B,v),y=f=null,function(q){var W=-1,H=v.length,Y;while(++W<H)B[(Y=v[W]).i]=Y.x(q);return B.join("")}}}var $c=Hp(Wp,"px, ","px)","deg)"),Dc=Hp(zp,", ",")",")");var ws=0,la=0,na=0,Up=1000,ml,ha,yl=0,es=0,xl=0,ca=typeof performance==="object"&&performance.now?performance:Date,jp=typeof window==="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function fa(){return es||(jp(c1),es=ca.now()+xl)}function c1(){es=0}function ua(){this._call=this._time=this._next=null}ua.prototype=Cl.prototype={constructor:ua,restart:function(r,e,i){if(typeof r!=="function")throw TypeError("callback is not a function");if(i=(i==null?fa():+i)+(e==null?0:+e),!this._next&&ha!==this){if(ha)ha._next=this;else ml=this;ha=this}this._call=r,this._time=i,Pc()},stop:function(){if(this._call)this._call=null,this._time=1/0,Pc()}};function Cl(r,e,i){var s=new ua;return s.restart(r,e,i),s}function Gp(){fa(),++ws;var r=ml,e;while(r){if((e=es-r._time)>=0)r._call.call(void 0,e);r=r._next}--ws}function Yp(){es=(yl=ca.now())+xl,ws=la=0;try{Gp()}finally{ws=0,f1(),es=0}}function u1(){var r=ca.now(),e=r-yl;if(e>Up)xl-=e,yl=r}function f1(){var r,e=ml,i,s=1/0;while(e)if(e._call){if(s>e._time)s=e._time;r=e,e=e._next}else i=e._next,e._next=null,e=r?r._next=i:ml=i;ha=r,Pc(s)}function Pc(r){if(ws)return;if(la)la=clearTimeout(la);var e=r-es;if(e>24){if(r<1/0)la=setTimeout(Yp,r-ca.now()-xl);if(na)na=clearInterval(na)}else{if(!na)yl=ca.now(),na=setInterval(u1,Up);ws=1,jp(Yp)}}function da(r,e,i){var s=new ua;return e=e==null?0:+e,s.restart((o)=>{s.stop(),r(o+e)},e,i),s}var d1=Hh("start","end","cancel","interrupt"),p1=[],Kp=0,Xp=1,kl=2,bl=3,Vp=4,wl=5,pa=6;function Mo(r,e,i,s,o,n){var c=r.__transition;if(!c)r.__transition={};else if(i in c)return;g1(r,i,{name:e,index:s,group:o,on:d1,tween:p1,time:n.time,delay:n.delay,duration:n.duration,ease:n.ease,timer:null,state:Kp})}function ga(r,e){var i=hr(r,e);if(i.state>Kp)throw Error("too late; already scheduled");return i}function pr(r,e){var i=hr(r,e);if(i.state>bl)throw Error("too late; already running");return i}function hr(r,e){var i=r.__transition;if(!i||!(i=i[e]))throw Error("transition not found");return i}function g1(r,e,i){var s=r.__transition,o;s[e]=i,i.timer=Cl(n,0,i.time);function n(y){if(i.state=Xp,i.timer.restart(c,i.delay,i.time),i.delay<=y)c(y-i.delay)}function c(y){var f,B,v,q;if(i.state!==Xp)return g();for(f in s){if(q=s[f],q.name!==i.name)continue;if(q.state===bl)return da(c);if(q.state===Vp)q.state=pa,q.timer.stop(),q.on.call("interrupt",r,r.__data__,q.index,q.group),delete s[f];else if(+f<e)q.state=pa,q.timer.stop(),q.on.call("cancel",r,r.__data__,q.index,q.group),delete s[f]}if(da(function(){if(i.state===bl)i.state=Vp,i.timer.restart(h,i.delay,i.time),h(y)}),i.state=kl,i.on.call("start",r,r.__data__,i.index,i.group),i.state!==kl)return;i.state=bl,o=Array(v=i.tween.length);for(f=0,B=-1;f<v;++f)if(q=i.tween[f].value.call(r,r.__data__,i.index,i.group))o[++B]=q;o.length=B+1}function h(y){var f=y<i.duration?i.ease.call(null,y/i.duration):(i.timer.restart(g),i.state=wl,1),B=-1,v=o.length;while(++B<v)o[B].call(r,f);if(i.state===wl)i.on.call("end",r,r.__data__,i.index,i.group),g()}function g(){i.state=pa,i.timer.stop(),delete s[e];for(var y in s)return;delete r.__transition}}function ma(r,e){var i=r.__transition,s,o,n=!0,c;if(!i)return;e=e==null?null:e+"";for(c in i){if((s=i[c]).name!==e){n=!1;continue}o=s.state>kl&&s.state<wl,s.state=pa,s.timer.stop(),s.on.call(o?"interrupt":"cancel",r,r.__data__,s.index,s.group),delete i[c]}if(n)delete r.__transition}function Rc(r){return this.each(function(){ma(this,r)})}function m1(r,e){var i,s;return function(){var o=pr(this,r),n=o.tween;if(n!==i){s=i=n;for(var c=0,h=s.length;c<h;++c)if(s[c].name===e){s=s.slice(),s.splice(c,1);break}}o.tween=s}}function y1(r,e,i){var s,o;if(typeof i!=="function")throw Error();return function(){var n=pr(this,r),c=n.tween;if(c!==s){o=(s=c).slice();for(var h={name:e,value:i},g=0,y=o.length;g<y;++g)if(o[g].name===e){o[g]=h;break}if(g===y)o.push(h)}n.tween=o}}function qc(r,e){var i=this._id;if(r+="",arguments.length<2){var s=hr(this.node(),i).tween;for(var o=0,n=s.length,c;o<n;++o)if((c=s[o]).name===r)return c.value;return null}return this.each((e==null?m1:y1)(i,r,e))}function Ss(r,e,i){var s=r._id;return r.each(function(){var o=pr(this,s);(o.value||(o.value={}))[e]=i.apply(this,arguments)}),function(o){return hr(o,s).value[e]}}function ya(r,e){var i;return(typeof e==="number"?Be:e instanceof zt?zn:(i=zt(e))?(e=i,zn):Tr)(r,e)}function x1(r){return function(){this.removeAttribute(r)}}function C1(r){return function(){this.removeAttributeNS(r.space,r.local)}}function b1(r,e,i){var s,o=i+"",n;return function(){var c=this.getAttribute(r);return c===o?null:c===s?n:n=e(s=c,i)}}function k1(r,e,i){var s,o=i+"",n;return function(){var c=this.getAttributeNS(r.space,r.local);return c===o?null:c===s?n:n=e(s=c,i)}}function w1(r,e,i){var s,o,n;return function(){var c,h=i(this),g;if(h==null)return void this.removeAttribute(r);return c=this.getAttribute(r),g=h+"",c===g?null:c===s&&g===o?n:(o=g,n=e(s=c,h))}}function S1(r,e,i){var s,o,n;return function(){var c,h=i(this),g;if(h==null)return void this.removeAttributeNS(r.space,r.local);return c=this.getAttributeNS(r.space,r.local),g=h+"",c===g?null:c===s&&g===o?n:(o=g,n=e(s=c,h))}}function Nc(r,e){var i=Ei(r),s=i==="transform"?Dc:ya;return this.attrTween(r,typeof e==="function"?(i.local?S1:w1)(i,s,Ss(this,"attr."+r,e)):e==null?(i.local?C1:x1)(i):(i.local?k1:b1)(i,s,e))}function T1(r,e){return function(i){this.setAttribute(r,e.call(this,i))}}function _1(r,e){return function(i){this.setAttributeNS(r.space,r.local,e.call(this,i))}}function B1(r,e){var i,s;function o(){var n=e.apply(this,arguments);if(n!==s)i=(s=n)&&_1(r,n);return i}return o._value=e,o}function v1(r,e){var i,s;function o(){var n=e.apply(this,arguments);if(n!==s)i=(s=n)&&T1(r,n);return i}return o._value=e,o}function Wc(r,e){var i="attr."+r;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!=="function")throw Error();var s=Ei(r);return this.tween(i,(s.local?B1:v1)(s,e))}function L1(r,e){return function(){ga(this,r).delay=+e.apply(this,arguments)}}function F1(r,e){return e=+e,function(){ga(this,r).delay=e}}function zc(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?L1:F1)(e,r)):hr(this.node(),e).delay}function A1(r,e){return function(){pr(this,r).duration=+e.apply(this,arguments)}}function M1(r,e){return e=+e,function(){pr(this,r).duration=e}}function Hc(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?A1:M1)(e,r)):hr(this.node(),e).duration}function E1(r,e){if(typeof e!=="function")throw Error();return function(){pr(this,r).ease=e}}function Yc(r){var e=this._id;return arguments.length?this.each(E1(e,r)):hr(this.node(),e).ease}function O1(r,e){return function(){var i=e.apply(this,arguments);if(typeof i!=="function")throw Error();pr(this,r).ease=i}}function Uc(r){if(typeof r!=="function")throw Error();return this.each(O1(this._id,r))}function jc(r){if(typeof r!=="function")r=Cs(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var n=e[o],c=n.length,h=s[o]=[],g,y=0;y<c;++y)if((g=n[y])&&r.call(g,g.__data__,y,n))h.push(g);return new Mr(s,this._parents,this._name,this._id)}function Gc(r){if(r._id!==this._id)throw Error();for(var e=this._groups,i=r._groups,s=e.length,o=i.length,n=Math.min(s,o),c=Array(s),h=0;h<n;++h)for(var g=e[h],y=i[h],f=g.length,B=c[h]=Array(f),v,q=0;q<f;++q)if(v=g[q]||y[q])B[q]=v;for(;h<s;++h)c[h]=e[h];return new Mr(c,this._parents,this._name,this._id)}function I1(r){return(r+"").trim().split(/^|\s+/).every(function(e){var i=e.indexOf(".");if(i>=0)e=e.slice(0,i);return!e||e==="start"})}function $1(r,e,i){var s,o,n=I1(e)?ga:pr;return function(){var c=n(this,r),h=c.on;if(h!==s)(o=(s=h).copy()).on(e,i);c.on=o}}function Xc(r,e){var i=this._id;return arguments.length<2?hr(this.node(),i).on.on(r):this.each($1(i,r,e))}function D1(r){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==r)return;if(e)e.removeChild(this)}}function Vc(){return this.on("end.remove",D1(this._id))}function Kc(r){var e=this._name,i=this._id;if(typeof r!=="function")r=Uo(r);for(var s=this._groups,o=s.length,n=Array(o),c=0;c<o;++c)for(var h=s[c],g=h.length,y=n[c]=Array(g),f,B,v=0;v<g;++v)if((f=h[v])&&(B=r.call(f,f.__data__,v,h))){if("__data__"in f)B.__data__=f.__data__;y[v]=B,Mo(y[v],e,i,v,y,hr(f,i))}return new Mr(n,this._parents,e,i)}function Zc(r){var e=this._name,i=this._id;if(typeof r!=="function")r=xs(r);for(var s=this._groups,o=s.length,n=[],c=[],h=0;h<o;++h)for(var g=s[h],y=g.length,f,B=0;B<y;++B)if(f=g[B]){for(var v=r.call(f,f.__data__,B,g),q,W=hr(f,i),H=0,Y=v.length;H<Y;++H)if(q=v[H])Mo(q,e,i,H,v,W);n.push(v),c.push(f)}return new Mr(n,c,e,i)}var P1=Ao.prototype.constructor;function Qc(){return new P1(this._groups,this._parents)}function R1(r,e){var i,s,o;return function(){var n=jo(this,r),c=(this.style.removeProperty(r),jo(this,r));return n===c?null:n===i&&c===s?o:o=e(i=n,s=c)}}function Zp(r){return function(){this.style.removeProperty(r)}}function q1(r,e,i){var s,o=i+"",n;return function(){var c=jo(this,r);return c===o?null:c===s?n:n=e(s=c,i)}}function N1(r,e,i){var s,o,n;return function(){var c=jo(this,r),h=i(this),g=h+"";if(h==null)g=h=(this.style.removeProperty(r),jo(this,r));return c===g?null:c===s&&g===o?n:(o=g,n=e(s=c,h))}}function W1(r,e){var i,s,o,n="style."+e,c="end."+n,h;return function(){var g=pr(this,r),y=g.on,f=g.value[n]==null?h||(h=Zp(e)):void 0;if(y!==i||o!==f)(s=(i=y).copy()).on(c,o=f);g.on=s}}function Jc(r,e,i){var s=(r+="")==="transform"?$c:ya;return e==null?this.styleTween(r,R1(r,s)).on("end.style."+r,Zp(r)):typeof e==="function"?this.styleTween(r,N1(r,s,Ss(this,"style."+r,e))).each(W1(this._id,r)):this.styleTween(r,q1(r,s,e),i).on("end.style."+r,null)}function z1(r,e,i){return function(s){this.style.setProperty(r,e.call(this,s),i)}}function H1(r,e,i){var s,o;function n(){var c=e.apply(this,arguments);if(c!==o)s=(o=c)&&z1(r,c,i);return s}return n._value=e,n}function tu(r,e,i){var s="style."+(r+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(e==null)return this.tween(s,null);if(typeof e!=="function")throw Error();return this.tween(s,H1(r,e,i==null?"":i))}function Y1(r){return function(){this.textContent=r}}function U1(r){return function(){var e=r(this);this.textContent=e==null?"":e}}function eu(r){return this.tween("text",typeof r==="function"?U1(Ss(this,"text",r)):Y1(r==null?"":r+""))}function j1(r){return function(e){this.textContent=r.call(this,e)}}function G1(r){var e,i;function s(){var o=r.apply(this,arguments);if(o!==i)e=(i=o)&&j1(o);return e}return s._value=r,s}function ru(r){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(r==null)return this.tween(e,null);if(typeof r!=="function")throw Error();return this.tween(e,G1(r))}function iu(){var r=this._name,e=this._id,i=Sl();for(var s=this._groups,o=s.length,n=0;n<o;++n)for(var c=s[n],h=c.length,g,y=0;y<h;++y)if(g=c[y]){var f=hr(g,e);Mo(g,r,i,y,c,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Mr(s,this._parents,r,i)}function ou(){var r,e,i=this,s=i._id,o=i.size();return new Promise(function(n,c){var h={value:c},g={value:function(){if(--o===0)n()}};if(i.each(function(){var y=pr(this,s),f=y.on;if(f!==r)e=(r=f).copy(),e._.cancel.push(h),e._.interrupt.push(h),e._.end.push(g);y.on=e}),o===0)n()})}var X1=0;function Mr(r,e,i,s){this._groups=r,this._parents=e,this._name=i,this._id=s}function Qp(r){return Ao().transition(r)}function Sl(){return++X1}var Eo=Ao.prototype;Mr.prototype=Qp.prototype={constructor:Mr,select:Kc,selectAll:Zc,selectChild:Eo.selectChild,selectChildren:Eo.selectChildren,filter:jc,merge:Gc,selection:Qc,transition:iu,call:Eo.call,nodes:Eo.nodes,node:Eo.node,size:Eo.size,empty:Eo.empty,each:Eo.each,on:Xc,attr:Nc,attrTween:Wc,style:Jc,styleTween:tu,text:eu,textTween:ru,remove:Vc,tween:qc,delay:zc,duration:Hc,ease:Yc,easeVarying:Uc,end:ou,[Symbol.iterator]:Eo[Symbol.iterator]};function Tl(r){return((r*=2)<=1?r*r*r:(r-=2)*r*r+2)/2}var V1={time:null,delay:0,duration:250,ease:Tl};function K1(r,e){var i;while(!(i=r.__transition)||!(i=i[e]))if(!(r=r.parentNode))throw Error(`transition ${e} not found`);return i}function su(r){var e,i;if(r instanceof Mr)e=r._id,r=r._name;else e=Sl(),(i=V1).time=fa(),r=r==null?null:r+"";for(var s=this._groups,o=s.length,n=0;n<o;++n)for(var c=s[n],h=c.length,g,y=0;y<h;++y)if(g=c[y])Mo(g,r,e,y,c,i||K1(g,e));return new Mr(s,this._parents,r,e)}Ao.prototype.interrupt=Rc;Ao.prototype.transition=su;var{abs:tE,max:eE,min:rE}=Math;function Jp(r){return[+r[0],+r[1]]}function Z1(r){return[Jp(r[0]),Jp(r[1])]}var iE={name:"x",handles:["w","e"].map(au),input:function(r,e){return r==null?null:[[+r[0],e[0][1]],[+r[1],e[1][1]]]},output:function(r){return r&&[r[0][0],r[1][0]]}},oE={name:"y",handles:["n","s"].map(au),input:function(r,e){return r==null?null:[[e[0][0],+r[0]],[e[1][0],+r[1]]]},output:function(r){return r&&[r[0][1],r[1][1]]}},sE={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(au),input:function(r){return r==null?null:Z1(r)},output:function(r){return r}};function au(r){return{type:r}}var nu=Math.PI,lu=2*nu;var Q1=lu-0.000001;function tg(r){this._+=r[0];for(let e=1,i=r.length;e<i;++e)this._+=arguments[e]+r[e]}function J1(r){let e=Math.floor(r);if(!(e>=0))throw Error(`invalid digits: ${r}`);if(e>15)return tg;let i=10**e;return function(s){this._+=s[0];for(let o=1,n=s.length;o<n;++o)this._+=Math.round(arguments[o]*i)/i+s[o]}}class Ts{constructor(r){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=r==null?tg:J1(r)}moveTo(r,e){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}`}closePath(){if(this._x1!==null)this._x1=this._x0,this._y1=this._y0,this._append`Z`}lineTo(r,e){this._append`L${this._x1=+r},${this._y1=+e}`}quadraticCurveTo(r,e,i,s){this._append`Q${+r},${+e},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(r,e,i,s,o,n){this._append`C${+r},${+e},${+i},${+s},${this._x1=+o},${this._y1=+n}`}arcTo(r,e,i,s,o){if(r=+r,e=+e,i=+i,s=+s,o=+o,o<0)throw Error(`negative radius: ${o}`);let n=this._x1,c=this._y1,h=i-r,g=s-e,y=n-r,f=c-e,B=y*y+f*f;if(this._x1===null)this._append`M${this._x1=r},${this._y1=e}`;else if(!(B>0.000001));else if(!(Math.abs(f*h-g*y)>0.000001)||!o)this._append`L${this._x1=r},${this._y1=e}`;else{let v=i-n,q=s-c,W=h*h+g*g,H=v*v+q*q,Y=Math.sqrt(W),j=Math.sqrt(B),X=o*Math.tan((nu-Math.acos((W+B-H)/(2*Y*j)))/2),Q=X/j,rt=X/Y;if(Math.abs(Q-1)>0.000001)this._append`L${r+Q*y},${e+Q*f}`;this._append`A${o},${o},0,0,${+(f*v>y*q)},${this._x1=r+rt*h},${this._y1=e+rt*g}`}}arc(r,e,i,s,o,n){if(r=+r,e=+e,i=+i,n=!!n,i<0)throw Error(`negative radius: ${i}`);let c=i*Math.cos(s),h=i*Math.sin(s),g=r+c,y=e+h,f=1^n,B=n?s-o:o-s;if(this._x1===null)this._append`M${g},${y}`;else if(Math.abs(this._x1-g)>0.000001||Math.abs(this._y1-y)>0.000001)this._append`L${g},${y}`;if(!i)return;if(B<0)B=B%lu+lu;if(B>Q1)this._append`A${i},${i},0,1,${f},${r-c},${e-h}A${i},${i},0,1,${f},${this._x1=g},${this._y1=y}`;else if(B>0.000001)this._append`A${i},${i},0,${+(B>=nu)},${f},${this._x1=r+i*Math.cos(o)},${this._y1=e+i*Math.sin(o)}`}rect(r,e,i,s){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function eg(){return new Ts}eg.prototype=Ts.prototype;function ae(r){return function(){return r}}var{abs:Vi,atan2:Ve,cos:Rn,max:vo,min:$a,sin:Ut,sqrt:Un}=Math,Fe=0.000000000001,Er=Math.PI,Hr=Er/2,jn=2*Er;function bo(r){return r>1?0:r<-1?Er:Math.acos(r)}function Wi(r){return r>=1?Hr:r<=-1?-Hr:Math.asin(r)}function qn(r){let e=3;return r.digits=function(i){if(!arguments.length)return e;if(i==null)e=null;else{let s=Math.floor(i);if(!(s>=0))throw RangeError(`invalid digits: ${i}`);e=s}return r},()=>new Ts(e)}var xo=Array.prototype.slice;function Yr(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function rg(r){this._context=r}rg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:this._context.lineTo(r,e);break}}};function Ii(r){return new rg(r)}function Ba(r){return r[0]}function Fa(r){return r[1]}function Vn(r,e){var i=ae(!0),s=null,o=Ii,n=null,c=qn(h);r=typeof r==="function"?r:r===void 0?Ba:ae(r),e=typeof e==="function"?e:e===void 0?Fa:ae(e);function h(g){var y,f=(g=Yr(g)).length,B,v=!1,q;if(s==null)n=o(q=c());for(y=0;y<=f;++y){if(!(y<f&&i(B=g[y],y,g))===v)if(v=!v)n.lineStart();else n.lineEnd();if(v)n.point(+r(B,y,g),+e(B,y,g))}if(q)return n=null,q+""||null}return h.x=function(g){return arguments.length?(r=typeof g==="function"?g:ae(+g),h):r},h.y=function(g){return arguments.length?(e=typeof g==="function"?g:ae(+g),h):e},h.defined=function(g){return arguments.length?(i=typeof g==="function"?g:ae(!!g),h):i},h.curve=function(g){return arguments.length?(o=g,s!=null&&(n=o(s)),h):o},h.context=function(g){return arguments.length?(g==null?s=n=null:n=o(s=g),h):s},h}class hu{constructor(r,e){this._context=r,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line}point(r,e){switch(r=+r,e=+e,this._point){case 0:{if(this._point=1,this._line)this._context.lineTo(r,e);else this._context.moveTo(r,e);break}case 1:this._point=2;default:{if(this._x)this._context.bezierCurveTo(this._x0=(this._x0+r)/2,this._y0,this._x0,e,r,e);else this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,r,this._y0,r,e);break}}this._x0=r,this._y0=e}}function Wn(r){return new hu(r,!0)}function xa(r){return new hu(r,!1)}function ui(){}function _s(r,e,i){r._context.bezierCurveTo((2*r._x0+r._x1)/3,(2*r._y0+r._y1)/3,(r._x0+2*r._x1)/3,(r._y0+2*r._y1)/3,(r._x0+4*r._x1+e)/6,(r._y0+4*r._y1+i)/6)}function Ca(r){this._context=r}Ca.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:_s(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);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:_s(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function rs(r){return new Ca(r)}function ig(r){this._context=r}ig.prototype={areaStart:ui,areaEnd:ui,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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x2=r,this._y2=e;break;case 1:this._point=2,this._x3=r,this._y3=e;break;case 2:this._point=3,this._x4=r,this._y4=e,this._context.moveTo((this._x0+4*this._x1+r)/6,(this._y0+4*this._y1+e)/6);break;default:_s(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function _l(r){return new ig(r)}function og(r){this._context=r}og.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+r)/6,s=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(i,s):this._context.moveTo(i,s);break;case 3:this._point=4;default:_s(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Bl(r){return new og(r)}function sg(r,e){this._basis=new Ca(r),this._beta=e}sg.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var r=this._x,e=this._y,i=r.length-1;if(i>0){var s=r[0],o=e[0],n=r[i]-s,c=e[i]-o,h=-1,g;while(++h<=i)g=h/i,this._basis.point(this._beta*r[h]+(1-this._beta)*(s+g*n),this._beta*e[h]+(1-this._beta)*(o+g*c))}this._x=this._y=null,this._basis.lineEnd()},point:function(r,e){this._x.push(+r),this._y.push(+e)}};var cu=function r(e){function i(s){return e===1?new Ca(s):new sg(s,e)}return i.beta=function(s){return r(+s)},i}(0.85);function Bs(r,e,i){r._context.bezierCurveTo(r._x1+r._k*(r._x2-r._x0),r._y1+r._k*(r._y2-r._y0),r._x2+r._k*(r._x1-e),r._y2+r._k*(r._y1-i),r._x2,r._y2)}function vl(r,e){this._context=r,this._k=(1-e)/6}vl.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:Bs(this,this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2,this._x1=r,this._y1=e;break;case 2:this._point=3;default:Bs(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ba=function r(e){function i(s){return new vl(s,e)}return i.tension=function(s){return r(+s)},i}(0);function Ll(r,e){this._context=r,this._k=(1-e)/6}Ll.prototype={areaStart:ui,areaEnd:ui,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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:Bs(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var uu=function r(e){function i(s){return new Ll(s,e)}return i.tension=function(s){return r(+s)},i}(0);function Fl(r,e){this._context=r,this._k=(1-e)/6}Fl.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,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:Bs(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var fu=function r(e){function i(s){return new Fl(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ka(r,e,i){var{_x1:s,_y1:o,_x2:n,_y2:c}=r;if(r._l01_a>Fe){var h=2*r._l01_2a+3*r._l01_a*r._l12_a+r._l12_2a,g=3*r._l01_a*(r._l01_a+r._l12_a);s=(s*h-r._x0*r._l12_2a+r._x2*r._l01_2a)/g,o=(o*h-r._y0*r._l12_2a+r._y2*r._l01_2a)/g}if(r._l23_a>Fe){var y=2*r._l23_2a+3*r._l23_a*r._l12_a+r._l12_2a,f=3*r._l23_a*(r._l23_a+r._l12_a);n=(n*y+r._x1*r._l23_2a-e*r._l12_2a)/f,c=(c*y+r._y1*r._l23_2a-i*r._l12_2a)/f}r._context.bezierCurveTo(s,o,n,c,r._x2,r._y2)}function ag(r,e){this._context=r,this._alpha=e}ag.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}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3;default:ka(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var wa=function r(e){function i(s){return e?new ag(s,e):new vl(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function ng(r,e){this._context=r,this._alpha=e}ng.prototype={areaStart:ui,areaEnd:ui,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(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:ka(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var du=function r(e){function i(s){return e?new ng(s,e):new Ll(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function lg(r,e){this._context=r,this._alpha=e}lg.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,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:ka(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var pu=function r(e){function i(s){return e?new lg(s,e):new Fl(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function hg(r){this._context=r}hg.prototype={areaStart:ui,areaEnd:ui,lineStart:function(){this._point=0},lineEnd:function(){if(this._point)this._context.closePath()},point:function(r,e){if(r=+r,e=+e,this._point)this._context.lineTo(r,e);else this._point=1,this._context.moveTo(r,e)}};function Al(r){return new hg(r)}function cg(r){return r<0?-1:1}function ug(r,e,i){var s=r._x1-r._x0,o=e-r._x1,n=(r._y1-r._y0)/(s||o<0&&-0),c=(i-r._y1)/(o||s<0&&-0),h=(n*o+c*s)/(s+o);return(cg(n)+cg(c))*Math.min(Math.abs(n),Math.abs(c),0.5*Math.abs(h))||0}function fg(r,e){var i=r._x1-r._x0;return i?(3*(r._y1-r._y0)/i-e)/2:e}function gu(r,e,i){var{_x0:s,_y0:o,_x1:n,_y1:c}=r,h=(n-s)/3;r._context.bezierCurveTo(s+h,o+h*e,n-h,c-h*i,n,c)}function Ml(r){this._context=r}Ml.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:gu(this,this._t0,fg(this,this._t0));break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){var i=NaN;if(r=+r,e=+e,r===this._x1&&e===this._y1)return;switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3,gu(this,fg(this,i=ug(this,r,e)),i);break;default:gu(this,this._t0,i=ug(this,r,e));break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e,this._t0=i}};function dg(r){this._context=new pg(r)}(dg.prototype=Object.create(Ml.prototype)).point=function(r,e){Ml.prototype.point.call(this,e,r)};function pg(r){this._context=r}pg.prototype={moveTo:function(r,e){this._context.moveTo(e,r)},closePath:function(){this._context.closePath()},lineTo:function(r,e){this._context.lineTo(e,r)},bezierCurveTo:function(r,e,i,s,o,n){this._context.bezierCurveTo(e,r,s,i,n,o)}};function Sa(r){return new Ml(r)}function Ta(r){return new dg(r)}function mg(r){this._context=r}mg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var r=this._x,e=this._y,i=r.length;if(i)if(this._line?this._context.lineTo(r[0],e[0]):this._context.moveTo(r[0],e[0]),i===2)this._context.lineTo(r[1],e[1]);else{var s=gg(r),o=gg(e);for(var n=0,c=1;c<i;++n,++c)this._context.bezierCurveTo(s[0][n],o[0][n],s[1][n],o[1][n],r[c],e[c])}if(this._line||this._line!==0&&i===1)this._context.closePath();this._line=1-this._line,this._x=this._y=null},point:function(r,e){this._x.push(+r),this._y.push(+e)}};function gg(r){var e,i=r.length-1,s,o=Array(i),n=Array(i),c=Array(i);o[0]=0,n[0]=2,c[0]=r[0]+2*r[1];for(e=1;e<i-1;++e)o[e]=1,n[e]=4,c[e]=4*r[e]+2*r[e+1];o[i-1]=2,n[i-1]=7,c[i-1]=8*r[i-1]+r[i];for(e=1;e<i;++e)s=o[e]/n[e-1],n[e]-=s,c[e]-=s*c[e-1];o[i-1]=c[i-1]/n[i-1];for(e=i-2;e>=0;--e)o[e]=(c[e]-o[e+1])/n[e];n[i-1]=(r[i]+o[i-1])/2;for(e=0;e<i-1;++e)n[e]=2*r[e+1]-o[e+1];return[o,n]}function vs(r){return new mg(r)}function El(r,e){this._context=r,this._t=e}El.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){if(0<this._t&&this._t<1&&this._point===2)this._context.lineTo(this._x,this._y);if(this._line||this._line!==0&&this._point===1)this._context.closePath();if(this._line>=0)this._t=1-this._t,this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(r,e);else{var i=this._x*(1-this._t)+r*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,e)}break}}this._x=r,this._y=e}};function Ls(r){return new El(r,0.5)}function _a(r){return new El(r,0)}function va(r){return new El(r,1)}function Go(r,e,i){this.k=r,this.x=e,this.y=i}Go.prototype={constructor:Go,scale:function(r){return r===1?this:new Go(this.k*r,this.x,this.y)},translate:function(r,e){return r===0&e===0?this:new Go(this.k,this.x+this.k*r,this.y+this.k*e)},apply:function(r){return[r[0]*this.k+this.x,r[1]*this.k+this.y]},applyX:function(r){return r*this.k+this.x},applyY:function(r){return r*this.k+this.y},invert:function(r){return[(r[0]-this.x)/this.k,(r[1]-this.y)/this.k]},invertX:function(r){return(r-this.x)/this.k},invertY:function(r){return(r-this.y)/this.k},rescaleX:function(r){return r.copy().domain(r.range().map(this.invertX,this).map(r.invert,r))},rescaleY:function(r){return r.copy().domain(r.range().map(this.invertY,this).map(r.invert,r))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var mu=new Go(1,0,0);yu.prototype=Go.prototype;function yu(r){while(!r.__zoom)if(!(r=r.parentNode))return mu;return r.__zoom}var V=t((r)=>{let{securityLevel:e}=l(),i=p("body");if(e==="sandbox"){let n=p(`#i${r}`).node()?.contentDocument??document;i=p(n.body)}return i.select(`#${r}`)},"selectSvgElement");function zg(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}t(zg,"getDefaultExportFromCjs");var mr={},Ol={},Xo={},yg;function Fs(){if(yg)return Xo;yg=1;function r(c){return typeof c>"u"||c===null}t(r,"isNothing");function e(c){return typeof c==="object"&&c!==null}t(e,"isObject");function i(c){if(Array.isArray(c))return c;else if(r(c))return[];return[c]}t(i,"toArray");function s(c,h){if(h){let g=Object.keys(h);for(let y=0,f=g.length;y<f;y+=1){let B=g[y];c[B]=h[B]}}return c}t(s,"extend");function o(c,h){let g="";for(let y=0;y<h;y+=1)g+=c;return g}t(o,"repeat");function n(c){return c===0&&Number.NEGATIVE_INFINITY===1/c}return t(n,"isNegativeZero"),Xo.isNothing=r,Xo.isObject=e,Xo.toArray=i,Xo.repeat=o,Xo.isNegativeZero=n,Xo.extend=s,Xo}t(Fs,"requireCommon");var xu,xg;function As(){if(xg)return xu;xg=1;function r(i,s){let o="",n=i.reason||"(unknown reason)";if(!i.mark)return n;if(i.mark.name)o+='in "'+i.mark.name+'" ';if(o+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!s&&i.mark.snippet)o+=`
128
+ `},"getStyles"),jb=t((r,e)=>{if(e!==void 0)tl[r]=e},"addStylesForDiagram"),fo=Ub,Ma={};Zt(Ma,{clear:()=>C,getAccDescription:()=>A,getAccTitle:()=>E,getDiagramTitle:()=>R,setAccDescription:()=>T,setAccTitle:()=>S,setDiagramTitle:()=>L});var qh="",Nh="",Wh="",zh=t((r)=>O(r,x()),"sanitizeText"),C=t(()=>{qh="",Wh="",Nh=""},"clear"),S=t((r)=>{qh=zh(r).replace(/^\s+/g,"")},"setAccTitle"),E=t(()=>qh,"getAccTitle"),T=t((r)=>{Wh=zh(r).replace(/\n\s+/g,`
129
+ `)},"setAccDescription"),A=t(()=>Wh,"getAccDescription"),L=t((r)=>{Nh=zh(r)},"setDiagramTitle"),R=t(()=>Nh,"getDiagramTitle"),cp=a,Gb=jr,l=x,an=Fi,Cn=rn,sl=t((r)=>O(r,l()),"sanitizeText"),_r=yt,Xb=t(()=>Ma,"getCommonDb"),ol={},Vr=t((r,e,i)=>{if(ol[r])cp.warn(`Diagram with id ${r} already registered. Overwriting.`);if(ol[r]=e,i)up(r,i);jb(r,e.styles),e.injectUtils?.(cp,Gb,l,sl,_r,Xb(),()=>{})},"registerDiagram"),Na=t((r)=>{if(r in ol)return ol[r];throw new Vb(r)},"getDiagram"),Vb=class extends Error{static{t(this,"DiagramNotFoundError")}constructor(r){super(`Diagram ${r} not found.`)}};var Kb={value:()=>{}};function bp(){for(var r=0,e=arguments.length,i={},s;r<e;++r){if(!(s=arguments[r]+"")||s in i||/[\s.]/.test(s))throw Error("illegal type: "+s);i[s]=[]}return new al(i)}function al(r){this._=r}function Zb(r,e){return r.trim().split(/^|\s+/).map(function(i){var s="",o=i.indexOf(".");if(o>=0)s=i.slice(o+1),i=i.slice(0,o);if(i&&!e.hasOwnProperty(i))throw Error("unknown type: "+i);return{type:i,name:s}})}al.prototype=bp.prototype={constructor:al,on:function(r,e){var i=this._,s=Zb(r+"",i),o,n=-1,c=s.length;if(arguments.length<2){while(++n<c)if((o=(r=s[n]).type)&&(o=Qb(i[o],r.name)))return o;return}if(e!=null&&typeof e!=="function")throw Error("invalid callback: "+e);while(++n<c)if(o=(r=s[n]).type)i[o]=Cp(i[o],r.name,e);else if(e==null)for(o in i)i[o]=Cp(i[o],r.name,null);return this},copy:function(){var r={},e=this._;for(var i in e)r[i]=e[i].slice();return new al(r)},call:function(r,e){if((o=arguments.length-2)>0)for(var i=Array(o),s=0,o,n;s<o;++s)i[s]=arguments[s+2];if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(n=this._[r],s=0,o=n.length;s<o;++s)n[s].value.apply(e,i)},apply:function(r,e,i){if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(var s=this._[r],o=0,n=s.length;o<n;++o)s[o].value.apply(e,i)}};function Qb(r,e){for(var i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===e)return o.value}function Cp(r,e,i){for(var s=0,o=r.length;s<o;++s)if(r[s].name===e){r[s]=Kb,r=r.slice(0,s).concat(r.slice(s+1));break}if(i!=null)r.push({name:e,value:i});return r}var Hh=bp;var nl="http://www.w3.org/1999/xhtml",Yh={svg:"http://www.w3.org/2000/svg",xhtml:nl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ii(r){var e=r+="",i=e.indexOf(":");if(i>=0&&(e=r.slice(0,i))!=="xmlns")r=r.slice(i+1);return Yh.hasOwnProperty(e)?{space:Yh[e],local:r}:r}function Jb(r){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===nl&&e.documentElement.namespaceURI===nl?e.createElement(r):e.createElementNS(i,r)}}function tk(r){return function(){return this.ownerDocument.createElementNS(r.space,r.local)}}function ea(r){var e=Ii(r);return(e.local?tk:Jb)(e)}function ek(){}function jo(r){return r==null?ek:function(){return this.querySelector(r)}}function Uh(r){if(typeof r!=="function")r=jo(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var n=e[o],c=n.length,h=s[o]=Array(c),g,y,f=0;f<c;++f)if((g=n[f])&&(y=r.call(g,g.__data__,f,n))){if("__data__"in g)y.__data__=g.__data__;h[f]=y}return new ir(s,this._parents)}function jh(r){return r==null?[]:Array.isArray(r)?r:Array.from(r)}function rk(){return[]}function Cs(r){return r==null?rk:function(){return this.querySelectorAll(r)}}function ik(r){return function(){return jh(r.apply(this,arguments))}}function Gh(r){if(typeof r==="function")r=ik(r);else r=Cs(r);for(var e=this._groups,i=e.length,s=[],o=[],n=0;n<i;++n)for(var c=e[n],h=c.length,g,y=0;y<h;++y)if(g=c[y])s.push(r.call(g,g.__data__,y,c)),o.push(g);return new ir(s,o)}function bs(r){return function(){return this.matches(r)}}function ll(r){return function(e){return e.matches(r)}}var ok=Array.prototype.find;function sk(r){return function(){return ok.call(this.children,r)}}function ak(){return this.firstElementChild}function Xh(r){return this.select(r==null?ak:sk(typeof r==="function"?r:ll(r)))}var nk=Array.prototype.filter;function lk(){return Array.from(this.children)}function hk(r){return function(){return nk.call(this.children,r)}}function Vh(r){return this.selectAll(r==null?lk:hk(typeof r==="function"?r:ll(r)))}function Kh(r){if(typeof r!=="function")r=bs(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var n=e[o],c=n.length,h=s[o]=[],g,y=0;y<c;++y)if((g=n[y])&&r.call(g,g.__data__,y,n))h.push(g);return new ir(s,this._parents)}function ra(r){return Array(r.length)}function Zh(){return new ir(this._enter||this._groups.map(ra),this._parents)}function ia(r,e){this.ownerDocument=r.ownerDocument,this.namespaceURI=r.namespaceURI,this._next=null,this._parent=r,this.__data__=e}ia.prototype={constructor:ia,appendChild:function(r){return this._parent.insertBefore(r,this._next)},insertBefore:function(r,e){return this._parent.insertBefore(r,e)},querySelector:function(r){return this._parent.querySelector(r)},querySelectorAll:function(r){return this._parent.querySelectorAll(r)}};function Qh(r){return function(){return r}}function ck(r,e,i,s,o,n){var c=0,h,g=e.length,y=n.length;for(;c<y;++c)if(h=e[c])h.__data__=n[c],s[c]=h;else i[c]=new ia(r,n[c]);for(;c<g;++c)if(h=e[c])o[c]=h}function uk(r,e,i,s,o,n,c){var h,g,y=new Map,f=e.length,B=n.length,v=Array(f),q;for(h=0;h<f;++h)if(g=e[h])if(v[h]=q=c.call(g,g.__data__,h,e)+"",y.has(q))o[h]=g;else y.set(q,g);for(h=0;h<B;++h)if(q=c.call(r,n[h],h,n)+"",g=y.get(q))s[h]=g,g.__data__=n[h],y.delete(q);else i[h]=new ia(r,n[h]);for(h=0;h<f;++h)if((g=e[h])&&y.get(v[h])===g)o[h]=g}function fk(r){return r.__data__}function Jh(r,e){if(!arguments.length)return Array.from(this,fk);var i=e?uk:ck,s=this._parents,o=this._groups;if(typeof r!=="function")r=Qh(r);for(var n=o.length,c=Array(n),h=Array(n),g=Array(n),y=0;y<n;++y){var f=s[y],B=o[y],v=B.length,q=dk(r.call(f,f&&f.__data__,y,s)),W=q.length,H=h[y]=Array(W),Y=c[y]=Array(W),j=g[y]=Array(v);i(f,B,H,Y,j,q,e);for(var X=0,Q=0,et,it;X<W;++X)if(et=H[X]){if(X>=Q)Q=X+1;while(!(it=Y[Q])&&++Q<W);et._next=it||null}}return c=new ir(c,s),c._enter=h,c._exit=g,c}function dk(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function tc(){return new ir(this._exit||this._groups.map(ra),this._parents)}function ec(r,e,i){var s=this.enter(),o=this,n=this.exit();if(typeof r==="function"){if(s=r(s),s)s=s.selection()}else s=s.append(r+"");if(e!=null){if(o=e(o),o)o=o.selection()}if(i==null)n.remove();else i(n);return s&&o?s.merge(o).order():o}function rc(r){var e=r.selection?r.selection():r;for(var i=this._groups,s=e._groups,o=i.length,n=s.length,c=Math.min(o,n),h=Array(o),g=0;g<c;++g)for(var y=i[g],f=s[g],B=y.length,v=h[g]=Array(B),q,W=0;W<B;++W)if(q=y[W]||f[W])v[W]=q;for(;g<o;++g)h[g]=i[g];return new ir(h,this._parents)}function ic(){for(var r=this._groups,e=-1,i=r.length;++e<i;)for(var s=r[e],o=s.length-1,n=s[o],c;--o>=0;)if(c=s[o]){if(n&&c.compareDocumentPosition(n)^4)n.parentNode.insertBefore(c,n);n=c}return this}function oc(r){if(!r)r=pk;function e(B,v){return B&&v?r(B.__data__,v.__data__):!B-!v}for(var i=this._groups,s=i.length,o=Array(s),n=0;n<s;++n){for(var c=i[n],h=c.length,g=o[n]=Array(h),y,f=0;f<h;++f)if(y=c[f])g[f]=y;g.sort(e)}return new ir(o,this._parents).order()}function pk(r,e){return r<e?-1:r>e?1:r>=e?0:NaN}function sc(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this}function ac(){return Array.from(this)}function nc(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,n=s.length;o<n;++o){var c=s[o];if(c)return c}return null}function lc(){let r=0;for(let e of this)++r;return r}function hc(){return!this.node()}function cc(r){for(var e=this._groups,i=0,s=e.length;i<s;++i)for(var o=e[i],n=0,c=o.length,h;n<c;++n)if(h=o[n])r.call(h,h.__data__,n,o);return this}function gk(r){return function(){this.removeAttribute(r)}}function mk(r){return function(){this.removeAttributeNS(r.space,r.local)}}function yk(r,e){return function(){this.setAttribute(r,e)}}function xk(r,e){return function(){this.setAttributeNS(r.space,r.local,e)}}function Ck(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttribute(r);else this.setAttribute(r,i)}}function bk(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttributeNS(r.space,r.local);else this.setAttributeNS(r.space,r.local,i)}}function uc(r,e){var i=Ii(r);if(arguments.length<2){var s=this.node();return i.local?s.getAttributeNS(i.space,i.local):s.getAttribute(i)}return this.each((e==null?i.local?mk:gk:typeof e==="function"?i.local?bk:Ck:i.local?xk:yk)(i,e))}function oa(r){return r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView}function kk(r){return function(){this.style.removeProperty(r)}}function wk(r,e,i){return function(){this.style.setProperty(r,e,i)}}function Sk(r,e,i){return function(){var s=e.apply(this,arguments);if(s==null)this.style.removeProperty(r);else this.style.setProperty(r,s,i)}}function fc(r,e,i){return arguments.length>1?this.each((e==null?kk:typeof e==="function"?Sk:wk)(r,e,i==null?"":i)):Go(this.node(),r)}function Go(r,e){return r.style.getPropertyValue(e)||oa(r).getComputedStyle(r,null).getPropertyValue(e)}function Tk(r){return function(){delete this[r]}}function _k(r,e){return function(){this[r]=e}}function Bk(r,e){return function(){var i=e.apply(this,arguments);if(i==null)delete this[r];else this[r]=i}}function dc(r,e){return arguments.length>1?this.each((e==null?Tk:typeof e==="function"?Bk:_k)(r,e)):this.node()[r]}function kp(r){return r.trim().split(/^|\s+/)}function pc(r){return r.classList||new wp(r)}function wp(r){this._node=r,this._names=kp(r.getAttribute("class")||"")}wp.prototype={add:function(r){var e=this._names.indexOf(r);if(e<0)this._names.push(r),this._node.setAttribute("class",this._names.join(" "))},remove:function(r){var e=this._names.indexOf(r);if(e>=0)this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" "))},contains:function(r){return this._names.indexOf(r)>=0}};function Sp(r,e){var i=pc(r),s=-1,o=e.length;while(++s<o)i.add(e[s])}function Tp(r,e){var i=pc(r),s=-1,o=e.length;while(++s<o)i.remove(e[s])}function vk(r){return function(){Sp(this,r)}}function Lk(r){return function(){Tp(this,r)}}function Fk(r,e){return function(){(e.apply(this,arguments)?Sp:Tp)(this,r)}}function gc(r,e){var i=kp(r+"");if(arguments.length<2){var s=pc(this.node()),o=-1,n=i.length;while(++o<n)if(!s.contains(i[o]))return!1;return!0}return this.each((typeof e==="function"?Fk:e?vk:Lk)(i,e))}function Ak(){this.textContent=""}function Mk(r){return function(){this.textContent=r}}function Ek(r){return function(){var e=r.apply(this,arguments);this.textContent=e==null?"":e}}function mc(r){return arguments.length?this.each(r==null?Ak:(typeof r==="function"?Ek:Mk)(r)):this.node().textContent}function Ok(){this.innerHTML=""}function Ik(r){return function(){this.innerHTML=r}}function $k(r){return function(){var e=r.apply(this,arguments);this.innerHTML=e==null?"":e}}function yc(r){return arguments.length?this.each(r==null?Ok:(typeof r==="function"?$k:Ik)(r)):this.node().innerHTML}function Dk(){if(this.nextSibling)this.parentNode.appendChild(this)}function xc(){return this.each(Dk)}function Pk(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Cc(){return this.each(Pk)}function bc(r){var e=typeof r==="function"?r:ea(r);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Rk(){return null}function kc(r,e){var i=typeof r==="function"?r:ea(r),s=e==null?Rk:typeof e==="function"?e:jo(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})}function qk(){var r=this.parentNode;if(r)r.removeChild(this)}function wc(){return this.each(qk)}function Nk(){var r=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function Wk(){var r=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function Sc(r){return this.select(r?Wk:Nk)}function Tc(r){return arguments.length?this.property("__data__",r):this.node().__data__}function zk(r){return function(e){r.call(this,e,this.__data__)}}function Hk(r){return r.trim().split(/^|\s+/).map(function(e){var i="",s=e.indexOf(".");if(s>=0)i=e.slice(s+1),e=e.slice(0,s);return{type:e,name:i}})}function Yk(r){return function(){var e=this.__on;if(!e)return;for(var i=0,s=-1,o=e.length,n;i<o;++i)if(n=e[i],(!r.type||n.type===r.type)&&n.name===r.name)this.removeEventListener(n.type,n.listener,n.options);else e[++s]=n;if(++s)e.length=s;else delete this.__on}}function Uk(r,e,i){return function(){var s=this.__on,o,n=zk(e);if(s){for(var c=0,h=s.length;c<h;++c)if((o=s[c]).type===r.type&&o.name===r.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=n,o.options=i),o.value=e;return}}if(this.addEventListener(r.type,n,i),o={type:r.type,name:r.name,value:e,listener:n,options:i},!s)this.__on=[o];else s.push(o)}}function _c(r,e,i){var s=Hk(r+""),o,n=s.length,c;if(arguments.length<2){var h=this.node().__on;if(h){for(var g=0,y=h.length,f;g<y;++g)for(o=0,f=h[g];o<n;++o)if((c=s[o]).type===f.type&&c.name===f.name)return f.value}return}h=e?Uk:Yk;for(o=0;o<n;++o)this.each(h(s[o],e,i));return this}function _p(r,e,i){var s=oa(r),o=s.CustomEvent;if(typeof o==="function")o=new o(e,i);else if(o=s.document.createEvent("Event"),i)o.initEvent(e,i.bubbles,i.cancelable),o.detail=i.detail;else o.initEvent(e,!1,!1);r.dispatchEvent(o)}function jk(r,e){return function(){return _p(this,r,e)}}function Gk(r,e){return function(){return _p(this,r,e.apply(this,arguments))}}function Bc(r,e){return this.each((typeof e==="function"?Gk:jk)(r,e))}function*vc(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,n=s.length,c;o<n;++o)if(c=s[o])yield c}var Lc=[null];function ir(r,e){this._groups=r,this._parents=e}function Bp(){return new ir([[document.documentElement]],Lc)}function Xk(){return this}ir.prototype=Bp.prototype={constructor:ir,select:Uh,selectAll:Gh,selectChild:Xh,selectChildren:Vh,filter:Kh,data:Jh,enter:Zh,exit:tc,join:ec,merge:rc,selection:Xk,order:ic,sort:oc,call:sc,nodes:ac,node:nc,size:lc,empty:hc,each:cc,attr:uc,style:fc,property:dc,classed:gc,text:mc,html:yc,raise:xc,lower:Cc,append:bc,insert:kc,remove:wc,clone:Sc,datum:Tc,on:_c,dispatch:Bc,[Symbol.iterator]:vc};var Mo=Bp;function p(r){return typeof r==="string"?new ir([[document.querySelector(r)]],[document.documentElement]):new ir([[r]],Lc)}function Sn(r,e,i){r.prototype=e.prototype=i,i.constructor=r}function wr(r,e){var i=Object.create(r.prototype);for(var s in e)i[s]=e[s];return i}function Tn(){}var sa=0.7,ul=1/sa,ks="\\s*([+-]?\\d+)\\s*",aa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Di="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vk=/^#([0-9a-f]{3,8})$/,Kk=new RegExp(`^rgb\\(${ks},${ks},${ks}\\)$`),Zk=new RegExp(`^rgb\\(${Di},${Di},${Di}\\)$`),Qk=new RegExp(`^rgba\\(${ks},${ks},${ks},${aa}\\)$`),Jk=new RegExp(`^rgba\\(${Di},${Di},${Di},${aa}\\)$`),t1=new RegExp(`^hsl\\(${aa},${Di},${Di}\\)$`),e1=new RegExp(`^hsla\\(${aa},${Di},${Di},${aa}\\)$`),vp={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};Sn(Tn,Ft,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:Lp,formatHex:Lp,formatHex8:r1,formatHsl:i1,formatRgb:Fp,toString:Fp});function Lp(){return this.rgb().formatHex()}function r1(){return this.rgb().formatHex8()}function i1(){return $p(this).formatHsl()}function Fp(){return this.rgb().formatRgb()}function Ft(r){var e,i;return r=(r+"").trim().toLowerCase(),(e=Vk.exec(r))?(i=e[1].length,e=parseInt(e[1],16),i===6?Ap(e):i===3?new Ve(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):i===8?hl(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):i===4?hl(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Kk.exec(r))?new Ve(e[1],e[2],e[3],1):(e=Zk.exec(r))?new Ve(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Qk.exec(r))?hl(e[1],e[2],e[3],e[4]):(e=Jk.exec(r))?hl(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=t1.exec(r))?Op(e[1],e[2]/100,e[3]/100,1):(e=e1.exec(r))?Op(e[1],e[2]/100,e[3]/100,e[4]):vp.hasOwnProperty(r)?Ap(vp[r]):r==="transparent"?new Ve(NaN,NaN,NaN,0):null}function Ap(r){return new Ve(r>>16&255,r>>8&255,r&255,1)}function hl(r,e,i,s){if(s<=0)r=e=i=NaN;return new Ve(r,e,i,s)}function Ui(r){if(!(r instanceof Tn))r=Ft(r);if(!r)return new Ve;return r=r.rgb(),new Ve(r.r,r.g,r.b,r.opacity)}function ws(r,e,i,s){return arguments.length===1?Ui(r):new Ve(r,e,i,s==null?1:s)}function Ve(r,e,i,s){this.r=+r,this.g=+e,this.b=+i,this.opacity=+s}Sn(Ve,ws,wr(Tn,{brighter(r){return r=r==null?ul:Math.pow(ul,r),new Ve(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?sa:Math.pow(sa,r),new Ve(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new Ve(es(this.r),es(this.g),es(this.b),fl(this.opacity))},displayable(){return-0.5<=this.r&&this.r<255.5&&(-0.5<=this.g&&this.g<255.5)&&(-0.5<=this.b&&this.b<255.5)&&(0<=this.opacity&&this.opacity<=1)},hex:Mp,formatHex:Mp,formatHex8:o1,formatRgb:Ep,toString:Ep}));function Mp(){return`#${ts(this.r)}${ts(this.g)}${ts(this.b)}`}function o1(){return`#${ts(this.r)}${ts(this.g)}${ts(this.b)}${ts((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ep(){let r=fl(this.opacity);return`${r===1?"rgb(":"rgba("}${es(this.r)}, ${es(this.g)}, ${es(this.b)}${r===1?")":`, ${r})`}`}function fl(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function es(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function ts(r){return r=es(r),(r<16?"0":"")+r.toString(16)}function Op(r,e,i,s){if(s<=0)r=e=i=NaN;else if(i<=0||i>=1)r=e=NaN;else if(e<=0)r=NaN;return new wi(r,e,i,s)}function $p(r){if(r instanceof wi)return new wi(r.h,r.s,r.l,r.opacity);if(!(r instanceof Tn))r=Ft(r);if(!r)return new wi;if(r instanceof wi)return r;r=r.rgb();var e=r.r/255,i=r.g/255,s=r.b/255,o=Math.min(e,i,s),n=Math.max(e,i,s),c=NaN,h=n-o,g=(n+o)/2;if(h){if(e===n)c=(i-s)/h+(i<s)*6;else if(i===n)c=(s-e)/h+2;else c=(e-i)/h+4;h/=g<0.5?n+o:2-n-o,c*=60}else h=g>0&&g<1?0:c;return new wi(c,h,g,r.opacity)}function Dp(r,e,i,s){return arguments.length===1?$p(r):new wi(r,e,i,s==null?1:s)}function wi(r,e,i,s){this.h=+r,this.s=+e,this.l=+i,this.opacity=+s}Sn(wi,Dp,wr(Tn,{brighter(r){return r=r==null?ul:Math.pow(ul,r),new wi(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?sa:Math.pow(sa,r),new wi(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,e=isNaN(r)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<0.5?i:1-i)*e,o=2*i-s;return new Ve(Fc(r>=240?r-240:r+120,o,s),Fc(r,o,s),Fc(r<120?r+240:r-120,o,s),this.opacity)},clamp(){return new wi(Ip(this.h),cl(this.s),cl(this.l),fl(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(){let r=fl(this.opacity);return`${r===1?"hsl(":"hsla("}${Ip(this.h)}, ${cl(this.s)*100}%, ${cl(this.l)*100}%${r===1?")":`, ${r})`}`}}));function Ip(r){return r=(r||0)%360,r<0?r+360:r}function cl(r){return Math.max(0,Math.min(1,r||0))}function Fc(r,e,i){return(r<60?e+(i-e)*r/60:r<180?i:r<240?e+(i-e)*(240-r)/60:e)*255}function Ac(r,e,i,s,o){var n=r*r,c=n*r;return((1-3*r+3*n-c)*e+(4-6*n+3*c)*i+(1+3*r+3*n-3*c)*s+c*o)/6}function Mc(r){var e=r.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,e-1):Math.floor(i*e),o=r[s],n=r[s+1],c=s>0?r[s-1]:2*o-n,h=s<e-1?r[s+2]:2*n-o;return Ac((i-s/e)*e,c,o,n,h)}}function Ec(r){var e=r.length;return function(i){var s=Math.floor(((i%=1)<0?++i:i)*e),o=r[(s+e-1)%e],n=r[s%e],c=r[(s+1)%e],h=r[(s+2)%e];return Ac((i-s/e)*e,o,n,c,h)}}var kr=(r)=>()=>r;function Pp(r,e){return function(i){return r+i*e}}function s1(r,e,i){return r=Math.pow(r,i),e=Math.pow(e,i)-r,i=1/i,function(s){return Math.pow(r+s*e,i)}}function ho(r,e){var i=e-r;return i?Pp(r,i>180||i<-180?i-360*Math.round(i/360):i):kr(isNaN(r)?e:r)}function Rp(r){return(r=+r)===1?on:function(e,i){return i-e?s1(e,i,r):kr(isNaN(e)?i:e)}}function on(r,e){var i=e-r;return i?Pp(r,i):kr(isNaN(r)?e:r)}var Bn=function r(e){var i=Rp(e);function s(o,n){var c=i((o=ws(o)).r,(n=ws(n)).r),h=i(o.g,n.g),g=i(o.b,n.b),y=on(o.opacity,n.opacity);return function(f){return o.r=c(f),o.g=h(f),o.b=g(f),o.opacity=y(f),o+""}}return s.gamma=r,s}(1);function qp(r){return function(e){var i=e.length,s=Array(i),o=Array(i),n=Array(i),c,h;for(c=0;c<i;++c)h=ws(e[c]),s[c]=h.r||0,o[c]=h.g||0,n[c]=h.b||0;return s=r(s),o=r(o),n=r(n),h.opacity=1,function(g){return h.r=s(g),h.g=o(g),h.b=n(g),h+""}}}var a1=qp(Mc),n1=qp(Ec);function Be(r,e){return r=+r,e=+e,function(i){return r*(1-i)+e*i}}var Ic=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Oc=new RegExp(Ic.source,"g");function l1(r){return function(){return r}}function h1(r){return function(e){return r(e)+""}}function Cr(r,e){var i=Ic.lastIndex=Oc.lastIndex=0,s,o,n,c=-1,h=[],g=[];r=r+"",e=e+"";while((s=Ic.exec(r))&&(o=Oc.exec(e))){if((n=o.index)>i)if(n=e.slice(i,n),h[c])h[c]+=n;else h[++c]=n;if((s=s[0])===(o=o[0]))if(h[c])h[c]+=o;else h[++c]=o;else h[++c]=null,g.push({i:c,x:Be(s,o)});i=Oc.lastIndex}if(i<e.length)if(n=e.slice(i),h[c])h[c]+=n;else h[++c]=n;return h.length<2?g[0]?h1(g[0].x):l1(e):(e=g.length,function(y){for(var f=0,B;f<e;++f)h[(B=g[f]).i]=B.x(y);return h.join("")})}var Np=180/Math.PI,dl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function pl(r,e,i,s,o,n){var c,h,g;if(c=Math.sqrt(r*r+e*e))r/=c,e/=c;if(g=r*i+e*s)i-=r*g,s-=e*g;if(h=Math.sqrt(i*i+s*s))i/=h,s/=h,g/=h;if(r*s<e*i)r=-r,e=-e,g=-g,c=-c;return{translateX:o,translateY:n,rotate:Math.atan2(e,r)*Np,skewX:Math.atan(g)*Np,scaleX:c,scaleY:h}}var gl;function Wp(r){let e=new(typeof DOMMatrix==="function"?DOMMatrix:WebKitCSSMatrix)(r+"");return e.isIdentity?dl:pl(e.a,e.b,e.c,e.d,e.e,e.f)}function zp(r){if(r==null)return dl;if(!gl)gl=document.createElementNS("http://www.w3.org/2000/svg","g");if(gl.setAttribute("transform",r),!(r=gl.transform.baseVal.consolidate()))return dl;return r=r.matrix,pl(r.a,r.b,r.c,r.d,r.e,r.f)}function Hp(r,e,i,s){function o(y){return y.length?y.pop()+" ":""}function n(y,f,B,v,q,W){if(y!==B||f!==v){var H=q.push("translate(",null,e,null,i);W.push({i:H-4,x:Be(y,B)},{i:H-2,x:Be(f,v)})}else if(B||v)q.push("translate("+B+e+v+i)}function c(y,f,B,v){if(y!==f){if(y-f>180)f+=360;else if(f-y>180)y+=360;v.push({i:B.push(o(B)+"rotate(",null,s)-2,x:Be(y,f)})}else if(f)B.push(o(B)+"rotate("+f+s)}function h(y,f,B,v){if(y!==f)v.push({i:B.push(o(B)+"skewX(",null,s)-2,x:Be(y,f)});else if(f)B.push(o(B)+"skewX("+f+s)}function g(y,f,B,v,q,W){if(y!==B||f!==v){var H=q.push(o(q)+"scale(",null,",",null,")");W.push({i:H-4,x:Be(y,B)},{i:H-2,x:Be(f,v)})}else if(B!==1||v!==1)q.push(o(q)+"scale("+B+","+v+")")}return function(y,f){var B=[],v=[];return y=r(y),f=r(f),n(y.translateX,y.translateY,f.translateX,f.translateY,B,v),c(y.rotate,f.rotate,B,v),h(y.skewX,f.skewX,B,v),g(y.scaleX,y.scaleY,f.scaleX,f.scaleY,B,v),y=f=null,function(q){var W=-1,H=v.length,Y;while(++W<H)B[(Y=v[W]).i]=Y.x(q);return B.join("")}}}var $c=Hp(Wp,"px, ","px)","deg)"),Dc=Hp(zp,", ",")",")");var Ss=0,la=0,na=0,Up=1000,ml,ha,yl=0,rs=0,xl=0,ca=typeof performance==="object"&&performance.now?performance:Date,jp=typeof window==="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function fa(){return rs||(jp(c1),rs=ca.now()+xl)}function c1(){rs=0}function ua(){this._call=this._time=this._next=null}ua.prototype=Cl.prototype={constructor:ua,restart:function(r,e,i){if(typeof r!=="function")throw TypeError("callback is not a function");if(i=(i==null?fa():+i)+(e==null?0:+e),!this._next&&ha!==this){if(ha)ha._next=this;else ml=this;ha=this}this._call=r,this._time=i,Pc()},stop:function(){if(this._call)this._call=null,this._time=1/0,Pc()}};function Cl(r,e,i){var s=new ua;return s.restart(r,e,i),s}function Gp(){fa(),++Ss;var r=ml,e;while(r){if((e=rs-r._time)>=0)r._call.call(void 0,e);r=r._next}--Ss}function Yp(){rs=(yl=ca.now())+xl,Ss=la=0;try{Gp()}finally{Ss=0,f1(),rs=0}}function u1(){var r=ca.now(),e=r-yl;if(e>Up)xl-=e,yl=r}function f1(){var r,e=ml,i,s=1/0;while(e)if(e._call){if(s>e._time)s=e._time;r=e,e=e._next}else i=e._next,e._next=null,e=r?r._next=i:ml=i;ha=r,Pc(s)}function Pc(r){if(Ss)return;if(la)la=clearTimeout(la);var e=r-rs;if(e>24){if(r<1/0)la=setTimeout(Yp,r-ca.now()-xl);if(na)na=clearInterval(na)}else{if(!na)yl=ca.now(),na=setInterval(u1,Up);Ss=1,jp(Yp)}}function da(r,e,i){var s=new ua;return e=e==null?0:+e,s.restart((o)=>{s.stop(),r(o+e)},e,i),s}var d1=Hh("start","end","cancel","interrupt"),p1=[],Kp=0,Xp=1,kl=2,bl=3,Vp=4,wl=5,pa=6;function Eo(r,e,i,s,o,n){var c=r.__transition;if(!c)r.__transition={};else if(i in c)return;g1(r,i,{name:e,index:s,group:o,on:d1,tween:p1,time:n.time,delay:n.delay,duration:n.duration,ease:n.ease,timer:null,state:Kp})}function ga(r,e){var i=ur(r,e);if(i.state>Kp)throw Error("too late; already scheduled");return i}function mr(r,e){var i=ur(r,e);if(i.state>bl)throw Error("too late; already running");return i}function ur(r,e){var i=r.__transition;if(!i||!(i=i[e]))throw Error("transition not found");return i}function g1(r,e,i){var s=r.__transition,o;s[e]=i,i.timer=Cl(n,0,i.time);function n(y){if(i.state=Xp,i.timer.restart(c,i.delay,i.time),i.delay<=y)c(y-i.delay)}function c(y){var f,B,v,q;if(i.state!==Xp)return g();for(f in s){if(q=s[f],q.name!==i.name)continue;if(q.state===bl)return da(c);if(q.state===Vp)q.state=pa,q.timer.stop(),q.on.call("interrupt",r,r.__data__,q.index,q.group),delete s[f];else if(+f<e)q.state=pa,q.timer.stop(),q.on.call("cancel",r,r.__data__,q.index,q.group),delete s[f]}if(da(function(){if(i.state===bl)i.state=Vp,i.timer.restart(h,i.delay,i.time),h(y)}),i.state=kl,i.on.call("start",r,r.__data__,i.index,i.group),i.state!==kl)return;i.state=bl,o=Array(v=i.tween.length);for(f=0,B=-1;f<v;++f)if(q=i.tween[f].value.call(r,r.__data__,i.index,i.group))o[++B]=q;o.length=B+1}function h(y){var f=y<i.duration?i.ease.call(null,y/i.duration):(i.timer.restart(g),i.state=wl,1),B=-1,v=o.length;while(++B<v)o[B].call(r,f);if(i.state===wl)i.on.call("end",r,r.__data__,i.index,i.group),g()}function g(){i.state=pa,i.timer.stop(),delete s[e];for(var y in s)return;delete r.__transition}}function ma(r,e){var i=r.__transition,s,o,n=!0,c;if(!i)return;e=e==null?null:e+"";for(c in i){if((s=i[c]).name!==e){n=!1;continue}o=s.state>kl&&s.state<wl,s.state=pa,s.timer.stop(),s.on.call(o?"interrupt":"cancel",r,r.__data__,s.index,s.group),delete i[c]}if(n)delete r.__transition}function Rc(r){return this.each(function(){ma(this,r)})}function m1(r,e){var i,s;return function(){var o=mr(this,r),n=o.tween;if(n!==i){s=i=n;for(var c=0,h=s.length;c<h;++c)if(s[c].name===e){s=s.slice(),s.splice(c,1);break}}o.tween=s}}function y1(r,e,i){var s,o;if(typeof i!=="function")throw Error();return function(){var n=mr(this,r),c=n.tween;if(c!==s){o=(s=c).slice();for(var h={name:e,value:i},g=0,y=o.length;g<y;++g)if(o[g].name===e){o[g]=h;break}if(g===y)o.push(h)}n.tween=o}}function qc(r,e){var i=this._id;if(r+="",arguments.length<2){var s=ur(this.node(),i).tween;for(var o=0,n=s.length,c;o<n;++o)if((c=s[o]).name===r)return c.value;return null}return this.each((e==null?m1:y1)(i,r,e))}function Ts(r,e,i){var s=r._id;return r.each(function(){var o=mr(this,s);(o.value||(o.value={}))[e]=i.apply(this,arguments)}),function(o){return ur(o,s).value[e]}}function ya(r,e){var i;return(typeof e==="number"?Be:e instanceof Ft?Bn:(i=Ft(e))?(e=i,Bn):Cr)(r,e)}function x1(r){return function(){this.removeAttribute(r)}}function C1(r){return function(){this.removeAttributeNS(r.space,r.local)}}function b1(r,e,i){var s,o=i+"",n;return function(){var c=this.getAttribute(r);return c===o?null:c===s?n:n=e(s=c,i)}}function k1(r,e,i){var s,o=i+"",n;return function(){var c=this.getAttributeNS(r.space,r.local);return c===o?null:c===s?n:n=e(s=c,i)}}function w1(r,e,i){var s,o,n;return function(){var c,h=i(this),g;if(h==null)return void this.removeAttribute(r);return c=this.getAttribute(r),g=h+"",c===g?null:c===s&&g===o?n:(o=g,n=e(s=c,h))}}function S1(r,e,i){var s,o,n;return function(){var c,h=i(this),g;if(h==null)return void this.removeAttributeNS(r.space,r.local);return c=this.getAttributeNS(r.space,r.local),g=h+"",c===g?null:c===s&&g===o?n:(o=g,n=e(s=c,h))}}function Nc(r,e){var i=Ii(r),s=i==="transform"?Dc:ya;return this.attrTween(r,typeof e==="function"?(i.local?S1:w1)(i,s,Ts(this,"attr."+r,e)):e==null?(i.local?C1:x1)(i):(i.local?k1:b1)(i,s,e))}function T1(r,e){return function(i){this.setAttribute(r,e.call(this,i))}}function _1(r,e){return function(i){this.setAttributeNS(r.space,r.local,e.call(this,i))}}function B1(r,e){var i,s;function o(){var n=e.apply(this,arguments);if(n!==s)i=(s=n)&&_1(r,n);return i}return o._value=e,o}function v1(r,e){var i,s;function o(){var n=e.apply(this,arguments);if(n!==s)i=(s=n)&&T1(r,n);return i}return o._value=e,o}function Wc(r,e){var i="attr."+r;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!=="function")throw Error();var s=Ii(r);return this.tween(i,(s.local?B1:v1)(s,e))}function L1(r,e){return function(){ga(this,r).delay=+e.apply(this,arguments)}}function F1(r,e){return e=+e,function(){ga(this,r).delay=e}}function zc(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?L1:F1)(e,r)):ur(this.node(),e).delay}function A1(r,e){return function(){mr(this,r).duration=+e.apply(this,arguments)}}function M1(r,e){return e=+e,function(){mr(this,r).duration=e}}function Hc(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?A1:M1)(e,r)):ur(this.node(),e).duration}function E1(r,e){if(typeof e!=="function")throw Error();return function(){mr(this,r).ease=e}}function Yc(r){var e=this._id;return arguments.length?this.each(E1(e,r)):ur(this.node(),e).ease}function O1(r,e){return function(){var i=e.apply(this,arguments);if(typeof i!=="function")throw Error();mr(this,r).ease=i}}function Uc(r){if(typeof r!=="function")throw Error();return this.each(O1(this._id,r))}function jc(r){if(typeof r!=="function")r=bs(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var n=e[o],c=n.length,h=s[o]=[],g,y=0;y<c;++y)if((g=n[y])&&r.call(g,g.__data__,y,n))h.push(g);return new Pr(s,this._parents,this._name,this._id)}function Gc(r){if(r._id!==this._id)throw Error();for(var e=this._groups,i=r._groups,s=e.length,o=i.length,n=Math.min(s,o),c=Array(s),h=0;h<n;++h)for(var g=e[h],y=i[h],f=g.length,B=c[h]=Array(f),v,q=0;q<f;++q)if(v=g[q]||y[q])B[q]=v;for(;h<s;++h)c[h]=e[h];return new Pr(c,this._parents,this._name,this._id)}function I1(r){return(r+"").trim().split(/^|\s+/).every(function(e){var i=e.indexOf(".");if(i>=0)e=e.slice(0,i);return!e||e==="start"})}function $1(r,e,i){var s,o,n=I1(e)?ga:mr;return function(){var c=n(this,r),h=c.on;if(h!==s)(o=(s=h).copy()).on(e,i);c.on=o}}function Xc(r,e){var i=this._id;return arguments.length<2?ur(this.node(),i).on.on(r):this.each($1(i,r,e))}function D1(r){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==r)return;if(e)e.removeChild(this)}}function Vc(){return this.on("end.remove",D1(this._id))}function Kc(r){var e=this._name,i=this._id;if(typeof r!=="function")r=jo(r);for(var s=this._groups,o=s.length,n=Array(o),c=0;c<o;++c)for(var h=s[c],g=h.length,y=n[c]=Array(g),f,B,v=0;v<g;++v)if((f=h[v])&&(B=r.call(f,f.__data__,v,h))){if("__data__"in f)B.__data__=f.__data__;y[v]=B,Eo(y[v],e,i,v,y,ur(f,i))}return new Pr(n,this._parents,e,i)}function Zc(r){var e=this._name,i=this._id;if(typeof r!=="function")r=Cs(r);for(var s=this._groups,o=s.length,n=[],c=[],h=0;h<o;++h)for(var g=s[h],y=g.length,f,B=0;B<y;++B)if(f=g[B]){for(var v=r.call(f,f.__data__,B,g),q,W=ur(f,i),H=0,Y=v.length;H<Y;++H)if(q=v[H])Eo(q,e,i,H,v,W);n.push(v),c.push(f)}return new Pr(n,c,e,i)}var P1=Mo.prototype.constructor;function Qc(){return new P1(this._groups,this._parents)}function R1(r,e){var i,s,o;return function(){var n=Go(this,r),c=(this.style.removeProperty(r),Go(this,r));return n===c?null:n===i&&c===s?o:o=e(i=n,s=c)}}function Zp(r){return function(){this.style.removeProperty(r)}}function q1(r,e,i){var s,o=i+"",n;return function(){var c=Go(this,r);return c===o?null:c===s?n:n=e(s=c,i)}}function N1(r,e,i){var s,o,n;return function(){var c=Go(this,r),h=i(this),g=h+"";if(h==null)g=h=(this.style.removeProperty(r),Go(this,r));return c===g?null:c===s&&g===o?n:(o=g,n=e(s=c,h))}}function W1(r,e){var i,s,o,n="style."+e,c="end."+n,h;return function(){var g=mr(this,r),y=g.on,f=g.value[n]==null?h||(h=Zp(e)):void 0;if(y!==i||o!==f)(s=(i=y).copy()).on(c,o=f);g.on=s}}function Jc(r,e,i){var s=(r+="")==="transform"?$c:ya;return e==null?this.styleTween(r,R1(r,s)).on("end.style."+r,Zp(r)):typeof e==="function"?this.styleTween(r,N1(r,s,Ts(this,"style."+r,e))).each(W1(this._id,r)):this.styleTween(r,q1(r,s,e),i).on("end.style."+r,null)}function z1(r,e,i){return function(s){this.style.setProperty(r,e.call(this,s),i)}}function H1(r,e,i){var s,o;function n(){var c=e.apply(this,arguments);if(c!==o)s=(o=c)&&z1(r,c,i);return s}return n._value=e,n}function tu(r,e,i){var s="style."+(r+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(e==null)return this.tween(s,null);if(typeof e!=="function")throw Error();return this.tween(s,H1(r,e,i==null?"":i))}function Y1(r){return function(){this.textContent=r}}function U1(r){return function(){var e=r(this);this.textContent=e==null?"":e}}function eu(r){return this.tween("text",typeof r==="function"?U1(Ts(this,"text",r)):Y1(r==null?"":r+""))}function j1(r){return function(e){this.textContent=r.call(this,e)}}function G1(r){var e,i;function s(){var o=r.apply(this,arguments);if(o!==i)e=(i=o)&&j1(o);return e}return s._value=r,s}function ru(r){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(r==null)return this.tween(e,null);if(typeof r!=="function")throw Error();return this.tween(e,G1(r))}function iu(){var r=this._name,e=this._id,i=Sl();for(var s=this._groups,o=s.length,n=0;n<o;++n)for(var c=s[n],h=c.length,g,y=0;y<h;++y)if(g=c[y]){var f=ur(g,e);Eo(g,r,i,y,c,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Pr(s,this._parents,r,i)}function ou(){var r,e,i=this,s=i._id,o=i.size();return new Promise(function(n,c){var h={value:c},g={value:function(){if(--o===0)n()}};if(i.each(function(){var y=mr(this,s),f=y.on;if(f!==r)e=(r=f).copy(),e._.cancel.push(h),e._.interrupt.push(h),e._.end.push(g);y.on=e}),o===0)n()})}var X1=0;function Pr(r,e,i,s){this._groups=r,this._parents=e,this._name=i,this._id=s}function Qp(r){return Mo().transition(r)}function Sl(){return++X1}var Oo=Mo.prototype;Pr.prototype=Qp.prototype={constructor:Pr,select:Kc,selectAll:Zc,selectChild:Oo.selectChild,selectChildren:Oo.selectChildren,filter:jc,merge:Gc,selection:Qc,transition:iu,call:Oo.call,nodes:Oo.nodes,node:Oo.node,size:Oo.size,empty:Oo.empty,each:Oo.each,on:Xc,attr:Nc,attrTween:Wc,style:Jc,styleTween:tu,text:eu,textTween:ru,remove:Vc,tween:qc,delay:zc,duration:Hc,ease:Yc,easeVarying:Uc,end:ou,[Symbol.iterator]:Oo[Symbol.iterator]};function Tl(r){return((r*=2)<=1?r*r*r:(r-=2)*r*r+2)/2}var V1={time:null,delay:0,duration:250,ease:Tl};function K1(r,e){var i;while(!(i=r.__transition)||!(i=i[e]))if(!(r=r.parentNode))throw Error(`transition ${e} not found`);return i}function su(r){var e,i;if(r instanceof Pr)e=r._id,r=r._name;else e=Sl(),(i=V1).time=fa(),r=r==null?null:r+"";for(var s=this._groups,o=s.length,n=0;n<o;++n)for(var c=s[n],h=c.length,g,y=0;y<h;++y)if(g=c[y])Eo(g,r,e,y,c,i||K1(g,e));return new Pr(s,this._parents,r,e)}Mo.prototype.interrupt=Rc;Mo.prototype.transition=su;var{abs:tE,max:eE,min:rE}=Math;function Jp(r){return[+r[0],+r[1]]}function Z1(r){return[Jp(r[0]),Jp(r[1])]}var iE={name:"x",handles:["w","e"].map(au),input:function(r,e){return r==null?null:[[+r[0],e[0][1]],[+r[1],e[1][1]]]},output:function(r){return r&&[r[0][0],r[1][0]]}},oE={name:"y",handles:["n","s"].map(au),input:function(r,e){return r==null?null:[[e[0][0],+r[0]],[e[1][0],+r[1]]]},output:function(r){return r&&[r[0][1],r[1][1]]}},sE={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(au),input:function(r){return r==null?null:Z1(r)},output:function(r){return r}};function au(r){return{type:r}}var nu=Math.PI,lu=2*nu;var Q1=lu-0.000001;function tg(r){this._+=r[0];for(let e=1,i=r.length;e<i;++e)this._+=arguments[e]+r[e]}function J1(r){let e=Math.floor(r);if(!(e>=0))throw Error(`invalid digits: ${r}`);if(e>15)return tg;let i=10**e;return function(s){this._+=s[0];for(let o=1,n=s.length;o<n;++o)this._+=Math.round(arguments[o]*i)/i+s[o]}}class _s{constructor(r){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=r==null?tg:J1(r)}moveTo(r,e){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}`}closePath(){if(this._x1!==null)this._x1=this._x0,this._y1=this._y0,this._append`Z`}lineTo(r,e){this._append`L${this._x1=+r},${this._y1=+e}`}quadraticCurveTo(r,e,i,s){this._append`Q${+r},${+e},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(r,e,i,s,o,n){this._append`C${+r},${+e},${+i},${+s},${this._x1=+o},${this._y1=+n}`}arcTo(r,e,i,s,o){if(r=+r,e=+e,i=+i,s=+s,o=+o,o<0)throw Error(`negative radius: ${o}`);let n=this._x1,c=this._y1,h=i-r,g=s-e,y=n-r,f=c-e,B=y*y+f*f;if(this._x1===null)this._append`M${this._x1=r},${this._y1=e}`;else if(!(B>0.000001));else if(!(Math.abs(f*h-g*y)>0.000001)||!o)this._append`L${this._x1=r},${this._y1=e}`;else{let v=i-n,q=s-c,W=h*h+g*g,H=v*v+q*q,Y=Math.sqrt(W),j=Math.sqrt(B),X=o*Math.tan((nu-Math.acos((W+B-H)/(2*Y*j)))/2),Q=X/j,et=X/Y;if(Math.abs(Q-1)>0.000001)this._append`L${r+Q*y},${e+Q*f}`;this._append`A${o},${o},0,0,${+(f*v>y*q)},${this._x1=r+et*h},${this._y1=e+et*g}`}}arc(r,e,i,s,o,n){if(r=+r,e=+e,i=+i,n=!!n,i<0)throw Error(`negative radius: ${i}`);let c=i*Math.cos(s),h=i*Math.sin(s),g=r+c,y=e+h,f=1^n,B=n?s-o:o-s;if(this._x1===null)this._append`M${g},${y}`;else if(Math.abs(this._x1-g)>0.000001||Math.abs(this._y1-y)>0.000001)this._append`L${g},${y}`;if(!i)return;if(B<0)B=B%lu+lu;if(B>Q1)this._append`A${i},${i},0,1,${f},${r-c},${e-h}A${i},${i},0,1,${f},${this._x1=g},${this._y1=y}`;else if(B>0.000001)this._append`A${i},${i},0,${+(B>=nu)},${f},${this._x1=r+i*Math.cos(o)},${this._y1=e+i*Math.sin(o)}`}rect(r,e,i,s){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function eg(){return new _s}eg.prototype=_s.prototype;function ae(r){return function(){return r}}var{abs:ji,atan2:We,cos:En,max:go,min:Pa,sin:zt,sqrt:Fn}=Math,Fe=0.000000000001,Sr=Math.PI,Wr=Sr/2,zn=2*Sr;function yo(r){return r>1?0:r<-1?Sr:Math.acos(r)}function qi(r){return r>=1?Wr:r<=-1?-Wr:Math.asin(r)}function Un(r){let e=3;return r.digits=function(i){if(!arguments.length)return e;if(i==null)e=null;else{let s=Math.floor(i);if(!(s>=0))throw RangeError(`invalid digits: ${i}`);e=s}return r},()=>new _s(e)}var vo=Array.prototype.slice;function Gr(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function rg(r){this._context=r}rg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:this._context.lineTo(r,e);break}}};function Ri(r){return new rg(r)}function Oa(r){return r[0]}function $a(r){return r[1]}function jn(r,e){var i=ae(!0),s=null,o=Ri,n=null,c=Un(h);r=typeof r==="function"?r:r===void 0?Oa:ae(r),e=typeof e==="function"?e:e===void 0?$a:ae(e);function h(g){var y,f=(g=Gr(g)).length,B,v=!1,q;if(s==null)n=o(q=c());for(y=0;y<=f;++y){if(!(y<f&&i(B=g[y],y,g))===v)if(v=!v)n.lineStart();else n.lineEnd();if(v)n.point(+r(B,y,g),+e(B,y,g))}if(q)return n=null,q+""||null}return h.x=function(g){return arguments.length?(r=typeof g==="function"?g:ae(+g),h):r},h.y=function(g){return arguments.length?(e=typeof g==="function"?g:ae(+g),h):e},h.defined=function(g){return arguments.length?(i=typeof g==="function"?g:ae(!!g),h):i},h.curve=function(g){return arguments.length?(o=g,s!=null&&(n=o(s)),h):o},h.context=function(g){return arguments.length?(g==null?s=n=null:n=o(s=g),h):s},h}class hu{constructor(r,e){this._context=r,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line}point(r,e){switch(r=+r,e=+e,this._point){case 0:{if(this._point=1,this._line)this._context.lineTo(r,e);else this._context.moveTo(r,e);break}case 1:this._point=2;default:{if(this._x)this._context.bezierCurveTo(this._x0=(this._x0+r)/2,this._y0,this._x0,e,r,e);else this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,r,this._y0,r,e);break}}this._x0=r,this._y0=e}}function qn(r){return new hu(r,!0)}function xa(r){return new hu(r,!1)}function fi(){}function Bs(r,e,i){r._context.bezierCurveTo((2*r._x0+r._x1)/3,(2*r._y0+r._y1)/3,(r._x0+2*r._x1)/3,(r._y0+2*r._y1)/3,(r._x0+4*r._x1+e)/6,(r._y0+4*r._y1+i)/6)}function Ca(r){this._context=r}Ca.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:Bs(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);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:Bs(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function is(r){return new Ca(r)}function ig(r){this._context=r}ig.prototype={areaStart:fi,areaEnd:fi,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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x2=r,this._y2=e;break;case 1:this._point=2,this._x3=r,this._y3=e;break;case 2:this._point=3,this._x4=r,this._y4=e,this._context.moveTo((this._x0+4*this._x1+r)/6,(this._y0+4*this._y1+e)/6);break;default:Bs(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function _l(r){return new ig(r)}function og(r){this._context=r}og.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+r)/6,s=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(i,s):this._context.moveTo(i,s);break;case 3:this._point=4;default:Bs(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Bl(r){return new og(r)}function sg(r,e){this._basis=new Ca(r),this._beta=e}sg.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var r=this._x,e=this._y,i=r.length-1;if(i>0){var s=r[0],o=e[0],n=r[i]-s,c=e[i]-o,h=-1,g;while(++h<=i)g=h/i,this._basis.point(this._beta*r[h]+(1-this._beta)*(s+g*n),this._beta*e[h]+(1-this._beta)*(o+g*c))}this._x=this._y=null,this._basis.lineEnd()},point:function(r,e){this._x.push(+r),this._y.push(+e)}};var cu=function r(e){function i(s){return e===1?new Ca(s):new sg(s,e)}return i.beta=function(s){return r(+s)},i}(0.85);function vs(r,e,i){r._context.bezierCurveTo(r._x1+r._k*(r._x2-r._x0),r._y1+r._k*(r._y2-r._y0),r._x2+r._k*(r._x1-e),r._y2+r._k*(r._y1-i),r._x2,r._y2)}function vl(r,e){this._context=r,this._k=(1-e)/6}vl.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:vs(this,this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2,this._x1=r,this._y1=e;break;case 2:this._point=3;default:vs(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ba=function r(e){function i(s){return new vl(s,e)}return i.tension=function(s){return r(+s)},i}(0);function Ll(r,e){this._context=r,this._k=(1-e)/6}Ll.prototype={areaStart:fi,areaEnd:fi,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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:vs(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var uu=function r(e){function i(s){return new Ll(s,e)}return i.tension=function(s){return r(+s)},i}(0);function Fl(r,e){this._context=r,this._k=(1-e)/6}Fl.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,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:vs(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var fu=function r(e){function i(s){return new Fl(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ka(r,e,i){var{_x1:s,_y1:o,_x2:n,_y2:c}=r;if(r._l01_a>Fe){var h=2*r._l01_2a+3*r._l01_a*r._l12_a+r._l12_2a,g=3*r._l01_a*(r._l01_a+r._l12_a);s=(s*h-r._x0*r._l12_2a+r._x2*r._l01_2a)/g,o=(o*h-r._y0*r._l12_2a+r._y2*r._l01_2a)/g}if(r._l23_a>Fe){var y=2*r._l23_2a+3*r._l23_a*r._l12_a+r._l12_2a,f=3*r._l23_a*(r._l23_a+r._l12_a);n=(n*y+r._x1*r._l23_2a-e*r._l12_2a)/f,c=(c*y+r._y1*r._l23_2a-i*r._l12_2a)/f}r._context.bezierCurveTo(s,o,n,c,r._x2,r._y2)}function ag(r,e){this._context=r,this._alpha=e}ag.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}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3;default:ka(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var wa=function r(e){function i(s){return e?new ag(s,e):new vl(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function ng(r,e){this._context=r,this._alpha=e}ng.prototype={areaStart:fi,areaEnd:fi,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(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:ka(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var du=function r(e){function i(s){return e?new ng(s,e):new Ll(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function lg(r,e){this._context=r,this._alpha=e}lg.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,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:ka(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var pu=function r(e){function i(s){return e?new lg(s,e):new Fl(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function hg(r){this._context=r}hg.prototype={areaStart:fi,areaEnd:fi,lineStart:function(){this._point=0},lineEnd:function(){if(this._point)this._context.closePath()},point:function(r,e){if(r=+r,e=+e,this._point)this._context.lineTo(r,e);else this._point=1,this._context.moveTo(r,e)}};function Al(r){return new hg(r)}function cg(r){return r<0?-1:1}function ug(r,e,i){var s=r._x1-r._x0,o=e-r._x1,n=(r._y1-r._y0)/(s||o<0&&-0),c=(i-r._y1)/(o||s<0&&-0),h=(n*o+c*s)/(s+o);return(cg(n)+cg(c))*Math.min(Math.abs(n),Math.abs(c),0.5*Math.abs(h))||0}function fg(r,e){var i=r._x1-r._x0;return i?(3*(r._y1-r._y0)/i-e)/2:e}function gu(r,e,i){var{_x0:s,_y0:o,_x1:n,_y1:c}=r,h=(n-s)/3;r._context.bezierCurveTo(s+h,o+h*e,n-h,c-h*i,n,c)}function Ml(r){this._context=r}Ml.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:gu(this,this._t0,fg(this,this._t0));break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){var i=NaN;if(r=+r,e=+e,r===this._x1&&e===this._y1)return;switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3,gu(this,fg(this,i=ug(this,r,e)),i);break;default:gu(this,this._t0,i=ug(this,r,e));break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e,this._t0=i}};function dg(r){this._context=new pg(r)}(dg.prototype=Object.create(Ml.prototype)).point=function(r,e){Ml.prototype.point.call(this,e,r)};function pg(r){this._context=r}pg.prototype={moveTo:function(r,e){this._context.moveTo(e,r)},closePath:function(){this._context.closePath()},lineTo:function(r,e){this._context.lineTo(e,r)},bezierCurveTo:function(r,e,i,s,o,n){this._context.bezierCurveTo(e,r,s,i,n,o)}};function Sa(r){return new Ml(r)}function Ta(r){return new dg(r)}function mg(r){this._context=r}mg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var r=this._x,e=this._y,i=r.length;if(i)if(this._line?this._context.lineTo(r[0],e[0]):this._context.moveTo(r[0],e[0]),i===2)this._context.lineTo(r[1],e[1]);else{var s=gg(r),o=gg(e);for(var n=0,c=1;c<i;++n,++c)this._context.bezierCurveTo(s[0][n],o[0][n],s[1][n],o[1][n],r[c],e[c])}if(this._line||this._line!==0&&i===1)this._context.closePath();this._line=1-this._line,this._x=this._y=null},point:function(r,e){this._x.push(+r),this._y.push(+e)}};function gg(r){var e,i=r.length-1,s,o=Array(i),n=Array(i),c=Array(i);o[0]=0,n[0]=2,c[0]=r[0]+2*r[1];for(e=1;e<i-1;++e)o[e]=1,n[e]=4,c[e]=4*r[e]+2*r[e+1];o[i-1]=2,n[i-1]=7,c[i-1]=8*r[i-1]+r[i];for(e=1;e<i;++e)s=o[e]/n[e-1],n[e]-=s,c[e]-=s*c[e-1];o[i-1]=c[i-1]/n[i-1];for(e=i-2;e>=0;--e)o[e]=(c[e]-o[e+1])/n[e];n[i-1]=(r[i]+o[i-1])/2;for(e=0;e<i-1;++e)n[e]=2*r[e+1]-o[e+1];return[o,n]}function Ls(r){return new mg(r)}function El(r,e){this._context=r,this._t=e}El.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){if(0<this._t&&this._t<1&&this._point===2)this._context.lineTo(this._x,this._y);if(this._line||this._line!==0&&this._point===1)this._context.closePath();if(this._line>=0)this._t=1-this._t,this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(r,e);else{var i=this._x*(1-this._t)+r*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,e)}break}}this._x=r,this._y=e}};function Fs(r){return new El(r,0.5)}function _a(r){return new El(r,0)}function va(r){return new El(r,1)}function Xo(r,e,i){this.k=r,this.x=e,this.y=i}Xo.prototype={constructor:Xo,scale:function(r){return r===1?this:new Xo(this.k*r,this.x,this.y)},translate:function(r,e){return r===0&e===0?this:new Xo(this.k,this.x+this.k*r,this.y+this.k*e)},apply:function(r){return[r[0]*this.k+this.x,r[1]*this.k+this.y]},applyX:function(r){return r*this.k+this.x},applyY:function(r){return r*this.k+this.y},invert:function(r){return[(r[0]-this.x)/this.k,(r[1]-this.y)/this.k]},invertX:function(r){return(r-this.x)/this.k},invertY:function(r){return(r-this.y)/this.k},rescaleX:function(r){return r.copy().domain(r.range().map(this.invertX,this).map(r.invert,r))},rescaleY:function(r){return r.copy().domain(r.range().map(this.invertY,this).map(r.invert,r))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var mu=new Xo(1,0,0);yu.prototype=Xo.prototype;function yu(r){while(!r.__zoom)if(!(r=r.parentNode))return mu;return r.__zoom}var V=t((r)=>{let{securityLevel:e}=l(),i=p("body");if(e==="sandbox"){let n=p(`#i${r}`).node()?.contentDocument??document;i=p(n.body)}return i.select(`#${r}`)},"selectSvgElement");function zg(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}t(zg,"getDefaultExportFromCjs");var Fr={},Ol={},Vo={},yg;function As(){if(yg)return Vo;yg=1;function r(c){return typeof c>"u"||c===null}t(r,"isNothing");function e(c){return typeof c==="object"&&c!==null}t(e,"isObject");function i(c){if(Array.isArray(c))return c;else if(r(c))return[];return[c]}t(i,"toArray");function s(c,h){if(h){let g=Object.keys(h);for(let y=0,f=g.length;y<f;y+=1){let B=g[y];c[B]=h[B]}}return c}t(s,"extend");function o(c,h){let g="";for(let y=0;y<h;y+=1)g+=c;return g}t(o,"repeat");function n(c){return c===0&&Number.NEGATIVE_INFINITY===1/c}return t(n,"isNegativeZero"),Vo.isNothing=r,Vo.isObject=e,Vo.toArray=i,Vo.repeat=o,Vo.isNegativeZero=n,Vo.extend=s,Vo}t(As,"requireCommon");var xu,xg;function Ms(){if(xg)return xu;xg=1;function r(i,s){let o="",n=i.reason||"(unknown reason)";if(!i.mark)return n;if(i.mark.name)o+='in "'+i.mark.name+'" ';if(o+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!s&&i.mark.snippet)o+=`
130
130
 
131
- `+i.mark.snippet;return n+" "+o}t(r,"formatError");function e(i,s){if(Error.call(this),this.name="YAMLException",this.reason=i,this.mark=s,this.message=r(this,!1),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||""}return t(e,"YAMLException2"),e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=t(function(s){return this.name+": "+r(this,s)},"toString"),xu=e,xu}t(As,"requireException");var Cu,Cg;function Hg(){if(Cg)return Cu;Cg=1;let r=Fs();function e(o,n,c,h,g){let y="",f="",B=Math.floor(g/2)-1;if(h-n>B)y=" ... ",n=h-B+y.length;if(c-h>B)f=" ...",c=h+B-f.length;return{str:y+o.slice(n,c).replace(/\t/g,"→")+f,pos:h-n+y.length}}t(e,"getLine");function i(o,n){return r.repeat(" ",n-o.length)+o}t(i,"padStart");function s(o,n){if(n=Object.create(n||null),!o.buffer)return null;if(!n.maxLength)n.maxLength=79;if(typeof n.indent!=="number")n.indent=1;if(typeof n.linesBefore!=="number")n.linesBefore=3;if(typeof n.linesAfter!=="number")n.linesAfter=2;let c=/\r?\n|\r|\0/g,h=[0],g=[],y,f=-1;while(y=c.exec(o.buffer))if(g.push(y.index),h.push(y.index+y[0].length),o.position<=y.index&&f<0)f=h.length-2;if(f<0)f=h.length-1;let B="",v=Math.min(o.line+n.linesAfter,g.length).toString().length,q=n.maxLength-(n.indent+v+3);for(let H=1;H<=n.linesBefore;H++){if(f-H<0)break;let Y=e(o.buffer,h[f-H],g[f-H],o.position-(h[f]-h[f-H]),q);B=r.repeat(" ",n.indent)+i((o.line-H+1).toString(),v)+" | "+Y.str+`
131
+ `+i.mark.snippet;return n+" "+o}t(r,"formatError");function e(i,s){if(Error.call(this),this.name="YAMLException",this.reason=i,this.mark=s,this.message=r(this,!1),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||""}return t(e,"YAMLException2"),e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=t(function(s){return this.name+": "+r(this,s)},"toString"),xu=e,xu}t(Ms,"requireException");var Cu,Cg;function Hg(){if(Cg)return Cu;Cg=1;let r=As();function e(o,n,c,h,g){let y="",f="",B=Math.floor(g/2)-1;if(h-n>B)y=" ... ",n=h-B+y.length;if(c-h>B)f=" ...",c=h+B-f.length;return{str:y+o.slice(n,c).replace(/\t/g,"→")+f,pos:h-n+y.length}}t(e,"getLine");function i(o,n){return r.repeat(" ",n-o.length)+o}t(i,"padStart");function s(o,n){if(n=Object.create(n||null),!o.buffer)return null;if(!n.maxLength)n.maxLength=79;if(typeof n.indent!=="number")n.indent=1;if(typeof n.linesBefore!=="number")n.linesBefore=3;if(typeof n.linesAfter!=="number")n.linesAfter=2;let c=/\r?\n|\r|\0/g,h=[0],g=[],y,f=-1;while(y=c.exec(o.buffer))if(g.push(y.index),h.push(y.index+y[0].length),o.position<=y.index&&f<0)f=h.length-2;if(f<0)f=h.length-1;let B="",v=Math.min(o.line+n.linesAfter,g.length).toString().length,q=n.maxLength-(n.indent+v+3);for(let H=1;H<=n.linesBefore;H++){if(f-H<0)break;let Y=e(o.buffer,h[f-H],g[f-H],o.position-(h[f]-h[f-H]),q);B=r.repeat(" ",n.indent)+i((o.line-H+1).toString(),v)+" | "+Y.str+`
132
132
  `+B}let W=e(o.buffer,h[f],g[f],o.position,q);B+=r.repeat(" ",n.indent)+i((o.line+1).toString(),v)+" | "+W.str+`
133
133
  `,B+=r.repeat("-",n.indent+v+3+W.pos)+`^
134
134
  `;for(let H=1;H<=n.linesAfter;H++){if(f+H>=g.length)break;let Y=e(o.buffer,h[f+H],g[f+H],o.position-(h[f]-h[f+H]),q);B+=r.repeat(" ",n.indent)+i((o.line+H+1).toString(),v)+" | "+Y.str+`
135
- `}return B.replace(/\n$/,"")}return t(s,"makeSnippet"),Cu=s,Cu}t(Hg,"requireSnippet");var bu,bg;function yr(){if(bg)return bu;bg=1;let r=As(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function s(n){let c={};if(n!==null)Object.keys(n).forEach(function(h){n[h].forEach(function(g){c[String(g)]=h})});return c}t(s,"compileStyleAliases");function o(n,c){if(c=c||{},Object.keys(c).forEach(function(h){if(e.indexOf(h)===-1)throw new r('Unknown option "'+h+'" is met in definition of "'+n+'" YAML type.')}),this.options=c,this.tag=n,this.kind=c.kind||null,this.resolve=c.resolve||function(){return!0},this.construct=c.construct||function(h){return h},this.instanceOf=c.instanceOf||null,this.predicate=c.predicate||null,this.represent=c.represent||null,this.representName=c.representName||null,this.defaultStyle=c.defaultStyle||null,this.multi=c.multi||!1,this.styleAliases=s(c.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+n+'" YAML type.')}return t(o,"Type2"),bu=o,bu}t(yr,"requireType");var ku,kg;function Nu(){if(kg)return ku;kg=1;let r=As(),e=yr();function i(n,c){let h=[];return n[c].forEach(function(g){let y=h.length;h.forEach(function(f,B){if(f.tag===g.tag&&f.kind===g.kind&&f.multi===g.multi)y=B}),h[y]=g}),h}t(i,"compileList");function s(){let n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function c(h){if(h.multi)n.multi[h.kind].push(h),n.multi.fallback.push(h);else n[h.kind][h.tag]=n.fallback[h.tag]=h}t(c,"collectType");for(let h=0,g=arguments.length;h<g;h+=1)arguments[h].forEach(c);return n}t(s,"compileMap");function o(n){return this.extend(n)}return t(o,"Schema2"),o.prototype.extend=t(function(c){let h=[],g=[];if(c instanceof e)g.push(c);else if(Array.isArray(c))g=g.concat(c);else if(c&&(Array.isArray(c.implicit)||Array.isArray(c.explicit))){if(c.implicit)h=h.concat(c.implicit);if(c.explicit)g=g.concat(c.explicit)}else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");h.forEach(function(f){if(!(f instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(f.loadKind&&f.loadKind!=="scalar")throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(f.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),g.forEach(function(f){if(!(f instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let y=Object.create(o.prototype);return y.implicit=(this.implicit||[]).concat(h),y.explicit=(this.explicit||[]).concat(g),y.compiledImplicit=i(y,"implicit"),y.compiledExplicit=i(y,"explicit"),y.compiledTypeMap=s(y.compiledImplicit,y.compiledExplicit),y},"extend"),ku=o,ku}t(Nu,"requireSchema");var wu,wg;function Wu(){if(wg)return wu;return wg=1,wu=new(yr())("tag:yaml.org,2002:str",{kind:"scalar",construct:t(function(e){return e!==null?e:""},"construct")}),wu}t(Wu,"requireStr");var Su,Sg;function zu(){if(Sg)return Su;return Sg=1,Su=new(yr())("tag:yaml.org,2002:seq",{kind:"sequence",construct:t(function(e){return e!==null?e:[]},"construct")}),Su}t(zu,"requireSeq");var Tu,Tg;function Hu(){if(Tg)return Tu;return Tg=1,Tu=new(yr())("tag:yaml.org,2002:map",{kind:"mapping",construct:t(function(e){return e!==null?e:{}},"construct")}),Tu}t(Hu,"requireMap");var _u,_g;function Yu(){if(_g)return _u;return _g=1,_u=new(Nu())({explicit:[Wu(),zu(),Hu()]}),_u}t(Yu,"requireFailsafe");var Bu,Bg;function Uu(){if(Bg)return Bu;Bg=1;let r=yr();function e(o){if(o===null)return!0;let n=o.length;return n===1&&o==="~"||n===4&&(o==="null"||o==="Null"||o==="NULL")}t(e,"resolveYamlNull");function i(){return null}t(i,"constructYamlNull");function s(o){return o===null}return t(s,"isNull"),Bu=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:i,predicate:s,represent:{canonical:t(function(){return"~"},"canonical"),lowercase:t(function(){return"null"},"lowercase"),uppercase:t(function(){return"NULL"},"uppercase"),camelcase:t(function(){return"Null"},"camelcase"),empty:t(function(){return""},"empty")},defaultStyle:"lowercase"}),Bu}t(Uu,"require_null");var vu,vg;function ju(){if(vg)return vu;vg=1;let r=yr();function e(o){if(o===null)return!1;let n=o.length;return n===4&&(o==="true"||o==="True"||o==="TRUE")||n===5&&(o==="false"||o==="False"||o==="FALSE")}t(e,"resolveYamlBoolean");function i(o){return o==="true"||o==="True"||o==="TRUE"}t(i,"constructYamlBoolean");function s(o){return Object.prototype.toString.call(o)==="[object Boolean]"}return t(s,"isBoolean"),vu=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:i,predicate:s,represent:{lowercase:t(function(o){return o?"true":"false"},"lowercase"),uppercase:t(function(o){return o?"TRUE":"FALSE"},"uppercase"),camelcase:t(function(o){return o?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),vu}t(ju,"requireBool");var Lu,Lg;function Gu(){if(Lg)return Lu;Lg=1;let r=Fs(),e=yr();function i(y){return y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102}t(i,"isHexCode");function s(y){return y>=48&&y<=55}t(s,"isOctCode");function o(y){return y>=48&&y<=57}t(o,"isDecCode");function n(y){if(y===null)return!1;let f=y.length,B=0,v=!1;if(!f)return!1;let q=y[B];if(q==="-"||q==="+")q=y[++B];if(q==="0"){if(B+1===f)return!0;if(q=y[++B],q==="b"){B++;for(;B<f;B++){if(q=y[B],q!=="0"&&q!=="1")return!1;v=!0}return v&&isFinite(c(y))}if(q==="x"){B++;for(;B<f;B++){if(!i(y.charCodeAt(B)))return!1;v=!0}return v&&isFinite(c(y))}if(q==="o"){B++;for(;B<f;B++){if(!s(y.charCodeAt(B)))return!1;v=!0}return v&&isFinite(c(y))}}for(;B<f;B++){if(!o(y.charCodeAt(B)))return!1;v=!0}if(!v)return!1;return isFinite(c(y))}t(n,"resolveYamlInteger");function c(y){let f=y,B=1,v=f[0];if(v==="-"||v==="+"){if(v==="-")B=-1;f=f.slice(1),v=f[0]}if(f==="0")return 0;if(v==="0"){if(f[1]==="b")return B*parseInt(f.slice(2),2);if(f[1]==="x")return B*parseInt(f.slice(2),16);if(f[1]==="o")return B*parseInt(f.slice(2),8)}return B*parseInt(f,10)}t(c,"parseYamlInteger");function h(y){return c(y)}t(h,"constructYamlInteger");function g(y){return Object.prototype.toString.call(y)==="[object Number]"&&(y%1===0&&!r.isNegativeZero(y))}return t(g,"isInteger"),Lu=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:n,construct:h,predicate:g,represent:{binary:t(function(y){return y>=0?"0b"+y.toString(2):"-0b"+y.toString(2).slice(1)},"binary"),octal:t(function(y){return y>=0?"0o"+y.toString(8):"-0o"+y.toString(8).slice(1)},"octal"),decimal:t(function(y){return y.toString(10)},"decimal"),hexadecimal:t(function(y){return y>=0?"0x"+y.toString(16).toUpperCase():"-0x"+y.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Lu}t(Gu,"requireInt");var Fu,Fg;function Xu(){if(Fg)return Fu;Fg=1;let r=Fs(),e=yr(),i=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),s=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function o(y){if(y===null)return!1;if(!i.test(y))return!1;if(isFinite(parseFloat(y,10)))return!0;return s.test(y)}t(o,"resolveYamlFloat");function n(y){let f=y.toLowerCase(),B=f[0]==="-"?-1:1;if("+-".indexOf(f[0])>=0)f=f.slice(1);if(f===".inf")return B===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(f===".nan")return NaN;return B*parseFloat(f,10)}t(n,"constructYamlFloat");let c=/^[-+]?[0-9]+e/;function h(y,f){if(isNaN(y))switch(f){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===y)switch(f){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===y)switch(f){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(y))return"-0.0";let B=y.toString(10);return c.test(B)?B.replace("e",".e"):B}t(h,"representYamlFloat");function g(y){return Object.prototype.toString.call(y)==="[object Number]"&&(y%1!==0||r.isNegativeZero(y))}return t(g,"isFloat"),Fu=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:n,predicate:g,represent:h,defaultStyle:"lowercase"}),Fu}t(Xu,"requireFloat");var Au,Ag;function Vu(){if(Ag)return Au;return Ag=1,Au=Yu().extend({implicit:[Uu(),ju(),Gu(),Xu()]}),Au}t(Vu,"requireJson");var Mu,Mg;function Ku(){if(Mg)return Mu;return Mg=1,Mu=Vu(),Mu}t(Ku,"requireCore");var Eu,Eg;function Zu(){if(Eg)return Eu;Eg=1;let r=yr(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=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 s(c){if(c===null)return!1;if(e.exec(c)!==null)return!0;if(i.exec(c)!==null)return!0;return!1}t(s,"resolveYamlTimestamp");function o(c){let h=0,g=null,y=e.exec(c);if(y===null)y=i.exec(c);if(y===null)throw Error("Date resolve error");let f=+y[1],B=+y[2]-1,v=+y[3];if(!y[4])return new Date(Date.UTC(f,B,v));let q=+y[4],W=+y[5],H=+y[6];if(y[7]){h=y[7].slice(0,3);while(h.length<3)h+="0";h=+h}if(y[9]){let j=+y[10],X=+(y[11]||0);if(g=(j*60+X)*60000,y[9]==="-")g=-g}let Y=new Date(Date.UTC(f,B,v,q,W,H,h));if(g)Y.setTime(Y.getTime()-g);return Y}t(o,"constructYamlTimestamp");function n(c){return c.toISOString()}return t(n,"representYamlTimestamp"),Eu=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:s,construct:o,instanceOf:Date,represent:n}),Eu}t(Zu,"requireTimestamp");var Ou,Og;function Qu(){if(Og)return Ou;Og=1;let r=yr();function e(i){return i==="<<"||i===null}return t(e,"resolveYamlMerge"),Ou=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),Ou}t(Qu,"requireMerge");var Iu,Ig;function Ju(){if(Ig)return Iu;Ig=1;let r=yr(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
136
- \r`;function i(c){if(c===null)return!1;let h=0,g=c.length,y=e;for(let f=0;f<g;f++){let B=y.indexOf(c.charAt(f));if(B>64)continue;if(B<0)return!1;h+=6}return h%8===0}t(i,"resolveYamlBinary");function s(c){let h=c.replace(/[\r\n=]/g,""),g=h.length,y=e,f=0,B=[];for(let q=0;q<g;q++){if(q%4===0&&q)B.push(f>>16&255),B.push(f>>8&255),B.push(f&255);f=f<<6|y.indexOf(h.charAt(q))}let v=g%4*6;if(v===0)B.push(f>>16&255),B.push(f>>8&255),B.push(f&255);else if(v===18)B.push(f>>10&255),B.push(f>>2&255);else if(v===12)B.push(f>>4&255);return new Uint8Array(B)}t(s,"constructYamlBinary");function o(c){let h="",g=0,y=c.length,f=e;for(let v=0;v<y;v++){if(v%3===0&&v)h+=f[g>>18&63],h+=f[g>>12&63],h+=f[g>>6&63],h+=f[g&63];g=(g<<8)+c[v]}let B=y%3;if(B===0)h+=f[g>>18&63],h+=f[g>>12&63],h+=f[g>>6&63],h+=f[g&63];else if(B===2)h+=f[g>>10&63],h+=f[g>>4&63],h+=f[g<<2&63],h+=f[64];else if(B===1)h+=f[g>>2&63],h+=f[g<<4&63],h+=f[64],h+=f[64];return h}t(o,"representYamlBinary");function n(c){return Object.prototype.toString.call(c)==="[object Uint8Array]"}return t(n,"isBinary"),Iu=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:s,predicate:n,represent:o}),Iu}t(Ju,"requireBinary");var $u,$g;function tf(){if($g)return $u;$g=1;let r=yr(),e=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function s(n){if(n===null)return!0;let c=[],h=n;for(let g=0,y=h.length;g<y;g+=1){let f=h[g],B=!1;if(i.call(f)!=="[object Object]")return!1;let v;for(v in f)if(e.call(f,v))if(!B)B=!0;else return!1;if(!B)return!1;if(c.indexOf(v)===-1)c.push(v);else return!1}return!0}t(s,"resolveYamlOmap");function o(n){return n!==null?n:[]}return t(o,"constructYamlOmap"),$u=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:s,construct:o}),$u}t(tf,"requireOmap");var Du,Dg;function ef(){if(Dg)return Du;Dg=1;let r=yr(),e=Object.prototype.toString;function i(o){if(o===null)return!0;let n=o,c=Array(n.length);for(let h=0,g=n.length;h<g;h+=1){let y=n[h];if(e.call(y)!=="[object Object]")return!1;let f=Object.keys(y);if(f.length!==1)return!1;c[h]=[f[0],y[f[0]]]}return!0}t(i,"resolveYamlPairs");function s(o){if(o===null)return[];let n=o,c=Array(n.length);for(let h=0,g=n.length;h<g;h+=1){let y=n[h],f=Object.keys(y);c[h]=[f[0],y[f[0]]]}return c}return t(s,"constructYamlPairs"),Du=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:s}),Du}t(ef,"requirePairs");var Pu,Pg;function rf(){if(Pg)return Pu;Pg=1;let r=yr(),e=Object.prototype.hasOwnProperty;function i(o){if(o===null)return!0;let n=o;for(let c in n)if(e.call(n,c)){if(n[c]!==null)return!1}return!0}t(i,"resolveYamlSet");function s(o){return o!==null?o:{}}return t(s,"constructYamlSet"),Pu=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:s}),Pu}t(rf,"requireSet");var Ru,Rg;function Il(){if(Rg)return Ru;return Rg=1,Ru=Ku().extend({implicit:[Zu(),Qu()],explicit:[Ju(),tf(),ef(),rf()]}),Ru}t(Il,"require_default");var qg;function Yg(){if(qg)return Ol;qg=1;let r=Fs(),e=As(),i=Hg(),s=Il(),o=Object.prototype.hasOwnProperty,n=1,c=2,h=3,g=4,y=1,f=2,B=3,v=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,q=/[\x85\u2028\u2029]/,W=/[,\[\]{}]/,H=/^(?:!|!!|![0-9A-Za-z-]+!)$/,Y=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function j(D){return Object.prototype.toString.call(D)}t(j,"_class");function X(D){return D===10||D===13}t(X,"isEol");function Q(D){return D===9||D===32}t(Q,"isWhiteSpace");function rt(D){return D===9||D===32||D===10||D===13}t(rt,"isWsOrEol");function it(D){return D===44||D===91||D===93||D===123||D===125}t(it,"isFlowIndicator");function ct(D){if(D>=48&&D<=57)return D-48;let pt=D|32;if(pt>=97&&pt<=102)return pt-97+10;return-1}t(ct,"fromHexCode");function lt(D){if(D===120)return 2;if(D===117)return 4;if(D===85)return 8;return 0}t(lt,"escapedHexLen");function dt(D){if(D>=48&&D<=57)return D-48;return-1}t(dt,"fromDecimalCode");function Ct(D){switch(D){case 48:return"\x00";case 97:return"\x07";case 98:return"\b";case 116:return"\t";case 9:return"\t";case 110:return`
137
- `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}t(Ct,"simpleEscapeSequence");function Bt(D){if(D<=65535)return String.fromCharCode(D);return String.fromCharCode((D-65536>>10)+55296,(D-65536&1023)+56320)}t(Bt,"charFromCodepoint");function kt(D,pt,_t){if(pt==="__proto__")Object.defineProperty(D,pt,{configurable:!0,enumerable:!0,writable:!0,value:_t});else D[pt]=_t}t(kt,"setProperty");let bt=Array(256),st=Array(256);for(let D=0;D<256;D++)bt[D]=Ct(D)?1:0,st[D]=Ct(D);function at(D,pt){this.input=D,this.filename=pt.filename||null,this.schema=pt.schema||s,this.onWarning=pt.onWarning||null,this.legacy=pt.legacy||!1,this.json=pt.json||!1,this.listener=pt.listener||null,this.maxDepth=typeof pt.maxDepth==="number"?pt.maxDepth:100,this.maxTotalMergeKeys=typeof pt.maxTotalMergeKeys==="number"?pt.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=D.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}t(at,"State");function mt(D,pt){let _t={name:D.filename,buffer:D.input.slice(0,-1),position:D.position,line:D.line,column:D.position-D.lineStart};return _t.snippet=i(_t),new e(pt,_t)}t(mt,"generateError");function ot(D,pt){throw mt(D,pt)}t(ot,"throwError");function wt(D,pt){if(D.onWarning)D.onWarning.call(null,mt(D,pt))}t(wt,"throwWarning");function Lt(D,pt,_t){let Mt=D.anchorMapTransactions;if(Mt.length!==0){let St=Mt[Mt.length-1];if(!o.call(St,pt))St[pt]={existed:o.call(D.anchorMap,pt),value:D.anchorMap[pt]}}D.anchorMap[pt]=_t}t(Lt,"storeAnchor");function Yt(D){D.anchorMapTransactions.push(Object.create(null))}t(Yt,"beginAnchorTransaction");function Ht(D){let pt=D.anchorMapTransactions.pop(),_t=D.anchorMapTransactions;if(_t.length===0)return;let Mt=_t[_t.length-1],St=Object.keys(pt);for(let Nt=0,Z=St.length;Nt<Z;Nt+=1){let xt=St[Nt];if(!o.call(Mt,xt))Mt[xt]=pt[xt]}}t(Ht,"commitAnchorTransaction");function he(D){let pt=D.anchorMapTransactions.pop(),_t=Object.keys(pt);for(let Mt=_t.length-1;Mt>=0;Mt-=1){let St=pt[_t[Mt]];if(St.existed)D.anchorMap[_t[Mt]]=St.value;else delete D.anchorMap[_t[Mt]]}}t(he,"rollbackAnchorTransaction");function ne(D){return{position:D.position,line:D.line,lineStart:D.lineStart,lineIndent:D.lineIndent,firstTabInLine:D.firstTabInLine,tag:D.tag,anchor:D.anchor,kind:D.kind,result:D.result}}t(ne,"snapshotState");function _e(D,pt){D.position=pt.position,D.line=pt.line,D.lineStart=pt.lineStart,D.lineIndent=pt.lineIndent,D.firstTabInLine=pt.firstTabInLine,D.tag=pt.tag,D.anchor=pt.anchor,D.kind=pt.kind,D.result=pt.result}t(_e,"restoreState");let Ae={YAML:t(function(pt,_t,Mt){if(pt.version!==null)ot(pt,"duplication of %YAML directive");if(Mt.length!==1)ot(pt,"YAML directive accepts exactly one argument");let St=/^([0-9]+)\.([0-9]+)$/.exec(Mt[0]);if(St===null)ot(pt,"ill-formed argument of the YAML directive");let Nt=parseInt(St[1],10),Z=parseInt(St[2],10);if(Nt!==1)ot(pt,"unacceptable YAML version of the document");if(pt.version=Mt[0],pt.checkLineBreaks=Z<2,Z!==1&&Z!==2)wt(pt,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:t(function(pt,_t,Mt){let St;if(Mt.length!==2)ot(pt,"TAG directive accepts exactly two arguments");let Nt=Mt[0];if(St=Mt[1],!H.test(Nt))ot(pt,"ill-formed tag handle (first argument) of the TAG directive");if(o.call(pt.tagMap,Nt))ot(pt,'there is a previously declared suffix for "'+Nt+'" tag handle');if(!Y.test(St))ot(pt,"ill-formed tag prefix (second argument) of the TAG directive");try{St=decodeURIComponent(St)}catch(Z){ot(pt,"tag prefix is malformed: "+St)}pt.tagMap[Nt]=St},"handleTagDirective")};function xe(D,pt,_t,Mt){if(pt<_t){let St=D.input.slice(pt,_t);if(Mt)for(let Nt=0,Z=St.length;Nt<Z;Nt+=1){let xt=St.charCodeAt(Nt);if(!(xt===9||xt>=32&&xt<=1114111))ot(D,"expected valid JSON character")}else if(v.test(St))ot(D,"the stream contains non-printable characters");D.result+=St}}t(xe,"captureSegment");function Wt(D,pt,_t,Mt){if(!r.isObject(_t))ot(D,"cannot merge mappings; the provided source object is unacceptable");let St=Object.keys(_t);for(let Nt=0,Z=St.length;Nt<Z;Nt+=1){let xt=St[Nt];if(D.maxTotalMergeKeys!==-1&&++D.totalMergeKeys>D.maxTotalMergeKeys)ot(D,"merge keys exceeded maxTotalMergeKeys ("+D.maxTotalMergeKeys+")");if(!o.call(pt,xt))kt(pt,xt,_t[xt]),Mt[xt]=!0}}t(Wt,"mergeMappings");function re(D,pt,_t,Mt,St,Nt,Z,xt,Dt){if(Array.isArray(St)){St=Array.prototype.slice.call(St);for(let Ft=0,Ot=St.length;Ft<Ot;Ft+=1){if(Array.isArray(St[Ft]))ot(D,"nested arrays are not supported inside keys");if(typeof St==="object"&&j(St[Ft])==="[object Object]")St[Ft]="[object Object]"}}if(typeof St==="object"&&j(St)==="[object Object]")St="[object Object]";if(St=String(St),pt===null)pt={};if(Mt==="tag:yaml.org,2002:merge")if(Array.isArray(Nt))for(let Ft=0,Ot=Nt.length;Ft<Ot;Ft+=1)Wt(D,pt,Nt[Ft],_t);else Wt(D,pt,Nt,_t);else{if(!D.json&&!o.call(_t,St)&&o.call(pt,St))D.line=Z||D.line,D.lineStart=xt||D.lineStart,D.position=Dt||D.position,ot(D,"duplicated mapping key");kt(pt,St,Nt),delete _t[St]}return pt}t(re,"storeMappingPair");function ce(D){let pt=D.input.charCodeAt(D.position);if(pt===10)D.position++;else if(pt===13){if(D.position++,D.input.charCodeAt(D.position)===10)D.position++}else ot(D,"a line break is expected");D.line+=1,D.lineStart=D.position,D.firstTabInLine=-1}t(ce,"readLineBreak");function ue(D,pt,_t){let Mt=0,St=D.input.charCodeAt(D.position);while(St!==0){while(Q(St)){if(St===9&&D.firstTabInLine===-1)D.firstTabInLine=D.position;St=D.input.charCodeAt(++D.position)}if(pt&&St===35)do St=D.input.charCodeAt(++D.position);while(St!==10&&St!==13&&St!==0);if(X(St)){ce(D),St=D.input.charCodeAt(D.position),Mt++,D.lineIndent=0;while(St===32)D.lineIndent++,St=D.input.charCodeAt(++D.position)}else break}if(_t!==-1&&Mt!==0&&D.lineIndent<_t)wt(D,"deficient indentation");return Mt}t(ue,"skipSeparationSpace");function Ke(D){let pt=D.position,_t=D.input.charCodeAt(pt);if((_t===45||_t===46)&&_t===D.input.charCodeAt(pt+1)&&_t===D.input.charCodeAt(pt+2)){if(pt+=3,_t=D.input.charCodeAt(pt),_t===0||rt(_t))return!0}return!1}t(Ke,"testDocumentSeparator");function Xe(D,pt){if(pt===1)D.result+=" ";else if(pt>1)D.result+=r.repeat(`
138
- `,pt-1)}t(Xe,"writeFoldedLines");function xi(D,pt,_t){let Mt,St,Nt,Z,xt,Dt,{kind:Ft,result:Ot}=D,qt=D.input.charCodeAt(D.position);if(rt(qt)||it(qt)||qt===35||qt===38||qt===42||qt===33||qt===124||qt===62||qt===39||qt===34||qt===37||qt===64||qt===96)return!1;if(qt===63||qt===45){let Pt=D.input.charCodeAt(D.position+1);if(rt(Pt)||_t&&it(Pt))return!1}D.kind="scalar",D.result="",Mt=St=D.position,Nt=!1;while(qt!==0){if(qt===58){let Pt=D.input.charCodeAt(D.position+1);if(rt(Pt)||_t&&it(Pt))break}else if(qt===35){let Pt=D.input.charCodeAt(D.position-1);if(rt(Pt))break}else if(D.position===D.lineStart&&Ke(D)||_t&&it(qt))break;else if(X(qt))if(Z=D.line,xt=D.lineStart,Dt=D.lineIndent,ue(D,!1,-1),D.lineIndent>=pt){Nt=!0,qt=D.input.charCodeAt(D.position);continue}else{D.position=St,D.line=Z,D.lineStart=xt,D.lineIndent=Dt;break}if(Nt)xe(D,Mt,St,!1),Xe(D,D.line-Z),Mt=St=D.position,Nt=!1;if(!Q(qt))St=D.position+1;qt=D.input.charCodeAt(++D.position)}if(xe(D,Mt,St,!1),D.result)return!0;return D.kind=Ft,D.result=Ot,!1}t(xi,"readPlainScalar");function io(D,pt){let _t,Mt,St=D.input.charCodeAt(D.position);if(St!==39)return!1;D.kind="scalar",D.result="",D.position++,_t=Mt=D.position;while((St=D.input.charCodeAt(D.position))!==0)if(St===39)if(xe(D,_t,D.position,!0),St=D.input.charCodeAt(++D.position),St===39)_t=D.position,D.position++,Mt=D.position;else return!0;else if(X(St))xe(D,_t,Mt,!0),Xe(D,ue(D,!1,pt)),_t=Mt=D.position;else if(D.position===D.lineStart&&Ke(D))ot(D,"unexpected end of the document within a single quoted scalar");else if(D.position++,!Q(St))Mt=D.position;ot(D,"unexpected end of the stream within a single quoted scalar")}t(io,"readSingleQuotedScalar");function di(D,pt){let _t,Mt,St,Nt=D.input.charCodeAt(D.position);if(Nt!==34)return!1;D.kind="scalar",D.result="",D.position++,_t=Mt=D.position;while((Nt=D.input.charCodeAt(D.position))!==0)if(Nt===34)return xe(D,_t,D.position,!0),D.position++,!0;else if(Nt===92){if(xe(D,_t,D.position,!0),Nt=D.input.charCodeAt(++D.position),X(Nt))ue(D,!1,pt);else if(Nt<256&&bt[Nt])D.result+=st[Nt],D.position++;else if((St=lt(Nt))>0){let Z=St,xt=0;for(;Z>0;Z--)if(Nt=D.input.charCodeAt(++D.position),(St=ct(Nt))>=0)xt=(xt<<4)+St;else ot(D,"expected hexadecimal character");D.result+=Bt(xt),D.position++}else ot(D,"unknown escape sequence");_t=Mt=D.position}else if(X(Nt))xe(D,_t,Mt,!0),Xe(D,ue(D,!1,pt)),_t=Mt=D.position;else if(D.position===D.lineStart&&Ke(D))ot(D,"unexpected end of the document within a double quoted scalar");else if(D.position++,!Q(Nt))Mt=D.position;ot(D,"unexpected end of the stream within a double quoted scalar")}t(di,"readDoubleQuotedScalar");function Do(D,pt){let _t=!0,Mt,St,Nt,Z=D.tag,xt,Dt=D.anchor,Ft,Ot,qt,Pt,Vt=Object.create(null),Xt,Zt,ee,ve=D.input.charCodeAt(D.position);if(ve===91)Ft=93,Pt=!1,xt=[];else if(ve===123)Ft=125,Pt=!0,xt={};else return!1;if(D.anchor!==null)Lt(D,D.anchor,xt);ve=D.input.charCodeAt(++D.position);while(ve!==0){if(ue(D,!0,pt),ve=D.input.charCodeAt(D.position),ve===Ft)return D.position++,D.tag=Z,D.anchor=Dt,D.kind=Pt?"mapping":"sequence",D.result=xt,!0;else if(!_t)ot(D,"missed comma between flow collection entries");else if(ve===44)ot(D,"expected the node content, but found ','");if(Zt=Xt=ee=null,Ot=qt=!1,ve===63){let Ge=D.input.charCodeAt(D.position+1);if(rt(Ge))Ot=qt=!0,D.position++,ue(D,!0,pt)}if(Mt=D.line,St=D.lineStart,Nt=D.position,sr(D,pt,n,!1,!0),Zt=D.tag,Xt=D.result,ue(D,!0,pt),ve=D.input.charCodeAt(D.position),(qt||D.line===Mt)&&ve===58)Ot=!0,ve=D.input.charCodeAt(++D.position),ue(D,!0,pt),sr(D,pt,n,!1,!0),ee=D.result;if(Pt)re(D,xt,Vt,Zt,Xt,ee,Mt,St,Nt);else if(Ot)xt.push(re(D,null,Vt,Zt,Xt,ee,Mt,St,Nt));else xt.push(Xt);if(ue(D,!0,pt),ve=D.input.charCodeAt(D.position),ve===44)_t=!0,ve=D.input.charCodeAt(++D.position);else _t=!1}ot(D,"unexpected end of the stream within a flow collection")}t(Do,"readFlowCollection");function je(D,pt){let _t,Mt=y,St=!1,Nt=!1,Z=pt,xt=0,Dt=!1,Ft,Ot=D.input.charCodeAt(D.position);if(Ot===124)_t=!1;else if(Ot===62)_t=!0;else return!1;D.kind="scalar",D.result="";while(Ot!==0)if(Ot=D.input.charCodeAt(++D.position),Ot===43||Ot===45)if(y===Mt)Mt=Ot===43?B:f;else ot(D,"repeat of a chomping mode identifier");else if((Ft=dt(Ot))>=0)if(Ft===0)ot(D,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!Nt)Z=pt+Ft-1,Nt=!0;else ot(D,"repeat of an indentation width identifier");else break;if(Q(Ot)){do Ot=D.input.charCodeAt(++D.position);while(Q(Ot));if(Ot===35)do Ot=D.input.charCodeAt(++D.position);while(!X(Ot)&&Ot!==0)}while(Ot!==0){ce(D),D.lineIndent=0,Ot=D.input.charCodeAt(D.position);while((!Nt||D.lineIndent<Z)&&Ot===32)D.lineIndent++,Ot=D.input.charCodeAt(++D.position);if(!Nt&&D.lineIndent>Z)Z=D.lineIndent;if(X(Ot)){xt++;continue}if(!Nt&&Z===0)ot(D,"missing indentation for block scalar");if(D.lineIndent<Z){if(Mt===B)D.result+=r.repeat(`
139
- `,St?1+xt:xt);else if(Mt===y){if(St)D.result+=`
140
- `}break}if(_t)if(Q(Ot))Dt=!0,D.result+=r.repeat(`
141
- `,St?1+xt:xt);else if(Dt)Dt=!1,D.result+=r.repeat(`
142
- `,xt+1);else if(xt===0){if(St)D.result+=" "}else D.result+=r.repeat(`
143
- `,xt);else D.result+=r.repeat(`
144
- `,St?1+xt:xt);St=!0,Nt=!0,xt=0;let qt=D.position;while(!X(Ot)&&Ot!==0)Ot=D.input.charCodeAt(++D.position);xe(D,qt,D.position,!1)}return!0}t(je,"readBlockScalar");function $r(D,pt){let{tag:_t,anchor:Mt}=D,St=[],Nt=!1;if(D.firstTabInLine!==-1)return!1;if(D.anchor!==null)Lt(D,D.anchor,St);let Z=D.input.charCodeAt(D.position);while(Z!==0){if(D.firstTabInLine!==-1)D.position=D.firstTabInLine,ot(D,"tab characters must not be used in indentation");if(Z!==45)break;let xt=D.input.charCodeAt(D.position+1);if(!rt(xt))break;if(Nt=!0,D.position++,ue(D,!0,-1)){if(D.lineIndent<=pt){St.push(null),Z=D.input.charCodeAt(D.position);continue}}let Dt=D.line;if(sr(D,pt,h,!1,!0),St.push(D.result),ue(D,!0,-1),Z=D.input.charCodeAt(D.position),(D.line===Dt||D.lineIndent>pt)&&Z!==0)ot(D,"bad indentation of a sequence entry");else if(D.lineIndent<pt)break}if(Nt)return D.tag=_t,D.anchor=Mt,D.kind="sequence",D.result=St,!0;return!1}t($r,"readBlockSequence");function Pe(D,pt,_t){let Mt,St,Nt,Z,{tag:xt,anchor:Dt}=D,Ft={},Ot=Object.create(null),qt=null,Pt=null,Vt=null,Xt=!1,Zt=!1;if(D.firstTabInLine!==-1)return!1;if(D.anchor!==null)Lt(D,D.anchor,Ft);let ee=D.input.charCodeAt(D.position);while(ee!==0){if(!Xt&&D.firstTabInLine!==-1)D.position=D.firstTabInLine,ot(D,"tab characters must not be used in indentation");let ve=D.input.charCodeAt(D.position+1),Ge=D.line;if((ee===63||ee===58)&&rt(ve)){if(ee===63){if(Xt)re(D,Ft,Ot,qt,Pt,null,St,Nt,Z),qt=Pt=Vt=null;Zt=!0,Xt=!0,Mt=!0}else if(Xt)Xt=!1,Mt=!0;else ot(D,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");D.position+=1,ee=ve}else{if(St=D.line,Nt=D.lineStart,Z=D.position,!sr(D,_t,c,!1,!0))break;if(D.line===Ge){ee=D.input.charCodeAt(D.position);while(Q(ee))ee=D.input.charCodeAt(++D.position);if(ee===58){if(ee=D.input.charCodeAt(++D.position),!rt(ee))ot(D,"a whitespace character is expected after the key-value separator within a block mapping");if(Xt)re(D,Ft,Ot,qt,Pt,null,St,Nt,Z),qt=Pt=Vt=null;Zt=!0,Xt=!1,Mt=!1,qt=D.tag,Pt=D.result}else if(Zt)ot(D,"can not read an implicit mapping pair; a colon is missed");else return D.tag=xt,D.anchor=Dt,!0}else if(Zt)ot(D,"can not read a block mapping entry; a multiline key may not be an implicit key");else return D.tag=xt,D.anchor=Dt,!0}if(D.line===Ge||D.lineIndent>pt){if(Xt)St=D.line,Nt=D.lineStart,Z=D.position;if(sr(D,pt,g,!0,Mt))if(Xt)Pt=D.result;else Vt=D.result;if(!Xt)re(D,Ft,Ot,qt,Pt,Vt,St,Nt,Z),qt=Pt=Vt=null;ue(D,!0,-1),ee=D.input.charCodeAt(D.position)}if((D.line===Ge||D.lineIndent>pt)&&ee!==0)ot(D,"bad indentation of a mapping entry");else if(D.lineIndent<pt)break}if(Xt)re(D,Ft,Ot,qt,Pt,null,St,Nt,Z);if(Zt)D.tag=xt,D.anchor=Dt,D.kind="mapping",D.result=Ft;return Zt}t(Pe,"readBlockMapping");function oo(D){let pt=!1,_t=!1,Mt,St,Nt=D.input.charCodeAt(D.position);if(Nt!==33)return!1;if(D.tag!==null)ot(D,"duplication of a tag property");if(Nt=D.input.charCodeAt(++D.position),Nt===60)pt=!0,Nt=D.input.charCodeAt(++D.position);else if(Nt===33)_t=!0,Mt="!!",Nt=D.input.charCodeAt(++D.position);else Mt="!";let Z=D.position;if(pt){do Nt=D.input.charCodeAt(++D.position);while(Nt!==0&&Nt!==62);if(D.position<D.length)St=D.input.slice(Z,D.position),Nt=D.input.charCodeAt(++D.position);else ot(D,"unexpected end of the stream within a verbatim tag")}else{while(Nt!==0&&!rt(Nt)){if(Nt===33)if(!_t){if(Mt=D.input.slice(Z-1,D.position+1),!H.test(Mt))ot(D,"named tag handle cannot contain such characters");_t=!0,Z=D.position+1}else ot(D,"tag suffix cannot contain exclamation marks");Nt=D.input.charCodeAt(++D.position)}if(St=D.input.slice(Z,D.position),W.test(St))ot(D,"tag suffix cannot contain flow indicator characters")}if(St&&!Y.test(St))ot(D,"tag name cannot contain such characters: "+St);try{St=decodeURIComponent(St)}catch(xt){ot(D,"tag name is malformed: "+St)}if(pt)D.tag=St;else if(o.call(D.tagMap,Mt))D.tag=D.tagMap[Mt]+St;else if(Mt==="!")D.tag="!"+St;else if(Mt==="!!")D.tag="tag:yaml.org,2002:"+St;else ot(D,'undeclared tag handle "'+Mt+'"');return!0}t(oo,"readTagProperty");function ur(D){let pt=D.input.charCodeAt(D.position);if(pt!==38)return!1;if(D.anchor!==null)ot(D,"duplication of an anchor property");pt=D.input.charCodeAt(++D.position);let _t=D.position;while(pt!==0&&!rt(pt)&&!it(pt))pt=D.input.charCodeAt(++D.position);if(D.position===_t)ot(D,"name of an anchor node must contain at least one character");return D.anchor=D.input.slice(_t,D.position),!0}t(ur,"readAnchorProperty");function pi(D){let pt=D.input.charCodeAt(D.position);if(pt!==42)return!1;pt=D.input.charCodeAt(++D.position);let _t=D.position;while(pt!==0&&!rt(pt)&&!it(pt))pt=D.input.charCodeAt(++D.position);if(D.position===_t)ot(D,"name of an alias node must contain at least one character");let Mt=D.input.slice(_t,D.position);if(!o.call(D.anchorMap,Mt))ot(D,'unidentified alias "'+Mt+'"');return D.result=D.anchorMap[Mt],ue(D,!0,-1),!0}t(pi,"readAlias");function Po(D,pt,_t,Mt){let St=ne(D);if(Yt(D),_e(D,pt),D.tag=null,D.anchor=null,D.kind=null,D.result=null,Pe(D,_t,Mt)&&D.kind==="mapping")return Ht(D),!0;return he(D),_e(D,St),!1}t(Po,"tryReadBlockMappingFromProperty");function sr(D,pt,_t,Mt,St){let Nt,Z,xt=1,Dt=!1,Ft=!1,Ot=null,qt,Pt,Vt;if(D.depth>=D.maxDepth)ot(D,"nesting exceeded maxDepth ("+D.maxDepth+")");if(D.depth+=1,D.listener!==null)D.listener("open",D);D.tag=null,D.anchor=null,D.kind=null,D.result=null;let Xt=Nt=Z=g===_t||h===_t;if(Mt){if(ue(D,!0,-1)){if(Dt=!0,D.lineIndent>pt)xt=1;else if(D.lineIndent===pt)xt=0;else if(D.lineIndent<pt)xt=-1}}if(xt===1)while(!0){let Zt=D.input.charCodeAt(D.position),ee=ne(D);if(Dt&&(Zt===33&&D.tag!==null||Zt===38&&D.anchor!==null))break;if(!oo(D)&&!ur(D))break;if(Ot===null)Ot=ee;if(ue(D,!0,-1)){if(Dt=!0,Z=Xt,D.lineIndent>pt)xt=1;else if(D.lineIndent===pt)xt=0;else if(D.lineIndent<pt)xt=-1}else Z=!1}if(Z)Z=Dt||St;if(xt===1||g===_t){if(n===_t||c===_t)Pt=pt;else Pt=pt+1;if(Vt=D.position-D.lineStart,xt===1)if(Z&&($r(D,Vt)||Pe(D,Vt,Pt))||Do(D,Pt))Ft=!0;else{let Zt=D.input.charCodeAt(D.position);if(Ot!==null&&Xt&&!Z&&Zt!==124&&Zt!==62&&Po(D,Ot,Ot.position-Ot.lineStart,Pt))Ft=!0;else if(Nt&&je(D,Pt)||io(D,Pt)||di(D,Pt))Ft=!0;else if(pi(D)){if(Ft=!0,D.tag!==null||D.anchor!==null)ot(D,"alias node should not have any properties")}else if(xi(D,Pt,n===_t)){if(Ft=!0,D.tag===null)D.tag="?"}if(D.anchor!==null)Lt(D,D.anchor,D.result)}else if(xt===0)Ft=Z&&$r(D,Vt)}if(D.tag===null){if(D.anchor!==null)Lt(D,D.anchor,D.result)}else if(D.tag==="?"){if(D.result!==null&&D.kind!=="scalar")ot(D,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+D.kind+'"');for(let Zt=0,ee=D.implicitTypes.length;Zt<ee;Zt+=1)if(qt=D.implicitTypes[Zt],qt.resolve(D.result)){if(D.result=qt.construct(D.result),D.tag=qt.tag,D.anchor!==null)Lt(D,D.anchor,D.result);break}}else if(D.tag!=="!"){if(o.call(D.typeMap[D.kind||"fallback"],D.tag))qt=D.typeMap[D.kind||"fallback"][D.tag];else{qt=null;let Zt=D.typeMap.multi[D.kind||"fallback"];for(let ee=0,ve=Zt.length;ee<ve;ee+=1)if(D.tag.slice(0,Zt[ee].tag.length)===Zt[ee].tag){qt=Zt[ee];break}}if(!qt)ot(D,"unknown tag !<"+D.tag+">");if(D.result!==null&&qt.kind!==D.kind)ot(D,"unacceptable node kind for !<"+D.tag+'> tag; it should be "'+qt.kind+'", not "'+D.kind+'"');if(!qt.resolve(D.result,D.tag))ot(D,"cannot resolve a node with !<"+D.tag+"> explicit tag");else if(D.result=qt.construct(D.result,D.tag),D.anchor!==null)Lt(D,D.anchor,D.result)}if(D.listener!==null)D.listener("close",D);return D.depth-=1,D.tag!==null||D.anchor!==null||Ft}t(sr,"composeNode");function Ro(D){let pt=D.position,_t=!1,Mt;D.version=null,D.checkLineBreaks=D.legacy,D.tagMap=Object.create(null),D.anchorMap=Object.create(null);while((Mt=D.input.charCodeAt(D.position))!==0){if(ue(D,!0,-1),Mt=D.input.charCodeAt(D.position),D.lineIndent>0||Mt!==37)break;_t=!0,Mt=D.input.charCodeAt(++D.position);let St=D.position;while(Mt!==0&&!rt(Mt))Mt=D.input.charCodeAt(++D.position);let Nt=D.input.slice(St,D.position),Z=[];if(Nt.length<1)ot(D,"directive name must not be less than one character in length");while(Mt!==0){while(Q(Mt))Mt=D.input.charCodeAt(++D.position);if(Mt===35){do Mt=D.input.charCodeAt(++D.position);while(Mt!==0&&!X(Mt));break}if(X(Mt))break;St=D.position;while(Mt!==0&&!rt(Mt))Mt=D.input.charCodeAt(++D.position);Z.push(D.input.slice(St,D.position))}if(Mt!==0)ce(D);if(o.call(Ae,Nt))Ae[Nt](D,Nt,Z);else wt(D,'unknown document directive "'+Nt+'"')}if(ue(D,!0,-1),D.lineIndent===0&&D.input.charCodeAt(D.position)===45&&D.input.charCodeAt(D.position+1)===45&&D.input.charCodeAt(D.position+2)===45)D.position+=3,ue(D,!0,-1);else if(_t)ot(D,"directives end mark is expected");if(sr(D,D.lineIndent-1,g,!1,!0),ue(D,!0,-1),D.checkLineBreaks&&q.test(D.input.slice(pt,D.position)))wt(D,"non-ASCII line breaks are interpreted as content");if(D.documents.push(D.result),D.position===D.lineStart&&Ke(D)){if(D.input.charCodeAt(D.position)===46)D.position+=3,ue(D,!0,-1);return}if(D.position<D.length-1)ot(D,"end of the stream or a document separator is expected")}t(Ro,"readDocument");function _i(D,pt){if(D=String(D),pt=pt||{},D.length!==0){if(D.charCodeAt(D.length-1)!==10&&D.charCodeAt(D.length-1)!==13)D+=`
145
- `;if(D.charCodeAt(0)===65279)D=D.slice(1)}let _t=new at(D,pt),Mt=D.indexOf("\x00");if(Mt!==-1)_t.position=Mt,ot(_t,"null byte is not allowed in input");_t.input+="\x00";while(_t.input.charCodeAt(_t.position)===32)_t.lineIndent+=1,_t.position+=1;while(_t.position<_t.length-1)Ro(_t);return _t.documents}t(_i,"loadDocuments");function so(D,pt,_t){if(pt!==null&&typeof pt==="object"&&typeof _t>"u")_t=pt,pt=null;let Mt=_i(D,_t);if(typeof pt!=="function")return Mt;for(let St=0,Nt=Mt.length;St<Nt;St+=1)pt(Mt[St])}t(so,"loadAll2");function ao(D,pt){let _t=_i(D,pt);if(_t.length===0)return;else if(_t.length===1)return _t[0];throw new e("expected a single document in the stream, but found more")}return t(ao,"load2"),Ol.loadAll=so,Ol.load=ao,Ol}t(Yg,"requireLoader");var qu={},Ng;function Ug(){if(Ng)return qu;Ng=1;let r=Fs(),e=As(),i=Il(),s=Object.prototype.toString,o=Object.prototype.hasOwnProperty,n=65279,c=9,h=10,g=13,y=32,f=33,B=34,v=35,q=37,W=38,H=39,Y=42,j=44,X=45,Q=58,rt=61,it=62,ct=63,lt=64,dt=91,Ct=93,Bt=96,kt=123,bt=124,st=125,at={};at[0]="\\0",at[7]="\\a",at[8]="\\b",at[9]="\\t",at[10]="\\n",at[11]="\\v",at[12]="\\f",at[13]="\\r",at[27]="\\e",at[34]="\\\"",at[92]="\\\\",at[133]="\\N",at[160]="\\_",at[8232]="\\L",at[8233]="\\P";let mt=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],ot=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function wt(Z,xt){if(xt===null)return{};let Dt={},Ft=Object.keys(xt);for(let Ot=0,qt=Ft.length;Ot<qt;Ot+=1){let Pt=Ft[Ot],Vt=String(xt[Pt]);if(Pt.slice(0,2)==="!!")Pt="tag:yaml.org,2002:"+Pt.slice(2);let Xt=Z.compiledTypeMap.fallback[Pt];if(Xt&&o.call(Xt.styleAliases,Vt))Vt=Xt.styleAliases[Vt];Dt[Pt]=Vt}return Dt}t(wt,"compileStyleMap");function Lt(Z){let xt,Dt,Ft=Z.toString(16).toUpperCase();if(Z<=255)xt="x",Dt=2;else if(Z<=65535)xt="u",Dt=4;else if(Z<=4294967295)xt="U",Dt=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+xt+r.repeat("0",Dt-Ft.length)+Ft}t(Lt,"encodeHex");let Yt=1,Ht=2;function he(Z){this.schema=Z.schema||i,this.indent=Math.max(1,Z.indent||2),this.noArrayIndent=Z.noArrayIndent||!1,this.skipInvalid=Z.skipInvalid||!1,this.flowLevel=r.isNothing(Z.flowLevel)?-1:Z.flowLevel,this.styleMap=wt(this.schema,Z.styles||null),this.sortKeys=Z.sortKeys||!1,this.lineWidth=Z.lineWidth||80,this.noRefs=Z.noRefs||!1,this.noCompatMode=Z.noCompatMode||!1,this.condenseFlow=Z.condenseFlow||!1,this.quotingType=Z.quotingType==='"'?Ht:Yt,this.forceQuotes=Z.forceQuotes||!1,this.replacer=typeof Z.replacer==="function"?Z.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}t(he,"State");function ne(Z,xt){let Dt=r.repeat(" ",xt),Ft=0,Ot="",qt=Z.length;while(Ft<qt){let Pt,Vt=Z.indexOf(`
146
- `,Ft);if(Vt===-1)Pt=Z.slice(Ft),Ft=qt;else Pt=Z.slice(Ft,Vt+1),Ft=Vt+1;if(Pt.length&&Pt!==`
147
- `)Ot+=Dt;Ot+=Pt}return Ot}t(ne,"indentString");function _e(Z,xt){return`
148
- `+r.repeat(" ",Z.indent*xt)}t(_e,"generateNextLine");function Ae(Z,xt){for(let Dt=0,Ft=Z.implicitTypes.length;Dt<Ft;Dt+=1)if(Z.implicitTypes[Dt].resolve(xt))return!0;return!1}t(Ae,"testImplicitResolving");function xe(Z){return Z===y||Z===c}t(xe,"isWhitespace");function Wt(Z){return Z>=32&&Z<=126||Z>=161&&Z<=55295&&Z!==8232&&Z!==8233||Z>=57344&&Z<=65533&&Z!==n||Z>=65536&&Z<=1114111}t(Wt,"isPrintable");function re(Z){return Wt(Z)&&Z!==n&&Z!==g&&Z!==h}t(re,"isNsCharOrWhitespace");function ce(Z,xt,Dt){let Ft=re(Z),Ot=Ft&&!xe(Z);return(Dt?Ft:Ft&&Z!==j&&Z!==dt&&Z!==Ct&&Z!==kt&&Z!==st)&&Z!==v&&!(xt===Q&&!Ot)||re(xt)&&!xe(xt)&&Z===v||xt===Q&&Ot}t(ce,"isPlainSafe");function ue(Z){return Wt(Z)&&Z!==n&&!xe(Z)&&Z!==X&&Z!==ct&&Z!==Q&&Z!==j&&Z!==dt&&Z!==Ct&&Z!==kt&&Z!==st&&Z!==v&&Z!==W&&Z!==Y&&Z!==f&&Z!==bt&&Z!==rt&&Z!==it&&Z!==H&&Z!==B&&Z!==q&&Z!==lt&&Z!==Bt}t(ue,"isPlainSafeFirst");function Ke(Z){return!xe(Z)&&Z!==Q}t(Ke,"isPlainSafeLast");function Xe(Z,xt){let Dt=Z.charCodeAt(xt),Ft;if(Dt>=55296&&Dt<=56319&&xt+1<Z.length){if(Ft=Z.charCodeAt(xt+1),Ft>=56320&&Ft<=57343)return(Dt-55296)*1024+Ft-56320+65536}return Dt}t(Xe,"codePointAt");function xi(Z){return/^\n* /.test(Z)}t(xi,"needIndentIndicator");let io=1,di=2,Do=3,je=4,$r=5;function Pe(Z,xt,Dt,Ft,Ot,qt,Pt,Vt){let Xt,Zt=0,ee=null,ve=!1,Ge=!1,Ws=Ft!==-1,qo=-1,No=ue(Xe(Z,0))&&Ke(Xe(Z,Z.length-1));if(xt||Pt)for(Xt=0;Xt<Z.length;Zt>=65536?Xt+=2:Xt++){if(Zt=Xe(Z,Xt),!Wt(Zt))return $r;No=No&&ce(Zt,ee,Vt),ee=Zt}else{for(Xt=0;Xt<Z.length;Zt>=65536?Xt+=2:Xt++){if(Zt=Xe(Z,Xt),Zt===h){if(ve=!0,Ws)Ge=Ge||Xt-qo-1>Ft&&Z[qo+1]!==" ",qo=Xt}else if(!Wt(Zt))return $r;No=No&&ce(Zt,ee,Vt),ee=Zt}Ge=Ge||Ws&&(Xt-qo-1>Ft&&Z[qo+1]!==" ")}if(!ve&&!Ge){if(No&&!Pt&&!Ot(Z))return io;return qt===Ht?$r:di}if(Dt>9&&xi(Z))return $r;if(!Pt)return Ge?je:Do;return qt===Ht?$r:di}t(Pe,"chooseScalarStyle");function oo(Z,xt,Dt,Ft,Ot){Z.dump=function(){if(xt.length===0)return Z.quotingType===Ht?'""':"''";if(!Z.noCompatMode){if(mt.indexOf(xt)!==-1||ot.test(xt))return Z.quotingType===Ht?'"'+xt+'"':"'"+xt+"'"}let qt=Z.indent*Math.max(1,Dt),Pt=Z.lineWidth===-1?-1:Math.max(Math.min(Z.lineWidth,40),Z.lineWidth-qt),Vt=Ft||Z.flowLevel>-1&&Dt>=Z.flowLevel;function Xt(Zt){return Ae(Z,Zt)}switch(t(Xt,"testAmbiguity"),Pe(xt,Vt,Z.indent,Pt,Xt,Z.quotingType,Z.forceQuotes&&!Ft,Ot)){case io:return xt;case di:return"'"+xt.replace(/'/g,"''")+"'";case Do:return"|"+ur(xt,Z.indent)+pi(ne(xt,qt));case je:return">"+ur(xt,Z.indent)+pi(ne(Po(xt,Pt),qt));case $r:return'"'+Ro(xt)+'"';default:throw new e("impossible error: invalid scalar style")}}()}t(oo,"writeScalar");function ur(Z,xt){let Dt=xi(Z)?String(xt):"",Ft=Z[Z.length-1]===`
149
- `,qt=Ft&&(Z[Z.length-2]===`
135
+ `}return B.replace(/\n$/,"")}return t(s,"makeSnippet"),Cu=s,Cu}t(Hg,"requireSnippet");var bu,bg;function Mr(){if(bg)return bu;bg=1;let r=Ms(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function s(n){let c={};if(n!==null)Object.keys(n).forEach(function(h){n[h].forEach(function(g){c[String(g)]=h})});return c}t(s,"compileStyleAliases");function o(n,c){if(c=c||{},Object.keys(c).forEach(function(h){if(e.indexOf(h)===-1)throw new r('Unknown option "'+h+'" is met in definition of "'+n+'" YAML type.')}),this.options=c,this.tag=n,this.kind=c.kind||null,this.resolve=c.resolve||function(){return!0},this.construct=c.construct||function(h){return h},this.instanceOf=c.instanceOf||null,this.predicate=c.predicate||null,this.represent=c.represent||null,this.representName=c.representName||null,this.defaultStyle=c.defaultStyle||null,this.multi=c.multi||!1,this.styleAliases=s(c.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+n+'" YAML type.')}return t(o,"Type2"),bu=o,bu}t(Mr,"requireType");var ku,kg;function Nu(){if(kg)return ku;kg=1;let r=Ms(),e=Mr();function i(n,c){let h=[];return n[c].forEach(function(g){let y=h.length;h.forEach(function(f,B){if(f.tag===g.tag&&f.kind===g.kind&&f.multi===g.multi)y=B}),h[y]=g}),h}t(i,"compileList");function s(){let n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function c(h){if(h.multi)n.multi[h.kind].push(h),n.multi.fallback.push(h);else n[h.kind][h.tag]=n.fallback[h.tag]=h}t(c,"collectType");for(let h=0,g=arguments.length;h<g;h+=1)arguments[h].forEach(c);return n}t(s,"compileMap");function o(n){return this.extend(n)}return t(o,"Schema2"),o.prototype.extend=t(function(c){let h=[],g=[];if(c instanceof e)g.push(c);else if(Array.isArray(c))g=g.concat(c);else if(c&&(Array.isArray(c.implicit)||Array.isArray(c.explicit))){if(c.implicit)h=h.concat(c.implicit);if(c.explicit)g=g.concat(c.explicit)}else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");h.forEach(function(f){if(!(f instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(f.loadKind&&f.loadKind!=="scalar")throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(f.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),g.forEach(function(f){if(!(f instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let y=Object.create(o.prototype);return y.implicit=(this.implicit||[]).concat(h),y.explicit=(this.explicit||[]).concat(g),y.compiledImplicit=i(y,"implicit"),y.compiledExplicit=i(y,"explicit"),y.compiledTypeMap=s(y.compiledImplicit,y.compiledExplicit),y},"extend"),ku=o,ku}t(Nu,"requireSchema");var wu,wg;function Wu(){if(wg)return wu;return wg=1,wu=new(Mr())("tag:yaml.org,2002:str",{kind:"scalar",construct:t(function(e){return e!==null?e:""},"construct")}),wu}t(Wu,"requireStr");var Su,Sg;function zu(){if(Sg)return Su;return Sg=1,Su=new(Mr())("tag:yaml.org,2002:seq",{kind:"sequence",construct:t(function(e){return e!==null?e:[]},"construct")}),Su}t(zu,"requireSeq");var Tu,Tg;function Hu(){if(Tg)return Tu;return Tg=1,Tu=new(Mr())("tag:yaml.org,2002:map",{kind:"mapping",construct:t(function(e){return e!==null?e:{}},"construct")}),Tu}t(Hu,"requireMap");var _u,_g;function Yu(){if(_g)return _u;return _g=1,_u=new(Nu())({explicit:[Wu(),zu(),Hu()]}),_u}t(Yu,"requireFailsafe");var Bu,Bg;function Uu(){if(Bg)return Bu;Bg=1;let r=Mr();function e(o){if(o===null)return!0;let n=o.length;return n===1&&o==="~"||n===4&&(o==="null"||o==="Null"||o==="NULL")}t(e,"resolveYamlNull");function i(){return null}t(i,"constructYamlNull");function s(o){return o===null}return t(s,"isNull"),Bu=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:i,predicate:s,represent:{canonical:t(function(){return"~"},"canonical"),lowercase:t(function(){return"null"},"lowercase"),uppercase:t(function(){return"NULL"},"uppercase"),camelcase:t(function(){return"Null"},"camelcase"),empty:t(function(){return""},"empty")},defaultStyle:"lowercase"}),Bu}t(Uu,"require_null");var vu,vg;function ju(){if(vg)return vu;vg=1;let r=Mr();function e(o){if(o===null)return!1;let n=o.length;return n===4&&(o==="true"||o==="True"||o==="TRUE")||n===5&&(o==="false"||o==="False"||o==="FALSE")}t(e,"resolveYamlBoolean");function i(o){return o==="true"||o==="True"||o==="TRUE"}t(i,"constructYamlBoolean");function s(o){return Object.prototype.toString.call(o)==="[object Boolean]"}return t(s,"isBoolean"),vu=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:i,predicate:s,represent:{lowercase:t(function(o){return o?"true":"false"},"lowercase"),uppercase:t(function(o){return o?"TRUE":"FALSE"},"uppercase"),camelcase:t(function(o){return o?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),vu}t(ju,"requireBool");var Lu,Lg;function Gu(){if(Lg)return Lu;Lg=1;let r=As(),e=Mr();function i(y){return y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102}t(i,"isHexCode");function s(y){return y>=48&&y<=55}t(s,"isOctCode");function o(y){return y>=48&&y<=57}t(o,"isDecCode");function n(y){if(y===null)return!1;let f=y.length,B=0,v=!1;if(!f)return!1;let q=y[B];if(q==="-"||q==="+")q=y[++B];if(q==="0"){if(B+1===f)return!0;if(q=y[++B],q==="b"){B++;for(;B<f;B++){if(q=y[B],q!=="0"&&q!=="1")return!1;v=!0}return v&&isFinite(c(y))}if(q==="x"){B++;for(;B<f;B++){if(!i(y.charCodeAt(B)))return!1;v=!0}return v&&isFinite(c(y))}if(q==="o"){B++;for(;B<f;B++){if(!s(y.charCodeAt(B)))return!1;v=!0}return v&&isFinite(c(y))}}for(;B<f;B++){if(!o(y.charCodeAt(B)))return!1;v=!0}if(!v)return!1;return isFinite(c(y))}t(n,"resolveYamlInteger");function c(y){let f=y,B=1,v=f[0];if(v==="-"||v==="+"){if(v==="-")B=-1;f=f.slice(1),v=f[0]}if(f==="0")return 0;if(v==="0"){if(f[1]==="b")return B*parseInt(f.slice(2),2);if(f[1]==="x")return B*parseInt(f.slice(2),16);if(f[1]==="o")return B*parseInt(f.slice(2),8)}return B*parseInt(f,10)}t(c,"parseYamlInteger");function h(y){return c(y)}t(h,"constructYamlInteger");function g(y){return Object.prototype.toString.call(y)==="[object Number]"&&(y%1===0&&!r.isNegativeZero(y))}return t(g,"isInteger"),Lu=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:n,construct:h,predicate:g,represent:{binary:t(function(y){return y>=0?"0b"+y.toString(2):"-0b"+y.toString(2).slice(1)},"binary"),octal:t(function(y){return y>=0?"0o"+y.toString(8):"-0o"+y.toString(8).slice(1)},"octal"),decimal:t(function(y){return y.toString(10)},"decimal"),hexadecimal:t(function(y){return y>=0?"0x"+y.toString(16).toUpperCase():"-0x"+y.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Lu}t(Gu,"requireInt");var Fu,Fg;function Xu(){if(Fg)return Fu;Fg=1;let r=As(),e=Mr(),i=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),s=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function o(y){if(y===null)return!1;if(!i.test(y))return!1;if(isFinite(parseFloat(y,10)))return!0;return s.test(y)}t(o,"resolveYamlFloat");function n(y){let f=y.toLowerCase(),B=f[0]==="-"?-1:1;if("+-".indexOf(f[0])>=0)f=f.slice(1);if(f===".inf")return B===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(f===".nan")return NaN;return B*parseFloat(f,10)}t(n,"constructYamlFloat");let c=/^[-+]?[0-9]+e/;function h(y,f){if(isNaN(y))switch(f){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===y)switch(f){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===y)switch(f){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(y))return"-0.0";let B=y.toString(10);return c.test(B)?B.replace("e",".e"):B}t(h,"representYamlFloat");function g(y){return Object.prototype.toString.call(y)==="[object Number]"&&(y%1!==0||r.isNegativeZero(y))}return t(g,"isFloat"),Fu=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:n,predicate:g,represent:h,defaultStyle:"lowercase"}),Fu}t(Xu,"requireFloat");var Au,Ag;function Vu(){if(Ag)return Au;return Ag=1,Au=Yu().extend({implicit:[Uu(),ju(),Gu(),Xu()]}),Au}t(Vu,"requireJson");var Mu,Mg;function Ku(){if(Mg)return Mu;return Mg=1,Mu=Vu(),Mu}t(Ku,"requireCore");var Eu,Eg;function Zu(){if(Eg)return Eu;Eg=1;let r=Mr(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=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 s(c){if(c===null)return!1;if(e.exec(c)!==null)return!0;if(i.exec(c)!==null)return!0;return!1}t(s,"resolveYamlTimestamp");function o(c){let h=0,g=null,y=e.exec(c);if(y===null)y=i.exec(c);if(y===null)throw Error("Date resolve error");let f=+y[1],B=+y[2]-1,v=+y[3];if(!y[4])return new Date(Date.UTC(f,B,v));let q=+y[4],W=+y[5],H=+y[6];if(y[7]){h=y[7].slice(0,3);while(h.length<3)h+="0";h=+h}if(y[9]){let j=+y[10],X=+(y[11]||0);if(g=(j*60+X)*60000,y[9]==="-")g=-g}let Y=new Date(Date.UTC(f,B,v,q,W,H,h));if(g)Y.setTime(Y.getTime()-g);return Y}t(o,"constructYamlTimestamp");function n(c){return c.toISOString()}return t(n,"representYamlTimestamp"),Eu=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:s,construct:o,instanceOf:Date,represent:n}),Eu}t(Zu,"requireTimestamp");var Ou,Og;function Qu(){if(Og)return Ou;Og=1;let r=Mr();function e(i){return i==="<<"||i===null}return t(e,"resolveYamlMerge"),Ou=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),Ou}t(Qu,"requireMerge");var Iu,Ig;function Ju(){if(Ig)return Iu;Ig=1;let r=Mr(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
136
+ \r`;function i(c){if(c===null)return!1;let h=0,g=c.length,y=e;for(let f=0;f<g;f++){let B=y.indexOf(c.charAt(f));if(B>64)continue;if(B<0)return!1;h+=6}return h%8===0}t(i,"resolveYamlBinary");function s(c){let h=c.replace(/[\r\n=]/g,""),g=h.length,y=e,f=0,B=[];for(let q=0;q<g;q++){if(q%4===0&&q)B.push(f>>16&255),B.push(f>>8&255),B.push(f&255);f=f<<6|y.indexOf(h.charAt(q))}let v=g%4*6;if(v===0)B.push(f>>16&255),B.push(f>>8&255),B.push(f&255);else if(v===18)B.push(f>>10&255),B.push(f>>2&255);else if(v===12)B.push(f>>4&255);return new Uint8Array(B)}t(s,"constructYamlBinary");function o(c){let h="",g=0,y=c.length,f=e;for(let v=0;v<y;v++){if(v%3===0&&v)h+=f[g>>18&63],h+=f[g>>12&63],h+=f[g>>6&63],h+=f[g&63];g=(g<<8)+c[v]}let B=y%3;if(B===0)h+=f[g>>18&63],h+=f[g>>12&63],h+=f[g>>6&63],h+=f[g&63];else if(B===2)h+=f[g>>10&63],h+=f[g>>4&63],h+=f[g<<2&63],h+=f[64];else if(B===1)h+=f[g>>2&63],h+=f[g<<4&63],h+=f[64],h+=f[64];return h}t(o,"representYamlBinary");function n(c){return Object.prototype.toString.call(c)==="[object Uint8Array]"}return t(n,"isBinary"),Iu=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:s,predicate:n,represent:o}),Iu}t(Ju,"requireBinary");var $u,$g;function tf(){if($g)return $u;$g=1;let r=Mr(),e=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function s(n){if(n===null)return!0;let c=[],h=n;for(let g=0,y=h.length;g<y;g+=1){let f=h[g],B=!1;if(i.call(f)!=="[object Object]")return!1;let v;for(v in f)if(e.call(f,v))if(!B)B=!0;else return!1;if(!B)return!1;if(c.indexOf(v)===-1)c.push(v);else return!1}return!0}t(s,"resolveYamlOmap");function o(n){return n!==null?n:[]}return t(o,"constructYamlOmap"),$u=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:s,construct:o}),$u}t(tf,"requireOmap");var Du,Dg;function ef(){if(Dg)return Du;Dg=1;let r=Mr(),e=Object.prototype.toString;function i(o){if(o===null)return!0;let n=o,c=Array(n.length);for(let h=0,g=n.length;h<g;h+=1){let y=n[h];if(e.call(y)!=="[object Object]")return!1;let f=Object.keys(y);if(f.length!==1)return!1;c[h]=[f[0],y[f[0]]]}return!0}t(i,"resolveYamlPairs");function s(o){if(o===null)return[];let n=o,c=Array(n.length);for(let h=0,g=n.length;h<g;h+=1){let y=n[h],f=Object.keys(y);c[h]=[f[0],y[f[0]]]}return c}return t(s,"constructYamlPairs"),Du=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:s}),Du}t(ef,"requirePairs");var Pu,Pg;function rf(){if(Pg)return Pu;Pg=1;let r=Mr(),e=Object.prototype.hasOwnProperty;function i(o){if(o===null)return!0;let n=o;for(let c in n)if(e.call(n,c)){if(n[c]!==null)return!1}return!0}t(i,"resolveYamlSet");function s(o){return o!==null?o:{}}return t(s,"constructYamlSet"),Pu=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:s}),Pu}t(rf,"requireSet");var Ru,Rg;function Il(){if(Rg)return Ru;return Rg=1,Ru=Ku().extend({implicit:[Zu(),Qu()],explicit:[Ju(),tf(),ef(),rf()]}),Ru}t(Il,"require_default");var qg;function Yg(){if(qg)return Ol;qg=1;let r=As(),e=Ms(),i=Hg(),s=Il(),o=Object.prototype.hasOwnProperty,n=1,c=2,h=3,g=4,y=1,f=2,B=3,v=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,q=/[\x85\u2028\u2029]/,W=/[,\[\]{}]/,H=/^(?:!|!!|![0-9A-Za-z-]+!)$/,Y=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function j(D){return Object.prototype.toString.call(D)}t(j,"_class");function X(D){return D===10||D===13}t(X,"isEol");function Q(D){return D===9||D===32}t(Q,"isWhiteSpace");function et(D){return D===9||D===32||D===10||D===13}t(et,"isWsOrEol");function it(D){return D===44||D===91||D===93||D===123||D===125}t(it,"isFlowIndicator");function ht(D){if(D>=48&&D<=57)return D-48;let dt=D|32;if(dt>=97&&dt<=102)return dt-97+10;return-1}t(ht,"fromHexCode");function lt(D){if(D===120)return 2;if(D===117)return 4;if(D===85)return 8;return 0}t(lt,"escapedHexLen");function ft(D){if(D>=48&&D<=57)return D-48;return-1}t(ft,"fromDecimalCode");function xt(D){switch(D){case 48:return"\x00";case 97:return"\x07";case 98:return"\b";case 116:return"\t";case 9:return"\t";case 110:return`
137
+ `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}t(xt,"simpleEscapeSequence");function Lt(D){if(D<=65535)return String.fromCharCode(D);return String.fromCharCode((D-65536>>10)+55296,(D-65536&1023)+56320)}t(Lt,"charFromCodepoint");function kt(D,dt,Bt){if(dt==="__proto__")Object.defineProperty(D,dt,{configurable:!0,enumerable:!0,writable:!0,value:Bt});else D[dt]=Bt}t(kt,"setProperty");let Ct=Array(256),st=Array(256);for(let D=0;D<256;D++)Ct[D]=xt(D)?1:0,st[D]=xt(D);function at(D,dt){this.input=D,this.filename=dt.filename||null,this.schema=dt.schema||s,this.onWarning=dt.onWarning||null,this.legacy=dt.legacy||!1,this.json=dt.json||!1,this.listener=dt.listener||null,this.maxDepth=typeof dt.maxDepth==="number"?dt.maxDepth:100,this.maxTotalMergeKeys=typeof dt.maxTotalMergeKeys==="number"?dt.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=D.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}t(at,"State");function pt(D,dt){let Bt={name:D.filename,buffer:D.input.slice(0,-1),position:D.position,line:D.line,column:D.position-D.lineStart};return Bt.snippet=i(Bt),new e(dt,Bt)}t(pt,"generateError");function ot(D,dt){throw pt(D,dt)}t(ot,"throwError");function wt(D,dt){if(D.onWarning)D.onWarning.call(null,pt(D,dt))}t(wt,"throwWarning");function At(D,dt,Bt){let Ot=D.anchorMapTransactions;if(Ot.length!==0){let _t=Ot[Ot.length-1];if(!o.call(_t,dt))_t[dt]={existed:o.call(D.anchorMap,dt),value:D.anchorMap[dt]}}D.anchorMap[dt]=Bt}t(At,"storeAnchor");function jt(D){D.anchorMapTransactions.push(Object.create(null))}t(jt,"beginAnchorTransaction");function Yt(D){let dt=D.anchorMapTransactions.pop(),Bt=D.anchorMapTransactions;if(Bt.length===0)return;let Ot=Bt[Bt.length-1],_t=Object.keys(dt);for(let Wt=0,Z=_t.length;Wt<Z;Wt+=1){let mt=_t[Wt];if(!o.call(Ot,mt))Ot[mt]=dt[mt]}}t(Yt,"commitAnchorTransaction");function ue(D){let dt=D.anchorMapTransactions.pop(),Bt=Object.keys(dt);for(let Ot=Bt.length-1;Ot>=0;Ot-=1){let _t=dt[Bt[Ot]];if(_t.existed)D.anchorMap[Bt[Ot]]=_t.value;else delete D.anchorMap[Bt[Ot]]}}t(ue,"rollbackAnchorTransaction");function ce(D){return{position:D.position,line:D.line,lineStart:D.lineStart,lineIndent:D.lineIndent,firstTabInLine:D.firstTabInLine,tag:D.tag,anchor:D.anchor,kind:D.kind,result:D.result}}t(ce,"snapshotState");function Ae(D,dt){D.position=dt.position,D.line=dt.line,D.lineStart=dt.lineStart,D.lineIndent=dt.lineIndent,D.firstTabInLine=dt.firstTabInLine,D.tag=dt.tag,D.anchor=dt.anchor,D.kind=dt.kind,D.result=dt.result}t(Ae,"restoreState");let Oe={YAML:t(function(dt,Bt,Ot){if(dt.version!==null)ot(dt,"duplication of %YAML directive");if(Ot.length!==1)ot(dt,"YAML directive accepts exactly one argument");let _t=/^([0-9]+)\.([0-9]+)$/.exec(Ot[0]);if(_t===null)ot(dt,"ill-formed argument of the YAML directive");let Wt=parseInt(_t[1],10),Z=parseInt(_t[2],10);if(Wt!==1)ot(dt,"unacceptable YAML version of the document");if(dt.version=Ot[0],dt.checkLineBreaks=Z<2,Z!==1&&Z!==2)wt(dt,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:t(function(dt,Bt,Ot){let _t;if(Ot.length!==2)ot(dt,"TAG directive accepts exactly two arguments");let Wt=Ot[0];if(_t=Ot[1],!H.test(Wt))ot(dt,"ill-formed tag handle (first argument) of the TAG directive");if(o.call(dt.tagMap,Wt))ot(dt,'there is a previously declared suffix for "'+Wt+'" tag handle');if(!Y.test(_t))ot(dt,"ill-formed tag prefix (second argument) of the TAG directive");try{_t=decodeURIComponent(_t)}catch(Z){ot(dt,"tag prefix is malformed: "+_t)}dt.tagMap[Wt]=_t},"handleTagDirective")};function we(D,dt,Bt,Ot){if(dt<Bt){let _t=D.input.slice(dt,Bt);if(Ot)for(let Wt=0,Z=_t.length;Wt<Z;Wt+=1){let mt=_t.charCodeAt(Wt);if(!(mt===9||mt>=32&&mt<=1114111))ot(D,"expected valid JSON character")}else if(v.test(_t))ot(D,"the stream contains non-printable characters");D.result+=_t}}t(we,"captureSegment");function Ht(D,dt,Bt,Ot){if(!r.isObject(Bt))ot(D,"cannot merge mappings; the provided source object is unacceptable");let _t=Object.keys(Bt);for(let Wt=0,Z=_t.length;Wt<Z;Wt+=1){let mt=_t[Wt];if(D.maxTotalMergeKeys!==-1&&++D.totalMergeKeys>D.maxTotalMergeKeys)ot(D,"merge keys exceeded maxTotalMergeKeys ("+D.maxTotalMergeKeys+")");if(!o.call(dt,mt))kt(dt,mt,Bt[mt]),Ot[mt]=!0}}t(Ht,"mergeMappings");function ne(D,dt,Bt,Ot,_t,Wt,Z,mt,Pt){if(Array.isArray(_t)){_t=Array.prototype.slice.call(_t);for(let Mt=0,It=_t.length;Mt<It;Mt+=1){if(Array.isArray(_t[Mt]))ot(D,"nested arrays are not supported inside keys");if(typeof _t==="object"&&j(_t[Mt])==="[object Object]")_t[Mt]="[object Object]"}}if(typeof _t==="object"&&j(_t)==="[object Object]")_t="[object Object]";if(_t=String(_t),dt===null)dt={};if(Ot==="tag:yaml.org,2002:merge")if(Array.isArray(Wt))for(let Mt=0,It=Wt.length;Mt<It;Mt+=1)Ht(D,dt,Wt[Mt],Bt);else Ht(D,dt,Wt,Bt);else{if(!D.json&&!o.call(Bt,_t)&&o.call(dt,_t))D.line=Z||D.line,D.lineStart=mt||D.lineStart,D.position=Pt||D.position,ot(D,"duplicated mapping key");kt(dt,_t,Wt),delete Bt[_t]}return dt}t(ne,"storeMappingPair");function me(D){let dt=D.input.charCodeAt(D.position);if(dt===10)D.position++;else if(dt===13){if(D.position++,D.input.charCodeAt(D.position)===10)D.position++}else ot(D,"a line break is expected");D.line+=1,D.lineStart=D.position,D.firstTabInLine=-1}t(me,"readLineBreak");function xe(D,dt,Bt){let Ot=0,_t=D.input.charCodeAt(D.position);while(_t!==0){while(Q(_t)){if(_t===9&&D.firstTabInLine===-1)D.firstTabInLine=D.position;_t=D.input.charCodeAt(++D.position)}if(dt&&_t===35)do _t=D.input.charCodeAt(++D.position);while(_t!==10&&_t!==13&&_t!==0);if(X(_t)){me(D),_t=D.input.charCodeAt(D.position),Ot++,D.lineIndent=0;while(_t===32)D.lineIndent++,_t=D.input.charCodeAt(++D.position)}else break}if(Bt!==-1&&Ot!==0&&D.lineIndent<Bt)wt(D,"deficient indentation");return Ot}t(xe,"skipSeparationSpace");function Je(D){let dt=D.position,Bt=D.input.charCodeAt(dt);if((Bt===45||Bt===46)&&Bt===D.input.charCodeAt(dt+1)&&Bt===D.input.charCodeAt(dt+2)){if(dt+=3,Bt=D.input.charCodeAt(dt),Bt===0||et(Bt))return!0}return!1}t(Je,"testDocumentSeparator");function Qe(D,dt){if(dt===1)D.result+=" ";else if(dt>1)D.result+=r.repeat(`
138
+ `,dt-1)}t(Qe,"writeFoldedLines");function Ci(D,dt,Bt){let Ot,_t,Wt,Z,mt,Pt,{kind:Mt,result:It}=D,Nt=D.input.charCodeAt(D.position);if(et(Nt)||it(Nt)||Nt===35||Nt===38||Nt===42||Nt===33||Nt===124||Nt===62||Nt===39||Nt===34||Nt===37||Nt===64||Nt===96)return!1;if(Nt===63||Nt===45){let Rt=D.input.charCodeAt(D.position+1);if(et(Rt)||Bt&&it(Rt))return!1}D.kind="scalar",D.result="",Ot=_t=D.position,Wt=!1;while(Nt!==0){if(Nt===58){let Rt=D.input.charCodeAt(D.position+1);if(et(Rt)||Bt&&it(Rt))break}else if(Nt===35){let Rt=D.input.charCodeAt(D.position-1);if(et(Rt))break}else if(D.position===D.lineStart&&Je(D)||Bt&&it(Nt))break;else if(X(Nt))if(Z=D.line,mt=D.lineStart,Pt=D.lineIndent,xe(D,!1,-1),D.lineIndent>=dt){Wt=!0,Nt=D.input.charCodeAt(D.position);continue}else{D.position=_t,D.line=Z,D.lineStart=mt,D.lineIndent=Pt;break}if(Wt)we(D,Ot,_t,!1),Qe(D,D.line-Z),Ot=_t=D.position,Wt=!1;if(!Q(Nt))_t=D.position+1;Nt=D.input.charCodeAt(++D.position)}if(we(D,Ot,_t,!1),D.result)return!0;return D.kind=Mt,D.result=It,!1}t(Ci,"readPlainScalar");function oo(D,dt){let Bt,Ot,_t=D.input.charCodeAt(D.position);if(_t!==39)return!1;D.kind="scalar",D.result="",D.position++,Bt=Ot=D.position;while((_t=D.input.charCodeAt(D.position))!==0)if(_t===39)if(we(D,Bt,D.position,!0),_t=D.input.charCodeAt(++D.position),_t===39)Bt=D.position,D.position++,Ot=D.position;else return!0;else if(X(_t))we(D,Bt,Ot,!0),Qe(D,xe(D,!1,dt)),Bt=Ot=D.position;else if(D.position===D.lineStart&&Je(D))ot(D,"unexpected end of the document within a single quoted scalar");else if(D.position++,!Q(_t))Ot=D.position;ot(D,"unexpected end of the stream within a single quoted scalar")}t(oo,"readSingleQuotedScalar");function pi(D,dt){let Bt,Ot,_t,Wt=D.input.charCodeAt(D.position);if(Wt!==34)return!1;D.kind="scalar",D.result="",D.position++,Bt=Ot=D.position;while((Wt=D.input.charCodeAt(D.position))!==0)if(Wt===34)return we(D,Bt,D.position,!0),D.position++,!0;else if(Wt===92){if(we(D,Bt,D.position,!0),Wt=D.input.charCodeAt(++D.position),X(Wt))xe(D,!1,dt);else if(Wt<256&&Ct[Wt])D.result+=st[Wt],D.position++;else if((_t=lt(Wt))>0){let Z=_t,mt=0;for(;Z>0;Z--)if(Wt=D.input.charCodeAt(++D.position),(_t=ht(Wt))>=0)mt=(mt<<4)+_t;else ot(D,"expected hexadecimal character");D.result+=Lt(mt),D.position++}else ot(D,"unknown escape sequence");Bt=Ot=D.position}else if(X(Wt))we(D,Bt,Ot,!0),Qe(D,xe(D,!1,dt)),Bt=Ot=D.position;else if(D.position===D.lineStart&&Je(D))ot(D,"unexpected end of the document within a double quoted scalar");else if(D.position++,!Q(Wt))Ot=D.position;ot(D,"unexpected end of the stream within a double quoted scalar")}t(pi,"readDoubleQuotedScalar");function Po(D,dt){let Bt=!0,Ot,_t,Wt,Z=D.tag,mt,Pt=D.anchor,Mt,It,Nt,Rt,te=Object.create(null),Vt,ee,ie,Ee=D.input.charCodeAt(D.position);if(Ee===91)Mt=93,Rt=!1,mt=[];else if(Ee===123)Mt=125,Rt=!0,mt={};else return!1;if(D.anchor!==null)At(D,D.anchor,mt);Ee=D.input.charCodeAt(++D.position);while(Ee!==0){if(xe(D,!0,dt),Ee=D.input.charCodeAt(D.position),Ee===Mt)return D.position++,D.tag=Z,D.anchor=Pt,D.kind=Rt?"mapping":"sequence",D.result=mt,!0;else if(!Bt)ot(D,"missed comma between flow collection entries");else if(Ee===44)ot(D,"expected the node content, but found ','");if(ee=Vt=ie=null,It=Nt=!1,Ee===63){let Ke=D.input.charCodeAt(D.position+1);if(et(Ke))It=Nt=!0,D.position++,xe(D,!0,dt)}if(Ot=D.line,_t=D.lineStart,Wt=D.position,nr(D,dt,n,!1,!0),ee=D.tag,Vt=D.result,xe(D,!0,dt),Ee=D.input.charCodeAt(D.position),(Nt||D.line===Ot)&&Ee===58)It=!0,Ee=D.input.charCodeAt(++D.position),xe(D,!0,dt),nr(D,dt,n,!1,!0),ie=D.result;if(Rt)ne(D,mt,te,ee,Vt,ie,Ot,_t,Wt);else if(It)mt.push(ne(D,null,te,ee,Vt,ie,Ot,_t,Wt));else mt.push(Vt);if(xe(D,!0,dt),Ee=D.input.charCodeAt(D.position),Ee===44)Bt=!0,Ee=D.input.charCodeAt(++D.position);else Bt=!1}ot(D,"unexpected end of the stream within a flow collection")}t(Po,"readFlowCollection");function je(D,dt){let Bt,Ot=y,_t=!1,Wt=!1,Z=dt,mt=0,Pt=!1,Mt,It=D.input.charCodeAt(D.position);if(It===124)Bt=!1;else if(It===62)Bt=!0;else return!1;D.kind="scalar",D.result="";while(It!==0)if(It=D.input.charCodeAt(++D.position),It===43||It===45)if(y===Ot)Ot=It===43?B:f;else ot(D,"repeat of a chomping mode identifier");else if((Mt=ft(It))>=0)if(Mt===0)ot(D,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!Wt)Z=dt+Mt-1,Wt=!0;else ot(D,"repeat of an indentation width identifier");else break;if(Q(It)){do It=D.input.charCodeAt(++D.position);while(Q(It));if(It===35)do It=D.input.charCodeAt(++D.position);while(!X(It)&&It!==0)}while(It!==0){me(D),D.lineIndent=0,It=D.input.charCodeAt(D.position);while((!Wt||D.lineIndent<Z)&&It===32)D.lineIndent++,It=D.input.charCodeAt(++D.position);if(!Wt&&D.lineIndent>Z)Z=D.lineIndent;if(X(It)){mt++;continue}if(!Wt&&Z===0)ot(D,"missing indentation for block scalar");if(D.lineIndent<Z){if(Ot===B)D.result+=r.repeat(`
139
+ `,_t?1+mt:mt);else if(Ot===y){if(_t)D.result+=`
140
+ `}break}if(Bt)if(Q(It))Pt=!0,D.result+=r.repeat(`
141
+ `,_t?1+mt:mt);else if(Pt)Pt=!1,D.result+=r.repeat(`
142
+ `,mt+1);else if(mt===0){if(_t)D.result+=" "}else D.result+=r.repeat(`
143
+ `,mt);else D.result+=r.repeat(`
144
+ `,_t?1+mt:mt);_t=!0,Wt=!0,mt=0;let Nt=D.position;while(!X(It)&&It!==0)It=D.input.charCodeAt(++D.position);we(D,Nt,D.position,!1)}return!0}t(je,"readBlockScalar");function zr(D,dt){let{tag:Bt,anchor:Ot}=D,_t=[],Wt=!1;if(D.firstTabInLine!==-1)return!1;if(D.anchor!==null)At(D,D.anchor,_t);let Z=D.input.charCodeAt(D.position);while(Z!==0){if(D.firstTabInLine!==-1)D.position=D.firstTabInLine,ot(D,"tab characters must not be used in indentation");if(Z!==45)break;let mt=D.input.charCodeAt(D.position+1);if(!et(mt))break;if(Wt=!0,D.position++,xe(D,!0,-1)){if(D.lineIndent<=dt){_t.push(null),Z=D.input.charCodeAt(D.position);continue}}let Pt=D.line;if(nr(D,dt,h,!1,!0),_t.push(D.result),xe(D,!0,-1),Z=D.input.charCodeAt(D.position),(D.line===Pt||D.lineIndent>dt)&&Z!==0)ot(D,"bad indentation of a sequence entry");else if(D.lineIndent<dt)break}if(Wt)return D.tag=Bt,D.anchor=Ot,D.kind="sequence",D.result=_t,!0;return!1}t(zr,"readBlockSequence");function He(D,dt,Bt){let Ot,_t,Wt,Z,{tag:mt,anchor:Pt}=D,Mt={},It=Object.create(null),Nt=null,Rt=null,te=null,Vt=!1,ee=!1;if(D.firstTabInLine!==-1)return!1;if(D.anchor!==null)At(D,D.anchor,Mt);let ie=D.input.charCodeAt(D.position);while(ie!==0){if(!Vt&&D.firstTabInLine!==-1)D.position=D.firstTabInLine,ot(D,"tab characters must not be used in indentation");let Ee=D.input.charCodeAt(D.position+1),Ke=D.line;if((ie===63||ie===58)&&et(Ee)){if(ie===63){if(Vt)ne(D,Mt,It,Nt,Rt,null,_t,Wt,Z),Nt=Rt=te=null;ee=!0,Vt=!0,Ot=!0}else if(Vt)Vt=!1,Ot=!0;else ot(D,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");D.position+=1,ie=Ee}else{if(_t=D.line,Wt=D.lineStart,Z=D.position,!nr(D,Bt,c,!1,!0))break;if(D.line===Ke){ie=D.input.charCodeAt(D.position);while(Q(ie))ie=D.input.charCodeAt(++D.position);if(ie===58){if(ie=D.input.charCodeAt(++D.position),!et(ie))ot(D,"a whitespace character is expected after the key-value separator within a block mapping");if(Vt)ne(D,Mt,It,Nt,Rt,null,_t,Wt,Z),Nt=Rt=te=null;ee=!0,Vt=!1,Ot=!1,Nt=D.tag,Rt=D.result}else if(ee)ot(D,"can not read an implicit mapping pair; a colon is missed");else return D.tag=mt,D.anchor=Pt,!0}else if(ee)ot(D,"can not read a block mapping entry; a multiline key may not be an implicit key");else return D.tag=mt,D.anchor=Pt,!0}if(D.line===Ke||D.lineIndent>dt){if(Vt)_t=D.line,Wt=D.lineStart,Z=D.position;if(nr(D,dt,g,!0,Ot))if(Vt)Rt=D.result;else te=D.result;if(!Vt)ne(D,Mt,It,Nt,Rt,te,_t,Wt,Z),Nt=Rt=te=null;xe(D,!0,-1),ie=D.input.charCodeAt(D.position)}if((D.line===Ke||D.lineIndent>dt)&&ie!==0)ot(D,"bad indentation of a mapping entry");else if(D.lineIndent<dt)break}if(Vt)ne(D,Mt,It,Nt,Rt,null,_t,Wt,Z);if(ee)D.tag=mt,D.anchor=Pt,D.kind="mapping",D.result=Mt;return ee}t(He,"readBlockMapping");function ao(D){let dt=!1,Bt=!1,Ot,_t,Wt=D.input.charCodeAt(D.position);if(Wt!==33)return!1;if(D.tag!==null)ot(D,"duplication of a tag property");if(Wt=D.input.charCodeAt(++D.position),Wt===60)dt=!0,Wt=D.input.charCodeAt(++D.position);else if(Wt===33)Bt=!0,Ot="!!",Wt=D.input.charCodeAt(++D.position);else Ot="!";let Z=D.position;if(dt){do Wt=D.input.charCodeAt(++D.position);while(Wt!==0&&Wt!==62);if(D.position<D.length)_t=D.input.slice(Z,D.position),Wt=D.input.charCodeAt(++D.position);else ot(D,"unexpected end of the stream within a verbatim tag")}else{while(Wt!==0&&!et(Wt)){if(Wt===33)if(!Bt){if(Ot=D.input.slice(Z-1,D.position+1),!H.test(Ot))ot(D,"named tag handle cannot contain such characters");Bt=!0,Z=D.position+1}else ot(D,"tag suffix cannot contain exclamation marks");Wt=D.input.charCodeAt(++D.position)}if(_t=D.input.slice(Z,D.position),W.test(_t))ot(D,"tag suffix cannot contain flow indicator characters")}if(_t&&!Y.test(_t))ot(D,"tag name cannot contain such characters: "+_t);try{_t=decodeURIComponent(_t)}catch(mt){ot(D,"tag name is malformed: "+_t)}if(dt)D.tag=_t;else if(o.call(D.tagMap,Ot))D.tag=D.tagMap[Ot]+_t;else if(Ot==="!")D.tag="!"+_t;else if(Ot==="!!")D.tag="tag:yaml.org,2002:"+_t;else ot(D,'undeclared tag handle "'+Ot+'"');return!0}t(ao,"readTagProperty");function dr(D){let dt=D.input.charCodeAt(D.position);if(dt!==38)return!1;if(D.anchor!==null)ot(D,"duplication of an anchor property");dt=D.input.charCodeAt(++D.position);let Bt=D.position;while(dt!==0&&!et(dt)&&!it(dt))dt=D.input.charCodeAt(++D.position);if(D.position===Bt)ot(D,"name of an anchor node must contain at least one character");return D.anchor=D.input.slice(Bt,D.position),!0}t(dr,"readAnchorProperty");function gi(D){let dt=D.input.charCodeAt(D.position);if(dt!==42)return!1;dt=D.input.charCodeAt(++D.position);let Bt=D.position;while(dt!==0&&!et(dt)&&!it(dt))dt=D.input.charCodeAt(++D.position);if(D.position===Bt)ot(D,"name of an alias node must contain at least one character");let Ot=D.input.slice(Bt,D.position);if(!o.call(D.anchorMap,Ot))ot(D,'unidentified alias "'+Ot+'"');return D.result=D.anchorMap[Ot],xe(D,!0,-1),!0}t(gi,"readAlias");function Ro(D,dt,Bt,Ot){let _t=ce(D);if(jt(D),Ae(D,dt),D.tag=null,D.anchor=null,D.kind=null,D.result=null,He(D,Bt,Ot)&&D.kind==="mapping")return Yt(D),!0;return ue(D),Ae(D,_t),!1}t(Ro,"tryReadBlockMappingFromProperty");function nr(D,dt,Bt,Ot,_t){let Wt,Z,mt=1,Pt=!1,Mt=!1,It=null,Nt,Rt,te;if(D.depth>=D.maxDepth)ot(D,"nesting exceeded maxDepth ("+D.maxDepth+")");if(D.depth+=1,D.listener!==null)D.listener("open",D);D.tag=null,D.anchor=null,D.kind=null,D.result=null;let Vt=Wt=Z=g===Bt||h===Bt;if(Ot){if(xe(D,!0,-1)){if(Pt=!0,D.lineIndent>dt)mt=1;else if(D.lineIndent===dt)mt=0;else if(D.lineIndent<dt)mt=-1}}if(mt===1)while(!0){let ee=D.input.charCodeAt(D.position),ie=ce(D);if(Pt&&(ee===33&&D.tag!==null||ee===38&&D.anchor!==null))break;if(!ao(D)&&!dr(D))break;if(It===null)It=ie;if(xe(D,!0,-1)){if(Pt=!0,Z=Vt,D.lineIndent>dt)mt=1;else if(D.lineIndent===dt)mt=0;else if(D.lineIndent<dt)mt=-1}else Z=!1}if(Z)Z=Pt||_t;if(mt===1||g===Bt){if(n===Bt||c===Bt)Rt=dt;else Rt=dt+1;if(te=D.position-D.lineStart,mt===1)if(Z&&(zr(D,te)||He(D,te,Rt))||Po(D,Rt))Mt=!0;else{let ee=D.input.charCodeAt(D.position);if(It!==null&&Vt&&!Z&&ee!==124&&ee!==62&&Ro(D,It,It.position-It.lineStart,Rt))Mt=!0;else if(Wt&&je(D,Rt)||oo(D,Rt)||pi(D,Rt))Mt=!0;else if(gi(D)){if(Mt=!0,D.tag!==null||D.anchor!==null)ot(D,"alias node should not have any properties")}else if(Ci(D,Rt,n===Bt)){if(Mt=!0,D.tag===null)D.tag="?"}if(D.anchor!==null)At(D,D.anchor,D.result)}else if(mt===0)Mt=Z&&zr(D,te)}if(D.tag===null){if(D.anchor!==null)At(D,D.anchor,D.result)}else if(D.tag==="?"){if(D.result!==null&&D.kind!=="scalar")ot(D,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+D.kind+'"');for(let ee=0,ie=D.implicitTypes.length;ee<ie;ee+=1)if(Nt=D.implicitTypes[ee],Nt.resolve(D.result)){if(D.result=Nt.construct(D.result),D.tag=Nt.tag,D.anchor!==null)At(D,D.anchor,D.result);break}}else if(D.tag!=="!"){if(o.call(D.typeMap[D.kind||"fallback"],D.tag))Nt=D.typeMap[D.kind||"fallback"][D.tag];else{Nt=null;let ee=D.typeMap.multi[D.kind||"fallback"];for(let ie=0,Ee=ee.length;ie<Ee;ie+=1)if(D.tag.slice(0,ee[ie].tag.length)===ee[ie].tag){Nt=ee[ie];break}}if(!Nt)ot(D,"unknown tag !<"+D.tag+">");if(D.result!==null&&Nt.kind!==D.kind)ot(D,"unacceptable node kind for !<"+D.tag+'> tag; it should be "'+Nt.kind+'", not "'+D.kind+'"');if(!Nt.resolve(D.result,D.tag))ot(D,"cannot resolve a node with !<"+D.tag+"> explicit tag");else if(D.result=Nt.construct(D.result,D.tag),D.anchor!==null)At(D,D.anchor,D.result)}if(D.listener!==null)D.listener("close",D);return D.depth-=1,D.tag!==null||D.anchor!==null||Mt}t(nr,"composeNode");function qo(D){let dt=D.position,Bt=!1,Ot;D.version=null,D.checkLineBreaks=D.legacy,D.tagMap=Object.create(null),D.anchorMap=Object.create(null);while((Ot=D.input.charCodeAt(D.position))!==0){if(xe(D,!0,-1),Ot=D.input.charCodeAt(D.position),D.lineIndent>0||Ot!==37)break;Bt=!0,Ot=D.input.charCodeAt(++D.position);let _t=D.position;while(Ot!==0&&!et(Ot))Ot=D.input.charCodeAt(++D.position);let Wt=D.input.slice(_t,D.position),Z=[];if(Wt.length<1)ot(D,"directive name must not be less than one character in length");while(Ot!==0){while(Q(Ot))Ot=D.input.charCodeAt(++D.position);if(Ot===35){do Ot=D.input.charCodeAt(++D.position);while(Ot!==0&&!X(Ot));break}if(X(Ot))break;_t=D.position;while(Ot!==0&&!et(Ot))Ot=D.input.charCodeAt(++D.position);Z.push(D.input.slice(_t,D.position))}if(Ot!==0)me(D);if(o.call(Oe,Wt))Oe[Wt](D,Wt,Z);else wt(D,'unknown document directive "'+Wt+'"')}if(xe(D,!0,-1),D.lineIndent===0&&D.input.charCodeAt(D.position)===45&&D.input.charCodeAt(D.position+1)===45&&D.input.charCodeAt(D.position+2)===45)D.position+=3,xe(D,!0,-1);else if(Bt)ot(D,"directives end mark is expected");if(nr(D,D.lineIndent-1,g,!1,!0),xe(D,!0,-1),D.checkLineBreaks&&q.test(D.input.slice(dt,D.position)))wt(D,"non-ASCII line breaks are interpreted as content");if(D.documents.push(D.result),D.position===D.lineStart&&Je(D)){if(D.input.charCodeAt(D.position)===46)D.position+=3,xe(D,!0,-1);return}if(D.position<D.length-1)ot(D,"end of the stream or a document separator is expected")}t(qo,"readDocument");function vi(D,dt){if(D=String(D),dt=dt||{},D.length!==0){if(D.charCodeAt(D.length-1)!==10&&D.charCodeAt(D.length-1)!==13)D+=`
145
+ `;if(D.charCodeAt(0)===65279)D=D.slice(1)}let Bt=new at(D,dt),Ot=D.indexOf("\x00");if(Ot!==-1)Bt.position=Ot,ot(Bt,"null byte is not allowed in input");Bt.input+="\x00";while(Bt.input.charCodeAt(Bt.position)===32)Bt.lineIndent+=1,Bt.position+=1;while(Bt.position<Bt.length-1)qo(Bt);return Bt.documents}t(vi,"loadDocuments");function no(D,dt,Bt){if(dt!==null&&typeof dt==="object"&&typeof Bt>"u")Bt=dt,dt=null;let Ot=vi(D,Bt);if(typeof dt!=="function")return Ot;for(let _t=0,Wt=Ot.length;_t<Wt;_t+=1)dt(Ot[_t])}t(no,"loadAll2");function So(D,dt){let Bt=vi(D,dt);if(Bt.length===0)return;else if(Bt.length===1)return Bt[0];throw new e("expected a single document in the stream, but found more")}return t(So,"load2"),Ol.loadAll=no,Ol.load=So,Ol}t(Yg,"requireLoader");var qu={},Ng;function Ug(){if(Ng)return qu;Ng=1;let r=As(),e=Ms(),i=Il(),s=Object.prototype.toString,o=Object.prototype.hasOwnProperty,n=65279,c=9,h=10,g=13,y=32,f=33,B=34,v=35,q=37,W=38,H=39,Y=42,j=44,X=45,Q=58,et=61,it=62,ht=63,lt=64,ft=91,xt=93,Lt=96,kt=123,Ct=124,st=125,at={};at[0]="\\0",at[7]="\\a",at[8]="\\b",at[9]="\\t",at[10]="\\n",at[11]="\\v",at[12]="\\f",at[13]="\\r",at[27]="\\e",at[34]="\\\"",at[92]="\\\\",at[133]="\\N",at[160]="\\_",at[8232]="\\L",at[8233]="\\P";let pt=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],ot=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function wt(Z,mt){if(mt===null)return{};let Pt={},Mt=Object.keys(mt);for(let It=0,Nt=Mt.length;It<Nt;It+=1){let Rt=Mt[It],te=String(mt[Rt]);if(Rt.slice(0,2)==="!!")Rt="tag:yaml.org,2002:"+Rt.slice(2);let Vt=Z.compiledTypeMap.fallback[Rt];if(Vt&&o.call(Vt.styleAliases,te))te=Vt.styleAliases[te];Pt[Rt]=te}return Pt}t(wt,"compileStyleMap");function At(Z){let mt,Pt,Mt=Z.toString(16).toUpperCase();if(Z<=255)mt="x",Pt=2;else if(Z<=65535)mt="u",Pt=4;else if(Z<=4294967295)mt="U",Pt=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+mt+r.repeat("0",Pt-Mt.length)+Mt}t(At,"encodeHex");let jt=1,Yt=2;function ue(Z){this.schema=Z.schema||i,this.indent=Math.max(1,Z.indent||2),this.noArrayIndent=Z.noArrayIndent||!1,this.skipInvalid=Z.skipInvalid||!1,this.flowLevel=r.isNothing(Z.flowLevel)?-1:Z.flowLevel,this.styleMap=wt(this.schema,Z.styles||null),this.sortKeys=Z.sortKeys||!1,this.lineWidth=Z.lineWidth||80,this.noRefs=Z.noRefs||!1,this.noCompatMode=Z.noCompatMode||!1,this.condenseFlow=Z.condenseFlow||!1,this.quotingType=Z.quotingType==='"'?Yt:jt,this.forceQuotes=Z.forceQuotes||!1,this.replacer=typeof Z.replacer==="function"?Z.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}t(ue,"State");function ce(Z,mt){let Pt=r.repeat(" ",mt),Mt=0,It="",Nt=Z.length;while(Mt<Nt){let Rt,te=Z.indexOf(`
146
+ `,Mt);if(te===-1)Rt=Z.slice(Mt),Mt=Nt;else Rt=Z.slice(Mt,te+1),Mt=te+1;if(Rt.length&&Rt!==`
147
+ `)It+=Pt;It+=Rt}return It}t(ce,"indentString");function Ae(Z,mt){return`
148
+ `+r.repeat(" ",Z.indent*mt)}t(Ae,"generateNextLine");function Oe(Z,mt){for(let Pt=0,Mt=Z.implicitTypes.length;Pt<Mt;Pt+=1)if(Z.implicitTypes[Pt].resolve(mt))return!0;return!1}t(Oe,"testImplicitResolving");function we(Z){return Z===y||Z===c}t(we,"isWhitespace");function Ht(Z){return Z>=32&&Z<=126||Z>=161&&Z<=55295&&Z!==8232&&Z!==8233||Z>=57344&&Z<=65533&&Z!==n||Z>=65536&&Z<=1114111}t(Ht,"isPrintable");function ne(Z){return Ht(Z)&&Z!==n&&Z!==g&&Z!==h}t(ne,"isNsCharOrWhitespace");function me(Z,mt,Pt){let Mt=ne(Z),It=Mt&&!we(Z);return(Pt?Mt:Mt&&Z!==j&&Z!==ft&&Z!==xt&&Z!==kt&&Z!==st)&&Z!==v&&!(mt===Q&&!It)||ne(mt)&&!we(mt)&&Z===v||mt===Q&&It}t(me,"isPlainSafe");function xe(Z){return Ht(Z)&&Z!==n&&!we(Z)&&Z!==X&&Z!==ht&&Z!==Q&&Z!==j&&Z!==ft&&Z!==xt&&Z!==kt&&Z!==st&&Z!==v&&Z!==W&&Z!==Y&&Z!==f&&Z!==Ct&&Z!==et&&Z!==it&&Z!==H&&Z!==B&&Z!==q&&Z!==lt&&Z!==Lt}t(xe,"isPlainSafeFirst");function Je(Z){return!we(Z)&&Z!==Q}t(Je,"isPlainSafeLast");function Qe(Z,mt){let Pt=Z.charCodeAt(mt),Mt;if(Pt>=55296&&Pt<=56319&&mt+1<Z.length){if(Mt=Z.charCodeAt(mt+1),Mt>=56320&&Mt<=57343)return(Pt-55296)*1024+Mt-56320+65536}return Pt}t(Qe,"codePointAt");function Ci(Z){return/^\n* /.test(Z)}t(Ci,"needIndentIndicator");let oo=1,pi=2,Po=3,je=4,zr=5;function He(Z,mt,Pt,Mt,It,Nt,Rt,te){let Vt,ee=0,ie=null,Ee=!1,Ke=!1,zs=Mt!==-1,No=-1,Wo=xe(Qe(Z,0))&&Je(Qe(Z,Z.length-1));if(mt||Rt)for(Vt=0;Vt<Z.length;ee>=65536?Vt+=2:Vt++){if(ee=Qe(Z,Vt),!Ht(ee))return zr;Wo=Wo&&me(ee,ie,te),ie=ee}else{for(Vt=0;Vt<Z.length;ee>=65536?Vt+=2:Vt++){if(ee=Qe(Z,Vt),ee===h){if(Ee=!0,zs)Ke=Ke||Vt-No-1>Mt&&Z[No+1]!==" ",No=Vt}else if(!Ht(ee))return zr;Wo=Wo&&me(ee,ie,te),ie=ee}Ke=Ke||zs&&(Vt-No-1>Mt&&Z[No+1]!==" ")}if(!Ee&&!Ke){if(Wo&&!Rt&&!It(Z))return oo;return Nt===Yt?zr:pi}if(Pt>9&&Ci(Z))return zr;if(!Rt)return Ke?je:Po;return Nt===Yt?zr:pi}t(He,"chooseScalarStyle");function ao(Z,mt,Pt,Mt,It){Z.dump=function(){if(mt.length===0)return Z.quotingType===Yt?'""':"''";if(!Z.noCompatMode){if(pt.indexOf(mt)!==-1||ot.test(mt))return Z.quotingType===Yt?'"'+mt+'"':"'"+mt+"'"}let Nt=Z.indent*Math.max(1,Pt),Rt=Z.lineWidth===-1?-1:Math.max(Math.min(Z.lineWidth,40),Z.lineWidth-Nt),te=Mt||Z.flowLevel>-1&&Pt>=Z.flowLevel;function Vt(ee){return Oe(Z,ee)}switch(t(Vt,"testAmbiguity"),He(mt,te,Z.indent,Rt,Vt,Z.quotingType,Z.forceQuotes&&!Mt,It)){case oo:return mt;case pi:return"'"+mt.replace(/'/g,"''")+"'";case Po:return"|"+dr(mt,Z.indent)+gi(ce(mt,Nt));case je:return">"+dr(mt,Z.indent)+gi(ce(Ro(mt,Rt),Nt));case zr:return'"'+qo(mt)+'"';default:throw new e("impossible error: invalid scalar style")}}()}t(ao,"writeScalar");function dr(Z,mt){let Pt=Ci(Z)?String(mt):"",Mt=Z[Z.length-1]===`
149
+ `,Nt=Mt&&(Z[Z.length-2]===`
150
150
  `||Z===`
151
- `)?"+":Ft?"":"-";return Dt+qt+`
152
- `}t(ur,"blockHeader");function pi(Z){return Z[Z.length-1]===`
153
- `?Z.slice(0,-1):Z}t(pi,"dropEndingNewline");function Po(Z,xt){let Dt=/(\n+)([^\n]*)/g,Ft=function(){let Vt=Z.indexOf(`
154
- `);return Vt=Vt!==-1?Vt:Z.length,Dt.lastIndex=Vt,sr(Z.slice(0,Vt),xt)}(),Ot=Z[0]===`
155
- `||Z[0]===" ",qt,Pt;while(Pt=Dt.exec(Z)){let Vt=Pt[1],Xt=Pt[2];qt=Xt[0]===" ",Ft+=Vt+(!Ot&&!qt&&Xt!==""?`
156
- `:"")+sr(Xt,xt),Ot=qt}return Ft}t(Po,"foldString");function sr(Z,xt){if(Z===""||Z[0]===" ")return Z;let Dt=/ [^ ]/g,Ft,Ot=0,qt,Pt=0,Vt=0,Xt="";while(Ft=Dt.exec(Z)){if(Vt=Ft.index,Vt-Ot>xt)qt=Pt>Ot?Pt:Vt,Xt+=`
157
- `+Z.slice(Ot,qt),Ot=qt+1;Pt=Vt}if(Xt+=`
158
- `,Z.length-Ot>xt&&Pt>Ot)Xt+=Z.slice(Ot,Pt)+`
159
- `+Z.slice(Pt+1);else Xt+=Z.slice(Ot);return Xt.slice(1)}t(sr,"foldLine");function Ro(Z){let xt="",Dt=0;for(let Ft=0;Ft<Z.length;Dt>=65536?Ft+=2:Ft++){Dt=Xe(Z,Ft);let Ot=at[Dt];if(!Ot&&Wt(Dt)){if(xt+=Z[Ft],Dt>=65536)xt+=Z[Ft+1]}else xt+=Ot||Lt(Dt)}return xt}t(Ro,"escapeString");function _i(Z,xt,Dt){let Ft="",Ot=Z.tag;for(let qt=0,Pt=Dt.length;qt<Pt;qt+=1){let Vt=Dt[qt];if(Z.replacer)Vt=Z.replacer.call(Dt,String(qt),Vt);if(_t(Z,xt,Vt,!1,!1)||typeof Vt>"u"&&_t(Z,xt,null,!1,!1)){if(Ft!=="")Ft+=","+(!Z.condenseFlow?" ":"");Ft+=Z.dump}}Z.tag=Ot,Z.dump="["+Ft+"]"}t(_i,"writeFlowSequence");function so(Z,xt,Dt,Ft){let Ot="",qt=Z.tag;for(let Pt=0,Vt=Dt.length;Pt<Vt;Pt+=1){let Xt=Dt[Pt];if(Z.replacer)Xt=Z.replacer.call(Dt,String(Pt),Xt);if(_t(Z,xt+1,Xt,!0,!0,!1,!0)||typeof Xt>"u"&&_t(Z,xt+1,null,!0,!0,!1,!0)){if(!Ft||Ot!=="")Ot+=_e(Z,xt);if(Z.dump&&h===Z.dump.charCodeAt(0))Ot+="-";else Ot+="- ";Ot+=Z.dump}}Z.tag=qt,Z.dump=Ot||"[]"}t(so,"writeBlockSequence");function ao(Z,xt,Dt){let Ft="",Ot=Z.tag,qt=Object.keys(Dt);for(let Pt=0,Vt=qt.length;Pt<Vt;Pt+=1){let Xt="";if(Ft!=="")Xt+=", ";if(Z.condenseFlow)Xt+='"';let Zt=qt[Pt],ee=Dt[Zt];if(Z.replacer)ee=Z.replacer.call(Dt,Zt,ee);if(!_t(Z,xt,Zt,!1,!1))continue;if(Z.dump.length>1024)Xt+="? ";if(Xt+=Z.dump+(Z.condenseFlow?'"':"")+":"+(Z.condenseFlow?"":" "),!_t(Z,xt,ee,!1,!1))continue;Xt+=Z.dump,Ft+=Xt}Z.tag=Ot,Z.dump="{"+Ft+"}"}t(ao,"writeFlowMapping");function D(Z,xt,Dt,Ft){let Ot="",qt=Z.tag,Pt=Object.keys(Dt);if(Z.sortKeys===!0)Pt.sort();else if(typeof Z.sortKeys==="function")Pt.sort(Z.sortKeys);else if(Z.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let Vt=0,Xt=Pt.length;Vt<Xt;Vt+=1){let Zt="";if(!Ft||Ot!=="")Zt+=_e(Z,xt);let ee=Pt[Vt],ve=Dt[ee];if(Z.replacer)ve=Z.replacer.call(Dt,ee,ve);if(!_t(Z,xt+1,ee,!0,!0,!0))continue;let Ge=Z.tag!==null&&Z.tag!=="?"||Z.dump&&Z.dump.length>1024;if(Ge)if(Z.dump&&h===Z.dump.charCodeAt(0))Zt+="?";else Zt+="? ";if(Zt+=Z.dump,Ge)Zt+=_e(Z,xt);if(!_t(Z,xt+1,ve,!0,Ge))continue;if(Z.dump&&h===Z.dump.charCodeAt(0))Zt+=":";else Zt+=": ";Zt+=Z.dump,Ot+=Zt}Z.tag=qt,Z.dump=Ot||"{}"}t(D,"writeBlockMapping");function pt(Z,xt,Dt){let Ft=Dt?Z.explicitTypes:Z.implicitTypes;for(let Ot=0,qt=Ft.length;Ot<qt;Ot+=1){let Pt=Ft[Ot];if((Pt.instanceOf||Pt.predicate)&&(!Pt.instanceOf||typeof xt==="object"&&xt instanceof Pt.instanceOf)&&(!Pt.predicate||Pt.predicate(xt))){if(Dt)if(Pt.multi&&Pt.representName)Z.tag=Pt.representName(xt);else Z.tag=Pt.tag;else Z.tag="?";if(Pt.represent){let Vt=Z.styleMap[Pt.tag]||Pt.defaultStyle,Xt;if(s.call(Pt.represent)==="[object Function]")Xt=Pt.represent(xt,Vt);else if(o.call(Pt.represent,Vt))Xt=Pt.represent[Vt](xt,Vt);else throw new e("!<"+Pt.tag+'> tag resolver accepts not "'+Vt+'" style');Z.dump=Xt}return!0}}return!1}t(pt,"detectType");function _t(Z,xt,Dt,Ft,Ot,qt,Pt){if(Z.tag=null,Z.dump=Dt,!pt(Z,Dt,!1))pt(Z,Dt,!0);let Vt=s.call(Z.dump),Xt=Ft;if(Ft)Ft=Z.flowLevel<0||Z.flowLevel>xt;let Zt=Vt==="[object Object]"||Vt==="[object Array]",ee,ve;if(Zt)ee=Z.duplicates.indexOf(Dt),ve=ee!==-1;if(Z.tag!==null&&Z.tag!=="?"||ve||Z.indent!==2&&xt>0)Ot=!1;if(ve&&Z.usedDuplicates[ee])Z.dump="*ref_"+ee;else{if(Zt&&ve&&!Z.usedDuplicates[ee])Z.usedDuplicates[ee]=!0;if(Vt==="[object Object]"){if(Ft&&Object.keys(Z.dump).length!==0){if(D(Z,xt,Z.dump,Ot),ve)Z.dump="&ref_"+ee+Z.dump}else if(ao(Z,xt,Z.dump),ve)Z.dump="&ref_"+ee+" "+Z.dump}else if(Vt==="[object Array]"){if(Ft&&Z.dump.length!==0){if(Z.noArrayIndent&&!Pt&&xt>0)so(Z,xt-1,Z.dump,Ot);else so(Z,xt,Z.dump,Ot);if(ve)Z.dump="&ref_"+ee+Z.dump}else if(_i(Z,xt,Z.dump),ve)Z.dump="&ref_"+ee+" "+Z.dump}else if(Vt==="[object String]"){if(Z.tag!=="?")oo(Z,Z.dump,xt,qt,Xt)}else if(Vt==="[object Undefined]")return!1;else{if(Z.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+Vt)}if(Z.tag!==null&&Z.tag!=="?"){let Ge=encodeURI(Z.tag[0]==="!"?Z.tag.slice(1):Z.tag).replace(/!/g,"%21");if(Z.tag[0]==="!")Ge="!"+Ge;else if(Ge.slice(0,18)==="tag:yaml.org,2002:")Ge="!!"+Ge.slice(18);else Ge="!<"+Ge+">";Z.dump=Ge+" "+Z.dump}}return!0}t(_t,"writeNode");function Mt(Z,xt){let Dt=[],Ft=[];St(Z,Dt,Ft);let Ot=Ft.length;for(let qt=0;qt<Ot;qt+=1)xt.duplicates.push(Dt[Ft[qt]]);xt.usedDuplicates=Array(Ot)}t(Mt,"getDuplicateReferences");function St(Z,xt,Dt){if(Z!==null&&typeof Z==="object"){let Ft=xt.indexOf(Z);if(Ft!==-1){if(Dt.indexOf(Ft)===-1)Dt.push(Ft)}else if(xt.push(Z),Array.isArray(Z))for(let Ot=0,qt=Z.length;Ot<qt;Ot+=1)St(Z[Ot],xt,Dt);else{let Ot=Object.keys(Z);for(let qt=0,Pt=Ot.length;qt<Pt;qt+=1)St(Z[Ot[qt]],xt,Dt)}}}t(St,"inspectNode");function Nt(Z,xt){xt=xt||{};let Dt=new he(xt);if(!Dt.noRefs)Mt(Z,Dt);let Ft=Z;if(Dt.replacer)Ft=Dt.replacer.call({"":Ft},"",Ft);if(_t(Dt,0,Ft,!0,!0))return Dt.dump+`
160
- `;return""}return t(Nt,"dump2"),qu.dump=Nt,qu}t(Ug,"requireDumper");var Wg;function jg(){if(Wg)return mr;Wg=1;let r=Yg(),e=Ug();function i(s,o){return function(){throw Error("Function yaml."+s+" is removed in js-yaml 4. Use yaml."+o+" instead, which is now safe by default.")}}return t(i,"renamed"),mr.Type=yr(),mr.Schema=Nu(),mr.FAILSAFE_SCHEMA=Yu(),mr.JSON_SCHEMA=Vu(),mr.CORE_SCHEMA=Ku(),mr.DEFAULT_SCHEMA=Il(),mr.load=r.load,mr.loadAll=r.loadAll,mr.dump=e.dump,mr.YAMLException=As(),mr.types={binary:Ju(),float:Xu(),map:Hu(),null:Uu(),pairs:ef(),set:rf(),timestamp:Zu(),bool:ju(),int:Gu(),merge:Qu(),omap:tf(),seq:zu(),str:Wu()},mr.safeLoad=i("safeLoad","load"),mr.safeLoadAll=i("safeLoadAll","loadAll"),mr.safeDump=i("safeDump","dump"),mr}t(jg,"requireJsYaml");var t2=jg(),e2=zg(t2),{Type:I3,Schema:$3,FAILSAFE_SCHEMA:D3,JSON_SCHEMA:et,CORE_SCHEMA:P3,DEFAULT_SCHEMA:R3,load:tt,loadAll:q3,dump:N3,YAMLException:W3,types:z3,safeLoad:H3,safeLoadAll:Y3,safeDump:U3}=e2;var za=t((r,e)=>{let{theme:i,themeVariables:s}=e,{useGradient:o,gradientStart:n,gradientStop:c}=s??{},h=r.attr("id"),g=i?.includes("dark")?"#FFFFFF":"#000000",y=t((B,v,q)=>r.append("defs").append("filter").attr("id",B).attr("height",v).attr("width",v).append("feDropShadow").attr("dx",q).attr("dy",q).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",g),"dropShadow");if(y(`${h}-drop-shadow`,"130%","4"),y(`${h}-drop-shadow-small`,"150%","2"),!o)return;let f=r.append("linearGradient").attr("id",`${h}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");f.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),f.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)},"insertLookDefs");var Gg=t((r)=>{let{handDrawnSeed:e}=l();return{fill:r,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:0.7,stroke:r,seed:e}},"solidStateFill"),r2=t((r)=>{if(Array.isArray(r))return r;if(!r)return[];return r.split(";").map((e)=>e.trim()).filter(Boolean)},"normalizeStyleList"),Di=t((r)=>{let e=i2([...r.cssCompiledStyles||[],...r.cssStyles||[],...r2(r.labelStyle)]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),i2=t((r)=>{let e=new Map;return r.forEach((i)=>{let[s,o]=i.split(":");e.set(s.trim(),o?.trim())}),e},"styles2Map"),Zr=t((r)=>r==="color"||r==="font-size"||r==="font-family"||r==="font-weight"||r==="font-style"||r==="text-decoration"||r==="text-align"||r==="text-transform"||r==="line-height"||r==="letter-spacing"||r==="word-spacing"||r==="text-shadow"||r==="text-overflow"||r==="white-space"||r==="word-wrap"||r==="word-break"||r==="overflow-wrap"||r==="hyphens","isLabelStyle"),k=t((r)=>{let{stylesArray:e}=Di(r),i=[],s=[],o=[],n=[];return e.forEach((c)=>{let h=c[0];if(Zr(h))i.push(c.join(":")+" !important");else{if(s.push(c.join(":")+" !important"),h.includes("stroke"))o.push(c.join(":")+" !important");if(h==="fill")n.push(c.join(":")+" !important")}}),{labelStyles:i.join(";"),nodeStyles:s.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:n}},"styles2String"),Gt=t((r,e)=>{let{themeVariables:i,handDrawnSeed:s}=l(),{nodeBorder:o,mainBkg:n}=i,{stylesMap:c}=Di(r);return Object.assign({roughness:0.7,fill:c.get("fill")||n,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:c.get("stroke")||o,seed:s,strokeWidth:c.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:o2(c.get("stroke-dasharray"))},e)},"userNodeOverrides"),o2=t((r)=>{if(!r)return[0,0];let e=r.trim().split(/\s+/).map(Number);if(e.length===1){let o=isNaN(e[0])?0:e[0];return[o,o]}let i=isNaN(e[0])?0:e[0],s=isNaN(e[1])?0:e[1];return[i,s]},"getStrokeDashArray");var of=(r,e,i,s="")=>{let o=r.split(":");if(r.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;s=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){let h=o.pop(),g=o.pop(),y={provider:o.length>0?o[0]:s,prefix:g,name:h};return e&&!$l(y)?null:y}let n=o[0],c=n.split("-");if(c.length>1){let h={provider:s,prefix:c.shift(),name:c.join("-")};return e&&!$l(h)?null:h}if(i&&s===""){let h={provider:s,prefix:"",name:n};return e&&!$l(h,i)?null:h}return null},$l=(r,e)=>{if(!r)return!1;return!!((e&&r.prefix===""||!!r.prefix)&&!!r.name)};var s2=Object.freeze({left:0,top:0,width:16,height:16}),Ms=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),sf=Object.freeze({...s2,...Ms}),Xg=Object.freeze({...sf,body:"",hidden:!1});function Vg(r,e){let i={};if(!r.hFlip!==!e.hFlip)i.hFlip=!0;if(!r.vFlip!==!e.vFlip)i.vFlip=!0;let s=((r.rotate||0)+(e.rotate||0))%4;if(s)i.rotate=s;return i}function af(r,e){let i=Vg(r,e);for(let s in Xg)if(s in Ms){if(s in r&&!(s in i))i[s]=Ms[s]}else if(s in e)i[s]=e[s];else if(s in r)i[s]=r[s];return i}function Kg(r,e){let i=r.icons,s=r.aliases||Object.create(null),o=Object.create(null);function n(c){if(i[c])return o[c]=[];if(!(c in o)){o[c]=null;let h=s[c]&&s[c].parent,g=h&&n(h);if(g)o[c]=[h].concat(g)}return o[c]}return(e||Object.keys(i).concat(Object.keys(s))).forEach(n),o}function Zg(r,e,i){let s=r.icons,o=r.aliases||Object.create(null),n={};function c(h){n=af(s[h]||o[h],n)}return c(e),i.forEach(c),af(r,n)}function nf(r,e){if(r.icons[e])return Zg(r,e,[]);let i=Kg(r,[e])[e];return i?Zg(r,e,i):null}var a2=Object.freeze({width:null,height:null}),Qg=Object.freeze({...a2,...Ms});var n2=/(-?[0-9.]*[0-9]+[0-9.]*)/g,l2=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function lf(r,e,i){if(e===1)return r;if(i=i||100,typeof r==="number")return Math.ceil(r*e*i)/i;if(typeof r!=="string")return r;let s=r.split(n2);if(s===null||!s.length)return r;let o=[],n=s.shift(),c=l2.test(n);while(!0){if(c){let h=parseFloat(n);if(isNaN(h))o.push(n);else o.push(Math.ceil(h*e*i)/i)}else o.push(n);if(n=s.shift(),n===void 0)return o.join("");c=!c}}function h2(r,e="defs"){let i="",s=r.indexOf("<"+e);while(s>=0){let o=r.indexOf(">",s),n=r.indexOf("</"+e);if(o===-1||n===-1)break;let c=r.indexOf(">",n);if(c===-1)break;i+=r.slice(o+1,n).trim(),r=r.slice(0,s).trim()+r.slice(c+1)}return{defs:i,content:r}}function c2(r,e){return r?"<defs>"+r+"</defs>"+e:e}function Jg(r,e,i){let s=h2(r);return c2(s.defs,e+s.content+i)}var u2=(r)=>r==="unset"||r==="undefined"||r==="none";function hf(r,e){let i={...sf,...r},s={...Qg,...e},o={left:i.left,top:i.top,width:i.width,height:i.height},n=i.body;[i,s].forEach((H)=>{let Y=[],{hFlip:j,vFlip:X,rotate:Q}=H;if(j)if(X)Q+=2;else Y.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),Y.push("scale(-1 1)"),o.top=o.left=0;else if(X)Y.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),Y.push("scale(1 -1)"),o.top=o.left=0;let rt;if(Q<0)Q-=Math.floor(Q/4)*4;switch(Q=Q%4,Q){case 1:rt=o.height/2+o.top,Y.unshift("rotate(90 "+rt.toString()+" "+rt.toString()+")");break;case 2:Y.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:rt=o.width/2+o.left,Y.unshift("rotate(-90 "+rt.toString()+" "+rt.toString()+")")}if(Q%2===1){if(o.left!==o.top)rt=o.left,o.left=o.top,o.top=rt;if(o.width!==o.height)rt=o.width,o.width=o.height,o.height=rt}if(Y.length)n=Jg(n,'<g transform="'+Y.join(" ")+'">',"</g>")});let{width:c,height:h}=s,{width:g,height:y}=o,f,B;if(c===null)B=h===null?"1em":h==="auto"?y:h,f=lf(B,g/y);else f=c==="auto"?g:c,B=h===null?lf(f,y/g):h==="auto"?y:h;let v={},q=(H,Y)=>{if(!u2(Y))v[H]=Y.toString()};q("width",f),q("height",B);let W=[o.left,o.top,g,y];return v.viewBox=W.join(" "),{attributes:v,viewBox:W,body:n}}var f2=/\sid="(\S+)"/g,tm=new Map;function d2(r){r=r.replace(/[0-9]+$/,"")||"a";let e=tm.get(r)||0;return tm.set(r,e+1),e?`${r}${e}`:r}function cf(r){let e=[],i;while(i=f2.exec(r))e.push(i[1]);if(!e.length)return r;let s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach((o)=>{let n=d2(o),c=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+n+s+"$3")}),r=r.replace(new RegExp(s,"g"),""),r}function uf(r,e){let i=r.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let s in e)i+=" "+s+'="'+e[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+i+">"+r+"</svg>"}var Gi={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},ff=new Map,em=new Map,Ln=t((r)=>{for(let e of r){if(!e.name)throw Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(a.debug("Registering icon pack:",e.name),"loader"in e)em.set(e.name,e.loader);else if("icons"in e)ff.set(e.name,e.icons);else throw a.error("Invalid icon loader:",e),Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),rm=t(async(r,e)=>{let i=of(r,!0,e!==void 0);if(!i)throw Error(`Invalid icon name: ${r}`);let s=i.prefix||e;if(!s)throw Error(`Icon name must contain a prefix: ${r}`);let o=ff.get(s);if(!o){let c=em.get(s);if(!c)throw Error(`Icon set not found: ${i.prefix}`);try{o={...await c(),prefix:s},ff.set(s,o)}catch(h){throw a.error(h),Error(`Failed to load icon set: ${i.prefix}`)}}let n=nf(o,i.name);if(!n)throw Error(`Icon not found: ${r}`);return n},"getRegisteredIconData"),Dl=t(async(r)=>{try{return await rm(r),!0}catch{return!1}},"isIconAvailable"),nt=t(async(r,e,i)=>{let s;try{s=await rm(r,e?.fallbackPrefix)}catch(c){a.error(c),s=Gi}let o=hf(s,e),n=uf(cf(o.body),{...o.attributes,...i});return O(n,x())},"getIconSVG");var xm=Se(Gn(),1);function is(r,e){if(typeof r!=="function"||e!=null&&typeof e!=="function")throw TypeError("Expected a function");let i=function(...s){let o=e?e.apply(this,s):s[0],n=i.cache;if(n.has(o))return n.get(o);let c=r.apply(this,s);return i.cache=n.set(o,c)||n,c};return i.cache=new(is.Cache||Map),i}is.Cache=Map;function In(r){return r==null||typeof r!=="object"&&typeof r!=="function"}function cn(r){if(r==null)return r===void 0?"[object Undefined]":"[object Null]";return Object.prototype.toString.call(r)}var Ua="[object RegExp]",Ar="[object String]",Rr="[object Number]",Lr="[object Boolean]",Ir="[object Arguments]",ja="[object Symbol]",qa="[object Date]",Va="[object Map]",Wa="[object Set]",Ga="[object Array]";var Ha="[object ArrayBuffer]",Ya="[object Object]";var Za="[object DataView]",Xa="[object Uint8Array]",Ka="[object Uint8ClampedArray]",Qa="[object Uint16Array]",Ja="[object Uint32Array]";var ei="[object Int8Array]",ti="[object Int16Array]",ni="[object Int32Array]";var ri="[object Float32Array]",ai="[object Float64Array]";function Es(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function un(r){return Es(r)}function lm(){}function hm(r){if(In(r))return r;if(Array.isArray(r)||Es(r)||r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);let e=Object.getPrototypeOf(r);if(e==null)return Object.assign(Object.create(e),r);let i=e.constructor;if(r instanceof Date||r instanceof Map||r instanceof Set)return new i(r);if(r instanceof RegExp){let s=new i(r);return s.lastIndex=r.lastIndex,s}if(r instanceof DataView)return new i(r.buffer.slice(0));if(r instanceof Error){let s;if(r instanceof AggregateError)s=new i(r.errors,r.message,{cause:r.cause});else s=new i(r.message,{cause:r.cause});return s.stack=r.stack,Object.assign(s,r),s}if(typeof File<"u"&&r instanceof File)return new i([r],r.name,{type:r.type,lastModified:r.lastModified});if(typeof r==="object")return Object.assign(Object.create(e),r);return r}function Pl(r){return Object.getOwnPropertySymbols(r).filter((e)=>Object.prototype.propertyIsEnumerable.call(r,e))}var df=typeof globalThis==="object"&&globalThis||typeof window==="object"&&window||typeof self==="object"&&self||typeof global==="object"&&global||function(){return this}();function Dr(r){return typeof df.Buffer<"u"&&df.Buffer.isBuffer(r)}function cm(r){return r==="__proto__"}function Rl(r){if(typeof r!=="object")return!1;if(r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){let i=r[Symbol.toStringTag];if(i==null)return!1;if(!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable)return!1;return r.toString()===`[object ${i}]`}let e=r;while(Object.getPrototypeOf(e)!==null)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(r)===e}function um(r,e){return Os(r,void 0,r,new Map,e)}function Os(r,e,i,s=new Map,o=void 0){let n=o?.(r,e,i,s);if(n!==void 0)return n;if(In(r))return r;if(s.has(r))return s.get(r);if(Array.isArray(r)){let c=Array(r.length);s.set(r,c);for(let h=0;h<r.length;h++)c[h]=Os(r[h],h,i,s,o);if(Object.hasOwn(r,"index"))c.index=r.index;if(Object.hasOwn(r,"input"))c.input=r.input;return c}if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp){let c=new RegExp(r.source,r.flags);return c.lastIndex=r.lastIndex,c}if(r instanceof Map){let c=new Map;s.set(r,c);for(let[h,g]of r)c.set(h,Os(g,h,i,s,o));return c}if(r instanceof Set){let c=new Set;s.set(r,c);for(let h of r)c.add(Os(h,void 0,i,s,o));return c}if(Dr(r))return r.subarray();if(Es(r)){let c=new(Object.getPrototypeOf(r)).constructor(r.length);s.set(r,c);for(let h=0;h<r.length;h++)c[h]=Os(r[h],h,i,s,o);return c}if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);if(r instanceof DataView){let c=new DataView(r.buffer.slice(0),r.byteOffset,r.byteLength);return s.set(r,c),yi(c,r,i,s,o),c}if(typeof File<"u"&&r instanceof File){let c=new File([r],r.name,{type:r.type});return s.set(r,c),yi(c,r,i,s,o),c}if(typeof Blob<"u"&&r instanceof Blob){let c=new Blob([r],{type:r.type});return s.set(r,c),yi(c,r,i,s,o),c}if(r instanceof Error){let c=structuredClone(r);return s.set(r,c),c.message=r.message,c.name=r.name,c.stack=r.stack,c.cause=r.cause,c.constructor=r.constructor,yi(c,r,i,s,o),c}if(r instanceof Boolean){let c=new Boolean(r.valueOf());return s.set(r,c),yi(c,r,i,s,o),c}if(r instanceof Number){let c=new Number(r.valueOf());return s.set(r,c),yi(c,r,i,s,o),c}if(r instanceof String){let c=new String(r.valueOf());return s.set(r,c),yi(c,r,i,s,o),c}if(typeof r==="object"&&B2(r)){let c=Object.create(Object.getPrototypeOf(r));return s.set(r,c),yi(c,r,i,s,o),c}return r}function yi(r,e,i=r,s,o){let n=[...Object.keys(e),...Pl(e)];for(let c=0;c<n.length;c++){let h=n[c],g=Object.getOwnPropertyDescriptor(r,h);if(g==null||g.writable)r[h]=Os(e[h],h,i,s,o)}}function B2(r){switch(cn(r)){case Ir:case Ga:case Ha:case Za:case Lr:case qa:case ri:case ai:case ei:case ti:case ni:case Va:case Rr:case Ya:case Ua:case Wa:case Ar:case ja:case Xa:case Ka:case Qa:case Ja:return!0;default:return!1}}function fm(r,e){return um(r,(i,s,o,n)=>{let c=e?.(i,s,o,n);if(c!==void 0)return c;if(typeof r!=="object")return;if(cn(r)==="[object Object]"&&typeof r.constructor!=="function"){let h={};return n.set(r,h),yi(h,r,o,n),h}switch(Object.prototype.toString.call(r)){case Rr:case Ar:case Lr:{let h=new r.constructor(r?.valueOf());return yi(h,r),h}case Ir:{let h={};return yi(h,r),h.length=r.length,h[Symbol.iterator]=r[Symbol.iterator],h}default:return}})}function pf(r){return fm(r)}function Xr(r){return r!==null&&typeof r==="object"&&cn(r)==="[object Arguments]"}function La(r){return typeof r==="object"&&r!==null}function dm(r){return Number.isSafeInteger(r)&&r>=0}function ii(r){return r!=null&&typeof r!=="function"&&dm(r.length)}function pm(r){return La(r)&&ii(r)}function gm(r,...e){let i=e.slice(0,-1),s=e[e.length-1],o=r;for(let n=0;n<i.length;n++){let c=i[n];o=ql(o,c,s,new Map)}return o}function ql(r,e,i,s){if(In(r))r=Object(r);if(e==null||typeof e!=="object")return r;if(s.has(e))return hm(s.get(e));if(s.set(e,r),Array.isArray(e)){e=e.slice();for(let n=0;n<e.length;n++)if(!(n in e))e[n]=void 0}let o=[...Object.keys(e),...Pl(e)];for(let n=0;n<o.length;n++){let c=o[n];if(cm(c))continue;let h=e[c],g=r[c];if(Xr(h))h={...h};if(Xr(g))g={...g};if(Dr(h))h=pf(h);if(Array.isArray(h))if(Array.isArray(g)){let f=[],B=Reflect.ownKeys(g);for(let v=0;v<B.length;v++){let q=B[v];f[q]=g[q]}g=f}else if(pm(g)){let f=[];for(let B=0;B<g.length;B++)f[B]=g[B];g=f}else g=[];let y=i(g,h,c,r,e,s);if(y!==void 0)r[c]=y;else if(Array.isArray(h))r[c]=ql(g,h,i,s);else if(La(g)&&La(h)&&(Rl(g)||Rl(h)||un(g)||un(h)))r[c]=ql(g,h,i,s);else if(g==null&&Rl(h))r[c]=ql({},h,i,s);else if(g==null&&un(h))r[c]=pf(h);else if(g===void 0||h!==void 0)r[c]=h}return r}function gf(r,...e){return gm(r,...e,lm)}var Hi="​",v2={curveBasis:rs,curveBasisClosed:_l,curveBasisOpen:Bl,curveBumpX:Wn,curveBumpY:xa,curveBundle:cu,curveCardinalClosed:uu,curveCardinalOpen:fu,curveCardinal:ba,curveCatmullRomClosed:du,curveCatmullRomOpen:pu,curveCatmullRom:wa,curveLinear:Ii,curveLinearClosed:Al,curveMonotoneX:Sa,curveMonotoneY:Ta,curveNatural:vs,curveStep:Ls,curveStepAfter:va,curveStepBefore:_a},L2=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,F2=t(function(r,e){let i=Cm(r,/(?:init\b)|(?:initialize\b)/),s={};if(Array.isArray(i)){let c=i.map((h)=>h.args);Js(c),s=oe(s,[...c])}else s=i.args;if(!s)return;let o=xr(r,e),n="config";if(s[n]!==void 0){if(o==="flowchart-v2")o="flowchart";s[o]=s[n],delete s[n]}return s},"detectInit"),Cm=t(function(r,e=null){try{let i=new RegExp(`[%]{2}(?![{]${L2.source})(?=[}][%]{2}).*
161
- `,"ig");r=r.trim().replace(i,"").replace(/'/gm,'"'),a.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${r}`);let s,o=[];while((s=ms.exec(r))!==null){if(s.index===ms.lastIndex)ms.lastIndex++;if(s&&!e||e&&s[1]?.match(e)||e&&s[2]?.match(e)){let n=s[1]?s[1]:s[2],c=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;o.push({type:n,args:c})}}if(o.length===0)return{type:r,args:null};return o.length===1?o[0]:o}catch(i){return a.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${r}'`),{type:void 0,args:null}}},"detectDirective"),_o=t(function(r){return r.replace(ms,"")},"removeDirectives"),A2=t(function(r,e){for(let[i,s]of e.entries())if(s.match(r))return i;return-1},"isSubstringInArray");function Wl(r,e){if(!r)return e;let i=`curve${r.charAt(0).toUpperCase()+r.slice(1)}`;return v2[i]??e}t(Wl,"interpolateToCurve");function bm(r,e){let i=r.trim();if(!i)return;if(e.securityLevel!=="loose")return xm.sanitizeUrl(i);return i}t(bm,"formatUrl");var M2=t((r,...e)=>{let i=r.split("."),s=i.length-1,o=i[s],n=window;for(let c=0;c<s;c++)if(n=n[i[c]],!n){a.error(`Function name: ${r} not found in window`);return}n[o](...e)},"runFunc");function mf(r,e){if(!r||!e)return 0;return Math.sqrt(Math.pow(e.x-r.x,2)+Math.pow(e.y-r.y,2))}t(mf,"distance");function km(r){let e,i=0;r.forEach((o)=>{i+=mf(o,e),e=o});let s=i/2;return yf(r,s)}t(km,"traverseEdge");function wm(r){if(r.length===1)return r[0];return km(r)}t(wm,"calcLabelPosition");var mm=t((r,e=2)=>{let i=Math.pow(10,e);return Math.round(r*i)/i},"roundNumber"),yf=t((r,e)=>{let i=void 0,s=e;for(let o of r){if(i){let n=mf(o,i);if(n===0)return i;if(n<s)s-=n;else{let c=s/n;if(c<=0)return i;if(c>=1)return{x:o.x,y:o.y};if(c>0&&c<1)return{x:mm((1-c)*i.x+c*o.x,5),y:mm((1-c)*i.y+c*o.y,5)}}}i=o}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),E2=t((r,e,i)=>{if(a.info(`our points ${JSON.stringify(e)}`),e[0]!==i)e=e.reverse();let o=yf(e,25),n=r?10:5,c=Math.atan2(e[0].y-o.y,e[0].x-o.x),h={x:0,y:0};return h.x=Math.sin(c)*n+(e[0].x+o.x)/2,h.y=-Math.cos(c)*n+(e[0].y+o.y)/2,h},"calcCardinalityPosition");function Sm(r,e,i){let s=structuredClone(i);if(a.info("our points",s),e!=="start_left"&&e!=="start_right")s.reverse();let o=25+r,n=yf(s,o),c=10+r*0.5,h=Math.atan2(s[0].y-n.y,s[0].x-n.x),g={x:0,y:0};if(e==="start_left")g.x=Math.sin(h+Math.PI)*c+(s[0].x+n.x)/2,g.y=-Math.cos(h+Math.PI)*c+(s[0].y+n.y)/2;else if(e==="end_right")g.x=Math.sin(h-Math.PI)*c+(s[0].x+n.x)/2,g.y=-Math.cos(h-Math.PI)*c+(s[0].y+n.y)/2;else if(e==="end_left")g.x=Math.sin(h)*c+(s[0].x+n.x)/2,g.y=-Math.cos(h)*c+(s[0].y+n.y)/2;else g.x=Math.sin(h)*c+(s[0].x+n.x)/2,g.y=-Math.cos(h)*c+(s[0].y+n.y)/2;return g}t(Sm,"calcTerminalLabelPosition");function oi(r){let e="",i="";for(let s of r)if(s!==void 0)if(s.startsWith("color:")||s.startsWith("text-align:"))i=i+s+";";else e=e+s+";";return{style:e,labelStyle:i}}t(oi,"getStylesFromArray");var ym=0,Yi=t(()=>(ym++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ym),"generateId");function Tm(r){let e="",i="0123456789abcdef",s=i.length;for(let o=0;o<r;o++)e+=i.charAt(Math.floor(Math.random()*s));return e}t(Tm,"makeRandomHex");var Zi=t((r)=>Tm(r.length),"random"),O2=t(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"),I2=t(function(r,e){let i=e.text.replace(b.lineBreakRegex," "),[,s]=We(e.fontSize),o=r.append("text");if(o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",s),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),e.class!==void 0)o.attr("class",e.class);let n=o.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.attr("fill",e.fill),n.text(i),o},"drawSimpleText"),Dn=is((r,e,i)=>{if(!r)return r;if(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),b.hasBreaks(r))return r;let s=r.split(" ").filter(Boolean),o=[],n="";return s.forEach((c,h)=>{let g=He(`${c} `,i),y=He(n,i);if(g>e){let{hyphenatedStrings:v,remainingWord:q}=$2(c,e,"-",i);o.push(n,...v),n=q}else if(y+g>=e)o.push(n),n=c;else n=[n,c].filter(Boolean).join(" ");if(h+1===s.length)o.push(n)}),o.filter((c)=>c!=="").join(i.joinWith)},(r,e,i)=>`${r}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),$2=is((r,e,i="-",s)=>{s=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},s);let o=[...r],n=[],c="";return o.forEach((h,g)=>{let y=`${c}${h}`;if(He(y,s)>=e){let B=g+1,v=o.length===B,q=`${y}${i}`;n.push(v?y:q),c=""}else c=y}),{hyphenatedStrings:n,remainingWord:c}},(r,e,i="-",s)=>`${r}${e}${i}${s.fontSize}${s.fontWeight}${s.fontFamily}`);function Kr(r,e){return Qr(r,e).height}t(Kr,"calculateTextHeight");function He(r,e){return Qr(r,e).width}t(He,"calculateTextWidth");var Qr=is((r,e)=>{let{fontSize:i=12,fontFamily:s="Arial",fontWeight:o=400}=e;if(!r)return{width:0,height:0};let[,n]=We(i),c=["sans-serif",s],h=r.split(b.lineBreakRegex),g=[],y=p("body");if(!y.remove)return{width:0,height:0,lineHeight:0};let f=y.append("svg");for(let v of c){let q=0,W={width:0,height:0,lineHeight:0};for(let H of h){let Y=O2();Y.text=H||Hi;let j=I2(f,Y).style("font-size",n).style("font-weight",o).style("font-family",v),X=(j._groups||j)[0][0].getBBox();if(X.width===0&&X.height===0)throw Error("svg element not in render tree");W.width=Math.round(Math.max(W.width,X.width)),q=Math.round(X.height),W.height+=q,W.lineHeight=Math.round(Math.max(W.lineHeight,q))}g.push(W)}f.remove();let B=isNaN(g[1].height)||isNaN(g[1].width)||isNaN(g[1].lineHeight)||g[0].height>g[1].height&&g[0].width>g[1].width&&g[0].lineHeight>g[1].lineHeight?0:1;return g[B]},(r,e)=>`${r}${e.fontSize}${e.fontWeight}${e.fontFamily}`),D2=class{constructor(r=!1,e){this.count=0,this.count=e?e.length:0,this.next=r?()=>this.count++:()=>Date.now()}static{t(this,"InitIDGenerator")}},Nl,P2=t(function(r){return Nl=Nl||document.createElement("div"),r=escape(r).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Nl.innerHTML=r,unescape(Nl.textContent)},"entityDecode");function si(r){return"str"in r}t(si,"isDetailedError");function Xi(r){if(r instanceof Error)return r.message;return String(r)}t(Xi,"getErrorMessage");var R2=t((r,e,i,s)=>{if(!s)return;let o=r.node()?.getBBox();if(!o)return;r.append("text").text(s).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-i).attr("class",e)},"insertTitle"),We=t((r)=>{if(typeof r==="number")return[r,r+"px"];let e=parseInt(r??"",10);if(Number.isNaN(e))return[void 0,void 0];else if(r===String(e))return[e,r+"px"];else return[e,r]},"parseFontSize");function U(r,e){return gf({},r,e)}t(U,"cleanAndMerge");var M={assignWithDepth:oe,wrapLabel:Dn,calculateTextHeight:Kr,calculateTextWidth:He,calculateTextDimensions:Qr,cleanAndMerge:U,detectInit:F2,detectDirective:Cm,isSubstringInArray:A2,interpolateToCurve:Wl,calcLabelPosition:wm,calcCardinalityPosition:E2,calcTerminalLabelPosition:Sm,formatUrl:bm,getStylesFromArray:oi,generateId:Yi,random:Zi,runFunc:M2,entityDecode:P2,insertTitle:R2,isLabelCoordinateInPath:_m,parseFontSize:We,InitIDGenerator:D2},wo=t(function(r){let e=r;return e=e.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/#\w+;/g,function(i){let s=i.substring(1,i.length-1);if(/^\+?\d+$/.test(s))return"fl°°"+s+"¶ß";else return"fl°"+s+"¶ß"}),e},"encodeEntities"),jt=t(function(r){return r.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),ze=t((r,e,{counter:i=0,prefix:s,suffix:o},n)=>{if(n)return n;return`${s?`${s}_`:""}${r}_${e}_${i}${o?`_${o}`:""}`},"getEdgeId");function tr(r){return r??null}t(tr,"handleUndefinedAttr");function _m(r,e){let i=Math.round(r.x),s=Math.round(r.y),o=e.replace(/(\d+\.\d+)/g,(n)=>Math.round(parseFloat(n)).toString());return o.includes(i.toString())||o.includes(s.toString())}t(_m,"isLabelCoordinateInPath");function Cf(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ss=Cf();function Em(r){ss=r}var rn={exec:()=>null};function $e(r,e=""){let i=typeof r=="string"?r:r.source,s={replace:(o,n)=>{let c=typeof n=="string"?n:n.source;return c=c.replace(Or.caret,"$1"),i=i.replace(o,c),s},getRegex:()=>new RegExp(i,e)};return s}var q2=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Or={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:(r)=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},N2=/^(?:[ \t]*(?:\n|$))+/,W2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,z2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,an=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,H2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,bf=/(?:[*+-]|\d{1,9}[.)])/,Om=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Im=$e(Om).replace(/bull/g,bf).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(),Y2=$e(Om).replace(/bull/g,bf).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(),kf=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,U2=/^[^\n]+/,wf=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,j2=$e(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",wf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),G2=$e(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,bf).getRegex(),jl="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",Sf=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,X2=$e("^ {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[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",Sf).replace("tag",jl).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),$m=$e(kf).replace("hr",an).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",jl).getRegex(),V2=$e(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",$m).getRegex(),Tf={blockquote:V2,code:W2,def:j2,fences:z2,heading:H2,hr:an,html:X2,lheading:Im,list:G2,newline:N2,paragraph:$m,table:rn,text:U2},Bm=$e("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",an).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\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",jl).getRegex(),K2={...Tf,lheading:Y2,table:Bm,paragraph:$e(kf).replace("hr",an).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Bm).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",jl).getRegex()},Z2={...Tf,html:$e(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Sf).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:rn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:$e(kf).replace("hr",an).replace("heading",` *#{1,6} *[^
162
- ]`).replace("lheading",Im).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Q2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,J2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Dm=/^( {2,}|\\)\n(?!\s*$)/,tw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Gl=/[\p{P}\p{S}]/u,_f=/[\s\p{P}\p{S}]/u,Pm=/[^\s\p{P}\p{S}]/u,ew=$e(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,_f).getRegex(),Rm=/(?!~)[\p{P}\p{S}]/u,rw=/(?!~)[\s\p{P}\p{S}]/u,iw=/(?:[^\s\p{P}\p{S}]|~)/u,ow=$e(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",q2?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),qm=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,sw=$e(qm,"u").replace(/punct/g,Gl).getRegex(),aw=$e(qm,"u").replace(/punct/g,Rm).getRegex(),Nm="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",nw=$e(Nm,"gu").replace(/notPunctSpace/g,Pm).replace(/punctSpace/g,_f).replace(/punct/g,Gl).getRegex(),lw=$e(Nm,"gu").replace(/notPunctSpace/g,iw).replace(/punctSpace/g,rw).replace(/punct/g,Rm).getRegex(),hw=$e("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Pm).replace(/punctSpace/g,_f).replace(/punct/g,Gl).getRegex(),cw=$e(/\\(punct)/,"gu").replace(/punct/g,Gl).getRegex(),uw=$e(/^<(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(),fw=$e(Sf).replace("(?:-->|$)","-->").getRegex(),dw=$e("^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",fw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Hl=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,pw=$e(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Hl).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Wm=$e(/^!?\[(label)\]\[(ref)\]/).replace("label",Hl).replace("ref",wf).getRegex(),zm=$e(/^!?\[(ref)\](?:\[\])?/).replace("ref",wf).getRegex(),gw=$e("reflink|nolink(?!\\()","g").replace("reflink",Wm).replace("nolink",zm).getRegex(),vm=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Bf={_backpedal:rn,anyPunctuation:cw,autolink:uw,blockSkip:ow,br:Dm,code:J2,del:rn,emStrongLDelim:sw,emStrongRDelimAst:nw,emStrongRDelimUnd:hw,escape:Q2,link:pw,nolink:zm,punctuation:ew,reflink:Wm,reflinkSearch:gw,tag:dw,text:tw,url:rn},mw={...Bf,link:$e(/^!?\[(label)\]\((.*?)\)/).replace("label",Hl).getRegex(),reflink:$e(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Hl).getRegex()},xf={...Bf,emStrongRDelimAst:lw,emStrongLDelim:aw,url:$e(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",vm).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:$e(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",vm).getRegex()},yw={...xf,br:$e(Dm).replace("{2,}","*").getRegex(),text:$e(xf.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},zl={normal:Tf,gfm:K2,pedantic:Z2},Aa={normal:Bf,gfm:xf,breaks:yw,pedantic:mw},xw={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Lm=(r)=>xw[r];function Pi(r,e){if(e){if(Or.escapeTest.test(r))return r.replace(Or.escapeReplace,Lm)}else if(Or.escapeTestNoEncode.test(r))return r.replace(Or.escapeReplaceNoEncode,Lm);return r}function Fm(r){try{r=encodeURI(r).replace(Or.percentDecode,"%")}catch{return null}return r}function Am(r,e){let i=r.replace(Or.findPipe,(n,c,h)=>{let g=!1,y=c;for(;--y>=0&&h[y]==="\\";)g=!g;return g?"|":" |"}),s=i.split(Or.splitPipe),o=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;o<s.length;o++)s[o]=s[o].trim().replace(Or.slashPipe,"|");return s}function Ea(r,e,i){let s=r.length;if(s===0)return"";let o=0;for(;o<s;){let n=r.charAt(s-o-1);if(n===e&&!i)o++;else if(n!==e&&i)o++;else break}return r.slice(0,s-o)}function Cw(r,e){if(r.indexOf(e[1])===-1)return-1;let i=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])i++;else if(r[s]===e[1]&&(i--,i<0))return s;return i>0?-2:-1}function Mm(r,e,i,s,o){let n=e.href,c=e.title||null,h=r[1].replace(o.other.outputLinkReplace,"$1");s.state.inLink=!0;let g={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:n,title:c,text:h,tokens:s.inlineTokens(h)};return s.state.inLink=!1,g}function bw(r,e,i){let s=r.match(i.other.indentCodeCompensation);if(s===null)return e;let o=s[1];return e.split(`
151
+ `)?"+":Mt?"":"-";return Pt+Nt+`
152
+ `}t(dr,"blockHeader");function gi(Z){return Z[Z.length-1]===`
153
+ `?Z.slice(0,-1):Z}t(gi,"dropEndingNewline");function Ro(Z,mt){let Pt=/(\n+)([^\n]*)/g,Mt=function(){let te=Z.indexOf(`
154
+ `);return te=te!==-1?te:Z.length,Pt.lastIndex=te,nr(Z.slice(0,te),mt)}(),It=Z[0]===`
155
+ `||Z[0]===" ",Nt,Rt;while(Rt=Pt.exec(Z)){let te=Rt[1],Vt=Rt[2];Nt=Vt[0]===" ",Mt+=te+(!It&&!Nt&&Vt!==""?`
156
+ `:"")+nr(Vt,mt),It=Nt}return Mt}t(Ro,"foldString");function nr(Z,mt){if(Z===""||Z[0]===" ")return Z;let Pt=/ [^ ]/g,Mt,It=0,Nt,Rt=0,te=0,Vt="";while(Mt=Pt.exec(Z)){if(te=Mt.index,te-It>mt)Nt=Rt>It?Rt:te,Vt+=`
157
+ `+Z.slice(It,Nt),It=Nt+1;Rt=te}if(Vt+=`
158
+ `,Z.length-It>mt&&Rt>It)Vt+=Z.slice(It,Rt)+`
159
+ `+Z.slice(Rt+1);else Vt+=Z.slice(It);return Vt.slice(1)}t(nr,"foldLine");function qo(Z){let mt="",Pt=0;for(let Mt=0;Mt<Z.length;Pt>=65536?Mt+=2:Mt++){Pt=Qe(Z,Mt);let It=at[Pt];if(!It&&Ht(Pt)){if(mt+=Z[Mt],Pt>=65536)mt+=Z[Mt+1]}else mt+=It||At(Pt)}return mt}t(qo,"escapeString");function vi(Z,mt,Pt){let Mt="",It=Z.tag;for(let Nt=0,Rt=Pt.length;Nt<Rt;Nt+=1){let te=Pt[Nt];if(Z.replacer)te=Z.replacer.call(Pt,String(Nt),te);if(Bt(Z,mt,te,!1,!1)||typeof te>"u"&&Bt(Z,mt,null,!1,!1)){if(Mt!=="")Mt+=","+(!Z.condenseFlow?" ":"");Mt+=Z.dump}}Z.tag=It,Z.dump="["+Mt+"]"}t(vi,"writeFlowSequence");function no(Z,mt,Pt,Mt){let It="",Nt=Z.tag;for(let Rt=0,te=Pt.length;Rt<te;Rt+=1){let Vt=Pt[Rt];if(Z.replacer)Vt=Z.replacer.call(Pt,String(Rt),Vt);if(Bt(Z,mt+1,Vt,!0,!0,!1,!0)||typeof Vt>"u"&&Bt(Z,mt+1,null,!0,!0,!1,!0)){if(!Mt||It!=="")It+=Ae(Z,mt);if(Z.dump&&h===Z.dump.charCodeAt(0))It+="-";else It+="- ";It+=Z.dump}}Z.tag=Nt,Z.dump=It||"[]"}t(no,"writeBlockSequence");function So(Z,mt,Pt){let Mt="",It=Z.tag,Nt=Object.keys(Pt);for(let Rt=0,te=Nt.length;Rt<te;Rt+=1){let Vt="";if(Mt!=="")Vt+=", ";if(Z.condenseFlow)Vt+='"';let ee=Nt[Rt],ie=Pt[ee];if(Z.replacer)ie=Z.replacer.call(Pt,ee,ie);if(!Bt(Z,mt,ee,!1,!1))continue;if(Z.dump.length>1024)Vt+="? ";if(Vt+=Z.dump+(Z.condenseFlow?'"':"")+":"+(Z.condenseFlow?"":" "),!Bt(Z,mt,ie,!1,!1))continue;Vt+=Z.dump,Mt+=Vt}Z.tag=It,Z.dump="{"+Mt+"}"}t(So,"writeFlowMapping");function D(Z,mt,Pt,Mt){let It="",Nt=Z.tag,Rt=Object.keys(Pt);if(Z.sortKeys===!0)Rt.sort();else if(typeof Z.sortKeys==="function")Rt.sort(Z.sortKeys);else if(Z.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let te=0,Vt=Rt.length;te<Vt;te+=1){let ee="";if(!Mt||It!=="")ee+=Ae(Z,mt);let ie=Rt[te],Ee=Pt[ie];if(Z.replacer)Ee=Z.replacer.call(Pt,ie,Ee);if(!Bt(Z,mt+1,ie,!0,!0,!0))continue;let Ke=Z.tag!==null&&Z.tag!=="?"||Z.dump&&Z.dump.length>1024;if(Ke)if(Z.dump&&h===Z.dump.charCodeAt(0))ee+="?";else ee+="? ";if(ee+=Z.dump,Ke)ee+=Ae(Z,mt);if(!Bt(Z,mt+1,Ee,!0,Ke))continue;if(Z.dump&&h===Z.dump.charCodeAt(0))ee+=":";else ee+=": ";ee+=Z.dump,It+=ee}Z.tag=Nt,Z.dump=It||"{}"}t(D,"writeBlockMapping");function dt(Z,mt,Pt){let Mt=Pt?Z.explicitTypes:Z.implicitTypes;for(let It=0,Nt=Mt.length;It<Nt;It+=1){let Rt=Mt[It];if((Rt.instanceOf||Rt.predicate)&&(!Rt.instanceOf||typeof mt==="object"&&mt instanceof Rt.instanceOf)&&(!Rt.predicate||Rt.predicate(mt))){if(Pt)if(Rt.multi&&Rt.representName)Z.tag=Rt.representName(mt);else Z.tag=Rt.tag;else Z.tag="?";if(Rt.represent){let te=Z.styleMap[Rt.tag]||Rt.defaultStyle,Vt;if(s.call(Rt.represent)==="[object Function]")Vt=Rt.represent(mt,te);else if(o.call(Rt.represent,te))Vt=Rt.represent[te](mt,te);else throw new e("!<"+Rt.tag+'> tag resolver accepts not "'+te+'" style');Z.dump=Vt}return!0}}return!1}t(dt,"detectType");function Bt(Z,mt,Pt,Mt,It,Nt,Rt){if(Z.tag=null,Z.dump=Pt,!dt(Z,Pt,!1))dt(Z,Pt,!0);let te=s.call(Z.dump),Vt=Mt;if(Mt)Mt=Z.flowLevel<0||Z.flowLevel>mt;let ee=te==="[object Object]"||te==="[object Array]",ie,Ee;if(ee)ie=Z.duplicates.indexOf(Pt),Ee=ie!==-1;if(Z.tag!==null&&Z.tag!=="?"||Ee||Z.indent!==2&&mt>0)It=!1;if(Ee&&Z.usedDuplicates[ie])Z.dump="*ref_"+ie;else{if(ee&&Ee&&!Z.usedDuplicates[ie])Z.usedDuplicates[ie]=!0;if(te==="[object Object]"){if(Mt&&Object.keys(Z.dump).length!==0){if(D(Z,mt,Z.dump,It),Ee)Z.dump="&ref_"+ie+Z.dump}else if(So(Z,mt,Z.dump),Ee)Z.dump="&ref_"+ie+" "+Z.dump}else if(te==="[object Array]"){if(Mt&&Z.dump.length!==0){if(Z.noArrayIndent&&!Rt&&mt>0)no(Z,mt-1,Z.dump,It);else no(Z,mt,Z.dump,It);if(Ee)Z.dump="&ref_"+ie+Z.dump}else if(vi(Z,mt,Z.dump),Ee)Z.dump="&ref_"+ie+" "+Z.dump}else if(te==="[object String]"){if(Z.tag!=="?")ao(Z,Z.dump,mt,Nt,Vt)}else if(te==="[object Undefined]")return!1;else{if(Z.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+te)}if(Z.tag!==null&&Z.tag!=="?"){let Ke=encodeURI(Z.tag[0]==="!"?Z.tag.slice(1):Z.tag).replace(/!/g,"%21");if(Z.tag[0]==="!")Ke="!"+Ke;else if(Ke.slice(0,18)==="tag:yaml.org,2002:")Ke="!!"+Ke.slice(18);else Ke="!<"+Ke+">";Z.dump=Ke+" "+Z.dump}}return!0}t(Bt,"writeNode");function Ot(Z,mt){let Pt=[],Mt=[];_t(Z,Pt,Mt);let It=Mt.length;for(let Nt=0;Nt<It;Nt+=1)mt.duplicates.push(Pt[Mt[Nt]]);mt.usedDuplicates=Array(It)}t(Ot,"getDuplicateReferences");function _t(Z,mt,Pt){if(Z!==null&&typeof Z==="object"){let Mt=mt.indexOf(Z);if(Mt!==-1){if(Pt.indexOf(Mt)===-1)Pt.push(Mt)}else if(mt.push(Z),Array.isArray(Z))for(let It=0,Nt=Z.length;It<Nt;It+=1)_t(Z[It],mt,Pt);else{let It=Object.keys(Z);for(let Nt=0,Rt=It.length;Nt<Rt;Nt+=1)_t(Z[It[Nt]],mt,Pt)}}}t(_t,"inspectNode");function Wt(Z,mt){mt=mt||{};let Pt=new ue(mt);if(!Pt.noRefs)Ot(Z,Pt);let Mt=Z;if(Pt.replacer)Mt=Pt.replacer.call({"":Mt},"",Mt);if(Bt(Pt,0,Mt,!0,!0))return Pt.dump+`
160
+ `;return""}return t(Wt,"dump2"),qu.dump=Wt,qu}t(Ug,"requireDumper");var Wg;function jg(){if(Wg)return Fr;Wg=1;let r=Yg(),e=Ug();function i(s,o){return function(){throw Error("Function yaml."+s+" is removed in js-yaml 4. Use yaml."+o+" instead, which is now safe by default.")}}return t(i,"renamed"),Fr.Type=Mr(),Fr.Schema=Nu(),Fr.FAILSAFE_SCHEMA=Yu(),Fr.JSON_SCHEMA=Vu(),Fr.CORE_SCHEMA=Ku(),Fr.DEFAULT_SCHEMA=Il(),Fr.load=r.load,Fr.loadAll=r.loadAll,Fr.dump=e.dump,Fr.YAMLException=Ms(),Fr.types={binary:Ju(),float:Xu(),map:Hu(),null:Uu(),pairs:ef(),set:rf(),timestamp:Zu(),bool:ju(),int:Gu(),merge:Qu(),omap:tf(),seq:zu(),str:Wu()},Fr.safeLoad=i("safeLoad","load"),Fr.safeLoadAll=i("safeLoadAll","loadAll"),Fr.safeDump=i("safeDump","dump"),Fr}t(jg,"requireJsYaml");var t2=jg(),e2=zg(t2),{Type:I3,Schema:$3,FAILSAFE_SCHEMA:D3,JSON_SCHEMA:tt,CORE_SCHEMA:P3,DEFAULT_SCHEMA:R3,load:nt,loadAll:q3,dump:N3,YAMLException:W3,types:z3,safeLoad:H3,safeLoadAll:Y3,safeDump:U3}=e2;var Ba=t((r,e)=>{let{theme:i,themeVariables:s}=e,{useGradient:o,gradientStart:n,gradientStop:c}=s??{},h=r.attr("id"),g=i?.includes("dark")?"#FFFFFF":"#000000",y=t((B,v,q)=>r.append("defs").append("filter").attr("id",B).attr("height",v).attr("width",v).append("feDropShadow").attr("dx",q).attr("dy",q).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",g),"dropShadow");if(y(`${h}-drop-shadow`,"130%","4"),y(`${h}-drop-shadow-small`,"150%","2"),!o)return;let f=r.append("linearGradient").attr("id",`${h}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");f.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),f.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)},"insertLookDefs");var Gg=t((r)=>{let{handDrawnSeed:e}=l();return{fill:r,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:0.7,stroke:r,seed:e}},"solidStateFill"),r2=t((r)=>{if(Array.isArray(r))return r;if(!r)return[];return r.split(";").map((e)=>e.trim()).filter(Boolean)},"normalizeStyleList"),Ni=t((r)=>{let e=i2([...r.cssCompiledStyles||[],...r.cssStyles||[],...r2(r.labelStyle)]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),i2=t((r)=>{let e=new Map;return r.forEach((i)=>{let[s,o]=i.split(":");e.set(s.trim(),o?.trim())}),e},"styles2Map"),Hr=t((r)=>r==="color"||r==="font-size"||r==="font-family"||r==="font-weight"||r==="font-style"||r==="text-decoration"||r==="text-align"||r==="text-transform"||r==="line-height"||r==="letter-spacing"||r==="word-spacing"||r==="text-shadow"||r==="text-overflow"||r==="white-space"||r==="word-wrap"||r==="word-break"||r==="overflow-wrap"||r==="hyphens","isLabelStyle"),k=t((r)=>{let{stylesArray:e}=Ni(r),i=[],s=[],o=[],n=[];return e.forEach((c)=>{let h=c[0];if(Hr(h))i.push(c.join(":")+" !important");else{if(s.push(c.join(":")+" !important"),h.includes("stroke"))o.push(c.join(":")+" !important");if(h==="fill")n.push(c.join(":")+" !important")}}),{labelStyles:i.join(";"),nodeStyles:s.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:n}},"styles2String"),Gt=t((r,e)=>{let{themeVariables:i,handDrawnSeed:s}=l(),{nodeBorder:o,mainBkg:n}=i,{stylesMap:c}=Ni(r);return Object.assign({roughness:0.7,fill:c.get("fill")||n,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:c.get("stroke")||o,seed:s,strokeWidth:c.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:o2(c.get("stroke-dasharray"))},e)},"userNodeOverrides"),o2=t((r)=>{if(!r)return[0,0];let e=r.trim().split(/\s+/).map(Number);if(e.length===1){let o=isNaN(e[0])?0:e[0];return[o,o]}let i=isNaN(e[0])?0:e[0],s=isNaN(e[1])?0:e[1];return[i,s]},"getStrokeDashArray");var of=(r,e,i,s="")=>{let o=r.split(":");if(r.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;s=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){let h=o.pop(),g=o.pop(),y={provider:o.length>0?o[0]:s,prefix:g,name:h};return e&&!$l(y)?null:y}let n=o[0],c=n.split("-");if(c.length>1){let h={provider:s,prefix:c.shift(),name:c.join("-")};return e&&!$l(h)?null:h}if(i&&s===""){let h={provider:s,prefix:"",name:n};return e&&!$l(h,i)?null:h}return null},$l=(r,e)=>{if(!r)return!1;return!!((e&&r.prefix===""||!!r.prefix)&&!!r.name)};var s2=Object.freeze({left:0,top:0,width:16,height:16}),Es=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),sf=Object.freeze({...s2,...Es}),Xg=Object.freeze({...sf,body:"",hidden:!1});function Vg(r,e){let i={};if(!r.hFlip!==!e.hFlip)i.hFlip=!0;if(!r.vFlip!==!e.vFlip)i.vFlip=!0;let s=((r.rotate||0)+(e.rotate||0))%4;if(s)i.rotate=s;return i}function af(r,e){let i=Vg(r,e);for(let s in Xg)if(s in Es){if(s in r&&!(s in i))i[s]=Es[s]}else if(s in e)i[s]=e[s];else if(s in r)i[s]=r[s];return i}function Kg(r,e){let i=r.icons,s=r.aliases||Object.create(null),o=Object.create(null);function n(c){if(i[c])return o[c]=[];if(!(c in o)){o[c]=null;let h=s[c]&&s[c].parent,g=h&&n(h);if(g)o[c]=[h].concat(g)}return o[c]}return(e||Object.keys(i).concat(Object.keys(s))).forEach(n),o}function Zg(r,e,i){let s=r.icons,o=r.aliases||Object.create(null),n={};function c(h){n=af(s[h]||o[h],n)}return c(e),i.forEach(c),af(r,n)}function nf(r,e){if(r.icons[e])return Zg(r,e,[]);let i=Kg(r,[e])[e];return i?Zg(r,e,i):null}var a2=Object.freeze({width:null,height:null}),Qg=Object.freeze({...a2,...Es});var n2=/(-?[0-9.]*[0-9]+[0-9.]*)/g,l2=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function lf(r,e,i){if(e===1)return r;if(i=i||100,typeof r==="number")return Math.ceil(r*e*i)/i;if(typeof r!=="string")return r;let s=r.split(n2);if(s===null||!s.length)return r;let o=[],n=s.shift(),c=l2.test(n);while(!0){if(c){let h=parseFloat(n);if(isNaN(h))o.push(n);else o.push(Math.ceil(h*e*i)/i)}else o.push(n);if(n=s.shift(),n===void 0)return o.join("");c=!c}}function h2(r,e="defs"){let i="",s=r.indexOf("<"+e);while(s>=0){let o=r.indexOf(">",s),n=r.indexOf("</"+e);if(o===-1||n===-1)break;let c=r.indexOf(">",n);if(c===-1)break;i+=r.slice(o+1,n).trim(),r=r.slice(0,s).trim()+r.slice(c+1)}return{defs:i,content:r}}function c2(r,e){return r?"<defs>"+r+"</defs>"+e:e}function Jg(r,e,i){let s=h2(r);return c2(s.defs,e+s.content+i)}var u2=(r)=>r==="unset"||r==="undefined"||r==="none";function hf(r,e){let i={...sf,...r},s={...Qg,...e},o={left:i.left,top:i.top,width:i.width,height:i.height},n=i.body;[i,s].forEach((H)=>{let Y=[],{hFlip:j,vFlip:X,rotate:Q}=H;if(j)if(X)Q+=2;else Y.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),Y.push("scale(-1 1)"),o.top=o.left=0;else if(X)Y.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),Y.push("scale(1 -1)"),o.top=o.left=0;let et;if(Q<0)Q-=Math.floor(Q/4)*4;switch(Q=Q%4,Q){case 1:et=o.height/2+o.top,Y.unshift("rotate(90 "+et.toString()+" "+et.toString()+")");break;case 2:Y.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:et=o.width/2+o.left,Y.unshift("rotate(-90 "+et.toString()+" "+et.toString()+")")}if(Q%2===1){if(o.left!==o.top)et=o.left,o.left=o.top,o.top=et;if(o.width!==o.height)et=o.width,o.width=o.height,o.height=et}if(Y.length)n=Jg(n,'<g transform="'+Y.join(" ")+'">',"</g>")});let{width:c,height:h}=s,{width:g,height:y}=o,f,B;if(c===null)B=h===null?"1em":h==="auto"?y:h,f=lf(B,g/y);else f=c==="auto"?g:c,B=h===null?lf(f,y/g):h==="auto"?y:h;let v={},q=(H,Y)=>{if(!u2(Y))v[H]=Y.toString()};q("width",f),q("height",B);let W=[o.left,o.top,g,y];return v.viewBox=W.join(" "),{attributes:v,viewBox:W,body:n}}var f2=/\sid="(\S+)"/g,tm=new Map;function d2(r){r=r.replace(/[0-9]+$/,"")||"a";let e=tm.get(r)||0;return tm.set(r,e+1),e?`${r}${e}`:r}function cf(r){let e=[],i;while(i=f2.exec(r))e.push(i[1]);if(!e.length)return r;let s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach((o)=>{let n=d2(o),c=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+n+s+"$3")}),r=r.replace(new RegExp(s,"g"),""),r}function uf(r,e){let i=r.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let s in e)i+=" "+s+'="'+e[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+i+">"+r+"</svg>"}var Vi={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},ff=new Map,em=new Map,An=t((r)=>{for(let e of r){if(!e.name)throw Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(a.debug("Registering icon pack:",e.name),"loader"in e)em.set(e.name,e.loader);else if("icons"in e)ff.set(e.name,e.icons);else throw a.error("Invalid icon loader:",e),Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),rm=t(async(r,e)=>{let i=of(r,!0,e!==void 0);if(!i)throw Error(`Invalid icon name: ${r}`);let s=i.prefix||e;if(!s)throw Error(`Icon name must contain a prefix: ${r}`);let o=ff.get(s);if(!o){let c=em.get(s);if(!c)throw Error(`Icon set not found: ${i.prefix}`);try{o={...await c(),prefix:s},ff.set(s,o)}catch(h){throw a.error(h),Error(`Failed to load icon set: ${i.prefix}`)}}let n=nf(o,i.name);if(!n)throw Error(`Icon not found: ${r}`);return n},"getRegisteredIconData"),Dl=t(async(r)=>{try{return await rm(r),!0}catch{return!1}},"isIconAvailable"),rt=t(async(r,e,i)=>{let s;try{s=await rm(r,e?.fallbackPrefix)}catch(c){a.error(c),s=Vi}let o=hf(s,e),n=uf(cf(o.body),{...o.attributes,...i});return O(n,x())},"getIconSVG");var xm=Se(Vn(),1);function os(r,e){if(typeof r!=="function"||e!=null&&typeof e!=="function")throw TypeError("Expected a function");let i=function(...s){let o=e?e.apply(this,s):s[0],n=i.cache;if(n.has(o))return n.get(o);let c=r.apply(this,s);return i.cache=n.set(o,c)||n,c};return i.cache=new(os.Cache||Map),i}os.Cache=Map;function Rn(r){return r==null||typeof r!=="object"&&typeof r!=="function"}function sn(r){if(r==null)return r===void 0?"[object Undefined]":"[object Null]";return Object.prototype.toString.call(r)}var Fa="[object RegExp]",Tr="[object String]",Er="[object Number]",Ar="[object Boolean]",Rr="[object Arguments]",za="[object Symbol]",Ua="[object Date]",ja="[object Map]",qa="[object Set]",Va="[object Array]";var Wa="[object ArrayBuffer]",Ga="[object Object]";var Ha="[object DataView]",Ya="[object Uint8Array]",Za="[object Uint8ClampedArray]",Xa="[object Uint16Array]",Ka="[object Uint32Array]";var Qa="[object Int8Array]",Ja="[object Int16Array]",ei="[object Int32Array]";var ti="[object Float32Array]",ni="[object Float64Array]";function Os(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function ln(r){return Os(r)}function lm(){}function hm(r){if(Rn(r))return r;if(Array.isArray(r)||Os(r)||r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);let e=Object.getPrototypeOf(r);if(e==null)return Object.assign(Object.create(e),r);let i=e.constructor;if(r instanceof Date||r instanceof Map||r instanceof Set)return new i(r);if(r instanceof RegExp){let s=new i(r);return s.lastIndex=r.lastIndex,s}if(r instanceof DataView)return new i(r.buffer.slice(0));if(r instanceof Error){let s;if(r instanceof AggregateError)s=new i(r.errors,r.message,{cause:r.cause});else s=new i(r.message,{cause:r.cause});return s.stack=r.stack,Object.assign(s,r),s}if(typeof File<"u"&&r instanceof File)return new i([r],r.name,{type:r.type,lastModified:r.lastModified});if(typeof r==="object")return Object.assign(Object.create(e),r);return r}function Pl(r){return Object.getOwnPropertySymbols(r).filter((e)=>Object.prototype.propertyIsEnumerable.call(r,e))}var df=typeof globalThis==="object"&&globalThis||typeof window==="object"&&window||typeof self==="object"&&self||typeof global==="object"&&global||function(){return this}();function Lr(r){return typeof df.Buffer<"u"&&df.Buffer.isBuffer(r)}function cm(r){return r==="__proto__"}function Rl(r){if(typeof r!=="object")return!1;if(r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){let i=r[Symbol.toStringTag];if(i==null)return!1;if(!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable)return!1;return r.toString()===`[object ${i}]`}let e=r;while(Object.getPrototypeOf(e)!==null)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(r)===e}function um(r,e){return Is(r,void 0,r,new Map,e)}function Is(r,e,i,s=new Map,o=void 0){let n=o?.(r,e,i,s);if(n!==void 0)return n;if(Rn(r))return r;if(s.has(r))return s.get(r);if(Array.isArray(r)){let c=Array(r.length);s.set(r,c);for(let h=0;h<r.length;h++)c[h]=Is(r[h],h,i,s,o);if(Object.hasOwn(r,"index"))c.index=r.index;if(Object.hasOwn(r,"input"))c.input=r.input;return c}if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp){let c=new RegExp(r.source,r.flags);return c.lastIndex=r.lastIndex,c}if(r instanceof Map){let c=new Map;s.set(r,c);for(let[h,g]of r)c.set(h,Is(g,h,i,s,o));return c}if(r instanceof Set){let c=new Set;s.set(r,c);for(let h of r)c.add(Is(h,void 0,i,s,o));return c}if(Lr(r))return r.subarray();if(Os(r)){let c=new(Object.getPrototypeOf(r)).constructor(r.length);s.set(r,c);for(let h=0;h<r.length;h++)c[h]=Is(r[h],h,i,s,o);return c}if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);if(r instanceof DataView){let c=new DataView(r.buffer.slice(0),r.byteOffset,r.byteLength);return s.set(r,c),xi(c,r,i,s,o),c}if(typeof File<"u"&&r instanceof File){let c=new File([r],r.name,{type:r.type});return s.set(r,c),xi(c,r,i,s,o),c}if(typeof Blob<"u"&&r instanceof Blob){let c=new Blob([r],{type:r.type});return s.set(r,c),xi(c,r,i,s,o),c}if(r instanceof Error){let c=structuredClone(r);return s.set(r,c),c.message=r.message,c.name=r.name,c.stack=r.stack,c.cause=r.cause,c.constructor=r.constructor,xi(c,r,i,s,o),c}if(r instanceof Boolean){let c=new Boolean(r.valueOf());return s.set(r,c),xi(c,r,i,s,o),c}if(r instanceof Number){let c=new Number(r.valueOf());return s.set(r,c),xi(c,r,i,s,o),c}if(r instanceof String){let c=new String(r.valueOf());return s.set(r,c),xi(c,r,i,s,o),c}if(typeof r==="object"&&B2(r)){let c=Object.create(Object.getPrototypeOf(r));return s.set(r,c),xi(c,r,i,s,o),c}return r}function xi(r,e,i=r,s,o){let n=[...Object.keys(e),...Pl(e)];for(let c=0;c<n.length;c++){let h=n[c],g=Object.getOwnPropertyDescriptor(r,h);if(g==null||g.writable)r[h]=Is(e[h],h,i,s,o)}}function B2(r){switch(sn(r)){case Rr:case Va:case Wa:case Ha:case Ar:case Ua:case ti:case ni:case Qa:case Ja:case ei:case ja:case Er:case Ga:case Fa:case qa:case Tr:case za:case Ya:case Za:case Xa:case Ka:return!0;default:return!1}}function fm(r,e){return um(r,(i,s,o,n)=>{let c=e?.(i,s,o,n);if(c!==void 0)return c;if(typeof r!=="object")return;if(sn(r)==="[object Object]"&&typeof r.constructor!=="function"){let h={};return n.set(r,h),xi(h,r,o,n),h}switch(Object.prototype.toString.call(r)){case Er:case Tr:case Ar:{let h=new r.constructor(r?.valueOf());return xi(h,r),h}case Rr:{let h={};return xi(h,r),h.length=r.length,h[Symbol.iterator]=r[Symbol.iterator],h}default:return}})}function pf(r){return fm(r)}function Yr(r){return r!==null&&typeof r==="object"&&sn(r)==="[object Arguments]"}function Aa(r){return typeof r==="object"&&r!==null}function dm(r){return Number.isSafeInteger(r)&&r>=0}function ri(r){return r!=null&&typeof r!=="function"&&dm(r.length)}function pm(r){return Aa(r)&&ri(r)}function gm(r,...e){let i=e.slice(0,-1),s=e[e.length-1],o=r;for(let n=0;n<i.length;n++){let c=i[n];o=ql(o,c,s,new Map)}return o}function ql(r,e,i,s){if(Rn(r))r=Object(r);if(e==null||typeof e!=="object")return r;if(s.has(e))return hm(s.get(e));if(s.set(e,r),Array.isArray(e)){e=e.slice();for(let n=0;n<e.length;n++)if(!(n in e))e[n]=void 0}let o=[...Object.keys(e),...Pl(e)];for(let n=0;n<o.length;n++){let c=o[n];if(cm(c))continue;let h=e[c],g=r[c];if(Yr(h))h={...h};if(Yr(g))g={...g};if(Lr(h))h=pf(h);if(Array.isArray(h))if(Array.isArray(g)){let f=[],B=Reflect.ownKeys(g);for(let v=0;v<B.length;v++){let q=B[v];f[q]=g[q]}g=f}else if(pm(g)){let f=[];for(let B=0;B<g.length;B++)f[B]=g[B];g=f}else g=[];let y=i(g,h,c,r,e,s);if(y!==void 0)r[c]=y;else if(Array.isArray(h))r[c]=ql(g,h,i,s);else if(Aa(g)&&Aa(h)&&(Rl(g)||Rl(h)||ln(g)||ln(h)))r[c]=ql(g,h,i,s);else if(g==null&&Rl(h))r[c]=ql({},h,i,s);else if(g==null&&ln(h))r[c]=pf(h);else if(g===void 0||h!==void 0)r[c]=h}return r}function gf(r,...e){return gm(r,...e,lm)}var Wi="​",v2={curveBasis:is,curveBasisClosed:_l,curveBasisOpen:Bl,curveBumpX:qn,curveBumpY:xa,curveBundle:cu,curveCardinalClosed:uu,curveCardinalOpen:fu,curveCardinal:ba,curveCatmullRomClosed:du,curveCatmullRomOpen:pu,curveCatmullRom:wa,curveLinear:Ri,curveLinearClosed:Al,curveMonotoneX:Sa,curveMonotoneY:Ta,curveNatural:Ls,curveStep:Fs,curveStepAfter:va,curveStepBefore:_a},L2=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,F2=t(function(r,e){let i=Cm(r,/(?:init\b)|(?:initialize\b)/),s={};if(Array.isArray(i)){let c=i.map((h)=>h.args);ta(c),s=oe(s,[...c])}else s=i.args;if(!s)return;let o=vr(r,e),n="config";if(s[n]!==void 0){if(o==="flowchart-v2")o="flowchart";s[o]=s[n],delete s[n]}return s},"detectInit"),Cm=t(function(r,e=null){try{let i=new RegExp(`[%]{2}(?![{]${L2.source})(?=[}][%]{2}).*
161
+ `,"ig");r=r.trim().replace(i,"").replace(/'/gm,'"'),a.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${r}`);let s,o=[];while((s=ys.exec(r))!==null){if(s.index===ys.lastIndex)ys.lastIndex++;if(s&&!e||e&&s[1]?.match(e)||e&&s[2]?.match(e)){let n=s[1]?s[1]:s[2],c=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;o.push({type:n,args:c})}}if(o.length===0)return{type:r,args:null};return o.length===1?o[0]:o}catch(i){return a.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${r}'`),{type:void 0,args:null}}},"detectDirective"),bo=t(function(r){return r.replace(ys,"")},"removeDirectives"),A2=t(function(r,e){for(let[i,s]of e.entries())if(s.match(r))return i;return-1},"isSubstringInArray");function Wl(r,e){if(!r)return e;let i=`curve${r.charAt(0).toUpperCase()+r.slice(1)}`;return v2[i]??e}t(Wl,"interpolateToCurve");function bm(r,e){let i=r.trim();if(!i)return;if(e.securityLevel!=="loose")return xm.sanitizeUrl(i);return i}t(bm,"formatUrl");var M2=t((r,...e)=>{let i=r.split("."),s=i.length-1,o=i[s],n=window;for(let c=0;c<s;c++)if(n=n[i[c]],!n){a.error(`Function name: ${r} not found in window`);return}n[o](...e)},"runFunc");function mf(r,e){if(!r||!e)return 0;return Math.sqrt(Math.pow(e.x-r.x,2)+Math.pow(e.y-r.y,2))}t(mf,"distance");function km(r){let e,i=0;r.forEach((o)=>{i+=mf(o,e),e=o});let s=i/2;return yf(r,s)}t(km,"traverseEdge");function wm(r){if(r.length===1)return r[0];return km(r)}t(wm,"calcLabelPosition");var mm=t((r,e=2)=>{let i=Math.pow(10,e);return Math.round(r*i)/i},"roundNumber"),yf=t((r,e)=>{let i=void 0,s=e;for(let o of r){if(i){let n=mf(o,i);if(n===0)return i;if(n<s)s-=n;else{let c=s/n;if(c<=0)return i;if(c>=1)return{x:o.x,y:o.y};if(c>0&&c<1)return{x:mm((1-c)*i.x+c*o.x,5),y:mm((1-c)*i.y+c*o.y,5)}}}i=o}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),E2=t((r,e,i)=>{if(a.info(`our points ${JSON.stringify(e)}`),e[0]!==i)e=e.reverse();let o=yf(e,25),n=r?10:5,c=Math.atan2(e[0].y-o.y,e[0].x-o.x),h={x:0,y:0};return h.x=Math.sin(c)*n+(e[0].x+o.x)/2,h.y=-Math.cos(c)*n+(e[0].y+o.y)/2,h},"calcCardinalityPosition");function Sm(r,e,i){let s=structuredClone(i);if(a.info("our points",s),e!=="start_left"&&e!=="start_right")s.reverse();let o=25+r,n=yf(s,o),c=10+r*0.5,h=Math.atan2(s[0].y-n.y,s[0].x-n.x),g={x:0,y:0};if(e==="start_left")g.x=Math.sin(h+Math.PI)*c+(s[0].x+n.x)/2,g.y=-Math.cos(h+Math.PI)*c+(s[0].y+n.y)/2;else if(e==="end_right")g.x=Math.sin(h-Math.PI)*c+(s[0].x+n.x)/2,g.y=-Math.cos(h-Math.PI)*c+(s[0].y+n.y)/2;else if(e==="end_left")g.x=Math.sin(h)*c+(s[0].x+n.x)/2,g.y=-Math.cos(h)*c+(s[0].y+n.y)/2;else g.x=Math.sin(h)*c+(s[0].x+n.x)/2,g.y=-Math.cos(h)*c+(s[0].y+n.y)/2;return g}t(Sm,"calcTerminalLabelPosition");function ai(r){let e="",i="";for(let s of r)if(s!==void 0)if(s.startsWith("color:")||s.startsWith("text-align:"))i=i+s+";";else e=e+s+";";return{style:e,labelStyle:i}}t(ai,"getStylesFromArray");var ym=0,Gi=t(()=>(ym++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ym),"generateId");function Tm(r){let e="",i="0123456789abcdef",s=i.length;for(let o=0;o<r;o++)e+=i.charAt(Math.floor(Math.random()*s));return e}t(Tm,"makeRandomHex");var Hi=t((r)=>Tm(r.length),"random"),O2=t(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"),I2=t(function(r,e){let i=e.text.replace(b.lineBreakRegex," "),[,s]=Ge(e.fontSize),o=r.append("text");if(o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",s),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),e.class!==void 0)o.attr("class",e.class);let n=o.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.attr("fill",e.fill),n.text(i),o},"drawSimpleText"),Ln=os((r,e,i)=>{if(!r)return r;if(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),b.hasBreaks(r))return r;let s=r.split(" ").filter(Boolean),o=[],n="";return s.forEach((c,h)=>{let g=Ye(`${c} `,i),y=Ye(n,i);if(g>e){let{hyphenatedStrings:v,remainingWord:q}=$2(c,e,"-",i);o.push(n,...v),n=q}else if(y+g>=e)o.push(n),n=c;else n=[n,c].filter(Boolean).join(" ");if(h+1===s.length)o.push(n)}),o.filter((c)=>c!=="").join(i.joinWith)},(r,e,i)=>`${r}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),$2=os((r,e,i="-",s)=>{s=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},s);let o=[...r],n=[],c="";return o.forEach((h,g)=>{let y=`${c}${h}`;if(Ye(y,s)>=e){let B=g+1,v=o.length===B,q=`${y}${i}`;n.push(v?y:q),c=""}else c=y}),{hyphenatedStrings:n,remainingWord:c}},(r,e,i="-",s)=>`${r}${e}${i}${s.fontSize}${s.fontWeight}${s.fontFamily}`);function Zr(r,e){return Xr(r,e).height}t(Zr,"calculateTextHeight");function Ye(r,e){return Xr(r,e).width}t(Ye,"calculateTextWidth");var Xr=os((r,e)=>{let{fontSize:i=12,fontFamily:s="Arial",fontWeight:o=400}=e;if(!r)return{width:0,height:0};let[,n]=Ge(i),c=["sans-serif",s],h=r.split(b.lineBreakRegex),g=[],y=p("body");if(!y.remove)return{width:0,height:0,lineHeight:0};let f=y.append("svg");for(let v of c){let q=0,W={width:0,height:0,lineHeight:0};for(let H of h){let Y=O2();Y.text=H||Wi;let j=I2(f,Y).style("font-size",n).style("font-weight",o).style("font-family",v),X=(j._groups||j)[0][0].getBBox();if(X.width===0&&X.height===0)throw Error("svg element not in render tree");W.width=Math.round(Math.max(W.width,X.width)),q=Math.round(X.height),W.height+=q,W.lineHeight=Math.round(Math.max(W.lineHeight,q))}g.push(W)}f.remove();let B=isNaN(g[1].height)||isNaN(g[1].width)||isNaN(g[1].lineHeight)||g[0].height>g[1].height&&g[0].width>g[1].width&&g[0].lineHeight>g[1].lineHeight?0:1;return g[B]},(r,e)=>`${r}${e.fontSize}${e.fontWeight}${e.fontFamily}`),D2=class{constructor(r=!1,e){this.count=0,this.count=e?e.length:0,this.next=r?()=>this.count++:()=>Date.now()}static{t(this,"InitIDGenerator")}},Nl,P2=t(function(r){return Nl=Nl||document.createElement("div"),r=escape(r).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Nl.innerHTML=r,unescape(Nl.textContent)},"entityDecode");function ii(r){return"str"in r}t(ii,"isDetailedError");function Yi(r){if(r instanceof Error)return r.message;return String(r)}t(Yi,"getErrorMessage");var R2=t((r,e,i,s)=>{if(!s)return;let o=r.node()?.getBBox();if(!o)return;r.append("text").text(s).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-i).attr("class",e)},"insertTitle"),Ge=t((r)=>{if(typeof r==="number")return[r,r+"px"];let e=parseInt(r??"",10);if(Number.isNaN(e))return[void 0,void 0];else if(r===String(e))return[e,r+"px"];else return[e,r]},"parseFontSize");function U(r,e){return gf({},r,e)}t(U,"cleanAndMerge");var N={assignWithDepth:oe,wrapLabel:Ln,calculateTextHeight:Zr,calculateTextWidth:Ye,calculateTextDimensions:Xr,cleanAndMerge:U,detectInit:F2,detectDirective:Cm,isSubstringInArray:A2,interpolateToCurve:Wl,calcLabelPosition:wm,calcCardinalityPosition:E2,calcTerminalLabelPosition:Sm,formatUrl:bm,getStylesFromArray:ai,generateId:Gi,random:Hi,runFunc:M2,entityDecode:P2,insertTitle:R2,isLabelCoordinateInPath:_m,parseFontSize:Ge,InitIDGenerator:D2},xo=t(function(r){let e=r;return e=e.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/#\w+;/g,function(i){let s=i.substring(1,i.length-1);if(/^\+?\d+$/.test(s))return"fl°°"+s+"¶ß";else return"fl°"+s+"¶ß"}),e},"encodeEntities"),Ut=t(function(r){return r.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),ze=t((r,e,{counter:i=0,prefix:s,suffix:o},n)=>{if(n)return n;return`${s?`${s}_`:""}${r}_${e}_${i}${o?`_${o}`:""}`},"getEdgeId");function rr(r){return r??null}t(rr,"handleUndefinedAttr");function _m(r,e){let i=Math.round(r.x),s=Math.round(r.y),o=e.replace(/(\d+\.\d+)/g,(n)=>Math.round(parseFloat(n)).toString());return o.includes(i.toString())||o.includes(s.toString())}t(_m,"isLabelCoordinateInPath");function Cf(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var as=Cf();function Em(r){as=r}var nn={exec:()=>null};function qe(r,e=""){let i=typeof r=="string"?r:r.source,s={replace:(o,n)=>{let c=typeof n=="string"?n:n.source;return c=c.replace(Nr.caret,"$1"),i=i.replace(o,c),s},getRegex:()=>new RegExp(i,e)};return s}var q2=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Nr={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:(r)=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},N2=/^(?:[ \t]*(?:\n|$))+/,W2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,z2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,H2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,bf=/(?:[*+-]|\d{1,9}[.)])/,Om=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Im=qe(Om).replace(/bull/g,bf).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(),Y2=qe(Om).replace(/bull/g,bf).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(),kf=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,U2=/^[^\n]+/,wf=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,j2=qe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",wf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),G2=qe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,bf).getRegex(),jl="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",Sf=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,X2=qe("^ {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[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",Sf).replace("tag",jl).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),$m=qe(kf).replace("hr",hn).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",jl).getRegex(),V2=qe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",$m).getRegex(),Tf={blockquote:V2,code:W2,def:j2,fences:z2,heading:H2,hr:hn,html:X2,lheading:Im,list:G2,newline:N2,paragraph:$m,table:nn,text:U2},Bm=qe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",hn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\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",jl).getRegex(),K2={...Tf,lheading:Y2,table:Bm,paragraph:qe(kf).replace("hr",hn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Bm).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",jl).getRegex()},Z2={...Tf,html:qe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Sf).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:nn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:qe(kf).replace("hr",hn).replace("heading",` *#{1,6} *[^
162
+ ]`).replace("lheading",Im).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Q2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,J2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Dm=/^( {2,}|\\)\n(?!\s*$)/,tw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Gl=/[\p{P}\p{S}]/u,_f=/[\s\p{P}\p{S}]/u,Pm=/[^\s\p{P}\p{S}]/u,ew=qe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,_f).getRegex(),Rm=/(?!~)[\p{P}\p{S}]/u,rw=/(?!~)[\s\p{P}\p{S}]/u,iw=/(?:[^\s\p{P}\p{S}]|~)/u,ow=qe(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",q2?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),qm=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,sw=qe(qm,"u").replace(/punct/g,Gl).getRegex(),aw=qe(qm,"u").replace(/punct/g,Rm).getRegex(),Nm="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",nw=qe(Nm,"gu").replace(/notPunctSpace/g,Pm).replace(/punctSpace/g,_f).replace(/punct/g,Gl).getRegex(),lw=qe(Nm,"gu").replace(/notPunctSpace/g,iw).replace(/punctSpace/g,rw).replace(/punct/g,Rm).getRegex(),hw=qe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Pm).replace(/punctSpace/g,_f).replace(/punct/g,Gl).getRegex(),cw=qe(/\\(punct)/,"gu").replace(/punct/g,Gl).getRegex(),uw=qe(/^<(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(),fw=qe(Sf).replace("(?:-->|$)","-->").getRegex(),dw=qe("^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",fw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Hl=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,pw=qe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Hl).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Wm=qe(/^!?\[(label)\]\[(ref)\]/).replace("label",Hl).replace("ref",wf).getRegex(),zm=qe(/^!?\[(ref)\](?:\[\])?/).replace("ref",wf).getRegex(),gw=qe("reflink|nolink(?!\\()","g").replace("reflink",Wm).replace("nolink",zm).getRegex(),vm=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Bf={_backpedal:nn,anyPunctuation:cw,autolink:uw,blockSkip:ow,br:Dm,code:J2,del:nn,emStrongLDelim:sw,emStrongRDelimAst:nw,emStrongRDelimUnd:hw,escape:Q2,link:pw,nolink:zm,punctuation:ew,reflink:Wm,reflinkSearch:gw,tag:dw,text:tw,url:nn},mw={...Bf,link:qe(/^!?\[(label)\]\((.*?)\)/).replace("label",Hl).getRegex(),reflink:qe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Hl).getRegex()},xf={...Bf,emStrongRDelimAst:lw,emStrongLDelim:aw,url:qe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",vm).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:qe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",vm).getRegex()},yw={...xf,br:qe(Dm).replace("{2,}","*").getRegex(),text:qe(xf.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},zl={normal:Tf,gfm:K2,pedantic:Z2},Ea={normal:Bf,gfm:xf,breaks:yw,pedantic:mw},xw={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Lm=(r)=>xw[r];function Ji(r,e){if(e){if(Nr.escapeTest.test(r))return r.replace(Nr.escapeReplace,Lm)}else if(Nr.escapeTestNoEncode.test(r))return r.replace(Nr.escapeReplaceNoEncode,Lm);return r}function Fm(r){try{r=encodeURI(r).replace(Nr.percentDecode,"%")}catch{return null}return r}function Am(r,e){let i=r.replace(Nr.findPipe,(n,c,h)=>{let g=!1,y=c;for(;--y>=0&&h[y]==="\\";)g=!g;return g?"|":" |"}),s=i.split(Nr.splitPipe),o=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;o<s.length;o++)s[o]=s[o].trim().replace(Nr.slashPipe,"|");return s}function tn(r,e,i){let s=r.length;if(s===0)return"";let o=0;for(;o<s;){let n=r.charAt(s-o-1);if(n===e&&!i)o++;else if(n!==e&&i)o++;else break}return r.slice(0,s-o)}function Cw(r,e){if(r.indexOf(e[1])===-1)return-1;let i=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])i++;else if(r[s]===e[1]&&(i--,i<0))return s;return i>0?-2:-1}function Mm(r,e,i,s,o){let n=e.href,c=e.title||null,h=r[1].replace(o.other.outputLinkReplace,"$1");s.state.inLink=!0;let g={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:n,title:c,text:h,tokens:s.inlineTokens(h)};return s.state.inLink=!1,g}function bw(r,e,i){let s=r.match(i.other.indentCodeCompensation);if(s===null)return e;let o=s[1];return e.split(`
163
163
  `).map((n)=>{let c=n.match(i.other.beginningSpace);if(c===null)return n;let[h]=c;return h.length>=o.length?n.slice(o.length):n}).join(`
164
- `)}var Yl=class{options;rules;lexer;constructor(r){this.options=r||ss}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let i=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Ea(i,`
165
- `)}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let i=e[0],s=bw(i,e[3]||"",this.rules);return{type:"code",raw:i,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let i=e[2].trim();if(this.rules.other.endingHash.test(i)){let s=Ea(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:Ea(e[0],`
166
- `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let i=Ea(e[0],`
164
+ `)}var Yl=class{options;rules;lexer;constructor(r){this.options=r||as}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let i=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?i:tn(i,`
165
+ `)}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let i=e[0],s=bw(i,e[3]||"",this.rules);return{type:"code",raw:i,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let i=e[2].trim();if(this.rules.other.endingHash.test(i)){let s=tn(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:tn(e[0],`
166
+ `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let i=tn(e[0],`
167
167
  `).split(`
168
168
  `),s="",o="",n=[];for(;i.length>0;){let c=!1,h=[],g;for(g=0;g<i.length;g++)if(this.rules.other.blockquoteStart.test(i[g]))h.push(i[g]),c=!0;else if(!c)h.push(i[g]);else break;i=i.slice(g);let y=h.join(`
169
169
  `),f=y.replace(this.rules.other.blockquoteSetextReplace,`
@@ -177,14 +177,14 @@ ${f}`:f;let B=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
177
177
  `);continue}}return{type:"blockquote",raw:s,tokens:n,text:o}}}list(r){let e=this.rules.block.list.exec(r);if(e){let i=e[1].trim(),s=i.length>1,o={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 n=this.rules.other.listItemRegex(i),c=!1;for(;r;){let g=!1,y="",f="";if(!(e=n.exec(r))||this.rules.block.hr.test(r))break;y=e[0],r=r.substring(y.length);let B=e[2].split(`
178
178
  `,1)[0].replace(this.rules.other.listReplaceTabs,(j)=>" ".repeat(3*j.length)),v=r.split(`
179
179
  `,1)[0],q=!B.trim(),W=0;if(this.options.pedantic?(W=2,f=B.trimStart()):q?W=e[1].length+1:(W=e[2].search(this.rules.other.nonSpaceChar),W=W>4?1:W,f=B.slice(W),W+=e[1].length),q&&this.rules.other.blankLine.test(v)&&(y+=v+`
180
- `,r=r.substring(v.length+1),g=!0),!g){let j=this.rules.other.nextBulletRegex(W),X=this.rules.other.hrRegex(W),Q=this.rules.other.fencesBeginRegex(W),rt=this.rules.other.headingBeginRegex(W),it=this.rules.other.htmlBeginRegex(W);for(;r;){let ct=r.split(`
181
- `,1)[0],lt;if(v=ct,this.options.pedantic?(v=v.replace(this.rules.other.listReplaceNesting," "),lt=v):lt=v.replace(this.rules.other.tabCharGlobal," "),Q.test(v)||rt.test(v)||it.test(v)||j.test(v)||X.test(v))break;if(lt.search(this.rules.other.nonSpaceChar)>=W||!v.trim())f+=`
182
- `+lt.slice(W);else{if(q||B.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Q.test(B)||rt.test(B)||X.test(B))break;f+=`
183
- `+v}!q&&!v.trim()&&(q=!0),y+=ct+`
184
- `,r=r.substring(ct.length+1),B=lt.slice(W)}}o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(y)&&(c=!0));let H=null,Y;this.options.gfm&&(H=this.rules.other.listIsTask.exec(f),H&&(Y=H[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:y,task:!!H,checked:Y,loose:!1,text:f,tokens:[]}),o.raw+=y}let h=o.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let g=0;g<o.items.length;g++)if(this.lexer.state.top=!1,o.items[g].tokens=this.lexer.blockTokens(o.items[g].text,[]),!o.loose){let y=o.items[g].tokens.filter((B)=>B.type==="space"),f=y.length>0&&y.some((B)=>this.rules.other.anyLine.test(B.raw));o.loose=f}if(o.loose)for(let g=0;g<o.items.length;g++)o.items[g].loose=!0;return o}}html(r){let e=this.rules.block.html.exec(r);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(r){let e=this.rules.block.def.exec(r);if(e){let i=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:i,raw:e[0],href:s,title:o}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let i=Am(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
180
+ `,r=r.substring(v.length+1),g=!0),!g){let j=this.rules.other.nextBulletRegex(W),X=this.rules.other.hrRegex(W),Q=this.rules.other.fencesBeginRegex(W),et=this.rules.other.headingBeginRegex(W),it=this.rules.other.htmlBeginRegex(W);for(;r;){let ht=r.split(`
181
+ `,1)[0],lt;if(v=ht,this.options.pedantic?(v=v.replace(this.rules.other.listReplaceNesting," "),lt=v):lt=v.replace(this.rules.other.tabCharGlobal," "),Q.test(v)||et.test(v)||it.test(v)||j.test(v)||X.test(v))break;if(lt.search(this.rules.other.nonSpaceChar)>=W||!v.trim())f+=`
182
+ `+lt.slice(W);else{if(q||B.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Q.test(B)||et.test(B)||X.test(B))break;f+=`
183
+ `+v}!q&&!v.trim()&&(q=!0),y+=ht+`
184
+ `,r=r.substring(ht.length+1),B=lt.slice(W)}}o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(y)&&(c=!0));let H=null,Y;this.options.gfm&&(H=this.rules.other.listIsTask.exec(f),H&&(Y=H[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:y,task:!!H,checked:Y,loose:!1,text:f,tokens:[]}),o.raw+=y}let h=o.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let g=0;g<o.items.length;g++)if(this.lexer.state.top=!1,o.items[g].tokens=this.lexer.blockTokens(o.items[g].text,[]),!o.loose){let y=o.items[g].tokens.filter((B)=>B.type==="space"),f=y.length>0&&y.some((B)=>this.rules.other.anyLine.test(B.raw));o.loose=f}if(o.loose)for(let g=0;g<o.items.length;g++)o.items[g].loose=!0;return o}}html(r){let e=this.rules.block.html.exec(r);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(r){let e=this.rules.block.def.exec(r);if(e){let i=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:i,raw:e[0],href:s,title:o}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let i=Am(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
185
185
  `):[],n={type:"table",raw:e[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let c of s)this.rules.other.tableAlignRight.test(c)?n.align.push("right"):this.rules.other.tableAlignCenter.test(c)?n.align.push("center"):this.rules.other.tableAlignLeft.test(c)?n.align.push("left"):n.align.push(null);for(let c=0;c<i.length;c++)n.header.push({text:i[c],tokens:this.lexer.inline(i[c]),header:!0,align:n.align[c]});for(let c of o)n.rows.push(Am(c,n.header.length).map((h,g)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:n.align[g]})));return n}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let i=e[1].charAt(e[1].length-1)===`
186
- `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:i,tokens:this.lexer.inline(i)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let i=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let n=Ea(i.slice(0,-1),"\\");if((i.length-n.length)%2===0)return}else{let n=Cw(e[2],"()");if(n===-2)return;if(n>-1){let c=(e[0].indexOf("!")===0?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,c).trim(),e[3]=""}}let s=e[2],o="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(s);n&&(s=n[1],o=n[3])}else o=e[3]?e[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)),Mm(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let i;if((i=this.rules.inline.reflink.exec(r))||(i=this.rules.inline.nolink.exec(r))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[s.toLowerCase()];if(!o){let n=i[0].charAt(0);return{type:"text",raw:n,text:n}}return Mm(i,o,i[0],this.lexer,this.rules)}}emStrong(r,e,i=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i)){let o=[...s[0]].length-1,n,c,h=o,g=0,y=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(y.lastIndex=0,e=e.slice(-1*r.length+o);(s=y.exec(e))!=null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n)continue;if(c=[...n].length,s[3]||s[4]){h+=c;continue}else if((s[5]||s[6])&&o%3&&!((o+c)%3)){g+=c;continue}if(h-=c,h>0)continue;c=Math.min(c,c+h+g);let f=[...s[0]][0].length,B=r.slice(0,o+s.index+f+c);if(Math.min(o,c)%2){let q=B.slice(1,-1);return{type:"em",raw:B,text:q,tokens:this.lexer.inlineTokens(q)}}let v=B.slice(2,-2);return{type:"strong",raw:B,text:v,tokens:this.lexer.inlineTokens(v)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let i=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:e[0],text:i}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r){let e=this.rules.inline.del.exec(r);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let i,s;return e[2]==="@"?(i=e[1],s="mailto:"+i):(i=e[1],s=i),{type:"link",raw:e[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let i,s;if(e[2]==="@")i=e[0],s="mailto:"+i;else{let o;do o=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(o!==e[0]);i=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let i=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:i}}}},wi=class r{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ss,this.options.tokenizer=this.options.tokenizer||new Yl,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 i={other:Or,block:zl.normal,inline:Aa.normal};this.options.pedantic?(i.block=zl.pedantic,i.inline=Aa.pedantic):this.options.gfm&&(i.block=zl.gfm,this.options.breaks?i.inline=Aa.breaks:i.inline=Aa.gfm),this.tokenizer.rules=i}static get rules(){return{block:zl,inline:Aa}}static lex(e,i){return new r(i).lex(e)}static lexInline(e,i){return new r(i).inlineTokens(e)}lex(e){e=e.replace(Or.carriageReturn,`
187
- `),this.blockTokens(e,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let s=this.inlineQueue[i];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,i=[],s=!1){for(this.options.pedantic&&(e=e.replace(Or.tabCharGlobal," ").replace(Or.spaceLine,""));e;){let o;if(this.options.extensions?.block?.some((c)=>(o=c.call({lexer:this},e,i))?(e=e.substring(o.raw.length),i.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let c=i.at(-1);o.raw.length===1&&c!==void 0?c.raw+=`
186
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:i,tokens:this.lexer.inline(i)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let i=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let n=tn(i.slice(0,-1),"\\");if((i.length-n.length)%2===0)return}else{let n=Cw(e[2],"()");if(n===-2)return;if(n>-1){let c=(e[0].indexOf("!")===0?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,c).trim(),e[3]=""}}let s=e[2],o="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(s);n&&(s=n[1],o=n[3])}else o=e[3]?e[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)),Mm(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let i;if((i=this.rules.inline.reflink.exec(r))||(i=this.rules.inline.nolink.exec(r))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[s.toLowerCase()];if(!o){let n=i[0].charAt(0);return{type:"text",raw:n,text:n}}return Mm(i,o,i[0],this.lexer,this.rules)}}emStrong(r,e,i=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i)){let o=[...s[0]].length-1,n,c,h=o,g=0,y=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(y.lastIndex=0,e=e.slice(-1*r.length+o);(s=y.exec(e))!=null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n)continue;if(c=[...n].length,s[3]||s[4]){h+=c;continue}else if((s[5]||s[6])&&o%3&&!((o+c)%3)){g+=c;continue}if(h-=c,h>0)continue;c=Math.min(c,c+h+g);let f=[...s[0]][0].length,B=r.slice(0,o+s.index+f+c);if(Math.min(o,c)%2){let q=B.slice(1,-1);return{type:"em",raw:B,text:q,tokens:this.lexer.inlineTokens(q)}}let v=B.slice(2,-2);return{type:"strong",raw:B,text:v,tokens:this.lexer.inlineTokens(v)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let i=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:e[0],text:i}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r){let e=this.rules.inline.del.exec(r);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let i,s;return e[2]==="@"?(i=e[1],s="mailto:"+i):(i=e[1],s=i),{type:"link",raw:e[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let i,s;if(e[2]==="@")i=e[0],s="mailto:"+i;else{let o;do o=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(o!==e[0]);i=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let i=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:i}}}},Si=class r{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||as,this.options.tokenizer=this.options.tokenizer||new Yl,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 i={other:Nr,block:zl.normal,inline:Ea.normal};this.options.pedantic?(i.block=zl.pedantic,i.inline=Ea.pedantic):this.options.gfm&&(i.block=zl.gfm,this.options.breaks?i.inline=Ea.breaks:i.inline=Ea.gfm),this.tokenizer.rules=i}static get rules(){return{block:zl,inline:Ea}}static lex(e,i){return new r(i).lex(e)}static lexInline(e,i){return new r(i).inlineTokens(e)}lex(e){e=e.replace(Nr.carriageReturn,`
187
+ `),this.blockTokens(e,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let s=this.inlineQueue[i];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,i=[],s=!1){for(this.options.pedantic&&(e=e.replace(Nr.tabCharGlobal," ").replace(Nr.spaceLine,""));e;){let o;if(this.options.extensions?.block?.some((c)=>(o=c.call({lexer:this},e,i))?(e=e.substring(o.raw.length),i.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let c=i.at(-1);o.raw.length===1&&c!==void 0?c.raw+=`
188
188
  `:i.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let c=i.at(-1);c?.type==="paragraph"||c?.type==="text"?(c.raw+=(c.raw.endsWith(`
189
189
  `)?"":`
190
190
  `)+o.raw,c.text+=`
@@ -197,16 +197,16 @@ ${f}`:f;let B=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
197
197
  `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):i.push(o),s=n.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let c=i.at(-1);c?.type==="text"?(c.raw+=(c.raw.endsWith(`
198
198
  `)?"":`
199
199
  `)+o.raw,c.text+=`
200
- `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):i.push(o);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw Error(c)}}return this.state.top=!0,i}inline(e,i=[]){return this.inlineQueue.push({src:e,tokens:i}),i}inlineTokens(e,i=[]){let s=e,o=null;if(this.tokens.links){let g=Object.keys(this.tokens.links);if(g.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)g.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let n;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)n=o[2]?o[2].length:0,s=s.slice(0,o.index+n)+"["+"a".repeat(o[0].length-n-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let c=!1,h="";for(;e;){c||(h=""),c=!1;let g;if(this.options.extensions?.inline?.some((f)=>(g=f.call({lexer:this},e,i))?(e=e.substring(g.raw.length),i.push(g),!0):!1))continue;if(g=this.tokenizer.escape(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.tag(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.link(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(g.raw.length);let f=i.at(-1);g.type==="text"&&f?.type==="text"?(f.raw+=g.raw,f.text+=g.text):i.push(g);continue}if(g=this.tokenizer.emStrong(e,s,h)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.codespan(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.br(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.del(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.autolink(e)){e=e.substring(g.raw.length),i.push(g);continue}if(!this.state.inLink&&(g=this.tokenizer.url(e))){e=e.substring(g.raw.length),i.push(g);continue}let y=e;if(this.options.extensions?.startInline){let f=1/0,B=e.slice(1),v;this.options.extensions.startInline.forEach((q)=>{v=q.call({lexer:this},B),typeof v=="number"&&v>=0&&(f=Math.min(f,v))}),f<1/0&&f>=0&&(y=e.substring(0,f+1))}if(g=this.tokenizer.inlineText(y)){e=e.substring(g.raw.length),g.raw.slice(-1)!=="_"&&(h=g.raw.slice(-1)),c=!0;let f=i.at(-1);f?.type==="text"?(f.raw+=g.raw,f.text+=g.text):i.push(g);continue}if(e){let f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw Error(f)}}return i}},Ul=class{options;parser;constructor(r){this.options=r||ss}space(r){return""}code({text:r,lang:e,escaped:i}){let s=(e||"").match(Or.notSpaceStart)?.[0],o=r.replace(Or.endingNewline,"")+`
201
- `;return s?'<pre><code class="language-'+Pi(s)+'">'+(i?o:Pi(o,!0))+`</code></pre>
202
- `:"<pre><code>"+(i?o:Pi(o,!0))+`</code></pre>
200
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):i.push(o);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw Error(c)}}return this.state.top=!0,i}inline(e,i=[]){return this.inlineQueue.push({src:e,tokens:i}),i}inlineTokens(e,i=[]){let s=e,o=null;if(this.tokens.links){let g=Object.keys(this.tokens.links);if(g.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)g.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let n;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)n=o[2]?o[2].length:0,s=s.slice(0,o.index+n)+"["+"a".repeat(o[0].length-n-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let c=!1,h="";for(;e;){c||(h=""),c=!1;let g;if(this.options.extensions?.inline?.some((f)=>(g=f.call({lexer:this},e,i))?(e=e.substring(g.raw.length),i.push(g),!0):!1))continue;if(g=this.tokenizer.escape(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.tag(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.link(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(g.raw.length);let f=i.at(-1);g.type==="text"&&f?.type==="text"?(f.raw+=g.raw,f.text+=g.text):i.push(g);continue}if(g=this.tokenizer.emStrong(e,s,h)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.codespan(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.br(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.del(e)){e=e.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.autolink(e)){e=e.substring(g.raw.length),i.push(g);continue}if(!this.state.inLink&&(g=this.tokenizer.url(e))){e=e.substring(g.raw.length),i.push(g);continue}let y=e;if(this.options.extensions?.startInline){let f=1/0,B=e.slice(1),v;this.options.extensions.startInline.forEach((q)=>{v=q.call({lexer:this},B),typeof v=="number"&&v>=0&&(f=Math.min(f,v))}),f<1/0&&f>=0&&(y=e.substring(0,f+1))}if(g=this.tokenizer.inlineText(y)){e=e.substring(g.raw.length),g.raw.slice(-1)!=="_"&&(h=g.raw.slice(-1)),c=!0;let f=i.at(-1);f?.type==="text"?(f.raw+=g.raw,f.text+=g.text):i.push(g);continue}if(e){let f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw Error(f)}}return i}},Ul=class{options;parser;constructor(r){this.options=r||as}space(r){return""}code({text:r,lang:e,escaped:i}){let s=(e||"").match(Nr.notSpaceStart)?.[0],o=r.replace(Nr.endingNewline,"")+`
201
+ `;return s?'<pre><code class="language-'+Ji(s)+'">'+(i?o:Ji(o,!0))+`</code></pre>
202
+ `:"<pre><code>"+(i?o:Ji(o,!0))+`</code></pre>
203
203
  `}blockquote({tokens:r}){return`<blockquote>
204
204
  ${this.parser.parse(r)}</blockquote>
205
205
  `}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
206
206
  `}hr(r){return`<hr>
207
207
  `}list(r){let{ordered:e,start:i}=r,s="";for(let c=0;c<r.items.length;c++){let h=r.items[c];s+=this.listitem(h)}let o=e?"ol":"ul",n=e&&i!==1?' start="'+i+'"':"";return"<"+o+n+`>
208
208
  `+s+"</"+o+`>
209
- `}listitem(r){let e="";if(r.task){let i=this.checkbox({checked:!!r.checked});r.loose?r.tokens[0]?.type==="paragraph"?(r.tokens[0].text=i+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&r.tokens[0].tokens[0].type==="text"&&(r.tokens[0].tokens[0].text=i+" "+Pi(r.tokens[0].tokens[0].text),r.tokens[0].tokens[0].escaped=!0)):r.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):e+=i+" "}return e+=this.parser.parse(r.tokens,!!r.loose),`<li>${e}</li>
209
+ `}listitem(r){let e="";if(r.task){let i=this.checkbox({checked:!!r.checked});r.loose?r.tokens[0]?.type==="paragraph"?(r.tokens[0].text=i+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&r.tokens[0].tokens[0].type==="text"&&(r.tokens[0].tokens[0].text=i+" "+Ji(r.tokens[0].tokens[0].text),r.tokens[0].tokens[0].escaped=!0)):r.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):e+=i+" "}return e+=this.parser.parse(r.tokens,!!r.loose),`<li>${e}</li>
210
210
  `}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
211
211
  `}table(r){let e="",i="";for(let o=0;o<r.header.length;o++)i+=this.tablecell(r.header[o]);e+=this.tablerow({text:i});let s="";for(let o=0;o<r.rows.length;o++){let n=r.rows[o];i="";for(let c=0;c<n.length;c++)i+=this.tablecell(n[c]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
212
212
  <thead>
@@ -215,30 +215,30 @@ ${this.parser.parse(r)}</blockquote>
215
215
  `}tablerow({text:r}){return`<tr>
216
216
  ${r}</tr>
217
217
  `}tablecell(r){let e=this.parser.parseInline(r.tokens),i=r.header?"th":"td";return(r.align?`<${i} align="${r.align}">`:`<${i}>`)+e+`</${i}>
218
- `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${Pi(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:i}){let s=this.parser.parseInline(i),o=Fm(r);if(o===null)return s;r=o;let n='<a href="'+r+'"';return e&&(n+=' title="'+Pi(e)+'"'),n+=">"+s+"</a>",n}image({href:r,title:e,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=Fm(r);if(o===null)return Pi(i);r=o;let n=`<img src="${r}" alt="${i}"`;return e&&(n+=` title="${Pi(e)}"`),n+=">",n}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):("escaped"in r)&&r.escaped?r.text:Pi(r.text)}},vf=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}},Si=class r{options;renderer;textRenderer;constructor(e){this.options=e||ss,this.options.renderer=this.options.renderer||new Ul,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new vf}static parse(e,i){return new r(i).parse(e)}static parseInline(e,i){return new r(i).parseInline(e)}parse(e,i=!0){let s="";for(let o=0;o<e.length;o++){let n=e[o];if(this.options.extensions?.renderers?.[n.type]){let h=n,g=this.options.extensions.renderers[h.type].call({parser:this},h);if(g!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){s+=g||"";continue}}let c=n;switch(c.type){case"space":{s+=this.renderer.space(c);continue}case"hr":{s+=this.renderer.hr(c);continue}case"heading":{s+=this.renderer.heading(c);continue}case"code":{s+=this.renderer.code(c);continue}case"table":{s+=this.renderer.table(c);continue}case"blockquote":{s+=this.renderer.blockquote(c);continue}case"list":{s+=this.renderer.list(c);continue}case"html":{s+=this.renderer.html(c);continue}case"def":{s+=this.renderer.def(c);continue}case"paragraph":{s+=this.renderer.paragraph(c);continue}case"text":{let h=c,g=this.renderer.text(h);for(;o+1<e.length&&e[o+1].type==="text";)h=e[++o],g+=`
219
- `+this.renderer.text(h);i?s+=this.renderer.paragraph({type:"paragraph",raw:g,text:g,tokens:[{type:"text",raw:g,text:g,escaped:!0}]}):s+=g;continue}default:{let h='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw Error(h)}}}return s}parseInline(e,i=this.renderer){let s="";for(let o=0;o<e.length;o++){let n=e[o];if(this.options.extensions?.renderers?.[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)){s+=h||"";continue}}let c=n;switch(c.type){case"escape":{s+=i.text(c);break}case"html":{s+=i.html(c);break}case"link":{s+=i.link(c);break}case"image":{s+=i.image(c);break}case"strong":{s+=i.strong(c);break}case"em":{s+=i.em(c);break}case"codespan":{s+=i.codespan(c);break}case"br":{s+=i.br(c);break}case"del":{s+=i.del(c);break}case"text":{s+=i.text(c);break}default:{let h='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw Error(h)}}}return s}},Ra=class{options;block;constructor(r){this.options=r||ss}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(){return this.block?wi.lex:wi.lexInline}provideParser(){return this.block?Si.parse:Si.parseInline}},kw=class{defaults=Cf();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Si;Renderer=Ul;TextRenderer=vf;Lexer=wi;Tokenizer=Yl;Hooks=Ra;constructor(...r){this.use(...r)}walkTokens(r,e){let i=[];for(let s of r)switch(i=i.concat(e.call(this,s)),s.type){case"table":{let o=s;for(let n of o.header)i=i.concat(this.walkTokens(n.tokens,e));for(let n of o.rows)for(let c of n)i=i.concat(this.walkTokens(c.tokens,e));break}case"list":{let o=s;i=i.concat(this.walkTokens(o.items,e));break}default:{let o=s;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach((n)=>{let c=o[n].flat(1/0);i=i.concat(this.walkTokens(c,e))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,e)))}}return i}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach((i)=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach((o)=>{if(!o.name)throw Error("extension name required");if("renderer"in o){let n=e.renderers[o.name];n?e.renderers[o.name]=function(...c){let h=o.renderer.apply(this,c);return h===!1&&(h=n.apply(this,c)),h}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let n=e[o.level];n?n.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),s.extensions=e),i.renderer){let o=this.defaults.renderer||new Ul(this.defaults);for(let n in i.renderer){if(!(n in o))throw Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let c=n,h=i.renderer[c],g=o[c];o[c]=(...y)=>{let f=h.apply(o,y);return f===!1&&(f=g.apply(o,y)),f||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new Yl(this.defaults);for(let n in i.tokenizer){if(!(n in o))throw Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let c=n,h=i.tokenizer[c],g=o[c];o[c]=(...y)=>{let f=h.apply(o,y);return f===!1&&(f=g.apply(o,y)),f}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new Ra;for(let n in i.hooks){if(!(n in o))throw Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let c=n,h=i.hooks[c],g=o[c];Ra.passThroughHooks.has(n)?o[c]=(y)=>{if(this.defaults.async&&Ra.passThroughHooksRespectAsync.has(n))return(async()=>{let B=await h.call(o,y);return g.call(o,B)})();let f=h.call(o,y);return g.call(o,f)}:o[c]=(...y)=>{if(this.defaults.async)return(async()=>{let B=await h.apply(o,y);return B===!1&&(B=await g.apply(o,y)),B})();let f=h.apply(o,y);return f===!1&&(f=g.apply(o,y)),f}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,n=i.walkTokens;s.walkTokens=function(c){let h=[];return h.push(n.call(this,c)),o&&(h=h.concat(o.call(this,c))),h}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return wi.lex(r,e??this.defaults)}parser(r,e){return Si.parse(r,e??this.defaults)}parseMarkdown(r){return(e,i)=>{let s={...i},o={...this.defaults,...s},n=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return n(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 e>"u"||e===null)return n(Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return n(Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=r),o.async)return(async()=>{let c=o.hooks?await o.hooks.preprocess(e):e,h=await(o.hooks?await o.hooks.provideLexer():r?wi.lex:wi.lexInline)(c,o),g=o.hooks?await o.hooks.processAllTokens(h):h;o.walkTokens&&await Promise.all(this.walkTokens(g,o.walkTokens));let y=await(o.hooks?await o.hooks.provideParser():r?Si.parse:Si.parseInline)(g,o);return o.hooks?await o.hooks.postprocess(y):y})().catch(n);try{o.hooks&&(e=o.hooks.preprocess(e));let c=(o.hooks?o.hooks.provideLexer():r?wi.lex:wi.lexInline)(e,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let h=(o.hooks?o.hooks.provideParser():r?Si.parse:Si.parseInline)(c,o);return o.hooks&&(h=o.hooks.postprocess(h)),h}catch(c){return n(c)}}}onError(r,e){return(i)=>{if(i.message+=`
220
- Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+Pi(i.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(i);throw i}}},os=new kw;function Ue(r,e){return os.parse(r,e)}Ue.options=Ue.setOptions=function(r){return os.setOptions(r),Ue.defaults=os.defaults,Em(Ue.defaults),Ue};Ue.getDefaults=Cf;Ue.defaults=ss;Ue.use=function(...r){return os.use(...r),Ue.defaults=os.defaults,Em(Ue.defaults),Ue};Ue.walkTokens=function(r,e){return os.walkTokens(r,e)};Ue.parseInline=os.parseInline;Ue.Parser=Si;Ue.parser=Si.parse;Ue.Renderer=Ul;Ue.TextRenderer=vf;Ue.Lexer=wi;Ue.lexer=wi.lex;Ue.Tokenizer=Yl;Ue.Hooks=Ra;Ue.parse=Ue;var{options:jH,setOptions:GH,use:XH,walkTokens:VH,parseInline:KH}=Ue;var ZH=Si.parse,QH=wi.lex;function li(r){var e=[];for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];var s=Array.from(typeof r==="string"?[r]:r);s[s.length-1]=s[s.length-1].replace(/\r?\n([\t ]*)$/,"");var o=s.reduce(function(h,g){var y=g.match(/\n([\t ]+|(?!\s).)/g);if(y)return h.concat(y.map(function(f){var B,v;return(v=(B=f.match(/[\t ]/g))===null||B===void 0?void 0:B.length)!==null&&v!==void 0?v:0}));return h},[]);if(o.length){var n=new RegExp(`
218
+ `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${Ji(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:i}){let s=this.parser.parseInline(i),o=Fm(r);if(o===null)return s;r=o;let n='<a href="'+r+'"';return e&&(n+=' title="'+Ji(e)+'"'),n+=">"+s+"</a>",n}image({href:r,title:e,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=Fm(r);if(o===null)return Ji(i);r=o;let n=`<img src="${r}" alt="${i}"`;return e&&(n+=` title="${Ji(e)}"`),n+=">",n}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):("escaped"in r)&&r.escaped?r.text:Ji(r.text)}},vf=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}},Ti=class r{options;renderer;textRenderer;constructor(e){this.options=e||as,this.options.renderer=this.options.renderer||new Ul,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new vf}static parse(e,i){return new r(i).parse(e)}static parseInline(e,i){return new r(i).parseInline(e)}parse(e,i=!0){let s="";for(let o=0;o<e.length;o++){let n=e[o];if(this.options.extensions?.renderers?.[n.type]){let h=n,g=this.options.extensions.renderers[h.type].call({parser:this},h);if(g!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){s+=g||"";continue}}let c=n;switch(c.type){case"space":{s+=this.renderer.space(c);continue}case"hr":{s+=this.renderer.hr(c);continue}case"heading":{s+=this.renderer.heading(c);continue}case"code":{s+=this.renderer.code(c);continue}case"table":{s+=this.renderer.table(c);continue}case"blockquote":{s+=this.renderer.blockquote(c);continue}case"list":{s+=this.renderer.list(c);continue}case"html":{s+=this.renderer.html(c);continue}case"def":{s+=this.renderer.def(c);continue}case"paragraph":{s+=this.renderer.paragraph(c);continue}case"text":{let h=c,g=this.renderer.text(h);for(;o+1<e.length&&e[o+1].type==="text";)h=e[++o],g+=`
219
+ `+this.renderer.text(h);i?s+=this.renderer.paragraph({type:"paragraph",raw:g,text:g,tokens:[{type:"text",raw:g,text:g,escaped:!0}]}):s+=g;continue}default:{let h='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw Error(h)}}}return s}parseInline(e,i=this.renderer){let s="";for(let o=0;o<e.length;o++){let n=e[o];if(this.options.extensions?.renderers?.[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)){s+=h||"";continue}}let c=n;switch(c.type){case"escape":{s+=i.text(c);break}case"html":{s+=i.html(c);break}case"link":{s+=i.link(c);break}case"image":{s+=i.image(c);break}case"strong":{s+=i.strong(c);break}case"em":{s+=i.em(c);break}case"codespan":{s+=i.codespan(c);break}case"br":{s+=i.br(c);break}case"del":{s+=i.del(c);break}case"text":{s+=i.text(c);break}default:{let h='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw Error(h)}}}return s}},en=class{options;block;constructor(r){this.options=r||as}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(){return this.block?Si.lex:Si.lexInline}provideParser(){return this.block?Ti.parse:Ti.parseInline}},kw=class{defaults=Cf();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ti;Renderer=Ul;TextRenderer=vf;Lexer=Si;Tokenizer=Yl;Hooks=en;constructor(...r){this.use(...r)}walkTokens(r,e){let i=[];for(let s of r)switch(i=i.concat(e.call(this,s)),s.type){case"table":{let o=s;for(let n of o.header)i=i.concat(this.walkTokens(n.tokens,e));for(let n of o.rows)for(let c of n)i=i.concat(this.walkTokens(c.tokens,e));break}case"list":{let o=s;i=i.concat(this.walkTokens(o.items,e));break}default:{let o=s;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach((n)=>{let c=o[n].flat(1/0);i=i.concat(this.walkTokens(c,e))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,e)))}}return i}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach((i)=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach((o)=>{if(!o.name)throw Error("extension name required");if("renderer"in o){let n=e.renderers[o.name];n?e.renderers[o.name]=function(...c){let h=o.renderer.apply(this,c);return h===!1&&(h=n.apply(this,c)),h}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let n=e[o.level];n?n.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),s.extensions=e),i.renderer){let o=this.defaults.renderer||new Ul(this.defaults);for(let n in i.renderer){if(!(n in o))throw Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let c=n,h=i.renderer[c],g=o[c];o[c]=(...y)=>{let f=h.apply(o,y);return f===!1&&(f=g.apply(o,y)),f||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new Yl(this.defaults);for(let n in i.tokenizer){if(!(n in o))throw Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let c=n,h=i.tokenizer[c],g=o[c];o[c]=(...y)=>{let f=h.apply(o,y);return f===!1&&(f=g.apply(o,y)),f}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new en;for(let n in i.hooks){if(!(n in o))throw Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let c=n,h=i.hooks[c],g=o[c];en.passThroughHooks.has(n)?o[c]=(y)=>{if(this.defaults.async&&en.passThroughHooksRespectAsync.has(n))return(async()=>{let B=await h.call(o,y);return g.call(o,B)})();let f=h.call(o,y);return g.call(o,f)}:o[c]=(...y)=>{if(this.defaults.async)return(async()=>{let B=await h.apply(o,y);return B===!1&&(B=await g.apply(o,y)),B})();let f=h.apply(o,y);return f===!1&&(f=g.apply(o,y)),f}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,n=i.walkTokens;s.walkTokens=function(c){let h=[];return h.push(n.call(this,c)),o&&(h=h.concat(o.call(this,c))),h}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return Si.lex(r,e??this.defaults)}parser(r,e){return Ti.parse(r,e??this.defaults)}parseMarkdown(r){return(e,i)=>{let s={...i},o={...this.defaults,...s},n=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return n(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 e>"u"||e===null)return n(Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return n(Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=r),o.async)return(async()=>{let c=o.hooks?await o.hooks.preprocess(e):e,h=await(o.hooks?await o.hooks.provideLexer():r?Si.lex:Si.lexInline)(c,o),g=o.hooks?await o.hooks.processAllTokens(h):h;o.walkTokens&&await Promise.all(this.walkTokens(g,o.walkTokens));let y=await(o.hooks?await o.hooks.provideParser():r?Ti.parse:Ti.parseInline)(g,o);return o.hooks?await o.hooks.postprocess(y):y})().catch(n);try{o.hooks&&(e=o.hooks.preprocess(e));let c=(o.hooks?o.hooks.provideLexer():r?Si.lex:Si.lexInline)(e,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let h=(o.hooks?o.hooks.provideParser():r?Ti.parse:Ti.parseInline)(c,o);return o.hooks&&(h=o.hooks.postprocess(h)),h}catch(c){return n(c)}}}onError(r,e){return(i)=>{if(i.message+=`
220
+ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+Ji(i.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(i);throw i}}},ss=new kw;function Ue(r,e){return ss.parse(r,e)}Ue.options=Ue.setOptions=function(r){return ss.setOptions(r),Ue.defaults=ss.defaults,Em(Ue.defaults),Ue};Ue.getDefaults=Cf;Ue.defaults=as;Ue.use=function(...r){return ss.use(...r),Ue.defaults=ss.defaults,Em(Ue.defaults),Ue};Ue.walkTokens=function(r,e){return ss.walkTokens(r,e)};Ue.parseInline=ss.parseInline;Ue.Parser=Ti;Ue.parser=Ti.parse;Ue.Renderer=Ul;Ue.TextRenderer=vf;Ue.Lexer=Si;Ue.lexer=Si.lex;Ue.Tokenizer=Yl;Ue.Hooks=en;Ue.parse=Ue;var{options:jH,setOptions:GH,use:XH,walkTokens:VH,parseInline:KH}=Ue;var ZH=Ti.parse,QH=Si.lex;function oi(r){var e=[];for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];var s=Array.from(typeof r==="string"?[r]:r);s[s.length-1]=s[s.length-1].replace(/\r?\n([\t ]*)$/,"");var o=s.reduce(function(h,g){var y=g.match(/\n([\t ]+|(?!\s).)/g);if(y)return h.concat(y.map(function(f){var B,v;return(v=(B=f.match(/[\t ]/g))===null||B===void 0?void 0:B.length)!==null&&v!==void 0?v:0}));return h},[]);if(o.length){var n=new RegExp(`
221
221
  [ ]{`.concat(Math.min.apply(Math,o),"}"),"g");s=s.map(function(h){return h.replace(n,`
222
222
  `)})}s[0]=s[0].replace(/^\r?\n/,"");var c=s[0];return e.forEach(function(h,g){var y=c.match(/(?:^|\n)( *)$/),f=y?y[1]:"",B=h;if(typeof h==="string"&&h.includes(`
223
223
  `))B=String(h).split(`
224
224
  `).map(function(v,q){return q===0?v:"".concat(f).concat(v)}).join(`
225
- `);c+=B+s[g+1]}),c}var Ff=typeof performance<"u"&&typeof performance.now==="function",Is=t(()=>Ff?performance.now():0,"now"),Lf="\uD83E\uDDDC ",ww="Mermaid render",Sw="Mermaid",Tw={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},u9=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{t(this,"Profiler")}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(r){if(!this.enabled)return;this.roots=[],this.stack=[],this.buckets={},this.begin(r)}tickSync(r,e){if(!this.enabled)return e();let i=Is();try{return e()}finally{this.buckets[r]=(this.buckets[r]??0)+(Is()-i)}}async tick(r,e){if(!this.enabled)return e();let i=Is();try{return await e()}finally{this.buckets[r]=(this.buckets[r]??0)+(Is()-i)}}stop(){if(!this.enabled)return;while(this.stack.length>0)this.end();let r=this.roots.at(-1),e=this.runLabel??r?.name;if(r){if(this.records.push({label:e??r.name,tree:r,buckets:{...this.buckets}}),this.records.length>this.maxRecords)this.records.splice(0,this.records.length-this.maxRecords);if(this.autoPrint)this.printSummary(r,e)}return this.runLabel=void 0,r}begin(r){if(!this.enabled)return;let e={name:r,start:Is(),duration:-1,children:[]},i=this.stack.at(-1);if(i)i.children.push(e);else this.roots.push(e);if(this.stack.push(e),Ff&&typeof performance.mark==="function")try{performance.mark(`${Lf}${r} ▶`)}catch{}}end(){if(!this.enabled)return;let r=this.stack.pop();if(!r)return;let e=Is();if(r.duration=e-r.start,Ff&&typeof performance.measure==="function")try{performance.measure(`${Lf}${r.name}`,{start:r.start,end:e,detail:{devtools:{dataType:"track-entry",track:ww,trackGroup:Sw,color:Tw[r.name]??"primary",tooltipText:`${r.name} — ${r.duration.toFixed(1)} ms`}}})}catch{}}async span(r,e){if(!this.enabled)return e();this.begin(r);try{return await e()}finally{this.end()}}report(){return this.records.at(-1)?.tree??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(r=this.report(),e){if(!r)return;let i=r.duration,s=e&&e!==r.name?`${r.name} [${e}]`:r.name,o=["ms % phase"],n=t((h,g)=>{let y=" ".repeat(g),f=h.duration.toFixed(1).padStart(8),B=i>0?`${(h.duration/i*100).toFixed(0).padStart(3)}%`:" -";o.push(`${f} ${B} ${y}${h.name}`);for(let v of h.children)n(v,g+1);if(h.children.length>0){let v=h.children.reduce((W,H)=>W+H.duration,0),q=h.duration-v;if(q>0.5){let W=q.toFixed(1).padStart(8);o.push(`${W} ${y} (self)`)}}},"walk");n(r,0);let c=Object.keys(this.buckets);if(c.length>0){o.push("—— buckets (summed) ——");for(let h of c)o.push(`${this.buckets[h].toFixed(1).padStart(8)} ${h}`)}console.log(`${Lf}mermaid render profile · ${s}
225
+ `);c+=B+s[g+1]}),c}var Ff=typeof performance<"u"&&typeof performance.now==="function",$s=t(()=>Ff?performance.now():0,"now"),Lf="\uD83E\uDDDC ",ww="Mermaid render",Sw="Mermaid",Tw={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},u9=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{t(this,"Profiler")}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(r){if(!this.enabled)return;this.roots=[],this.stack=[],this.buckets={},this.begin(r)}tickSync(r,e){if(!this.enabled)return e();let i=$s();try{return e()}finally{this.buckets[r]=(this.buckets[r]??0)+($s()-i)}}async tick(r,e){if(!this.enabled)return e();let i=$s();try{return await e()}finally{this.buckets[r]=(this.buckets[r]??0)+($s()-i)}}stop(){if(!this.enabled)return;while(this.stack.length>0)this.end();let r=this.roots.at(-1),e=this.runLabel??r?.name;if(r){if(this.records.push({label:e??r.name,tree:r,buckets:{...this.buckets}}),this.records.length>this.maxRecords)this.records.splice(0,this.records.length-this.maxRecords);if(this.autoPrint)this.printSummary(r,e)}return this.runLabel=void 0,r}begin(r){if(!this.enabled)return;let e={name:r,start:$s(),duration:-1,children:[]},i=this.stack.at(-1);if(i)i.children.push(e);else this.roots.push(e);if(this.stack.push(e),Ff&&typeof performance.mark==="function")try{performance.mark(`${Lf}${r} ▶`)}catch{}}end(){if(!this.enabled)return;let r=this.stack.pop();if(!r)return;let e=$s();if(r.duration=e-r.start,Ff&&typeof performance.measure==="function")try{performance.measure(`${Lf}${r.name}`,{start:r.start,end:e,detail:{devtools:{dataType:"track-entry",track:ww,trackGroup:Sw,color:Tw[r.name]??"primary",tooltipText:`${r.name} — ${r.duration.toFixed(1)} ms`}}})}catch{}}async span(r,e){if(!this.enabled)return e();this.begin(r);try{return await e()}finally{this.end()}}report(){return this.records.at(-1)?.tree??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(r=this.report(),e){if(!r)return;let i=r.duration,s=e&&e!==r.name?`${r.name} [${e}]`:r.name,o=["ms % phase"],n=t((h,g)=>{let y=" ".repeat(g),f=h.duration.toFixed(1).padStart(8),B=i>0?`${(h.duration/i*100).toFixed(0).padStart(3)}%`:" -";o.push(`${f} ${B} ${y}${h.name}`);for(let v of h.children)n(v,g+1);if(h.children.length>0){let v=h.children.reduce((W,H)=>W+H.duration,0),q=h.duration-v;if(q>0.5){let W=q.toFixed(1).padStart(8);o.push(`${W} ${y} (self)`)}}},"walk");n(r,0);let c=Object.keys(this.buckets);if(c.length>0){o.push("—— buckets (summed) ——");for(let h of c)o.push(`${this.buckets[h].toFixed(1).padStart(8)} ${h}`)}console.log(`${Lf}mermaid render profile · ${s}
226
226
  ${o.join(`
227
227
  `)}`)}};globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};function Ym(r,{markdownAutoWrap:e}){let s=r.replace(/<br\/>/g,`
228
228
  `).replace(/\n{2,}/g,`
229
- `);return li(s)}t(Ym,"preprocessMarkdown");function Um(r){return r.split(/\\n|\n|<br\s*\/?>/gi).map((e)=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map((i)=>({content:i,type:"normal"}))??[])}t(Um,"nonMarkdownToLines");function ci(r,e={}){let i=Ym(r,e),s=Ue.lexer(i),o=[[]],n=0;function c(h,g="normal"){if(h.type==="text")h.text.split(`
230
- `).forEach((f,B)=>{if(B!==0)n++,o.push([]);f.split(" ").forEach((v)=>{if(v=v.replace(/&#39;/g,"'"),v)o[n].push({content:v,type:g})})});else if(h.type==="strong"||h.type==="em")h.tokens.forEach((y)=>{c(y,h.type)});else if(h.type==="html")o[n].push({content:h.text,type:"normal"})}return t(c,"processNode"),s.forEach((h)=>{if(h.type==="paragraph")h.tokens?.forEach((g)=>{c(g)});else if(h.type==="html")o[n].push({content:h.text,type:"normal"});else o[n].push({content:h.raw,type:"normal"})}),o}t(ci,"markdownToLines");function jm(r){if(!r)return"";return`<p>${r.replace(/\\n|\n/g,"<br />")}</p>`}t(jm,"nonMarkdownToHTML");function Gm(r,{markdownAutoWrap:e}={}){let i=Ue.lexer(r);function s(o){if(o.type==="text"){if(e===!1)return o.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;");return o.text.replace(/\n */g,"<br/>")}else if(o.type==="strong")return`<strong>${o.tokens?.map(s).join("")}</strong>`;else if(o.type==="em")return`<em>${o.tokens?.map(s).join("")}</em>`;else if(o.type==="paragraph")return`<p>${o.tokens?.map(s).join("")}</p>`;else if(o.type==="space")return"";else if(o.type==="html")return`${o.text}`;else if(o.type==="escape")return o.text;return a.warn(`Unsupported markdown: ${o.type}`),o.raw}return t(s,"output"),i.map(s).join("")}t(Gm,"markdownToHTML");var _w=function(r){var e=function(){},i=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.msRequestAnimationFrame||function(y){return setTimeout(y,16)};function s(){var y=this;y.reads=[],y.writes=[],y.raf=i.bind(r),e("initialized",y)}t(s,"FastDom"),s.prototype={constructor:s,runTasks:t(function(y){e("run tasks");var f;while(f=y.shift())f()},"runTasks"),measure:t(function(y,f){e("measure");var B=!f?y:y.bind(f);return this.reads.push(B),o(this),B},"measure"),mutate:t(function(y,f){e("mutate");var B=!f?y:y.bind(f);return this.writes.push(B),o(this),B},"mutate"),clear:t(function(y){return e("clear",y),c(this.reads,y)||c(this.writes,y)},"clear"),extend:t(function(y){if(e("extend",y),typeof y!="object")throw Error("expected object");var f=Object.create(this);if(h(f,y),f.fastdom=this,f.initialize)f.initialize();return f},"extend"),catch:null};function o(y){if(!y.scheduled)y.scheduled=!0,y.raf(n.bind(null,y)),e("flush scheduled")}t(o,"scheduleFlush");function n(y){e("flush");var{writes:f,reads:B}=y,v;try{e("flushing reads",B.length),y.runTasks(B),e("flushing writes",f.length),y.runTasks(f)}catch(q){v=q}if(y.scheduled=!1,B.length||f.length)o(y);if(v)if(e("task errored",v.message),y.catch)y.catch(v);else throw v}t(n,"flush");function c(y,f){var B=y.indexOf(f);return!!~B&&!!y.splice(B,1)}t(c,"remove");function h(y,f){for(var B in f)if(f.hasOwnProperty(B))y[B]=f[B]}t(h,"mixin");var g=r.fastdom=r.fastdom||new s;return g}(typeof window<"u"?window:globalThis),Xm={initialize:t(function(){this._tasks=new Map},"initialize"),mutate:t(function(r,e){return Af(this,"mutate",r,e)},"mutate"),measure:t(function(r,e){return Af(this,"measure",r,e)},"measure"),clear:t(function(r){var e=this._tasks,i=e.get(r);this.fastdom.clear(i),e.delete(r)},"clear")};function Af(r,e,i,s){var{_tasks:o,fastdom:n}=r,c,h=new Promise(function(g,y){c=n[e](function(){o.delete(h);try{g(s?i.call(s):i())}catch(f){y(f)}},s)});return o.set(h,c),h}t(Af,"create");var{initialize:p9,mutate:g9,measure:m9,clear:y9}=Xm,Bw=Xm,vw=_w.extend({raf(r){if(typeof queueMicrotask==="function")queueMicrotask(r);else setTimeout(r,0)}}).extend(Bw),Oo=vw;function Vm(r){if(Intl.Segmenter)return[...new Intl.Segmenter().segment(r)].map((e)=>e.segment);return[...r]}t(Vm,"splitTextToChars");function Km(r,e){let i=Vm(e.content);return Of(r,[],i,e.type)}t(Km,"splitWordToFitWidth");function Of(r,e,i,s){if(i.length===0)return[{content:e.join(""),type:s},{content:"",type:s}];let[o,...n]=i,c=[...e,o];if(r([{content:c.join(""),type:s}]))return Of(r,c,n,s);if(e.length===0&&o)e.push(o),i.shift();return[{content:e.join(""),type:s},{content:i.join(""),type:s}]}t(Of,"splitWordToFitWidthRecursion");function Zm(r,e){if(r.some(({content:i})=>i.includes(`
231
- `)))throw Error("splitLineToFitWidth does not support newlines in the line");return Xl(r,e)}t(Zm,"splitLineToFitWidth");function Xl(r,e,i=[],s=[]){if(r.length===0){if(s.length>0)i.push(s);return i.length>0?i:[]}let o="";if(r[0].content===" ")o=" ",r.shift();let n=r.shift()??{content:" ",type:"normal"},c=[...s];if(o!=="")c.push({content:o,type:"normal"});if(c.push(n),e(c))return Xl(r,e,i,c);if(s.length>0)i.push(s),r.unshift(n);else if(n.content){let[h,g]=Km(e,n);if(i.push([h]),g.content)r.unshift(g)}return Xl(r,e,i)}t(Xl,"splitLineToFitWidthRecursion");function Mf(r,e){if(e)r.attr("style",e)}t(Mf,"applyStyle");var Hm=16384;async function Qm(r,e,i,s,o=!1,n=x(),c=0){let h=r.append("foreignObject");h.attr("width",`${Math.min(10*i,Hm)}px`),h.attr("height",`${Math.min(10*i,Hm)}px`);let g=h.append("xhtml:div"),y=fe(e.label)?await wr(e.label.replace(b.lineBreakRegex,`
232
- `),n):O(e.label,n),f=e.isNode?"nodeLabel":"edgeLabel",B=g.append("span");if(B.html(y),Mf(B,e.labelStyle),B.attr("class",`${f} ${s}`),Mf(g,e.labelStyle),g.style("display","table-cell"),g.style("white-space","nowrap"),g.style("line-height","1.5"),i!==Number.POSITIVE_INFINITY)g.style("max-width",i+"px"),g.style("text-align","center");if(g.attr("xmlns","http://www.w3.org/1999/xhtml"),o)g.attr("class","labelBkg");let v=await Oo.measure(()=>g.node().getBoundingClientRect());if(v.width===i)g.style("display","table"),g.style("white-space","break-spaces"),g.style("width",i+"px");else if(v.width<c)g.style("display","table"),g.style("width",c+"px"),g.style("text-align","center");return h.node()}t(Qm,"addHtmlSpan");function Vl(r,e,i,s=!1){let o=r.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*i-0.1+"em").attr("dy",i+"em");if(s)o.attr("text-anchor","middle");return o}t(Vl,"createTspan");function Jm(r,e,i){let s=r.append("text"),o=Vl(s,1,e);Kl(o,i);let n=o.node().getComputedTextLength();return s.remove(),n}t(Jm,"computeWidthOfText");function Ki(r,e,i){let s=r.append("text"),o=Vl(s,1,e);Kl(o,[{content:i,type:"normal"}]);let n=o.node()?.getBoundingClientRect();if(n)s.remove();return n}t(Ki,"computeDimensionOfText");function ty(r,e,i,s=!1,o=!1){let c=e.append("g"),h=c.insert("rect").attr("class","background").attr("style","stroke: none"),g=c.append("text").attr("y","-10.1");if(o)g.attr("text-anchor","middle");let y=0;for(let f of i){let B=t((q)=>Jm(c,1.1,q)<=r,"checkWidth"),v=B(f)?[f]:Zm(f,B);for(let q of v){let W=Vl(g,y,1.1,o);Kl(W,q),y++}}if(s){let f=g.node().getBBox(),B=2;return h.attr("x",f.x-2).attr("y",f.y-2).attr("width",f.width+4).attr("height",f.height+4),c.node()}else return g.node()}t(ty,"createFormattedText");function Ef(r){let e=/&(amp|lt|gt);/g;return r.replace(e,(i,s)=>{switch(s){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return i}})}t(Ef,"decodeHTMLEntities");function Kl(r,e){r.text(""),e.forEach((i,s)=>{let o=r.append("tspan").attr("font-style",i.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",i.type==="strong"?"bold":"normal");if(s===0)o.text(Ef(i.content));else o.text(" "+Ef(i.content))})}t(Kl,"updateTextContentAndStyles");async function ey(r,e={}){let i=[];r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,n,c)=>(i.push((async()=>{let h=`${n}:${c}`;if(await Dl(h))return await nt(h,void 0,{class:"label-icon"});else return`<i class='${O(o,e).replace(":"," ")}'></i>`})()),o));let s=await Promise.all(i);return r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>s.shift()??"")}t(ey,"replaceIconSubstring");var Le=t(async(r,e="",{style:i="",isTitle:s=!1,classes:o="",useHtmlLabels:n=!0,markdown:c=!0,isNode:h=!0,width:g=200,minWidth:y=0,addSvgBackground:f=!1}={},B)=>{if(a.debug("XYZ createText",e,i,s,o,n,h,"addSvgBackground: ",f),n){let v=c?Gm(e,B):jm(e),q=await ey(jt(v),B),W=e.replace(/\\\\/g,"\\"),H={isNode:h,label:fe(e)?W:q,labelStyle:i.replace("fill:","color:")};return await Qm(r,H,g,o,f,B,y)}else{let v=jt(e.replace(/<br\s*\/?>/g,"<br/>")),q=c?ci(v.replace("<br>","<br/>"),B):Um(v),W=ty(g,r,q,e?f:!1,!h);if(h){if(/stroke:/.exec(i))i=i.replace("stroke:","lineColor:");let H=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");p(W).attr("style",H)}else{let H=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");p(W).select("rect").attr("style",H.replace(/background:/g,"fill:"));let Y=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");p(W).select("text").attr("style",Y)}if(s)p(W).selectAll("tspan.text-outer-tspan").classed("title-row",!0);else p(W).selectAll("tspan.text-outer-tspan").classed("row",!0);return W}},"createText");var Jr=new Set(["redux-color","redux-dark-color"]),Lw=12,Fw=64,pe=t((r)=>Array.isArray(r)&&r.length>0,"hasPalette"),se=t((r,e)=>r!=null&&Jr.has(r)&&pe(e),"isColorTheme"),Aw=/^[\w-]+$/,le=t((r)=>{let e=typeof r==="string"||typeof r==="number"?String(r):"";return Aw.test(e)?e:"classic"},"safeLook"),yt=t((r)=>pe(r)?r.length:0,"paletteSlotCount"),Ye=t((r,e)=>{if(pe(e))return yt(e);return typeof r==="number"&&Number.isInteger(r)&&r>0&&r<=Fw?r:Lw},"colorSlotCount"),Ze=t((r,e,i,s)=>{if(e===void 0||!se(i,s))return;let o=e%yt(s);r.attr("data-color-id",`color-${o}`)},"stampColorSlot");function If(r,e,i){if(r&&r.length){let[s,o]=e,n=Math.PI/180*i,c=Math.cos(n),h=Math.sin(n);for(let g of r){let[y,f]=g;g[0]=(y-s)*c-(f-o)*h+s,g[1]=(y-s)*h+(f-o)*c+o}}}function Mw(r,e){return r[0]===e[0]&&r[1]===e[1]}function Ew(r,e,i,s=1){let o=i,n=Math.max(e,0.1),c=r[0]&&r[0][0]&&typeof r[0][0]=="number"?[r]:r,h=[0,0];if(o)for(let y of c)If(y,h,o);let g=function(y,f,B){let v=[];for(let X of y){let Q=[...X];Mw(Q[0],Q[Q.length-1])||Q.push([Q[0][0],Q[0][1]]),Q.length>2&&v.push(Q)}let q=[];f=Math.max(f,0.1);let W=[];for(let X of v)for(let Q=0;Q<X.length-1;Q++){let rt=X[Q],it=X[Q+1];if(rt[1]!==it[1]){let ct=Math.min(rt[1],it[1]);W.push({ymin:ct,ymax:Math.max(rt[1],it[1]),x:ct===rt[1]?rt[0]:it[0],islope:(it[0]-rt[0])/(it[1]-rt[1])})}}if(W.sort((X,Q)=>X.ymin<Q.ymin?-1:X.ymin>Q.ymin?1:X.x<Q.x?-1:X.x>Q.x?1:X.ymax===Q.ymax?0:(X.ymax-Q.ymax)/Math.abs(X.ymax-Q.ymax)),!W.length)return q;let H=[],Y=W[0].ymin,j=0;for(;H.length||W.length;){if(W.length){let X=-1;for(let Q=0;Q<W.length&&!(W[Q].ymin>Y);Q++)X=Q;W.splice(0,X+1).forEach((Q)=>{H.push({s:Y,edge:Q})})}if(H=H.filter((X)=>!(X.edge.ymax<=Y)),H.sort((X,Q)=>X.edge.x===Q.edge.x?0:(X.edge.x-Q.edge.x)/Math.abs(X.edge.x-Q.edge.x)),(B!==1||j%f==0)&&H.length>1)for(let X=0;X<H.length;X+=2){let Q=X+1;if(Q>=H.length)break;let rt=H[X].edge,it=H[Q].edge;q.push([[Math.round(rt.x),Y],[Math.round(it.x),Y]])}Y+=B,H.forEach((X)=>{X.edge.x=X.edge.x+B*X.edge.islope}),j++}return q}(c,n,s);if(o){for(let y of c)If(y,h,-o);(function(y,f,B){let v=[];y.forEach((q)=>v.push(...q)),If(v,f,B)})(g,h,-o)}return g}function dn(r,e){var i;let s=e.hachureAngle+90,o=e.hachureGap;o<0&&(o=4*e.strokeWidth),o=Math.round(Math.max(o,0.1));let n=1;return e.roughness>=1&&(((i=e.randomizer)===null||i===void 0?void 0:i.next())||Math.random())>0.7&&(n=o),Ew(r,o,s,n||1)}class sh{constructor(r){this.helper=r}fillPolygons(r,e){return this._fillPolygons(r,e)}_fillPolygons(r,e){let i=dn(r,e);return{type:"fillSketch",ops:this.renderLines(i,e)}}renderLines(r,e){let i=[];for(let s of r)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],e));return i}}function ah(r){let e=r[0],i=r[1];return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}class cy extends sh{fillPolygons(r,e){let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,0.1);let s=dn(r,Object.assign({},e,{hachureGap:i})),o=Math.PI/180*e.hachureAngle,n=[],c=0.5*i*Math.cos(o),h=0.5*i*Math.sin(o);for(let[g,y]of s)ah([g,y])&&n.push([[g[0]-c,g[1]+h],[...y]],[[g[0]+c,g[1]-h],[...y]]);return{type:"fillSketch",ops:this.renderLines(n,e)}}}class uy extends sh{fillPolygons(r,e){let i=this._fillPolygons(r,e),s=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(r,s);return i.ops=i.ops.concat(o.ops),i}}class fy{constructor(r){this.helper=r}fillPolygons(r,e){let i=dn(r,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(i,e)}dotsOnLines(r,e){let i=[],s=e.hachureGap;s<0&&(s=4*e.strokeWidth),s=Math.max(s,0.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);let n=s/4;for(let c of r){let h=ah(c),g=h/s,y=Math.ceil(g)-1,f=h-y*s,B=(c[0][0]+c[1][0])/2-s/4,v=Math.min(c[0][1],c[1][1]);for(let q=0;q<y;q++){let W=v+f+q*s,H=B-n+2*Math.random()*n,Y=W-n+2*Math.random()*n,j=this.helper.ellipse(H,Y,o,o,e);i.push(...j.ops)}}return{type:"fillSketch",ops:i}}}class dy{constructor(r){this.helper=r}fillPolygons(r,e){let i=dn(r,e);return{type:"fillSketch",ops:this.dashedLine(i,e)}}dashedLine(r,e){let i=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,s=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return r.forEach((n)=>{let c=ah(n),h=Math.floor(c/(i+s)),g=(c+s-h*(i+s))/2,y=n[0],f=n[1];y[0]>f[0]&&(y=n[1],f=n[0]);let B=Math.atan((f[1]-y[1])/(f[0]-y[0]));for(let v=0;v<h;v++){let q=v*(i+s),W=q+i,H=[y[0]+q*Math.cos(B)+g*Math.cos(B),y[1]+q*Math.sin(B)+g*Math.sin(B)],Y=[y[0]+W*Math.cos(B)+g*Math.cos(B),y[1]+W*Math.sin(B)+g*Math.sin(B)];o.push(...this.helper.doubleLineOps(H[0],H[1],Y[0],Y[1],e))}}),o}}class py{constructor(r){this.helper=r}fillPolygons(r,e){let i=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,s=e.zigzagOffset<0?i:e.zigzagOffset,o=dn(r,e=Object.assign({},e,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,e)}}zigzagLines(r,e,i){let s=[];return r.forEach((o)=>{let n=ah(o),c=Math.round(n/(2*e)),h=o[0],g=o[1];h[0]>g[0]&&(h=o[1],g=o[0]);let y=Math.atan((g[1]-h[1])/(g[0]-h[0]));for(let f=0;f<c;f++){let B=2*f*e,v=2*(f+1)*e,q=Math.sqrt(2*Math.pow(e,2)),W=[h[0]+B*Math.cos(y),h[1]+B*Math.sin(y)],H=[h[0]+v*Math.cos(y),h[1]+v*Math.sin(y)],Y=[W[0]+q*Math.cos(y+Math.PI/4),W[1]+q*Math.sin(y+Math.PI/4)];s.push(...this.helper.doubleLineOps(W[0],W[1],Y[0],Y[1],i),...this.helper.doubleLineOps(Y[0],Y[1],H[0],H[1],i))}}),s}}var Ur={};class gy{constructor(r){this.seed=r}next(){return this.seed?(2147483647&(this.seed=Math.imul(48271,this.seed)))/2147483648:Math.random()}}var Ow=0,$f=1,ry=2,Zl={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 Df(r,e){return r.type===e}function zf(r){let e=[],i=function(c){let h=[];for(;c!=="";)if(c.match(/^([ \t\r\n,]+)/))c=c.substr(RegExp.$1.length);else if(c.match(/^([aAcChHlLmMqQsStTvVzZ])/))h[h.length]={type:Ow,text:RegExp.$1},c=c.substr(RegExp.$1.length);else{if(!c.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];h[h.length]={type:$f,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return h[h.length]={type:ry,text:""},h}(r),s="BOD",o=0,n=i[o];for(;!Df(n,ry);){let c=0,h=[];if(s==="BOD"){if(n.text!=="M"&&n.text!=="m")return zf("M0,0"+r);o++,c=Zl[n.text],s=n.text}else Df(n,$f)?c=Zl[s]:(o++,c=Zl[n.text],s=n.text);if(!(o+c<i.length))throw Error("Path data ended short");for(let g=o;g<o+c;g++){let y=i[g];if(!Df(y,$f))throw Error("Param not a number: "+s+","+y.text);h[h.length]=+y.text}if(typeof Zl[s]!="number")throw Error("Bad segment: "+s);{let g={key:s,data:h};e.push(g),o+=c,n=i[o],s==="M"&&(s="L"),s==="m"&&(s="l")}}return e}function my(r){let e=0,i=0,s=0,o=0,n=[];for(let{key:c,data:h}of r)switch(c){case"M":n.push({key:"M",data:[...h]}),[e,i]=h,[s,o]=h;break;case"m":e+=h[0],i+=h[1],n.push({key:"M",data:[e,i]}),s=e,o=i;break;case"L":n.push({key:"L",data:[...h]}),[e,i]=h;break;case"l":e+=h[0],i+=h[1],n.push({key:"L",data:[e,i]});break;case"C":n.push({key:"C",data:[...h]}),e=h[4],i=h[5];break;case"c":{let g=h.map((y,f)=>f%2?y+i:y+e);n.push({key:"C",data:g}),e=g[4],i=g[5];break}case"Q":n.push({key:"Q",data:[...h]}),e=h[2],i=h[3];break;case"q":{let g=h.map((y,f)=>f%2?y+i:y+e);n.push({key:"Q",data:g}),e=g[2],i=g[3];break}case"A":n.push({key:"A",data:[...h]}),e=h[5],i=h[6];break;case"a":e+=h[5],i+=h[6],n.push({key:"A",data:[h[0],h[1],h[2],h[3],h[4],e,i]});break;case"H":n.push({key:"H",data:[...h]}),e=h[0];break;case"h":e+=h[0],n.push({key:"H",data:[e]});break;case"V":n.push({key:"V",data:[...h]}),i=h[0];break;case"v":i+=h[0],n.push({key:"V",data:[i]});break;case"S":n.push({key:"S",data:[...h]}),e=h[2],i=h[3];break;case"s":{let g=h.map((y,f)=>f%2?y+i:y+e);n.push({key:"S",data:g}),e=g[2],i=g[3];break}case"T":n.push({key:"T",data:[...h]}),e=h[0],i=h[1];break;case"t":e+=h[0],i+=h[1],n.push({key:"T",data:[e,i]});break;case"Z":case"z":n.push({key:"Z",data:[]}),e=s,i=o}return n}function yy(r){let e=[],i="",s=0,o=0,n=0,c=0,h=0,g=0;for(let{key:y,data:f}of r){switch(y){case"M":e.push({key:"M",data:[...f]}),[s,o]=f,[n,c]=f;break;case"C":e.push({key:"C",data:[...f]}),s=f[4],o=f[5],h=f[2],g=f[3];break;case"L":e.push({key:"L",data:[...f]}),[s,o]=f;break;case"H":s=f[0],e.push({key:"L",data:[s,o]});break;case"V":o=f[0],e.push({key:"L",data:[s,o]});break;case"S":{let B=0,v=0;i==="C"||i==="S"?(B=s+(s-h),v=o+(o-g)):(B=s,v=o),e.push({key:"C",data:[B,v,...f]}),h=f[0],g=f[1],s=f[2],o=f[3];break}case"T":{let[B,v]=f,q=0,W=0;i==="Q"||i==="T"?(q=s+(s-h),W=o+(o-g)):(q=s,W=o);let H=s+2*(q-s)/3,Y=o+2*(W-o)/3,j=B+2*(q-B)/3,X=v+2*(W-v)/3;e.push({key:"C",data:[H,Y,j,X,B,v]}),h=q,g=W,s=B,o=v;break}case"Q":{let[B,v,q,W]=f,H=s+2*(B-s)/3,Y=o+2*(v-o)/3,j=q+2*(B-q)/3,X=W+2*(v-W)/3;e.push({key:"C",data:[H,Y,j,X,q,W]}),h=B,g=v,s=q,o=W;break}case"A":{let B=Math.abs(f[0]),v=Math.abs(f[1]),q=f[2],W=f[3],H=f[4],Y=f[5],j=f[6];if(B===0||v===0)e.push({key:"C",data:[s,o,Y,j,Y,j]}),s=Y,o=j;else if(s!==Y||o!==j)xy(s,o,Y,j,B,v,q,W,H).forEach(function(X){e.push({key:"C",data:X})}),s=Y,o=j;break}case"Z":e.push({key:"Z",data:[]}),s=n,o=c}i=y}return e}function nn(r,e,i){return[r*Math.cos(i)-e*Math.sin(i),r*Math.sin(i)+e*Math.cos(i)]}function xy(r,e,i,s,o,n,c,h,g,y){let f=(B=c,Math.PI*B/180);var B;let v=[],q=0,W=0,H=0,Y=0;if(y)[q,W,H,Y]=y;else{[r,e]=nn(r,e,-f),[i,s]=nn(i,s,-f);let st=(r-i)/2,at=(e-s)/2,mt=st*st/(o*o)+at*at/(n*n);mt>1&&(mt=Math.sqrt(mt),o*=mt,n*=mt);let ot=o*o,wt=n*n,Lt=ot*wt-ot*at*at-wt*st*st,Yt=ot*at*at+wt*st*st,Ht=(h===g?-1:1)*Math.sqrt(Math.abs(Lt/Yt));H=Ht*o*at/n+(r+i)/2,Y=Ht*-n*st/o+(e+s)/2,q=Math.asin(parseFloat(((e-Y)/n).toFixed(9))),W=Math.asin(parseFloat(((s-Y)/n).toFixed(9))),r<H&&(q=Math.PI-q),i<H&&(W=Math.PI-W),q<0&&(q=2*Math.PI+q),W<0&&(W=2*Math.PI+W),g&&q>W&&(q-=2*Math.PI),!g&&W>q&&(W-=2*Math.PI)}let j=W-q;if(Math.abs(j)>120*Math.PI/180){let st=W,at=i,mt=s;W=g&&W>q?q+120*Math.PI/180*1:q+120*Math.PI/180*-1,v=xy(i=H+o*Math.cos(W),s=Y+n*Math.sin(W),at,mt,o,n,c,0,g,[W,st,H,Y])}j=W-q;let X=Math.cos(q),Q=Math.sin(q),rt=Math.cos(W),it=Math.sin(W),ct=Math.tan(j/4),lt=1.3333333333333333*o*ct,dt=1.3333333333333333*n*ct,Ct=[r,e],Bt=[r+lt*Q,e-dt*X],kt=[i+lt*it,s-dt*rt],bt=[i,s];if(Bt[0]=2*Ct[0]-Bt[0],Bt[1]=2*Ct[1]-Bt[1],y)return[Bt,kt,bt].concat(v);{v=[Bt,kt,bt].concat(v);let st=[];for(let at=0;at<v.length;at+=3){let mt=nn(v[at][0],v[at][1],f),ot=nn(v[at+1][0],v[at+1][1],f),wt=nn(v[at+2][0],v[at+2][1],f);st.push([mt[0],mt[1],ot[0],ot[1],wt[0],wt[1]])}return st}}var Iw={randOffset:function(r,e){return me(r,e)},randOffsetWithRange:function(r,e,i){return rh(r,e,i)},ellipse:function(r,e,i,s,o){let n=by(i,s,o);return qf(r,e,o,n).opset},doubleLineOps:function(r,e,i,s,o){return Vo(r,e,i,s,o,!0)}};function Cy(r,e,i,s,o){return{type:"path",ops:Vo(r,e,i,s,o)}}function th(r,e,i){let s=(r||[]).length;if(s>2){let o=[];for(let n=0;n<s-1;n++)o.push(...Vo(r[n][0],r[n][1],r[n+1][0],r[n+1][1],i));return e&&o.push(...Vo(r[s-1][0],r[s-1][1],r[0][0],r[0][1],i)),{type:"path",ops:o}}return s===2?Cy(r[0][0],r[0][1],r[1][0],r[1][1],i):{type:"path",ops:[]}}function $w(r,e,i,s,o){return function(n,c){return th(n,!0,c)}([[r,e],[r+i,e],[r+i,e+s],[r,e+s]],o)}function iy(r,e){if(r.length){let i=typeof r[0][0]=="number"?[r]:r,s=Ql(i[0],1*(1+0.2*e.roughness),e),o=e.disableMultiStroke?[]:Ql(i[0],1.5*(1+0.22*e.roughness),ay(e));for(let n=1;n<i.length;n++){let c=i[n];if(c.length){let h=Ql(c,1*(1+0.2*e.roughness),e),g=e.disableMultiStroke?[]:Ql(c,1.5*(1+0.22*e.roughness),ay(e));for(let y of h)y.op!=="move"&&s.push(y);for(let y of g)y.op!=="move"&&o.push(y)}}return{type:"path",ops:s.concat(o)}}return{type:"path",ops:[]}}function by(r,e,i){let s=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(r/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(i.curveStepCount,i.curveStepCount/Math.sqrt(200)*s)),n=2*Math.PI/o,c=Math.abs(r/2),h=Math.abs(e/2),g=1-i.curveFitting;return c+=me(c*g,i),h+=me(h*g,i),{increment:n,rx:c,ry:h}}function qf(r,e,i,s){let[o,n]=ny(s.increment,r,e,s.rx,s.ry,1,s.increment*rh(0.1,rh(0.4,1,i),i),i),c=ih(o,null,i);if(!i.disableMultiStroke&&i.roughness!==0){let[h]=ny(s.increment,r,e,s.rx,s.ry,1.5,0,i),g=ih(h,null,i);c=c.concat(g)}return{estimatedPoints:n,opset:{type:"path",ops:c}}}function oy(r,e,i,s,o,n,c,h,g){let y=r,f=e,B=Math.abs(i/2),v=Math.abs(s/2);B+=me(0.01*B,g),v+=me(0.01*v,g);let q=o,W=n;for(;q<0;)q+=2*Math.PI,W+=2*Math.PI;W-q>2*Math.PI&&(q=0,W=2*Math.PI);let H=2*Math.PI/g.curveStepCount,Y=Math.min(H/2,(W-q)/2),j=ly(Y,y,f,B,v,q,W,1,g);if(!g.disableMultiStroke){let X=ly(Y,y,f,B,v,q,W,1.5,g);j.push(...X)}return c&&(h?j.push(...Vo(y,f,y+B*Math.cos(q),f+v*Math.sin(q),g),...Vo(y,f,y+B*Math.cos(W),f+v*Math.sin(W),g)):j.push({op:"lineTo",data:[y,f]},{op:"lineTo",data:[y+B*Math.cos(q),f+v*Math.sin(q)]})),{type:"path",ops:j}}function sy(r,e){let i=yy(my(zf(r))),s=[],o=[0,0],n=[0,0];for(let{key:c,data:h}of i)switch(c){case"M":n=[h[0],h[1]],o=[h[0],h[1]];break;case"L":s.push(...Vo(n[0],n[1],h[0],h[1],e)),n=[h[0],h[1]];break;case"C":{let[g,y,f,B,v,q]=h;s.push(...Dw(g,y,f,B,v,q,n,e)),n=[v,q];break}case"Z":s.push(...Vo(n[0],n[1],o[0],o[1],e)),n=[o[0],o[1]]}return{type:"path",ops:s}}function Pf(r,e){let i=[];for(let s of r)if(s.length){let o=e.maxRandomnessOffset||0,n=s.length;if(n>2){i.push({op:"move",data:[s[0][0]+me(o,e),s[0][1]+me(o,e)]});for(let c=1;c<n;c++)i.push({op:"lineTo",data:[s[c][0]+me(o,e),s[c][1]+me(o,e)]})}}return{type:"fillPath",ops:i}}function $s(r,e){return function(i,s){let o=i.fillStyle||"hachure";if(!Ur[o])switch(o){case"zigzag":Ur[o]||(Ur[o]=new cy(s));break;case"cross-hatch":Ur[o]||(Ur[o]=new uy(s));break;case"dots":Ur[o]||(Ur[o]=new fy(s));break;case"dashed":Ur[o]||(Ur[o]=new dy(s));break;case"zigzag-line":Ur[o]||(Ur[o]=new py(s));break;default:o="hachure",Ur[o]||(Ur[o]=new sh(s))}return Ur[o]}(e,Iw).fillPolygons(r,e)}function ay(r){let e=Object.assign({},r);return e.randomizer=void 0,r.seed&&(e.seed=r.seed+1),e}function ky(r){return r.randomizer||(r.randomizer=new gy(r.seed||0)),r.randomizer.next()}function rh(r,e,i,s=1){return i.roughness*s*(ky(i)*(e-r)+r)}function me(r,e,i=1){return rh(-r,r,e,i)}function Vo(r,e,i,s,o,n=!1){let c=n?o.disableMultiStrokeFill:o.disableMultiStroke,h=Nf(r,e,i,s,o,!0,!1);if(c)return h;let g=Nf(r,e,i,s,o,!0,!0);return h.concat(g)}function Nf(r,e,i,s,o,n,c){let h=Math.pow(r-i,2)+Math.pow(e-s,2),g=Math.sqrt(h),y=1;y=g<200?1:g>500?0.4:-0.0016668*g+1.233334;let f=o.maxRandomnessOffset||0;f*f*100>h&&(f=g/10);let B=f/2,v=0.2+0.2*ky(o),q=o.bowing*o.maxRandomnessOffset*(s-e)/200,W=o.bowing*o.maxRandomnessOffset*(r-i)/200;q=me(q,o,y),W=me(W,o,y);let H=[],Y=()=>me(B,o,y),j=()=>me(f,o,y),X=o.preserveVertices;return n&&(c?H.push({op:"move",data:[r+(X?0:Y()),e+(X?0:Y())]}):H.push({op:"move",data:[r+(X?0:me(f,o,y)),e+(X?0:me(f,o,y))]})),c?H.push({op:"bcurveTo",data:[q+r+(i-r)*v+Y(),W+e+(s-e)*v+Y(),q+r+2*(i-r)*v+Y(),W+e+2*(s-e)*v+Y(),i+(X?0:Y()),s+(X?0:Y())]}):H.push({op:"bcurveTo",data:[q+r+(i-r)*v+j(),W+e+(s-e)*v+j(),q+r+2*(i-r)*v+j(),W+e+2*(s-e)*v+j(),i+(X?0:j()),s+(X?0:j())]}),H}function Ql(r,e,i){if(!r.length)return[];let s=[];s.push([r[0][0]+me(e,i),r[0][1]+me(e,i)]),s.push([r[0][0]+me(e,i),r[0][1]+me(e,i)]);for(let o=1;o<r.length;o++)s.push([r[o][0]+me(e,i),r[o][1]+me(e,i)]),o===r.length-1&&s.push([r[o][0]+me(e,i),r[o][1]+me(e,i)]);return ih(s,null,i)}function ih(r,e,i){let s=r.length,o=[];if(s>3){let n=[],c=1-i.curveTightness;o.push({op:"move",data:[r[1][0],r[1][1]]});for(let h=1;h+2<s;h++){let g=r[h];n[0]=[g[0],g[1]],n[1]=[g[0]+(c*r[h+1][0]-c*r[h-1][0])/6,g[1]+(c*r[h+1][1]-c*r[h-1][1])/6],n[2]=[r[h+1][0]+(c*r[h][0]-c*r[h+2][0])/6,r[h+1][1]+(c*r[h][1]-c*r[h+2][1])/6],n[3]=[r[h+1][0],r[h+1][1]],o.push({op:"bcurveTo",data:[n[1][0],n[1][1],n[2][0],n[2][1],n[3][0],n[3][1]]})}if(e&&e.length===2){let h=i.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+me(h,i),e[1]+me(h,i)]})}}else s===3?(o.push({op:"move",data:[r[1][0],r[1][1]]}),o.push({op:"bcurveTo",data:[r[1][0],r[1][1],r[2][0],r[2][1],r[2][0],r[2][1]]})):s===2&&o.push(...Nf(r[0][0],r[0][1],r[1][0],r[1][1],i,!0,!0));return o}function ny(r,e,i,s,o,n,c,h){let g=[],y=[];if(h.roughness===0){r/=4,y.push([e+s*Math.cos(-r),i+o*Math.sin(-r)]);for(let f=0;f<=2*Math.PI;f+=r){let B=[e+s*Math.cos(f),i+o*Math.sin(f)];g.push(B),y.push(B)}y.push([e+s*Math.cos(0),i+o*Math.sin(0)]),y.push([e+s*Math.cos(r),i+o*Math.sin(r)])}else{let f=me(0.5,h)-Math.PI/2;y.push([me(n,h)+e+0.9*s*Math.cos(f-r),me(n,h)+i+0.9*o*Math.sin(f-r)]);let B=2*Math.PI+f-0.01;for(let v=f;v<B;v+=r){let q=[me(n,h)+e+s*Math.cos(v),me(n,h)+i+o*Math.sin(v)];g.push(q),y.push(q)}y.push([me(n,h)+e+s*Math.cos(f+2*Math.PI+0.5*c),me(n,h)+i+o*Math.sin(f+2*Math.PI+0.5*c)]),y.push([me(n,h)+e+0.98*s*Math.cos(f+c),me(n,h)+i+0.98*o*Math.sin(f+c)]),y.push([me(n,h)+e+0.9*s*Math.cos(f+0.5*c),me(n,h)+i+0.9*o*Math.sin(f+0.5*c)])}return[y,g]}function ly(r,e,i,s,o,n,c,h,g){let y=n+me(0.1,g),f=[];f.push([me(h,g)+e+0.9*s*Math.cos(y-r),me(h,g)+i+0.9*o*Math.sin(y-r)]);for(let B=y;B<=c;B+=r)f.push([me(h,g)+e+s*Math.cos(B),me(h,g)+i+o*Math.sin(B)]);return f.push([e+s*Math.cos(c),i+o*Math.sin(c)]),f.push([e+s*Math.cos(c),i+o*Math.sin(c)]),ih(f,null,g)}function Dw(r,e,i,s,o,n,c,h){let g=[],y=[h.maxRandomnessOffset||1,(h.maxRandomnessOffset||1)+0.3],f=[0,0],B=h.disableMultiStroke?1:2,v=h.preserveVertices;for(let q=0;q<B;q++)q===0?g.push({op:"move",data:[c[0],c[1]]}):g.push({op:"move",data:[c[0]+(v?0:me(y[0],h)),c[1]+(v?0:me(y[0],h))]}),f=v?[o,n]:[o+me(y[q],h),n+me(y[q],h)],g.push({op:"bcurveTo",data:[r+me(y[q],h),e+me(y[q],h),i+me(y[q],h),s+me(y[q],h),f[0],f[1]]});return g}function hn(r){return[...r]}function hy(r,e=0){let i=r.length;if(i<3)throw Error("A curve must have at least three points.");let s=[];if(i===3)s.push(hn(r[0]),hn(r[1]),hn(r[2]),hn(r[2]));else{let o=[];o.push(r[0],r[0]);for(let h=1;h<r.length;h++)o.push(r[h]),h===r.length-1&&o.push(r[h]);let n=[],c=1-e;s.push(hn(o[0]));for(let h=1;h+2<o.length;h++){let g=o[h];n[0]=[g[0],g[1]],n[1]=[g[0]+(c*o[h+1][0]-c*o[h-1][0])/6,g[1]+(c*o[h+1][1]-c*o[h-1][1])/6],n[2]=[o[h+1][0]+(c*o[h][0]-c*o[h+2][0])/6,o[h+1][1]+(c*o[h][1]-c*o[h+2][1])/6],n[3]=[o[h+1][0],o[h+1][1]],s.push(n[1],n[2],n[3])}}return s}function eh(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)}function Pw(r,e,i){let s=eh(e,i);if(s===0)return eh(r,e);let o=((r[0]-e[0])*(i[0]-e[0])+(r[1]-e[1])*(i[1]-e[1]))/s;return o=Math.max(0,Math.min(1,o)),eh(r,as(e,i,o))}function as(r,e,i){return[r[0]+(e[0]-r[0])*i,r[1]+(e[1]-r[1])*i]}function Wf(r,e,i,s){let o=s||[];if(function(h,g){let y=h[g+0],f=h[g+1],B=h[g+2],v=h[g+3],q=3*f[0]-2*y[0]-v[0];q*=q;let W=3*f[1]-2*y[1]-v[1];W*=W;let H=3*B[0]-2*v[0]-y[0];H*=H;let Y=3*B[1]-2*v[1]-y[1];return Y*=Y,q<H&&(q=H),W<Y&&(W=Y),q+W}(r,e)<i){let h=r[e+0];if(o.length)(n=o[o.length-1],c=h,Math.sqrt(eh(n,c)))>1&&o.push(h);else o.push(h);o.push(r[e+3])}else{let g=r[e+0],y=r[e+1],f=r[e+2],B=r[e+3],v=as(g,y,0.5),q=as(y,f,0.5),W=as(f,B,0.5),H=as(v,q,0.5),Y=as(q,W,0.5),j=as(H,Y,0.5);Wf([g,v,H,j],0,i,o),Wf([j,Y,W,B],0,i,o)}var n,c;return o}function Rw(r,e){return oh(r,0,r.length,e)}function oh(r,e,i,s,o){let n=o||[],c=r[e],h=r[i-1],g=0,y=1;for(let f=e+1;f<i-1;++f){let B=Pw(r[f],c,h);B>g&&(g=B,y=f)}return Math.sqrt(g)>s?(oh(r,e,y+1,s,n),oh(r,y,i,s,n)):(n.length||n.push(c),n.push(h)),n}function Rf(r,e=0.15,i){let s=[],o=(r.length-1)/3;for(let n=0;n<o;n++)Wf(r,3*n,e,s);return i&&i>0?oh(s,0,s.length,i):s}var fi="none";class fn{constructor(r){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:0.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:0.8},this.config=r||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2147483648)}_o(r){return r?Object.assign({},this.defaultOptions,r):this.defaultOptions}_d(r,e,i){return{shape:r,sets:e||[],options:i||this.defaultOptions}}line(r,e,i,s,o){let n=this._o(o);return this._d("line",[Cy(r,e,i,s,n)],n)}rectangle(r,e,i,s,o){let n=this._o(o),c=[],h=$w(r,e,i,s,n);if(n.fill){let g=[[r,e],[r+i,e],[r+i,e+s],[r,e+s]];n.fillStyle==="solid"?c.push(Pf([g],n)):c.push($s([g],n))}return n.stroke!==fi&&c.push(h),this._d("rectangle",c,n)}ellipse(r,e,i,s,o){let n=this._o(o),c=[],h=by(i,s,n),g=qf(r,e,n,h);if(n.fill)if(n.fillStyle==="solid"){let y=qf(r,e,n,h).opset;y.type="fillPath",c.push(y)}else c.push($s([g.estimatedPoints],n));return n.stroke!==fi&&c.push(g.opset),this._d("ellipse",c,n)}circle(r,e,i,s){let o=this.ellipse(r,e,i,i,s);return o.shape="circle",o}linearPath(r,e){let i=this._o(e);return this._d("linearPath",[th(r,!1,i)],i)}arc(r,e,i,s,o,n,c=!1,h){let g=this._o(h),y=[],f=oy(r,e,i,s,o,n,c,!0,g);if(c&&g.fill)if(g.fillStyle==="solid"){let B=Object.assign({},g);B.disableMultiStroke=!0;let v=oy(r,e,i,s,o,n,!0,!1,B);v.type="fillPath",y.push(v)}else y.push(function(B,v,q,W,H,Y,j){let X=B,Q=v,rt=Math.abs(q/2),it=Math.abs(W/2);rt+=me(0.01*rt,j),it+=me(0.01*it,j);let ct=H,lt=Y;for(;ct<0;)ct+=2*Math.PI,lt+=2*Math.PI;lt-ct>2*Math.PI&&(ct=0,lt=2*Math.PI);let dt=(lt-ct)/j.curveStepCount,Ct=[];for(let Bt=ct;Bt<=lt;Bt+=dt)Ct.push([X+rt*Math.cos(Bt),Q+it*Math.sin(Bt)]);return Ct.push([X+rt*Math.cos(lt),Q+it*Math.sin(lt)]),Ct.push([X,Q]),$s([Ct],j)}(r,e,i,s,o,n,g));return g.stroke!==fi&&y.push(f),this._d("arc",y,g)}curve(r,e){let i=this._o(e),s=[],o=iy(r,i);if(i.fill&&i.fill!==fi)if(i.fillStyle==="solid"){let n=iy(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(n.ops)})}else{let n=[],c=r;if(c.length){let h=typeof c[0][0]=="number"?[c]:c;for(let g of h)g.length<3?n.push(...g):g.length===3?n.push(...Rf(hy([g[0],g[0],g[1],g[2]]),10,(1+i.roughness)/2)):n.push(...Rf(hy(g),10,(1+i.roughness)/2))}n.length&&s.push($s([n],i))}return i.stroke!==fi&&s.push(o),this._d("curve",s,i)}polygon(r,e){let i=this._o(e),s=[],o=th(r,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Pf([r],i)):s.push($s([r],i))),i.stroke!==fi&&s.push(o),this._d("polygon",s,i)}path(r,e){let i=this._o(e),s=[];if(!r)return this._d("path",s,i);r=(r||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let o=i.fill&&i.fill!=="transparent"&&i.fill!==fi,n=i.stroke!==fi,c=!!(i.simplification&&i.simplification<1),h=function(y,f,B){let v=yy(my(zf(y))),q=[],W=[],H=[0,0],Y=[],j=()=>{Y.length>=4&&W.push(...Rf(Y,f)),Y=[]},X=()=>{j(),W.length&&(q.push(W),W=[])};for(let{key:rt,data:it}of v)switch(rt){case"M":X(),H=[it[0],it[1]],W.push(H);break;case"L":j(),W.push([it[0],it[1]]);break;case"C":if(!Y.length){let ct=W.length?W[W.length-1]:H;Y.push([ct[0],ct[1]])}Y.push([it[0],it[1]]),Y.push([it[2],it[3]]),Y.push([it[4],it[5]]);break;case"Z":j(),W.push([H[0],H[1]])}if(X(),!B)return q;let Q=[];for(let rt of q){let it=Rw(rt,B);it.length&&Q.push(it)}return Q}(r,1,c?4-4*(i.simplification||1):(1+i.roughness)/2),g=sy(r,i);if(o)if(i.fillStyle==="solid")if(h.length===1){let y=sy(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(y.ops)})}else s.push(Pf(h,i));else s.push($s(h,i));return n&&(c?h.forEach((y)=>{s.push(th(y,!1,i))}):s.push(g)),this._d("path",s,i)}opsToPath(r,e){let i="";for(let s of r.ops){let o=typeof e=="number"&&e>=0?s.data.map((n)=>+n.toFixed(e)):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(r){let e=r.sets||[],i=r.options||this.defaultOptions,s=[];for(let o of e){let n=null;switch(o.type){case"path":n={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:fi};break;case"fillPath":n={d:this.opsToPath(o),stroke:fi,strokeWidth:0,fill:i.fill||fi};break;case"fillSketch":n=this.fillSketch(o,i)}n&&s.push(n)}return s}fillSketch(r,e){let i=e.fillWeight;return i<0&&(i=e.strokeWidth/2),{d:this.opsToPath(r),stroke:e.fill||fi,strokeWidth:i,fill:fi}}_mergedShape(r){return r.filter((e,i)=>i===0||e.op!=="move")}}class wy{constructor(r,e){this.canvas=r,this.ctx=this.canvas.getContext("2d"),this.gen=new fn(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.ctx,o=r.options.fixedDecimalPlaceDigits;for(let n of e)switch(n.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,n,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";let c=r.shape==="curve"||r.shape==="polygon"||r.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,n,o,c),s.restore();break}case"fillSketch":this.fillSketch(s,n,i)}}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),r.save(),i.fillLineDash&&r.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(r.lineDashOffset=i.fillLineDashOffset),r.strokeStyle=i.fill||"",r.lineWidth=s,this._drawToContext(r,e,i.fixedDecimalPlaceDigits),r.restore()}_drawToContext(r,e,i,s="nonzero"){r.beginPath();for(let o of e.ops){let n=typeof i=="number"&&i>=0?o.data.map((c)=>+c.toFixed(i)):o.data;switch(o.op){case"move":r.moveTo(n[0],n[1]);break;case"bcurveTo":r.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case"lineTo":r.lineTo(n[0],n[1])}}e.type==="fillPath"?r.fill(s):r.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(r,e,i,s,o){let n=this.gen.line(r,e,i,s,o);return this.draw(n),n}rectangle(r,e,i,s,o){let n=this.gen.rectangle(r,e,i,s,o);return this.draw(n),n}ellipse(r,e,i,s,o){let n=this.gen.ellipse(r,e,i,s,o);return this.draw(n),n}circle(r,e,i,s){let o=this.gen.circle(r,e,i,s);return this.draw(o),o}linearPath(r,e){let i=this.gen.linearPath(r,e);return this.draw(i),i}polygon(r,e){let i=this.gen.polygon(r,e);return this.draw(i),i}arc(r,e,i,s,o,n,c=!1,h){let g=this.gen.arc(r,e,i,s,o,n,c,h);return this.draw(g),g}curve(r,e){let i=this.gen.curve(r,e);return this.draw(i),i}path(r,e){let i=this.gen.path(r,e);return this.draw(i),i}}var Jl="http://www.w3.org/2000/svg";class Sy{constructor(r,e){this.svg=r,this.gen=new fn(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Jl,"g"),n=r.options.fixedDecimalPlaceDigits;for(let c of e){let h=null;switch(c.type){case"path":h=s.createElementNS(Jl,"path"),h.setAttribute("d",this.opsToPath(c,n)),h.setAttribute("stroke",i.stroke),h.setAttribute("stroke-width",i.strokeWidth+""),h.setAttribute("fill","none"),i.strokeLineDash&&h.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&h.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":h=s.createElementNS(Jl,"path"),h.setAttribute("d",this.opsToPath(c,n)),h.setAttribute("stroke","none"),h.setAttribute("stroke-width","0"),h.setAttribute("fill",i.fill||""),r.shape!=="curve"&&r.shape!=="polygon"||h.setAttribute("fill-rule","evenodd");break;case"fillSketch":h=this.fillSketch(s,c,i)}h&&o.appendChild(h)}return o}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);let o=r.createElementNS(Jl,"path");return o.setAttribute("d",this.opsToPath(e,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(r,e){return this.gen.opsToPath(r,e)}line(r,e,i,s,o){let n=this.gen.line(r,e,i,s,o);return this.draw(n)}rectangle(r,e,i,s,o){let n=this.gen.rectangle(r,e,i,s,o);return this.draw(n)}ellipse(r,e,i,s,o){let n=this.gen.ellipse(r,e,i,s,o);return this.draw(n)}circle(r,e,i,s){let o=this.gen.circle(r,e,i,s);return this.draw(o)}linearPath(r,e){let i=this.gen.linearPath(r,e);return this.draw(i)}polygon(r,e){let i=this.gen.polygon(r,e);return this.draw(i)}arc(r,e,i,s,o,n,c=!1,h){let g=this.gen.arc(r,e,i,s,o,n,c,h);return this.draw(g)}curve(r,e){let i=this.gen.curve(r,e);return this.draw(i)}path(r,e){let i=this.gen.path(r,e);return this.draw(i)}}var m={canvas:(r,e)=>new wy(r,e),svg:(r,e)=>new Sy(r,e),generator:(r)=>new fn(r),newSeed:()=>fn.newSeed()};var qw=1,Nw=3;async function td(r){let e=r.getElementsByTagName("img");if(!e||e.length===0)return;let i=!ed(r);await Promise.all([...e].map((s)=>new Promise((o)=>{function n(){if(s.style.display="flex",s.style.flexDirection="column",i){let c=l().fontSize?l().fontSize:window.getComputedStyle(document.body).fontSize,h=5,[g=N.fontSize]=We(c),y=g*5+"px";s.style.minWidth=y,s.style.maxWidth=y}else s.style.width="100%";o(s)}t(n,"setupImage"),setTimeout(()=>{if(s.complete)n()}),s.addEventListener("error",n),s.addEventListener("load",n)})))}t(td,"configureLabelImages");function ed(r){if(r.nodeType===Nw)return r.textContent?.trim()!=="";if(r.nodeType!==qw)return!1;if(r.tagName.toLowerCase()==="img")return!1;return[...r.childNodes].some(ed)}t(ed,"hasTextBesidesImages");var Ty=3,Ww=32,zw=t(async(r,e,i)=>{let s=l(),o=r.insert("g").attr("class",i??"node default").attr("id",e.domId||e.id),n=o.insert("g").attr("class","label").attr("style",tr(e.labelStyle)),h=[{text:typeof e.label==="string"?e.label:e.label?.[0]??"",cssClass:"c4-name"},{text:e.stereotype,cssClass:"c4-type"},...(e.description??[]).map((j)=>({text:j,cssClass:"c4-descr"}))].filter((j)=>j.text),g=e.width?Math.max(e.width-2*(e.padding??0),Ww):l().flowchart?.wrappingWidth??200,f=s.c4?.wrap??!0?g:Number.POSITIVE_INFINITY,B=await Promise.all(h.map(async(j)=>{let X=n.append("g").attr("class",j.cssClass),Q=await Le(X,O(jt(j.text??""),s),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:f,style:e.labelStyle},s);return p(Q).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),p(Q).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:X,box:X.node().getBBox()}})),v=Math.max(...B.map(({box:j})=>j.width),0),q=0;for(let{el:j,box:X}of B)j.attr("transform",`translate(${v/2-X.x-X.width/2}, ${q-X.y})`),q+=X.height+Ty;let W=B.length>0?q-Ty:0;n.insert("rect",":first-child"),n.attr("transform",`translate(${-v/2}, ${-W/2})`);let H=n.node().getBBox(),Y=(e.padding??0)/2;return{shapeSvg:o,bbox:H,halfPadding:Y,label:n}},"c4LabelHelper"),_y=t((r,e)=>{let{x:i,y:s,width:o,height:n}=r;if(o>=e)return r;if(!("left"in r))return{x:i-(e-o)/2,y:s,width:e,height:n};return{x:i,y:s,width:e,height:n,top:s,left:i,bottom:s+n,right:i+e,toJSON:t(()=>({}),"toJSON")}},"withMinWidth"),P=t(async(r,e,i,{ignoreMinWidth:s=!1}={})=>{if(e.stereotype!==void 0)return zw(r,e,i);let o,n=e.useHtmlLabels||ht(l()?.htmlLabels);if(!i)o="node default";else o=i;let c=r.insert("g").attr("class",o).attr("id",e.domId||e.id),h=c.insert("g").attr("class","label").attr("style",tr(e.labelStyle)),g;if(e.label===void 0)g="";else g=typeof e.label==="string"?e.label:e.label[0];let y=!!e.icon||!!e.img,f=e.labelType==="markdown",B=g&&!e.width&&!s?e.minWidth??0:0,v=await Le(h,O(jt(g),l()),{useHtmlLabels:n,width:e.width||e.wrappingWidth||l().flowchart?.wrappingWidth,minWidth:B,classes:f?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:y,markdown:f},l()),q=(e?.padding??0)/2,W;if(n){let H=v.children[0],Y=p(v);await td(H),W=await Oo.measure(()=>H.getBoundingClientRect()),W=_y(W,B),Y.attr("width",W.width),Y.attr("height",W.height)}else W=await Oo.measure(()=>v.getBBox()),W=_y(W,B);if(n)h.attr("transform","translate("+-W.width/2+", "+-W.height/2+")");else h.attr("transform","translate(0, "+-W.height/2+")");if(e.centerLabel)h.attr("transform","translate("+-W.width/2+", "+-W.height/2+")");return h.insert("rect",":first-child"),{shapeSvg:c,bbox:W,halfPadding:q,label:h}},"labelHelper"),ls=t(async(r,e,i)=>{let s=i.useHtmlLabels??Ce(l()),o=r.insert("g").attr("class","label").attr("style",i.labelStyle||""),n=await Le(o,O(jt(e),l()),{useHtmlLabels:s,width:i.width||l()?.flowchart?.wrappingWidth,style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img}),c=i.padding/2,h;if(Ce(l())){let g=n.children[0],y=p(n);h=await Oo.measure(()=>g.getBoundingClientRect()),y.attr("width",h.width),y.attr("height",h.height)}else h=await Oo.measure(()=>n.getBBox());if(s)o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")");else o.attr("transform","translate(0, "+-h.height/2+")");if(i.centerLabel)o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")");return o.insert("rect",":first-child"),{shapeSvg:r,bbox:h,halfPadding:c,label:o}},"insertLabel"),I=t((r,e,i)=>{if(i){r.width=i.width,r.height=i.height;return}let s=e.node().getBBox();r.width=s.width,r.height=s.height},"updateNodeBounds"),te=t((r,e)=>(r.look==="handDrawn"?"rough-node":"node")+" "+r.cssClasses+" "+(e||""),"getNodeClasses");function Oe(r){let e=r.map((i,s)=>`${s===0?"M":"L"}${i.x},${i.y}`);return e.push("Z"),e.join(" ")}t(Oe,"createPathFromPoints");function Ko(r,e,i,s,o,n){let c=[],h=50,g=i-r,y=s-e,f=g/n,B=2*Math.PI/f,v=e+y/2;for(let q=0;q<=50;q++){let W=q/50,H=r+W*g,Y=v+o*Math.sin(B*(H-r));c.push({x:H,y:Y})}return c}t(Ko,"generateFullSineWavePoints");function Ni(r,e,i,s,o,n){let c=[],h=o*Math.PI/180,f=(n*Math.PI/180-h)/(s-1);for(let B=0;B<s;B++){let v=h+B*f,q=r+i*Math.cos(v),W=e+i*Math.sin(v);c.push({x:-q,y:-W})}return c}t(Ni,"generateCirclePoints");function Kf(r){let e=Array.from(r.childNodes).filter((g)=>g.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),s=e.map((g)=>g.getAttribute("d")).filter((g)=>g!==null).join(" ");i.setAttribute("d",s);let o=e.find((g)=>g.getAttribute("fill")!=="none"),n=e.find((g)=>g.getAttribute("stroke")!=="none"),c=t((g,y)=>g?.getAttribute(y)??void 0,"getAttr");if(o){let g={fill:c(o,"fill"),"fill-opacity":c(o,"fill-opacity")??"1"};Object.entries(g).forEach(([y,f])=>{if(f)i.setAttribute(y,f)})}if(n){let g={stroke:c(n,"stroke"),"stroke-width":c(n,"stroke-width")??"1","stroke-opacity":c(n,"stroke-opacity")??"1"};Object.entries(g).forEach(([y,f])=>{if(f)i.setAttribute(y,f)})}let h=document.createElementNS("http://www.w3.org/2000/svg","g");return h.appendChild(i),h}t(Kf,"mergePaths");var Hw=t((r,e)=>{var{x:i,y:s}=r,o=e.x-i,n=e.y-s,c=r.width/2,h=r.height/2,g,y;if(Math.abs(n)*c>Math.abs(o)*h){if(n<0)h=-h;g=n===0?0:h*o/n,y=h}else{if(o<0)c=-c;g=c,y=o===0?0:c*n/o}return{x:i+g,y:s+y}},"intersectRect"),to=Hw;function Gy(r,e){return r.intersect(e)}t(Gy,"intersectNode");var Yw=Gy;function Xy(r,e,i,s){var{x:o,y:n}=r,c=o-s.x,h=n-s.y,g=Math.sqrt(e*e*h*h+i*i*c*c),y=Math.abs(e*i*c/g);if(s.x<o)y=-y;var f=Math.abs(e*i*h/g);if(s.y<n)f=-f;return{x:o+y,y:n+f}}t(Xy,"intersectEllipse");var Vy=Xy;function Ky(r,e,i){return Vy(r,e,e,i)}t(Ky,"intersectCircle");var Uw=Ky;function Zy(r,e,i,s){{let o=e.y-r.y,n=r.x-e.x,c=e.x*r.y-r.x*e.y,h=o*i.x+n*i.y+c,g=o*s.x+n*s.y+c,y=0.000001;if(h!==0&&g!==0&&Zf(h,g))return;let f=s.y-i.y,B=i.x-s.x,v=s.x*i.y-i.x*s.y,q=f*r.x+B*r.y+v,W=f*e.x+B*e.y+v;if(Math.abs(q)<0.000001&&Math.abs(W)<0.000001&&Zf(q,W))return;let H=o*B-f*n;if(H===0)return;let Y=(n*v-B*c)/H,j=(f*c-o*v)/H;return{x:Y,y:j}}}t(Zy,"intersectLine");function Zf(r,e){return r*e>0}t(Zf,"sameSign");var jw=Zy;function Qy(r,e,i){let{x:s,y:o}=r,n=[],{POSITIVE_INFINITY:c,POSITIVE_INFINITY:h}=Number;if(typeof e.forEach==="function")e.forEach(function(f){c=Math.min(c,f.x),h=Math.min(h,f.y)});else c=Math.min(c,e.x),h=Math.min(h,e.y);let g=s-r.width/2-c,y=o-r.height/2-h;for(let f=0;f<e.length;f++){let B=e[f],v=e[f<e.length-1?f+1:0],q=jw(r,i,{x:g+B.x,y:y+B.y},{x:g+v.x,y:y+v.y});if(q)n.push(q)}if(!n.length)return r;if(n.length>1)n.sort(function(f,B){let v=f.x-i.x,q=f.y-i.y,W=Math.sqrt(v*v+q*q),H=B.x-i.x,Y=B.y-i.y,j=Math.sqrt(H*H+Y*Y);return W<j?-1:W===j?0:1});return n[0]}t(Qy,"intersectPolygon");var Gw=Qy,w={node:Yw,circle:Uw,ellipse:Vy,polygon:Gw,rect:to},jr=t((r,e,i,s,o)=>["M",r+o,e,"H",r+i-o,"A",o,o,0,0,1,r+i,e+o,"V",e+s-o,"A",o,o,0,0,1,r+i-o,e+s,"H",r+o,"A",o,o,0,0,1,r,e+s-o,"V",e+o,"A",o,o,0,0,1,r+o,e,"Z"].join(" "),"createRoundedRectPathD"),Xw=t(async(r,e,i,s=!1,o=!1)=>{let n=e||"";if(typeof n==="object")n=n[0];let c=l(),h=Ce(c);return await Le(r,n,{style:i,isTitle:s,useHtmlLabels:h,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},c)},"createLabel"),Ti=Xw;function Jy(r,e){let{labelStyles:i}=k(e);e.labelStyle=i;let s=te(e),o=s;if(!s)o="anchor";let n=r.insert("g").attr("class",o).attr("id",e.domId||e.id),c=1,{cssStyles:h}=e,g=m.svg(n),y=Gt(e,{fill:"black",stroke:"none",fillStyle:"solid"});if(e.look!=="handDrawn")y.roughness=0;let f=g.circle(0,0,c*2,y),B=n.insert(()=>f,":first-child");return B.attr("class","anchor").attr("style",tr(h)),I(e,B),e.intersect=function(v){return a.info("Circle intersect",e,c,v),w.circle(e,c,v)},n}t(Jy,"anchor");function Qf(r,e,i,s,o,n,c){let g=(r+i)/2,y=(e+s)/2,f=Math.atan2(s-e,i-r),B=(i-r)/2,v=(s-e)/2,q=B/o,W=v/n,H=Math.sqrt(q**2+W**2);if(H>1)throw Error("The given radii are too small to create an arc between the points.");let Y=Math.sqrt(1-H**2),j=g+Y*n*Math.sin(f)*(c?-1:1),X=y-Y*o*Math.cos(f)*(c?-1:1),Q=Math.atan2((e-X)/n,(r-j)/o),it=Math.atan2((s-X)/n,(i-j)/o)-Q;if(c&&it<0)it+=2*Math.PI;if(!c&&it>0)it-=2*Math.PI;let ct=[];for(let lt=0;lt<20;lt++){let dt=lt/19,Ct=Q+dt*it,Bt=j+o*Math.cos(Ct),kt=X+n*Math.sin(Ct);ct.push({x:Bt,y:kt})}return ct}t(Qf,"generateArcPoints");function tx(r,e,i){let[s,o]=[e,i].sort((n,c)=>c-n);return o*(1-Math.sqrt(1-(r/s/2)**2))}t(tx,"calculateArcSagitta");async function ex(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o,h=t((Ct)=>Ct+c,"calcTotalHeight"),g=t((Ct)=>{let Bt=Ct/2;return[Bt/(2.5+Ct/50),Bt]},"calcEllipseRadius"),{shapeSvg:y,bbox:f}=await P(r,e,te(e)),B=h(e?.height?e?.height:f.height),[v,q]=g(B),W=tx(B,v,q),Y=(e?.width?e?.width:f.width)+n*2+W-W,j=B,{cssStyles:X}=e,Q=[{x:Y/2,y:-j/2},{x:-Y/2,y:-j/2},...Qf(-Y/2,-j/2,-Y/2,j/2,v,q,!1),{x:Y/2,y:j/2},...Qf(Y/2,j/2,Y/2,-j/2,v,q,!0)],rt=m.svg(y),it=Gt(e,{});if(e.look!=="handDrawn")it.roughness=0,it.fillStyle="solid";let ct=Oe(Q),lt=rt.path(ct,it),dt=y.insert(()=>lt,":first-child");if(dt.attr("class","basic label-container outer-path"),X&&e.look!=="handDrawn")dt.selectAll("path").attr("style",X);if(s&&e.look!=="handDrawn")dt.selectAll("path").attr("style",s);return dt.attr("transform",`translate(${v/2}, 0)`),I(e,dt),e.intersect=function(Ct){return w.polygon(e,Q,Ct)},y}t(ex,"bowTieRect");async function rx(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{shapeSvg:n,bbox:c,label:h}=await P(r,e,te(e)),g=i?.nodeBorder??i?.lineColor??"currentColor",y=e.padding??12,f=Math.max(c.width+y*2,e.width??0,80),B=Math.max(Math.min(f*0.08,12),5),v=Math.max(c.height+y*2+B,e.height??0),q=-v/2+B,W=v/2,H=f*0.72,Y=[`M${-f/2},${q}`,`L${-H/2},${W}`,`A${H/2},${B} 0 0 0 ${H/2},${W}`,`L${f/2},${q}`,`A${f/2},${B} 0 0 0 ${-f/2},${q}`,"Z"].join(" "),{cssStyles:j}=e,X=n.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let dt=m.svg(n).path(Y,Gt(e,{}));if(X.node()?.appendChild(dt),j)X.attr("style",j)}else X.append("path").attr("d",Y).attr("style",o);X.append("ellipse").attr("cx",0).attr("cy",q).attr("rx",f/2).attr("ry",B).attr("style",`fill:none;stroke:${g};stroke-width:1px`),I(e,X);let Q=q+(W-q)/2;h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${Q-c.height/2-(c.y-(c.top??0))})`);let rt=12,it=t((lt,dt,Ct)=>Array.from({length:rt+1},(Bt,kt)=>{let bt=Math.PI-kt*Math.PI/rt;return{x:lt*Math.cos(bt),y:dt+Ct*B*Math.sin(bt)}}),"arc"),ct=[...it(f/2,q,-1),...it(H/2,W,1).reverse()];return e.intersect=function(lt){return w.polygon(e,ct,lt)},n}t(rx,"bucket");var Hf=20,Yf=8,Vw=80,Kw=8;function ix(r){let{themeVariables:e}=l(),{clusterBkg:i,clusterBorder:s}=e;switch(r){case"flow":return{rx:10,fill:"none",stroke:e.flowContainerStroke||e.secondaryBorderColor,strokeWidth:0.75,cssClass:"flow-collapsed"};default:return{rx:Kw,fill:i,stroke:s,cssClass:"collapsed-group"}}}t(ix,"getCollapsedStyle");async function ox(r,e){let i=ix(e.metadata?.containerType),{fill:s,stroke:o}=i,{nodeStyles:n}=k(e),{shapeSvg:c,bbox:h}=await P(r,e,te(e)),{theme:g,themeVariables:y}=l();Ze(c,e.colorIndex,g,y.borderColorArray);let f=e.padding??8,B=h.height,v=Math.max(h.width+f*2,Vw,e?.width??0),q=Math.max(B+Yf+Hf+f*2,e?.height??0),W=-v/2,H=-q/2,Y=-(Yf+Hf)/2,j=c.select(".label");if(j)if(e.useHtmlLabels??Ce(l()))j.attr("transform",`translate(${-h.width/2}, ${-h.height/2+Y})`);else j.attr("transform",`translate(0, ${-h.height/2+Y})`);let X;if(e.look==="handDrawn"){let lt=m.svg(c),dt=Gt(e,{fill:s,stroke:o,...i.strokeWidth===void 0?{}:{strokeWidth:i.strokeWidth},...s==="none"?{fillWeight:0}:{fillStyle:"solid"}}),Ct=lt.path(jr(W,H,v,q,i.rx),dt);X=c.insert(()=>Ct,":first-child"),X.attr("class","basic label-container "+i.cssClass).attr("style",tr(e.cssStyles))}else if(X=c.insert("rect",":first-child"),X.attr("class","basic label-container "+i.cssClass).attr("style",n).attr("rx",i.rx).attr("ry",i.rx).attr("x",W).attr("y",H).attr("width",v).attr("height",q).attr("fill",s).attr("stroke",o),i.strokeWidth!==void 0)X.attr("stroke-width",i.strokeWidth+"px");let Q=H+f+B+Yf;c.append("line").attr("class","collapsed-separator").attr("x1",W+8).attr("y1",Q).attr("x2",W+v-8).attr("y2",Q).attr("stroke",o).attr("stroke-dasharray","3, 3");let rt=Q+Hf/2,it=2.5,ct=10;for(let lt=-1;lt<=1;lt++)c.append("circle").attr("class","collapsed-indicator").attr("cx",lt*ct).attr("cy",rt).attr("r",it).attr("fill",o);return I(e,X),e.calcIntersect=function(lt,dt){return w.rect(lt,dt)},e.intersect=function(lt){return w.rect(e,lt)},c}t(ox,"collapsedGroup");function ro(r,e,i,s){return r.insert("polygon",":first-child").attr("points",s.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+i/2+")")}t(ro,"insertPolygonShape");var Zw=["right","left","up","down"],rd="point",Qw=t((r)=>{let e=new Set;for(let i of r)switch(i){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(i);break}return e},"expandAndDeduplicateDirections"),Jw=t((r)=>Zw.filter((e)=>r.has(e)).join("|")||rd,"getDirectionKey"),By={"right|left|up|down":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:0,y:0},{x:e,y:0},{x:s/2,y:2*i},{x:s-e,y:0},{x:s,y:0},{x:s,y:-r/3},{x:s+2*i,y:-r/2},{x:s,y:-2*r/3},{x:s,y:-r},{x:s-e,y:-r},{x:s/2,y:-r-2*i},{x:e,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*i,y:-r/2},{x:0,y:-r/3}],"right|left|up|down"),"right|left|up":t(({height:r,midpoint:e,width:i})=>[{x:e,y:0},{x:i-e,y:0},{x:i,y:-r/2},{x:i-e,y:-r},{x:e,y:-r},{x:0,y:-r/2}],"right|left|up"),"right|left|down":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i,y:0}],"right|left|down"),"right|up|down":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:i,y:-e},{x:i,y:-r+e},{x:0,y:-r}],"right|up|down"),"left|up|down":t(({height:r,midpoint:e,width:i})=>[{x:i,y:0},{x:0,y:-e},{x:0,y:-r+e},{x:i,y:-r}],"left|up|down"),"right|left":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:0},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:0},{x:s,y:-r/2},{x:s-e,y:-r},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r},{x:0,y:-r/2}],"right|left"),"up|down":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:s/2,y:0},{x:0,y:-i},{x:e,y:-i},{x:e,y:-r+i},{x:0,y:-r+i},{x:s/2,y:-r},{x:s,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i},{x:s,y:-i}],"up|down"),"right|up":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:i,y:-e},{x:0,y:-r}],"right|up"),"right|down":t(({height:r,width:e})=>[{x:0,y:0},{x:e,y:0},{x:0,y:-r}],"right|down"),"left|up":t(({height:r,midpoint:e,width:i})=>[{x:i,y:0},{x:0,y:-e},{x:i,y:-r}],"left|up"),"left|down":t(({height:r,width:e})=>[{x:e,y:0},{x:0,y:0},{x:e,y:-r}],"left|down"),right:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:-i},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:0},{x:s,y:-r/2},{x:s-e,y:-r},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r+i}],"right"),left:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:0},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r},{x:0,y:-r/2}],"left"),up:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:-i},{x:e,y:-r+i},{x:0,y:-r+i},{x:s/2,y:-r},{x:s,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i}],"up"),down:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:s/2,y:0},{x:0,y:-i},{x:e,y:-i},{x:e,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i},{x:s,y:-i}],"down"),[rd]:()=>[{x:0,y:0}]},tS=t((r,e,i,s)=>{let o=Qw(r),n=(i.padding??0)/2,c=e.height+4*n,h=c/2,g=s??e.width+2*h+2*n,y=Jw(o);return(By[y]??By[rd])({height:c,midpoint:h,padding:n,width:g})},"getArrowPoints");async function sx(r,e){let i=e,{shapeSvg:s,bbox:o}=await P(r,i,te(i)),n=i.padding??0,c=o.height+2*n,h=c/2,g=o.width+2*h+n,y=i.width??0,B=i.positioned&&(i.widthInColumns??1)>1&&y>g?y:g,v=tS(i.directions??[],o,i,B),q=ro(s,B,c,v);return q.attr("style",i.style??null),I(i,q),i.intersect=function(W){return w.polygon(i,v,W)},s}t(sx,"block_arrow");async function ax(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{shapeSvg:n,bbox:c,label:h}=await P(r,e,te(e)),g=i?.nodeBorder??i?.lineColor??"currentColor",y=e.padding??12,f=18,B=12,v=Math.max(c.width+y*2,e.width??0,90),q=Math.max(c.height+y*2+f,e.height??0),W=-q/2,{cssStyles:H}=e,Y=n.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let Q=m.svg(n).path(jr(-v/2,W,v,q,B),Gt(e,{}));if(Y.node()?.appendChild(Q),H)Y.attr("style",H)}else Y.append("rect").attr("x",-v/2).attr("y",W).attr("width",v).attr("height",q).attr("rx",B).attr("ry",B).attr("style",o);Y.append("line").attr("x1",-v/2).attr("y1",W+f).attr("x2",v/2).attr("y2",W+f).attr("style",`stroke:${g};stroke-width:1px`);for(let X=0;X<3;X++)Y.append("circle").attr("cx",-v/2+12+X*9).attr("cy",W+f/2).attr("r",2.5).attr("style",`fill:${g};stroke:none`);Y.append("rect").attr("class","browser-address-bar").attr("x",-v/2+44).attr("y",W+4).attr("width",Math.max(v-56,10)).attr("height",f-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${g};stroke-width:1px;opacity:0.6`),I(e,Y);let j=W+f+(q-f)/2;return h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${j-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(X){return w.rect(e,X)},n}t(ax,"browser");var nh=12;async function nx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?28:o,c=e.look==="neo"?24:o,{shapeSvg:h,bbox:g}=await P(r,e,te(e)),y=(e?.width??g.width)+(e.look==="neo"?n*2:n+nh),f=(e?.height??g.height)+(e.look==="neo"?c*2:c),B=0,v=y,q=-f,W=0,H=[{x:B+nh,y:q},{x:v,y:q},{x:v,y:W},{x:B,y:W},{x:B,y:q+nh},{x:B+nh,y:q}],Y,{cssStyles:j}=e;if(e.look==="handDrawn"){let X=m.svg(h),Q=Gt(e,{}),rt=Oe(H),it=X.path(rt,Q);if(Y=h.insert(()=>it,":first-child").attr("transform",`translate(${-y/2}, ${f/2})`),j)Y.attr("style",j)}else Y=ro(h,y,f,H);if(s)Y.attr("style",s);return I(e,Y),e.intersect=function(X){return w.polygon(e,H,X)},h}t(nx,"card");function lx(r,e){let{nodeStyles:i}=k(e);e.label="";let s=r.insert("g").attr("class",te(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,n=Math.max(28,e.width??0),c=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],h=m.svg(s),g=Gt(e,{});if(e.look!=="handDrawn")g.roughness=0,g.fillStyle="solid";let y=Oe(c),f=h.path(y,g),B=s.insert(()=>f,":first-child");if(o&&e.look!=="handDrawn")B.selectAll("path").attr("style",o);if(i&&e.look!=="handDrawn")B.selectAll("path").attr("style",i);return e.width=28,e.height=28,e.intersect=function(v){return w.polygon(e,c,v)},s}t(lx,"choice");async function id(r,e,i){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{shapeSvg:n,bbox:c,halfPadding:h}=await P(r,e,te(e),{ignoreMinWidth:!0}),g=16,y=i?.padding??h,f=Math.sqrt(c.width**2+c.height**2)/2,B=e.look==="neo"?f+g:f+y,v,{cssStyles:q}=e;if(e.look==="handDrawn"){let W=m.svg(n),H=Gt(e,{}),Y=W.circle(0,0,B*2,H);v=n.insert(()=>Y,":first-child"),v.attr("class","basic label-container").attr("style",tr(q))}else v=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",B).attr("cx",0).attr("cy",0);return I(e,v),e.calcIntersect=function(W,H){let Y=W.width/2;return w.circle(W,Y,H)},e.intersect=function(W){return a.info("Circle intersect",e,B,W),w.circle(e,B,W)},n}t(id,"circle");async function hx(r,e){let i=e,s=["node",i.cssClasses,i.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:n,halfPadding:c}=await P(r,i,s),h=o.insert("rect",":first-child"),g=i.padding??0,y=i.positioned?i.width??0:n.width+g,f=i.positioned?i.height??0:n.height+g,B=i.positioned?-y/2:-n.width/2-c,v=i.positioned?-f/2:-n.height/2-c;return h.attr("class","basic cluster composite label-container").attr("style",i.style??null).attr("rx",i.rx??null).attr("ry",i.ry??null).attr("x",B).attr("y",v).attr("width",y).attr("height",f),I(i,h),i.intersect=function(q){return w.rect(i,q)},o}t(hx,"composite");async function cx(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{shapeSvg:n,bbox:c,label:h}=await P(r,e,te(e)),g=i?.nodeBorder??i?.lineColor??"currentColor",y=e.padding??12,f=20,B=12,v=Math.max(c.width+y*2,e.width??0,90),q=Math.max(c.height+y*2+f,e.height??0),W=-q/2,{cssStyles:H}=e,Y=n.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let Q=m.svg(n).path(jr(-v/2,W,v,q,B),Gt(e,{}));if(Y.node()?.appendChild(Q),H)Y.attr("style",H)}else Y.append("rect").attr("x",-v/2).attr("y",W).attr("width",v).attr("height",q).attr("rx",B).attr("ry",B).attr("style",o);Y.append("text").attr("x",-v/2+12).attr("y",W+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${g}`).text(">_"),I(e,Y);let j=W+f+(q-f)/2;return h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${j-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(X){return w.rect(e,X)},n}t(cx,"consoleWindow");function ux(r){let e=Math.cos(Math.PI/4),i=Math.sin(Math.PI/4),s=r*2,o={x:s/2*e,y:s/2*i},n={x:-(s/2)*e,y:s/2*i},c={x:-(s/2)*e,y:-(s/2)*i},h={x:s/2*e,y:-(s/2)*i};return`M ${n.x},${n.y} L ${h.x},${h.y}
233
- M ${o.x},${o.y} L ${c.x},${c.y}`}t(ux,"createLine");function fx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i,e.label="";let o=r.insert("g").attr("class",te(e)).attr("id",e.domId??e.id),n=Math.max(30,e?.width??0),{cssStyles:c}=e,h=m.svg(o),g=Gt(e,{});if(e.look!=="handDrawn")g.roughness=0,g.fillStyle="solid";let y=h.circle(0,0,n*2,g),f=ux(n),B=h.path(f,g),v=o.insert(()=>y,":first-child");if(v.insert(()=>B),v.attr("class","outer-path"),c&&e.look!=="handDrawn")v.selectAll("path").attr("style",c);if(s&&e.look!=="handDrawn")v.selectAll("path").attr("style",s);return I(e,v),e.intersect=function(q){return a.info("crossedCircle intersect",e,{radius:n,point:q}),w.circle(e,n,q)},o}t(fx,"crossedCircle");function Io(r,e,i,s=100,o=0,n=180){let c=[],h=o*Math.PI/180,f=(n*Math.PI/180-h)/(s-1);for(let B=0;B<s;B++){let v=h+B*f,q=r+i*Math.cos(v),W=e+i*Math.sin(v);c.push({x:-q,y:-W})}return c}t(Io,"generateCirclePoints");async function dx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,te(e)),h=e.look==="neo"?18:e.padding??0,g=e.look==="neo"?12:e.padding??0,y=n.width+h,f=n.height+g,B=Math.max(5,f*0.1),{cssStyles:v}=e,q=[...Io(y/2,-f/2,B,30,-90,0),{x:-y/2-B,y:B},...Io(y/2+B*2,-B,B,20,-180,-270),...Io(y/2+B*2,B,B,20,-90,-180),{x:-y/2-B,y:-f/2},...Io(y/2,f/2,B,20,0,90)],W=[{x:y/2,y:-f/2-B},{x:-y/2,y:-f/2-B},...Io(y/2,-f/2,B,20,-90,0),{x:-y/2-B,y:-B},...Io(y/2+y*0.1,-B,B,20,-180,-270),...Io(y/2+y*0.1,B,B,20,-90,-180),{x:-y/2-B,y:f/2},...Io(y/2,f/2,B,20,0,90),{x:-y/2,y:f/2+B},{x:y/2,y:f/2+B}],H=m.svg(o),Y=Gt(e,{fill:"none"});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let X=Oe(q).replace("Z",""),Q=H.path(X,Y),rt=Oe(W),it=H.path(rt,{...Y}),ct=o.insert("g",":first-child");if(ct.insert(()=>it,":first-child").attr("stroke-opacity",0),ct.insert(()=>Q,":first-child"),ct.attr("class","text"),v&&e.look!=="handDrawn")ct.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")ct.selectAll("path").attr("style",s);return ct.attr("transform",`translate(${B}, 0)`),c.attr("transform",`translate(${-y/2+B-(n.x-(n.left??0))},${-f/2+(e.padding??0)/2-(n.y-(n.top??0))})`),I(e,ct),e.intersect=function(lt){return w.polygon(e,W,lt)},o}t(dx,"curlyBraceLeft");function $o(r,e,i,s=100,o=0,n=180){let c=[],h=o*Math.PI/180,f=(n*Math.PI/180-h)/(s-1);for(let B=0;B<s;B++){let v=h+B*f,q=r+i*Math.cos(v),W=e+i*Math.sin(v);c.push({x:q,y:W})}return c}t($o,"generateCirclePoints");async function px(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,te(e)),h=e.look==="neo"?18:e.padding??0,g=e.look==="neo"?12:e.padding??0,y=n.width+(e.look==="neo"?h*2:h),f=n.height+(e.look==="neo"?g*2:g),B=Math.max(5,f*0.1),{cssStyles:v}=e,q=[...$o(y/2,-f/2,B,20,-90,0),{x:y/2+B,y:-B},...$o(y/2+B*2,-B,B,20,-180,-270),...$o(y/2+B*2,B,B,20,-90,-180),{x:y/2+B,y:f/2},...$o(y/2,f/2,B,20,0,90)],W=[{x:-y/2,y:-f/2-B},{x:y/2,y:-f/2-B},...$o(y/2,-f/2,B,20,-90,0),{x:y/2+B,y:-B},...$o(y/2+B*2,-B,B,20,-180,-270),...$o(y/2+B*2,B,B,20,-90,-180),{x:y/2+B,y:f/2},...$o(y/2,f/2,B,20,0,90),{x:y/2,y:f/2+B},{x:-y/2,y:f/2+B}],H=m.svg(o),Y=Gt(e,{fill:"none"});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let X=Oe(q).replace("Z",""),Q=H.path(X,Y),rt=Oe(W),it=H.path(rt,{...Y}),ct=o.insert("g",":first-child");if(ct.insert(()=>it,":first-child").attr("stroke-opacity",0),ct.insert(()=>Q,":first-child"),ct.attr("class","text"),v&&e.look!=="handDrawn")ct.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")ct.selectAll("path").attr("style",s);return ct.attr("transform",`translate(${-B}, 0)`),c.attr("transform",`translate(${-y/2+(e.padding??0)/2-(n.x-(n.left??0))},${-f/2+(e.padding??0)/2-(n.y-(n.top??0))})`),I(e,ct),e.intersect=function(lt){return w.polygon(e,W,lt)},o}t(px,"curlyBraceRight");function gr(r,e,i,s=100,o=0,n=180){let c=[],h=o*Math.PI/180,f=(n*Math.PI/180-h)/(s-1);for(let B=0;B<s;B++){let v=h+B*f,q=r+i*Math.cos(v),W=e+i*Math.sin(v);c.push({x:-q,y:-W})}return c}t(gr,"generateCirclePoints");async function gx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,te(e)),h=e.look==="neo"?18:e.padding??0,g=e.look==="neo"?12:e.padding??0,y=n.width+(e.look==="neo"?h*2:h),f=n.height+(e.look==="neo"?g*2:g),B=Math.max(5,f*0.1),{cssStyles:v}=e,q=[...gr(y/2,-f/2,B,30,-90,0),{x:-y/2-B,y:B},...gr(y/2+B*2,-B,B,20,-180,-270),...gr(y/2+B*2,B,B,20,-90,-180),{x:-y/2-B,y:-f/2},...gr(y/2,f/2,B,20,0,90)],W=[...gr(-y/2+B+B/2,-f/2,B,20,-90,-180),{x:y/2-B/2,y:B},...gr(-y/2-B/2,-B,B,20,0,90),...gr(-y/2-B/2,B,B,20,-90,0),{x:y/2-B/2,y:-B},...gr(-y/2+B+B/2,f/2,B,30,-180,-270)],H=[{x:y/2,y:-f/2-B},{x:-y/2,y:-f/2-B},...gr(y/2,-f/2,B,20,-90,0),{x:-y/2-B,y:-B},...gr(y/2+B*2,-B,B,20,-180,-270),...gr(y/2+B*2,B,B,20,-90,-180),{x:-y/2-B,y:f/2},...gr(y/2,f/2,B,20,0,90),{x:-y/2,y:f/2+B},{x:y/2-B-B/2,y:f/2+B},...gr(-y/2+B+B/2,-f/2,B,20,-90,-180),{x:y/2-B/2,y:B},...gr(-y/2-B/2,-B,B,20,0,90),...gr(-y/2-B/2,B,B,20,-90,0),{x:y/2-B/2,y:-B},...gr(-y/2+B+B/2,f/2,B,30,-180,-270)],Y=m.svg(o),j=Gt(e,{fill:"none"});if(e.look!=="handDrawn")j.roughness=0,j.fillStyle="solid";let Q=Oe(q).replace("Z",""),rt=Y.path(Q,j),ct=Oe(W).replace("Z",""),lt=Y.path(ct,j),dt=Oe(H),Ct=Y.path(dt,{...j}),Bt=o.insert("g",":first-child");if(Bt.insert(()=>Ct,":first-child").attr("stroke-opacity",0),Bt.insert(()=>rt,":first-child"),Bt.insert(()=>lt,":first-child"),Bt.attr("class","text"),v&&e.look!=="handDrawn")Bt.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")Bt.selectAll("path").attr("style",s);return Bt.attr("transform",`translate(${B-B/4}, 0)`),c.attr("transform",`translate(${-y/2+(e.padding??0)/2-(n.x-(n.left??0))},${-f/2+(e.padding??0)/2-(n.y-(n.top??0))})`),I(e,Bt),e.intersect=function(kt){return w.polygon(e,H,kt)},o}t(gx,"curlyBraces");async function mx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o,h=20,g=5,{shapeSvg:y,bbox:f}=await P(r,e,te(e)),B=Math.max(g,f.height+c*2,e?.height??0),v=B/2,q=v-Math.sqrt(Math.max(0,v**2-(f.height/2)**2)),W=Math.max(B/4,q),H=Math.max(h,f.width+n*2+W*2,(f.width+n*2)*1.25,e?.width??0),{cssStyles:Y}=e,j=m.svg(y),X=Gt(e,{});if(e.look!=="handDrawn")X.roughness=0,X.fillStyle="solid";let Q=H,rt=B,it=Q-v,ct=rt/4,lt=[{x:it,y:0},{x:ct,y:0},{x:0,y:rt/2},{x:ct,y:rt},{x:it,y:rt},...Ni(-it,-rt/2,v,50,270,90)],dt=Oe(lt),Ct=j.path(dt,X),Bt=y.insert(()=>Ct,":first-child");if(Bt.attr("class","basic label-container outer-path"),Y&&e.look!=="handDrawn")Bt.selectChildren("path").attr("style",Y);if(s&&e.look!=="handDrawn")Bt.selectChildren("path").attr("style",s);return Bt.attr("transform",`translate(${-H/2}, ${-B/2})`),I(e,Bt),e.intersect=function(kt){return w.polygon(e,lt,kt)},y}t(mx,"curvedTrapezoid");async function yx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,te(e)),h=e.padding??20,g=Math.max(n.width+h*2,e.width??0,100),y=Math.min(Math.max(g*0.23,16),56),f=y*0.27,B=Math.max(n.height+h*2,e.height?e.height-(2*y-f):0),v=Math.min(g*0.177,B*0.45),q=B+2*y-f,W=-q/2,H=W+2*y-f,Y=o.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:j}=e;if(e.look==="handDrawn"){let dt=m.svg(o),Ct=Gt(e,{}),Bt=dt.path(jr(-g/2,H,g,B,v),Ct),kt=dt.circle(0,W+y,y*2,Ct);if(Y.insert(()=>kt,":first-child"),Y.insert(()=>Bt,":first-child"),j)Y.attr("style",j)}else Y.append("rect").attr("x",-g/2).attr("y",H).attr("width",g).attr("height",B).attr("rx",v).attr("ry",v).attr("style",s),Y.append("circle").attr("cx",0).attr("cy",W+y).attr("r",y).attr("style",s);I(e,Y);let X=H+B/2;c.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${X-n.height/2-(n.y-(n.top??0))})`);let Q=W+y,rt=Math.asin(Math.min(1,(H-Q)/y))*180/Math.PI,it=24,lt=[...Ni(0,-Q,y,it,180+rt,-rt),...Ni(-(-g/2+v),-(H+v),v,12,90,0),...Ni(-(-g/2+v),-(q/2-v),v,12,360,270),...Ni(-(g/2-v),-(q/2-v),v,12,270,180),...Ni(-(g/2-v),-(H+v),v,12,180,90)];return e.intersect=function(dt){return w.polygon(e,lt,dt)},o}t(yx,"person");var eS=t((r,e,i,s,o,n)=>[`M${r},${e+n}`,`a${o},${n} 0,0,0 ${i},0`,`a${o},${n} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${n} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createCylinderPathD"),rS=t((r,e,i,s,o,n)=>[`M${r},${e+n}`,`M${r+i},${e+n}`,`a${o},${n} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${n} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createOuterCylinderPathD"),iS=t((r,e,i,s,o,n)=>[`M${r-i/2},${-s/2}`,`a${o},${n} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),vy=8,Ly=8;async function xx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?24:o,c=e.look==="neo"?24:o,h=e.width??0;if(e.width){if(e.width=e.width-c,e.width<Ly)e.width=Ly}if(e.height){let X=h/2/(2.5+h/50);if(e.height=e.height-n-X*3,e.height<vy)e.height=vy}let{shapeSvg:g,bbox:y,label:f}=await P(r,e,te(e)),B=Math.max(e.width??0,y.width)+c,v=B/2,q=v/(2.5+B/50),W=Math.max(e.height??0,y.height)+n+q,H,{cssStyles:Y}=e;if(e.look==="handDrawn"){let j=m.svg(g),X=rS(0,0,B,W,v,q),Q=iS(0,q,B,W,v,q),rt=Gt(e,{}),it=j.path(X,rt),ct=j.path(Q,Gt(e,{fill:"none"}));if(H=g.insert(()=>ct,":first-child"),H=g.insert(()=>it,":first-child"),H.attr("class","basic label-container"),Y)H.attr("style",Y)}else{let j=eS(0,0,B,W,v,q);H=g.insert("path",":first-child").attr("d",j).attr("class","basic label-container outer-path").attr("style",tr(Y)).attr("style",s)}return H.attr("label-offset-y",q),H.attr("transform",`translate(${-B/2}, ${-(W/2+q)})`),I(e,H),f.attr("transform",`translate(${-(y.width/2)-(y.x-(y.left??0))}, ${-(y.height/2)+(e.padding??0)/1.5-(y.y-(y.top??0))})`),e.intersect=function(j){let X=w.rect(e,j),Q=X.x-(e.x??0);if(v!=0&&(Math.abs(Q)<(e.width??0)/2||Math.abs(Q)==(e.width??0)/2&&Math.abs(X.y-(e.y??0))>(e.height??0)/2-q)){let rt=q*q*(1-Q*Q/(v*v));if(rt>0)rt=Math.sqrt(rt);if(rt=q-rt,j.y-(e.y??0)>0)rt=-rt;X.y+=rt}return X},g}t(xx,"cylinder");async function Ns(r,e,i){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{shapeSvg:n,bbox:c}=await P(r,e,te(e)),h=Math.max(c.width+i.labelPaddingX*2,e?.width||0),g=Math.max(c.height+i.labelPaddingY*2,e?.height||0),y=-h/2,f=-g/2,B,{rx:v,ry:q}=e,{cssStyles:W}=e;if(i?.rx&&i.ry)v=i.rx,q=i.ry;if(e.look==="handDrawn"){let H=m.svg(n),Y=Gt(e,{}),j=v||q?H.path(jr(y,f,h,g,v||0),Y):H.rectangle(y,f,h,g,Y);B=n.insert(()=>j,":first-child"),B.attr("class","basic label-container").attr("style",tr(W))}else B=n.insert("rect",":first-child"),B.attr("class","basic label-container").attr("style",o).attr("rx",tr(v)).attr("ry",tr(q)).attr("x",y).attr("y",f).attr("width",h).attr("height",g);return I(e,B,e.look==="handDrawn"?void 0:{width:h,height:g}),e.calcIntersect=function(H,Y){return w.rect(H,Y)},e.intersect=function(H){return w.rect(e,H)},n}t(Ns,"drawRect");async function Cx(r,e){let{cssClasses:i,labelPaddingX:s,labelPaddingY:o,padding:n,width:c,height:h}=e,g={rx:0,ry:0,classes:i??"",labelPaddingX:s??(n??0)*2,labelPaddingY:o??n??0},y=await Ns(r,e,g);if(e.look==="handDrawn"){let q=m.svg(y),W=Gt(e,{}),H=y.select(".basic.label-container > path:nth-child(2)"),Y=H.node();if(!Y)return y;let j=null;if(Y instanceof SVGGraphicsElement)j=Y.getBBox();else return y;return y.insert(()=>q.line(j.x,j.y,j.x+j.width,j.y,W),".basic.label-container g.label"),y.insert(()=>q.line(j.x,j.y+j.height,j.x+j.width,j.y+j.height,W),".basic.label-container g.label"),H.remove(),y}let f=y.select(".basic.label-container"),B=(Number(f.attr("width"))||c)??0,v=(Number(f.attr("height"))||h)??0;if(B>0&&v>0)f.attr("stroke-dasharray",`${B} ${v}`);return y}t(Cx,"datastore");async function bx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,n=e.look==="neo"?16:e.padding??0,{shapeSvg:c,bbox:h,label:g}=await P(r,e,te(e)),y=h.width+o,f=h.height+n,B=f*0.2,v=-y/2,q=-f/2-B/2,{cssStyles:W}=e,H=m.svg(c),Y=Gt(e,{});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let j=[{x:v,y:q+B},{x:-v,y:q+B},{x:-v,y:-q},{x:v,y:-q},{x:v,y:q},{x:-v,y:q},{x:-v,y:q+B}],X=H.polygon(j.map((rt)=>[rt.x,rt.y]),Y),Q=c.insert(()=>X,":first-child");if(Q.attr("class","basic label-container outer-path"),W&&e.look!=="handDrawn")Q.selectAll("path").attr("style",W);if(s&&e.look!=="handDrawn")Q.selectAll("path").attr("style",s);return g.attr("transform",`translate(${v+(e.padding??0)/2-(h.x-(h.left??0))}, ${q+B+(e.padding??0)/2-(h.y-(h.top??0))})`),I(e,Q),e.intersect=function(rt){return w.rect(e,rt)},c}t(bx,"dividedRectangle");async function kx(r,e){let{labelStyles:i,nodeStyles:s}=k(e),o=e.look==="neo"?12:5;e.labelStyle=i;let n=e.padding??0,c=e.look==="neo"?16:n,{shapeSvg:h,bbox:g}=await P(r,e,te(e),{ignoreMinWidth:!0}),y=Math.sqrt(g.width**2+g.height**2)/2,f=(e?.width?e?.width/2:y)+(c??0),B=f+o,v,{cssStyles:q}=e;if(e.look==="handDrawn"){let W=m.svg(h),H=Gt(e,{roughness:0.2,strokeWidth:2.5}),Y=Gt(e,{roughness:0.2,strokeWidth:1.5}),j=W.circle(0,0,B*2,H),X=W.circle(0,0,f*2,Y);v=h.insert("g",":first-child"),v.attr("class",tr(e.cssClasses)).attr("style",tr(q)),v.node()?.appendChild(j),v.node()?.appendChild(X)}else{v=h.insert("g",":first-child");let W=v.insert("circle",":first-child"),H=v.insert("circle");v.attr("class","basic label-container").attr("style",s),W.attr("class","outer-circle").attr("style",s).attr("r",B).attr("cx",0).attr("cy",0),H.attr("class","inner-circle").attr("style",s).attr("r",f).attr("cx",0).attr("cy",0)}return I(e,v),e.intersect=function(W){return a.info("DoubleCircle intersect",e,B,W),w.circle(e,B,W)},h}t(kx,"doublecircle");async function wx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,halfPadding:c}=await P(r,e,te(e)),{theme:h,themeVariables:g}=l();Ze(o,e.colorIndex,h,g.borderColorArray);let y=c??10,f=n.width/2+y*2,B=n.height/2+y*2,v,{cssStyles:q}=e;if(e.look==="handDrawn"){let W=m.svg(o),H=Gt(e,{}),Y=W.ellipse(0,0,f*2,B*2,H);if(v=o.insert(()=>Y,":first-child"),v.attr("class","basic label-container"),q)v.attr("style",q)}else v=o.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",s).attr("rx",f).attr("ry",B).attr("cx",0).attr("cy",0);return e.width=f*2,e.height=B*2,I(e,v),e.calcIntersect=function(W,H){let Y=W.width/2,j=W.height/2;return w.ellipse(W,Y,j,H)},e.intersect=function(W){return w.ellipse(e,f,B,W)},o}t(wx,"usecaseEllipse");function Sx(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);e.label="",e.labelStyle=s;let n=r.insert("g").attr("class",te(e)).attr("id",e.domId??e.id),c=7,{cssStyles:h}=e,g=m.svg(n),{nodeBorder:y}=i,f=Gt(e,{fillStyle:"solid"});if(e.look!=="handDrawn")f.roughness=0;let B=g.circle(0,0,c*2,f),v=n.insert(()=>B,":first-child");if(v.selectAll("path").attr("style",`fill: ${y} !important;`),h&&h.length>0&&e.look!=="handDrawn")v.selectAll("path").attr("style",h);if(o&&e.look!=="handDrawn")v.selectAll("path").attr("style",o);return I(e,v),e.intersect=function(q){return a.info("filledCircle intersect",e,{radius:c,point:q}),w.circle(e,c,q)},n}t(Sx,"filledCircle");var Fy=10,Ay=10;async function Tx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.height=e?.height??0,e.height<Fy)e.height=Fy;if(e.width=(e?.width??0)-n-n/2,e.width<Ay)e.width=Ay}let{shapeSvg:c,bbox:h,label:g}=await P(r,e,te(e)),y=(e?.width?e?.width:h.width)+(n??0),f=e?.height?e?.height:y+h.height,B=f,v=[{x:0,y:-f},{x:B,y:-f},{x:B/2,y:0}],{cssStyles:q}=e,W=m.svg(c),H=Gt(e,{});if(e.look!=="handDrawn")H.roughness=0,H.fillStyle="solid";let Y=Oe(v),j=W.path(Y,H),X=c.insert(()=>j,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`).attr("class","outer-path");if(q&&e.look!=="handDrawn")X.selectChildren("path").attr("style",q);if(s&&e.look!=="handDrawn")X.selectChildren("path").attr("style",s);return e.width=y,e.height=f,I(e,X),g.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-f/2+(e.padding??0)/2+(h.y-(h.top??0))})`),e.intersect=function(Q){return a.info("Triangle intersect",e,v,Q),w.polygon(e,v,Q)},c}t(Tx,"flippedTriangle");async function _x(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,te(e)),h=e.padding??12,g=Math.max(n.width+h*2,e.width??0,90),y=n.height+h*2,f=Math.max(Math.min(y*0.16,14),8),B=Math.max(y+f,e.height??0),v=B-f,q=Math.max(g*0.38,28),W=-B/2,H=[{x:-g/2,y:W},{x:-g/2+q,y:W},{x:-g/2+q,y:W+f},{x:g/2,y:W+f},{x:g/2,y:B/2},{x:-g/2,y:B/2}],Y=[`M${H[0].x},${H[0].y}`,...H.slice(1).map((rt)=>`L${rt.x},${rt.y}`),"Z"].join(" "),{cssStyles:j}=e,X;if(e.look==="handDrawn"){let it=m.svg(o).path(Y,Gt(e,{}));if(X=o.insert(()=>it,":first-child").attr("class","basic label-container"),j)X.attr("style",j)}else X=o.insert("path",":first-child").attr("d",Y).attr("class","basic label-container").attr("style",s);if(e.look==="handDrawn")I(e,X);else I(e,X,{width:g,height:B});let Q=W+f+v/2;return c.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${Q-n.height/2-(n.y-(n.top??0))})`),e.intersect=function(rt){return w.polygon(e,H,rt)},o}t(_x,"folder");function Bx(r,e,{dir:i,config:{state:s,themeVariables:o}}){let{nodeStyles:n}=k(e);e.label="";let c=r.insert("g").attr("class",te(e)).attr("id",e.domId??e.id),{cssStyles:h}=e,g=Math.max(70,e?.width??0),y=Math.max(10,e?.height??0);if(i==="LR"||i==="RL")g=Math.max(10,e?.width??0),y=Math.max(70,e?.height??0);let f=-1*g/2,B=-1*y/2,v=m.svg(c),q=Gt(e,{stroke:o.lineColor,fill:o.lineColor});if(e.look!=="handDrawn")q.roughness=0,q.fillStyle="solid";let W=v.rectangle(f,B,g,y,q),H=c.insert(()=>W,":first-child");if(h&&e.look!=="handDrawn")H.selectAll("path").attr("style",h);if(n&&e.look!=="handDrawn")H.selectAll("path").attr("style",n);I(e,H);let Y=s?.padding??0;if(e.width&&e.height)e.width+=Y/2||0,e.height+=Y/2||0;return e.intersect=function(j){return w.rect(e,j)},c}t(Bx,"forkJoin");async function vx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=15,n=10,c=e.look==="neo"?16:e.padding??0,h=e.look==="neo"?12:e.padding??0;if(e.width||e.height){if(e.height=(e?.height??0)-h*2,e.height<n)e.height=n;if(e.width=(e?.width??0)-c*2,e.width<o)e.width=o}let{shapeSvg:g,bbox:y}=await P(r,e,te(e)),f=(e?.height?e?.height:Math.max(n,y.height))+h*2,B=f/2,v=B-Math.sqrt(Math.max(0,B**2-(y.height/2)**2)),q=(e?.width?e?.width:Math.max(o,y.width)+v*2)+c*2,{cssStyles:W}=e,H=m.svg(g),Y=Gt(e,{});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let j=[{x:-q/2,y:-f/2},{x:q/2-B,y:-f/2},...Ni(-q/2+B,0,B,50,90,270),{x:q/2-B,y:f/2},{x:-q/2,y:f/2}],X=Oe(j),Q=H.path(X,Y),rt=g.insert(()=>Q,":first-child");if(rt.attr("class","basic label-container outer-path"),W&&e.look!=="handDrawn")rt.selectChildren("path").attr("style",W);if(s&&e.look!=="handDrawn")rt.selectChildren("path").attr("style",s);return I(e,rt),e.intersect=function(it){return a.info("Pill intersect",e,{radius:B,point:it}),w.polygon(e,j,it)},g}t(vx,"halfRoundedRectangle");var oS=t((r,e,i,s,o)=>[`M${r+o},${e}`,`L${r+i-o},${e}`,`L${r+i},${e-s/2}`,`L${r+i-o},${e-s}`,`L${r+o},${e-s}`,`L${r},${e-s/2}`,"Z"].join(" "),"createHexagonPathD");async function Lx(r,e){let{labelStyles:i,nodeStyles:s}=k(e),o=e.look==="neo"?3.5:4;e.labelStyle=i;let n=e.padding??0,c=70,h=32,g=e.look==="neo"?c:n,y=e.look==="neo"?h:n;if(e.width||e.height){let Q=(e.height??0)/o;e.width=(e?.width??0)-2*Q-y,e.height=(e.height??0)-g}let{shapeSvg:f,bbox:B}=await P(r,e,te(e)),v=(e?.height?e?.height:B.height)+g,q=v/o,W=(e?.width?e?.width:B.width)+2*q+y,H=[{x:q,y:0},{x:W-q,y:0},{x:W,y:-v/2},{x:W-q,y:-v},{x:q,y:-v},{x:0,y:-v/2}],Y,{cssStyles:j}=e;if(e.look==="handDrawn"){let X=m.svg(f),Q=Gt(e,{}),rt=oS(0,0,W,v,q),it=X.path(rt,Q);if(Y=f.insert(()=>it,":first-child").attr("transform",`translate(${-W/2}, ${v/2})`),j)Y.attr("style",j)}else Y=ro(f,W,v,H);if(s)Y.attr("style",s);return e.width=W,e.height=v,I(e,Y),e.intersect=function(X){return w.polygon(e,H,X)},f}t(Lx,"hexagon");async function Fx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.label="",e.labelStyle=i;let{shapeSvg:o}=await P(r,e,te(e)),n=Math.max(30,e?.width??0),c=Math.max(30,e?.height??0),{cssStyles:h}=e,g=m.svg(o),y=Gt(e,{});if(e.look!=="handDrawn")y.roughness=0,y.fillStyle="solid";let f=[{x:0,y:0},{x:n,y:0},{x:0,y:c},{x:n,y:c}],B=Oe(f),v=g.path(B,y),q=o.insert(()=>v,":first-child");if(q.attr("class","basic label-container outer-path"),h&&e.look!=="handDrawn")q.selectChildren("path").attr("style",h);if(s&&e.look!=="handDrawn")q.selectChildren("path").attr("style",s);return q.attr("transform",`translate(${-n/2}, ${-c/2})`),I(e,q),e.intersect=function(W){return a.info("Pill intersect",e,{points:f}),w.polygon(e,f,W)},o}t(Fx,"hourglass");async function Ax(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=k(e);e.labelStyle=o;let n=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(n,c),g=s?.wrappingWidth;e.width=Math.max(h,g??0);let{shapeSvg:y,bbox:f,label:B}=await P(r,e,"icon-shape default"),v=e.pos==="t",q=h,W=h,{nodeBorder:H}=i,{stylesMap:Y}=Di(e),j=-W/2,X=-q/2,Q=e.label?8:0,rt=m.svg(y),it=Gt(e,{stroke:"none",fill:"none"});if(e.look!=="handDrawn")it.roughness=0,it.fillStyle="solid";let ct=rt.rectangle(j,X,W,q,it),lt=Math.max(W,f.width),dt=q+f.height+Q,Ct=rt.rectangle(-lt/2,-dt/2,lt,dt,{...it,fill:"transparent",stroke:"none"}),Bt=y.insert(()=>ct,":first-child"),kt=y.insert(()=>Ct);if(e.icon){let bt=y.append("g");bt.html(`<g>${await nt(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let st=bt.node().getBBox(),{width:at,height:mt,x:ot,y:wt}=st;bt.attr("transform",`translate(${-at/2-ot},${v?f.height/2+Q/2-mt/2-wt:-f.height/2-Q/2-mt/2-wt})`),bt.attr("style",`color: ${Y.get("stroke")??H};`)}return B.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${v?-dt/2:dt/2-f.height})`),Bt.attr("transform",`translate(0,${v?f.height/2+Q/2:-f.height/2-Q/2})`),I(e,kt),e.intersect=function(bt){if(a.info("iconSquare intersect",e,bt),!e.label)return w.rect(e,bt);let st=e.x??0,at=e.y??0,mt=e.height??0,ot=[];if(v)ot=[{x:st-f.width/2,y:at-mt/2},{x:st+f.width/2,y:at-mt/2},{x:st+f.width/2,y:at-mt/2+f.height+Q},{x:st+W/2,y:at-mt/2+f.height+Q},{x:st+W/2,y:at+mt/2},{x:st-W/2,y:at+mt/2},{x:st-W/2,y:at-mt/2+f.height+Q},{x:st-f.width/2,y:at-mt/2+f.height+Q}];else ot=[{x:st-W/2,y:at-mt/2},{x:st+W/2,y:at-mt/2},{x:st+W/2,y:at-mt/2+q},{x:st+f.width/2,y:at-mt/2+q},{x:st+f.width/2/2,y:at+mt/2},{x:st-f.width/2,y:at+mt/2},{x:st-f.width/2,y:at-mt/2+q},{x:st-W/2,y:at-mt/2+q}];return w.polygon(e,ot,bt)},y}t(Ax,"icon");async function Mx(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=k(e);e.labelStyle=o;let n=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(n,c),g=s?.wrappingWidth;e.width=Math.max(h,g??0);let{shapeSvg:y,bbox:f,label:B}=await P(r,e,"icon-shape default"),v=20,q=e.label?8:0,W=e.pos==="t",{nodeBorder:H,mainBkg:Y}=i,{stylesMap:j}=Di(e),X=m.svg(y),Q=Gt(e,{});if(e.look!=="handDrawn")Q.roughness=0,Q.fillStyle="solid";let rt=j.get("fill");Q.stroke=rt??Y;let it=y.append("g");if(e.icon)it.html(`<g>${await nt(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let ct=it.node().getBBox(),{width:lt,height:dt,x:Ct,y:Bt}=ct,kt=Math.max(lt,dt)*Math.SQRT2+v*2,bt=X.circle(0,0,kt,Q),st=Math.max(kt,f.width),at=kt+f.height+q,mt=X.rectangle(-st/2,-at/2,st,at,{...Q,fill:"transparent",stroke:"none"}),ot=y.insert(()=>bt,":first-child"),wt=y.insert(()=>mt);return it.attr("transform",`translate(${-lt/2-Ct},${W?f.height/2+q/2-dt/2-Bt:-f.height/2-q/2-dt/2-Bt})`),it.attr("style",`color: ${j.get("stroke")??H};`),B.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${W?-at/2:at/2-f.height})`),ot.attr("transform",`translate(0,${W?f.height/2+q/2:-f.height/2-q/2})`),I(e,wt),e.intersect=function(Lt){return a.info("iconSquare intersect",e,Lt),w.rect(e,Lt)},y}t(Mx,"iconCircle");async function Ex(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=k(e);e.labelStyle=o;let n=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(n,c),g=s?.wrappingWidth;e.width=Math.max(h,g??0);let{shapeSvg:y,bbox:f,halfPadding:B,label:v}=await P(r,e,"icon-shape default"),q=e.pos==="t",W=h+B*2,H=h+B*2,{nodeBorder:Y,mainBkg:j}=i,{stylesMap:X}=Di(e),Q=-H/2,rt=-W/2,it=e.label?8:0,ct=m.svg(y),lt=Gt(e,{});if(e.look!=="handDrawn")lt.roughness=0,lt.fillStyle="solid";let dt=X.get("fill");lt.stroke=dt??j;let Ct=ct.path(jr(Q,rt,H,W,5),lt),Bt=Math.max(H,f.width),kt=W+f.height+it,bt=ct.rectangle(-Bt/2,-kt/2,Bt,kt,{...lt,fill:"transparent",stroke:"none"}),st=y.insert(()=>Ct,":first-child").attr("class","icon-shape2"),at=y.insert(()=>bt);if(e.icon){let mt=y.append("g");mt.html(`<g>${await nt(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let ot=mt.node().getBBox(),{width:wt,height:Lt,x:Yt,y:Ht}=ot;mt.attr("transform",`translate(${-wt/2-Yt},${q?f.height/2+it/2-Lt/2-Ht:-f.height/2-it/2-Lt/2-Ht})`),mt.attr("style",`color: ${X.get("stroke")??Y};`)}return v.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${q?-kt/2:kt/2-f.height})`),st.attr("transform",`translate(0,${q?f.height/2+it/2:-f.height/2-it/2})`),I(e,at),e.intersect=function(mt){if(a.info("iconSquare intersect",e,mt),!e.label)return w.rect(e,mt);let ot=e.x??0,wt=e.y??0,Lt=e.height??0,Yt=[];if(q)Yt=[{x:ot-f.width/2,y:wt-Lt/2},{x:ot+f.width/2,y:wt-Lt/2},{x:ot+f.width/2,y:wt-Lt/2+f.height+it},{x:ot+H/2,y:wt-Lt/2+f.height+it},{x:ot+H/2,y:wt+Lt/2},{x:ot-H/2,y:wt+Lt/2},{x:ot-H/2,y:wt-Lt/2+f.height+it},{x:ot-f.width/2,y:wt-Lt/2+f.height+it}];else Yt=[{x:ot-H/2,y:wt-Lt/2},{x:ot+H/2,y:wt-Lt/2},{x:ot+H/2,y:wt-Lt/2+W},{x:ot+f.width/2,y:wt-Lt/2+W},{x:ot+f.width/2/2,y:wt+Lt/2},{x:ot-f.width/2,y:wt+Lt/2},{x:ot-f.width/2,y:wt-Lt/2+W},{x:ot-H/2,y:wt-Lt/2+W}];return w.polygon(e,Yt,mt)},y}t(Ex,"iconRounded");async function Ox(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=k(e);e.labelStyle=o;let n=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(n,c),g=s?.wrappingWidth;e.width=Math.max(h,g??0);let{shapeSvg:y,bbox:f,halfPadding:B,label:v}=await P(r,e,"icon-shape default"),q=e.pos==="t",W=h+B*2,H=h+B*2,{nodeBorder:Y,mainBkg:j}=i,{stylesMap:X}=Di(e),Q=-H/2,rt=-W/2,it=e.label?8:0,ct=m.svg(y),lt=Gt(e,{});if(e.look!=="handDrawn")lt.roughness=0,lt.fillStyle="solid";let dt=X.get("fill");lt.stroke=dt??j;let Ct=ct.path(jr(Q,rt,H,W,0.1),lt),Bt=Math.max(H,f.width),kt=W+f.height+it,bt=ct.rectangle(-Bt/2,-kt/2,Bt,kt,{...lt,fill:"transparent",stroke:"none"}),st=y.insert(()=>Ct,":first-child"),at=y.insert(()=>bt);if(e.icon){let mt=y.append("g");mt.html(`<g>${await nt(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let ot=mt.node().getBBox(),{width:wt,height:Lt,x:Yt,y:Ht}=ot;mt.attr("transform",`translate(${-wt/2-Yt},${q?f.height/2+it/2-Lt/2-Ht:-f.height/2-it/2-Lt/2-Ht})`),mt.attr("style",`color: ${X.get("stroke")??Y};`)}return v.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${q?-kt/2:kt/2-f.height})`),st.attr("transform",`translate(0,${q?f.height/2+it/2:-f.height/2-it/2})`),I(e,at),e.intersect=function(mt){if(a.info("iconSquare intersect",e,mt),!e.label)return w.rect(e,mt);let ot=e.x??0,wt=e.y??0,Lt=e.height??0,Yt=[];if(q)Yt=[{x:ot-f.width/2,y:wt-Lt/2},{x:ot+f.width/2,y:wt-Lt/2},{x:ot+f.width/2,y:wt-Lt/2+f.height+it},{x:ot+H/2,y:wt-Lt/2+f.height+it},{x:ot+H/2,y:wt+Lt/2},{x:ot-H/2,y:wt+Lt/2},{x:ot-H/2,y:wt-Lt/2+f.height+it},{x:ot-f.width/2,y:wt-Lt/2+f.height+it}];else Yt=[{x:ot-H/2,y:wt-Lt/2},{x:ot+H/2,y:wt-Lt/2},{x:ot+H/2,y:wt-Lt/2+W},{x:ot+f.width/2,y:wt-Lt/2+W},{x:ot+f.width/2/2,y:wt+Lt/2},{x:ot-f.width/2,y:wt+Lt/2},{x:ot-f.width/2,y:wt-Lt/2+W},{x:ot-H/2,y:wt-Lt/2+W}];return w.polygon(e,Yt,mt)},y}t(Ox,"iconSquare");async function Ix(r,e,{config:{flowchart:i}}){let s=new Image;s.src=e?.img??"",await s.decode();let o=Number(s.naturalWidth.toString().replace("px","")),n=Number(s.naturalHeight.toString().replace("px",""));e.imageAspectRatio=o/n;let{labelStyles:c}=k(e);e.labelStyle=c;let h=i?.wrappingWidth;e.defaultWidth=i?.wrappingWidth;let g=Math.max(e.label?h??0:0,e?.assetWidth??o),y=e.constraint==="on"?e?.assetHeight?e.assetHeight*e.imageAspectRatio:g:g,f=e.constraint==="on"?y/e.imageAspectRatio:e?.assetHeight??n;e.width=Math.max(y,h??0);let{shapeSvg:B,bbox:v,label:q}=await P(r,e,"image-shape default"),W=e.pos==="t",H=-y/2,Y=-f/2,j=e.label?8:0,X=m.svg(B),Q=Gt(e,{});if(e.look!=="handDrawn")Q.roughness=0,Q.fillStyle="solid";let rt=X.rectangle(H,Y,y,f,Q),it=Math.max(y,v.width),ct=f+v.height+j,lt=X.rectangle(-it/2,-ct/2,it,ct,{...Q,fill:"none",stroke:"none"}),dt=B.insert(()=>rt,":first-child"),Ct=B.insert(()=>lt);if(e.img){let Bt=B.append("image");Bt.attr("href",e.img),Bt.attr("width",y),Bt.attr("height",f),Bt.attr("preserveAspectRatio","none"),Bt.attr("transform",`translate(${-y/2},${W?ct/2-f:-ct/2})`)}return q.attr("transform",`translate(${-v.width/2-(v.x-(v.left??0))},${W?-f/2-v.height/2-j/2:f/2-v.height/2+j/2})`),dt.attr("transform",`translate(0,${W?v.height/2+j/2:-v.height/2-j/2})`),I(e,Ct),e.intersect=function(Bt){if(a.info("iconSquare intersect",e,Bt),!e.label)return w.rect(e,Bt);let kt=e.x??0,bt=e.y??0,st=e.height??0,at=[];if(W)at=[{x:kt-v.width/2,y:bt-st/2},{x:kt+v.width/2,y:bt-st/2},{x:kt+v.width/2,y:bt-st/2+v.height+j},{x:kt+y/2,y:bt-st/2+v.height+j},{x:kt+y/2,y:bt+st/2},{x:kt-y/2,y:bt+st/2},{x:kt-y/2,y:bt-st/2+v.height+j},{x:kt-v.width/2,y:bt-st/2+v.height+j}];else at=[{x:kt-y/2,y:bt-st/2},{x:kt+y/2,y:bt-st/2},{x:kt+y/2,y:bt-st/2+f},{x:kt+v.width/2,y:bt-st/2+f},{x:kt+v.width/2/2,y:bt+st/2},{x:kt-v.width/2,y:bt+st/2},{x:kt-v.width/2,y:bt-st/2+f},{x:kt-y/2,y:bt-st/2+f}];return w.polygon(e,at,Bt)},B}t(Ix,"imageSquare");async function $x(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=o,c=e.look==="neo"?o*2:o,{shapeSvg:h,bbox:g}=await P(r,e,te(e)),y=Math.max(g.height+n*2,e.height??0),f=Math.max(g.width+c*2,(e.width??0)-y),B=[{x:0,y:0},{x:f,y:0},{x:f+3*y/6,y:-y},{x:-3*y/6,y:-y}],v,{cssStyles:q}=e;if(e.look==="handDrawn"){let W=m.svg(h),H=Gt(e,{}),Y=Oe(B),j=W.path(Y,H);if(v=h.insert(()=>j,":first-child").attr("transform",`translate(${-f/2}, ${y/2})`),q)v.attr("style",q)}else v=ro(h,f,y,B);if(s)v.attr("style",s);return e.width=f,e.height=y,I(e,v),e.intersect=function(W){return w.polygon(e,B,W)},h}t($x,"inv_trapezoid");async function Dx(r,e){let{shapeSvg:i,bbox:s,label:o}=await P(r,e,"label"),n=i.insert("rect",":first-child"),c=0.1,h=0.1;return n.attr("width",0.1).attr("height",0.1),i.attr("class","label edgeLabel"),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),I(e,n),e.intersect=function(g){return w.rect(e,g)},i}t(Dx,"labelRect");async function Px(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=o,c=e.look==="neo"?o*2:o,{shapeSvg:h,bbox:g}=await P(r,e,te(e)),y=Math.max(g.height+n,e.height??0),f=Math.max(g.width+c,(e.width??0)-y),B=[{x:0,y:0},{x:f+3*y/6,y:0},{x:f,y:-y},{x:-(3*y)/6,y:-y}],v,{cssStyles:q}=e;if(e.look==="handDrawn"){let W=m.svg(h),H=Gt(e,{}),Y=Oe(B),j=W.path(Y,H);if(v=h.insert(()=>j,":first-child").attr("transform",`translate(${-f/2}, ${y/2})`),q)v.attr("style",q)}else v=ro(h,f,y,B);if(s)v.attr("style",s);return e.width=f,e.height=y,I(e,v),e.intersect=function(W){return w.polygon(e,B,W)},h}t(Px,"lean_left");async function Rx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=o,c=e.look==="neo"?o*2:o,{shapeSvg:h,bbox:g}=await P(r,e,te(e)),y=Math.max(g.height+n,e.height??0),f=Math.max(g.width+c,(e.width??0)-y),B=[{x:-3*y/6,y:0},{x:f,y:0},{x:f+3*y/6,y:-y},{x:0,y:-y}],v,{cssStyles:q}=e;if(e.look==="handDrawn"){let W=m.svg(h),H=Gt(e,{}),Y=Oe(B),j=W.path(Y,H);if(v=h.insert(()=>j,":first-child").attr("transform",`translate(${-f/2}, ${y/2})`),q)v.attr("style",q)}else v=ro(h,f,y,B);if(s)v.attr("style",s);return e.width=f,e.height=y,I(e,v),e.intersect=function(W){return w.polygon(e,B,W)},h}t(Rx,"lean_right");function qx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.label="",e.labelStyle=i;let o=r.insert("g").attr("class",te(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,c=Math.max(35,e?.width??0),h=Math.max(35,e?.height??0),g=7,y=[{x:c,y:0},{x:0,y:h+g/2},{x:c-2*g,y:h+g/2},{x:0,y:2*h},{x:c,y:h-g/2},{x:2*g,y:h-g/2}],f=m.svg(o),B=Gt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let v=Oe(y),q=f.path(v,B),W=o.insert(()=>q,":first-child");if(W.attr("class","outer-path"),n&&e.look!=="handDrawn")W.selectAll("path").attr("style",n);if(s&&e.look!=="handDrawn")W.selectAll("path").attr("style",s);return W.attr("transform",`translate(-${c/2},${-h})`),I(e,W),e.intersect=function(H){return a.info("lightningBolt intersect",e,H),w.polygon(e,y,H)},o}t(qx,"lightningBolt");var sS=t((r,e,i,s,o,n,c)=>[`M${r},${e+n}`,`a${o},${n} 0,0,0 ${i},0`,`a${o},${n} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${n} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+n+c}`,`a${o},${n} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),aS=t((r,e,i,s,o,n,c)=>[`M${r},${e+n}`,`M${r+i},${e+n}`,`a${o},${n} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${n} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+n+c}`,`a${o},${n} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),nS=t((r,e,i,s,o,n)=>[`M${r-i/2},${-s/2}`,`a${o},${n} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),My=10,Ey=10;async function Nx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?24:o;if(e.width||e.height){let j=e.width??0;if(e.width=(e.width??0)-n,e.width<Ey)e.width=Ey;let Q=j/2/(2.5+j/50);if(e.height=(e.height??0)-c-Q*3,e.height<My)e.height=My}let{shapeSvg:h,bbox:g,label:y}=await P(r,e,te(e)),f=(e?.width?e?.width:g.width)+n*2,B=f/2,v=B/(2.5+f/50),q=(e?.height?e?.height:g.height)+v+c*2,W=q*0.1,H,{cssStyles:Y}=e;if(e.look==="handDrawn"){let j=m.svg(h),X=aS(0,0,f,q,B,v,W),Q=nS(0,v,f,q,B,v),rt=Gt(e,{}),it=j.path(X,rt),ct=j.path(Q,rt);if(h.insert(()=>ct,":first-child").attr("class","line"),H=h.insert(()=>it,":first-child"),H.attr("class","basic label-container"),Y)H.attr("style",Y)}else{let j=sS(0,0,f,q,B,v,W);H=h.insert("path",":first-child").attr("d",j).attr("class","basic label-container outer-path").attr("style",tr(Y)).attr("style",s)}return H.attr("label-offset-y",v),H.attr("transform",`translate(${-f/2}, ${-(q/2+v)})`),I(e,H),y.attr("transform",`translate(${-(g.width/2)-(g.x-(g.left??0))}, ${-(g.height/2)+v-(g.y-(g.top??0))})`),e.intersect=function(j){let X=w.rect(e,j),Q=X.x-(e.x??0);if(B!=0&&(Math.abs(Q)<(e.width??0)/2||Math.abs(Q)==(e.width??0)/2&&Math.abs(X.y-(e.y??0))>(e.height??0)/2-v)){let rt=v*v*(1-Q*Q/(B*B));if(rt>0)rt=Math.sqrt(rt);if(rt=v-rt,j.y-(e.y??0)>0)rt=-rt;X.y+=rt}return X},h}t(Nx,"linedCylinder");async function Wx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height){let rt=e.width;if(e.width=(rt??0)*10/11-n*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-c*2,e.height<10)e.height=10}let{shapeSvg:h,bbox:g,label:y}=await P(r,e,te(e)),f=(e?.width?e?.width:g.width)+(n??0)*2,B=(e?.height?e?.height:g.height)+(c??0)*2,v=e.look==="neo"?B/4:B/8,q=B+v,{cssStyles:W}=e,H=m.svg(h),Y=Gt(e,{});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let j=[{x:-f/2-f/2*0.1,y:-q/2},{x:-f/2-f/2*0.1,y:q/2},...Ko(-f/2-f/2*0.1,q/2,f/2+f/2*0.1,q/2,v,0.8),{x:f/2+f/2*0.1,y:-q/2},{x:-f/2-f/2*0.1,y:-q/2},{x:-f/2,y:-q/2},{x:-f/2,y:q/2*1.1},{x:-f/2,y:-q/2}],X=H.polygon(j.map((rt)=>[rt.x,rt.y]),Y),Q=h.insert(()=>X,":first-child");if(Q.attr("class","basic label-container outer-path"),W&&e.look!=="handDrawn")Q.selectAll("path").attr("style",W);if(s&&e.look!=="handDrawn")Q.selectAll("path").attr("style",s);return Q.attr("transform",`translate(0,${-v/2})`),y.attr("transform",`translate(${-f/2+(e.padding??0)+f/2*0.1/2-(g.x-(g.left??0))},${-B/2+(e.padding??0)-v-(g.y-(g.top??0))})`),I(e,Q),e.intersect=function(rt){return w.polygon(e,j,rt)},h}t(Wx,"linedWaveEdgedRect");var lS=56,Uf=72,Oy=8,Iy=2,hS=8,cS={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},$y=Math.PI/3,Dy=0.6,jf=t((r,e)=>{let i=e*Dy,s=e*Math.sqrt(1-Dy**2),o=Math.cos($y),n=-Math.sin($y),c=i*-n,h=r+i*o,g=s*o,y=s*n;return`M ${c-g} ${h-y} L ${c+g} ${h+y}`},"businessMarkerPathForCircle"),uS={normal:jf(-24,12),hollow:jf(-23,9),awesome:jf(-21,13),icon:"M 12 -8 L 26 -26"},Py=t((r,e,i)=>{let s=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);r.attr("transform",`translate(${-e.width/2-s},${i-e.height/2-o})`)},"positionLabel"),od=t((r,e,i,s,o=!1)=>{if(e.look==="handDrawn"){let h=m.svg(r).path(i,Gt(e,o?{fill:"none"}:{}));return r.insert(()=>h,":first-child").attr("class",s)}let n=r.append("path").attr("class",s).attr("d",i);if(o)n.attr("fill","none");return n},"appendActorPath"),fS=t((r,e,i,s,o,n,c=!1)=>{if(e.look==="handDrawn"){let y=m.svg(r).circle(i,s,o*2,Gt(e,c?{fill:"none"}:{}));return r.insert(()=>y,":first-child").attr("class",n)}let h=r.append("circle").attr("class",n).attr("cx",i).attr("cy",s).attr("r",o);if(c)h.attr("fill","none");return h},"appendActorCircle");var dS=t((r,e,i)=>{if(!e.business)return;r.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",uS[i]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function gn(r,e,i,s){let{labelStyles:o,nodeStyles:n}=k(e);e.labelStyle=o;let c=i==="icon"||e.stereotype!==void 0?{...e,icon:i==="icon"?void 0:e.icon,stereotype:void 0}:e,{shapeSvg:h,bbox:g,label:y}=await P(r,c,te(e,`usecase-actor-variant usecase-actor-${i}`)),f=e.accessibleName??e.label;if(f)h.attr("role","img").attr("aria-label",f);y.attr("class","label actor-label usecase-actor-label");let{theme:B,themeVariables:v}=l();Ze(h,e.colorIndex,B,v.borderColorArray);let q,W;if(e.stereotype){let dt=await ls(h,`«${e.stereotype}»`,{labelStyle:o,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});q=dt.label.attr("class","label usecase-stereotype"),W=dt.bbox}let H=h.append("g").attr("class",`usecase-actor-glyph ${cS[i]}`).attr("style",n||null);await s(H,e),dS(H,e,i);let Y=e.padding??hS,j=W?.height??0,X=Uf+Oy+g.height+(W?j+Iy:0),Q=Math.max(lS,g.width,W?.width??0)+Y*2,rt=X+Y*2,it=-X/2;H.attr("transform",`translate(0,${it+Uf/2})`);let ct=it+Uf+Oy;if(q&&W)ct+=j/2,Py(q,W,ct),ct+=j/2+Iy;Py(y,g,ct+g.height/2);let lt=h.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-Q/2).attr("y",-rt/2).attr("width",Q).attr("height",rt).attr("opacity",0).attr("aria-hidden","true");return I(e,lt),e.intersect=(dt)=>w.rect(e,dt),h}t(gn,"renderUsecaseActor");var pS=["M 0 -12","C 6.627 -12 12 -17.373 12 -24","C 12 -30.627 6.627 -36 0 -36","C -6.627 -36 -12 -30.627 -12 -24","C -12 -17.373 -6.627 -12 0 -12 Z","M 0 -12 V 8","M -17 -5 H 17","M 0 8 L -15 28","M 0 8 L 15 28"].join(" ");async function zx(r,e){return gn(r,e,"normal",(i,s)=>{od(i,s,pS,"usecase-actor-stick")})}t(zx,"usecaseActor");var gS=["M 0 -34","C 7.18 -34 13 -28.18 13 -21","C 13 -13.82 7.18 -8 0 -8","C -7.18 -8 -13 -13.82 -13 -21","C -13 -28.18 -7.18 -34 0 -34 Z","M -24 25","C -24 7 -14 -3 0 -3","C 14 -3 24 7 24 25","C 24 28 21 30 18 30","H -18","C -21 30 -24 28 -24 25 Z"].join(" ");async function Hx(r,e){return gn(r,e,"awesome",(i,s)=>{od(i,s,gS,"usecase-actor-awesome-silhouette")})}t(Hx,"usecaseActorAwesome");var mS=["M -22 -10","H 22","V 0","H 6","L 22 17","L 13 28","L 0 13","L -13 28","L -22 17","L -6 0","H -22","Z"].join(" ");async function Yx(r,e){return gn(r,e,"hollow",(i,s)=>{fS(i,s,0,-23,9,"usecase-actor-hollow-head",!0),od(i,s,mS,"usecase-actor-hollow-body",!0)})}t(Yx,"usecaseActorHollow");var Ds=52,Ry=42,qy=-2,yS=t(async(r,e)=>{let i=-Ds/2,s=qy-Ds/2;if(e.look==="handDrawn"){let f=m.svg(r).rectangle(i,s,Ds,Ds,Gt(e,{}));r.insert(()=>f,":first-child").attr("class","usecase-actor-icon-frame")}else r.append("rect").attr("class","usecase-actor-icon-frame").attr("x",i).attr("y",s).attr("width",Ds).attr("height",Ds).attr("rx",4).attr("ry",4);let o=e.icon??"",n=await Dl(o.includes(":")?o:`fa:${o}`),c=await nt(o,{height:Ry,width:Ry,fallbackPrefix:"fa"}),h=r.append("g").attr("class",`usecase-actor-icon-symbol${n?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${c}</g>`),g=h.node()?.getBBox();if(g)h.attr("transform",`translate(${-g.width/2-g.x},${qy-g.height/2-g.y})`)},"drawIconActor");async function Ux(r,e){return gn(r,e,"icon",yS)}t(Ux,"usecaseActorIcon");var Ny=t((r,e,i)=>{let s=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);r.attr("transform",`translate(${-e.width/2-s},${i-e.height/2-o})`)},"positionLabel");async function jx(r,e){let i=e,{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let n=i.stereotype?{...e,stereotype:void 0}:e,{shapeSvg:c,bbox:h,halfPadding:g,label:y}=await P(r,n,te(e,"usecase-business-shape"));y.attr("class","label usecase-label");let{theme:f,themeVariables:B}=l();Ze(c,e.colorIndex,f,B.borderColorArray);let v,q;if(i.stereotype){let st=await ls(c,`«${i.stereotype}»`,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});v=st.label.attr("class","label usecase-stereotype"),q=st.bbox}let W=q?2:0,H=h.height+(q?.height??0)+W,Y=Math.max(h.width,q?.width??0),j=g??10,X=Y/2+j*2,Q=H/2+j*2,rt=Math.min(Math.max(j/5,1),j/2),it=Y/2+rt,ct=X-rt,lt=it/X,dt=ct/X,Ct=Q*Math.sqrt(Math.max(0,1-lt*lt)),Bt=-Q*Math.sqrt(Math.max(0,1-dt*dt));if(v&&q)Ny(v,q,-H/2+q.height/2);Ny(y,h,H/2-h.height/2);let kt;if(e.look==="handDrawn"){let at=m.svg(c).ellipse(0,0,X*2,Q*2,Gt(e,{}));kt=c.insert(()=>at,":first-child").attr("class","basic label-container usecase-business-ellipse")}else kt=c.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",o).attr("rx",X).attr("ry",Q).attr("cx",0).attr("cy",0);c.append("path").attr("class","usecase-business-marker").attr("d",`M ${it} ${Ct} L ${ct} ${Bt}`).attr("fill","none").attr("style",o||null);let bt=i.accessibleName??i.label;if(bt)c.attr("role","img").attr("aria-label",bt);return I(e,kt),e.calcIntersect=(st,at)=>w.ellipse(st,st.width/2,st.height/2,at),e.intersect=(st)=>w.ellipse(e,X,Q,st),c}t(jx,"usecaseBusiness");var Gf=8,Wy=4,xS=1,Xf=t((r,e,i,s)=>{let o=(e.x??0)-(e.left??0),n=(e.y??0)-(e.top??0);r.attr("transform",`translate(${i-e.width/2-o},${s-e.height/2-n})`)},"positionLabel"),CS=t((r)=>{let e=Number.parseFloat(r??"");return Number.isFinite(e)&&e>=0?e:xS},"numericStrokeWidth");async function Gx(r,e){let i=e,{labelStyles:s,nodeStyles:o}=k(e),{stylesMap:n}=Di(e);e.labelStyle=s;let{shapeSvg:c,bbox:h,label:g}=await P(r,e,te(e,"usecase-json-table"));if(c.attr("role","img"),i.accessibleName)c.attr("aria-label",i.accessibleName);g.attr("class","label usecase-json-title");let y=c.append("g").attr("class","usecase-json-table-grid"),f=[];for(let st of i.jsonRows??[]){let at=await ls(y,st.key,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0}),mt=await ls(y,st.value,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0});f.push({key:{label:at.label.attr("class","label usecase-json-key"),bbox:at.bbox},value:{label:mt.label.attr("class","label usecase-json-value"),bbox:mt.bbox}})}let B=Math.max(0,...f.map(({key:st})=>st.bbox.width))+Gf*2,v=Math.max(0,...f.map(({value:st})=>st.bbox.width))+Gf*2,q=h.width+Gf*2,W=Math.max(q,B+v),H=v+Math.max(0,W-B-v),Y=h.height+Wy*2,j=f.map(({key:st,value:at})=>Math.max(st.bbox.height,at.bbox.height)+Wy*2),X=Y+j.reduce((st,at)=>st+at,0),Q=CS(n.get("stroke-width")),rt=W+Q*2,it=X+Q*2,ct=-W/2,lt=-X/2,dt=e.look==="handDrawn"?m.svg(c):void 0,Ct=dt?Gt(e,{}):void 0,Bt=t((st,at,mt,ot,wt,Lt)=>{if(dt&&Ct){let Yt=dt.rectangle(mt,ot,wt,Lt,Ct);return st.insert(()=>Yt,":first-child").attr("class",at)}return st.insert("rect",":first-child").attr("class",at).attr("x",mt).attr("y",ot).attr("width",wt).attr("height",Lt).attr("style",o)},"insertCell"),kt=Bt(c,"label-container usecase-json-border",-rt/2,-it/2,rt,it);Bt(y,"usecase-json-cell usecase-json-title-cell",ct,lt,W,Y),y.node()?.append(g.node()),Xf(g,h,0,lt+Y/2);let bt=lt+Y;return f.forEach(({key:st,value:at},mt)=>{let ot=j[mt],wt=y.append("g").attr("class","usecase-json-row").attr("data-row-index",mt).attr("transform",`translate(0,${bt})`);Bt(wt,"usecase-json-cell usecase-json-key-cell",ct,0,B,ot),Bt(wt,"usecase-json-cell usecase-json-value-cell",ct+B,0,H,ot),wt.node()?.append(st.label.node(),at.label.node()),Xf(st.label,st.bbox,ct+B/2,ot/2),Xf(at.label,at.bbox,ct+B+H/2,ot/2),bt+=ot}),I(e,kt),e.intersect=(st)=>w.rect(e,st),c}t(Gx,"usecaseJsonTable");async function Xx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o,h=e.look==="neo"?10:5;if(e.width||e.height)e.width=Math.max((e?.width??0)-n*2-2*h,10),e.height=Math.max((e?.height??0)-c*2-2*h,10);let{shapeSvg:g,bbox:y,label:f}=await P(r,e,te(e)),B=(e?.width?e?.width:y.width)+n*2+2*h,v=(e?.height?e?.height:y.height)+c*2+2*h,q=B-2*h,W=v-2*h,H=-q/2,Y=-W/2,{cssStyles:j}=e,X=m.svg(g),Q=Gt(e,{}),rt=[{x:H-h,y:Y+h},{x:H-h,y:Y+W+h},{x:H+q-h,y:Y+W+h},{x:H+q-h,y:Y+W},{x:H+q,y:Y+W},{x:H+q,y:Y+W-h},{x:H+q+h,y:Y+W-h},{x:H+q+h,y:Y-h},{x:H+h,y:Y-h},{x:H+h,y:Y},{x:H,y:Y},{x:H,y:Y+h}],it=[{x:H,y:Y+h},{x:H+q-h,y:Y+h},{x:H+q-h,y:Y+W},{x:H+q,y:Y+W},{x:H+q,y:Y},{x:H,y:Y}];if(e.look!=="handDrawn")Q.roughness=0,Q.fillStyle="solid";let ct=Oe(rt),lt=X.path(ct,Q),dt=Oe(it),Ct=X.path(dt,Q);if(e.look!=="handDrawn")lt=Kf(lt),Ct=Kf(Ct);let Bt=g.insert("g",":first-child");if(Bt.insert(()=>lt),Bt.insert(()=>Ct),Bt.attr("class","basic label-container outer-path"),j&&e.look!=="handDrawn")Bt.selectAll("path").attr("style",j);if(s&&e.look!=="handDrawn")Bt.selectAll("path").attr("style",s);return f.attr("transform",`translate(${-(y.width/2)-h-(y.x-(y.left??0))}, ${-(y.height/2)+h-(y.y-(y.top??0))})`),I(e,Bt),e.intersect=function(kt){return w.polygon(e,rt,kt)},g}t(Xx,"multiRect");async function Vx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,te(e)),h=e.padding??0,g=e.look==="neo"?16:h,y=e.look==="neo"?12:h,f=!0;if(e.width||e.height)f=!1,e.width=(e?.width??0)-g*2,e.height=(e?.height??0)-y*3;let B=Math.max(n.width,e?.width??0)+g*2,v=Math.max(n.height,e?.height??0)+y*3,q=e.look==="neo"?v/4:v/8,W=v+(f?q/2:-q/2),H=-B/2,Y=-W/2,j=10,{cssStyles:X}=e,Q=Ko(H-j,Y+W+j,H+B-j,Y+W+j,q,0.8),rt=Q?.[Q.length-1],it=[{x:H-j,y:Y+j},{x:H-j,y:Y+W+j},...Q,{x:H+B-j,y:rt.y-j},{x:H+B,y:rt.y-j},{x:H+B,y:rt.y-2*j},{x:H+B+j,y:rt.y-2*j},{x:H+B+j,y:Y-j},{x:H+j,y:Y-j},{x:H+j,y:Y},{x:H,y:Y},{x:H,y:Y+j}],ct=[{x:H,y:Y+j},{x:H+B-j,y:Y+j},{x:H+B-j,y:rt.y-j},{x:H+B,y:rt.y-j},{x:H+B,y:Y},{x:H,y:Y}],lt=m.svg(o),dt=Gt(e,{});if(e.look!=="handDrawn")dt.roughness=0,dt.fillStyle="solid";let Ct=Oe(it),Bt=lt.path(Ct,dt),kt=Oe(ct),bt=lt.path(kt,dt),st=o.insert(()=>Bt,":first-child");if(st.insert(()=>bt),st.attr("class","basic label-container outer-path"),X&&e.look!=="handDrawn")st.selectAll("path").attr("style",X);if(s&&e.look!=="handDrawn")st.selectAll("path").attr("style",s);return st.attr("transform",`translate(0,${-q/2})`),c.attr("transform",`translate(${-(n.width/2)-j-(n.x-(n.left??0))}, ${-(n.height/2)+j-q-(n.y-(n.top??0))})`),I(e,st),e.intersect=function(at){return w.polygon(e,it,at)},o}t(Vx,"multiWaveEdgedRectangle");async function Kx(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);if(e.labelStyle=s,!(e.useHtmlLabels||Ce(x())))e.centerLabel=!0;let{shapeSvg:c,bbox:h,label:g}=await P(r,e,te(e)),y=Math.max(h.width+(e.padding??0)*2,e?.width??0),f=Math.max(h.height+(e.padding??0)*2,e?.height??0),B=-y/2,v=-f/2,{cssStyles:q}=e,W=m.svg(c),H=Gt(e,{fill:i.noteBkgColor,stroke:i.noteBorderColor});if(e.look!=="handDrawn")H.roughness=0,H.fillStyle="solid";let Y=W.rectangle(B,v,y,f,H),j=c.insert(()=>Y,":first-child");if(j.attr("class","basic label-container outer-path"),g.attr("class","label noteLabel"),q&&e.look!=="handDrawn")j.selectAll("path").attr("style",q);if(o&&e.look!=="handDrawn")j.selectAll("path").attr("style",o);return g.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),I(e,j),e.intersect=function(X){return w.rect(e,X)},c}t(Kx,"note");var bS=t((r,e,i)=>[`M${r+i/2},${e}`,`L${r+i},${e-i/2}`,`L${r+i/2},${e-i}`,`L${r},${e-i/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Zx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n}=await P(r,e,te(e)),c=n.width+(e.padding??0),h=n.height+(e.padding??0),g=c+h,y=0.5,f=[{x:g/2,y:0},{x:g,y:-g/2},{x:g/2,y:-g},{x:0,y:-g/2}],B,{cssStyles:v}=e;if(e.look==="handDrawn"){let q=m.svg(o),W=Gt(e,{}),H=bS(0,0,g),Y=q.path(H,W);if(B=o.insert(()=>Y,":first-child").attr("transform",`translate(${-g/2+y}, ${g/2})`),v)B.attr("style",v)}else B=ro(o,g,g,f),B.attr("transform",`translate(${-g/2+y}, ${g/2})`);if(s)B.attr("style",s);return I(e,B),e.calcIntersect=function(q,W){let H=q.width,Y=[{x:H/2,y:0},{x:H,y:-H/2},{x:H/2,y:-H},{x:0,y:-H/2}];return w.polygon(q,Y,W)},e.intersect=function(q){return this.calcIntersect(e,q)},o}t(Zx,"question");async function Qx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?21:o??0,c=e.look==="neo"?12:o??0,{shapeSvg:h,bbox:g,label:y}=await P(r,e,te(e)),f=g.width+(e.look==="neo"?n*2:n),B=Math.max(g.height+(e.look==="neo"?c*2:c),e.height??0),v=B/4,W=-Math.max(f,(e.width??0)-v)/2,H=-B/2,Y=H/2,j=[{x:W+Y,y:H},{x:W,y:0},{x:W+Y,y:-H},{x:-W,y:-H},{x:-W,y:H}],{cssStyles:X}=e,Q=m.svg(h),rt=Gt(e,{});if(e.look!=="handDrawn")rt.roughness=0,rt.fillStyle="solid";let it=Oe(j),ct=Q.path(it,rt),lt=h.insert(()=>ct,":first-child");if(lt.attr("class","basic label-container outer-path"),X&&e.look!=="handDrawn")lt.selectAll("path").attr("style",X);if(s&&e.look!=="handDrawn")lt.selectAll("path").attr("style",s);return lt.attr("transform",`translate(${-Y/2},0)`),y.attr("transform",`translate(${-Y/2-g.width/2-(g.x-(g.left??0))}, ${-(g.height/2)-(g.y-(g.top??0))})`),I(e,lt),e.intersect=function(dt){return w.polygon(e,j,dt)},h}t(Qx,"rect_left_inv_arrow");async function Jx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o;if(!e.cssClasses)o="node default";else o="node "+e.cssClasses;let n=r.insert("g").attr("class",o).attr("id",e.domId||e.id),c=n.insert("g"),h=n.insert("g").attr("class","label").attr("style",s),{description:g,label:y}=e,f=await Ti(h,y,e.labelStyle,!0,!0),B={width:0,height:0};if(Ce(l())){let dt=f.children[0],Ct=p(f);B=dt.getBoundingClientRect(),Ct.attr("width",B.width),Ct.attr("height",B.height)}a.info("Text 2",g);let v=g||[],q=f.getBBox(),W=await Ti(h,Array.isArray(v)?v.join("<br/>"):v,e.labelStyle,!0,!0),H=W.children[0],Y=p(W);B=H.getBoundingClientRect(),Y.attr("width",B.width),Y.attr("height",B.height);let j=(e.padding||0)/2;p(W).attr("transform","translate( "+(B.width>q.width?0:(q.width-B.width)/2)+", "+(q.height+j+5)+")"),p(f).attr("transform","translate( "+(B.width<q.width?0:-(q.width-B.width)/2)+", 0)"),B=h.node().getBBox(),h.attr("transform","translate("+-B.width/2+", "+(-B.height/2-j+3)+")");let X=B.width+(e.padding||0),Q=B.height+(e.padding||0),rt=-B.width/2-j,it=-B.height/2-j,ct,lt;if(e.look==="handDrawn"){let dt=m.svg(n),Ct=Gt(e,{}),Bt=dt.path(jr(rt,it,X,Q,e.rx||0),Ct),kt=dt.line(-B.width/2-j,-B.height/2-j+q.height+j,B.width/2+j,-B.height/2-j+q.height+j,Ct);lt=n.insert(()=>(a.debug("Rough node insert CXC",Bt),kt),":first-child"),ct=n.insert(()=>(a.debug("Rough node insert CXC",Bt),Bt),":first-child")}else ct=c.insert("rect",":first-child"),lt=c.insert("line"),ct.attr("class","outer title-state").attr("style",s).attr("x",-B.width/2-j).attr("y",-B.height/2-j).attr("width",B.width+(e.padding||0)).attr("height",B.height+(e.padding||0)),lt.attr("class","divider").attr("x1",-B.width/2-j).attr("x2",B.width/2+j).attr("y1",-B.height/2-j+q.height+j).attr("y2",-B.height/2-j+q.height+j);return I(e,ct),e.intersect=function(dt){return w.rect(e,dt)},n}t(Jx,"rectWithTitle");async function t0(r,e,{config:{themeVariables:i}}){let s=i?.radius??5,o={rx:s,ry:s,classes:"",labelPaddingX:(e?.padding??0)*1,labelPaddingY:(e?.padding??0)*1};return Ns(r,e,o)}t(t0,"roundedRect");var ns=8;async function e0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,n=e.look==="neo"?12:e.padding??0,{shapeSvg:c,bbox:h,label:g}=await P(r,e,te(e)),y=(e?.width??h.width)+o*2+(e.look==="neo"?ns:ns*2),f=(e?.height??h.height)+n*2,B=y-ns,v=f,q=ns-y/2,W=-f/2,{cssStyles:H}=e,Y=m.svg(c),j=Gt(e,{});if(e.look!=="handDrawn")j.roughness=0,j.fillStyle="solid";let X=[{x:q,y:W},{x:q+B,y:W},{x:q+B,y:W+v},{x:q-ns,y:W+v},{x:q-ns,y:W},{x:q,y:W},{x:q,y:W+v}],Q=Y.polygon(X.map((it)=>[it.x,it.y]),j),rt=c.insert(()=>Q,":first-child");if(rt.attr("class","basic label-container outer-path").attr("style",tr(H)),s&&e.look!=="handDrawn")rt.selectAll("path").attr("style",s);if(H&&e.look!=="handDrawn")rt.selectAll("path").attr("style",s);return g.attr("transform",`translate(${ns/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),I(e,rt),e.intersect=function(it){return w.rect(e,it)},c}t(e0,"shadedProcess");async function r0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height)e.width=Math.max((e?.width??0)-n*2,10),e.height=Math.max((e?.height??0)/1.5-c*2,10);let{shapeSvg:h,bbox:g,label:y}=await P(r,e,te(e)),f=(e?.width?e?.width:g.width)+n*2,B=((e?.height?e?.height:g.height)+c*2)*1.5,v=f,q=B/1.5,W=-v/2,H=-q/2,{cssStyles:Y}=e,j=m.svg(h),X=Gt(e,{});if(e.look!=="handDrawn")X.roughness=0,X.fillStyle="solid";let Q=[{x:W,y:H},{x:W,y:H+q},{x:W+v,y:H+q},{x:W+v,y:H-q/2}],rt=Oe(Q),it=j.path(rt,X),ct=h.insert(()=>it,":first-child");if(ct.attr("class","basic label-container outer-path"),Y&&e.look!=="handDrawn")ct.selectChildren("path").attr("style",Y);if(s&&e.look!=="handDrawn")ct.selectChildren("path").attr("style",s);return ct.attr("transform",`translate(0, ${q/4})`),y.attr("transform",`translate(${-v/2+(e.padding??0)-(g.x-(g.left??0))}, ${-q/4+(e.padding??0)-(g.y-(g.top??0))})`),I(e,ct),e.intersect=function(lt){return w.polygon(e,Q,lt)},h}t(r0,"slopedRect");async function i0(r,e){let i=e.padding??0,s=e.look==="neo"?16:i*2,o=e.look==="neo"?12:i,n={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??s,labelPaddingY:o},c=await Ns(r,e,n);if(e.colorIndex!==void 0){let{theme:h,themeVariables:g}=l();Ze(c,e.colorIndex,h,g.borderColorArray)}return c}t(i0,"squareRect");var Jf=50,kS=t((r,e,i)=>{let s=r.height+i,o=s*Math.cos(Math.PI/(2*(Jf-1))),n=Math.sqrt(Math.max(0,o**2-r.height**2));return{w:Math.max(r.width+s/4+e,1.5*s+(s-o),r.width+e+s-n),h:s}},"stadiumDimensions");async function o0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?40:o,c=e.look==="neo"?24:o,{shapeSvg:h,bbox:g}=await P(r,e,te(e)),{w:y,h:f}=kS(g,n,c),B=f/2,{cssStyles:v}=e,q=m.svg(h),W=Gt(e,{});if(e.look!=="handDrawn")W.roughness=0,W.fillStyle="solid";let H=[{x:-y/2+B,y:-f/2},{x:y/2-B,y:-f/2},...Ni(-y/2+B,0,B,Jf,90,270),{x:y/2-B,y:f/2},...Ni(y/2-B,0,B,Jf,270,450)],Y=Oe(H),j=q.path(Y,W),X=h.insert(()=>j,":first-child");if(X.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")X.selectChildren("path").attr("style",v);if(s&&e.look!=="handDrawn")X.selectChildren("path").attr("style",s);return I(e,X),e.intersect=function(Q){return w.polygon(e,H,Q)},h}t(o0,"stadium");async function s0(r,e){let i={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5,classes:"flowchart-node"};return Ns(r,e,i)}t(s0,"state");function a0(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{cssStyles:n}=e,{lineColor:c,stateBorder:h,nodeBorder:g,nodeShadow:y}=i;if(e.width||e.height){if((e.width??0)<14)e.width=14;if((e.height??0)<14)e.height=14}if(!e.width)e.width=14;if(!e.height)e.height=14;let f=r.insert("g").attr("class","node default").attr("id",e.domId??e.id),B=m.svg(f),v=Gt(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let q=B.circle(0,0,e.width,{...v,stroke:c,strokeWidth:2}),W=h??g,H=(e.width??0)*5/14,Y=B.circle(0,0,H,{...v,fill:W,stroke:W,strokeWidth:2,fillStyle:"solid"}),j=f.insert(()=>q,":first-child");if(j.insert(()=>Y),e.look!=="handDrawn")j.attr("class","outer-path");if(n)j.selectAll("path").attr("style",n);if(o)j.selectAll("path").attr("style",o);if(e.width<25&&y&&e.look!=="handDrawn"){let X=r.node()?.ownerSVGElement?.id??"",Q=X?`${X}-drop-shadow-small`:"drop-shadow-small";j.attr("style",`filter:url(#${Q})`)}return I(e,j),e.intersect=function(X){return w.circle(e,(e.width??0)/2,X)},f}t(a0,"stateEnd");function n0(r,e,{config:{themeVariables:i}}){let{lineColor:s,nodeShadow:o}=i;if(e.width||e.height){if((e.width??0)<14)e.width=14;if((e.height??0)<14)e.height=14}if(!e.width)e.width=14;if(!e.height)e.height=14;let n=r.insert("g").attr("class","node default").attr("id",e.domId||e.id),c;if(e.look==="handDrawn"){let g=m.svg(n).circle(0,0,e.width,Gg(s));c=n.insert(()=>g),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else c=n.insert("circle",":first-child"),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&o&&e.look!=="handDrawn"){let h=r.node()?.ownerSVGElement?.id??"",g=h?`${h}-drop-shadow-small`:"drop-shadow-small";c.attr("style",`filter:url(#${g})`)}return I(e,c),e.intersect=function(h){return w.circle(e,(e.width??7)/2,h)},n}t(n0,"stateStart");var Ps=8;async function l0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e?.padding??8,n=e.look==="neo"?28:o,c=e.look==="neo"?12:o,{shapeSvg:h,bbox:g}=await P(r,e,te(e)),y=Math.max(g.width+2*Ps+n,e.width??0),f=Math.max(g.height+c,e.height??0),B=y-2*Ps,v=f,q=-y/2,W=-f/2,H=[{x:0,y:0},{x:B,y:0},{x:B,y:-v},{x:0,y:-v},{x:0,y:0},{x:-8,y:0},{x:B+8,y:0},{x:B+8,y:-v},{x:-8,y:-v},{x:-8,y:0}];if(e.look==="handDrawn"){let Y=m.svg(h),j=Gt(e,{}),X=Y.rectangle(q,W,B+16,v,j),Q=Y.line(q+Ps,W,q+Ps,W+v,j),rt=Y.line(q+Ps+B,W,q+Ps+B,W+v,j);h.insert(()=>Q,":first-child"),h.insert(()=>rt,":first-child");let it=h.insert(()=>X,":first-child"),{cssStyles:ct}=e;it.attr("class","basic label-container").attr("style",tr(ct)),I(e,it)}else{let Y=ro(h,B,v,H);if(s)Y.attr("style",s);I(e,Y)}return e.intersect=function(Y){return w.polygon(e,H,Y)},h}t(l0,"subroutine");var Vf=0.2;async function h0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height)e.height=Math.max((e?.height??0)-c*2,10),e.width=Math.max((e?.width??0)-n*2-Vf*(e.height+c*2),10);let{shapeSvg:h,bbox:g}=await P(r,e,te(e)),y=(e?.height?e?.height:g.height)+c*2,f=Vf*y,B=Vf*y,q=(e?.width?e?.width:g.width)+n*2+f-f,W=y,H=-q/2,Y=-W/2,{cssStyles:j}=e,X=m.svg(h),Q=Gt(e,{}),rt=[{x:H-f/2,y:Y},{x:H+q+f/2,y:Y},{x:H+q+f/2,y:Y+W},{x:H-f/2,y:Y+W}],it=[{x:H+q-f/2,y:Y+W},{x:H+q+f/2,y:Y+W},{x:H+q+f/2,y:Y+W-B}];if(e.look!=="handDrawn")Q.roughness=0,Q.fillStyle="solid";let ct=Oe(rt),lt=X.path(ct,Q),dt=Oe(it),Ct=X.path(dt,{...Q,fillStyle:"solid"}),Bt=h.insert(()=>Ct,":first-child");if(Bt.insert(()=>lt,":first-child"),Bt.attr("class","basic label-container outer-path"),j&&e.look!=="handDrawn")Bt.selectAll("path").attr("style",j);if(s&&e.look!=="handDrawn")Bt.selectAll("path").attr("style",s);return I(e,Bt),e.intersect=function(kt){return w.polygon(e,rt,kt)},h}t(h0,"taggedRect");async function c0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,te(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),g=Math.max(n.height+(e.padding??0)*2,e?.height??0),y=g/8,f=0.2*h,B=0.2*g,v=g+y,{cssStyles:q}=e,W=m.svg(o),H=Gt(e,{});if(e.look!=="handDrawn")H.roughness=0,H.fillStyle="solid";let Y=[{x:-h/2-h/2*0.1,y:v/2},...Ko(-h/2-h/2*0.1,v/2,h/2+h/2*0.1,v/2,y,0.8),{x:h/2+h/2*0.1,y:-v/2},{x:-h/2-h/2*0.1,y:-v/2}],j=-h/2+h/2*0.1,X=-v/2-B*0.4,Q=[{x:j+h-f,y:(X+g)*1.3},{x:j+h,y:X+g-B},{x:j+h,y:(X+g)*0.9},...Ko(j+h,(X+g)*1.25,j+h-f,(X+g)*1.3,-g*0.02,0.5)],rt=Oe(Y),it=W.path(rt,H),ct=Oe(Q),lt=W.path(ct,{...H,fillStyle:"solid"}),dt=o.insert(()=>lt,":first-child");if(dt.insert(()=>it,":first-child"),dt.attr("class","basic label-container outer-path"),q&&e.look!=="handDrawn")dt.selectAll("path").attr("style",q);if(s&&e.look!=="handDrawn")dt.selectAll("path").attr("style",s);return dt.attr("transform",`translate(0,${-y/2})`),c.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))},${-g/2+(e.padding??0)-y/2-(n.y-(n.top??0))})`),I(e,dt),e.intersect=function(Ct){return w.polygon(e,Y,Ct)},o}t(c0,"taggedWaveEdgedRectangle");async function u0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n}=await P(r,e,te(e)),c=Math.max(n.width+(e.padding??0),e?.width||0),h=Math.max(n.height+(e.padding??0),e?.height||0),g=-c/2,y=-h/2,f=o.insert("rect",":first-child");return f.attr("class","text").attr("style",s).attr("rx",0).attr("ry",0).attr("x",g).attr("y",y).attr("width",c).attr("height",h),I(e,f),e.intersect=function(B){return w.rect(e,B)},o}t(u0,"text");var wS=t((r,e,i,s,o,n)=>`M${r},${e}
229
+ `);return oi(s)}t(Ym,"preprocessMarkdown");function Um(r){return r.split(/\\n|\n|<br\s*\/?>/gi).map((e)=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map((i)=>({content:i,type:"normal"}))??[])}t(Um,"nonMarkdownToLines");function si(r,e={}){let i=Ym(r,e),s=Ue.lexer(i),o=[[]],n=0;function c(h,g="normal"){if(h.type==="text")h.text.split(`
230
+ `).forEach((f,B)=>{if(B!==0)n++,o.push([]);f.split(" ").forEach((v)=>{if(v=v.replace(/&#39;/g,"'"),v)o[n].push({content:v,type:g})})});else if(h.type==="strong"||h.type==="em")h.tokens.forEach((y)=>{c(y,h.type)});else if(h.type==="html")o[n].push({content:h.text,type:"normal"})}return t(c,"processNode"),s.forEach((h)=>{if(h.type==="paragraph")h.tokens?.forEach((g)=>{c(g)});else if(h.type==="html")o[n].push({content:h.text,type:"normal"});else o[n].push({content:h.raw,type:"normal"})}),o}t(si,"markdownToLines");function jm(r){if(!r)return"";return`<p>${r.replace(/\\n|\n/g,"<br />")}</p>`}t(jm,"nonMarkdownToHTML");function Gm(r,{markdownAutoWrap:e}={}){let i=Ue.lexer(r);function s(o){if(o.type==="text"){if(e===!1)return o.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;");return o.text.replace(/\n */g,"<br/>")}else if(o.type==="strong")return`<strong>${o.tokens?.map(s).join("")}</strong>`;else if(o.type==="em")return`<em>${o.tokens?.map(s).join("")}</em>`;else if(o.type==="paragraph")return`<p>${o.tokens?.map(s).join("")}</p>`;else if(o.type==="space")return"";else if(o.type==="html")return`${o.text}`;else if(o.type==="escape")return o.text;return a.warn(`Unsupported markdown: ${o.type}`),o.raw}return t(s,"output"),i.map(s).join("")}t(Gm,"markdownToHTML");var _w=function(r){var e=function(){},i=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.msRequestAnimationFrame||function(y){return setTimeout(y,16)};function s(){var y=this;y.reads=[],y.writes=[],y.raf=i.bind(r),e("initialized",y)}t(s,"FastDom"),s.prototype={constructor:s,runTasks:t(function(y){e("run tasks");var f;while(f=y.shift())f()},"runTasks"),measure:t(function(y,f){e("measure");var B=!f?y:y.bind(f);return this.reads.push(B),o(this),B},"measure"),mutate:t(function(y,f){e("mutate");var B=!f?y:y.bind(f);return this.writes.push(B),o(this),B},"mutate"),clear:t(function(y){return e("clear",y),c(this.reads,y)||c(this.writes,y)},"clear"),extend:t(function(y){if(e("extend",y),typeof y!="object")throw Error("expected object");var f=Object.create(this);if(h(f,y),f.fastdom=this,f.initialize)f.initialize();return f},"extend"),catch:null};function o(y){if(!y.scheduled)y.scheduled=!0,y.raf(n.bind(null,y)),e("flush scheduled")}t(o,"scheduleFlush");function n(y){e("flush");var{writes:f,reads:B}=y,v;try{e("flushing reads",B.length),y.runTasks(B),e("flushing writes",f.length),y.runTasks(f)}catch(q){v=q}if(y.scheduled=!1,B.length||f.length)o(y);if(v)if(e("task errored",v.message),y.catch)y.catch(v);else throw v}t(n,"flush");function c(y,f){var B=y.indexOf(f);return!!~B&&!!y.splice(B,1)}t(c,"remove");function h(y,f){for(var B in f)if(f.hasOwnProperty(B))y[B]=f[B]}t(h,"mixin");var g=r.fastdom=r.fastdom||new s;return g}(typeof window<"u"?window:globalThis),Xm={initialize:t(function(){this._tasks=new Map},"initialize"),mutate:t(function(r,e){return Af(this,"mutate",r,e)},"mutate"),measure:t(function(r,e){return Af(this,"measure",r,e)},"measure"),clear:t(function(r){var e=this._tasks,i=e.get(r);this.fastdom.clear(i),e.delete(r)},"clear")};function Af(r,e,i,s){var{_tasks:o,fastdom:n}=r,c,h=new Promise(function(g,y){c=n[e](function(){o.delete(h);try{g(s?i.call(s):i())}catch(f){y(f)}},s)});return o.set(h,c),h}t(Af,"create");var{initialize:p9,mutate:g9,measure:m9,clear:y9}=Xm,Bw=Xm,vw=_w.extend({raf(r){if(typeof queueMicrotask==="function")queueMicrotask(r);else setTimeout(r,0)}}).extend(Bw),Io=vw;function Vm(r){if(Intl.Segmenter)return[...new Intl.Segmenter().segment(r)].map((e)=>e.segment);return[...r]}t(Vm,"splitTextToChars");function Km(r,e){let i=Vm(e.content);return Of(r,[],i,e.type)}t(Km,"splitWordToFitWidth");function Of(r,e,i,s){if(i.length===0)return[{content:e.join(""),type:s},{content:"",type:s}];let[o,...n]=i,c=[...e,o];if(r([{content:c.join(""),type:s}]))return Of(r,c,n,s);if(e.length===0&&o)e.push(o),i.shift();return[{content:e.join(""),type:s},{content:i.join(""),type:s}]}t(Of,"splitWordToFitWidthRecursion");function Zm(r,e){if(r.some(({content:i})=>i.includes(`
231
+ `)))throw Error("splitLineToFitWidth does not support newlines in the line");return Xl(r,e)}t(Zm,"splitLineToFitWidth");function Xl(r,e,i=[],s=[]){if(r.length===0){if(s.length>0)i.push(s);return i.length>0?i:[]}let o="";if(r[0].content===" ")o=" ",r.shift();let n=r.shift()??{content:" ",type:"normal"},c=[...s];if(o!=="")c.push({content:o,type:"normal"});if(c.push(n),e(c))return Xl(r,e,i,c);if(s.length>0)i.push(s),r.unshift(n);else if(n.content){let[h,g]=Km(e,n);if(i.push([h]),g.content)r.unshift(g)}return Xl(r,e,i)}t(Xl,"splitLineToFitWidthRecursion");function Mf(r,e){if(e)r.attr("style",e)}t(Mf,"applyStyle");var Hm=16384;async function Qm(r,e,i,s,o=!1,n=x(),c=0){let h=r.append("foreignObject");h.attr("width",`${Math.min(10*i,Hm)}px`),h.attr("height",`${Math.min(10*i,Hm)}px`);let g=h.append("xhtml:div"),y=fe(e.label)?await xr(e.label.replace(b.lineBreakRegex,`
232
+ `),n):O(e.label,n),f=e.isNode?"nodeLabel":"edgeLabel",B=g.append("span");if(B.html(y),Mf(B,e.labelStyle),B.attr("class",`${f} ${s}`),Mf(g,e.labelStyle),g.style("display","table-cell"),g.style("white-space","nowrap"),g.style("line-height","1.5"),i!==Number.POSITIVE_INFINITY)g.style("max-width",i+"px"),g.style("text-align","center");if(g.attr("xmlns","http://www.w3.org/1999/xhtml"),o)g.attr("class","labelBkg");let v=await Io.measure(()=>g.node().getBoundingClientRect());if(v.width===i)g.style("display","table"),g.style("white-space","break-spaces"),g.style("width",i+"px");else if(v.width<c)g.style("display","table"),g.style("width",c+"px"),g.style("text-align","center");return h.node()}t(Qm,"addHtmlSpan");function Vl(r,e,i,s=!1){let o=r.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*i-0.1+"em").attr("dy",i+"em");if(s)o.attr("text-anchor","middle");return o}t(Vl,"createTspan");function Jm(r,e,i){let s=r.append("text"),o=Vl(s,1,e);Kl(o,i);let n=o.node().getComputedTextLength();return s.remove(),n}t(Jm,"computeWidthOfText");function Zi(r,e,i){let s=r.append("text"),o=Vl(s,1,e);Kl(o,[{content:i,type:"normal"}]);let n=o.node()?.getBoundingClientRect();if(n)s.remove();return n}t(Zi,"computeDimensionOfText");function ty(r,e,i,s=!1,o=!1){let c=e.append("g"),h=c.insert("rect").attr("class","background").attr("style","stroke: none"),g=c.append("text").attr("y","-10.1");if(o)g.attr("text-anchor","middle");let y=0;for(let f of i){let B=t((q)=>Jm(c,1.1,q)<=r,"checkWidth"),v=B(f)?[f]:Zm(f,B);for(let q of v){let W=Vl(g,y,1.1,o);Kl(W,q),y++}}if(s){let f=g.node().getBBox(),B=2;return h.attr("x",f.x-2).attr("y",f.y-2).attr("width",f.width+4).attr("height",f.height+4),c.node()}else return g.node()}t(ty,"createFormattedText");function Ef(r){let e=/&(amp|lt|gt);/g;return r.replace(e,(i,s)=>{switch(s){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return i}})}t(Ef,"decodeHTMLEntities");function Kl(r,e){r.text(""),e.forEach((i,s)=>{let o=r.append("tspan").attr("font-style",i.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",i.type==="strong"?"bold":"normal");if(s===0)o.text(Ef(i.content));else o.text(" "+Ef(i.content))})}t(Kl,"updateTextContentAndStyles");async function ey(r,e={}){let i=[];r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,n,c)=>(i.push((async()=>{let h=`${n}:${c}`;if(await Dl(h))return await rt(h,void 0,{class:"label-icon"});else return`<i class='${O(o,e).replace(":"," ")}'></i>`})()),o));let s=await Promise.all(i);return r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>s.shift()??"")}t(ey,"replaceIconSubstring");var Le=t(async(r,e="",{style:i="",isTitle:s=!1,classes:o="",useHtmlLabels:n=!0,markdown:c=!0,isNode:h=!0,width:g=200,minWidth:y=0,addSvgBackground:f=!1}={},B)=>{if(a.debug("XYZ createText",e,i,s,o,n,h,"addSvgBackground: ",f),n){let v=c?Gm(e,B):jm(e),q=await ey(Ut(v),B),W=e.replace(/\\\\/g,"\\"),H={isNode:h,label:fe(e)?W:q,labelStyle:i.replace("fill:","color:")};return await Qm(r,H,g,o,f,B,y)}else{let v=Ut(e.replace(/<br\s*\/?>/g,"<br/>")),q=c?si(v.replace("<br>","<br/>"),B):Um(v),W=ty(g,r,q,e?f:!1,!h);if(h){if(/stroke:/.exec(i))i=i.replace("stroke:","lineColor:");let H=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");p(W).attr("style",H)}else{let H=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");p(W).select("rect").attr("style",H.replace(/background:/g,"fill:"));let Y=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");p(W).select("text").attr("style",Y)}if(s)p(W).selectAll("tspan.text-outer-tspan").classed("title-row",!0);else p(W).selectAll("tspan.text-outer-tspan").classed("row",!0);return W}},"createText");var Kr=new Set(["redux-color","redux-dark-color"]),Lw=12,Fw=64,pe=t((r)=>Array.isArray(r)&&r.length>0,"hasPalette"),se=t((r,e)=>r!=null&&Kr.has(r)&&pe(e),"isColorTheme"),Aw=/^[\w-]+$/,le=t((r)=>{let e=typeof r==="string"||typeof r==="number"?String(r):"";return Aw.test(e)?e:"classic"},"safeLook"),vt=t((r)=>pe(r)?r.length:0,"paletteSlotCount"),Ze=t((r,e)=>{if(pe(e))return vt(e);return typeof r==="number"&&Number.isInteger(r)&&r>0&&r<=Fw?r:Lw},"colorSlotCount"),Xe=t((r,e,i,s)=>{if(e===void 0||!se(i,s))return;let o=e%vt(s);r.attr("data-color-id",`color-${o}`)},"stampColorSlot");function If(r,e,i){if(r&&r.length){let[s,o]=e,n=Math.PI/180*i,c=Math.cos(n),h=Math.sin(n);for(let g of r){let[y,f]=g;g[0]=(y-s)*c-(f-o)*h+s,g[1]=(y-s)*h+(f-o)*c+o}}}function Mw(r,e){return r[0]===e[0]&&r[1]===e[1]}function Ew(r,e,i,s=1){let o=i,n=Math.max(e,0.1),c=r[0]&&r[0][0]&&typeof r[0][0]=="number"?[r]:r,h=[0,0];if(o)for(let y of c)If(y,h,o);let g=function(y,f,B){let v=[];for(let X of y){let Q=[...X];Mw(Q[0],Q[Q.length-1])||Q.push([Q[0][0],Q[0][1]]),Q.length>2&&v.push(Q)}let q=[];f=Math.max(f,0.1);let W=[];for(let X of v)for(let Q=0;Q<X.length-1;Q++){let et=X[Q],it=X[Q+1];if(et[1]!==it[1]){let ht=Math.min(et[1],it[1]);W.push({ymin:ht,ymax:Math.max(et[1],it[1]),x:ht===et[1]?et[0]:it[0],islope:(it[0]-et[0])/(it[1]-et[1])})}}if(W.sort((X,Q)=>X.ymin<Q.ymin?-1:X.ymin>Q.ymin?1:X.x<Q.x?-1:X.x>Q.x?1:X.ymax===Q.ymax?0:(X.ymax-Q.ymax)/Math.abs(X.ymax-Q.ymax)),!W.length)return q;let H=[],Y=W[0].ymin,j=0;for(;H.length||W.length;){if(W.length){let X=-1;for(let Q=0;Q<W.length&&!(W[Q].ymin>Y);Q++)X=Q;W.splice(0,X+1).forEach((Q)=>{H.push({s:Y,edge:Q})})}if(H=H.filter((X)=>!(X.edge.ymax<=Y)),H.sort((X,Q)=>X.edge.x===Q.edge.x?0:(X.edge.x-Q.edge.x)/Math.abs(X.edge.x-Q.edge.x)),(B!==1||j%f==0)&&H.length>1)for(let X=0;X<H.length;X+=2){let Q=X+1;if(Q>=H.length)break;let et=H[X].edge,it=H[Q].edge;q.push([[Math.round(et.x),Y],[Math.round(it.x),Y]])}Y+=B,H.forEach((X)=>{X.edge.x=X.edge.x+B*X.edge.islope}),j++}return q}(c,n,s);if(o){for(let y of c)If(y,h,-o);(function(y,f,B){let v=[];y.forEach((q)=>v.push(...q)),If(v,f,B)})(g,h,-o)}return g}function dn(r,e){var i;let s=e.hachureAngle+90,o=e.hachureGap;o<0&&(o=4*e.strokeWidth),o=Math.round(Math.max(o,0.1));let n=1;return e.roughness>=1&&(((i=e.randomizer)===null||i===void 0?void 0:i.next())||Math.random())>0.7&&(n=o),Ew(r,o,s,n||1)}class sh{constructor(r){this.helper=r}fillPolygons(r,e){return this._fillPolygons(r,e)}_fillPolygons(r,e){let i=dn(r,e);return{type:"fillSketch",ops:this.renderLines(i,e)}}renderLines(r,e){let i=[];for(let s of r)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],e));return i}}function ah(r){let e=r[0],i=r[1];return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}class cy extends sh{fillPolygons(r,e){let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,0.1);let s=dn(r,Object.assign({},e,{hachureGap:i})),o=Math.PI/180*e.hachureAngle,n=[],c=0.5*i*Math.cos(o),h=0.5*i*Math.sin(o);for(let[g,y]of s)ah([g,y])&&n.push([[g[0]-c,g[1]+h],[...y]],[[g[0]+c,g[1]-h],[...y]]);return{type:"fillSketch",ops:this.renderLines(n,e)}}}class uy extends sh{fillPolygons(r,e){let i=this._fillPolygons(r,e),s=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(r,s);return i.ops=i.ops.concat(o.ops),i}}class fy{constructor(r){this.helper=r}fillPolygons(r,e){let i=dn(r,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(i,e)}dotsOnLines(r,e){let i=[],s=e.hachureGap;s<0&&(s=4*e.strokeWidth),s=Math.max(s,0.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);let n=s/4;for(let c of r){let h=ah(c),g=h/s,y=Math.ceil(g)-1,f=h-y*s,B=(c[0][0]+c[1][0])/2-s/4,v=Math.min(c[0][1],c[1][1]);for(let q=0;q<y;q++){let W=v+f+q*s,H=B-n+2*Math.random()*n,Y=W-n+2*Math.random()*n,j=this.helper.ellipse(H,Y,o,o,e);i.push(...j.ops)}}return{type:"fillSketch",ops:i}}}class dy{constructor(r){this.helper=r}fillPolygons(r,e){let i=dn(r,e);return{type:"fillSketch",ops:this.dashedLine(i,e)}}dashedLine(r,e){let i=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,s=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return r.forEach((n)=>{let c=ah(n),h=Math.floor(c/(i+s)),g=(c+s-h*(i+s))/2,y=n[0],f=n[1];y[0]>f[0]&&(y=n[1],f=n[0]);let B=Math.atan((f[1]-y[1])/(f[0]-y[0]));for(let v=0;v<h;v++){let q=v*(i+s),W=q+i,H=[y[0]+q*Math.cos(B)+g*Math.cos(B),y[1]+q*Math.sin(B)+g*Math.sin(B)],Y=[y[0]+W*Math.cos(B)+g*Math.cos(B),y[1]+W*Math.sin(B)+g*Math.sin(B)];o.push(...this.helper.doubleLineOps(H[0],H[1],Y[0],Y[1],e))}}),o}}class py{constructor(r){this.helper=r}fillPolygons(r,e){let i=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,s=e.zigzagOffset<0?i:e.zigzagOffset,o=dn(r,e=Object.assign({},e,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,e)}}zigzagLines(r,e,i){let s=[];return r.forEach((o)=>{let n=ah(o),c=Math.round(n/(2*e)),h=o[0],g=o[1];h[0]>g[0]&&(h=o[1],g=o[0]);let y=Math.atan((g[1]-h[1])/(g[0]-h[0]));for(let f=0;f<c;f++){let B=2*f*e,v=2*(f+1)*e,q=Math.sqrt(2*Math.pow(e,2)),W=[h[0]+B*Math.cos(y),h[1]+B*Math.sin(y)],H=[h[0]+v*Math.cos(y),h[1]+v*Math.sin(y)],Y=[W[0]+q*Math.cos(y+Math.PI/4),W[1]+q*Math.sin(y+Math.PI/4)];s.push(...this.helper.doubleLineOps(W[0],W[1],Y[0],Y[1],i),...this.helper.doubleLineOps(Y[0],Y[1],H[0],H[1],i))}}),s}}var hi={};class gy{constructor(r){this.seed=r}next(){return this.seed?(2147483647&(this.seed=Math.imul(48271,this.seed)))/2147483648:Math.random()}}var Ow=0,$f=1,ry=2,Zl={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 Df(r,e){return r.type===e}function zf(r){let e=[],i=function(c){let h=[];for(;c!=="";)if(c.match(/^([ \t\r\n,]+)/))c=c.substr(RegExp.$1.length);else if(c.match(/^([aAcChHlLmMqQsStTvVzZ])/))h[h.length]={type:Ow,text:RegExp.$1},c=c.substr(RegExp.$1.length);else{if(!c.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];h[h.length]={type:$f,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return h[h.length]={type:ry,text:""},h}(r),s="BOD",o=0,n=i[o];for(;!Df(n,ry);){let c=0,h=[];if(s==="BOD"){if(n.text!=="M"&&n.text!=="m")return zf("M0,0"+r);o++,c=Zl[n.text],s=n.text}else Df(n,$f)?c=Zl[s]:(o++,c=Zl[n.text],s=n.text);if(!(o+c<i.length))throw Error("Path data ended short");for(let g=o;g<o+c;g++){let y=i[g];if(!Df(y,$f))throw Error("Param not a number: "+s+","+y.text);h[h.length]=+y.text}if(typeof Zl[s]!="number")throw Error("Bad segment: "+s);{let g={key:s,data:h};e.push(g),o+=c,n=i[o],s==="M"&&(s="L"),s==="m"&&(s="l")}}return e}function my(r){let e=0,i=0,s=0,o=0,n=[];for(let{key:c,data:h}of r)switch(c){case"M":n.push({key:"M",data:[...h]}),[e,i]=h,[s,o]=h;break;case"m":e+=h[0],i+=h[1],n.push({key:"M",data:[e,i]}),s=e,o=i;break;case"L":n.push({key:"L",data:[...h]}),[e,i]=h;break;case"l":e+=h[0],i+=h[1],n.push({key:"L",data:[e,i]});break;case"C":n.push({key:"C",data:[...h]}),e=h[4],i=h[5];break;case"c":{let g=h.map((y,f)=>f%2?y+i:y+e);n.push({key:"C",data:g}),e=g[4],i=g[5];break}case"Q":n.push({key:"Q",data:[...h]}),e=h[2],i=h[3];break;case"q":{let g=h.map((y,f)=>f%2?y+i:y+e);n.push({key:"Q",data:g}),e=g[2],i=g[3];break}case"A":n.push({key:"A",data:[...h]}),e=h[5],i=h[6];break;case"a":e+=h[5],i+=h[6],n.push({key:"A",data:[h[0],h[1],h[2],h[3],h[4],e,i]});break;case"H":n.push({key:"H",data:[...h]}),e=h[0];break;case"h":e+=h[0],n.push({key:"H",data:[e]});break;case"V":n.push({key:"V",data:[...h]}),i=h[0];break;case"v":i+=h[0],n.push({key:"V",data:[i]});break;case"S":n.push({key:"S",data:[...h]}),e=h[2],i=h[3];break;case"s":{let g=h.map((y,f)=>f%2?y+i:y+e);n.push({key:"S",data:g}),e=g[2],i=g[3];break}case"T":n.push({key:"T",data:[...h]}),e=h[0],i=h[1];break;case"t":e+=h[0],i+=h[1],n.push({key:"T",data:[e,i]});break;case"Z":case"z":n.push({key:"Z",data:[]}),e=s,i=o}return n}function yy(r){let e=[],i="",s=0,o=0,n=0,c=0,h=0,g=0;for(let{key:y,data:f}of r){switch(y){case"M":e.push({key:"M",data:[...f]}),[s,o]=f,[n,c]=f;break;case"C":e.push({key:"C",data:[...f]}),s=f[4],o=f[5],h=f[2],g=f[3];break;case"L":e.push({key:"L",data:[...f]}),[s,o]=f;break;case"H":s=f[0],e.push({key:"L",data:[s,o]});break;case"V":o=f[0],e.push({key:"L",data:[s,o]});break;case"S":{let B=0,v=0;i==="C"||i==="S"?(B=s+(s-h),v=o+(o-g)):(B=s,v=o),e.push({key:"C",data:[B,v,...f]}),h=f[0],g=f[1],s=f[2],o=f[3];break}case"T":{let[B,v]=f,q=0,W=0;i==="Q"||i==="T"?(q=s+(s-h),W=o+(o-g)):(q=s,W=o);let H=s+2*(q-s)/3,Y=o+2*(W-o)/3,j=B+2*(q-B)/3,X=v+2*(W-v)/3;e.push({key:"C",data:[H,Y,j,X,B,v]}),h=q,g=W,s=B,o=v;break}case"Q":{let[B,v,q,W]=f,H=s+2*(B-s)/3,Y=o+2*(v-o)/3,j=q+2*(B-q)/3,X=W+2*(v-W)/3;e.push({key:"C",data:[H,Y,j,X,q,W]}),h=B,g=v,s=q,o=W;break}case"A":{let B=Math.abs(f[0]),v=Math.abs(f[1]),q=f[2],W=f[3],H=f[4],Y=f[5],j=f[6];if(B===0||v===0)e.push({key:"C",data:[s,o,Y,j,Y,j]}),s=Y,o=j;else if(s!==Y||o!==j)xy(s,o,Y,j,B,v,q,W,H).forEach(function(X){e.push({key:"C",data:X})}),s=Y,o=j;break}case"Z":e.push({key:"Z",data:[]}),s=n,o=c}i=y}return e}function cn(r,e,i){return[r*Math.cos(i)-e*Math.sin(i),r*Math.sin(i)+e*Math.cos(i)]}function xy(r,e,i,s,o,n,c,h,g,y){let f=(B=c,Math.PI*B/180);var B;let v=[],q=0,W=0,H=0,Y=0;if(y)[q,W,H,Y]=y;else{[r,e]=cn(r,e,-f),[i,s]=cn(i,s,-f);let st=(r-i)/2,at=(e-s)/2,pt=st*st/(o*o)+at*at/(n*n);pt>1&&(pt=Math.sqrt(pt),o*=pt,n*=pt);let ot=o*o,wt=n*n,At=ot*wt-ot*at*at-wt*st*st,jt=ot*at*at+wt*st*st,Yt=(h===g?-1:1)*Math.sqrt(Math.abs(At/jt));H=Yt*o*at/n+(r+i)/2,Y=Yt*-n*st/o+(e+s)/2,q=Math.asin(parseFloat(((e-Y)/n).toFixed(9))),W=Math.asin(parseFloat(((s-Y)/n).toFixed(9))),r<H&&(q=Math.PI-q),i<H&&(W=Math.PI-W),q<0&&(q=2*Math.PI+q),W<0&&(W=2*Math.PI+W),g&&q>W&&(q-=2*Math.PI),!g&&W>q&&(W-=2*Math.PI)}let j=W-q;if(Math.abs(j)>120*Math.PI/180){let st=W,at=i,pt=s;W=g&&W>q?q+120*Math.PI/180*1:q+120*Math.PI/180*-1,v=xy(i=H+o*Math.cos(W),s=Y+n*Math.sin(W),at,pt,o,n,c,0,g,[W,st,H,Y])}j=W-q;let X=Math.cos(q),Q=Math.sin(q),et=Math.cos(W),it=Math.sin(W),ht=Math.tan(j/4),lt=1.3333333333333333*o*ht,ft=1.3333333333333333*n*ht,xt=[r,e],Lt=[r+lt*Q,e-ft*X],kt=[i+lt*it,s-ft*et],Ct=[i,s];if(Lt[0]=2*xt[0]-Lt[0],Lt[1]=2*xt[1]-Lt[1],y)return[Lt,kt,Ct].concat(v);{v=[Lt,kt,Ct].concat(v);let st=[];for(let at=0;at<v.length;at+=3){let pt=cn(v[at][0],v[at][1],f),ot=cn(v[at+1][0],v[at+1][1],f),wt=cn(v[at+2][0],v[at+2][1],f);st.push([pt[0],pt[1],ot[0],ot[1],wt[0],wt[1]])}return st}}var Iw={randOffset:function(r,e){return be(r,e)},randOffsetWithRange:function(r,e,i){return rh(r,e,i)},ellipse:function(r,e,i,s,o){let n=by(i,s,o);return qf(r,e,o,n).opset},doubleLineOps:function(r,e,i,s,o){return Ko(r,e,i,s,o,!0)}};function Cy(r,e,i,s,o){return{type:"path",ops:Ko(r,e,i,s,o)}}function th(r,e,i){let s=(r||[]).length;if(s>2){let o=[];for(let n=0;n<s-1;n++)o.push(...Ko(r[n][0],r[n][1],r[n+1][0],r[n+1][1],i));return e&&o.push(...Ko(r[s-1][0],r[s-1][1],r[0][0],r[0][1],i)),{type:"path",ops:o}}return s===2?Cy(r[0][0],r[0][1],r[1][0],r[1][1],i):{type:"path",ops:[]}}function $w(r,e,i,s,o){return function(n,c){return th(n,!0,c)}([[r,e],[r+i,e],[r+i,e+s],[r,e+s]],o)}function iy(r,e){if(r.length){let i=typeof r[0][0]=="number"?[r]:r,s=Ql(i[0],1*(1+0.2*e.roughness),e),o=e.disableMultiStroke?[]:Ql(i[0],1.5*(1+0.22*e.roughness),ay(e));for(let n=1;n<i.length;n++){let c=i[n];if(c.length){let h=Ql(c,1*(1+0.2*e.roughness),e),g=e.disableMultiStroke?[]:Ql(c,1.5*(1+0.22*e.roughness),ay(e));for(let y of h)y.op!=="move"&&s.push(y);for(let y of g)y.op!=="move"&&o.push(y)}}return{type:"path",ops:s.concat(o)}}return{type:"path",ops:[]}}function by(r,e,i){let s=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(r/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(i.curveStepCount,i.curveStepCount/Math.sqrt(200)*s)),n=2*Math.PI/o,c=Math.abs(r/2),h=Math.abs(e/2),g=1-i.curveFitting;return c+=be(c*g,i),h+=be(h*g,i),{increment:n,rx:c,ry:h}}function qf(r,e,i,s){let[o,n]=ny(s.increment,r,e,s.rx,s.ry,1,s.increment*rh(0.1,rh(0.4,1,i),i),i),c=ih(o,null,i);if(!i.disableMultiStroke&&i.roughness!==0){let[h]=ny(s.increment,r,e,s.rx,s.ry,1.5,0,i),g=ih(h,null,i);c=c.concat(g)}return{estimatedPoints:n,opset:{type:"path",ops:c}}}function oy(r,e,i,s,o,n,c,h,g){let y=r,f=e,B=Math.abs(i/2),v=Math.abs(s/2);B+=be(0.01*B,g),v+=be(0.01*v,g);let q=o,W=n;for(;q<0;)q+=2*Math.PI,W+=2*Math.PI;W-q>2*Math.PI&&(q=0,W=2*Math.PI);let H=2*Math.PI/g.curveStepCount,Y=Math.min(H/2,(W-q)/2),j=ly(Y,y,f,B,v,q,W,1,g);if(!g.disableMultiStroke){let X=ly(Y,y,f,B,v,q,W,1.5,g);j.push(...X)}return c&&(h?j.push(...Ko(y,f,y+B*Math.cos(q),f+v*Math.sin(q),g),...Ko(y,f,y+B*Math.cos(W),f+v*Math.sin(W),g)):j.push({op:"lineTo",data:[y,f]},{op:"lineTo",data:[y+B*Math.cos(q),f+v*Math.sin(q)]})),{type:"path",ops:j}}function sy(r,e){let i=yy(my(zf(r))),s=[],o=[0,0],n=[0,0];for(let{key:c,data:h}of i)switch(c){case"M":n=[h[0],h[1]],o=[h[0],h[1]];break;case"L":s.push(...Ko(n[0],n[1],h[0],h[1],e)),n=[h[0],h[1]];break;case"C":{let[g,y,f,B,v,q]=h;s.push(...Dw(g,y,f,B,v,q,n,e)),n=[v,q];break}case"Z":s.push(...Ko(n[0],n[1],o[0],o[1],e)),n=[o[0],o[1]]}return{type:"path",ops:s}}function Pf(r,e){let i=[];for(let s of r)if(s.length){let o=e.maxRandomnessOffset||0,n=s.length;if(n>2){i.push({op:"move",data:[s[0][0]+be(o,e),s[0][1]+be(o,e)]});for(let c=1;c<n;c++)i.push({op:"lineTo",data:[s[c][0]+be(o,e),s[c][1]+be(o,e)]})}}return{type:"fillPath",ops:i}}function Ds(r,e){return function(i,s){let o=i.fillStyle||"hachure";if(!hi[o])switch(o){case"zigzag":hi[o]||(hi[o]=new cy(s));break;case"cross-hatch":hi[o]||(hi[o]=new uy(s));break;case"dots":hi[o]||(hi[o]=new fy(s));break;case"dashed":hi[o]||(hi[o]=new dy(s));break;case"zigzag-line":hi[o]||(hi[o]=new py(s));break;default:o="hachure",hi[o]||(hi[o]=new sh(s))}return hi[o]}(e,Iw).fillPolygons(r,e)}function ay(r){let e=Object.assign({},r);return e.randomizer=void 0,r.seed&&(e.seed=r.seed+1),e}function ky(r){return r.randomizer||(r.randomizer=new gy(r.seed||0)),r.randomizer.next()}function rh(r,e,i,s=1){return i.roughness*s*(ky(i)*(e-r)+r)}function be(r,e,i=1){return rh(-r,r,e,i)}function Ko(r,e,i,s,o,n=!1){let c=n?o.disableMultiStrokeFill:o.disableMultiStroke,h=Nf(r,e,i,s,o,!0,!1);if(c)return h;let g=Nf(r,e,i,s,o,!0,!0);return h.concat(g)}function Nf(r,e,i,s,o,n,c){let h=Math.pow(r-i,2)+Math.pow(e-s,2),g=Math.sqrt(h),y=1;y=g<200?1:g>500?0.4:-0.0016668*g+1.233334;let f=o.maxRandomnessOffset||0;f*f*100>h&&(f=g/10);let B=f/2,v=0.2+0.2*ky(o),q=o.bowing*o.maxRandomnessOffset*(s-e)/200,W=o.bowing*o.maxRandomnessOffset*(r-i)/200;q=be(q,o,y),W=be(W,o,y);let H=[],Y=()=>be(B,o,y),j=()=>be(f,o,y),X=o.preserveVertices;return n&&(c?H.push({op:"move",data:[r+(X?0:Y()),e+(X?0:Y())]}):H.push({op:"move",data:[r+(X?0:be(f,o,y)),e+(X?0:be(f,o,y))]})),c?H.push({op:"bcurveTo",data:[q+r+(i-r)*v+Y(),W+e+(s-e)*v+Y(),q+r+2*(i-r)*v+Y(),W+e+2*(s-e)*v+Y(),i+(X?0:Y()),s+(X?0:Y())]}):H.push({op:"bcurveTo",data:[q+r+(i-r)*v+j(),W+e+(s-e)*v+j(),q+r+2*(i-r)*v+j(),W+e+2*(s-e)*v+j(),i+(X?0:j()),s+(X?0:j())]}),H}function Ql(r,e,i){if(!r.length)return[];let s=[];s.push([r[0][0]+be(e,i),r[0][1]+be(e,i)]),s.push([r[0][0]+be(e,i),r[0][1]+be(e,i)]);for(let o=1;o<r.length;o++)s.push([r[o][0]+be(e,i),r[o][1]+be(e,i)]),o===r.length-1&&s.push([r[o][0]+be(e,i),r[o][1]+be(e,i)]);return ih(s,null,i)}function ih(r,e,i){let s=r.length,o=[];if(s>3){let n=[],c=1-i.curveTightness;o.push({op:"move",data:[r[1][0],r[1][1]]});for(let h=1;h+2<s;h++){let g=r[h];n[0]=[g[0],g[1]],n[1]=[g[0]+(c*r[h+1][0]-c*r[h-1][0])/6,g[1]+(c*r[h+1][1]-c*r[h-1][1])/6],n[2]=[r[h+1][0]+(c*r[h][0]-c*r[h+2][0])/6,r[h+1][1]+(c*r[h][1]-c*r[h+2][1])/6],n[3]=[r[h+1][0],r[h+1][1]],o.push({op:"bcurveTo",data:[n[1][0],n[1][1],n[2][0],n[2][1],n[3][0],n[3][1]]})}if(e&&e.length===2){let h=i.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+be(h,i),e[1]+be(h,i)]})}}else s===3?(o.push({op:"move",data:[r[1][0],r[1][1]]}),o.push({op:"bcurveTo",data:[r[1][0],r[1][1],r[2][0],r[2][1],r[2][0],r[2][1]]})):s===2&&o.push(...Nf(r[0][0],r[0][1],r[1][0],r[1][1],i,!0,!0));return o}function ny(r,e,i,s,o,n,c,h){let g=[],y=[];if(h.roughness===0){r/=4,y.push([e+s*Math.cos(-r),i+o*Math.sin(-r)]);for(let f=0;f<=2*Math.PI;f+=r){let B=[e+s*Math.cos(f),i+o*Math.sin(f)];g.push(B),y.push(B)}y.push([e+s*Math.cos(0),i+o*Math.sin(0)]),y.push([e+s*Math.cos(r),i+o*Math.sin(r)])}else{let f=be(0.5,h)-Math.PI/2;y.push([be(n,h)+e+0.9*s*Math.cos(f-r),be(n,h)+i+0.9*o*Math.sin(f-r)]);let B=2*Math.PI+f-0.01;for(let v=f;v<B;v+=r){let q=[be(n,h)+e+s*Math.cos(v),be(n,h)+i+o*Math.sin(v)];g.push(q),y.push(q)}y.push([be(n,h)+e+s*Math.cos(f+2*Math.PI+0.5*c),be(n,h)+i+o*Math.sin(f+2*Math.PI+0.5*c)]),y.push([be(n,h)+e+0.98*s*Math.cos(f+c),be(n,h)+i+0.98*o*Math.sin(f+c)]),y.push([be(n,h)+e+0.9*s*Math.cos(f+0.5*c),be(n,h)+i+0.9*o*Math.sin(f+0.5*c)])}return[y,g]}function ly(r,e,i,s,o,n,c,h,g){let y=n+be(0.1,g),f=[];f.push([be(h,g)+e+0.9*s*Math.cos(y-r),be(h,g)+i+0.9*o*Math.sin(y-r)]);for(let B=y;B<=c;B+=r)f.push([be(h,g)+e+s*Math.cos(B),be(h,g)+i+o*Math.sin(B)]);return f.push([e+s*Math.cos(c),i+o*Math.sin(c)]),f.push([e+s*Math.cos(c),i+o*Math.sin(c)]),ih(f,null,g)}function Dw(r,e,i,s,o,n,c,h){let g=[],y=[h.maxRandomnessOffset||1,(h.maxRandomnessOffset||1)+0.3],f=[0,0],B=h.disableMultiStroke?1:2,v=h.preserveVertices;for(let q=0;q<B;q++)q===0?g.push({op:"move",data:[c[0],c[1]]}):g.push({op:"move",data:[c[0]+(v?0:be(y[0],h)),c[1]+(v?0:be(y[0],h))]}),f=v?[o,n]:[o+be(y[q],h),n+be(y[q],h)],g.push({op:"bcurveTo",data:[r+be(y[q],h),e+be(y[q],h),i+be(y[q],h),s+be(y[q],h),f[0],f[1]]});return g}function un(r){return[...r]}function hy(r,e=0){let i=r.length;if(i<3)throw Error("A curve must have at least three points.");let s=[];if(i===3)s.push(un(r[0]),un(r[1]),un(r[2]),un(r[2]));else{let o=[];o.push(r[0],r[0]);for(let h=1;h<r.length;h++)o.push(r[h]),h===r.length-1&&o.push(r[h]);let n=[],c=1-e;s.push(un(o[0]));for(let h=1;h+2<o.length;h++){let g=o[h];n[0]=[g[0],g[1]],n[1]=[g[0]+(c*o[h+1][0]-c*o[h-1][0])/6,g[1]+(c*o[h+1][1]-c*o[h-1][1])/6],n[2]=[o[h+1][0]+(c*o[h][0]-c*o[h+2][0])/6,o[h+1][1]+(c*o[h][1]-c*o[h+2][1])/6],n[3]=[o[h+1][0],o[h+1][1]],s.push(n[1],n[2],n[3])}}return s}function eh(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)}function Pw(r,e,i){let s=eh(e,i);if(s===0)return eh(r,e);let o=((r[0]-e[0])*(i[0]-e[0])+(r[1]-e[1])*(i[1]-e[1]))/s;return o=Math.max(0,Math.min(1,o)),eh(r,ns(e,i,o))}function ns(r,e,i){return[r[0]+(e[0]-r[0])*i,r[1]+(e[1]-r[1])*i]}function Wf(r,e,i,s){let o=s||[];if(function(h,g){let y=h[g+0],f=h[g+1],B=h[g+2],v=h[g+3],q=3*f[0]-2*y[0]-v[0];q*=q;let W=3*f[1]-2*y[1]-v[1];W*=W;let H=3*B[0]-2*v[0]-y[0];H*=H;let Y=3*B[1]-2*v[1]-y[1];return Y*=Y,q<H&&(q=H),W<Y&&(W=Y),q+W}(r,e)<i){let h=r[e+0];if(o.length)(n=o[o.length-1],c=h,Math.sqrt(eh(n,c)))>1&&o.push(h);else o.push(h);o.push(r[e+3])}else{let g=r[e+0],y=r[e+1],f=r[e+2],B=r[e+3],v=ns(g,y,0.5),q=ns(y,f,0.5),W=ns(f,B,0.5),H=ns(v,q,0.5),Y=ns(q,W,0.5),j=ns(H,Y,0.5);Wf([g,v,H,j],0,i,o),Wf([j,Y,W,B],0,i,o)}var n,c;return o}function Rw(r,e){return oh(r,0,r.length,e)}function oh(r,e,i,s,o){let n=o||[],c=r[e],h=r[i-1],g=0,y=1;for(let f=e+1;f<i-1;++f){let B=Pw(r[f],c,h);B>g&&(g=B,y=f)}return Math.sqrt(g)>s?(oh(r,e,y+1,s,n),oh(r,y,i,s,n)):(n.length||n.push(c),n.push(h)),n}function Rf(r,e=0.15,i){let s=[],o=(r.length-1)/3;for(let n=0;n<o;n++)Wf(r,3*n,e,s);return i&&i>0?oh(s,0,s.length,i):s}var di="none";class fn{constructor(r){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:0.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:0.8},this.config=r||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2147483648)}_o(r){return r?Object.assign({},this.defaultOptions,r):this.defaultOptions}_d(r,e,i){return{shape:r,sets:e||[],options:i||this.defaultOptions}}line(r,e,i,s,o){let n=this._o(o);return this._d("line",[Cy(r,e,i,s,n)],n)}rectangle(r,e,i,s,o){let n=this._o(o),c=[],h=$w(r,e,i,s,n);if(n.fill){let g=[[r,e],[r+i,e],[r+i,e+s],[r,e+s]];n.fillStyle==="solid"?c.push(Pf([g],n)):c.push(Ds([g],n))}return n.stroke!==di&&c.push(h),this._d("rectangle",c,n)}ellipse(r,e,i,s,o){let n=this._o(o),c=[],h=by(i,s,n),g=qf(r,e,n,h);if(n.fill)if(n.fillStyle==="solid"){let y=qf(r,e,n,h).opset;y.type="fillPath",c.push(y)}else c.push(Ds([g.estimatedPoints],n));return n.stroke!==di&&c.push(g.opset),this._d("ellipse",c,n)}circle(r,e,i,s){let o=this.ellipse(r,e,i,i,s);return o.shape="circle",o}linearPath(r,e){let i=this._o(e);return this._d("linearPath",[th(r,!1,i)],i)}arc(r,e,i,s,o,n,c=!1,h){let g=this._o(h),y=[],f=oy(r,e,i,s,o,n,c,!0,g);if(c&&g.fill)if(g.fillStyle==="solid"){let B=Object.assign({},g);B.disableMultiStroke=!0;let v=oy(r,e,i,s,o,n,!0,!1,B);v.type="fillPath",y.push(v)}else y.push(function(B,v,q,W,H,Y,j){let X=B,Q=v,et=Math.abs(q/2),it=Math.abs(W/2);et+=be(0.01*et,j),it+=be(0.01*it,j);let ht=H,lt=Y;for(;ht<0;)ht+=2*Math.PI,lt+=2*Math.PI;lt-ht>2*Math.PI&&(ht=0,lt=2*Math.PI);let ft=(lt-ht)/j.curveStepCount,xt=[];for(let Lt=ht;Lt<=lt;Lt+=ft)xt.push([X+et*Math.cos(Lt),Q+it*Math.sin(Lt)]);return xt.push([X+et*Math.cos(lt),Q+it*Math.sin(lt)]),xt.push([X,Q]),Ds([xt],j)}(r,e,i,s,o,n,g));return g.stroke!==di&&y.push(f),this._d("arc",y,g)}curve(r,e){let i=this._o(e),s=[],o=iy(r,i);if(i.fill&&i.fill!==di)if(i.fillStyle==="solid"){let n=iy(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(n.ops)})}else{let n=[],c=r;if(c.length){let h=typeof c[0][0]=="number"?[c]:c;for(let g of h)g.length<3?n.push(...g):g.length===3?n.push(...Rf(hy([g[0],g[0],g[1],g[2]]),10,(1+i.roughness)/2)):n.push(...Rf(hy(g),10,(1+i.roughness)/2))}n.length&&s.push(Ds([n],i))}return i.stroke!==di&&s.push(o),this._d("curve",s,i)}polygon(r,e){let i=this._o(e),s=[],o=th(r,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Pf([r],i)):s.push(Ds([r],i))),i.stroke!==di&&s.push(o),this._d("polygon",s,i)}path(r,e){let i=this._o(e),s=[];if(!r)return this._d("path",s,i);r=(r||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let o=i.fill&&i.fill!=="transparent"&&i.fill!==di,n=i.stroke!==di,c=!!(i.simplification&&i.simplification<1),h=function(y,f,B){let v=yy(my(zf(y))),q=[],W=[],H=[0,0],Y=[],j=()=>{Y.length>=4&&W.push(...Rf(Y,f)),Y=[]},X=()=>{j(),W.length&&(q.push(W),W=[])};for(let{key:et,data:it}of v)switch(et){case"M":X(),H=[it[0],it[1]],W.push(H);break;case"L":j(),W.push([it[0],it[1]]);break;case"C":if(!Y.length){let ht=W.length?W[W.length-1]:H;Y.push([ht[0],ht[1]])}Y.push([it[0],it[1]]),Y.push([it[2],it[3]]),Y.push([it[4],it[5]]);break;case"Z":j(),W.push([H[0],H[1]])}if(X(),!B)return q;let Q=[];for(let et of q){let it=Rw(et,B);it.length&&Q.push(it)}return Q}(r,1,c?4-4*(i.simplification||1):(1+i.roughness)/2),g=sy(r,i);if(o)if(i.fillStyle==="solid")if(h.length===1){let y=sy(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(y.ops)})}else s.push(Pf(h,i));else s.push(Ds(h,i));return n&&(c?h.forEach((y)=>{s.push(th(y,!1,i))}):s.push(g)),this._d("path",s,i)}opsToPath(r,e){let i="";for(let s of r.ops){let o=typeof e=="number"&&e>=0?s.data.map((n)=>+n.toFixed(e)):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(r){let e=r.sets||[],i=r.options||this.defaultOptions,s=[];for(let o of e){let n=null;switch(o.type){case"path":n={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:di};break;case"fillPath":n={d:this.opsToPath(o),stroke:di,strokeWidth:0,fill:i.fill||di};break;case"fillSketch":n=this.fillSketch(o,i)}n&&s.push(n)}return s}fillSketch(r,e){let i=e.fillWeight;return i<0&&(i=e.strokeWidth/2),{d:this.opsToPath(r),stroke:e.fill||di,strokeWidth:i,fill:di}}_mergedShape(r){return r.filter((e,i)=>i===0||e.op!=="move")}}class wy{constructor(r,e){this.canvas=r,this.ctx=this.canvas.getContext("2d"),this.gen=new fn(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.ctx,o=r.options.fixedDecimalPlaceDigits;for(let n of e)switch(n.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,n,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";let c=r.shape==="curve"||r.shape==="polygon"||r.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,n,o,c),s.restore();break}case"fillSketch":this.fillSketch(s,n,i)}}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),r.save(),i.fillLineDash&&r.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(r.lineDashOffset=i.fillLineDashOffset),r.strokeStyle=i.fill||"",r.lineWidth=s,this._drawToContext(r,e,i.fixedDecimalPlaceDigits),r.restore()}_drawToContext(r,e,i,s="nonzero"){r.beginPath();for(let o of e.ops){let n=typeof i=="number"&&i>=0?o.data.map((c)=>+c.toFixed(i)):o.data;switch(o.op){case"move":r.moveTo(n[0],n[1]);break;case"bcurveTo":r.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case"lineTo":r.lineTo(n[0],n[1])}}e.type==="fillPath"?r.fill(s):r.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(r,e,i,s,o){let n=this.gen.line(r,e,i,s,o);return this.draw(n),n}rectangle(r,e,i,s,o){let n=this.gen.rectangle(r,e,i,s,o);return this.draw(n),n}ellipse(r,e,i,s,o){let n=this.gen.ellipse(r,e,i,s,o);return this.draw(n),n}circle(r,e,i,s){let o=this.gen.circle(r,e,i,s);return this.draw(o),o}linearPath(r,e){let i=this.gen.linearPath(r,e);return this.draw(i),i}polygon(r,e){let i=this.gen.polygon(r,e);return this.draw(i),i}arc(r,e,i,s,o,n,c=!1,h){let g=this.gen.arc(r,e,i,s,o,n,c,h);return this.draw(g),g}curve(r,e){let i=this.gen.curve(r,e);return this.draw(i),i}path(r,e){let i=this.gen.path(r,e);return this.draw(i),i}}var Jl="http://www.w3.org/2000/svg";class Sy{constructor(r,e){this.svg=r,this.gen=new fn(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Jl,"g"),n=r.options.fixedDecimalPlaceDigits;for(let c of e){let h=null;switch(c.type){case"path":h=s.createElementNS(Jl,"path"),h.setAttribute("d",this.opsToPath(c,n)),h.setAttribute("stroke",i.stroke),h.setAttribute("stroke-width",i.strokeWidth+""),h.setAttribute("fill","none"),i.strokeLineDash&&h.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&h.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":h=s.createElementNS(Jl,"path"),h.setAttribute("d",this.opsToPath(c,n)),h.setAttribute("stroke","none"),h.setAttribute("stroke-width","0"),h.setAttribute("fill",i.fill||""),r.shape!=="curve"&&r.shape!=="polygon"||h.setAttribute("fill-rule","evenodd");break;case"fillSketch":h=this.fillSketch(s,c,i)}h&&o.appendChild(h)}return o}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);let o=r.createElementNS(Jl,"path");return o.setAttribute("d",this.opsToPath(e,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(r,e){return this.gen.opsToPath(r,e)}line(r,e,i,s,o){let n=this.gen.line(r,e,i,s,o);return this.draw(n)}rectangle(r,e,i,s,o){let n=this.gen.rectangle(r,e,i,s,o);return this.draw(n)}ellipse(r,e,i,s,o){let n=this.gen.ellipse(r,e,i,s,o);return this.draw(n)}circle(r,e,i,s){let o=this.gen.circle(r,e,i,s);return this.draw(o)}linearPath(r,e){let i=this.gen.linearPath(r,e);return this.draw(i)}polygon(r,e){let i=this.gen.polygon(r,e);return this.draw(i)}arc(r,e,i,s,o,n,c=!1,h){let g=this.gen.arc(r,e,i,s,o,n,c,h);return this.draw(g)}curve(r,e){let i=this.gen.curve(r,e);return this.draw(i)}path(r,e){let i=this.gen.path(r,e);return this.draw(i)}}var m={canvas:(r,e)=>new wy(r,e),svg:(r,e)=>new Sy(r,e),generator:(r)=>new fn(r),newSeed:()=>fn.newSeed()};var qw=1,Nw=3;async function td(r){let e=r.getElementsByTagName("img");if(!e||e.length===0)return;let i=!ed(r);await Promise.all([...e].map((s)=>new Promise((o)=>{function n(){if(s.style.display="flex",s.style.flexDirection="column",i){let c=l().fontSize?l().fontSize:window.getComputedStyle(document.body).fontSize,h=5,[g=M.fontSize]=Ge(c),y=g*5+"px";s.style.minWidth=y,s.style.maxWidth=y}else s.style.width="100%";o(s)}t(n,"setupImage"),setTimeout(()=>{if(s.complete)n()}),s.addEventListener("error",n),s.addEventListener("load",n)})))}t(td,"configureLabelImages");function ed(r){if(r.nodeType===Nw)return r.textContent?.trim()!=="";if(r.nodeType!==qw)return!1;if(r.tagName.toLowerCase()==="img")return!1;return[...r.childNodes].some(ed)}t(ed,"hasTextBesidesImages");var Ty=3,Ww=32,zw=t(async(r,e,i)=>{let s=l(),o=r.insert("g").attr("class",i??"node default").attr("id",e.domId||e.id),n=o.insert("g").attr("class","label").attr("style",rr(e.labelStyle)),h=[{text:typeof e.label==="string"?e.label:e.label?.[0]??"",cssClass:"c4-name"},{text:e.stereotype,cssClass:"c4-type"},...(e.description??[]).map((j)=>({text:j,cssClass:"c4-descr"}))].filter((j)=>j.text),g=e.width?Math.max(e.width-2*(e.padding??0),Ww):l().flowchart?.wrappingWidth??200,f=s.c4?.wrap??!0?g:Number.POSITIVE_INFINITY,B=await Promise.all(h.map(async(j)=>{let X=n.append("g").attr("class",j.cssClass),Q=await Le(X,O(Ut(j.text??""),s),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:f,style:e.labelStyle},s);return p(Q).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),p(Q).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:X,box:X.node().getBBox()}})),v=Math.max(...B.map(({box:j})=>j.width),0),q=0;for(let{el:j,box:X}of B)j.attr("transform",`translate(${v/2-X.x-X.width/2}, ${q-X.y})`),q+=X.height+Ty;let W=B.length>0?q-Ty:0;n.insert("rect",":first-child"),n.attr("transform",`translate(${-v/2}, ${-W/2})`);let H=n.node().getBBox(),Y=(e.padding??0)/2;return{shapeSvg:o,bbox:H,halfPadding:Y,label:n}},"c4LabelHelper"),_y=t((r,e)=>{let{x:i,y:s,width:o,height:n}=r;if(o>=e)return r;if(!("left"in r))return{x:i-(e-o)/2,y:s,width:e,height:n};return{x:i,y:s,width:e,height:n,top:s,left:i,bottom:s+n,right:i+e,toJSON:t(()=>({}),"toJSON")}},"withMinWidth"),P=t(async(r,e,i,{ignoreMinWidth:s=!1}={})=>{if(e.stereotype!==void 0)return zw(r,e,i);let o,n=e.useHtmlLabels||gt(l()?.htmlLabels);if(!i)o="node default";else o=i;let c=r.insert("g").attr("class",o).attr("id",e.domId||e.id),h=c.insert("g").attr("class","label").attr("style",rr(e.labelStyle)),g;if(e.label===void 0)g="";else g=typeof e.label==="string"?e.label:e.label[0];let y=!!e.icon||!!e.img,f=e.labelType==="markdown",B=g&&!e.width&&!s?e.minWidth??0:0,v=await Le(h,O(Ut(g),l()),{useHtmlLabels:n,width:e.width||e.wrappingWidth||l().flowchart?.wrappingWidth,minWidth:B,classes:f?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:y,markdown:f},l()),q=(e?.padding??0)/2,W;if(n){let H=v.children[0],Y=p(v);await td(H),W=await Io.measure(()=>H.getBoundingClientRect()),W=_y(W,B),Y.attr("width",W.width),Y.attr("height",W.height)}else W=await Io.measure(()=>v.getBBox()),W=_y(W,B);if(n)h.attr("transform","translate("+-W.width/2+", "+-W.height/2+")");else h.attr("transform","translate(0, "+-W.height/2+")");if(e.centerLabel)h.attr("transform","translate("+-W.width/2+", "+-W.height/2+")");return h.insert("rect",":first-child"),{shapeSvg:c,bbox:W,halfPadding:q,label:h}},"labelHelper"),hs=t(async(r,e,i)=>{let s=i.useHtmlLabels??Ce(l()),o=r.insert("g").attr("class","label").attr("style",i.labelStyle||""),n=await Le(o,O(Ut(e),l()),{useHtmlLabels:s,width:i.width||l()?.flowchart?.wrappingWidth,style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img}),c=i.padding/2,h;if(Ce(l())){let g=n.children[0],y=p(n);h=await Io.measure(()=>g.getBoundingClientRect()),y.attr("width",h.width),y.attr("height",h.height)}else h=await Io.measure(()=>n.getBBox());if(s)o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")");else o.attr("transform","translate(0, "+-h.height/2+")");if(i.centerLabel)o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")");return o.insert("rect",":first-child"),{shapeSvg:r,bbox:h,halfPadding:c,label:o}},"insertLabel"),I=t((r,e,i)=>{if(i){r.width=i.width,r.height=i.height;return}let s=e.node().getBBox();r.width=s.width,r.height=s.height},"updateNodeBounds"),re=t((r,e)=>(r.look==="handDrawn"?"rough-node":"node")+" "+r.cssClasses+" "+(e||""),"getNodeClasses");function $e(r){let e=r.map((i,s)=>`${s===0?"M":"L"}${i.x},${i.y}`);return e.push("Z"),e.join(" ")}t($e,"createPathFromPoints");function Zo(r,e,i,s,o,n){let c=[],h=50,g=i-r,y=s-e,f=g/n,B=2*Math.PI/f,v=e+y/2;for(let q=0;q<=50;q++){let W=q/50,H=r+W*g,Y=v+o*Math.sin(B*(H-r));c.push({x:H,y:Y})}return c}t(Zo,"generateFullSineWavePoints");function eo(r,e,i,s,o,n){let c=[],h=o*Math.PI/180,f=(n*Math.PI/180-h)/(s-1);for(let B=0;B<s;B++){let v=h+B*f,q=r+i*Math.cos(v),W=e+i*Math.sin(v);c.push({x:-q,y:-W})}return c}t(eo,"generateCirclePoints");function Kf(r){let e=Array.from(r.childNodes).filter((g)=>g.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),s=e.map((g)=>g.getAttribute("d")).filter((g)=>g!==null).join(" ");i.setAttribute("d",s);let o=e.find((g)=>g.getAttribute("fill")!=="none"),n=e.find((g)=>g.getAttribute("stroke")!=="none"),c=t((g,y)=>g?.getAttribute(y)??void 0,"getAttr");if(o){let g={fill:c(o,"fill"),"fill-opacity":c(o,"fill-opacity")??"1"};Object.entries(g).forEach(([y,f])=>{if(f)i.setAttribute(y,f)})}if(n){let g={stroke:c(n,"stroke"),"stroke-width":c(n,"stroke-width")??"1","stroke-opacity":c(n,"stroke-opacity")??"1"};Object.entries(g).forEach(([y,f])=>{if(f)i.setAttribute(y,f)})}let h=document.createElementNS("http://www.w3.org/2000/svg","g");return h.appendChild(i),h}t(Kf,"mergePaths");var Hw=t((r,e)=>{var{x:i,y:s}=r,o=e.x-i,n=e.y-s,c=r.width/2,h=r.height/2,g,y;if(Math.abs(n)*c>Math.abs(o)*h){if(n<0)h=-h;g=n===0?0:h*o/n,y=h}else{if(o<0)c=-c;g=c,y=o===0?0:c*n/o}return{x:i+g,y:s+y}},"intersectRect"),ro=Hw;function Gy(r,e){return r.intersect(e)}t(Gy,"intersectNode");var Yw=Gy;function Xy(r,e,i,s){var{x:o,y:n}=r,c=o-s.x,h=n-s.y,g=Math.sqrt(e*e*h*h+i*i*c*c),y=Math.abs(e*i*c/g);if(s.x<o)y=-y;var f=Math.abs(e*i*h/g);if(s.y<n)f=-f;return{x:o+y,y:n+f}}t(Xy,"intersectEllipse");var Vy=Xy;function Ky(r,e,i){return Vy(r,e,e,i)}t(Ky,"intersectCircle");var Uw=Ky;function Zy(r,e,i,s){{let o=e.y-r.y,n=r.x-e.x,c=e.x*r.y-r.x*e.y,h=o*i.x+n*i.y+c,g=o*s.x+n*s.y+c,y=0.000001;if(h!==0&&g!==0&&Zf(h,g))return;let f=s.y-i.y,B=i.x-s.x,v=s.x*i.y-i.x*s.y,q=f*r.x+B*r.y+v,W=f*e.x+B*e.y+v;if(Math.abs(q)<0.000001&&Math.abs(W)<0.000001&&Zf(q,W))return;let H=o*B-f*n;if(H===0)return;let Y=(n*v-B*c)/H,j=(f*c-o*v)/H;return{x:Y,y:j}}}t(Zy,"intersectLine");function Zf(r,e){return r*e>0}t(Zf,"sameSign");var jw=Zy;function Qy(r,e,i){let{x:s,y:o}=r,n=[],{POSITIVE_INFINITY:c,POSITIVE_INFINITY:h}=Number;if(typeof e.forEach==="function")e.forEach(function(f){c=Math.min(c,f.x),h=Math.min(h,f.y)});else c=Math.min(c,e.x),h=Math.min(h,e.y);let g=s-r.width/2-c,y=o-r.height/2-h;for(let f=0;f<e.length;f++){let B=e[f],v=e[f<e.length-1?f+1:0],q=jw(r,i,{x:g+B.x,y:y+B.y},{x:g+v.x,y:y+v.y});if(q)n.push(q)}if(!n.length)return r;if(n.length>1)n.sort(function(f,B){let v=f.x-i.x,q=f.y-i.y,W=Math.sqrt(v*v+q*q),H=B.x-i.x,Y=B.y-i.y,j=Math.sqrt(H*H+Y*Y);return W<j?-1:W===j?0:1});return n[0]}t(Qy,"intersectPolygon");var Gw=Qy,w={node:Yw,circle:Uw,ellipse:Vy,polygon:Gw,rect:ro},ci=t((r,e,i,s,o)=>["M",r+o,e,"H",r+i-o,"A",o,o,0,0,1,r+i,e+o,"V",e+s-o,"A",o,o,0,0,1,r+i-o,e+s,"H",r+o,"A",o,o,0,0,1,r,e+s-o,"V",e+o,"A",o,o,0,0,1,r+o,e,"Z"].join(" "),"createRoundedRectPathD"),Xw=t(async(r,e,i,s=!1,o=!1)=>{let n=e||"";if(typeof n==="object")n=n[0];let c=l(),h=Ce(c);return await Le(r,n,{style:i,isTitle:s,useHtmlLabels:h,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},c)},"createLabel"),_i=Xw;function Jy(r,e){let{labelStyles:i}=k(e);e.labelStyle=i;let s=re(e),o=s;if(!s)o="anchor";let n=r.insert("g").attr("class",o).attr("id",e.domId||e.id),c=1,{cssStyles:h}=e,g=m.svg(n),y=Gt(e,{fill:"black",stroke:"none",fillStyle:"solid"});if(e.look!=="handDrawn")y.roughness=0;let f=g.circle(0,0,c*2,y),B=n.insert(()=>f,":first-child");return B.attr("class","anchor").attr("style",rr(h)),I(e,B),e.intersect=function(v){return a.info("Circle intersect",e,c,v),w.circle(e,c,v)},n}t(Jy,"anchor");function Qf(r,e,i,s,o,n,c){let g=(r+i)/2,y=(e+s)/2,f=Math.atan2(s-e,i-r),B=(i-r)/2,v=(s-e)/2,q=B/o,W=v/n,H=Math.sqrt(q**2+W**2);if(H>1)throw Error("The given radii are too small to create an arc between the points.");let Y=Math.sqrt(1-H**2),j=g+Y*n*Math.sin(f)*(c?-1:1),X=y-Y*o*Math.cos(f)*(c?-1:1),Q=Math.atan2((e-X)/n,(r-j)/o),it=Math.atan2((s-X)/n,(i-j)/o)-Q;if(c&&it<0)it+=2*Math.PI;if(!c&&it>0)it-=2*Math.PI;let ht=[];for(let lt=0;lt<20;lt++){let ft=lt/19,xt=Q+ft*it,Lt=j+o*Math.cos(xt),kt=X+n*Math.sin(xt);ht.push({x:Lt,y:kt})}return ht}t(Qf,"generateArcPoints");function tx(r,e,i){let[s,o]=[e,i].sort((n,c)=>c-n);return o*(1-Math.sqrt(1-(r/s/2)**2))}t(tx,"calculateArcSagitta");async function ex(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o,h=t((xt)=>xt+c,"calcTotalHeight"),g=t((xt)=>{let Lt=xt/2;return[Lt/(2.5+xt/50),Lt]},"calcEllipseRadius"),{shapeSvg:y,bbox:f}=await P(r,e,re(e)),B=h(e?.height?e?.height:f.height),[v,q]=g(B),W=tx(B,v,q),Y=(e?.width?e?.width:f.width)+n*2+W-W,j=B,{cssStyles:X}=e,Q=[{x:Y/2,y:-j/2},{x:-Y/2,y:-j/2},...Qf(-Y/2,-j/2,-Y/2,j/2,v,q,!1),{x:Y/2,y:j/2},...Qf(Y/2,j/2,Y/2,-j/2,v,q,!0)],et=m.svg(y),it=Gt(e,{});if(e.look!=="handDrawn")it.roughness=0,it.fillStyle="solid";let ht=$e(Q),lt=et.path(ht,it),ft=y.insert(()=>lt,":first-child");if(ft.attr("class","basic label-container outer-path"),X&&e.look!=="handDrawn")ft.selectAll("path").attr("style",X);if(s&&e.look!=="handDrawn")ft.selectAll("path").attr("style",s);return ft.attr("transform",`translate(${v/2}, 0)`),I(e,ft),e.intersect=function(xt){return w.polygon(e,Q,xt)},y}t(ex,"bowTieRect");async function rx(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{shapeSvg:n,bbox:c,label:h}=await P(r,e,re(e)),g=i?.nodeBorder??i?.lineColor??"currentColor",y=e.padding??12,f=Math.max(c.width+y*2,e.width??0,80),B=Math.max(Math.min(f*0.08,12),5),v=Math.max(c.height+y*2+B,e.height??0),q=-v/2+B,W=v/2,H=f*0.72,Y=[`M${-f/2},${q}`,`L${-H/2},${W}`,`A${H/2},${B} 0 0 0 ${H/2},${W}`,`L${f/2},${q}`,`A${f/2},${B} 0 0 0 ${-f/2},${q}`,"Z"].join(" "),{cssStyles:j}=e,X=n.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let ft=m.svg(n).path(Y,Gt(e,{}));if(X.node()?.appendChild(ft),j)X.attr("style",j)}else X.append("path").attr("d",Y).attr("style",o);X.append("ellipse").attr("cx",0).attr("cy",q).attr("rx",f/2).attr("ry",B).attr("style",`fill:none;stroke:${g};stroke-width:1px`),I(e,X);let Q=q+(W-q)/2;h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${Q-c.height/2-(c.y-(c.top??0))})`);let et=12,it=t((lt,ft,xt)=>Array.from({length:et+1},(Lt,kt)=>{let Ct=Math.PI-kt*Math.PI/et;return{x:lt*Math.cos(Ct),y:ft+xt*B*Math.sin(Ct)}}),"arc"),ht=[...it(f/2,q,-1),...it(H/2,W,1).reverse()];return e.intersect=function(lt){return w.polygon(e,ht,lt)},n}t(rx,"bucket");var Hf=20,Yf=8,Vw=80,Kw=8;function ix(r){let{themeVariables:e}=l(),{clusterBkg:i,clusterBorder:s}=e;switch(r){case"flow":return{rx:10,fill:"none",stroke:e.flowContainerStroke||e.secondaryBorderColor,strokeWidth:0.75,cssClass:"flow-collapsed"};default:return{rx:Kw,fill:i,stroke:s,cssClass:"collapsed-group"}}}t(ix,"getCollapsedStyle");async function ox(r,e){let i=ix(e.metadata?.containerType),{fill:s,stroke:o}=i,{nodeStyles:n}=k(e),{shapeSvg:c,bbox:h}=await P(r,e,re(e)),{theme:g,themeVariables:y}=l();Xe(c,e.colorIndex,g,y.borderColorArray);let f=e.padding??8,B=h.height,v=Math.max(h.width+f*2,Vw,e?.width??0),q=Math.max(B+Yf+Hf+f*2,e?.height??0),W=-v/2,H=-q/2,Y=-(Yf+Hf)/2,j=c.select(".label");if(j)if(e.useHtmlLabels??Ce(l()))j.attr("transform",`translate(${-h.width/2}, ${-h.height/2+Y})`);else j.attr("transform",`translate(0, ${-h.height/2+Y})`);let X;if(e.look==="handDrawn"){let lt=m.svg(c),ft=Gt(e,{fill:s,stroke:o,...i.strokeWidth===void 0?{}:{strokeWidth:i.strokeWidth},...s==="none"?{fillWeight:0}:{fillStyle:"solid"}}),xt=lt.path(ci(W,H,v,q,i.rx),ft);X=c.insert(()=>xt,":first-child"),X.attr("class","basic label-container "+i.cssClass).attr("style",rr(e.cssStyles))}else if(X=c.insert("rect",":first-child"),X.attr("class","basic label-container "+i.cssClass).attr("style",n).attr("rx",i.rx).attr("ry",i.rx).attr("x",W).attr("y",H).attr("width",v).attr("height",q).attr("fill",s).attr("stroke",o),i.strokeWidth!==void 0)X.attr("stroke-width",i.strokeWidth+"px");let Q=H+f+B+Yf;c.append("line").attr("class","collapsed-separator").attr("x1",W+8).attr("y1",Q).attr("x2",W+v-8).attr("y2",Q).attr("stroke",o).attr("stroke-dasharray","3, 3");let et=Q+Hf/2,it=2.5,ht=10;for(let lt=-1;lt<=1;lt++)c.append("circle").attr("class","collapsed-indicator").attr("cx",lt*ht).attr("cy",et).attr("r",it).attr("fill",o);return I(e,X),e.calcIntersect=function(lt,ft){return w.rect(lt,ft)},e.intersect=function(lt){return w.rect(e,lt)},c}t(ox,"collapsedGroup");function io(r,e,i,s){return r.insert("polygon",":first-child").attr("points",s.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+i/2+")")}t(io,"insertPolygonShape");var Zw=["right","left","up","down"],rd="point",Qw=t((r)=>{let e=new Set;for(let i of r)switch(i){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(i);break}return e},"expandAndDeduplicateDirections"),Jw=t((r)=>Zw.filter((e)=>r.has(e)).join("|")||rd,"getDirectionKey"),By={"right|left|up|down":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:0,y:0},{x:e,y:0},{x:s/2,y:2*i},{x:s-e,y:0},{x:s,y:0},{x:s,y:-r/3},{x:s+2*i,y:-r/2},{x:s,y:-2*r/3},{x:s,y:-r},{x:s-e,y:-r},{x:s/2,y:-r-2*i},{x:e,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*i,y:-r/2},{x:0,y:-r/3}],"right|left|up|down"),"right|left|up":t(({height:r,midpoint:e,width:i})=>[{x:e,y:0},{x:i-e,y:0},{x:i,y:-r/2},{x:i-e,y:-r},{x:e,y:-r},{x:0,y:-r/2}],"right|left|up"),"right|left|down":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i,y:0}],"right|left|down"),"right|up|down":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:i,y:-e},{x:i,y:-r+e},{x:0,y:-r}],"right|up|down"),"left|up|down":t(({height:r,midpoint:e,width:i})=>[{x:i,y:0},{x:0,y:-e},{x:0,y:-r+e},{x:i,y:-r}],"left|up|down"),"right|left":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:0},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:0},{x:s,y:-r/2},{x:s-e,y:-r},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r},{x:0,y:-r/2}],"right|left"),"up|down":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:s/2,y:0},{x:0,y:-i},{x:e,y:-i},{x:e,y:-r+i},{x:0,y:-r+i},{x:s/2,y:-r},{x:s,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i},{x:s,y:-i}],"up|down"),"right|up":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:i,y:-e},{x:0,y:-r}],"right|up"),"right|down":t(({height:r,width:e})=>[{x:0,y:0},{x:e,y:0},{x:0,y:-r}],"right|down"),"left|up":t(({height:r,midpoint:e,width:i})=>[{x:i,y:0},{x:0,y:-e},{x:i,y:-r}],"left|up"),"left|down":t(({height:r,width:e})=>[{x:e,y:0},{x:0,y:0},{x:e,y:-r}],"left|down"),right:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:-i},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:0},{x:s,y:-r/2},{x:s-e,y:-r},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r+i}],"right"),left:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:0},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r},{x:0,y:-r/2}],"left"),up:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:-i},{x:e,y:-r+i},{x:0,y:-r+i},{x:s/2,y:-r},{x:s,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i}],"up"),down:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:s/2,y:0},{x:0,y:-i},{x:e,y:-i},{x:e,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i},{x:s,y:-i}],"down"),[rd]:()=>[{x:0,y:0}]},tS=t((r,e,i,s)=>{let o=Qw(r),n=(i.padding??0)/2,c=e.height+4*n,h=c/2,g=s??e.width+2*h+2*n,y=Jw(o);return(By[y]??By[rd])({height:c,midpoint:h,padding:n,width:g})},"getArrowPoints");async function sx(r,e){let i=e,{shapeSvg:s,bbox:o}=await P(r,i,re(i)),n=i.padding??0,c=o.height+2*n,h=c/2,g=o.width+2*h+n,y=i.width??0,B=i.positioned&&(i.widthInColumns??1)>1&&y>g?y:g,v=tS(i.directions??[],o,i,B),q=io(s,B,c,v);return q.attr("style",i.style??null),I(i,q),i.intersect=function(W){return w.polygon(i,v,W)},s}t(sx,"block_arrow");async function ax(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{shapeSvg:n,bbox:c,label:h}=await P(r,e,re(e)),g=i?.nodeBorder??i?.lineColor??"currentColor",y=e.padding??12,f=18,B=12,v=Math.max(c.width+y*2,e.width??0,90),q=Math.max(c.height+y*2+f,e.height??0),W=-q/2,{cssStyles:H}=e,Y=n.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let Q=m.svg(n).path(ci(-v/2,W,v,q,B),Gt(e,{}));if(Y.node()?.appendChild(Q),H)Y.attr("style",H)}else Y.append("rect").attr("x",-v/2).attr("y",W).attr("width",v).attr("height",q).attr("rx",B).attr("ry",B).attr("style",o);Y.append("line").attr("x1",-v/2).attr("y1",W+f).attr("x2",v/2).attr("y2",W+f).attr("style",`stroke:${g};stroke-width:1px`);for(let X=0;X<3;X++)Y.append("circle").attr("cx",-v/2+12+X*9).attr("cy",W+f/2).attr("r",2.5).attr("style",`fill:${g};stroke:none`);Y.append("rect").attr("class","browser-address-bar").attr("x",-v/2+44).attr("y",W+4).attr("width",Math.max(v-56,10)).attr("height",f-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${g};stroke-width:1px;opacity:0.6`),I(e,Y);let j=W+f+(q-f)/2;return h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${j-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(X){return w.rect(e,X)},n}t(ax,"browser");var nh=12;async function nx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?28:o,c=e.look==="neo"?24:o,{shapeSvg:h,bbox:g}=await P(r,e,re(e)),y=(e?.width??g.width)+(e.look==="neo"?n*2:n+nh),f=(e?.height??g.height)+(e.look==="neo"?c*2:c),B=0,v=y,q=-f,W=0,H=[{x:B+nh,y:q},{x:v,y:q},{x:v,y:W},{x:B,y:W},{x:B,y:q+nh},{x:B+nh,y:q}],Y,{cssStyles:j}=e;if(e.look==="handDrawn"){let X=m.svg(h),Q=Gt(e,{}),et=$e(H),it=X.path(et,Q);if(Y=h.insert(()=>it,":first-child").attr("transform",`translate(${-y/2}, ${f/2})`),j)Y.attr("style",j)}else Y=io(h,y,f,H);if(s)Y.attr("style",s);return I(e,Y),e.intersect=function(X){return w.polygon(e,H,X)},h}t(nx,"card");function lx(r,e){let{nodeStyles:i}=k(e);e.label="";let s=r.insert("g").attr("class",re(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,n=Math.max(28,e.width??0),c=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],h=m.svg(s),g=Gt(e,{});if(e.look!=="handDrawn")g.roughness=0,g.fillStyle="solid";let y=$e(c),f=h.path(y,g),B=s.insert(()=>f,":first-child");if(o&&e.look!=="handDrawn")B.selectAll("path").attr("style",o);if(i&&e.look!=="handDrawn")B.selectAll("path").attr("style",i);return e.width=28,e.height=28,e.intersect=function(v){return w.polygon(e,c,v)},s}t(lx,"choice");async function id(r,e,i){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{shapeSvg:n,bbox:c,halfPadding:h}=await P(r,e,re(e),{ignoreMinWidth:!0}),g=16,y=i?.padding??h,f=Math.sqrt(c.width**2+c.height**2)/2,B=e.look==="neo"?f+g:f+y,v,{cssStyles:q}=e;if(e.look==="handDrawn"){let W=m.svg(n),H=Gt(e,{}),Y=W.circle(0,0,B*2,H);v=n.insert(()=>Y,":first-child"),v.attr("class","basic label-container").attr("style",rr(q))}else v=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",B).attr("cx",0).attr("cy",0);return I(e,v),e.calcIntersect=function(W,H){let Y=W.width/2;return w.circle(W,Y,H)},e.intersect=function(W){return a.info("Circle intersect",e,B,W),w.circle(e,B,W)},n}t(id,"circle");async function hx(r,e){let i=e,s=["node",i.cssClasses,i.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:n,halfPadding:c}=await P(r,i,s),h=o.insert("rect",":first-child"),g=i.padding??0,y=i.positioned?i.width??0:n.width+g,f=i.positioned?i.height??0:n.height+g,B=i.positioned?-y/2:-n.width/2-c,v=i.positioned?-f/2:-n.height/2-c;return h.attr("class","basic cluster composite label-container").attr("style",i.style??null).attr("rx",i.rx??null).attr("ry",i.ry??null).attr("x",B).attr("y",v).attr("width",y).attr("height",f),I(i,h),i.intersect=function(q){return w.rect(i,q)},o}t(hx,"composite");async function cx(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{shapeSvg:n,bbox:c,label:h}=await P(r,e,re(e)),g=i?.nodeBorder??i?.lineColor??"currentColor",y=e.padding??12,f=20,B=12,v=Math.max(c.width+y*2,e.width??0,90),q=Math.max(c.height+y*2+f,e.height??0),W=-q/2,{cssStyles:H}=e,Y=n.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let Q=m.svg(n).path(ci(-v/2,W,v,q,B),Gt(e,{}));if(Y.node()?.appendChild(Q),H)Y.attr("style",H)}else Y.append("rect").attr("x",-v/2).attr("y",W).attr("width",v).attr("height",q).attr("rx",B).attr("ry",B).attr("style",o);Y.append("text").attr("x",-v/2+12).attr("y",W+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${g}`).text(">_"),I(e,Y);let j=W+f+(q-f)/2;return h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${j-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(X){return w.rect(e,X)},n}t(cx,"consoleWindow");function ux(r){let e=Math.cos(Math.PI/4),i=Math.sin(Math.PI/4),s=r*2,o={x:s/2*e,y:s/2*i},n={x:-(s/2)*e,y:s/2*i},c={x:-(s/2)*e,y:-(s/2)*i},h={x:s/2*e,y:-(s/2)*i};return`M ${n.x},${n.y} L ${h.x},${h.y}
233
+ M ${o.x},${o.y} L ${c.x},${c.y}`}t(ux,"createLine");function fx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i,e.label="";let o=r.insert("g").attr("class",re(e)).attr("id",e.domId??e.id),n=Math.max(30,e?.width??0),{cssStyles:c}=e,h=m.svg(o),g=Gt(e,{});if(e.look!=="handDrawn")g.roughness=0,g.fillStyle="solid";let y=h.circle(0,0,n*2,g),f=ux(n),B=h.path(f,g),v=o.insert(()=>y,":first-child");if(v.insert(()=>B),v.attr("class","outer-path"),c&&e.look!=="handDrawn")v.selectAll("path").attr("style",c);if(s&&e.look!=="handDrawn")v.selectAll("path").attr("style",s);return I(e,v),e.intersect=function(q){return a.info("crossedCircle intersect",e,{radius:n,point:q}),w.circle(e,n,q)},o}t(fx,"crossedCircle");function $o(r,e,i,s=100,o=0,n=180){let c=[],h=o*Math.PI/180,f=(n*Math.PI/180-h)/(s-1);for(let B=0;B<s;B++){let v=h+B*f,q=r+i*Math.cos(v),W=e+i*Math.sin(v);c.push({x:-q,y:-W})}return c}t($o,"generateCirclePoints");async function dx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,re(e)),h=e.look==="neo"?18:e.padding??0,g=e.look==="neo"?12:e.padding??0,y=n.width+h,f=n.height+g,B=Math.max(5,f*0.1),{cssStyles:v}=e,q=[...$o(y/2,-f/2,B,30,-90,0),{x:-y/2-B,y:B},...$o(y/2+B*2,-B,B,20,-180,-270),...$o(y/2+B*2,B,B,20,-90,-180),{x:-y/2-B,y:-f/2},...$o(y/2,f/2,B,20,0,90)],W=[{x:y/2,y:-f/2-B},{x:-y/2,y:-f/2-B},...$o(y/2,-f/2,B,20,-90,0),{x:-y/2-B,y:-B},...$o(y/2+y*0.1,-B,B,20,-180,-270),...$o(y/2+y*0.1,B,B,20,-90,-180),{x:-y/2-B,y:f/2},...$o(y/2,f/2,B,20,0,90),{x:-y/2,y:f/2+B},{x:y/2,y:f/2+B}],H=m.svg(o),Y=Gt(e,{fill:"none"});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let X=$e(q).replace("Z",""),Q=H.path(X,Y),et=$e(W),it=H.path(et,{...Y}),ht=o.insert("g",":first-child");if(ht.insert(()=>it,":first-child").attr("stroke-opacity",0),ht.insert(()=>Q,":first-child"),ht.attr("class","text"),v&&e.look!=="handDrawn")ht.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")ht.selectAll("path").attr("style",s);return ht.attr("transform",`translate(${B}, 0)`),c.attr("transform",`translate(${-y/2+B-(n.x-(n.left??0))},${-f/2+(e.padding??0)/2-(n.y-(n.top??0))})`),I(e,ht),e.intersect=function(lt){return w.polygon(e,W,lt)},o}t(dx,"curlyBraceLeft");function Do(r,e,i,s=100,o=0,n=180){let c=[],h=o*Math.PI/180,f=(n*Math.PI/180-h)/(s-1);for(let B=0;B<s;B++){let v=h+B*f,q=r+i*Math.cos(v),W=e+i*Math.sin(v);c.push({x:q,y:W})}return c}t(Do,"generateCirclePoints");async function px(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,re(e)),h=e.look==="neo"?18:e.padding??0,g=e.look==="neo"?12:e.padding??0,y=n.width+(e.look==="neo"?h*2:h),f=n.height+(e.look==="neo"?g*2:g),B=Math.max(5,f*0.1),{cssStyles:v}=e,q=[...Do(y/2,-f/2,B,20,-90,0),{x:y/2+B,y:-B},...Do(y/2+B*2,-B,B,20,-180,-270),...Do(y/2+B*2,B,B,20,-90,-180),{x:y/2+B,y:f/2},...Do(y/2,f/2,B,20,0,90)],W=[{x:-y/2,y:-f/2-B},{x:y/2,y:-f/2-B},...Do(y/2,-f/2,B,20,-90,0),{x:y/2+B,y:-B},...Do(y/2+B*2,-B,B,20,-180,-270),...Do(y/2+B*2,B,B,20,-90,-180),{x:y/2+B,y:f/2},...Do(y/2,f/2,B,20,0,90),{x:y/2,y:f/2+B},{x:-y/2,y:f/2+B}],H=m.svg(o),Y=Gt(e,{fill:"none"});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let X=$e(q).replace("Z",""),Q=H.path(X,Y),et=$e(W),it=H.path(et,{...Y}),ht=o.insert("g",":first-child");if(ht.insert(()=>it,":first-child").attr("stroke-opacity",0),ht.insert(()=>Q,":first-child"),ht.attr("class","text"),v&&e.look!=="handDrawn")ht.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")ht.selectAll("path").attr("style",s);return ht.attr("transform",`translate(${-B}, 0)`),c.attr("transform",`translate(${-y/2+(e.padding??0)/2-(n.x-(n.left??0))},${-f/2+(e.padding??0)/2-(n.y-(n.top??0))})`),I(e,ht),e.intersect=function(lt){return w.polygon(e,W,lt)},o}t(px,"curlyBraceRight");function Br(r,e,i,s=100,o=0,n=180){let c=[],h=o*Math.PI/180,f=(n*Math.PI/180-h)/(s-1);for(let B=0;B<s;B++){let v=h+B*f,q=r+i*Math.cos(v),W=e+i*Math.sin(v);c.push({x:-q,y:-W})}return c}t(Br,"generateCirclePoints");async function gx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,re(e)),h=e.look==="neo"?18:e.padding??0,g=e.look==="neo"?12:e.padding??0,y=n.width+(e.look==="neo"?h*2:h),f=n.height+(e.look==="neo"?g*2:g),B=Math.max(5,f*0.1),{cssStyles:v}=e,q=[...Br(y/2,-f/2,B,30,-90,0),{x:-y/2-B,y:B},...Br(y/2+B*2,-B,B,20,-180,-270),...Br(y/2+B*2,B,B,20,-90,-180),{x:-y/2-B,y:-f/2},...Br(y/2,f/2,B,20,0,90)],W=[...Br(-y/2+B+B/2,-f/2,B,20,-90,-180),{x:y/2-B/2,y:B},...Br(-y/2-B/2,-B,B,20,0,90),...Br(-y/2-B/2,B,B,20,-90,0),{x:y/2-B/2,y:-B},...Br(-y/2+B+B/2,f/2,B,30,-180,-270)],H=[{x:y/2,y:-f/2-B},{x:-y/2,y:-f/2-B},...Br(y/2,-f/2,B,20,-90,0),{x:-y/2-B,y:-B},...Br(y/2+B*2,-B,B,20,-180,-270),...Br(y/2+B*2,B,B,20,-90,-180),{x:-y/2-B,y:f/2},...Br(y/2,f/2,B,20,0,90),{x:-y/2,y:f/2+B},{x:y/2-B-B/2,y:f/2+B},...Br(-y/2+B+B/2,-f/2,B,20,-90,-180),{x:y/2-B/2,y:B},...Br(-y/2-B/2,-B,B,20,0,90),...Br(-y/2-B/2,B,B,20,-90,0),{x:y/2-B/2,y:-B},...Br(-y/2+B+B/2,f/2,B,30,-180,-270)],Y=m.svg(o),j=Gt(e,{fill:"none"});if(e.look!=="handDrawn")j.roughness=0,j.fillStyle="solid";let Q=$e(q).replace("Z",""),et=Y.path(Q,j),ht=$e(W).replace("Z",""),lt=Y.path(ht,j),ft=$e(H),xt=Y.path(ft,{...j}),Lt=o.insert("g",":first-child");if(Lt.insert(()=>xt,":first-child").attr("stroke-opacity",0),Lt.insert(()=>et,":first-child"),Lt.insert(()=>lt,":first-child"),Lt.attr("class","text"),v&&e.look!=="handDrawn")Lt.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")Lt.selectAll("path").attr("style",s);return Lt.attr("transform",`translate(${B-B/4}, 0)`),c.attr("transform",`translate(${-y/2+(e.padding??0)/2-(n.x-(n.left??0))},${-f/2+(e.padding??0)/2-(n.y-(n.top??0))})`),I(e,Lt),e.intersect=function(kt){return w.polygon(e,H,kt)},o}t(gx,"curlyBraces");async function mx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o,h=20,g=5,{shapeSvg:y,bbox:f}=await P(r,e,re(e)),B=Math.max(g,f.height+c*2,e?.height??0),v=B/2,q=v-Math.sqrt(Math.max(0,v**2-(f.height/2)**2)),W=Math.max(B/4,q),H=Math.max(h,f.width+n*2+W*2,(f.width+n*2)*1.25,e?.width??0),{cssStyles:Y}=e,j=m.svg(y),X=Gt(e,{});if(e.look!=="handDrawn")X.roughness=0,X.fillStyle="solid";let Q=H,et=B,it=Q-v,ht=et/4,lt=[{x:it,y:0},{x:ht,y:0},{x:0,y:et/2},{x:ht,y:et},{x:it,y:et},...eo(-it,-et/2,v,50,270,90)],ft=$e(lt),xt=j.path(ft,X),Lt=y.insert(()=>xt,":first-child");if(Lt.attr("class","basic label-container outer-path"),Y&&e.look!=="handDrawn")Lt.selectChildren("path").attr("style",Y);if(s&&e.look!=="handDrawn")Lt.selectChildren("path").attr("style",s);return Lt.attr("transform",`translate(${-H/2}, ${-B/2})`),I(e,Lt),e.intersect=function(kt){return w.polygon(e,lt,kt)},y}t(mx,"curvedTrapezoid");async function yx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,re(e)),h=e.padding??20,g=Math.max(n.width+h*2,e.width??0,100),y=Math.min(Math.max(g*0.23,16),56),f=y*0.27,B=Math.max(n.height+h*2,e.height?e.height-(2*y-f):0),v=Math.min(g*0.177,B*0.45),q=B+2*y-f,W=-q/2,H=W+2*y-f,Y=o.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:j}=e;if(e.look==="handDrawn"){let ft=m.svg(o),xt=Gt(e,{}),Lt=ft.path(ci(-g/2,H,g,B,v),xt),kt=ft.circle(0,W+y,y*2,xt);if(Y.insert(()=>kt,":first-child"),Y.insert(()=>Lt,":first-child"),j)Y.attr("style",j)}else Y.append("rect").attr("x",-g/2).attr("y",H).attr("width",g).attr("height",B).attr("rx",v).attr("ry",v).attr("style",s),Y.append("circle").attr("cx",0).attr("cy",W+y).attr("r",y).attr("style",s);I(e,Y);let X=H+B/2;c.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${X-n.height/2-(n.y-(n.top??0))})`);let Q=W+y,et=Math.asin(Math.min(1,(H-Q)/y))*180/Math.PI,it=24,lt=[...eo(0,-Q,y,it,180+et,-et),...eo(-(-g/2+v),-(H+v),v,12,90,0),...eo(-(-g/2+v),-(q/2-v),v,12,360,270),...eo(-(g/2-v),-(q/2-v),v,12,270,180),...eo(-(g/2-v),-(H+v),v,12,180,90)];return e.intersect=function(ft){return w.polygon(e,lt,ft)},o}t(yx,"person");var eS=t((r,e,i,s,o,n)=>[`M${r},${e+n}`,`a${o},${n} 0,0,0 ${i},0`,`a${o},${n} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${n} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createCylinderPathD"),rS=t((r,e,i,s,o,n)=>[`M${r},${e+n}`,`M${r+i},${e+n}`,`a${o},${n} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${n} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createOuterCylinderPathD"),iS=t((r,e,i,s,o,n)=>[`M${r-i/2},${-s/2}`,`a${o},${n} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),vy=8,Ly=8;async function xx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?24:o,c=e.look==="neo"?24:o,h=e.width??0;if(e.width){if(e.width=e.width-c,e.width<Ly)e.width=Ly}if(e.height){let X=h/2/(2.5+h/50);if(e.height=e.height-n-X*3,e.height<vy)e.height=vy}let{shapeSvg:g,bbox:y,label:f}=await P(r,e,re(e)),B=Math.max(e.width??0,y.width)+c,v=B/2,q=v/(2.5+B/50),W=Math.max(e.height??0,y.height)+n+q,H,{cssStyles:Y}=e;if(e.look==="handDrawn"){let j=m.svg(g),X=rS(0,0,B,W,v,q),Q=iS(0,q,B,W,v,q),et=Gt(e,{}),it=j.path(X,et),ht=j.path(Q,Gt(e,{fill:"none"}));if(H=g.insert(()=>ht,":first-child"),H=g.insert(()=>it,":first-child"),H.attr("class","basic label-container"),Y)H.attr("style",Y)}else{let j=eS(0,0,B,W,v,q);H=g.insert("path",":first-child").attr("d",j).attr("class","basic label-container outer-path").attr("style",rr(Y)).attr("style",s)}return H.attr("label-offset-y",q),H.attr("transform",`translate(${-B/2}, ${-(W/2+q)})`),I(e,H),f.attr("transform",`translate(${-(y.width/2)-(y.x-(y.left??0))}, ${-(y.height/2)+(e.padding??0)/1.5-(y.y-(y.top??0))})`),e.intersect=function(j){let X=w.rect(e,j),Q=X.x-(e.x??0);if(v!=0&&(Math.abs(Q)<(e.width??0)/2||Math.abs(Q)==(e.width??0)/2&&Math.abs(X.y-(e.y??0))>(e.height??0)/2-q)){let et=q*q*(1-Q*Q/(v*v));if(et>0)et=Math.sqrt(et);if(et=q-et,j.y-(e.y??0)>0)et=-et;X.y+=et}return X},g}t(xx,"cylinder");async function Ws(r,e,i){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{shapeSvg:n,bbox:c}=await P(r,e,re(e)),h=Math.max(c.width+i.labelPaddingX*2,e?.width||0),g=Math.max(c.height+i.labelPaddingY*2,e?.height||0),y=-h/2,f=-g/2,B,{rx:v,ry:q}=e,{cssStyles:W}=e;if(i?.rx&&i.ry)v=i.rx,q=i.ry;if(e.look==="handDrawn"){let H=m.svg(n),Y=Gt(e,{}),j=v||q?H.path(ci(y,f,h,g,v||0),Y):H.rectangle(y,f,h,g,Y);B=n.insert(()=>j,":first-child"),B.attr("class","basic label-container").attr("style",rr(W))}else B=n.insert("rect",":first-child"),B.attr("class","basic label-container").attr("style",o).attr("rx",rr(v)).attr("ry",rr(q)).attr("x",y).attr("y",f).attr("width",h).attr("height",g);return I(e,B,e.look==="handDrawn"?void 0:{width:h,height:g}),e.calcIntersect=function(H,Y){return w.rect(H,Y)},e.intersect=function(H){return w.rect(e,H)},n}t(Ws,"drawRect");async function Cx(r,e){let{cssClasses:i,labelPaddingX:s,labelPaddingY:o,padding:n,width:c,height:h}=e,g={rx:0,ry:0,classes:i??"",labelPaddingX:s??(n??0)*2,labelPaddingY:o??n??0},y=await Ws(r,e,g);if(e.look==="handDrawn"){let q=m.svg(y),W=Gt(e,{}),H=y.select(".basic.label-container > path:nth-child(2)"),Y=H.node();if(!Y)return y;let j=null;if(Y instanceof SVGGraphicsElement)j=Y.getBBox();else return y;return y.insert(()=>q.line(j.x,j.y,j.x+j.width,j.y,W),".basic.label-container g.label"),y.insert(()=>q.line(j.x,j.y+j.height,j.x+j.width,j.y+j.height,W),".basic.label-container g.label"),H.remove(),y}let f=y.select(".basic.label-container"),B=(Number(f.attr("width"))||c)??0,v=(Number(f.attr("height"))||h)??0;if(B>0&&v>0)f.attr("stroke-dasharray",`${B} ${v}`);return y}t(Cx,"datastore");async function bx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,n=e.look==="neo"?16:e.padding??0,{shapeSvg:c,bbox:h,label:g}=await P(r,e,re(e)),y=h.width+o,f=h.height+n,B=f*0.2,v=-y/2,q=-f/2-B/2,{cssStyles:W}=e,H=m.svg(c),Y=Gt(e,{});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let j=[{x:v,y:q+B},{x:-v,y:q+B},{x:-v,y:-q},{x:v,y:-q},{x:v,y:q},{x:-v,y:q},{x:-v,y:q+B}],X=H.polygon(j.map((et)=>[et.x,et.y]),Y),Q=c.insert(()=>X,":first-child");if(Q.attr("class","basic label-container outer-path"),W&&e.look!=="handDrawn")Q.selectAll("path").attr("style",W);if(s&&e.look!=="handDrawn")Q.selectAll("path").attr("style",s);return g.attr("transform",`translate(${v+(e.padding??0)/2-(h.x-(h.left??0))}, ${q+B+(e.padding??0)/2-(h.y-(h.top??0))})`),I(e,Q),e.intersect=function(et){return w.rect(e,et)},c}t(bx,"dividedRectangle");async function kx(r,e){let{labelStyles:i,nodeStyles:s}=k(e),o=e.look==="neo"?12:5;e.labelStyle=i;let n=e.padding??0,c=e.look==="neo"?16:n,{shapeSvg:h,bbox:g}=await P(r,e,re(e),{ignoreMinWidth:!0}),y=Math.sqrt(g.width**2+g.height**2)/2,f=(e?.width?e?.width/2:y)+(c??0),B=f+o,v,{cssStyles:q}=e;if(e.look==="handDrawn"){let W=m.svg(h),H=Gt(e,{roughness:0.2,strokeWidth:2.5}),Y=Gt(e,{roughness:0.2,strokeWidth:1.5}),j=W.circle(0,0,B*2,H),X=W.circle(0,0,f*2,Y);v=h.insert("g",":first-child"),v.attr("class",rr(e.cssClasses)).attr("style",rr(q)),v.node()?.appendChild(j),v.node()?.appendChild(X)}else{v=h.insert("g",":first-child");let W=v.insert("circle",":first-child"),H=v.insert("circle");v.attr("class","basic label-container").attr("style",s),W.attr("class","outer-circle").attr("style",s).attr("r",B).attr("cx",0).attr("cy",0),H.attr("class","inner-circle").attr("style",s).attr("r",f).attr("cx",0).attr("cy",0)}return I(e,v),e.intersect=function(W){return a.info("DoubleCircle intersect",e,B,W),w.circle(e,B,W)},h}t(kx,"doublecircle");async function wx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,halfPadding:c}=await P(r,e,re(e)),{theme:h,themeVariables:g}=l();Xe(o,e.colorIndex,h,g.borderColorArray);let y=c??10,f=n.width/2+y*2,B=n.height/2+y*2,v,{cssStyles:q}=e;if(e.look==="handDrawn"){let W=m.svg(o),H=Gt(e,{}),Y=W.ellipse(0,0,f*2,B*2,H);if(v=o.insert(()=>Y,":first-child"),v.attr("class","basic label-container"),q)v.attr("style",q)}else v=o.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",s).attr("rx",f).attr("ry",B).attr("cx",0).attr("cy",0);return e.width=f*2,e.height=B*2,I(e,v),e.calcIntersect=function(W,H){let Y=W.width/2,j=W.height/2;return w.ellipse(W,Y,j,H)},e.intersect=function(W){return w.ellipse(e,f,B,W)},o}t(wx,"usecaseEllipse");function Sx(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);e.label="",e.labelStyle=s;let n=r.insert("g").attr("class",re(e)).attr("id",e.domId??e.id),c=7,{cssStyles:h}=e,g=m.svg(n),{nodeBorder:y}=i,f=Gt(e,{fillStyle:"solid"});if(e.look!=="handDrawn")f.roughness=0;let B=g.circle(0,0,c*2,f),v=n.insert(()=>B,":first-child");if(v.selectAll("path").attr("style",`fill: ${y} !important;`),h&&h.length>0&&e.look!=="handDrawn")v.selectAll("path").attr("style",h);if(o&&e.look!=="handDrawn")v.selectAll("path").attr("style",o);return I(e,v),e.intersect=function(q){return a.info("filledCircle intersect",e,{radius:c,point:q}),w.circle(e,c,q)},n}t(Sx,"filledCircle");var Fy=10,Ay=10;async function Tx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.height=e?.height??0,e.height<Fy)e.height=Fy;if(e.width=(e?.width??0)-n-n/2,e.width<Ay)e.width=Ay}let{shapeSvg:c,bbox:h,label:g}=await P(r,e,re(e)),y=(e?.width?e?.width:h.width)+(n??0),f=e?.height?e?.height:y+h.height,B=f,v=[{x:0,y:-f},{x:B,y:-f},{x:B/2,y:0}],{cssStyles:q}=e,W=m.svg(c),H=Gt(e,{});if(e.look!=="handDrawn")H.roughness=0,H.fillStyle="solid";let Y=$e(v),j=W.path(Y,H),X=c.insert(()=>j,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`).attr("class","outer-path");if(q&&e.look!=="handDrawn")X.selectChildren("path").attr("style",q);if(s&&e.look!=="handDrawn")X.selectChildren("path").attr("style",s);return e.width=y,e.height=f,I(e,X),g.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-f/2+(e.padding??0)/2+(h.y-(h.top??0))})`),e.intersect=function(Q){return a.info("Triangle intersect",e,v,Q),w.polygon(e,v,Q)},c}t(Tx,"flippedTriangle");async function _x(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,re(e)),h=e.padding??12,g=Math.max(n.width+h*2,e.width??0,90),y=n.height+h*2,f=Math.max(Math.min(y*0.16,14),8),B=Math.max(y+f,e.height??0),v=B-f,q=Math.max(g*0.38,28),W=-B/2,H=[{x:-g/2,y:W},{x:-g/2+q,y:W},{x:-g/2+q,y:W+f},{x:g/2,y:W+f},{x:g/2,y:B/2},{x:-g/2,y:B/2}],Y=[`M${H[0].x},${H[0].y}`,...H.slice(1).map((et)=>`L${et.x},${et.y}`),"Z"].join(" "),{cssStyles:j}=e,X;if(e.look==="handDrawn"){let it=m.svg(o).path(Y,Gt(e,{}));if(X=o.insert(()=>it,":first-child").attr("class","basic label-container"),j)X.attr("style",j)}else X=o.insert("path",":first-child").attr("d",Y).attr("class","basic label-container").attr("style",s);if(e.look==="handDrawn")I(e,X);else I(e,X,{width:g,height:B});let Q=W+f+v/2;return c.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${Q-n.height/2-(n.y-(n.top??0))})`),e.intersect=function(et){return w.polygon(e,H,et)},o}t(_x,"folder");function Bx(r,e,{dir:i,config:{state:s,themeVariables:o}}){let{nodeStyles:n}=k(e);e.label="";let c=r.insert("g").attr("class",re(e)).attr("id",e.domId??e.id),{cssStyles:h}=e,g=Math.max(70,e?.width??0),y=Math.max(10,e?.height??0);if(i==="LR"||i==="RL")g=Math.max(10,e?.width??0),y=Math.max(70,e?.height??0);let f=-1*g/2,B=-1*y/2,v=m.svg(c),q=Gt(e,{stroke:o.lineColor,fill:o.lineColor});if(e.look!=="handDrawn")q.roughness=0,q.fillStyle="solid";let W=v.rectangle(f,B,g,y,q),H=c.insert(()=>W,":first-child");if(h&&e.look!=="handDrawn")H.selectAll("path").attr("style",h);if(n&&e.look!=="handDrawn")H.selectAll("path").attr("style",n);I(e,H);let Y=s?.padding??0;if(e.width&&e.height)e.width+=Y/2||0,e.height+=Y/2||0;return e.intersect=function(j){return w.rect(e,j)},c}t(Bx,"forkJoin");async function vx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=15,n=10,c=e.look==="neo"?16:e.padding??0,h=e.look==="neo"?12:e.padding??0;if(e.width||e.height){if(e.height=(e?.height??0)-h*2,e.height<n)e.height=n;if(e.width=(e?.width??0)-c*2,e.width<o)e.width=o}let{shapeSvg:g,bbox:y}=await P(r,e,re(e)),f=(e?.height?e?.height:Math.max(n,y.height))+h*2,B=f/2,v=B-Math.sqrt(Math.max(0,B**2-(y.height/2)**2)),q=(e?.width?e?.width:Math.max(o,y.width)+v*2)+c*2,{cssStyles:W}=e,H=m.svg(g),Y=Gt(e,{});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let j=[{x:-q/2,y:-f/2},{x:q/2-B,y:-f/2},...eo(-q/2+B,0,B,50,90,270),{x:q/2-B,y:f/2},{x:-q/2,y:f/2}],X=$e(j),Q=H.path(X,Y),et=g.insert(()=>Q,":first-child");if(et.attr("class","basic label-container outer-path"),W&&e.look!=="handDrawn")et.selectChildren("path").attr("style",W);if(s&&e.look!=="handDrawn")et.selectChildren("path").attr("style",s);return I(e,et),e.intersect=function(it){return a.info("Pill intersect",e,{radius:B,point:it}),w.polygon(e,j,it)},g}t(vx,"halfRoundedRectangle");var oS=t((r,e,i,s,o)=>[`M${r+o},${e}`,`L${r+i-o},${e}`,`L${r+i},${e-s/2}`,`L${r+i-o},${e-s}`,`L${r+o},${e-s}`,`L${r},${e-s/2}`,"Z"].join(" "),"createHexagonPathD");async function Lx(r,e){let{labelStyles:i,nodeStyles:s}=k(e),o=e.look==="neo"?3.5:4;e.labelStyle=i;let n=e.padding??0,c=70,h=32,g=e.look==="neo"?c:n,y=e.look==="neo"?h:n;if(e.width||e.height){let Q=(e.height??0)/o;e.width=(e?.width??0)-2*Q-y,e.height=(e.height??0)-g}let{shapeSvg:f,bbox:B}=await P(r,e,re(e)),v=(e?.height?e?.height:B.height)+g,q=v/o,W=(e?.width?e?.width:B.width)+2*q+y,H=[{x:q,y:0},{x:W-q,y:0},{x:W,y:-v/2},{x:W-q,y:-v},{x:q,y:-v},{x:0,y:-v/2}],Y,{cssStyles:j}=e;if(e.look==="handDrawn"){let X=m.svg(f),Q=Gt(e,{}),et=oS(0,0,W,v,q),it=X.path(et,Q);if(Y=f.insert(()=>it,":first-child").attr("transform",`translate(${-W/2}, ${v/2})`),j)Y.attr("style",j)}else Y=io(f,W,v,H);if(s)Y.attr("style",s);return e.width=W,e.height=v,I(e,Y),e.intersect=function(X){return w.polygon(e,H,X)},f}t(Lx,"hexagon");async function Fx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.label="",e.labelStyle=i;let{shapeSvg:o}=await P(r,e,re(e)),n=Math.max(30,e?.width??0),c=Math.max(30,e?.height??0),{cssStyles:h}=e,g=m.svg(o),y=Gt(e,{});if(e.look!=="handDrawn")y.roughness=0,y.fillStyle="solid";let f=[{x:0,y:0},{x:n,y:0},{x:0,y:c},{x:n,y:c}],B=$e(f),v=g.path(B,y),q=o.insert(()=>v,":first-child");if(q.attr("class","basic label-container outer-path"),h&&e.look!=="handDrawn")q.selectChildren("path").attr("style",h);if(s&&e.look!=="handDrawn")q.selectChildren("path").attr("style",s);return q.attr("transform",`translate(${-n/2}, ${-c/2})`),I(e,q),e.intersect=function(W){return a.info("Pill intersect",e,{points:f}),w.polygon(e,f,W)},o}t(Fx,"hourglass");async function Ax(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=k(e);e.labelStyle=o;let n=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(n,c),g=s?.wrappingWidth;e.width=Math.max(h,g??0);let{shapeSvg:y,bbox:f,label:B}=await P(r,e,"icon-shape default"),v=e.pos==="t",q=h,W=h,{nodeBorder:H}=i,{stylesMap:Y}=Ni(e),j=-W/2,X=-q/2,Q=e.label?8:0,et=m.svg(y),it=Gt(e,{stroke:"none",fill:"none"});if(e.look!=="handDrawn")it.roughness=0,it.fillStyle="solid";let ht=et.rectangle(j,X,W,q,it),lt=Math.max(W,f.width),ft=q+f.height+Q,xt=et.rectangle(-lt/2,-ft/2,lt,ft,{...it,fill:"transparent",stroke:"none"}),Lt=y.insert(()=>ht,":first-child"),kt=y.insert(()=>xt);if(e.icon){let Ct=y.append("g");Ct.html(`<g>${await rt(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let st=Ct.node().getBBox(),{width:at,height:pt,x:ot,y:wt}=st;Ct.attr("transform",`translate(${-at/2-ot},${v?f.height/2+Q/2-pt/2-wt:-f.height/2-Q/2-pt/2-wt})`),Ct.attr("style",`color: ${Y.get("stroke")??H};`)}return B.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${v?-ft/2:ft/2-f.height})`),Lt.attr("transform",`translate(0,${v?f.height/2+Q/2:-f.height/2-Q/2})`),I(e,kt),e.intersect=function(Ct){if(a.info("iconSquare intersect",e,Ct),!e.label)return w.rect(e,Ct);let st=e.x??0,at=e.y??0,pt=e.height??0,ot=[];if(v)ot=[{x:st-f.width/2,y:at-pt/2},{x:st+f.width/2,y:at-pt/2},{x:st+f.width/2,y:at-pt/2+f.height+Q},{x:st+W/2,y:at-pt/2+f.height+Q},{x:st+W/2,y:at+pt/2},{x:st-W/2,y:at+pt/2},{x:st-W/2,y:at-pt/2+f.height+Q},{x:st-f.width/2,y:at-pt/2+f.height+Q}];else ot=[{x:st-W/2,y:at-pt/2},{x:st+W/2,y:at-pt/2},{x:st+W/2,y:at-pt/2+q},{x:st+f.width/2,y:at-pt/2+q},{x:st+f.width/2/2,y:at+pt/2},{x:st-f.width/2,y:at+pt/2},{x:st-f.width/2,y:at-pt/2+q},{x:st-W/2,y:at-pt/2+q}];return w.polygon(e,ot,Ct)},y}t(Ax,"icon");async function Mx(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=k(e);e.labelStyle=o;let n=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(n,c),g=s?.wrappingWidth;e.width=Math.max(h,g??0);let{shapeSvg:y,bbox:f,label:B}=await P(r,e,"icon-shape default"),v=20,q=e.label?8:0,W=e.pos==="t",{nodeBorder:H,mainBkg:Y}=i,{stylesMap:j}=Ni(e),X=m.svg(y),Q=Gt(e,{});if(e.look!=="handDrawn")Q.roughness=0,Q.fillStyle="solid";let et=j.get("fill");Q.stroke=et??Y;let it=y.append("g");if(e.icon)it.html(`<g>${await rt(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let ht=it.node().getBBox(),{width:lt,height:ft,x:xt,y:Lt}=ht,kt=Math.max(lt,ft)*Math.SQRT2+v*2,Ct=X.circle(0,0,kt,Q),st=Math.max(kt,f.width),at=kt+f.height+q,pt=X.rectangle(-st/2,-at/2,st,at,{...Q,fill:"transparent",stroke:"none"}),ot=y.insert(()=>Ct,":first-child"),wt=y.insert(()=>pt);return it.attr("transform",`translate(${-lt/2-xt},${W?f.height/2+q/2-ft/2-Lt:-f.height/2-q/2-ft/2-Lt})`),it.attr("style",`color: ${j.get("stroke")??H};`),B.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${W?-at/2:at/2-f.height})`),ot.attr("transform",`translate(0,${W?f.height/2+q/2:-f.height/2-q/2})`),I(e,wt),e.intersect=function(At){return a.info("iconSquare intersect",e,At),w.rect(e,At)},y}t(Mx,"iconCircle");async function Ex(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=k(e);e.labelStyle=o;let n=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(n,c),g=s?.wrappingWidth;e.width=Math.max(h,g??0);let{shapeSvg:y,bbox:f,halfPadding:B,label:v}=await P(r,e,"icon-shape default"),q=e.pos==="t",W=h+B*2,H=h+B*2,{nodeBorder:Y,mainBkg:j}=i,{stylesMap:X}=Ni(e),Q=-H/2,et=-W/2,it=e.label?8:0,ht=m.svg(y),lt=Gt(e,{});if(e.look!=="handDrawn")lt.roughness=0,lt.fillStyle="solid";let ft=X.get("fill");lt.stroke=ft??j;let xt=ht.path(ci(Q,et,H,W,5),lt),Lt=Math.max(H,f.width),kt=W+f.height+it,Ct=ht.rectangle(-Lt/2,-kt/2,Lt,kt,{...lt,fill:"transparent",stroke:"none"}),st=y.insert(()=>xt,":first-child").attr("class","icon-shape2"),at=y.insert(()=>Ct);if(e.icon){let pt=y.append("g");pt.html(`<g>${await rt(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let ot=pt.node().getBBox(),{width:wt,height:At,x:jt,y:Yt}=ot;pt.attr("transform",`translate(${-wt/2-jt},${q?f.height/2+it/2-At/2-Yt:-f.height/2-it/2-At/2-Yt})`),pt.attr("style",`color: ${X.get("stroke")??Y};`)}return v.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${q?-kt/2:kt/2-f.height})`),st.attr("transform",`translate(0,${q?f.height/2+it/2:-f.height/2-it/2})`),I(e,at),e.intersect=function(pt){if(a.info("iconSquare intersect",e,pt),!e.label)return w.rect(e,pt);let ot=e.x??0,wt=e.y??0,At=e.height??0,jt=[];if(q)jt=[{x:ot-f.width/2,y:wt-At/2},{x:ot+f.width/2,y:wt-At/2},{x:ot+f.width/2,y:wt-At/2+f.height+it},{x:ot+H/2,y:wt-At/2+f.height+it},{x:ot+H/2,y:wt+At/2},{x:ot-H/2,y:wt+At/2},{x:ot-H/2,y:wt-At/2+f.height+it},{x:ot-f.width/2,y:wt-At/2+f.height+it}];else jt=[{x:ot-H/2,y:wt-At/2},{x:ot+H/2,y:wt-At/2},{x:ot+H/2,y:wt-At/2+W},{x:ot+f.width/2,y:wt-At/2+W},{x:ot+f.width/2/2,y:wt+At/2},{x:ot-f.width/2,y:wt+At/2},{x:ot-f.width/2,y:wt-At/2+W},{x:ot-H/2,y:wt-At/2+W}];return w.polygon(e,jt,pt)},y}t(Ex,"iconRounded");async function Ox(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=k(e);e.labelStyle=o;let n=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(n,c),g=s?.wrappingWidth;e.width=Math.max(h,g??0);let{shapeSvg:y,bbox:f,halfPadding:B,label:v}=await P(r,e,"icon-shape default"),q=e.pos==="t",W=h+B*2,H=h+B*2,{nodeBorder:Y,mainBkg:j}=i,{stylesMap:X}=Ni(e),Q=-H/2,et=-W/2,it=e.label?8:0,ht=m.svg(y),lt=Gt(e,{});if(e.look!=="handDrawn")lt.roughness=0,lt.fillStyle="solid";let ft=X.get("fill");lt.stroke=ft??j;let xt=ht.path(ci(Q,et,H,W,0.1),lt),Lt=Math.max(H,f.width),kt=W+f.height+it,Ct=ht.rectangle(-Lt/2,-kt/2,Lt,kt,{...lt,fill:"transparent",stroke:"none"}),st=y.insert(()=>xt,":first-child"),at=y.insert(()=>Ct);if(e.icon){let pt=y.append("g");pt.html(`<g>${await rt(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let ot=pt.node().getBBox(),{width:wt,height:At,x:jt,y:Yt}=ot;pt.attr("transform",`translate(${-wt/2-jt},${q?f.height/2+it/2-At/2-Yt:-f.height/2-it/2-At/2-Yt})`),pt.attr("style",`color: ${X.get("stroke")??Y};`)}return v.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${q?-kt/2:kt/2-f.height})`),st.attr("transform",`translate(0,${q?f.height/2+it/2:-f.height/2-it/2})`),I(e,at),e.intersect=function(pt){if(a.info("iconSquare intersect",e,pt),!e.label)return w.rect(e,pt);let ot=e.x??0,wt=e.y??0,At=e.height??0,jt=[];if(q)jt=[{x:ot-f.width/2,y:wt-At/2},{x:ot+f.width/2,y:wt-At/2},{x:ot+f.width/2,y:wt-At/2+f.height+it},{x:ot+H/2,y:wt-At/2+f.height+it},{x:ot+H/2,y:wt+At/2},{x:ot-H/2,y:wt+At/2},{x:ot-H/2,y:wt-At/2+f.height+it},{x:ot-f.width/2,y:wt-At/2+f.height+it}];else jt=[{x:ot-H/2,y:wt-At/2},{x:ot+H/2,y:wt-At/2},{x:ot+H/2,y:wt-At/2+W},{x:ot+f.width/2,y:wt-At/2+W},{x:ot+f.width/2/2,y:wt+At/2},{x:ot-f.width/2,y:wt+At/2},{x:ot-f.width/2,y:wt-At/2+W},{x:ot-H/2,y:wt-At/2+W}];return w.polygon(e,jt,pt)},y}t(Ox,"iconSquare");async function Ix(r,e,{config:{flowchart:i}}){let s=new Image;s.src=e?.img??"",await s.decode();let o=Number(s.naturalWidth.toString().replace("px","")),n=Number(s.naturalHeight.toString().replace("px",""));e.imageAspectRatio=o/n;let{labelStyles:c}=k(e);e.labelStyle=c;let h=i?.wrappingWidth;e.defaultWidth=i?.wrappingWidth;let g=Math.max(e.label?h??0:0,e?.assetWidth??o),y=e.constraint==="on"?e?.assetHeight?e.assetHeight*e.imageAspectRatio:g:g,f=e.constraint==="on"?y/e.imageAspectRatio:e?.assetHeight??n;e.width=Math.max(y,h??0);let{shapeSvg:B,bbox:v,label:q}=await P(r,e,"image-shape default"),W=e.pos==="t",H=-y/2,Y=-f/2,j=e.label?8:0,X=m.svg(B),Q=Gt(e,{});if(e.look!=="handDrawn")Q.roughness=0,Q.fillStyle="solid";let et=X.rectangle(H,Y,y,f,Q),it=Math.max(y,v.width),ht=f+v.height+j,lt=X.rectangle(-it/2,-ht/2,it,ht,{...Q,fill:"none",stroke:"none"}),ft=B.insert(()=>et,":first-child"),xt=B.insert(()=>lt);if(e.img){let Lt=B.append("image");Lt.attr("href",e.img),Lt.attr("width",y),Lt.attr("height",f),Lt.attr("preserveAspectRatio","none"),Lt.attr("transform",`translate(${-y/2},${W?ht/2-f:-ht/2})`)}return q.attr("transform",`translate(${-v.width/2-(v.x-(v.left??0))},${W?-f/2-v.height/2-j/2:f/2-v.height/2+j/2})`),ft.attr("transform",`translate(0,${W?v.height/2+j/2:-v.height/2-j/2})`),I(e,xt),e.intersect=function(Lt){if(a.info("iconSquare intersect",e,Lt),!e.label)return w.rect(e,Lt);let kt=e.x??0,Ct=e.y??0,st=e.height??0,at=[];if(W)at=[{x:kt-v.width/2,y:Ct-st/2},{x:kt+v.width/2,y:Ct-st/2},{x:kt+v.width/2,y:Ct-st/2+v.height+j},{x:kt+y/2,y:Ct-st/2+v.height+j},{x:kt+y/2,y:Ct+st/2},{x:kt-y/2,y:Ct+st/2},{x:kt-y/2,y:Ct-st/2+v.height+j},{x:kt-v.width/2,y:Ct-st/2+v.height+j}];else at=[{x:kt-y/2,y:Ct-st/2},{x:kt+y/2,y:Ct-st/2},{x:kt+y/2,y:Ct-st/2+f},{x:kt+v.width/2,y:Ct-st/2+f},{x:kt+v.width/2/2,y:Ct+st/2},{x:kt-v.width/2,y:Ct+st/2},{x:kt-v.width/2,y:Ct-st/2+f},{x:kt-y/2,y:Ct-st/2+f}];return w.polygon(e,at,Lt)},B}t(Ix,"imageSquare");async function $x(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=o,c=e.look==="neo"?o*2:o,{shapeSvg:h,bbox:g}=await P(r,e,re(e)),y=Math.max(g.height+n*2,e.height??0),f=Math.max(g.width+c*2,(e.width??0)-y),B=[{x:0,y:0},{x:f,y:0},{x:f+3*y/6,y:-y},{x:-3*y/6,y:-y}],v,{cssStyles:q}=e;if(e.look==="handDrawn"){let W=m.svg(h),H=Gt(e,{}),Y=$e(B),j=W.path(Y,H);if(v=h.insert(()=>j,":first-child").attr("transform",`translate(${-f/2}, ${y/2})`),q)v.attr("style",q)}else v=io(h,f,y,B);if(s)v.attr("style",s);return e.width=f,e.height=y,I(e,v),e.intersect=function(W){return w.polygon(e,B,W)},h}t($x,"inv_trapezoid");async function Dx(r,e){let{shapeSvg:i,bbox:s,label:o}=await P(r,e,"label"),n=i.insert("rect",":first-child"),c=0.1,h=0.1;return n.attr("width",0.1).attr("height",0.1),i.attr("class","label edgeLabel"),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),I(e,n),e.intersect=function(g){return w.rect(e,g)},i}t(Dx,"labelRect");async function Px(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=o,c=e.look==="neo"?o*2:o,{shapeSvg:h,bbox:g}=await P(r,e,re(e)),y=Math.max(g.height+n,e.height??0),f=Math.max(g.width+c,(e.width??0)-y),B=[{x:0,y:0},{x:f+3*y/6,y:0},{x:f,y:-y},{x:-(3*y)/6,y:-y}],v,{cssStyles:q}=e;if(e.look==="handDrawn"){let W=m.svg(h),H=Gt(e,{}),Y=$e(B),j=W.path(Y,H);if(v=h.insert(()=>j,":first-child").attr("transform",`translate(${-f/2}, ${y/2})`),q)v.attr("style",q)}else v=io(h,f,y,B);if(s)v.attr("style",s);return e.width=f,e.height=y,I(e,v),e.intersect=function(W){return w.polygon(e,B,W)},h}t(Px,"lean_left");async function Rx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=o,c=e.look==="neo"?o*2:o,{shapeSvg:h,bbox:g}=await P(r,e,re(e)),y=Math.max(g.height+n,e.height??0),f=Math.max(g.width+c,(e.width??0)-y),B=[{x:-3*y/6,y:0},{x:f,y:0},{x:f+3*y/6,y:-y},{x:0,y:-y}],v,{cssStyles:q}=e;if(e.look==="handDrawn"){let W=m.svg(h),H=Gt(e,{}),Y=$e(B),j=W.path(Y,H);if(v=h.insert(()=>j,":first-child").attr("transform",`translate(${-f/2}, ${y/2})`),q)v.attr("style",q)}else v=io(h,f,y,B);if(s)v.attr("style",s);return e.width=f,e.height=y,I(e,v),e.intersect=function(W){return w.polygon(e,B,W)},h}t(Rx,"lean_right");function qx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.label="",e.labelStyle=i;let o=r.insert("g").attr("class",re(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,c=Math.max(35,e?.width??0),h=Math.max(35,e?.height??0),g=7,y=[{x:c,y:0},{x:0,y:h+g/2},{x:c-2*g,y:h+g/2},{x:0,y:2*h},{x:c,y:h-g/2},{x:2*g,y:h-g/2}],f=m.svg(o),B=Gt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let v=$e(y),q=f.path(v,B),W=o.insert(()=>q,":first-child");if(W.attr("class","outer-path"),n&&e.look!=="handDrawn")W.selectAll("path").attr("style",n);if(s&&e.look!=="handDrawn")W.selectAll("path").attr("style",s);return W.attr("transform",`translate(-${c/2},${-h})`),I(e,W),e.intersect=function(H){return a.info("lightningBolt intersect",e,H),w.polygon(e,y,H)},o}t(qx,"lightningBolt");var sS=t((r,e,i,s,o,n,c)=>[`M${r},${e+n}`,`a${o},${n} 0,0,0 ${i},0`,`a${o},${n} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${n} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+n+c}`,`a${o},${n} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),aS=t((r,e,i,s,o,n,c)=>[`M${r},${e+n}`,`M${r+i},${e+n}`,`a${o},${n} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${n} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+n+c}`,`a${o},${n} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),nS=t((r,e,i,s,o,n)=>[`M${r-i/2},${-s/2}`,`a${o},${n} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),My=10,Ey=10;async function Nx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?24:o;if(e.width||e.height){let j=e.width??0;if(e.width=(e.width??0)-n,e.width<Ey)e.width=Ey;let Q=j/2/(2.5+j/50);if(e.height=(e.height??0)-c-Q*3,e.height<My)e.height=My}let{shapeSvg:h,bbox:g,label:y}=await P(r,e,re(e)),f=(e?.width?e?.width:g.width)+n*2,B=f/2,v=B/(2.5+f/50),q=(e?.height?e?.height:g.height)+v+c*2,W=q*0.1,H,{cssStyles:Y}=e;if(e.look==="handDrawn"){let j=m.svg(h),X=aS(0,0,f,q,B,v,W),Q=nS(0,v,f,q,B,v),et=Gt(e,{}),it=j.path(X,et),ht=j.path(Q,et);if(h.insert(()=>ht,":first-child").attr("class","line"),H=h.insert(()=>it,":first-child"),H.attr("class","basic label-container"),Y)H.attr("style",Y)}else{let j=sS(0,0,f,q,B,v,W);H=h.insert("path",":first-child").attr("d",j).attr("class","basic label-container outer-path").attr("style",rr(Y)).attr("style",s)}return H.attr("label-offset-y",v),H.attr("transform",`translate(${-f/2}, ${-(q/2+v)})`),I(e,H),y.attr("transform",`translate(${-(g.width/2)-(g.x-(g.left??0))}, ${-(g.height/2)+v-(g.y-(g.top??0))})`),e.intersect=function(j){let X=w.rect(e,j),Q=X.x-(e.x??0);if(B!=0&&(Math.abs(Q)<(e.width??0)/2||Math.abs(Q)==(e.width??0)/2&&Math.abs(X.y-(e.y??0))>(e.height??0)/2-v)){let et=v*v*(1-Q*Q/(B*B));if(et>0)et=Math.sqrt(et);if(et=v-et,j.y-(e.y??0)>0)et=-et;X.y+=et}return X},h}t(Nx,"linedCylinder");async function Wx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height){let et=e.width;if(e.width=(et??0)*10/11-n*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-c*2,e.height<10)e.height=10}let{shapeSvg:h,bbox:g,label:y}=await P(r,e,re(e)),f=(e?.width?e?.width:g.width)+(n??0)*2,B=(e?.height?e?.height:g.height)+(c??0)*2,v=e.look==="neo"?B/4:B/8,q=B+v,{cssStyles:W}=e,H=m.svg(h),Y=Gt(e,{});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let j=[{x:-f/2-f/2*0.1,y:-q/2},{x:-f/2-f/2*0.1,y:q/2},...Zo(-f/2-f/2*0.1,q/2,f/2+f/2*0.1,q/2,v,0.8),{x:f/2+f/2*0.1,y:-q/2},{x:-f/2-f/2*0.1,y:-q/2},{x:-f/2,y:-q/2},{x:-f/2,y:q/2*1.1},{x:-f/2,y:-q/2}],X=H.polygon(j.map((et)=>[et.x,et.y]),Y),Q=h.insert(()=>X,":first-child");if(Q.attr("class","basic label-container outer-path"),W&&e.look!=="handDrawn")Q.selectAll("path").attr("style",W);if(s&&e.look!=="handDrawn")Q.selectAll("path").attr("style",s);return Q.attr("transform",`translate(0,${-v/2})`),y.attr("transform",`translate(${-f/2+(e.padding??0)+f/2*0.1/2-(g.x-(g.left??0))},${-B/2+(e.padding??0)-v-(g.y-(g.top??0))})`),I(e,Q),e.intersect=function(et){return w.polygon(e,j,et)},h}t(Wx,"linedWaveEdgedRect");var lS=56,Uf=72,Oy=8,Iy=2,hS=8,cS={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},$y=Math.PI/3,Dy=0.6,jf=t((r,e)=>{let i=e*Dy,s=e*Math.sqrt(1-Dy**2),o=Math.cos($y),n=-Math.sin($y),c=i*-n,h=r+i*o,g=s*o,y=s*n;return`M ${c-g} ${h-y} L ${c+g} ${h+y}`},"businessMarkerPathForCircle"),uS={normal:jf(-24,12),hollow:jf(-23,9),awesome:jf(-21,13),icon:"M 12 -8 L 26 -26"},Py=t((r,e,i)=>{let s=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);r.attr("transform",`translate(${-e.width/2-s},${i-e.height/2-o})`)},"positionLabel"),od=t((r,e,i,s,o=!1)=>{if(e.look==="handDrawn"){let h=m.svg(r).path(i,Gt(e,o?{fill:"none"}:{}));return r.insert(()=>h,":first-child").attr("class",s)}let n=r.append("path").attr("class",s).attr("d",i);if(o)n.attr("fill","none");return n},"appendActorPath"),fS=t((r,e,i,s,o,n,c=!1)=>{if(e.look==="handDrawn"){let y=m.svg(r).circle(i,s,o*2,Gt(e,c?{fill:"none"}:{}));return r.insert(()=>y,":first-child").attr("class",n)}let h=r.append("circle").attr("class",n).attr("cx",i).attr("cy",s).attr("r",o);if(c)h.attr("fill","none");return h},"appendActorCircle");var dS=t((r,e,i)=>{if(!e.business)return;r.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",uS[i]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function gn(r,e,i,s){let{labelStyles:o,nodeStyles:n}=k(e);e.labelStyle=o;let c=i==="icon"||e.stereotype!==void 0?{...e,icon:i==="icon"?void 0:e.icon,stereotype:void 0}:e,{shapeSvg:h,bbox:g,label:y}=await P(r,c,re(e,`usecase-actor-variant usecase-actor-${i}`)),f=e.accessibleName??e.label;if(f)h.attr("role","img").attr("aria-label",f);y.attr("class","label actor-label usecase-actor-label");let{theme:B,themeVariables:v}=l();Xe(h,e.colorIndex,B,v.borderColorArray);let q,W;if(e.stereotype){let ft=await hs(h,`«${e.stereotype}»`,{labelStyle:o,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});q=ft.label.attr("class","label usecase-stereotype"),W=ft.bbox}let H=h.append("g").attr("class",`usecase-actor-glyph ${cS[i]}`).attr("style",n||null);await s(H,e),dS(H,e,i);let Y=e.padding??hS,j=W?.height??0,X=Uf+Oy+g.height+(W?j+Iy:0),Q=Math.max(lS,g.width,W?.width??0)+Y*2,et=X+Y*2,it=-X/2;H.attr("transform",`translate(0,${it+Uf/2})`);let ht=it+Uf+Oy;if(q&&W)ht+=j/2,Py(q,W,ht),ht+=j/2+Iy;Py(y,g,ht+g.height/2);let lt=h.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-Q/2).attr("y",-et/2).attr("width",Q).attr("height",et).attr("opacity",0).attr("aria-hidden","true");return I(e,lt),e.intersect=(ft)=>w.rect(e,ft),h}t(gn,"renderUsecaseActor");var pS=["M 0 -12","C 6.627 -12 12 -17.373 12 -24","C 12 -30.627 6.627 -36 0 -36","C -6.627 -36 -12 -30.627 -12 -24","C -12 -17.373 -6.627 -12 0 -12 Z","M 0 -12 V 8","M -17 -5 H 17","M 0 8 L -15 28","M 0 8 L 15 28"].join(" ");async function zx(r,e){return gn(r,e,"normal",(i,s)=>{od(i,s,pS,"usecase-actor-stick")})}t(zx,"usecaseActor");var gS=["M 0 -34","C 7.18 -34 13 -28.18 13 -21","C 13 -13.82 7.18 -8 0 -8","C -7.18 -8 -13 -13.82 -13 -21","C -13 -28.18 -7.18 -34 0 -34 Z","M -24 25","C -24 7 -14 -3 0 -3","C 14 -3 24 7 24 25","C 24 28 21 30 18 30","H -18","C -21 30 -24 28 -24 25 Z"].join(" ");async function Hx(r,e){return gn(r,e,"awesome",(i,s)=>{od(i,s,gS,"usecase-actor-awesome-silhouette")})}t(Hx,"usecaseActorAwesome");var mS=["M -22 -10","H 22","V 0","H 6","L 22 17","L 13 28","L 0 13","L -13 28","L -22 17","L -6 0","H -22","Z"].join(" ");async function Yx(r,e){return gn(r,e,"hollow",(i,s)=>{fS(i,s,0,-23,9,"usecase-actor-hollow-head",!0),od(i,s,mS,"usecase-actor-hollow-body",!0)})}t(Yx,"usecaseActorHollow");var Ps=52,Ry=42,qy=-2,yS=t(async(r,e)=>{let i=-Ps/2,s=qy-Ps/2;if(e.look==="handDrawn"){let f=m.svg(r).rectangle(i,s,Ps,Ps,Gt(e,{}));r.insert(()=>f,":first-child").attr("class","usecase-actor-icon-frame")}else r.append("rect").attr("class","usecase-actor-icon-frame").attr("x",i).attr("y",s).attr("width",Ps).attr("height",Ps).attr("rx",4).attr("ry",4);let o=e.icon??"",n=await Dl(o.includes(":")?o:`fa:${o}`),c=await rt(o,{height:Ry,width:Ry,fallbackPrefix:"fa"}),h=r.append("g").attr("class",`usecase-actor-icon-symbol${n?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${c}</g>`),g=h.node()?.getBBox();if(g)h.attr("transform",`translate(${-g.width/2-g.x},${qy-g.height/2-g.y})`)},"drawIconActor");async function Ux(r,e){return gn(r,e,"icon",yS)}t(Ux,"usecaseActorIcon");var Ny=t((r,e,i)=>{let s=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);r.attr("transform",`translate(${-e.width/2-s},${i-e.height/2-o})`)},"positionLabel");async function jx(r,e){let i=e,{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let n=i.stereotype?{...e,stereotype:void 0}:e,{shapeSvg:c,bbox:h,halfPadding:g,label:y}=await P(r,n,re(e,"usecase-business-shape"));y.attr("class","label usecase-label");let{theme:f,themeVariables:B}=l();Xe(c,e.colorIndex,f,B.borderColorArray);let v,q;if(i.stereotype){let st=await hs(c,`«${i.stereotype}»`,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});v=st.label.attr("class","label usecase-stereotype"),q=st.bbox}let W=q?2:0,H=h.height+(q?.height??0)+W,Y=Math.max(h.width,q?.width??0),j=g??10,X=Y/2+j*2,Q=H/2+j*2,et=Math.min(Math.max(j/5,1),j/2),it=Y/2+et,ht=X-et,lt=it/X,ft=ht/X,xt=Q*Math.sqrt(Math.max(0,1-lt*lt)),Lt=-Q*Math.sqrt(Math.max(0,1-ft*ft));if(v&&q)Ny(v,q,-H/2+q.height/2);Ny(y,h,H/2-h.height/2);let kt;if(e.look==="handDrawn"){let at=m.svg(c).ellipse(0,0,X*2,Q*2,Gt(e,{}));kt=c.insert(()=>at,":first-child").attr("class","basic label-container usecase-business-ellipse")}else kt=c.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",o).attr("rx",X).attr("ry",Q).attr("cx",0).attr("cy",0);c.append("path").attr("class","usecase-business-marker").attr("d",`M ${it} ${xt} L ${ht} ${Lt}`).attr("fill","none").attr("style",o||null);let Ct=i.accessibleName??i.label;if(Ct)c.attr("role","img").attr("aria-label",Ct);return I(e,kt),e.calcIntersect=(st,at)=>w.ellipse(st,st.width/2,st.height/2,at),e.intersect=(st)=>w.ellipse(e,X,Q,st),c}t(jx,"usecaseBusiness");var Gf=8,Wy=4,xS=1,Xf=t((r,e,i,s)=>{let o=(e.x??0)-(e.left??0),n=(e.y??0)-(e.top??0);r.attr("transform",`translate(${i-e.width/2-o},${s-e.height/2-n})`)},"positionLabel"),CS=t((r)=>{let e=Number.parseFloat(r??"");return Number.isFinite(e)&&e>=0?e:xS},"numericStrokeWidth");async function Gx(r,e){let i=e,{labelStyles:s,nodeStyles:o}=k(e),{stylesMap:n}=Ni(e);e.labelStyle=s;let{shapeSvg:c,bbox:h,label:g}=await P(r,e,re(e,"usecase-json-table"));if(c.attr("role","img"),i.accessibleName)c.attr("aria-label",i.accessibleName);g.attr("class","label usecase-json-title");let y=c.append("g").attr("class","usecase-json-table-grid"),f=[];for(let st of i.jsonRows??[]){let at=await hs(y,st.key,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0}),pt=await hs(y,st.value,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0});f.push({key:{label:at.label.attr("class","label usecase-json-key"),bbox:at.bbox},value:{label:pt.label.attr("class","label usecase-json-value"),bbox:pt.bbox}})}let B=Math.max(0,...f.map(({key:st})=>st.bbox.width))+Gf*2,v=Math.max(0,...f.map(({value:st})=>st.bbox.width))+Gf*2,q=h.width+Gf*2,W=Math.max(q,B+v),H=v+Math.max(0,W-B-v),Y=h.height+Wy*2,j=f.map(({key:st,value:at})=>Math.max(st.bbox.height,at.bbox.height)+Wy*2),X=Y+j.reduce((st,at)=>st+at,0),Q=CS(n.get("stroke-width")),et=W+Q*2,it=X+Q*2,ht=-W/2,lt=-X/2,ft=e.look==="handDrawn"?m.svg(c):void 0,xt=ft?Gt(e,{}):void 0,Lt=t((st,at,pt,ot,wt,At)=>{if(ft&&xt){let jt=ft.rectangle(pt,ot,wt,At,xt);return st.insert(()=>jt,":first-child").attr("class",at)}return st.insert("rect",":first-child").attr("class",at).attr("x",pt).attr("y",ot).attr("width",wt).attr("height",At).attr("style",o)},"insertCell"),kt=Lt(c,"label-container usecase-json-border",-et/2,-it/2,et,it);Lt(y,"usecase-json-cell usecase-json-title-cell",ht,lt,W,Y),y.node()?.append(g.node()),Xf(g,h,0,lt+Y/2);let Ct=lt+Y;return f.forEach(({key:st,value:at},pt)=>{let ot=j[pt],wt=y.append("g").attr("class","usecase-json-row").attr("data-row-index",pt).attr("transform",`translate(0,${Ct})`);Lt(wt,"usecase-json-cell usecase-json-key-cell",ht,0,B,ot),Lt(wt,"usecase-json-cell usecase-json-value-cell",ht+B,0,H,ot),wt.node()?.append(st.label.node(),at.label.node()),Xf(st.label,st.bbox,ht+B/2,ot/2),Xf(at.label,at.bbox,ht+B+H/2,ot/2),Ct+=ot}),I(e,kt),e.intersect=(st)=>w.rect(e,st),c}t(Gx,"usecaseJsonTable");async function Xx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o,h=e.look==="neo"?10:5;if(e.width||e.height)e.width=Math.max((e?.width??0)-n*2-2*h,10),e.height=Math.max((e?.height??0)-c*2-2*h,10);let{shapeSvg:g,bbox:y,label:f}=await P(r,e,re(e)),B=(e?.width?e?.width:y.width)+n*2+2*h,v=(e?.height?e?.height:y.height)+c*2+2*h,q=B-2*h,W=v-2*h,H=-q/2,Y=-W/2,{cssStyles:j}=e,X=m.svg(g),Q=Gt(e,{}),et=[{x:H-h,y:Y+h},{x:H-h,y:Y+W+h},{x:H+q-h,y:Y+W+h},{x:H+q-h,y:Y+W},{x:H+q,y:Y+W},{x:H+q,y:Y+W-h},{x:H+q+h,y:Y+W-h},{x:H+q+h,y:Y-h},{x:H+h,y:Y-h},{x:H+h,y:Y},{x:H,y:Y},{x:H,y:Y+h}],it=[{x:H,y:Y+h},{x:H+q-h,y:Y+h},{x:H+q-h,y:Y+W},{x:H+q,y:Y+W},{x:H+q,y:Y},{x:H,y:Y}];if(e.look!=="handDrawn")Q.roughness=0,Q.fillStyle="solid";let ht=$e(et),lt=X.path(ht,Q),ft=$e(it),xt=X.path(ft,Q);if(e.look!=="handDrawn")lt=Kf(lt),xt=Kf(xt);let Lt=g.insert("g",":first-child");if(Lt.insert(()=>lt),Lt.insert(()=>xt),Lt.attr("class","basic label-container outer-path"),j&&e.look!=="handDrawn")Lt.selectAll("path").attr("style",j);if(s&&e.look!=="handDrawn")Lt.selectAll("path").attr("style",s);return f.attr("transform",`translate(${-(y.width/2)-h-(y.x-(y.left??0))}, ${-(y.height/2)+h-(y.y-(y.top??0))})`),I(e,Lt),e.intersect=function(kt){return w.polygon(e,et,kt)},g}t(Xx,"multiRect");async function Vx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,re(e)),h=e.padding??0,g=e.look==="neo"?16:h,y=e.look==="neo"?12:h,f=!0;if(e.width||e.height)f=!1,e.width=(e?.width??0)-g*2,e.height=(e?.height??0)-y*3;let B=Math.max(n.width,e?.width??0)+g*2,v=Math.max(n.height,e?.height??0)+y*3,q=e.look==="neo"?v/4:v/8,W=v+(f?q/2:-q/2),H=-B/2,Y=-W/2,j=10,{cssStyles:X}=e,Q=Zo(H-j,Y+W+j,H+B-j,Y+W+j,q,0.8),et=Q?.[Q.length-1],it=[{x:H-j,y:Y+j},{x:H-j,y:Y+W+j},...Q,{x:H+B-j,y:et.y-j},{x:H+B,y:et.y-j},{x:H+B,y:et.y-2*j},{x:H+B+j,y:et.y-2*j},{x:H+B+j,y:Y-j},{x:H+j,y:Y-j},{x:H+j,y:Y},{x:H,y:Y},{x:H,y:Y+j}],ht=[{x:H,y:Y+j},{x:H+B-j,y:Y+j},{x:H+B-j,y:et.y-j},{x:H+B,y:et.y-j},{x:H+B,y:Y},{x:H,y:Y}],lt=m.svg(o),ft=Gt(e,{});if(e.look!=="handDrawn")ft.roughness=0,ft.fillStyle="solid";let xt=$e(it),Lt=lt.path(xt,ft),kt=$e(ht),Ct=lt.path(kt,ft),st=o.insert(()=>Lt,":first-child");if(st.insert(()=>Ct),st.attr("class","basic label-container outer-path"),X&&e.look!=="handDrawn")st.selectAll("path").attr("style",X);if(s&&e.look!=="handDrawn")st.selectAll("path").attr("style",s);return st.attr("transform",`translate(0,${-q/2})`),c.attr("transform",`translate(${-(n.width/2)-j-(n.x-(n.left??0))}, ${-(n.height/2)+j-q-(n.y-(n.top??0))})`),I(e,st),e.intersect=function(at){return w.polygon(e,it,at)},o}t(Vx,"multiWaveEdgedRectangle");async function Kx(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);if(e.labelStyle=s,!(e.useHtmlLabels||Ce(x())))e.centerLabel=!0;let{shapeSvg:c,bbox:h,label:g}=await P(r,e,re(e)),y=Math.max(h.width+(e.padding??0)*2,e?.width??0),f=Math.max(h.height+(e.padding??0)*2,e?.height??0),B=-y/2,v=-f/2,{cssStyles:q}=e,W=m.svg(c),H=Gt(e,{fill:i.noteBkgColor,stroke:i.noteBorderColor});if(e.look!=="handDrawn")H.roughness=0,H.fillStyle="solid";let Y=W.rectangle(B,v,y,f,H),j=c.insert(()=>Y,":first-child");if(j.attr("class","basic label-container outer-path"),g.attr("class","label noteLabel"),q&&e.look!=="handDrawn")j.selectAll("path").attr("style",q);if(o&&e.look!=="handDrawn")j.selectAll("path").attr("style",o);return g.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),I(e,j),e.intersect=function(X){return w.rect(e,X)},c}t(Kx,"note");var bS=t((r,e,i)=>[`M${r+i/2},${e}`,`L${r+i},${e-i/2}`,`L${r+i/2},${e-i}`,`L${r},${e-i/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Zx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n}=await P(r,e,re(e)),c=n.width+(e.padding??0),h=n.height+(e.padding??0),g=c+h,y=0.5,f=[{x:g/2,y:0},{x:g,y:-g/2},{x:g/2,y:-g},{x:0,y:-g/2}],B,{cssStyles:v}=e;if(e.look==="handDrawn"){let q=m.svg(o),W=Gt(e,{}),H=bS(0,0,g),Y=q.path(H,W);if(B=o.insert(()=>Y,":first-child").attr("transform",`translate(${-g/2+y}, ${g/2})`),v)B.attr("style",v)}else B=io(o,g,g,f),B.attr("transform",`translate(${-g/2+y}, ${g/2})`);if(s)B.attr("style",s);return I(e,B),e.calcIntersect=function(q,W){let H=q.width,Y=[{x:H/2,y:0},{x:H,y:-H/2},{x:H/2,y:-H},{x:0,y:-H/2}];return w.polygon(q,Y,W)},e.intersect=function(q){return this.calcIntersect(e,q)},o}t(Zx,"question");async function Qx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?21:o??0,c=e.look==="neo"?12:o??0,{shapeSvg:h,bbox:g,label:y}=await P(r,e,re(e)),f=g.width+(e.look==="neo"?n*2:n),B=Math.max(g.height+(e.look==="neo"?c*2:c),e.height??0),v=B/4,W=-Math.max(f,(e.width??0)-v)/2,H=-B/2,Y=H/2,j=[{x:W+Y,y:H},{x:W,y:0},{x:W+Y,y:-H},{x:-W,y:-H},{x:-W,y:H}],{cssStyles:X}=e,Q=m.svg(h),et=Gt(e,{});if(e.look!=="handDrawn")et.roughness=0,et.fillStyle="solid";let it=$e(j),ht=Q.path(it,et),lt=h.insert(()=>ht,":first-child");if(lt.attr("class","basic label-container outer-path"),X&&e.look!=="handDrawn")lt.selectAll("path").attr("style",X);if(s&&e.look!=="handDrawn")lt.selectAll("path").attr("style",s);return lt.attr("transform",`translate(${-Y/2},0)`),y.attr("transform",`translate(${-Y/2-g.width/2-(g.x-(g.left??0))}, ${-(g.height/2)-(g.y-(g.top??0))})`),I(e,lt),e.intersect=function(ft){return w.polygon(e,j,ft)},h}t(Qx,"rect_left_inv_arrow");async function Jx(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o;if(!e.cssClasses)o="node default";else o="node "+e.cssClasses;let n=r.insert("g").attr("class",o).attr("id",e.domId||e.id),c=n.insert("g"),h=n.insert("g").attr("class","label").attr("style",s),{description:g,label:y}=e,f=await _i(h,y,e.labelStyle,!0,!0),B={width:0,height:0};if(Ce(l())){let ft=f.children[0],xt=p(f);B=ft.getBoundingClientRect(),xt.attr("width",B.width),xt.attr("height",B.height)}a.info("Text 2",g);let v=g||[],q=f.getBBox(),W=await _i(h,Array.isArray(v)?v.join("<br/>"):v,e.labelStyle,!0,!0),H=W.children[0],Y=p(W);B=H.getBoundingClientRect(),Y.attr("width",B.width),Y.attr("height",B.height);let j=(e.padding||0)/2;p(W).attr("transform","translate( "+(B.width>q.width?0:(q.width-B.width)/2)+", "+(q.height+j+5)+")"),p(f).attr("transform","translate( "+(B.width<q.width?0:-(q.width-B.width)/2)+", 0)"),B=h.node().getBBox(),h.attr("transform","translate("+-B.width/2+", "+(-B.height/2-j+3)+")");let X=B.width+(e.padding||0),Q=B.height+(e.padding||0),et=-B.width/2-j,it=-B.height/2-j,ht,lt;if(e.look==="handDrawn"){let ft=m.svg(n),xt=Gt(e,{}),Lt=ft.path(ci(et,it,X,Q,e.rx||0),xt),kt=ft.line(-B.width/2-j,-B.height/2-j+q.height+j,B.width/2+j,-B.height/2-j+q.height+j,xt);lt=n.insert(()=>(a.debug("Rough node insert CXC",Lt),kt),":first-child"),ht=n.insert(()=>(a.debug("Rough node insert CXC",Lt),Lt),":first-child")}else ht=c.insert("rect",":first-child"),lt=c.insert("line"),ht.attr("class","outer title-state").attr("style",s).attr("x",-B.width/2-j).attr("y",-B.height/2-j).attr("width",B.width+(e.padding||0)).attr("height",B.height+(e.padding||0)),lt.attr("class","divider").attr("x1",-B.width/2-j).attr("x2",B.width/2+j).attr("y1",-B.height/2-j+q.height+j).attr("y2",-B.height/2-j+q.height+j);return I(e,ht),e.intersect=function(ft){return w.rect(e,ft)},n}t(Jx,"rectWithTitle");async function t0(r,e,{config:{themeVariables:i}}){let s=i?.radius??5,o={rx:s,ry:s,classes:"",labelPaddingX:(e?.padding??0)*1,labelPaddingY:(e?.padding??0)*1};return Ws(r,e,o)}t(t0,"roundedRect");var ls=8;async function e0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,n=e.look==="neo"?12:e.padding??0,{shapeSvg:c,bbox:h,label:g}=await P(r,e,re(e)),y=(e?.width??h.width)+o*2+(e.look==="neo"?ls:ls*2),f=(e?.height??h.height)+n*2,B=y-ls,v=f,q=ls-y/2,W=-f/2,{cssStyles:H}=e,Y=m.svg(c),j=Gt(e,{});if(e.look!=="handDrawn")j.roughness=0,j.fillStyle="solid";let X=[{x:q,y:W},{x:q+B,y:W},{x:q+B,y:W+v},{x:q-ls,y:W+v},{x:q-ls,y:W},{x:q,y:W},{x:q,y:W+v}],Q=Y.polygon(X.map((it)=>[it.x,it.y]),j),et=c.insert(()=>Q,":first-child");if(et.attr("class","basic label-container outer-path").attr("style",rr(H)),s&&e.look!=="handDrawn")et.selectAll("path").attr("style",s);if(H&&e.look!=="handDrawn")et.selectAll("path").attr("style",s);return g.attr("transform",`translate(${ls/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),I(e,et),e.intersect=function(it){return w.rect(e,it)},c}t(e0,"shadedProcess");async function r0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height)e.width=Math.max((e?.width??0)-n*2,10),e.height=Math.max((e?.height??0)/1.5-c*2,10);let{shapeSvg:h,bbox:g,label:y}=await P(r,e,re(e)),f=(e?.width?e?.width:g.width)+n*2,B=((e?.height?e?.height:g.height)+c*2)*1.5,v=f,q=B/1.5,W=-v/2,H=-q/2,{cssStyles:Y}=e,j=m.svg(h),X=Gt(e,{});if(e.look!=="handDrawn")X.roughness=0,X.fillStyle="solid";let Q=[{x:W,y:H},{x:W,y:H+q},{x:W+v,y:H+q},{x:W+v,y:H-q/2}],et=$e(Q),it=j.path(et,X),ht=h.insert(()=>it,":first-child");if(ht.attr("class","basic label-container outer-path"),Y&&e.look!=="handDrawn")ht.selectChildren("path").attr("style",Y);if(s&&e.look!=="handDrawn")ht.selectChildren("path").attr("style",s);return ht.attr("transform",`translate(0, ${q/4})`),y.attr("transform",`translate(${-v/2+(e.padding??0)-(g.x-(g.left??0))}, ${-q/4+(e.padding??0)-(g.y-(g.top??0))})`),I(e,ht),e.intersect=function(lt){return w.polygon(e,Q,lt)},h}t(r0,"slopedRect");async function i0(r,e){let i=e.padding??0,s=e.look==="neo"?16:i*2,o=e.look==="neo"?12:i,n={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??s,labelPaddingY:o},c=await Ws(r,e,n);if(e.colorIndex!==void 0){let{theme:h,themeVariables:g}=l();Xe(c,e.colorIndex,h,g.borderColorArray)}return c}t(i0,"squareRect");var Jf=50,kS=t((r,e,i)=>{let s=r.height+i,o=s*Math.cos(Math.PI/(2*(Jf-1))),n=Math.sqrt(Math.max(0,o**2-r.height**2));return{w:Math.max(r.width+s/4+e,1.5*s+(s-o),r.width+e+s-n),h:s}},"stadiumDimensions");async function o0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?40:o,c=e.look==="neo"?24:o,{shapeSvg:h,bbox:g}=await P(r,e,re(e)),{w:y,h:f}=kS(g,n,c),B=f/2,{cssStyles:v}=e,q=m.svg(h),W=Gt(e,{});if(e.look!=="handDrawn")W.roughness=0,W.fillStyle="solid";let H=[{x:-y/2+B,y:-f/2},{x:y/2-B,y:-f/2},...eo(-y/2+B,0,B,Jf,90,270),{x:y/2-B,y:f/2},...eo(y/2-B,0,B,Jf,270,450)],Y=$e(H),j=q.path(Y,W),X=h.insert(()=>j,":first-child");if(X.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")X.selectChildren("path").attr("style",v);if(s&&e.look!=="handDrawn")X.selectChildren("path").attr("style",s);return I(e,X),e.intersect=function(Q){return w.polygon(e,H,Q)},h}t(o0,"stadium");async function s0(r,e){let i={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5,classes:"flowchart-node"};return Ws(r,e,i)}t(s0,"state");function a0(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s;let{cssStyles:n}=e,{lineColor:c,stateBorder:h,nodeBorder:g,nodeShadow:y}=i;if(e.width||e.height){if((e.width??0)<14)e.width=14;if((e.height??0)<14)e.height=14}if(!e.width)e.width=14;if(!e.height)e.height=14;let f=r.insert("g").attr("class","node default").attr("id",e.domId??e.id),B=m.svg(f),v=Gt(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let q=B.circle(0,0,e.width,{...v,stroke:c,strokeWidth:2}),W=h??g,H=(e.width??0)*5/14,Y=B.circle(0,0,H,{...v,fill:W,stroke:W,strokeWidth:2,fillStyle:"solid"}),j=f.insert(()=>q,":first-child");if(j.insert(()=>Y),e.look!=="handDrawn")j.attr("class","outer-path");if(n)j.selectAll("path").attr("style",n);if(o)j.selectAll("path").attr("style",o);if(e.width<25&&y&&e.look!=="handDrawn"){let X=r.node()?.ownerSVGElement?.id??"",Q=X?`${X}-drop-shadow-small`:"drop-shadow-small";j.attr("style",`filter:url(#${Q})`)}return I(e,j),e.intersect=function(X){return w.circle(e,(e.width??0)/2,X)},f}t(a0,"stateEnd");function n0(r,e,{config:{themeVariables:i}}){let{lineColor:s,nodeShadow:o}=i;if(e.width||e.height){if((e.width??0)<14)e.width=14;if((e.height??0)<14)e.height=14}if(!e.width)e.width=14;if(!e.height)e.height=14;let n=r.insert("g").attr("class","node default").attr("id",e.domId||e.id),c;if(e.look==="handDrawn"){let g=m.svg(n).circle(0,0,e.width,Gg(s));c=n.insert(()=>g),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else c=n.insert("circle",":first-child"),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&o&&e.look!=="handDrawn"){let h=r.node()?.ownerSVGElement?.id??"",g=h?`${h}-drop-shadow-small`:"drop-shadow-small";c.attr("style",`filter:url(#${g})`)}return I(e,c),e.intersect=function(h){return w.circle(e,(e.width??7)/2,h)},n}t(n0,"stateStart");var Rs=8;async function l0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e?.padding??8,n=e.look==="neo"?28:o,c=e.look==="neo"?12:o,{shapeSvg:h,bbox:g}=await P(r,e,re(e)),y=Math.max(g.width+2*Rs+n,e.width??0),f=Math.max(g.height+c,e.height??0),B=y-2*Rs,v=f,q=-y/2,W=-f/2,H=[{x:0,y:0},{x:B,y:0},{x:B,y:-v},{x:0,y:-v},{x:0,y:0},{x:-8,y:0},{x:B+8,y:0},{x:B+8,y:-v},{x:-8,y:-v},{x:-8,y:0}];if(e.look==="handDrawn"){let Y=m.svg(h),j=Gt(e,{}),X=Y.rectangle(q,W,B+16,v,j),Q=Y.line(q+Rs,W,q+Rs,W+v,j),et=Y.line(q+Rs+B,W,q+Rs+B,W+v,j);h.insert(()=>Q,":first-child"),h.insert(()=>et,":first-child");let it=h.insert(()=>X,":first-child"),{cssStyles:ht}=e;it.attr("class","basic label-container").attr("style",rr(ht)),I(e,it)}else{let Y=io(h,B,v,H);if(s)Y.attr("style",s);I(e,Y)}return e.intersect=function(Y){return w.polygon(e,H,Y)},h}t(l0,"subroutine");var Vf=0.2;async function h0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height)e.height=Math.max((e?.height??0)-c*2,10),e.width=Math.max((e?.width??0)-n*2-Vf*(e.height+c*2),10);let{shapeSvg:h,bbox:g}=await P(r,e,re(e)),y=(e?.height?e?.height:g.height)+c*2,f=Vf*y,B=Vf*y,q=(e?.width?e?.width:g.width)+n*2+f-f,W=y,H=-q/2,Y=-W/2,{cssStyles:j}=e,X=m.svg(h),Q=Gt(e,{}),et=[{x:H-f/2,y:Y},{x:H+q+f/2,y:Y},{x:H+q+f/2,y:Y+W},{x:H-f/2,y:Y+W}],it=[{x:H+q-f/2,y:Y+W},{x:H+q+f/2,y:Y+W},{x:H+q+f/2,y:Y+W-B}];if(e.look!=="handDrawn")Q.roughness=0,Q.fillStyle="solid";let ht=$e(et),lt=X.path(ht,Q),ft=$e(it),xt=X.path(ft,{...Q,fillStyle:"solid"}),Lt=h.insert(()=>xt,":first-child");if(Lt.insert(()=>lt,":first-child"),Lt.attr("class","basic label-container outer-path"),j&&e.look!=="handDrawn")Lt.selectAll("path").attr("style",j);if(s&&e.look!=="handDrawn")Lt.selectAll("path").attr("style",s);return I(e,Lt),e.intersect=function(kt){return w.polygon(e,et,kt)},h}t(h0,"taggedRect");async function c0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,label:c}=await P(r,e,re(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),g=Math.max(n.height+(e.padding??0)*2,e?.height??0),y=g/8,f=0.2*h,B=0.2*g,v=g+y,{cssStyles:q}=e,W=m.svg(o),H=Gt(e,{});if(e.look!=="handDrawn")H.roughness=0,H.fillStyle="solid";let Y=[{x:-h/2-h/2*0.1,y:v/2},...Zo(-h/2-h/2*0.1,v/2,h/2+h/2*0.1,v/2,y,0.8),{x:h/2+h/2*0.1,y:-v/2},{x:-h/2-h/2*0.1,y:-v/2}],j=-h/2+h/2*0.1,X=-v/2-B*0.4,Q=[{x:j+h-f,y:(X+g)*1.3},{x:j+h,y:X+g-B},{x:j+h,y:(X+g)*0.9},...Zo(j+h,(X+g)*1.25,j+h-f,(X+g)*1.3,-g*0.02,0.5)],et=$e(Y),it=W.path(et,H),ht=$e(Q),lt=W.path(ht,{...H,fillStyle:"solid"}),ft=o.insert(()=>lt,":first-child");if(ft.insert(()=>it,":first-child"),ft.attr("class","basic label-container outer-path"),q&&e.look!=="handDrawn")ft.selectAll("path").attr("style",q);if(s&&e.look!=="handDrawn")ft.selectAll("path").attr("style",s);return ft.attr("transform",`translate(0,${-y/2})`),c.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))},${-g/2+(e.padding??0)-y/2-(n.y-(n.top??0))})`),I(e,ft),e.intersect=function(xt){return w.polygon(e,Y,xt)},o}t(c0,"taggedWaveEdgedRectangle");async function u0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n}=await P(r,e,re(e)),c=Math.max(n.width+(e.padding??0),e?.width||0),h=Math.max(n.height+(e.padding??0),e?.height||0),g=-c/2,y=-h/2,f=o.insert("rect",":first-child");return f.attr("class","text").attr("style",s).attr("rx",0).attr("ry",0).attr("x",g).attr("y",y).attr("width",c).attr("height",h),I(e,f),e.intersect=function(B){return w.rect(e,B)},o}t(u0,"text");var wS=t((r,e,i,s,o,n)=>`M${r},${e}
234
234
  a${o},${n} 0,0,1 0,${-s}
235
235
  l${i},0
236
236
  a${o},${n} 0,0,1 0,${s}
237
237
  M${i},${-s}
238
238
  a${o},${n} 0,0,0 0,${s}
239
- l${-i},0`,"createCylinderPathD"),SS=t((r,e,i,s,o,n)=>[`M${r},${e}`,`M${r+i},${e}`,`a${o},${n} 0,0,0 0,${-s}`,`l${-i},0`,`a${o},${n} 0,0,0 0,${s}`,`l${i},0`].join(" "),"createOuterCylinderPathD"),TS=t((r,e,i,s,o,n)=>[`M${r+i/2},${-s/2}`,`a${o},${n} 0,0,0 0,${s}`].join(" "),"createInnerCylinderPathD"),zy=5,Hy=10;async function f0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?12:o/2,c=e.height??0;if(e.height){if(e.height=e.height-n,e.height<zy)e.height=zy}if(e.width){let j=c/2/(2.5+c/50);if(e.width=e.width-n-j*3,e.width<Hy)e.width=Hy}let{shapeSvg:h,bbox:g,label:y}=await P(r,e,te(e)),f=Math.max(e.height??0,g.height)+n,B=f/2,v=B/(2.5+f/50),q=Math.max(e.width??0,g.width)+v+n,{cssStyles:W}=e,H;if(e.look==="handDrawn"){let Y=m.svg(h),j=SS(0,0,q,f,v,B),X=TS(0,0,q,f,v,B),Q=Y.path(j,Gt(e,{})),rt=Y.path(X,Gt(e,{fill:"none"}));if(H=h.insert(()=>rt,":first-child"),H=h.insert(()=>Q,":first-child"),H.attr("class","basic label-container"),W)H.attr("style",W)}else{let Y=wS(0,0,q,f,v,B);if(H=h.insert("path",":first-child").attr("d",Y).attr("class","basic label-container").attr("style",tr(W)).attr("style",s),H.attr("class","basic label-container outer-path"),W)H.selectAll("path").attr("style",W);if(s)H.selectAll("path").attr("style",s)}return H.attr("label-offset-x",v),H.attr("transform",`translate(${-q/2}, ${f/2} )`),y.attr("transform",`translate(${-(g.width/2)-v-(g.x-(g.left??0))}, ${-(g.height/2)-(g.y-(g.top??0))})`),I(e,H),e.intersect=function(Y){let j=w.rect(e,Y),X=j.y-(e.y??0);if(B!=0&&(Math.abs(X)<(e.height??0)/2||Math.abs(X)==(e.height??0)/2&&Math.abs(j.x-(e.x??0))>(e.width??0)/2-v)){let Q=v*v*(1-X*X/(B*B));if(Q!=0)Q=Math.sqrt(Math.abs(Q));if(Q=v-Q,Y.x-(e.x??0)>0)Q=-Q;j.x+=Q}return j},h}t(f0,"tiltedCylinder");async function d0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?o:o,c=e.look==="neo"?o*2:o,{shapeSvg:h,bbox:g}=await P(r,e,te(e)),y=Math.max(g.height+n,e.height??0),f=Math.max(g.width+c,(e.width??0)-y),B=[{x:-3*y/6,y:0},{x:f+3*y/6,y:0},{x:f,y:-y},{x:0,y:-y}],v,{cssStyles:q}=e;if(e.look==="handDrawn"){let W=m.svg(h),H=Gt(e,{}),Y=Oe(B),j=W.path(Y,H);if(v=h.insert(()=>j,":first-child").attr("transform",`translate(${-f/2}, ${y/2})`),q)v.attr("style",q)}else v=ro(h,f,y,B);if(s)v.attr("style",s);return e.width=f,e.height=y,I(e,v),e.intersect=function(W){return w.polygon(e,B,W)},h}t(d0,"trapezoid");async function p0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o,h=15,g=5;if(e.width||e.height){if(e.height=(e.height??0)-c*2,e.height<g)e.height=g;if(e.width=(e.width??0)-n*2,e.width<h)e.width=h}let{shapeSvg:y,bbox:f}=await P(r,e,te(e)),B=(e?.width?e?.width:f.width)+n*2,v=(e?.height?e?.height:f.height)+c*2,{cssStyles:q}=e,W=m.svg(y),H=Gt(e,{});if(e.look!=="handDrawn")H.roughness=0,H.fillStyle="solid";let Y=[{x:-B/2*0.8,y:-v/2},{x:B/2*0.8,y:-v/2},{x:B/2,y:-v/2*0.6},{x:B/2,y:v/2},{x:-B/2,y:v/2},{x:-B/2,y:-v/2*0.6}],j=Oe(Y),X=W.path(j,H),Q=y.insert(()=>X,":first-child");if(Q.attr("class","basic label-container outer-path"),q&&e.look!=="handDrawn")Q.selectChildren("path").attr("style",q);if(s&&e.look!=="handDrawn")Q.selectChildren("path").attr("style",s);return I(e,Q),e.intersect=function(rt){return w.polygon(e,Y,rt)},y}t(p0,"trapezoidalPentagon");var Yy=10,Uy=10;async function g0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.width=((e?.width??0)-n)/2,e.width<Uy)e.width=Uy;if(e.height=e?.height??0,e.height<Yy)e.height=Yy}let{shapeSvg:c,bbox:h,label:g}=await P(r,e,te(e)),y=ht(l().flowchart?.htmlLabels),f=(e?.width?e?.width:h.width)+n,B=e?.height?e?.height:f+h.height,v=B,q=[{x:0,y:0},{x:v,y:0},{x:v/2,y:-B}],{cssStyles:W}=e,H=m.svg(c),Y=Gt(e,{});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let j=Oe(q),X=H.path(j,Y),Q=c.insert(()=>X,":first-child").attr("transform",`translate(${-B/2}, ${B/2})`).attr("class","outer-path");if(W&&e.look!=="handDrawn")Q.selectChildren("path").attr("style",W);if(s&&e.look!=="handDrawn")Q.selectChildren("path").attr("style",s);return e.width=f,e.height=B,I(e,Q),g.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${B/2-(h.height+(e.padding??0)/(y?2:1)-(h.y-(h.top??0)))})`),e.intersect=function(rt){return a.info("Triangle intersect",e,q,rt),w.polygon(e,q,rt)},c}t(g0,"triangle");async function m0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o,h=!0;if(e.width||e.height){if(h=!1,e.width=(e?.width??0)-n*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-c*2,e.height<10)e.height=10}let{shapeSvg:g,bbox:y,label:f}=await P(r,e,te(e)),B=(e?.width?e?.width:y.width)+(n??0)*2,v=(e?.height?e?.height:y.height)+(c??0)*2,q=e.look==="neo"?v/4:v/8,W=v+(h?q:-q),{cssStyles:H}=e,j=14-B,X=j>0?j/2:0,Q=m.svg(g),rt=Gt(e,{});if(e.look!=="handDrawn")rt.roughness=0,rt.fillStyle="solid";let it=[{x:-B/2-X,y:W/2},...Ko(-B/2-X,W/2,B/2+X,W/2,q,0.8),{x:B/2+X,y:-W/2},{x:-B/2-X,y:-W/2}],ct=Oe(it),lt=Q.path(ct,rt),dt=g.insert(()=>lt,":first-child");if(dt.attr("class","basic label-container outer-path"),H&&e.look!=="handDrawn")dt.selectAll("path").attr("style",H);if(s&&e.look!=="handDrawn")dt.selectAll("path").attr("style",s);return dt.attr("transform",`translate(0,${-q/2})`),f.attr("transform",`translate(${-B/2+(e.padding??0)-(y.x-(y.left??0))},${-v/2+(e.padding??0)-q-(y.y-(y.top??0))})`),I(e,dt),e.intersect=function(Ct){return w.polygon(e,it,Ct)},g}t(m0,"waveEdgedRectangle");async function y0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?20:o;if(e.width||e.height){if(e.width=e?.width??0,e.width<20)e.width=20;if(e.height=e?.height??0,e.height<10)e.height=10;let rt=Math.min(e.height*0.2,e.height/4);e.height=Math.ceil(e.height-c-rt*2.2222222222222223),e.width=e.width-n*2}let{shapeSvg:h,bbox:g}=await P(r,e,te(e)),y=(e?.width?e?.width:g.width)+n*2,f=(e?.height?e?.height:g.height)+c,B=f/8,v=f+B*2,{cssStyles:q}=e,W=m.svg(h),H=Gt(e,{});if(e.look!=="handDrawn")H.roughness=0,H.fillStyle="solid";let Y=[{x:-y/2,y:v/2},...Ko(-y/2,v/2,y/2,v/2,B,1),{x:y/2,y:-v/2},...Ko(y/2,-v/2,-y/2,-v/2,B,-1)],j=Oe(Y),X=W.path(j,H),Q=h.insert(()=>X,":first-child");if(Q.attr("class","basic label-container"),q&&e.look!=="handDrawn")Q.selectAll("path").attr("style",q);if(s&&e.look!=="handDrawn")Q.selectAll("path").attr("style",s);return I(e,Q),e.intersect=function(rt){return w.polygon(e,Y,rt)},h}t(y0,"waveRectangle");var rr=10;async function x0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,n=e.look==="neo"?12:e.padding??0;if(e.width||e.height)e.width=Math.max((e?.width??0)-o*2-rr,10),e.height=Math.max((e?.height??0)-n*2-rr,10);let{shapeSvg:c,bbox:h,label:g}=await P(r,e,te(e)),y=(e?.width?e?.width:h.width)+o*2+rr,f=(e?.height?e?.height:h.height)+n*2+rr,B=y-rr,v=f-rr,q=-B/2,W=-v/2,{cssStyles:H}=e,Y=m.svg(c),j=Gt(e,{}),X=[{x:q-rr,y:W-rr},{x:q-rr,y:W+v},{x:q+B,y:W+v},{x:q+B,y:W-rr}],Q=`M${q-rr},${W-rr} L${q+B},${W-rr} L${q+B},${W+v} L${q-rr},${W+v} L${q-rr},${W-rr}
240
- M${q-rr},${W} L${q+B},${W}
241
- M${q},${W-rr} L${q},${W+v}`;if(e.look!=="handDrawn")j.roughness=0,j.fillStyle="solid";let rt=Y.path(Q,j),it=c.insert(()=>rt,":first-child");if(it.attr("transform",`translate(${rr/2}, ${rr/2})`),it.attr("class","basic label-container outer-path"),H&&e.look!=="handDrawn")it.selectAll("path").attr("style",H);if(s&&e.look!=="handDrawn")it.selectAll("path").attr("style",s);return g.attr("transform",`translate(${-(h.width/2)+rr/2-(h.x-(h.left??0))}, ${-(h.height/2)+rr/2-(h.y-(h.top??0))})`),I(e,it),e.intersect=function(ct){return w.polygon(e,X,ct)},c}t(x0,"windowPane");var jy=new Set(["redux-color","redux-dark-color"]),_S=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function sd(r,e){let i=e;if(i.alias)e.label=i.alias;let{theme:s,themeVariables:o}=x(),{rowEven:n,rowOdd:c,nodeBorder:h,borderColorArray:g}=o;if(e.look==="handDrawn"){let{themeVariables:Wt}=x(),{background:re}=Wt,ce={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${re}`]};await sd(r,ce)}let y=x();e.useHtmlLabels=y.htmlLabels;let f=y.er?.diagramPadding??10,B=y.er?.entityPadding??6,{cssStyles:v}=e,{labelStyles:q,nodeStyles:W}=k(e);if(i.attributes.length===0&&e.label){let Wt={rx:0,ry:0,labelPaddingX:f,labelPaddingY:f*1.5,classes:""};if(He(e.label,y)+Wt.labelPaddingX*2<y.er.minEntityWidth)e.width=y.er.minEntityWidth;let re=await Ns(r,e,Wt);if(s!=null&&jy.has(s)){let ce=i.colorIndex??0;re.attr("data-color-id",`color-${ce%g.length}`)}if(!ht(y.htmlLabels)){let ce=re.select("text"),ue=ce.node()?.getBBox();ce.attr("transform",`translate(${-ue.width/2}, 0)`)}return re}if(!y.htmlLabels)f*=1.25,B*=1.25;let H=te(e);if(!H)H="node default";let Y=r.insert("g").attr("class",H).attr("id",e.domId||e.id),j=await Rs(Y,e.label??"",y,0,0,["name"],q);j.height+=B;let X=0,Q=[],rt=[],it=0,ct=0,lt=0,dt=0,Ct=!0,Bt=!0;for(let Wt of i.attributes){let re=await Rs(Y,Wt.type,y,0,X,["attribute-type"],q);it=Math.max(it,re.width+f);let ce=await Rs(Y,Wt.name,y,0,X,["attribute-name"],q);ct=Math.max(ct,ce.width+f);let ue=await Rs(Y,Wt.keys.join(),y,0,X,["attribute-keys"],q);lt=Math.max(lt,ue.width+f);let Ke=await Rs(Y,Wt.comment,y,0,X,["attribute-comment"],q);dt=Math.max(dt,Ke.width+f);let Xe=Math.max(re.height,ce.height,ue.height,Ke.height)+B;rt.push({yOffset:X,rowHeight:Xe}),X+=Xe}let kt=4;if(lt<=f)Ct=!1,lt=0,kt--;if(dt<=f)Bt=!1,dt=0,kt--;let bt=Y.node().getBBox();if(j.width+f*2-(it+ct+lt+dt)>0){let Wt=j.width+f*2-(it+ct+lt+dt);if(it+=Wt/kt,ct+=Wt/kt,lt>0)lt+=Wt/kt;if(dt>0)dt+=Wt/kt}let st=it+ct+lt+dt,at=m.svg(Y),mt=Gt(e,{});if(e.look!=="handDrawn")mt.roughness=0,mt.fillStyle="solid";let ot=0;if(rt.length>0)ot=rt.reduce((Wt,re)=>Wt+(re?.rowHeight??0),0);let wt=Math.max(bt.width+f*2,e?.width||0,st),Lt=Math.max((ot??0)+j.height,e?.height||0),Yt=-wt/2,Ht=-Lt/2;if(Y.selectAll("g:not(:first-child)").each((Wt,re,ce)=>{let ue=p(ce[re]),Ke=ue.attr("transform"),Xe=0,xi=0;if(Ke){let di=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Ke);if(di){if(Xe=parseFloat(di[1]),xi=parseFloat(di[2]),ue.attr("class").includes("attribute-name"))Xe+=it;else if(ue.attr("class").includes("attribute-keys"))Xe+=it+ct;else if(ue.attr("class").includes("attribute-comment"))Xe+=it+ct+lt}}ue.attr("transform",`translate(${Yt+f/2+Xe}, ${xi+Ht+j.height+B/2})`)}),Y.select(".name").attr("transform","translate("+-j.width/2+", "+(Ht+B/2)+")"),s!=null&&jy.has(s)){let Wt=i.colorIndex??0;Y.attr("data-color-id",`color-${Wt%g.length}`)}let he=at.rectangle(Yt,Ht,wt,Lt,mt),ne=Y.insert(()=>he,":first-child").attr("class","outer-path").attr("style",v.join(""));Q.push(0);for(let[Wt,re]of rt.entries()){let ue=(Wt+1)%2===0&&re.yOffset!==0,Ke=at.rectangle(Yt,j.height+Ht+re?.yOffset,wt,re?.rowHeight,{...mt,fill:ue?n:c,stroke:h});Y.insert(()=>Ke,"g.label").attr("style",v.join("")).attr("class",`row-rect-${ue?"even":"odd"}`)}let _e=0.0001,Ae=qs(Yt,j.height+Ht,wt+Yt,j.height+Ht,_e),xe=at.polygon(Ae.map((Wt)=>[Wt.x,Wt.y]),mt);if(Y.insert(()=>xe).attr("class","divider"),Ae=qs(it+Yt,j.height+Ht,it+Yt,Lt+Ht,_e),xe=at.polygon(Ae.map((Wt)=>[Wt.x,Wt.y]),mt),Y.insert(()=>xe).attr("class","divider"),Ct){let Wt=it+ct+Yt;Ae=qs(Wt,j.height+Ht,Wt,Lt+Ht,_e),xe=at.polygon(Ae.map((re)=>[re.x,re.y]),mt),Y.insert(()=>xe).attr("class","divider")}if(Bt){let Wt=it+ct+lt+Yt;Ae=qs(Wt,j.height+Ht,Wt,Lt+Ht,_e),xe=at.polygon(Ae.map((re)=>[re.x,re.y]),mt),Y.insert(()=>xe).attr("class","divider")}for(let Wt of Q){let re=j.height+Ht+Wt;Ae=qs(Yt,re,wt+Yt,re,_e),xe=at.polygon(Ae.map((ce)=>[ce.x,ce.y]),mt),Y.insert(()=>xe).attr("class","divider")}if(I(e,ne),W&&e.look!=="handDrawn")if(s!=null&&_S.has(s))Y.selectAll("path").attr("style",W);else{let re=W.split(";")?.filter((ce)=>ce.includes("stroke"))?.map((ce)=>`${ce}`).join("; ");Y.selectAll("path").attr("style",re??""),Y.selectAll(".row-rect-even path").attr("style",W)}return e.intersect=function(Wt){return w.rect(e,Wt)},Y}t(sd,"erBox");async function Rs(r,e,i,s=0,o=0,n=[],c=""){let h=r.insert("g").attr("class",`label ${n.join(" ")}`).attr("transform",`translate(${s}, ${o})`).attr("style",c);if(e!==Jt(e))e=Jt(e),e=e.replaceAll("<","&lt;").replaceAll(">","&gt;");let g=h.node().appendChild(await Le(h,e,{width:He(e,i)+100,style:c,useHtmlLabels:i.htmlLabels},i));if(e.includes("&lt;")||e.includes("&gt;")){let f=g.children[0];f.textContent=f.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");while(f.childNodes[0])f=f.childNodes[0],f.textContent=f.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let y=g.getBBox();if(ht(i.htmlLabels)){let f=g.children[0];f.style.textAlign="start";let B=p(g);y=f.getBoundingClientRect(),B.attr("width",y.width),B.attr("height",y.height)}return y}t(Rs,"addText");function qs(r,e,i,s,o){if(r===i)return[{x:r-o/2,y:e},{x:r+o/2,y:e},{x:i+o/2,y:s},{x:i-o/2,y:s}];return[{x:r,y:e-o/2},{x:r,y:e+o/2},{x:i,y:s+o/2},{x:i,y:s-o/2}]}t(qs,"lineToPolygon");async function C0(r,e,i,s,o=i.class.padding??12){let n=!s?3:0,c=r.insert("g").attr("class",te(e)).attr("id",e.domId||e.id),h=null,g=null,y=null,f=null,B=0,v=0,q=0;if(h=c.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let X=e.annotations[0];await pn(h,{text:`«${X}»`},0),B=h.node().getBBox().height}g=c.insert("g").attr("class","label-group text"),await pn(g,e,0,["font-weight: bolder"]);let W=g.node().getBBox();v=W.height,y=c.insert("g").attr("class","members-group text");let H=0;for(let X of e.members){let Q=await pn(y,X,H,[X.parseClassifier()]);H+=Q+n}if(q=y.node().getBBox().height,q<=0)q=o/2;f=c.insert("g").attr("class","methods-group text");let Y=0;for(let X of e.methods){let Q=await pn(f,X,Y,[X.parseClassifier()]);Y+=Q+n}let j=c.node().getBBox();if(h!==null){let X=h.node().getBBox();h.attr("transform",`translate(${-X.width/2})`)}return g.attr("transform",`translate(${-W.width/2}, ${B})`),j=c.node().getBBox(),y.attr("transform",`translate(0, ${B+v+o*2})`),j=c.node().getBBox(),f.attr("transform",`translate(0, ${B+v+(q?q+o*4:o*2)})`),j=c.node().getBBox(),{shapeSvg:c,bbox:j}}t(C0,"textHelper");async function pn(r,e,i,s=[]){let o=r.insert("g").attr("class","label").attr("style",s.join("; ")),n=x(),c="useHtmlLabels"in e?e.useHtmlLabels:ht(n.htmlLabels)??!0,h="";if("text"in e)h=e.text;else h=e.label;if(!c&&h.startsWith("\\"))h=h.substring(1);if(fe(h))c=!0;let g=await Le(o,sl(jt(h)),{width:He(h,n)+50,classes:"markdown-node-label",useHtmlLabels:c},n),y,f=1;if(!c){if(s.includes("font-weight: bolder"))p(g).selectAll("tspan").attr("font-weight","");f=g.children.length;let B=g.children[0];if(g.textContent===""||g.textContent.includes("&gt")){if(B.textContent=h[0]+h.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),h[1]===" ")B.textContent=B.textContent[0]+" "+B.textContent.substring(1)}if(B.textContent==="undefined")B.textContent="";y=g.getBBox()}else{let B=g.children[0],v=p(g);if(f=B.innerHTML.split("<br>").length,B.innerHTML.includes("</math>"))f+=B.innerHTML.split("<mrow>").length-1;await td(B),y=B.getBoundingClientRect(),v.attr("width",y.width),v.attr("height",y.height)}return o.attr("transform","translate(0,"+(-y.height/(2*f)+i)+")"),y.height}t(pn,"addText");async function b0(r,e){let i=l(),{theme:s,themeVariables:o}=i,{useGradient:n,borderColorArray:c}=o,h=i.class.padding??12,g=h,y=e.useHtmlLabels??ht(i.htmlLabels)??!0,f=e;f.annotations=f.annotations??[],f.members=f.members??[],f.methods=f.methods??[];let{shapeSvg:B,bbox:v}=await C0(r,e,i,y,g);Ze(B,e.colorIndex,s,c);let{labelStyles:q,nodeStyles:W}=k(e);e.labelStyle=q,e.cssStyles=f.styles||"";let H=f.styles?.join(";")||W||"";if(!e.cssStyles)e.cssStyles=H.replaceAll("!important","").split(";");let Y=f.members.length===0&&f.methods.length===0&&!i.class?.hideEmptyMembersBox,j=m.svg(B),X=Gt(e,{});if(e.look!=="handDrawn")X.roughness=0,X.fillStyle="solid";let Q=Math.max(e.width??0,v.width),rt=Math.max(e.height??0,v.height),it=(e.height??0)>v.height;if(f.members.length===0&&f.methods.length===0)rt+=g;else if(f.members.length>0&&f.methods.length===0)rt+=g*2;let ct=-Q/2,lt=-rt/2,dt=Y?h*2:f.members.length===0&&f.methods.length===0?-h:0;if(it)dt=h*2;let Ct=j.rectangle(ct-h,lt-h-(Y?h:f.members.length===0&&f.methods.length===0?-h/2:0),Q+2*h,rt+2*h+dt,X),Bt=B.insert(()=>Ct,":first-child");Bt.attr("class","basic label-container outer-path");let kt=Bt.node().getBBox(),bt=B.select(".annotation-group").node().getBBox().height-(Y?h/2:0)||0,st=B.select(".label-group").node().getBBox().height-(Y?h/2:0)||0,at=B.select(".members-group").node().getBBox().height-(Y?h/2:0)||0,mt=(bt+st+lt+h-(lt-h-(Y?h:f.members.length===0&&f.methods.length===0?-h/2:0)))/2;if(B.selectAll(".text").each((ot,wt,Lt)=>{let Yt=p(Lt[wt]),Ht=Yt.attr("transform"),he=0;if(Ht){let xe=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Ht);if(xe)he=parseFloat(xe[2])}let ne=he+lt+h-(Y?h:f.members.length===0&&f.methods.length===0?-h/2:0);if(Yt.attr("class").includes("methods-group")){let Ae=Math.max(at,g/2);if(it)ne=Math.max(mt,bt+st+Ae+lt+g*2+h)+g*2;else ne=bt+st+Ae+lt+g*4+h}if(f.members.length===0&&f.methods.length===0&&i.class?.hideEmptyMembersBox)if(f.annotations.length>0)ne=he-g;else ne=he;if(!y)ne-=4;let _e=ct;if(Yt.attr("class").includes("label-group")||Yt.attr("class").includes("annotation-group"))_e=-Yt.node()?.getBBox().width/2||0,B.selectAll("text").each(function(Ae,xe,Wt){if(window.getComputedStyle(Wt[xe]).textAnchor==="middle")_e=0});Yt.attr("transform",`translate(${_e}, ${ne})`)}),f.members.length>0||f.methods.length>0||Y){let ot=bt+st+lt+h,wt=j.line(kt.x,ot,kt.x+kt.width,ot+0.001,X);B.insert(()=>wt).attr("class",`divider${e.look==="neo"&&!n?" neo-line":""}`).attr("style",H)}if(Y||f.members.length>0||f.methods.length>0){let ot=bt+st+at+lt+g*2+h,wt=j.line(kt.x,it?Math.max(mt,ot):ot,kt.x+kt.width,(it?Math.max(mt,ot):ot)+0.001,X);B.insert(()=>wt).attr("class",`divider${e.look==="neo"&&!n?" neo-line":""}`).attr("style",H)}if(f.look!=="handDrawn")B.selectAll("path").attr("style",H);if(Bt.select(":nth-child(2)").attr("style",H),B.selectAll(".divider").select("path").attr("style",H),e.labelStyle)B.selectAll("span").attr("style",e.labelStyle);else B.selectAll("span").attr("style",H);if(!y){let ot=RegExp(/color\s*:\s*([^;]*)/),wt=ot.exec(H);if(wt){let Lt=wt[0].replace("color","fill");B.selectAll("tspan").attr("style",Lt)}else if(q){let Lt=ot.exec(q);if(Lt){let Yt=Lt[0].replace("color","fill");B.selectAll("tspan").attr("style",Yt)}}}return I(e,Bt),e.intersect=function(ot){return w.rect(e,ot)},B}t(b0,"classBox");async function k0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e,n=e,c=20,h=20,g="verifyMethod"in e,y=te(e),f=l(),{themeVariables:B}=f,{borderColorArray:v,requirementEdgeLabelBackground:q}=B,W=f.layout==="elk"?"start":"center",H=r.insert("g").attr("class",y).attr("id",e.domId??e.id),Y;if(g)Y=await Ri(H,`&lt;&lt;${o.type}&gt;&gt;`,0,e.labelStyle);else Y=await Ri(H,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let j=Y,X=await Ri(H,o.name,j,e.labelStyle+"; font-weight: bold;");if(j+=X+h,g){let kt=await Ri(H,`${o.requirementId?`ID: ${o.requirementId}`:""}`,j,e.labelStyle,W);j+=kt;let bt=await Ri(H,`${o.text?`Text: ${o.text}`:""}`,j,e.labelStyle,W);j+=bt;let st=await Ri(H,`${o.risk?`Risk: ${o.risk}`:""}`,j,e.labelStyle,W);j+=st,await Ri(H,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,j,e.labelStyle,W)}else{let kt=await Ri(H,`${n.type?`Type: ${n.type}`:""}`,j,e.labelStyle,W);j+=kt,await Ri(H,`${n.docRef?`Doc Ref: ${n.docRef}`:""}`,j,e.labelStyle,W)}let Q=(H.node()?.getBBox().width??200)+c,rt=(H.node()?.getBBox().height??200)+c,it=-Q/2,ct=-rt/2,lt=m.svg(H),dt=Gt(e,{});if(e.look!=="handDrawn")dt.roughness=0,dt.fillStyle="solid";let Ct=lt.rectangle(it,ct,Q,rt,dt),Bt=H.insert(()=>Ct,":first-child");if(Bt.attr("class","basic label-container outer-path").attr("style",s),v?.length){let kt=e.colorIndex??0;H.attr("data-color-id",`color-${kt%v.length}`)}if(H.selectAll(".label").each((kt,bt,st)=>{let at=p(st[bt]),mt=at.attr("transform"),ot=0,wt=0;if(mt){let he=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(mt);if(he)ot=parseFloat(he[1]),wt=parseFloat(he[2])}let Lt=wt-rt/2,Yt=it+c/2;if(bt===0||bt===1)Yt=ot;at.attr("transform",`translate(${Yt}, ${Lt+c})`)}),j>Y+X+h){let kt=ct+Y+X+h,bt;if(e.look==="neo"){let mt=[[it,kt],[it+Q,kt],[it+Q,kt+0.001],[it,kt+0.001]];bt=lt.polygon(mt,dt)}else bt=lt.line(it,kt,it+Q,kt,dt);H.insert(()=>bt).attr("class","divider")}if(I(e,Bt),e.intersect=function(kt){return w.rect(e,kt)},s&&e.look!=="handDrawn"&&(q||v?.length))H.selectAll("path").attr("style",s);return H}t(k0,"requirementBox");async function Ri(r,e,i,s="",o="center"){if(e==="")return 0;let n=r.insert("g").attr("class","label").attr("style",s),c=l(),h=c.htmlLabels??!0,g=await Le(n,sl(jt(e)),{width:He(e,c)+50,classes:"markdown-node-label",useHtmlLabels:h,style:s},c),y;if(!h){let f=g.children[0];for(let B of f.children)if(s)B.setAttribute("style",s);if(o==="start"){f.setAttribute("text-anchor","start");for(let B of f.children)B.setAttribute("text-anchor","start")}y=g.getBBox(),y.height+=6}else{let f=g.children[0],B=p(g);if(o==="start")p(f).style("text-align","left");y=f.getBoundingClientRect(),B.attr("width",y.width),B.attr("height",y.height)}return n.attr("transform",`translate(${-y.width/2},${-y.height/2+i})`),y.height}t(Ri,"addText");var BS=t((r)=>{switch(r){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 w0(r,e,{config:i}){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s||"";let n=10,c=e.width;e.width=(e.width??200)-10;let{shapeSvg:h,bbox:g,label:y}=await P(r,e,te(e)),f=e.padding||10,B="",v;if("ticket"in e&&e.ticket&&i?.kanban?.ticketBaseUrl)B=i?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),v=h.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",B).attr("target","_blank");let q={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},W,H;if(v)({label:W,bbox:H}=await ls(v,"ticket"in e&&e.ticket||"",q));else({label:W,bbox:H}=await ls(h,"ticket"in e&&e.ticket||"",q));let{label:Y,bbox:j}=await ls(h,"assigned"in e&&e.assigned||"",q);e.width=c;let X=10,Q=e?.width||0,rt=Math.max(H.height,j.height)/2,it=Math.max(g.height+X*2,e?.height||0)+rt,ct=-Q/2,lt=-it/2;y.attr("transform","translate("+(f-Q/2)+", "+(-rt-g.height/2)+")"),W.attr("transform","translate("+(f-Q/2)+", "+(-rt+g.height/2)+")"),Y.attr("transform","translate("+(f+Q/2-j.width-2*n)+", "+(-rt+g.height/2)+")");let dt,{rx:Ct,ry:Bt}=e,{cssStyles:kt}=e;if(e.look==="handDrawn"){let bt=m.svg(h),st=Gt(e,{}),at=Ct||Bt?bt.path(jr(ct,lt,Q,it,Ct||0),st):bt.rectangle(ct,lt,Q,it,st);dt=h.insert(()=>at,":first-child"),dt.attr("class","basic label-container").attr("style",kt?kt:null)}else{dt=h.insert("rect",":first-child"),dt.attr("class","basic label-container __APA__").attr("style",o).attr("rx",Ct??5).attr("ry",Bt??5).attr("x",ct).attr("y",lt).attr("width",Q).attr("height",it);let bt="priority"in e&&e.priority;if(bt){let st=h.append("line"),at=ct+2,mt=lt+Math.floor((Ct??0)/2),ot=lt+it-Math.floor((Ct??0)/2);st.attr("x1",at).attr("y1",mt).attr("x2",at).attr("y2",ot).attr("stroke-width","4").attr("stroke",BS(bt))}}return I(e,dt),e.height=it,e.intersect=function(bt){return w.rect(e,bt)},h}t(w0,"kanbanItem");async function S0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,halfPadding:c,label:h}=await P(r,e,te(e)),g=n.width+10*c,y=n.height+8*c,f=0.15*g,{cssStyles:B}=e,v=n.width+20,q=n.height+20,W=Math.max(g,v),H=Math.max(y,q);h.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`);let Y,j=`M0 0
239
+ l${-i},0`,"createCylinderPathD"),SS=t((r,e,i,s,o,n)=>[`M${r},${e}`,`M${r+i},${e}`,`a${o},${n} 0,0,0 0,${-s}`,`l${-i},0`,`a${o},${n} 0,0,0 0,${s}`,`l${i},0`].join(" "),"createOuterCylinderPathD"),TS=t((r,e,i,s,o,n)=>[`M${r+i/2},${-s/2}`,`a${o},${n} 0,0,0 0,${s}`].join(" "),"createInnerCylinderPathD"),zy=5,Hy=10;async function f0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?12:o/2,c=e.height??0;if(e.height){if(e.height=e.height-n,e.height<zy)e.height=zy}if(e.width){let j=c/2/(2.5+c/50);if(e.width=e.width-n-j*3,e.width<Hy)e.width=Hy}let{shapeSvg:h,bbox:g,label:y}=await P(r,e,re(e)),f=Math.max(e.height??0,g.height)+n,B=f/2,v=B/(2.5+f/50),q=Math.max(e.width??0,g.width)+v+n,{cssStyles:W}=e,H;if(e.look==="handDrawn"){let Y=m.svg(h),j=SS(0,0,q,f,v,B),X=TS(0,0,q,f,v,B),Q=Y.path(j,Gt(e,{})),et=Y.path(X,Gt(e,{fill:"none"}));if(H=h.insert(()=>et,":first-child"),H=h.insert(()=>Q,":first-child"),H.attr("class","basic label-container"),W)H.attr("style",W)}else{let Y=wS(0,0,q,f,v,B);if(H=h.insert("path",":first-child").attr("d",Y).attr("class","basic label-container").attr("style",rr(W)).attr("style",s),H.attr("class","basic label-container outer-path"),W)H.selectAll("path").attr("style",W);if(s)H.selectAll("path").attr("style",s)}return H.attr("label-offset-x",v),H.attr("transform",`translate(${-q/2}, ${f/2} )`),y.attr("transform",`translate(${-(g.width/2)-v-(g.x-(g.left??0))}, ${-(g.height/2)-(g.y-(g.top??0))})`),I(e,H),e.intersect=function(Y){let j=w.rect(e,Y),X=j.y-(e.y??0);if(B!=0&&(Math.abs(X)<(e.height??0)/2||Math.abs(X)==(e.height??0)/2&&Math.abs(j.x-(e.x??0))>(e.width??0)/2-v)){let Q=v*v*(1-X*X/(B*B));if(Q!=0)Q=Math.sqrt(Math.abs(Q));if(Q=v-Q,Y.x-(e.x??0)>0)Q=-Q;j.x+=Q}return j},h}t(f0,"tiltedCylinder");async function d0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?o:o,c=e.look==="neo"?o*2:o,{shapeSvg:h,bbox:g}=await P(r,e,re(e)),y=Math.max(g.height+n,e.height??0),f=Math.max(g.width+c,(e.width??0)-y),B=[{x:-3*y/6,y:0},{x:f+3*y/6,y:0},{x:f,y:-y},{x:0,y:-y}],v,{cssStyles:q}=e;if(e.look==="handDrawn"){let W=m.svg(h),H=Gt(e,{}),Y=$e(B),j=W.path(Y,H);if(v=h.insert(()=>j,":first-child").attr("transform",`translate(${-f/2}, ${y/2})`),q)v.attr("style",q)}else v=io(h,f,y,B);if(s)v.attr("style",s);return e.width=f,e.height=y,I(e,v),e.intersect=function(W){return w.polygon(e,B,W)},h}t(d0,"trapezoid");async function p0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o,h=15,g=5;if(e.width||e.height){if(e.height=(e.height??0)-c*2,e.height<g)e.height=g;if(e.width=(e.width??0)-n*2,e.width<h)e.width=h}let{shapeSvg:y,bbox:f}=await P(r,e,re(e)),B=(e?.width?e?.width:f.width)+n*2,v=(e?.height?e?.height:f.height)+c*2,{cssStyles:q}=e,W=m.svg(y),H=Gt(e,{});if(e.look!=="handDrawn")H.roughness=0,H.fillStyle="solid";let Y=[{x:-B/2*0.8,y:-v/2},{x:B/2*0.8,y:-v/2},{x:B/2,y:-v/2*0.6},{x:B/2,y:v/2},{x:-B/2,y:v/2},{x:-B/2,y:-v/2*0.6}],j=$e(Y),X=W.path(j,H),Q=y.insert(()=>X,":first-child");if(Q.attr("class","basic label-container outer-path"),q&&e.look!=="handDrawn")Q.selectChildren("path").attr("style",q);if(s&&e.look!=="handDrawn")Q.selectChildren("path").attr("style",s);return I(e,Q),e.intersect=function(et){return w.polygon(e,Y,et)},y}t(p0,"trapezoidalPentagon");var Yy=10,Uy=10;async function g0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.width=((e?.width??0)-n)/2,e.width<Uy)e.width=Uy;if(e.height=e?.height??0,e.height<Yy)e.height=Yy}let{shapeSvg:c,bbox:h,label:g}=await P(r,e,re(e)),y=gt(l().flowchart?.htmlLabels),f=(e?.width?e?.width:h.width)+n,B=e?.height?e?.height:f+h.height,v=B,q=[{x:0,y:0},{x:v,y:0},{x:v/2,y:-B}],{cssStyles:W}=e,H=m.svg(c),Y=Gt(e,{});if(e.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let j=$e(q),X=H.path(j,Y),Q=c.insert(()=>X,":first-child").attr("transform",`translate(${-B/2}, ${B/2})`).attr("class","outer-path");if(W&&e.look!=="handDrawn")Q.selectChildren("path").attr("style",W);if(s&&e.look!=="handDrawn")Q.selectChildren("path").attr("style",s);return e.width=f,e.height=B,I(e,Q),g.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${B/2-(h.height+(e.padding??0)/(y?2:1)-(h.y-(h.top??0)))})`),e.intersect=function(et){return a.info("Triangle intersect",e,q,et),w.polygon(e,q,et)},c}t(g0,"triangle");async function m0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?12:o,h=!0;if(e.width||e.height){if(h=!1,e.width=(e?.width??0)-n*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-c*2,e.height<10)e.height=10}let{shapeSvg:g,bbox:y,label:f}=await P(r,e,re(e)),B=(e?.width?e?.width:y.width)+(n??0)*2,v=(e?.height?e?.height:y.height)+(c??0)*2,q=e.look==="neo"?v/4:v/8,W=v+(h?q:-q),{cssStyles:H}=e,j=14-B,X=j>0?j/2:0,Q=m.svg(g),et=Gt(e,{});if(e.look!=="handDrawn")et.roughness=0,et.fillStyle="solid";let it=[{x:-B/2-X,y:W/2},...Zo(-B/2-X,W/2,B/2+X,W/2,q,0.8),{x:B/2+X,y:-W/2},{x:-B/2-X,y:-W/2}],ht=$e(it),lt=Q.path(ht,et),ft=g.insert(()=>lt,":first-child");if(ft.attr("class","basic label-container outer-path"),H&&e.look!=="handDrawn")ft.selectAll("path").attr("style",H);if(s&&e.look!=="handDrawn")ft.selectAll("path").attr("style",s);return ft.attr("transform",`translate(0,${-q/2})`),f.attr("transform",`translate(${-B/2+(e.padding??0)-(y.x-(y.left??0))},${-v/2+(e.padding??0)-q-(y.y-(y.top??0))})`),I(e,ft),e.intersect=function(xt){return w.polygon(e,it,xt)},g}t(m0,"waveEdgedRectangle");async function y0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.padding??0,n=e.look==="neo"?16:o,c=e.look==="neo"?20:o;if(e.width||e.height){if(e.width=e?.width??0,e.width<20)e.width=20;if(e.height=e?.height??0,e.height<10)e.height=10;let et=Math.min(e.height*0.2,e.height/4);e.height=Math.ceil(e.height-c-et*2.2222222222222223),e.width=e.width-n*2}let{shapeSvg:h,bbox:g}=await P(r,e,re(e)),y=(e?.width?e?.width:g.width)+n*2,f=(e?.height?e?.height:g.height)+c,B=f/8,v=f+B*2,{cssStyles:q}=e,W=m.svg(h),H=Gt(e,{});if(e.look!=="handDrawn")H.roughness=0,H.fillStyle="solid";let Y=[{x:-y/2,y:v/2},...Zo(-y/2,v/2,y/2,v/2,B,1),{x:y/2,y:-v/2},...Zo(y/2,-v/2,-y/2,-v/2,B,-1)],j=$e(Y),X=W.path(j,H),Q=h.insert(()=>X,":first-child");if(Q.attr("class","basic label-container"),q&&e.look!=="handDrawn")Q.selectAll("path").attr("style",q);if(s&&e.look!=="handDrawn")Q.selectAll("path").attr("style",s);return I(e,Q),e.intersect=function(et){return w.polygon(e,Y,et)},h}t(y0,"waveRectangle");var or=10;async function x0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,n=e.look==="neo"?12:e.padding??0;if(e.width||e.height)e.width=Math.max((e?.width??0)-o*2-or,10),e.height=Math.max((e?.height??0)-n*2-or,10);let{shapeSvg:c,bbox:h,label:g}=await P(r,e,re(e)),y=(e?.width?e?.width:h.width)+o*2+or,f=(e?.height?e?.height:h.height)+n*2+or,B=y-or,v=f-or,q=-B/2,W=-v/2,{cssStyles:H}=e,Y=m.svg(c),j=Gt(e,{}),X=[{x:q-or,y:W-or},{x:q-or,y:W+v},{x:q+B,y:W+v},{x:q+B,y:W-or}],Q=`M${q-or},${W-or} L${q+B},${W-or} L${q+B},${W+v} L${q-or},${W+v} L${q-or},${W-or}
240
+ M${q-or},${W} L${q+B},${W}
241
+ M${q},${W-or} L${q},${W+v}`;if(e.look!=="handDrawn")j.roughness=0,j.fillStyle="solid";let et=Y.path(Q,j),it=c.insert(()=>et,":first-child");if(it.attr("transform",`translate(${or/2}, ${or/2})`),it.attr("class","basic label-container outer-path"),H&&e.look!=="handDrawn")it.selectAll("path").attr("style",H);if(s&&e.look!=="handDrawn")it.selectAll("path").attr("style",s);return g.attr("transform",`translate(${-(h.width/2)+or/2-(h.x-(h.left??0))}, ${-(h.height/2)+or/2-(h.y-(h.top??0))})`),I(e,it),e.intersect=function(ht){return w.polygon(e,X,ht)},c}t(x0,"windowPane");var jy=new Set(["redux-color","redux-dark-color"]),_S=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function sd(r,e){let i=e;if(i.alias)e.label=i.alias;let{theme:s,themeVariables:o}=x(),{rowEven:n,rowOdd:c,nodeBorder:h,borderColorArray:g}=o;if(e.look==="handDrawn"){let{themeVariables:Ht}=x(),{background:ne}=Ht,me={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ne}`]};await sd(r,me)}let y=x();e.useHtmlLabels=y.htmlLabels;let f=y.er?.diagramPadding??10,B=y.er?.entityPadding??6,{cssStyles:v}=e,{labelStyles:q,nodeStyles:W}=k(e);if(i.attributes.length===0&&e.label){let Ht={rx:0,ry:0,labelPaddingX:f,labelPaddingY:f*1.5,classes:""};if(Ye(e.label,y)+Ht.labelPaddingX*2<y.er.minEntityWidth)e.width=y.er.minEntityWidth;let ne=await Ws(r,e,Ht);if(s!=null&&jy.has(s)){let me=i.colorIndex??0;ne.attr("data-color-id",`color-${me%g.length}`)}if(!gt(y.htmlLabels)){let me=ne.select("text"),xe=me.node()?.getBBox();me.attr("transform",`translate(${-xe.width/2}, 0)`)}return ne}if(!y.htmlLabels)f*=1.25,B*=1.25;let H=re(e);if(!H)H="node default";let Y=r.insert("g").attr("class",H).attr("id",e.domId||e.id),j=await qs(Y,e.label??"",y,0,0,["name"],q);j.height+=B;let X=0,Q=[],et=[],it=0,ht=0,lt=0,ft=0,xt=!0,Lt=!0;for(let Ht of i.attributes){let ne=await qs(Y,Ht.type,y,0,X,["attribute-type"],q);it=Math.max(it,ne.width+f);let me=await qs(Y,Ht.name,y,0,X,["attribute-name"],q);ht=Math.max(ht,me.width+f);let xe=await qs(Y,Ht.keys.join(),y,0,X,["attribute-keys"],q);lt=Math.max(lt,xe.width+f);let Je=await qs(Y,Ht.comment,y,0,X,["attribute-comment"],q);ft=Math.max(ft,Je.width+f);let Qe=Math.max(ne.height,me.height,xe.height,Je.height)+B;et.push({yOffset:X,rowHeight:Qe}),X+=Qe}let kt=4;if(lt<=f)xt=!1,lt=0,kt--;if(ft<=f)Lt=!1,ft=0,kt--;let Ct=Y.node().getBBox();if(j.width+f*2-(it+ht+lt+ft)>0){let Ht=j.width+f*2-(it+ht+lt+ft);if(it+=Ht/kt,ht+=Ht/kt,lt>0)lt+=Ht/kt;if(ft>0)ft+=Ht/kt}let st=it+ht+lt+ft,at=m.svg(Y),pt=Gt(e,{});if(e.look!=="handDrawn")pt.roughness=0,pt.fillStyle="solid";let ot=0;if(et.length>0)ot=et.reduce((Ht,ne)=>Ht+(ne?.rowHeight??0),0);let wt=Math.max(Ct.width+f*2,e?.width||0,st),At=Math.max((ot??0)+j.height,e?.height||0),jt=-wt/2,Yt=-At/2;if(Y.selectAll("g:not(:first-child)").each((Ht,ne,me)=>{let xe=p(me[ne]),Je=xe.attr("transform"),Qe=0,Ci=0;if(Je){let pi=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Je);if(pi){if(Qe=parseFloat(pi[1]),Ci=parseFloat(pi[2]),xe.attr("class").includes("attribute-name"))Qe+=it;else if(xe.attr("class").includes("attribute-keys"))Qe+=it+ht;else if(xe.attr("class").includes("attribute-comment"))Qe+=it+ht+lt}}xe.attr("transform",`translate(${jt+f/2+Qe}, ${Ci+Yt+j.height+B/2})`)}),Y.select(".name").attr("transform","translate("+-j.width/2+", "+(Yt+B/2)+")"),s!=null&&jy.has(s)){let Ht=i.colorIndex??0;Y.attr("data-color-id",`color-${Ht%g.length}`)}let ue=at.rectangle(jt,Yt,wt,At,pt),ce=Y.insert(()=>ue,":first-child").attr("class","outer-path").attr("style",v.join(""));Q.push(0);for(let[Ht,ne]of et.entries()){let xe=(Ht+1)%2===0&&ne.yOffset!==0,Je=at.rectangle(jt,j.height+Yt+ne?.yOffset,wt,ne?.rowHeight,{...pt,fill:xe?n:c,stroke:h});Y.insert(()=>Je,"g.label").attr("style",v.join("")).attr("class",`row-rect-${xe?"even":"odd"}`)}let Ae=0.0001,Oe=Ns(jt,j.height+Yt,wt+jt,j.height+Yt,Ae),we=at.polygon(Oe.map((Ht)=>[Ht.x,Ht.y]),pt);if(Y.insert(()=>we).attr("class","divider"),Oe=Ns(it+jt,j.height+Yt,it+jt,At+Yt,Ae),we=at.polygon(Oe.map((Ht)=>[Ht.x,Ht.y]),pt),Y.insert(()=>we).attr("class","divider"),xt){let Ht=it+ht+jt;Oe=Ns(Ht,j.height+Yt,Ht,At+Yt,Ae),we=at.polygon(Oe.map((ne)=>[ne.x,ne.y]),pt),Y.insert(()=>we).attr("class","divider")}if(Lt){let Ht=it+ht+lt+jt;Oe=Ns(Ht,j.height+Yt,Ht,At+Yt,Ae),we=at.polygon(Oe.map((ne)=>[ne.x,ne.y]),pt),Y.insert(()=>we).attr("class","divider")}for(let Ht of Q){let ne=j.height+Yt+Ht;Oe=Ns(jt,ne,wt+jt,ne,Ae),we=at.polygon(Oe.map((me)=>[me.x,me.y]),pt),Y.insert(()=>we).attr("class","divider")}if(I(e,ce),W&&e.look!=="handDrawn")if(s!=null&&_S.has(s))Y.selectAll("path").attr("style",W);else{let ne=W.split(";")?.filter((me)=>me.includes("stroke"))?.map((me)=>`${me}`).join("; ");Y.selectAll("path").attr("style",ne??""),Y.selectAll(".row-rect-even path").attr("style",W)}return e.intersect=function(Ht){return w.rect(e,Ht)},Y}t(sd,"erBox");async function qs(r,e,i,s=0,o=0,n=[],c=""){let h=r.insert("g").attr("class",`label ${n.join(" ")}`).attr("transform",`translate(${s}, ${o})`).attr("style",c);if(e!==Kt(e))e=Kt(e),e=e.replaceAll("<","&lt;").replaceAll(">","&gt;");let g=h.node().appendChild(await Le(h,e,{width:Ye(e,i)+100,style:c,useHtmlLabels:i.htmlLabels},i));if(e.includes("&lt;")||e.includes("&gt;")){let f=g.children[0];f.textContent=f.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");while(f.childNodes[0])f=f.childNodes[0],f.textContent=f.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let y=g.getBBox();if(gt(i.htmlLabels)){let f=g.children[0];f.style.textAlign="start";let B=p(g);y=f.getBoundingClientRect(),B.attr("width",y.width),B.attr("height",y.height)}return y}t(qs,"addText");function Ns(r,e,i,s,o){if(r===i)return[{x:r-o/2,y:e},{x:r+o/2,y:e},{x:i+o/2,y:s},{x:i-o/2,y:s}];return[{x:r,y:e-o/2},{x:r,y:e+o/2},{x:i,y:s+o/2},{x:i,y:s-o/2}]}t(Ns,"lineToPolygon");async function C0(r,e,i,s,o=i.class.padding??12){let n=!s?3:0,c=r.insert("g").attr("class",re(e)).attr("id",e.domId||e.id),h=null,g=null,y=null,f=null,B=0,v=0,q=0;if(h=c.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let X=e.annotations[0];await pn(h,{text:`«${X}»`},0),B=h.node().getBBox().height}g=c.insert("g").attr("class","label-group text"),await pn(g,e,0,["font-weight: bolder"]);let W=g.node().getBBox();v=W.height,y=c.insert("g").attr("class","members-group text");let H=0;for(let X of e.members){let Q=await pn(y,X,H,[X.parseClassifier()]);H+=Q+n}if(q=y.node().getBBox().height,q<=0)q=o/2;f=c.insert("g").attr("class","methods-group text");let Y=0;for(let X of e.methods){let Q=await pn(f,X,Y,[X.parseClassifier()]);Y+=Q+n}let j=c.node().getBBox();if(h!==null){let X=h.node().getBBox();h.attr("transform",`translate(${-X.width/2})`)}return g.attr("transform",`translate(${-W.width/2}, ${B})`),j=c.node().getBBox(),y.attr("transform",`translate(0, ${B+v+o*2})`),j=c.node().getBBox(),f.attr("transform",`translate(0, ${B+v+(q?q+o*4:o*2)})`),j=c.node().getBBox(),{shapeSvg:c,bbox:j}}t(C0,"textHelper");async function pn(r,e,i,s=[]){let o=r.insert("g").attr("class","label").attr("style",s.join("; ")),n=x(),c="useHtmlLabels"in e?e.useHtmlLabels:gt(n.htmlLabels)??!0,h="";if("text"in e)h=e.text;else h=e.label;if(!c&&h.startsWith("\\"))h=h.substring(1);if(fe(h))c=!0;let g=await Le(o,sl(Ut(h)),{width:Ye(h,n)+50,classes:"markdown-node-label",useHtmlLabels:c},n),y,f=1;if(!c){if(s.includes("font-weight: bolder"))p(g).selectAll("tspan").attr("font-weight","");f=g.children.length;let B=g.children[0];if(g.textContent===""||g.textContent.includes("&gt")){if(B.textContent=h[0]+h.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),h[1]===" ")B.textContent=B.textContent[0]+" "+B.textContent.substring(1)}if(B.textContent==="undefined")B.textContent="";y=g.getBBox()}else{let B=g.children[0],v=p(g);if(f=B.innerHTML.split("<br>").length,B.innerHTML.includes("</math>"))f+=B.innerHTML.split("<mrow>").length-1;await td(B),y=B.getBoundingClientRect(),v.attr("width",y.width),v.attr("height",y.height)}return o.attr("transform","translate(0,"+(-y.height/(2*f)+i)+")"),y.height}t(pn,"addText");async function b0(r,e){let i=l(),{theme:s,themeVariables:o}=i,{useGradient:n,borderColorArray:c}=o,h=i.class.padding??12,g=h,y=e.useHtmlLabels??gt(i.htmlLabels)??!0,f=e;f.annotations=f.annotations??[],f.members=f.members??[],f.methods=f.methods??[];let{shapeSvg:B,bbox:v}=await C0(r,e,i,y,g);Xe(B,e.colorIndex,s,c);let{labelStyles:q,nodeStyles:W}=k(e);e.labelStyle=q,e.cssStyles=f.styles||"";let H=f.styles?.join(";")||W||"";if(!e.cssStyles)e.cssStyles=H.replaceAll("!important","").split(";");let Y=f.members.length===0&&f.methods.length===0&&!i.class?.hideEmptyMembersBox,j=m.svg(B),X=Gt(e,{});if(e.look!=="handDrawn")X.roughness=0,X.fillStyle="solid";let Q=Math.max(e.width??0,v.width),et=Math.max(e.height??0,v.height),it=(e.height??0)>v.height;if(f.members.length===0&&f.methods.length===0)et+=g;else if(f.members.length>0&&f.methods.length===0)et+=g*2;let ht=-Q/2,lt=-et/2,ft=Y?h*2:f.members.length===0&&f.methods.length===0?-h:0;if(it)ft=h*2;let xt=j.rectangle(ht-h,lt-h-(Y?h:f.members.length===0&&f.methods.length===0?-h/2:0),Q+2*h,et+2*h+ft,X),Lt=B.insert(()=>xt,":first-child");Lt.attr("class","basic label-container outer-path");let kt=Lt.node().getBBox(),Ct=B.select(".annotation-group").node().getBBox().height-(Y?h/2:0)||0,st=B.select(".label-group").node().getBBox().height-(Y?h/2:0)||0,at=B.select(".members-group").node().getBBox().height-(Y?h/2:0)||0,pt=(Ct+st+lt+h-(lt-h-(Y?h:f.members.length===0&&f.methods.length===0?-h/2:0)))/2;if(B.selectAll(".text").each((ot,wt,At)=>{let jt=p(At[wt]),Yt=jt.attr("transform"),ue=0;if(Yt){let we=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Yt);if(we)ue=parseFloat(we[2])}let ce=ue+lt+h-(Y?h:f.members.length===0&&f.methods.length===0?-h/2:0);if(jt.attr("class").includes("methods-group")){let Oe=Math.max(at,g/2);if(it)ce=Math.max(pt,Ct+st+Oe+lt+g*2+h)+g*2;else ce=Ct+st+Oe+lt+g*4+h}if(f.members.length===0&&f.methods.length===0&&i.class?.hideEmptyMembersBox)if(f.annotations.length>0)ce=ue-g;else ce=ue;if(!y)ce-=4;let Ae=ht;if(jt.attr("class").includes("label-group")||jt.attr("class").includes("annotation-group"))Ae=-jt.node()?.getBBox().width/2||0,B.selectAll("text").each(function(Oe,we,Ht){if(window.getComputedStyle(Ht[we]).textAnchor==="middle")Ae=0});jt.attr("transform",`translate(${Ae}, ${ce})`)}),f.members.length>0||f.methods.length>0||Y){let ot=Ct+st+lt+h,wt=j.line(kt.x,ot,kt.x+kt.width,ot+0.001,X);B.insert(()=>wt).attr("class",`divider${e.look==="neo"&&!n?" neo-line":""}`).attr("style",H)}if(Y||f.members.length>0||f.methods.length>0){let ot=Ct+st+at+lt+g*2+h,wt=j.line(kt.x,it?Math.max(pt,ot):ot,kt.x+kt.width,(it?Math.max(pt,ot):ot)+0.001,X);B.insert(()=>wt).attr("class",`divider${e.look==="neo"&&!n?" neo-line":""}`).attr("style",H)}if(f.look!=="handDrawn")B.selectAll("path").attr("style",H);if(Lt.select(":nth-child(2)").attr("style",H),B.selectAll(".divider").select("path").attr("style",H),e.labelStyle)B.selectAll("span").attr("style",e.labelStyle);else B.selectAll("span").attr("style",H);if(!y){let ot=RegExp(/color\s*:\s*([^;]*)/),wt=ot.exec(H);if(wt){let At=wt[0].replace("color","fill");B.selectAll("tspan").attr("style",At)}else if(q){let At=ot.exec(q);if(At){let jt=At[0].replace("color","fill");B.selectAll("tspan").attr("style",jt)}}}return I(e,Lt),e.intersect=function(ot){return w.rect(e,ot)},B}t(b0,"classBox");async function k0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let o=e,n=e,c=20,h=20,g="verifyMethod"in e,y=re(e),f=l(),{themeVariables:B}=f,{borderColorArray:v,requirementEdgeLabelBackground:q}=B,W=f.layout==="elk"?"start":"center",H=r.insert("g").attr("class",y).attr("id",e.domId??e.id),Y;if(g)Y=await to(H,`&lt;&lt;${o.type}&gt;&gt;`,0,e.labelStyle);else Y=await to(H,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let j=Y,X=await to(H,o.name,j,e.labelStyle+"; font-weight: bold;");if(j+=X+h,g){let kt=await to(H,`${o.requirementId?`ID: ${o.requirementId}`:""}`,j,e.labelStyle,W);j+=kt;let Ct=await to(H,`${o.text?`Text: ${o.text}`:""}`,j,e.labelStyle,W);j+=Ct;let st=await to(H,`${o.risk?`Risk: ${o.risk}`:""}`,j,e.labelStyle,W);j+=st,await to(H,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,j,e.labelStyle,W)}else{let kt=await to(H,`${n.type?`Type: ${n.type}`:""}`,j,e.labelStyle,W);j+=kt,await to(H,`${n.docRef?`Doc Ref: ${n.docRef}`:""}`,j,e.labelStyle,W)}let Q=(H.node()?.getBBox().width??200)+c,et=(H.node()?.getBBox().height??200)+c,it=-Q/2,ht=-et/2,lt=m.svg(H),ft=Gt(e,{});if(e.look!=="handDrawn")ft.roughness=0,ft.fillStyle="solid";let xt=lt.rectangle(it,ht,Q,et,ft),Lt=H.insert(()=>xt,":first-child");if(Lt.attr("class","basic label-container outer-path").attr("style",s),v?.length){let kt=e.colorIndex??0;H.attr("data-color-id",`color-${kt%v.length}`)}if(H.selectAll(".label").each((kt,Ct,st)=>{let at=p(st[Ct]),pt=at.attr("transform"),ot=0,wt=0;if(pt){let ue=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(pt);if(ue)ot=parseFloat(ue[1]),wt=parseFloat(ue[2])}let At=wt-et/2,jt=it+c/2;if(Ct===0||Ct===1)jt=ot;at.attr("transform",`translate(${jt}, ${At+c})`)}),j>Y+X+h){let kt=ht+Y+X+h,Ct;if(e.look==="neo"){let pt=[[it,kt],[it+Q,kt],[it+Q,kt+0.001],[it,kt+0.001]];Ct=lt.polygon(pt,ft)}else Ct=lt.line(it,kt,it+Q,kt,ft);H.insert(()=>Ct).attr("class","divider")}if(I(e,Lt),e.intersect=function(kt){return w.rect(e,kt)},s&&e.look!=="handDrawn"&&(q||v?.length))H.selectAll("path").attr("style",s);return H}t(k0,"requirementBox");async function to(r,e,i,s="",o="center"){if(e==="")return 0;let n=r.insert("g").attr("class","label").attr("style",s),c=l(),h=c.htmlLabels??!0,g=await Le(n,sl(Ut(e)),{width:Ye(e,c)+50,classes:"markdown-node-label",useHtmlLabels:h,style:s},c),y;if(!h){let f=g.children[0];for(let B of f.children)if(s)B.setAttribute("style",s);if(o==="start"){f.setAttribute("text-anchor","start");for(let B of f.children)B.setAttribute("text-anchor","start")}y=g.getBBox(),y.height+=6}else{let f=g.children[0],B=p(g);if(o==="start")p(f).style("text-align","left");y=f.getBoundingClientRect(),B.attr("width",y.width),B.attr("height",y.height)}return n.attr("transform",`translate(${-y.width/2},${-y.height/2+i})`),y.height}t(to,"addText");var BS=t((r)=>{switch(r){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 w0(r,e,{config:i}){let{labelStyles:s,nodeStyles:o}=k(e);e.labelStyle=s||"";let n=10,c=e.width;e.width=(e.width??200)-10;let{shapeSvg:h,bbox:g,label:y}=await P(r,e,re(e)),f=e.padding||10,B="",v;if("ticket"in e&&e.ticket&&i?.kanban?.ticketBaseUrl)B=i?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),v=h.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",B).attr("target","_blank");let q={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},W,H;if(v)({label:W,bbox:H}=await hs(v,"ticket"in e&&e.ticket||"",q));else({label:W,bbox:H}=await hs(h,"ticket"in e&&e.ticket||"",q));let{label:Y,bbox:j}=await hs(h,"assigned"in e&&e.assigned||"",q);e.width=c;let X=10,Q=e?.width||0,et=Math.max(H.height,j.height)/2,it=Math.max(g.height+X*2,e?.height||0)+et,ht=-Q/2,lt=-it/2;y.attr("transform","translate("+(f-Q/2)+", "+(-et-g.height/2)+")"),W.attr("transform","translate("+(f-Q/2)+", "+(-et+g.height/2)+")"),Y.attr("transform","translate("+(f+Q/2-j.width-2*n)+", "+(-et+g.height/2)+")");let ft,{rx:xt,ry:Lt}=e,{cssStyles:kt}=e;if(e.look==="handDrawn"){let Ct=m.svg(h),st=Gt(e,{}),at=xt||Lt?Ct.path(ci(ht,lt,Q,it,xt||0),st):Ct.rectangle(ht,lt,Q,it,st);ft=h.insert(()=>at,":first-child"),ft.attr("class","basic label-container").attr("style",kt?kt:null)}else{ft=h.insert("rect",":first-child"),ft.attr("class","basic label-container __APA__").attr("style",o).attr("rx",xt??5).attr("ry",Lt??5).attr("x",ht).attr("y",lt).attr("width",Q).attr("height",it);let Ct="priority"in e&&e.priority;if(Ct){let st=h.append("line"),at=ht+2,pt=lt+Math.floor((xt??0)/2),ot=lt+it-Math.floor((xt??0)/2);st.attr("x1",at).attr("y1",pt).attr("x2",at).attr("y2",ot).attr("stroke-width","4").attr("stroke",BS(Ct))}}return I(e,ft),e.height=it,e.intersect=function(Ct){return w.rect(e,Ct)},h}t(w0,"kanbanItem");async function S0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,halfPadding:c,label:h}=await P(r,e,re(e)),g=n.width+10*c,y=n.height+8*c,f=0.15*g,{cssStyles:B}=e,v=n.width+20,q=n.height+20,W=Math.max(g,v),H=Math.max(y,q);h.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`);let Y,j=`M0 0
242
242
  a${f},${f} 1 0,0 ${W*0.25},${-1*H*0.1}
243
243
  a${f},${f} 1 0,0 ${W*0.25},0
244
244
  a${f},${f} 1 0,0 ${W*0.25},0
@@ -256,7 +256,7 @@ ${o.join(`
256
256
  a${f},${f} 1 0,0 ${-1*W*0.1},${-1*H*0.33}
257
257
  a${f*0.8},${f*0.8} 1 0,0 0,${-1*H*0.34}
258
258
  a${f},${f} 1 0,0 ${W*0.1},${-1*H*0.33}
259
- H0 V0 Z`;if(e.look==="handDrawn"){let X=m.svg(o),Q=Gt(e,{}),rt=X.path(j,Q);Y=o.insert(()=>rt,":first-child"),Y.attr("class","basic label-container").attr("style",tr(B))}else Y=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",j);return Y.attr("transform",`translate(${-W/2}, ${-H/2})`),I(e,Y),e.calcIntersect=function(X,Q){return w.rect(X,Q)},e.intersect=function(X){return a.info("Bang intersect",e,X),w.rect(e,X)},o}t(S0,"bang");async function T0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,halfPadding:c,label:h}=await P(r,e,te(e)),g=n.width+2*c,y=n.height+2*c,f=0.15*g,B=0.25*g,v=0.35*g,q=0.2*g,{cssStyles:W}=e,H,Y=`M0 0
259
+ H0 V0 Z`;if(e.look==="handDrawn"){let X=m.svg(o),Q=Gt(e,{}),et=X.path(j,Q);Y=o.insert(()=>et,":first-child"),Y.attr("class","basic label-container").attr("style",rr(B))}else Y=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",j);return Y.attr("transform",`translate(${-W/2}, ${-H/2})`),I(e,Y),e.calcIntersect=function(X,Q){return w.rect(X,Q)},e.intersect=function(X){return a.info("Bang intersect",e,X),w.rect(e,X)},o}t(S0,"bang");async function T0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,halfPadding:c,label:h}=await P(r,e,re(e)),g=n.width+2*c,y=n.height+2*c,f=0.15*g,B=0.25*g,v=0.35*g,q=0.2*g,{cssStyles:W}=e,H,Y=`M0 0
260
260
  a${f},${f} 0 0,1 ${g*0.25},${-1*g*0.1}
261
261
  a${v},${v} 1 0,1 ${g*0.4},${-1*g*0.1}
262
262
  a${B},${B} 1 0,1 ${g*0.35},${g*0.2}
@@ -270,7 +270,7 @@ ${o.join(`
270
270
 
271
271
  a${f},${f} 1 0,1 ${-1*g*0.1},${-1*y*0.35}
272
272
  a${q},${q} 1 0,1 ${g*0.1},${-1*y*0.65}
273
- H0 V0 Z`;if(e.look==="handDrawn"){let j=m.svg(o),X=Gt(e,{}),Q=j.path(Y,X);H=o.insert(()=>Q,":first-child"),H.attr("class","basic label-container").attr("style",tr(W))}else H=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",Y);return h.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),H.attr("transform",`translate(${-g/2}, ${-y/2})`),I(e,H),e.calcIntersect=function(j,X){return w.rect(j,X)},e.intersect=function(j){return a.info("Cloud intersect",e,j),w.rect(e,j)},o}t(T0,"cloud");async function _0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,halfPadding:c,label:h}=await P(r,e,te(e)),g=n.width+8*c,y=n.height+2*c,f=5,B=e.look==="neo"?`
273
+ H0 V0 Z`;if(e.look==="handDrawn"){let j=m.svg(o),X=Gt(e,{}),Q=j.path(Y,X);H=o.insert(()=>Q,":first-child"),H.attr("class","basic label-container").attr("style",rr(W))}else H=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",Y);return h.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),H.attr("transform",`translate(${-g/2}, ${-y/2})`),I(e,H),e.calcIntersect=function(j,X){return w.rect(j,X)},e.intersect=function(j){return a.info("Cloud intersect",e,j),w.rect(e,j)},o}t(T0,"cloud");async function _0(r,e){let{labelStyles:i,nodeStyles:s}=k(e);e.labelStyle=i;let{shapeSvg:o,bbox:n,halfPadding:c,label:h}=await P(r,e,re(e)),g=n.width+8*c,y=n.height+2*c,f=5,B=e.look==="neo"?`
274
274
  M${-g/2} ${y/2-f}
275
275
  v${-y+2*f}
276
276
  q0,-${f} ${f},-${f}
@@ -290,14 +290,14 @@ ${o.join(`
290
290
  h${-(g-2*f)}
291
291
  q${-f},0 ${-f},${-f}
292
292
  Z
293
- `;if(!e.domId)throw Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);let v=o.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",s).attr("d",B);return o.append("line").attr("class","node-line-").attr("x1",-g/2).attr("y1",y/2).attr("x2",g/2).attr("y2",y/2),h.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),o.append(()=>h.node()),I(e,v),e.calcIntersect=function(q,W){return w.rect(q,W)},e.intersect=function(q){return w.rect(e,q)},o}t(_0,"defaultMindmapNode");async function B0(r,e){let i={padding:e.padding??0};return id(r,e,i)}t(B0,"mindmapCircle");var vS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:i0},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:t0},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:o0},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:l0},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:xx},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Cx},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:_x},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:rx},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:cx},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:ax},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:yx},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:id},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:S0},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:T0},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Zx},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Lx},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Rx},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Px},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:d0},{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:$x},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:kx},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:u0},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:nx},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:e0},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:n0},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:a0},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Bx},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Fx},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:dx},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:px},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:gx},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:qx},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:m0},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:vx},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:f0},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Nx},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:mx},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:bx},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:g0},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:x0},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Sx},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:p0},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Tx},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:r0},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Vx},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Xx},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:ex},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:fx},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:c0},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:h0},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:y0},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Qx},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Wx}],LS=t(()=>{let e=[...Object.entries({state:s0,choice:lx,note:Kx,composite:hx,rectWithTitle:Jx,labelRect:Dx,block_arrow:sx,collapsedGroup:ox,iconSquare:Ox,iconCircle:Mx,icon:Ax,iconRounded:Ex,imageSquare:Ix,anchor:Jy,kanbanItem:w0,mindmapCircle:B0,defaultMindmapNode:_0,classBox:b0,erBox:sd,requirementBox:k0,usecaseActor:zx,usecaseActorHollow:Yx,usecaseActorAwesome:Hx,usecaseActorIcon:Ux,usecaseBusiness:jx,usecaseEllipse:wx,usecaseJsonTable:Gx}),...vS.flatMap((i)=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map((o)=>[o,i.handler]))];return Object.fromEntries(e)},"generateShapeMap"),ea=LS();function Nr(r){return r in ea}t(Nr,"isValidShape");var Tt=t(({flowchart:r})=>{let e=r?.subGraphTitleMargin?.top??0,i=r?.subGraphTitleMargin?.bottom??0,s=e+i;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:s}},"getSubGraphTitleMargins"),lh=new Map;async function Et(r,e,i){let s,o;if(e.shape==="rect")if(e.rx&&e.ry)e.shape="roundedRect";else e.shape="squareRect";let n=e.shape?ea[e.shape]:void 0;if(!n)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let c;if(i.config.securityLevel==="sandbox")c="_top";else if(e.linkTarget)c=e.linkTarget||"_blank";s=r.insert("svg:a").attr("xlink:href",e.link).attr("target",c??null),o=await n(s,e,i)}else o=await n(r,e,i),s=o;if(s.attr("data-look",tr(e.look)),e.tooltip)o.attr("title",e.tooltip);if(lh.set(e.id,s),e.haveCallback)s.attr("class",s.attr("class")+" clickable");return s}t(Et,"insertNode");var ko=t((r,e)=>{lh.set(e.id,r)},"setNodeElem"),Co=t(()=>{lh.clear()},"clear"),vt=t((r)=>{let e=lh.get(r.id);a.trace("Transforming node",r.diff,r,"translate("+(r.x-r.width/2-5)+", "+r.width/2+")");let i=8,s=r.diff||0;if(r.clusterNode)e.attr("transform","translate("+(r.x+s-r.width/2)+", "+(r.y-r.height/2-i)+")");else e.attr("transform","translate("+r.x+", "+r.y+")");return s},"positionNode");var FS=t(async(r,e)=>{let i=l(),{theme:s,themeVariables:o,handDrawnSeed:n}=i,{clusterBkg:c,clusterBorder:h,borderColorArray:g}=o,y=h,{labelStyles:f,nodeStyles:B,borderStyles:v,backgroundStyles:q}=k(e),W=r.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.domId??e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look);Ze(W,e.colorIndex,s,g);let H=ht(i.flowchart.htmlLabels),Y=e.direction==="LR",j=W.insert("g").attr("class","cluster-label swimlane-label"),X=await Le(j,e.label,{style:e.labelStyle,useHtmlLabels:H,isNode:!0,width:e.width}),Q=X.getBBox();if(H){let mt=X.children[0],ot=p(X);Q=mt.getBoundingClientRect(),ot.attr("width",Q.width),ot.attr("height",Q.height)}let rt=e.padding??0,it=e.width<=Q.width+rt?Q.width+rt:e.width;if(e.width<=Q.width+rt)e.diff=(it-e.width)/2-rt;else e.diff=-rt;let ct=e.height,lt=e.y-ct/2,dt=e.y+ct/2,Ct=e.x-it/2,Bt=e.swimlaneContentTop!==void 0?e.swimlaneContentTop:lt+ct/3,kt=Y?4:0,bt=Q.height+2*kt,st,at;if(Y){let mt=Math.max(bt,Q.height+2*kt),ot=Ct+mt,wt=Math.max(0,it-mt);if(e.look==="handDrawn"){let Ht=m.svg(W),he=Gt(e,{roughness:0.7,fill:c,stroke:y,seed:n}),ne=Gt(e,{roughness:0.7,fill:"none",stroke:y,seed:n}),_e=Ht.rectangle(Ct,lt,mt,ct,he);st=W.insert(()=>_e,":first-child").attr("class","swimlane-title");let Ae=Ht.rectangle(ot,lt,wt,ct,ne);at=W.insert(()=>Ae,":first-child").attr("class","swimlane-body"),st.select("path:nth-child(2)").attr("style",v.join(";")),st.select("path").attr("style",q.join(";").replace("fill","stroke"))}else st=W.insert("rect",":first-child"),at=W.insert("rect",":first-child"),st.attr("class","swimlane-title").attr("style",B).attr("x",Ct).attr("y",lt).attr("width",mt).attr("height",ct).attr("fill",c).attr("stroke",y),at.attr("class","swimlane-body").attr("style",B).attr("x",ot).attr("y",lt).attr("width",wt).attr("height",ct).attr("fill","none").attr("stroke",y);let Lt=Ct+mt/2,Yt=e.y;j.attr("transform",`translate(${Lt}, ${Yt}) rotate(-90) translate(${-Q.width/2}, ${-Q.height/2})`)}else{let mt=Math.max(0,Bt-lt),ot=Math.min(bt,mt),wt=lt+ot,Lt=Math.max(0,dt-wt),Yt=e.x-it/2;if(e.look==="handDrawn"){let ne=m.svg(W),_e=Gt(e,{roughness:0.7,fill:c,stroke:y,fillWeight:3,seed:n}),Ae=Gt(e,{roughness:0.7,fill:"none",stroke:y,seed:n}),xe=ne.rectangle(Yt,lt,it,ot,_e);st=W.insert(()=>xe,":first-child").attr("class","swimlane-title");let Wt=ne.rectangle(Yt,wt,it,Lt,Ae);at=W.insert(()=>Wt,":first-child").attr("class","swimlane-body"),st.select("path:nth-child(2)").attr("style",v.join(";")),st.select("path").attr("style",q.join(";").replace("fill","stroke"))}else st=W.insert("rect",":first-child"),at=W.insert("rect",":first-child"),st.attr("class","swimlane-title").attr("style",B).attr("x",Yt).attr("y",lt).attr("width",it).attr("height",ot).attr("fill",c).attr("stroke",y),at.attr("class","swimlane-body").attr("style",B).attr("x",Yt).attr("y",wt).attr("width",it).attr("height",Lt).attr("fill","none").attr("stroke",y);let Ht=e.x-Q.width/2,he=lt+(ot-Q.height)/2;j.attr("transform",`translate(${Ht}, ${he})`)}if(a.trace("Swimlane data ",e,JSON.stringify(e)),f){let mt=j.select("span");if(mt)mt.attr("style",f)}return e.offsetX=0,e.width=it,e.height=ct,e.offsetY=Q.height-rt/2,e.intersect=function(mt){return to(e,mt)},{cluster:W,labelBBox:Q}},"swimlane"),v0=t(async(r,e)=>{a.info("Creating subgraph rect for ",e.id,e);let i=l(),{theme:s,themeVariables:o,handDrawnSeed:n}=i,{clusterBkg:c,clusterBorder:h,borderColorArray:g}=o,{labelStyles:y,nodeStyles:f,borderStyles:B,backgroundStyles:v}=k(e),q=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look);Ze(q,e.colorIndex,s,g);let W=Ce(i),H=q.insert("g").attr("class","cluster-label "),Y;if(e.labelType==="markdown")Y=await Le(H,e.label,{style:e.labelStyle,useHtmlLabels:W,isNode:!0,width:e.width});else Y=await Ti(H,e.label,e.labelStyle||"",!1,!0);let j=Y.getBBox();if(Ce(i)){let Ct=Y.children[0],Bt=p(Y);j=Ct.getBoundingClientRect(),Bt.attr("width",j.width),Bt.attr("height",j.height)}let X=e.width<=j.width+e.padding?j.width+e.padding:e.width;if(e.width<=j.width+e.padding)e.diff=(X-e.width)/2-e.padding;else e.diff=-e.padding;let Q=e.height,rt=e.x-X/2,it=e.y-Q/2;a.trace("Data ",e,JSON.stringify(e));let ct;if(e.look==="handDrawn"){let Ct=m.svg(q),Bt=Gt(e,{roughness:0.7,fill:c,stroke:h,fillWeight:3,seed:n}),kt=Ct.path(jr(rt,it,X,Q,0),Bt);ct=q.insert(()=>(a.debug("Rough node insert CXC",kt),kt),":first-child"),ct.select("path:nth-child(2)").attr("style",B.join(";")),ct.select("path").attr("style",v.join(";").replace("fill","stroke"))}else ct=q.insert("rect",":first-child"),ct.attr("style",f).attr("rx",e.rx).attr("ry",e.ry).attr("x",rt).attr("y",it).attr("width",X).attr("height",Q);let{subGraphTitleTopMargin:lt}=Tt(i);if(H.attr("transform",`translate(${e.x-j.width/2}, ${e.y-e.height/2+lt})`),y){let Ct=H.select("span");if(Ct)Ct.attr("style",y)}let dt=ct.node().getBBox();return e.offsetX=0,e.width=dt.width,e.height=dt.height,e.offsetY=j.height-e.padding/2,e.intersect=function(Ct){return to(e,Ct)},{cluster:q,labelBBox:j}},"rect"),AS=t((r,e)=>{let i=r.insert("g").attr("class","note-cluster").attr("id",e.domId),s=i.insert("rect",":first-child"),o=0*e.padding,n=o/2;s.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-n).attr("y",e.y-e.height/2-n).attr("width",e.width+o).attr("height",e.height+o).attr("fill","none");let c=s.node().getBBox();return e.width=c.width,e.height=c.height,e.intersect=function(h){return to(e,h)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),MS=t(async(r,e)=>{let i=l(),{theme:s,themeVariables:o,handDrawnSeed:n}=i,{altBackground:c,borderColorArray:h,compositeBackground:g,compositeTitleBackground:y,nodeBorder:f}=o,B=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look);Ze(B,e.colorIndex,s,h);let v=B.insert("g",":first-child"),q=B.insert("g").attr("class","cluster-label"),W=B.append("rect"),H=await Ti(q,e.label,e.labelStyle,void 0,!0),Y=H.getBBox();if(Ce(i)){let kt=H.children[0],bt=p(H);Y=kt.getBoundingClientRect(),bt.attr("width",Y.width),bt.attr("height",Y.height)}let j=0*e.padding,X=j/2,Q=(e.width<=Y.width+e.padding?Y.width+e.padding:e.width)+j;if(e.width<=Y.width+e.padding)e.diff=(Q-e.width)/2-e.padding;else e.diff=-e.padding;let rt=e.height+j,it=e.height+j-Y.height-6,ct=e.x-Q/2,lt=e.y-rt/2;e.width=Q;let dt=e.y-e.height/2-X+Y.height+2,Ct;if(e.look==="handDrawn"){let kt=e.cssClasses.includes("statediagram-cluster-alt"),bt=m.svg(B),st=e.rx||e.ry?bt.path(jr(ct,lt,Q,rt,10),{roughness:0.7,fill:y,fillStyle:"solid",stroke:f,seed:n}):bt.rectangle(ct,lt,Q,rt,{seed:n});Ct=B.insert(()=>st,":first-child");let at=bt.rectangle(ct,dt,Q,it,{fill:kt?c:g,fillStyle:kt?"hachure":"solid",stroke:f,seed:n});Ct=B.insert(()=>st,":first-child"),W=B.insert(()=>at),Ct.attr("class","outer"),W.attr("class","inner")}else{Ct=v.insert("rect",":first-child");let kt="outer";Ct.attr("class",kt).attr("x",ct).attr("y",lt).attr("width",Q).attr("height",rt).attr("data-look",e.look),W.attr("class","inner").attr("x",ct).attr("y",dt).attr("width",Q).attr("height",it)}q.attr("transform",`translate(${e.x-Y.width/2}, ${lt+1-(Ce(i)?0:3)})`);let Bt=Ct.node().getBBox();return e.height=Bt.height,e.offsetX=0,e.offsetY=Y.height-e.padding/2,e.labelBBox=Y,e.intersect=function(kt){return to(e,kt)},{cluster:B,labelBBox:Y}},"roundedWithTitle"),ES=t(async(r,e)=>{a.info("Creating subgraph rect for ",e.id,e);let i=l(),{themeVariables:s,handDrawnSeed:o}=i,{clusterBkg:n,clusterBorder:c}=s,{labelStyles:h,nodeStyles:g,borderStyles:y,backgroundStyles:f}=k(e),B=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),v=Ce(i),q=B.insert("g").attr("class","cluster-label "),W=await Le(q,e.label,{style:e.labelStyle,useHtmlLabels:v,isNode:!0,width:e.width}),H=W.getBBox();if(Ce(i)){let lt=W.children[0],dt=p(W);H=lt.getBoundingClientRect(),dt.attr("width",H.width),dt.attr("height",H.height)}let Y=e.width<=H.width+e.padding?H.width+e.padding:e.width;if(e.width<=H.width+e.padding)e.diff=(Y-e.width)/2-e.padding;else e.diff=-e.padding;let j=e.height,X=e.x-Y/2,Q=e.y-j/2;a.trace("Data ",e,JSON.stringify(e));let rt;if(e.look==="handDrawn"){let lt=m.svg(B),dt=Gt(e,{roughness:0.7,fill:n,stroke:c,fillWeight:4,seed:o}),Ct=lt.path(jr(X,Q,Y,j,e.rx),dt);rt=B.insert(()=>(a.debug("Rough node insert CXC",Ct),Ct),":first-child"),rt.select("path:nth-child(2)").attr("style",y.join(";")),rt.select("path").attr("style",f.join(";").replace("fill","stroke"))}else rt=B.insert("rect",":first-child"),rt.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",X).attr("y",Q).attr("width",Y).attr("height",j);let{subGraphTitleTopMargin:it}=Tt(i);if(q.attr("transform",`translate(${e.x-H.width/2}, ${e.y-e.height/2+it})`),h){let lt=q.select("span");if(lt)lt.attr("style",h)}let ct=rt.node().getBBox();return e.offsetX=0,e.width=ct.width,e.height=ct.height,e.offsetY=H.height-e.padding/2,e.intersect=function(lt){return to(e,lt)},{cluster:B,labelBBox:H}},"kanbanSection"),OS=t((r,e)=>{let i=l(),{theme:s,themeVariables:o,handDrawnSeed:n}=i,{altBackground:c,nodeBorder:h,borderColorArray:g}=o,y=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look);Ze(y,e.colorIndex,s,g);let f=y.insert("g",":first-child"),B=0*e.padding,v=e.width+B;e.diff=-e.padding;let q=e.height+B,W=e.x-v/2,H=e.y-q/2;e.width=v;let Y;if(e.look==="handDrawn"){let Q=m.svg(y).rectangle(W,H,v,q,{fill:c??"#efefef",fillStyle:"solid",roughness:0.5,strokeLineDash:[5],stroke:h,seed:n});Y=y.insert(()=>Q,":first-child").attr("class","divider")}else{Y=f.insert("rect",":first-child");let X="outer";if(e.look==="neo")X="divider";else X="divider";Y.attr("class",X).attr("x",W).attr("y",H).attr("width",v).attr("height",q).attr("data-look",e.look)}let j=Y.node().getBBox();return e.height=j.height,e.offsetX=0,e.offsetY=0,e.intersect=function(X){return to(e,X)},{cluster:y,labelBBox:{}}},"divider"),IS=t(async(r,e,i)=>{a.info(`Creating ${i.cssClass} for `,e.id,e);let s=l(),{theme:o,themeVariables:n,handDrawnSeed:c}=s,{borderColorArray:h}=n,{labelStyles:g,borderStyles:y}=k(e),f=r.insert("g").attr("class","cluster "+i.cssClass+" "+e.cssClasses).attr("id",e.domId??e.id).attr("data-look",e.look);Ze(f,e.colorIndex,o,h);let B=Ce(s),v=f.insert("g").attr("class","cluster-label"),q={width:0,height:0},W=e.label?.trim();if(W){let it;if(e.labelType==="markdown")it=await Le(v,e.label,{style:e.labelStyle,useHtmlLabels:B,isNode:!0,width:e.width});else it=await Ti(v,e.label,e.labelStyle||"",!1,!0);if(q=it.getBBox(),B){let ct=it.children[0],lt=p(it);q=ct.getBoundingClientRect(),lt.attr("width",q.width),lt.attr("height",q.height)}}let H=e.width<=q.width+e.padding?q.width+e.padding:e.width;if(e.width<=q.width+e.padding)e.diff=(H-e.width)/2-e.padding;else e.diff=-e.padding;let Y=e.height,j=e.x-H/2,X=e.y-Y/2,Q;if(e.look==="handDrawn"){let it=m.svg(f),ct=Gt(e,{roughness:i.roughness,fill:i.fill,stroke:i.stroke,strokeWidth:i.strokeWidth,seed:c,...i.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...i.strokeDash?{strokeLineDash:i.strokeDash}:{}}),lt=it.path(jr(j,X,H,Y,i.rx),ct);Q=f.insert(()=>lt,":first-child"),Q.select("path:nth-child(2)").attr("style",y.join(";"))}else if(Q=f.insert("rect",":first-child"),Q.attr("rx",i.rx).attr("ry",i.rx).attr("x",j).attr("y",X).attr("width",H).attr("height",Y).attr("fill",i.fill).attr("stroke",i.stroke).attr("stroke-width",i.strokeWidth+"px"),i.strokeDash)Q.attr("stroke-dasharray",i.strokeDash.join(", "));if(W){let{subGraphTitleTopMargin:it}=Tt(s);if(v.attr("transform",`translate(${e.x-q.width/2}, ${e.y-e.height/2+it})`),g){let ct=v.select("span");if(ct)ct.attr("style",g)}}let rt=Q.node().getBBox();return e.offsetX=0,e.width=rt.width,e.height=rt.height,e.offsetY=q.height-e.padding/2,e.intersect=function(it){return to(e,it)},{cluster:f,labelBBox:q}},"createContainerGroup"),$S=t(async(r,e)=>{let{themeVariables:i}=l(),s=i.flowContainerStroke||i.secondaryBorderColor;return IS(r,e,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:s,strokeWidth:0.75,roughness:0.7})},"flowGroup"),DS=t((r,e)=>{let i=r.boundaryType||"rect",s=i==="package"?20:r.padding,o=i==="package"?e.height+10:0,n=Math.max(r.width,e.width+s),c=i==="package"?Math.max(r.height,o+r.padding*2):r.height,h=r.x-n/2,g=r.y-c/2;return{boundaryType:i,width:n,height:c,x:h,y:g,bodyY:g+o,bodyHeight:c-o,tabHeight:o,tabWidth:i==="package"?Math.min(n,Math.max(80,e.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),PS=t(async(r,e)=>{a.info("Creating usecase system boundary for ",e.id,e);let i=l(),{theme:s,themeVariables:o,handDrawnSeed:n}=i,{clusterBkg:c,clusterBorder:h,borderColorArray:g}=o,{labelStyles:y,nodeStyles:f}=k(e),{stylesMap:B}=Di(e),v=e.boundaryType||"rect",q=r.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${v} ${e.cssClasses}`).attr("id",typeof e.domId==="string"?e.domId:e.id).attr("data-boundary-type",v).attr("data-look",e.look);Ze(q,e.colorIndex,s,g);let W=Ce(i),H=q.insert("g").attr("class","cluster-label system-boundary-title"),Y=await Le(H,e.label,{style:y,useHtmlLabels:W,isNode:!0}),j=Y.getBBox();if(W){let st=Y.children[0],at=p(Y);j=st.getBoundingClientRect(),at.attr("width",j.width),at.attr("height",j.height)}let X=DS(e,j),{width:Q,height:rt,x:it,y:ct,bodyY:lt,bodyHeight:dt,tabHeight:Ct,tabWidth:Bt}=X;e.diff=e.width<=j.width+e.padding?(Q-e.width)/2-e.padding:-e.padding;let kt=Gt(e,{fill:B.get("fill")||c,stroke:B.get("stroke")||h,strokeWidth:B.get("stroke-width")?.replace("px","")||1,seed:n});if(e.look==="handDrawn"){let st=m.svg(q),at=st.rectangle(it,lt,Q,dt,kt);if(q.insert(()=>at,":first-child").attr("class","boundary-body label-container"),v==="package"){let mt=st.rectangle(it,ct,Bt,Ct,kt);q.insert(()=>mt,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else if(q.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",f).attr("x",it).attr("y",lt).attr("width",Q).attr("height",dt),v==="package")q.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",f).attr("x",it).attr("y",ct).attr("width",Bt).attr("height",Ct);let{subGraphTitleTopMargin:bt}=Tt(i);if(v==="package")H.attr("transform",`translate(${it+(Bt-j.width)/2}, ${ct+(Ct-j.height)/2})`);else H.attr("transform",`translate(${e.x-j.width/2}, ${ct+bt})`);if(y)H.attr("style",y),H.select("span").attr("style",y);return e.offsetX=0,e.width=Q,e.height=rt,e.offsetY=j.height-e.padding/2,e.labelBBox=j,e.intersect=function(st){return to(e,st)},{cluster:q,labelBBox:j}},"usecaseSystemBoundary"),RS=v0,qS={rect:v0,squareRect:RS,roundedWithTitle:MS,noteGroup:AS,divider:OS,kanbanSection:ES,flowGroup:$S,usecaseSystemBoundary:PS,swimlane:FS};var L0=new Map,en=t(async(r,e)=>{let i=e.shape||"rect",s=await qS[i](r,e);return L0.set(e.id,s),s},"insertCluster"),So=t(()=>{L0=new Map},"clear");var mn=t((r,e)=>{if(e)return"translate("+-r.width/2+", "+-r.height/2+")";let i=r.x??0,s=r.y??0;return"translate("+-(i+r.width/2)+", "+-(s+r.height/2)+")"},"computeLabelTransform"),Ne={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},F0={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function xn(r,e){if(r===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};r=Je(r),e=Je(e);let[i,s]=[r.x,r.y],[o,n]=[e.x,e.y],c=o-i,h=n-s;return{angle:Math.atan(h/c),deltaX:c,deltaY:h}}t(xn,"calculateDeltaAndAngle");var Je=t((r)=>{if(Array.isArray(r))return{x:r[0],y:r[1]};return r},"pointTransformer"),NS=t((r)=>({x:t(function(e,i,s){let o=0,n=Je(s[0]).x<Je(s[s.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(Ne,r.arrowTypeStart)){let{angle:q,deltaX:W}=xn(s[0],s[1]);o=Ne[r.arrowTypeStart]*Math.cos(q)*(W>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Ne,r.arrowTypeEnd)){let{angle:q,deltaX:W}=xn(s[s.length-1],s[s.length-2]);o=Ne[r.arrowTypeEnd]*Math.cos(q)*(W>=0?1:-1)}let c=Math.abs(Je(e).x-Je(s[s.length-1]).x),h=Math.abs(Je(e).y-Je(s[s.length-1]).y),g=Math.abs(Je(e).x-Je(s[0]).x),y=Math.abs(Je(e).y-Je(s[0]).y),f=Ne[r.arrowTypeStart],B=Ne[r.arrowTypeEnd],v=1;if(c<B&&c>0&&h<B){let q=B+v-c;q*=n==="right"?-1:1,o-=q}if(g<f&&g>0&&y<f){let q=f+v-g;q*=n==="right"?-1:1,o+=q}return Je(e).x+o},"x"),y:t(function(e,i,s){let o=0,n=Je(s[0]).y<Je(s[s.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(Ne,r.arrowTypeStart)){let{angle:q,deltaY:W}=xn(s[0],s[1]);o=Ne[r.arrowTypeStart]*Math.abs(Math.sin(q))*(W>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Ne,r.arrowTypeEnd)){let{angle:q,deltaY:W}=xn(s[s.length-1],s[s.length-2]);o=Ne[r.arrowTypeEnd]*Math.abs(Math.sin(q))*(W>=0?1:-1)}let c=Math.abs(Je(e).y-Je(s[s.length-1]).y),h=Math.abs(Je(e).x-Je(s[s.length-1]).x),g=Math.abs(Je(e).y-Je(s[0]).y),y=Math.abs(Je(e).x-Je(s[0]).x),f=Ne[r.arrowTypeStart],B=Ne[r.arrowTypeEnd],v=1;if(c<B&&c>0&&h<B){let q=B+v-c;q*=n==="up"?-1:1,o-=q}if(g<f&&g>0&&y<f){let q=f+v-g;q*=n==="up"?-1:1,o+=q}return Je(e).y+o},"y")}),"getLineFunctionsWithOffset"),WS=t((r,e,i,s,o,n=!1,c)=>{if(e.arrowTypeStart)A0(r,"start",e.arrowTypeStart,i,s,o,n,c);if(e.arrowTypeEnd)A0(r,"end",e.arrowTypeEnd,i,s,o,n,c)},"addEdgeMarkers"),zS={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},arrow_hierarchy:{type:"hierarchy",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}},HS=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],A0=t((r,e,i,s,o,n,c=!1,h)=>{if(!i||i==="none")return;let g=zS[i],y=g&&HS.includes(g.type);if(!g){a.warn(`Unknown arrow type: ${i}`);return}let f=g.type,q=`${o}_${n}-${f}${e==="start"?"Start":"End"}${c&&y?"-margin":""}`;if(h&&h.trim()!==""){let W=h.replace(/[^\dA-Za-z]/g,"_"),H=`${q}_${W}`;if(!document.getElementById(H)){let Y=document.getElementById(q);if(Y){let j=Y.cloneNode(!0);j.id=H,j.querySelectorAll("path, circle, line").forEach((Q)=>{if(Q.setAttribute("stroke",h),g.fill)Q.setAttribute("fill",h)}),Y.parentNode?.appendChild(j)}}r.attr(`marker-${e}`,`url(${s}#${H})`)}else r.attr(`marker-${e}`,`url(${s}#${q})`)},"addEdgeMarker"),YS=t((r)=>typeof r==="string"?r:l()?.flowchart?.curve,"resolveEdgeCurveType"),Hn=new Map,Me=new Map,To=t(()=>{Hn.clear(),Me.clear()},"clear"),Qi=t((r)=>Boolean(r.label||r.startLabelLeft||r.startLabelRight||r.endLabelLeft||r.endLabelRight),"hasEdgeLabel"),yn=t((r)=>{if(!r)return"";if(typeof r==="string")return r;return r.reduce((e,i)=>e+";"+i,"")},"getLabelStyles"),At=t(async(r,e)=>{let i=l(),s=Ce(i),{labelStyles:o}=k(e);e.labelStyle=o;let n=r.insert("g").attr("class","edgeLabel"),c=n.insert("g").attr("class","label").attr("data-id",e.id),h=e.labelType==="markdown",g=void 0,y=await Le(r,e.label,{style:yn(e.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:h,width:h?g:void 0},i);c.node().appendChild(y),a.info("abc82",e,e.labelType);let f,B;if(s){let q=y.children[0],W=p(y);f=await Oo.measure(()=>q.getBoundingClientRect()),B=f,W.attr("width",f.width),W.attr("height",f.height)}else{let q=p(y).select("text").node();await Oo.measure(()=>{if(f=y.getBBox(),q&&typeof q.getBBox==="function")B=q.getBBox();else B=f})}c.attr("transform",mn(B,s)),Hn.set(e.id,n),e.width=f.width,e.height=f.height;let v;if(e.startLabelLeft){let q=r.insert("g").attr("class","edgeTerminals"),W=q.insert("g").attr("class","inner"),H=await Ti(W,e.startLabelLeft,yn(e.labelStyle)||"",!1,!1);v=H;let Y=H.getBBox();if(s){let j=H.children[0],X=p(H);Y=j.getBoundingClientRect(),X.attr("width",Y.width),X.attr("height",Y.height)}if(W.attr("transform",mn(Y,s)),!Me.get(e.id))Me.set(e.id,{});Me.get(e.id).startLeft=q,bn(v,e.startLabelLeft,Y),Cn(e,"startLeft",Y)}if(e.startLabelRight){let q=r.insert("g").attr("class","edgeTerminals"),W=q.insert("g").attr("class","inner"),H=await Ti(W,e.startLabelRight,yn(e.labelStyle)||"",!1,!1);v=H;let Y=H.getBBox();if(s){let j=H.children[0],X=p(H);Y=j.getBoundingClientRect(),X.attr("width",Y.width),X.attr("height",Y.height)}if(W.attr("transform",mn(Y,s)),!Me.get(e.id))Me.set(e.id,{});Me.get(e.id).startRight=q,bn(v,e.startLabelRight,Y),Cn(e,"startRight",Y)}if(e.endLabelLeft){let q=r.insert("g").attr("class","edgeTerminals"),W=q.insert("g").attr("class","inner"),H=await Ti(W,e.endLabelLeft,yn(e.labelStyle)||"",!1,!1);v=H;let Y=H.getBBox();if(s){let j=H.children[0],X=p(H);Y=j.getBoundingClientRect(),X.attr("width",Y.width),X.attr("height",Y.height)}if(W.attr("transform",mn(Y,s)),!Me.get(e.id))Me.set(e.id,{});Me.get(e.id).endLeft=q,bn(v,e.endLabelLeft,Y),Cn(e,"endLeft",Y)}if(e.endLabelRight){let q=r.insert("g").attr("class","edgeTerminals"),W=q.insert("g").attr("class","inner"),H=await Ti(W,e.endLabelRight,yn(e.labelStyle)||"",!1,!1);v=H;let Y=H.getBBox();if(s){let j=H.children[0],X=p(H);Y=j.getBoundingClientRect(),X.attr("width",Y.width),X.attr("height",Y.height)}if(W.attr("transform",mn(Y,s)),!Me.get(e.id))Me.set(e.id,{});Me.get(e.id).endRight=q,bn(v,e.endLabelRight,Y),Cn(e,"endRight",Y)}return y},"insertEdgeLabel");function Cn(r,e,i){r.terminalLabelSizes??={},r.terminalLabelSizes[e]={width:i.width,height:i.height}}t(Cn,"recordTerminalLabelSize");function bn(r,e,i){if(Ce(l())&&r)r.style.width=Math.max(e.length*9,i.width)+"px",r.style.height=i.height+"px"}t(bn,"setTerminalWidth");var Ji=t((r,e)=>{let{x:i,y:s}=r;if(e?.updatedPath){let o=M.calcLabelPosition(e.updatedPath);if(e.originalPath){let n=M.calcLabelPosition(e.originalPath);i=r.x+(o.x-n.x),s=r.y+(o.y-n.y)}else i=o.x,s=o.y}return{x:i,y:s}},"resolveEdgeLabelPosition"),Yn=t((r,e)=>{a.debug("Moving label abc88 ",r.id,r.label,Hn.get(r.id),e);let i=l(),{subGraphTitleTotalMargin:s}=Tt(i);if(r.label){let n=Hn.get(r.id),{x:c,y:h}=Ji(r,e);a.debug("Moving label "+r.label+" from (",r.x,",",r.y,") to (",c,",",h,") abc88"),n.attr("transform",`translate(${c}, ${h+s/2})`)}let o=e.updatedPath?e.updatedPath:e.originalPath;if(r.startLabelLeft){let n=Me.get(r.id).startLeft,{x:c,y:h}=r;if(o){let g=M.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",o);c=g.x,h=g.y}n.attr("transform",`translate(${c}, ${h})`)}if(r.startLabelRight){let n=Me.get(r.id).startRight,{x:c,y:h}=r;if(o){let g=M.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",o);c=g.x,h=g.y}n.attr("transform",`translate(${c}, ${h})`)}if(r.endLabelLeft){let n=Me.get(r.id).endLeft,{x:c,y:h}=r;if(o){let g=M.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",o);c=g.x,h=g.y}n.attr("transform",`translate(${c}, ${h})`)}if(r.endLabelRight){let n=Me.get(r.id).endRight,{x:c,y:h}=r;if(o){let g=M.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",o);c=g.x,h=g.y}n.attr("transform",`translate(${c}, ${h})`)}},"positionEdgeLabel"),US=t((r,e)=>{if(!r?.isLabelEdge||!r?.id?.endsWith("-to-label")||!Array.isArray(e))return e;if(e.length!==2)return e;let[i,s]=e,o=Math.abs(s.x-i.x),n=Math.abs(s.y-i.y);if(o<0.001||n<0.001)return e;if(n>=o)return[i,{x:i.x,y:s.y},s];return[i,{x:s.x,y:i.y},s]},"orthogonalizeToLabelClippedPoints"),jS=t((r,e)=>{let{x:i,y:s}=r,o=Math.abs(e.x-i),n=Math.abs(e.y-s),c=r.width/2,h=r.height/2;return o>=c||n>=h},"outsideNode"),GS=t((r,e,i)=>{a.debug(`intersection calc abc89:
293
+ `;if(!e.domId)throw Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);let v=o.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",s).attr("d",B);return o.append("line").attr("class","node-line-").attr("x1",-g/2).attr("y1",y/2).attr("x2",g/2).attr("y2",y/2),h.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),o.append(()=>h.node()),I(e,v),e.calcIntersect=function(q,W){return w.rect(q,W)},e.intersect=function(q){return w.rect(e,q)},o}t(_0,"defaultMindmapNode");async function B0(r,e){let i={padding:e.padding??0};return id(r,e,i)}t(B0,"mindmapCircle");var vS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:i0},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:t0},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:o0},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:l0},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:xx},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Cx},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:_x},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:rx},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:cx},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:ax},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:yx},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:id},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:S0},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:T0},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Zx},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Lx},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Rx},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Px},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:d0},{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:$x},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:kx},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:u0},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:nx},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:e0},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:n0},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:a0},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Bx},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Fx},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:dx},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:px},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:gx},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:qx},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:m0},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:vx},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:f0},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Nx},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:mx},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:bx},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:g0},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:x0},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Sx},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:p0},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Tx},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:r0},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Vx},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Xx},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:ex},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:fx},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:c0},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:h0},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:y0},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Qx},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Wx}],LS=t(()=>{let e=[...Object.entries({state:s0,choice:lx,note:Kx,composite:hx,rectWithTitle:Jx,labelRect:Dx,block_arrow:sx,collapsedGroup:ox,iconSquare:Ox,iconCircle:Mx,icon:Ax,iconRounded:Ex,imageSquare:Ix,anchor:Jy,kanbanItem:w0,mindmapCircle:B0,defaultMindmapNode:_0,classBox:b0,erBox:sd,requirementBox:k0,usecaseActor:zx,usecaseActorHollow:Yx,usecaseActorAwesome:Hx,usecaseActorIcon:Ux,usecaseBusiness:jx,usecaseEllipse:wx,usecaseJsonTable:Gx}),...vS.flatMap((i)=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map((o)=>[o,i.handler]))];return Object.fromEntries(e)},"generateShapeMap"),Qr=LS();function Ir(r){return r in Qr}t(Ir,"isValidShape");var St=t(({flowchart:r})=>{let e=r?.subGraphTitleMargin?.top??0,i=r?.subGraphTitleMargin?.bottom??0,s=e+i;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:s}},"getSubGraphTitleMargins"),lh=new Map;async function Tt(r,e,i){let s,o;if(e.shape==="rect")if(e.rx&&e.ry)e.shape="roundedRect";else e.shape="squareRect";let n=e.shape?Qr[e.shape]:void 0;if(!n)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let c;if(i.config.securityLevel==="sandbox")c="_top";else if(e.linkTarget)c=e.linkTarget||"_blank";s=r.insert("svg:a").attr("xlink:href",e.link).attr("target",c??null),o=await n(s,e,i)}else o=await n(r,e,i),s=o;if(s.attr("data-look",rr(e.look)),e.tooltip)o.attr("title",e.tooltip);if(lh.set(e.id,s),e.haveCallback)s.attr("class",s.attr("class")+" clickable");return s}t(Tt,"insertNode");var _o=t((r,e)=>{lh.set(e.id,r)},"setNodeElem"),wo=t(()=>{lh.clear()},"clear"),bt=t((r)=>{let e=lh.get(r.id);a.trace("Transforming node",r.diff,r,"translate("+(r.x-r.width/2-5)+", "+r.width/2+")");let i=8,s=r.diff||0;if(r.clusterNode)e.attr("transform","translate("+(r.x+s-r.width/2)+", "+(r.y-r.height/2-i)+")");else e.attr("transform","translate("+r.x+", "+r.y+")");return s},"positionNode");var FS=t(async(r,e)=>{let i=l(),{theme:s,themeVariables:o,handDrawnSeed:n}=i,{clusterBkg:c,clusterBorder:h,borderColorArray:g}=o,y=h,{labelStyles:f,nodeStyles:B,borderStyles:v,backgroundStyles:q}=k(e),W=r.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.domId??e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look);Xe(W,e.colorIndex,s,g);let H=gt(i.flowchart.htmlLabels),Y=e.direction==="LR",j=W.insert("g").attr("class","cluster-label swimlane-label"),X=await Le(j,e.label,{style:e.labelStyle,useHtmlLabels:H,isNode:!0,width:e.width}),Q=X.getBBox();if(H){let pt=X.children[0],ot=p(X);Q=pt.getBoundingClientRect(),ot.attr("width",Q.width),ot.attr("height",Q.height)}let et=e.padding??0,it=e.width<=Q.width+et?Q.width+et:e.width;if(e.width<=Q.width+et)e.diff=(it-e.width)/2-et;else e.diff=-et;let ht=e.height,lt=e.y-ht/2,ft=e.y+ht/2,xt=e.x-it/2,Lt=e.swimlaneContentTop!==void 0?e.swimlaneContentTop:lt+ht/3,kt=Y?4:0,Ct=Q.height+2*kt,st,at;if(Y){let pt=Math.max(Ct,Q.height+2*kt),ot=xt+pt,wt=Math.max(0,it-pt);if(e.look==="handDrawn"){let Yt=m.svg(W),ue=Gt(e,{roughness:0.7,fill:c,stroke:y,seed:n}),ce=Gt(e,{roughness:0.7,fill:"none",stroke:y,seed:n}),Ae=Yt.rectangle(xt,lt,pt,ht,ue);st=W.insert(()=>Ae,":first-child").attr("class","swimlane-title");let Oe=Yt.rectangle(ot,lt,wt,ht,ce);at=W.insert(()=>Oe,":first-child").attr("class","swimlane-body"),st.select("path:nth-child(2)").attr("style",v.join(";")),st.select("path").attr("style",q.join(";").replace("fill","stroke"))}else st=W.insert("rect",":first-child"),at=W.insert("rect",":first-child"),st.attr("class","swimlane-title").attr("style",B).attr("x",xt).attr("y",lt).attr("width",pt).attr("height",ht).attr("fill",c).attr("stroke",y),at.attr("class","swimlane-body").attr("style",B).attr("x",ot).attr("y",lt).attr("width",wt).attr("height",ht).attr("fill","none").attr("stroke",y);let At=xt+pt/2,jt=e.y;j.attr("transform",`translate(${At}, ${jt}) rotate(-90) translate(${-Q.width/2}, ${-Q.height/2})`)}else{let pt=Math.max(0,Lt-lt),ot=Math.min(Ct,pt),wt=lt+ot,At=Math.max(0,ft-wt),jt=e.x-it/2;if(e.look==="handDrawn"){let ce=m.svg(W),Ae=Gt(e,{roughness:0.7,fill:c,stroke:y,fillWeight:3,seed:n}),Oe=Gt(e,{roughness:0.7,fill:"none",stroke:y,seed:n}),we=ce.rectangle(jt,lt,it,ot,Ae);st=W.insert(()=>we,":first-child").attr("class","swimlane-title");let Ht=ce.rectangle(jt,wt,it,At,Oe);at=W.insert(()=>Ht,":first-child").attr("class","swimlane-body"),st.select("path:nth-child(2)").attr("style",v.join(";")),st.select("path").attr("style",q.join(";").replace("fill","stroke"))}else st=W.insert("rect",":first-child"),at=W.insert("rect",":first-child"),st.attr("class","swimlane-title").attr("style",B).attr("x",jt).attr("y",lt).attr("width",it).attr("height",ot).attr("fill",c).attr("stroke",y),at.attr("class","swimlane-body").attr("style",B).attr("x",jt).attr("y",wt).attr("width",it).attr("height",At).attr("fill","none").attr("stroke",y);let Yt=e.x-Q.width/2,ue=lt+(ot-Q.height)/2;j.attr("transform",`translate(${Yt}, ${ue})`)}if(a.trace("Swimlane data ",e,JSON.stringify(e)),f){let pt=j.select("span");if(pt)pt.attr("style",f)}return e.offsetX=0,e.width=it,e.height=ht,e.offsetY=Q.height-et/2,e.intersect=function(pt){return ro(e,pt)},{cluster:W,labelBBox:Q}},"swimlane"),v0=t(async(r,e)=>{a.info("Creating subgraph rect for ",e.id,e);let i=l(),{theme:s,themeVariables:o,handDrawnSeed:n}=i,{clusterBkg:c,clusterBorder:h,borderColorArray:g}=o,{labelStyles:y,nodeStyles:f,borderStyles:B,backgroundStyles:v}=k(e),q=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look);Xe(q,e.colorIndex,s,g);let W=Ce(i),H=q.insert("g").attr("class","cluster-label "),Y;if(e.labelType==="markdown")Y=await Le(H,e.label,{style:e.labelStyle,useHtmlLabels:W,isNode:!0,width:e.width});else Y=await _i(H,e.label,e.labelStyle||"",!1,!0);let j=Y.getBBox();if(Ce(i)){let xt=Y.children[0],Lt=p(Y);j=xt.getBoundingClientRect(),Lt.attr("width",j.width),Lt.attr("height",j.height)}let X=e.width<=j.width+e.padding?j.width+e.padding:e.width;if(e.width<=j.width+e.padding)e.diff=(X-e.width)/2-e.padding;else e.diff=-e.padding;let Q=e.height,et=e.x-X/2,it=e.y-Q/2;a.trace("Data ",e,JSON.stringify(e));let ht;if(e.look==="handDrawn"){let xt=m.svg(q),Lt=Gt(e,{roughness:0.7,fill:c,stroke:h,fillWeight:3,seed:n}),kt=xt.path(ci(et,it,X,Q,0),Lt);ht=q.insert(()=>(a.debug("Rough node insert CXC",kt),kt),":first-child"),ht.select("path:nth-child(2)").attr("style",B.join(";")),ht.select("path").attr("style",v.join(";").replace("fill","stroke"))}else ht=q.insert("rect",":first-child"),ht.attr("style",f).attr("rx",e.rx).attr("ry",e.ry).attr("x",et).attr("y",it).attr("width",X).attr("height",Q);let{subGraphTitleTopMargin:lt}=St(i);if(H.attr("transform",`translate(${e.x-j.width/2}, ${e.y-e.height/2+lt})`),y){let xt=H.select("span");if(xt)xt.attr("style",y)}let ft=ht.node().getBBox();return e.offsetX=0,e.width=ft.width,e.height=ft.height,e.offsetY=j.height-e.padding/2,e.intersect=function(xt){return ro(e,xt)},{cluster:q,labelBBox:j}},"rect"),AS=t((r,e)=>{let i=r.insert("g").attr("class","note-cluster").attr("id",e.domId),s=i.insert("rect",":first-child"),o=0*e.padding,n=o/2;s.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-n).attr("y",e.y-e.height/2-n).attr("width",e.width+o).attr("height",e.height+o).attr("fill","none");let c=s.node().getBBox();return e.width=c.width,e.height=c.height,e.intersect=function(h){return ro(e,h)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),MS=t(async(r,e)=>{let i=l(),{theme:s,themeVariables:o,handDrawnSeed:n}=i,{altBackground:c,borderColorArray:h,compositeBackground:g,compositeTitleBackground:y,nodeBorder:f}=o,B=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look);Xe(B,e.colorIndex,s,h);let v=B.insert("g",":first-child"),q=B.insert("g").attr("class","cluster-label"),W=B.append("rect"),H=await _i(q,e.label,e.labelStyle,void 0,!0),Y=H.getBBox();if(Ce(i)){let kt=H.children[0],Ct=p(H);Y=kt.getBoundingClientRect(),Ct.attr("width",Y.width),Ct.attr("height",Y.height)}let j=0*e.padding,X=j/2,Q=(e.width<=Y.width+e.padding?Y.width+e.padding:e.width)+j;if(e.width<=Y.width+e.padding)e.diff=(Q-e.width)/2-e.padding;else e.diff=-e.padding;let et=e.height+j,it=e.height+j-Y.height-6,ht=e.x-Q/2,lt=e.y-et/2;e.width=Q;let ft=e.y-e.height/2-X+Y.height+2,xt;if(e.look==="handDrawn"){let kt=e.cssClasses.includes("statediagram-cluster-alt"),Ct=m.svg(B),st=e.rx||e.ry?Ct.path(ci(ht,lt,Q,et,10),{roughness:0.7,fill:y,fillStyle:"solid",stroke:f,seed:n}):Ct.rectangle(ht,lt,Q,et,{seed:n});xt=B.insert(()=>st,":first-child");let at=Ct.rectangle(ht,ft,Q,it,{fill:kt?c:g,fillStyle:kt?"hachure":"solid",stroke:f,seed:n});xt=B.insert(()=>st,":first-child"),W=B.insert(()=>at),xt.attr("class","outer"),W.attr("class","inner")}else{xt=v.insert("rect",":first-child");let kt="outer";xt.attr("class",kt).attr("x",ht).attr("y",lt).attr("width",Q).attr("height",et).attr("data-look",e.look),W.attr("class","inner").attr("x",ht).attr("y",ft).attr("width",Q).attr("height",it)}q.attr("transform",`translate(${e.x-Y.width/2}, ${lt+1-(Ce(i)?0:3)})`);let Lt=xt.node().getBBox();return e.height=Lt.height,e.offsetX=0,e.offsetY=Y.height-e.padding/2,e.labelBBox=Y,e.intersect=function(kt){return ro(e,kt)},{cluster:B,labelBBox:Y}},"roundedWithTitle"),ES=t(async(r,e)=>{a.info("Creating subgraph rect for ",e.id,e);let i=l(),{themeVariables:s,handDrawnSeed:o}=i,{clusterBkg:n,clusterBorder:c}=s,{labelStyles:h,nodeStyles:g,borderStyles:y,backgroundStyles:f}=k(e),B=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),v=Ce(i),q=B.insert("g").attr("class","cluster-label "),W=await Le(q,e.label,{style:e.labelStyle,useHtmlLabels:v,isNode:!0,width:e.width}),H=W.getBBox();if(Ce(i)){let lt=W.children[0],ft=p(W);H=lt.getBoundingClientRect(),ft.attr("width",H.width),ft.attr("height",H.height)}let Y=e.width<=H.width+e.padding?H.width+e.padding:e.width;if(e.width<=H.width+e.padding)e.diff=(Y-e.width)/2-e.padding;else e.diff=-e.padding;let j=e.height,X=e.x-Y/2,Q=e.y-j/2;a.trace("Data ",e,JSON.stringify(e));let et;if(e.look==="handDrawn"){let lt=m.svg(B),ft=Gt(e,{roughness:0.7,fill:n,stroke:c,fillWeight:4,seed:o}),xt=lt.path(ci(X,Q,Y,j,e.rx),ft);et=B.insert(()=>(a.debug("Rough node insert CXC",xt),xt),":first-child"),et.select("path:nth-child(2)").attr("style",y.join(";")),et.select("path").attr("style",f.join(";").replace("fill","stroke"))}else et=B.insert("rect",":first-child"),et.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",X).attr("y",Q).attr("width",Y).attr("height",j);let{subGraphTitleTopMargin:it}=St(i);if(q.attr("transform",`translate(${e.x-H.width/2}, ${e.y-e.height/2+it})`),h){let lt=q.select("span");if(lt)lt.attr("style",h)}let ht=et.node().getBBox();return e.offsetX=0,e.width=ht.width,e.height=ht.height,e.offsetY=H.height-e.padding/2,e.intersect=function(lt){return ro(e,lt)},{cluster:B,labelBBox:H}},"kanbanSection"),OS=t((r,e)=>{let i=l(),{theme:s,themeVariables:o,handDrawnSeed:n}=i,{altBackground:c,nodeBorder:h,borderColorArray:g}=o,y=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look);Xe(y,e.colorIndex,s,g);let f=y.insert("g",":first-child"),B=0*e.padding,v=e.width+B;e.diff=-e.padding;let q=e.height+B,W=e.x-v/2,H=e.y-q/2;e.width=v;let Y;if(e.look==="handDrawn"){let Q=m.svg(y).rectangle(W,H,v,q,{fill:c??"#efefef",fillStyle:"solid",roughness:0.5,strokeLineDash:[5],stroke:h,seed:n});Y=y.insert(()=>Q,":first-child").attr("class","divider")}else{Y=f.insert("rect",":first-child");let X="outer";if(e.look==="neo")X="divider";else X="divider";Y.attr("class",X).attr("x",W).attr("y",H).attr("width",v).attr("height",q).attr("data-look",e.look)}let j=Y.node().getBBox();return e.height=j.height,e.offsetX=0,e.offsetY=0,e.intersect=function(X){return ro(e,X)},{cluster:y,labelBBox:{}}},"divider"),IS=t(async(r,e,i)=>{a.info(`Creating ${i.cssClass} for `,e.id,e);let s=l(),{theme:o,themeVariables:n,handDrawnSeed:c}=s,{borderColorArray:h}=n,{labelStyles:g,borderStyles:y}=k(e),f=r.insert("g").attr("class","cluster "+i.cssClass+" "+e.cssClasses).attr("id",e.domId??e.id).attr("data-look",e.look);Xe(f,e.colorIndex,o,h);let B=Ce(s),v=f.insert("g").attr("class","cluster-label"),q={width:0,height:0},W=e.label?.trim();if(W){let it;if(e.labelType==="markdown")it=await Le(v,e.label,{style:e.labelStyle,useHtmlLabels:B,isNode:!0,width:e.width});else it=await _i(v,e.label,e.labelStyle||"",!1,!0);if(q=it.getBBox(),B){let ht=it.children[0],lt=p(it);q=ht.getBoundingClientRect(),lt.attr("width",q.width),lt.attr("height",q.height)}}let H=e.width<=q.width+e.padding?q.width+e.padding:e.width;if(e.width<=q.width+e.padding)e.diff=(H-e.width)/2-e.padding;else e.diff=-e.padding;let Y=e.height,j=e.x-H/2,X=e.y-Y/2,Q;if(e.look==="handDrawn"){let it=m.svg(f),ht=Gt(e,{roughness:i.roughness,fill:i.fill,stroke:i.stroke,strokeWidth:i.strokeWidth,seed:c,...i.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...i.strokeDash?{strokeLineDash:i.strokeDash}:{}}),lt=it.path(ci(j,X,H,Y,i.rx),ht);Q=f.insert(()=>lt,":first-child"),Q.select("path:nth-child(2)").attr("style",y.join(";"))}else if(Q=f.insert("rect",":first-child"),Q.attr("rx",i.rx).attr("ry",i.rx).attr("x",j).attr("y",X).attr("width",H).attr("height",Y).attr("fill",i.fill).attr("stroke",i.stroke).attr("stroke-width",i.strokeWidth+"px"),i.strokeDash)Q.attr("stroke-dasharray",i.strokeDash.join(", "));if(W){let{subGraphTitleTopMargin:it}=St(s);if(v.attr("transform",`translate(${e.x-q.width/2}, ${e.y-e.height/2+it})`),g){let ht=v.select("span");if(ht)ht.attr("style",g)}}let et=Q.node().getBBox();return e.offsetX=0,e.width=et.width,e.height=et.height,e.offsetY=q.height-e.padding/2,e.intersect=function(it){return ro(e,it)},{cluster:f,labelBBox:q}},"createContainerGroup"),$S=t(async(r,e)=>{let{themeVariables:i}=l(),s=i.flowContainerStroke||i.secondaryBorderColor;return IS(r,e,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:s,strokeWidth:0.75,roughness:0.7})},"flowGroup"),DS=t((r,e)=>{let i=r.boundaryType||"rect",s=i==="package"?20:r.padding,o=i==="package"?e.height+10:0,n=Math.max(r.width,e.width+s),c=i==="package"?Math.max(r.height,o+r.padding*2):r.height,h=r.x-n/2,g=r.y-c/2;return{boundaryType:i,width:n,height:c,x:h,y:g,bodyY:g+o,bodyHeight:c-o,tabHeight:o,tabWidth:i==="package"?Math.min(n,Math.max(80,e.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),PS=t(async(r,e)=>{a.info("Creating usecase system boundary for ",e.id,e);let i=l(),{theme:s,themeVariables:o,handDrawnSeed:n}=i,{clusterBkg:c,clusterBorder:h,borderColorArray:g}=o,{labelStyles:y,nodeStyles:f}=k(e),{stylesMap:B}=Ni(e),v=e.boundaryType||"rect",q=r.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${v} ${e.cssClasses}`).attr("id",typeof e.domId==="string"?e.domId:e.id).attr("data-boundary-type",v).attr("data-look",e.look);Xe(q,e.colorIndex,s,g);let W=Ce(i),H=q.insert("g").attr("class","cluster-label system-boundary-title"),Y=await Le(H,e.label,{style:y,useHtmlLabels:W,isNode:!0}),j=Y.getBBox();if(W){let st=Y.children[0],at=p(Y);j=st.getBoundingClientRect(),at.attr("width",j.width),at.attr("height",j.height)}let X=DS(e,j),{width:Q,height:et,x:it,y:ht,bodyY:lt,bodyHeight:ft,tabHeight:xt,tabWidth:Lt}=X;e.diff=e.width<=j.width+e.padding?(Q-e.width)/2-e.padding:-e.padding;let kt=Gt(e,{fill:B.get("fill")||c,stroke:B.get("stroke")||h,strokeWidth:B.get("stroke-width")?.replace("px","")||1,seed:n});if(e.look==="handDrawn"){let st=m.svg(q),at=st.rectangle(it,lt,Q,ft,kt);if(q.insert(()=>at,":first-child").attr("class","boundary-body label-container"),v==="package"){let pt=st.rectangle(it,ht,Lt,xt,kt);q.insert(()=>pt,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else if(q.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",f).attr("x",it).attr("y",lt).attr("width",Q).attr("height",ft),v==="package")q.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",f).attr("x",it).attr("y",ht).attr("width",Lt).attr("height",xt);let{subGraphTitleTopMargin:Ct}=St(i);if(v==="package")H.attr("transform",`translate(${it+(Lt-j.width)/2}, ${ht+(xt-j.height)/2})`);else H.attr("transform",`translate(${e.x-j.width/2}, ${ht+Ct})`);if(y)H.attr("style",y),H.select("span").attr("style",y);return e.offsetX=0,e.width=Q,e.height=et,e.offsetY=j.height-e.padding/2,e.labelBBox=j,e.intersect=function(st){return ro(e,st)},{cluster:q,labelBBox:j}},"usecaseSystemBoundary"),RS=v0,qS={rect:v0,squareRect:RS,roundedWithTitle:MS,noteGroup:AS,divider:OS,kanbanSection:ES,flowGroup:$S,usecaseSystemBoundary:PS,swimlane:FS};var L0=new Map,Qt=t(async(r,e)=>{let i=e.shape||"rect",s=await qS[i](r,e);return L0.set(e.id,s),s},"insertCluster"),ko=t(()=>{L0=new Map},"clear");var mn=t((r,e)=>{if(e)return"translate("+-r.width/2+", "+-r.height/2+")";let i=r.x??0,s=r.y??0;return"translate("+-(i+r.width/2)+", "+-(s+r.height/2)+")"},"computeLabelTransform"),Me={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},F0={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function xn(r,e){if(r===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};r=er(r),e=er(e);let[i,s]=[r.x,r.y],[o,n]=[e.x,e.y],c=o-i,h=n-s;return{angle:Math.atan(h/c),deltaX:c,deltaY:h}}t(xn,"calculateDeltaAndAngle");var er=t((r)=>{if(Array.isArray(r))return{x:r[0],y:r[1]};return r},"pointTransformer"),NS=t((r)=>({x:t(function(e,i,s){let o=0,n=er(s[0]).x<er(s[s.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(Me,r.arrowTypeStart)){let{angle:q,deltaX:W}=xn(s[0],s[1]);o=Me[r.arrowTypeStart]*Math.cos(q)*(W>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Me,r.arrowTypeEnd)){let{angle:q,deltaX:W}=xn(s[s.length-1],s[s.length-2]);o=Me[r.arrowTypeEnd]*Math.cos(q)*(W>=0?1:-1)}let c=Math.abs(er(e).x-er(s[s.length-1]).x),h=Math.abs(er(e).y-er(s[s.length-1]).y),g=Math.abs(er(e).x-er(s[0]).x),y=Math.abs(er(e).y-er(s[0]).y),f=Me[r.arrowTypeStart],B=Me[r.arrowTypeEnd],v=1;if(c<B&&c>0&&h<B){let q=B+v-c;q*=n==="right"?-1:1,o-=q}if(g<f&&g>0&&y<f){let q=f+v-g;q*=n==="right"?-1:1,o+=q}return er(e).x+o},"x"),y:t(function(e,i,s){let o=0,n=er(s[0]).y<er(s[s.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(Me,r.arrowTypeStart)){let{angle:q,deltaY:W}=xn(s[0],s[1]);o=Me[r.arrowTypeStart]*Math.abs(Math.sin(q))*(W>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Me,r.arrowTypeEnd)){let{angle:q,deltaY:W}=xn(s[s.length-1],s[s.length-2]);o=Me[r.arrowTypeEnd]*Math.abs(Math.sin(q))*(W>=0?1:-1)}let c=Math.abs(er(e).y-er(s[s.length-1]).y),h=Math.abs(er(e).x-er(s[s.length-1]).x),g=Math.abs(er(e).y-er(s[0]).y),y=Math.abs(er(e).x-er(s[0]).x),f=Me[r.arrowTypeStart],B=Me[r.arrowTypeEnd],v=1;if(c<B&&c>0&&h<B){let q=B+v-c;q*=n==="up"?-1:1,o-=q}if(g<f&&g>0&&y<f){let q=f+v-g;q*=n==="up"?-1:1,o+=q}return er(e).y+o},"y")}),"getLineFunctionsWithOffset"),WS=t((r,e,i,s,o,n=!1,c)=>{if(e.arrowTypeStart)A0(r,"start",e.arrowTypeStart,i,s,o,n,c);if(e.arrowTypeEnd)A0(r,"end",e.arrowTypeEnd,i,s,o,n,c)},"addEdgeMarkers"),zS={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},arrow_hierarchy:{type:"hierarchy",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}},HS=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],A0=t((r,e,i,s,o,n,c=!1,h)=>{if(!i||i==="none")return;let g=zS[i],y=g&&HS.includes(g.type);if(!g){a.warn(`Unknown arrow type: ${i}`);return}let f=g.type,q=`${o}_${n}-${f}${e==="start"?"Start":"End"}${c&&y?"-margin":""}`;if(h&&h.trim()!==""){let W=h.replace(/[^\dA-Za-z]/g,"_"),H=`${q}_${W}`;if(!document.getElementById(H)){let Y=document.getElementById(q);if(Y){let j=Y.cloneNode(!0);j.id=H,j.querySelectorAll("path, circle, line").forEach((Q)=>{if(Q.setAttribute("stroke",h),g.fill)Q.setAttribute("fill",h)}),Y.parentNode?.appendChild(j)}}r.attr(`marker-${e}`,`url(${s}#${H})`)}else r.attr(`marker-${e}`,`url(${s}#${q})`)},"addEdgeMarker"),YS=t((r)=>typeof r==="string"?r:l()?.flowchart?.curve,"resolveEdgeCurveType"),Wn=new Map,Ne=new Map,Co=t(()=>{Wn.clear(),Ne.clear()},"clear"),Xi=t((r)=>Boolean(r.label||r.startLabelLeft||r.startLabelRight||r.endLabelLeft||r.endLabelRight),"hasEdgeLabel"),yn=t((r)=>{if(!r)return"";if(typeof r==="string")return r;return r.reduce((e,i)=>e+";"+i,"")},"getLabelStyles"),Et=t(async(r,e)=>{let i=l(),s=Ce(i),{labelStyles:o}=k(e);e.labelStyle=o;let n=r.insert("g").attr("class","edgeLabel"),c=n.insert("g").attr("class","label").attr("data-id",e.id),h=e.labelType==="markdown",g=void 0,y=await Le(r,e.label,{style:yn(e.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:h,width:h?g:void 0},i);c.node().appendChild(y),a.info("abc82",e,e.labelType);let f,B;if(s){let q=y.children[0],W=p(y);f=await Io.measure(()=>q.getBoundingClientRect()),B=f,W.attr("width",f.width),W.attr("height",f.height)}else{let q=p(y).select("text").node();await Io.measure(()=>{if(f=y.getBBox(),q&&typeof q.getBBox==="function")B=q.getBBox();else B=f})}c.attr("transform",mn(B,s)),Wn.set(e.id,n),e.width=f.width,e.height=f.height;let v;if(e.startLabelLeft){let q=r.insert("g").attr("class","edgeTerminals"),W=q.insert("g").attr("class","inner"),H=await _i(W,e.startLabelLeft,yn(e.labelStyle)||"",!1,!1);v=H;let Y=H.getBBox();if(s){let j=H.children[0],X=p(H);Y=j.getBoundingClientRect(),X.attr("width",Y.width),X.attr("height",Y.height)}if(W.attr("transform",mn(Y,s)),!Ne.get(e.id))Ne.set(e.id,{});Ne.get(e.id).startLeft=q,wn(v,e.startLabelLeft,Y),bn(e,"startLeft",Y)}if(e.startLabelRight){let q=r.insert("g").attr("class","edgeTerminals"),W=q.insert("g").attr("class","inner"),H=await _i(W,e.startLabelRight,yn(e.labelStyle)||"",!1,!1);v=H;let Y=H.getBBox();if(s){let j=H.children[0],X=p(H);Y=j.getBoundingClientRect(),X.attr("width",Y.width),X.attr("height",Y.height)}if(W.attr("transform",mn(Y,s)),!Ne.get(e.id))Ne.set(e.id,{});Ne.get(e.id).startRight=q,wn(v,e.startLabelRight,Y),bn(e,"startRight",Y)}if(e.endLabelLeft){let q=r.insert("g").attr("class","edgeTerminals"),W=q.insert("g").attr("class","inner"),H=await _i(W,e.endLabelLeft,yn(e.labelStyle)||"",!1,!1);v=H;let Y=H.getBBox();if(s){let j=H.children[0],X=p(H);Y=j.getBoundingClientRect(),X.attr("width",Y.width),X.attr("height",Y.height)}if(W.attr("transform",mn(Y,s)),!Ne.get(e.id))Ne.set(e.id,{});Ne.get(e.id).endLeft=q,wn(v,e.endLabelLeft,Y),bn(e,"endLeft",Y)}if(e.endLabelRight){let q=r.insert("g").attr("class","edgeTerminals"),W=q.insert("g").attr("class","inner"),H=await _i(W,e.endLabelRight,yn(e.labelStyle)||"",!1,!1);v=H;let Y=H.getBBox();if(s){let j=H.children[0],X=p(H);Y=j.getBoundingClientRect(),X.attr("width",Y.width),X.attr("height",Y.height)}if(W.attr("transform",mn(Y,s)),!Ne.get(e.id))Ne.set(e.id,{});Ne.get(e.id).endRight=q,wn(v,e.endLabelRight,Y),bn(e,"endRight",Y)}return y},"insertEdgeLabel");function bn(r,e,i){r.terminalLabelSizes??={},r.terminalLabelSizes[e]={width:i.width,height:i.height}}t(bn,"recordTerminalLabelSize");function wn(r,e,i){if(Ce(l())&&r)r.style.width=Math.max(e.length*9,i.width)+"px",r.style.height=i.height+"px"}t(wn,"setTerminalWidth");var Ki=t((r,e)=>{let{x:i,y:s}=r;if(e?.updatedPath){let o=N.calcLabelPosition(e.updatedPath);if(e.originalPath){let n=N.calcLabelPosition(e.originalPath);i=r.x+(o.x-n.x),s=r.y+(o.y-n.y)}else i=o.x,s=o.y}return{x:i,y:s}},"resolveEdgeLabelPosition"),Gn=t((r,e)=>{a.debug("Moving label abc88 ",r.id,r.label,Wn.get(r.id),e);let i=l(),{subGraphTitleTotalMargin:s}=St(i);if(r.label){let n=Wn.get(r.id),{x:c,y:h}=Ki(r,e);a.debug("Moving label "+r.label+" from (",r.x,",",r.y,") to (",c,",",h,") abc88"),n.attr("transform",`translate(${c}, ${h+s/2})`)}let o=e.updatedPath?e.updatedPath:e.originalPath;if(r.startLabelLeft){let n=Ne.get(r.id).startLeft,{x:c,y:h}=r;if(o){let g=N.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",o);c=g.x,h=g.y}n.attr("transform",`translate(${c}, ${h})`)}if(r.startLabelRight){let n=Ne.get(r.id).startRight,{x:c,y:h}=r;if(o){let g=N.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",o);c=g.x,h=g.y}n.attr("transform",`translate(${c}, ${h})`)}if(r.endLabelLeft){let n=Ne.get(r.id).endLeft,{x:c,y:h}=r;if(o){let g=N.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",o);c=g.x,h=g.y}n.attr("transform",`translate(${c}, ${h})`)}if(r.endLabelRight){let n=Ne.get(r.id).endRight,{x:c,y:h}=r;if(o){let g=N.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",o);c=g.x,h=g.y}n.attr("transform",`translate(${c}, ${h})`)}},"positionEdgeLabel"),US=t((r,e)=>{if(!r?.isLabelEdge||!r?.id?.endsWith("-to-label")||!Array.isArray(e))return e;if(e.length!==2)return e;let[i,s]=e,o=Math.abs(s.x-i.x),n=Math.abs(s.y-i.y);if(o<0.001||n<0.001)return e;if(n>=o)return[i,{x:i.x,y:s.y},s];return[i,{x:s.x,y:i.y},s]},"orthogonalizeToLabelClippedPoints"),jS=t((r,e)=>{let{x:i,y:s}=r,o=Math.abs(e.x-i),n=Math.abs(e.y-s),c=r.width/2,h=r.height/2;return o>=c||n>=h},"outsideNode"),GS=t((r,e,i)=>{a.debug(`intersection calc abc89:
294
294
  outsidePoint: ${JSON.stringify(e)}
295
295
  insidePoint : ${JSON.stringify(i)}
296
- node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);let{x:s,y:o}=r,n=Math.abs(s-i.x),c=r.width/2,h=i.x<e.x?c-n:c+n,g=r.height/2,y=Math.abs(e.y-i.y),f=Math.abs(e.x-i.x);if(Math.abs(o-e.y)*c>Math.abs(s-e.x)*g){let B=i.y<e.y?e.y-g-o:o-g-e.y;h=f*B/y;let v={x:i.x<e.x?i.x+h:i.x-f+h,y:i.y<e.y?i.y+y-B:i.y-y+B};if(h===0)v.x=e.x,v.y=e.y;if(f===0)v.x=e.x;if(y===0)v.y=e.y;return a.debug(`abc89 top/bottom calc, Q ${y}, q ${B}, R ${f}, r ${h}`,v),v}else{if(i.x<e.x)h=e.x-c-s;else h=s-c-e.x;let B=y*h/f,v=i.x<e.x?i.x+f-h:i.x-f+h,q=i.y<e.y?i.y+B:i.y-B;if(a.debug(`sides calc abc89, Q ${y}, q ${B}, R ${f}, r ${h}`,{_x:v,_y:q}),h===0)v=e.x,q=e.y;if(f===0)v=e.x;if(y===0)q=e.y;return{x:v,y:q}}},"intersection"),M0=t((r,e)=>{a.warn("abc88 cutPathAtIntersect",r,e);let i=[],s=r[0],o=!1;return r.forEach((n)=>{if(a.info("abc88 checking point",n,e),!jS(e,n)&&!o){let c=GS(e,s,n);a.debug("abc88 inside",n,s,c),a.debug("abc88 intersection",c,e);let h=!1;if(i.forEach((g)=>{h=h||g.x===c.x&&g.y===c.y}),!i.some((g)=>g.x===c.x&&g.y===c.y))i.push(c);else a.warn("abc88 no intersect",c,i);o=!0}else if(a.warn("abc88 outside",n,s),s=n,!o)i.push(n)}),a.debug("returning points",i),i},"cutPathAtIntersect");function O0(r){let e=[],i=[];for(let s=1;s<r.length-1;s++){let o=r[s-1],n=r[s],c=r[s+1];if(o.x===n.x&&n.y===c.y&&Math.abs(n.x-c.x)>5&&Math.abs(n.y-o.y)>5)e.push(n),i.push(s);else if(o.y===n.y&&n.x===c.x&&Math.abs(n.x-o.x)>5&&Math.abs(n.y-c.y)>5)e.push(n),i.push(s)}return{cornerPoints:e,cornerPointPositions:i}}t(O0,"extractCornerPoints");var E0=t(function(r,e,i){let s=e.x-r.x,o=e.y-r.y,n=Math.sqrt(s*s+o*o),c=i/n;return{x:e.x-c*s,y:e.y-c*o}},"findAdjacentPoint"),XS=t(function(r){let{cornerPointPositions:e}=O0(r),i=[];for(let s=0;s<r.length;s++)if(e.includes(s)){let o=r[s-1],n=r[s+1],c=r[s],h=E0(o,c,5),g=E0(n,c,5),y=g.x-h.x,f=g.y-h.y;i.push(h);let B=Math.sqrt(2)*2,v={x:c.x,y:c.y};if(Math.abs(n.x-o.x)>10&&Math.abs(n.y-o.y)>=10){a.debug("Corner point fixing",Math.abs(n.x-o.x),Math.abs(n.y-o.y));let q=5;if(c.x===h.x)v={x:y<0?h.x-q+B:h.x+q-B,y:f<0?h.y-B:h.y+B};else v={x:y<0?h.x-B:h.x+B,y:f<0?h.y-q+B:h.y+q-B}}else a.debug("Corner point skipping fixing",Math.abs(n.x-o.x),Math.abs(n.y-o.y));i.push(v,g)}else i.push(r[s]);return i},"fixCorners"),VS=t((r,e,i)=>{let s=r-e-i,o=2,n=2,c=4,h=Math.floor(s/4),g=Number.isFinite(h)?Math.max(0,h):0,y=Array(g).fill("2 2").join(" ");return`0 ${e} ${y} ${i}`},"generateDashArray"),tn=t(function(r,e,i,s,o,n,c,h=!1,g=void 0){if(!c)throw Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:y,layout:f}=l(),B=g??f,v=e.points,q=!1,W=o;var H=n;let Y=[];for(let Ht in e.cssCompiledStyles){if(Zr(Ht))continue;Y.push(e.cssCompiledStyles[Ht])}if(B==="swimlane"){if(!h&&H.intersect&&W.intersect&&Array.isArray(v)&&v.length>=2)if(v.length===2)v=[W.intersect(v[0]),H.intersect(v[1])];else{let Ht=v.slice(1,-1),he=Ht[0],ne=Ht[Ht.length-1],_e=0.5,Ae=Math.abs(v[v.length-1].x-ne.x)<0.5&&Math.abs(v[v.length-1].y-ne.y)<0.5,xe=W.intersect(he),Wt=Ae?ne:H.intersect(ne),re=Math.abs(Wt.x-ne.x)<0.5&&Math.abs(Wt.y-ne.y)<0.5,ue=Math.abs(xe.x-he.x)<0.5&&Math.abs(xe.y-he.y)<0.5?[]:[xe],Ke=re?[]:[Wt];v=[...ue,...Ht,...Ke]}v=US(e,v)}else if(H.intersect&&W.intersect&&!h)v=v.slice(1,e.points.length-1),v.unshift(W.intersect(v[0])),v.push(H.intersect(v[v.length-1]));let j=btoa(JSON.stringify(v));if(e.toCluster)a.info("to cluster abc88",i.get(e.toCluster)),v=M0(e.points,i.get(e.toCluster).node),q=!0;if(e.fromCluster)a.debug("from cluster abc88",i.get(e.fromCluster),JSON.stringify(v,null,2)),v=M0(v.reverse(),i.get(e.fromCluster).node).reverse(),q=!0;let X=v.filter((Ht)=>!Number.isNaN(Ht.y)),Q=YS(e.curve);if(Q!=="rounded")X=XS(X);let rt=Ii;switch(Q){case"linear":rt=Ii;break;case"basis":rt=rs;break;case"cardinal":rt=ba;break;case"bumpX":rt=Wn;break;case"bumpY":rt=xa;break;case"catmullRom":rt=wa;break;case"monotoneX":rt=Sa;break;case"monotoneY":rt=Ta;break;case"natural":rt=vs;break;case"step":rt=Ls;break;case"stepAfter":rt=va;break;case"stepBefore":rt=_a;break;case"rounded":rt=Ii;break;default:rt=rs}let{x:it,y:ct}=NS(e),lt=Vn().x(it).y(ct).curve(rt),dt;switch(e.thickness){case"normal":dt="edge-thickness-normal";break;case"thick":dt="edge-thickness-thick";break;case"invisible":dt="edge-thickness-invisible";break;default:dt="edge-thickness-normal"}switch(e.pattern){case"solid":dt+=" edge-pattern-solid";break;case"dotted":dt+=" edge-pattern-dotted";break;case"dashed":dt+=" edge-pattern-dashed";break;default:dt+=" edge-pattern-solid"}let Ct,Bt=Q==="rounded"?I0($0(X,e),5):lt(X),kt=Array.isArray(e.style)?e.style:[e.style],bt=kt.find((Ht)=>Ht?.startsWith("stroke:")),st="";if(e.animate)st="edge-animation-fast";if(e.animation)st="edge-animation-"+e.animation;let at=!1;if(e.look==="handDrawn"){let Ht=m.svg(r);Object.assign([],X);let he=Ht.path(Bt,{roughness:0.3,seed:y});dt+=" transition",Ct=p(he).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+dt+(e.classes?" "+e.classes:"")+(st?" "+st:"")).attr("style",kt?kt.reduce((_e,Ae)=>_e+";"+Ae,""):"");let ne=Ct.attr("d");Ct.attr("d",ne),r.node().appendChild(Ct.node())}else{let Ht=Y.join(";"),he=kt?kt.reduce((re,ce)=>re+ce+";",""):"",ne=(Ht?Ht+";"+he+";":he)+";"+(kt?kt.reduce((re,ce)=>re+";"+ce,""):"");Ct=r.append("path").attr("d",Bt).attr("id",`${c}-${e.id}`).attr("class"," "+dt+(e.classes?" "+e.classes:"")+(st?" "+st:"")).attr("style",ne),bt=ne.match(/stroke:([^;]+)/)?.[1],at=e.animate===!0||!!e.animation||Ht.includes("animation");let _e=Ct.node(),Ae=typeof _e.getTotalLength==="function"?_e.getTotalLength():0,xe=F0[e.arrowTypeStart]||0,Wt=F0[e.arrowTypeEnd]||0;if(e.look==="neo"&&!at){let ce=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?VS(Ae,xe,Wt):`0 ${xe} ${Ae-xe-Wt} ${Wt}`}; stroke-dashoffset: 0;`;Ct.attr("style",ce+Ct.attr("style"))}}if(Ct.attr("data-edge",!0),Ct.attr("data-et","edge"),Ct.attr("data-id",e.id),Ct.attr("data-points",j),Ct.attr("data-look",tr(e.look)),e.showPoints)X.forEach((Ht)=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",Ht.x).attr("cy",Ht.y)});let mt="";if(l().flowchart.arrowMarkerAbsolute||l().state.arrowMarkerAbsolute)mt=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,mt=mt.replace(/\(/g,"\\(").replace(/\)/g,"\\)");a.info("arrowTypeStart",e.arrowTypeStart),a.info("arrowTypeEnd",e.arrowTypeEnd);let ot=!at&&e?.look==="neo";WS(Ct,e,mt,c,s,ot,bt);let wt=Math.floor(v.length/2),Lt=v[wt];if(!M.isLabelCoordinateInPath(Lt,Ct.attr("d")))q=!0;let Yt={};if(q)Yt.updatedPath=v;return Yt.originalPath=e.points,Yt},"insertEdge");function I0(r,e){if(r.length<2)return"";let i="",s=r.length,o=0.00001;for(let n=0;n<s;n++){let c=r[n],h=r[n-1],g=r[n+1];if(n===0)i+=`M${c.x},${c.y}`;else if(n===s-1)i+=`L${c.x},${c.y}`;else{let y=c.x-h.x,f=c.y-h.y,B=g.x-c.x,v=g.y-c.y,q=Math.hypot(y,f),W=Math.hypot(B,v);if(q<o||W<o){i+=`L${c.x},${c.y}`;continue}let H=y/q,Y=f/q,j=B/W,X=v/W,Q=H*j+Y*X,rt=Math.max(-1,Math.min(1,Q)),it=Math.acos(rt);if(it<o||Math.abs(Math.PI-it)<o){i+=`L${c.x},${c.y}`;continue}let ct=Math.min(e/Math.sin(it/2),q/2,W/2),lt=c.x-H*ct,dt=c.y-Y*ct,Ct=c.x+j*ct,Bt=c.y+X*ct;i+=`L${lt},${dt}`,i+=`Q${c.x},${c.y} ${Ct},${Bt}`}}return i}t(I0,"generateRoundedPath");function ad(r,e){if(!r||!e)return{angle:0,deltaX:0,deltaY:0};let i=e.x-r.x,s=e.y-r.y;return{angle:Math.atan2(s,i),deltaX:i,deltaY:s}}t(ad,"calculateDeltaAndAngle");function $0(r,e){let i=r.map((o)=>({...o}));if(r.length>=2&&Ne[e.arrowTypeStart]){let o=Ne[e.arrowTypeStart],n=r[0],c=r[1],{angle:h}=ad(n,c),g=o*Math.cos(h),y=o*Math.sin(h);i[0].x=n.x+g,i[0].y=n.y+y}let s=r.length;if(s>=2&&Ne[e.arrowTypeEnd]){let o=Ne[e.arrowTypeEnd],n=r[s-1],c=r[s-2],{angle:h}=ad(c,n),g=o*Math.cos(h),y=o*Math.sin(h);i[s-1].x=n.x-g,i[s-1].y=n.y-y}return i}t($0,"applyMarkerOffsetsToPoints");var KS=t((r,e,i,s)=>{e.forEach((o)=>{bT[o](r,i,s)})},"insertMarkers"),ZS=t((r,e,i)=>{a.trace("Making markers for ",i),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionStart").attr("class","marker extension "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),r.append("marker").attr("id",i+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).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"),QS=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).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"),JS=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).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"),tT=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).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"),eT=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).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),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).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),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).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),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).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"),rT=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-pointEnd").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-pointStart").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-pointEnd-margin").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-pointStart-margin").attr("class","marker "+e).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"),iT=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-circleEnd").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-circleStart").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-circleEnd-margin").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-circleStart-margin").attr("class","marker "+e).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"),oT=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),r.append("marker").attr("id",i+"_"+e+"-crossStart").attr("class","marker cross "+e).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"),r.append("marker").attr("id",i+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).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),r.append("marker").attr("id",i+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).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"),sT=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-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"),aT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{transitionColor:n}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-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",`${n}`)},"barbNeo"),nT=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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"),lT=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),s.append("path").attr("d","M9,0 L9,18");let o=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),hT=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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"),cT=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let o=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),uT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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",`${n}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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",`${n}`)},"only_one_neo"),fT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n,mainBkg:c}=o,h=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");h.append("circle").attr("fill",c??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${n}`).attr("r",6),h.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${n}`);let g=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");g.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${n}`).attr("r",6),g.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${n}`)},"zero_or_one_neo"),dT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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",`${n}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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",`${n}`)},"one_or_more_neo"),pT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n,mainBkg:c}=o,h=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");h.append("circle").attr("fill",c??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${n}`),h.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${n}`);let g=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");g.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${n}`),g.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${n}`)},"zero_or_more_neo"),gT=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
296
+ node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);let{x:s,y:o}=r,n=Math.abs(s-i.x),c=r.width/2,h=i.x<e.x?c-n:c+n,g=r.height/2,y=Math.abs(e.y-i.y),f=Math.abs(e.x-i.x);if(Math.abs(o-e.y)*c>Math.abs(s-e.x)*g){let B=i.y<e.y?e.y-g-o:o-g-e.y;h=f*B/y;let v={x:i.x<e.x?i.x+h:i.x-f+h,y:i.y<e.y?i.y+y-B:i.y-y+B};if(h===0)v.x=e.x,v.y=e.y;if(f===0)v.x=e.x;if(y===0)v.y=e.y;return a.debug(`abc89 top/bottom calc, Q ${y}, q ${B}, R ${f}, r ${h}`,v),v}else{if(i.x<e.x)h=e.x-c-s;else h=s-c-e.x;let B=y*h/f,v=i.x<e.x?i.x+f-h:i.x-f+h,q=i.y<e.y?i.y+B:i.y-B;if(a.debug(`sides calc abc89, Q ${y}, q ${B}, R ${f}, r ${h}`,{_x:v,_y:q}),h===0)v=e.x,q=e.y;if(f===0)v=e.x;if(y===0)q=e.y;return{x:v,y:q}}},"intersection"),M0=t((r,e)=>{a.warn("abc88 cutPathAtIntersect",r,e);let i=[],s=r[0],o=!1;return r.forEach((n)=>{if(a.info("abc88 checking point",n,e),!jS(e,n)&&!o){let c=GS(e,s,n);a.debug("abc88 inside",n,s,c),a.debug("abc88 intersection",c,e);let h=!1;if(i.forEach((g)=>{h=h||g.x===c.x&&g.y===c.y}),!i.some((g)=>g.x===c.x&&g.y===c.y))i.push(c);else a.warn("abc88 no intersect",c,i);o=!0}else if(a.warn("abc88 outside",n,s),s=n,!o)i.push(n)}),a.debug("returning points",i),i},"cutPathAtIntersect");function O0(r){let e=[],i=[];for(let s=1;s<r.length-1;s++){let o=r[s-1],n=r[s],c=r[s+1];if(o.x===n.x&&n.y===c.y&&Math.abs(n.x-c.x)>5&&Math.abs(n.y-o.y)>5)e.push(n),i.push(s);else if(o.y===n.y&&n.x===c.x&&Math.abs(n.x-o.x)>5&&Math.abs(n.y-c.y)>5)e.push(n),i.push(s)}return{cornerPoints:e,cornerPointPositions:i}}t(O0,"extractCornerPoints");var E0=t(function(r,e,i){let s=e.x-r.x,o=e.y-r.y,n=Math.sqrt(s*s+o*o),c=i/n;return{x:e.x-c*s,y:e.y-c*o}},"findAdjacentPoint"),XS=t(function(r){let{cornerPointPositions:e}=O0(r),i=[];for(let s=0;s<r.length;s++)if(e.includes(s)){let o=r[s-1],n=r[s+1],c=r[s],h=E0(o,c,5),g=E0(n,c,5),y=g.x-h.x,f=g.y-h.y;i.push(h);let B=Math.sqrt(2)*2,v={x:c.x,y:c.y};if(Math.abs(n.x-o.x)>10&&Math.abs(n.y-o.y)>=10){a.debug("Corner point fixing",Math.abs(n.x-o.x),Math.abs(n.y-o.y));let q=5;if(c.x===h.x)v={x:y<0?h.x-q+B:h.x+q-B,y:f<0?h.y-B:h.y+B};else v={x:y<0?h.x-B:h.x+B,y:f<0?h.y-q+B:h.y+q-B}}else a.debug("Corner point skipping fixing",Math.abs(n.x-o.x),Math.abs(n.y-o.y));i.push(v,g)}else i.push(r[s]);return i},"fixCorners"),VS=t((r,e,i)=>{let s=r-e-i,o=2,n=2,c=4,h=Math.floor(s/4),g=Number.isFinite(h)?Math.max(0,h):0,y=Array(g).fill("2 2").join(" ");return`0 ${e} ${y} ${i}`},"generateDashArray"),Jt=t(function(r,e,i,s,o,n,c,h=!1,g=void 0){if(!c)throw Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:y,layout:f}=l(),B=g??f,v=e.points,q=!1,W=o;var H=n;let Y=[];for(let Yt in e.cssCompiledStyles){if(Hr(Yt))continue;Y.push(e.cssCompiledStyles[Yt])}if(B==="swimlane"){if(!h&&H.intersect&&W.intersect&&Array.isArray(v)&&v.length>=2)if(v.length===2)v=[W.intersect(v[0]),H.intersect(v[1])];else{let Yt=v.slice(1,-1),ue=Yt[0],ce=Yt[Yt.length-1],Ae=0.5,Oe=Math.abs(v[v.length-1].x-ce.x)<0.5&&Math.abs(v[v.length-1].y-ce.y)<0.5,we=W.intersect(ue),Ht=Oe?ce:H.intersect(ce),ne=Math.abs(Ht.x-ce.x)<0.5&&Math.abs(Ht.y-ce.y)<0.5,xe=Math.abs(we.x-ue.x)<0.5&&Math.abs(we.y-ue.y)<0.5?[]:[we],Je=ne?[]:[Ht];v=[...xe,...Yt,...Je]}v=US(e,v)}else if(H.intersect&&W.intersect&&!h)v=v.slice(1,e.points.length-1),v.unshift(W.intersect(v[0])),v.push(H.intersect(v[v.length-1]));let j=btoa(JSON.stringify(v));if(e.toCluster)a.info("to cluster abc88",i.get(e.toCluster)),v=M0(e.points,i.get(e.toCluster).node),q=!0;if(e.fromCluster)a.debug("from cluster abc88",i.get(e.fromCluster),JSON.stringify(v,null,2)),v=M0(v.reverse(),i.get(e.fromCluster).node).reverse(),q=!0;let X=v.filter((Yt)=>!Number.isNaN(Yt.y)),Q=YS(e.curve);if(Q!=="rounded")X=XS(X);let et=Ri;switch(Q){case"linear":et=Ri;break;case"basis":et=is;break;case"cardinal":et=ba;break;case"bumpX":et=qn;break;case"bumpY":et=xa;break;case"catmullRom":et=wa;break;case"monotoneX":et=Sa;break;case"monotoneY":et=Ta;break;case"natural":et=Ls;break;case"step":et=Fs;break;case"stepAfter":et=va;break;case"stepBefore":et=_a;break;case"rounded":et=Ri;break;default:et=is}let{x:it,y:ht}=NS(e),lt=jn().x(it).y(ht).curve(et),ft;switch(e.thickness){case"normal":ft="edge-thickness-normal";break;case"thick":ft="edge-thickness-thick";break;case"invisible":ft="edge-thickness-invisible";break;default:ft="edge-thickness-normal"}switch(e.pattern){case"solid":ft+=" edge-pattern-solid";break;case"dotted":ft+=" edge-pattern-dotted";break;case"dashed":ft+=" edge-pattern-dashed";break;default:ft+=" edge-pattern-solid"}let xt,Lt=Q==="rounded"?I0($0(X,e),5):lt(X),kt=Array.isArray(e.style)?e.style:[e.style],Ct=kt.find((Yt)=>Yt?.startsWith("stroke:")),st="";if(e.animate)st="edge-animation-fast";if(e.animation)st="edge-animation-"+e.animation;let at=!1;if(e.look==="handDrawn"){let Yt=m.svg(r);Object.assign([],X);let ue=Yt.path(Lt,{roughness:0.3,seed:y});ft+=" transition",xt=p(ue).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+ft+(e.classes?" "+e.classes:"")+(st?" "+st:"")).attr("style",kt?kt.reduce((Ae,Oe)=>Ae+";"+Oe,""):"");let ce=xt.attr("d");xt.attr("d",ce),r.node().appendChild(xt.node())}else{let Yt=Y.join(";"),ue=kt?kt.reduce((ne,me)=>ne+me+";",""):"",ce=(Yt?Yt+";"+ue+";":ue)+";"+(kt?kt.reduce((ne,me)=>ne+";"+me,""):"");xt=r.append("path").attr("d",Lt).attr("id",`${c}-${e.id}`).attr("class"," "+ft+(e.classes?" "+e.classes:"")+(st?" "+st:"")).attr("style",ce),Ct=ce.match(/stroke:([^;]+)/)?.[1],at=e.animate===!0||!!e.animation||Yt.includes("animation");let Ae=xt.node(),Oe=typeof Ae.getTotalLength==="function"?Ae.getTotalLength():0,we=F0[e.arrowTypeStart]||0,Ht=F0[e.arrowTypeEnd]||0;if(e.look==="neo"&&!at){let me=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?VS(Oe,we,Ht):`0 ${we} ${Oe-we-Ht} ${Ht}`}; stroke-dashoffset: 0;`;xt.attr("style",me+xt.attr("style"))}}if(xt.attr("data-edge",!0),xt.attr("data-et","edge"),xt.attr("data-id",e.id),xt.attr("data-points",j),xt.attr("data-look",rr(e.look)),e.showPoints)X.forEach((Yt)=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",Yt.x).attr("cy",Yt.y)});let pt="";if(l().flowchart.arrowMarkerAbsolute||l().state.arrowMarkerAbsolute)pt=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,pt=pt.replace(/\(/g,"\\(").replace(/\)/g,"\\)");a.info("arrowTypeStart",e.arrowTypeStart),a.info("arrowTypeEnd",e.arrowTypeEnd);let ot=!at&&e?.look==="neo";WS(xt,e,pt,c,s,ot,Ct);let wt=Math.floor(v.length/2),At=v[wt];if(!N.isLabelCoordinateInPath(At,xt.attr("d")))q=!0;let jt={};if(q)jt.updatedPath=v;return jt.originalPath=e.points,jt},"insertEdge");function I0(r,e){if(r.length<2)return"";let i="",s=r.length,o=0.00001;for(let n=0;n<s;n++){let c=r[n],h=r[n-1],g=r[n+1];if(n===0)i+=`M${c.x},${c.y}`;else if(n===s-1)i+=`L${c.x},${c.y}`;else{let y=c.x-h.x,f=c.y-h.y,B=g.x-c.x,v=g.y-c.y,q=Math.hypot(y,f),W=Math.hypot(B,v);if(q<o||W<o){i+=`L${c.x},${c.y}`;continue}let H=y/q,Y=f/q,j=B/W,X=v/W,Q=H*j+Y*X,et=Math.max(-1,Math.min(1,Q)),it=Math.acos(et);if(it<o||Math.abs(Math.PI-it)<o){i+=`L${c.x},${c.y}`;continue}let ht=Math.min(e/Math.sin(it/2),q/2,W/2),lt=c.x-H*ht,ft=c.y-Y*ht,xt=c.x+j*ht,Lt=c.y+X*ht;i+=`L${lt},${ft}`,i+=`Q${c.x},${c.y} ${xt},${Lt}`}}return i}t(I0,"generateRoundedPath");function ad(r,e){if(!r||!e)return{angle:0,deltaX:0,deltaY:0};let i=e.x-r.x,s=e.y-r.y;return{angle:Math.atan2(s,i),deltaX:i,deltaY:s}}t(ad,"calculateDeltaAndAngle");function $0(r,e){let i=r.map((o)=>({...o}));if(r.length>=2&&Me[e.arrowTypeStart]){let o=Me[e.arrowTypeStart],n=r[0],c=r[1],{angle:h}=ad(n,c),g=o*Math.cos(h),y=o*Math.sin(h);i[0].x=n.x+g,i[0].y=n.y+y}let s=r.length;if(s>=2&&Me[e.arrowTypeEnd]){let o=Me[e.arrowTypeEnd],n=r[s-1],c=r[s-2],{angle:h}=ad(c,n),g=o*Math.cos(h),y=o*Math.sin(h);i[s-1].x=n.x-g,i[s-1].y=n.y-y}return i}t($0,"applyMarkerOffsetsToPoints");var KS=t((r,e,i,s)=>{e.forEach((o)=>{bT[o](r,i,s)})},"insertMarkers"),ZS=t((r,e,i)=>{a.trace("Making markers for ",i),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionStart").attr("class","marker extension "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),r.append("marker").attr("id",i+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).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"),QS=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).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"),JS=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).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"),tT=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).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"),eT=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).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),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).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),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).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),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).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"),rT=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-pointEnd").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-pointStart").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-pointEnd-margin").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-pointStart-margin").attr("class","marker "+e).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"),iT=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-circleEnd").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-circleStart").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-circleEnd-margin").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-circleStart-margin").attr("class","marker "+e).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"),oT=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),r.append("marker").attr("id",i+"_"+e+"-crossStart").attr("class","marker cross "+e).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"),r.append("marker").attr("id",i+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).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),r.append("marker").attr("id",i+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).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"),sT=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-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"),aT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{transitionColor:n}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-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",`${n}`)},"barbNeo"),nT=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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"),lT=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),s.append("path").attr("d","M9,0 L9,18");let o=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),hT=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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"),cT=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let o=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),uT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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",`${n}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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",`${n}`)},"only_one_neo"),fT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n,mainBkg:c}=o,h=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");h.append("circle").attr("fill",c??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${n}`).attr("r",6),h.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${n}`);let g=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");g.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${n}`).attr("r",6),g.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${n}`)},"zero_or_one_neo"),dT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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",`${n}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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",`${n}`)},"one_or_more_neo"),pT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n,mainBkg:c}=o,h=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");h.append("circle").attr("fill",c??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${n}`),h.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${n}`);let g=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");g.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${n}`),g.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${n}`)},"zero_or_more_neo"),gT=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
297
297
  L20,10
298
298
  M20,10
299
299
  L0,20`)},"requirement_arrow"),mT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${n}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
300
300
  L20,10
301
301
  M20,10
302
- L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),yT=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),xT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n}=o,c=r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");c.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),c.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),c.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),c.selectAll("*").attr("stroke-width",`${n}`)},"requirement_contains_neo"),CT=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-hierarchyEnd").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),r.append("marker").attr("id",i+"_"+e+"-hierarchyStart").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),bT={extension:ZS,composition:QS,aggregation:JS,dependency:tT,lollipop:eT,point:rT,circle:iT,cross:oT,barb:sT,barbNeo:aT,hierarchy:CT,only_one:nT,zero_or_one:lT,one_or_more:hT,zero_or_more:cT,only_one_neo:uT,zero_or_one_neo:fT,one_or_more_neo:dT,zero_or_more_neo:pT,requirement_arrow:gT,requirement_contains:yT,requirement_arrow_neo:mT,requirement_contains_neo:xT},Zn=KS;var kT={common:b,getConfig:x,insertCluster:en,insertEdge:tn,insertEdgeLabel:At,insertMarkers:Zn,insertNode:Et,interpolateToCurve:Wl,labelHelper:P,log:a,positionEdgeLabel:Yn},wT=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],kn=Object.create(null),eo=t((r)=>{for(let e of r)kn[e.name]=e},"registerLayoutLoaders"),ST=t(()=>{let r=t(async()=>await (_("tvcxrx6h"),import("./chunk-tvcxrx6h.js")),"loader");return[{name:"elk",loader:r,algorithm:"elk.layered"},...wT.map((e)=>({name:e,loader:r,algorithm:e}))]},"elkLayoutLoaders"),TT=t(()=>{eo([{name:"dagre",loader:t(async()=>await (_("87e8d1hv"),import("./chunk-87e8d1hv.js")),"loader")},{name:"swimlane",loader:t(async()=>await (_("q4bst4an"),import("./chunk-q4bst4an.js")),"loader")},{name:"cose-bilkent",loader:t(async()=>await (_("0770q5e1"),import("./chunk-0770q5e1.js")),"loader")},...ST()])},"registerDefaultLayoutLoaders");TT();var ge=t(async(r,e)=>{if(!Object.hasOwn(kn,r.layoutAlgorithm))throw Error(`Unknown layout algorithm: ${r.layoutAlgorithm}`);if(r.diagramId)for(let o of r.nodes){let n=o.domId||o.id;o.domId=`${r.diagramId}-${n}`}let i=kn[r.layoutAlgorithm],s=await i.loader();return za(e,r.config),s.render(r,e,kT,{algorithm:i.algorithm})},"render"),nd="dagre",ye=t((r="",{fallback:e=nd}={})=>{if(Object.hasOwn(kn,r))return r;for(let i of[e,nd])if(Object.hasOwn(kn,i))return a.warn(`Layout algorithm ${r} is not registered. Using ${i} as fallback.`),i;throw Error(`Neither layout algorithm ${r}, ${e}, nor ${nd} is registered.`)},"getRegisteredLayoutAlgorithm");
303
- export{t,Kt,Ia,a,Vr,z,De,de,K,br,u,d,Re,$i,Bi,Sn,xr,Da,co,oe,ke,Qt,N,Fi,on,ht,Na,uo,po,mo,zi,Ui,x,fo,Wr,ho,Ce,Fn,O,ji,Jt,fe,_r,wr,b,F,gt,Ma,go,Pa,C,S,E,T,A,L,R,l,sn,Tn,kr,Gr,Oa,p,En,Cr,An,zt,qi,qe,Sr,yo,ln,zn,Be,Tr,ae,Vi,Ve,Rn,vo,$a,Ut,Un,Fe,Er,Hr,jn,bo,Wi,qn,xo,Yr,Ba,Fa,Vn,Wn,V,et,tt,za,Zr,k,Gi,Ln,nt,Gn,In,cn,Ua,Ar,Rr,Lr,Ir,ja,qa,Va,Wa,Ga,Ha,Ya,Za,Xa,Ka,Qa,Ja,ei,ti,ni,ri,ai,un,Dr,Xr,ii,Hi,_o,oi,Yi,Zi,Dn,Kr,He,Qr,si,Xi,We,U,M,wo,jt,ze,li,ci,Ki,Le,Jr,pe,se,le,yt,Ye,Ze,m,P,I,w,ea,Nr,Tt,Et,ko,Co,vt,en,So,Ne,Hn,Me,To,Qi,At,Ji,Yn,tn,Zn,eo,ge,ye};
302
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),yT=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),xT=t((r,e,i)=>{let s=x(),{themeVariables:o}=s,{strokeWidth:n}=o,c=r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");c.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),c.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),c.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),c.selectAll("*").attr("stroke-width",`${n}`)},"requirement_contains_neo"),CT=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-hierarchyEnd").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),r.append("marker").attr("id",i+"_"+e+"-hierarchyStart").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),bT={extension:ZS,composition:QS,aggregation:JS,dependency:tT,lollipop:eT,point:rT,circle:iT,cross:oT,barb:sT,barbNeo:aT,hierarchy:CT,only_one:nT,zero_or_one:lT,one_or_more:hT,zero_or_more:cT,only_one_neo:uT,zero_or_one_neo:fT,one_or_more_neo:dT,zero_or_more_neo:pT,requirement_arrow:gT,requirement_contains:yT,requirement_arrow_neo:mT,requirement_contains_neo:xT},Hn=KS;var kT={common:b,getConfig:x,insertCluster:Qt,insertEdge:Jt,insertEdgeLabel:Et,insertMarkers:Hn,insertNode:Tt,interpolateToCurve:Wl,labelHelper:P,log:a,positionEdgeLabel:Gn},wT=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],_n=Object.create(null),Qi=t((r)=>{for(let e of r)_n[e.name]=e},"registerLayoutLoaders"),ST=t(()=>{let r=t(async()=>await (_("a9fvsyc1"),import("./chunk-a9fvsyc1.js")),"loader");return[{name:"elk",loader:r,algorithm:"elk.layered"},...wT.map((e)=>({name:e,loader:r,algorithm:e}))]},"elkLayoutLoaders"),TT=t(()=>{Qi([{name:"dagre",loader:t(async()=>await (_("vj31fs16"),import("./chunk-vj31fs16.js")),"loader")},{name:"swimlane",loader:t(async()=>await (_("kfbgvh0c"),import("./chunk-kfbgvh0c.js")),"loader")},{name:"cose-bilkent",loader:t(async()=>await (_("b6sqwmq7"),import("./chunk-b6sqwmq7.js")),"loader")},...ST()])},"registerDefaultLayoutLoaders");TT();var ge=t(async(r,e)=>{if(!Object.hasOwn(_n,r.layoutAlgorithm))throw Error(`Unknown layout algorithm: ${r.layoutAlgorithm}`);if(r.diagramId)for(let o of r.nodes){let n=o.domId||o.id;o.domId=`${r.diagramId}-${n}`}let i=_n[r.layoutAlgorithm],s=await i.loader();return Ba(e,r.config),s.render(r,e,kT,{algorithm:i.algorithm})},"render"),nd="dagre",ye=t((r="",{fallback:e=nd}={})=>{if(Object.hasOwn(_n,r))return r;for(let i of[e,nd])if(Object.hasOwn(_n,i))return a.warn(`Layout algorithm ${r} is not registered. Using ${i} as fallback.`),i;throw Error(`Neither layout algorithm ${r}, ${e}, nor ${nd} is registered.`)},"getRegisteredLayoutAlgorithm");
303
+ export{t,Zt,Ra,a,jr,z,De,de,K,yr,u,d,Re,Pi,Oi,kn,vr,La,so,oe,ke,Xt,M,$i,rn,gt,Ia,lo,co,uo,Bi,Fi,x,po,qr,mo,Ce,$n,O,zi,Kt,fe,br,xr,b,F,yt,Da,fo,Ma,C,S,E,T,A,L,R,l,an,Cn,_r,Vr,Na,p,Sn,wr,Tn,Ft,Ui,Ve,kr,ho,on,Bn,Be,Cr,ae,ji,We,En,go,Pa,zt,Fn,Fe,Sr,Wr,zn,yo,qi,Un,vo,Gr,Oa,$a,jn,qn,V,tt,nt,Ba,Hr,k,Vi,An,rt,Vn,Rn,sn,Fa,Tr,Er,Ar,Rr,za,Ua,ja,qa,Va,Wa,Ga,Ha,Ya,Za,Xa,Ka,Qa,Ja,ei,ti,ni,ln,Lr,Yr,ri,Wi,bo,ai,Gi,Hi,Ln,Zr,Ye,Xr,ii,Yi,Ge,U,N,xo,Ut,ze,oi,si,Zi,Le,Kr,pe,se,le,vt,Ze,Xe,m,P,I,w,Qr,Ir,St,Tt,_o,wo,bt,Qt,ko,Me,Wn,Ne,Co,Xi,Et,Ki,Gn,Jt,Hn,Qi,ge,ye};