From 0262ef8e42dc2fd642bdd3754fec78b8877ac468 Mon Sep 17 00:00:00 2001 From: Noratrieb <48135649+Noratrieb@users.noreply.github.com> Date: Mon, 22 Sep 2025 17:26:08 +0200 Subject: [PATCH] gaming --- .../add-runtime-mir.svg | 46 ++ .../2025-10-10-how-rust-compiles/index.html | 424 ++++++++++++++++++ slides/2025-10-10-how-rust-compiles/me.png | Bin 0 -> 26282 bytes .../reveal.js-mermaid-plugin_11-6-0.js | 47 ++ 4 files changed, 517 insertions(+) create mode 100644 slides/2025-10-10-how-rust-compiles/add-runtime-mir.svg create mode 100644 slides/2025-10-10-how-rust-compiles/index.html create mode 100644 slides/2025-10-10-how-rust-compiles/me.png create mode 100644 slides/2025-10-10-how-rust-compiles/reveal.js-mermaid-plugin_11-6-0.js diff --git a/slides/2025-10-10-how-rust-compiles/add-runtime-mir.svg b/slides/2025-10-10-how-rust-compiles/add-runtime-mir.svg new file mode 100644 index 0000000..c26ab2b --- /dev/null +++ b/slides/2025-10-10-how-rust-compiles/add-runtime-mir.svg @@ -0,0 +1,46 @@ + + + + + diff --git a/slides/2025-10-10-how-rust-compiles/index.html b/slides/2025-10-10-how-rust-compiles/index.html new file mode 100644 index 0000000..a30d663 --- /dev/null +++ b/slides/2025-10-10-how-rust-compiles/index.html @@ -0,0 +1,424 @@ + + +
+ + + +nDCrm$T-FOp}1iEK; zeJXZbvEn^TOTQ53s~z80`^|rpvA(i+uEDMovuY2#^1C2vQXIT`RqslPd4|U|dqs^T zJ;meaT`)0V5KpzdyXKi)(C>zeNvv-DCz%*>=Dh1_F!Wn~`SRt<7c)XaLswt5va#8d zf8TD|xs`KLH%6_sIj?QKoXd%0ZCI?>FT-Ptv_A8+AH4OSN7{rV<;0}xaSp5x(ii>E zT^;&bln>R0~?0Bf`yyvlc)8*R#RlNMSb*g7yS`A j#J;x>d{rv9jEKUzzCU?w2f+ucI z#mA-7e(ML^~uYLP7PA87<@9*bte_hl((KPhhl|4+8lJcH?>@J&D zU;O0@ceDFfizHr;RWc`zMdz|EG)!Qq)9T_lbltM=@^iPi7m~p-vd3Zy4XS*ut$TiG z`XY_G{q@UZUW90E-Lq%S{fn}E$4~3;zjN{8#+RiWiQ(bbHzptdV*MrTQ&&ai!+B{l zB 0pcp!=D(D_bXS)U5s=w+?0P}23I!I#H~hi>RjWS6qW?7G|J~-`&yf{ zHEON?o)3o}JWx3Qd8xpLvuW0Ke|~7M-*afw*>&7Loj<3RTu~_2NNU~UG->-cF{Wex zl{hx)ma>;NF$(Pdmi%~a`P$@|(_SBRo^QG#)TAf*@?^@UJ M zzTmZe(=Jc6cATWR+kEDgE&I (?!n#s z+9Jz7$9~LOw9CrvOIqEn4^ws n^5w 3_H zp~rY9&H6UCCT`OW9-#+X{fa(QLY~fDna#i0`)vH(GOM|uw03uQd3svfwbE&icYJ<+ z{=H a%zmcQ9`efuEanG)VoXc0rX2)@x z@g5OS+C72C?|69BRQr^T5q@*6uHL*U$<-PXT52J~%*<>hTD6rcGFaYCOm ^}G9w8EF-z&~p&-cMVYagAqkFpuJ<)iWcq zpIa2ln8z#$w7z2EE5OpVsA8VEQ%Lx=E7Gek3n%`6d5>AYU*`LVzOd*oER~Uej$Sbh zdi3?mqys 3Q! zWk0dcVm@XOxg^ACnvYuX&X|>f4{vTx=a;p*lEo~qxZ;z#w=lm__wn8CaS}F36IO2N zTDGtD`QD=;JFd0~M0qkkp6_*OeacVOzUtP;RvKB0!@C(~giP7as<>(4CuygwTE*)p zB%D&*_uOrs=T~pE<)bUd!l@5s#8x+Nwz7O(WVI^T)9J6rq%RNK<=1`xc+10TZeFYF zQ;*J_r~iG7u>0G-{JxRXiv+cOn?5{o_piv(O!(vNIV<#P{)ayihF;wU=aT<)E{YL2 z>gz0);qlRDr(_b_K>?-H#&^W|=k6Arak8V*I{oXXKKEN$8*fG2JG8;X^?%W`W5>I{ zN9Vr$_M~WMu4vg=PxDu=ZieJohIy3Vh&HIMQQovHE_z >Y_WB z_g4D;*8jPO`w-)-G6##*nVwsGZ6=yJXEg@8h&kPO{^{$^n$&y6o2ut0x?X$yv8Sg; zM^`uZ6!YtsFEuB(uQum9_v_fd%i1qrxE#@6Ih$Kg;Ml{QO;4468*H+eZgB9z`wWw+ z$H#h0ta7*Cwzjr*cXO+;n=hBF$EjLScrSO?n*ssr)5<*>wUb^*cPP4S6Z&;mwpQ={ zD#hJTjd_ay{rNd@;zaB6cPc`im%7V#|Gk+$Klkb?@$&`uZT`KQk?;FxzQ63hjDP2x zjJ6b}o;+0$>zD7`w^T`2F~!yOnn6)yj@&)R@NePbDIYiepO-b`Usvjmy1!K`qXSl* zc=Kk>_1ACTym|Bb_3Kx!l(KFMRZKJ9cW9PpiegK<6&v%-9gbBWbDNgE{P(Y}@3Gyl z7s`PmiY@2uey=%x*~tFm(uK+Fw|;xs^H*8be?OA__+e}I>B*;GX1qLlc`y5|T;3O6 z&5Zl@*;FQeTee6u?AoJkH{AE!WuAA=Z};)^?^EW#kUOL16dBv*YBtA5ZS%+Z91ANZ zo;-Q--o1Ou?tLXCB`>VjcWe+1W=Zi?-X!Iu{qlvAQie}!?D6NH=i1lTWoE8iy?XWf z_3KqndkHis&vkyz)}LdutM%c$x7HSKUe4=X|4e1!>6dq}-`kz-_h_9$%R82I{WEta zm@J*rId%Hc1ha$e>9Jzb(+^v}dHb%Y;#SVO+{wq@v7~>^@Vr=%68Y_C&22OBV-oAv zty>nfa#FIjfx&|ktKJD)zMCX;6|LX8{>iJ`)1z{oEnPzSQXZ8vZGQZab@P+Jq@L)l zS?@PQoadLTUH5;%+{>vPkJZ+#_xYFgEiFvw)E;)HjD ({ScyY@=mibyuQ-kP5ueu}g8Z@JZV z*Kpm5B+%@${JHy)CtZ4t#g3lX5;-^C^3$WnZ)%knv@ZR7f7;%o^Y-%4H!Q3RufNLK zzVlJ5&z=bv&+a (k18d-v9+q%2v!eEE#{`@ceV?mfQUZ(rq} z>Lpjh-t-l|-@>odeSi0N#);RtHWvQL@0qK+w#2l3O~{Ice*B3!R+YMpif^=wo}HPw zbLY->e)(lVE9X86U!<{a-8wg=iU0onOP^PHEbVfk+>7Ausj7xItxk9zQuh{iNz`s^ z+Hm(-RqBr;7tgg#WesOKcHrpkV*hw=agK*4PIyE|N9%}jw;x^@;32S$f5sHG(r;hB z^z`+a-959ne`;oJ{W-4-t|_5Qo~3%aMmY+K`j!@$NvChzIPKJDU8SEP8nbWwveGG= zU03*{LS_E0NAmew9zJVcJk$K!e7oEAC$4>I+aR|(`NCbv6E?lgyEA9yX&YHt%{rUb zd@w;lz(Z|vbas%J>UCYCV*SI$Iju9BbeA7gnl1ME^2Vvv3x7^62? I|m*zet*V! CrbqT0y_my^YWF%KUnCu$XzCUtgMHi;3&^owoxE*JL`s zF&8&ka*kj2@3W8Lw%5YGU0$Sc_2~z_<%=U%?s~d@FMG>`$2+!d+qQ7w!gJ^Rx)vGD z?79Bhw)$I6e!hO>k1PwZw%XJmJ2XqSB`Ur4Z>y{LAEYv0Yx0z4gE)_tPn%wB-hJx4 zb)&$yT{Wz(Q%sg#zxnUhzRCJLayPedvSh!HG%R>5F?YkJY58-jKJWbJ%;UQK&+Y8g z9ghCXySLxA;AYMY3_dey>QZ45S4)|`AeplN|NiFY=IZ|M`KA&!tvdI~63uhD% cge)@9Jr<2t+FO9sWHc9 ziZ6@t$0ntji|#CVc)`Tih^ypis$rG%%~C0aO`3+^A9rd`)p%p2J@dxx?f3s5HqQTQ zkuC4gV7O0s#?G8QPuIuItM5)cw`!H{+-aJxluqyKF5J`?wbl13uf&7+v-e7(*05W% zy2VM!V;x(HiAoe(2 QZvjn18-|QN*WQRZp$2Cqw1jw|Lo4iK_`IwX}_0_H0qBiGBLU zv{!py{5@HqvEA1xTUDV)eA2@AcmF2bo^r!TrS(n!yLcZFv-Rbr*0=W6J~RLK=BNH% zqnbNT=36%xnfv}{pZEWMN~OX4<=bK=ia0%2eYt=2GUa<=?@NU_9?xEVxqIcR`HE4l zL1%nh{;u8jXysxP{*}+p7VnJFnwqu3wfErB*=kQ>r=Lh_a4!8W$MbxW{jPe=Io@IW z<{wR|$aZVI{_4lAiQ?5UZ*9+gyDwq=TmF3Q)13Q`{Z|jZus{Ea;q<@ttE%i~KRvas zaIR>J{i5yVn?EM6vRb!9^ZogIL0iMlEm$+>XvmIL2W%HATFgBcl(N7~hOhl@p7|l6 z*KP_8ey4+#Hc5zIVXMgvGv3JmEU$Z2%)(PSxvIx6p5bnGXWJXwe~)3MU;Fdd$K(F_ zKi~K3(FMb(^XK*{i=7r%JsG^MwVIRTfMw)A*}mH=e!UL7E_79{R!^`)jK|z9CpxQ} zTkzG9hXr%&>*qcHDYdOtps%<0XU$W$X V)E&O8T8Yq!GE!FUtSohMsdt>IMzCKX4ZrW`(?-kxDnO%7yKO~uJ z)GfqMss8`)B|3Na%bfPRpN~50$IRFn7ocLE|Nqa8o5``aOKc7^sB_=^{ycy2@vfbv zrYlQs=AN5)%Q5l#UcZ<#vOjHS)ddRZT(w#2%&=zGH_;wvle;S#Q@=ZXcFw)KyxJ}L zU#iBsLkD}Ngio9{xurr;`0VmclO_mkVvX#XdF1iE>Hv|a+LyANrP{hKtkX)Ac@^97 zzW8?@>oV!BUnEYc{rmTA{l3aSSLM=ozOmtW`10Px;Ju40BR3e_@q5XVsrcV~d;Qd@ zT+*e*llQE9UvT+fxz)R0{QFOCTF-gtn&~>P4a#41IsW^1Wu0hhTA?X__WsM#ZKcy~ zGkM*eH8fLPL;XZHeRQ%?eYR B~nF(ee-+lS2FK>50uXt)@^vlNOH6MN_mKc6YkttYQ^=?;9{5*b S9U91 zd7G1*&^-P9^GA*4%h$JV=H$sLpQswT@4rQ&N576eW5fO>EBrN9Ju6$4uXQS*S?+`3 zvEYlUOCyuSPcQ%f@t(Wz#G?gzo+8sO)EF?FUb%vCbNTkAaTB+0nwI|Sm{iIcWs{zF z?SKCld~f#H_U-x0nLl1t39oNkqo1ql6L^2=%l*q<-V)N;!}0fgm(jHa+^LF^TxQv+ zFU5oB>n=NV)>5o-gKqG~r(v@LG{1J~_y!)|)%Nv7WcQQc|8KADHr4lx|9C%MzAwm` zE30({!=2_2Os-eI-N--wV>W}ylRJt%`Q}TLN==1l_sn|sOYKc)kkdIG&&ID^IxHJ* zUtJblprZV&zT|(9*NM=*3qvBRHqC9S(|*s@@;*4^>|@5Zkgoxc=iF3t;rVk?z#zek z|DmSyr70<2PhAj_ny~bI(3u(QpNTGr zzG|(@ibigezk60)dv;#_`j*84_txEZ3Y?mrwEF4pFW1grT=(#F_v0=Xl?8??R#m;d zwe{xBn``$cNgR7vP+=pt{`%_@D{p(_9?mpIllG@2EQujMpBxCgIO8OT%vl%i%)fa$ zlUAKM7Jhfn+S3np*DFXoUhU2QuJxJuHisOiY5RB*MGj4txc-560mBQ{2Wl-vcgt3J zSYO=hf4z*?=5Wx2S>7yVU+=74bJS^btY7~2&AzTt%%A^!6KZuzOiEgGMKW8MLorY! zcx8x&NK{PBoS8E@Tb=gq-7Awmt1Bq>AcIWCd-J-N;mPm11P*PkO*a23vm!iTN&T*R z$>f4n<@GbGr?1fBU(`M6+MD;rYzd5q6j~0OvPSF{{H4oK=Wx07+1YhV7Jq%4P_E%I z_pSX8g*V^rXC^o}awWgn60tW-{d@s?&0oFl+%0?g6OUZ_!v8MTr`!Lx%!b^JH*;cR zV_%l+n$!?sA{84MX<1P)o9ol^2}>r3if}UX^zQY#u))3G&po<-v+s2sCEmrLC6FhM z+_U 1T1zm-@vneH+7jECo(k@$=sC3%+jkojh`d=TC_inyyA6Yj+ zq&VK@OH=vj1z|iNQc5acCudIX`lT4t@PX&pZaE)atxrrX+5&8h9U{BCE;6LZ?O*t8 zcT?MilA5PE{~g UDjhfy86>iAQ^;)F >Cxg6YPjQsSyAG-LmSrj&dJ$6 z{k7! r#%5;Qwg!H(5;*kt_xJgBwY#3~y~e}JWT7i%8@=t|O@6u6k8|!XJoc_w zoyGOn%`402>)KzD3oldUy4kd6=drCbS MuQa?%cfX)wkm#*Io;Dos~D`V&KGSMt_>J9v8ox_uAe jr@$7*wIZ7XV?laaKU1?FCw($Gw_~m^vj4MU_)EpNwxClNe zy3Ea8FVAE4ZC>!dd4i|YMSN4EO}1`#ah#UNp0-Y>Z~4(ZjdQY+jSUPwJnGiJx3gG% z_SvMK%vo|05*F3p)?B@{hhz6kkM7pAb-S-L=-of8xBPp_`xi@FtE=ABL|;mJcX;P* z>((u^zA^I1Su*j z;i!mAR=}%1 )s!EEq~_jzAXlMD_kY!KB)Zn zz5f6A+->UDE|~i6E_iroo9N_SO4+OAYE@1(7)~?&T9@%~(*HQ&Syya$1zOimxa#v~ z{ks25Oa}tC%zb=!&*6iSxpR&li<*;d{~=pH>W!|?=Szk;$1lFoR#u-LG_iGAi&y!l zh}n;i$=TQa`SbJh>^L5_=JNOVu0Af BZF^(k12lY>NIA92dB|;Op~K7r$4SUHkOxpRx7S1Megy+A6 @r{^s>A`=+VbTMFJSk}G$Q~Lg-JbFCM=gWoI zEA4w?_4#BM^NOiv>MZx4Z&&c(z_shopFR6xo$)j0=CZTDnHcUw%*?BEmt$HO^{MN} z Rug3i_wu!Gu7lbR{DSZJFib) zrfS~e($4eKcACB{xxPr_)z9bi|2OCVf7$h5-(HP07M0ce!)|O%pX|f+I;JetEL6<& zWf^bd^ D(c7?jo~(4$ zEz5ru*H6gLt$RK5-^Q=!GcH`d`TSKzUnR>SwO=v&)Z{m=oH||S?4E7!uVhreZ=EUq zxzkO|(RAS>2B#NatA79b|3e2+$Sm1H|I{ipOv^nU#8}r{QKG| zMm7Icnlu+EhI*!Pvp&qIzW?&x#bpv-vuDNL^K-O#@$y%5aQ@$%Pp{q{@DY~FSba%q zTB>)|-HR6!H{a9|^R5=`KYsc4?b~53i!@vhiyxC;sm^jBd%11dD^AUg4A=J^tPb19 zsXg=d_cM7(R_%wA{(du_KfgogoI2CPm`jHW_MZE8cy9CJx7Ozj 4>BZPIizN!yIL@!T4nq0{UtA2@7w=On|?U@`Mpy|QXVFo z{f%i_v?BR W&+tqGN4f|Facl_w>{gscdI?rwX zZ&hg;AN*p$vvkJ!=dWMB9DG$xl5yejtOZH}=QCsTP8i;na4 m;7LL4PKsn`p9h6kfX-}7ItmP)}Cx0zT8@7 z9%K1&$NL8|s^d>fhitWo*&xV~xchABj^YVTAx t;`RvbC+F@oLuJKhN#&U%M7|HB6-C-;5ruZ##6t(%(0x zbI+`Zo4;>Ybol2CkG=c;Pucn?w66I;z?Y2b`xBOHNAq0Vc1xyd=8cobog|hY{gb3s zQ=9tg*()EX6ATQua@M7(NlW;pc&|!K);*ki_wc>EdZUmVYfZDxK0p1oZ2!+^v&*VW zA4+p1sw@_LqP0i2E3uZDee*^KMd7vg&fL9O(i$o8?Q8Awvp3#!HHFMRTY14;;Oz3G z*0k+QlxIx;%5v5yOJUU~FRLnb3v+RPnO8DbR`#C?>(SVxs?ea jT)bL&LQ>6M 8XtiU&L+K4?J;%`)u9}7X$s*=Zkl{@m)^(ck9!WAT6bpUhRk1mhW3!=(?@s+8nXl zjo RlI{YB{@T7 zZM(2;AVgW$6J~DP3iX??>BU9*)c&eIG=NB@JaKi!x~{8 z{%+IP>DhX4R< jL}XR|x3noP{2W&|ylpCwytU?>x%>G!uOxFT
q2>aecp* zzx&G{m2O+;>*cGwY0|1a=GB{@E%Vi3nD!`Wu{cBY$0OM$Z*MRB@2wgjAoG6vC6kyw z?M+dB-}jciikM%zpmw^3weRJneeuWpY>S+Vch0&0{(txWAKZ=t*Ysz_zCSN_?_yr* z)nDn7BG$+ETa=U>x&8O!qaz_Xk!uy6w>W47h6+4zO!;VE|Kr=uf6e)C>{FAaFaNw{ zqV)UYqrWR(aIsz8xl!lXVTt)iD&&vtTXbkq5_bd}!>rVqT9db%J=_v>{{3dzH<#qt zj$U1|%QH)nMQ@(er^4jB({f)QEIazJ;LYvr{0r5qqSvfnl$UdTui?G=EyX7?=Xteo zH3~#Y #u(fD0<&LI{BHv z%_$Rh? na}JtKpy z)cq|hPMvb%jt*Dds?n93n>+gv+wGKi`*R}OjP4XOxBFa_U1p}i(GHpm*NY5RKlIOk zx;%?fp;6bLmrFifecvnlL(3)PY5B7Cu`_o5^SOT`U&bQ(yp4Eq$D4|bxOEjTOjs7k zFRbss5b*PI)<%ZtWVRPh3~OXkpRUjgZ$7_#)vB=9@A6*$T6*o}hcXMB-mM24L}a7C z`P^@8mSvu=;};V@_mo#_n6zt#majxx(5loO`;1J5qyNgs|5&v)Y_4hJiD#*W%O2gk zSJpG%{e^E!S^lp>pBr)u13#}@u_`Jw=xxXL-L1NJXZ6p0d|$@4cH934F-irssacw$ zE6o YmHZ7v^W(+O8EC z!QddfI?mTQI8-tGsKS~h6L#;k+B>H&%xGD4zJueb zx;P4{;yot8)_%ApzT?-?{e?J ze=2hQS+`_bj73BnH~i_`Aw6ri^sL8{>+Zj`zFiJ#g)rXEe&uK}{m;3x<(HG{CLg{u zr`^lx^UW<%d;WdiHos!AUh|reALq`NpXZgS%l b2cCPwnT;OZe-m zv?FcFr#ZTNbu~3EmFLI(IC>?0ciBF(svQi9XR}ME{S^BsQ6G6ZtI+Euo9g5&sePr{ zZ}+DN?YjHnjAX?(os0k#5%=x+y&lX49UtWrZ5R&tYk28Ydp=G5xSZckucu4B`upZ7 z7wtcu(me5~JU@0tZrsIRO(%c-pB|@T7!#Z@r~l=q`ahSKw$GQhuC9CW!tcG|ukdrn zBIm~JeDKn+=Xlob(!URxS{zgs{k?m?(YoAWB^NhC%}=A6&%Uqj|J{A8qe3U_*>oL- ze5EH$4~~n7>Q nt|coVgM^USl0 xbQt7Ts$` C=kP`E%GOoX$=%^Z;OwsX%%D=KTdbUlnl#BY&?O(TN z22Xy~T^6O=Pe1Tg?b`PDYGP0Jdd0QzDa)6Y-SITwxK#Sx{_OL@RO?2DJ*^iWa+Q3W ze6+J_ZI-F`$`ikfdv~;l9y=zw`Rf;jNvjiByykZ=v}<)R`xkz_-cD}T{U3`sU8XIb zS=`*deV-q5!J>H^mwoMbIXjJ) xZdDj zV79TUS=Ku@_3HumzwLEYO~0C9wL0+&f4TjSjDPQbX{!lDG91{j{C4{7I|;XW9pY`R z*VbRSc1~WmWT(T_&yw43)@re)?ELhdpV45??dnfmGc;yY2)w!bV2 @9{ePjEIg>11t|e}ido6eGiDX&An^n)VroEbdrlZg@e#h$7|K2do@nPE9 zRjRd1VvcToNKc_jewcrl^DWi?6|2{3xX;XqS+pl~ nxq4Ro58x( zX{!TPobtcZHkXM{hr3!UizSRN@W|EfHQWvQZ^GhqW^H!7o@Dgr;hnc((Sg>{(z9}U z45q}@pPGKfY*|6h?I%nBv>i*)6Ex^OG3^r1zN#mx=K1=fRh6qV**Ehpig 0ptM0G>y)}#KHvUW?IKem6h(AqoSR3!eKnc Yt5oHmEESBH=k%ac(96Da2DIK qisP}h|Deqz@v)rVDO5H@e ziL4A3y4yZ8yT6)yK2+n%R4wm7>$S7jR&FYt lk2_8rr4+R zua~py>o&T$CZFAQbld0fj0<-&Q++RZl* ~&>yhsAtRg?>S2_O= z&MLnxl*hL0yW4XE Y_Qf|Lu7> zF@CvaR5j=3s!a?GA%7XZoW1hVgD*rhZ#Lt#Yhlk5q@R4hzEz36f$hMxjV3(4`z=bQ zq@Ojo`Npu($7asz*C7HNy2rODc?Zr|SN@XQU1{t0N4F9$uDREs KtF o4B)jjqU$%bAf-{33H`E7n5x?p%Jgug`l<%>h}G7SAHP8qI0 z@rfbqVViQ> lg6 zhKAm?JZp8n@BDjyk3q$e62;B!6IVr>3vjR NoYLPP=buQvoBD9_b2h%& zeu<0>-Y?H4+iZkPdFJBWek(Pl78TD) zsWTU8v?ab!vVJd>A3QO2E7S7Luk6!gJr7Nuyfy#djG*|LjOEX>mDRs*{~lIy-ata) z@l~H%&N7xJLxa^Pn7Xc2SSML{-7PF@c=P&v|GdCGu`}*HJb#4Y=~G{;F2ieGQ~pIx zih5 {yy|z`ZD1BOqGtkoNnl zdkv>cD{lGrUux3f%02HzX7doWe`7RGi}~JG*_0JMJ51-Q?$14{0fzFcLnJ _ta1U##todp_JQjvYu26h|5a2S|LN%Zll%U8 z&E{R@5xe$e=B9{*g&SU)u3dlZ=S~fEt?t4FwwHoA7G8aqY5#ZUiO%cF>&mu15)_zq zR&(asg0kqa%NN6DJ1Cg28F%ZnbnRx&7f?9+?37G( -@}ZO;%-#hPIfR5PZNt| zm~gez+~l2b)wgWF{H@jp7d34T?PqUa#GxatBxKUdC$nN_`1U<}iW!+)JDc0No!zx> z_P=_&?kt1z#EEA2^Ep^PC*@5HUF-M7;@hgooTUE|yw;9gU0k8vIsu`33isHZUeqWx z|8k+ n^mv*2qXUX(1Gh?ZH=f$;C^3`0 zXzKap{(kq4@wJ;71--r49i5bEwdwb6i|l7VR FDj5mS1 /g,">")).replace(/=/g,"="),t=gr(t))}return t}),"sanitizeMore"),hr=o(((t,e)=>t?t=e.dompurifyConfig?nr.sanitize(cr(t,e),e.dompurifyConfig).toString():nr.sanitize(cr(t,e),{FORBID_TAGS:["style"]}).toString():t),"sanitizeText"),ur=o(((t,e)=>"string"==typeof t?hr(t,e):t.flat().map((t=>hr(t,e)))),"sanitizeTextOrArray"),dr=o((t=>ir.test(t)),"hasBreaks"),pr=o((t=>t.split(ir)),"splitBreaks"),gr=o((t=>t.replace(/#br#/g,"FM@9zI2`))lJZBtUeYWQH1gMq{{@yL`? zk#BR?WCrJK)>)^S!|A&$JpbZ^WAp5m{$+S2;k<_T&7L*=kzyYE>y90l<6oD_vqS8B z_^vl>nn!QzevvQntK0Q;ddF6cYNfCZW!nQ*_umuXa69@%DO!6*a+2BUPt&HG&WL$5 z>9mGfuWanB&C#Fvl5cJ5ZRb$DGeM~P*6r&xx3e50;=01Owq7yM`h0)+cAxxE*?W5h zwHX*DG({bXd-PHy^2laGc6--@b7MSwmQHibk}R0=Y_sDvUQ780)s1`QjlU(CiMBK~ z=!!+WD)R{3afv4~=1ZU96s`!32U86+QW#b&TDUf?RLrf q9LZ=n7 zs~5~^a;P{Gtg-3FDb_iEcv^OU`4hI*qb!4AY2%b*mxNB-V+!QRuwJsJVN)O{&x+%Z zZ7kU=G&GhT{D1!5T)X3icgmUHzuWmO?v8?9lagc8a*c_LGCKRcr#)2>nk~@VF=aU9l_ocm&l=yqp?6vHwP3%3XHX$xN(G3Z2;-ZxpBPvfjFzfu-rdyK_nD z)oI^;Yl`zWRR7^%y#MyEuY6TcKySh9j$aWyFQ;T}+2Z&{Xz7%&&s+8!e8Z%>M&RM4 zS7M4P)3#jWzTWa>!({KuXEBeyS |AX|I#7^1htXaiO=S zXXjMrZ>~944zDUKUKwF~^`E`tt2Sekg| taYQ-q%Ljgcxxa~sFoCx^AO(E{fq_c%p6qhd7 TPbROu(cJOttkmy3{w)&Uy?S>P zX6DKM+Og&v(}o8-n4Pv=k6OCLs%(!{*%oK%=B`RhC1HgJzn(6SOkTRAbob9(m8oT3 z9cJ! TtxTH>3%^) ztM?}AC>9+M5Z)T7UazI+c5B9hRf2NaVhg66+OgAR7F*$bk7zkHK4zAf_$}NT8 BLB@DJ6&eS`3kx1mA)-}NMX^-glR#IeU67VJPN$|hE3s-;^~a5 z7iOL9ojPR)r)G88Uw`Gi)qRcY9-8DB&FDC>t(V~U$7`Lp8h4MKTBe?KsXX*`|wam6dX z?K}G&ReaM0HVFs{%ANEI&fmV%Gh5Qzv|WldEq7Dc?6Yz+? |E7P|4etvu5o& za>jV^i5Uy3@4pK6oZ-CIcbRRaqW3lT^{m^}6ZhI!TmQKfQ9t8k-zq)E1>8zfo34B; z%etm`MmH@d(Aa&g%;i<>X{uANoH5?JMZMnA@KcC>nVoIJM!hTYSu-Pw$`WEqMH$>h z&rY}+*;$&ba>By2%V)ho*^iTkydhVLuH9L3MRkg>wtuhD;!U3?T+PxKs #P^x(`oC)8l&GVYX}g>G&T|MRugQ9;?fKg8bg^jY%2u7J7Cq0dTzI11zb_z` z)#164 $LeiYtv zRLHX7L08)D1KP(WAB4qRpQXEL(xhAO3U1DOprpx}dc| mGa(ZxM2uW-@L6v{jpD9y!=; zu~cQ9hv;hcRp)NJyD|Sd+Y)Bg-#d wg5c5w96&A-F0d1Z=eEnj`E;?AD@ zSF3k(?|tQL&XczN?u@++6Iv%Y?M{e3Dp~CM>E!z2#Js8J^F-#aw|dN8w|j@j)2{Qo z{xtly`}bpU^wgiu-}Dynoqu-vdC}6-q3IR=%m>e}J>Zm@SMh4Ky57olObdiLZstyU z5t{zr?V{7G=%+t78OQSPbH2ZiTk`bu^QM&rfzs>FZT*wC+h(%1ZSc1ASLGL5dMf|8 zyWEsNA1~jrG$fqyfuvKJ_*#qP-Qio7Ea{tlZu+^ K=2 z*Xj#-m(-NsmemRKH?b>pT@}Ke&Ev8A+0K=f-tWJM76|BZ+ GNILIx#y8cVm6?fGk^AAdUw^_&o?ZWVn8Ce$LTf>F){7hW z_x-q=v*zsIa)v5iMec>>lg|A6c{x5^#Quzc%a5Hc8Z%^N>JyjUoVJf)l|qW5Qryhl zR?}ocVp$K=aYS}>>`46g^lEterrg|3d>4#4B0KsTD_*r<-(Q aY3KXx$SU~18Exg3)A#6qvh zkwGCvag)Tf+fHDHNtd#Yqiu_h%e1zMIxGxMVoKi0KR&X3{SeGCv2~&j3!{^mQn%oj z6tEgGv(Ie`4kw&a7OHbQHq3YG(8+ns3t_ZXZW3VNi0sheRgUCf_#@(!lE@_v*3JEv z32eXEEmi@RADS&El6aIO1NarWC$`Rmn9uz=MUew+;olTR4uMSqks0C+0xwo^Gkoa& zbdz<;gyQ7Q#fO70-<-H3Z))uBHz8))OOM`Jy!6kj#YyKxV{%(BFoSH~Y8% JJYH*;n2HFGtKO+jP0$Q zIezXgulx0J@ow8Sd{yj<+z+}>ekrgvpByCQ)Fv$XUz^Dk PXHJ^rp(%BFxy;ei zE1V{8V!JHcsG45qc)}^->ZFi@!1-lbODaCGEqrxyl}yS14?pvbyo#qLO|{ G#pMiUFf`3G4=Derc(W_;`?mW z_M8%L>6>pIuJ`A-{JnR1h8LSBv?@#r`c$R8;9lC>f+@$RsEOOJXfCuks(ka@A9bN^ zyd04nU2gIX*Q1$YD;-u o`p;oP~(VvvFX@Ht#uC$S_HX1j4+$!<+t@o zNNBhqNJdR>$KzcGXYM_sA=;JI`HG`z?Ue9XrxOY(3%RADx0vYVu3V?8(e&Bta%}X~ zNw0*Q*c7>A9~52Zbtz`3d0x2FKq2K}#*!&~ 6jQQ2x~8%DY@KH;%{`6CUr<+jco$&1802byc3X@t@TylRhkBnJeJbqLe85PVlj2 z(p5S4V|!|*Pf9y;K1zv0k$aw}X70Nc>lW#@EnBI#P}eFra{0rjHw8DvDW)7WK36&6 z_lD}3ukPKJI^(Rbw``rCSI5%XZ|~bldmr0-M^0eVgWf4dF6y(jaukl0@cY|N@%SC- zZQT5E%k{LQC1qE(7lCZJS7Fl +}Xmm>GQ0HIBjH$Q7rul~P8z1@bNfAhvCAyqf#7x9(W-^?crvEI{pa1d6gClnW)DK^p z?jQH>VzvGEg^QYF=i1cfZTT#BRD1cnSly?EB4_Omcb?h0(s+9R+)ZWAK7iuG_wtNg z$-DQ=^5LH^Iqz3a?n-li^Jy|ax=-tuZ|gpFa^cDM@l`M7?SF;xf9u_2QupZV&)4oX z6Y|f-@1Gxkchl)uEv+MMk6xy$`JL@Q)1$We_dl+;OfOnqrY_rCWS*w~?aj_Oi@JXr zzeCRUpNW|{=XI7V`|o2bSG(6wXpyXbx$^W~4fP`uOZDwbf99{N|NZ}LT#Zqp;iOhR z(^+hO9<$gk&zu q_U-aI{T-JRQO#CC^VVcb{uX=cgv zX_+y0WuN}Cm+!k#b7iVKw_xz)=WS~Gee*3$O)@jiHcip{`{S&f7~4dprCVavb!wZp zzq|WqdvyNK?>{&X|2jDJ`mRk5WoxJW|5$B*I<)5GP3hz3>;FF4yrufOzV^DmpKrha zSNAh)M;LQi!?m~#?$6zq_opB4U&?;_&NX&LZud(TGp;>-7{T`K*z@;$cYbJ;@3#@~ zuKR!K`mx~VyHy98V*h=;+kbCg{p#+&H*Yp>yzUqOI%#6{-Kgka%lqp>c~8!s{msy8 zxsh_Q^W@1hC!YKgaA(6FJ0>TwT@A%@(|)r3|8P*+Jp6s>cf `B#2lF=XMdEGmFQR+OgiI}?$$qJ?QVfh7kr&K+IJs( ze<>{HcdzyPy<5NB4CH%fH%+Q4@6{L4|Kc;aG{w#2YW5U;Kitl}ZTh)0DQQ1W9eLUP zSpCeh@U&g;0u8@Ed;Y$D*Di@CdTW p-c4{rIKy!m?iIoZ$4civ w; z%^yo{^( cmz(eF)a?n>Gua<`s>j~E^x3H+ za}MQZ9nP-Iu1$P=aPOa2pRUdF7gjGh<|cG=qDz^=yi>;}Ek60CqUb`9?Q&^FZo5gP z>mD3@e^too)748}hTj)#n5Zo-by&~&vT)nfjY65)hBD`Qjs$1<+w@GD6s&pkYFGB{ zJ6m@~7v_c+Y~MHOf@sZsZ{x*2$y@)w^tr5&Jmuxre(CuB*J+0~B(<&luw|i|z@`h_ zL0*b3kH5Q@>N422ipF2yo)YAH*<{hnAn~B0gV__STe|%i5*sJ9&RexqcWLk9upI(@ zuNATsZ-MH%V>8mCVmLIVm2WTb|HJfx!AVSHb$`~(b+tFQuWi+15?{om$nCiC_V&B` z0@PlwjFx}0N{@Geuvxj7dAPtP0hiuuZ{O7&kKr)q;XcX0p~zQ$KXTvSlc&VHXKOog zwdk}s)b=g8IivJ6t9WmJ!BHNj0}pM&HP?s~uU>jKX6cTgJ2e}&p8L)NYKKW}>D&1B z;oEuB4t<-yio4~6mi5)HZ1Fdr(w1(C)SNcQ>)^Vau&&ih&t950^(?#738#p+*_v;T z {53CE)vvmm zx2&`<`eUtB_8F<)3bzlH?#SMqH`TgVW$Vvx$60r8n!I-E;w`HLHVMdny>a#1yH}@L z1->4g#kKmCHeY%Ex_i~H@0~sR=hQ{{vsX&IjeUL1OZSTHK2rRKOLI=tj89S5il?uR zDDIfhs*$ZzVcwxw-tm@K^g`T=O<#llZU1if_rpV{qg!`>ozbh9zFp2&v_ C#$?``DO}y%}m+q|J%B(e&+{9p>3)y zIt}bof?_Y9ICpjH-nDU?WOvtIEPLRzXXl51>-YcgC{ Ch++52y2%Fem= z;s2f8oh`ZYPGSlIv%WX+Zz)&MIr8nt4m wu!$(m1RbH6YDo2bmA$Sn}IJA0AF z!kq1iA1j_G-QTqRxP9fGNX74WA2c*fYx(o<-`b+@X@|Zsx9B)bc^f_F*AMl1;sHD7 z{J;KO;#k$;5OD^Eg&!yT*KH2G7ZmGyLLr55fv)TBPy4;iL&F8_I3gJ`PRn0=w^~ne ziohm@3)5z=j$Z*|AB_<&(|_X(R#RoUepgF?(+MVrY}Va9b9t Alu7o zU*F+g<;@`vQuX@Nk(I$O&Q!HbU}fO{_u@ @7Nc2s0E4iA=;1Ch$6>s_V&B=qE^Y7OEKKH9=|J=IFrCa}>`5ydZyo=5tWc=r;MgdZG+Y`Ih^?bz8r$`;p<; z_9r0PZRJwQ!oywC)0Rrd*R6SJc=%LA=a#7+QX5+`RnJyfSHDq8VO)?sZTq$RJ3ha2 z=NI3>^W|W7&!s7n=Oa1~R#aI`Jb7eNrm@|W6FjPy4DY^qSFD)AxZt!_-`)w;9}2RS z!$GCO&6T(Ahz1pC?hsh_z^Uu-vE5Syj!7);35@zLU;WA7Yvr{cGYq{}9Gh{@WNxNZ zYTL5cJ(;)VvzMhw%*r!3dx r(t,"name",{value:e,configurable:!0}),l=(t,e)=>function(){return e||(0,t[i(t)[0]])((e={exports:{}}).exports,e),e.exports},h=(t,e)=>{for(var n in e)r(t,n,{get:e[n],enumerable:!0})},u=(t,e,a,o)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let l of i(e))s.call(t,l)||l===a||r(t,l,{get:()=>e[l],enumerable:!(o=n(e,l))||o.enumerable});return t},d=(t,e,r)=>(u(t,e,"default"),r&&u(r,e,"default")),p=(t,n,i)=>(i=null!=t?e(a(t)):{},u(!n&&t&&t.__esModule?i:r(i,"default",{value:t,enumerable:!0}),t)),g=l({"../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js"(t,e){!function(r,n){"object"==typeof t&&void 0!==e?e.exports=n():"function"==typeof define&&define.amd?define(n):(r="undefined"!=typeof globalThis?globalThis:r||self).dayjs=n()}(t,(function(){var t=6e4,e=36e5,r="millisecond",n="second",i="minute",a="hour",s="day",l="week",c="month",h="quarter",u="year",d="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={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:o((function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}),"ordinal")},y=o((function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t}),"m"),v={s:y,z:o((function(t){var e=-t.utcOffset(),r=Math.abs(e),n=Math.floor(r/60),i=r%60;return(e<=0?"+":"-")+y(n,2,"0")+":"+y(i,2,"0")}),"z"),m:o((function t(e,r){if(e.date() 1)return t(s[0])}else{var o=e.name;b[o]=e,i=o}return!n&&i&&(x=i),i||!n&&x}),"t"),_=o((function(t,e){if(k(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new C(r)}),"O"),E=v;E.l=T,E.i=k,E.w=function(t,e){return _(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var C=function(){function m(t){this.$L=T(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[w]=!0}o(m,"M");var y=m.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(E.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var n=e.match(g);if(n){var i=n[2]-1||0,a=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)}}return new Date(e)}(t),this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return E},y.isValid=function(){return!(this.$d.toString()===p)},y.isSame=function(t,e){var r=_(t);return this.startOf(e)<=r&&r<=this.endOf(e)},y.isAfter=function(t,e){return _(t) {}),"trace"),debug:o(((...t)=>{}),"debug"),info:o(((...t)=>{}),"info"),warn:o(((...t)=>{}),"warn"),error:o(((...t)=>{}),"error"),fatal:o(((...t)=>{}),"fatal")},v=o((function(t="fatal"){let e=m.fatal;"string"==typeof t?t.toLowerCase()in m&&(e=m[t]):"number"==typeof t&&(e=t),y.trace=()=>{},y.debug=()=>{},y.info=()=>{},y.warn=()=>{},y.error=()=>{},y.fatal=()=>{},e<=m.fatal&&(y.fatal=console.error?console.error.bind(console,x("FATAL"),"color: orange"):console.log.bind(console,"[35m",x("FATAL"))),e<=m.error&&(y.error=console.error?console.error.bind(console,x("ERROR"),"color: orange"):console.log.bind(console,"[31m",x("ERROR"))),e<=m.warn&&(y.warn=console.warn?console.warn.bind(console,x("WARN"),"color: orange"):console.log.bind(console,"[33m",x("WARN"))),e<=m.info&&(y.info=console.info?console.info.bind(console,x("INFO"),"color: lightblue"):console.log.bind(console,"[34m",x("INFO"))),e<=m.debug&&(y.debug=console.debug?console.debug.bind(console,x("DEBUG"),"color: lightgreen"):console.log.bind(console,"[32m",x("DEBUG"))),e<=m.trace&&(y.trace=console.debug?console.debug.bind(console,x("TRACE"),"color: lightgreen"):console.log.bind(console,"[32m",x("TRACE")))}),"setLogLevel"),x=o((t=>`%c${(0,f.default)().format("ss.SSS")} : ${t} : `),"format"),b=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,w=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,k=/\s*%%.*\n/gm,T=class extends Error{static{o(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},_={},E=o((function(t,e){t=t.replace(b,"").replace(w,"").replace(k,"\n");for(const[r,{detector:n}]of Object.entries(_)){if(n(t,e))return r}throw new T(`No diagram type detected matching given configuration for text: ${t}`)}),"detectType"),C=o(((...t)=>{for(const{id:e,detector:r,loader:n}of t)S(e,r,n)}),"registerLazyLoadedDiagrams"),S=o(((t,e,r)=>{_[t]&&y.warn(`Detector with key ${t} already exists. Overwriting.`),_[t]={detector:e,loader:r},y.debug(`Detector with key ${t} added${r?" with loader":""}`)}),"addDetector"),A=o((t=>_[t].loader),"getDiagramLoader"),L=o(((t,e,{depth:r=2,clobber:n=!1}={})=>{const i={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach((e=>L(t,e,i))),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach((e=>{t.includes(e)||t.push(e)})),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach((i=>{"object"!=typeof e[i]||void 0!==t[i]&&"object"!=typeof t[i]?(n||"object"!=typeof t[i]&&"object"!=typeof e[i])&&(t[i]=e[i]):(void 0===t[i]&&(t[i]=Array.isArray(e[i])?[]:{}),t[i]=L(t[i],e[i],{depth:r-1,clobber:n}))})),t)}),"assignWithDepth"),N=L,I={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:o((t=>t>=255?255:t<0?0:t),"r"),g:o((t=>t>=255?255:t<0?0:t),"g"),b:o((t=>t>=255?255:t<0?0:t),"b"),h:o((t=>t%360),"h"),s:o((t=>t>=100?100:t<0?0:t),"s"),l:o((t=>t>=100?100:t<0?0:t),"l"),a:o((t=>t>=1?1:t<0?0:t),"a")},toLinear:o((t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92}),"toLinear"),hue2rgb:o(((t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t)),"hue2rgb"),hsl2rgb:o((({h:t,s:e,l:r},n)=>{if(!e)return 2.55*r;t/=360,e/=100;const i=(r/=100)<.5?r*(1+e):r+e-r*e,a=2*r-i;switch(n){case"r":return 255*I.hue2rgb(a,i,t+1/3);case"g":return 255*I.hue2rgb(a,i,t);case"b":return 255*I.hue2rgb(a,i,t-1/3)}}),"hsl2rgb"),rgb2hsl:o((({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;const i=Math.max(t,e,r),a=Math.min(t,e,r),s=(i+a)/2;if("l"===n)return 100*s;if(i===a)return 0;const o=i-a;if("s"===n)return 100*(s>.5?o/(2-i-a):o/(i+a));switch(i){case t:return 60*((e-r)/o+(e e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t))),"clamp"),round:o((t=>Math.round(1e10*t)/1e10),"round")},unit:{dec2hex:o((t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}),"dec2hex")}},M={};for(let t=0;t<=255;t++)M[t]=R.unit.dec2hex(t);var D,O=0,P=1,B=2,$=class{static{o(this,"Type")}constructor(){this.type=O}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=O}is(t){return this.type===t}},F=class{static{o(this,"Channels")}constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new $}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=O,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:n}=t;void 0===e&&(t.h=R.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=R.channel.rgb2hsl(t,"s")),void 0===n&&(t.l=R.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:n}=t;void 0===e&&(t.r=R.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=R.channel.hsl2rgb(t,"g")),void 0===n&&(t.b=R.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(B)||void 0===e?(this._ensureHSL(),R.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(B)||void 0===e?(this._ensureHSL(),R.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(B)||void 0===e?(this._ensureHSL(),R.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(P)||void 0===e?(this._ensureRGB(),R.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(P)||void 0===e?(this._ensureRGB(),R.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(P)||void 0===e?(this._ensureRGB(),R.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(P),this.changed=!0,this.data.r=t}set g(t){this.type.set(P),this.changed=!0,this.data.g=t}set b(t){this.type.set(P),this.changed=!0,this.data.b=t}set h(t){this.type.set(B),this.changed=!0,this.data.h=t}set s(t){this.type.set(B),this.changed=!0,this.data.s=t}set l(t){this.type.set(B),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}},z=new F({r:0,g:0,b:0,a:0},"transparent"),U={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:o((t=>{if(35!==t.charCodeAt(0))return;const e=t.match(U.re);if(!e)return;const r=e[1],n=parseInt(r,16),i=r.length,a=i%4==0,s=i>4,o=s?1:17,l=s?8:4,c=a?0:-1,h=s?255:15;return z.set({r:(n>>l*(c+3)&h)*o,g:(n>>l*(c+2)&h)*o,b:(n>>l*(c+1)&h)*o,a:a?(n&h)*o/255:1},t)}),"parse"),stringify:o((t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`#${M[Math.round(e)]}${M[Math.round(r)]}${M[Math.round(n)]}${M[Math.round(255*i)]}`:`#${M[Math.round(e)]}${M[Math.round(r)]}${M[Math.round(n)]}`}),"stringify")},G=U,q={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:o((t=>{const e=t.match(q.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return R.channel.clamp.h(.9*parseFloat(t));case"rad":return R.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return R.channel.clamp.h(360*parseFloat(t))}}return R.channel.clamp.h(parseFloat(t))}),"_hue2deg"),parse:o((t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(q.re);if(!r)return;const[,n,i,a,s,o]=r;return z.set({h:q._hue2deg(n),s:R.channel.clamp.s(parseFloat(i)),l:R.channel.clamp.l(parseFloat(a)),a:s?R.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},t)}),"parse"),stringify:o((t=>{const{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${R.lang.round(e)}, ${R.lang.round(r)}%, ${R.lang.round(n)}%, ${i})`:`hsl(${R.lang.round(e)}, ${R.lang.round(r)}%, ${R.lang.round(n)}%)`}),"stringify")},j=q,W={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:o((t=>{t=t.toLowerCase();const e=W.colors[t];if(e)return G.parse(e)}),"parse"),stringify:o((t=>{const e=G.stringify(t);for(const t in W.colors)if(W.colors[t]===e)return t}),"stringify")},Y=W,H={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:o((t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const r=t.match(H.re);if(!r)return;const[,n,i,a,s,o,l,c,h]=r;return z.set({r:R.channel.clamp.r(i?2.55*parseFloat(n):parseFloat(n)),g:R.channel.clamp.g(s?2.55*parseFloat(a):parseFloat(a)),b:R.channel.clamp.b(l?2.55*parseFloat(o):parseFloat(o)),a:c?R.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},t)}),"parse"),stringify:o((t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`rgba(${R.lang.round(e)}, ${R.lang.round(r)}, ${R.lang.round(n)}, ${R.lang.round(i)})`:`rgb(${R.lang.round(e)}, ${R.lang.round(r)}, ${R.lang.round(n)})`}),"stringify")},V=H,X={format:{keyword:Y,hex:G,rgb:V,rgba:V,hsl:j,hsla:j},parse:o((t=>{if("string"!=typeof t)return t;const e=G.parse(t)||V.parse(t)||j.parse(t)||Y.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)}),"parse"),stringify:o((t=>!t.changed&&t.color?t.color:t.type.is(B)||void 0===t.data.r?j.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?V.stringify(t):G.stringify(t)),"stringify")},K=o(((t,e)=>{const r=X.parse(t);for(const t in e)r[t]=R.channel.clamp[t](e[t]);return X.stringify(r)}),"change"),Z=K,Q=o(((t,e,r=0,n=1)=>{if("number"!=typeof t)return Z(t,{a:e});const i=z.set({r:R.channel.clamp.r(t),g:R.channel.clamp.g(e),b:R.channel.clamp.b(r),a:R.channel.clamp.a(n)});return X.stringify(i)}),"rgba"),J=Q,tt=o(((t,e)=>R.lang.round(X.parse(t)[e])),"channel"),et=o((t=>{const{r:e,g:r,b:n}=X.parse(t),i=.2126*R.channel.toLinear(e)+.7152*R.channel.toLinear(r)+.0722*R.channel.toLinear(n);return R.lang.round(i)}),"luminance"),rt=et,nt=o((t=>rt(t)>=.5),"isLight"),it=o((t=>!nt(t)),"isDark"),at=o(((t,e,r)=>{const n=X.parse(t),i=n[e],a=R.channel.clamp[e](i+r);return i!==a&&(n[e]=a),X.stringify(n)}),"adjustChannel"),st=o(((t,e)=>at(t,"l",e)),"lighten"),ot=o(((t,e)=>at(t,"l",-e)),"darken"),lt=o(((t,e)=>{const r=X.parse(t),n={};for(const t in e)e[t]&&(n[t]=r[t]+e[t]);return Z(t,n)}),"adjust"),ct=lt,ht=o(((t,e,r=50)=>{const{r:n,g:i,b:a,a:s}=X.parse(t),{r:o,g:l,b:c,a:h}=X.parse(e),u=r/100,d=2*u-1,p=s-h,g=((d*p==-1?d:(d+p)/(1+d*p))+1)/2,f=1-g;return J(n*g+o*f,i*g+l*f,a*g+c*f,s*u+h*(1-u))}),"mix"),ut=o(((t,e=100)=>{const r=X.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,ht(r,t,e)}),"invert"),dt="#ffffff",pt="#f2f2f2",gt=o(((t,e)=>ct(t,e?{s:-40,l:10}:{s:-40,l:-10})),"mkBorder"),ft=class{static{o(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||ct(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ct(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||gt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||gt(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?ot(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ot(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ut(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||st(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||ot(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ot(this.mainBkg,10)):(this.rowOdd=this.rowOdd||st(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||st(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ct(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ct(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ct(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ct(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ct(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ct(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||ct(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ct(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ct(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t {this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},mt=o((t=>{const e=new ft;return e.calculate(t),e}),"getThemeVariables"),yt=class{static{o(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=st(this.primaryColor,16),this.tertiaryColor=ct(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.background),this.secondaryBorderColor=gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=gt(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=st(ut("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=J(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.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.sectionBkgColor=ot("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=ot(this.sectionBkgColor,10),this.taskBorderColor=J(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=J(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.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||st(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ot(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=st(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=st(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=st(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=this.darkTextColor,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=ct(this.primaryColor,{h:64}),this.fillType3=ct(this.secondaryColor,{h:64}),this.fillType4=ct(this.primaryColor,{h:-64}),this.fillType5=ct(this.secondaryColor,{h:-64}),this.fillType6=ct(this.primaryColor,{h:128}),this.fillType7=ct(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||ct(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ct(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ct(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ct(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ct(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ct(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ct(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ct(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ct(this.primaryColor,{h:330});for(let t=0;t {this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},vt=o((t=>{const e=new yt;return e.calculate(t),e}),"getThemeVariables"),xt=class{static{o(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=ct(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=ct(this.primaryColor,{h:-160}),this.primaryBorderColor=gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=gt(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.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.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.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.sectionBkgColor=J(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.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.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ct(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ct(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ct(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ct(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ct(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ct(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ct(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ct(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ct(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ot(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ot(this.tertiaryColor,40);for(let t=0;t {"calculated"===this[t]&&(this[t]=void 0)})),"object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},bt=o((t=>{const e=new xt;return e.calculate(t),e}),"getThemeVariables"),wt=class{static{o(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=st("#cde498",10),this.primaryBorderColor=gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=gt(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.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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=ot(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ct(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ct(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ct(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ct(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ct(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ct(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ct(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ct(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ct(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ot(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ot(this.tertiaryColor,40);for(let t=0;t {this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},kt=o((t=>{const e=new wt;return e.calculate(t),e}),"getThemeVariables"),Tt=class{static{o(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=st(this.contrast,55),this.background="#ffffff",this.tertiaryColor=ct(this.primaryColor,{h:-160}),this.primaryBorderColor=gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=gt(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.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.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||st(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=st(this.contrast,55),this.border2=this.contrast,this.actorBorder=st(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t {this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},_t={base:{getThemeVariables:mt},dark:{getThemeVariables:vt},default:{getThemeVariables:bt},forest:{getThemeVariables:kt},neutral:{getThemeVariables:o((t=>{const e=new Tt;return e.calculate(t),e}),"getThemeVariables")}},Et={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,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"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Ct={...Et,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:_t.default.getThemeVariables(),sequence:{...Et.sequence,messageFont:o((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont"),noteFont:o((function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}}),"noteFont"),actorFont:o((function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}),"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Et.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Et.c4,useWidth:void 0,personFont:o((function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}}),"personFont"),external_personFont:o((function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}}),"external_personFont"),systemFont:o((function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}}),"systemFont"),external_systemFont:o((function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}}),"external_systemFont"),system_dbFont:o((function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}}),"system_dbFont"),external_system_dbFont:o((function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}}),"external_system_dbFont"),system_queueFont:o((function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}}),"system_queueFont"),external_system_queueFont:o((function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}}),"external_system_queueFont"),containerFont:o((function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}}),"containerFont"),external_containerFont:o((function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}}),"external_containerFont"),container_dbFont:o((function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}}),"container_dbFont"),external_container_dbFont:o((function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}}),"external_container_dbFont"),container_queueFont:o((function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}}),"container_queueFont"),external_container_queueFont:o((function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}}),"external_container_queueFont"),componentFont:o((function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}}),"componentFont"),external_componentFont:o((function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}}),"external_componentFont"),component_dbFont:o((function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}}),"component_dbFont"),external_component_dbFont:o((function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}}),"external_component_dbFont"),component_queueFont:o((function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}}),"component_queueFont"),external_component_queueFont:o((function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}}),"external_component_queueFont"),boundaryFont:o((function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}}),"boundaryFont"),messageFont:o((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont")},pie:{...Et.pie,useWidth:984},xyChart:{...Et.xyChart,useWidth:void 0},requirement:{...Et.requirement,useWidth:void 0},packet:{...Et.packet},radar:{...Et.radar}},St=o(((t,e="")=>Object.keys(t).reduce(((r,n)=>Array.isArray(t[n])?r:"object"==typeof t[n]&&null!==t[n]?[...r,e+n,...St(t[n],"")]:[...r,e+n]),[])),"keyify"),At=new Set(St(Ct,"")),Lt=Ct,Nt=o((t=>{if(y.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach((t=>Nt(t)));else{for(const e of Object.keys(t)){if(y.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!At.has(e)||null==t[e]){y.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){y.debug("sanitizing object",e),Nt(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)e.includes(n)&&(y.debug("sanitizing css option",e),t[e]=It(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}y.debug("After sanitization",t)}}),"sanitizeDirective"),It=o((t=>{let e=0,r=0;for(const n of t){if(e {let r=N({},t),n={};for(const t of e)qt(t),n=N(n,t);if(r=N(r,n),n.theme&&n.theme in _t){const t=N({},D),e=N(t.themeVariables||{},n.themeVariables);r.theme&&r.theme in _t&&(r.themeVariables=_t[r.theme].getThemeVariables(e))}return Xt(Ot=r),Ot}),"updateCurrentConfig"),Bt=o((t=>(Mt=N({},Rt),Mt=N(Mt,t),t.theme&&_t[t.theme]&&(Mt.themeVariables=_t[t.theme].getThemeVariables(t.themeVariables)),Pt(Mt,Dt),Mt)),"setSiteConfig"),$t=o((t=>{D=N({},t)}),"saveConfigFromInitialize"),Ft=o((t=>(Mt=N(Mt,t),Pt(Mt,Dt),Mt)),"updateSiteConfig"),zt=o((()=>N({},Mt)),"getSiteConfig"),Ut=o((t=>(Xt(t),N(Ot,t),Gt())),"setConfig"),Gt=o((()=>N({},Ot)),"getConfig"),qt=o((t=>{t&&(["secure",...Mt.secure??[]].forEach((e=>{Object.hasOwn(t,e)&&(y.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])})),Object.keys(t).forEach((e=>{e.startsWith("__")&&delete t[e]})),Object.keys(t).forEach((e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&qt(t[e])})))}),"sanitize"),jt=o((t=>{Nt(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),Dt.push(t),Pt(Mt,Dt)}),"addDirective"),Wt=o(((t=Mt)=>{Pt(t,Dt=[])}),"reset"),Yt={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Ht={},Vt=o((t=>{Ht[t]||(y.warn(Yt[t]),Ht[t]=!0)}),"issueWarning"),Xt=o((t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Vt("LAZY_LOAD_DEPRECATED")}),"checkConfig"),{entries:Kt,setPrototypeOf:Zt,isFrozen:Qt,getPrototypeOf:Jt,getOwnPropertyDescriptor:te}=Object,{freeze:ee,seal:re,create:ne}=Object,{apply:ie,construct:ae}="undefined"!=typeof Reflect&&Reflect;ee||(ee=o((function(t){return t}),"freeze")),re||(re=o((function(t){return t}),"seal")),ie||(ie=o((function(t,e,r){return t.apply(e,r)}),"apply")),ae||(ae=o((function(t,e){return new t(...e)}),"construct"));var se=be(Array.prototype.forEach),oe=be(Array.prototype.lastIndexOf),le=be(Array.prototype.pop),ce=be(Array.prototype.push),he=be(Array.prototype.splice),ue=be(String.prototype.toLowerCase),de=be(String.prototype.toString),pe=be(String.prototype.match),ge=be(String.prototype.replace),fe=be(String.prototype.indexOf),me=be(String.prototype.trim),ye=be(Object.prototype.hasOwnProperty),ve=be(RegExp.prototype.test),xe=we(TypeError);function be(t){return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i 2&&void 0!==arguments[2]?arguments[2]:ue;Zt&&Zt(t,null);let n=e.length;for(;n--;){let i=e[n];if("string"==typeof i){const t=r(i);t!==i&&(Qt(e)||(e[n]=t),i=t)}t[i]=!0}return t}function Te(t){for(let e=0;e /gm),Fe=re(/\$\{[\w\W]*/gm),ze=re(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ue=re(/^aria-[\-\w]+$/),Ge=re(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),qe=re(/^(?:\w+script|data):/i),je=re(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),We=re(/^html$/i),Ye=re(/^[a-z][.\w]*(-[.\w]+)+$/i),He=Object.freeze({__proto__:null,ARIA_ATTR:Ue,ATTR_WHITESPACE:je,CUSTOM_ELEMENT:Ye,DATA_ATTR:ze,DOCTYPE_NAME:We,ERB_EXPR:$e,IS_ALLOWED_URI:Ge,IS_SCRIPT_OR_DATA:qe,MUSTACHE_EXPR:Be,TMPLIT_EXPR:Fe}),Ve=1,Xe=3,Ke=7,Ze=8,Qe=9,Je=o((function(){return"undefined"==typeof window?null:window}),"getGlobal"),tr=o((function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;const n="data-tt-policy-suffix";e&&e.hasAttribute(n)&&(r=e.getAttribute(n));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}),"_createTrustedTypesPolicy"),er=o((function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}}),"_createHooksMap");function rr(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Je();const e=o((t=>rr(t)),"DOMPurify");if(e.version="3.2.4",e.removed=[],!t||!t.document||t.document.nodeType!==Qe||!t.Element)return e.isSupported=!1,e;let{document:r}=t;const n=r,i=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:h,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:g}=t,f=c.prototype,m=Ee(f,"cloneNode"),y=Ee(f,"remove"),v=Ee(f,"nextSibling"),x=Ee(f,"childNodes"),b=Ee(f,"parentNode");if("function"==typeof s){const t=r.createElement("template");t.content&&t.content.ownerDocument&&(r=t.content.ownerDocument)}let w,k="";const{implementation:T,createNodeIterator:_,createDocumentFragment:E,getElementsByTagName:C}=r,{importNode:S}=n;let A=er();e.isSupported="function"==typeof Kt&&"function"==typeof b&&T&&void 0!==T.createHTMLDocument;const{MUSTACHE_EXPR:L,ERB_EXPR:N,TMPLIT_EXPR:I,DATA_ATTR:R,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:D,ATTR_WHITESPACE:O,CUSTOM_ELEMENT:P}=He;let{IS_ALLOWED_URI:B}=He,$=null;const F=ke({},[...Ce,...Se,...Ae,...Ne,...Re]);let z=null;const U=ke({},[...Me,...De,...Oe,...Pe]);let G=Object.seal(ne(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}})),q=null,j=null,W=!0,Y=!0,H=!1,V=!0,X=!1,K=!0,Z=!1,Q=!1,J=!1,tt=!1,et=!1,rt=!1,nt=!0,it=!1;const at="user-content-";let st=!0,ot=!1,lt={},ct=null;const ht=ke({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ut=null;const dt=ke({},["audio","video","img","source","image","track"]);let pt=null;const gt=ke({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ft="http://www.w3.org/1998/Math/MathML",mt="http://www.w3.org/2000/svg",yt="http://www.w3.org/1999/xhtml";let vt=yt,xt=!1,bt=null;const wt=ke({},[ft,mt,yt],de);let kt=ke({},["mi","mo","mn","ms","mtext"]),Tt=ke({},["annotation-xml"]);const _t=ke({},["title","style","font","a","script"]);let Et=null;const Ct=["application/xhtml+xml","text/html"],St="text/html";let At=null,Lt=null;const Nt=r.createElement("form"),It=o((function(t){return t instanceof RegExp||t instanceof Function}),"isRegexOrFunction"),Rt=o((function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Lt||Lt!==t){if(t&&"object"==typeof t||(t={}),t=_e(t),Et=-1===Ct.indexOf(t.PARSER_MEDIA_TYPE)?St:t.PARSER_MEDIA_TYPE,At="application/xhtml+xml"===Et?de:ue,$=ye(t,"ALLOWED_TAGS")?ke({},t.ALLOWED_TAGS,At):F,z=ye(t,"ALLOWED_ATTR")?ke({},t.ALLOWED_ATTR,At):U,bt=ye(t,"ALLOWED_NAMESPACES")?ke({},t.ALLOWED_NAMESPACES,de):wt,pt=ye(t,"ADD_URI_SAFE_ATTR")?ke(_e(gt),t.ADD_URI_SAFE_ATTR,At):gt,ut=ye(t,"ADD_DATA_URI_TAGS")?ke(_e(dt),t.ADD_DATA_URI_TAGS,At):dt,ct=ye(t,"FORBID_CONTENTS")?ke({},t.FORBID_CONTENTS,At):ht,q=ye(t,"FORBID_TAGS")?ke({},t.FORBID_TAGS,At):{},j=ye(t,"FORBID_ATTR")?ke({},t.FORBID_ATTR,At):{},lt=!!ye(t,"USE_PROFILES")&&t.USE_PROFILES,W=!1!==t.ALLOW_ARIA_ATTR,Y=!1!==t.ALLOW_DATA_ATTR,H=t.ALLOW_UNKNOWN_PROTOCOLS||!1,V=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,X=t.SAFE_FOR_TEMPLATES||!1,K=!1!==t.SAFE_FOR_XML,Z=t.WHOLE_DOCUMENT||!1,tt=t.RETURN_DOM||!1,et=t.RETURN_DOM_FRAGMENT||!1,rt=t.RETURN_TRUSTED_TYPE||!1,J=t.FORCE_BODY||!1,nt=!1!==t.SANITIZE_DOM,it=t.SANITIZE_NAMED_PROPS||!1,st=!1!==t.KEEP_CONTENT,ot=t.IN_PLACE||!1,B=t.ALLOWED_URI_REGEXP||Ge,vt=t.NAMESPACE||yt,kt=t.MATHML_TEXT_INTEGRATION_POINTS||kt,Tt=t.HTML_INTEGRATION_POINTS||Tt,G=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&It(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&It(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(G.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&(Y=!1),et&&(tt=!0),lt&&($=ke({},Re),z=[],!0===lt.html&&(ke($,Ce),ke(z,Me)),!0===lt.svg&&(ke($,Se),ke(z,De),ke(z,Pe)),!0===lt.svgFilters&&(ke($,Ae),ke(z,De),ke(z,Pe)),!0===lt.mathMl&&(ke($,Ne),ke(z,Oe),ke(z,Pe))),t.ADD_TAGS&&($===F&&($=_e($)),ke($,t.ADD_TAGS,At)),t.ADD_ATTR&&(z===U&&(z=_e(z)),ke(z,t.ADD_ATTR,At)),t.ADD_URI_SAFE_ATTR&&ke(pt,t.ADD_URI_SAFE_ATTR,At),t.FORBID_CONTENTS&&(ct===ht&&(ct=_e(ct)),ke(ct,t.FORBID_CONTENTS,At)),st&&($["#text"]=!0),Z&&ke($,["html","head","body"]),$.table&&(ke($,["tbody"]),delete q.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw xe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw xe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=t.TRUSTED_TYPES_POLICY,k=w.createHTML("")}else void 0===w&&(w=tr(g,i)),null!==w&&"string"==typeof k&&(k=w.createHTML(""));ee&&ee(t),Lt=t}}),"_parseConfig"),Mt=ke({},[...Se,...Ae,...Le]),Dt=ke({},[...Ne,...Ie]),Ot=o((function(t){let e=b(t);e&&e.tagName||(e={namespaceURI:vt,tagName:"template"});const r=ue(t.tagName),n=ue(e.tagName);return!!bt[t.namespaceURI]&&(t.namespaceURI===mt?e.namespaceURI===yt?"svg"===r:e.namespaceURI===ft?"svg"===r&&("annotation-xml"===n||kt[n]):Boolean(Mt[r]):t.namespaceURI===ft?e.namespaceURI===yt?"math"===r:e.namespaceURI===mt?"math"===r&&Tt[n]:Boolean(Dt[r]):t.namespaceURI===yt?!(e.namespaceURI===mt&&!Tt[n])&&(!(e.namespaceURI===ft&&!kt[n])&&(!Dt[r]&&(_t[r]||!Mt[r]))):!("application/xhtml+xml"!==Et||!bt[t.namespaceURI]))}),"_checkValidNamespace"),Pt=o((function(t){ce(e.removed,{element:t});try{b(t).removeChild(t)}catch(e){y(t)}}),"_forceRemove"),Bt=o((function(t,r){try{ce(e.removed,{attribute:r.getAttributeNode(t),from:r})}catch(t){ce(e.removed,{attribute:null,from:r})}if(r.removeAttribute(t),"is"===t)if(tt||et)try{Pt(r)}catch(t){}else try{r.setAttribute(t,"")}catch(t){}}),"_removeAttribute"),$t=o((function(t){let e=null,n=null;if(J)t=" "+t;else{const e=pe(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===Et&&vt===yt&&(t=''+t+"");const i=w?w.createHTML(t):t;if(vt===yt)try{e=(new p).parseFromString(i,Et)}catch(t){}if(!e||!e.documentElement){e=T.createDocument(vt,"template",null);try{e.documentElement.innerHTML=xt?k:i}catch(t){}}const a=e.body||e.documentElement;return t&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),vt===yt?C.call(e,Z?"html":"body")[0]:Z?e.documentElement:a}),"_initDocument"),Ft=o((function(t){return _.call(t.ownerDocument||t,t,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)}),"_createNodeIterator"),zt=o((function(t){return t instanceof d&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof u)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)}),"_isClobbered"),Ut=o((function(t){return"function"==typeof l&&t instanceof l}),"_isNode");function Gt(t,r,n){se(t,(t=>{t.call(e,r,n,Lt)}))}o(Gt,"_executeHooks");const qt=o((function(t){let r=null;if(Gt(A.beforeSanitizeElements,t,null),zt(t))return Pt(t),!0;const n=At(t.nodeName);if(Gt(A.uponSanitizeElement,t,{tagName:n,allowedTags:$}),t.hasChildNodes()&&!Ut(t.firstElementChild)&&ve(/<[/\w]/g,t.innerHTML)&&ve(/<[/\w]/g,t.textContent))return Pt(t),!0;if(t.nodeType===Ke)return Pt(t),!0;if(K&&t.nodeType===Ze&&ve(/<[/\w]/g,t.data))return Pt(t),!0;if(!$[n]||q[n]){if(!q[n]&&Wt(n)){if(G.tagNameCheck instanceof RegExp&&ve(G.tagNameCheck,n))return!1;if(G.tagNameCheck instanceof Function&&G.tagNameCheck(n))return!1}if(st&&!ct[n]){const e=b(t)||t.parentNode,r=x(t)||t.childNodes;if(r&&e){for(let n=r.length-1;n>=0;--n){const i=m(r[n],!0);i.__removalCount=(t.__removalCount||0)+1,e.insertBefore(i,v(t))}}}return Pt(t),!0}return t instanceof c&&!Ot(t)?(Pt(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!ve(/<\/no(script|embed|frames)/i,t.innerHTML)?(X&&t.nodeType===Xe&&(r=t.textContent,se([L,N,I],(t=>{r=ge(r,t," ")})),t.textContent!==r&&(ce(e.removed,{element:t.cloneNode()}),t.textContent=r)),Gt(A.afterSanitizeElements,t,null),!1):(Pt(t),!0)}),"_sanitizeElements"),jt=o((function(t,e,n){if(nt&&("id"===e||"name"===e)&&(n in r||n in Nt))return!1;if(Y&&!j[e]&&ve(R,e));else if(W&&ve(M,e));else if(!z[e]||j[e]){if(!(Wt(t)&&(G.tagNameCheck instanceof RegExp&&ve(G.tagNameCheck,t)||G.tagNameCheck instanceof Function&&G.tagNameCheck(t))&&(G.attributeNameCheck instanceof RegExp&&ve(G.attributeNameCheck,e)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(e))||"is"===e&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&ve(G.tagNameCheck,n)||G.tagNameCheck instanceof Function&&G.tagNameCheck(n))))return!1}else if(pt[e]);else if(ve(B,ge(n,O,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==fe(n,"data:")||!ut[t]){if(H&&!ve(D,ge(n,O,"")));else if(n)return!1}else;return!0}),"_isValidAttribute"),Wt=o((function(t){return"annotation-xml"!==t&&pe(t,P)}),"_isBasicCustomElement"),Yt=o((function(t){Gt(A.beforeSanitizeAttributes,t,null);const{attributes:r}=t;if(!r||zt(t))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0};let i=r.length;for(;i--;){const a=r[i],{name:s,namespaceURI:o,value:l}=a,c=At(s);let h="value"===s?l:me(l);if(n.attrName=c,n.attrValue=h,n.keepAttr=!0,n.forceKeepAttr=void 0,Gt(A.uponSanitizeAttribute,t,n),h=n.attrValue,!it||"id"!==c&&"name"!==c||(Bt(s,t),h=at+h),K&&ve(/((--!?|])>)|<\/(style|title)/i,h)){Bt(s,t);continue}if(n.forceKeepAttr)continue;if(Bt(s,t),!n.keepAttr)continue;if(!V&&ve(/\/>/i,h)){Bt(s,t);continue}X&&se([L,N,I],(t=>{h=ge(h,t," ")}));const u=At(t.nodeName);if(jt(u,c,h)){if(w&&"object"==typeof g&&"function"==typeof g.getAttributeType)if(o);else switch(g.getAttributeType(u,c)){case"TrustedHTML":h=w.createHTML(h);break;case"TrustedScriptURL":h=w.createScriptURL(h)}try{o?t.setAttributeNS(o,s,h):t.setAttribute(s,h),zt(t)?Pt(t):le(e.removed)}catch(t){}}}Gt(A.afterSanitizeAttributes,t,null)}),"_sanitizeAttributes"),Ht=o((function t(e){let r=null;const n=Ft(e);for(Gt(A.beforeSanitizeShadowDOM,e,null);r=n.nextNode();)Gt(A.uponSanitizeShadowNode,r,null),qt(r),Yt(r),r.content instanceof a&&t(r.content);Gt(A.afterSanitizeShadowDOM,e,null)}),"_sanitizeShadowDOM");return e.sanitize=function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,s=null,o=null,c=null;if(xt=!t,xt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Ut(t)){if("function"!=typeof t.toString)throw xe("toString is not a function");if("string"!=typeof(t=t.toString()))throw xe("dirty is not a string, aborting")}if(!e.isSupported)return t;if(Q||Rt(r),e.removed=[],"string"==typeof t&&(ot=!1),ot){if(t.nodeName){const e=At(t.nodeName);if(!$[e]||q[e])throw xe("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof l)i=$t("\x3c!----\x3e"),s=i.ownerDocument.importNode(t,!0),s.nodeType===Ve&&"BODY"===s.nodeName||"HTML"===s.nodeName?i=s:i.appendChild(s);else{if(!tt&&!X&&!Z&&-1===t.indexOf("<"))return w&&rt?w.createHTML(t):t;if(i=$t(t),!i)return tt?null:rt?k:""}i&&J&&Pt(i.firstChild);const h=Ft(ot?t:i);for(;o=h.nextNode();)qt(o),Yt(o),o.content instanceof a&&Ht(o.content);if(ot)return t;if(tt){if(et)for(c=E.call(i.ownerDocument);i.firstChild;)c.appendChild(i.firstChild);else c=i;return(z.shadowroot||z.shadowrootmode)&&(c=S.call(n,c,!0)),c}let u=Z?i.outerHTML:i.innerHTML;return Z&&$["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&ve(We,i.ownerDocument.doctype.name)&&(u="\n"+u),X&&se([L,N,I],(t=>{u=ge(u,t," ")})),w&&rt?w.createHTML(u):u},e.setConfig=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Rt(t),Q=!0},e.clearConfig=function(){Lt=null,Q=!1},e.isValidAttribute=function(t,e,r){Lt||Rt({});const n=At(t),i=At(e);return jt(n,i,r)},e.addHook=function(t,e){"function"==typeof e&&ce(A[t],e)},e.removeHook=function(t,e){if(void 0!==e){const r=oe(A[t],e);return-1===r?void 0:he(A[t],r,1)[0]}return le(A[t])},e.removeHooks=function(t){A[t]=[]},e.removeAllHooks=function(){A=er()},e}o(rr,"createDOMPurify");var nr=rr(),ir=/
/gi,ar=o((t=>{if(!t)return[""];return fr(t).replace(/\\n/g,"#br#").split("#br#")}),"getRows"),sr=(()=>{let t=!1;return()=>{t||(or(),t=!0)}})();function or(){const t="data-temp-href-target";nr.addHook("beforeSanitizeAttributes",(e=>{e instanceof Element&&"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")})),nr.addHook("afterSanitizeAttributes",(e=>{e instanceof Element&&"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))}))}o(or,"setupDompurifyHooks");var lr=o((t=>{sr();return nr.sanitize(t)}),"removeScript"),cr=o(((t,e)=>{if(!1!==e.flowchart?.htmlLabels){const r=e.securityLevel;"antiscript"===r||"strict"===r?t=lr(t):"loose"!==r&&(t=(t=(t=fr(t)).replace(/
")),"placeholderToBreak"),fr=o((t=>t.replace(ir,"#br#")),"breakToPlaceholder"),mr=o((t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e}),"getUrl"),yr=o((t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),vr=o((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.max(...e)}),"getMax"),xr=o((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.min(...e)}),"getMin"),br=o((function(t){const e=t.split(/(,)/),r=[];for(let t=0;t0&&t+1 Math.max(0,t.split(e).length-1)),"countOccurrence"),kr=o(((t,e)=>{const r=wr(t,"~"),n=wr(e,"~");return 1===r&&1===n}),"shouldCombineSets"),Tr=o((t=>{const e=wr(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const n=[...t];let i=n.indexOf("~"),a=n.lastIndexOf("~");for(;-1!==i&&-1!==a&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")}),"processSet"),_r=o((()=>void 0!==window.MathMLElement),"isMathMLSupported"),Er=/\$\$(.*)\$\$/g,Cr=o((t=>(t.match(Er)?.length??0)>0),"hasKatex"),Sr=o((async(t,e)=>{t=await Ar(t,e);const r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";document.querySelector("body")?.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n}),"calculateMathMLDimensions"),Ar=o((async(t,e)=>{if(!Cr(t))return t;if(!(_r()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Er,"MathML is unsupported in this environment.");const{default:r}=await Promise.resolve().then((function(){return $B})),n=e.forceLegacyMathML||!_r()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(ir).map((t=>Cr(t)?` ${t}`:`${t}`)).join("").replace(Er,((t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(//g,"")))}),"renderKatex"),Lr={getRows:ar,sanitizeText:hr,sanitizeTextOrArray:ur,hasBreaks:dr,splitBreaks:pr,lineBreakRegex:ir,removeScript:lr,getUrl:mr,evaluate:yr,getMax:vr,getMin:xr},Nr=o((function(t,e){for(let r of e)t.attr(r[0],r[1])}),"d3Attrs"),Ir=o((function(t,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n}),"calculateSvgSizeAttrs"),Rr=o((function(t,e,r,n){const i=Ir(e,r,n);Nr(t,i)}),"configureSvgSize"),Mr=o((function(t,e,r,n){const i=e.node().getBBox(),a=i.width,s=i.height;y.info(`SVG bounds: ${a}x${s}`,i);let o=0,l=0;y.info(`Graph bounds: ${o}x${l}`,t),o=a+2*r,l=s+2*r,y.info(`Calculated bounds: ${o}x${l}`),Rr(e,l,o,n);const c=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;e.attr("viewBox",c)}),"setupGraphViewbox"),Dr={},Or=o(((t,e,r)=>{let n="";return t in Dr&&Dr[t]?n=Dr[t](r):y.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n @keyframes edge-animation-frame {\n from {\n stroke-dashoffset: 0;\n }\n }\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n & .edge-animation-slow {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 50s linear infinite;\n stroke-linecap: round;\n }\n & .edge-animation-fast {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 20s linear infinite;\n stroke-linecap: round;\n }\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 1px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${n}\n\n ${e}\n`}),"getStyles"),Pr=o(((t,e)=>{void 0!==e&&(Dr[t]=e)}),"addStylesForDiagram"),Br=Or,$r={};h($r,{clear:()=>qr,getAccDescription:()=>Hr,getAccTitle:()=>Wr,getDiagramTitle:()=>Xr,setAccDescription:()=>Yr,setAccTitle:()=>jr,setDiagramTitle:()=>Vr});var Fr="",zr="",Ur="",Gr=o((t=>hr(t,Gt())),"sanitizeText"),qr=o((()=>{Fr="",Ur="",zr=""}),"clear"),jr=o((t=>{Fr=Gr(t).replace(/^\s+/g,"")}),"setAccTitle"),Wr=o((()=>Fr),"getAccTitle"),Yr=o((t=>{Ur=Gr(t).replace(/\n\s+/g,"\n")}),"setAccDescription"),Hr=o((()=>Ur),"getAccDescription"),Vr=o((t=>{zr=Gr(t)}),"setDiagramTitle"),Xr=o((()=>zr),"getDiagramTitle"),Kr=y,Zr=v,Qr=Gt,Jr=Ut,tn=Rt,en=o((t=>hr(t,Qr())),"sanitizeText"),rn=Mr,nn=o((()=>$r),"getCommonDb"),an={},sn=o(((t,e,r)=>{an[t]&&Kr.warn(`Diagram with id ${t} already registered. Overwriting.`),an[t]=e,r&&S(t,r),Pr(t,e.styles),e.injectUtils?.(Kr,Zr,Qr,en,rn,nn(),(()=>{}))}),"registerDiagram"),on=o((t=>{if(t in an)return an[t];throw new ln(t)}),"getDiagram"),ln=class extends Error{static{o(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}};function cn(t,e){let r;if(void 0===e)for(const e of t)null!=e&&(r =e)&&(r=e);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(r=i)&&(r=i)}return r}function hn(t,e){let r;if(void 0===e)for(const e of t)null!=e&&(r>e||void 0===r&&e>=e)&&(r=e);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function un(t,e){return null==t||null==e?NaN:t e?1:t>=e?0:NaN}function dn(t,e){return null==t||null==e?NaN:e t?1:e>=t?0:NaN}function pn(t){let e,r,n;function i(t,n,i=0,a=t.length){if(i>>1;r(t[e],n)<0?i=e+1:a=e}while(i>>1;r(t[e],n)<=0?i=e+1:a=e}while(ir&&n(t[s-1],e)>-n(t[s],e)?s-1:s}return 2!==t.length?(e=un,r=o(((e,r)=>un(t(e),r)),"compare2"),n=o(((e,r)=>t(e)-r),"delta")):(e=t===un||t===dn?t:gn,r=t,n=t),o(i,"left"),o(a,"right"),o(s,"center"),{left:i,center:s,right:a}}function gn(){return 0}function fn(t){return null===t?NaN:+t}o(cn,"max"),o(hn,"min"),o(un,"ascending"),o(dn,"descending"),o(pn,"bisector"),o(gn,"zero"),o(fn,"number");var mn=pn(un),yn=mn.right;mn.left,pn(fn).center;var vn=yn,xn=class extends Map{static{o(this,"InternMap")}constructor(t,e=Tn){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,r]of t)this.set(e,r)}get(t){return super.get(bn(this,t))}has(t){return super.has(bn(this,t))}set(t,e){return super.set(wn(this,t),e)}delete(t){return super.delete(kn(this,t))}};function bn({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):r}function wn({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function kn({_intern:t,_key:e},r){const n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function Tn(t){return null!==t&&"object"==typeof t?t.valueOf():t}o(bn,"intern_get"),o(wn,"intern_set"),o(kn,"intern_delete"),o(Tn,"keyof");var _n=Math.sqrt(50),En=Math.sqrt(10),Cn=Math.sqrt(2);function Sn(t,e,r){const n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=_n?10:a>=En?5:a>=Cn?2:1;let o,l,c;return i<0?(c=Math.pow(10,-i)/s,o=Math.round(t*c),l=Math.round(e*c),o/c e&&--l,c=-c):(c=Math.pow(10,i)*s,o=Math.round(t/c),l=Math.round(e/c),o*c e&&--l),l 0))return[];if((t=+t)===(e=+e))return[t];const n=e =i))return[];const o=a-i+1,l=new Array(o);if(n)if(s<0)for(let t=0;t +t(e)}function Bn(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function $n(){return!this.__axis}function Fn(t,e){var r=[],n=null,i=null,a=6,s=6,l=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,h=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",d=1===t||3===t?Dn:On;function p(o){var p=null==n?e.ticks?e.ticks.apply(e,r):e.domain():n,g=null==i?e.tickFormat?e.tickFormat.apply(e,r):Rn:i,f=Math.max(a,0)+l,m=e.range(),y=+m[0]+c,v=+m[m.length-1]+c,x=(e.bandwidth?Bn:Pn)(e.copy(),c),b=o.selection?o.selection():o,w=b.selectAll(".domain").data([null]),k=b.selectAll(".tick").data(p,e).order(),T=k.exit(),_=k.enter().append("g").attr("class","tick"),E=k.select("line"),C=k.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(_),E=E.merge(_.append("line").attr("stroke","currentColor").attr(u+"2",h*a)),C=C.merge(_.append("text").attr("fill","currentColor").attr(u,h*f).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),o!==b&&(w=w.transition(o),k=k.transition(o),E=E.transition(o),C=C.transition(o),T=T.transition(o).attr("opacity",Mn).attr("transform",(function(t){return isFinite(t=x(t))?d(t+c):this.getAttribute("transform")})),_.attr("opacity",Mn).attr("transform",(function(t){var e=this.parentNode.__axis;return d((e&&isFinite(e=e(t))?e:x(t))+c)}))),T.remove(),w.attr("d",4===t||2===t?s?"M"+h*s+","+y+"H"+c+"V"+v+"H"+h*s:"M"+c+","+y+"V"+v:s?"M"+y+","+h*s+"V"+c+"H"+v+"V"+h*s:"M"+y+","+c+"H"+v),k.attr("opacity",1).attr("transform",(function(t){return d(x(t)+c)})),E.attr(u+"2",h*a),C.attr(u,h*f).text(g),b.filter($n).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),b.each((function(){this.__axis=x}))}return o(p,"axis"),p.scale=function(t){return arguments.length?(e=t,p):e},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(t){return arguments.length?(r=null==t?[]:Array.from(t),p):r.slice()},p.tickValues=function(t){return arguments.length?(n=null==t?null:Array.from(t),p):n&&n.slice()},p.tickFormat=function(t){return arguments.length?(i=t,p):i},p.tickSize=function(t){return arguments.length?(a=s=+t,p):a},p.tickSizeInner=function(t){return arguments.length?(a=+t,p):a},p.tickSizeOuter=function(t){return arguments.length?(s=+t,p):s},p.tickPadding=function(t){return arguments.length?(l=+t,p):l},p.offset=function(t){return arguments.length?(c=+t,p):c},p}function zn(t){return Fn(1,t)}function Un(t){return Fn(3,t)}function Gn(){}function qn(t){return null==t?Gn:function(){return this.querySelector(t)}}function jn(t){"function"!=typeof t&&(t=qn(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i =w&&(w=b+1);!(x=m[w])&&++w =0;)(n=i[a])&&(s&&4^n.compareDocumentPosition(s)&&s.parentNode.insertBefore(n,s),s=n);return this}function bi(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=wi),o(e,"compareNode");for(var r=this._groups,n=r.length,i=new Array(n),a=0;a e?1:t>=e?0:NaN}function ki(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Ti(){return Array.from(this)}function _i(){for(var t=this._groups,e=0,r=t.length;e =0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),Li.hasOwnProperty(e)?{space:Li[e],local:t}:t}function Ii(t){return function(){this.removeAttribute(t)}}function Ri(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Mi(t,e){return function(){this.setAttribute(t,e)}}function Di(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Oi(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function Pi(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function Bi(t,e){var r=Ni(t);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((null==e?r.local?Ri:Ii:"function"==typeof e?r.local?Pi:Oi:r.local?Di:Mi)(r,e))}function $i(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Fi(t){return function(){this.style.removeProperty(t)}}function zi(t,e,r){return function(){this.style.setProperty(t,e,r)}}function Ui(t,e,r){return function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function Gi(t,e,r){return arguments.length>1?this.each((null==e?Fi:"function"==typeof e?Ui:zi)(t,e,null==r?"":r)):qi(this.node(),t)}function qi(t,e){return t.style.getPropertyValue(e)||$i(t).getComputedStyle(t,null).getPropertyValue(e)}function ji(t){return function(){delete this[t]}}function Wi(t,e){return function(){this[t]=e}}function Yi(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function Hi(t,e){return arguments.length>1?this.each((null==e?ji:"function"==typeof e?Yi:Wi)(t,e)):this.node()[t]}function Vi(t){return t.trim().split(/^|\s+/)}function Xi(t){return t.classList||new Ki(t)}function Ki(t){this._node=t,this._names=Vi(t.getAttribute("class")||"")}function Zi(t,e){for(var r=Xi(t),n=-1,i=e.length;++n=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}}))}function La(t){return function(){var e=this.__on;if(e){for(var r,n=0,i=-1,a=e.length;n=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))}),"remove"),contains:o((function(t){return this._names.indexOf(t)>=0}),"contains")},o(Zi,"classedAdd"),o(Qi,"classedRemove"),o(Ji,"classedTrue"),o(ta,"classedFalse"),o(ea,"classedFunction"),o(ra,"default"),o(na,"textRemove"),o(ia,"textConstant"),o(aa,"textFunction"),o(sa,"default"),o(oa,"htmlRemove"),o(la,"htmlConstant"),o(ca,"htmlFunction"),o(ha,"default"),o(ua,"raise"),o(da,"default"),o(pa,"lower"),o(ga,"default"),o(fa,"creatorInherit"),o(ma,"creatorFixed"),o(ya,"default"),o(va,"default"),o(xa,"constantNull"),o(ba,"default"),o(wa,"remove"),o(ka,"default"),o(Ta,"selection_cloneShallow"),o(_a,"selection_cloneDeep"),o(Ea,"default"),o(Ca,"default"),o(Sa,"contextListener"),o(Aa,"parseTypenames"),o(La,"onRemove"),o(Na,"onAdd"),o(Ia,"default"),o(Ra,"dispatchEvent"),o(Ma,"dispatchConstant"),o(Da,"dispatchFunction"),o(Oa,"default"),o(Pa,"default");var Ba=[null];function $a(t,e){this._groups=t,this._parents=e}function Fa(){return new $a([[document.documentElement]],Ba)}function za(){return this}o($a,"Selection"),o(Fa,"selection"),o(za,"selection_selection"),$a.prototype=Fa.prototype={constructor:$a,select:jn,selectAll:Xn,selectChild:ei,selectChildren:ai,filter:si,data:gi,enter:li,exit:mi,join:yi,merge:vi,selection:za,order:xi,sort:bi,call:ki,nodes:Ti,node:_i,size:Ei,empty:Ci,each:Si,attr:Bi,style:Gi,property:Hi,classed:ra,text:sa,html:ha,raise:da,lower:ga,append:va,insert:ba,remove:ka,clone:Ea,datum:Ca,on:Ia,dispatch:Oa,[Symbol.iterator]:Pa};var Ua=Fa;function Ga(t){return"string"==typeof t?new $a([[document.querySelector(t)]],[document.documentElement]):new $a([[t]],Ba)}function qa(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function ja(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function Wa(){}o(Ga,"default"),o(qa,"default"),o(ja,"extend"),o(Wa,"Color");var Ya=.7,Ha=1/Ya,Va="\\s*([+-]?\\d+)\\s*",Xa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ka="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Za=/^#([0-9a-f]{3,8})$/,Qa=new RegExp(`^rgb\\(${Va},${Va},${Va}\\)$`),Ja=new RegExp(`^rgb\\(${Ka},${Ka},${Ka}\\)$`),ts=new RegExp(`^rgba\\(${Va},${Va},${Va},${Xa}\\)$`),es=new RegExp(`^rgba\\(${Ka},${Ka},${Ka},${Xa}\\)$`),rs=new RegExp(`^hsl\\(${Xa},${Ka},${Ka}\\)$`),ns=new RegExp(`^hsla\\(${Xa},${Ka},${Ka},${Xa}\\)$`),is={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};function as(){return this.rgb().formatHex()}function ss(){return this.rgb().formatHex8()}function os(){return ks(this).formatHsl()}function ls(){return this.rgb().formatRgb()}function cs(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=Za.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?hs(e):3===r?new gs(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?us(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?us(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Qa.exec(t))?new gs(e[1],e[2],e[3],1):(e=Ja.exec(t))?new gs(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ts.exec(t))?us(e[1],e[2],e[3],e[4]):(e=es.exec(t))?us(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=rs.exec(t))?ws(e[1],e[2]/100,e[3]/100,1):(e=ns.exec(t))?ws(e[1],e[2]/100,e[3]/100,e[4]):is.hasOwnProperty(t)?hs(is[t]):"transparent"===t?new gs(NaN,NaN,NaN,0):null}function hs(t){return new gs(t>>16&255,t>>8&255,255&t,1)}function us(t,e,r,n){return n<=0&&(t=e=r=NaN),new gs(t,e,r,n)}function ds(t){return t instanceof Wa||(t=cs(t)),t?new gs((t=t.rgb()).r,t.g,t.b,t.opacity):new gs}function ps(t,e,r,n){return 1===arguments.length?ds(t):new gs(t,e,r,null==n?1:n)}function gs(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function fs(){return`#${bs(this.r)}${bs(this.g)}${bs(this.b)}`}function ms(){return`#${bs(this.r)}${bs(this.g)}${bs(this.b)}${bs(255*(isNaN(this.opacity)?1:this.opacity))}`}function ys(){const t=vs(this.opacity);return`${1===t?"rgb(":"rgba("}${xs(this.r)}, ${xs(this.g)}, ${xs(this.b)}${1===t?")":`, ${t})`}`}function vs(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function xs(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function bs(t){return((t=xs(t))<16?"0":"")+t.toString(16)}function ws(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new _s(t,e,r,n)}function ks(t){if(t instanceof _s)return new _s(t.h,t.s,t.l,t.opacity);if(t instanceof Wa||(t=cs(t)),!t)return new _s;if(t instanceof _s)return t;var e=(t=t.rgb()).r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),s=NaN,o=a-i,l=(a+i)/2;return o?(s=e===a?(r-n)/o+6*(r 0&&l<1?0:s,new _s(s,o,l,t.opacity)}function Ts(t,e,r,n){return 1===arguments.length?ks(t):new _s(t,e,r,null==n?1:n)}function _s(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function Es(t){return(t=(t||0)%360)<0?t+360:t}function Cs(t){return Math.max(0,Math.min(1,t||0))}function Ss(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}qa(Wa,cs,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:as,formatHex:as,formatHex8:ss,formatHsl:os,formatRgb:ls,toString:ls}),o(as,"color_formatHex"),o(ss,"color_formatHex8"),o(os,"color_formatHsl"),o(ls,"color_formatRgb"),o(cs,"color"),o(hs,"rgbn"),o(us,"rgba"),o(ds,"rgbConvert"),o(ps,"rgb"),o(gs,"Rgb"),qa(gs,ps,ja(Wa,{brighter(t){return t=null==t?Ha:Math.pow(Ha,t),new gs(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Ya:Math.pow(Ya,t),new gs(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new gs(xs(this.r),xs(this.g),xs(this.b),vs(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:fs,formatHex:fs,formatHex8:ms,formatRgb:ys,toString:ys})),o(fs,"rgb_formatHex"),o(ms,"rgb_formatHex8"),o(ys,"rgb_formatRgb"),o(vs,"clampa"),o(xs,"clampi"),o(bs,"hex"),o(ws,"hsla"),o(ks,"hslConvert"),o(Ts,"hsl"),o(_s,"Hsl"),qa(_s,Ts,ja(Wa,{brighter(t){return t=null==t?Ha:Math.pow(Ha,t),new _s(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Ya:Math.pow(Ya,t),new _s(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new gs(Ss(t>=240?t-240:t+120,i,n),Ss(t,i,n),Ss(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new _s(Es(this.h),Cs(this.s),Cs(this.l),vs(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=vs(this.opacity);return`${1===t?"hsl(":"hsla("}${Es(this.h)}, ${100*Cs(this.s)}%, ${100*Cs(this.l)}%${1===t?")":`, ${t})`}`}})),o(Es,"clamph"),o(Cs,"clampt"),o(Ss,"hsl2rgb");var As=Math.PI/180,Ls=180/Math.PI,Ns=.96422,Is=.82521,Rs=4/29,Ms=6/29,Ds=3*Ms*Ms;function Os(t){if(t instanceof Bs)return new Bs(t.l,t.a,t.b,t.opacity);if(t instanceof js)return Ws(t);t instanceof gs||(t=ds(t));var e,r,n=Us(t.r),i=Us(t.g),a=Us(t.b),s=$s((.2225045*n+.7168786*i+.0606169*a)/1);return n===i&&i===a?e=r=s:(e=$s((.4360747*n+.3850649*i+.1430804*a)/Ns),r=$s((.0139322*n+.0971045*i+.7141733*a)/Is)),new Bs(116*s-16,500*(e-s),200*(s-r),t.opacity)}function Ps(t,e,r,n){return 1===arguments.length?Os(t):new Bs(t,e,r,null==n?1:n)}function Bs(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function $s(t){return t>.008856451679035631?Math.pow(t,1/3):t/Ds+Rs}function Fs(t){return t>Ms?t*t*t:Ds*(t-Rs)}function zs(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Us(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Gs(t){if(t instanceof js)return new js(t.h,t.c,t.l,t.opacity);if(t instanceof Bs||(t=Os(t)),0===t.a&&0===t.b)return new js(NaN,0 ()=>t),"default");function Hs(t,e){return function(r){return t+r*e}}function Vs(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function Xs(t,e){var r=e-t;return r?Hs(t,r>180||r<-180?r-360*Math.round(r/360):r):Ys(isNaN(t)?e:t)}function Ks(t){return 1==(t=+t)?Zs:function(e,r){return r-e?Vs(e,r,t):Ys(isNaN(e)?r:e)}}function Zs(t,e){var r=e-t;return r?Hs(t,r):Ys(isNaN(t)?e:t)}function Qs(t){return function(e,r){var n=t((e=qs(e)).h,(r=qs(r)).h),i=Zs(e.c,r.c),a=Zs(e.l,r.l),s=Zs(e.opacity,r.opacity);return function(t){return e.h=n(t),e.c=i(t),e.l=a(t),e.opacity=s(t),e+""}}}o(Hs,"linear"),o(Vs,"exponential"),o(Xs,"hue"),o(Ks,"gamma"),o(Zs,"nogamma"),o(Qs,"hcl");var Js=Qs(Xs);function to(t,e,r,n,i){var a=t*t,s=a*t;return((1-3*t+3*a-s)*e+(4-6*a+3*s)*r+(1+3*t+3*a-3*s)*n+s*i)/6}o(to,"basis"),o((function(t){var e=t.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),i=t[n],a=t[n+1],s=n>0?t[n-1]:2*i-a,o=n a&&(i=e.slice(a,i),o[s]?o[s]+=i:o[++s]=i),(r=r[0])===(n=n[0])?o[s]?o[s]+=n:o[++s]=n:(o[++s]=null,l.push({i:s,x:so(r,n)})),a=co.lastIndex;return a 180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+"rotate(",null,n)-2,x:so(t,e)})):e&&r.push(i(r)+"rotate("+e+n)}function l(t,e,r,a){t!==e?a.push({i:r.push(i(r)+"skewX(",null,n)-2,x:so(t,e)}):e&&r.push(i(r)+"skewX("+e+n)}function c(t,e,r,n,a,s){if(t!==r||e!==n){var o=a.push(i(a)+"scale(",null,",",null,")");s.push({i:o-4,x:so(t,r)},{i:o-2,x:so(e,n)})}else 1===r&&1===n||a.push(i(a)+"scale("+r+","+n+")")}return o(i,"pop"),o(a,"translate"),o(s,"rotate"),o(l,"skewX"),o(c,"scale"),function(e,r){var n=[],i=[];return e=t(e),r=t(r),a(e.translateX,e.translateY,r.translateX,r.translateY,n,i),s(e.rotate,r.rotate,n,i),l(e.skewX,r.skewX,n,i),c(e.scaleX,e.scaleY,r.scaleX,r.scaleY,n,i),e=r=null,function(t){for(var e,r=-1,a=i.length;++re&&(r=t,t=e,e=r),function(r){return Math.max(t,Math.min(e,r))}}function Do(t,e,r){var n=t[0],i=t[1],a=e[0],s=e[1];return i 2?Oo:Do,i=a=null,d}function d(e){return null==e||isNaN(e=+e)?r:(i||(i=n(s.map(t),l,c)))(t(h(e)))}return o(u,"rescale"),o(d,"scale"),d.invert=function(r){return h(e((a||(a=n(l,s.map(t),so)))(r)))},d.domain=function(t){return arguments.length?(s=Array.from(t,Lo),u()):s.slice()},d.range=function(t){return arguments.length?(l=Array.from(t),u()):l.slice()},d.rangeRound=function(t){return l=Array.from(t),c=fo,u()},d.clamp=function(t){return arguments.length?(h=!!t||Io,u()):h!==Io},d.interpolate=function(t){return arguments.length?(c=t,u()):c},d.unknown=function(t){return arguments.length?(r=t,d):r},function(r,n){return t=r,e=n,u()}}function $o(){return Bo()(Io,Io)}function Fo(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function zo(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function Uo(t){return(t=zo(Math.abs(t)))?t[1]:NaN}function Go(t,e){return function(r,n){for(var i=r.length,a=[],s=0,o=t[0],l=0;i>0&&o>0&&(l+o+1>n&&(o=Math.max(1,n-l)),a.push(r.substring(i-=o,i+o)),!((l+=o+1)>n));)o=t[s=(s+1)%t.length];return a.reverse().join(e)}}function qo(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}o(Io,"identity"),o(Ro,"normalize"),o(Mo,"clamper"),o(Do,"bimap"),o(Oo,"polymap"),o(Po,"copy"),o(Bo,"transformer"),o($o,"continuous"),o(Fo,"default"),o(zo,"formatDecimalParts"),o(Uo,"default"),o(Go,"default"),o(qo,"default");var jo,Wo=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Yo(t){if(!(e=Wo.exec(t)))throw new Error("invalid format: "+t);var e;return new Ho({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Ho(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Vo(t){t:for(var e,r=t.length,n=1,i=-1;n 0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}function Xo(t,e){var r=zo(t,e);if(!r)return t+"";var n=r[0],i=r[1],a=i-(jo=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+zo(t,Math.max(0,e+a-1))[0]}function Ko(t,e){var r=zo(t,e);if(!r)return t+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}o(Yo,"formatSpecifier"),Yo.prototype=Ho.prototype,o(Ho,"FormatSpecifier"),Ho.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type},o(Vo,"default"),o(Xo,"default"),o(Ko,"default");var Zo={"%":o(((t,e)=>(100*t).toFixed(e)),"%"),b:o((t=>Math.round(t).toString(2)),"b"),c:o((t=>t+""),"c"),d:Fo,e:o(((t,e)=>t.toExponential(e)),"e"),f:o(((t,e)=>t.toFixed(e)),"f"),g:o(((t,e)=>t.toPrecision(e)),"g"),o:o((t=>Math.round(t).toString(8)),"o"),p:o(((t,e)=>Ko(100*t,e)),"p"),r:Ko,s:Xo,X:o((t=>Math.round(t).toString(16).toUpperCase()),"X"),x:o((t=>Math.round(t).toString(16)),"x")};function Qo(t){return t}o(Qo,"default");var Jo,tl,el,rl=Array.prototype.map,nl=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function il(t){var e=void 0===t.grouping||void 0===t.thousands?Qo:Go(rl.call(t.grouping,Number),t.thousands+""),r=void 0===t.currency?"":t.currency[0]+"",n=void 0===t.currency?"":t.currency[1]+"",i=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?Qo:qo(rl.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function h(t){var h=(t=Yo(t)).fill,u=t.align,d=t.sign,p=t.symbol,g=t.zero,f=t.width,m=t.comma,y=t.precision,v=t.trim,x=t.type;"n"===x?(m=!0,x="g"):Zo[x]||(void 0===y&&(y=12),v=!0,x="g"),(g||"0"===h&&"="===u)&&(g=!0,h="0",u="=");var b="$"===p?r:"#"===p&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",w="$"===p?n:/[%p]/.test(x)?s:"",k=Zo[x],T=/[defgprs%]/.test(x);function _(t){var r,n,s,o=b,p=w;if("c"===x)p=k(t)+p,t="";else{var _=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:k(Math.abs(t),y),v&&(t=Vo(t)),_&&0==+t&&"+"!==d&&(_=!1),o=(_?"("===d?d:l:"-"===d||"("===d?"":d)+o,p=("s"===x?nl[8+jo/3]:"")+p+(_&&"("===d?")":""),T)for(r=-1,n=t.length;++r (s=t.charCodeAt(r))||s>57){p=(46===s?i+t.slice(r+1):t.slice(r))+p,t=t.slice(0,r);break}}m&&!g&&(t=e(t,1/0));var E=o.length+t.length+p.length,C=E >1)+o+t+p+C.slice(E);break;default:t=C+o+t+p}return a(t)}return y=void 0===y?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),o(_,"format"),_.toString=function(){return t+""},_}function u(t,e){var r=h(((t=Yo(t)).type="f",t)),n=3*Math.max(-8,Math.min(8,Math.floor(Uo(e)/3))),i=Math.pow(10,-n),a=nl[8+n/3];return function(t){return r(i*t)+a}}return o(h,"newFormat"),o(u,"formatPrefix"),{format:h,formatPrefix:u}}function al(t){return Jo=il(t),tl=Jo.format,el=Jo.formatPrefix,Jo}function sl(t){return Math.max(0,-Uo(Math.abs(t)))}function ol(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Uo(e)/3)))-Uo(Math.abs(t)))}function ll(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Uo(e)-Uo(t))+1}function cl(t,e,r,n){var i,a=Nn(t,e,r);switch((n=Yo(null==n?",f":n)).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=n.precision||isNaN(i=ol(a,s))||(n.precision=i),el(n,s);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=ll(a,Math.max(Math.abs(t),Math.abs(e))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=sl(a))||(n.precision=i-2*("%"===n.type))}return tl(n)}function hl(t){var e=t.domain;return t.ticks=function(t){var r=e();return An(r[0],r[r.length-1],null==t?10:t)},t.tickFormat=function(t,r){var n=e();return cl(n[0],n[n.length-1],null==t?10:t,r)},t.nice=function(r){null==r&&(r=10);var n,i,a=e(),s=0,o=a.length-1,l=a[s],c=a[o],h=10;for(c 0;){if((i=Ln(l,c,r))===n)return a[s]=l,a[o]=c,e(a);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}n=i}return t},t}function ul(){var t=$o();return t.copy=function(){return Po(t,ul())},Eo.apply(t,arguments),hl(t)}o(il,"default"),al({thousands:",",grouping:[3],currency:["$",""]}),o(al,"defaultLocale"),o(sl,"default"),o(ol,"default"),o(ll,"default"),o(cl,"tickFormat"),o(hl,"linearish"),o(ul,"linear");var dl=new Date,pl=new Date;function gl(t,e,r,n){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return o(i,"interval"),i.floor=e=>(t(e=new Date(+e)),e),i.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),i.round=t=>{const e=i(t),r=i.ceil(t);return t-e (e(t=new Date(+t),null==r?1:Math.floor(r)),t),i.range=(r,n,a)=>{const s=[];if(r=i.ceil(r),a=null==a?1:Math.floor(a),!(r 0))return s;let o;do{s.push(o=new Date(+r)),e(r,a),t(r)}while(o gl((e=>{if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)}),((t,n)=>{if(t>=t)if(n<0)for(;++n<=0;)for(;e(t,-1),!r(t););else for(;--n>=0;)for(;e(t,1),!r(t););})),r&&(i.count=(e,n)=>(dl.setTime(+e),pl.setTime(+n),t(dl),t(pl),Math.floor(r(dl,pl))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(n?e=>n(e)%t==0:e=>i.count(0,e)%t==0):i:null)),i}o(gl,"timeInterval");var fl=gl((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));fl.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?gl((e=>{e.setTime(Math.floor(e/t)*t)}),((e,r)=>{e.setTime(+e+r*t)}),((e,r)=>(r-e)/t)):fl:null),fl.range;var ml=1e3,yl=6e4,vl=36e5,xl=864e5,bl=6048e5,wl=2592e6,kl=31536e6,Tl=gl((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*ml)}),((t,e)=>(e-t)/ml),(t=>t.getUTCSeconds()));Tl.range;var _l=gl((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ml)}),((t,e)=>{t.setTime(+t+e*yl)}),((t,e)=>(e-t)/yl),(t=>t.getMinutes()));_l.range;var El=gl((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*yl)}),((t,e)=>(e-t)/yl),(t=>t.getUTCMinutes()));El.range;var Cl=gl((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ml-t.getMinutes()*yl)}),((t,e)=>{t.setTime(+t+e*vl)}),((t,e)=>(e-t)/vl),(t=>t.getHours()));Cl.range;var Sl=gl((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*vl)}),((t,e)=>(e-t)/vl),(t=>t.getUTCHours()));Sl.range;var Al=gl((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*yl)/xl),(t=>t.getDate()-1));Al.range;var Ll=gl((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/xl),(t=>t.getUTCDate()-1));Ll.range;var Nl=gl((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/xl),(t=>Math.floor(t/xl)));function Il(t){return gl((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*yl)/bl))}Nl.range,o(Il,"timeWeekday");var Rl=Il(0),Ml=Il(1),Dl=Il(2),Ol=Il(3),Pl=Il(4),Bl=Il(5),$l=Il(6);function Fl(t){return gl((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/bl))}Rl.range,Ml.range,Dl.range,Ol.range,Pl.range,Bl.range,$l.range,o(Fl,"utcWeekday");var zl=Fl(0),Ul=Fl(1),Gl=Fl(2),ql=Fl(3),jl=Fl(4),Wl=Fl(5),Yl=Fl(6);zl.range,Ul.range,Gl.range,ql.range,jl.range,Wl.range,Yl.range;var Hl=gl((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth()));Hl.range;var Vl=gl((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()));Vl.range;var Xl=gl((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));Xl.every=t=>isFinite(t=Math.floor(t))&&t>0?gl((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,r)=>{e.setFullYear(e.getFullYear()+r*t)})):null,Xl.range;var Kl=gl((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));function Zl(t,e,r,n,i,a){const s=[[Tl,1,ml],[Tl,5,5e3],[Tl,15,15e3],[Tl,30,3e4],[a,1,yl],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,vl],[i,3,108e5],[i,6,216e5],[i,12,432e5],[n,1,xl],[n,2,1728e5],[r,1,bl],[e,1,wl],[e,3,7776e6],[t,1,kl]];function l(t,e,r){const n=e t)).right(s,i);if(a===s.length)return t.every(Nn(e/kl,r/kl,n));if(0===a)return fl.every(Math.max(Nn(e,r,n),1));const[o,l]=s[i/s[a-1][2] isFinite(t=Math.floor(t))&&t>0?gl((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null,Kl.range,o(Zl,"ticker"),Zl(Kl,Vl,zl,Nl,Sl,El);var[Ql,Jl]=Zl(Xl,Hl,Rl,Al,Cl,_l);function tc(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ec(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function rc(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function nc(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,s=t.shortDays,l=t.months,c=t.shortMonths,h=dc(i),u=pc(i),d=dc(a),p=pc(a),g=dc(s),f=pc(s),m=dc(l),y=pc(l),v=dc(c),x=pc(c),b={a:D,A:O,b:P,B:B,c:null,d:Dc,e:Dc,f:Fc,g:Kc,G:Qc,H:Oc,I:Pc,j:Bc,L:$c,m:zc,M:Uc,p:$,q:F,Q:wh,s:kh,S:Gc,u:qc,U:jc,V:Yc,w:Hc,W:Vc,x:null,X:null,y:Xc,Y:Zc,Z:Jc,"%":bh},w={a:z,A:U,b:G,B:q,c:null,d:th,e:th,f:ah,g:mh,G:vh,H:eh,I:rh,j:nh,L:ih,m:sh,M:oh,p:j,q:W,Q:wh,s:kh,S:lh,u:ch,U:hh,V:dh,w:ph,W:gh,x:null,X:null,y:fh,Y:yh,Z:xh,"%":bh},k={a:S,A:A,b:L,B:N,c:I,d:_c,e:_c,f:Nc,g:bc,G:xc,H:Cc,I:Cc,j:Ec,L:Lc,m:Tc,M:Sc,p:C,q:kc,Q:Rc,s:Mc,S:Ac,u:fc,U:mc,V:yc,w:gc,W:vc,x:R,X:M,y:bc,Y:xc,Z:wc,"%":Ic};function T(t,e){return function(r){var n,i,a,s=[],o=-1,l=0,c=t.length;for(r instanceof Date||(r=new Date(+r));++o53)return null;"w"in a||(a.w=1),"Z"in a?(i=(n=ec(rc(a.y,0,1))).getUTCDay(),n=i>4||0===i?Ul.ceil(n):Ul(n),n=Ll.offset(n,7*(a.V-1)),a.y=n.getUTCFullYear(),a.m=n.getUTCMonth(),a.d=n.getUTCDate()+(a.w+6)%7):(i=(n=tc(rc(a.y,0,1))).getDay(),n=i>4||0===i?Ml.ceil(n):Ml(n),n=Al.offset(n,7*(a.V-1)),a.y=n.getFullYear(),a.m=n.getMonth(),a.d=n.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?ec(rc(a.y,0,1)).getUTCDay():tc(rc(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,ec(a)):tc(a)}}function E(t,e,r,n){for(var i,a,s=0,o=e.length,l=r.length;s =l)return-1;if(37===(i=e.charCodeAt(s++))){if(i=e.charAt(s++),!(a=k[i in sc?e.charAt(s++):i])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}function C(t,e,r){var n=h.exec(e.slice(r));return n?(t.p=u.get(n[0].toLowerCase()),r+n[0].length):-1}function S(t,e,r){var n=g.exec(e.slice(r));return n?(t.w=f.get(n[0].toLowerCase()),r+n[0].length):-1}function A(t,e,r){var n=d.exec(e.slice(r));return n?(t.w=p.get(n[0].toLowerCase()),r+n[0].length):-1}function L(t,e,r){var n=v.exec(e.slice(r));return n?(t.m=x.get(n[0].toLowerCase()),r+n[0].length):-1}function N(t,e,r){var n=m.exec(e.slice(r));return n?(t.m=y.get(n[0].toLowerCase()),r+n[0].length):-1}function I(t,r,n){return E(t,e,r,n)}function R(t,e,n){return E(t,r,e,n)}function M(t,e,r){return E(t,n,e,r)}function D(t){return s[t.getDay()]}function O(t){return a[t.getDay()]}function P(t){return c[t.getMonth()]}function B(t){return l[t.getMonth()]}function $(t){return i[+(t.getHours()>=12)]}function F(t){return 1+~~(t.getMonth()/3)}function z(t){return s[t.getUTCDay()]}function U(t){return a[t.getUTCDay()]}function G(t){return c[t.getUTCMonth()]}function q(t){return l[t.getUTCMonth()]}function j(t){return i[+(t.getUTCHours()>=12)]}function W(t){return 1+~~(t.getUTCMonth()/3)}return b.x=T(r,b),b.X=T(n,b),b.c=T(e,b),w.x=T(r,w),w.X=T(n,w),w.c=T(e,w),o(T,"newFormat"),o(_,"newParse"),o(E,"parseSpecifier"),o(C,"parsePeriod"),o(S,"parseShortWeekday"),o(A,"parseWeekday"),o(L,"parseShortMonth"),o(N,"parseMonth"),o(I,"parseLocaleDateTime"),o(R,"parseLocaleDate"),o(M,"parseLocaleTime"),o(D,"formatShortWeekday"),o(O,"formatWeekday"),o(P,"formatShortMonth"),o(B,"formatMonth"),o($,"formatPeriod"),o(F,"formatQuarter"),o(z,"formatUTCShortWeekday"),o(U,"formatUTCWeekday"),o(G,"formatUTCShortMonth"),o(q,"formatUTCMonth"),o(j,"formatUTCPeriod"),o(W,"formatUTCQuarter"),{format:o((function(t){var e=T(t+="",b);return e.toString=function(){return t},e}),"format"),parse:o((function(t){var e=_(t+="",!1);return e.toString=function(){return t},e}),"parse"),utcFormat:o((function(t){var e=T(t+="",w);return e.toString=function(){return t},e}),"utcFormat"),utcParse:o((function(t){var e=_(t+="",!0);return e.toString=function(){return t},e}),"utcParse")}}o(tc,"localDate"),o(ec,"utcDate"),o(rc,"newDate"),o(nc,"formatLocale");var ic,ac,sc={"-":"",_:" ",0:"0"},oc=/^\s*\d+/,lc=/^%/,cc=/[\\^$*+?|[\]().{}]/g;function hc(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a [t.toLowerCase(),e])))}function gc(t,e,r){var n=oc.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function fc(t,e,r){var n=oc.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function mc(t,e,r){var n=oc.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function yc(t,e,r){var n=oc.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function vc(t,e,r){var n=oc.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function xc(t,e,r){var n=oc.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function bc(t,e,r){var n=oc.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function wc(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function kc(t,e,r){var n=oc.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function Tc(t,e,r){var n=oc.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function _c(t,e,r){var n=oc.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function Ec(t,e,r){var n=oc.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function Cc(t,e,r){var n=oc.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function Sc(t,e,r){var n=oc.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function Ac(t,e,r){var n=oc.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function Lc(t,e,r){var n=oc.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function Nc(t,e,r){var n=oc.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Ic(t,e,r){var n=lc.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function Rc(t,e,r){var n=oc.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function Mc(t,e,r){var n=oc.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function Dc(t,e){return hc(t.getDate(),e,2)}function Oc(t,e){return hc(t.getHours(),e,2)}function Pc(t,e){return hc(t.getHours()%12||12,e,2)}function Bc(t,e){return hc(1+Al.count(Xl(t),t),e,3)}function $c(t,e){return hc(t.getMilliseconds(),e,3)}function Fc(t,e){return $c(t,e)+"000"}function zc(t,e){return hc(t.getMonth()+1,e,2)}function Uc(t,e){return hc(t.getMinutes(),e,2)}function Gc(t,e){return hc(t.getSeconds(),e,2)}function qc(t){var e=t.getDay();return 0===e?7:e}function jc(t,e){return hc(Rl.count(Xl(t)-1,t),e,2)}function Wc(t){var e=t.getDay();return e>=4||0===e?Pl(t):Pl.ceil(t)}function Yc(t,e){return t=Wc(t),hc(Pl.count(Xl(t),t)+(4===Xl(t).getDay()),e,2)}function Hc(t){return t.getDay()}function Vc(t,e){return hc(Ml.count(Xl(t)-1,t),e,2)}function Xc(t,e){return hc(t.getFullYear()%100,e,2)}function Kc(t,e){return hc((t=Wc(t)).getFullYear()%100,e,2)}function Zc(t,e){return hc(t.getFullYear()%1e4,e,4)}function Qc(t,e){var r=t.getDay();return hc((t=r>=4||0===r?Pl(t):Pl.ceil(t)).getFullYear()%1e4,e,4)}function Jc(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+hc(e/60|0,"0",2)+hc(e%60,"0",2)}function th(t,e){return hc(t.getUTCDate(),e,2)}function eh(t,e){return hc(t.getUTCHours(),e,2)}function rh(t,e){return hc(t.getUTCHours()%12||12,e,2)}function nh(t,e){return hc(1+Ll.count(Kl(t),t),e,3)}function ih(t,e){return hc(t.getUTCMilliseconds(),e,3)}function ah(t,e){return ih(t,e)+"000"}function sh(t,e){return hc(t.getUTCMonth()+1,e,2)}function oh(t,e){return hc(t.getUTCMinutes(),e,2)}function lh(t,e){return hc(t.getUTCSeconds(),e,2)}function ch(t){var e=t.getUTCDay();return 0===e?7:e}function hh(t,e){return hc(zl.count(Kl(t)-1,t),e,2)}function uh(t){var e=t.getUTCDay();return e>=4||0===e?jl(t):jl.ceil(t)}function dh(t,e){return t=uh(t),hc(jl.count(Kl(t),t)+(4===Kl(t).getUTCDay()),e,2)}function ph(t){return t.getUTCDay()}function gh(t,e){return hc(Ul.count(Kl(t)-1,t),e,2)}function fh(t,e){return hc(t.getUTCFullYear()%100,e,2)}function mh(t,e){return hc((t=uh(t)).getUTCFullYear()%100,e,2)}function yh(t,e){return hc(t.getUTCFullYear()%1e4,e,4)}function vh(t,e){var r=t.getUTCDay();return hc((t=r>=4||0===r?jl(t):jl.ceil(t)).getUTCFullYear()%1e4,e,4)}function xh(){return"+0000"}function bh(){return"%"}function wh(t){return+t}function kh(t){return Math.floor(+t/1e3)}function Th(t){return ic=nc(t),ac=ic.format,ic.parse,ic.utcFormat,ic.utcParse,ic}function _h(t,e){var r,n=0,i=(t=t.slice()).length-1,a=t[n],s=t[i];return s1?0:t<-1?Uh:Math.acos(t)}function Wh(t){return t>=1?Gh:t<=-1?-Gh:Math.asin(t)}o(jh,"acos"),o(Wh,"asin");var Yh=Math.PI,Hh=2*Yh,Vh=1e-6,Xh=Hh-Vh;function Kh(t){this._+=t[0];for(let e=1,r=t.length;e =0))throw new Error(`invalid digits: ${t}`);if(e>15)return Kh;const r=10**e;return function(t){this._+=t[0];for(let e=1,n=t.length;e Vh)if(Math.abs(h*o-l*c)>Vh&&i){let d=r-a,p=n-s,g=o*o+l*l,f=d*d+p*p,m=Math.sqrt(g),y=Math.sqrt(u),v=i*Math.tan((Yh-Math.acos((g+u-f)/(2*m*y)))/2),x=v/y,b=v/m;Math.abs(x-1)>Vh&&this._append`L${t+x*c},${e+x*h}`,this._append`A${i},${i},0,0,${+(h*d>c*p)},${this._x1=t+b*o},${this._y1=e+b*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,r,n,i,a){if(t=+t,e=+e,a=!!a,(r=+r)<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(n),o=r*Math.sin(n),l=t+s,c=e+o,h=1^a,u=a?n-i:i-n;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Vh||Math.abs(this._y1-c)>Vh)&&this._append`L${l},${c}`,r&&(u<0&&(u=u%Hh+Hh),u>Xh?this._append`A${r},${r},0,1,${h},${t-s},${e-o}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:u>Vh&&this._append`A${r},${r},0,${+(u>=Yh)},${h},${this._x1=t+r*Math.cos(i)},${this._y1=e+r*Math.sin(i)}`)}rect(t,e,r,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+n}h${-r}Z`}toString(){return this._}};function Jh(){return new Qh}function tu(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{const t=Math.floor(r);if(!(t>=0))throw new RangeError(`invalid digits: ${r}`);e=t}return t},()=>new Qh(e)}function eu(t){return t.innerRadius}function ru(t){return t.outerRadius}function nu(t){return t.startAngle}function iu(t){return t.endAngle}function au(t){return t&&t.padAngle}function su(t,e,r,n,i,a,s,o){var l=r-t,c=n-e,h=s-i,u=o-a,d=u*l-h*c;if(!(d*d N*N+I*I&&(_=C,E=S),{cx:_,cy:E,x01:-h,y01:-u,x11:_*(i/w-1),y11:E*(i/w-1)}}function lu(){var t=eu,e=ru,r=Rh(0),n=null,i=nu,a=iu,s=au,l=null,c=tu(h);function h(){var o,h,u=+t.apply(this,arguments),d=+e.apply(this,arguments),p=i.apply(this,arguments)-Gh,g=a.apply(this,arguments)-Gh,f=Mh(g-p),m=g>p;if(l||(l=o=c()),dzh)if(f>qh-zh)l.moveTo(d*Oh(p),d*$h(p)),l.arc(0,0,d,p,g,!m),u>zh&&(l.moveTo(u*Oh(g),u*$h(g)),l.arc(0,0,u,g,p,m));else{var y,v,x=p,b=g,w=p,k=g,T=f,_=f,E=s.apply(this,arguments)/2,C=E>zh&&(n?+n.apply(this,arguments):Fh(u*u+d*d)),S=Bh(Mh(d-u)/2,+r.apply(this,arguments)),A=S,L=S;if(C>zh){var N=Wh(C/u*$h(E)),I=Wh(C/d*$h(E));(T-=2*N)>zh?(w+=N*=m?1:-1,k-=N):(T=0,w=k=(p+g)/2),(_-=2*I)>zh?(x+=I*=m?1:-1,b-=I):(_=0,x=b=(p+g)/2)}var R=d*Oh(x),M=d*$h(x),D=u*Oh(k),O=u*$h(k);if(S>zh){var P,B=d*Oh(b),$=d*$h(b),F=u*Oh(w),z=u*$h(w);if(f zh?L>zh?(y=ou(F,z,R,M,d,L,m),v=ou(B,$,D,O,d,L,m),l.moveTo(y.cx+y.x01,y.cy+y.y01),L zh&&T>zh?A>zh?(y=ou(D,O,B,$,u,-A,m),v=ou(R,M,F,z,u,-A,m),l.lineTo(y.cx+y.x01,y.cy+y.y01),At?1:e>=t?0:NaN}function mu(t){return t}function yu(){var t=mu,e=fu,r=null,n=Rh(0),i=Rh(qh),a=Rh(0);function s(s){var o,l,c,h,u,d=(s=uu(s)).length,p=0,g=new Array(d),f=new Array(d),m=+n.apply(this,arguments),y=Math.min(qh,Math.max(-qh,i.apply(this,arguments)-m)),v=Math.min(Math.abs(y)/d,a.apply(this,arguments)),x=v*(y<0?-1:1);for(o=0;o0&&(p+=u);for(null!=e?g.sort((function(t,r){return e(f[t],f[r])})):null!=r&&g.sort((function(t,e){return r(s[t],s[e])})),o=0,c=p?(y-d*x)/p:0;o 0?u*c:0)+x,f[l]={data:s[l],index:o,value:u,startAngle:m,endAngle:h,padAngle:v};return f}return o(s,"pie"),s.value=function(e){return arguments.length?(t="function"==typeof e?e:Rh(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,r=null,s):e},s.sort=function(t){return arguments.length?(r=t,e=null,s):r},s.startAngle=function(t){return arguments.length?(n="function"==typeof t?t:Rh(+t),s):n},s.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Rh(+t),s):i},s.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Rh(+t),s):a},s}o(Jh,"path"),Jh.prototype=Qh.prototype,o(tu,"withPath"),o(eu,"arcInnerRadius"),o(ru,"arcOuterRadius"),o(nu,"arcStartAngle"),o(iu,"arcEndAngle"),o(au,"arcPadAngle"),o(su,"intersect"),o(ou,"cornerTangents"),o(lu,"default"),o(cu,"Linear"),cu.prototype={areaStart:o((function(){this._line=0}),"areaStart"),areaEnd:o((function(){this._line=NaN}),"areaEnd"),lineStart:o((function(){this._point=0}),"lineStart"),lineEnd:o((function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}),"lineEnd"),point:o((function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}),"point")},o(hu,"default"),o(uu,"default"),o(du,"x"),o(pu,"y"),o(gu,"default"),o(fu,"default"),o(mu,"default"),o(yu,"default");var vu=class{static{o(this,"Bump")}constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}};function xu(t){return new vu(t,!0)}function bu(t){return new vu(t,!1)}function wu(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function ku(t){this._context=t}function Tu(t){return new ku(t)}function _u(){}function Eu(t){this._context=t}function Cu(t){return new Eu(t)}function Su(t){this._context=t}function Au(t){return new Su(t)}function Lu(t,e){this._basis=new ku(t),this._beta=e}o(xu,"bumpX"),o(bu,"bumpY"),o(wu,"point"),o(ku,"Basis"),ku.prototype={areaStart:o((function(){this._line=0}),"areaStart"),areaEnd:o((function(){this._line=NaN}),"areaEnd"),lineStart:o((function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0}),"lineStart"),lineEnd:o((function(){switch(this._point){case 3:wu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}),"lineEnd"),point:o((function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,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:wu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}),"point")},o(Tu,"default"),o(_u,"default"),o(Eu,"BasisClosed"),Eu.prototype={areaStart:_u,areaEnd:_u,lineStart:o((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}),"lineStart"),lineEnd:o((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)}}),"lineEnd"),point:o((function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:wu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}),"point")},o(Cu,"default"),o(Su,"BasisOpen"),Su.prototype={areaStart:o((function(){this._line=0}),"areaStart"),areaEnd:o((function(){this._line=NaN}),"areaEnd"),lineStart:o((function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0}),"lineStart"),lineEnd:o((function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line}),"lineEnd"),point:o((function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:wu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}),"point")},o(Au,"default"),o(Lu,"Bundle"),Lu.prototype={lineStart:o((function(){this._x=[],this._y=[],this._basis.lineStart()}),"lineStart"),lineEnd:o((function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n,i=t[0],a=e[0],s=t[r]-i,o=e[r]-a,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+n*s),this._beta*e[l]+(1-this._beta)*(a+n*o));this._x=this._y=null,this._basis.lineEnd()}),"lineEnd"),point:o((function(t,e){this._x.push(+t),this._y.push(+e)}),"point")};var Nu=o((function t(e){function r(t){return 1===e?new ku(t):new Lu(t,e)}return o(r,"bundle"),r.beta=function(e){return t(+e)},r}),"custom")(.85);function Iu(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function Ru(t,e){this._context=t,this._k=(1-e)/6}o(Iu,"point"),o(Ru,"Cardinal"),Ru.prototype={areaStart:o((function(){this._line=0}),"areaStart"),areaEnd:o((function(){this._line=NaN}),"areaEnd"),lineStart:o((function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0}),"lineStart"),lineEnd:o((function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Iu(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}),"lineEnd"),point:o((function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Iu(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}),"point")};var Mu=o((function t(e){function r(t){return new Ru(t,e)}return o(r,"cardinal"),r.tension=function(e){return t(+e)},r}),"custom")(0);function Du(t,e){this._context=t,this._k=(1-e)/6}o(Du,"CardinalClosed"),Du.prototype={areaStart:_u,areaEnd:_u,lineStart:o((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}),"lineStart"),lineEnd:o((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)}}),"lineEnd"),point:o((function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Iu(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}),"point")};var Ou=o((function t(e){function r(t){return new Du(t,e)}return o(r,"cardinal"),r.tension=function(e){return t(+e)},r}),"custom")(0);function Pu(t,e){this._context=t,this._k=(1-e)/6}o(Pu,"CardinalOpen"),Pu.prototype={areaStart:o((function(){this._line=0}),"areaStart"),areaEnd:o((function(){this._line=NaN}),"areaEnd"),lineStart:o((function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0}),"lineStart"),lineEnd:o((function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line}),"lineEnd"),point:o((function(t,e){switch(t=+t,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:Iu(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}),"point")};var Bu=o((function t(e){function r(t){return new Pu(t,e)}return o(r,"cardinal"),r.tension=function(e){return t(+e)},r}),"custom")(0);function $u(t,e,r){var n=t._x1,i=t._y1,a=t._x2,s=t._y2;if(t._l01_a>zh){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>zh){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/h,s=(s*c+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(n,i,a,s,t._x2,t._y2)}function Fu(t,e){this._context=t,this._alpha=e}o($u,"point"),o(Fu,"CatmullRom"),Fu.prototype={areaStart:o((function(){this._line=0}),"areaStart"),areaEnd:o((function(){this._line=NaN}),"areaEnd"),lineStart:o((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}),"lineStart"),lineEnd:o((function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}),"lineEnd"),point:o((function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:$u(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}),"point")};var zu=o((function t(e){function r(t){return e?new Fu(t,e):new Ru(t,0)}return o(r,"catmullRom"),r.alpha=function(e){return t(+e)},r}),"custom")(.5);function Uu(t,e){this._context=t,this._alpha=e}o(Uu,"CatmullRomClosed"),Uu.prototype={areaStart:_u,areaEnd:_u,lineStart:o((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}),"lineStart"),lineEnd:o((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)}}),"lineEnd"),point:o((function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:$u(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}),"point")};var Gu=o((function t(e){function r(t){return e?new Uu(t,e):new Du(t,0)}return o(r,"catmullRom"),r.alpha=function(e){return t(+e)},r}),"custom")(.5);function qu(t,e){this._context=t,this._alpha=e}o(qu,"CatmullRomOpen"),qu.prototype={areaStart:o((function(){this._line=0}),"areaStart"),areaEnd:o((function(){this._line=NaN}),"areaEnd"),lineStart:o((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}),"lineStart"),lineEnd:o((function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line}),"lineEnd"),point:o((function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:$u(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}),"point")};var ju=o((function t(e){function r(t){return e?new qu(t,e):new Pu(t,0)}return o(r,"catmullRom"),r.alpha=function(e){return t(+e)},r}),"custom")(.5);function Wu(t){this._context=t}function Yu(t){return new Wu(t)}function Hu(t){return t<0?-1:1}function Vu(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),s=(r-t._y1)/(i||n<0&&-0),o=(a*i+s*n)/(n+i);return(Hu(a)+Hu(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function Xu(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Ku(t,e,r){var n=t._x0,i=t._y0,a=t._x1,s=t._y1,o=(a-n)/3;t._context.bezierCurveTo(n+o,i+o*e,a-o,s-o*r,a,s)}function Zu(t){this._context=t}function Qu(t){this._context=new Ju(t)}function Ju(t){this._context=t}function td(t){return new Zu(t)}function ed(t){return new Qu(t)}function rd(t){this._context=t}function nd(t){var e,r,n=t.length-1,i=new Array(n),a=new Array(n),s=new Array(n);for(i[0]=0,a[0]=2,s[0]=t[0]+2*t[1],e=1;e =0;--e)i[e]=(s[e]-i[e+1])/a[e];for(a[n-1]=(t[n]+i[n-1])/2,e=0;e =0&&(this._t=1-this._t,this._line=1-this._line)}),"lineEnd"),point:o((function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}),"point")},o(sd,"default"),o(od,"stepBefore"),o(ld,"stepAfter");var cd={value:o((()=>{}),"value")};function hd(){for(var t,e=0,r=arguments.length,n={};e =0&&(r=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}}))}function pd(t,e){for(var r,n=0,i=t.length;n0)for(var r,n,i=new Array(r),a=0;a =0&&e._call.call(void 0,t),e=e._next;--vd}function Id(){kd=(wd=_d.now())+Td,vd=xd=0;try{Nd()}finally{vd=0,Md(),kd=0}}function Rd(){var t=_d.now(),e=t-wd;e>1e3&&(Td-=e,wd=t)}function Md(){for(var t,e,r=fd,n=1/0;r;)r._call?(n>r._time&&(n=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:fd=e);md=t,Dd(n)}function Dd(t){vd||(xd&&(xd=clearTimeout(xd)),t-kd>24?(t<1/0&&(xd=setTimeout(Id,t-_d.now()-Td)),bd&&(bd=clearInterval(bd))):(bd||(wd=_d.now(),bd=setInterval(Rd,1e3)),vd=1,Ed(Id)))}function Od(t,e,r){var n=new Ad;return e=null==e?0:+e,n.restart((r=>{n.stop(),t(r+e)}),e,r),n}o(Cd,"now"),o(Sd,"clearNow"),o(Ad,"Timer"),Ad.prototype=Ld.prototype={constructor:Ad,restart:o((function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?Cd():+r)+(null==e?0:+e),this._next||md===this||(md?md._next=this:fd=this,md=this),this._call=t,this._time=r,Dd()}),"restart"),stop:o((function(){this._call&&(this._call=null,this._time=1/0,Dd())}),"stop")},o(Ld,"timer"),o(Nd,"timerFlush"),o(Id,"wake"),o(Rd,"poke"),o(Md,"nap"),o(Dd,"sleep"),o(Od,"default");var Pd=yd("start","end","cancel","interrupt"),Bd=[];function $d(t,e,r,n,i,a){var s=t.__transition;if(s){if(r in s)return}else t.__transition={};Gd(t,r,{name:e,index:n,group:i,on:Pd,tween:Bd,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Fd(t,e){var r=Ud(t,e);if(r.state>0)throw new Error("too late; already scheduled");return r}function zd(t,e){var r=Ud(t,e);if(r.state>3)throw new Error("too late; already running");return r}function Ud(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function Gd(t,e,r){var n,i=t.__transition;function a(t){r.state=1,r.timer.restart(s,r.delay,r.time),r.delay<=t&&s(t-r.delay)}function s(a){var o,h,u,d;if(1!==r.state)return c();for(o in i)if((d=i[o]).name===r.name){if(3===d.state)return Od(s);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[o]):+o 2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(n?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete a[i]):s=!1;s&&delete t.__transition}}function jd(t){return this.each((function(){qd(this,t)}))}function Wd(t,e){var r,n;return function(){var i=zd(this,t),a=i.tween;if(a!==r)for(var s=0,o=(n=r=a).length;s =0&&(t=t.slice(0,e)),!t||"start"===t}))}function wp(t,e,r){var n,i,a=bp(e)?Fd:zd;return function(){var s=a(this,t),o=s.on;o!==n&&(i=(n=o).copy()).on(e,r),s.on=i}}function kp(t,e){var r=this._id;return arguments.length<2?Ud(this.node(),r).on.on(t):this.each(wp(r,t,e))}function Tp(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function _p(){return this.on("end.remove",Tp(this._id))}function Ep(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=qn(t));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s{const{securityLevel:e}=Qr();let r=Ga("body");if("sandbox"===e){const e=Ga(`#i${t}`);r=Ga((e.node()?.contentDocument??document).body)}return r.select(`#${t}`)}),"selectSvgElement");function sg(t){return null==t}function og(t){return"object"==typeof t&&null!==t}function lg(t){return Array.isArray(t)?t:sg(t)?[]:[t]}function cg(t,e){var r,n,i,a;if(e)for(r=0,n=(a=Object.keys(e)).length;r o&&(e=n-o+(a=" ... ").length),r-n>o&&(r=n+o-(s=" ...").length),{str:a+t.slice(e,r).replace(/\t/g,"→")+s,pos:n-e+a.length}}function yg(t,e){return dg.repeat(" ",e-t.length)+t}function vg(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,n=/\r?\n|\r|\0/g,i=[0],a=[],s=-1;r=n.exec(t.buffer);)a.push(r.index),i.push(r.index+r[0].length),t.position<=r.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);var o,l,c="",h=Math.min(t.line+e.linesAfter,a.length).toString().length,u=e.maxLength-(e.indent+h+3);for(o=1;o<=e.linesBefore&&!(s-o<0);o++)l=mg(t.buffer,i[s-o],a[s-o],t.position-(i[s]-i[s-o]),u),c=dg.repeat(" ",e.indent)+yg((t.line-o+1).toString(),h)+" | "+l.str+"\n"+c;for(l=mg(t.buffer,i[s],a[s],t.position,u),c+=dg.repeat(" ",e.indent)+yg((t.line+1).toString(),h)+" | "+l.str+"\n",c+=dg.repeat("-",e.indent+h+3+l.pos)+"^\n",o=1;o<=e.linesAfter&&!(s+o>=a.length);o++)l=mg(t.buffer,i[s+o],a[s+o],t.position-(i[s]-i[s+o]),u),c+=dg.repeat(" ",e.indent)+yg((t.line+o+1).toString(),h)+" | "+l.str+"\n";return c.replace(/\n$/,"")}o(mg,"getLine"),o(yg,"padStart"),o(vg,"makeSnippet");var xg=vg,bg=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],wg=["scalar","sequence","mapping"];function kg(t){var e={};return null!==t&&Object.keys(t).forEach((function(r){t[r].forEach((function(t){e[String(t)]=r}))})),e}function Tg(t,e){if(e=e||{},Object.keys(e).forEach((function(e){if(-1===bg.indexOf(e))throw new fg('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')})),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=kg(e.styleAliases||null),-1===wg.indexOf(this.kind))throw new fg('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}o(kg,"compileStyleAliases"),o(Tg,"Type$1");var _g=Tg;function Eg(t,e){var r=[];return t[e].forEach((function(t){var e=r.length;r.forEach((function(r,n){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=n)})),r[e]=t})),r}function Cg(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for(o(n,"collectType"),t=0,e=arguments.length;t =0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)}),"binary"),octal:o((function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)}),"octal"),decimal:o((function(t){return t.toString(10)}),"decimal"),hexadecimal:o((function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}),"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Vg=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Xg(t){return null!==t&&!(!Vg.test(t)||"_"===t[t.length-1])}function Kg(t){var e,r;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}o(Xg,"resolveYamlFloat"),o(Kg,"constructYamlFloat");var Zg=/^[-+]?[0-9]+e/;function Qg(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(dg.isNegativeZero(t))return"-0.0";return r=t.toString(10),Zg.test(r)?r.replace("e",".e"):r}function Jg(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||dg.isNegativeZero(t))}o(Qg,"representYamlFloat"),o(Jg,"isFloat");var tf=new _g("tag:yaml.org,2002:float",{kind:"scalar",resolve:Xg,construct:Kg,predicate:Jg,represent:Qg,defaultStyle:"lowercase"}),ef=Rg.extend({implicit:[Pg,zg,Hg,tf]}),rf=ef,nf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),af=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 sf(t){return null!==t&&(null!==nf.exec(t)||null!==af.exec(t))}function of(t){var e,r,n,i,a,s,o,l,c=0,h=null;if(null===(e=nf.exec(t))&&(e=af.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(a=+e[4],s=+e[5],o=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(h=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(h=-h)),l=new Date(Date.UTC(r,n,i,a,s,o,c)),h&&l.setTime(l.getTime()-h),l}function lf(t){return t.toISOString()}o(sf,"resolveYamlTimestamp"),o(of,"constructYamlTimestamp"),o(lf,"representYamlTimestamp");var cf=new _g("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:sf,construct:of,instanceOf:Date,represent:lf});function hf(t){return"<<"===t||null===t}o(hf,"resolveYamlMerge");var uf=new _g("tag:yaml.org,2002:merge",{kind:"scalar",resolve:hf}),df="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function pf(t){if(null===t)return!1;var e,r,n=0,i=t.length,a=df;for(r=0;r64)){if(e<0)return!1;n+=6}return n%8==0}function gf(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,a=df,s=0,o=[];for(e=0;e>16&255),o.push(s>>8&255),o.push(255&s)),s=s<<6|a.indexOf(n.charAt(e));return 0===(r=i%4*6)?(o.push(s>>16&255),o.push(s>>8&255),o.push(255&s)):18===r?(o.push(s>>10&255),o.push(s>>2&255)):12===r&&o.push(s>>4&255),new Uint8Array(o)}function ff(t){var e,r,n="",i=0,a=t.length,s=df;for(e=0;e>18&63],n+=s[i>>12&63],n+=s[i>>6&63],n+=s[63&i]),i=(i<<8)+t[e];return 0===(r=a%3)?(n+=s[i>>18&63],n+=s[i>>12&63],n+=s[i>>6&63],n+=s[63&i]):2===r?(n+=s[i>>10&63],n+=s[i>>4&63],n+=s[i<<2&63],n+=s[64]):1===r&&(n+=s[i>>2&63],n+=s[i<<4&63],n+=s[64],n+=s[64]),n}function mf(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}o(pf,"resolveYamlBinary"),o(gf,"constructYamlBinary"),o(ff,"representYamlBinary"),o(mf,"isBinary");var yf=new _g("tag:yaml.org,2002:binary",{kind:"scalar",resolve:pf,construct:gf,predicate:mf,represent:ff}),vf=Object.prototype.hasOwnProperty,xf=Object.prototype.toString;function bf(t){if(null===t)return!0;var e,r,n,i,a,s=[],o=t;for(e=0,r=o.length;e >10),56320+(t-65536&1023))}o($f,"_class"),o(Ff,"is_EOL"),o(zf,"is_WHITE_SPACE"),o(Uf,"is_WS_OR_EOL"),o(Gf,"is_FLOW_INDICATOR"),o(qf,"fromHexCode"),o(jf,"escapedHexLen"),o(Wf,"fromDecimalCode"),o(Yf,"simpleEscapeSequence"),o(Hf,"charFromCodepoint");var Vf,Xf=new Array(256),Kf=new Array(256);for(Vf=0;Vf<256;Vf++)Xf[Vf]=Yf(Vf)?1:0,Kf[Vf]=Yf(Vf);function Zf(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||If,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Qf(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=xg(r),new fg(e,r)}function Jf(t,e){throw Qf(t,e)}function tm(t,e){t.onWarning&&t.onWarning.call(null,Qf(t,e))}o(Zf,"State$1"),o(Qf,"generateError"),o(Jf,"throwError"),o(tm,"throwWarning");var em={YAML:o((function(t,e,r){var n,i,a;null!==t.version&&Jf(t,"duplication of %YAML directive"),1!==r.length&&Jf(t,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&Jf(t,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),a=parseInt(n[2],10),1!==i&&Jf(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&tm(t,"unsupported YAML version of the document")}),"handleYamlDirective"),TAG:o((function(t,e,r){var n,i;2!==r.length&&Jf(t,"TAG directive accepts exactly two arguments"),n=r[0],i=r[1],Pf.test(n)||Jf(t,"ill-formed tag handle (first argument) of the TAG directive"),Rf.call(t.tagMap,n)&&Jf(t,'there is a previously declared suffix for "'+n+'" tag handle'),Bf.test(i)||Jf(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(e){Jf(t,"tag prefix is malformed: "+i)}t.tagMap[n]=i}),"handleTagDirective")};function rm(t,e,r,n){var i,a,s,o;if(e 1&&(t.result+=dg.repeat("\n",e-1))}function cm(t,e,r){var n,i,a,s,o,l,c,h,u=t.kind,d=t.result;if(Uf(h=t.input.charCodeAt(t.position))||Gf(h)||35===h||38===h||42===h||33===h||124===h||62===h||39===h||34===h||37===h||64===h||96===h)return!1;if((63===h||45===h)&&(Uf(n=t.input.charCodeAt(t.position+1))||r&&Gf(n)))return!1;for(t.kind="scalar",t.result="",i=a=t.position,s=!1;0!==h;){if(58===h){if(Uf(n=t.input.charCodeAt(t.position+1))||r&&Gf(n))break}else if(35===h){if(Uf(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&om(t)||r&&Gf(h))break;if(Ff(h)){if(o=t.line,l=t.lineStart,c=t.lineIndent,sm(t,!1,-1),t.lineIndent>=e){s=!0,h=t.input.charCodeAt(t.position);continue}t.position=a,t.line=o,t.lineStart=l,t.lineIndent=c;break}}s&&(rm(t,i,a,!1),lm(t,t.line-o),i=a=t.position,s=!1),zf(h)||(a=t.position+1),h=t.input.charCodeAt(++t.position)}return rm(t,i,a,!1),!!t.result||(t.kind=u,t.result=d,!1)}function hm(t,e){var r,n,i;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(rm(t,n,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;n=t.position,t.position++,i=t.position}else Ff(r)?(rm(t,n,i,!0),lm(t,sm(t,!1,e)),n=i=t.position):t.position===t.lineStart&&om(t)?Jf(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Jf(t,"unexpected end of the stream within a single quoted scalar")}function um(t,e){var r,n,i,a,s,o;if(34!==(o=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;0!==(o=t.input.charCodeAt(t.position));){if(34===o)return rm(t,r,t.position,!0),t.position++,!0;if(92===o){if(rm(t,r,t.position,!0),Ff(o=t.input.charCodeAt(++t.position)))sm(t,!1,e);else if(o<256&&Xf[o])t.result+=Kf[o],t.position++;else if((s=jf(o))>0){for(i=s,a=0;i>0;i--)(s=qf(o=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+s:Jf(t,"expected hexadecimal character");t.result+=Hf(a),t.position++}else Jf(t,"unknown escape sequence");r=n=t.position}else Ff(o)?(rm(t,r,n,!0),lm(t,sm(t,!1,e)),r=n=t.position):t.position===t.lineStart&&om(t)?Jf(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}Jf(t,"unexpected end of the stream within a double quoted scalar")}function dm(t,e){var r,n,i,a,s,o,l,c,h,u,d,p,g=!0,f=t.tag,m=t.anchor,y=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))s=93,c=!1,a=[];else{if(123!==p)return!1;s=125,c=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),p=t.input.charCodeAt(++t.position);0!==p;){if(sm(t,!0,e),(p=t.input.charCodeAt(t.position))===s)return t.position++,t.tag=f,t.anchor=m,t.kind=c?"mapping":"sequence",t.result=a,!0;g?44===p&&Jf(t,"expected the node content, but found ','"):Jf(t,"missed comma between flow collection entries"),d=null,o=l=!1,63===p&&Uf(t.input.charCodeAt(t.position+1))&&(o=l=!0,t.position++,sm(t,!0,e)),r=t.line,n=t.lineStart,i=t.position,xm(t,e,1,!1,!0),u=t.tag,h=t.result,sm(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==p||(o=!0,p=t.input.charCodeAt(++t.position),sm(t,!0,e),xm(t,e,1,!1,!0),d=t.result),c?im(t,a,y,u,h,d,r,n,i):o?a.push(im(t,null,y,u,h,d,r,n,i)):a.push(h),sm(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(g=!0,p=t.input.charCodeAt(++t.position)):g=!1}Jf(t,"unexpected end of the stream within a flow collection")}function pm(t,e){var r,n,i,a,s=1,o=!1,l=!1,c=e,h=0,u=!1;if(124===(a=t.input.charCodeAt(t.position)))n=!1;else{if(62!==a)return!1;n=!0}for(t.kind="scalar",t.result="";0!==a;)if(43===(a=t.input.charCodeAt(++t.position))||45===a)1===s?s=43===a?3:2:Jf(t,"repeat of a chomping mode identifier");else{if(!((i=Wf(a))>=0))break;0===i?Jf(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Jf(t,"repeat of an indentation width identifier"):(c=e+i-1,l=!0)}if(zf(a)){do{a=t.input.charCodeAt(++t.position)}while(zf(a));if(35===a)do{a=t.input.charCodeAt(++t.position)}while(!Ff(a)&&0!==a)}for(;0!==a;){for(am(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!l||t.lineIndent c&&(c=t.lineIndent),Ff(a))h++;else{if(t.lineIndent e)&&0!==n)Jf(t,"bad indentation of a sequence entry");else if(t.lineIndent e)&&(y&&(s=t.line,o=t.lineStart,l=t.position),xm(t,e,4,!0,i)&&(y?f=t.result:m=t.result),y||(im(t,d,p,g,f,m,s,o,l),g=f=m=null),sm(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==c)Jf(t,"bad indentation of a mapping entry");else if(t.lineIndent e?g=1:t.lineIndent===e?g=0:t.lineIndent e?g=1:t.lineIndent===e?g=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l "),null!==t.result&&u.kind!==t.kind&&Jf(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):Jf(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||m}function bm(t){var e,r,n,i,a=t.position,s=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(i=t.input.charCodeAt(t.position))&&(sm(t,!0,-1),i=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==i));){for(s=!0,i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!Uf(i);)i=t.input.charCodeAt(++t.position);for(n=[],(r=t.input.slice(e,t.position)).length<1&&Jf(t,"directive name must not be less than one character in length");0!==i;){for(;zf(i);)i=t.input.charCodeAt(++t.position);if(35===i){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&!Ff(i));break}if(Ff(i))break;for(e=t.position;0!==i&&!Uf(i);)i=t.input.charCodeAt(++t.position);n.push(t.input.slice(e,t.position))}0!==i&&am(t),Rf.call(em,r)?em[r](t,r,n):tm(t,'unknown document directive "'+r+'"')}sm(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,sm(t,!0,-1)):s&&Jf(t,"directives end mark is expected"),xm(t,t.lineIndent-1,4,!1,!0),sm(t,!0,-1),t.checkLineBreaks&&Df.test(t.input.slice(a,t.position))&&tm(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&om(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,sm(t,!0,-1)):t.position =55296&&n<=56319&&e+1 =56320&&r<=57343?1024*(n-55296)+r-56320+65536:n}function jm(t){return/^\n* /.test(t)}o(Mm,"State"),o(Dm,"indentString"),o(Om,"generateNextLine"),o(Pm,"testImplicitResolving"),o(Bm,"isWhitespace"),o($m,"isPrintable"),o(Fm,"isNsCharOrWhitespace"),o(zm,"isPlainSafe"),o(Um,"isPlainSafeFirst"),o(Gm,"isPlainSafeLast"),o(qm,"codePointAt"),o(jm,"needIndentIndicator");function Wm(t,e,r,n,i,a,s,o){var l,c=0,h=null,u=!1,d=!1,p=-1!==n,g=-1,f=Um(qm(t,0))&&Gm(qm(t,t.length-1));if(e||s)for(l=0;l =65536?l+=2:l++){if(!$m(c=qm(t,l)))return 5;f=f&&zm(c,h,o),h=c}else{for(l=0;l =65536?l+=2:l++){if(10===(c=qm(t,l)))u=!0,p&&(d=d||l-g-1>n&&" "!==t[g+1],g=l);else if(!$m(c))return 5;f=f&&zm(c,h,o),h=c}d=d||p&&l-g-1>n&&" "!==t[g+1]}return u||d?r>9&&jm(t)?5:s?2===a?5:2:d?4:3:!f||s||i(t)?2===a?5:2:1}function Ym(t,e,r,n,i){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==Lm.indexOf(e)||Nm.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,r),s=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),l=n||t.flowLevel>-1&&r>=t.flowLevel;function c(e){return Pm(t,e)}switch(o(c,"testAmbiguity"),Wm(e,l,t.indent,s,c,t.quotingType,t.forceQuotes&&!n,i)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+Hm(e,t.indent)+Vm(Dm(e,a));case 4:return">"+Hm(e,t.indent)+Vm(Dm(Xm(e,s),a));case 5:return'"'+Zm(e)+'"';default:throw new fg("impossible error: invalid scalar style")}}()}function Hm(t,e){var r=jm(t)?String(e):"",n="\n"===t[t.length-1];return r+(n&&("\n"===t[t.length-2]||"\n"===t)?"+":n?"":"-")+"\n"}function Vm(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function Xm(t,e){for(var r,n,i,a=/(\n+)([^\n]*)/g,s=(r=-1!==(r=t.indexOf("\n"))?r:t.length,a.lastIndex=r,Km(t.slice(0,r),e)),o="\n"===t[0]||" "===t[0];i=a.exec(t);){var l=i[1],c=i[2];n=" "===c[0],s+=l+(o||n||""===c?"":"\n")+Km(c,e),o=n}return s}function Km(t,e){if(""===t||" "===t[0])return t;for(var r,n,i=/ [^ ]/g,a=0,s=0,o=0,l="";r=i.exec(t);)(o=r.index)-a>e&&(n=s>a?s:o,l+="\n"+t.slice(a,n),a=n+1),s=o;return l+="\n",t.length-a>e&&s>a?l+=t.slice(a,s)+"\n"+t.slice(s+1):l+=t.slice(a),l.slice(1)}function Zm(t){for(var e,r="",n=0,i=0;i =65536?i+=2:i++)n=qm(t,i),!(e=Am[n])&&$m(n)?(r+=t[i],n>=65536&&(r+=t[i+1])):r+=e||Rm(n);return r}function Qm(t,e,r){var n,i,a,s="",o=t.tag;for(n=0,i=r.length;n1024&&(o+="? "),o+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),ny(t,e,s,!1,!1)&&(l+=o+=t.dump));t.tag=c,t.dump="{"+l+"}"}function ey(t,e,r,n){var i,a,s,o,l,c,h="",u=t.tag,d=Object.keys(r);if(!0===t.sortKeys)d.sort();else if("function"==typeof t.sortKeys)d.sort(t.sortKeys);else if(t.sortKeys)throw new fg("sortKeys must be a boolean or a function");for(i=0,a=d.length;i1024)&&(t.dump&&10===t.dump.charCodeAt(0)?c+="?":c+="? "),c+=t.dump,l&&(c+=Om(t,e)),ny(t,e+1,o,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?c+=":":c+=": ",h+=c+=t.dump));t.tag=u,t.dump=h||"{}"}function ry(t,e,r){var n,i,a,s,o,l;for(a=0,s=(i=r?t.explicitTypes:t.implicitTypes).length;a tag resolver accepts not "'+l+'" style');n=o.represent[l](e,l)}t.dump=n}return!0}return!1}function ny(t,e,r,n,i,a,s){t.tag=null,t.dump=r,ry(t,r,!1)||ry(t,r,!0);var o,l=Em.call(t.dump),c=n;n&&(n=t.flowLevel<0||t.flowLevel>e);var h,u,d="[object Object]"===l||"[object Array]"===l;if(d&&(u=-1!==(h=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||u||2!==t.indent&&e>0)&&(i=!1),u&&t.usedDuplicates[h])t.dump="*ref_"+h;else{if(d&&u&&!t.usedDuplicates[h]&&(t.usedDuplicates[h]=!0),"[object Object]"===l)n&&0!==Object.keys(t.dump).length?(ey(t,e,t.dump,i),u&&(t.dump="&ref_"+h+t.dump)):(ty(t,e,t.dump),u&&(t.dump="&ref_"+h+" "+t.dump));else if("[object Array]"===l)n&&0!==t.dump.length?(t.noArrayIndent&&!s&&e>0?Jm(t,e-1,t.dump,i):Jm(t,e,t.dump,i),u&&(t.dump="&ref_"+h+t.dump)):(Qm(t,e,t.dump),u&&(t.dump="&ref_"+h+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new fg("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&Ym(t,t.dump,e,a,c)}null!==t.tag&&"?"!==t.tag&&(o=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),o="!"===t.tag[0]?"!"+o:"tag:yaml.org,2002:"===o.slice(0,18)?"!!"+o.slice(18):"!<"+o+">",t.dump=o+" "+t.dump)}return!0}function iy(t,e){var r,n,i=[],a=[];for(ay(t,i,a),r=0,n=a.length;r100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*a;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function l(t){var e=Math.abs(t);return e>=a?Math.round(t/a)+"d":e>=i?Math.round(t/i)+"h":e>=n?Math.round(t/n)+"m":e>=r?Math.round(t/r)+"s":t+"ms"}function c(t){var e=Math.abs(t);return e>=a?h(t,e,a,"day"):e>=i?h(t,e,i,"hour"):e>=n?h(t,e,n,"minute"):e>=r?h(t,e,r,"second"):t+" ms"}function h(t,e,r,n){var i=e>=1.5*r;return Math.round(t/r)+" "+n+(i?"s":"")}e.exports=function(t,e){e=e||{};var r=typeof t;if("string"===r&&t.length>0)return s(t);if("number"===r&&isFinite(t))return e.long?c(t):l(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))},o(s,"parse"),o(l,"fmtShort"),o(c,"fmtLong"),o(h,"plural")}}),cy=l({"../../node_modules/.pnpm/debug@4.4.0_supports-color@8.1.1/node_modules/debug/src/common.js"(t,e){function r(t){function e(t){let e=0;for(let r=0;r {if("%%"===e)return"%";s++;const a=r.formatters[i];if("function"==typeof a){const r=t[s];e=a.call(n,r),t.splice(s,1),s--}return e})),r.formatArgs.call(n,t);(n.log||r.log).apply(n,t)}return o(l,"debug"),l.namespace=t,l.useColors=r.useColors(),l.color=r.selectColor(t),l.extend=n,l.destroy=r.destroy,Object.defineProperty(l,"enabled",{enumerable:!0,configurable:!1,get:o((()=>null!==s?s:(i!==r.namespaces&&(i=r.namespaces,a=r.enabled(t)),a)),"get"),set:o((t=>{s=t}),"set")}),"function"==typeof r.init&&r.init(l),l}function n(t,e){const n=r(this.namespace+(void 0===e?":":e)+t);return n.log=this.log,n}function i(t){r.save(t),r.namespaces=t,r.names=[],r.skips=[];const e=("string"==typeof t?t:"").trim().replace(" ",",").split(",").filter(Boolean);for(const t of e)"-"===t[0]?r.skips.push(t.slice(1)):r.names.push(t)}function a(t,e){let r=0,n=0,i=-1,a=0;for(;r "-"+t))].join(",");return r.enable(""),t}function l(t){for(const e of r.skips)if(a(t,e))return!1;for(const e of r.names)if(a(t,e))return!0;return!1}function c(t){return t instanceof Error?t.stack||t.message:t}function h(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=i,r.enabled=l,r.humanize=ly(),r.destroy=h,Object.keys(t).forEach((e=>{r[e]=t[e]})),r.names=[],r.skips=[],r.formatters={},o(e,"selectColor"),r.selectColor=e,o(r,"createDebug"),o(n,"extend"),o(i,"enable"),o(a,"matchesTemplate"),o(s,"disable"),o(l,"enabled"),o(c,"coerce"),o(h,"destroy"),r.enable(r.load()),r}o(r,"setup"),e.exports=r}}),hy=l({"../../node_modules/.pnpm/debug@4.4.0_supports-color@8.1.1/node_modules/debug/src/browser.js"(t,e){function r(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(n++,"%c"===t&&(i=n))})),t.splice(i,0,r)}function i(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(t){}}function a(){let e;try{e=t.storage.getItem("debug")}catch(t){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}function s(){try{return localStorage}catch(t){}}t.formatArgs=n,t.save=i,t.load=a,t.useColors=r,t.storage=s(),t.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],o(r,"useColors"),o(n,"formatArgs"),t.log=console.debug||console.log||(()=>{}),o(i,"save"),o(a,"load"),o(s,"localstorage"),e.exports=cy()(t);var{formatters:l}=e.exports;l.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}}),uy=Object.freeze({left:0,top:0,width:16,height:16}),dy=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),py=Object.freeze({...uy,...dy}),gy=Object.freeze({...py,body:"",hidden:!1}),fy=Object.freeze({width:null,height:null}),my=Object.freeze({...fy,...dy}),yy=o(((t,e,r,n="")=>{const i=t.split(":");if("@"===t.slice(0,1)){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const t=i.pop(),r=i.pop(),a={provider:i.length>0?i[0]:n,prefix:r,name:t};return e&&!vy(a)?null:a}const a=i[0],s=a.split("-");if(s.length>1){const t={provider:n,prefix:s.shift(),name:s.join("-")};return e&&!vy(t)?null:t}if(r&&""===n){const t={provider:n,prefix:"",name:a};return e&&!vy(t,r)?null:t}return null}),"stringToIcon"),vy=o(((t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name)),"validateIconName");function xy(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const n=((t.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r}function by(t,e){const r=xy(t,e);for(const n in gy)n in dy?n in t&&!(n in r)&&(r[n]=dy[n]):n in e?r[n]=e[n]:n in t&&(r[n]=t[n]);return r}function wy(t,e){const r=t.icons,n=t.aliases||Object.create(null),i=Object.create(null);function a(t){if(r[t])return i[t]=[];if(!(t in i)){i[t]=null;const e=n[t]&&n[t].parent,r=e&&a(e);r&&(i[t]=[e].concat(r))}return i[t]}return o(a,"resolve"),(e||Object.keys(r).concat(Object.keys(n))).forEach(a),i}function ky(t,e,r){const n=t.icons,i=t.aliases||Object.create(null);let a={};function s(t){a=by(n[t]||i[t],a)}return o(s,"parse"),s(e),r.forEach(s),by(t,a)}function Ty(t,e){if(t.icons[e])return ky(t,e,[]);const r=wy(t,[e])[e];return r?ky(t,e,r):null}o(xy,"mergeIconTransformations"),o(by,"mergeIconData"),o(wy,"getIconsTree"),o(ky,"internalGetIconData"),o(Ty,"getIconData");var _y=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ey=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Cy(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const n=t.split(_y);if(null===n||!n.length)return t;const i=[];let a=n.shift(),s=Ey.test(a);for(;;){if(s){const t=parseFloat(a);isNaN(t)?i.push(a):i.push(Math.ceil(t*e*r)/r)}else i.push(a);if(a=n.shift(),void 0===a)return i.join("");s=!s}}function Sy(t,e="defs"){let r="";const n=t.indexOf("<"+e);for(;n>=0;){const i=t.indexOf(">",n),a=t.indexOf(""+e);if(-1===i||-1===a)break;const s=t.indexOf(">",a);if(-1===s)break;r+=t.slice(i+1,a).trim(),t=t.slice(0,n).trim()+t.slice(s+1)}return{defs:r,content:t}}function Ay(t,e){return t?" "+t+" "+e:e}function Ly(t,e,r){const n=Sy(t);return Ay(n.defs,e+n.content+r)}o(Cy,"calculateSize"),o(Sy,"splitSVGDefs"),o(Ay,"mergeDefsAndContent"),o(Ly,"wrapSVGContent");var Ny=o((t=>"unset"===t||"undefined"===t||"none"===t),"isUnsetKeyword");function Iy(t,e){const r={...py,...t},n={...my,...e},i={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,n].forEach((t=>{const e=[],r=t.hFlip,n=t.vFlip;let s,o=t.rotate;switch(r?n?o+=2:(e.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),e.push("scale(-1 1)"),i.top=i.left=0):n&&(e.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),e.push("scale(1 -1)"),i.top=i.left=0),o<0&&(o-=4*Math.floor(o/4)),o%=4,o){case 1:s=i.height/2+i.top,e.unshift("rotate(90 "+s.toString()+" "+s.toString()+")");break;case 2:e.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:s=i.width/2+i.left,e.unshift("rotate(-90 "+s.toString()+" "+s.toString()+")")}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),e.length&&(a=Ly(a,''," "))}));const s=n.width,l=n.height,c=i.width,h=i.height;let u,d;null===s?(d=null===l?"1em":"auto"===l?h:l,u=Cy(d,c/h)):(u="auto"===s?c:s,d=null===l?Cy(u,h/c):"auto"===l?h:l);const p={},g=o(((t,e)=>{Ny(e)||(p[t]=e.toString())}),"setAttr");g("width",u),g("height",d);const f=[i.left,i.top,c,h];return p.viewBox=f.join(" "),{attributes:p,viewBox:f,body:a}}o(Iy,"iconToSVG");var Ry=/\sid="(\S+)"/g,My="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),Dy=0;function Oy(t,e=My){const r=[];let n;for(;n=Ry.exec(t);)r.push(n[1]);if(!r.length)return t;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return r.forEach((r=>{const n="function"==typeof e?e(r):e+(Dy++).toString(),a=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+n+i+"$3")})),t=t.replace(new RegExp(i,"g"),"")}function Py(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in e)r+=" "+t+'="'+e[t]+'"';return'"}o(Oy,"replaceIDs"),o(Py,"iconToHTML"),p(hy(),1);var By={body:'',height:80,width:80},$y=new Map,Fy=new Map,zy=o((t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(y.debug("Registering icon pack:",e.name),"loader"in e)Fy.set(e.name,e.loader);else{if(!("icons"in e))throw y.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');$y.set(e.name,e.icons)}}}),"registerIconPacks"),Uy=o((async(t,e)=>{const r=yy(t,!0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const n=r.prefix||e;if(!n)throw new Error(`Icon name must contain a prefix: ${t}`);let i=$y.get(n);if(!i){const t=Fy.get(n);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await t(),prefix:n},$y.set(n,i)}catch(t){throw y.error(t),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=Ty(i,r.name);if(!a)throw new Error(`Icon not found: ${t}`);return a}),"getRegisteredIconData"),Gy=o((async(t,e)=>{let r;try{r=await Uy(t,e?.fallbackPrefix)}catch(t){y.error(t),r=By}const n=Iy(r,e);return Py(Oy(n.body),n.attributes)}),"getIconSVG"),qy=o((({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}}),"getSubGraphTitleMargins"),jy=l({"../../node_modules/.pnpm/@braintree+sanitize-url@7.1.0/node_modules/@braintree/sanitize-url/dist/constants.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.BLANK_URL=t.relativeFirstCharacters=t.whitespaceEscapeCharsRegex=t.urlSchemeRegex=t.ctrlCharactersRegex=t.htmlCtrlEntityRegex=t.htmlEntitiesRegex=t.invalidProtocolRegex=void 0,t.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,t.htmlEntitiesRegex=/(\w+)(^\w|;)?/g,t.htmlCtrlEntityRegex=/&(newline|tab);/gi,t.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,t.urlSchemeRegex=/^.+(:|:)/gim,t.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,t.relativeFirstCharacters=[".","/"],t.BLANK_URL="about:blank"}}),Wy=l({"../../node_modules/.pnpm/@braintree+sanitize-url@7.1.0/node_modules/@braintree/sanitize-url/dist/index.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUrl=void 0;var e=jy();function r(t){return e.relativeFirstCharacters.indexOf(t[0])>-1}function n(t){return t.replace(e.ctrlCharactersRegex,"").replace(e.htmlEntitiesRegex,(function(t,e){return String.fromCharCode(e)}))}function i(t){return URL.canParse(t)}function a(t){try{return decodeURIComponent(t)}catch(e){return t}}function s(t){if(!t)return e.BLANK_URL;var s,o=a(t.trim());do{s=(o=a(o=n(o).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim())).match(e.ctrlCharactersRegex)||o.match(e.htmlEntitiesRegex)||o.match(e.htmlCtrlEntityRegex)||o.match(e.whitespaceEscapeCharsRegex)}while(s&&s.length>0);var l=o;if(!l)return e.BLANK_URL;if(r(l))return l;var c=l.trimStart(),h=c.match(e.urlSchemeRegex);if(!h)return l;var u=h[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(u))return e.BLANK_URL;var d=c.replace(/\\/g,"/");if("mailto:"===u||u.includes("://"))return d;if("http:"===u||"https:"===u){if(!i(d))return e.BLANK_URL;var p=new URL(d);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return d}o(r,"isRelativeUrlWithoutProtocol"),o(n,"decodeHtmlCharacters"),o(i,"isValidUrl"),o(a,"decodeURI"),o(s,"sanitizeUrl"),t.sanitizeUrl=s}}),Yy="object"==typeof global&&global&&global.Object===Object&&global,Hy="object"==typeof self&&self&&self.Object===Object&&self,Vy=Yy||Hy||Function("return this")(),Xy=Vy.Symbol,Ky=Object.prototype,Zy=Ky.hasOwnProperty,Qy=Ky.toString,Jy=Xy?Xy.toStringTag:void 0;function tv(t){var e=Zy.call(t,Jy),r=t[Jy];try{t[Jy]=void 0;var n=!0}catch(t){}var i=Qy.call(t);return n&&(e?t[Jy]=r:delete t[Jy]),i}o(tv,"getRawTag");var ev=tv,rv=Object.prototype.toString;function nv(t){return rv.call(t)}o(nv,"objectToString");var iv=nv,av=Xy?Xy.toStringTag:void 0;function sv(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":av&&av in Object(t)?ev(t):iv(t)}o(sv,"baseGetTag");var ov=sv;function lv(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}o(lv,"isObject");var cv=lv;function hv(t){if(!cv(t))return!1;var e=ov(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}o(hv,"isFunction");var uv,dv=hv,pv=Vy["__core-js_shared__"],gv=(uv=/[^.]+$/.exec(pv&&pv.keys&&pv.keys.IE_PROTO||""))?"Symbol(src)_1."+uv:"";function fv(t){return!!gv&&gv in t}o(fv,"isMasked");var mv=fv,yv=Function.prototype.toString;function vv(t){if(null!=t){try{return yv.call(t)}catch(t){}try{return t+""}catch(t){}}return""}o(vv,"toSource");var xv=vv,bv=/^\[object .+?Constructor\]$/,wv=Function.prototype,kv=Object.prototype,Tv=wv.toString,_v=kv.hasOwnProperty,Ev=RegExp("^"+Tv.call(_v).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Cv(t){return!(!cv(t)||mv(t))&&(dv(t)?Ev:bv).test(xv(t))}o(Cv,"baseIsNative");var Sv=Cv;function Av(t,e){return null==t?void 0:t[e]}o(Av,"getValue");var Lv=Av;function Nv(t,e){var r=Lv(t,e);return Sv(r)?r:void 0}o(Nv,"getNative");var Iv=Nv,Rv=Iv(Object,"create");function Mv(){this.__data__=Rv?Rv(null):{},this.size=0}o(Mv,"hashClear");var Dv=Mv;function Ov(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}o(Ov,"hashDelete");var Pv=Ov,Bv=Object.prototype.hasOwnProperty;function $v(t){var e=this.__data__;if(Rv){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return Bv.call(e,t)?e[t]:void 0}o($v,"hashGet");var Fv=$v,zv=Object.prototype.hasOwnProperty;function Uv(t){var e=this.__data__;return Rv?void 0!==e[t]:zv.call(e,t)}o(Uv,"hashHas");var Gv=Uv;function qv(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Rv&&void 0===e?"__lodash_hash_undefined__":e,this}o(qv,"hashSet");var jv=qv;function Wv(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e ? -1}o(ix,"listCacheHas");var ax=ix;function sx(t,e){var r=this.__data__,n=Qv(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}o(sx,"listCacheSet");var ox=sx;function lx(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e -1&&t%1==0&&t<=9007199254740991}o(Nb,"isLength");var Ib=Nb;function Rb(t){return null!=t&&Ib(t.length)&&!dv(t)}o(Rb,"isArrayLike");var Mb=Rb;function Db(t){return wb(t)&&Mb(t)}o(Db,"isArrayLikeObject");var Ob=Db;function Pb(){return!1}o(Pb,"stubFalse");var Bb=Pb,$b="object"==typeof exports&&exports&&!exports.nodeType&&exports,Fb=$b&&"object"==typeof module&&module&&!module.nodeType&&module,zb=Fb&&Fb.exports===$b?Vy.Buffer:void 0,Ub=(zb?zb.isBuffer:void 0)||Bb,Gb=Function.prototype,qb=Object.prototype,jb=Gb.toString,Wb=qb.hasOwnProperty,Yb=jb.call(Object);function Hb(t){if(!wb(t)||"[object Object]"!=ov(t))return!1;var e=gb(t);if(null===e)return!0;var r=Wb.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&jb.call(r)==Yb}o(Hb,"isPlainObject");var Vb=Hb,Xb={};function Kb(t){return wb(t)&&Ib(t.length)&&!!Xb[ov(t)]}Xb["[object Float32Array]"]=Xb["[object Float64Array]"]=Xb["[object Int8Array]"]=Xb["[object Int16Array]"]=Xb["[object Int32Array]"]=Xb["[object Uint8Array]"]=Xb["[object Uint8ClampedArray]"]=Xb["[object Uint16Array]"]=Xb["[object Uint32Array]"]=!0,Xb["[object Arguments]"]=Xb["[object Array]"]=Xb["[object ArrayBuffer]"]=Xb["[object Boolean]"]=Xb["[object DataView]"]=Xb["[object Date]"]=Xb["[object Error]"]=Xb["[object Function]"]=Xb["[object Map]"]=Xb["[object Number]"]=Xb["[object Object]"]=Xb["[object RegExp]"]=Xb["[object Set]"]=Xb["[object String]"]=Xb["[object WeakMap]"]=!1,o(Kb,"baseIsTypedArray");var Zb=Kb;function Qb(t){return function(e){return t(e)}}o(Qb,"baseUnary");var Jb=Qb,tw="object"==typeof exports&&exports&&!exports.nodeType&&exports,ew=tw&&"object"==typeof module&&module&&!module.nodeType&&module,rw=ew&&ew.exports===tw&&Yy.process,nw=function(){try{var t=ew&&ew.require&&ew.require("util").types;return t||rw&&rw.binding&&rw.binding("util")}catch(t){}}(),iw=nw&&nw.isTypedArray,aw=iw?Jb(iw):Zb;function sw(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}o(sw,"safeGet");var ow=sw,lw=Object.prototype.hasOwnProperty;function cw(t,e,r){var n=t[e];lw.call(t,e)&&Kv(n,r)&&(void 0!==r||e in t)||Wx(t,e,r)}o(cw,"assignValue");var hw=cw;function uw(t,e,r,n){var i=!r;r||(r={});for(var a=-1,s=e.length;++a -1&&t%1==0&&t0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}o(jw,"shortOut");var Ww=jw(Gw);function Yw(t,e){return Ww(zw(t,e,Ow),t+"")}o(Yw,"baseRest");var Hw=Yw;function Vw(t,e,r){if(!cv(r))return!1;var n=typeof e;return!!("number"==n?Mb(r)&&yw(e,r.length):"string"==n&&e in r)&&Kv(r[e],t)}o(Vw,"isIterateeCall");var Xw=Vw;function Kw(t){return Hw((function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,s&&Xw(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++nt.args));Nt(t),n=N(n,[...t])}else n=r.args;if(!n)return;let i=E(t,e);const a="config";return void 0!==n[a]&&("flowchart-v2"===i&&(i="flowchart"),n[i]=n[a],delete n[a]),n}),"detectInit"),ik=o((function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${rk.source})(?=[}][%]{2}).*\n`,"ig");let n;t=t.trim().replace(r,"").replace(/'/gm,'"'),y.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const i=[];for(;null!==(n=w.exec(t));)if(n.index===w.lastIndex&&w.lastIndex++,n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e)){const t=n[1]?n[1]:n[2],e=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;i.push({type:t,args:e})}return 0===i.length?{type:t,args:null}:1===i.length?i[0]:i}catch(r){return y.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}}),"detectDirective"),ak=o((function(t){return t.replace(w,"")}),"removeDirectives"),sk=o((function(t,e){for(const[r,n]of e.entries())if(n.match(t))return r;return-1}),"isSubstringInArray");function ok(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return ek[r]??e}function lk(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?(0,tk.sanitizeUrl)(r):r}o(ok,"interpolateToCurve"),o(lk,"formatUrl");var ck=o(((t,...e)=>{const r=t.split("."),n=r.length-1,i=r[n];let a=window;for(let e=0;e {r+=hk(t,e),e=t}));return gk(t,r/2)}function dk(t){return 1===t.length?t[0]:uk(t)}o(hk,"distance"),o(uk,"traverseEdge"),o(dk,"calcLabelPosition");var pk=o(((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r}),"roundNumber"),gk=o(((t,e)=>{let r,n=e;for(const e of t){if(r){const t=hk(e,r);if(0===t)return r;if(t =1)return{x:e.x,y:e.y};if(i>0&&i<1)return{x:pk((1-i)*r.x+i*e.x,5),y:pk((1-i)*r.y+i*e.y,5)}}}r=e}throw new Error("Could not find a suitable point for the given distance")}),"calculatePoint"),fk=o(((t,e,r)=>{y.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const n=gk(e,25),i=t?10:5,a=Math.atan2(e[0].y-n.y,e[0].x-n.x),s={x:0,y:0};return s.x=Math.sin(a)*i+(e[0].x+n.x)/2,s.y=-Math.cos(a)*i+(e[0].y+n.y)/2,s}),"calcCardinalityPosition");function mk(t,e,r){const n=structuredClone(r);y.info("our points",n),"start_left"!==e&&"start_right"!==e&&n.reverse();const i=gk(n,25+t),a=10+.5*t,s=Math.atan2(n[0].y-i.y,n[0].x-i.x),o={x:0,y:0};return"start_left"===e?(o.x=Math.sin(s+Math.PI)*a+(n[0].x+i.x)/2,o.y=-Math.cos(s+Math.PI)*a+(n[0].y+i.y)/2):"end_right"===e?(o.x=Math.sin(s-Math.PI)*a+(n[0].x+i.x)/2-5,o.y=-Math.cos(s-Math.PI)*a+(n[0].y+i.y)/2-5):"end_left"===e?(o.x=Math.sin(s)*a+(n[0].x+i.x)/2-5,o.y=-Math.cos(s)*a+(n[0].y+i.y)/2-5):(o.x=Math.sin(s)*a+(n[0].x+i.x)/2,o.y=-Math.cos(s)*a+(n[0].y+i.y)/2),o}function yk(t){let e="",r="";for(const n of t)void 0!==n&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}o(mk,"calcTerminalLabelPosition"),o(yk,"getStylesFromArray");var vk=0,xk=o((()=>(vk++,"id-"+Math.random().toString(36).substr(2,12)+"-"+vk)),"generateId");function bk(t){let e="";const r="0123456789abcdef",n=r.length;for(let i=0;i bk(t.length)),"random"),kk=o((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"),Tk=o((function(t,e){const r=e.text.replace(Lr.lineBreakRegex," "),[,n]=Dk(e.fontSize),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.style("font-family",e.fontFamily),i.style("font-size",n),i.style("font-weight",e.fontWeight),i.attr("fill",e.fill),void 0!==e.class&&i.attr("class",e.class);const a=i.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.attr("fill",e.fill),a.text(r),i}),"drawSimpleText"),_k=Ax(((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),Lr.lineBreakRegex.test(t))return t;const n=t.split(" ").filter(Boolean),i=[];let a="";return n.forEach(((t,s)=>{const o=Sk(`${t} `,r),l=Sk(a,r);if(o>e){const{hyphenatedStrings:n,remainingWord:s}=Ek(t,e,"-",r);i.push(a,...n),a=s}else l+o>=e?(i.push(a),a=t):a=[a,t].filter(Boolean).join(" ");s+1===n.length&&i.push(a)})),i.filter((t=>""!==t)).join(r.joinWith)}),((t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`)),Ek=Ax(((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=[...t],a=[];let s="";return i.forEach(((t,o)=>{const l=`${s}${t}`;if(Sk(l,n)>=e){const t=o+1,e=i.length===t,n=`${l}${r}`;a.push(e?l:n),s=""}else s=l})),{hyphenatedStrings:a,remainingWord:s}}),((t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`));function Ck(t,e){return Lk(t,e).height}function Sk(t,e){return Lk(t,e).width}o(Ck,"calculateTextHeight"),o(Sk,"calculateTextWidth");var Ak,Lk=Ax(((t,e)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};const[,a]=Dk(r),s=["sans-serif",n],o=t.split(Lr.lineBreakRegex),l=[],c=Ga("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const t of s){let e=0;const r={width:0,height:0,lineHeight:0};for(const n of o){const s=kk();s.text=n||"";const o=Tk(h,s).style("font-size",a).style("font-weight",i).style("font-family",t),l=(o._groups||o)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");r.width=Math.round(Math.max(r.width,l.width)),e=Math.round(l.height),r.height+=e,r.lineHeight=Math.round(Math.max(r.lineHeight,e))}l.push(r)}h.remove();return l[isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1]}),((t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`)),Nk=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{o(this,"InitIDGenerator")}},Ik=o((function(t){return Ak=Ak||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ak.innerHTML=t,unescape(Ak.textContent)}),"entityDecode");function Rk(t){return"str"in t}o(Rk,"isDetailedError");var Mk=o(((t,e,r,n)=>{if(!n)return;const i=t.node()?.getBBox();i&&t.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)}),"insertTitle"),Dk=o((t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]}),"parseFontSize");function Ok(t,e){return Jw({},t,e)}o(Ok,"cleanAndMerge");var Pk={assignWithDepth:N,wrapLabel:_k,calculateTextHeight:Ck,calculateTextWidth:Sk,calculateTextDimensions:Lk,cleanAndMerge:Ok,detectInit:nk,detectDirective:ik,isSubstringInArray:sk,interpolateToCurve:ok,calcLabelPosition:dk,calcCardinalityPosition:fk,calcTerminalLabelPosition:mk,formatUrl:lk,getStylesFromArray:yk,generateId:xk,random:wk,runFunc:ck,entityDecode:Ik,insertTitle:Mk,parseFontSize:Dk,InitIDGenerator:Nk},Bk=o((function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/#\w+;/g,(function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"})),e}),"encodeEntities"),$k=o((function(t){return t.replace(/fl°°/g,"").replace(/fl°/g,"&").replace(/¶ß/g,";")}),"decodeEntities"),Fk=o(((t,e,{counter:r=0,prefix:n,suffix:i},a)=>a||`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`),"getEdgeId");function zk(t){return t??null}function Uk(t){for(var e=[],r=1;rnull),"exec")};function Yk(t,e=""){let r="string"==typeof t?t:t.source;const n={replace:o(((t,e)=>{let i="string"==typeof e?e:e.source;return i=i.replace(Hk.caret,"$1"),r=r.replace(t,i),n}),"replace"),getRegex:o((()=>new RegExp(r,e)),"getRegex")};return n}o(Yk,"edit");var Hk={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:/^/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+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:o((t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`)),"listItemRegex"),nextBulletRegex:o((t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`)),"nextBulletRegex"),hrRegex:o((t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),"hrRegex"),fencesBeginRegex:o((t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`)),"fencesBeginRegex"),headingBeginRegex:o((t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`)),"headingBeginRegex"),htmlBeginRegex:o((t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")),"htmlBeginRegex")},Vk=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Xk=/(?:[*+-]|\d{1,9}[.)])/,Kk=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Zk=Yk(Kk).replace(/bull/g,Xk).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(),Qk=Yk(Kk).replace(/bull/g,Xk).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(),Jk=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,tT=/(?!\s*\])(?:\\.|[^\[\]\\])+/,eT=Yk(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",tT).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),rT=Yk(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Xk).getRegex(),nT="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",iT=/|$))/,aT=Yk("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\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",iT).replace("tag",nT).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),sT=Yk(Jk).replace("hr",Vk).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",nT).getRegex(),oT={blockquote:Yk(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",sT).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:eT,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:Vk,html:aT,lheading:Zk,list:rT,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:sT,table:Wk,text:/^[^\n]+/},lT=Yk("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Vk).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",nT).getRegex(),cT={...oT,lheading:Qk,table:lT,paragraph:Yk(Jk).replace("hr",Vk).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",lT).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",nT).getRegex()},hT={...oT,html:Yk("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)| \\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",iT).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:Wk,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Yk(Jk).replace("hr",Vk).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Zk).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},uT=/^( {2,}|\\)\n(?!\s*$)/,dT=/[\p{P}\p{S}]/u,pT=/[\s\p{P}\p{S}]/u,gT=/[^\s\p{P}\p{S}]/u,fT=Yk(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,pT).getRegex(),mT=/(?!~)[\p{P}\p{S}]/u,yT=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,vT=Yk(yT,"u").replace(/punct/g,dT).getRegex(),xT=Yk(yT,"u").replace(/punct/g,mT).getRegex(),bT="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",wT=Yk(bT,"gu").replace(/notPunctSpace/g,gT).replace(/punctSpace/g,pT).replace(/punct/g,dT).getRegex(),kT=Yk(bT,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,mT).getRegex(),TT=Yk("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,gT).replace(/punctSpace/g,pT).replace(/punct/g,dT).getRegex(),_T=Yk(/\\(punct)/,"gu").replace(/punct/g,dT).getRegex(),ET=Yk(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),CT=Yk(iT).replace("(?:--\x3e|$)","--\x3e").getRegex(),ST=Yk("^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",CT).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),AT=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,LT=Yk(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",AT).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),NT=Yk(/^!?\[(label)\]\[(ref)\]/).replace("label",AT).replace("ref",tT).getRegex(),IT=Yk(/^!?\[(ref)\](?:\[\])?/).replace("ref",tT).getRegex(),RT={_backpedal:Wk,anyPunctuation:_T,autolink:ET,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:uT,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:Wk,emStrongLDelim:vT,emStrongRDelimAst:wT,emStrongRDelimUnd:TT,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:LT,nolink:IT,punctuation:fT,reflink:NT,reflinkSearch:Yk("reflink|nolink(?!\\()","g").replace("reflink",NT).replace("nolink",IT).getRegex(),tag:ST,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},FT=o((t=>$T[t]),"getEscapeReplacement");function zT(t,e){if(e){if(Hk.escapeTest.test(t))return t.replace(Hk.escapeReplace,FT)}else if(Hk.escapeTestNoEncode.test(t))return t.replace(Hk.escapeReplaceNoEncode,FT);return t}function UT(t){try{t=encodeURI(t).replace(Hk.percentDecode,"%")}catch{return null}return t}function GT(t,e){const r=t.replace(Hk.findPipe,((t,e,r)=>{let n=!1,i=e;for(;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"})),n=r.split(Hk.splitPipe);let i=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length {const e=t.match(r.other.beginningSpace);if(null===e)return t;const[n]=e;return n.length>=i.length?t.slice(i.length):t})).join("\n")}o(zT,"escape"),o(UT,"cleanUrl"),o(GT,"splitCells"),o(qT,"rtrim"),o(jT,"findClosingBracket"),o(WT,"outputLink"),o(YT,"indentCodeCompensation");var HT=class{static{o(this,"_Tokenizer")}options;rules;lexer;constructor(t){this.options=t||qk}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:qT(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],r=YT(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){const e=qT(t,"#");this.options.pedantic?t=e.trim():e&&!this.rules.other.endingSpaceChar.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:qT(e[0],"\n")}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let t=qT(e[0],"\n").split("\n"),r="",n="";const i=[];for(;t.length>0;){let e=!1;const a=[];let s;for(s=0;s 1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const a=this.rules.other.listItemRegex(r);let s=!1;for(;t;){let r=!1,n="",o="";if(!(e=a.exec(t)))break;if(this.rules.block.hr.test(t))break;n=e[0],t=t.substring(n.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(t=>" ".repeat(3*t.length))),c=t.split("\n",1)[0],h=!l.trim(),u=0;if(this.options.pedantic?(u=2,o=l.trimStart()):h?u=e[1].length+1:(u=e[2].search(this.rules.other.nonSpaceChar),u=u>4?1:u,o=l.slice(u),u+=e[1].length),h&&this.rules.other.blankLine.test(c)&&(n+=c+"\n",t=t.substring(c.length+1),r=!0),!r){const e=this.rules.other.nextBulletRegex(u),r=this.rules.other.hrRegex(u),i=this.rules.other.fencesBeginRegex(u),a=this.rules.other.headingBeginRegex(u),s=this.rules.other.htmlBeginRegex(u);for(;t;){const d=t.split("\n",1)[0];let p;if(c=d,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),p=c):p=c.replace(this.rules.other.tabCharGlobal," "),i.test(c))break;if(a.test(c))break;if(s.test(c))break;if(e.test(c))break;if(r.test(c))break;if(p.search(this.rules.other.nonSpaceChar)>=u||!c.trim())o+="\n"+p.slice(u);else{if(h)break;if(l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(i.test(l))break;if(a.test(l))break;if(r.test(l))break;o+="\n"+c}h||c.trim()||(h=!0),n+=d+"\n",t=t.substring(d.length+1),l=p.slice(u)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(s=!0));let d,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(o),p&&(d="[ ] "!==p[0],o=o.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:n,task:!!p,checked:d,loose:!1,text:o,tokens:[]}),i.raw+=n}const o=i.items.at(-1);if(!o)return;o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd(),i.raw=i.raw.trimEnd();for(let t=0;t "space"===t.type)),r=e.length>0&&e.some((t=>this.rules.other.anyLine.test(t.raw)));i.loose=r}if(i.loose)for(let t=0;t ({text:t,tokens:this.lexer.inline(t),header:!1,align:a.align[e]}))));return a}}lheading(t){const e=this.rules.block.lheading.exec(t);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(t){const e=this.rules.block.paragraph.exec(t);if(e){const t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){const e=this.rules.inline.tag.exec(t);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(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;const e=qT(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=jT(e[2],"()");if(t>-1){const r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],n="";if(this.options.pedantic){const t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],n=t[3])}else n=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),WT(e,{href:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r,title:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){const t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){const t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return WT(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!n)return;if(n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(n[1]||n[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const r=[...n[0]].length-1;let i,a,s=r,o=0;const l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+r);null!=(n=l.exec(e));){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(a=[...i].length,n[3]||n[4]){s+=a;continue}if((n[5]||n[6])&&r%3&&!((r+a)%3)){o+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s+o);const e=[...n[0]][0].length,l=t.slice(0,r+n.index+e+a);if(Math.min(r,a)%2){const t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," ");const r=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,r;if("@"===e[2])t=e[0],r="mailto:"+t;else{let n;do{n=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(n!==e[0]);t=e[0],r="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){const t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},VT=class t{static{o(this,"_Lexer")}tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||qk,this.options.tokenizer=this.options.tokenizer||new HT,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const e={other:Hk,block:PT.normal,inline:BT.normal};this.options.pedantic?(e.block=PT.pedantic,e.inline=BT.pedantic):this.options.gfm&&(e.block=PT.gfm,this.options.breaks?e.inline=BT.breaks:e.inline=BT.gfm),this.tokenizer.rules=e}static get rules(){return{block:PT,inline:BT}}static lex(e,r){return new t(r).lex(e)}static lexInline(e,r){return new t(r).inlineTokens(e)}lex(t){t=t.replace(Hk.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t !!(n=r.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0))))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);const r=e.at(-1);1===n.raw.length&&void 0!==r?r.raw+="\n":e.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);const r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.at(-1).src=r.text):e.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);const r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),e.push(n);continue}let i=t;if(this.options.extensions?.startBlock){let e=1/0;const r=t.slice(1);let n;this.options.extensions.startBlock.forEach((t=>{n=t.call({lexer:this},r),"number"==typeof n&&n>=0&&(e=Math.min(e,n))})),e<1/0&&e>=0&&(i=t.substring(0,e+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i))){const a=e.at(-1);r&&"paragraph"===a?.type?(a.raw+="\n"+n.raw,a.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(n),r=i.length!==t.length,t=t.substring(n.raw.length)}else if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);const r=e.at(-1);"text"===r?.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):e.push(n)}else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r=t,n=null;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(n=this.tokenizer.rules.inline.reflinkSearch.exec(r));)t.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(n=this.tokenizer.rules.inline.blockSkip.exec(r));)r=r.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(n=this.tokenizer.rules.inline.anyPunctuation.exec(r));)r=r.slice(0,n.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i=!1,a="";for(;t;){let n;if(i||(a=""),i=!1,this.options.extensions?.inline?.some((r=>!!(n=r.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0))))continue;if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length);const r=e.at(-1);"text"===n.type&&"text"===r?.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);continue}if(n=this.tokenizer.emStrong(t,r,a)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length),e.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),e.push(n);continue}let s=t;if(this.options.extensions?.startInline){let e=1/0;const r=t.slice(1);let n;this.options.extensions.startInline.forEach((t=>{n=t.call({lexer:this},r),"number"==typeof n&&n>=0&&(e=Math.min(e,n))})),e<1/0&&e>=0&&(s=t.substring(0,e+1))}if(n=this.tokenizer.inlineText(s)){t=t.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),i=!0;const r=e.at(-1);"text"===r?.type?(r.raw+=n.raw,r.text+=n.text):e.push(n)}else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},XT=class{static{o(this,"_Renderer")}options;parser;constructor(t){this.options=t||qk}space(t){return""}code({text:t,lang:e,escaped:r}){const n=(e||"").match(Hk.notSpaceStart)?.[0],i=t.replace(Hk.endingNewline,"")+"\n";return n?' \n":"'+(r?i:zT(i,!0))+"\n"}blockquote({tokens:t}){return`"+(r?i:zT(i,!0))+"\n${this.parser.parse(t)}\n`}html({text:t}){return t}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)} \n`}hr(t){return"
\n"}list(t){const e=t.ordered,r=t.start;let n="";for(let e=0;e\n"+n+""+i+">\n"}listitem(t){let e="";if(t.task){const r=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+zT(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),` ${e} \n`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`${this.parser.parseInline(t)}
\n`}table(t){let e="",r="";for(let e=0;e${n}`)," \n\n"+e+"\n"+n+"
\n"}tablerow({text:t}){return`\n${t} \n`}tablecell(t){const e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`${r}>\n`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${zT(t,!0)}`}br(t){return"
"}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){const n=this.parser.parseInline(r),i=UT(t);if(null===i)return n;let a='"+n+"",a}image({href:t,title:e,text:r}){const n=UT(t);if(null===n)return zT(r);let i=`",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:zT(t.text)}},KT=class{static{o(this,"_TextRenderer")}strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},ZT=class t{static{o(this,"_Parser")}options;renderer;textRenderer;constructor(t){this.options=t||qk,this.options.renderer=this.options.renderer||new XT,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new KT}static parse(e,r){return new t(r).parse(e)}static parseInline(e,r){return new t(r).parseInline(e)}parse(t,e=!0){let r="";for(let n=0;n
{const i=t[n].flat(1/0);r=r.concat(this.walkTokens(i,e))})):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach((t=>{const r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let n=t.renderer.apply(this,e);return!1===n&&(n=r.apply(this,e)),n}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");const r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),r.extensions=e),t.renderer){const e=this.defaults.renderer||new XT(this.defaults);for(const r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const n=r,i=t.renderer[n],a=e[n];e[n]=(...t)=>{let r=i.apply(e,t);return!1===r&&(r=a.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){const e=this.defaults.tokenizer||new HT(this.defaults);for(const r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const n=r,i=t.tokenizer[n],a=e[n];e[n]=(...t)=>{let r=i.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){const e=this.defaults.hooks||new QT;for(const r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;const n=r,i=t.hooks[n],a=e[n];QT.passThroughHooks.has(r)?e[n]=t=>{if(this.defaults.async)return Promise.resolve(i.call(e,t)).then((t=>a.call(e,t)));const r=i.call(e,t);return a.call(e,r)}:e[n]=(...t)=>{let r=i.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){const e=this.defaults.walkTokens,n=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(n.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}})),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return VT.lex(t,e??this.defaults)}parser(t,e){return ZT.parse(t,e??this.defaults)}parseMarkdown(t){const e=o(((e,r)=>{const n={...r},i={...this.defaults,...n},a=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===n.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==e)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);const s=i.hooks?i.hooks.provideLexer():t?VT.lex:VT.lexInline,o=i.hooks?i.hooks.provideParser():t?ZT.parse:ZT.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(e):e).then((t=>s(t,i))).then((t=>i.hooks?i.hooks.processAllTokens(t):t)).then((t=>i.walkTokens?Promise.all(this.walkTokens(t,i.walkTokens)).then((()=>t)):t)).then((t=>o(t,i))).then((t=>i.hooks?i.hooks.postprocess(t):t)).catch(a);try{i.hooks&&(e=i.hooks.preprocess(e));let t=s(e,i);i.hooks&&(t=i.hooks.processAllTokens(t)),i.walkTokens&&this.walkTokens(t,i.walkTokens);let r=o(t,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(t){return a(t)}}),"parse");return e}onError(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){const t=" An error occurred:
"+zT(r.message+"",!0)+"";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}},t_=new JT;function e_(t,e){return t_.parse(t,e)}function r_(t,{markdownAutoWrap:e}){const r=Uk(t.replace(/
/g,"\n").replace(/\n{2,}/g,"\n"));return!1===e?r.replace(/ /g," "):r}function n_(t,e={}){const r=r_(t,e),n=e_.lexer(r),i=[[]];let a=0;function s(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach(((t,r)=>{0!==r&&(a++,i.push([])),t.split(" ").forEach((t=>{(t=t.replace(/'/g,"'"))&&i[a].push({content:t,type:e})}))}))}else"strong"===t.type||"em"===t.type?t.tokens.forEach((e=>{s(e,t.type)})):"html"===t.type&&i[a].push({content:t.text,type:"normal"})}return o(s,"processNode"),n.forEach((t=>{"paragraph"===t.type?t.tokens?.forEach((t=>{s(t)})):"html"===t.type&&i[a].push({content:t.text,type:"normal"})})),i}function i_(t,{markdownAutoWrap:e}={}){const r=e_.lexer(t);function n(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"
").replace(/ /g," "):t.text.replace(/\n */g,"
"):"strong"===t.type?`${t.tokens?.map(n).join("")}`:"em"===t.type?`${t.tokens?.map(n).join("")}`:"paragraph"===t.type?`${t.tokens?.map(n).join("")}
`:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:`Unsupported markdown: ${t.type}`}return o(n,"output"),r.map(n).join("")}function a_(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map((t=>t.segment)):[...t]}function s_(t,e){return o_(t,[],a_(e.content),e.type)}function o_(t,e,r,n){if(0===r.length)return[{content:e.join(""),type:n},{content:"",type:n}];const[i,...a]=r,s=[...e,i];return t([{content:s.join(""),type:n}])?o_(t,s,a,n):(0===e.length&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}function l_(t,e){if(t.some((({content:t})=>t.includes("\n"))))throw new Error("splitLineToFitWidth does not support newlines in the line");return c_(t,e)}function c_(t,e,r=[],n=[]){if(0===t.length)return n.length>0&&r.push(n),r.length>0?r:[];let i="";" "===t[0].content&&(i=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},s=[...n];if(""!==i&&s.push({content:i,type:"normal"}),s.push(a),e(s))return c_(t,e,r,s);if(n.length>0)r.push(n),t.unshift(a);else if(a.content){const[n,i]=s_(e,a);r.push([n]),i.content&&t.unshift(i)}return c_(t,e,r)}function h_(t,e){e&&t.attr("style",e)}async function u_(t,e,r,n,i=!1){const a=t.append("foreignObject");a.attr("width",10*r+"px"),a.attr("height",10*r+"px");const s=a.append("xhtml:div");let o=e.label;e.label&&Cr(e.label)&&(o=await Ar(e.label.replace(Lr.lineBreakRegex,"\n"),Qr()));const l=e.isNode?"nodeLabel":"edgeLabel",c=s.append("span");c.html(o),h_(c,e.labelStyle),c.attr("class",`${l} ${n}`),h_(s,e.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&s.attr("class","labelBkg");let h=s.node().getBoundingClientRect();return h.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),h=s.node().getBoundingClientRect()),a.node()}function d_(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function p_(t,e,r){const n=t.append("text"),i=d_(n,1,e);m_(i,r);const a=i.node().getComputedTextLength();return n.remove(),a}function g_(t,e,r){const n=t.append("text"),i=d_(n,1,e);m_(i,[{content:r,type:"normal"}]);const a=i.node()?.getBoundingClientRect();return a&&n.remove(),a}function f_(t,e,r,n=!1){const i=e.append("g"),a=i.insert("rect").attr("class","background").attr("style","stroke: none"),s=i.append("text").attr("y","-10.1");let l=0;for(const e of r){const r=o((e=>p_(i,1.1,e)<=t),"checkWidth"),n=r(e)?[e]:l_(e,r);for(const t of n){m_(d_(s,l,1.1),t),l++}}if(n){const t=s.node().getBBox(),e=2;return a.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),i.node()}return s.node()}function m_(t,e){t.text(""),e.forEach(((e,r)=>{const n=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?n.text(e.content):n.text(" "+e.content)}))}function y_(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,(t=>``))}o(e_,"marked"),e_.options=e_.setOptions=function(t){return t_.setOptions(t),e_.defaults=t_.defaults,jk(e_.defaults),e_},e_.getDefaults=Gk,e_.defaults=qk,e_.use=function(...t){return t_.use(...t),e_.defaults=t_.defaults,jk(e_.defaults),e_},e_.walkTokens=function(t,e){return t_.walkTokens(t,e)},e_.parseInline=t_.parseInline,e_.Parser=ZT,e_.parser=ZT.parse,e_.Renderer=XT,e_.TextRenderer=KT,e_.Lexer=VT,e_.lexer=VT.lex,e_.Tokenizer=HT,e_.Hooks=QT,e_.parse=e_,e_.options,e_.setOptions,e_.use,e_.walkTokens,e_.parseInline,ZT.parse,VT.lex,o(r_,"preprocessMarkdown"),o(n_,"markdownToLines"),o(i_,"markdownToHTML"),o(a_,"splitTextToChars"),o(s_,"splitWordToFitWidth"),o(o_,"splitWordToFitWidthRecursion"),o(l_,"splitLineToFitWidth"),o(c_,"splitLineToFitWidthRecursion"),o(h_,"applyStyle"),o(u_,"addHtmlSpan"),o(d_,"createTspan"),o(p_,"computeWidthOfText"),o(g_,"computeDimensionOfText"),o(f_,"createFormattedText"),o(m_,"updateTextContentAndStyles"),o(y_,"replaceIconSubstring");var v_=o((async(t,e="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>{if(y.debug("XYZ createText",e,r,n,i,a,s,"addSvgBackground: ",l),a){const n=i_(e,c),a=y_($k(n)),h=e.replace(/\\\\/g,"\\"),u={isNode:s,label:Cr(e)?h:a,labelStyle:r.replace("fill:","color:")};return await u_(t,u,o,i,l)}{const n=f_(o,t,n_(e.replace(/
/g,"
").replace("
","
"),c),!!e&&l);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Ga(n).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Ga(n).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Ga(n).select("text").attr("style",e)}return n}}),"createText"),x_=o((async(t,e,r)=>{let n;const i=e.useHtmlLabels||yr(Qr()?.htmlLabels);n=r||"node default";const a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),s=a.insert("g").attr("class","label").attr("style",zk(e.labelStyle));let l;l=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const c=await v_(s,hr($k(l),Qr()),{useHtmlLabels:i,width:e.width||Qr().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img});let h=c.getBBox();const u=(e?.padding??0)/2;if(i){const t=c.children[0],e=Ga(c),r=t.getElementsByTagName("img");if(r){const t=""===l.replace(/]*>/g,"").trim();await Promise.all([...r].map((e=>new Promise((r=>{function n(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=Qr().fontSize?Qr().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[n=Lt.fontSize]=Dk(t),i=n*r+"px";e.style.minWidth=i,e.style.maxWidth=i}else e.style.width="100%";r(e)}o(n,"setupImage"),setTimeout((()=>{e.complete&&n()})),e.addEventListener("error",n),e.addEventListener("load",n)})))))}h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}return i?s.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):s.attr("transform","translate(0, "+-h.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:h,halfPadding:u,label:s}}),"labelHelper"),b_=o((async(t,e,r)=>{const n=r.useHtmlLabels||yr(Qr()?.flowchart?.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await v_(i,hr($k(e),Qr()),{useHtmlLabels:n,width:r.width||Qr()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let s=a.getBBox();const o=r.padding/2;if(yr(Qr()?.flowchart?.htmlLabels)){const t=a.children[0],e=Ga(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}return n?i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):i.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:o,label:i}}),"insertLabel"),w_=o(((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height}),"updateNodeBounds"),k_=o(((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||"")),"getNodeClasses");function T_(t){const e=t.map(((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`));return e.push("Z"),e.join(" ")}function __(t,e,r,n,i,a){const s=[],o=r-t,l=n-e,c=o/a,h=2*Math.PI/c,u=e+l/2;for(let e=0;e<=50;e++){const r=t+e/50*o,n=u+i*Math.sin(h*(r-t));s.push({x:r,y:n})}return s}function E_(t,e,r,n,i,a){const s=[],o=i*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let i=0;i
2&&n.push(t)}const i=[];e=Math.max(e,.1);const a=[];for(const t of n)for(let e=0;e t.ymin e.ymin?1:t.x e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax))),!a.length)return i;let s=[],o=a[0].ymin,l=0;for(;s.length||a.length;){if(a.length){let t=-1;for(let e=0;e o);e++)t=e;a.splice(0,t+1).forEach((t=>{s.push({s:o,edge:t})}))}if(s=s.filter((t=>!(t.edge.ymax<=o))),s.sort(((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x))),(1!==r||l%e==0)&&s.length>1)for(let t=0;t =s.length)break;const r=s[t].edge,n=s[e].edge;i.push([[Math.round(r.x),o],[Math.round(n.x),o]])}o+=r,s.forEach((t=>{t.edge.x=t.edge.x+r*t.edge.islope})),l++}return i}(s,a,n);if(i){for(const t of s)C_(t,o,-i);!function(t,e,r){const n=[];t.forEach((t=>n.push(...t))),C_(n,e,r)}(l,o,-i)}return l}function L_(t,e){var r;const n=e.hachureAngle+90;let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let a=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(a=i),A_(t,i,n,a||1)}o(T_,"createPathFromPoints"),o(__,"generateFullSineWavePoints"),o(E_,"generateCirclePoints"),o(C_,"t"),o(S_,"e"),o(A_,"s"),o(L_,"n");var N_=class{static{o(this,"o")}constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=L_(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const n of t)r.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],e));return r}};function I_(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}o(I_,"a");var R_=class extends N_{static{o(this,"h")}fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const n=L_(t,Object.assign({},e,{hachureGap:r})),i=Math.PI/180*e.hachureAngle,a=[],s=.5*r*Math.cos(i),o=.5*r*Math.sin(i);for(const[t,e]of n)I_([t,e])&&a.push([[t[0]-s,t[1]+o],[...e]],[[t[0]+s,t[1]-o],[...e]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}},M_=class extends N_{static{o(this,"r")}fillPolygons(t,e){const r=this._fillPolygons(t,e),n=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),i=this._fillPolygons(t,n);return r.ops=r.ops.concat(i.ops),r}},D_=class{static{o(this,"i")}constructor(t){this.helper=t}fillPolygons(t,e){const r=L_(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1);let i=e.fillWeight;i<0&&(i=e.strokeWidth/2);const a=n/4;for(const s of t){const t=I_(s),o=t/n,l=Math.ceil(o)-1,c=t-l*n,h=(s[0][0]+s[1][0])/2-n/4,u=Math.min(s[0][1],s[1][1]);for(let t=0;t {const a=I_(t),s=Math.floor(a/(r+n)),o=(a+n-s*(r+n))/2;let l=t[0],c=t[1];l[0]>c[0]&&(l=t[1],c=t[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let t=0;t {const i=I_(t),a=Math.round(i/(2*e));let s=t[0],o=t[1];s[0]>o[0]&&(s=t[1],o=t[0]);const l=Math.atan((o[1]-s[1])/(o[0]-s[0]));for(let t=0;tn%2?t+r:t+e));a.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":a.push({key:"Q",data:[...o]}),e=o[2],r=o[3];break;case"q":{const t=o.map(((t,n)=>n%2?t+r:t+e));a.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":a.push({key:"A",data:[...o]}),e=o[5],r=o[6];break;case"a":e+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],e,r]});break;case"H":a.push({key:"H",data:[...o]}),e=o[0];break;case"h":e+=o[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),e=o[2],r=o[3];break;case"s":{const t=o.map(((t,n)=>n%2?t+r:t+e));a.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":a.push({key:"T",data:[...o]}),e=o[0],r=o[1];break;case"t":e+=o[0],r+=o[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=n,r=i}return a}function q_(t){const e=[];let r="",n=0,i=0,a=0,s=0,o=0,l=0;for(const{key:c,data:h}of t){switch(c){case"M":e.push({key:"M",data:[...h]}),[n,i]=h,[a,s]=h;break;case"C":e.push({key:"C",data:[...h]}),n=h[4],i=h[5],o=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[n,i]=h;break;case"H":n=h[0],e.push({key:"L",data:[n,i]});break;case"V":i=h[0],e.push({key:"L",data:[n,i]});break;case"S":{let t=0,a=0;"C"===r||"S"===r?(t=n+(n-o),a=i+(i-l)):(t=n,a=i),e.push({key:"C",data:[t,a,...h]}),o=h[0],l=h[1],n=h[2],i=h[3];break}case"T":{const[t,a]=h;let s=0,c=0;"Q"===r||"T"===r?(s=n+(n-o),c=i+(i-l)):(s=n,c=i);const u=n+2*(s-n)/3,d=i+2*(c-i)/3,p=t+2*(s-t)/3,g=a+2*(c-a)/3;e.push({key:"C",data:[u,d,p,g,t,a]}),o=s,l=c,n=t,i=a;break}case"Q":{const[t,r,a,s]=h,c=n+2*(t-n)/3,u=i+2*(r-i)/3,d=a+2*(t-a)/3,p=s+2*(r-s)/3;e.push({key:"C",data:[c,u,d,p,a,s]}),o=t,l=r,n=a,i=s;break}case"A":{const t=Math.abs(h[0]),r=Math.abs(h[1]),a=h[2],s=h[3],o=h[4],l=h[5],c=h[6];0===t||0===r?(e.push({key:"C",data:[n,i,l,c,l,c]}),n=l,i=c):n===l&&i===c||(W_(n,i,l,c,t,r,a,s,o).forEach((function(t){e.push({key:"C",data:t})})),n=l,i=c);break}case"Z":e.push({key:"Z",data:[]}),n=a,i=s}r=c}return e}function j_(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function W_(t,e,r,n,i,a,s,o,l,c){const h=(u=s,Math.PI*u/180);var u;let d=[],p=0,g=0,f=0,m=0;if(c)[p,g,f,m]=c;else{[t,e]=j_(t,e,-h),[r,n]=j_(r,n,-h);const s=(t-r)/2,c=(e-n)/2;let u=s*s/(i*i)+c*c/(a*a);u>1&&(u=Math.sqrt(u),i*=u,a*=u);const d=i*i,y=a*a,v=d*y-d*c*c-y*s*s,x=d*c*c+y*s*s,b=(o===l?-1:1)*Math.sqrt(Math.abs(v/x));f=b*i*c/a+(t+r)/2,m=b*-a*s/i+(e+n)/2,p=Math.asin(parseFloat(((e-m)/a).toFixed(9))),g=Math.asin(parseFloat(((n-m)/a).toFixed(9))),tg&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let y=g-p;if(Math.abs(y)>120*Math.PI/180){const t=g,e=r,o=n;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=W_(r=f+i*Math.cos(g),n=m+a*Math.sin(g),e,o,i,a,s,0,l,[g,t,f,m])}y=g-p;const v=Math.cos(p),x=Math.sin(p),b=Math.cos(g),w=Math.sin(g),k=Math.tan(y/4),T=4/3*i*k,_=4/3*a*k,E=[t,e],C=[t+T*x,e-_*v],S=[r+T*w,n-_*b],A=[r,n];if(C[0]=2*E[0]-C[0],C[1]=2*E[1]-C[1],c)return[C,S,A].concat(d);{d=[C,S,A].concat(d);const t=[];for(let e=0;e 2){const i=[];for(let e=0;e 2*Math.PI&&(p=0,g=2*Math.PI);const f=2*Math.PI/l.curveStepCount,m=Math.min(f/2,(g-p)/2),y=dE(m,c,h,u,d,p,g,1,l);if(!l.disableMultiStroke){const t=dE(m,c,h,u,d,p,g,1.5,l);y.push(...t)}return s&&(o?y.push(...oE(c,h,c+u*Math.cos(p),h+d*Math.sin(p),l),...oE(c,h,c+u*Math.cos(g),h+d*Math.sin(g),l)):y.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(p),h+d*Math.sin(p)]})),{type:"path",ops:y}}function tE(t,e){const r=q_(G_(U_(t))),n=[];let i=[0,0],a=[0,0];for(const{key:t,data:s}of r)switch(t){case"M":a=[s[0],s[1]],i=[s[0],s[1]];break;case"L":n.push(...oE(a[0],a[1],s[0],s[1],e)),a=[s[0],s[1]];break;case"C":{const[t,r,i,o,l,c]=s;n.push(...pE(t,r,i,o,l,c,a,e)),a=[l,c];break}case"Z":n.push(...oE(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function eE(t,e){const r=[];for(const n of t)if(n.length){const t=e.maxRandomnessOffset||0,i=n.length;if(i>2){r.push({op:"move",data:[n[0][0]+sE(t,e),n[0][1]+sE(t,e)]});for(let a=1;a500?.4:-.0016668*c+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>l&&(u=c/10);const d=u/2,p=.2+.2*iE(i);let g=i.bowing*i.maxRandomnessOffset*(n-e)/200,f=i.bowing*i.maxRandomnessOffset*(t-r)/200;g=sE(g,i,h),f=sE(f,i,h);const m=[],y=o((()=>sE(d,i,h)),"M"),v=o((()=>sE(u,i,h)),"k"),x=i.preserveVertices;return a&&(s?m.push({op:"move",data:[t+(x?0:y()),e+(x?0:y())]}):m.push({op:"move",data:[t+(x?0:sE(u,i,h)),e+(x?0:sE(u,i,h))]})),s?m.push({op:"bcurveTo",data:[g+t+(r-t)*p+y(),f+e+(n-e)*p+y(),g+t+2*(r-t)*p+y(),f+e+2*(n-e)*p+y(),r+(x?0:y()),n+(x?0:y())]}):m.push({op:"bcurveTo",data:[g+t+(r-t)*p+v(),f+e+(n-e)*p+v(),g+t+2*(r-t)*p+v(),f+e+2*(n-e)*p+v(),r+(x?0:v()),n+(x?0:v())]}),m}function cE(t,e,r){if(!t.length)return[];const n=[];n.push([t[0][0]+sE(e,r),t[0][1]+sE(e,r)]),n.push([t[0][0]+sE(e,r),t[0][1]+sE(e,r)]);for(let i=1;i 3){const a=[],s=1-r.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2 1&&i.push(r)):i.push(r),i.push(t[e+3])}else{const n=.5,a=t[e+0],s=t[e+1],o=t[e+2],l=t[e+3],c=vE(a,s,n),h=vE(s,o,n),u=vE(o,l,n),d=vE(c,h,n),p=vE(h,u,n),g=vE(d,p,n);xE([a,c,d,g],0,r,i),xE([g,p,u,l],0,r,i)}var a,s;return i}function bE(t,e){return wE(t,0,t.length,e)}function wE(t,e,r,n,i){const a=i||[],s=t[e],o=t[r-1];let l=0,c=1;for(let n=e+1;n l&&(l=e,c=n)}return Math.sqrt(l)>n?(wE(t,e,c+1,n,a),wE(t,c,r,n,a)):(a.length||a.push(s),a.push(o)),a}function kE(t,e=.15,r){const n=[],i=(t.length-1)/3;for(let r=0;r0?wE(n,0,n.length,r):n}o(H_,"v"),o(V_,"S"),o(X_,"O"),o(K_,"L"),o(Z_,"T"),o(Q_,"D"),o(J_,"A"),o(tE,"_"),o(eE,"I"),o(rE,"C"),o(nE,"z"),o(iE,"W"),o(aE,"E"),o(sE,"G"),o(oE,"$"),o(lE,"R"),o(cE,"j"),o(hE,"q"),o(uE,"F"),o(dE,"V"),o(pE,"Z"),o(gE,"Q"),o(fE,"H"),o(mE,"N"),o(yE,"B"),o(vE,"J"),o(xE,"K"),o(bE,"U"),o(wE,"X"),o(kE,"Y");var TE="none",_E=class{static{o(this,"et")}constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,n,i){const a=this._o(i);return this._d("line",[H_(t,e,r,n,a)],a)}rectangle(t,e,r,n,i){const a=this._o(i),s=[],o=X_(t,e,r,n,a);if(a.fill){const i=[[t,e],[t+r,e],[t+r,e+n],[t,e+n]];"solid"===a.fillStyle?s.push(eE([i],a)):s.push(rE([i],a))}return a.stroke!==TE&&s.push(o),this._d("rectangle",s,a)}ellipse(t,e,r,n,i){const a=this._o(i),s=[],o=Z_(r,n,a),l=Q_(t,e,a,o);if(a.fill)if("solid"===a.fillStyle){const r=Q_(t,e,a,o).opset;r.type="fillPath",s.push(r)}else s.push(rE([l.estimatedPoints],a));return a.stroke!==TE&&s.push(l.opset),this._d("ellipse",s,a)}circle(t,e,r,n){const i=this.ellipse(t,e,r,r,n);return i.shape="circle",i}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[V_(t,!1,r)],r)}arc(t,e,r,n,i,a,s=!1,o){const l=this._o(o),c=[],h=J_(t,e,r,n,i,a,s,!0,l);if(s&&l.fill)if("solid"===l.fillStyle){const s=Object.assign({},l);s.disableMultiStroke=!0;const o=J_(t,e,r,n,i,a,!0,!1,s);o.type="fillPath",c.push(o)}else c.push(function(t,e,r,n,i,a,s){const o=t,l=e;let c=Math.abs(r/2),h=Math.abs(n/2);c+=sE(.01*c,s),h+=sE(.01*h,s);let u=i,d=a;for(;u<0;)u+=2*Math.PI,d+=2*Math.PI;d-u>2*Math.PI&&(u=0,d=2*Math.PI);const p=(d-u)/s.curveStepCount,g=[];for(let t=u;t<=d;t+=p)g.push([o+c*Math.cos(t),l+h*Math.sin(t)]);return g.push([o+c*Math.cos(d),l+h*Math.sin(d)]),g.push([o,l]),rE([g],s)}(t,e,r,n,i,a,l));return l.stroke!==TE&&c.push(h),this._d("arc",c,l)}curve(t,e){const r=this._o(e),n=[],i=K_(t,r);if(r.fill&&r.fill!==TE)if("solid"===r.fillStyle){const e=K_(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],i=t;if(i.length){const t="number"==typeof i[0][0]?[i]:i;for(const n of t)n.length<3?e.push(...n):3===n.length?e.push(...kE(fE([n[0],n[0],n[1],n[2]]),10,(1+r.roughness)/2)):e.push(...kE(fE(n),10,(1+r.roughness)/2))}e.length&&n.push(rE([e],r))}return r.stroke!==TE&&n.push(i),this._d("curve",n,r)}polygon(t,e){const r=this._o(e),n=[],i=V_(t,!0,r);return r.fill&&("solid"===r.fillStyle?n.push(eE([t],r)):n.push(rE([t],r))),r.stroke!==TE&&n.push(i),this._d("polygon",n,r)}path(t,e){const r=this._o(e),n=[];if(!t)return this._d("path",n,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const i=r.fill&&"transparent"!==r.fill&&r.fill!==TE,a=r.stroke!==TE,s=!!(r.simplification&&r.simplification<1),l=function(t,e,r){const n=q_(G_(U_(t))),i=[];let a=[],s=[0,0],l=[];const c=o((()=>{l.length>=4&&a.push(...kE(l,1)),l=[]}),"i"),h=o((()=>{c(),a.length&&(i.push(a),a=[])}),"c");for(const{key:t,data:e}of n)switch(t){case"M":h(),s=[e[0],e[1]],a.push(s);break;case"L":c(),a.push([e[0],e[1]]);break;case"C":if(!l.length){const t=a.length?a[a.length-1]:s;l.push([t[0],t[1]])}l.push([e[0],e[1]]),l.push([e[2],e[3]]),l.push([e[4],e[5]]);break;case"Z":c(),a.push([s[0],s[1]])}if(h(),!r)return i;const u=[];for(const t of i){const e=bE(t,r);e.length&&u.push(e)}return u}(t,0,s?4-4*(r.simplification||1):(1+r.roughness)/2),c=tE(t,r);if(i)if("solid"===r.fillStyle)if(1===l.length){const e=tE(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else n.push(eE(l,r));else n.push(rE(l,r));return a&&(s?l.forEach((t=>{n.push(V_(t,!1,r))})):n.push(c)),this._d("path",n,r)}opsToPath(t,e){let r="";for(const n of t.ops){const t="number"==typeof e&&e>=0?n.data.map((t=>+t.toFixed(e))):n.data;switch(n.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,n=[];for(const t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:TE};break;case"fillPath":e={d:this.opsToPath(t),stroke:TE,strokeWidth:0,fill:r.fill||TE};break;case"fillSketch":e=this.fillSketch(t,r)}e&&n.push(e)}return n}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||TE,strokeWidth:r,fill:TE}}_mergedShape(t){return t.filter(((t,e)=>0===e||"move"!==t.op))}},EE=class{static{o(this,"st")}constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new _E(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),n=this.ctx,i=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":n.save(),n.strokeStyle="none"===r.stroke?"transparent":r.stroke,n.lineWidth=r.strokeWidth,r.strokeLineDash&&n.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(n.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(n,a,i),n.restore();break;case"fillPath":{n.save(),n.fillStyle=r.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(n,a,i,e),n.restore();break}case"fillSketch":this.fillSketch(n,a,r)}}fillSketch(t,e,r){let n=r.fillWeight;n<0&&(n=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=n,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,n="nonzero"){t.beginPath();for(const n of e.ops){const e="number"==typeof r&&r>=0?n.data.map((t=>+t.toFixed(r))):n.data;switch(n.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,n,i){const a=this.gen.line(t,e,r,n,i);return this.draw(a),a}rectangle(t,e,r,n,i){const a=this.gen.rectangle(t,e,r,n,i);return this.draw(a),a}ellipse(t,e,r,n,i){const a=this.gen.ellipse(t,e,r,n,i);return this.draw(a),a}circle(t,e,r,n){const i=this.gen.circle(t,e,r,n);return this.draw(i),i}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r),r}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r),r}arc(t,e,r,n,i,a,s=!1,o){const l=this.gen.arc(t,e,r,n,i,a,s,o);return this.draw(l),l}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r),r}path(t,e){const r=this.gen.path(t,e);return this.draw(r),r}},CE="http://www.w3.org/2000/svg",SE=class{static{o(this,"ot")}constructor(t,e){this.svg=t,this.gen=new _E(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,i=n.createElementNS(CE,"g"),a=t.options.fixedDecimalPlaceDigits;for(const s of e){let e=null;switch(s.type){case"path":e=n.createElementNS(CE,"path"),e.setAttribute("d",this.opsToPath(s,a)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=n.createElementNS(CE,"path"),e.setAttribute("d",this.opsToPath(s,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(n,s,r)}e&&i.appendChild(e)}return i}fillSketch(t,e,r){let n=r.fillWeight;n<0&&(n=r.strokeWidth/2);const i=t.createElementNS(CE,"path");return i.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),i.setAttribute("stroke",r.fill||""),i.setAttribute("stroke-width",n+""),i.setAttribute("fill","none"),r.fillLineDash&&i.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&i.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,n,i){const a=this.gen.line(t,e,r,n,i);return this.draw(a)}rectangle(t,e,r,n,i){const a=this.gen.rectangle(t,e,r,n,i);return this.draw(a)}ellipse(t,e,r,n,i){const a=this.gen.ellipse(t,e,r,n,i);return this.draw(a)}circle(t,e,r,n){const i=this.gen.circle(t,e,r,n);return this.draw(i)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,n,i,a,s=!1,o){const l=this.gen.arc(t,e,r,n,i,a,s,o);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}},AE={canvas:o(((t,e)=>new EE(t,e)),"canvas"),svg:o(((t,e)=>new SE(t,e)),"svg"),generator:o((t=>new _E(t)),"generator"),newSeed:o((()=>_E.newSeed()),"newSeed")},LE=o(((t,e)=>{var r,n,i=t.x,a=t.y,s=e.x-i,o=e.y-a,l=t.width/2,c=t.height/2;return Math.abs(o)*l>Math.abs(s)*c?(o<0&&(c=-c),r=0===o?0:c*s/o,n=c):(s<0&&(l=-l),r=l,n=0===s?0:l*o/s),{x:i+r,y:a+n}}),"intersectRect"),NE=LE;function IE(t,e){e&&t.attr("style",e)}async function RE(t){const e=Ga(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div");let n=t.label;t.label&&Cr(t.label)&&(n=await Ar(t.label.replace(Lr.lineBreakRegex,"\n"),Qr()));const i=t.isNode?"nodeLabel":"edgeLabel";return r.html('"+n+""),IE(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}o(IE,"applyStyle"),o(RE,"addHtmlLabel");var ME=o((async(t,e,r,n)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),yr(Qr().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
"),y.info("vertexText"+i);const t={isNode:n,label:$k(i).replace(/fa[blrs]?:fa-[\w-]+/g,(t=>``)),labelStyle:e?e.replace("fill:","color:"):e};return await RE(t)}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let n=[];n="string"==typeof i?i.split(/\\n|\n|
/gi):Array.isArray(i)?i:[];for(const e of n){const n=document.createElementNS("http://www.w3.org/2000/svg","tspan");n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),n.setAttribute("dy","1em"),n.setAttribute("x","0"),r?n.setAttribute("class","title-row"):n.setAttribute("class","row"),n.textContent=e.trim(),t.appendChild(n)}return t}}),"createLabel"),DE=ME,OE=o(((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" ")),"createRoundedRectPathD"),PE=o((t=>{const{handDrawnSeed:e}=Qr();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}}),"solidStateFill"),BE=o((t=>{const e=$E([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}}),"compileStyles"),$E=o((t=>{const e=new Map;return t.forEach((t=>{const[r,n]=t.split(":");e.set(r.trim(),n?.trim())})),e}),"styles2Map"),FE=o((t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t),"isLabelStyle"),zE=o((t=>{const{stylesArray:e}=BE(t),r=[],n=[],i=[],a=[];return e.forEach((t=>{const e=t[0];FE(e)?r.push(t.join(":")+" !important"):(n.push(t.join(":")+" !important"),e.includes("stroke")&&i.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))})),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}}),"styles2String"),UE=o(((t,e)=>{const{themeVariables:r,handDrawnSeed:n}=Qr(),{nodeBorder:i,mainBkg:a}=r,{stylesMap:s}=BE(t);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||i,seed:n,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},e)}),"userNodeOverrides"),GE=o((async(t,e)=>{y.info("Creating subgraph rect for ",e.id,e);const r=Qr(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=zE(e),u=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),d=yr(r.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await v_(p,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0});let f=g.getBBox();if(yr(r.flowchart.htmlLabels)){const t=g.children[0],e=Ga(g);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}const m=e.width<=f.width+e.padding?f.width+e.padding:e.width;e.width<=f.width+e.padding?e.diff=(m-e.width)/2-e.padding:e.diff=-e.padding;const v=e.height,x=e.x-m/2,b=e.y-v/2;let w;if(y.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=AE.svg(u),r=UE(e,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),n=t.path(OE(x,b,m,v,0),r);w=u.insert((()=>(y.debug("Rough node insert CXC",n),n)),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",x).attr("y",b).attr("width",m).attr("height",v);const{subGraphTitleTopMargin:k}=qy(r);if(p.attr("transform",`translate(${e.x-f.width/2}, ${e.y-e.height/2+k})`),o){const t=p.select("span");t&&t.attr("style",o)}const T=w.node().getBBox();return e.offsetX=0,e.width=T.width,e.height=T.height,e.offsetY=f.height-e.padding/2,e.intersect=function(t){return NE(e,t)},{cluster:u,labelBBox:f}}),"rect"),qE=o(((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");const s=n.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(t){return NE(e,t)},{cluster:r,labelBBox:{width:0,height:0}}}),"noteGroup"),jE=o((async(t,e)=>{const r=Qr(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:o,nodeBorder:l}=n,c=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let d=c.append("rect");const p=u.node().appendChild(await DE(e.label,e.labelStyle,void 0,!0));let g=p.getBBox();if(yr(r.flowchart.htmlLabels)){const t=p.children[0],e=Ga(p);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}const f=0*e.padding,m=f/2,y=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+f;e.width<=g.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;const v=e.height+f,x=e.height+f-g.height-6,b=e.x-y/2,w=e.y-v/2;e.width=y;const k=e.y-e.height/2-m+g.height+2;let T;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=AE.svg(c),n=e.rx||e.ry?r.path(OE(b,w,y,v,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:i}):r.rectangle(b,w,y,v,{seed:i});T=c.insert((()=>n),":first-child");const h=r.rectangle(b,k,y,x,{fill:t?a:s,fillStyle:t?"hachure":"solid",stroke:l,seed:i});T=c.insert((()=>n),":first-child"),d=c.insert((()=>h))}else{T=h.insert("rect",":first-child");const t="outer";T.attr("class",t).attr("x",b).attr("y",w).attr("width",y).attr("height",v).attr("data-look",e.look),d.attr("class","inner").attr("x",b).attr("y",k).attr("width",y).attr("height",x)}u.attr("transform",`translate(${e.x-g.width/2}, ${w+1-(yr(r.flowchart.htmlLabels)?0:3)})`);const _=T.node().getBBox();return e.height=_.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(t){return NE(e,t)},{cluster:c,labelBBox:g}}),"roundedWithTitle"),WE=o((async(t,e)=>{y.info("Creating subgraph rect for ",e.id,e);const r=Qr(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=zE(e),u=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),d=yr(r.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await v_(p,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0,width:e.width});let f=g.getBBox();if(yr(r.flowchart.htmlLabels)){const t=g.children[0],e=Ga(g);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}const m=e.width<=f.width+e.padding?f.width+e.padding:e.width;e.width<=f.width+e.padding?e.diff=(m-e.width)/2-e.padding:e.diff=-e.padding;const v=e.height,x=e.x-m/2,b=e.y-v/2;let w;if(y.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=AE.svg(u),r=UE(e,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:i}),n=t.path(OE(x,b,m,v,e.rx),r);w=u.insert((()=>(y.debug("Rough node insert CXC",n),n)),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",x).attr("y",b).attr("width",m).attr("height",v);const{subGraphTitleTopMargin:k}=qy(r);if(p.attr("transform",`translate(${e.x-f.width/2}, ${e.y-e.height/2+k})`),o){const t=p.select("span");t&&t.attr("style",o)}const T=w.node().getBBox();return e.offsetX=0,e.width=T.width,e.height=T.height,e.offsetY=f.height-e.padding/2,e.intersect=function(t){return NE(e,t)},{cluster:u,labelBBox:f}}),"kanbanSection"),YE=o(((t,e)=>{const r=Qr(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),o=s.insert("g",":first-child"),l=0*e.padding,c=e.width+l;e.diff=-e.padding;const h=e.height+l,u=e.x-c/2,d=e.y-h/2;let p;if(e.width=c,"handDrawn"===e.look){const t=AE.svg(s).rectangle(u,d,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});p=s.insert((()=>t),":first-child")}else{p=o.insert("rect",":first-child");const t="divider";p.attr("class",t).attr("x",u).attr("y",d).attr("width",c).attr("height",h).attr("data-look",e.look)}const g=p.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return NE(e,t)},{cluster:s,labelBBox:{}}}),"divider"),HE={rect:GE,squareRect:GE,roundedWithTitle:jE,noteGroup:qE,divider:YE,kanbanSection:WE},VE=new Map,XE=o((async(t,e)=>{const r=e.shape||"rect",n=await HE[r](t,e);return VE.set(e.id,n),n}),"insertCluster"),KE=o((()=>{VE=new Map}),"clear");function ZE(t,e){return t.intersect(e)}o(ZE,"intersectNode");var QE=ZE;function JE(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,o=a-n.y,l=Math.sqrt(e*e*o*o+r*r*s*s),c=Math.abs(e*r*s/l);n.x0}o(nC,"intersectLine"),o(iC,"sameSign");var aC=nC;function sC(t,e,r){let n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)})):(s=Math.min(s,e.x),o=Math.min(o,e.y));let l=n-t.width/2-s,c=i-t.height/2-o;for(let n=0;n1&&a.sort((function(t,e){let n=t.x-r.x,i=t.y-r.y,a=Math.sqrt(n*n+i*i),s=e.x-r.x,o=e.y-r.y,l=Math.sqrt(s*s+o*o);return a c),":first-child");return h.attr("class","anchor").attr("style",zk(s)),w_(e,h),e.intersect=function(t){return y.info("Circle intersect",e,1,t),oC.circle(e,1,t)},a}function cC(t,e,r,n,i,a,s){const o=(t+r)/2,l=(e+n)/2,c=Math.atan2(n-e,r-t),h=(r-t)/2/i,u=(n-e)/2/a,d=Math.sqrt(h**2+u**2);if(d>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-d**2),g=o+p*a*Math.sin(c)*(s?-1:1),f=l-p*i*Math.cos(c)*(s?-1:1),m=Math.atan2((e-f)/a,(t-g)/i);let y=Math.atan2((n-f)/a,(r-g)/i)-m;s&&y<0&&(y+=2*Math.PI),!s&&y>0&&(y-=2*Math.PI);const v=[];for(let t=0;t<20;t++){const e=m+t/19*y,r=g+i*Math.cos(e),n=f+a*Math.sin(e);v.push({x:r,y:n})}return v}async function hC(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await x_(t,e,k_(e)),s=a.width+e.padding+20,o=a.height+e.padding,l=o/2,c=l/(2.5+o/50),{cssStyles:h}=e,u=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...cC(-s/2,-o/2,-s/2,o/2,c,l,!1),{x:s/2,y:o/2},...cC(s/2,o/2,s/2,-o/2,c,l,!0)],d=AE.svg(i),p=UE(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=T_(u),f=d.path(g,p),m=i.insert((()=>f),":first-child");return m.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(${c/2}, 0)`),w_(e,m),e.intersect=function(t){return oC.polygon(e,u,t)},i}function uC(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}async function dC(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await x_(t,e,k_(e)),s=a.height+e.padding,o=a.width+e.padding+12,l=-s,c=[{x:12,y:l},{x:o,y:l},{x:o,y:0},{x:0,y:0},{x:0,y:l+12},{x:12,y:l}];let h;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=AE.svg(i),r=UE(e,{}),n=T_(c),a=t.path(n,r);h=i.insert((()=>a),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),u&&h.attr("style",u)}else h=uC(i,o,s,c);return n&&h.attr("style",n),w_(e,h),e.intersect=function(t){return oC.polygon(e,c,t)},i}function pC(t,e){const{nodeStyles:r}=zE(e);e.label="";const n=t.insert("g").attr("class",k_(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=AE.svg(n),l=UE(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const c=T_(s),h=o.path(c,l),u=n.insert((()=>h),":first-child");return i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),r&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return oC.polygon(e,s,t)},n}async function gC(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,halfPadding:s}=await x_(t,e,k_(e)),o=a.width/2+s;let l;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=AE.svg(i),r=UE(e,{}),n=t.circle(0,0,2*o,r);l=i.insert((()=>n),":first-child"),l.attr("class","basic label-container").attr("style",zk(c))}else l=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",o).attr("cx",0).attr("cy",0);return w_(e,l),e.intersect=function(t){return y.info("Circle intersect",e,o,t),oC.circle(e,o,t)},i}function fC(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=2*t;return`M ${-n/2*e},${n/2*r} L ${n/2*e},${-n/2*r}\n M ${n/2*e},${n/2*r} L ${-n/2*e},${-n/2*r}`}function mC(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r,e.label="";const i=t.insert("g").attr("class",k_(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:s}=e,o=AE.svg(i),l=UE(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const c=o.circle(0,0,2*a,l),h=fC(a),u=o.path(h,l),d=i.insert((()=>c),":first-child");return d.insert((()=>u)),s&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",s),n&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",n),w_(e,d),e.intersect=function(t){y.info("crossedCircle intersect",e,{radius:a,point:t});return oC.circle(e,a,t)},i}function yC(t,e,r,n=100,i=0,a=180){const s=[],o=i*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let i=0;i v),":first-child").attr("stroke-opacity",0),x.insert((()=>m),":first-child"),x.attr("class","text"),h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),w_(e,x),e.intersect=function(t){return oC.polygon(e,d,t)},i}function xC(t,e,r,n=100,i=0,a=180){const s=[],o=i*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let i=0;i v),":first-child").attr("stroke-opacity",0),x.insert((()=>m),":first-child"),x.attr("class","text"),h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),w_(e,x),e.intersect=function(t){return oC.polygon(e,d,t)},i}function wC(t,e,r,n=100,i=0,a=180){const s=[],o=i*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let i=0;i w),":first-child").attr("stroke-opacity",0),k.insert((()=>y),":first-child"),k.insert((()=>x),":first-child"),k.attr("class","text"),h&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),w_(e,k),e.intersect=function(t){return oC.polygon(e,p,t)},i}async function TC(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await x_(t,e,k_(e)),s=Math.max(80,1.25*(a.width+2*(e.padding??0)),e?.width??0),o=Math.max(20,a.height+2*(e.padding??0),e?.height??0),l=o/2,{cssStyles:c}=e,h=AE.svg(i),u=UE(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const d=s-l,p=o/4,g=[{x:d,y:0},{x:p,y:0},{x:0,y:o/2},{x:p,y:o},{x:d,y:o},...E_(-d,-o/2,l,50,270,90)],f=T_(g),m=h.path(f,u),y=i.insert((()=>m),":first-child");return y.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",c),n&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",n),y.attr("transform",`translate(${-s/2}, ${-o/2})`),w_(e,y),e.intersect=function(t){return oC.polygon(e,g,t)},i}o(lC,"anchor"),o(cC,"generateArcPoints"),o(hC,"bowTieRect"),o(uC,"insertPolygonShape"),o(dC,"card"),o(pC,"choice"),o(gC,"circle"),o(fC,"createLine"),o(mC,"crossedCircle"),o(yC,"generateCirclePoints"),o(vC,"curlyBraceLeft"),o(xC,"generateCirclePoints"),o(bC,"curlyBraceRight"),o(wC,"generateCirclePoints"),o(kC,"curlyBraces"),o(TC,"curvedTrapezoid");var _C=o(((t,e,r,n,i,a)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" ")),"createCylinderPathD"),EC=o(((t,e,r,n,i,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" ")),"createOuterCylinderPathD"),CC=o(((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" ")),"createInnerCylinderPathD");async function SC(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await x_(t,e,k_(e)),o=Math.max(a.width+e.padding,e.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(a.height+c+e.padding,e.height??0);let u;const{cssStyles:d}=e;if("handDrawn"===e.look){const t=AE.svg(i),r=EC(0,0,o,h,l,c),n=CC(0,c,o,h,l,c),a=t.path(r,UE(e,{})),s=t.path(n,UE(e,{fill:"none"}));u=i.insert((()=>s),":first-child"),u=i.insert((()=>a),":first-child"),u.attr("class","basic label-container"),d&&u.attr("style",d)}else{const t=_C(0,0,o,h,l,c);u=i.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",zk(d)).attr("style",n)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),w_(e,u),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-a.height/2+(e.padding??0)/1.5-(a.y-(a.top??0))})`),e.intersect=function(t){const r=oC.rect(e,t),n=r.x-(e.x??0);if(0!=l&&(Math.abs(n)<(e.width??0)/2||Math.abs(n)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-c)){let i=c*c*(1-n*n/(l*l));i>0&&(i=Math.sqrt(i)),i=c-i,t.y-(e.y??0)>0&&(i=-i),r.y+=i}return r},i}async function AC(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await x_(t,e,k_(e)),o=a.width+e.padding,l=a.height+e.padding,c=.2*l,h=-o/2,u=-l/2-c/2,{cssStyles:d}=e,p=AE.svg(i),g=UE(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],m=p.polygon(f.map((t=>[t.x,t.y])),g),y=i.insert((()=>m),":first-child");return y.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",d),n&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",n),s.attr("transform",`translate(${h+(e.padding??0)/2-(a.x-(a.left??0))}, ${u+c+(e.padding??0)/2-(a.y-(a.top??0))})`),w_(e,y),e.intersect=function(t){return oC.rect(e,t)},i}async function LC(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,halfPadding:s}=await x_(t,e,k_(e)),o=a.width/2+s+5,l=a.width/2+s;let c;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=AE.svg(i),r=UE(e,{roughness:.2,strokeWidth:2.5}),n=UE(e,{roughness:.2,strokeWidth:1.5}),a=t.circle(0,0,2*o,r),s=t.circle(0,0,2*l,n);c=i.insert("g",":first-child"),c.attr("class",zk(e.cssClasses)).attr("style",zk(h)),c.node()?.appendChild(a),c.node()?.appendChild(s)}else{c=i.insert("g",":first-child");const t=c.insert("circle",":first-child"),e=c.insert("circle");c.attr("class","basic label-container").attr("style",n),t.attr("class","outer-circle").attr("style",n).attr("r",o).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",n).attr("r",l).attr("cx",0).attr("cy",0)}return w_(e,c),e.intersect=function(t){return y.info("DoubleCircle intersect",e,o,t),oC.circle(e,o,t)},i}function NC(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=zE(e);e.label="",e.labelStyle=n;const a=t.insert("g").attr("class",k_(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,o=AE.svg(a),{nodeBorder:l}=r,c=UE(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(c.roughness=0);const h=o.circle(0,0,14,c),u=a.insert((()=>h),":first-child");return u.selectAll("path").attr("style",`fill: ${l} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),w_(e,u),e.intersect=function(t){y.info("filledCircle intersect",e,{radius:7,point:t});return oC.circle(e,7,t)},a}async function IC(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await x_(t,e,k_(e)),o=a.width+(e.padding??0),l=o+a.height,c=o+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=e,d=AE.svg(i),p=UE(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=T_(h),f=d.path(g,p),m=i.insert((()=>f),":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",u),n&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",n),e.width=o,e.height=l,w_(e,m),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(t){return y.info("Triangle intersect",e,h,t),oC.polygon(e,h,t)},i}function RC(t,e,{dir:r,config:{state:n,themeVariables:i}}){const{nodeStyles:a}=zE(e);e.label="";const s=t.insert("g").attr("class",k_(e)).attr("id",e.domId??e.id),{cssStyles:o}=e;let l=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===r&&(l=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));const h=-1*l/2,u=-1*c/2,d=AE.svg(s),p=UE(e,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=d.rectangle(h,u,l,c,p),f=s.insert((()=>g),":first-child");o&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",o),a&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",a),w_(e,f);const m=n?.padding??0;return e.width&&e.height&&(e.width+=m/2||0,e.height+=m/2||0),e.intersect=function(t){return oC.rect(e,t)},s}async function MC(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await x_(t,e,k_(e)),s=Math.max(80,a.width+2*(e.padding??0),e?.width??0),o=Math.max(50,a.height+2*(e.padding??0),e?.height??0),l=o/2,{cssStyles:c}=e,h=AE.svg(i),u=UE(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const d=[{x:-s/2,y:-o/2},{x:s/2-l,y:-o/2},...E_(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},{x:-s/2,y:o/2}],p=T_(d),g=h.path(p,u),f=i.insert((()=>g),":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",c),n&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",n),w_(e,f),e.intersect=function(t){y.info("Pill intersect",e,{radius:l,point:t});return oC.polygon(e,d,t)},i}o(SC,"cylinder"),o(AC,"dividedRectangle"),o(LC,"doublecircle"),o(NC,"filledCircle"),o(IC,"flippedTriangle"),o(RC,"forkJoin"),o(MC,"halfRoundedRectangle");var DC=o(((t,e,r,n,i)=>[`M${t+i},${e}`,`L${t+r-i},${e}`,`L${t+r},${e-n/2}`,`L${t+r-i},${e-n}`,`L${t+i},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" ")),"createHexagonPathD");async function OC(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await x_(t,e,k_(e)),s=a.height+e.padding,o=s/4,l=a.width+2*o+e.padding,c=[{x:o,y:0},{x:l-o,y:0},{x:l,y:-s/2},{x:l-o,y:-s},{x:o,y:-s},{x:0,y:-s/2}];let h;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=AE.svg(i),r=UE(e,{}),n=DC(0,0,l,s,o),a=t.path(n,r);h=i.insert((()=>a),":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),u&&h.attr("style",u)}else h=uC(i,l,s,c);return n&&h.attr("style",n),e.width=l,e.height=s,w_(e,h),e.intersect=function(t){return oC.polygon(e,c,t)},i}async function PC(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.label="",e.labelStyle=r;const{shapeSvg:i}=await x_(t,e,k_(e)),a=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:o}=e,l=AE.svg(i),c=UE(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],u=T_(h),d=l.path(u,c),p=i.insert((()=>d),":first-child");return p.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",o),n&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",n),p.attr("transform",`translate(${-a/2}, ${-s/2})`),w_(e,p),e.intersect=function(t){y.info("Pill intersect",e,{points:h});return oC.polygon(e,h,t)},i}async function BC(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=zE(e);e.labelStyle=i;const a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await x_(t,e,"icon-shape default"),d="t"===e.pos,p=o,g=o,{nodeBorder:f}=r,{stylesMap:m}=BE(e),v=-g/2,x=-p/2,b=e.label?8:0,w=AE.svg(c),k=UE(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const T=w.rectangle(v,x,g,p,k),_=Math.max(g,h.width),E=p+h.height+b,C=w.rectangle(-_/2,-E/2,_,E,{...k,fill:"transparent",stroke:"none"}),S=c.insert((()=>T),":first-child"),A=c.insert((()=>C));if(e.icon){const t=c.append("g");t.html(` ${await Gy(e.icon,{height:o,width:o,fallbackPrefix:""})} `);const r=t.node().getBBox(),n=r.width,i=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-n/2-a},${d?h.height/2+b/2-i/2-s:-h.height/2-b/2-i/2-s})`),t.attr("style",`color: ${m.get("stroke")??f};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-E/2:E/2-h.height})`),S.attr("transform",`translate(0,${d?h.height/2+b/2:-h.height/2-b/2})`),w_(e,A),e.intersect=function(t){if(y.info("iconSquare intersect",e,t),!e.label)return oC.rect(e,t);const r=e.x??0,n=e.y??0,i=e.height??0;let a=[];a=d?[{x:r-h.width/2,y:n-i/2},{x:r+h.width/2,y:n-i/2},{x:r+h.width/2,y:n-i/2+h.height+b},{x:r+g/2,y:n-i/2+h.height+b},{x:r+g/2,y:n+i/2},{x:r-g/2,y:n+i/2},{x:r-g/2,y:n-i/2+h.height+b},{x:r-h.width/2,y:n-i/2+h.height+b}]:[{x:r-g/2,y:n-i/2},{x:r+g/2,y:n-i/2},{x:r+g/2,y:n-i/2+p},{x:r+h.width/2,y:n-i/2+p},{x:r+h.width/2/2,y:n+i/2},{x:r-h.width/2,y:n+i/2},{x:r-h.width/2,y:n-i/2+p},{x:r-g/2,y:n-i/2+p}];return oC.polygon(e,a,t)},c}async function $C(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=zE(e);e.labelStyle=i;const a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await x_(t,e,"icon-shape default"),d=e.label?8:0,p="t"===e.pos,{nodeBorder:g,mainBkg:f}=r,{stylesMap:m}=BE(e),v=AE.svg(c),x=UE(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=m.get("fill");x.stroke=b??f;const w=c.append("g");e.icon&&w.html(`${await Gy(e.icon,{height:o,width:o,fallbackPrefix:""})} `);const k=w.node().getBBox(),T=k.width,_=k.height,E=k.x,C=k.y,S=Math.max(T,_)*Math.SQRT2+40,A=v.circle(0,0,S,x),L=Math.max(S,h.width),N=S+h.height+d,I=v.rectangle(-L/2,-N/2,L,N,{...x,fill:"transparent",stroke:"none"}),R=c.insert((()=>A),":first-child"),M=c.insert((()=>I));return w.attr("transform",`translate(${-T/2-E},${p?h.height/2+d/2-_/2-C:-h.height/2-d/2-_/2-C})`),w.attr("style",`color: ${m.get("stroke")??g};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-N/2:N/2-h.height})`),R.attr("transform",`translate(0,${p?h.height/2+d/2:-h.height/2-d/2})`),w_(e,M),e.intersect=function(t){y.info("iconSquare intersect",e,t);return oC.rect(e,t)},c}async function FC(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=zE(e);e.labelStyle=i;const a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await x_(t,e,"icon-shape default"),p="t"===e.pos,g=o+2*u,f=o+2*u,{nodeBorder:m,mainBkg:v}=r,{stylesMap:x}=BE(e),b=-f/2,w=-g/2,k=e.label?8:0,T=AE.svg(c),_=UE(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const E=x.get("fill");_.stroke=E??v;const C=T.path(OE(b,w,f,g,5),_),S=Math.max(f,h.width),A=g+h.height+k,L=T.rectangle(-S/2,-A/2,S,A,{..._,fill:"transparent",stroke:"none"}),N=c.insert((()=>C),":first-child").attr("class","icon-shape2"),I=c.insert((()=>L));if(e.icon){const t=c.append("g");t.html(`${await Gy(e.icon,{height:o,width:o,fallbackPrefix:""})} `);const r=t.node().getBBox(),n=r.width,i=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-n/2-a},${p?h.height/2+k/2-i/2-s:-h.height/2-k/2-i/2-s})`),t.attr("style",`color: ${x.get("stroke")??m};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-A/2:A/2-h.height})`),N.attr("transform",`translate(0,${p?h.height/2+k/2:-h.height/2-k/2})`),w_(e,I),e.intersect=function(t){if(y.info("iconSquare intersect",e,t),!e.label)return oC.rect(e,t);const r=e.x??0,n=e.y??0,i=e.height??0;let a=[];a=p?[{x:r-h.width/2,y:n-i/2},{x:r+h.width/2,y:n-i/2},{x:r+h.width/2,y:n-i/2+h.height+k},{x:r+f/2,y:n-i/2+h.height+k},{x:r+f/2,y:n+i/2},{x:r-f/2,y:n+i/2},{x:r-f/2,y:n-i/2+h.height+k},{x:r-h.width/2,y:n-i/2+h.height+k}]:[{x:r-f/2,y:n-i/2},{x:r+f/2,y:n-i/2},{x:r+f/2,y:n-i/2+g},{x:r+h.width/2,y:n-i/2+g},{x:r+h.width/2/2,y:n+i/2},{x:r-h.width/2,y:n+i/2},{x:r-h.width/2,y:n-i/2+g},{x:r-f/2,y:n-i/2+g}];return oC.polygon(e,a,t)},c}async function zC(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=zE(e);e.labelStyle=i;const a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await x_(t,e,"icon-shape default"),p="t"===e.pos,g=o+2*u,f=o+2*u,{nodeBorder:m,mainBkg:v}=r,{stylesMap:x}=BE(e),b=-f/2,w=-g/2,k=e.label?8:0,T=AE.svg(c),_=UE(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const E=x.get("fill");_.stroke=E??v;const C=T.path(OE(b,w,f,g,.1),_),S=Math.max(f,h.width),A=g+h.height+k,L=T.rectangle(-S/2,-A/2,S,A,{..._,fill:"transparent",stroke:"none"}),N=c.insert((()=>C),":first-child"),I=c.insert((()=>L));if(e.icon){const t=c.append("g");t.html(`${await Gy(e.icon,{height:o,width:o,fallbackPrefix:""})} `);const r=t.node().getBBox(),n=r.width,i=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-n/2-a},${p?h.height/2+k/2-i/2-s:-h.height/2-k/2-i/2-s})`),t.attr("style",`color: ${x.get("stroke")??m};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-A/2:A/2-h.height})`),N.attr("transform",`translate(0,${p?h.height/2+k/2:-h.height/2-k/2})`),w_(e,I),e.intersect=function(t){if(y.info("iconSquare intersect",e,t),!e.label)return oC.rect(e,t);const r=e.x??0,n=e.y??0,i=e.height??0;let a=[];a=p?[{x:r-h.width/2,y:n-i/2},{x:r+h.width/2,y:n-i/2},{x:r+h.width/2,y:n-i/2+h.height+k},{x:r+f/2,y:n-i/2+h.height+k},{x:r+f/2,y:n+i/2},{x:r-f/2,y:n+i/2},{x:r-f/2,y:n-i/2+h.height+k},{x:r-h.width/2,y:n-i/2+h.height+k}]:[{x:r-f/2,y:n-i/2},{x:r+f/2,y:n-i/2},{x:r+f/2,y:n-i/2+g},{x:r+h.width/2,y:n-i/2+g},{x:r+h.width/2/2,y:n+i/2},{x:r-h.width/2,y:n+i/2},{x:r-h.width/2,y:n-i/2+g},{x:r-f/2,y:n-i/2+g}];return oC.polygon(e,a,t)},c}async function UC(t,e,{config:{flowchart:r}}){const n=new Image;n.src=e?.img??"",await n.decode();const i=Number(n.naturalWidth.toString().replace("px","")),a=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/a;const{labelStyles:s}=zE(e);e.labelStyle=s;const o=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;const l=Math.max(e.label?o??0:0,e?.assetWidth??i),c="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:l,h="on"===e.constraint?c/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(c,o??0);const{shapeSvg:u,bbox:d,label:p}=await x_(t,e,"image-shape default"),g="t"===e.pos,f=-c/2,m=-h/2,v=e.label?8:0,x=AE.svg(u),b=UE(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const w=x.rectangle(f,m,c,h,b),k=Math.max(c,d.width),T=h+d.height+v,_=x.rectangle(-k/2,-T/2,k,T,{...b,fill:"none",stroke:"none"}),E=u.insert((()=>w),":first-child"),C=u.insert((()=>_));if(e.img){const t=u.append("image");t.attr("href",e.img),t.attr("width",c),t.attr("height",h),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-c/2},${g?T/2-h:-T/2})`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-h/2-d.height/2-v/2:h/2-d.height/2+v/2})`),E.attr("transform",`translate(0,${g?d.height/2+v/2:-d.height/2-v/2})`),w_(e,C),e.intersect=function(t){if(y.info("iconSquare intersect",e,t),!e.label)return oC.rect(e,t);const r=e.x??0,n=e.y??0,i=e.height??0;let a=[];a=g?[{x:r-d.width/2,y:n-i/2},{x:r+d.width/2,y:n-i/2},{x:r+d.width/2,y:n-i/2+d.height+v},{x:r+c/2,y:n-i/2+d.height+v},{x:r+c/2,y:n+i/2},{x:r-c/2,y:n+i/2},{x:r-c/2,y:n-i/2+d.height+v},{x:r-d.width/2,y:n-i/2+d.height+v}]:[{x:r-c/2,y:n-i/2},{x:r+c/2,y:n-i/2},{x:r+c/2,y:n-i/2+h},{x:r+d.width/2,y:n-i/2+h},{x:r+d.width/2/2,y:n+i/2},{x:r-d.width/2,y:n+i/2},{x:r-d.width/2,y:n-i/2+h},{x:r-c/2,y:n-i/2+h}];return oC.polygon(e,a,t)},u}async function GC(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await x_(t,e,k_(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),o=Math.max(a.height+2*(e.padding??0),e?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}];let c;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=AE.svg(i),r=UE(e,{}),n=T_(l),a=t.path(n,r);c=i.insert((()=>a),":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=uC(i,s,o,l);return n&&c.attr("style",n),e.width=s,e.height=o,w_(e,c),e.intersect=function(t){return oC.polygon(e,l,t)},i}async function qC(t,e,r){const{labelStyles:n,nodeStyles:i}=zE(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await x_(t,e,k_(e)),o=Math.max(s.width+2*r.labelPaddingX,e?.width||0),l=Math.max(s.height+2*r.labelPaddingY,e?.height||0),c=-o/2,h=-l/2;let u,{rx:d,ry:p}=e;const{cssStyles:g}=e;if(r?.rx&&r.ry&&(d=r.rx,p=r.ry),"handDrawn"===e.look){const t=AE.svg(a),r=UE(e,{}),n=d||p?t.path(OE(c,h,o,l,d||0),r):t.rectangle(c,h,o,l,r);u=a.insert((()=>n),":first-child"),u.attr("class","basic label-container").attr("style",zk(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",i).attr("rx",zk(d)).attr("ry",zk(p)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return w_(e,u),e.intersect=function(t){return oC.rect(e,t)},a}async function jC(t,e){const{shapeSvg:r,bbox:n,label:i}=await x_(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),w_(e,a),e.intersect=function(t){return oC.rect(e,t)},r}async function WC(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await x_(t,e,k_(e)),s=Math.max(a.width+(e.padding??0),e?.width??0),o=Math.max(a.height+(e.padding??0),e?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-3*o/6,y:-o}];let c;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=AE.svg(i),r=UE(e,{}),n=T_(l),a=t.path(n,r);c=i.insert((()=>a),":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=uC(i,s,o,l);return n&&c.attr("style",n),e.width=s,e.height=o,w_(e,c),e.intersect=function(t){return oC.polygon(e,l,t)},i}async function YC(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await x_(t,e,k_(e)),s=Math.max(a.width+(e.padding??0),e?.width??0),o=Math.max(a.height+(e.padding??0),e?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=AE.svg(i),r=UE(e,{}),n=T_(l),a=t.path(n,r);c=i.insert((()=>a),":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=uC(i,s,o,l);return n&&c.attr("style",n),e.width=s,e.height=o,w_(e,c),e.intersect=function(t){return oC.polygon(e,l,t)},i}function HC(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.label="",e.labelStyle=r;const i=t.insert("g").attr("class",k_(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),l=[{x:s,y:0},{x:0,y:o+3.5},{x:s-14,y:o+3.5},{x:0,y:2*o},{x:s,y:o-3.5},{x:14,y:o-3.5}],c=AE.svg(i),h=UE(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const u=T_(l),d=c.path(u,h),p=i.insert((()=>d),":first-child");return a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),p.attr("transform",`translate(-${s/2},${-o})`),w_(e,p),e.intersect=function(t){y.info("lightningBolt intersect",e,t);return oC.polygon(e,l,t)},i}o(OC,"hexagon"),o(PC,"hourglass"),o(BC,"icon"),o($C,"iconCircle"),o(FC,"iconRounded"),o(zC,"iconSquare"),o(UC,"imageSquare"),o(GC,"inv_trapezoid"),o(qC,"drawRect"),o(jC,"labelRect"),o(WC,"lean_left"),o(YC,"lean_right"),o(HC,"lightningBolt");var VC=o(((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" ")),"createCylinderPathD"),XC=o(((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" ")),"createOuterCylinderPathD"),KC=o(((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" ")),"createInnerCylinderPathD");async function ZC(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await x_(t,e,k_(e)),o=Math.max(a.width+(e.padding??0),e.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(a.height+c+(e.padding??0),e.height??0),u=.1*h;let d;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=AE.svg(i),r=XC(0,0,o,h,l,c,u),n=KC(0,c,o,h,l,c),a=UE(e,{}),s=t.path(r,a),g=t.path(n,a);i.insert((()=>g),":first-child").attr("class","line"),d=i.insert((()=>s),":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{const t=VC(0,0,o,h,l,c,u);d=i.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",zk(p)).attr("style",n)}return d.attr("label-offset-y",c),d.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),w_(e,d),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-a.height/2+c-(a.y-(a.top??0))})`),e.intersect=function(t){const r=oC.rect(e,t),n=r.x-(e.x??0);if(0!=l&&(Math.abs(n)<(e.width??0)/2||Math.abs(n)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-c)){let i=c*c*(1-n*n/(l*l));i>0&&(i=Math.sqrt(i)),i=c-i,t.y-(e.y??0)>0&&(i=-i),r.y+=i}return r},i}async function QC(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await x_(t,e,k_(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=l/4,h=l+c,{cssStyles:u}=e,d=AE.svg(i),p=UE(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-o/2-o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:h/2},...__(-o/2-o/2*.1,h/2,o/2+o/2*.1,h/2,c,.8),{x:o/2+o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:-h/2},{x:-o/2,y:-h/2},{x:-o/2,y:h/2*1.1},{x:-o/2,y:-h/2}],f=d.polygon(g.map((t=>[t.x,t.y])),p),m=i.insert((()=>f),":first-child");return m.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)+o/2*.1/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)-c/2-(a.y-(a.top??0))})`),w_(e,m),e.intersect=function(t){return oC.polygon(e,g,t)},i}async function JC(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await x_(t,e,k_(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=-o/2,h=-l/2,{cssStyles:u}=e,d=AE.svg(i),p=UE(e,{}),g=[{x:c-5,y:h+5},{x:c-5,y:h+l+5},{x:c+o-5,y:h+l+5},{x:c+o-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h+l-5},{x:c+o+5,y:h+l-5},{x:c+o+5,y:h-5},{x:c+5,y:h-5},{x:c+5,y:h},{x:c,y:h},{x:c,y:h+5}],f=[{x:c,y:h+5},{x:c+o-5,y:h+5},{x:c+o-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h},{x:c,y:h}];"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const m=T_(g),y=d.path(m,p),v=T_(f),x=d.path(v,{...p,fill:"none"}),b=i.insert((()=>x),":first-child");return b.insert((()=>y),":first-child"),b.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",n),s.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-(a.y-(a.top??0))})`),w_(e,b),e.intersect=function(t){return oC.polygon(e,g,t)},i}async function tS(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await x_(t,e,k_(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=l/4,h=l+c,u=-o/2,d=-h/2,{cssStyles:p}=e,g=__(u-5,d+h+5,u+o-5,d+h+5,c,.8),f=g?.[g.length-1],m=[{x:u-5,y:d+5},{x:u-5,y:d+h+5},...g,{x:u+o-5,y:f.y-5},{x:u+o,y:f.y-5},{x:u+o,y:f.y-10},{x:u+o+5,y:f.y-10},{x:u+o+5,y:d-5},{x:u+5,y:d-5},{x:u+5,y:d},{x:u,y:d},{x:u,y:d+5}],y=[{x:u,y:d+5},{x:u+o-5,y:d+5},{x:u+o-5,y:f.y-5},{x:u+o,y:f.y-5},{x:u+o,y:d},{x:u,y:d}],v=AE.svg(i),x=UE(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=T_(m),w=v.path(b,x),k=T_(y),T=v.path(k,x),_=i.insert((()=>w),":first-child");return _.insert((()=>T)),_.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",p),n&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-c/2-(a.y-(a.top??0))})`),w_(e,_),e.intersect=function(t){return oC.polygon(e,m,t)},i}async function eS(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=zE(e);e.labelStyle=n;e.useHtmlLabels||!1!==Gt().flowchart?.htmlLabels||(e.centerLabel=!0);const{shapeSvg:a,bbox:s}=await x_(t,e,k_(e)),o=Math.max(s.width+2*(e.padding??0),e?.width??0),l=Math.max(s.height+2*(e.padding??0),e?.height??0),c=-o/2,h=-l/2,{cssStyles:u}=e,d=AE.svg(a),p=UE(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=d.rectangle(c,h,o,l,p),f=a.insert((()=>g),":first-child");return f.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",i),w_(e,f),e.intersect=function(t){return oC.rect(e,t)},a}o(ZC,"linedCylinder"),o(QC,"linedWaveEdgedRect"),o(JC,"multiRect"),o(tS,"multiWaveEdgedRectangle"),o(eS,"note");var rS=o(((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" ")),"createDecisionBoxPathD");async function nS(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await x_(t,e,k_(e)),s=a.width+e.padding+(a.height+e.padding),o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];let l;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=AE.svg(i),r=UE(e,{}),n=rS(0,0,s),a=t.path(n,r);l=i.insert((()=>a),":first-child").attr("transform",`translate(${-s/2}, ${s/2})`),c&&l.attr("style",c)}else l=uC(i,s,s,o);return n&&l.attr("style",n),w_(e,l),e.intersect=function(t){return y.debug("APA12 Intersect called SPLIT\npoint:",t,"\nnode:\n",e,"\nres:",oC.polygon(e,o,t)),oC.polygon(e,o,t)},i}async function iS(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await x_(t,e,k_(e)),o=-Math.max(a.width+(e.padding??0),e?.width??0)/2,l=-Math.max(a.height+(e.padding??0),e?.height??0)/2,c=l/2,h=[{x:o+c,y:l},{x:o,y:0},{x:o+c,y:-l},{x:-o,y:-l},{x:-o,y:l}],{cssStyles:u}=e,d=AE.svg(i),p=UE(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=T_(h),f=d.path(g,p),m=i.insert((()=>f),":first-child");return m.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(${-c/2},0)`),s.attr("transform",`translate(${-c/2-a.width/2-(a.x-(a.left??0))}, ${-a.height/2-(a.y-(a.top??0))})`),w_(e,m),e.intersect=function(t){return oC.polygon(e,h,t)},i}async function aS(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);let i;e.labelStyle=r,i=e.cssClasses?"node "+e.cssClasses:"node default";const a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",n),l=e.description,c=e.label,h=o.node().appendChild(await DE(c,e.labelStyle,!0,!0));let u={width:0,height:0};if(yr(Qr()?.flowchart?.htmlLabels)){const t=h.children[0],e=Ga(h);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}y.info("Text 2",l);const d=l||[],p=h.getBBox(),g=o.node().appendChild(await DE(d.join?d.join("
"):d,e.labelStyle,!0,!0)),f=g.children[0],m=Ga(g);u=f.getBoundingClientRect(),m.attr("width",u.width),m.attr("height",u.height);const v=(e.padding||0)/2;Ga(g).attr("transform","translate( "+(u.width>p.width?0:(p.width-u.width)/2)+", "+(p.height+v+5)+")"),Ga(h).attr("transform","translate( "+(u.width(y.debug("Rough node insert CXC",n),i)),":first-child"),T=a.insert((()=>(y.debug("Rough node insert CXC",n),n)),":first-child")}else T=s.insert("rect",":first-child"),_=s.insert("line"),T.attr("class","outer title-state").attr("style",n).attr("x",-u.width/2-v).attr("y",-u.height/2-v).attr("width",u.width+(e.padding||0)).attr("height",u.height+(e.padding||0)),_.attr("class","divider").attr("x1",-u.width/2-v).attr("x2",u.width/2+v).attr("y1",-u.height/2-v+p.height+v).attr("y2",-u.height/2-v+p.height+v);return w_(e,T),e.intersect=function(t){return oC.rect(e,t)},a}async function sS(t,e){return qC(t,e,{rx:5,ry:5,classes:"",labelPaddingX:1*(e?.padding||0),labelPaddingY:1*(e?.padding||0)})}async function oS(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await x_(t,e,k_(e)),o=e?.padding??0,l=Math.max(a.width+2*(e.padding??0),e?.width??0),c=Math.max(a.height+2*(e.padding??0),e?.height??0),h=-a.width/2-o,u=-a.height/2-o,{cssStyles:d}=e,p=AE.svg(i),g=UE(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],m=p.polygon(f.map((t=>[t.x,t.y])),g),y=i.insert((()=>m),":first-child");return y.attr("class","basic label-container").attr("style",zk(d)),n&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",n),d&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",n),s.attr("transform",`translate(${-l/2+4+(e.padding??0)-(a.x-(a.left??0))},${-c/2+(e.padding??0)-(a.y-(a.top??0))})`),w_(e,y),e.intersect=function(t){return oC.rect(e,t)},i}async function lS(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await x_(t,e,k_(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=-o/2,h=-l/2,{cssStyles:u}=e,d=AE.svg(i),p=UE(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:c,y:h},{x:c,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h-l/2}],f=T_(g),m=d.path(f,p),y=i.insert((()=>m),":first-child");return y.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",u),n&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",n),y.attr("transform",`translate(0, ${l/4})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))}, ${-l/4+(e.padding??0)-(a.y-(a.top??0))})`),w_(e,y),e.intersect=function(t){return oC.polygon(e,g,t)},i}async function cS(t,e){return qC(t,e,{rx:0,ry:0,classes:"",labelPaddingX:2*(e?.padding||0),labelPaddingY:1*(e?.padding||0)})}async function hS(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await x_(t,e,k_(e)),s=a.height+e.padding,o=a.width+s/4+e.padding;let l;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=AE.svg(i),r=UE(e,{}),n=OE(-o/2,-s/2,o,s,s/2),a=t.path(n,r);l=i.insert((()=>a),":first-child"),l.attr("class","basic label-container").attr("style",zk(c))}else l=i.insert("rect",":first-child"),l.attr("class","basic label-container").attr("style",n).attr("rx",s/2).attr("ry",s/2).attr("x",-o/2).attr("y",-s/2).attr("width",o).attr("height",s);return w_(e,l),e.intersect=function(t){return oC.rect(e,t)},i}async function uS(t,e){return qC(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function dS(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=zE(e);e.labelStyle=n;const{cssStyles:a}=e,{lineColor:s,stateBorder:o,nodeBorder:l}=r,c=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),h=AE.svg(c),u=UE(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const d=h.circle(0,0,14,{...u,stroke:s,strokeWidth:2}),p=o??l,g=h.circle(0,0,5,{...u,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),f=c.insert((()=>d),":first-child");return f.insert((()=>g)),a&&f.selectAll("path").attr("style",a),i&&f.selectAll("path").attr("style",i),w_(e,f),e.intersect=function(t){return oC.circle(e,7,t)},c}function pS(t,e,{config:{themeVariables:r}}){const{lineColor:n}=r,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let a;if("handDrawn"===e.look){const t=AE.svg(i).circle(0,0,14,PE(n));a=i.insert((()=>t)),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=i.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return w_(e,a),e.intersect=function(t){return oC.circle(e,7,t)},i}async function gS(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await x_(t,e,k_(e)),s=(e?.padding||0)/2,o=a.width+e.padding,l=a.height+e.padding,c=-a.width/2-s,h=-a.height/2-s,u=[{x:0,y:0},{x:o,y:0},{x:o,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if("handDrawn"===e.look){const t=AE.svg(i),r=UE(e,{}),n=t.rectangle(c-8,h,o+16,l,r),a=t.line(c,h,c,h+l,r),s=t.line(c+o,h,c+o,h+l,r);i.insert((()=>a),":first-child"),i.insert((()=>s),":first-child");const u=i.insert((()=>n),":first-child"),{cssStyles:d}=e;u.attr("class","basic label-container").attr("style",zk(d)),w_(e,u)}else{const t=uC(i,o,l,u);n&&t.attr("style",n),w_(e,t)}return e.intersect=function(t){return oC.polygon(e,u,t)},i}async function fS(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await x_(t,e,k_(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),o=Math.max(a.height+2*(e.padding??0),e?.height??0),l=-s/2,c=-o/2,h=.2*o,u=.2*o,{cssStyles:d}=e,p=AE.svg(i),g=UE(e,{}),f=[{x:l-h/2,y:c},{x:l+s+h/2,y:c},{x:l+s+h/2,y:c+o},{x:l-h/2,y:c+o}],m=[{x:l+s-h/2,y:c+o},{x:l+s+h/2,y:c+o},{x:l+s+h/2,y:c+o-u}];"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const y=T_(f),v=p.path(y,g),x=T_(m),b=p.path(x,{...g,fillStyle:"solid"}),w=i.insert((()=>b),":first-child");return w.insert((()=>v),":first-child"),w.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",d),n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),w_(e,w),e.intersect=function(t){return oC.polygon(e,f,t)},i}async function mS(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await x_(t,e,k_(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=l/4,h=.2*o,u=.2*l,d=l+c,{cssStyles:p}=e,g=AE.svg(i),f=UE(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-o/2-o/2*.1,y:d/2},...__(-o/2-o/2*.1,d/2,o/2+o/2*.1,d/2,c,.8),{x:o/2+o/2*.1,y:-d/2},{x:-o/2-o/2*.1,y:-d/2}],y=-o/2+o/2*.1,v=-d/2-.4*u,x=[{x:y+o-h,y:1.4*(v+l)},{x:y+o,y:v+l-u},{x:y+o,y:.9*(v+l)},...__(y+o,1.3*(v+l),y+o-h,1.5*(v+l),.03*-l,.5)],b=T_(m),w=g.path(b,f),k=T_(x),T=g.path(k,{...f,fillStyle:"solid"}),_=i.insert((()=>T),":first-child");return _.insert((()=>w),":first-child"),_.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",p),n&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-c/2-(a.y-(a.top??0))})`),w_(e,_),e.intersect=function(t){return oC.polygon(e,m,t)},i}async function yS(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await x_(t,e,k_(e)),s=Math.max(a.width+e.padding,e?.width||0),o=Math.max(a.height+e.padding,e?.height||0),l=-s/2,c=-o/2,h=i.insert("rect",":first-child");return h.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",s).attr("height",o),w_(e,h),e.intersect=function(t){return oC.rect(e,t)},i}o(nS,"question"),o(iS,"rect_left_inv_arrow"),o(aS,"rectWithTitle"),o(sS,"roundedRect"),o(oS,"shadedProcess"),o(lS,"slopedRect"),o(cS,"squareRect"),o(hS,"stadium"),o(uS,"state"),o(dS,"stateEnd"),o(pS,"stateStart"),o(gS,"subroutine"),o(fS,"taggedRect"),o(mS,"taggedWaveEdgedRectangle"),o(yS,"text");var vS=o(((t,e,r,n,i,a)=>`M${t},${e}\n a${i},${a} 0,0,1 0,${-n}\n l${r},0\n a${i},${a} 0,0,1 0,${n}\n M${r},${-n}\n a${i},${a} 0,0,0 0,${n}\n l${-r},0`),"createCylinderPathD"),xS=o(((t,e,r,n,i,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${i},${a} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${a} 0,0,0 0,${n}`,`l${r},0`].join(" ")),"createOuterCylinderPathD"),bS=o(((t,e,r,n,i,a)=>[`M${t+r/2},${-n/2}`,`a${i},${a} 0,0,0 0,${n}`].join(" ")),"createInnerCylinderPathD");async function wS(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s,halfPadding:o}=await x_(t,e,k_(e)),l="neo"===e.look?2*o:o,c=a.height+l,h=c/2,u=h/(2.5+c/50),d=a.width+u+l,{cssStyles:p}=e;let g;if("handDrawn"===e.look){const t=AE.svg(i),r=xS(0,0,d,c,u,h),n=bS(0,0,d,c,u,h),a=t.path(r,UE(e,{})),s=t.path(n,UE(e,{fill:"none"}));g=i.insert((()=>s),":first-child"),g=i.insert((()=>a),":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const t=vS(0,0,d,c,u,h);g=i.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",zk(p)).attr("style",n),g.attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),n&&g.selectAll("path").attr("style",n)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-d/2}, ${c/2} )`),s.attr("transform",`translate(${-a.width/2-u-(a.x-(a.left??0))}, ${-a.height/2-(a.y-(a.top??0))})`),w_(e,g),e.intersect=function(t){const r=oC.rect(e,t),n=r.y-(e.y??0);if(0!=h&&(Math.abs(n)<(e.height??0)/2||Math.abs(n)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-u)){let i=u*u*(1-n*n/(h*h));0!=i&&(i=Math.sqrt(Math.abs(i))),i=u-i,t.x-(e.x??0)>0&&(i=-i),r.x+=i}return r},i}async function kS(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await x_(t,e,k_(e)),s=a.width+e.padding,o=a.height+e.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=AE.svg(i),r=UE(e,{}),n=T_(l),a=t.path(n,r);c=i.insert((()=>a),":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=uC(i,s,o,l);return n&&c.attr("style",n),e.width=s,e.height=o,w_(e,c),e.intersect=function(t){return oC.polygon(e,l,t)},i}async function TS(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await x_(t,e,k_(e)),s=Math.max(60,a.width+2*(e.padding??0),e?.width??0),o=Math.max(20,a.height+2*(e.padding??0),e?.height??0),{cssStyles:l}=e,c=AE.svg(i),h=UE(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const u=[{x:-s/2*.8,y:-o/2},{x:s/2*.8,y:-o/2},{x:s/2,y:-o/2*.6},{x:s/2,y:o/2},{x:-s/2,y:o/2},{x:-s/2,y:-o/2*.6}],d=T_(u),p=c.path(d,h),g=i.insert((()=>p),":first-child");return g.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&g.selectChildren("path").attr("style",l),n&&"handDrawn"!==e.look&&g.selectChildren("path").attr("style",n),w_(e,g),e.intersect=function(t){return oC.polygon(e,u,t)},i}async function _S(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await x_(t,e,k_(e)),o=yr(Qr().flowchart?.htmlLabels),l=a.width+(e.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:d}=e,p=AE.svg(i),g=UE(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=T_(u),m=p.path(f,g),v=i.insert((()=>m),":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",d),n&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",n),e.width=l,e.height=c,w_(e,v),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(e.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(t){return y.info("Triangle intersect",e,u,t),oC.polygon(e,u,t)},i}async function ES(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await x_(t,e,k_(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=l/8,h=l+c,{cssStyles:u}=e,d=70-o,p=d>0?d/2:0,g=AE.svg(i),f=UE(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-o/2-p,y:h/2},...__(-o/2-p,h/2,o/2+p,h/2,c,.8),{x:o/2+p,y:-h/2},{x:-o/2-p,y:-h/2}],y=T_(m),v=g.path(y,f),x=i.insert((()=>v),":first-child");return x.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-c-(a.y-(a.top??0))})`),w_(e,x),e.intersect=function(t){return oC.polygon(e,m,t)},i}async function CS(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await x_(t,e,k_(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),o=Math.max(a.height+2*(e.padding??0),e?.height??0),l=s/o;let c=s,h=o;c>h*l?h=c/l:c=h*l,c=Math.max(c,100),h=Math.max(h,50);const u=Math.min(.2*h,h/4),d=h+2*u,{cssStyles:p}=e,g=AE.svg(i),f=UE(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-c/2,y:d/2},...__(-c/2,d/2,c/2,d/2,u,1),{x:c/2,y:-d/2},...__(c/2,-d/2,-c/2,-d/2,u,-1)],y=T_(m),v=g.path(y,f),x=i.insert((()=>v),":first-child");return x.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",p),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),w_(e,x),e.intersect=function(t){return oC.polygon(e,m,t)},i}async function SS(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await x_(t,e,k_(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=-o/2,h=-l/2,{cssStyles:u}=e,d=AE.svg(i),p=UE(e,{}),g=[{x:c-5,y:h-5},{x:c-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h-5}],f=`M${c-5},${h-5} L${c+o},${h-5} L${c+o},${h+l} L${c-5},${h+l} L${c-5},${h-5}\n M${c-5},${h} L${c+o},${h}\n M${c},${h-5} L${c},${h+l}`;"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const m=d.path(f,p),y=i.insert((()=>m),":first-child");return y.attr("transform","translate(2.5, 2.5)"),y.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",n),s.attr("transform",`translate(${-a.width/2+2.5-(a.x-(a.left??0))}, ${-a.height/2+2.5-(a.y-(a.top??0))})`),w_(e,y),e.intersect=function(t){return oC.polygon(e,g,t)},i}async function AS(t,e){const r=e;if(r.alias&&(e.label=r.alias),"handDrawn"===e.look){const{themeVariables:r}=Gt(),{background:n}=r,i={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${n}`]};await AS(t,i)}const n=Gt();e.useHtmlLabels=n.htmlLabels;let i=n.er?.diagramPadding??10,a=n.er?.entityPadding??6;const{cssStyles:s}=e,{labelStyles:o}=zE(e);if(0===r.attributes.length&&e.label){const r={rx:0,ry:0,labelPaddingX:i,labelPaddingY:1.5*i,classes:""};Sk(e.label,n)+2*r.labelPaddingX 0){const t=h.width+2*i-(p+g+f+m);p+=t/x,g+=t/x,f>0&&(f+=t/x),m>0&&(m+=t/x)}const w=p+g+f+m,k=AE.svg(c),T=UE(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const _=Math.max(b.width+2*i,e?.width||0,w),E=Math.max(b.height+(d[0]||u)+a,e?.height||0),C=-_/2,S=-E/2;c.selectAll("g:not(:first-child)").each(((t,e,r)=>{const n=Ga(r[e]),s=n.attr("transform");let o=0,l=0;if(s){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(s);t&&(o=parseFloat(t[1]),l=parseFloat(t[2]),n.attr("class").includes("attribute-name")?o+=p:n.attr("class").includes("attribute-keys")?o+=p+g:n.attr("class").includes("attribute-comment")&&(o+=p+g+f))}n.attr("transform",`translate(${C+i/2+o}, ${l+S+h.height+a/2})`)})),c.select(".name").attr("transform","translate("+-h.width/2+", "+(S+a/2)+")");const A=k.rectangle(C,S,_,E,T),L=c.insert((()=>A),":first-child").attr("style",s.join("")),{themeVariables:N}=Gt(),{rowEven:I,rowOdd:R,nodeBorder:M}=N;d.push(0);for(const[t,e]of d.entries()){if(0===t&&d.length>1)continue;const r=t%2==0&&0!==e,n=k.rectangle(C,h.height+S+e,_,h.height,{...T,fill:r?I:R,stroke:M});c.insert((()=>n),"g.label").attr("style",s.join("")).attr("class","row-rect-"+(t%2==0?"even":"odd"))}let D=k.line(C,h.height+S,_+C,h.height+S,T);c.insert((()=>D)).attr("class","divider"),D=k.line(p+C,h.height+S,p+C,E+S,T),c.insert((()=>D)).attr("class","divider"),y&&(D=k.line(p+g+C,h.height+S,p+g+C,E+S,T),c.insert((()=>D)).attr("class","divider")),v&&(D=k.line(p+g+f+C,h.height+S,p+g+f+C,E+S,T),c.insert((()=>D)).attr("class","divider"));for(const t of d)D=k.line(C,h.height+S+t,_+C,h.height+S+t,T),c.insert((()=>D)).attr("class","divider");return w_(e,L),e.intersect=function(t){return oC.rect(e,t)},c}async function LS(t,e,r,n=0,i=0,a=[],s=""){const o=t.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${n}, ${i})`).attr("style",s);e!==br(e)&&(e=(e=br(e)).replaceAll("<","<").replaceAll(">",">"));const l=o.node().appendChild(await v_(o,e,{width:Sk(e,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let t=l.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)t=t.childNodes[0],t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(yr(r.htmlLabels)){const t=l.children[0];t.style.textAlign="start";const e=Ga(l);c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}return c}async function NS(t,e,r,n,i=r.class.padding??12){const a=n?0:3,s=t.insert("g").attr("class",k_(e)).attr("id",e.domId||e.id);let o=null,l=null,c=null,h=null,u=0,d=0,p=0;if(o=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await IS(o,{text:`«${t}»`},0);u=o.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await IS(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();d=g.height,c=s.insert("g").attr("class","members-group text");let f=0;for(const t of e.members){f+=await IS(c,t,f,[t.parseClassifier()])+a}p=c.node().getBBox().height,p<=0&&(p=i/2),h=s.insert("g").attr("class","methods-group text");let m=0;for(const t of e.methods){m+=await IS(h,t,m,[t.parseClassifier()])+a}let y=s.node().getBBox();if(null!==o){const t=o.node().getBBox();o.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),y=s.node().getBBox(),c.attr("transform",`translate(0, ${u+d+2*i})`),y=s.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(p?p+4*i:2*i)})`),y=s.node().getBBox(),{shapeSvg:s,bbox:y}}async function IS(t,e,r,n=[]){const i=t.insert("g").attr("class","label").attr("style",n.join("; ")),a=Gt();let s="useHtmlLabels"in e?e.useHtmlLabels:yr(a.htmlLabels)??!0,l="";l="text"in e?e.text:e.label,!s&&l.startsWith("\\")&&(l=l.substring(1)),Cr(l)&&(s=!0);const c=await v_(i,en($k(l)),{width:Sk(l,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a);let h,u=1;if(s){const t=c.children[0],e=Ga(c);u=t.innerHTML.split("
").length,t.innerHTML.includes("")&&(u+=t.innerHTML.split("").length-1);const r=t.getElementsByTagName("img");if(r){const t=""===l.replace(/ ]*>/g,"").trim();await Promise.all([...r].map((e=>new Promise((r=>{function n(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,r=5,n=parseInt(t,10)*r+"px";e.style.minWidth=n,e.style.maxWidth=n}else e.style.width="100%";r(e)}o(n,"setupImage"),setTimeout((()=>{e.complete&&n()})),e.addEventListener("error",n),e.addEventListener("load",n)})))))}h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}else{n.includes("font-weight: bolder")&&Ga(c).selectAll("tspan").attr("font-weight",""),u=c.children.length;const t=c.children[0];if(""===c.textContent||c.textContent.includes(">")){t.textContent=l[0]+l.substring(1).replaceAll(">",">").replaceAll("<","<").trim();" "===l[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))}"undefined"===t.textContent&&(t.textContent=""),h=c.getBBox()}return i.attr("transform","translate(0,"+(-h.height/(2*u)+r)+")"),h.height}async function RS(t,e){const r=Qr(),n=r.class.padding??12,i=n,a=e.useHtmlLabels??yr(r.htmlLabels)??!0,s=e;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];const{shapeSvg:o,bbox:l}=await NS(t,e,r,a,i),{labelStyles:c,nodeStyles:h}=zE(e);e.labelStyle=c,e.cssStyles=s.styles||"";const u=s.styles?.join(";")||h||"";e.cssStyles||(e.cssStyles=u.replaceAll("!important","").split(";"));const d=0===s.members.length&&0===s.methods.length&&!r.class?.hideEmptyMembersBox,p=AE.svg(o),g=UE(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=l.width;let m=l.height;0===s.members.length&&0===s.methods.length?m+=i:s.members.length>0&&0===s.methods.length&&(m+=2*i);const y=-f/2,v=-m/2,x=p.rectangle(y-n,v-n-(d?n:0===s.members.length&&0===s.methods.length?-n/2:0),f+2*n,m+2*n+(d?2*n:0===s.members.length&&0===s.methods.length?-n:0),g),b=o.insert((()=>x),":first-child");b.attr("class","basic label-container");const w=b.node().getBBox();o.selectAll(".text").each(((t,e,r)=>{const i=Ga(r[e]),l=i.attr("transform");let c=0;if(l){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(l);t&&(c=parseFloat(t[2]))}let h=c+v+n-(d?n:0===s.members.length&&0===s.methods.length?-n/2:0);a||(h-=4);let u=y;(i.attr("class").includes("label-group")||i.attr("class").includes("annotation-group"))&&(u=-i.node()?.getBBox().width/2||0,o.selectAll("text").each((function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(u=0)}))),i.attr("transform",`translate(${u}, ${h})`)}));const k=o.select(".annotation-group").node().getBBox().height-(d?n/2:0)||0,T=o.select(".label-group").node().getBBox().height-(d?n/2:0)||0,_=o.select(".members-group").node().getBBox().height-(d?n/2:0)||0;if(s.members.length>0||s.methods.length>0||d){const t=p.line(w.x,k+T+v+n,w.x+w.width,k+T+v+n,g);o.insert((()=>t)).attr("class","divider").attr("style",u)}if(d||s.members.length>0||s.methods.length>0){const t=p.line(w.x,k+T+_+v+2*i+n,w.x+w.width,k+T+_+v+n+2*i,g);o.insert((()=>t)).attr("class","divider").attr("style",u)}if("handDrawn"!==s.look&&o.selectAll("path").attr("style",u),b.select(":nth-child(2)").attr("style",u),o.selectAll(".divider").select("path").attr("style",u),e.labelStyle?o.selectAll("span").attr("style",e.labelStyle):o.selectAll("span").attr("style",u),!a){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(u);if(e){const t=e[0].replace("color","fill");o.selectAll("tspan").attr("style",t)}else if(c){const e=t.exec(c);if(e){const t=e[0].replace("color","fill");o.selectAll("tspan").attr("style",t)}}}return w_(e,b),e.intersect=function(t){return oC.rect(e,t)},o}async function MS(t,e){const{labelStyles:r,nodeStyles:n}=zE(e);e.labelStyle=r;const i=e,a=e,s="verifyMethod"in e,o=k_(e),l=t.insert("g").attr("class",o).attr("id",e.domId??e.id);let c;c=s?await DS(l,`<<${i.type}>>`,0,e.labelStyle):await DS(l,"<<Element>>",0,e.labelStyle);let h=c;const u=await DS(l,i.name,h,e.labelStyle+"; font-weight: bold;");if(h+=u+20,s){h+=await DS(l,""+(i.requirementId?`Id: ${i.requirementId}`:""),h,e.labelStyle);h+=await DS(l,""+(i.text?`Text: ${i.text}`:""),h,e.labelStyle);h+=await DS(l,""+(i.risk?`Risk: ${i.risk}`:""),h,e.labelStyle),await DS(l,""+(i.verifyMethod?`Verification: ${i.verifyMethod}`:""),h,e.labelStyle)}else{h+=await DS(l,""+(a.type?`Type: ${a.type}`:""),h,e.labelStyle),await DS(l,""+(a.docRef?`Doc Ref: ${a.docRef}`:""),h,e.labelStyle)}const d=(l.node()?.getBBox().width??200)+20,p=(l.node()?.getBBox().height??200)+20,g=-d/2,f=-p/2,m=AE.svg(l),y=UE(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const v=m.rectangle(g,f,d,p,y),x=l.insert((()=>v),":first-child");if(x.attr("class","basic label-container").attr("style",n),l.selectAll(".label").each(((t,e,r)=>{const n=Ga(r[e]),i=n.attr("transform");let a=0,s=0;if(i){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);t&&(a=parseFloat(t[1]),s=parseFloat(t[2]))}const o=s-p/2;let l=g+10;0!==e&&1!==e||(l=a),n.attr("transform",`translate(${l}, ${o+20})`)})),h>c+u+20){const t=m.line(g,f+c+u+20,g+d,f+c+u+20,y);l.insert((()=>t)).attr("style",n)}return w_(e,x),e.intersect=function(t){return oC.rect(e,t)},l}async function DS(t,e,r,n=""){if(""===e)return 0;const i=t.insert("g").attr("class","label").attr("style",n),a=Qr(),s=a.htmlLabels??!0,o=await v_(i,en($k(e)),{width:Sk(e,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:n},a);let l;if(s){const t=o.children[0],e=Ga(o);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}else{const t=o.children[0];for(const e of t.children)e.textContent=e.textContent.replaceAll(">",">").replaceAll("<","<"),n&&e.setAttribute("style",n);l=o.getBBox(),l.height+=6}return i.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}o(wS,"tiltedCylinder"),o(kS,"trapezoid"),o(TS,"trapezoidalPentagon"),o(_S,"triangle"),o(ES,"waveEdgedRectangle"),o(CS,"waveRectangle"),o(SS,"windowPane"),o(AS,"erBox"),o(LS,"addText"),o(NS,"textHelper"),o(IS,"addText"),o(RS,"classBox"),o(MS,"requirementBox"),o(DS,"addText");var OS=o((t=>{switch(t){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 PS(t,e,{config:r}){const{labelStyles:n,nodeStyles:i}=zE(e);e.labelStyle=n||"";const a=e.width;e.width=(e.width??200)-10;const{shapeSvg:s,bbox:o,label:l}=await x_(t,e,k_(e)),c=e.padding||10;let h,u="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(u=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),h=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let p,g;({label:p,bbox:g}=h?await b_(h,"ticket"in e&&e.ticket||"",d):await b_(s,"ticket"in e&&e.ticket||"",d));const{label:f,bbox:m}=await b_(s,"assigned"in e&&e.assigned||"",d);e.width=a;const y=e?.width||0,v=Math.max(g.height,m.height)/2,x=Math.max(o.height+20,e?.height||0)+v,b=-y/2,w=-x/2;let k;l.attr("transform","translate("+(c-y/2)+", "+(-v-o.height/2)+")"),p.attr("transform","translate("+(c-y/2)+", "+(-v+o.height/2)+")"),f.attr("transform","translate("+(c+y/2-m.width-20)+", "+(-v+o.height/2)+")");const{rx:T,ry:_}=e,{cssStyles:E}=e;if("handDrawn"===e.look){const t=AE.svg(s),r=UE(e,{}),n=T||_?t.path(OE(b,w,y,x,T||0),r):t.rectangle(b,w,y,x,r);k=s.insert((()=>n),":first-child"),k.attr("class","basic label-container").attr("style",E||null)}else{k=s.insert("rect",":first-child"),k.attr("class","basic label-container __APA__").attr("style",i).attr("rx",T??5).attr("ry",_??5).attr("x",b).attr("y",w).attr("width",y).attr("height",x);const t="priority"in e&&e.priority;if(t){const e=s.append("line"),r=b+2,n=w+Math.floor((T??0)/2),i=w+x-Math.floor((T??0)/2);e.attr("x1",r).attr("y1",n).attr("x2",r).attr("y2",i).attr("stroke-width","4").attr("stroke",OS(t))}}return w_(e,k),e.height=x,e.intersect=function(t){return oC.rect(e,t)},s}o(PS,"kanbanItem");var BS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:cS},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:sS},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:hS},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:gS},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:SC},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:gC},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:nS},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:OC},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:YC},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:WC},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:kS},{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:GC},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:LC},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:yS},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:dC},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:oS},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:pS},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:dS},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:RC},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:PC},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:vC},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:bC},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:kC},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:HC},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ES},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:MC},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:wS},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:ZC},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:TC},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:AC},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:_S},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:SS},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:NC},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:TS},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:IC},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:lS},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:tS},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:JC},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:hC},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:mC},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:mS},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:fS},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:CS},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:iS},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:QC}],$S=o((()=>{const t={state:uS,choice:pC,note:eS,rectWithTitle:aS,labelRect:jC,iconSquare:zC,iconCircle:$C,icon:BC,iconRounded:FC,imageSquare:UC,anchor:lC,kanbanItem:PS,classBox:RS,erBox:AS,requirementBox:MS},e=[...Object.entries(t),...BS.flatMap((t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map((e=>[e,t.handler]))))];return Object.fromEntries(e)}),"generateShapeMap"),FS=$S();function zS(t){return t in FS}o(zS,"isValidShape");var US=new Map;async function GS(t,e,r){let n,i;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?FS[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;"sandbox"===r.config.securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s??null),i=await a(n,e,r)}else i=await a(t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),US.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}o(GS,"insertNode");var qS=o(((t,e)=>{US.set(e.id,t)}),"setNodeElem"),jS=o((()=>{US.clear()}),"clear"),WS=o((t=>{const e=US.get(t.id);y.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r}),"positionNode"),YS={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function HS(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=VS(t),e=VS(e);const[r,n]=[t.x,t.y],[i,a]=[e.x,e.y],s=i-r,o=a-n;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}o(HS,"calculateDeltaAndAngle");var VS=o((t=>Array.isArray(t)?{x:t[0],y:t[1]}:t),"pointTransformer"),XS=o((t=>({x:o((function(e,r,n){let i=0;const a=VS(n[0]).x
=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(YS,t.arrowTypeEnd)){const{angle:e,deltaX:r}=HS(n[n.length-1],n[n.length-2]);i=YS[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}const s=Math.abs(VS(e).x-VS(n[n.length-1]).x),o=Math.abs(VS(e).y-VS(n[n.length-1]).y),l=Math.abs(VS(e).x-VS(n[0]).x),c=Math.abs(VS(e).y-VS(n[0]).y),h=YS[t.arrowTypeStart],u=YS[t.arrowTypeEnd];if(s0&&o0&&c =0?1:-1)}else if(r===n.length-1&&Object.hasOwn(YS,t.arrowTypeEnd)){const{angle:e,deltaY:r}=HS(n[n.length-1],n[n.length-2]);i=YS[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}const s=Math.abs(VS(e).y-VS(n[n.length-1]).y),o=Math.abs(VS(e).x-VS(n[n.length-1]).x),l=Math.abs(VS(e).y-VS(n[0]).y),c=Math.abs(VS(e).x-VS(n[0]).x),h=YS[t.arrowTypeStart],u=YS[t.arrowTypeEnd];if(s0&&o0&&c {e.arrowTypeStart&&QS(t,"start",e.arrowTypeStart,r,n,i,a),e.arrowTypeEnd&&QS(t,"end",e.arrowTypeEnd,r,n,i,a)}),"addEdgeMarkers"),ZS={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},QS=o(((t,e,r,n,i,a,s)=>{const o=ZS[r];if(!o)return void y.warn(`Unknown arrow type: ${r}`);const l=`${i}_${a}-${o.type}${"start"===e?"Start":"End"}`;if(s&&""!==s.trim()){const r=`${l}_${s.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(r)){const t=document.getElementById(l);if(t){const e=t.cloneNode(!0);e.id=r;e.querySelectorAll("path, circle, line").forEach((t=>{t.setAttribute("stroke",s),o.fill&&t.setAttribute("fill",s)})),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${n}#${r})`)}else t.attr(`marker-${e}`,`url(${n}#${l})`)}),"addEdgeMarker"),JS=new Map,tA=new Map,eA=o((()=>{JS.clear(),tA.clear()}),"clear"),rA=o((t=>t?t.reduce(((t,e)=>t+";"+e),""):""),"getLabelStyles"),nA=o((async(t,e)=>{let r=yr(Qr().flowchart.htmlLabels);const n=await v_(t,e.label,{style:rA(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});y.info("abc82",e,e.labelType);const i=t.insert("g").attr("class","edgeLabel"),a=i.insert("g").attr("class","label");a.node().appendChild(n);let s,o=n.getBBox();if(r){const t=n.children[0],e=Ga(n);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}if(a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),JS.set(e.id,i),e.width=o.width,e.height=o.height,e.startLabelLeft){const r=await DE(e.startLabelLeft,rA(e.labelStyle)),n=t.insert("g").attr("class","edgeTerminals"),i=n.insert("g").attr("class","inner");s=i.node().appendChild(r);const a=r.getBBox();i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),tA.get(e.id)||tA.set(e.id,{}),tA.get(e.id).startLeft=n,iA(s,e.startLabelLeft)}if(e.startLabelRight){const r=await DE(e.startLabelRight,rA(e.labelStyle)),n=t.insert("g").attr("class","edgeTerminals"),i=n.insert("g").attr("class","inner");s=n.node().appendChild(r),i.node().appendChild(r);const a=r.getBBox();i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),tA.get(e.id)||tA.set(e.id,{}),tA.get(e.id).startRight=n,iA(s,e.startLabelRight)}if(e.endLabelLeft){const r=await DE(e.endLabelLeft,rA(e.labelStyle)),n=t.insert("g").attr("class","edgeTerminals"),i=n.insert("g").attr("class","inner");s=i.node().appendChild(r);const a=r.getBBox();i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),n.node().appendChild(r),tA.get(e.id)||tA.set(e.id,{}),tA.get(e.id).endLeft=n,iA(s,e.endLabelLeft)}if(e.endLabelRight){const r=await DE(e.endLabelRight,rA(e.labelStyle)),n=t.insert("g").attr("class","edgeTerminals"),i=n.insert("g").attr("class","inner");s=i.node().appendChild(r);const a=r.getBBox();i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),n.node().appendChild(r),tA.get(e.id)||tA.set(e.id,{}),tA.get(e.id).endRight=n,iA(s,e.endLabelRight)}return n}),"insertEdgeLabel");function iA(t,e){Qr().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}o(iA,"setTerminalWidth");var aA=o(((t,e)=>{y.debug("Moving label abc88 ",t.id,t.label,JS.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const n=Qr(),{subGraphTitleTotalMargin:i}=qy(n);if(t.label){const n=JS.get(t.id);let a=t.x,s=t.y;if(r){const n=Pk.calcLabelPosition(r);y.debug("Moving label "+t.label+" from (",a,",",s,") to (",n.x,",",n.y,") abc88"),e.updatedPath&&(a=n.x,s=n.y)}n.attr("transform",`translate(${a}, ${s+i/2})`)}if(t.startLabelLeft){const e=tA.get(t.id).startLeft;let n=t.x,i=t.y;if(r){const e=Pk.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.startLabelRight){const e=tA.get(t.id).startRight;let n=t.x,i=t.y;if(r){const e=Pk.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.endLabelLeft){const e=tA.get(t.id).endLeft;let n=t.x,i=t.y;if(r){const e=Pk.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.endLabelRight){const e=tA.get(t.id).endRight;let n=t.x,i=t.y;if(r){const e=Pk.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}}),"positionEdgeLabel"),sA=o(((t,e)=>{const r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),s=t.width/2,o=t.height/2;return i>=s||a>=o}),"outsideNode"),oA=o(((t,e,r)=>{y.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2;let o=r.x Math.abs(n-e.x)*l){let t=r.y {y.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach((t=>{if(y.info("abc88 checking point",t,e),sA(e,t)||i)y.warn("abc88 outside",t,n),n=t,i||r.push(t);else{const a=oA(e,n,t);y.debug("abc88 inside",t,n,a),y.debug("abc88 intersection",a,e);let s=!1;r.forEach((t=>{s=s||t.x===a.x&&t.y===a.y})),r.some((t=>t.x===a.x&&t.y===a.y))?y.warn("abc88 no intersect",a,r):r.push(a),i=!0}})),y.debug("returning points",r),r}),"cutPathAtIntersect");function cA(t){const e=[],r=[];for(let n=1;n 5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===s.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-s.y)>5)&&(e.push(a),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}o(cA,"extractCornerPoints");var hA=o((function(t,e,r){const n=e.x-t.x,i=e.y-t.y,a=r/Math.sqrt(n*n+i*i);return{x:e.x-a*n,y:e.y-a*i}}),"findAdjacentPoint"),uA=o((function(t){const{cornerPointPositions:e}=cA(t),r=[];for(let n=0;n 10&&Math.abs(i.y-e.y)>=10){y.debug("Corner point fixing",Math.abs(i.x-e.x),Math.abs(i.y-e.y));const t=5;u=a.x===s.x?{x:l<0?s.x-t+h:s.x+t-h,y:c<0?s.y-h:s.y+h}:{x:l<0?s.x-h:s.x+h,y:c<0?s.y-t+h:s.y+t-h}}else y.debug("Corner point skipping fixing",Math.abs(i.x-e.x),Math.abs(i.y-e.y));r.push(u,o)}else r.push(t[n]);return r}),"fixCorners"),dA=o((function(t,e,r,n,i,a,s){const{handDrawnSeed:o}=Qr();let l=e.points,c=!1;const h=i;var u=a;const d=[];for(const t in e.cssCompiledStyles)FE(t)||d.push(e.cssCompiledStyles[t]);u.intersect&&h.intersect&&(l=l.slice(1,e.points.length-1),l.unshift(h.intersect(l[0])),y.debug("Last point APA12",e.start,"--\x3e",e.end,l[l.length-1],u,u.intersect(l[l.length-1])),l.push(u.intersect(l[l.length-1]))),e.toCluster&&(y.info("to cluster abc88",r.get(e.toCluster)),l=lA(e.points,r.get(e.toCluster).node),c=!0),e.fromCluster&&(y.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(l,null,2)),l=lA(l.reverse(),r.get(e.fromCluster).node).reverse(),c=!0);let p=l.filter((t=>!Number.isNaN(t.y)));p=uA(p);let g=Tu;switch(g=hu,e.curve){case"linear":g=hu;break;case"basis":default:g=Tu;break;case"cardinal":g=Mu;break;case"bumpX":g=xu;break;case"bumpY":g=bu;break;case"catmullRom":g=zu;break;case"monotoneX":g=td;break;case"monotoneY":g=ed;break;case"natural":g=id;break;case"step":g=sd;break;case"stepAfter":g=ld;break;case"stepBefore":g=od}const{x:f,y:m}=XS(e),v=gu().x(f).y(m).curve(g);let x,b;switch(e.thickness){case"normal":default:x="edge-thickness-normal";break;case"thick":x="edge-thickness-thick";break;case"invisible":x="edge-thickness-invisible"}switch(e.pattern){case"solid":default:x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed"}let w=v(p);const k=Array.isArray(e.style)?e.style:[e.style];let T=k.find((t=>t?.startsWith("stroke:")));if("handDrawn"===e.look){const r=AE.svg(t);Object.assign([],p);x+=" transition",b=Ga(r.path(w,{roughness:.3,seed:o})).select("path").attr("id",e.id).attr("class"," "+x+(e.classes?" "+e.classes:"")).attr("style",k?k.reduce(((t,e)=>t+";"+e),""):"");let n=b.attr("d");b.attr("d",n),t.node().appendChild(b.node())}else{const r=d.join(";"),n=k?k.reduce(((t,e)=>t+e+";"),""):"";let i="";e.animate&&(i=" edge-animation-fast"),e.animation&&(i=" edge-animation-"+e.animation);const a=r?r+";"+n+";":n;b=t.append("path").attr("d",w).attr("id",e.id).attr("class"," "+x+(e.classes?" "+e.classes:"")+(i??"")).attr("style",a),T=a.match(/stroke:([^;]+)/)?.[1]}let _="";(Qr().flowchart.arrowMarkerAbsolute||Qr().state.arrowMarkerAbsolute)&&(_=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,_=_.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),y.info("arrowTypeStart",e.arrowTypeStart),y.info("arrowTypeEnd",e.arrowTypeEnd),KS(b,e,_,s,n,T);let E={};return c&&(E.updatedPath=l),E.originalPath=e.points,E}),"insertEdge"),pA=o(((t,e,r,n)=>{e.forEach((e=>{LA[e](t,r,n)}))}),"insertMarkers"),gA=o(((t,e,r)=>{y.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")}),"extension"),fA=o(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")}),"composition"),mA=o(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")}),"aggregation"),yA=o(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")}),"dependency"),vA=o(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)}),"lollipop"),xA=o(((t,e,r)=>{t.append("marker").attr("id",r+"_"+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"),t.append("marker").attr("id",r+"_"+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")}),"point"),bA=o(((t,e,r)=>{t.append("marker").attr("id",r+"_"+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"),t.append("marker").attr("id",r+"_"+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")}),"circle"),wA=o(((t,e,r)=>{t.append("marker").attr("id",r+"_"+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"),t.append("marker").attr("id",r+"_"+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")}),"cross"),kA=o(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+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"),TA=o(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+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"),t.append("defs").append("marker").attr("id",r+"_"+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"),_A=o(((t,e,r)=>{const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")}),"zero_or_one"),EA=o(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+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"),t.append("defs").append("marker").attr("id",r+"_"+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"),CA=o(((t,e,r)=>{const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")}),"zero_or_more"),SA=o(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20")}),"requirement_arrow"),AA=o(((t,e,r)=>{const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)}),"requirement_contains"),LA={extension:gA,composition:fA,aggregation:mA,dependency:yA,lollipop:vA,point:xA,circle:bA,cross:wA,barb:kA,only_one:TA,zero_or_one:_A,one_or_more:EA,zero_or_more:CA,requirement_arrow:SA,requirement_contains:AA},NA=pA,IA={common:Lr,getConfig:Gt,insertCluster:XE,insertEdge:dA,insertEdgeLabel:nA,insertMarkers:NA,insertNode:GS,interpolateToCurve:ok,labelHelper:x_,log:y,positionEdgeLabel:aA},RA={},MA=o((t=>{for(const e of t)RA[e.name]=e}),"registerLayoutLoaders");o((()=>{MA([{name:"dagre",loader:o((async()=>await Promise.resolve().then((function(){return EH}))),"loader")}])}),"registerDefaultLayoutLoaders")();var DA=o((async(t,e)=>{if(!(t.layoutAlgorithm in RA))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const r=RA[t.layoutAlgorithm];return(await r.loader()).render(t,e,IA,{algorithm:r.algorithm})}),"render"),OA=o(((t="",{fallback:e="dagre"}={})=>{if(t in RA)return t;if(e in RA)return y.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)}),"getRegisteredLayoutAlgorithm"),PA=pb(Object.keys,Object),BA=Object.prototype.hasOwnProperty;function $A(t){if(!yb(t))return PA(t);var e=[];for(var r in Object(t))BA.call(t,r)&&"constructor"!=r&&e.push(r);return e}o($A,"baseKeys");var FA=$A,zA=Iv(Vy,"DataView"),UA=Iv(Vy,"Promise"),GA=Iv(Vy,"Set"),qA=Iv(Vy,"WeakMap"),jA="[object Map]",WA="[object Promise]",YA="[object Set]",HA="[object WeakMap]",VA="[object DataView]",XA=xv(zA),KA=xv(hx),ZA=xv(UA),QA=xv(GA),JA=xv(qA),tL=ov;(zA&&tL(new zA(new ArrayBuffer(1)))!=VA||hx&&tL(new hx)!=jA||UA&&tL(UA.resolve())!=WA||GA&&tL(new GA)!=YA||qA&&tL(new qA)!=HA)&&(tL=o((function(t){var e=ov(t),r="[object Object]"==e?t.constructor:void 0,n=r?xv(r):"";if(n)switch(n){case XA:return VA;case KA:return jA;case ZA:return WA;case QA:return YA;case JA:return HA}return e}),"getTag"));var eL=tL,rL=Object.prototype.hasOwnProperty;function nL(t){if(null==t)return!0;if(Mb(t)&&(Lb(t)||"string"==typeof t||"function"==typeof t.splice||Ub(t)||aw(t)||Ab(t)))return!t.length;var e=eL(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(yb(t))return!FA(t).length;for(var r in t)if(rL.call(t,r))return!1;return!0}o(nL,"isEmpty");var iL=nL,aL={id:"c4",detector:o((t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return sX}));return{id:"c4",diagram:t}}),"loader")},sL="flowchart",oL=o(((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t)),"detector"),lL={id:sL,detector:oL,loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return wX}));return{id:sL,diagram:t}}),"loader")},cL="flowchart-v2",hL=o(((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t))),"detector"),uL={id:cL,detector:hL,loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return wX}));return{id:cL,diagram:t}}),"loader")},dL={id:"er",detector:o((t=>/^\s*erDiagram/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return LX}));return{id:"er",diagram:t}}),"loader")},pL="gitGraph",gL={id:pL,detector:o((t=>/^\s*gitGraph/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return int}));return{id:pL,diagram:t}}),"loader")},fL="gantt",mL={id:fL,detector:o((t=>/^\s*gantt/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return Fit}));return{id:fL,diagram:t}}),"loader")},yL="info",vL={id:yL,detector:o((t=>/^\s*info/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return Wit}));return{id:yL,diagram:t}}),"loader")},xL={id:"pie",detector:o((t=>/^\s*pie/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return oat}));return{id:"pie",diagram:t}}),"loader")},bL="quadrantChart",wL={id:bL,detector:o((t=>/^\s*quadrantChart/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return Pat}));return{id:bL,diagram:t}}),"loader")},kL="xychart",TL={id:kL,detector:o((t=>/^\s*xychart-beta/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return Rst}));return{id:kL,diagram:t}}),"loader")},_L="requirement",EL={id:_L,detector:o((t=>/^\s*requirement(Diagram)?/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return zst}));return{id:_L,diagram:t}}),"loader")},CL="sequence",SL={id:CL,detector:o((t=>/^\s*sequenceDiagram/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return Vot}));return{id:CL,diagram:t}}),"loader")},AL="class",LL=o(((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t)),"detector"),NL={id:AL,detector:LL,loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return clt}));return{id:AL,diagram:t}}),"loader")},IL="classDiagram",RL=o(((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t)),"detector"),ML={id:IL,detector:RL,loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return ult}));return{id:IL,diagram:t}}),"loader")},DL="state",OL=o(((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t)),"detector"),PL={id:DL,detector:OL,loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return Cct}));return{id:DL,diagram:t}}),"loader")},BL="stateDiagram",$L=o(((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer)),"detector"),FL={id:BL,detector:$L,loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return Act}));return{id:BL,diagram:t}}),"loader")},zL="journey",UL={id:zL,detector:o((t=>/^\s*journey/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return fht}));return{id:zL,diagram:t}}),"loader")},GL=o(((t,e,r)=>{y.debug("rendering svg for syntax error\n");const n=ag(e),i=n.append("g");n.attr("viewBox","0 0 2412 512"),Rr(n,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)}),"draw"),qL={draw:GL},jL=qL,WL={db:{},renderer:qL,parser:{parse:o((()=>{}),"parse")}},YL="flowchart-elk",HL=o(((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0)),"detector"),VL={id:YL,detector:HL,loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return wX}));return{id:YL,diagram:t}}),"loader")},XL="timeline",KL={id:XL,detector:o((t=>/^\s*timeline/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return iut}));return{id:XL,diagram:t}}),"loader")},ZL="mindmap",QL={id:ZL,detector:o((t=>/^\s*mindmap/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return DCt}));return{id:ZL,diagram:t}}),"loader")},JL="kanban",tN={id:JL,detector:o((t=>/^\s*kanban/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return iSt}));return{id:JL,diagram:t}}),"loader")},eN="sankey",rN={id:eN,detector:o((t=>/^\s*sankey-beta/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return uAt}));return{id:eN,diagram:t}}),"loader")},nN="packet",iN={id:nN,detector:o((t=>/^\s*packet-beta/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return SAt}));return{id:nN,diagram:t}}),"loader")},aN="radar",sN={id:aN,detector:o((t=>/^\s*radar-beta/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return rLt}));return{id:aN,diagram:t}}),"loader")},oN="block",lN={id:oN,detector:o((t=>/^\s*block-beta/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return TIt}));return{id:oN,diagram:t}}),"loader")},cN="architecture",hN={id:cN,detector:o((t=>/^\s*architecture/.test(t)),"detector"),loader:o((async()=>{const{diagram:t}=await Promise.resolve().then((function(){return LRt}));return{id:cN,diagram:t}}),"loader")},uN=!1,dN=o((()=>{uN||(uN=!0,sn("error",WL,(t=>"error"===t.toLowerCase().trim())),sn("---",{db:{clear:o((()=>{}),"clear")},styles:{},renderer:{draw:o((()=>{}),"draw")},parser:{parse:o((()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")}),"parse")},init:o((()=>null),"init")},(t=>t.toLowerCase().trimStart().startsWith("---"))),C(aL,tN,ML,NL,dL,mL,vL,xL,EL,SL,VL,uL,lL,QL,KL,gL,FL,PL,UL,wL,rN,iN,TL,lN,hN,sN))}),"addDiagrams"),pN=o((async()=>{y.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(_).map((async([t,{detector:e,loader:r}])=>{if(r)try{on(t)}catch{try{const{diagram:t,id:n}=await r();sn(n,t,e)}catch(e){throw y.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete _[t],e}}})))).filter((t=>"rejected"===t.status));if(t.length>0){y.error(`Failed to load ${t.length} external diagrams`);for(const e of t)y.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}}),"loadRegisteredDiagrams"),gN="comm",fN="rule",mN="decl",yN=Math.abs,vN=String.fromCharCode;function xN(t){return t.trim()}function bN(t,e,r){return t.replace(e,r)}function wN(t,e,r){return t.indexOf(e,r)}function kN(t,e){return 0|t.charCodeAt(e)}function TN(t,e,r){return t.slice(e,r)}function _N(t){return t.length}function EN(t){return t.length}function CN(t,e){return e.push(t),t}o(xN,"trim"),o(bN,"replace"),o(wN,"indexof"),o(kN,"charat"),o(TN,"substr"),o(_N,"strlen"),o(EN,"sizeof"),o(CN,"append");var SN=1,AN=1,LN=0,NN=0,IN=0,RN="";function MN(t,e,r,n,i,a,s,o){return{value:t,root:e,parent:r,type:n,props:i,children:a,line:SN,column:AN,length:s,return:"",siblings:o}}function DN(){return IN}function ON(){return IN=NN>0?kN(RN,--NN):0,AN--,10===IN&&(AN=1,SN--),IN}function PN(){return IN=NN 2||zN(IN)>3?"":" "}function WN(t,e){for(;--e&&PN()&&!(IN<48||IN>102||IN>57&&IN<65||IN>70&&IN<97););return FN(t,$N()+(e<6&&32==BN()&&32==PN()))}function YN(t){for(;PN();)switch(IN){case t:return NN;case 34:case 39:34!==t&&39!==t&&YN(IN);break;case 40:41===t&&YN(t);break;case 92:PN()}return NN}function HN(t,e){for(;PN()&&t+IN!==57&&(t+IN!==84||47!==BN()););return"/*"+FN(e,NN-1)+"*"+vN(47===t?t:PN())}function VN(t){for(;!zN(BN());)PN();return FN(t,NN)}function XN(t){return GN(KN("",null,null,null,[""],t=UN(t),0,[0],t))}function KN(t,e,r,n,i,a,s,o,l){for(var c=0,h=0,u=s,d=0,p=0,g=0,f=1,m=1,y=1,v=0,x="",b=i,w=a,k=n,T=x;m;)switch(g=v,v=PN()){case 40:if(108!=g&&58==kN(T,u-1)){-1!=wN(T+=bN(qN(v),"&","&\f"),"&\f",yN(c?o[c-1]:0))&&(y=-1);break}case 34:case 39:case 91:T+=qN(v);break;case 9:case 10:case 13:case 32:T+=jN(g);break;case 92:T+=WN($N()-1,7);continue;case 47:switch(BN()){case 42:case 47:CN(QN(HN(PN(),$N()),e,r,l),l),5!=zN(g||1)&&5!=zN(BN()||1)||!_N(T)||" "===TN(T,-1,void 0)||(T+=" ");break;default:T+="/"}break;case 123*f:o[c++]=_N(T)*y;case 125*f:case 59:case 0:switch(v){case 0:case 125:m=0;case 59+h:-1==y&&(T=bN(T,/\f/g,"")),p>0&&(_N(T)-u||0===f&&47===g)&&CN(p>32?JN(T+";",n,r,u-1,l):JN(bN(T," ","")+";",n,r,u-2,l),l);break;case 59:T+=";";default:if(CN(k=ZN(T,e,r,c,h,i,o,x,b=[],w=[],u,a),a),123===v)if(0===h)KN(T,e,k,k,b,a,u,o,w);else{switch(d){case 99:if(110===kN(T,3))break;case 108:if(97===kN(T,2))break;default:h=0;case 100:case 109:case 115:}h?KN(t,k,k,n&&CN(ZN(t,k,k,0,0,i,o,x,i,b=[],u,w),w),i,w,u,o,n?b:w):KN(T,k,k,k,[""],w,0,o,w)}}c=h=p=0,f=y=1,x=T="",u=s;break;case 58:u=1+_N(T),p=g;default:if(f<1)if(123==v)--f;else if(125==v&&0==f++&&125==ON())continue;switch(T+=vN(v),v*f){case 38:y=h>0?1:(T+="\f",-1);break;case 44:o[c++]=(_N(T)-1)*y,y=1;break;case 64:45===BN()&&(T+=qN(PN())),d=BN(),h=u=_N(x=T+=VN($N())),v++;break;case 45:45===g&&2==_N(T)&&(f=0)}}return a}function ZN(t,e,r,n,i,a,s,o,l,c,h,u){for(var d=i-1,p=0===i?a:[""],g=EN(p),f=0,m=0,y=0;f 0?p[v]+" "+x:bN(x,/&\f/g,p[v])))&&(l[y++]=b);return MN(t,e,r,0===i?fN:o,l,c,h,u)}function QN(t,e,r,n){return MN(t,e,r,gN,vN(DN()),TN(t,2,-2),0,n)}function JN(t,e,r,n,i){return MN(t,e,r,mN,TN(t,0,n),TN(t,n+1,-1),n,i)}function tI(t,e){for(var r="",n=0;n {aI.forEach((t=>{t()})),aI=[]}),"attachFunctions"),oI=o((t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart()),"cleanupComments");function lI(t){const e=t.match(b);if(!e)return{text:t,metadata:{}};let r=oy(e[1],{schema:sy})??{};r="object"!=typeof r||Array.isArray(r)?{}:r;const n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:t.slice(e[0].length),metadata:n}}o(lI,"extractFrontMatter");var cI=o((t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,((t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"))),"cleanupText"),hI=o((t=>{const{text:e,metadata:r}=lI(t),{displayMode:n,title:i,config:a={}}=r;return n&&(a.gantt||(a.gantt={}),a.gantt.displayMode=n),{title:i,config:a,text:e}}),"processFrontmatter"),uI=o((t=>{const e=Pk.detectInit(t)??{},r=Pk.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some((({type:t})=>"wrap"===t)):"wrap"===r?.type&&(e.wrap=!0),{text:ak(t),directive:e}}),"processDirectives");function dI(t){const e=cI(t),r=hI(e),n=uI(r.text),i=Ok(r.config,n.directive);return{code:t=oI(n.text),title:r.title,config:i}}function pI(t){const e=(new TextEncoder).encode(t),r=Array.from(e,(t=>String.fromCodePoint(t))).join("");return btoa(r)}o(dI,"preprocessDiagram"),o(pI,"toBase64");var gI=["foreignobject"],fI=["dominant-baseline"];function mI(t){const e=dI(t);return Wt(),jt(e.config??{}),e}async function yI(t,e){dN();try{const{code:e,config:r}=mI(t);return{diagramType:(await AI(e)).type,config:r}}catch(t){if(e?.suppressErrors)return!1;throw t}}o(mI,"processAndSetConfigs"),o(yI,"parse");var vI=o(((t,e,r=[])=>`\n.${t} ${e} { ${r.join(" !important; ")} !important; }`),"cssImportantStyles"),xI=o(((t,e=new Map)=>{let r="";if(void 0!==t.themeCSS&&(r+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(r+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(r+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const n=["> *","span"],i=["rect","polygon","ellipse","circle","path"],a=t.htmlLabels??t.flowchart?.htmlLabels?n:i;e.forEach((t=>{iL(t.styles)||a.forEach((e=>{r+=vI(t.id,e,t.styles)})),iL(t.textStyles)||(r+=vI(t.id,"tspan",(t?.textStyles||[]).map((t=>t.replace("color","fill")))))}))}return r}),"createCssStyles"),bI=o(((t,e,r,n)=>{const i=xI(t,r);return tI(XN(`${n}{${Br(e,i,t.themeVariables)}}`),eI)}),"createUserStyles"),wI=o(((t="",e,r)=>{let n=t;return r||e||(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=$k(n),n=n.replace(/
/g,"
"),n}),"cleanUpSvgCode"),kI=o(((t="",e)=>`