local-operator-ui 0.12.7 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/out/main/index.jsc +0 -0
  2. package/out/preload/index.jsc +0 -0
  3. package/out/renderer/assets/_basePickBy-Dt8NA_1A.js +1 -0
  4. package/out/renderer/assets/_baseUniq-Dfn2rCfr.js +1 -0
  5. package/out/renderer/assets/agent-details-page-CJJgDqdX.js +6 -0
  6. package/out/renderer/assets/agent-hub-page-CznUZD2f.js +11 -0
  7. package/out/renderer/assets/agents-page-COdPTFYp.js +18 -0
  8. package/out/renderer/assets/arc-C1_J1TYO.js +1 -0
  9. package/out/renderer/assets/architectureDiagram-IEHRJDOE-p5UIRlv1.js +36 -0
  10. package/out/renderer/assets/asn1-EdZsLKOL.js +1 -0
  11. package/out/renderer/assets/band-CquvqAHh.js +1 -0
  12. package/out/renderer/assets/blockDiagram-JOT3LUYC-Dk6LFvtm.js +121 -0
  13. package/out/renderer/assets/c4Diagram-VJAJSXHY-C0Hp8OKf.js +10 -0
  14. package/out/renderer/assets/channel-BqUr4Qsu.js +1 -0
  15. package/out/renderer/assets/chunk-4BMEZGHF-CV1FNkGZ.js +1 -0
  16. package/out/renderer/assets/chunk-A2AXSNBT-Co_5OkmZ.js +164 -0
  17. package/out/renderer/assets/chunk-AEK57VVT-Bu3wjBen.js +220 -0
  18. package/out/renderer/assets/chunk-D6G4REZN-BvFphnUv.js +1 -0
  19. package/out/renderer/assets/chunk-RZ5BOZE2-DBIcRvVx.js +1 -0
  20. package/out/renderer/assets/chunk-XZIHB7SX-DjSBj758.js +1 -0
  21. package/out/renderer/assets/classDiagram-GIVACNV2-DyZfTBa4.js +1 -0
  22. package/out/renderer/assets/classDiagram-v2-COTLJTTW-DyZfTBa4.js +1 -0
  23. package/out/renderer/assets/clojure-BMjYHr_A.js +1 -0
  24. package/out/renderer/assets/clone-hR8g0-gq.js +1 -0
  25. package/out/renderer/assets/css-BnMrqG3P.js +1 -0
  26. package/out/renderer/assets/cytoscape.esm-DHvQc-Lm.js +331 -0
  27. package/out/renderer/assets/dagre-OKDRZEBW-DbOc711m.js +4 -0
  28. package/out/renderer/assets/diagram-SSKATNLV-YLnBMg9L.js +43 -0
  29. package/out/renderer/assets/diagram-VNBRO52H-DHzPX2Ws.js +24 -0
  30. package/out/renderer/assets/erDiagram-Q7BY3M3F-CxFuapOs.js +60 -0
  31. package/out/renderer/assets/flowDiagram-4HSFHLVR-D5vc3yns.js +161 -0
  32. package/out/renderer/assets/ganttDiagram-APWFNJXF-ejBZIm6I.js +257 -0
  33. package/out/renderer/assets/gitGraphDiagram-7IBYFJ6S-6m7tU_G2.js +65 -0
  34. package/out/renderer/assets/graph-DIHt6FPP.js +1 -0
  35. package/out/renderer/assets/icon-CTN1YQYZ.js +195 -0
  36. package/out/renderer/assets/icon-nCvgDdVX.css +1 -0
  37. package/out/renderer/assets/index-BpRBp6-j.js +7 -0
  38. package/out/renderer/assets/index-BweSWC55.js +1 -0
  39. package/out/renderer/assets/index-CLHdxmCS.js +1272 -0
  40. package/out/renderer/assets/index-DikLkf3S.css +1 -0
  41. package/out/renderer/assets/infoDiagram-PH2N3AL5-D1KBOewb.js +2 -0
  42. package/out/renderer/assets/init-Dmth1JHB.js +1 -0
  43. package/out/renderer/assets/installer-T4sGv29U.js +16 -0
  44. package/out/renderer/assets/javascript-qCveANmP.js +1 -0
  45. package/out/renderer/assets/journeyDiagram-U35MCT3I-DsqwRdF3.js +138 -0
  46. package/out/renderer/assets/kanban-definition-NDS4AKOZ-BQvBdP_9.js +88 -0
  47. package/out/renderer/assets/katex-BCx1q_2Y.css +1 -0
  48. package/out/renderer/assets/layout-C7qoUpVb.js +1 -0
  49. package/out/renderer/assets/linear-BfLTrHPc.js +1 -0
  50. package/out/renderer/assets/mermaid.core-CyfNZ-Rl.js +213 -0
  51. package/out/renderer/assets/mindmap-definition-ALO5MXBD-CTSdCgh1.js +95 -0
  52. package/out/renderer/assets/mllike-CXdrOF99.js +1 -0
  53. package/out/renderer/assets/ordinal-DILIJJjt.js +1 -0
  54. package/out/renderer/assets/page-header-CNXeqkJB.js +1 -0
  55. package/out/renderer/assets/parseISO-CyJpeshf.js +6 -0
  56. package/out/renderer/assets/pieDiagram-IB7DONF6-CeYuFnxD.js +30 -0
  57. package/out/renderer/assets/pug-DukmZTjD.js +1 -0
  58. package/out/renderer/assets/python-BuPzkPfP.js +1 -0
  59. package/out/renderer/assets/quadrantDiagram-7GDLP6J5-urCUNLvr.js +7 -0
  60. package/out/renderer/assets/radar-MK3ICKWK-D0m91kg2.js +128 -0
  61. package/out/renderer/assets/requirementDiagram-KVF5MWMF-7WDiFe7C.js +64 -0
  62. package/out/renderer/assets/rpm-CTu-6PCP.js +1 -0
  63. package/out/renderer/assets/sankeyDiagram-QLVOVGJD-BvCTETAk.js +10 -0
  64. package/out/renderer/assets/schedules-page-B2sb5H0L.js +115 -0
  65. package/out/renderer/assets/sequenceDiagram-X6HHIX6F-DGlKyLMu.js +122 -0
  66. package/out/renderer/assets/settings-page-DnOXVx9n.js +154 -0
  67. package/out/renderer/assets/settings-section-CBkMzMRA.js +6 -0
  68. package/out/renderer/assets/sql-D0XecflT.js +1 -0
  69. package/out/renderer/assets/square-pen-C9ah35lX.js +6 -0
  70. package/out/renderer/assets/stateDiagram-DGXRK772-BY_eMRWs.js +1 -0
  71. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-DecHc3j6.js +1 -0
  72. package/out/renderer/assets/step-DMJAOHzS.js +1 -0
  73. package/out/renderer/assets/time-BOTM2Tp0.js +1 -0
  74. package/out/renderer/assets/timeline-definition-BDJGKUSR-9Ezq9kKH.js +61 -0
  75. package/out/renderer/assets/ttcn-cfg-B9xdYoR4.js +1 -0
  76. package/out/renderer/assets/use-agent-like-mutation-BYo-fu7V.js +1 -0
  77. package/out/renderer/assets/xychartDiagram-VJFVF3MP-O2pD61nn.js +7 -0
  78. package/out/renderer/index.html +4 -4
  79. package/out/renderer/installer.html +3 -3
  80. package/package.json +50 -22
  81. package/out/renderer/assets/GeistMonoNerdFontMono-Black-CPyfXpD2.otf +0 -0
  82. package/out/renderer/assets/GeistMonoNerdFontMono-Light-CRgGhpeL.otf +0 -0
  83. package/out/renderer/assets/GeistMonoNerdFontMono-Medium-Dui3XGJy.otf +0 -0
  84. package/out/renderer/assets/GeistMonoNerdFontMono-Thin-D5jufbuH.otf +0 -0
  85. package/out/renderer/assets/GeistMonoNerdFontMono-UltraBlack-CChzVbOW.otf +0 -0
  86. package/out/renderer/assets/_basePickBy-Xni00Dlk.js +0 -195
  87. package/out/renderer/assets/_baseUniq-JxZZknyU.js +0 -835
  88. package/out/renderer/assets/arc-BPRFPuHz.js +0 -131
  89. package/out/renderer/assets/architectureDiagram-IEHRJDOE-iKnn0iSS.js +0 -8653
  90. package/out/renderer/assets/asn1-BnOEsgAm.js +0 -144
  91. package/out/renderer/assets/blockDiagram-JOT3LUYC-BW-Yo0Fe.js +0 -3585
  92. package/out/renderer/assets/c4Diagram-VJAJSXHY-cTGz3ymz.js +0 -2487
  93. package/out/renderer/assets/channel-CsQk5gsI.js +0 -7
  94. package/out/renderer/assets/chunk-4BMEZGHF-DjpLWrPj.js +0 -16
  95. package/out/renderer/assets/chunk-A2AXSNBT-Blza621e.js +0 -1827
  96. package/out/renderer/assets/chunk-AEK57VVT-ZmlsDCZe.js +0 -1953
  97. package/out/renderer/assets/chunk-D6G4REZN-C7msyVje.js +0 -108
  98. package/out/renderer/assets/chunk-RZ5BOZE2-CWvJQJJl.js +0 -34
  99. package/out/renderer/assets/chunk-XZIHB7SX-C-gdVJBt.js +0 -19
  100. package/out/renderer/assets/classDiagram-GIVACNV2-BcRnaMRd.js +0 -21
  101. package/out/renderer/assets/classDiagram-v2-COTLJTTW-BcRnaMRd.js +0 -21
  102. package/out/renderer/assets/clear-icon-with-text-Cu96UxOE.png +0 -0
  103. package/out/renderer/assets/clojure-BhXMqnxz.js +0 -849
  104. package/out/renderer/assets/clone-3XFGex6Y.js +0 -8
  105. package/out/renderer/assets/css-c-jst79C.js +0 -1783
  106. package/out/renderer/assets/cytoscape.esm-C0AOj4uS.js +0 -30062
  107. package/out/renderer/assets/dagre-OKDRZEBW-BMuSMCUF.js +0 -695
  108. package/out/renderer/assets/diagram-SSKATNLV-BCxxN7T6.js +0 -304
  109. package/out/renderer/assets/diagram-VNBRO52H-q41sVUvc.js +0 -193
  110. package/out/renderer/assets/erDiagram-Q7BY3M3F-BFd2rLsa.js +0 -1160
  111. package/out/renderer/assets/flowDiagram-4HSFHLVR-_Arrrk_3.js +0 -2324
  112. package/out/renderer/assets/fonts-CM-VN_uu.css +0 -64
  113. package/out/renderer/assets/fonts-DqkQ6BY5.js +0 -31168
  114. package/out/renderer/assets/ganttDiagram-APWFNJXF-Dzw68AV_.js +0 -2500
  115. package/out/renderer/assets/gitGraphDiagram-7IBYFJ6S-BlkO8Bzg.js +0 -1204
  116. package/out/renderer/assets/graph-DL-34vhw.js +0 -424
  117. package/out/renderer/assets/index-BDLsFoJv.js +0 -312
  118. package/out/renderer/assets/index-CiPFa_9B.css +0 -10
  119. package/out/renderer/assets/index-MaDq9HTX.js +0 -365078
  120. package/out/renderer/assets/index-vAasWWpO.js +0 -406
  121. package/out/renderer/assets/infoDiagram-PH2N3AL5-DO4pqvW_.js +0 -33
  122. package/out/renderer/assets/installer-Ct30gPA9.js +0 -511
  123. package/out/renderer/assets/javascript-C3MnDRiU.js +0 -994
  124. package/out/renderer/assets/journeyDiagram-U35MCT3I-BJQ-FRal.js +0 -1199
  125. package/out/renderer/assets/kanban-definition-NDS4AKOZ-B1zGbozL.js +0 -1046
  126. package/out/renderer/assets/layout-BrQGvDtH.js +0 -2060
  127. package/out/renderer/assets/mindmap-definition-ALO5MXBD-B5SNv6RZ.js +0 -5836
  128. package/out/renderer/assets/mllike-DHn7xckP.js +0 -334
  129. package/out/renderer/assets/pieDiagram-IB7DONF6-DKT0Bk2S.js +0 -239
  130. package/out/renderer/assets/pug-By0kVCfm.js +0 -405
  131. package/out/renderer/assets/python-CvWbmiX4.js +0 -427
  132. package/out/renderer/assets/quadrantDiagram-7GDLP6J5-CFMDiFFE.js +0 -1340
  133. package/out/renderer/assets/radar-MK3ICKWK-DwsnroMG.js +0 -16935
  134. package/out/renderer/assets/requirementDiagram-KVF5MWMF-DPTaldQZ.js +0 -1163
  135. package/out/renderer/assets/rpm-C-DLY-If.js +0 -109
  136. package/out/renderer/assets/sankeyDiagram-QLVOVGJD-DIFNjSQ_.js +0 -1201
  137. package/out/renderer/assets/sequenceDiagram-X6HHIX6F-Chi1Y6mU.js +0 -3415
  138. package/out/renderer/assets/sql-BSrOzCRI.js +0 -354
  139. package/out/renderer/assets/stateDiagram-DGXRK772-DcmhTUVK.js +0 -467
  140. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-Dy-oRm-T.js +0 -21
  141. package/out/renderer/assets/timeline-definition-BDJGKUSR-0y2wZWef.js +0 -1223
  142. package/out/renderer/assets/ttcn-cfg-Dc39-fIP.js +0 -133
  143. package/out/renderer/assets/xychartDiagram-VJFVF3MP-Bbr5uqsp.js +0 -1800
@@ -0,0 +1,213 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CLHdxmCS.js","./icon-CTN1YQYZ.js","./icon-nCvgDdVX.css","./index-DikLkf3S.css","./dagre-OKDRZEBW-DbOc711m.js","./graph-DIHt6FPP.js","./_baseUniq-Dfn2rCfr.js","./layout-C7qoUpVb.js","./_basePickBy-Dt8NA_1A.js","./clone-hR8g0-gq.js","./step-DMJAOHzS.js","./c4Diagram-VJAJSXHY-C0Hp8OKf.js","./chunk-D6G4REZN-BvFphnUv.js","./flowDiagram-4HSFHLVR-D5vc3yns.js","./chunk-RZ5BOZE2-DBIcRvVx.js","./channel-BqUr4Qsu.js","./erDiagram-Q7BY3M3F-CxFuapOs.js","./gitGraphDiagram-7IBYFJ6S-6m7tU_G2.js","./chunk-4BMEZGHF-CV1FNkGZ.js","./chunk-XZIHB7SX-DjSBj758.js","./radar-MK3ICKWK-D0m91kg2.js","./ganttDiagram-APWFNJXF-ejBZIm6I.js","./time-BOTM2Tp0.js","./linear-BfLTrHPc.js","./init-Dmth1JHB.js","./infoDiagram-PH2N3AL5-D1KBOewb.js","./pieDiagram-IB7DONF6-CeYuFnxD.js","./arc-C1_J1TYO.js","./ordinal-DILIJJjt.js","./quadrantDiagram-7GDLP6J5-urCUNLvr.js","./xychartDiagram-VJFVF3MP-O2pD61nn.js","./band-CquvqAHh.js","./requirementDiagram-KVF5MWMF-7WDiFe7C.js","./sequenceDiagram-X6HHIX6F-DGlKyLMu.js","./classDiagram-GIVACNV2-DyZfTBa4.js","./chunk-A2AXSNBT-Co_5OkmZ.js","./classDiagram-v2-COTLJTTW-DyZfTBa4.js","./stateDiagram-DGXRK772-BY_eMRWs.js","./chunk-AEK57VVT-Bu3wjBen.js","./stateDiagram-v2-YXO3MK2T-DecHc3j6.js","./journeyDiagram-U35MCT3I-DsqwRdF3.js","./timeline-definition-BDJGKUSR-9Ezq9kKH.js","./mindmap-definition-ALO5MXBD-CTSdCgh1.js","./cytoscape.esm-DHvQc-Lm.js","./kanban-definition-NDS4AKOZ-BQvBdP_9.js","./sankeyDiagram-QLVOVGJD-BvCTETAk.js","./diagram-VNBRO52H-DHzPX2Ws.js","./diagram-SSKATNLV-YLnBMg9L.js","./blockDiagram-JOT3LUYC-Dk6LFvtm.js","./architectureDiagram-IEHRJDOE-p5UIRlv1.js"])))=>i.map(i=>d[i]);
2
+ import{aK as dt}from"./index-CLHdxmCS.js";import{g as Ag}from"./icon-CTN1YQYZ.js";import{y as Ge,z as Zo,A as Eg,B as Ko,D as xc,E as un,e as Qo,F as bc,G as Cc,H as wc,I as _c,J as kc,K as vc,L as Mg,M as Na,N as Sc,O as Tc,P as Fg,Q as Og,k as Vi,l as $g}from"./step-DMJAOHzS.js";var Xi={exports:{}},Dg=Xi.exports,Jo;function Rg(){return Jo||(Jo=1,function(e,t){(function(r,i){e.exports=i()})(Dg,function(){var r=1e3,i=6e4,n=36e5,a="millisecond",o="second",s="minute",c="hour",l="day",h="week",u="month",f="quarter",d="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(M){var E=["th","st","nd","rd"],T=M%100;return"["+M+(E[(T-20)%10]||E[T]||E[0])+"]"}},C=function(M,E,T){var F=String(M);return!F||F.length>=E?M:""+Array(E+1-F.length).join(T)+M},k={s:C,z:function(M){var E=-M.utcOffset(),T=Math.abs(E),F=Math.floor(T/60),A=T%60;return(E<=0?"+":"-")+C(F,2,"0")+":"+C(A,2,"0")},m:function M(E,T){if(E.date()<T.date())return-M(T,E);var F=12*(T.year()-E.year())+(T.month()-E.month()),A=E.clone().add(F,u),N=T-A<0,q=E.clone().add(F+(N?-1:1),u);return+(-(F+(T-A)/(N?A-q:q-A))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:u,y:d,w:h,d:l,D:g,h:c,m:s,s:o,ms:a,Q:f}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},v="en",B={};B[v]=b;var S="$isDayjsObject",D=function(M){return M instanceof z||!(!M||!M[S])},R=function M(E,T,F){var A;if(!E)return v;if(typeof E=="string"){var N=E.toLowerCase();B[N]&&(A=N),T&&(B[N]=T,A=N);var q=E.split("-");if(!A&&q.length>1)return M(q[0])}else{var Z=E.name;B[Z]=E,A=Z}return!F&&A&&(v=A),A||!F&&v},$=function(M,E){if(D(M))return M.clone();var T=typeof E=="object"?E:{};return T.date=M,T.args=arguments,new z(T)},L=k;L.l=R,L.i=D,L.w=function(M,E){return $(M,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var z=function(){function M(T){this.$L=R(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[S]=!0}var E=M.prototype;return E.parse=function(T){this.$d=function(F){var A=F.date,N=F.utc;if(A===null)return new Date(NaN);if(L.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var q=A.match(y);if(q){var Z=q[2]-1||0,at=(q[7]||"0").substring(0,3);return N?new Date(Date.UTC(q[1],Z,q[3]||1,q[4]||0,q[5]||0,q[6]||0,at)):new Date(q[1],Z,q[3]||1,q[4]||0,q[5]||0,q[6]||0,at)}}return new Date(A)}(T),this.init()},E.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()},E.$utils=function(){return L},E.isValid=function(){return this.$d.toString()!==m},E.isSame=function(T,F){var A=$(T);return this.startOf(F)<=A&&A<=this.endOf(F)},E.isAfter=function(T,F){return $(T)<this.startOf(F)},E.isBefore=function(T,F){return this.endOf(F)<$(T)},E.$g=function(T,F,A){return L.u(T)?this[F]:this.set(A,T)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(T,F){var A=this,N=!!L.u(F)||F,q=L.p(T),Z=function(ee,St){var re=L.w(A.$u?Date.UTC(A.$y,St,ee):new Date(A.$y,St,ee),A);return N?re:re.endOf(l)},at=function(ee,St){return L.w(A.toDate()[ee].apply(A.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(St)),A)},nt=this.$W,pt=this.$M,st=this.$D,Gt="set"+(this.$u?"UTC":"");switch(q){case d:return N?Z(1,0):Z(31,11);case u:return N?Z(1,pt):Z(0,pt+1);case h:var $t=this.$locale().weekStart||0,Re=(nt<$t?nt+7:nt)-$t;return Z(N?st-Re:st+(6-Re),pt);case l:case g:return at(Gt+"Hours",0);case c:return at(Gt+"Minutes",1);case s:return at(Gt+"Seconds",2);case o:return at(Gt+"Milliseconds",3);default:return this.clone()}},E.endOf=function(T){return this.startOf(T,!1)},E.$set=function(T,F){var A,N=L.p(T),q="set"+(this.$u?"UTC":""),Z=(A={},A[l]=q+"Date",A[g]=q+"Date",A[u]=q+"Month",A[d]=q+"FullYear",A[c]=q+"Hours",A[s]=q+"Minutes",A[o]=q+"Seconds",A[a]=q+"Milliseconds",A)[N],at=N===l?this.$D+(F-this.$W):F;if(N===u||N===d){var nt=this.clone().set(g,1);nt.$d[Z](at),nt.init(),this.$d=nt.set(g,Math.min(this.$D,nt.daysInMonth())).$d}else Z&&this.$d[Z](at);return this.init(),this},E.set=function(T,F){return this.clone().$set(T,F)},E.get=function(T){return this[L.p(T)]()},E.add=function(T,F){var A,N=this;T=Number(T);var q=L.p(F),Z=function(pt){var st=$(N);return L.w(st.date(st.date()+Math.round(pt*T)),N)};if(q===u)return this.set(u,this.$M+T);if(q===d)return this.set(d,this.$y+T);if(q===l)return Z(1);if(q===h)return Z(7);var at=(A={},A[s]=i,A[c]=n,A[o]=r,A)[q]||1,nt=this.$d.getTime()+T*at;return L.w(nt,this)},E.subtract=function(T,F){return this.add(-1*T,F)},E.format=function(T){var F=this,A=this.$locale();if(!this.isValid())return A.invalidDate||m;var N=T||"YYYY-MM-DDTHH:mm:ssZ",q=L.z(this),Z=this.$H,at=this.$m,nt=this.$M,pt=A.weekdays,st=A.months,Gt=A.meridiem,$t=function(St,re,Zt,me){return St&&(St[re]||St(F,N))||Zt[re].slice(0,me)},Re=function(St){return L.s(Z%12||12,St,"0")},ee=Gt||function(St,re,Zt){var me=St<12?"AM":"PM";return Zt?me.toLowerCase():me};return N.replace(x,function(St,re){return re||function(Zt){switch(Zt){case"YY":return String(F.$y).slice(-2);case"YYYY":return L.s(F.$y,4,"0");case"M":return nt+1;case"MM":return L.s(nt+1,2,"0");case"MMM":return $t(A.monthsShort,nt,st,3);case"MMMM":return $t(st,nt);case"D":return F.$D;case"DD":return L.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return $t(A.weekdaysMin,F.$W,pt,2);case"ddd":return $t(A.weekdaysShort,F.$W,pt,3);case"dddd":return pt[F.$W];case"H":return String(Z);case"HH":return L.s(Z,2,"0");case"h":return Re(1);case"hh":return Re(2);case"a":return ee(Z,at,!0);case"A":return ee(Z,at,!1);case"m":return String(at);case"mm":return L.s(at,2,"0");case"s":return String(F.$s);case"ss":return L.s(F.$s,2,"0");case"SSS":return L.s(F.$ms,3,"0");case"Z":return q}return null}(St)||q.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(T,F,A){var N,q=this,Z=L.p(F),at=$(T),nt=(at.utcOffset()-this.utcOffset())*i,pt=this-at,st=function(){return L.m(q,at)};switch(Z){case d:N=st()/12;break;case u:N=st();break;case f:N=st()/3;break;case h:N=(pt-nt)/6048e5;break;case l:N=(pt-nt)/864e5;break;case c:N=pt/n;break;case s:N=pt/i;break;case o:N=pt/r;break;default:N=pt}return A?N:L.a(N)},E.daysInMonth=function(){return this.endOf(u).$D},E.$locale=function(){return B[this.$L]},E.locale=function(T,F){if(!T)return this.$L;var A=this.clone(),N=R(T,F,!0);return N&&(A.$L=N),A},E.clone=function(){return L.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},M}(),P=z.prototype;return $.prototype=P,[["$ms",a],["$s",o],["$m",s],["$H",c],["$W",l],["$M",u],["$y",d],["$D",g]].forEach(function(M){P[M[1]]=function(E){return this.$g(E,M[0],M[1])}}),$.extend=function(M,E){return M.$i||(M(E,z,$),M.$i=!0),$},$.locale=R,$.isDayjs=D,$.unix=function(M){return $(1e3*M)},$.en=B[v],$.Ls=B,$.p={},$})}(Xi)),Xi.exports}var Ig=Rg();const Pg=Ag(Ig),Zi={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return Zi.hue2rgb(a,n,e+1/3)*255;case"g":return Zi.hue2rgb(a,n,e)*255;case"b":return Zi.hue2rgb(a,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),a=Math.min(e,t,r),o=(n+a)/2;if(i==="l")return o*100;if(n===a)return 0;const s=n-a,c=o>.5?s/(2-n-a):s/(n+a);if(i==="s")return c*100;switch(n){case e:return((t-r)/s+(t<r?6:0))*60;case t:return((r-e)/s+2)*60;case r:return((e-t)/s+4)*60;default:return-1}}},Ng={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},zg={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},rt={channel:Zi,lang:Ng,unit:zg},Ie={};for(let e=0;e<=255;e++)Ie[e]=rt.unit.dec2hex(e);const Mt={ALL:0,RGB:1,HSL:2};class Wg{constructor(){this.type=Mt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Mt.ALL}is(t){return this.type===t}}class qg{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Wg}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Mt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=rt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=rt.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=rt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=rt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=rt.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=rt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Mt.HSL)&&r!==void 0?r:(this._ensureHSL(),rt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Mt.HSL)&&r!==void 0?r:(this._ensureHSL(),rt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Mt.HSL)&&r!==void 0?r:(this._ensureHSL(),rt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Mt.RGB)&&r!==void 0?r:(this._ensureRGB(),rt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Mt.RGB)&&r!==void 0?r:(this._ensureRGB(),rt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Mt.RGB)&&r!==void 0?r:(this._ensureRGB(),rt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Mt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Mt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Mt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Mt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Mt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Mt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const qn=new qg({r:0,g:0,b:0,a:0},"transparent"),wr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(wr.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,a=n%4===0,o=n>4,s=o?1:17,c=o?8:4,l=a?0:-1,h=o?255:15;return qn.set({r:(i>>c*(l+3)&h)*s,g:(i>>c*(l+2)&h)*s,b:(i>>c*(l+1)&h)*s,a:a?(i&h)*s/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${Ie[Math.round(t)]}${Ie[Math.round(r)]}${Ie[Math.round(i)]}${Ie[Math.round(n*255)]}`:`#${Ie[Math.round(t)]}${Ie[Math.round(r)]}${Ie[Math.round(i)]}`}},Ze={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Ze.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return rt.channel.clamp.h(parseFloat(r)*.9);case"rad":return rt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return rt.channel.clamp.h(parseFloat(r)*360)}}return rt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Ze.re);if(!r)return;const[,i,n,a,o,s]=r;return qn.set({h:Ze._hue2deg(i),s:rt.channel.clamp.s(parseFloat(n)),l:rt.channel.clamp.l(parseFloat(a)),a:o?rt.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${rt.lang.round(t)}, ${rt.lang.round(r)}%, ${rt.lang.round(i)}%, ${n})`:`hsl(${rt.lang.round(t)}, ${rt.lang.round(r)}%, ${rt.lang.round(i)}%)`}},ci={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=ci.colors[e];if(t)return wr.parse(t)},stringify:e=>{const t=wr.stringify(e);for(const r in ci.colors)if(ci.colors[r]===t)return r}},ri={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(ri.re);if(!r)return;const[,i,n,a,o,s,c,l,h]=r;return qn.set({r:rt.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:rt.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:rt.channel.clamp.b(c?parseFloat(s)*2.55:parseFloat(s)),a:l?rt.channel.clamp.a(h?parseFloat(l)/100:parseFloat(l)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${rt.lang.round(t)}, ${rt.lang.round(r)}, ${rt.lang.round(i)}, ${rt.lang.round(n)})`:`rgb(${rt.lang.round(t)}, ${rt.lang.round(r)}, ${rt.lang.round(i)})`}},fe={format:{keyword:ci,hex:wr,rgb:ri,rgba:ri,hsl:Ze,hsla:Ze},parse:e=>{if(typeof e!="string")return e;const t=wr.parse(e)||ri.parse(e)||Ze.parse(e)||ci.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Mt.HSL)||e.data.r===void 0?Ze.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?ri.stringify(e):wr.stringify(e)},Bc=(e,t)=>{const r=fe.parse(e);for(const i in t)r[i]=rt.channel.clamp[i](t[i]);return fe.stringify(r)},hi=(e,t,r=0,i=1)=>{if(typeof e!="number")return Bc(e,{a:t});const n=qn.set({r:rt.channel.clamp.r(e),g:rt.channel.clamp.g(t),b:rt.channel.clamp.b(r),a:rt.channel.clamp.a(i)});return fe.stringify(n)},Hg=e=>{const{r:t,g:r,b:i}=fe.parse(e),n=.2126*rt.channel.toLinear(t)+.7152*rt.channel.toLinear(r)+.0722*rt.channel.toLinear(i);return rt.lang.round(n)},jg=e=>Hg(e)>=.5,vi=e=>!jg(e),Lc=(e,t,r)=>{const i=fe.parse(e),n=i[t],a=rt.channel.clamp[t](n+r);return n!==a&&(i[t]=a),fe.stringify(i)},H=(e,t)=>Lc(e,"l",t),J=(e,t)=>Lc(e,"l",-t),_=(e,t)=>{const r=fe.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return Bc(e,i)},Yg=(e,t,r=50)=>{const{r:i,g:n,b:a,a:o}=fe.parse(e),{r:s,g:c,b:l,a:h}=fe.parse(t),u=r/100,f=u*2-1,d=o-h,m=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,y=1-m,x=i*m+s*y,b=n*m+c*y,C=a*m+l*y,k=o*u+h*(1-u);return hi(x,b,C,k)},W=(e,t=100)=>{const r=fe.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Yg(r,e,t)};/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:Ac,setPrototypeOf:tl,isFrozen:Ug,getPrototypeOf:Gg,getOwnPropertyDescriptor:Vg}=Object;let{freeze:zt,seal:Jt,create:Ec}=Object,{apply:za,construct:Wa}=typeof Reflect<"u"&&Reflect;zt||(zt=function(t){return t});Jt||(Jt=function(t){return t});za||(za=function(t,r,i){return t.apply(r,i)});Wa||(Wa=function(t,r){return new t(...r)});const Ni=Wt(Array.prototype.forEach),Xg=Wt(Array.prototype.lastIndexOf),el=Wt(Array.prototype.pop),Hr=Wt(Array.prototype.push),Zg=Wt(Array.prototype.splice),Ki=Wt(String.prototype.toLowerCase),_a=Wt(String.prototype.toString),rl=Wt(String.prototype.match),jr=Wt(String.prototype.replace),Kg=Wt(String.prototype.indexOf),Qg=Wt(String.prototype.trim),ie=Wt(Object.prototype.hasOwnProperty),Dt=Wt(RegExp.prototype.test),Yr=Jg(TypeError);function Wt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return za(e,t,i)}}function Jg(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Wa(e,r)}}function ot(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ki;tl&&tl(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const a=r(n);a!==n&&(Ug(t)||(t[i]=a),n=a)}e[n]=!0}return e}function tm(e){for(let t=0;t<e.length;t++)ie(e,t)||(e[t]=null);return e}function ke(e){const t=Ec(null);for(const[r,i]of Ac(e))ie(e,r)&&(Array.isArray(i)?t[r]=tm(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=ke(i):t[r]=i);return t}function Ur(e,t){for(;e!==null;){const i=Vg(e,t);if(i){if(i.get)return Wt(i.get);if(typeof i.value=="function")return Wt(i.value)}e=Gg(e)}function r(){return null}return r}const il=zt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ka=zt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),va=zt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),em=zt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Sa=zt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),rm=zt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),nl=zt(["#text"]),al=zt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ta=zt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),sl=zt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),zi=zt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),im=Jt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),nm=Jt(/<%[\w\W]*|[\w\W]*%>/gm),am=Jt(/\$\{[\w\W]*/gm),sm=Jt(/^data-[\-\w.\u00B7-\uFFFF]+$/),om=Jt(/^aria-[\-\w]+$/),Mc=Jt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),lm=Jt(/^(?:\w+script|data):/i),cm=Jt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Fc=Jt(/^html$/i),hm=Jt(/^[a-z][.\w]*(-[.\w]+)+$/i);var ol=Object.freeze({__proto__:null,ARIA_ATTR:om,ATTR_WHITESPACE:cm,CUSTOM_ELEMENT:hm,DATA_ATTR:sm,DOCTYPE_NAME:Fc,ERB_EXPR:nm,IS_ALLOWED_URI:Mc,IS_SCRIPT_OR_DATA:lm,MUSTACHE_EXPR:im,TMPLIT_EXPR:am});const Gr={element:1,text:3,progressingInstruction:7,comment:8,document:9},um=function(){return typeof window>"u"?null:window},fm=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},ll=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Oc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:um();const t=Q=>Oc(Q);if(t.version="3.2.6",t.removed=[],!e||!e.document||e.document.nodeType!==Gr.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,n=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:d}=e,g=c.prototype,m=Ur(g,"cloneNode"),y=Ur(g,"remove"),x=Ur(g,"nextSibling"),b=Ur(g,"childNodes"),C=Ur(g,"parentNode");if(typeof o=="function"){const Q=r.createElement("template");Q.content&&Q.content.ownerDocument&&(r=Q.content.ownerDocument)}let k,v="";const{implementation:B,createNodeIterator:S,createDocumentFragment:D,getElementsByTagName:R}=r,{importNode:$}=i;let L=ll();t.isSupported=typeof Ac=="function"&&typeof C=="function"&&B&&B.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:z,ERB_EXPR:P,TMPLIT_EXPR:M,DATA_ATTR:E,ARIA_ATTR:T,IS_SCRIPT_OR_DATA:F,ATTR_WHITESPACE:A,CUSTOM_ELEMENT:N}=ol;let{IS_ALLOWED_URI:q}=ol,Z=null;const at=ot({},[...il,...ka,...va,...Sa,...nl]);let nt=null;const pt=ot({},[...al,...Ta,...sl,...zi]);let st=Object.seal(Ec(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}})),Gt=null,$t=null,Re=!0,ee=!0,St=!1,re=!0,Zt=!1,me=!0,Ye=!1,da=!1,pa=!1,ur=!1,Oi=!1,$i=!1,Fo=!0,Oo=!1;const wg="user-content-";let ga=!0,zr=!1,fr={},dr=null;const $o=ot({},["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 Do=null;const Ro=ot({},["audio","video","img","source","image","track"]);let ma=null;const Io=ot({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Di="http://www.w3.org/1998/Math/MathML",Ri="http://www.w3.org/2000/svg",ye="http://www.w3.org/1999/xhtml";let pr=ye,ya=!1,xa=null;const _g=ot({},[Di,Ri,ye],_a);let Ii=ot({},["mi","mo","mn","ms","mtext"]),Pi=ot({},["annotation-xml"]);const kg=ot({},["title","style","font","a","script"]);let Wr=null;const vg=["application/xhtml+xml","text/html"],Sg="text/html";let vt=null,gr=null;const Tg=r.createElement("form"),Po=function(w){return w instanceof RegExp||w instanceof Function},ba=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(gr&&gr===w)){if((!w||typeof w!="object")&&(w={}),w=ke(w),Wr=vg.indexOf(w.PARSER_MEDIA_TYPE)===-1?Sg:w.PARSER_MEDIA_TYPE,vt=Wr==="application/xhtml+xml"?_a:Ki,Z=ie(w,"ALLOWED_TAGS")?ot({},w.ALLOWED_TAGS,vt):at,nt=ie(w,"ALLOWED_ATTR")?ot({},w.ALLOWED_ATTR,vt):pt,xa=ie(w,"ALLOWED_NAMESPACES")?ot({},w.ALLOWED_NAMESPACES,_a):_g,ma=ie(w,"ADD_URI_SAFE_ATTR")?ot(ke(Io),w.ADD_URI_SAFE_ATTR,vt):Io,Do=ie(w,"ADD_DATA_URI_TAGS")?ot(ke(Ro),w.ADD_DATA_URI_TAGS,vt):Ro,dr=ie(w,"FORBID_CONTENTS")?ot({},w.FORBID_CONTENTS,vt):$o,Gt=ie(w,"FORBID_TAGS")?ot({},w.FORBID_TAGS,vt):ke({}),$t=ie(w,"FORBID_ATTR")?ot({},w.FORBID_ATTR,vt):ke({}),fr=ie(w,"USE_PROFILES")?w.USE_PROFILES:!1,Re=w.ALLOW_ARIA_ATTR!==!1,ee=w.ALLOW_DATA_ATTR!==!1,St=w.ALLOW_UNKNOWN_PROTOCOLS||!1,re=w.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Zt=w.SAFE_FOR_TEMPLATES||!1,me=w.SAFE_FOR_XML!==!1,Ye=w.WHOLE_DOCUMENT||!1,ur=w.RETURN_DOM||!1,Oi=w.RETURN_DOM_FRAGMENT||!1,$i=w.RETURN_TRUSTED_TYPE||!1,pa=w.FORCE_BODY||!1,Fo=w.SANITIZE_DOM!==!1,Oo=w.SANITIZE_NAMED_PROPS||!1,ga=w.KEEP_CONTENT!==!1,zr=w.IN_PLACE||!1,q=w.ALLOWED_URI_REGEXP||Mc,pr=w.NAMESPACE||ye,Ii=w.MATHML_TEXT_INTEGRATION_POINTS||Ii,Pi=w.HTML_INTEGRATION_POINTS||Pi,st=w.CUSTOM_ELEMENT_HANDLING||{},w.CUSTOM_ELEMENT_HANDLING&&Po(w.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(st.tagNameCheck=w.CUSTOM_ELEMENT_HANDLING.tagNameCheck),w.CUSTOM_ELEMENT_HANDLING&&Po(w.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(st.attributeNameCheck=w.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),w.CUSTOM_ELEMENT_HANDLING&&typeof w.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(st.allowCustomizedBuiltInElements=w.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Zt&&(ee=!1),Oi&&(ur=!0),fr&&(Z=ot({},nl),nt=[],fr.html===!0&&(ot(Z,il),ot(nt,al)),fr.svg===!0&&(ot(Z,ka),ot(nt,Ta),ot(nt,zi)),fr.svgFilters===!0&&(ot(Z,va),ot(nt,Ta),ot(nt,zi)),fr.mathMl===!0&&(ot(Z,Sa),ot(nt,sl),ot(nt,zi))),w.ADD_TAGS&&(Z===at&&(Z=ke(Z)),ot(Z,w.ADD_TAGS,vt)),w.ADD_ATTR&&(nt===pt&&(nt=ke(nt)),ot(nt,w.ADD_ATTR,vt)),w.ADD_URI_SAFE_ATTR&&ot(ma,w.ADD_URI_SAFE_ATTR,vt),w.FORBID_CONTENTS&&(dr===$o&&(dr=ke(dr)),ot(dr,w.FORBID_CONTENTS,vt)),ga&&(Z["#text"]=!0),Ye&&ot(Z,["html","head","body"]),Z.table&&(ot(Z,["tbody"]),delete Gt.tbody),w.TRUSTED_TYPES_POLICY){if(typeof w.TRUSTED_TYPES_POLICY.createHTML!="function")throw Yr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof w.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Yr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=w.TRUSTED_TYPES_POLICY,v=k.createHTML("")}else k===void 0&&(k=fm(d,n)),k!==null&&typeof v=="string"&&(v=k.createHTML(""));zt&&zt(w),gr=w}},No=ot({},[...ka,...va,...em]),zo=ot({},[...Sa,...rm]),Bg=function(w){let I=C(w);(!I||!I.tagName)&&(I={namespaceURI:pr,tagName:"template"});const U=Ki(w.tagName),mt=Ki(I.tagName);return xa[w.namespaceURI]?w.namespaceURI===Ri?I.namespaceURI===ye?U==="svg":I.namespaceURI===Di?U==="svg"&&(mt==="annotation-xml"||Ii[mt]):!!No[U]:w.namespaceURI===Di?I.namespaceURI===ye?U==="math":I.namespaceURI===Ri?U==="math"&&Pi[mt]:!!zo[U]:w.namespaceURI===ye?I.namespaceURI===Ri&&!Pi[mt]||I.namespaceURI===Di&&!Ii[mt]?!1:!zo[U]&&(kg[U]||!No[U]):!!(Wr==="application/xhtml+xml"&&xa[w.namespaceURI]):!1},oe=function(w){Hr(t.removed,{element:w});try{C(w).removeChild(w)}catch{y(w)}},mr=function(w,I){try{Hr(t.removed,{attribute:I.getAttributeNode(w),from:I})}catch{Hr(t.removed,{attribute:null,from:I})}if(I.removeAttribute(w),w==="is")if(ur||Oi)try{oe(I)}catch{}else try{I.setAttribute(w,"")}catch{}},Wo=function(w){let I=null,U=null;if(pa)w="<remove></remove>"+w;else{const Ct=rl(w,/^[\r\n\t ]+/);U=Ct&&Ct[0]}Wr==="application/xhtml+xml"&&pr===ye&&(w='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+w+"</body></html>");const mt=k?k.createHTML(w):w;if(pr===ye)try{I=new f().parseFromString(mt,Wr)}catch{}if(!I||!I.documentElement){I=B.createDocument(pr,"template",null);try{I.documentElement.innerHTML=ya?v:mt}catch{}}const At=I.body||I.documentElement;return w&&U&&At.insertBefore(r.createTextNode(U),At.childNodes[0]||null),pr===ye?R.call(I,Ye?"html":"body")[0]:Ye?I.documentElement:At},qo=function(w){return S.call(w.ownerDocument||w,w,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Ca=function(w){return w instanceof u&&(typeof w.nodeName!="string"||typeof w.textContent!="string"||typeof w.removeChild!="function"||!(w.attributes instanceof h)||typeof w.removeAttribute!="function"||typeof w.setAttribute!="function"||typeof w.namespaceURI!="string"||typeof w.insertBefore!="function"||typeof w.hasChildNodes!="function")},Ho=function(w){return typeof s=="function"&&w instanceof s};function xe(Q,w,I){Ni(Q,U=>{U.call(t,w,I,gr)})}const jo=function(w){let I=null;if(xe(L.beforeSanitizeElements,w,null),Ca(w))return oe(w),!0;const U=vt(w.nodeName);if(xe(L.uponSanitizeElement,w,{tagName:U,allowedTags:Z}),me&&w.hasChildNodes()&&!Ho(w.firstElementChild)&&Dt(/<[/\w!]/g,w.innerHTML)&&Dt(/<[/\w!]/g,w.textContent)||w.nodeType===Gr.progressingInstruction||me&&w.nodeType===Gr.comment&&Dt(/<[/\w]/g,w.data))return oe(w),!0;if(!Z[U]||Gt[U]){if(!Gt[U]&&Uo(U)&&(st.tagNameCheck instanceof RegExp&&Dt(st.tagNameCheck,U)||st.tagNameCheck instanceof Function&&st.tagNameCheck(U)))return!1;if(ga&&!dr[U]){const mt=C(w)||w.parentNode,At=b(w)||w.childNodes;if(At&&mt){const Ct=At.length;for(let qt=Ct-1;qt>=0;--qt){const be=m(At[qt],!0);be.__removalCount=(w.__removalCount||0)+1,mt.insertBefore(be,x(w))}}}return oe(w),!0}return w instanceof c&&!Bg(w)||(U==="noscript"||U==="noembed"||U==="noframes")&&Dt(/<\/no(script|embed|frames)/i,w.innerHTML)?(oe(w),!0):(Zt&&w.nodeType===Gr.text&&(I=w.textContent,Ni([z,P,M],mt=>{I=jr(I,mt," ")}),w.textContent!==I&&(Hr(t.removed,{element:w.cloneNode()}),w.textContent=I)),xe(L.afterSanitizeElements,w,null),!1)},Yo=function(w,I,U){if(Fo&&(I==="id"||I==="name")&&(U in r||U in Tg))return!1;if(!(ee&&!$t[I]&&Dt(E,I))){if(!(Re&&Dt(T,I))){if(!nt[I]||$t[I]){if(!(Uo(w)&&(st.tagNameCheck instanceof RegExp&&Dt(st.tagNameCheck,w)||st.tagNameCheck instanceof Function&&st.tagNameCheck(w))&&(st.attributeNameCheck instanceof RegExp&&Dt(st.attributeNameCheck,I)||st.attributeNameCheck instanceof Function&&st.attributeNameCheck(I))||I==="is"&&st.allowCustomizedBuiltInElements&&(st.tagNameCheck instanceof RegExp&&Dt(st.tagNameCheck,U)||st.tagNameCheck instanceof Function&&st.tagNameCheck(U))))return!1}else if(!ma[I]){if(!Dt(q,jr(U,A,""))){if(!((I==="src"||I==="xlink:href"||I==="href")&&w!=="script"&&Kg(U,"data:")===0&&Do[w])){if(!(St&&!Dt(F,jr(U,A,"")))){if(U)return!1}}}}}}return!0},Uo=function(w){return w!=="annotation-xml"&&rl(w,N)},Go=function(w){xe(L.beforeSanitizeAttributes,w,null);const{attributes:I}=w;if(!I||Ca(w))return;const U={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:nt,forceKeepAttr:void 0};let mt=I.length;for(;mt--;){const At=I[mt],{name:Ct,namespaceURI:qt,value:be}=At,qr=vt(Ct),wa=be;let Et=Ct==="value"?wa:Qg(wa);if(U.attrName=qr,U.attrValue=Et,U.keepAttr=!0,U.forceKeepAttr=void 0,xe(L.uponSanitizeAttribute,w,U),Et=U.attrValue,Oo&&(qr==="id"||qr==="name")&&(mr(Ct,w),Et=wg+Et),me&&Dt(/((--!?|])>)|<\/(style|title)/i,Et)){mr(Ct,w);continue}if(U.forceKeepAttr)continue;if(!U.keepAttr){mr(Ct,w);continue}if(!re&&Dt(/\/>/i,Et)){mr(Ct,w);continue}Zt&&Ni([z,P,M],Xo=>{Et=jr(Et,Xo," ")});const Vo=vt(w.nodeName);if(!Yo(Vo,qr,Et)){mr(Ct,w);continue}if(k&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!qt)switch(d.getAttributeType(Vo,qr)){case"TrustedHTML":{Et=k.createHTML(Et);break}case"TrustedScriptURL":{Et=k.createScriptURL(Et);break}}if(Et!==wa)try{qt?w.setAttributeNS(qt,Ct,Et):w.setAttribute(Ct,Et),Ca(w)?oe(w):el(t.removed)}catch{mr(Ct,w)}}xe(L.afterSanitizeAttributes,w,null)},Lg=function Q(w){let I=null;const U=qo(w);for(xe(L.beforeSanitizeShadowDOM,w,null);I=U.nextNode();)xe(L.uponSanitizeShadowNode,I,null),jo(I),Go(I),I.content instanceof a&&Q(I.content);xe(L.afterSanitizeShadowDOM,w,null)};return t.sanitize=function(Q){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=null,U=null,mt=null,At=null;if(ya=!Q,ya&&(Q="<!-->"),typeof Q!="string"&&!Ho(Q))if(typeof Q.toString=="function"){if(Q=Q.toString(),typeof Q!="string")throw Yr("dirty is not a string, aborting")}else throw Yr("toString is not a function");if(!t.isSupported)return Q;if(da||ba(w),t.removed=[],typeof Q=="string"&&(zr=!1),zr){if(Q.nodeName){const be=vt(Q.nodeName);if(!Z[be]||Gt[be])throw Yr("root node is forbidden and cannot be sanitized in-place")}}else if(Q instanceof s)I=Wo("<!---->"),U=I.ownerDocument.importNode(Q,!0),U.nodeType===Gr.element&&U.nodeName==="BODY"||U.nodeName==="HTML"?I=U:I.appendChild(U);else{if(!ur&&!Zt&&!Ye&&Q.indexOf("<")===-1)return k&&$i?k.createHTML(Q):Q;if(I=Wo(Q),!I)return ur?null:$i?v:""}I&&pa&&oe(I.firstChild);const Ct=qo(zr?Q:I);for(;mt=Ct.nextNode();)jo(mt),Go(mt),mt.content instanceof a&&Lg(mt.content);if(zr)return Q;if(ur){if(Oi)for(At=D.call(I.ownerDocument);I.firstChild;)At.appendChild(I.firstChild);else At=I;return(nt.shadowroot||nt.shadowrootmode)&&(At=$.call(i,At,!0)),At}let qt=Ye?I.outerHTML:I.innerHTML;return Ye&&Z["!doctype"]&&I.ownerDocument&&I.ownerDocument.doctype&&I.ownerDocument.doctype.name&&Dt(Fc,I.ownerDocument.doctype.name)&&(qt="<!DOCTYPE "+I.ownerDocument.doctype.name+`>
3
+ `+qt),Zt&&Ni([z,P,M],be=>{qt=jr(qt,be," ")}),k&&$i?k.createHTML(qt):qt},t.setConfig=function(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ba(Q),da=!0},t.clearConfig=function(){gr=null,da=!1},t.isValidAttribute=function(Q,w,I){gr||ba({});const U=vt(Q),mt=vt(w);return Yo(U,mt,I)},t.addHook=function(Q,w){typeof w=="function"&&Hr(L[Q],w)},t.removeHook=function(Q,w){if(w!==void 0){const I=Xg(L[Q],w);return I===-1?void 0:Zg(L[Q],I,1)[0]}return el(L[Q])},t.removeHooks=function(Q){L[Q]=[]},t.removeAllHooks=function(){L=ll()},t}var kr=Oc(),$c=Object.defineProperty,p=(e,t)=>$c(e,"name",{value:t,configurable:!0}),dm=(e,t)=>{for(var r in t)$c(e,r,{get:t[r],enumerable:!0})},Ce={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},O={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Fs=p(function(e="fatal"){let t=Ce.fatal;typeof e=="string"?e.toLowerCase()in Ce&&(t=Ce[e]):typeof e=="number"&&(t=e),O.trace=()=>{},O.debug=()=>{},O.info=()=>{},O.warn=()=>{},O.error=()=>{},O.fatal=()=>{},t<=Ce.fatal&&(O.fatal=console.error?console.error.bind(console,Kt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Kt("FATAL"))),t<=Ce.error&&(O.error=console.error?console.error.bind(console,Kt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Kt("ERROR"))),t<=Ce.warn&&(O.warn=console.warn?console.warn.bind(console,Kt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Kt("WARN"))),t<=Ce.info&&(O.info=console.info?console.info.bind(console,Kt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Kt("INFO"))),t<=Ce.debug&&(O.debug=console.debug?console.debug.bind(console,Kt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Kt("DEBUG"))),t<=Ce.trace&&(O.trace=console.debug?console.debug.bind(console,Kt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Kt("TRACE")))},"setLogLevel"),Kt=p(e=>`%c${Pg().format("ss.SSS")} : ${e} : `,"format"),Dc=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,ui=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,pm=/\s*%%.*\n/gm,Rc=class extends Error{static{p(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}},vr={},Os=p(function(e,t){e=e.replace(Dc,"").replace(ui,"").replace(pm,`
4
+ `);for(const[r,{detector:i}]of Object.entries(vr))if(i(e,t))return r;throw new Rc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ic=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Pc(t,r,i)},"registerLazyLoadedDiagrams"),Pc=p((e,t,r)=>{vr[e]&&O.warn(`Detector with key ${e} already exists. Overwriting.`),vr[e]={detector:t,loader:r},O.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),gm=p(e=>vr[e].loader,"getDiagramLoader"),qa=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>qa(e,a,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=qa(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Lt=qa,Hn="#ffffff",jn="#f2f2f2",Rt=p((e,t)=>t?_(e,{s:-40,l:10}):_(e,{s:-40,l:-10}),"mkBorder"),mm=class{static{p(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||_(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||_(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||W(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||W(this.tertiaryColor),this.lineColor=this.lineColor||W(this.background),this.arrowheadColor=this.arrowheadColor||W(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?J(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||J(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||W(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||H(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||J(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||J(this.mainBkg,10)):(this.rowOdd=this.rowOdd||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||H(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||_(this.primaryColor,{h:30}),this.cScale4=this.cScale4||_(this.primaryColor,{h:60}),this.cScale5=this.cScale5||_(this.primaryColor,{h:90}),this.cScale6=this.cScale6||_(this.primaryColor,{h:120}),this.cScale7=this.cScale7||_(this.primaryColor,{h:150}),this.cScale8=this.cScale8||_(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||_(this.primaryColor,{h:270}),this.cScale10=this.cScale10||_(this.primaryColor,{h:300}),this.cScale11=this.cScale11||_(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=J(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=J(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||W(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||H(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||J(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||_(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||_(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||_(this.primaryColor,{h:64}),this.fillType3=this.fillType3||_(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||_(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||_(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||_(this.primaryColor,{h:128}),this.fillType7=this.fillType7||_(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||_(this.primaryColor,{l:-10}),this.pie5=this.pie5||_(this.secondaryColor,{l:-10}),this.pie6=this.pie6||_(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||_(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||_(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||_(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||_(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||_(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||_(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||_(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||_(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||_(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||_(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||_(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||_(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||vi(this.quadrant1Fill)?H(this.quadrant1Fill):J(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?J(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||_(this.primaryColor,{h:-30}),this.git4=this.git4||_(this.primaryColor,{h:-60}),this.git5=this.git5||_(this.primaryColor,{h:-90}),this.git6=this.git6||_(this.primaryColor,{h:60}),this.git7=this.git7||_(this.primaryColor,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=J(this.git0,25),this.git1=J(this.git1,25),this.git2=J(this.git2,25),this.git3=J(this.git3,25),this.git4=J(this.git4,25),this.git5=J(this.git5,25),this.git6=J(this.git6,25),this.git7=J(this.git7,25)),this.gitInv0=this.gitInv0||W(this.git0),this.gitInv1=this.gitInv1||W(this.git1),this.gitInv2=this.gitInv2||W(this.git2),this.gitInv3=this.gitInv3||W(this.git3),this.gitInv4=this.gitInv4||W(this.git4),this.gitInv5=this.gitInv5||W(this.git5),this.gitInv6=this.gitInv6||W(this.git6),this.gitInv7=this.gitInv7||W(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Hn,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||jn}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},ym=p(e=>{const t=new mm;return t.calculate(e),t},"getThemeVariables"),xm=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=H(this.primaryColor,16),this.tertiaryColor=_(this.primaryColor,{h:-160}),this.primaryBorderColor=W(this.background),this.secondaryBorderColor=Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rt(this.tertiaryColor,this.darkMode),this.primaryTextColor=W(this.primaryColor),this.secondaryTextColor=W(this.secondaryColor),this.tertiaryTextColor=W(this.tertiaryColor),this.lineColor=W(this.background),this.textColor=W(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=H(W("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=hi(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=J("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=J(this.sectionBkgColor,10),this.taskBorderColor=hi(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=hi(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||H(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||J(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=H(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=H(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=H(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=_(this.primaryColor,{h:64}),this.fillType3=_(this.secondaryColor,{h:64}),this.fillType4=_(this.primaryColor,{h:-64}),this.fillType5=_(this.secondaryColor,{h:-64}),this.fillType6=_(this.primaryColor,{h:128}),this.fillType7=_(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||_(this.primaryColor,{h:30}),this.cScale4=this.cScale4||_(this.primaryColor,{h:60}),this.cScale5=this.cScale5||_(this.primaryColor,{h:90}),this.cScale6=this.cScale6||_(this.primaryColor,{h:120}),this.cScale7=this.cScale7||_(this.primaryColor,{h:150}),this.cScale8=this.cScale8||_(this.primaryColor,{h:210}),this.cScale9=this.cScale9||_(this.primaryColor,{h:270}),this.cScale10=this.cScale10||_(this.primaryColor,{h:300}),this.cScale11=this.cScale11||_(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||W(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||H(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||_(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||_(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||_(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||_(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||_(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||_(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||_(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||_(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||vi(this.quadrant1Fill)?H(this.quadrant1Fill):J(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?J(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=H(this.secondaryColor,20),this.git1=H(this.pie2||this.secondaryColor,20),this.git2=H(this.pie3||this.tertiaryColor,20),this.git3=H(this.pie4||_(this.primaryColor,{h:-30}),20),this.git4=H(this.pie5||_(this.primaryColor,{h:-60}),20),this.git5=H(this.pie6||_(this.primaryColor,{h:-90}),10),this.git6=H(this.pie7||_(this.primaryColor,{h:60}),10),this.git7=H(this.pie8||_(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||W(this.git0),this.gitInv1=this.gitInv1||W(this.git1),this.gitInv2=this.gitInv2||W(this.git2),this.gitInv3=this.gitInv3||W(this.git3),this.gitInv4=this.gitInv4||W(this.git4),this.gitInv5=this.gitInv5||W(this.git5),this.gitInv6=this.gitInv6||W(this.git6),this.gitInv7=this.gitInv7||W(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||W(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||W(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||H(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||H(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},bm=p(e=>{const t=new xm;return t.calculate(e),t},"getThemeVariables"),Cm=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=_(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=_(this.primaryColor,{h:-160}),this.primaryBorderColor=Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rt(this.tertiaryColor,this.darkMode),this.primaryTextColor=W(this.primaryColor),this.secondaryTextColor=W(this.secondaryColor),this.tertiaryTextColor=W(this.tertiaryColor),this.lineColor=W(this.background),this.textColor=W(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=hi(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||_(this.primaryColor,{h:30}),this.cScale4=this.cScale4||_(this.primaryColor,{h:60}),this.cScale5=this.cScale5||_(this.primaryColor,{h:90}),this.cScale6=this.cScale6||_(this.primaryColor,{h:120}),this.cScale7=this.cScale7||_(this.primaryColor,{h:150}),this.cScale8=this.cScale8||_(this.primaryColor,{h:210}),this.cScale9=this.cScale9||_(this.primaryColor,{h:270}),this.cScale10=this.cScale10||_(this.primaryColor,{h:300}),this.cScale11=this.cScale11||_(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||J(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||J(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=J(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||J(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||_(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||_(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||_(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||W(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||W(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=H(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||H(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||H(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=_(this.primaryColor,{h:64}),this.fillType3=_(this.secondaryColor,{h:64}),this.fillType4=_(this.primaryColor,{h:-64}),this.fillType5=_(this.secondaryColor,{h:-64}),this.fillType6=_(this.primaryColor,{h:128}),this.fillType7=_(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||_(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||_(this.primaryColor,{l:-10}),this.pie5=this.pie5||_(this.secondaryColor,{l:-30}),this.pie6=this.pie6||_(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||_(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||_(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||_(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||_(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||_(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||_(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||_(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||_(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||_(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||_(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||_(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||_(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||vi(this.quadrant1Fill)?H(this.quadrant1Fill):J(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||_(this.primaryColor,{h:-30}),this.git4=this.git4||_(this.primaryColor,{h:-60}),this.git5=this.git5||_(this.primaryColor,{h:-90}),this.git6=this.git6||_(this.primaryColor,{h:60}),this.git7=this.git7||_(this.primaryColor,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=J(this.git0,25),this.git1=J(this.git1,25),this.git2=J(this.git2,25),this.git3=J(this.git3,25),this.git4=J(this.git4,25),this.git5=J(this.git5,25),this.git6=J(this.git6,25),this.git7=J(this.git7,25)),this.gitInv0=this.gitInv0||J(W(this.git0),25),this.gitInv1=this.gitInv1||W(this.git1),this.gitInv2=this.gitInv2||W(this.git2),this.gitInv3=this.gitInv3||W(this.git3),this.gitInv4=this.gitInv4||W(this.git4),this.gitInv5=this.gitInv5||W(this.git5),this.gitInv6=this.gitInv6||W(this.git6),this.gitInv7=this.gitInv7||W(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||W(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||W(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Hn,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||jn}calculate(e){if(Object.keys(this).forEach(r=>{this[r]==="calculated"&&(this[r]=void 0)}),typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},wm=p(e=>{const t=new Cm;return t.calculate(e),t},"getThemeVariables"),_m=class{static{p(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=H("#cde498",10),this.primaryBorderColor=Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rt(this.tertiaryColor,this.darkMode),this.primaryTextColor=W(this.primaryColor),this.secondaryTextColor=W(this.secondaryColor),this.tertiaryTextColor=W(this.primaryColor),this.lineColor=W(this.background),this.textColor=W(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=J(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||_(this.primaryColor,{h:30}),this.cScale4=this.cScale4||_(this.primaryColor,{h:60}),this.cScale5=this.cScale5||_(this.primaryColor,{h:90}),this.cScale6=this.cScale6||_(this.primaryColor,{h:120}),this.cScale7=this.cScale7||_(this.primaryColor,{h:150}),this.cScale8=this.cScale8||_(this.primaryColor,{h:210}),this.cScale9=this.cScale9||_(this.primaryColor,{h:270}),this.cScale10=this.cScale10||_(this.primaryColor,{h:300}),this.cScale11=this.cScale11||_(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||J(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||J(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=J(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||J(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||_(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||_(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||_(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||H(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=_(this.primaryColor,{h:64}),this.fillType3=_(this.secondaryColor,{h:64}),this.fillType4=_(this.primaryColor,{h:-64}),this.fillType5=_(this.secondaryColor,{h:-64}),this.fillType6=_(this.primaryColor,{h:128}),this.fillType7=_(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||_(this.primaryColor,{l:-30}),this.pie5=this.pie5||_(this.secondaryColor,{l:-30}),this.pie6=this.pie6||_(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||_(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||_(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||_(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||_(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||_(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||_(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||_(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||_(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||_(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||_(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||_(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||_(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||vi(this.quadrant1Fill)?H(this.quadrant1Fill):J(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||_(this.primaryColor,{h:-30}),this.git4=this.git4||_(this.primaryColor,{h:-60}),this.git5=this.git5||_(this.primaryColor,{h:-90}),this.git6=this.git6||_(this.primaryColor,{h:60}),this.git7=this.git7||_(this.primaryColor,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=J(this.git0,25),this.git1=J(this.git1,25),this.git2=J(this.git2,25),this.git3=J(this.git3,25),this.git4=J(this.git4,25),this.git5=J(this.git5,25),this.git6=J(this.git6,25),this.git7=J(this.git7,25)),this.gitInv0=this.gitInv0||W(this.git0),this.gitInv1=this.gitInv1||W(this.git1),this.gitInv2=this.gitInv2||W(this.git2),this.gitInv3=this.gitInv3||W(this.git3),this.gitInv4=this.gitInv4||W(this.git4),this.gitInv5=this.gitInv5||W(this.git5),this.gitInv6=this.gitInv6||W(this.git6),this.gitInv7=this.gitInv7||W(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||W(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||W(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Hn,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||jn}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},km=p(e=>{const t=new _m;return t.calculate(e),t},"getThemeVariables"),vm=class{static{p(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=H(this.contrast,55),this.background="#ffffff",this.tertiaryColor=_(this.primaryColor,{h:-160}),this.primaryBorderColor=Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rt(this.tertiaryColor,this.darkMode),this.primaryTextColor=W(this.primaryColor),this.secondaryTextColor=W(this.secondaryColor),this.tertiaryTextColor=W(this.tertiaryColor),this.lineColor=W(this.background),this.textColor=W(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||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=H(this.contrast,55),this.border2=this.contrast,this.actorBorder=H(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 e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||W(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||H(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||J(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||_(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||_(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=H(this.contrast,30),this.sectionBkgColor2=H(this.contrast,30),this.taskBorderColor=J(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=H(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=J(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=_(this.primaryColor,{h:64}),this.fillType3=_(this.secondaryColor,{h:64}),this.fillType4=_(this.primaryColor,{h:-64}),this.fillType5=_(this.secondaryColor,{h:-64}),this.fillType6=_(this.primaryColor,{h:128}),this.fillType7=_(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||_(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||_(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||_(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||_(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||_(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||_(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||vi(this.quadrant1Fill)?H(this.quadrant1Fill):J(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=J(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||_(this.primaryColor,{h:-30}),this.git4=this.pie5||_(this.primaryColor,{h:-60}),this.git5=this.pie6||_(this.primaryColor,{h:-90}),this.git6=this.pie7||_(this.primaryColor,{h:60}),this.git7=this.pie8||_(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||W(this.git0),this.gitInv1=this.gitInv1||W(this.git1),this.gitInv2=this.gitInv2||W(this.git2),this.gitInv3=this.gitInv3||W(this.git3),this.gitInv4=this.gitInv4||W(this.git4),this.gitInv5=this.gitInv5||W(this.git5),this.gitInv6=this.gitInv6||W(this.git6),this.gitInv7=this.gitInv7||W(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Hn,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||jn}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Sm=p(e=>{const t=new vm;return t.calculate(e),t},"getThemeVariables"),Le={base:{getThemeVariables:ym},dark:{getThemeVariables:bm},default:{getThemeVariables:wm},forest:{getThemeVariables:km},neutral:{getThemeVariables:Sm}},we={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},Nc={...we,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:Le.default.getThemeVariables(),sequence:{...we.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...we.gantt,tickInterval:void 0,useWidth:void 0},c4:{...we.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...we.pie,useWidth:984},xyChart:{...we.xyChart,useWidth:void 0},requirement:{...we.requirement,useWidth:void 0},packet:{...we.packet},radar:{...we.radar}},zc=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...zc(e[i],"")]:[...r,t+i],[]),"keyify"),Tm=new Set(zc(Nc,"")),Wc=Nc,fn=p(e=>{if(O.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>fn(t));return}for(const t of Object.keys(e)){if(O.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Tm.has(t)||e[t]==null){O.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){O.debug("sanitizing object",t),fn(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(O.debug("sanitizing css option",t),e[t]=Bm(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}O.debug("After sanitization",e)}},"sanitizeDirective"),Bm=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Sr=Object.freeze(Wc),jt=Lt({},Sr),qc,Tr=[],fi=Lt({},Sr),Yn=p((e,t)=>{let r=Lt({},e),i={};for(const n of t)Yc(n),i=Lt(i,n);if(r=Lt(r,i),i.theme&&i.theme in Le){const n=Lt({},qc),a=Lt(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in Le&&(r.themeVariables=Le[r.theme].getThemeVariables(a))}return fi=r,Uc(fi),fi},"updateCurrentConfig"),Lm=p(e=>(jt=Lt({},Sr),jt=Lt(jt,e),e.theme&&Le[e.theme]&&(jt.themeVariables=Le[e.theme].getThemeVariables(e.themeVariables)),Yn(jt,Tr),jt),"setSiteConfig"),Am=p(e=>{qc=Lt({},e)},"saveConfigFromInitialize"),Em=p(e=>(jt=Lt(jt,e),Yn(jt,Tr),jt),"updateSiteConfig"),Hc=p(()=>Lt({},jt),"getSiteConfig"),jc=p(e=>(Uc(e),Lt(fi,e),Ut()),"setConfig"),Ut=p(()=>Lt({},fi),"getConfig"),Yc=p(e=>{e&&(["secure",...jt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(O.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Yc(e[t])}))},"sanitize"),Mm=p(e=>{fn(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Tr.push(e),Yn(jt,Tr)},"addDirective"),dn=p((e=jt)=>{Tr=[],Yn(e,Tr)},"reset"),Fm={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},cl={},Om=p(e=>{cl[e]||(O.warn(Fm[e]),cl[e]=!0)},"issueWarning"),Uc=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Om("LAZY_LOAD_DEPRECATED")},"checkConfig"),Si=/<br\s*\/?>/gi,$m=p(e=>e?Xc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Dm=(()=>{let e=!1;return()=>{e||(Gc(),e=!0)}})();function Gc(){const e="data-temp-href-target";kr.addHook("beforeSanitizeAttributes",t=>{t instanceof Element&&t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),kr.addHook("afterSanitizeAttributes",t=>{t instanceof Element&&t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(Gc,"setupDompurifyHooks");var Vc=p(e=>(Dm(),kr.sanitize(e)),"removeScript"),hl=p((e,t)=>{if(t.flowchart?.htmlLabels!==!1){const r=t.securityLevel;r==="antiscript"||r==="strict"?e=Vc(e):r!=="loose"&&(e=Xc(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=Nm(e))}return e},"sanitizeMore"),tr=p((e,t)=>e&&(t.dompurifyConfig?e=kr.sanitize(hl(e,t),t.dompurifyConfig).toString():e=kr.sanitize(hl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Rm=p((e,t)=>typeof e=="string"?tr(e,t):e.flat().map(r=>tr(r,t)),"sanitizeTextOrArray"),Im=p(e=>Si.test(e),"hasBreaks"),Pm=p(e=>e.split(Si),"splitBreaks"),Nm=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Xc=p(e=>e.replace(Si,"#br#"),"breakToPlaceholder"),zm=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=t.replaceAll(/\(/g,"\\("),t=t.replaceAll(/\)/g,"\\)")),t},"getUrl"),kt=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Wm=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),qm=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),ul=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let n=t[i];if(n===","&&i>0&&i+1<t.length){const a=t[i-1],o=t[i+1];Hm(a,o)&&(n=a+","+o,i++,r.pop())}r.push(jm(n))}return r.join("")},"parseGenericTypes"),Ha=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Hm=p((e,t)=>{const r=Ha(e,"~"),i=Ha(t,"~");return r===1&&i===1},"shouldCombineSets"),jm=p(e=>{const t=Ha(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let n=i.indexOf("~"),a=i.lastIndexOf("~");for(;n!==-1&&a!==-1&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),fl=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),ja=/\$\$(.*)\$\$/g,Br=p(e=>(e.match(ja)?.length??0)>0,"hasKatex"),KT=p(async(e,t)=>{e=await $s(e,t);const r=document.createElement("div");r.innerHTML=e,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"),$s=p(async(e,t)=>{if(!Br(e))return e;if(!(fl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(ja,"MathML is unsupported in this environment.");const{default:r}=await dt(async()=>{const{default:n}=await import("./index-CLHdxmCS.js").then(a=>a.bV);return{default:n}},__vite__mapDeps([0,1,2,3]),import.meta.url),i=t.forceLegacyMathML||!fl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Si).map(n=>Br(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(ja,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))},"renderKatex"),$r={getRows:$m,sanitizeText:tr,sanitizeTextOrArray:Rm,hasBreaks:Im,splitBreaks:Pm,lineBreakRegex:Si,removeScript:Vc,getUrl:zm,evaluate:kt,getMax:Wm,getMin:qm},Ym=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Um=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Zc=p(function(e,t,r,i){const n=Um(t,r,i);Ym(e,n)},"configureSvgSize"),Gm=p(function(e,t,r,i){const n=t.node().getBBox(),a=n.width,o=n.height;O.info(`SVG bounds: ${a}x${o}`,n);let s=0,c=0;O.info(`Graph bounds: ${s}x${c}`,e),s=a+r*2,c=o+r*2,O.info(`Calculated bounds: ${s}x${c}`),Zc(t,c,s,i);const l=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",l)},"setupGraphViewbox"),Qi={},Vm=p((e,t,r)=>{let i="";return e in Qi&&Qi[e]?i=Qi[e](r):O.warn(`No theme found for ${e}`),` & {
5
+ font-family: ${r.fontFamily};
6
+ font-size: ${r.fontSize};
7
+ fill: ${r.textColor}
8
+ }
9
+ @keyframes edge-animation-frame {
10
+ from {
11
+ stroke-dashoffset: 0;
12
+ }
13
+ }
14
+ @keyframes dash {
15
+ to {
16
+ stroke-dashoffset: 0;
17
+ }
18
+ }
19
+ & .edge-animation-slow {
20
+ stroke-dasharray: 9,5 !important;
21
+ stroke-dashoffset: 900;
22
+ animation: dash 50s linear infinite;
23
+ stroke-linecap: round;
24
+ }
25
+ & .edge-animation-fast {
26
+ stroke-dasharray: 9,5 !important;
27
+ stroke-dashoffset: 900;
28
+ animation: dash 20s linear infinite;
29
+ stroke-linecap: round;
30
+ }
31
+ /* Classes common for multiple diagrams */
32
+
33
+ & .error-icon {
34
+ fill: ${r.errorBkgColor};
35
+ }
36
+ & .error-text {
37
+ fill: ${r.errorTextColor};
38
+ stroke: ${r.errorTextColor};
39
+ }
40
+
41
+ & .edge-thickness-normal {
42
+ stroke-width: 1px;
43
+ }
44
+ & .edge-thickness-thick {
45
+ stroke-width: 3.5px
46
+ }
47
+ & .edge-pattern-solid {
48
+ stroke-dasharray: 0;
49
+ }
50
+ & .edge-thickness-invisible {
51
+ stroke-width: 0;
52
+ fill: none;
53
+ }
54
+ & .edge-pattern-dashed{
55
+ stroke-dasharray: 3;
56
+ }
57
+ .edge-pattern-dotted {
58
+ stroke-dasharray: 2;
59
+ }
60
+
61
+ & .marker {
62
+ fill: ${r.lineColor};
63
+ stroke: ${r.lineColor};
64
+ }
65
+ & .marker.cross {
66
+ stroke: ${r.lineColor};
67
+ }
68
+
69
+ & svg {
70
+ font-family: ${r.fontFamily};
71
+ font-size: ${r.fontSize};
72
+ }
73
+ & p {
74
+ margin: 0
75
+ }
76
+
77
+ ${i}
78
+
79
+ ${t}
80
+ `},"getStyles"),Xm=p((e,t)=>{t!==void 0&&(Qi[e]=t)},"addStylesForDiagram"),Zm=Vm,Kc={};dm(Kc,{clear:()=>Km,getAccDescription:()=>ey,getAccTitle:()=>Jm,getDiagramTitle:()=>iy,setAccDescription:()=>ty,setAccTitle:()=>Qm,setDiagramTitle:()=>ry});var Ds="",Rs="",Is="",Ps=p(e=>tr(e,Ut()),"sanitizeText"),Km=p(()=>{Ds="",Is="",Rs=""},"clear"),Qm=p(e=>{Ds=Ps(e).replace(/^\s+/g,"")},"setAccTitle"),Jm=p(()=>Ds,"getAccTitle"),ty=p(e=>{Is=Ps(e).replace(/\n\s+/g,`
81
+ `)},"setAccDescription"),ey=p(()=>Is,"getAccDescription"),ry=p(e=>{Rs=Ps(e)},"setDiagramTitle"),iy=p(()=>Rs,"getDiagramTitle"),dl=O,ny=Fs,ht=Ut,QT=jc,JT=Sr,Ns=p(e=>tr(e,ht()),"sanitizeText"),ay=Gm,sy=p(()=>Kc,"getCommonDb"),pn={},gn=p((e,t,r)=>{pn[e]&&dl.warn(`Diagram with id ${e} already registered. Overwriting.`),pn[e]=t,r&&Pc(e,r),Xm(e,t.styles),t.injectUtils?.(dl,ny,ht,Ns,ay,sy(),()=>{})},"registerDiagram"),Ya=p(e=>{if(e in pn)return pn[e];throw new oy(e)},"getDiagram"),oy=class extends Error{static{p(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}};function zs(e){return typeof e>"u"||e===null}p(zs,"isNothing");function Qc(e){return typeof e=="object"&&e!==null}p(Qc,"isObject");function Jc(e){return Array.isArray(e)?e:zs(e)?[]:[e]}p(Jc,"toArray");function th(e,t){var r,i,n,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)n=a[r],e[n]=t[n];return e}p(th,"extend");function eh(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(eh,"repeat");function rh(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(rh,"isNegativeZero");var ly=zs,cy=Qc,hy=Jc,uy=eh,fy=rh,dy=th,_t={isNothing:ly,isObject:cy,toArray:hy,repeat:uy,isNegativeZero:fy,extend:dy};function Ws(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
82
+
83
+ `+e.mark.snippet),i+" "+r):i}p(Ws,"formatError");function Lr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Ws(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(Lr,"YAMLException$1");Lr.prototype=Object.create(Error.prototype);Lr.prototype.constructor=Lr;Lr.prototype.toString=p(function(t){return this.name+": "+Ws(this,t)},"toString");var Yt=Lr;function Ji(e,t,r,i,n){var a="",o="",s=Math.floor(n/2)-1;return i-t>s&&(a=" ... ",t=i-s+a.length),r-i>s&&(o=" ...",r=i+s-o.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+a.length}}p(Ji,"getLine");function tn(e,t){return _t.repeat(" ",t-e.length)+e}p(tn,"padStart");function ih(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],a,o=-1;a=r.exec(e.buffer);)n.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s="",c,l,h=Math.min(e.line+t.linesAfter,n.length).toString().length,u=t.maxLength-(t.indent+h+3);for(c=1;c<=t.linesBefore&&!(o-c<0);c++)l=Ji(e.buffer,i[o-c],n[o-c],e.position-(i[o]-i[o-c]),u),s=_t.repeat(" ",t.indent)+tn((e.line-c+1).toString(),h)+" | "+l.str+`
84
+ `+s;for(l=Ji(e.buffer,i[o],n[o],e.position,u),s+=_t.repeat(" ",t.indent)+tn((e.line+1).toString(),h)+" | "+l.str+`
85
+ `,s+=_t.repeat("-",t.indent+h+3+l.pos)+`^
86
+ `,c=1;c<=t.linesAfter&&!(o+c>=n.length);c++)l=Ji(e.buffer,i[o+c],n[o+c],e.position-(i[o]-i[o+c]),u),s+=_t.repeat(" ",t.indent)+tn((e.line+c+1).toString(),h)+" | "+l.str+`
87
+ `;return s.replace(/\n$/,"")}p(ih,"makeSnippet");var py=ih,gy=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],my=["scalar","sequence","mapping"];function nh(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(nh,"compileStyleAliases");function ah(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(gy.indexOf(r)===-1)throw new Yt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=nh(t.styleAliases||null),my.indexOf(this.kind)===-1)throw new Yt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(ah,"Type$1");var Ft=ah;function Ua(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=o)}),r[n]=i}),r}p(Ua,"compileList");function sh(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(sh,"compileMap");function mn(e){return this.extend(e)}p(mn,"Schema$1");mn.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Ft)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new Yt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Ft))throw new Yt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Yt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Yt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof Ft))throw new Yt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(mn.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=Ua(n,"implicit"),n.compiledExplicit=Ua(n,"explicit"),n.compiledTypeMap=sh(n.compiledImplicit,n.compiledExplicit),n},"extend");var yy=mn,xy=new Ft("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),by=new Ft("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),Cy=new Ft("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),wy=new yy({explicit:[xy,by,Cy]});function oh(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(oh,"resolveYamlNull");function lh(){return null}p(lh,"constructYamlNull");function ch(e){return e===null}p(ch,"isNull");var _y=new Ft("tag:yaml.org,2002:null",{kind:"scalar",resolve:oh,construct:lh,predicate:ch,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"});function hh(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}p(hh,"resolveYamlBoolean");function uh(e){return e==="true"||e==="True"||e==="TRUE"}p(uh,"constructYamlBoolean");function fh(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(fh,"isBoolean");var ky=new Ft("tag:yaml.org,2002:bool",{kind:"scalar",resolve:hh,construct:uh,predicate:fh,represent:{lowercase:p(function(e){return e?"true":"false"},"lowercase"),uppercase:p(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function dh(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(dh,"isHexCode");function ph(e){return 48<=e&&e<=55}p(ph,"isOctCode");function gh(e){return 48<=e&&e<=57}p(gh,"isDecCode");function mh(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!dh(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!ph(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!gh(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}p(mh,"resolveYamlInteger");function yh(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}p(yh,"constructYamlInteger");function xh(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!_t.isNegativeZero(e)}p(xh,"isInteger");var vy=new Ft("tag:yaml.org,2002:int",{kind:"scalar",resolve:mh,construct:yh,predicate:xh,represent:{binary:p(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:p(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:p(function(e){return e.toString(10)},"decimal"),hexadecimal:p(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Sy=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function bh(e){return!(e===null||!Sy.test(e)||e[e.length-1]==="_")}p(bh,"resolveYamlFloat");function Ch(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}p(Ch,"constructYamlFloat");var Ty=/^[-+]?[0-9]+e/;function wh(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(_t.isNegativeZero(e))return"-0.0";return r=e.toString(10),Ty.test(r)?r.replace("e",".e"):r}p(wh,"representYamlFloat");function _h(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||_t.isNegativeZero(e))}p(_h,"isFloat");var By=new Ft("tag:yaml.org,2002:float",{kind:"scalar",resolve:bh,construct:Ch,predicate:_h,represent:wh,defaultStyle:"lowercase"}),kh=wy.extend({implicit:[_y,ky,vy,By]}),Ly=kh,vh=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Sh=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 Th(e){return e===null?!1:vh.exec(e)!==null||Sh.exec(e)!==null}p(Th,"resolveYamlTimestamp");function Bh(e){var t,r,i,n,a,o,s,c=0,l=null,h,u,f;if(t=vh.exec(e),t===null&&(t=Sh.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(h=+t[10],u=+(t[11]||0),l=(h*60+u)*6e4,t[9]==="-"&&(l=-l)),f=new Date(Date.UTC(r,i,n,a,o,s,c)),l&&f.setTime(f.getTime()-l),f}p(Bh,"constructYamlTimestamp");function Lh(e){return e.toISOString()}p(Lh,"representYamlTimestamp");var Ay=new Ft("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Th,construct:Bh,instanceOf:Date,represent:Lh});function Ah(e){return e==="<<"||e===null}p(Ah,"resolveYamlMerge");var Ey=new Ft("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Ah}),qs=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
88
+ \r`;function Eh(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=qs;for(r=0;r<n;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(Eh,"resolveYamlBinary");function Mh(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=qs,o=0,s=[];for(t=0;t<n;t++)t%4===0&&t&&(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));return r=n%4*6,r===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):r===18?(s.push(o>>10&255),s.push(o>>2&255)):r===12&&s.push(o>>4&255),new Uint8Array(s)}p(Mh,"constructYamlBinary");function Fh(e){var t="",r=0,i,n,a=e.length,o=qs;for(i=0;i<a;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return n=a%3,n===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):n===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):n===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}p(Fh,"representYamlBinary");function Oh(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(Oh,"isBinary");var My=new Ft("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Eh,construct:Mh,predicate:Oh,represent:Fh}),Fy=Object.prototype.hasOwnProperty,Oy=Object.prototype.toString;function $h(e){if(e===null)return!0;var t=[],r,i,n,a,o,s=e;for(r=0,i=s.length;r<i;r+=1){if(n=s[r],o=!1,Oy.call(n)!=="[object Object]")return!1;for(a in n)if(Fy.call(n,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}p($h,"resolveYamlOmap");function Dh(e){return e!==null?e:[]}p(Dh,"constructYamlOmap");var $y=new Ft("tag:yaml.org,2002:omap",{kind:"sequence",resolve:$h,construct:Dh}),Dy=Object.prototype.toString;function Rh(e){if(e===null)return!0;var t,r,i,n,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],Dy.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;a[t]=[n[0],i[n[0]]]}return!0}p(Rh,"resolveYamlPairs");function Ih(e){if(e===null)return[];var t,r,i,n,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],n=Object.keys(i),a[t]=[n[0],i[n[0]]];return a}p(Ih,"constructYamlPairs");var Ry=new Ft("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Rh,construct:Ih}),Iy=Object.prototype.hasOwnProperty;function Ph(e){if(e===null)return!0;var t,r=e;for(t in r)if(Iy.call(r,t)&&r[t]!==null)return!1;return!0}p(Ph,"resolveYamlSet");function Nh(e){return e!==null?e:{}}p(Nh,"constructYamlSet");var Py=new Ft("tag:yaml.org,2002:set",{kind:"mapping",resolve:Ph,construct:Nh}),zh=Ly.extend({implicit:[Ay,Ey],explicit:[My,$y,Ry,Py]}),ze=Object.prototype.hasOwnProperty,yn=1,Wh=2,qh=3,xn=4,Ba=1,Ny=2,pl=3,zy=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Wy=/[\x85\u2028\u2029]/,qy=/[,\[\]\{\}]/,Hh=/^(?:!|!!|![a-z\-]+!)$/i,jh=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ga(e){return Object.prototype.toString.call(e)}p(Ga,"_class");function ne(e){return e===10||e===13}p(ne,"is_EOL");function Ne(e){return e===9||e===32}p(Ne,"is_WHITE_SPACE");function It(e){return e===9||e===32||e===10||e===13}p(It,"is_WS_OR_EOL");function Ke(e){return e===44||e===91||e===93||e===123||e===125}p(Ke,"is_FLOW_INDICATOR");function Yh(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(Yh,"fromHexCode");function Uh(e){return e===120?2:e===117?4:e===85?8:0}p(Uh,"escapedHexLen");function Gh(e){return 48<=e&&e<=57?e-48:-1}p(Gh,"fromDecimalCode");function Va(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
89
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}p(Va,"simpleEscapeSequence");function Vh(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(Vh,"charFromCodepoint");var Xh=new Array(256),Zh=new Array(256);for(Ue=0;Ue<256;Ue++)Xh[Ue]=Va(Ue)?1:0,Zh[Ue]=Va(Ue);var Ue;function Kh(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||zh,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}p(Kh,"State$1");function Hs(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=py(r),new Yt(t,r)}p(Hs,"generateError");function K(e,t){throw Hs(e,t)}p(K,"throwError");function gi(e,t){e.onWarning&&e.onWarning.call(null,Hs(e,t))}p(gi,"throwWarning");var gl={YAML:p(function(t,r,i){var n,a,o;t.version!==null&&K(t,"duplication of %YAML directive"),i.length!==1&&K(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&K(t,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),o=parseInt(n[2],10),a!==1&&K(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&gi(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var n,a;i.length!==2&&K(t,"TAG directive accepts exactly two arguments"),n=i[0],a=i[1],Hh.test(n)||K(t,"ill-formed tag handle (first argument) of the TAG directive"),ze.call(t.tagMap,n)&&K(t,'there is a previously declared suffix for "'+n+'" tag handle'),jh.test(a)||K(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{K(t,"tag prefix is malformed: "+a)}t.tagMap[n]=a},"handleTagDirective")};function Ae(e,t,r,i){var n,a,o,s;if(t<r){if(s=e.input.slice(t,r),i)for(n=0,a=s.length;n<a;n+=1)o=s.charCodeAt(n),o===9||32<=o&&o<=1114111||K(e,"expected valid JSON character");else zy.test(s)&&K(e,"the stream contains non-printable characters");e.result+=s}}p(Ae,"captureSegment");function Xa(e,t,r,i){var n,a,o,s;for(_t.isObject(r)||K(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),o=0,s=n.length;o<s;o+=1)a=n[o],ze.call(t,a)||(t[a]=r[a],i[a]=!0)}p(Xa,"mergeMappings");function Qe(e,t,r,i,n,a,o,s,c){var l,h;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),l=0,h=n.length;l<h;l+=1)Array.isArray(n[l])&&K(e,"nested arrays are not supported inside keys"),typeof n=="object"&&Ga(n[l])==="[object Object]"&&(n[l]="[object Object]");if(typeof n=="object"&&Ga(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(l=0,h=a.length;l<h;l+=1)Xa(e,t,a[l],r);else Xa(e,t,a,r);else!e.json&&!ze.call(r,n)&&ze.call(t,n)&&(e.line=o||e.line,e.lineStart=s||e.lineStart,e.position=c||e.position,K(e,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(t,n,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[n]=a,delete r[n];return t}p(Qe,"storeMappingPair");function Un(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):K(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(Un,"readLineBreak");function xt(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;Ne(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(ne(n))for(Un(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&gi(e,"deficient indentation"),i}p(xt,"skipSeparationSpace");function Ti(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||It(r)))}p(Ti,"testDocumentSeparator");function Gn(e,t){t===1?e.result+=" ":t>1&&(e.result+=_t.repeat(`
90
+ `,t-1))}p(Gn,"writeFoldedLines");function Qh(e,t,r){var i,n,a,o,s,c,l,h,u=e.kind,f=e.result,d;if(d=e.input.charCodeAt(e.position),It(d)||Ke(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(n=e.input.charCodeAt(e.position+1),It(n)||r&&Ke(n)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,s=!1;d!==0;){if(d===58){if(n=e.input.charCodeAt(e.position+1),It(n)||r&&Ke(n))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),It(i))break}else{if(e.position===e.lineStart&&Ti(e)||r&&Ke(d))break;if(ne(d))if(c=e.line,l=e.lineStart,h=e.lineIndent,xt(e,!1,-1),e.lineIndent>=t){s=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=c,e.lineStart=l,e.lineIndent=h;break}}s&&(Ae(e,a,o,!1),Gn(e,e.line-c),a=o=e.position,s=!1),Ne(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return Ae(e,a,o,!1),e.result?!0:(e.kind=u,e.result=f,!1)}p(Qh,"readPlainScalar");function Jh(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Ae(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else ne(r)?(Ae(e,i,n,!0),Gn(e,xt(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Ti(e)?K(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);K(e,"unexpected end of the stream within a single quoted scalar")}p(Jh,"readSingleQuotedScalar");function tu(e,t){var r,i,n,a,o,s;if(s=e.input.charCodeAt(e.position),s!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(s=e.input.charCodeAt(e.position))!==0;){if(s===34)return Ae(e,r,e.position,!0),e.position++,!0;if(s===92){if(Ae(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),ne(s))xt(e,!1,t);else if(s<256&&Xh[s])e.result+=Zh[s],e.position++;else if((o=Uh(s))>0){for(n=o,a=0;n>0;n--)s=e.input.charCodeAt(++e.position),(o=Yh(s))>=0?a=(a<<4)+o:K(e,"expected hexadecimal character");e.result+=Vh(a),e.position++}else K(e,"unknown escape sequence");r=i=e.position}else ne(s)?(Ae(e,r,i,!0),Gn(e,xt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ti(e)?K(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}K(e,"unexpected end of the stream within a double quoted scalar")}p(tu,"readDoubleQuotedScalar");function eu(e,t){var r=!0,i,n,a,o=e.tag,s,c=e.anchor,l,h,u,f,d,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,d=!1,s=[];else if(b===123)h=125,d=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),b=e.input.charCodeAt(++e.position);b!==0;){if(xt(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=o,e.anchor=c,e.kind=d?"mapping":"sequence",e.result=s,!0;r?b===44&&K(e,"expected the node content, but found ','"):K(e,"missed comma between flow collection entries"),y=m=x=null,u=f=!1,b===63&&(l=e.input.charCodeAt(e.position+1),It(l)&&(u=f=!0,e.position++,xt(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,er(e,t,yn,!1,!0),y=e.tag,m=e.result,xt(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),xt(e,!0,t),er(e,t,yn,!1,!0),x=e.result),d?Qe(e,s,g,y,m,x,i,n,a):u?s.push(Qe(e,null,g,y,m,x,i,n,a)):s.push(m),xt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}K(e,"unexpected end of the stream within a flow collection")}p(eu,"readFlowCollection");function ru(e,t){var r,i,n=Ba,a=!1,o=!1,s=t,c=0,l=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)Ba===n?n=u===43?pl:Ny:K(e,"repeat of a chomping mode identifier");else if((h=Gh(u))>=0)h===0?K(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?K(e,"repeat of an indentation width identifier"):(s=t+h-1,o=!0);else break;if(Ne(u)){do u=e.input.charCodeAt(++e.position);while(Ne(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!ne(u)&&u!==0)}for(;u!==0;){for(Un(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<s)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>s&&(s=e.lineIndent),ne(u)){c++;continue}if(e.lineIndent<s){n===pl?e.result+=_t.repeat(`
91
+ `,a?1+c:c):n===Ba&&a&&(e.result+=`
92
+ `);break}for(i?Ne(u)?(l=!0,e.result+=_t.repeat(`
93
+ `,a?1+c:c)):l?(l=!1,e.result+=_t.repeat(`
94
+ `,c+1)):c===0?a&&(e.result+=" "):e.result+=_t.repeat(`
95
+ `,c):e.result+=_t.repeat(`
96
+ `,a?1+c:c),a=!0,o=!0,c=0,r=e.position;!ne(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Ae(e,r,e.position,!1)}return!0}p(ru,"readBlockScalar");function Za(e,t){var r,i=e.tag,n=e.anchor,a=[],o,s=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,K(e,"tab characters must not be used in indentation")),!(c!==45||(o=e.input.charCodeAt(e.position+1),!It(o))));){if(s=!0,e.position++,xt(e,!0,-1)&&e.lineIndent<=t){a.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,er(e,t,qh,!1,!0),a.push(e.result),xt(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)K(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return s?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=a,!0):!1}p(Za,"readBlockSequence");function iu(e,t,r){var i,n,a,o,s,c,l=e.tag,h=e.anchor,u={},f=Object.create(null),d=null,g=null,m=null,y=!1,x=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,K(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&It(i))b===63?(y&&(Qe(e,u,f,d,g,null,o,s,c),d=g=m=null),x=!0,y=!0,n=!0):y?(y=!1,n=!0):K(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,s=e.lineStart,c=e.position,!er(e,r,Wh,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);Ne(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),It(b)||K(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Qe(e,u,f,d,g,null,o,s,c),d=g=m=null),x=!0,y=!1,n=!1,d=e.tag,g=e.result;else if(x)K(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=l,e.anchor=h,!0}else if(x)K(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=l,e.anchor=h,!0}if((e.line===a||e.lineIndent>t)&&(y&&(o=e.line,s=e.lineStart,c=e.position),er(e,t,xn,!0,n)&&(y?g=e.result:m=e.result),y||(Qe(e,u,f,d,g,m,o,s,c),d=g=m=null),xt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)K(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Qe(e,u,f,d,g,null,o,s,c),x&&(e.tag=l,e.anchor=h,e.kind="mapping",e.result=u),x}p(iu,"readBlockMapping");function nu(e){var t,r=!1,i=!1,n,a,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&K(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,n="!!",o=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):K(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!It(o);)o===33&&(i?K(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),Hh.test(n)||K(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),qy.test(a)&&K(e,"tag suffix cannot contain flow indicator characters")}a&&!jh.test(a)&&K(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{K(e,"tag name is malformed: "+a)}return r?e.tag=a:ze.call(e.tagMap,n)?e.tag=e.tagMap[n]+a:n==="!"?e.tag="!"+a:n==="!!"?e.tag="tag:yaml.org,2002:"+a:K(e,'undeclared tag handle "'+n+'"'),!0}p(nu,"readTagProperty");function au(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&K(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!It(r)&&!Ke(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&K(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(au,"readAnchorProperty");function su(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!It(i)&&!Ke(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&K(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),ze.call(e.anchorMap,r)||K(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],xt(e,!0,-1),!0}p(su,"readAlias");function er(e,t,r,i,n){var a,o,s,c=1,l=!1,h=!1,u,f,d,g,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=s=xn===r||qh===r,i&&xt(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;nu(e)||au(e);)xt(e,!0,-1)?(l=!0,s=a,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):s=!1;if(s&&(s=l||n),(c===1||xn===r)&&(yn===r||Wh===r?m=t:m=t+1,y=e.position-e.lineStart,c===1?s&&(Za(e,y)||iu(e,y,m))||eu(e,m)?h=!0:(o&&ru(e,m)||Jh(e,m)||tu(e,m)?h=!0:su(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&K(e,"alias node should not have any properties")):Qh(e,m,yn===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(h=s&&Za(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&K(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(g=e.implicitTypes[u],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(ze.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,d=e.typeMap.multi[e.kind||"fallback"],u=0,f=d.length;u<f;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){g=d[u];break}g||K(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&K(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):K(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}p(er,"composeNode");function ou(e){var t=e.position,r,i,n,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(xt(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!It(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&K(e,"directive name must not be less than one character in length");o!==0;){for(;Ne(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!ne(o));break}if(ne(o))break;for(r=e.position;o!==0&&!It(o);)o=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}o!==0&&Un(e),ze.call(gl,i)?gl[i](e,i,n):gi(e,'unknown document directive "'+i+'"')}if(xt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,xt(e,!0,-1)):a&&K(e,"directives end mark is expected"),er(e,e.lineIndent-1,xn,!1,!0),xt(e,!0,-1),e.checkLineBreaks&&Wy.test(e.input.slice(t,e.position))&&gi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ti(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,xt(e,!0,-1));return}if(e.position<e.length-1)K(e,"end of the stream or a document separator is expected");else return}p(ou,"readDocument");function js(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
97
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Kh(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,K(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)ou(r);return r.documents}p(js,"loadDocuments");function Hy(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=js(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n<a;n+=1)t(i[n])}p(Hy,"loadAll$1");function lu(e,t){var r=js(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Yt("expected a single document in the stream, but found more")}}p(lu,"load$1");var jy=lu,Yy={load:jy},cu=Object.prototype.toString,hu=Object.prototype.hasOwnProperty,Ys=65279,Uy=9,mi=10,Gy=13,Vy=32,Xy=33,Zy=34,Ka=35,Ky=37,Qy=38,Jy=39,t0=42,uu=44,e0=45,bn=58,r0=61,i0=62,n0=63,a0=64,fu=91,du=93,s0=96,pu=123,o0=124,gu=125,Ot={};Ot[0]="\\0";Ot[7]="\\a";Ot[8]="\\b";Ot[9]="\\t";Ot[10]="\\n";Ot[11]="\\v";Ot[12]="\\f";Ot[13]="\\r";Ot[27]="\\e";Ot[34]='\\"';Ot[92]="\\\\";Ot[133]="\\N";Ot[160]="\\_";Ot[8232]="\\L";Ot[8233]="\\P";var l0=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],c0=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function mu(e,t){var r,i,n,a,o,s,c;if(t===null)return{};for(r={},i=Object.keys(t),n=0,a=i.length;n<a;n+=1)o=i[n],s=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),c=e.compiledTypeMap.fallback[o],c&&hu.call(c.styleAliases,s)&&(s=c.styleAliases[s]),r[o]=s;return r}p(mu,"compileStyleMap");function yu(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Yt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+_t.repeat("0",i-t.length)+t}p(yu,"encodeHex");var h0=1,yi=2;function xu(e){this.schema=e.schema||zh,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=_t.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=mu(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?yi:h0,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(xu,"State");function Qa(e,t){for(var r=_t.repeat(" ",t),i=0,n=-1,a="",o,s=e.length;i<s;)n=e.indexOf(`
98
+ `,i),n===-1?(o=e.slice(i),i=s):(o=e.slice(i,n+1),i=n+1),o.length&&o!==`
99
+ `&&(a+=r),a+=o;return a}p(Qa,"indentString");function Cn(e,t){return`
100
+ `+_t.repeat(" ",e.indent*t)}p(Cn,"generateNextLine");function bu(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}p(bu,"testImplicitResolving");function xi(e){return e===Vy||e===Uy}p(xi,"isWhitespace");function Ar(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Ys||65536<=e&&e<=1114111}p(Ar,"isPrintable");function Ja(e){return Ar(e)&&e!==Ys&&e!==Gy&&e!==mi}p(Ja,"isNsCharOrWhitespace");function ts(e,t,r){var i=Ja(e),n=i&&!xi(e);return(r?i:i&&e!==uu&&e!==fu&&e!==du&&e!==pu&&e!==gu)&&e!==Ka&&!(t===bn&&!n)||Ja(t)&&!xi(t)&&e===Ka||t===bn&&n}p(ts,"isPlainSafe");function Cu(e){return Ar(e)&&e!==Ys&&!xi(e)&&e!==e0&&e!==n0&&e!==bn&&e!==uu&&e!==fu&&e!==du&&e!==pu&&e!==gu&&e!==Ka&&e!==Qy&&e!==t0&&e!==Xy&&e!==o0&&e!==r0&&e!==i0&&e!==Jy&&e!==Zy&&e!==Ky&&e!==a0&&e!==s0}p(Cu,"isPlainSafeFirst");function wu(e){return!xi(e)&&e!==bn}p(wu,"isPlainSafeLast");function Cr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}p(Cr,"codePointAt");function Us(e){var t=/^\n* /;return t.test(e)}p(Us,"needIndentIndicator");var _u=1,es=2,ku=3,vu=4,xr=5;function Su(e,t,r,i,n,a,o,s){var c,l=0,h=null,u=!1,f=!1,d=i!==-1,g=-1,m=Cu(Cr(e,0))&&wu(Cr(e,e.length-1));if(t||o)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=Cr(e,c),!Ar(l))return xr;m=m&&ts(l,h,s),h=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=Cr(e,c),l===mi)u=!0,d&&(f=f||c-g-1>i&&e[g+1]!==" ",g=c);else if(!Ar(l))return xr;m=m&&ts(l,h,s),h=l}f=f||d&&c-g-1>i&&e[g+1]!==" "}return!u&&!f?m&&!o&&!n(e)?_u:a===yi?xr:es:r>9&&Us(e)?xr:o?a===yi?xr:es:f?vu:ku}p(Su,"chooseScalarStyle");function Tu(e,t,r,i,n){e.dump=function(){if(t.length===0)return e.quotingType===yi?'""':"''";if(!e.noCompatMode&&(l0.indexOf(t)!==-1||c0.test(t)))return e.quotingType===yi?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=i||e.flowLevel>-1&&r>=e.flowLevel;function c(l){return bu(e,l)}switch(p(c,"testAmbiguity"),Su(t,s,e.indent,o,c,e.quotingType,e.forceQuotes&&!i,n)){case _u:return t;case es:return"'"+t.replace(/'/g,"''")+"'";case ku:return"|"+rs(t,e.indent)+is(Qa(t,a));case vu:return">"+rs(t,e.indent)+is(Qa(Bu(t,o),a));case xr:return'"'+Lu(t)+'"';default:throw new Yt("impossible error: invalid scalar style")}}()}p(Tu,"writeScalar");function rs(e,t){var r=Us(e)?String(t):"",i=e[e.length-1]===`
101
+ `,n=i&&(e[e.length-2]===`
102
+ `||e===`
103
+ `),a=n?"+":i?"":"-";return r+a+`
104
+ `}p(rs,"blockHeader");function is(e){return e[e.length-1]===`
105
+ `?e.slice(0,-1):e}p(is,"dropEndingNewline");function Bu(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var l=e.indexOf(`
106
+ `);return l=l!==-1?l:e.length,r.lastIndex=l,ns(e.slice(0,l),t)}(),n=e[0]===`
107
+ `||e[0]===" ",a,o;o=r.exec(e);){var s=o[1],c=o[2];a=c[0]===" ",i+=s+(!n&&!a&&c!==""?`
108
+ `:"")+ns(c,t),n=a}return i}p(Bu,"foldString");function ns(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,a,o=0,s=0,c="";i=r.exec(e);)s=i.index,s-n>t&&(a=o>n?o:s,c+=`
109
+ `+e.slice(n,a),n=a+1),o=s;return c+=`
110
+ `,e.length-n>t&&o>n?c+=e.slice(n,o)+`
111
+ `+e.slice(o+1):c+=e.slice(n),c.slice(1)}p(ns,"foldLine");function Lu(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=Cr(e,n),i=Ot[r],!i&&Ar(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||yu(r);return t}p(Lu,"escapeString");function Au(e,t,r){var i="",n=e.tag,a,o,s;for(a=0,o=r.length;a<o;a+=1)s=r[a],e.replacer&&(s=e.replacer.call(r,String(a),s)),(de(e,t,s,!1,!1)||typeof s>"u"&&de(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}p(Au,"writeFlowSequence");function as(e,t,r,i){var n="",a=e.tag,o,s,c;for(o=0,s=r.length;o<s;o+=1)c=r[o],e.replacer&&(c=e.replacer.call(r,String(o),c)),(de(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&de(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=Cn(e,t)),e.dump&&mi===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}p(as,"writeBlockSequence");function Eu(e,t,r){var i="",n=e.tag,a=Object.keys(r),o,s,c,l,h;for(o=0,s=a.length;o<s;o+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),c=a[o],l=r[c],e.replacer&&(l=e.replacer.call(r,c,l)),de(e,t,c,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),de(e,t,l,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}p(Eu,"writeFlowMapping");function Mu(e,t,r,i){var n="",a=e.tag,o=Object.keys(r),s,c,l,h,u,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new Yt("sortKeys must be a boolean or a function");for(s=0,c=o.length;s<c;s+=1)f="",(!i||n!=="")&&(f+=Cn(e,t)),l=o[s],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),de(e,t+1,l,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&mi===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=Cn(e,t)),de(e,t+1,h,!0,u)&&(e.dump&&mi===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,n+=f));e.tag=a,e.dump=n||"{}"}p(Mu,"writeBlockMapping");function ss(e,t,r){var i,n,a,o,s,c;for(n=r?e.explicitTypes:e.implicitTypes,a=0,o=n.length;a<o;a+=1)if(s=n[a],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t=="object"&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(r?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag="?",s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,cu.call(s.represent)==="[object Function]")i=s.represent(t,c);else if(hu.call(s.represent,c))i=s.represent[c](t,c);else throw new Yt("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');e.dump=i}return!0}return!1}p(ss,"detectType");function de(e,t,r,i,n,a,o){e.tag=null,e.dump=r,ss(e,r,!1)||ss(e,r,!0);var s=cu.call(e.dump),c=i,l;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=s==="[object Object]"||s==="[object Array]",u,f;if(h&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(n=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(Mu(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(Eu(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?as(e,t-1,e.dump,n):as(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(Au(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&Tu(e,e.dump,t,a,c);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Yt("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(l=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?l="!"+l:l.slice(0,18)==="tag:yaml.org,2002:"?l="!!"+l.slice(18):l="!<"+l+">",e.dump=l+" "+e.dump)}return!0}p(de,"writeNode");function Fu(e,t){var r=[],i=[],n,a;for(wn(e,r,i),n=0,a=i.length;n<a;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(a)}p(Fu,"getDuplicateReferences");function wn(e,t,r){var i,n,a;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,a=e.length;n<a;n+=1)wn(e[n],t,r);else for(i=Object.keys(e),n=0,a=i.length;n<a;n+=1)wn(e[i[n]],t,r)}p(wn,"inspectNode");function u0(e,t){t=t||{};var r=new xu(t);r.noRefs||Fu(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),de(r,0,i,!0,!0)?r.dump+`
112
+ `:""}p(u0,"dump$1");function f0(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}p(f0,"renamed");var d0=kh,p0=Yy.load;/*! Bundled license information:
113
+
114
+ js-yaml/dist/js-yaml.mjs:
115
+ (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
116
+ */var Qt={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function ii(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=yt(e),t=yt(t);const[r,i]=[e.x,e.y],[n,a]=[t.x,t.y],o=n-r,s=a-i;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}p(ii,"calculateDeltaAndAngle");var yt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),g0=p(e=>({x:p(function(t,r,i){let n=0;const a=yt(i[0]).x<yt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Qt,e.arrowTypeStart)){const{angle:d,deltaX:g}=ii(i[0],i[1]);n=Qt[e.arrowTypeStart]*Math.cos(d)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Qt,e.arrowTypeEnd)){const{angle:d,deltaX:g}=ii(i[i.length-1],i[i.length-2]);n=Qt[e.arrowTypeEnd]*Math.cos(d)*(g>=0?1:-1)}const o=Math.abs(yt(t).x-yt(i[i.length-1]).x),s=Math.abs(yt(t).y-yt(i[i.length-1]).y),c=Math.abs(yt(t).x-yt(i[0]).x),l=Math.abs(yt(t).y-yt(i[0]).y),h=Qt[e.arrowTypeStart],u=Qt[e.arrowTypeEnd],f=1;if(o<u&&o>0&&s<u){let d=u+f-o;d*=a==="right"?-1:1,n-=d}if(c<h&&c>0&&l<h){let d=h+f-c;d*=a==="right"?-1:1,n+=d}return yt(t).x+n},"x"),y:p(function(t,r,i){let n=0;const a=yt(i[0]).y<yt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Qt,e.arrowTypeStart)){const{angle:d,deltaY:g}=ii(i[0],i[1]);n=Qt[e.arrowTypeStart]*Math.abs(Math.sin(d))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Qt,e.arrowTypeEnd)){const{angle:d,deltaY:g}=ii(i[i.length-1],i[i.length-2]);n=Qt[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(g>=0?1:-1)}const o=Math.abs(yt(t).y-yt(i[i.length-1]).y),s=Math.abs(yt(t).x-yt(i[i.length-1]).x),c=Math.abs(yt(t).y-yt(i[0]).y),l=Math.abs(yt(t).x-yt(i[0]).x),h=Qt[e.arrowTypeStart],u=Qt[e.arrowTypeEnd],f=1;if(o<u&&o>0&&s<u){let d=u+f-o;d*=a==="up"?-1:1,n-=d}if(c<h&&c>0&&l<h){let d=h+f-c;d*=a==="up"?-1:1,n+=d}return yt(t).y+n},"y")}),"getLineFunctionsWithOffset"),Gs=p(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");const m0=Object.freeze({left:0,top:0,width:16,height:16}),_n=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ou=Object.freeze({...m0,..._n}),y0=Object.freeze({...Ou,body:"",hidden:!1}),x0=Object.freeze({width:null,height:null}),b0=Object.freeze({...x0,..._n}),C0=(e,t,r,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const s=n.pop(),c=n.pop(),l={provider:n.length>0?n[0]:i,prefix:c,name:s};return La(l)?l:null}const a=n[0],o=a.split("-");if(o.length>1){const s={provider:i,prefix:o.shift(),name:o.join("-")};return La(s)?s:null}if(r&&i===""){const s={provider:i,prefix:"",name:a};return La(s,r)?s:null}return null},La=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function w0(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function ml(e,t){const r=w0(e,t);for(const i in y0)i in _n?i in e&&!(i in r)&&(r[i]=_n[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function _0(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function a(o){if(r[o])return n[o]=[];if(!(o in n)){n[o]=null;const s=i[o]&&i[o].parent,c=s&&a(s);c&&(n[o]=[s].concat(c))}return n[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),n}function yl(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let a={};function o(s){a=ml(i[s]||n[s],a)}return o(t),r.forEach(o),ml(e,a)}function k0(e,t){if(e.icons[t])return yl(e,t,[]);const r=_0(e,[t])[t];return r?yl(e,t,r):null}const v0=/(-?[0-9.]*[0-9]+[0-9.]*)/g,S0=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function xl(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(v0);if(i===null||!i.length)return e;const n=[];let a=i.shift(),o=S0.test(a);for(;;){if(o){const s=parseFloat(a);isNaN(s)?n.push(a):n.push(Math.ceil(s*t*r)/r)}else n.push(a);if(a=i.shift(),a===void 0)return n.join("");o=!o}}function T0(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),a=e.indexOf("</"+t);if(n===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function B0(e,t){return e?"<defs>"+e+"</defs>"+t:t}function L0(e,t,r){const i=T0(e);return B0(i.defs,t+i.content+r)}const A0=e=>e==="unset"||e==="undefined"||e==="none";function E0(e,t){const r={...Ou,...e},i={...b0,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let C=m.rotate;x?b?C+=2:(y.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),y.push("scale(-1 1)"),n.top=n.left=0):b&&(y.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),y.push("scale(1 -1)"),n.top=n.left=0);let k;switch(C<0&&(C-=Math.floor(C/4)*4),C=C%4,C){case 1:k=n.height/2+n.top,y.unshift("rotate(90 "+k.toString()+" "+k.toString()+")");break;case 2:y.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:k=n.width/2+n.left,y.unshift("rotate(-90 "+k.toString()+" "+k.toString()+")");break}C%2===1&&(n.left!==n.top&&(k=n.left,n.left=n.top,n.top=k),n.width!==n.height&&(k=n.width,n.width=n.height,n.height=k)),y.length&&(a=L0(a,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,s=i.height,c=n.width,l=n.height;let h,u;o===null?(u=s===null?"1em":s==="auto"?l:s,h=xl(u,c/l)):(h=o==="auto"?c:o,u=s===null?xl(h,l/c):s==="auto"?l:s);const f={},d=(m,y)=>{A0(y)||(f[m]=y.toString())};d("width",h),d("height",u);const g=[n.left,n.top,c,l];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:a}}const M0=/\sid="(\S+)"/g,F0="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let O0=0;function $0(e,t=F0){const r=[];let i;for(;i=M0.exec(e);)r.push(i[1]);if(!r.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{const o=typeof t=="function"?t(a):t+(O0++).toString(),s=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+o+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}function D0(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var R0={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},os=new Map,$u=new Map,I0=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(O.debug("Registering icon pack:",t.name),"loader"in t)$u.set(t.name,t.loader);else if("icons"in t)os.set(t.name,t.icons);else throw O.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),P0=p(async(e,t)=>{const r=C0(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let n=os.get(i);if(!n){const o=$u.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await o(),prefix:i},os.set(i,n)}catch(s){throw O.error(s),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=k0(n,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),Vn=p(async(e,t)=>{let r;try{r=await P0(e,t?.fallbackPrefix)}catch(a){O.error(a),r=R0}const i=E0(r,t);return D0($0(i.body),i.attributes)},"getIconSVG"),Vr={},wt={},bl;function N0(){return bl||(bl=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.BLANK_URL=wt.relativeFirstCharacters=wt.whitespaceEscapeCharsRegex=wt.urlSchemeRegex=wt.ctrlCharactersRegex=wt.htmlCtrlEntityRegex=wt.htmlEntitiesRegex=wt.invalidProtocolRegex=void 0,wt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,wt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,wt.htmlCtrlEntityRegex=/&(newline|tab);/gi,wt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,wt.urlSchemeRegex=/^.+(:|&colon;)/gim,wt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,wt.relativeFirstCharacters=[".","/"],wt.BLANK_URL="about:blank"),wt}var Cl;function z0(){if(Cl)return Vr;Cl=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.sanitizeUrl=void 0;var e=N0();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var s=o.replace(e.ctrlCharactersRegex,"");return s.replace(e.htmlEntitiesRegex,function(c,l){return String.fromCharCode(l)})}function i(o){return URL.canParse(o)}function n(o){try{return decodeURIComponent(o)}catch{return o}}function a(o){if(!o)return e.BLANK_URL;var s,c=n(o.trim());do c=r(c).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),c=n(c),s=c.match(e.ctrlCharactersRegex)||c.match(e.htmlEntitiesRegex)||c.match(e.htmlCtrlEntityRegex)||c.match(e.whitespaceEscapeCharsRegex);while(s&&s.length>0);var l=c;if(!l)return e.BLANK_URL;if(t(l))return l;var h=l.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return l;var f=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var d=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return d;if(f==="http:"||f==="https:"){if(!i(d))return e.BLANK_URL;var g=new URL(d);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return d}return Vr.sanitizeUrl=a,Vr}var W0=z0(),q0={value:()=>{}};function Du(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new en(r)}function en(e){this._=e}function H0(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}en.prototype=Du.prototype={constructor:en,on:function(e,t){var r=this._,i=H0(e+"",r),n,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((n=(e=i[a]).type)&&(n=j0(r[n],e.name)))return n;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(n=(e=i[a]).type)r[n]=wl(r[n],e.name,t);else if(t==null)for(n in r)r[n]=wl(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new en(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,a;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,n=a.length;i<n;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,a=i.length;n<a;++n)i[n].value.apply(t,r)}};function j0(e,t){for(var r=0,i=e.length,n;r<i;++r)if((n=e[r]).name===t)return n.value}function wl(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=q0,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var ls="http://www.w3.org/1999/xhtml";const _l={svg:"http://www.w3.org/2000/svg",xhtml:ls,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Xn(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),_l.hasOwnProperty(t)?{space:_l[t],local:e}:e}function Y0(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===ls&&t.documentElement.namespaceURI===ls?t.createElement(e):t.createElementNS(r,e)}}function U0(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ru(e){var t=Xn(e);return(t.local?U0:Y0)(t)}function G0(){}function Vs(e){return e==null?G0:function(){return this.querySelector(e)}}function V0(e){typeof e!="function"&&(e=Vs(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],o=a.length,s=i[n]=new Array(o),c,l,h=0;h<o;++h)(c=a[h])&&(l=e.call(c,c.__data__,h,a))&&("__data__"in c&&(l.__data__=c.__data__),s[h]=l);return new Xt(i,this._parents)}function X0(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Z0(){return[]}function Iu(e){return e==null?Z0:function(){return this.querySelectorAll(e)}}function K0(e){return function(){return X0(e.apply(this,arguments))}}function Q0(e){typeof e=="function"?e=K0(e):e=Iu(e);for(var t=this._groups,r=t.length,i=[],n=[],a=0;a<r;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(i.push(e.call(c,c.__data__,l,o)),n.push(c));return new Xt(i,n)}function Pu(e){return function(){return this.matches(e)}}function Nu(e){return function(t){return t.matches(e)}}var J0=Array.prototype.find;function tx(e){return function(){return J0.call(this.children,e)}}function ex(){return this.firstElementChild}function rx(e){return this.select(e==null?ex:tx(typeof e=="function"?e:Nu(e)))}var ix=Array.prototype.filter;function nx(){return Array.from(this.children)}function ax(e){return function(){return ix.call(this.children,e)}}function sx(e){return this.selectAll(e==null?nx:ax(typeof e=="function"?e:Nu(e)))}function ox(e){typeof e!="function"&&(e=Pu(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],o=a.length,s=i[n]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Xt(i,this._parents)}function zu(e){return new Array(e.length)}function lx(){return new Xt(this._enter||this._groups.map(zu),this._parents)}function kn(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}kn.prototype={constructor:kn,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function cx(e){return function(){return e}}function hx(e,t,r,i,n,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],i[o]=s):r[o]=new kn(e,a[o]);for(;o<c;++o)(s=t[o])&&(n[o]=s)}function ux(e,t,r,i,n,a,o){var s,c,l=new Map,h=t.length,u=a.length,f=new Array(h),d;for(s=0;s<h;++s)(c=t[s])&&(f[s]=d=o.call(c,c.__data__,s,t)+"",l.has(d)?n[s]=c:l.set(d,c));for(s=0;s<u;++s)d=o.call(e,a[s],s,a)+"",(c=l.get(d))?(i[s]=c,c.__data__=a[s],l.delete(d)):r[s]=new kn(e,a[s]);for(s=0;s<h;++s)(c=t[s])&&l.get(f[s])===c&&(n[s]=c)}function fx(e){return e.__data__}function dx(e,t){if(!arguments.length)return Array.from(this,fx);var r=t?ux:hx,i=this._parents,n=this._groups;typeof e!="function"&&(e=cx(e));for(var a=n.length,o=new Array(a),s=new Array(a),c=new Array(a),l=0;l<a;++l){var h=i[l],u=n[l],f=u.length,d=px(e.call(h,h&&h.__data__,l,i)),g=d.length,m=s[l]=new Array(g),y=o[l]=new Array(g),x=c[l]=new Array(f);r(h,u,m,y,x,d,t);for(var b=0,C=0,k,v;b<g;++b)if(k=m[b]){for(b>=C&&(C=b+1);!(v=y[C])&&++C<g;);k._next=v||null}}return o=new Xt(o,i),o._enter=s,o._exit=c,o}function px(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function gx(){return new Xt(this._exit||this._groups.map(zu),this._parents)}function mx(e,t,r){var i=this.enter(),n=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?a.remove():r(a),i&&n?i.merge(n).order():n}function yx(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,a=i.length,o=Math.min(n,a),s=new Array(n),c=0;c<o;++c)for(var l=r[c],h=i[c],u=l.length,f=s[c]=new Array(u),d,g=0;g<u;++g)(d=l[g]||h[g])&&(f[g]=d);for(;c<n;++c)s[c]=r[c];return new Xt(s,this._parents)}function xx(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],n=i.length-1,a=i[n],o;--n>=0;)(o=i[n])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function bx(e){e||(e=Cx);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,n=new Array(i),a=0;a<i;++a){for(var o=r[a],s=o.length,c=n[a]=new Array(s),l,h=0;h<s;++h)(l=o[h])&&(c[h]=l);c.sort(t)}return new Xt(n,this._parents).order()}function Cx(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function wx(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function _x(){return Array.from(this)}function kx(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length;n<a;++n){var o=i[n];if(o)return o}return null}function vx(){let e=0;for(const t of this)++e;return e}function Sx(){return!this.node()}function Tx(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n=t[r],a=0,o=n.length,s;a<o;++a)(s=n[a])&&e.call(s,s.__data__,a,n);return this}function Bx(e){return function(){this.removeAttribute(e)}}function Lx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ax(e,t){return function(){this.setAttribute(e,t)}}function Ex(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Mx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Fx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function Ox(e,t){var r=Xn(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?Lx:Bx:typeof t=="function"?r.local?Fx:Mx:r.local?Ex:Ax)(r,t))}function Wu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function $x(e){return function(){this.style.removeProperty(e)}}function Dx(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Rx(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function Ix(e,t,r){return arguments.length>1?this.each((t==null?$x:typeof t=="function"?Rx:Dx)(e,t,r??"")):Er(this.node(),e)}function Er(e,t){return e.style.getPropertyValue(t)||Wu(e).getComputedStyle(e,null).getPropertyValue(t)}function Px(e){return function(){delete this[e]}}function Nx(e,t){return function(){this[e]=t}}function zx(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Wx(e,t){return arguments.length>1?this.each((t==null?Px:typeof t=="function"?zx:Nx)(e,t)):this.node()[e]}function qu(e){return e.trim().split(/^|\s+/)}function Xs(e){return e.classList||new Hu(e)}function Hu(e){this._node=e,this._names=qu(e.getAttribute("class")||"")}Hu.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function ju(e,t){for(var r=Xs(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function Yu(e,t){for(var r=Xs(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function qx(e){return function(){ju(this,e)}}function Hx(e){return function(){Yu(this,e)}}function jx(e,t){return function(){(t.apply(this,arguments)?ju:Yu)(this,e)}}function Yx(e,t){var r=qu(e+"");if(arguments.length<2){for(var i=Xs(this.node()),n=-1,a=r.length;++n<a;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof t=="function"?jx:t?qx:Hx)(r,t))}function Ux(){this.textContent=""}function Gx(e){return function(){this.textContent=e}}function Vx(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Xx(e){return arguments.length?this.each(e==null?Ux:(typeof e=="function"?Vx:Gx)(e)):this.node().textContent}function Zx(){this.innerHTML=""}function Kx(e){return function(){this.innerHTML=e}}function Qx(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Jx(e){return arguments.length?this.each(e==null?Zx:(typeof e=="function"?Qx:Kx)(e)):this.node().innerHTML}function tb(){this.nextSibling&&this.parentNode.appendChild(this)}function eb(){return this.each(tb)}function rb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ib(){return this.each(rb)}function nb(e){var t=typeof e=="function"?e:Ru(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function ab(){return null}function sb(e,t){var r=typeof e=="function"?e:Ru(e),i=t==null?ab:typeof t=="function"?t:Vs(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function ob(){var e=this.parentNode;e&&e.removeChild(this)}function lb(){return this.each(ob)}function cb(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function hb(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ub(e){return this.select(e?hb:cb)}function fb(e){return arguments.length?this.property("__data__",e):this.node().__data__}function db(e){return function(t){e.call(this,t,this.__data__)}}function pb(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function gb(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,a;r<n;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function mb(e,t,r){return function(){var i=this.__on,n,a=db(t);if(i){for(var o=0,s=i.length;o<s;++o)if((n=i[o]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=a,n.options=r),n.value=t;return}}this.addEventListener(e.type,a,r),n={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(n):this.__on=[n]}}function yb(e,t,r){var i=pb(e+""),n,a=i.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,h;c<l;++c)for(n=0,h=s[c];n<a;++n)if((o=i[n]).type===h.type&&o.name===h.name)return h.value}return}for(s=t?mb:gb,n=0;n<a;++n)this.each(s(i[n],t,r));return this}function Uu(e,t,r){var i=Wu(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function xb(e,t){return function(){return Uu(this,e,t)}}function bb(e,t){return function(){return Uu(this,e,t.apply(this,arguments))}}function Cb(e,t){return this.each((typeof t=="function"?bb:xb)(e,t))}function*wb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length,o;n<a;++n)(o=i[n])&&(yield o)}var Gu=[null];function Xt(e,t){this._groups=e,this._parents=t}function Bi(){return new Xt([[document.documentElement]],Gu)}function _b(){return this}Xt.prototype=Bi.prototype={constructor:Xt,select:V0,selectAll:Q0,selectChild:rx,selectChildren:sx,filter:ox,data:dx,enter:lx,exit:gx,join:mx,merge:yx,selection:_b,order:xx,sort:bx,call:wx,nodes:_x,node:kx,size:vx,empty:Sx,each:Tx,attr:Ox,style:Ix,property:Wx,classed:Yx,text:Xx,html:Jx,raise:eb,lower:ib,append:nb,insert:sb,remove:lb,clone:ub,datum:fb,on:yb,dispatch:Cb,[Symbol.iterator]:wb};function lt(e){return typeof e=="string"?new Xt([[document.querySelector(e)]],[document.documentElement]):new Xt([[e]],Gu)}var kl=180/Math.PI,cs={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Vu(e,t,r,i,n,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*r+t*i)&&(r-=e*c,i-=t*c),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,c/=s),e*i<t*r&&(e=-e,t=-t,c=-c,o=-o),{translateX:n,translateY:a,rotate:Math.atan2(t,e)*kl,skewX:Math.atan(c)*kl,scaleX:o,scaleY:s}}var Wi;function kb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?cs:Vu(t.a,t.b,t.c,t.d,t.e,t.f)}function vb(e){return e==null||(Wi||(Wi=document.createElementNS("http://www.w3.org/2000/svg","g")),Wi.setAttribute("transform",e),!(e=Wi.transform.baseVal.consolidate()))?cs:(e=e.matrix,Vu(e.a,e.b,e.c,e.d,e.e,e.f))}function Xu(e,t,r,i){function n(l){return l.length?l.pop()+" ":""}function a(l,h,u,f,d,g){if(l!==u||h!==f){var m=d.push("translate(",null,t,null,r);g.push({i:m-4,x:Ge(l,u)},{i:m-2,x:Ge(h,f)})}else(u||f)&&d.push("translate("+u+t+f+r)}function o(l,h,u,f){l!==h?(l-h>180?h+=360:h-l>180&&(l+=360),f.push({i:u.push(n(u)+"rotate(",null,i)-2,x:Ge(l,h)})):h&&u.push(n(u)+"rotate("+h+i)}function s(l,h,u,f){l!==h?f.push({i:u.push(n(u)+"skewX(",null,i)-2,x:Ge(l,h)}):h&&u.push(n(u)+"skewX("+h+i)}function c(l,h,u,f,d,g){if(l!==u||h!==f){var m=d.push(n(d)+"scale(",null,",",null,")");g.push({i:m-4,x:Ge(l,u)},{i:m-2,x:Ge(h,f)})}else(u!==1||f!==1)&&d.push(n(d)+"scale("+u+","+f+")")}return function(l,h){var u=[],f=[];return l=e(l),h=e(h),a(l.translateX,l.translateY,h.translateX,h.translateY,u,f),o(l.rotate,h.rotate,u,f),s(l.skewX,h.skewX,u,f),c(l.scaleX,l.scaleY,h.scaleX,h.scaleY,u,f),l=h=null,function(d){for(var g=-1,m=f.length,y;++g<m;)u[(y=f[g]).i]=y.x(d);return u.join("")}}}var Sb=Xu(kb,"px, ","px)","deg)"),Tb=Xu(vb,", ",")",")"),Mr=0,ni=0,Xr=0,Zu=1e3,vn,ai,Sn=0,rr=0,Zn=0,bi=typeof performance=="object"&&performance.now?performance:Date,Ku=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Zs(){return rr||(Ku(Bb),rr=bi.now()+Zn)}function Bb(){rr=0}function Tn(){this._call=this._time=this._next=null}Tn.prototype=Qu.prototype={constructor:Tn,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Zs():+r)+(t==null?0:+t),!this._next&&ai!==this&&(ai?ai._next=this:vn=this,ai=this),this._call=e,this._time=r,hs()},stop:function(){this._call&&(this._call=null,this._time=1/0,hs())}};function Qu(e,t,r){var i=new Tn;return i.restart(e,t,r),i}function Lb(){Zs(),++Mr;for(var e=vn,t;e;)(t=rr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Mr}function vl(){rr=(Sn=bi.now())+Zn,Mr=ni=0;try{Lb()}finally{Mr=0,Eb(),rr=0}}function Ab(){var e=bi.now(),t=e-Sn;t>Zu&&(Zn-=t,Sn=e)}function Eb(){for(var e,t=vn,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:vn=r);ai=e,hs(i)}function hs(e){if(!Mr){ni&&(ni=clearTimeout(ni));var t=e-rr;t>24?(e<1/0&&(ni=setTimeout(vl,e-bi.now()-Zn)),Xr&&(Xr=clearInterval(Xr))):(Xr||(Sn=bi.now(),Xr=setInterval(Ab,Zu)),Mr=1,Ku(vl))}}function Sl(e,t,r){var i=new Tn;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var Mb=Du("start","end","cancel","interrupt"),Fb=[],Ju=0,Tl=1,us=2,rn=3,Bl=4,fs=5,nn=6;function Kn(e,t,r,i,n,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;Ob(e,r,{name:t,index:i,group:n,on:Mb,tween:Fb,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Ju})}function Ks(e,t){var r=se(e,t);if(r.state>Ju)throw new Error("too late; already scheduled");return r}function pe(e,t){var r=se(e,t);if(r.state>rn)throw new Error("too late; already running");return r}function se(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Ob(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=Qu(a,0,r.time);function a(l){r.state=Tl,r.timer.restart(o,r.delay,r.time),r.delay<=l&&o(l-r.delay)}function o(l){var h,u,f,d;if(r.state!==Tl)return c();for(h in i)if(d=i[h],d.name===r.name){if(d.state===rn)return Sl(o);d.state===Bl?(d.state=nn,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[h]):+h<t&&(d.state=nn,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[h])}if(Sl(function(){r.state===rn&&(r.state=Bl,r.timer.restart(s,r.delay,r.time),s(l))}),r.state=us,r.on.call("start",e,e.__data__,r.index,r.group),r.state===us){for(r.state=rn,n=new Array(f=r.tween.length),h=0,u=-1;h<f;++h)(d=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(n[++u]=d);n.length=u+1}}function s(l){for(var h=l<r.duration?r.ease.call(null,l/r.duration):(r.timer.restart(c),r.state=fs,1),u=-1,f=n.length;++u<f;)n[u].call(e,h);r.state===fs&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=nn,r.timer.stop(),delete i[t];for(var l in i)return;delete e.__transition}}function $b(e,t){var r=e.__transition,i,n,a=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){a=!1;continue}n=i.state>us&&i.state<fs,i.state=nn,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function Db(e){return this.each(function(){$b(this,e)})}function Rb(e,t){var r,i;return function(){var n=pe(this,e),a=n.tween;if(a!==r){i=r=a;for(var o=0,s=i.length;o<s;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}n.tween=i}}function Ib(e,t,r){var i,n;if(typeof r!="function")throw new Error;return function(){var a=pe(this,e),o=a.tween;if(o!==i){n=(i=o).slice();for(var s={name:t,value:r},c=0,l=n.length;c<l;++c)if(n[c].name===t){n[c]=s;break}c===l&&n.push(s)}a.tween=n}}function Pb(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=se(this.node(),r).tween,n=0,a=i.length,o;n<a;++n)if((o=i[n]).name===e)return o.value;return null}return this.each((t==null?Rb:Ib)(r,e,t))}function Qs(e,t,r){var i=e._id;return e.each(function(){var n=pe(this,i);(n.value||(n.value={}))[t]=r.apply(this,arguments)}),function(n){return se(n,i).value[t]}}function tf(e,t){var r;return(typeof t=="number"?Ge:t instanceof Ko?Zo:(r=Ko(t))?(t=r,Zo):Eg)(e,t)}function Nb(e){return function(){this.removeAttribute(e)}}function zb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Wb(e,t,r){var i,n=r+"",a;return function(){var o=this.getAttribute(e);return o===n?null:o===i?a:a=t(i=o,r)}}function qb(e,t,r){var i,n=r+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===n?null:o===i?a:a=t(i=o,r)}}function Hb(e,t,r){var i,n,a;return function(){var o,s=r(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+"",o===c?null:o===i&&c===n?a:(n=c,a=t(i=o,s)))}}function jb(e,t,r){var i,n,a;return function(){var o,s=r(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+"",o===c?null:o===i&&c===n?a:(n=c,a=t(i=o,s)))}}function Yb(e,t){var r=Xn(e),i=r==="transform"?Tb:tf;return this.attrTween(e,typeof t=="function"?(r.local?jb:Hb)(r,i,Qs(this,"attr."+e,t)):t==null?(r.local?zb:Nb)(r):(r.local?qb:Wb)(r,i,t))}function Ub(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Gb(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Vb(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Gb(e,a)),r}return n._value=t,n}function Xb(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Ub(e,a)),r}return n._value=t,n}function Zb(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Xn(e);return this.tween(r,(i.local?Vb:Xb)(i,t))}function Kb(e,t){return function(){Ks(this,e).delay=+t.apply(this,arguments)}}function Qb(e,t){return t=+t,function(){Ks(this,e).delay=t}}function Jb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Kb:Qb)(t,e)):se(this.node(),t).delay}function t2(e,t){return function(){pe(this,e).duration=+t.apply(this,arguments)}}function e2(e,t){return t=+t,function(){pe(this,e).duration=t}}function r2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?t2:e2)(t,e)):se(this.node(),t).duration}function i2(e,t){if(typeof t!="function")throw new Error;return function(){pe(this,e).ease=t}}function n2(e){var t=this._id;return arguments.length?this.each(i2(t,e)):se(this.node(),t).ease}function a2(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;pe(this,e).ease=r}}function s2(e){if(typeof e!="function")throw new Error;return this.each(a2(this._id,e))}function o2(e){typeof e!="function"&&(e=Pu(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],o=a.length,s=i[n]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Ee(i,this._parents,this._name,this._id)}function l2(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,n=r.length,a=Math.min(i,n),o=new Array(i),s=0;s<a;++s)for(var c=t[s],l=r[s],h=c.length,u=o[s]=new Array(h),f,d=0;d<h;++d)(f=c[d]||l[d])&&(u[d]=f);for(;s<i;++s)o[s]=t[s];return new Ee(o,this._parents,this._name,this._id)}function c2(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function h2(e,t,r){var i,n,a=c2(t)?Ks:pe;return function(){var o=a(this,e),s=o.on;s!==i&&(n=(i=s).copy()).on(t,r),o.on=n}}function u2(e,t){var r=this._id;return arguments.length<2?se(this.node(),r).on.on(e):this.each(h2(r,e,t))}function f2(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function d2(){return this.on("end.remove",f2(this._id))}function p2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Vs(e));for(var i=this._groups,n=i.length,a=new Array(n),o=0;o<n;++o)for(var s=i[o],c=s.length,l=a[o]=new Array(c),h,u,f=0;f<c;++f)(h=s[f])&&(u=e.call(h,h.__data__,f,s))&&("__data__"in h&&(u.__data__=h.__data__),l[f]=u,Kn(l[f],t,r,f,l,se(h,r)));return new Ee(a,this._parents,t,r)}function g2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Iu(e));for(var i=this._groups,n=i.length,a=[],o=[],s=0;s<n;++s)for(var c=i[s],l=c.length,h,u=0;u<l;++u)if(h=c[u]){for(var f=e.call(h,h.__data__,u,c),d,g=se(h,r),m=0,y=f.length;m<y;++m)(d=f[m])&&Kn(d,t,r,m,f,g);a.push(f),o.push(h)}return new Ee(a,o,t,r)}var m2=Bi.prototype.constructor;function y2(){return new m2(this._groups,this._parents)}function x2(e,t){var r,i,n;return function(){var a=Er(this,e),o=(this.style.removeProperty(e),Er(this,e));return a===o?null:a===r&&o===i?n:n=t(r=a,i=o)}}function ef(e){return function(){this.style.removeProperty(e)}}function b2(e,t,r){var i,n=r+"",a;return function(){var o=Er(this,e);return o===n?null:o===i?a:a=t(i=o,r)}}function C2(e,t,r){var i,n,a;return function(){var o=Er(this,e),s=r(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),Er(this,e))),o===c?null:o===i&&c===n?a:(n=c,a=t(i=o,s))}}function w2(e,t){var r,i,n,a="style."+t,o="end."+a,s;return function(){var c=pe(this,e),l=c.on,h=c.value[a]==null?s||(s=ef(t)):void 0;(l!==r||n!==h)&&(i=(r=l).copy()).on(o,n=h),c.on=i}}function _2(e,t,r){var i=(e+="")=="transform"?Sb:tf;return t==null?this.styleTween(e,x2(e,i)).on("end.style."+e,ef(e)):typeof t=="function"?this.styleTween(e,C2(e,i,Qs(this,"style."+e,t))).each(w2(this._id,e)):this.styleTween(e,b2(e,i,t),r).on("end.style."+e,null)}function k2(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function v2(e,t,r){var i,n;function a(){var o=t.apply(this,arguments);return o!==n&&(i=(n=o)&&k2(e,o,r)),i}return a._value=t,a}function S2(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,v2(e,t,r??""))}function T2(e){return function(){this.textContent=e}}function B2(e){return function(){var t=e(this);this.textContent=t??""}}function L2(e){return this.tween("text",typeof e=="function"?B2(Qs(this,"text",e)):T2(e==null?"":e+""))}function A2(e){return function(t){this.textContent=e.call(this,t)}}function E2(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&A2(n)),t}return i._value=e,i}function M2(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,E2(e))}function F2(){for(var e=this._name,t=this._id,r=rf(),i=this._groups,n=i.length,a=0;a<n;++a)for(var o=i[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var h=se(c,t);Kn(c,e,r,l,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Ee(i,this._parents,e,r)}function O2(){var e,t,r=this,i=r._id,n=r.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--n===0&&a()}};r.each(function(){var l=pe(this,i),h=l.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),l.on=t}),n===0&&a()})}var $2=0;function Ee(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function rf(){return++$2}var _e=Bi.prototype;Ee.prototype={constructor:Ee,select:p2,selectAll:g2,selectChild:_e.selectChild,selectChildren:_e.selectChildren,filter:o2,merge:l2,selection:y2,transition:F2,call:_e.call,nodes:_e.nodes,node:_e.node,size:_e.size,empty:_e.empty,each:_e.each,on:u2,attr:Yb,attrTween:Zb,style:_2,styleTween:S2,text:L2,textTween:M2,remove:d2,tween:Pb,delay:Jb,duration:r2,ease:n2,easeVarying:s2,end:O2,[Symbol.iterator]:_e[Symbol.iterator]};function D2(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var R2={time:null,delay:0,duration:250,ease:D2};function I2(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function P2(e){var t,r;e instanceof Ee?(t=e._id,e=e._name):(t=rf(),(r=R2).time=Zs(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,a=0;a<n;++a)for(var o=i[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&Kn(c,e,t,l,o,r||I2(c,t));return new Ee(i,this._parents,e,t)}Bi.prototype.interrupt=Db;Bi.prototype.transition=P2;function nf(e,t){this._basis=new xc(e),this._beta=t}nf.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],n=t[0],a=e[r]-i,o=t[r]-n,s=-1,c;++s<=r;)c=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(i+c*a),this._beta*t[s]+(1-this._beta)*(n+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const N2=function e(t){function r(i){return t===1?new xc(i):new nf(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function Bn(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Js(e,t){this._context=e,this._k=(1-t)/6}Js.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Bn(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Bn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const af=function e(t){function r(i){return new Js(i,t)}return r.tension=function(i){return e(+i)},r}(0);function to(e,t){this._context=e,this._k=(1-t)/6}to.prototype={areaStart:un,areaEnd:un,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Bn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const z2=function e(t){function r(i){return new to(i,t)}return r.tension=function(i){return e(+i)},r}(0);function eo(e,t){this._context=e,this._k=(1-t)/6}eo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Bn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const W2=function e(t){function r(i){return new eo(i,t)}return r.tension=function(i){return e(+i)},r}(0);function ro(e,t,r){var i=e._x1,n=e._y1,a=e._x2,o=e._y2;if(e._l01_a>Qo){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,n=(n*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>Qo){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*l+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,n,a,o,e._x2,e._y2)}function sf(e,t){this._context=e,this._alpha=t}sf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:ro(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const of=function e(t){function r(i){return t?new sf(i,t):new Js(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function lf(e,t){this._context=e,this._alpha=t}lf.prototype={areaStart:un,areaEnd:un,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ro(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const q2=function e(t){function r(i){return t?new lf(i,t):new to(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function cf(e,t){this._context=e,this._alpha=t}cf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ro(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const H2=function e(t){function r(i){return t?new cf(i,t):new eo(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function si(e,t,r){this.k=e,this.x=t,this.y=r}si.prototype={constructor:si,scale:function(e){return e===1?this:new si(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new si(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};si.prototype;var hf=typeof global=="object"&&global&&global.Object===Object&&global,j2=typeof self=="object"&&self&&self.Object===Object&&self,ge=hf||j2||Function("return this")(),Ln=ge.Symbol,uf=Object.prototype,Y2=uf.hasOwnProperty,U2=uf.toString,Zr=Ln?Ln.toStringTag:void 0;function G2(e){var t=Y2.call(e,Zr),r=e[Zr];try{e[Zr]=void 0;var i=!0}catch{}var n=U2.call(e);return i&&(t?e[Zr]=r:delete e[Zr]),n}var V2=Object.prototype,X2=V2.toString;function Z2(e){return X2.call(e)}var K2="[object Null]",Q2="[object Undefined]",Ll=Ln?Ln.toStringTag:void 0;function Dr(e){return e==null?e===void 0?Q2:K2:Ll&&Ll in Object(e)?G2(e):Z2(e)}function sr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var J2="[object AsyncFunction]",t1="[object Function]",e1="[object GeneratorFunction]",r1="[object Proxy]";function io(e){if(!sr(e))return!1;var t=Dr(e);return t==t1||t==e1||t==J2||t==r1}var Aa=ge["__core-js_shared__"],Al=function(){var e=/[^.]+$/.exec(Aa&&Aa.keys&&Aa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function i1(e){return!!Al&&Al in e}var n1=Function.prototype,a1=n1.toString;function or(e){if(e!=null){try{return a1.call(e)}catch{}try{return e+""}catch{}}return""}var s1=/[\\^$.*+?()[\]{}|]/g,o1=/^\[object .+?Constructor\]$/,l1=Function.prototype,c1=Object.prototype,h1=l1.toString,u1=c1.hasOwnProperty,f1=RegExp("^"+h1.call(u1).replace(s1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d1(e){if(!sr(e)||i1(e))return!1;var t=io(e)?f1:o1;return t.test(or(e))}function p1(e,t){return e?.[t]}function lr(e,t){var r=p1(e,t);return d1(r)?r:void 0}var Ci=lr(Object,"create");function g1(){this.__data__=Ci?Ci(null):{},this.size=0}function m1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var y1="__lodash_hash_undefined__",x1=Object.prototype,b1=x1.hasOwnProperty;function C1(e){var t=this.__data__;if(Ci){var r=t[e];return r===y1?void 0:r}return b1.call(t,e)?t[e]:void 0}var w1=Object.prototype,_1=w1.hasOwnProperty;function k1(e){var t=this.__data__;return Ci?t[e]!==void 0:_1.call(t,e)}var v1="__lodash_hash_undefined__";function S1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ci&&t===void 0?v1:t,this}function ir(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}ir.prototype.clear=g1;ir.prototype.delete=m1;ir.prototype.get=C1;ir.prototype.has=k1;ir.prototype.set=S1;function T1(){this.__data__=[],this.size=0}function Qn(e,t){return e===t||e!==e&&t!==t}function Jn(e,t){for(var r=e.length;r--;)if(Qn(e[r][0],t))return r;return-1}var B1=Array.prototype,L1=B1.splice;function A1(e){var t=this.__data__,r=Jn(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():L1.call(t,r,1),--this.size,!0}function E1(e){var t=this.__data__,r=Jn(t,e);return r<0?void 0:t[r][1]}function M1(e){return Jn(this.__data__,e)>-1}function F1(e,t){var r=this.__data__,i=Jn(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Oe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Oe.prototype.clear=T1;Oe.prototype.delete=A1;Oe.prototype.get=E1;Oe.prototype.has=M1;Oe.prototype.set=F1;var wi=lr(ge,"Map");function O1(){this.size=0,this.__data__={hash:new ir,map:new(wi||Oe),string:new ir}}function $1(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ta(e,t){var r=e.__data__;return $1(t)?r[typeof t=="string"?"string":"hash"]:r.map}function D1(e){var t=ta(this,e).delete(e);return this.size-=t?1:0,t}function R1(e){return ta(this,e).get(e)}function I1(e){return ta(this,e).has(e)}function P1(e,t){var r=ta(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function He(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}He.prototype.clear=O1;He.prototype.delete=D1;He.prototype.get=R1;He.prototype.has=I1;He.prototype.set=P1;var N1="Expected a function";function Li(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(N1);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var o=e.apply(this,i);return r.cache=a.set(n,o)||a,o};return r.cache=new(Li.Cache||He),r}Li.Cache=He;function z1(){this.__data__=new Oe,this.size=0}function W1(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function q1(e){return this.__data__.get(e)}function H1(e){return this.__data__.has(e)}var j1=200;function Y1(e,t){var r=this.__data__;if(r instanceof Oe){var i=r.__data__;if(!wi||i.length<j1-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new He(i)}return r.set(e,t),this.size=r.size,this}function Rr(e){var t=this.__data__=new Oe(e);this.size=t.size}Rr.prototype.clear=z1;Rr.prototype.delete=W1;Rr.prototype.get=q1;Rr.prototype.has=H1;Rr.prototype.set=Y1;var An=function(){try{var e=lr(Object,"defineProperty");return e({},"",{}),e}catch{}}();function no(e,t,r){t=="__proto__"&&An?An(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function ds(e,t,r){(r!==void 0&&!Qn(e[t],r)||r===void 0&&!(t in e))&&no(e,t,r)}function U1(e){return function(t,r,i){for(var n=-1,a=Object(t),o=i(t),s=o.length;s--;){var c=o[++n];if(r(a[c],c,a)===!1)break}return t}}var G1=U1(),ff=typeof exports=="object"&&exports&&!exports.nodeType&&exports,El=ff&&typeof module=="object"&&module&&!module.nodeType&&module,V1=El&&El.exports===ff,Ml=V1?ge.Buffer:void 0,Fl=Ml?Ml.allocUnsafe:void 0;function X1(e,t){if(t)return e.slice();var r=e.length,i=Fl?Fl(r):new e.constructor(r);return e.copy(i),i}var Ol=ge.Uint8Array;function Z1(e){var t=new e.constructor(e.byteLength);return new Ol(t).set(new Ol(e)),t}function K1(e,t){var r=t?Z1(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Q1(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var $l=Object.create,J1=function(){function e(){}return function(t){if(!sr(t))return{};if($l)return $l(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function df(e,t){return function(r){return e(t(r))}}var pf=df(Object.getPrototypeOf,Object),tC=Object.prototype;function ea(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||tC;return e===r}function eC(e){return typeof e.constructor=="function"&&!ea(e)?J1(pf(e)):{}}function Ai(e){return e!=null&&typeof e=="object"}var rC="[object Arguments]";function Dl(e){return Ai(e)&&Dr(e)==rC}var gf=Object.prototype,iC=gf.hasOwnProperty,nC=gf.propertyIsEnumerable,En=Dl(function(){return arguments}())?Dl:function(e){return Ai(e)&&iC.call(e,"callee")&&!nC.call(e,"callee")},Mn=Array.isArray,aC=9007199254740991;function mf(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=aC}function ra(e){return e!=null&&mf(e.length)&&!io(e)}function sC(e){return Ai(e)&&ra(e)}function oC(){return!1}var yf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Rl=yf&&typeof module=="object"&&module&&!module.nodeType&&module,lC=Rl&&Rl.exports===yf,Il=lC?ge.Buffer:void 0,cC=Il?Il.isBuffer:void 0,ao=cC||oC,hC="[object Object]",uC=Function.prototype,fC=Object.prototype,xf=uC.toString,dC=fC.hasOwnProperty,pC=xf.call(Object);function gC(e){if(!Ai(e)||Dr(e)!=hC)return!1;var t=pf(e);if(t===null)return!0;var r=dC.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&xf.call(r)==pC}var mC="[object Arguments]",yC="[object Array]",xC="[object Boolean]",bC="[object Date]",CC="[object Error]",wC="[object Function]",_C="[object Map]",kC="[object Number]",vC="[object Object]",SC="[object RegExp]",TC="[object Set]",BC="[object String]",LC="[object WeakMap]",AC="[object ArrayBuffer]",EC="[object DataView]",MC="[object Float32Array]",FC="[object Float64Array]",OC="[object Int8Array]",$C="[object Int16Array]",DC="[object Int32Array]",RC="[object Uint8Array]",IC="[object Uint8ClampedArray]",PC="[object Uint16Array]",NC="[object Uint32Array]",gt={};gt[MC]=gt[FC]=gt[OC]=gt[$C]=gt[DC]=gt[RC]=gt[IC]=gt[PC]=gt[NC]=!0;gt[mC]=gt[yC]=gt[AC]=gt[xC]=gt[EC]=gt[bC]=gt[CC]=gt[wC]=gt[_C]=gt[kC]=gt[vC]=gt[SC]=gt[TC]=gt[BC]=gt[LC]=!1;function zC(e){return Ai(e)&&mf(e.length)&&!!gt[Dr(e)]}function WC(e){return function(t){return e(t)}}var bf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,di=bf&&typeof module=="object"&&module&&!module.nodeType&&module,qC=di&&di.exports===bf,Ea=qC&&hf.process,Pl=function(){try{var e=di&&di.require&&di.require("util").types;return e||Ea&&Ea.binding&&Ea.binding("util")}catch{}}(),Nl=Pl&&Pl.isTypedArray,so=Nl?WC(Nl):zC;function ps(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var HC=Object.prototype,jC=HC.hasOwnProperty;function YC(e,t,r){var i=e[t];(!(jC.call(e,t)&&Qn(i,r))||r===void 0&&!(t in e))&&no(e,t,r)}function UC(e,t,r,i){var n=!r;r||(r={});for(var a=-1,o=t.length;++a<o;){var s=t[a],c=void 0;c===void 0&&(c=e[s]),n?no(r,s,c):YC(r,s,c)}return r}function GC(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var VC=9007199254740991,XC=/^(?:0|[1-9]\d*)$/;function Cf(e,t){var r=typeof e;return t=t??VC,!!t&&(r=="number"||r!="symbol"&&XC.test(e))&&e>-1&&e%1==0&&e<t}var ZC=Object.prototype,KC=ZC.hasOwnProperty;function QC(e,t){var r=Mn(e),i=!r&&En(e),n=!r&&!i&&ao(e),a=!r&&!i&&!n&&so(e),o=r||i||n||a,s=o?GC(e.length,String):[],c=s.length;for(var l in e)(t||KC.call(e,l))&&!(o&&(l=="length"||n&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Cf(l,c)))&&s.push(l);return s}function JC(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var tw=Object.prototype,ew=tw.hasOwnProperty;function rw(e){if(!sr(e))return JC(e);var t=ea(e),r=[];for(var i in e)i=="constructor"&&(t||!ew.call(e,i))||r.push(i);return r}function wf(e){return ra(e)?QC(e,!0):rw(e)}function iw(e){return UC(e,wf(e))}function nw(e,t,r,i,n,a,o){var s=ps(e,r),c=ps(t,r),l=o.get(c);if(l){ds(e,r,l);return}var h=a?a(s,c,r+"",e,t,o):void 0,u=h===void 0;if(u){var f=Mn(c),d=!f&&ao(c),g=!f&&!d&&so(c);h=c,f||d||g?Mn(s)?h=s:sC(s)?h=Q1(s):d?(u=!1,h=X1(c,!0)):g?(u=!1,h=K1(c,!0)):h=[]:gC(c)||En(c)?(h=s,En(s)?h=iw(s):(!sr(s)||io(s))&&(h=eC(c))):u=!1}u&&(o.set(c,h),n(h,c,i,a,o),o.delete(c)),ds(e,r,h)}function _f(e,t,r,i,n){e!==t&&G1(t,function(a,o){if(n||(n=new Rr),sr(a))nw(e,t,o,r,_f,i,n);else{var s=i?i(ps(e,o),a,o+"",e,t,n):void 0;s===void 0&&(s=a),ds(e,o,s)}},wf)}function kf(e){return e}function aw(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var zl=Math.max;function sw(e,t,r){return t=zl(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,a=zl(i.length-t,0),o=Array(a);++n<a;)o[n]=i[t+n];n=-1;for(var s=Array(t+1);++n<t;)s[n]=i[n];return s[t]=r(o),aw(e,this,s)}}function ow(e){return function(){return e}}var lw=An?function(e,t){return An(e,"toString",{configurable:!0,enumerable:!1,value:ow(t),writable:!0})}:kf,cw=800,hw=16,uw=Date.now;function fw(e){var t=0,r=0;return function(){var i=uw(),n=hw-(i-r);if(r=i,n>0){if(++t>=cw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var dw=fw(lw);function pw(e,t){return dw(sw(e,t,kf),e+"")}function gw(e,t,r){if(!sr(r))return!1;var i=typeof t;return(i=="number"?ra(r)&&Cf(t,r.length):i=="string"&&t in r)?Qn(r[t],e):!1}function mw(e){return pw(function(t,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,o=n>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(n--,a):void 0,o&&gw(r[0],r[1],o)&&(a=n<3?void 0:a,n=1),t=Object(t);++i<n;){var s=r[i];s&&e(t,s,i,a)}return t})}var yw=mw(function(e,t,r){_f(e,t,r)}),xw="​",bw={curveBasis:Vi,curveBasisClosed:Og,curveBasisOpen:Fg,curveBumpX:Tc,curveBumpY:Sc,curveBundle:N2,curveCardinalClosed:z2,curveCardinalOpen:W2,curveCardinal:af,curveCatmullRomClosed:q2,curveCatmullRomOpen:H2,curveCatmullRom:of,curveLinear:Na,curveLinearClosed:Mg,curveMonotoneX:vc,curveMonotoneY:kc,curveNatural:_c,curveStep:wc,curveStepAfter:Cc,curveStepBefore:bc},Cw=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ww=p(function(e,t){const r=vf(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(s=>s.args);fn(o),i=Lt(i,[...o])}else i=r.args;if(!i)return;let n=Os(e,t);const a="config";return i[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[a],delete i[a]),i},"detectInit"),vf=p(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${Cw.source})(?=[}][%]{2}).*
117
+ `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),O.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const n=[];for(;(i=ui.exec(e))!==null;)if(i.index===ui.lastIndex&&ui.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const a=i[1]?i[1]:i[2],o=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:a,args:o})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(r){return O.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),_w=p(function(e){return e.replace(ui,"")},"removeDirectives"),kw=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function oo(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return bw[r]??t}p(oo,"interpolateToCurve");function Sf(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?W0.sanitizeUrl(r):r}p(Sf,"formatUrl");var vw=p((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){O.error(`Function name: ${e} not found in window`);return}a[n](...t)},"runFunc");function lo(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(lo,"distance");function Tf(e){let t,r=0;e.forEach(n=>{r+=lo(n,t),t=n});const i=r/2;return co(e,i)}p(Tf,"traverseEdge");function Bf(e){return e.length===1?e[0]:Tf(e)}p(Bf,"calcLabelPosition");var Wl=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),co=p((e,t)=>{let r,i=t;for(const n of e){if(r){const a=lo(n,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:n.x,y:n.y};if(o>0&&o<1)return{x:Wl((1-o)*r.x+o*n.x,5),y:Wl((1-o)*r.y+o*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Sw=p((e,t,r)=>{O.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=co(t,25),a=e?10:5,o=Math.atan2(t[0].y-n.y,t[0].x-n.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(t[0].x+n.x)/2,s.y=-Math.cos(o)*a+(t[0].y+n.y)/2,s},"calcCardinalityPosition");function Lf(e,t,r){const i=structuredClone(r);O.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,a=co(i,n),o=10+e*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),c={x:0,y:0};return t==="start_left"?(c.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(c.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(c.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(c.x=Math.sin(s)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2),c}p(Lf,"calcTerminalLabelPosition");function Af(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(Af,"getStylesFromArray");var ql=0,Tw=p(()=>(ql++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ql),"generateId");function Ef(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;n<e;n++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(Ef,"makeRandomHex");var Bw=p(e=>Ef(e.length),"random"),Lw=p(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"),Aw=p(function(e,t){const r=t.text.replace($r.lineBreakRegex," "),[,i]=ia(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const a=n.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),n},"drawSimpleText"),Ew=Li((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),$r.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let a="";return i.forEach((o,s)=>{const c=Me(`${o} `,r),l=Me(a,r);if(c>t){const{hyphenatedStrings:f,remainingWord:d}=Mw(o,t,"-",r);n.push(a,...f),a=d}else l+c>=t?(n.push(a),a=o):a=[a,o].filter(Boolean).join(" ");s+1===i.length&&n.push(a)}),n.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Mw=Li((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],a=[];let o="";return n.forEach((s,c)=>{const l=`${o}${s}`;if(Me(l,i)>=t){const u=c+1,f=n.length===u,d=`${l}${r}`;a.push(f?l:d),o=""}else o=l}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Mf(e,t){return ho(e,t).height}p(Mf,"calculateTextHeight");function Me(e,t){return ho(e,t).width}p(Me,"calculateTextWidth");var ho=Li((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,a]=ia(r),o=["sans-serif",i],s=e.split($r.lineBreakRegex),c=[],l=lt("body");if(!l.remove)return{width:0,height:0,lineHeight:0};const h=l.append("svg");for(const f of o){let d=0;const g={width:0,height:0,lineHeight:0};for(const m of s){const y=Lw();y.text=m||xw;const x=Aw(h,y).style("font-size",a).style("font-weight",n).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),d=Math.round(b.height),g.height+=d,g.lineHeight=Math.round(Math.max(g.lineHeight,d))}c.push(g)}h.remove();const u=isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1;return c[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Fw=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{p(this,"InitIDGenerator")}},qi,Ow=p(function(e){return qi=qi||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),qi.innerHTML=e,unescape(qi.textContent)},"entityDecode");function uo(e){return"str"in e}p(uo,"isDetailedError");var $w=p((e,t,r,i)=>{if(!i)return;const n=e.node()?.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),ia=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function fo(e,t){return yw({},e,t)}p(fo,"cleanAndMerge");var ue={assignWithDepth:Lt,wrapLabel:Ew,calculateTextHeight:Mf,calculateTextWidth:Me,calculateTextDimensions:ho,cleanAndMerge:fo,detectInit:ww,detectDirective:vf,isSubstringInArray:kw,interpolateToCurve:oo,calcLabelPosition:Bf,calcCardinalityPosition:Sw,calcTerminalLabelPosition:Lf,formatUrl:Sf,getStylesFromArray:Af,generateId:Tw,random:Bw,runFunc:vw,entityDecode:Ow,insertTitle:$w,parseFontSize:ia,InitIDGenerator:Fw},Dw=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),cr=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),tB=p((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function Nt(e){return e??null}p(Nt,"handleUndefinedAttr");function po(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var hr=po();function Ff(e){hr=e}var pi={exec:()=>null};function ft(e,t=""){let r=typeof e=="string"?e:e.source;const i={replace:(n,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(Pt.caret,"$1"),r=r.replace(n,o),i},getRegex:()=>new RegExp(r,t)};return i}var Pt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Rw=/^(?:[ \t]*(?:\n|$))+/,Iw=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Pw=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ei=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Nw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,go=/(?:[*+-]|\d{1,9}[.)])/,Of=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,$f=ft(Of).replace(/bull/g,go).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(),zw=ft(Of).replace(/bull/g,go).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(),mo=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ww=/^[^\n]+/,yo=/(?!\s*\])(?:\\.|[^\[\]\\])+/,qw=ft(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",yo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Hw=ft(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,go).getRegex(),na="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",xo=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,jw=ft("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",xo).replace("tag",na).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Df=ft(mo).replace("hr",Ei).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",na).getRegex(),Yw=ft(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Df).getRegex(),bo={blockquote:Yw,code:Iw,def:qw,fences:Pw,heading:Nw,hr:Ei,html:jw,lheading:$f,list:Hw,newline:Rw,paragraph:Df,table:pi,text:Ww},Hl=ft("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ei).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",na).getRegex(),Uw={...bo,lheading:zw,table:Hl,paragraph:ft(mo).replace("hr",Ei).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Hl).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",na).getRegex()},Gw={...bo,html:ft(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",xo).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:pi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ft(mo).replace("hr",Ei).replace("heading",` *#{1,6} *[^
118
+ ]`).replace("lheading",$f).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Vw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Xw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Rf=/^( {2,}|\\)\n(?!\s*$)/,Zw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,aa=/[\p{P}\p{S}]/u,Co=/[\s\p{P}\p{S}]/u,If=/[^\s\p{P}\p{S}]/u,Kw=ft(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Co).getRegex(),Pf=/(?!~)[\p{P}\p{S}]/u,Qw=/(?!~)[\s\p{P}\p{S}]/u,Jw=/(?:[^\s\p{P}\p{S}]|~)/u,t_=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Nf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,e_=ft(Nf,"u").replace(/punct/g,aa).getRegex(),r_=ft(Nf,"u").replace(/punct/g,Pf).getRegex(),zf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",i_=ft(zf,"gu").replace(/notPunctSpace/g,If).replace(/punctSpace/g,Co).replace(/punct/g,aa).getRegex(),n_=ft(zf,"gu").replace(/notPunctSpace/g,Jw).replace(/punctSpace/g,Qw).replace(/punct/g,Pf).getRegex(),a_=ft("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,If).replace(/punctSpace/g,Co).replace(/punct/g,aa).getRegex(),s_=ft(/\\(punct)/,"gu").replace(/punct/g,aa).getRegex(),o_=ft(/^<(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(),l_=ft(xo).replace("(?:-->|$)","-->").getRegex(),c_=ft("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",l_).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Fn=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,h_=ft(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Fn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Wf=ft(/^!?\[(label)\]\[(ref)\]/).replace("label",Fn).replace("ref",yo).getRegex(),qf=ft(/^!?\[(ref)\](?:\[\])?/).replace("ref",yo).getRegex(),u_=ft("reflink|nolink(?!\\()","g").replace("reflink",Wf).replace("nolink",qf).getRegex(),wo={_backpedal:pi,anyPunctuation:s_,autolink:o_,blockSkip:t_,br:Rf,code:Xw,del:pi,emStrongLDelim:e_,emStrongRDelimAst:i_,emStrongRDelimUnd:a_,escape:Vw,link:h_,nolink:qf,punctuation:Kw,reflink:Wf,reflinkSearch:u_,tag:c_,text:Zw,url:pi},f_={...wo,link:ft(/^!?\[(label)\]\((.*?)\)/).replace("label",Fn).getRegex(),reflink:ft(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Fn).getRegex()},gs={...wo,emStrongRDelimAst:n_,emStrongLDelim:r_,url:ft(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},d_={...gs,br:ft(Rf).replace("{2,}","*").getRegex(),text:ft(gs.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Hi={normal:bo,gfm:Uw,pedantic:Gw},Kr={normal:wo,gfm:gs,breaks:d_,pedantic:f_},p_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},jl=e=>p_[e];function le(e,t){if(t){if(Pt.escapeTest.test(e))return e.replace(Pt.escapeReplace,jl)}else if(Pt.escapeTestNoEncode.test(e))return e.replace(Pt.escapeReplaceNoEncode,jl);return e}function Yl(e){try{e=encodeURI(e).replace(Pt.percentDecode,"%")}catch{return null}return e}function Ul(e,t){const r=e.replace(Pt.findPipe,(a,o,s)=>{let c=!1,l=o;for(;--l>=0&&s[l]==="\\";)c=!c;return c?"|":" |"}),i=r.split(Pt.splitPipe);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(Pt.slashPipe,"|");return i}function Qr(e,t,r){const i=e.length;if(i===0)return"";let n=0;for(;n<i&&e.charAt(i-n-1)===t;)n++;return e.slice(0,i-n)}function g_(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function Gl(e,t,r,i,n){const a=t.href,o=t.title||null,s=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;const c={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,c}function m_(e,t,r){const i=e.match(r.other.indentCodeCompensation);if(i===null)return t;const n=i[1];return t.split(`
119
+ `).map(a=>{const o=a.match(r.other.beginningSpace);if(o===null)return a;const[s]=o;return s.length>=n.length?a.slice(n.length):a}).join(`
120
+ `)}var On=class{options;rules;lexer;constructor(e){this.options=e||hr}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Qr(r,`
121
+ `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const r=t[0],i=m_(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){const i=Qr(r,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(r=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Qr(t[0],`
122
+ `)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let r=Qr(t[0],`
123
+ `).split(`
124
+ `),i="",n="";const a=[];for(;r.length>0;){let o=!1;const s=[];let c;for(c=0;c<r.length;c++)if(this.rules.other.blockquoteStart.test(r[c]))s.push(r[c]),o=!0;else if(!o)s.push(r[c]);else break;r=r.slice(c);const l=s.join(`
125
+ `),h=l.replace(this.rules.other.blockquoteSetextReplace,`
126
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
127
+ ${l}`:l,n=n?`${n}
128
+ ${h}`:h;const u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,a,!0),this.lexer.state.top=u,r.length===0)break;const f=a.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){const d=f,g=d.raw+`
129
+ `+r.join(`
130
+ `),m=this.blockquote(g);a[a.length-1]=m,i=i.substring(0,i.length-d.raw.length)+m.raw,n=n.substring(0,n.length-d.text.length)+m.text;break}else if(f?.type==="list"){const d=f,g=d.raw+`
131
+ `+r.join(`
132
+ `),m=this.list(g);a[a.length-1]=m,i=i.substring(0,i.length-f.raw.length)+m.raw,n=n.substring(0,n.length-d.raw.length)+m.raw,r=g.substring(a.at(-1).raw.length).split(`
133
+ `);continue}}return{type:"blockquote",raw:i,tokens:a,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const i=r.length>1,n={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");const a=this.rules.other.listItemRegex(r);let o=!1;for(;e;){let c=!1,l="",h="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;l=t[0],e=e.substring(l.length);let u=t[2].split(`
134
+ `,1)[0].replace(this.rules.other.listReplaceTabs,x=>" ".repeat(3*x.length)),f=e.split(`
135
+ `,1)[0],d=!u.trim(),g=0;if(this.options.pedantic?(g=2,h=u.trimStart()):d?g=t[1].length+1:(g=t[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,h=u.slice(g),g+=t[1].length),d&&this.rules.other.blankLine.test(f)&&(l+=f+`
136
+ `,e=e.substring(f.length+1),c=!0),!c){const x=this.rules.other.nextBulletRegex(g),b=this.rules.other.hrRegex(g),C=this.rules.other.fencesBeginRegex(g),k=this.rules.other.headingBeginRegex(g),v=this.rules.other.htmlBeginRegex(g);for(;e;){const B=e.split(`
137
+ `,1)[0];let S;if(f=B,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),S=f):S=f.replace(this.rules.other.tabCharGlobal," "),C.test(f)||k.test(f)||v.test(f)||x.test(f)||b.test(f))break;if(S.search(this.rules.other.nonSpaceChar)>=g||!f.trim())h+=`
138
+ `+S.slice(g);else{if(d||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(u)||k.test(u)||b.test(u))break;h+=`
139
+ `+f}!d&&!f.trim()&&(d=!0),l+=B+`
140
+ `,e=e.substring(B.length+1),u=S.slice(g)}}n.loose||(o?n.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(o=!0));let m=null,y;this.options.gfm&&(m=this.rules.other.listIsTask.exec(h),m&&(y=m[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:l,task:!!m,checked:y,loose:!1,text:h,tokens:[]}),n.raw+=l}const s=n.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let c=0;c<n.items.length;c++)if(this.lexer.state.top=!1,n.items[c].tokens=this.lexer.blockTokens(n.items[c].text,[]),!n.loose){const l=n.items[c].tokens.filter(u=>u.type==="space"),h=l.length>0&&l.some(u=>this.rules.other.anyLine.test(u.raw));n.loose=h}if(n.loose)for(let c=0;c<n.items.length;c++)n.items[c].loose=!0;return n}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:i,title:n}}}table(e){const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const r=Ul(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
141
+ `):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===i.length){for(const o of i)this.rules.other.tableAlignRight.test(o)?a.align.push("right"):this.rules.other.tableAlignCenter.test(o)?a.align.push("center"):this.rules.other.tableAlignLeft.test(o)?a.align.push("left"):a.align.push(null);for(let o=0;o<r.length;o++)a.header.push({text:r[o],tokens:this.lexer.inline(r[o]),header:!0,align:a.align[o]});for(const o of n)a.rows.push(Ul(o,a.header.length).map((s,c)=>({text:s,tokens:this.lexer.inline(s),header:!1,align:a.align[c]})));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const r=t[1].charAt(t[1].length-1)===`
142
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const a=Qr(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=g_(t[2],"()");if(a===-2)return;if(a>-1){const s=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let i=t[2],n="";if(this.options.pedantic){const a=this.rules.other.pedanticHrefTitle.exec(i);a&&(i=a[1],n=a[3])}else n=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i=i.slice(1):i=i.slice(1,-1)),Gl(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){const i=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=t[i.toLowerCase()];if(!n){const a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return Gl(r,n,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(i[1]||i[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const a=[...i[0]].length-1;let o,s,c=a,l=0;const h=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+a);(i=h.exec(t))!=null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(s=[...o].length,i[3]||i[4]){c+=s;continue}else if((i[5]||i[6])&&a%3&&!((a+s)%3)){l+=s;continue}if(c-=s,c>0)continue;s=Math.min(s,s+c+l);const u=[...i[0]][0].length,f=e.slice(0,a+i.index+u+s);if(Math.min(a,s)%2){const g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}const d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," ");const i=this.rules.other.nonSpaceChar.test(r),n=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&n&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let r,i;return t[2]==="@"?(r=t[1],i="mailto:"+r):(r=t[1],i=r),{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let r,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let n;do n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(n!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},Te=class ms{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||hr,this.options.tokenizer=this.options.tokenizer||new On,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 r={other:Pt,block:Hi.normal,inline:Kr.normal};this.options.pedantic?(r.block=Hi.pedantic,r.inline=Kr.pedantic):this.options.gfm&&(r.block=Hi.gfm,this.options.breaks?r.inline=Kr.breaks:r.inline=Kr.gfm),this.tokenizer.rules=r}static get rules(){return{block:Hi,inline:Kr}}static lex(t,r){return new ms(r).lex(t)}static lexInline(t,r){return new ms(r).inlineTokens(t)}lex(t){t=t.replace(Pt.carriageReturn,`
143
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(Pt.tabCharGlobal," ").replace(Pt.spaceLine,""));t;){let n;if(this.options.extensions?.block?.some(o=>(n=o.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);const o=r.at(-1);n.raw.length===1&&o!==void 0?o.raw+=`
144
+ `:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);const o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=`
145
+ `+n.raw,o.text+=`
146
+ `+n.text,this.inlineQueue.at(-1).src=o.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);const o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=`
147
+ `+n.raw,o.text+=`
148
+ `+n.raw,this.inlineQueue.at(-1).src=o.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),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let a=t;if(this.options.extensions?.startBlock){let o=1/0;const s=t.slice(1);let c;this.options.extensions.startBlock.forEach(l=>{c=l.call({lexer:this},s),typeof c=="number"&&c>=0&&(o=Math.min(o,c))}),o<1/0&&o>=0&&(a=t.substring(0,o+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){const o=r.at(-1);i&&o?.type==="paragraph"?(o.raw+=`
149
+ `+n.raw,o.text+=`
150
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(n),i=a.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);const o=r.at(-1);o?.type==="text"?(o.raw+=`
151
+ `+n.raw,o.text+=`
152
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(n);continue}if(t){const o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,n=null;if(this.tokens.links){const s=Object.keys(this.tokens.links);if(s.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)s.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,o="";for(;t;){a||(o=""),a=!1;let s;if(this.options.extensions?.inline?.some(l=>(s=l.call({lexer:this},t,r))?(t=t.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.escape(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.tag(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.link(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(s.raw.length);const l=r.at(-1);s.type==="text"&&l?.type==="text"?(l.raw+=s.raw,l.text+=s.text):r.push(s);continue}if(s=this.tokenizer.emStrong(t,i,o)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.codespan(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.br(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.del(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.autolink(t)){t=t.substring(s.raw.length),r.push(s);continue}if(!this.state.inLink&&(s=this.tokenizer.url(t))){t=t.substring(s.raw.length),r.push(s);continue}let c=t;if(this.options.extensions?.startInline){let l=1/0;const h=t.slice(1);let u;this.options.extensions.startInline.forEach(f=>{u=f.call({lexer:this},h),typeof u=="number"&&u>=0&&(l=Math.min(l,u))}),l<1/0&&l>=0&&(c=t.substring(0,l+1))}if(s=this.tokenizer.inlineText(c)){t=t.substring(s.raw.length),s.raw.slice(-1)!=="_"&&(o=s.raw.slice(-1)),a=!0;const l=r.at(-1);l?.type==="text"?(l.raw+=s.raw,l.text+=s.text):r.push(s);continue}if(t){const l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return r}},$n=class{options;parser;constructor(e){this.options=e||hr}space(e){return""}code({text:e,lang:t,escaped:r}){const i=(t||"").match(Pt.notSpaceStart)?.[0],n=e.replace(Pt.endingNewline,"")+`
153
+ `;return i?'<pre><code class="language-'+le(i)+'">'+(r?n:le(n,!0))+`</code></pre>
154
+ `:"<pre><code>"+(r?n:le(n,!0))+`</code></pre>
155
+ `}blockquote({tokens:e}){return`<blockquote>
156
+ ${this.parser.parse(e)}</blockquote>
157
+ `}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
158
+ `}hr(e){return`<hr>
159
+ `}list(e){const t=e.ordered,r=e.start;let i="";for(let o=0;o<e.items.length;o++){const s=e.items[o];i+=this.listitem(s)}const n=t?"ol":"ul",a=t&&r!==1?' start="'+r+'"':"";return"<"+n+a+`>
160
+ `+i+"</"+n+`>
161
+ `}listitem(e){let t="";if(e.task){const r=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type==="paragraph"?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=r+" "+le(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
162
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
163
+ `}table(e){let t="",r="";for(let n=0;n<e.header.length;n++)r+=this.tablecell(e.header[n]);t+=this.tablerow({text:r});let i="";for(let n=0;n<e.rows.length;n++){const a=e.rows[n];r="";for(let o=0;o<a.length;o++)r+=this.tablecell(a[o]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
164
+ <thead>
165
+ `+t+`</thead>
166
+ `+i+`</table>
167
+ `}tablerow({text:e}){return`<tr>
168
+ ${e}</tr>
169
+ `}tablecell(e){const t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
170
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${le(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){const i=this.parser.parseInline(r),n=Yl(e);if(n===null)return i;e=n;let a='<a href="'+e+'"';return t&&(a+=' title="'+le(t)+'"'),a+=">"+i+"</a>",a}image({href:e,title:t,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));const n=Yl(e);if(n===null)return le(r);e=n;let a=`<img src="${e}" alt="${r}"`;return t&&(a+=` title="${le(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:le(e.text)}},_o=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},Be=class ys{options;renderer;textRenderer;constructor(t){this.options=t||hr,this.options.renderer=this.options.renderer||new $n,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new _o}static parse(t,r){return new ys(r).parse(t)}static parseInline(t,r){return new ys(r).parseInline(t)}parse(t,r=!0){let i="";for(let n=0;n<t.length;n++){const a=t[n];if(this.options.extensions?.renderers?.[a.type]){const s=a,c=this.options.extensions.renderers[s.type].call({parser:this},s);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(s.type)){i+=c||"";continue}}const o=a;switch(o.type){case"space":{i+=this.renderer.space(o);continue}case"hr":{i+=this.renderer.hr(o);continue}case"heading":{i+=this.renderer.heading(o);continue}case"code":{i+=this.renderer.code(o);continue}case"table":{i+=this.renderer.table(o);continue}case"blockquote":{i+=this.renderer.blockquote(o);continue}case"list":{i+=this.renderer.list(o);continue}case"html":{i+=this.renderer.html(o);continue}case"paragraph":{i+=this.renderer.paragraph(o);continue}case"text":{let s=o,c=this.renderer.text(s);for(;n+1<t.length&&t[n+1].type==="text";)s=t[++n],c+=`
171
+ `+this.renderer.text(s);r?i+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):i+=c;continue}default:{const s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return i}parseInline(t,r=this.renderer){let i="";for(let n=0;n<t.length;n++){const a=t[n];if(this.options.extensions?.renderers?.[a.type]){const s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=s||"";continue}}const o=a;switch(o.type){case"escape":{i+=r.text(o);break}case"html":{i+=r.html(o);break}case"link":{i+=r.link(o);break}case"image":{i+=r.image(o);break}case"strong":{i+=r.strong(o);break}case"em":{i+=r.em(o);break}case"codespan":{i+=r.codespan(o);break}case"br":{i+=r.br(o);break}case"del":{i+=r.del(o);break}case"text":{i+=r.text(o);break}default:{const s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return i}},an=class{options;block;constructor(e){this.options=e||hr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Te.lex:Te.lexInline}provideParser(){return this.block?Be.parse:Be.parseInline}},y_=class{defaults=po();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Be;Renderer=$n;TextRenderer=_o;Lexer=Te;Tokenizer=On;Hooks=an;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(const i of e)switch(r=r.concat(t.call(this,i)),i.type){case"table":{const n=i;for(const a of n.header)r=r.concat(this.walkTokens(a.tokens,t));for(const a of n.rows)for(const o of a)r=r.concat(this.walkTokens(o.tokens,t));break}case"list":{const n=i;r=r.concat(this.walkTokens(n.items,t));break}default:{const n=i;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(a=>{const o=n[a].flat(1/0);r=r.concat(this.walkTokens(o,t))}):n.tokens&&(r=r.concat(this.walkTokens(n.tokens,t)))}}return r}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){const a=t.renderers[n.name];a?t.renderers[n.name]=function(...o){let s=n.renderer.apply(this,o);return s===!1&&(s=a.apply(this,o)),s}:t.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const a=t[n.level];a?a.unshift(n.tokenizer):t[n.level]=[n.tokenizer],n.start&&(n.level==="block"?t.startBlock?t.startBlock.push(n.start):t.startBlock=[n.start]:n.level==="inline"&&(t.startInline?t.startInline.push(n.start):t.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(t.childTokens[n.name]=n.childTokens)}),i.extensions=t),r.renderer){const n=this.defaults.renderer||new $n(this.defaults);for(const a in r.renderer){if(!(a in n))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;const o=a,s=r.renderer[o],c=n[o];n[o]=(...l)=>{let h=s.apply(n,l);return h===!1&&(h=c.apply(n,l)),h||""}}i.renderer=n}if(r.tokenizer){const n=this.defaults.tokenizer||new On(this.defaults);for(const a in r.tokenizer){if(!(a in n))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;const o=a,s=r.tokenizer[o],c=n[o];n[o]=(...l)=>{let h=s.apply(n,l);return h===!1&&(h=c.apply(n,l)),h}}i.tokenizer=n}if(r.hooks){const n=this.defaults.hooks||new an;for(const a in r.hooks){if(!(a in n))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;const o=a,s=r.hooks[o],c=n[o];an.passThroughHooks.has(a)?n[o]=l=>{if(this.defaults.async)return Promise.resolve(s.call(n,l)).then(u=>c.call(n,u));const h=s.call(n,l);return c.call(n,h)}:n[o]=(...l)=>{let h=s.apply(n,l);return h===!1&&(h=c.apply(n,l)),h}}i.hooks=n}if(r.walkTokens){const n=this.defaults.walkTokens,a=r.walkTokens;i.walkTokens=function(o){let s=[];return s.push(a.call(this,o)),n&&(s=s.concat(n.call(this,o))),s}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Te.lex(e,t??this.defaults)}parser(e,t){return Be.parse(e,t??this.defaults)}parseMarkdown(e){return(r,i)=>{const n={...i},a={...this.defaults,...n},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&n.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=e);const s=a.hooks?a.hooks.provideLexer():e?Te.lex:Te.lexInline,c=a.hooks?a.hooks.provideParser():e?Be.parse:Be.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(r):r).then(l=>s(l,a)).then(l=>a.hooks?a.hooks.processAllTokens(l):l).then(l=>a.walkTokens?Promise.all(this.walkTokens(l,a.walkTokens)).then(()=>l):l).then(l=>c(l,a)).then(l=>a.hooks?a.hooks.postprocess(l):l).catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let l=s(r,a);a.hooks&&(l=a.hooks.processAllTokens(l)),a.walkTokens&&this.walkTokens(l,a.walkTokens);let h=c(l,a);return a.hooks&&(h=a.hooks.postprocess(h)),h}catch(l){return o(l)}}}onError(e,t){return r=>{if(r.message+=`
172
+ Please report this to https://github.com/markedjs/marked.`,e){const i="<p>An error occurred:</p><pre>"+le(r.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(r);throw r}}},nr=new y_;function ut(e,t){return nr.parse(e,t)}ut.options=ut.setOptions=function(e){return nr.setOptions(e),ut.defaults=nr.defaults,Ff(ut.defaults),ut};ut.getDefaults=po;ut.defaults=hr;ut.use=function(...e){return nr.use(...e),ut.defaults=nr.defaults,Ff(ut.defaults),ut};ut.walkTokens=function(e,t){return nr.walkTokens(e,t)};ut.parseInline=nr.parseInline;ut.Parser=Be;ut.parser=Be.parse;ut.Renderer=$n;ut.TextRenderer=_o;ut.Lexer=Te;ut.lexer=Te.lex;ut.Tokenizer=On;ut.Hooks=an;ut.parse=ut;ut.options;ut.setOptions;ut.use;ut.walkTokens;ut.parseInline;Be.parse;Te.lex;function Hf(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(s,c){var l=c.match(/\n([\t ]+|(?!\s).)/g);return l?s.concat(l.map(function(h){var u,f;return(f=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):s},[]);if(n.length){var a=new RegExp(`
173
+ [ ]{`+Math.min.apply(Math,n)+"}","g");i=i.map(function(s){return s.replace(a,`
174
+ `)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(s,c){var l=o.match(/(?:^|\n)( *)$/),h=l?l[1]:"",u=s;typeof s=="string"&&s.includes(`
175
+ `)&&(u=String(s).split(`
176
+ `).map(function(f,d){return d===0?f:""+h+f}).join(`
177
+ `)),o+=u+i[c+1]}),o}function jf(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
178
+ `).replace(/\n{2,}/g,`
179
+ `),n=Hf(i);return t===!1?n.replace(/ /g,"&nbsp;"):n}p(jf,"preprocessMarkdown");function Yf(e,t={}){const r=jf(e,t),i=ut.lexer(r),n=[[]];let a=0;function o(s,c="normal"){s.type==="text"?s.text.split(`
180
+ `).forEach((h,u)=>{u!==0&&(a++,n.push([])),h.split(" ").forEach(f=>{f=f.replace(/&#39;/g,"'"),f&&n[a].push({content:f,type:c})})}):s.type==="strong"||s.type==="em"?s.tokens.forEach(l=>{o(l,s.type)}):s.type==="html"&&n[a].push({content:s.text,type:"normal"})}return p(o,"processNode"),i.forEach(s=>{s.type==="paragraph"?s.tokens?.forEach(c=>{o(c)}):s.type==="html"&&n[a].push({content:s.text,type:"normal"})}),n}p(Yf,"markdownToLines");function Uf(e,{markdownAutoWrap:t}={}){const r=ut.lexer(e);function i(n){return n.type==="text"?t===!1?n.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):n.text.replace(/\n */g,"<br/>"):n.type==="strong"?`<strong>${n.tokens?.map(i).join("")}</strong>`:n.type==="em"?`<em>${n.tokens?.map(i).join("")}</em>`:n.type==="paragraph"?`<p>${n.tokens?.map(i).join("")}</p>`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:`Unsupported markdown: ${n.type}`}return p(i,"output"),r.map(i).join("")}p(Uf,"markdownToHTML");function Gf(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Gf,"splitTextToChars");function Vf(e,t){const r=Gf(t.content);return ko(e,[],r,t.type)}p(Vf,"splitWordToFitWidth");function ko(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...a]=r,o=[...t,n];return e([{content:o.join(""),type:i}])?ko(e,o,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(ko,"splitWordToFitWidthRecursion");function Xf(e,t){if(e.some(({content:r})=>r.includes(`
181
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Dn(e,t)}p(Xf,"splitLineToFitWidth");function Dn(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(n!==""&&o.push({content:n,type:"normal"}),o.push(a),t(o))return Dn(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[s,c]=Vf(t,a);r.push([s]),c.content&&e.unshift(c)}return Dn(e,t,r)}p(Dn,"splitLineToFitWidthRecursion");function xs(e,t){t&&e.attr("style",t)}p(xs,"applyStyle");async function Zf(e,t,r,i,n=!1){const a=e.append("foreignObject");a.attr("width",`${10*r}px`),a.attr("height",`${10*r}px`);const o=a.append("xhtml:div");let s=t.label;t.label&&Br(t.label)&&(s=await $s(t.label.replace($r.lineBreakRegex,`
182
+ `),ht()));const c=t.isNode?"nodeLabel":"edgeLabel",l=o.append("span");l.html(s),xs(l,t.labelStyle),l.attr("class",`${c} ${i}`),xs(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&o.attr("class","labelBkg");let h=o.node().getBoundingClientRect();return h.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),h=o.node().getBoundingClientRect()),a.node()}p(Zf,"addHtmlSpan");function sa(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}p(sa,"createTspan");function Kf(e,t,r){const i=e.append("text"),n=sa(i,1,t);oa(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}p(Kf,"computeWidthOfText");function x_(e,t,r){const i=e.append("text"),n=sa(i,1,t);oa(n,[{content:r,type:"normal"}]);const a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}p(x_,"computeDimensionOfText");function Qf(e,t,r,i=!1){const a=t.append("g"),o=a.insert("rect").attr("class","background").attr("style","stroke: none"),s=a.append("text").attr("y","-10.1");let c=0;for(const l of r){const h=p(f=>Kf(a,1.1,f)<=e,"checkWidth"),u=h(l)?[l]:Xf(l,h);for(const f of u){const d=sa(s,c,1.1);oa(d,f),c++}}if(i){const l=s.node().getBBox(),h=2;return o.attr("x",l.x-h).attr("y",l.y-h).attr("width",l.width+2*h).attr("height",l.height+2*h),a.node()}else return s.node()}p(Qf,"createFormattedText");function oa(e,t){e.text(""),t.forEach((r,i)=>{const n=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(r.content):n.text(" "+r.content)})}p(oa,"updateTextContentAndStyles");function Jf(e){return e.replace(/fa[bklrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`)}p(Jf,"replaceIconSubstring");var je=p(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,isNode:o=!0,width:s=200,addSvgBackground:c=!1}={},l)=>{if(O.debug("XYZ createText",t,r,i,n,a,o,"addSvgBackground: ",c),a){const h=Uf(t,l),u=Jf(cr(h)),f=t.replace(/\\\\/g,"\\"),d={isNode:o,label:Br(t)?f:u,labelStyle:r.replace("fill:","color:")};return await Zf(e,d,s,n,c)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=Yf(h.replace("<br>","<br/>"),l),f=Qf(s,e,u,t?c:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(f).attr("style",d)}else{const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");lt(f).select("rect").attr("style",d.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(f).select("text").attr("style",g)}return f}},"createText");function Ma(e,t,r){if(e&&e.length){const[i,n]=t,a=Math.PI/180*r,o=Math.cos(a),s=Math.sin(a);for(const c of e){const[l,h]=c;c[0]=(l-i)*o-(h-n)*s+i,c[1]=(l-i)*s+(h-n)*o+n}}}function b_(e,t){return e[0]===t[0]&&e[1]===t[1]}function C_(e,t,r,i=1){const n=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,s=[0,0];if(n)for(const l of o)Ma(l,s,n);const c=function(l,h,u){const f=[];for(const b of l){const C=[...b];b_(C[0],C[C.length-1])||C.push([C[0][0],C[0][1]]),C.length>2&&f.push(C)}const d=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let C=0;C<b.length-1;C++){const k=b[C],v=b[C+1];if(k[1]!==v[1]){const B=Math.min(k[1],v[1]);g.push({ymin:B,ymax:Math.max(k[1],v[1]),x:B===k[1]?k[0]:v[0],islope:(v[0]-k[0])/(v[1]-k[1])})}}if(g.sort((b,C)=>b.ymin<C.ymin?-1:b.ymin>C.ymin?1:b.x<C.x?-1:b.x>C.x?1:b.ymax===C.ymax?0:(b.ymax-C.ymax)/Math.abs(b.ymax-C.ymax)),!g.length)return d;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let C=0;C<g.length&&!(g[C].ymin>y);C++)b=C;g.splice(0,b+1).forEach(C=>{m.push({s:y,edge:C})})}if(m=m.filter(b=>!(b.edge.ymax<=y)),m.sort((b,C)=>b.edge.x===C.edge.x?0:(b.edge.x-C.edge.x)/Math.abs(b.edge.x-C.edge.x)),(u!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const C=b+1;if(C>=m.length)break;const k=m[b].edge,v=m[C].edge;d.push([[Math.round(k.x),y],[Math.round(v.x),y]])}y+=u,m.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),x++}return d}(o,a,i);if(n){for(const l of o)Ma(l,s,-n);(function(l,h,u){const f=[];l.forEach(d=>f.push(...d)),Ma(f,h,u)})(c,s,-n)}return c}function Mi(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),C_(e,n,i,a||1)}class vo{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Mi(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function la(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class w_ extends vo{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=Mi(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],s=.5*i*Math.cos(a),c=.5*i*Math.sin(a);for(const[l,h]of n)la([l,h])&&o.push([[l[0]-s,l[1]+c],[...h]],[[l[0]+s,l[1]-c],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class __ extends vo{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,n);return i.ops=i.ops.concat(a.ops),i}}class k_{constructor(t){this.helper=t}fillPolygons(t,r){const i=Mi(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=n/4;for(const s of t){const c=la(s),l=c/n,h=Math.ceil(l)-1,u=c-h*n,f=(s[0][0]+s[1][0])/2-n/4,d=Math.min(s[0][1],s[1][1]);for(let g=0;g<h;g++){const m=d+u+g*n,y=f-o+2*Math.random()*o,x=m-o+2*Math.random()*o,b=this.helper.ellipse(y,x,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class v_{constructor(t){this.helper=t}fillPolygons(t,r){const i=Mi(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,n=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach(o=>{const s=la(o),c=Math.floor(s/(i+n)),l=(s+n-c*(i+n))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<c;d++){const g=d*(i+n),m=g+i,y=[h[0]+g*Math.cos(f)+l*Math.cos(f),h[1]+g*Math.sin(f)+l*Math.sin(f)],x=[h[0]+m*Math.cos(f)+l*Math.cos(f),h[1]+m*Math.sin(f)+l*Math.sin(f)];a.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}}),a}}class S_{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,n=r.zigzagOffset<0?i:r.zigzagOffset,a=Mi(t,r=Object.assign({},r,{hachureGap:i+n}));return{type:"fillSketch",ops:this.zigzagLines(a,n,r)}}zigzagLines(t,r,i){const n=[];return t.forEach(a=>{const o=la(a),s=Math.round(o/(2*r));let c=a[0],l=a[1];c[0]>l[0]&&(c=a[1],l=a[0]);const h=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let u=0;u<s;u++){const f=2*u*r,d=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[c[0]+f*Math.cos(h),c[1]+f*Math.sin(h)],y=[c[0]+d*Math.cos(h),c[1]+d*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];n.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}}),n}}const Ht={};class T_{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const B_=0,Fa=1,Vl=2,ji={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Oa(e,t){return e.type===t}function So(e){const t=[],r=function(o){const s=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))s[s.length]={type:B_,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];s[s.length]={type:Fa,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return s[s.length]={type:Vl,text:""},s}(e);let i="BOD",n=0,a=r[n];for(;!Oa(a,Vl);){let o=0;const s=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return So("M0,0"+e);n++,o=ji[a.text],i=a.text}else Oa(a,Fa)?o=ji[i]:(n++,o=ji[a.text],i=a.text);if(!(n+o<r.length))throw new Error("Path data ended short");for(let c=n;c<n+o;c++){const l=r[c];if(!Oa(l,Fa))throw new Error("Param not a number: "+i+","+l.text);s[s.length]=+l.text}if(typeof ji[i]!="number")throw new Error("Bad segment: "+i);{const c={key:i,data:s};t.push(c),n+=o,a=r[n],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function td(e){let t=0,r=0,i=0,n=0;const a=[];for(const{key:o,data:s}of e)switch(o){case"M":a.push({key:"M",data:[...s]}),[t,r]=s,[i,n]=s;break;case"m":t+=s[0],r+=s[1],a.push({key:"M",data:[t,r]}),i=t,n=r;break;case"L":a.push({key:"L",data:[...s]}),[t,r]=s;break;case"l":t+=s[0],r+=s[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...s]}),t=s[4],r=s[5];break;case"c":{const c=s.map((l,h)=>h%2?l+r:l+t);a.push({key:"C",data:c}),t=c[4],r=c[5];break}case"Q":a.push({key:"Q",data:[...s]}),t=s[2],r=s[3];break;case"q":{const c=s.map((l,h)=>h%2?l+r:l+t);a.push({key:"Q",data:c}),t=c[2],r=c[3];break}case"A":a.push({key:"A",data:[...s]}),t=s[5],r=s[6];break;case"a":t+=s[5],r+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,r]});break;case"H":a.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...s]}),t=s[2],r=s[3];break;case"s":{const c=s.map((l,h)=>h%2?l+r:l+t);a.push({key:"S",data:c}),t=c[2],r=c[3];break}case"T":a.push({key:"T",data:[...s]}),t=s[0],r=s[1];break;case"t":t+=s[0],r+=s[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=n}return a}function ed(e){const t=[];let r="",i=0,n=0,a=0,o=0,s=0,c=0;for(const{key:l,data:h}of e){switch(l){case"M":t.push({key:"M",data:[...h]}),[i,n]=h,[a,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],n=h[5],s=h[2],c=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,n]});break;case"V":n=h[0],t.push({key:"L",data:[i,n]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-s),f=n+(n-c)):(u=i,f=n),t.push({key:"C",data:[u,f,...h]}),s=h[0],c=h[1],i=h[2],n=h[3];break}case"T":{const[u,f]=h;let d=0,g=0;r==="Q"||r==="T"?(d=i+(i-s),g=n+(n-c)):(d=i,g=n);const m=i+2*(d-i)/3,y=n+2*(g-n)/3,x=u+2*(d-u)/3,b=f+2*(g-f)/3;t.push({key:"C",data:[m,y,x,b,u,f]}),s=d,c=g,i=u,n=f;break}case"Q":{const[u,f,d,g]=h,m=i+2*(u-i)/3,y=n+2*(f-n)/3,x=d+2*(u-d)/3,b=g+2*(f-g)/3;t.push({key:"C",data:[m,y,x,b,d,g]}),s=u,c=f,i=d,n=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),d=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||f===0?(t.push({key:"C",data:[i,n,y,x,y,x]}),i=y,n=x):(i!==y||n!==x)&&(rd(i,n,y,x,u,f,d,g,m).forEach(function(b){t.push({key:"C",data:b})}),i=y,n=x);break}case"Z":t.push({key:"Z",data:[]}),i=a,n=o}r=l}return t}function Jr(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function rd(e,t,r,i,n,a,o,s,c,l){const h=(u=o,Math.PI*u/180);var u;let f=[],d=0,g=0,m=0,y=0;if(l)[d,g,m,y]=l;else{[e,t]=Jr(e,t,-h),[r,i]=Jr(r,i,-h);const P=(e-r)/2,M=(t-i)/2;let E=P*P/(n*n)+M*M/(a*a);E>1&&(E=Math.sqrt(E),n*=E,a*=E);const T=n*n,F=a*a,A=T*F-T*M*M-F*P*P,N=T*M*M+F*P*P,q=(s===c?-1:1)*Math.sqrt(Math.abs(A/N));m=q*n*M/a+(e+r)/2,y=q*-a*P/n+(t+i)/2,d=Math.asin(parseFloat(((t-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).toFixed(9))),e<m&&(d=Math.PI-d),r<m&&(g=Math.PI-g),d<0&&(d=2*Math.PI+d),g<0&&(g=2*Math.PI+g),c&&d>g&&(d-=2*Math.PI),!c&&g>d&&(g-=2*Math.PI)}let x=g-d;if(Math.abs(x)>120*Math.PI/180){const P=g,M=r,E=i;g=c&&g>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=rd(r=m+n*Math.cos(g),i=y+a*Math.sin(g),M,E,n,a,o,0,c,[g,P,m,y])}x=g-d;const b=Math.cos(d),C=Math.sin(d),k=Math.cos(g),v=Math.sin(g),B=Math.tan(x/4),S=4/3*n*B,D=4/3*a*B,R=[e,t],$=[e+S*C,t-D*b],L=[r+S*v,i-D*k],z=[r,i];if($[0]=2*R[0]-$[0],$[1]=2*R[1]-$[1],l)return[$,L,z].concat(f);{f=[$,L,z].concat(f);const P=[];for(let M=0;M<f.length;M+=3){const E=Jr(f[M][0],f[M][1],h),T=Jr(f[M+1][0],f[M+1][1],h),F=Jr(f[M+2][0],f[M+2][1],h);P.push([E[0],E[1],T[0],T[1],F[0],F[1]])}return P}}const L_={randOffset:function(e,t){return tt(e,t)},randOffsetWithRange:function(e,t,r){return Rn(e,t,r)},ellipse:function(e,t,r,i,n){const a=nd(r,i,n);return bs(e,t,n,a).opset},doubleLineOps:function(e,t,r,i,n){return We(e,t,r,i,n,!0)}};function id(e,t,r,i,n){return{type:"path",ops:We(e,t,r,i,n)}}function sn(e,t,r){const i=(e||[]).length;if(i>2){const n=[];for(let a=0;a<i-1;a++)n.push(...We(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&n.push(...We(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return i===2?id(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function A_(e,t,r,i,n){return function(a,o){return sn(a,!0,o)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],n)}function Xl(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Yi(r[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:Yi(r[0],1.5*(1+.22*t.roughness),Ql(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const s=Yi(o,1*(1+.2*t.roughness),t),c=t.disableMultiStroke?[]:Yi(o,1.5*(1+.22*t.roughness),Ql(t));for(const l of s)l.op!=="move"&&i.push(l);for(const l of c)l.op!=="move"&&n.push(l)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function nd(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/n;let o=Math.abs(e/2),s=Math.abs(t/2);const c=1-r.curveFitting;return o+=tt(o*c,r),s+=tt(s*c,r),{increment:a,rx:o,ry:s}}function bs(e,t,r,i){const[n,a]=Jl(i.increment,e,t,i.rx,i.ry,1,i.increment*Rn(.1,Rn(.4,1,r),r),r);let o=In(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[s]=Jl(i.increment,e,t,i.rx,i.ry,1.5,0,r),c=In(s,null,r);o=o.concat(c)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function Zl(e,t,r,i,n,a,o,s,c){const l=e,h=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=tt(.01*u,c),f+=tt(.01*f,c);let d=n,g=a;for(;d<0;)d+=2*Math.PI,g+=2*Math.PI;g-d>2*Math.PI&&(d=0,g=2*Math.PI);const m=2*Math.PI/c.curveStepCount,y=Math.min(m/2,(g-d)/2),x=tc(y,l,h,u,f,d,g,1,c);if(!c.disableMultiStroke){const b=tc(y,l,h,u,f,d,g,1.5,c);x.push(...b)}return o&&(s?x.push(...We(l,h,l+u*Math.cos(d),h+f*Math.sin(d),c),...We(l,h,l+u*Math.cos(g),h+f*Math.sin(g),c)):x.push({op:"lineTo",data:[l,h]},{op:"lineTo",data:[l+u*Math.cos(d),h+f*Math.sin(d)]})),{type:"path",ops:x}}function Kl(e,t){const r=ed(td(So(e))),i=[];let n=[0,0],a=[0,0];for(const{key:o,data:s}of r)switch(o){case"M":a=[s[0],s[1]],n=[s[0],s[1]];break;case"L":i.push(...We(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]];break;case"C":{const[c,l,h,u,f,d]=s;i.push(...E_(c,l,h,u,f,d,a,t)),a=[f,d];break}case"Z":i.push(...We(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function $a(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+tt(n,t),i[0][1]+tt(n,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+tt(n,t),i[o][1]+tt(n,t)]})}}return{type:"fillPath",ops:r}}function yr(e,t){return function(r,i){let n=r.fillStyle||"hachure";if(!Ht[n])switch(n){case"zigzag":Ht[n]||(Ht[n]=new w_(i));break;case"cross-hatch":Ht[n]||(Ht[n]=new __(i));break;case"dots":Ht[n]||(Ht[n]=new k_(i));break;case"dashed":Ht[n]||(Ht[n]=new v_(i));break;case"zigzag-line":Ht[n]||(Ht[n]=new S_(i));break;default:n="hachure",Ht[n]||(Ht[n]=new vo(i))}return Ht[n]}(t,L_).fillPolygons(e,t)}function Ql(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function ad(e){return e.randomizer||(e.randomizer=new T_(e.seed||0)),e.randomizer.next()}function Rn(e,t,r,i=1){return r.roughness*i*(ad(r)*(t-e)+e)}function tt(e,t,r=1){return Rn(-e,e,t,r)}function We(e,t,r,i,n,a=!1){const o=a?n.disableMultiStrokeFill:n.disableMultiStroke,s=Cs(e,t,r,i,n,!0,!1);if(o)return s;const c=Cs(e,t,r,i,n,!0,!0);return s.concat(c)}function Cs(e,t,r,i,n,a,o){const s=Math.pow(e-r,2)+Math.pow(t-i,2),c=Math.sqrt(s);let l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>s&&(h=c/10);const u=h/2,f=.2+.2*ad(n);let d=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;d=tt(d,n,l),g=tt(g,n,l);const m=[],y=()=>tt(u,n,l),x=()=>tt(h,n,l),b=n.preserveVertices;return o?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:tt(h,n,l)),t+(b?0:tt(h,n,l))]}),o?m.push({op:"bcurveTo",data:[d+e+(r-e)*f+y(),g+t+(i-t)*f+y(),d+e+2*(r-e)*f+y(),g+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[d+e+(r-e)*f+x(),g+t+(i-t)*f+x(),d+e+2*(r-e)*f+x(),g+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function Yi(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+tt(t,r),e[0][1]+tt(t,r)]),i.push([e[0][0]+tt(t,r),e[0][1]+tt(t,r)]);for(let n=1;n<e.length;n++)i.push([e[n][0]+tt(t,r),e[n][1]+tt(t,r)]),n===e.length-1&&i.push([e[n][0]+tt(t,r),e[n][1]+tt(t,r)]);return In(i,null,r)}function In(e,t,r){const i=e.length,n=[];if(i>3){const a=[],o=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let s=1;s+2<i;s++){const c=e[s];a[0]=[c[0],c[1]],a[1]=[c[0]+(o*e[s+1][0]-o*e[s-1][0])/6,c[1]+(o*e[s+1][1]-o*e[s-1][1])/6],a[2]=[e[s+1][0]+(o*e[s][0]-o*e[s+2][0])/6,e[s+1][1]+(o*e[s][1]-o*e[s+2][1])/6],a[3]=[e[s+1][0],e[s+1][1]],n.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(n.push({op:"move",data:[e[1][0],e[1][1]]}),n.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&n.push(...Cs(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function Jl(e,t,r,i,n,a,o,s){const c=[],l=[];if(s.roughness===0){e/=4,l.push([t+i*Math.cos(-e),r+n*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+n*Math.sin(h)];c.push(u),l.push(u)}l.push([t+i*Math.cos(0),r+n*Math.sin(0)]),l.push([t+i*Math.cos(e),r+n*Math.sin(e)])}else{const h=tt(.5,s)-Math.PI/2;l.push([tt(a,s)+t+.9*i*Math.cos(h-e),tt(a,s)+r+.9*n*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=e){const d=[tt(a,s)+t+i*Math.cos(f),tt(a,s)+r+n*Math.sin(f)];c.push(d),l.push(d)}l.push([tt(a,s)+t+i*Math.cos(h+2*Math.PI+.5*o),tt(a,s)+r+n*Math.sin(h+2*Math.PI+.5*o)]),l.push([tt(a,s)+t+.98*i*Math.cos(h+o),tt(a,s)+r+.98*n*Math.sin(h+o)]),l.push([tt(a,s)+t+.9*i*Math.cos(h+.5*o),tt(a,s)+r+.9*n*Math.sin(h+.5*o)])}return[l,c]}function tc(e,t,r,i,n,a,o,s,c){const l=a+tt(.1,c),h=[];h.push([tt(s,c)+t+.9*i*Math.cos(l-e),tt(s,c)+r+.9*n*Math.sin(l-e)]);for(let u=l;u<=o;u+=e)h.push([tt(s,c)+t+i*Math.cos(u),tt(s,c)+r+n*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+n*Math.sin(o)]),h.push([t+i*Math.cos(o),r+n*Math.sin(o)]),In(h,null,c)}function E_(e,t,r,i,n,a,o,s){const c=[],l=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let h=[0,0];const u=s.disableMultiStroke?1:2,f=s.preserveVertices;for(let d=0;d<u;d++)d===0?c.push({op:"move",data:[o[0],o[1]]}):c.push({op:"move",data:[o[0]+(f?0:tt(l[0],s)),o[1]+(f?0:tt(l[0],s))]}),h=f?[n,a]:[n+tt(l[d],s),a+tt(l[d],s)],c.push({op:"bcurveTo",data:[e+tt(l[d],s),t+tt(l[d],s),r+tt(l[d],s),i+tt(l[d],s),h[0],h[1]]});return c}function ti(e){return[...e]}function ec(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(ti(e[0]),ti(e[1]),ti(e[2]),ti(e[2]));else{const n=[];n.push(e[0],e[0]);for(let s=1;s<e.length;s++)n.push(e[s]),s===e.length-1&&n.push(e[s]);const a=[],o=1-t;i.push(ti(n[0]));for(let s=1;s+2<n.length;s++){const c=n[s];a[0]=[c[0],c[1]],a[1]=[c[0]+(o*n[s+1][0]-o*n[s-1][0])/6,c[1]+(o*n[s+1][1]-o*n[s-1][1])/6],a[2]=[n[s+1][0]+(o*n[s][0]-o*n[s+2][0])/6,n[s+1][1]+(o*n[s][1]-o*n[s+2][1])/6],a[3]=[n[s+1][0],n[s+1][1]],i.push(a[1],a[2],a[3])}}return i}function on(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function M_(e,t,r){const i=on(t,r);if(i===0)return on(e,t);let n=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return n=Math.max(0,Math.min(1,n)),on(e,Ve(t,r,n))}function Ve(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function ws(e,t,r,i){const n=i||[];if(function(s,c){const l=s[c+0],h=s[c+1],u=s[c+2],f=s[c+3];let d=3*h[0]-2*l[0]-f[0];d*=d;let g=3*h[1]-2*l[1]-f[1];g*=g;let m=3*u[0]-2*f[0]-l[0];m*=m;let y=3*u[1]-2*f[1]-l[1];return y*=y,d<m&&(d=m),g<y&&(g=y),d+g}(e,t)<r){const s=e[t+0];n.length?(a=n[n.length-1],o=s,Math.sqrt(on(a,o))>1&&n.push(s)):n.push(s),n.push(e[t+3])}else{const c=e[t+0],l=e[t+1],h=e[t+2],u=e[t+3],f=Ve(c,l,.5),d=Ve(l,h,.5),g=Ve(h,u,.5),m=Ve(f,d,.5),y=Ve(d,g,.5),x=Ve(m,y,.5);ws([c,f,m,x],0,r,n),ws([x,y,g,u],0,r,n)}var a,o;return n}function F_(e,t){return Pn(e,0,e.length,t)}function Pn(e,t,r,i,n){const a=n||[],o=e[t],s=e[r-1];let c=0,l=1;for(let h=t+1;h<r-1;++h){const u=M_(e[h],o,s);u>c&&(c=u,l=h)}return Math.sqrt(c)>i?(Pn(e,t,l+1,i,a),Pn(e,l,r,i,a)):(a.length||a.push(o),a.push(s)),a}function Da(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let a=0;a<n;a++)ws(e,3*a,t,i);return r&&r>0?Pn(i,0,i.length,r):i}const Vt="none";class Nn{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,n,a){const o=this._o(a);return this._d("line",[id(t,r,i,n,o)],o)}rectangle(t,r,i,n,a){const o=this._o(a),s=[],c=A_(t,r,i,n,o);if(o.fill){const l=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];o.fillStyle==="solid"?s.push($a([l],o)):s.push(yr([l],o))}return o.stroke!==Vt&&s.push(c),this._d("rectangle",s,o)}ellipse(t,r,i,n,a){const o=this._o(a),s=[],c=nd(i,n,o),l=bs(t,r,o,c);if(o.fill)if(o.fillStyle==="solid"){const h=bs(t,r,o,c).opset;h.type="fillPath",s.push(h)}else s.push(yr([l.estimatedPoints],o));return o.stroke!==Vt&&s.push(l.opset),this._d("ellipse",s,o)}circle(t,r,i,n){const a=this.ellipse(t,r,i,i,n);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[sn(t,!1,i)],i)}arc(t,r,i,n,a,o,s=!1,c){const l=this._o(c),h=[],u=Zl(t,r,i,n,a,o,s,!0,l);if(s&&l.fill)if(l.fillStyle==="solid"){const f=Object.assign({},l);f.disableMultiStroke=!0;const d=Zl(t,r,i,n,a,o,!0,!1,f);d.type="fillPath",h.push(d)}else h.push(function(f,d,g,m,y,x,b){const C=f,k=d;let v=Math.abs(g/2),B=Math.abs(m/2);v+=tt(.01*v,b),B+=tt(.01*B,b);let S=y,D=x;for(;S<0;)S+=2*Math.PI,D+=2*Math.PI;D-S>2*Math.PI&&(S=0,D=2*Math.PI);const R=(D-S)/b.curveStepCount,$=[];for(let L=S;L<=D;L+=R)$.push([C+v*Math.cos(L),k+B*Math.sin(L)]);return $.push([C+v*Math.cos(D),k+B*Math.sin(D)]),$.push([C,k]),yr([$],b)}(t,r,i,n,a,o,l));return l.stroke!==Vt&&h.push(u),this._d("arc",h,l)}curve(t,r){const i=this._o(r),n=[],a=Xl(t,i);if(i.fill&&i.fill!==Vt)if(i.fillStyle==="solid"){const o=Xl(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],s=t;if(s.length){const c=typeof s[0][0]=="number"?[s]:s;for(const l of c)l.length<3?o.push(...l):l.length===3?o.push(...Da(ec([l[0],l[0],l[1],l[2]]),10,(1+i.roughness)/2)):o.push(...Da(ec(l),10,(1+i.roughness)/2))}o.length&&n.push(yr([o],i))}return i.stroke!==Vt&&n.push(a),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],a=sn(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push($a([t],i)):n.push(yr([t],i))),i.stroke!==Vt&&n.push(a),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==Vt,o=i.stroke!==Vt,s=!!(i.simplification&&i.simplification<1),c=function(h,u,f){const d=ed(td(So(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...Da(x,u)),x=[]},C=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:v,data:B}of d)switch(v){case"M":C(),y=[B[0],B[1]],m.push(y);break;case"L":b(),m.push([B[0],B[1]]);break;case"C":if(!x.length){const S=m.length?m[m.length-1]:y;x.push([S[0],S[1]])}x.push([B[0],B[1]]),x.push([B[2],B[3]]),x.push([B[4],B[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(C(),!f)return g;const k=[];for(const v of g){const B=F_(v,f);B.length&&k.push(B)}return k}(t,1,s?4-4*(i.simplification||1):(1+i.roughness)/2),l=Kl(t,i);if(a)if(i.fillStyle==="solid")if(c.length===1){const h=Kl(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push($a(c,i));else n.push(yr(c,i));return o&&(s?c.forEach(h=>{n.push(sn(h,!1,i))}):n.push(l)),this._d("path",n,i)}opsToPath(t,r){let i="";for(const n of t.ops){const a=typeof r=="number"&&r>=0?n.data.map(o=>+o.toFixed(r)):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Vt};break;case"fillPath":o={d:this.opsToPath(a),stroke:Vt,strokeWidth:0,fill:i.fill||Vt};break;case"fillSketch":o=this.fillSketch(a,i)}o&&n.push(o)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Vt,strokeWidth:i,fill:Vt}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class O_{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Nn(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,o,a),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const s=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,o,a,s),n.restore();break}case"fillSketch":this.fillSketch(n,o,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map(s=>+s.toFixed(i)):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,a){const o=this.gen.line(t,r,i,n,a);return this.draw(o),o}rectangle(t,r,i,n,a){const o=this.gen.rectangle(t,r,i,n,a);return this.draw(o),o}ellipse(t,r,i,n,a){const o=this.gen.ellipse(t,r,i,n,a);return this.draw(o),o}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,a,o,s=!1,c){const l=this.gen.arc(t,r,i,n,a,o,s,c);return this.draw(l),l}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Ui="http://www.w3.org/2000/svg";class $_{constructor(t,r){this.svg=t,this.gen=new Nn(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(Ui,"g"),o=t.options.fixedDecimalPlaceDigits;for(const s of r){let c=null;switch(s.type){case"path":c=n.createElementNS(Ui,"path"),c.setAttribute("d",this.opsToPath(s,o)),c.setAttribute("stroke",i.stroke),c.setAttribute("stroke-width",i.strokeWidth+""),c.setAttribute("fill","none"),i.strokeLineDash&&c.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&c.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":c=n.createElementNS(Ui,"path"),c.setAttribute("d",this.opsToPath(s,o)),c.setAttribute("stroke","none"),c.setAttribute("stroke-width","0"),c.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||c.setAttribute("fill-rule","evenodd");break;case"fillSketch":c=this.fillSketch(n,s,i)}c&&a.appendChild(c)}return a}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const a=t.createElementNS(Ui,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",n+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,a){const o=this.gen.line(t,r,i,n,a);return this.draw(o)}rectangle(t,r,i,n,a){const o=this.gen.rectangle(t,r,i,n,a);return this.draw(o)}ellipse(t,r,i,n,a){const o=this.gen.ellipse(t,r,i,n,a);return this.draw(o)}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,a,o,s=!1,c){const l=this.gen.arc(t,r,i,n,a,o,s,c);return this.draw(l)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var Y={canvas:(e,t)=>new O_(e,t),svg:(e,t)=>new $_(e,t),generator:e=>new Nn(e),newSeed:()=>Nn.newSeed()},it=p(async(e,t,r)=>{let i;const n=t.useHtmlLabels||kt(ht()?.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",Nt(t.labelStyle));let s;t.label===void 0?s="":s=typeof t.label=="string"?t.label:t.label[0];const c=await je(o,tr(cr(s),ht()),{useHtmlLabels:n,width:t.width||ht().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let l=c.getBBox();const h=(t?.padding??0)/2;if(n){const u=c.children[0],f=lt(c),d=u.getElementsByTagName("img");if(d){const g=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=ht().fontSize?ht().fontSize:window.getComputedStyle(document.body).fontSize,C=5,[k=Wc.fontSize]=ia(b),v=k*C+"px";m.style.minWidth=v,m.style.maxWidth=v}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}l=u.getBoundingClientRect(),f.attr("width",l.width),f.attr("height",l.height)}return n?o.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"):o.attr("transform","translate(0, "+-l.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:l,halfPadding:h,label:o}},"labelHelper"),Ra=p(async(e,t,r)=>{const i=r.useHtmlLabels||kt(ht()?.flowchart?.htmlLabels),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await je(n,tr(cr(t),ht()),{useHtmlLabels:i,width:r.width||ht()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const s=r.padding/2;if(kt(ht()?.flowchart?.htmlLabels)){const c=a.children[0],l=lt(a);o=c.getBoundingClientRect(),l.attr("width",o.width),l.attr("height",o.height)}return i?n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):n.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:s,label:n}},"insertLabel"),V=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),et=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ct(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(ct,"createPathFromPoints");function qe(e,t,r,i,n,a){const o=[],c=r-e,l=i-t,h=c/a,u=2*Math.PI/h,f=t+l/2;for(let d=0;d<=50;d++){const g=d/50,m=e+g*c,y=f+n*Math.sin(u*(m-e));o.push({x:m,y})}return o}p(qe,"generateFullSineWavePoints");function To(e,t,r,i,n,a){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(To,"generateCirclePoints");var D_=p((e,t)=>{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(n)*s?(a<0&&(s=-s),c=a===0?0:s*n/a,l=s):(n<0&&(o=-o),c=o,l=n===0?0:o*a/n),{x:r+c,y:i+l}},"intersectRect"),Ir=D_;function sd(e,t){t&&e.attr("style",t)}p(sd,"applyStyle");async function od(e){const t=lt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div");let i=e.label;e.label&&Br(e.label)&&(i=await $s(e.label.replace($r.lineBreakRegex,`
183
+ `),ht()));const n=e.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+n+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+i+"</span>"),sd(r,e.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"),t.node()}p(od,"addHtmlLabel");var R_=p(async(e,t,r,i)=>{let n=e||"";if(typeof n=="object"&&(n=n[0]),kt(ht().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),O.info("vertexText"+n);const a={isNode:i,label:cr(n).replace(/fa[blrs]?:fa-[\w-]+/g,s=>`<i class='${s.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await od(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let o=[];typeof n=="string"?o=n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?o=n:o=[];for(const s of o){const c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),r?c.setAttribute("class","title-row"):c.setAttribute("class","row"),c.textContent=s.trim(),a.appendChild(c)}return a}},"createLabel"),Je=R_,$e=p((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),I_=p(e=>{const{handDrawnSeed:t}=ht();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Pr=p(e=>{const t=P_([...e.cssCompiledStyles||[],...e.cssStyles||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),P_=p(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n?.trim())}),t},"styles2Map"),ld=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),X=p(e=>{const{stylesArray:t}=Pr(e),r=[],i=[],n=[],a=[];return t.forEach(o=>{const s=o[0];ld(s)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),s.includes("stroke")&&n.push(o.join(":")+" !important"),s==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),G=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=ht(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:o}=Pr(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||n,seed:i,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},t)},"userNodeOverrides"),cd=p(async(e,t)=>{O.info("Creating subgraph rect for ",t.id,t);const r=ht(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:c,borderStyles:l,backgroundStyles:h}=X(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=kt(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),g=await je(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0});let m=g.getBBox();if(kt(r.flowchart.htmlLabels)){const S=g.children[0],D=lt(g);m=S.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,C=t.y-x/2;O.trace("Data ",t,JSON.stringify(t));let k;if(t.look==="handDrawn"){const S=Y.svg(u),D=G(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:n}),R=S.path($e(b,C,y,x,0),D);k=u.insert(()=>(O.debug("Rough node insert CXC",R),R),":first-child"),k.select("path:nth-child(2)").attr("style",l.join(";")),k.select("path").attr("style",h.join(";").replace("fill","stroke"))}else k=u.insert("rect",":first-child"),k.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",C).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:v}=Gs(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),s){const S=d.select("span");S&&S.attr("style",s)}const B=k.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=m.height-t.padding/2,t.intersect=function(S){return Ir(t,S)},{cluster:u,labelBBox:m}},"rect"),N_=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),n=0*t.padding,a=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(s){return Ir(t,s)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),z_=p(async(e,t)=>{const r=ht(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:s,nodeBorder:c}=i,l=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=l.insert("g",":first-child"),u=l.insert("g").attr("class","cluster-label");let f=l.append("rect");const d=u.node().appendChild(await Je(t.label,t.labelStyle,void 0,!0));let g=d.getBBox();if(kt(r.flowchart.htmlLabels)){const R=d.children[0],$=lt(d);g=R.getBoundingClientRect(),$.attr("width",g.width),$.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,C=t.height+m-g.height-6,k=t.x-x/2,v=t.y-b/2;t.width=x;const B=t.y-t.height/2-y+g.height+2;let S;if(t.look==="handDrawn"){const R=t.cssClasses.includes("statediagram-cluster-alt"),$=Y.svg(l),L=t.rx||t.ry?$.path($e(k,v,x,b,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:c,seed:n}):$.rectangle(k,v,x,b,{seed:n});S=l.insert(()=>L,":first-child");const z=$.rectangle(k,B,x,C,{fill:R?a:o,fillStyle:R?"hachure":"solid",stroke:c,seed:n});S=l.insert(()=>L,":first-child"),f=l.insert(()=>z)}else S=h.insert("rect",":first-child"),S.attr("class","outer").attr("x",k).attr("y",v).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",k).attr("y",B).attr("width",x).attr("height",C);u.attr("transform",`translate(${t.x-g.width/2}, ${v+1-(kt(r.flowchart.htmlLabels)?0:3)})`);const D=S.node().getBBox();return t.height=D.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(R){return Ir(t,R)},{cluster:l,labelBBox:g}},"roundedWithTitle"),W_=p(async(e,t)=>{O.info("Creating subgraph rect for ",t.id,t);const r=ht(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:c,borderStyles:l,backgroundStyles:h}=X(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=kt(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),g=await je(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=g.getBBox();if(kt(r.flowchart.htmlLabels)){const S=g.children[0],D=lt(g);m=S.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,C=t.y-x/2;O.trace("Data ",t,JSON.stringify(t));let k;if(t.look==="handDrawn"){const S=Y.svg(u),D=G(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:n}),R=S.path($e(b,C,y,x,t.rx),D);k=u.insert(()=>(O.debug("Rough node insert CXC",R),R),":first-child"),k.select("path:nth-child(2)").attr("style",l.join(";")),k.select("path").attr("style",h.join(";").replace("fill","stroke"))}else k=u.insert("rect",":first-child"),k.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",C).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:v}=Gs(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),s){const S=d.select("span");S&&S.attr("style",s)}const B=k.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=m.height-t.padding/2,t.intersect=function(S){return Ir(t,S)},{cluster:u,labelBBox:m}},"kanbanSection"),q_=p((e,t)=>{const r=ht(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),s=o.insert("g",":first-child"),c=0*t.padding,l=t.width+c;t.diff=-t.padding;const h=t.height+c,u=t.x-l/2,f=t.y-h/2;t.width=l;let d;if(t.look==="handDrawn"){const y=Y.svg(o).rectangle(u,f,l,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});d=o.insert(()=>y,":first-child")}else d=s.insert("rect",":first-child"),d.attr("class","divider").attr("x",u).attr("y",f).attr("width",l).attr("height",h).attr("data-look",t.look);const g=d.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return Ir(t,m)},{cluster:o,labelBBox:{}}},"divider"),H_=cd,j_={rect:cd,squareRect:H_,roundedWithTitle:z_,noteGroup:N_,divider:q_,kanbanSection:W_},hd=new Map,Y_=p(async(e,t)=>{const r=t.shape||"rect",i=await j_[r](e,t);return hd.set(t.id,i),i},"insertCluster"),eB=p(()=>{hd=new Map},"clear");function ud(e,t){return e.intersect(t)}p(ud,"intersectNode");var U_=ud;function fd(e,t,r,i){var n=e.x,a=e.y,o=n-i.x,s=a-i.y,c=Math.sqrt(t*t*s*s+r*r*o*o),l=Math.abs(t*r*o/c);i.x<n&&(l=-l);var h=Math.abs(t*r*s/c);return i.y<a&&(h=-h),{x:n+l,y:a+h}}p(fd,"intersectEllipse");var dd=fd;function pd(e,t,r){return dd(e,t,t,r)}p(pd,"intersectCircle");var G_=pd;function gd(e,t,r,i){var n,a,o,s,c,l,h,u,f,d,g,m,y,x,b;if(n=t.y-e.y,o=e.x-t.x,c=t.x*e.y-e.x*t.y,f=n*r.x+o*r.y+c,d=n*i.x+o*i.y+c,!(f!==0&&d!==0&&_s(f,d))&&(a=i.y-r.y,s=r.x-i.x,l=i.x*r.y-r.x*i.y,h=a*e.x+s*e.y+l,u=a*t.x+s*t.y+l,!(h!==0&&u!==0&&_s(h,u))&&(g=n*s-a*o,g!==0)))return m=Math.abs(g/2),y=o*l-s*c,x=y<0?(y-m)/g:(y+m)/g,y=a*c-n*l,b=y<0?(y-m)/g:(y+m)/g,{x,y:b}}p(gd,"intersectLine");function _s(e,t){return e*t>0}p(_s,"sameSign");var V_=gd;function md(e,t,r){let i=e.x,n=e.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),s=Math.min(s,h.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=i-e.width/2-o,l=n-e.height/2-s;for(let h=0;h<t.length;h++){let u=t[h],f=t[h<t.length-1?h+1:0],d=V_(e,r,{x:c+u.x,y:l+u.y},{x:c+f.x,y:l+f.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort(function(h,u){let f=h.x-r.x,d=h.y-r.y,g=Math.sqrt(f*f+d*d),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return g<x?-1:g===x?0:1}),a[0]):e}p(md,"intersectPolygon");var X_=md,j={node:U_,circle:G_,ellipse:dd,polygon:X_,rect:Ir};function yd(e,t){const{labelStyles:r}=X(t);t.labelStyle=r;const i=et(t);let n=i;i||(n="anchor");const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=1,{cssStyles:s}=t,c=Y.svg(a),l=G(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(l.roughness=0);const h=c.circle(0,0,o*2,l),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",Nt(s)),V(t,u),t.intersect=function(f){return O.info("Circle intersect",t,o,f),j.circle(t,o,f)},a}p(yd,"anchor");function ks(e,t,r,i,n,a,o){const c=(e+r)/2,l=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/n,g=f/a,m=Math.sqrt(d**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=c+y*a*Math.sin(h)*(o?-1:1),b=l-y*n*Math.cos(h)*(o?-1:1),C=Math.atan2((t-b)/a,(e-x)/n);let v=Math.atan2((i-b)/a,(r-x)/n)-C;o&&v<0&&(v+=2*Math.PI),!o&&v>0&&(v-=2*Math.PI);const B=[];for(let S=0;S<20;S++){const D=S/19,R=C+D*v,$=x+n*Math.cos(R),L=b+a*Math.sin(R);B.push({x:$,y:L})}return B}p(ks,"generateArcPoints");async function xd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,et(t)),o=a.width+t.padding+20,s=a.height+t.padding,c=s/2,l=c/(2.5+s/50),{cssStyles:h}=t,u=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...ks(-o/2,-s/2,-o/2,s/2,l,c,!1),{x:o/2,y:s/2},...ks(o/2,s/2,o/2,-s/2,l,c,!0)],f=Y.svg(n),d=G(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=ct(u),m=f.path(g,d),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${l/2}, 0)`),V(t,y),t.intersect=function(x){return j.polygon(t,u,x)},n}p(xd,"bowTieRect");function De(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(De,"insertPolygonShape");async function bd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,et(t)),o=a.height+t.padding,s=12,c=a.width+t.padding+s,l=0,h=c,u=-o,f=0,d=[{x:l+s,y:u},{x:h,y:u},{x:h,y:f},{x:l,y:f},{x:l,y:u+s},{x:l+s,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=Y.svg(n),x=G(t,{}),b=ct(d),C=y.path(b,x);g=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${o/2})`),m&&g.attr("style",m)}else g=De(n,c,o,d);return i&&g.attr("style",i),V(t,g),t.intersect=function(y){return j.polygon(t,d,y)},n}p(bd,"card");function Cd(e,t){const{nodeStyles:r}=X(t);t.label="";const i=e.insert("g").attr("class",et(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=Y.svg(i),c=G(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=ct(o),h=s.path(l,c),u=i.insert(()=>h,":first-child");return n&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return j.polygon(t,o,f)},i}p(Cd,"choice");async function wd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o}=await it(e,t,et(t)),s=a.width/2+o;let c;const{cssStyles:l}=t;if(t.look==="handDrawn"){const h=Y.svg(n),u=G(t,{}),f=h.circle(0,0,s*2,u);c=n.insert(()=>f,":first-child"),c.attr("class","basic label-container").attr("style",Nt(l))}else c=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",s).attr("cx",0).attr("cy",0);return V(t,c),t.intersect=function(h){return O.info("Circle intersect",t,s,h),j.circle(t,s,h)},n}p(wd,"circle");function _d(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},s={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${s.x},${s.y}
184
+ M ${n.x},${n.y} L ${o.x},${o.y}`}p(_d,"createLine");function kd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",et(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:o}=t,s=Y.svg(n),c=G(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=s.circle(0,0,a*2,c),h=_d(a),u=s.path(h,c),f=n.insert(()=>l,":first-child");return f.insert(()=>u),o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),V(t,f),t.intersect=function(d){return O.info("crossedCircle intersect",t,{radius:a,point:d}),j.circle(t,a,d)},n}p(kd,"crossedCircle");function ve(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(ve,"generateCirclePoints");async function vd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,et(t)),s=a.width+(t.padding??0),c=a.height+(t.padding??0),l=Math.max(5,c*.1),{cssStyles:h}=t,u=[...ve(s/2,-c/2,l,30,-90,0),{x:-s/2-l,y:l},...ve(s/2+l*2,-l,l,20,-180,-270),...ve(s/2+l*2,l,l,20,-90,-180),{x:-s/2-l,y:-c/2},...ve(s/2,c/2,l,20,0,90)],f=[{x:s/2,y:-c/2-l},{x:-s/2,y:-c/2-l},...ve(s/2,-c/2,l,20,-90,0),{x:-s/2-l,y:-l},...ve(s/2+s*.1,-l,l,20,-180,-270),...ve(s/2+s*.1,l,l,20,-90,-180),{x:-s/2-l,y:c/2},...ve(s/2,c/2,l,20,0,90),{x:-s/2,y:c/2+l},{x:s/2,y:c/2+l}],d=Y.svg(n),g=G(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=ct(u).replace("Z",""),x=d.path(y,g),b=ct(f),C=d.path(b,{...g}),k=n.insert("g",":first-child");return k.insert(()=>C,":first-child").attr("stroke-opacity",0),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${l}, 0)`),o.attr("transform",`translate(${-s/2+l-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),V(t,k),t.intersect=function(v){return j.polygon(t,f,v)},n}p(vd,"curlyBraceLeft");function Se(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:d,y:g})}return o}p(Se,"generateCirclePoints");async function Sd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,et(t)),s=a.width+(t.padding??0),c=a.height+(t.padding??0),l=Math.max(5,c*.1),{cssStyles:h}=t,u=[...Se(s/2,-c/2,l,20,-90,0),{x:s/2+l,y:-l},...Se(s/2+l*2,-l,l,20,-180,-270),...Se(s/2+l*2,l,l,20,-90,-180),{x:s/2+l,y:c/2},...Se(s/2,c/2,l,20,0,90)],f=[{x:-s/2,y:-c/2-l},{x:s/2,y:-c/2-l},...Se(s/2,-c/2,l,20,-90,0),{x:s/2+l,y:-l},...Se(s/2+l*2,-l,l,20,-180,-270),...Se(s/2+l*2,l,l,20,-90,-180),{x:s/2+l,y:c/2},...Se(s/2,c/2,l,20,0,90),{x:s/2,y:c/2+l},{x:-s/2,y:c/2+l}],d=Y.svg(n),g=G(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=ct(u).replace("Z",""),x=d.path(y,g),b=ct(f),C=d.path(b,{...g}),k=n.insert("g",":first-child");return k.insert(()=>C,":first-child").attr("stroke-opacity",0),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${-l}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),V(t,k),t.intersect=function(v){return j.polygon(t,f,v)},n}p(Sd,"curlyBraceRight");function Tt(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(Tt,"generateCirclePoints");async function Td(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,et(t)),s=a.width+(t.padding??0),c=a.height+(t.padding??0),l=Math.max(5,c*.1),{cssStyles:h}=t,u=[...Tt(s/2,-c/2,l,30,-90,0),{x:-s/2-l,y:l},...Tt(s/2+l*2,-l,l,20,-180,-270),...Tt(s/2+l*2,l,l,20,-90,-180),{x:-s/2-l,y:-c/2},...Tt(s/2,c/2,l,20,0,90)],f=[...Tt(-s/2+l+l/2,-c/2,l,20,-90,-180),{x:s/2-l/2,y:l},...Tt(-s/2-l/2,-l,l,20,0,90),...Tt(-s/2-l/2,l,l,20,-90,0),{x:s/2-l/2,y:-l},...Tt(-s/2+l+l/2,c/2,l,30,-180,-270)],d=[{x:s/2,y:-c/2-l},{x:-s/2,y:-c/2-l},...Tt(s/2,-c/2,l,20,-90,0),{x:-s/2-l,y:-l},...Tt(s/2+l*2,-l,l,20,-180,-270),...Tt(s/2+l*2,l,l,20,-90,-180),{x:-s/2-l,y:c/2},...Tt(s/2,c/2,l,20,0,90),{x:-s/2,y:c/2+l},{x:s/2-l-l/2,y:c/2+l},...Tt(-s/2+l+l/2,-c/2,l,20,-90,-180),{x:s/2-l/2,y:l},...Tt(-s/2-l/2,-l,l,20,0,90),...Tt(-s/2-l/2,l,l,20,-90,0),{x:s/2-l/2,y:-l},...Tt(-s/2+l+l/2,c/2,l,30,-180,-270)],g=Y.svg(n),m=G(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=ct(u).replace("Z",""),b=g.path(x,m),k=ct(f).replace("Z",""),v=g.path(k,m),B=ct(d),S=g.path(B,{...m}),D=n.insert("g",":first-child");return D.insert(()=>S,":first-child").attr("stroke-opacity",0),D.insert(()=>b,":first-child"),D.insert(()=>v,":first-child"),D.attr("class","text"),h&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${l-l/4}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),V(t,D),t.intersect=function(R){return j.polygon(t,d,R)},n}p(Td,"curlyBraces");async function Bd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,et(t)),o=80,s=20,c=Math.max(o,(a.width+(t.padding??0)*2)*1.25,t?.width??0),l=Math.max(s,a.height+(t.padding??0)*2,t?.height??0),h=l/2,{cssStyles:u}=t,f=Y.svg(n),d=G(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=c,m=l,y=g-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},...To(-y,-m/2,h,50,270,90)],C=ct(b),k=f.path(C,d),v=n.insert(()=>k,":first-child");return v.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-c/2}, ${-l/2})`),V(t,v),t.intersect=function(B){return j.polygon(t,b,B)},n}p(Bd,"curvedTrapezoid");var Z_=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),K_=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),Q_=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Ld(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,et(t)),s=Math.max(a.width+t.padding,t.width??0),c=s/2,l=c/(2.5+s/50),h=Math.max(a.height+l+t.padding,t.height??0);let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=Y.svg(n),g=K_(0,0,s,h,c,l),m=Q_(0,l,s,h,c,l),y=d.path(g,G(t,{})),x=d.path(m,G(t,{fill:"none"}));u=n.insert(()=>x,":first-child"),u=n.insert(()=>y,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const d=Z_(0,0,s,h,c,l);u=n.insert("path",":first-child").attr("d",d).attr("class","basic label-container").attr("style",Nt(f)).attr("style",i)}return u.attr("label-offset-y",l),u.attr("transform",`translate(${-s/2}, ${-(h/2+l)})`),V(t,u),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(t.padding??0)/1.5-(a.y-(a.top??0))})`),t.intersect=function(d){const g=j.rect(t,d),m=g.x-(t.x??0);if(c!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-l)){let y=l*l*(1-m*m/(c*c));y>0&&(y=Math.sqrt(y)),y=l-y,d.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},n}p(Ld,"cylinder");async function Ad(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,et(t)),s=a.width+t.padding,c=a.height+t.padding,l=c*.2,h=-s/2,u=-c/2-l/2,{cssStyles:f}=t,d=Y.svg(n),g=G(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+l},{x:-h,y:u+l},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+l}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${h+(t.padding??0)/2-(a.x-(a.left??0))}, ${u+l+(t.padding??0)/2-(a.y-(a.top??0))})`),V(t,x),t.intersect=function(b){return j.rect(t,b)},n}p(Ad,"dividedRectangle");async function Ed(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o}=await it(e,t,et(t)),c=a.width/2+o+5,l=a.width/2+o;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=Y.svg(n),d=G(t,{roughness:.2,strokeWidth:2.5}),g=G(t,{roughness:.2,strokeWidth:1.5}),m=f.circle(0,0,c*2,d),y=f.circle(0,0,l*2,g);h=n.insert("g",":first-child"),h.attr("class",Nt(t.cssClasses)).attr("style",Nt(u)),h.node()?.appendChild(m),h.node()?.appendChild(y)}else{h=n.insert("g",":first-child");const f=h.insert("circle",":first-child"),d=h.insert("circle");h.attr("class","basic label-container").attr("style",i),f.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),d.attr("class","inner-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0)}return V(t,h),t.intersect=function(f){return O.info("DoubleCircle intersect",t,c,f),j.circle(t,c,f)},n}p(Ed,"doublecircle");function Md(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=X(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",et(t)).attr("id",t.domId??t.id),o=7,{cssStyles:s}=t,c=Y.svg(a),{nodeBorder:l}=r,h=G(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=c.circle(0,0,o*2,h),f=a.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${l} !important;`),s&&s.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),V(t,f),t.intersect=function(d){return O.info("filledCircle intersect",t,{radius:o,point:d}),j.circle(t,o,d)},a}p(Md,"filledCircle");async function Fd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,et(t)),s=a.width+(t.padding??0),c=s+a.height,l=s+a.height,h=[{x:0,y:-c},{x:l,y:-c},{x:l/2,y:0}],{cssStyles:u}=t,f=Y.svg(n),d=G(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=ct(h),m=f.path(g,d),y=n.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=s,t.height=c,V(t,y),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-c/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(x){return O.info("Triangle intersect",t,h,x),j.polygon(t,h,x)},n}p(Fd,"flippedTriangle");function Od(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:a}=X(t);t.label="";const o=e.insert("g").attr("class",et(t)).attr("id",t.domId??t.id),{cssStyles:s}=t;let c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);r==="LR"&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));const h=-1*c/2,u=-1*l/2,f=Y.svg(o),d=G(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=f.rectangle(h,u,c,l,d),m=o.insert(()=>g,":first-child");s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),V(t,m);const y=i?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return j.rect(t,x)},o}p(Od,"forkJoin");async function $d(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const n=80,a=50,{shapeSvg:o,bbox:s}=await it(e,t,et(t)),c=Math.max(n,s.width+(t.padding??0)*2,t?.width??0),l=Math.max(a,s.height+(t.padding??0)*2,t?.height??0),h=l/2,{cssStyles:u}=t,f=Y.svg(o),d=G(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-c/2,y:-l/2},{x:c/2-h,y:-l/2},...To(-c/2+h,0,h,50,90,270),{x:c/2-h,y:l/2},{x:-c/2,y:l/2}],m=ct(g),y=f.path(m,d),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),V(t,x),t.intersect=function(b){return O.info("Pill intersect",t,{radius:h,point:b}),j.polygon(t,g,b)},o}p($d,"halfRoundedRectangle");var J_=p((e,t,r,i,n)=>[`M${e+n},${t}`,`L${e+r-n},${t}`,`L${e+r},${t-i/2}`,`L${e+r-n},${t-i}`,`L${e+n},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Dd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,et(t)),o=4,s=a.height+t.padding,c=s/o,l=a.width+2*c+t.padding,h=[{x:c,y:0},{x:l-c,y:0},{x:l,y:-s/2},{x:l-c,y:-s},{x:c,y:-s},{x:0,y:-s/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=Y.svg(n),g=G(t,{}),m=J_(0,0,l,s,c),y=d.path(m,g);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),f&&u.attr("style",f)}else u=De(n,l,s,h);return i&&u.attr("style",i),t.width=l,t.height=s,V(t,u),t.intersect=function(d){return j.polygon(t,h,d)},n}p(Dd,"hexagon");async function Rd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await it(e,t,et(t)),a=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:s}=t,c=Y.svg(n),l=G(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=ct(h),f=c.path(u,l),d=n.insert(()=>f,":first-child");return d.attr("class","basic label-container"),s&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",s),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-a/2}, ${-o/2})`),V(t,d),t.intersect=function(g){return O.info("Pill intersect",t,{points:h}),j.polygon(t,h,g)},n}p(Rd,"hourglass");async function Id(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=X(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=i?.wrappingWidth;t.width=Math.max(s,c??0);const{shapeSvg:l,bbox:h,label:u}=await it(e,t,"icon-shape default"),f=t.pos==="t",d=s,g=s,{nodeBorder:m}=r,{stylesMap:y}=Pr(t),x=-g/2,b=-d/2,C=t.label?8:0,k=Y.svg(l),v=G(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const B=k.rectangle(x,b,g,d,v),S=Math.max(g,h.width),D=d+h.height+C,R=k.rectangle(-S/2,-D/2,S,D,{...v,fill:"transparent",stroke:"none"}),$=l.insert(()=>B,":first-child"),L=l.insert(()=>R);if(t.icon){const z=l.append("g");z.html(`<g>${await Vn(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const P=z.node().getBBox(),M=P.width,E=P.height,T=P.x,F=P.y;z.attr("transform",`translate(${-M/2-T},${f?h.height/2+C/2-E/2-F:-h.height/2-C/2-E/2-F})`),z.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-D/2:D/2-h.height})`),$.attr("transform",`translate(0,${f?h.height/2+C/2:-h.height/2-C/2})`),V(t,L),t.intersect=function(z){if(O.info("iconSquare intersect",t,z),!t.label)return j.rect(t,z);const P=t.x??0,M=t.y??0,E=t.height??0;let T=[];return f?T=[{x:P-h.width/2,y:M-E/2},{x:P+h.width/2,y:M-E/2},{x:P+h.width/2,y:M-E/2+h.height+C},{x:P+g/2,y:M-E/2+h.height+C},{x:P+g/2,y:M+E/2},{x:P-g/2,y:M+E/2},{x:P-g/2,y:M-E/2+h.height+C},{x:P-h.width/2,y:M-E/2+h.height+C}]:T=[{x:P-g/2,y:M-E/2},{x:P+g/2,y:M-E/2},{x:P+g/2,y:M-E/2+d},{x:P+h.width/2,y:M-E/2+d},{x:P+h.width/2/2,y:M+E/2},{x:P-h.width/2,y:M+E/2},{x:P-h.width/2,y:M-E/2+d},{x:P-g/2,y:M-E/2+d}],j.polygon(t,T,z)},l}p(Id,"icon");async function Pd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=X(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=i?.wrappingWidth;t.width=Math.max(s,c??0);const{shapeSvg:l,bbox:h,label:u}=await it(e,t,"icon-shape default"),f=20,d=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=Pr(t),b=Y.svg(l),C=G(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=x.get("fill");C.stroke=k??y;const v=l.append("g");t.icon&&v.html(`<g>${await Vn(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const B=v.node().getBBox(),S=B.width,D=B.height,R=B.x,$=B.y,L=Math.max(S,D)*Math.SQRT2+f*2,z=b.circle(0,0,L,C),P=Math.max(L,h.width),M=L+h.height+d,E=b.rectangle(-P/2,-M/2,P,M,{...C,fill:"transparent",stroke:"none"}),T=l.insert(()=>z,":first-child"),F=l.insert(()=>E);return v.attr("transform",`translate(${-S/2-R},${g?h.height/2+d/2-D/2-$:-h.height/2-d/2-D/2-$})`),v.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-M/2:M/2-h.height})`),T.attr("transform",`translate(0,${g?h.height/2+d/2:-h.height/2-d/2})`),V(t,F),t.intersect=function(A){return O.info("iconSquare intersect",t,A),j.rect(t,A)},l}p(Pd,"iconCircle");async function Nd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=X(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=i?.wrappingWidth;t.width=Math.max(s,c??0);const{shapeSvg:l,bbox:h,halfPadding:u,label:f}=await it(e,t,"icon-shape default"),d=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Pr(t),C=-m/2,k=-g/2,v=t.label?8:0,B=Y.svg(l),S=G(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const D=b.get("fill");S.stroke=D??x;const R=B.path($e(C,k,m,g,5),S),$=Math.max(m,h.width),L=g+h.height+v,z=B.rectangle(-$/2,-L/2,$,L,{...S,fill:"transparent",stroke:"none"}),P=l.insert(()=>R,":first-child").attr("class","icon-shape2"),M=l.insert(()=>z);if(t.icon){const E=l.append("g");E.html(`<g>${await Vn(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const T=E.node().getBBox(),F=T.width,A=T.height,N=T.x,q=T.y;E.attr("transform",`translate(${-F/2-N},${d?h.height/2+v/2-A/2-q:-h.height/2-v/2-A/2-q})`),E.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-L/2:L/2-h.height})`),P.attr("transform",`translate(0,${d?h.height/2+v/2:-h.height/2-v/2})`),V(t,M),t.intersect=function(E){if(O.info("iconSquare intersect",t,E),!t.label)return j.rect(t,E);const T=t.x??0,F=t.y??0,A=t.height??0;let N=[];return d?N=[{x:T-h.width/2,y:F-A/2},{x:T+h.width/2,y:F-A/2},{x:T+h.width/2,y:F-A/2+h.height+v},{x:T+m/2,y:F-A/2+h.height+v},{x:T+m/2,y:F+A/2},{x:T-m/2,y:F+A/2},{x:T-m/2,y:F-A/2+h.height+v},{x:T-h.width/2,y:F-A/2+h.height+v}]:N=[{x:T-m/2,y:F-A/2},{x:T+m/2,y:F-A/2},{x:T+m/2,y:F-A/2+g},{x:T+h.width/2,y:F-A/2+g},{x:T+h.width/2/2,y:F+A/2},{x:T-h.width/2,y:F+A/2},{x:T-h.width/2,y:F-A/2+g},{x:T-m/2,y:F-A/2+g}],j.polygon(t,N,E)},l}p(Nd,"iconRounded");async function zd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=X(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=i?.wrappingWidth;t.width=Math.max(s,c??0);const{shapeSvg:l,bbox:h,halfPadding:u,label:f}=await it(e,t,"icon-shape default"),d=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Pr(t),C=-m/2,k=-g/2,v=t.label?8:0,B=Y.svg(l),S=G(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const D=b.get("fill");S.stroke=D??x;const R=B.path($e(C,k,m,g,.1),S),$=Math.max(m,h.width),L=g+h.height+v,z=B.rectangle(-$/2,-L/2,$,L,{...S,fill:"transparent",stroke:"none"}),P=l.insert(()=>R,":first-child"),M=l.insert(()=>z);if(t.icon){const E=l.append("g");E.html(`<g>${await Vn(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const T=E.node().getBBox(),F=T.width,A=T.height,N=T.x,q=T.y;E.attr("transform",`translate(${-F/2-N},${d?h.height/2+v/2-A/2-q:-h.height/2-v/2-A/2-q})`),E.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-L/2:L/2-h.height})`),P.attr("transform",`translate(0,${d?h.height/2+v/2:-h.height/2-v/2})`),V(t,M),t.intersect=function(E){if(O.info("iconSquare intersect",t,E),!t.label)return j.rect(t,E);const T=t.x??0,F=t.y??0,A=t.height??0;let N=[];return d?N=[{x:T-h.width/2,y:F-A/2},{x:T+h.width/2,y:F-A/2},{x:T+h.width/2,y:F-A/2+h.height+v},{x:T+m/2,y:F-A/2+h.height+v},{x:T+m/2,y:F+A/2},{x:T-m/2,y:F+A/2},{x:T-m/2,y:F-A/2+h.height+v},{x:T-h.width/2,y:F-A/2+h.height+v}]:N=[{x:T-m/2,y:F-A/2},{x:T+m/2,y:F-A/2},{x:T+m/2,y:F-A/2+g},{x:T+h.width/2,y:F-A/2+g},{x:T+h.width/2/2,y:F+A/2},{x:T-h.width/2,y:F+A/2},{x:T-h.width/2,y:F-A/2+g},{x:T-m/2,y:F-A/2+g}],j.polygon(t,N,E)},l}p(zd,"iconSquare");async function Wd(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/a;const{labelStyles:o}=X(t);t.labelStyle=o;const s=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const c=Math.max(t.label?s??0:0,t?.assetWidth??n),l=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:c,h=t.constraint==="on"?l/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(l,s??0);const{shapeSvg:u,bbox:f,label:d}=await it(e,t,"image-shape default"),g=t.pos==="t",m=-l/2,y=-h/2,x=t.label?8:0,b=Y.svg(u),C=G(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=b.rectangle(m,y,l,h,C),v=Math.max(l,f.width),B=h+f.height+x,S=b.rectangle(-v/2,-B/2,v,B,{...C,fill:"none",stroke:"none"}),D=u.insert(()=>k,":first-child"),R=u.insert(()=>S);if(t.img){const $=u.append("image");$.attr("href",t.img),$.attr("width",l),$.attr("height",h),$.attr("preserveAspectRatio","none"),$.attr("transform",`translate(${-l/2},${g?B/2-h:-B/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),D.attr("transform",`translate(0,${g?f.height/2+x/2:-f.height/2-x/2})`),V(t,R),t.intersect=function($){if(O.info("iconSquare intersect",t,$),!t.label)return j.rect(t,$);const L=t.x??0,z=t.y??0,P=t.height??0;let M=[];return g?M=[{x:L-f.width/2,y:z-P/2},{x:L+f.width/2,y:z-P/2},{x:L+f.width/2,y:z-P/2+f.height+x},{x:L+l/2,y:z-P/2+f.height+x},{x:L+l/2,y:z+P/2},{x:L-l/2,y:z+P/2},{x:L-l/2,y:z-P/2+f.height+x},{x:L-f.width/2,y:z-P/2+f.height+x}]:M=[{x:L-l/2,y:z-P/2},{x:L+l/2,y:z-P/2},{x:L+l/2,y:z-P/2+h},{x:L+f.width/2,y:z-P/2+h},{x:L+f.width/2/2,y:z+P/2},{x:L-f.width/2,y:z+P/2},{x:L-f.width/2,y:z-P/2+h},{x:L-l/2,y:z-P/2+h}],j.polygon(t,M,$)},u}p(Wd,"imageSquare");async function qd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,et(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),s=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Y.svg(n),f=G(t,{}),d=ct(c),g=u.path(d,f);l=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&l.attr("style",h)}else l=De(n,o,s,c);return i&&l.attr("style",i),t.width=o,t.height=s,V(t,l),t.intersect=function(u){return j.polygon(t,c,u)},n}p(qd,"inv_trapezoid");async function Fi(e,t,r){const{labelStyles:i,nodeStyles:n}=X(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await it(e,t,et(t)),s=Math.max(o.width+r.labelPaddingX*2,t?.width||0),c=Math.max(o.height+r.labelPaddingY*2,t?.height||0),l=-s/2,h=-c/2;let u,{rx:f,ry:d}=t;const{cssStyles:g}=t;if(r?.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const m=Y.svg(a),y=G(t,{}),x=f||d?m.path($e(l,h,s,c,f||0),y):m.rectangle(l,h,s,c,y);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",Nt(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",Nt(f)).attr("ry",Nt(d)).attr("x",l).attr("y",h).attr("width",s).attr("height",c);return V(t,u),t.intersect=function(m){return j.rect(t,m)},a}p(Fi,"drawRect");async function Hd(e,t){const{shapeSvg:r,bbox:i,label:n}=await it(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),V(t,a),t.intersect=function(c){return j.rect(t,c)},r}p(Hd,"labelRect");async function jd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,et(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),s=Math.max(a.height+(t.padding??0),t?.height??0),c=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-(3*s)/6,y:-s}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Y.svg(n),f=G(t,{}),d=ct(c),g=u.path(d,f);l=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&l.attr("style",h)}else l=De(n,o,s,c);return i&&l.attr("style",i),t.width=o,t.height=s,V(t,l),t.intersect=function(u){return j.polygon(t,c,u)},n}p(jd,"lean_left");async function Yd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,et(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),s=Math.max(a.height+(t.padding??0),t?.height??0),c=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Y.svg(n),f=G(t,{}),d=ct(c),g=u.path(d,f);l=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&l.attr("style",h)}else l=De(n,o,s,c);return i&&l.attr("style",i),t.width=o,t.height=s,V(t,l),t.intersect=function(u){return j.polygon(t,c,u)},n}p(Yd,"lean_right");function Ud(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",et(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,t?.width??0),s=Math.max(35,t?.height??0),c=7,l=[{x:o,y:0},{x:0,y:s+c/2},{x:o-2*c,y:s+c/2},{x:0,y:2*s},{x:o,y:s-c/2},{x:2*c,y:s-c/2}],h=Y.svg(n),u=G(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=ct(l),d=h.path(f,u),g=n.insert(()=>d,":first-child");return a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-s})`),V(t,g),t.intersect=function(m){return O.info("lightningBolt intersect",t,m),j.polygon(t,l,m)},n}p(Ud,"lightningBolt");var tk=p((e,t,r,i,n,a,o)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),ek=p((e,t,r,i,n,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),rk=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Gd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,et(t)),s=Math.max(a.width+(t.padding??0),t.width??0),c=s/2,l=c/(2.5+s/50),h=Math.max(a.height+l+(t.padding??0),t.height??0),u=h*.1;let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=Y.svg(n),m=ek(0,0,s,h,c,l,u),y=rk(0,l,s,h,c,l),x=G(t,{}),b=g.path(m,x),C=g.path(y,x);n.insert(()=>C,":first-child").attr("class","line"),f=n.insert(()=>b,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{const g=tk(0,0,s,h,c,l,u);f=n.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Nt(d)).attr("style",i)}return f.attr("label-offset-y",l),f.attr("transform",`translate(${-s/2}, ${-(h/2+l)})`),V(t,f),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+l-(a.y-(a.top??0))})`),t.intersect=function(g){const m=j.rect(t,g),y=m.x-(t.x??0);if(c!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-l)){let x=l*l*(1-y*y/(c*c));x>0&&(x=Math.sqrt(x)),x=l-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},n}p(Gd,"linedCylinder");async function Vd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,et(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/4,h=c+l,{cssStyles:u}=t,f=Y.svg(n),d=G(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-s/2-s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:h/2},...qe(-s/2-s/2*.1,h/2,s/2+s/2*.1,h/2,l,.8),{x:s/2+s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:-h/2},{x:-s/2,y:-h/2},{x:-s/2,y:h/2*1.1},{x:-s/2,y:-h/2}],m=f.polygon(g.map(x=>[x.x,x.y]),d),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)+s/2*.1/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),V(t,y),t.intersect=function(x){return j.polygon(t,g,x)},n}p(Vd,"linedWaveEdgedRect");async function Xd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,et(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=5,h=-s/2,u=-c/2,{cssStyles:f}=t,d=Y.svg(n),g=G(t,{}),m=[{x:h-l,y:u+l},{x:h-l,y:u+c+l},{x:h+s-l,y:u+c+l},{x:h+s-l,y:u+c},{x:h+s,y:u+c},{x:h+s,y:u+c-l},{x:h+s+l,y:u+c-l},{x:h+s+l,y:u-l},{x:h+l,y:u-l},{x:h+l,y:u},{x:h,y:u},{x:h,y:u+l}],y=[{x:h,y:u+l},{x:h+s-l,y:u+l},{x:h+s-l,y:u+c},{x:h+s,y:u+c},{x:h+s,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ct(m),b=d.path(x,g),C=ct(y),k=d.path(C,{...g,fill:"none"}),v=n.insert(()=>k,":first-child");return v.insert(()=>b,":first-child"),v.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(a.width/2)-l-(a.x-(a.left??0))}, ${-(a.height/2)+l-(a.y-(a.top??0))})`),V(t,v),t.intersect=function(B){return j.polygon(t,m,B)},n}p(Xd,"multiRect");async function Zd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,et(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/4,h=c+l,u=-s/2,f=-h/2,d=5,{cssStyles:g}=t,m=qe(u-d,f+h+d,u+s-d,f+h+d,l,.8),y=m?.[m.length-1],x=[{x:u-d,y:f+d},{x:u-d,y:f+h+d},...m,{x:u+s-d,y:y.y-d},{x:u+s,y:y.y-d},{x:u+s,y:y.y-2*d},{x:u+s+d,y:y.y-2*d},{x:u+s+d,y:f-d},{x:u+d,y:f-d},{x:u+d,y:f},{x:u,y:f},{x:u,y:f+d}],b=[{x:u,y:f+d},{x:u+s-d,y:f+d},{x:u+s-d,y:y.y-d},{x:u+s,y:y.y-d},{x:u+s,y:f},{x:u,y:f}],C=Y.svg(n),k=G(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=ct(x),B=C.path(v,k),S=ct(b),D=C.path(S,k),R=n.insert(()=>B,":first-child");return R.insert(()=>D),R.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",i),R.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-(a.width/2)-d-(a.x-(a.left??0))}, ${-(a.height/2)+d-l/2-(a.y-(a.top??0))})`),V(t,R),t.intersect=function($){return j.polygon(t,x,$)},n}p(Zd,"multiWaveEdgedRectangle");async function Kd(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=X(t);t.labelStyle=i,t.useHtmlLabels||Ut().flowchart?.htmlLabels!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:s}=await it(e,t,et(t)),c=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),h=-c/2,u=-l/2,{cssStyles:f}=t,d=Y.svg(o),g=G(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=d.rectangle(h,u,c,l,g),y=o.insert(()=>m,":first-child");return y.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",f),n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),V(t,y),t.intersect=function(x){return j.rect(t,x)},o}p(Kd,"note");var ik=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Qd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,et(t)),o=a.width+t.padding,s=a.height+t.padding,c=o+s,l=[{x:c/2,y:0},{x:c,y:-c/2},{x:c/2,y:-c},{x:0,y:-c/2}];let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=Y.svg(n),d=G(t,{}),g=ik(0,0,c),m=f.path(g,d);h=n.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`),u&&h.attr("style",u)}else h=De(n,c,c,l);return i&&h.attr("style",i),V(t,h),t.intersect=function(f){return O.debug(`APA12 Intersect called SPLIT
185
+ point:`,f,`
186
+ node:
187
+ `,t,`
188
+ res:`,j.polygon(t,l,f)),j.polygon(t,l,f)},n}p(Qd,"question");async function Jd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,et(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),c=Math.max(a.height+(t.padding??0),t?.height??0),l=-s/2,h=-c/2,u=h/2,f=[{x:l+u,y:h},{x:l,y:0},{x:l+u,y:-h},{x:-l,y:-h},{x:-l,y:h}],{cssStyles:d}=t,g=Y.svg(n),m=G(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=ct(f),x=g.path(y,m),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),V(t,b),t.intersect=function(C){return j.polygon(t,f,C)},n}p(Jd,"rect_left_inv_arrow");async function tp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=a.insert("g"),s=a.insert("g").attr("class","label").attr("style",i),c=t.description,l=t.label,h=s.node().appendChild(await Je(l,t.labelStyle,!0,!0));let u={width:0,height:0};if(kt(ht()?.flowchart?.htmlLabels)){const D=h.children[0],R=lt(h);u=D.getBoundingClientRect(),R.attr("width",u.width),R.attr("height",u.height)}O.info("Text 2",c);const f=c||[],d=h.getBBox(),g=s.node().appendChild(await Je(f.join?f.join("<br/>"):f,t.labelStyle,!0,!0)),m=g.children[0],y=lt(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;lt(g).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+x+5)+")"),lt(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=s.node().getBBox(),s.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),C=u.height+(t.padding||0),k=-u.width/2-x,v=-u.height/2-x;let B,S;if(t.look==="handDrawn"){const D=Y.svg(a),R=G(t,{}),$=D.path($e(k,v,b,C,t.rx||0),R),L=D.line(-u.width/2-x,-u.height/2-x+d.height+x,u.width/2+x,-u.height/2-x+d.height+x,R);S=a.insert(()=>(O.debug("Rough node insert CXC",$),L),":first-child"),B=a.insert(()=>(O.debug("Rough node insert CXC",$),$),":first-child")}else B=o.insert("rect",":first-child"),S=o.insert("line"),B.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),S.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+d.height+x).attr("y2",-u.height/2-x+d.height+x);return V(t,B),t.intersect=function(D){return j.rect(t,D)},a}p(tp,"rectWithTitle");async function ep(e,t){const r={rx:5,ry:5,labelPaddingX:(t?.padding||0)*1,labelPaddingY:(t?.padding||0)*1};return Fi(e,t,r)}p(ep,"roundedRect");async function rp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,et(t)),s=t?.padding??0,c=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=-a.width/2-s,u=-a.height/2-s,{cssStyles:f}=t,d=Y.svg(n),g=G(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+c+8,y:u},{x:h+c+8,y:u+l},{x:h-8,y:u+l},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+l}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",Nt(f)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-c/2+4+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-(a.y-(a.top??0))})`),V(t,x),t.intersect=function(b){return j.rect(t,b)},n}p(rp,"shadedProcess");async function ip(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,et(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=-s/2,h=-c/2,{cssStyles:u}=t,f=Y.svg(n),d=G(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:l,y:h},{x:l,y:h+c},{x:l+s,y:h+c},{x:l+s,y:h-c/2}],m=ct(g),y=f.path(m,d),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${c/4})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))}, ${-c/4+(t.padding??0)-(a.y-(a.top??0))})`),V(t,x),t.intersect=function(b){return j.polygon(t,g,b)},n}p(ip,"slopedRect");async function np(e,t){const r={rx:0,ry:0,labelPaddingX:(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return Fi(e,t,r)}p(np,"squareRect");async function ap(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,et(t)),o=a.height+t.padding,s=a.width+o/4+t.padding;let c;const{cssStyles:l}=t;if(t.look==="handDrawn"){const h=Y.svg(n),u=G(t,{}),f=$e(-s/2,-o/2,s,o,o/2),d=h.path(f,u);c=n.insert(()=>d,":first-child"),c.attr("class","basic label-container").attr("style",Nt(l))}else c=n.insert("rect",":first-child"),c.attr("class","basic label-container").attr("style",i).attr("rx",o/2).attr("ry",o/2).attr("x",-s/2).attr("y",-o/2).attr("width",s).attr("height",o);return V(t,c),t.intersect=function(h){return j.rect(t,h)},n}p(ap,"stadium");async function sp(e,t){return Fi(e,t,{rx:5,ry:5})}p(sp,"state");function op(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=X(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c}=r,l=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=Y.svg(l),u=G(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:o,strokeWidth:2}),d=s??c,g=h.circle(0,0,5,{...u,fill:d,stroke:d,strokeWidth:2,fillStyle:"solid"}),m=l.insert(()=>f,":first-child");return m.insert(()=>g),a&&m.selectAll("path").attr("style",a),n&&m.selectAll("path").attr("style",n),V(t,m),t.intersect=function(y){return j.circle(t,7,y)},l}p(op,"stateEnd");function lp(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const s=Y.svg(n).circle(0,0,14,I_(i));a=n.insert(()=>s),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=n.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return V(t,a),t.intersect=function(o){return j.circle(t,7,o)},n}p(lp,"stateStart");async function cp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,et(t)),o=(t?.padding||0)/2,s=a.width+t.padding,c=a.height+t.padding,l=-a.width/2-o,h=-a.height/2-o,u=[{x:0,y:0},{x:s,y:0},{x:s,y:-c},{x:0,y:-c},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-c},{x:-8,y:-c},{x:-8,y:0}];if(t.look==="handDrawn"){const f=Y.svg(n),d=G(t,{}),g=f.rectangle(l-8,h,s+16,c,d),m=f.line(l,h,l,h+c,d),y=f.line(l+s,h,l+s,h+c,d);n.insert(()=>m,":first-child"),n.insert(()=>y,":first-child");const x=n.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",Nt(b)),V(t,x)}else{const f=De(n,s,c,u);i&&f.attr("style",i),V(t,f)}return t.intersect=function(f){return j.polygon(t,u,f)},n}p(cp,"subroutine");async function hp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,et(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),s=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=-o/2,l=-s/2,h=.2*s,u=.2*s,{cssStyles:f}=t,d=Y.svg(n),g=G(t,{}),m=[{x:c-h/2,y:l},{x:c+o+h/2,y:l},{x:c+o+h/2,y:l+s},{x:c-h/2,y:l+s}],y=[{x:c+o-h/2,y:l+s},{x:c+o+h/2,y:l+s},{x:c+o+h/2,y:l+s-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ct(m),b=d.path(x,g),C=ct(y),k=d.path(C,{...g,fillStyle:"solid"}),v=n.insert(()=>k,":first-child");return v.insert(()=>b,":first-child"),v.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),V(t,v),t.intersect=function(B){return j.polygon(t,m,B)},n}p(hp,"taggedRect");async function up(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,et(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/4,h=.2*s,u=.2*c,f=c+l,{cssStyles:d}=t,g=Y.svg(n),m=G(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-s/2-s/2*.1,y:f/2},...qe(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],x=-s/2+s/2*.1,b=-f/2-u*.4,C=[{x:x+s-h,y:(b+c)*1.4},{x:x+s,y:b+c-u},{x:x+s,y:(b+c)*.9},...qe(x+s,(b+c)*1.3,x+s-h,(b+c)*1.5,-c*.03,.5)],k=ct(y),v=g.path(k,m),B=ct(C),S=g.path(B,{...m,fillStyle:"solid"}),D=n.insert(()=>S,":first-child");return D.insert(()=>v,":first-child"),D.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),V(t,D),t.intersect=function(R){return j.polygon(t,y,R)},n}p(up,"taggedWaveEdgedRectangle");async function fp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,et(t)),o=Math.max(a.width+t.padding,t?.width||0),s=Math.max(a.height+t.padding,t?.height||0),c=-o/2,l=-s/2,h=n.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",c).attr("y",l).attr("width",o).attr("height",s),V(t,h),t.intersect=function(u){return j.rect(t,u)},n}p(fp,"text");var nk=p((e,t,r,i,n,a)=>`M${e},${t}
189
+ a${n},${a} 0,0,1 0,${-i}
190
+ l${r},0
191
+ a${n},${a} 0,0,1 0,${i}
192
+ M${r},${-i}
193
+ a${n},${a} 0,0,0 0,${i}
194
+ l${-r},0`,"createCylinderPathD"),ak=p((e,t,r,i,n,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),sk=p((e,t,r,i,n,a)=>[`M${e+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function dp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o,halfPadding:s}=await it(e,t,et(t)),c=t.look==="neo"?s*2:s,l=a.height+c,h=l/2,u=h/(2.5+l/50),f=a.width+u+c,{cssStyles:d}=t;let g;if(t.look==="handDrawn"){const m=Y.svg(n),y=ak(0,0,f,l,u,h),x=sk(0,0,f,l,u,h),b=m.path(y,G(t,{})),C=m.path(x,G(t,{fill:"none"}));g=n.insert(()=>C,":first-child"),g=n.insert(()=>b,":first-child"),g.attr("class","basic label-container"),d&&g.attr("style",d)}else{const m=nk(0,0,f,l,u,h);g=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Nt(d)).attr("style",i),g.attr("class","basic label-container"),d&&g.selectAll("path").attr("style",d),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-f/2}, ${l/2} )`),o.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),V(t,g),t.intersect=function(m){const y=j.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},n}p(dp,"tiltedCylinder");async function pp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,et(t)),o=a.width+t.padding,s=a.height+t.padding,c=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Y.svg(n),f=G(t,{}),d=ct(c),g=u.path(d,f);l=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&l.attr("style",h)}else l=De(n,o,s,c);return i&&l.attr("style",i),t.width=o,t.height=s,V(t,l),t.intersect=function(u){return j.polygon(t,c,u)},n}p(pp,"trapezoid");async function gp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,et(t)),o=60,s=20,c=Math.max(o,a.width+(t.padding??0)*2,t?.width??0),l=Math.max(s,a.height+(t.padding??0)*2,t?.height??0),{cssStyles:h}=t,u=Y.svg(n),f=G(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=[{x:-c/2*.8,y:-l/2},{x:c/2*.8,y:-l/2},{x:c/2,y:-l/2*.6},{x:c/2,y:l/2},{x:-c/2,y:l/2},{x:-c/2,y:-l/2*.6}],g=ct(d),m=u.path(g,f),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),V(t,y),t.intersect=function(x){return j.polygon(t,d,x)},n}p(gp,"trapezoidalPentagon");async function mp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,et(t)),s=kt(ht().flowchart?.htmlLabels),c=a.width+(t.padding??0),l=c+a.height,h=c+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-l}],{cssStyles:f}=t,d=Y.svg(n),g=G(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=ct(u),y=d.path(m,g),x=n.insert(()=>y,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return f&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=c,t.height=l,V(t,x),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${l/2-(a.height+(t.padding??0)/(s?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(b){return O.info("Triangle intersect",t,u,b),j.polygon(t,u,b)},n}p(mp,"triangle");async function yp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,et(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,h=c+l,{cssStyles:u}=t,d=70-s,g=d>0?d/2:0,m=Y.svg(n),y=G(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-s/2-g,y:h/2},...qe(-s/2-g,h/2,s/2+g,h/2,l,.8),{x:s/2+g,y:-h/2},{x:-s/2-g,y:-h/2}],b=ct(x),C=m.path(b,y),k=n.insert(()=>C,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l-(a.y-(a.top??0))})`),V(t,k),t.intersect=function(v){return j.polygon(t,x,v)},n}p(yp,"waveEdgedRectangle");async function xp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,et(t)),o=100,s=50,c=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=c/l;let u=c,f=l;u>f*h?f=u/h:u=f*h,u=Math.max(u,o),f=Math.max(f,s);const d=Math.min(f*.2,f/4),g=f+d*2,{cssStyles:m}=t,y=Y.svg(n),x=G(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},...qe(-u/2,g/2,u/2,g/2,d,1),{x:u/2,y:-g/2},...qe(u/2,-g/2,-u/2,-g/2,d,-1)],C=ct(b),k=y.path(C,x),v=n.insert(()=>k,":first-child");return v.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),V(t,v),t.intersect=function(B){return j.polygon(t,b,B)},n}p(xp,"waveRectangle");async function bp(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,et(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=5,h=-s/2,u=-c/2,{cssStyles:f}=t,d=Y.svg(n),g=G(t,{}),m=[{x:h-l,y:u-l},{x:h-l,y:u+c},{x:h+s,y:u+c},{x:h+s,y:u-l}],y=`M${h-l},${u-l} L${h+s},${u-l} L${h+s},${u+c} L${h-l},${u+c} L${h-l},${u-l}
195
+ M${h-l},${u} L${h+s},${u}
196
+ M${h},${u-l} L${h},${u+c}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=d.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("transform",`translate(${l/2}, ${l/2})`),b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(a.width/2)+l/2-(a.x-(a.left??0))}, ${-(a.height/2)+l/2-(a.y-(a.top??0))})`),V(t,b),t.intersect=function(C){return j.polygon(t,m,C)},n}p(bp,"windowPane");async function Bo(e,t){const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:N}=Ut(),{background:q}=N,Z={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${q}`]};await Bo(e,Z)}const i=Ut();t.useHtmlLabels=i.htmlLabels;let n=i.er?.diagramPadding??10,a=i.er?.entityPadding??6;const{cssStyles:o}=t,{labelStyles:s}=X(t);if(r.attributes.length===0&&t.label){const N={rx:0,ry:0,labelPaddingX:n,labelPaddingY:n*1.5};Me(t.label,i)+N.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const q=await Fi(e,t,N);if(!kt(i.htmlLabels)){const Z=q.select("text"),at=Z.node()?.getBBox();Z.attr("transform",`translate(${-at.width/2}, 0)`)}return q}i.htmlLabels||(n*=1.25,a*=1.25);let c=et(t);c||(c="node default");const l=e.insert("g").attr("class",c).attr("id",t.domId||t.id),h=await br(l,t.label??"",i,0,0,["name"],s);h.height+=a;let u=0;const f=[];let d=0,g=0,m=0,y=0,x=!0,b=!0;for(const N of r.attributes){const q=await br(l,N.type,i,0,u,["attribute-type"],s);d=Math.max(d,q.width+n);const Z=await br(l,N.name,i,0,u,["attribute-name"],s);g=Math.max(g,Z.width+n);const at=await br(l,N.keys.join(),i,0,u,["attribute-keys"],s);m=Math.max(m,at.width+n);const nt=await br(l,N.comment,i,0,u,["attribute-comment"],s);y=Math.max(y,nt.width+n),u+=Math.max(q.height,Z.height,at.height,nt.height)+a,f.push(u)}f.pop();let C=4;m<=n&&(x=!1,m=0,C--),y<=n&&(b=!1,y=0,C--);const k=l.node().getBBox();if(h.width+n*2-(d+g+m+y)>0){const N=h.width+n*2-(d+g+m+y);d+=N/C,g+=N/C,m>0&&(m+=N/C),y>0&&(y+=N/C)}const v=d+g+m+y,B=Y.svg(l),S=G(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const D=Math.max(k.width+n*2,t?.width||0,v),R=Math.max(k.height+(f[0]||u)+a,t?.height||0),$=-D/2,L=-R/2;l.selectAll("g:not(:first-child)").each((N,q,Z)=>{const at=lt(Z[q]),nt=at.attr("transform");let pt=0,st=0;if(nt){const $t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(nt);$t&&(pt=parseFloat($t[1]),st=parseFloat($t[2]),at.attr("class").includes("attribute-name")?pt+=d:at.attr("class").includes("attribute-keys")?pt+=d+g:at.attr("class").includes("attribute-comment")&&(pt+=d+g+m))}at.attr("transform",`translate(${$+n/2+pt}, ${st+L+h.height+a/2})`)}),l.select(".name").attr("transform","translate("+-h.width/2+", "+(L+a/2)+")");const z=B.rectangle($,L,D,R,S),P=l.insert(()=>z,":first-child").attr("style",o.join("")),{themeVariables:M}=Ut(),{rowEven:E,rowOdd:T,nodeBorder:F}=M;f.push(0);for(const[N,q]of f.entries()){if(N===0&&f.length>1)continue;const Z=N%2===0&&q!==0,at=B.rectangle($,h.height+L+q,D,h.height,{...S,fill:Z?E:T,stroke:F});l.insert(()=>at,"g.label").attr("style",o.join("")).attr("class",`row-rect-${N%2===0?"even":"odd"}`)}let A=B.line($,h.height+L,D+$,h.height+L,S);l.insert(()=>A).attr("class","divider"),A=B.line(d+$,h.height+L,d+$,R+L,S),l.insert(()=>A).attr("class","divider"),x&&(A=B.line(d+g+$,h.height+L,d+g+$,R+L,S),l.insert(()=>A).attr("class","divider")),b&&(A=B.line(d+g+m+$,h.height+L,d+g+m+$,R+L,S),l.insert(()=>A).attr("class","divider"));for(const N of f)A=B.line($,h.height+L+N,D+$,h.height+L+N,S),l.insert(()=>A).attr("class","divider");return V(t,P),t.intersect=function(N){return j.rect(t,N)},l}p(Bo,"erBox");async function br(e,t,r,i=0,n=0,a=[],o=""){const s=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",o);t!==ul(t)&&(t=ul(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const c=s.node().appendChild(await je(s,t,{width:Me(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=c.children[0];for(h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let l=c.getBBox();if(kt(r.htmlLabels)){const h=c.children[0];h.style.textAlign="start";const u=lt(c);l=h.getBoundingClientRect(),u.attr("width",l.width),u.attr("height",l.height)}return l}p(br,"addText");async function Cp(e,t,r,i,n=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",et(t)).attr("id",t.domId||t.id);let s=null,c=null,l=null,h=null,u=0,f=0,d=0;if(s=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await oi(s,{text:`«${b}»`},0),u=s.node().getBBox().height}c=o.insert("g").attr("class","label-group text"),await oi(c,t,0,["font-weight: bolder"]);const g=c.node().getBBox();f=g.height,l=o.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const C=await oi(l,b,m,[b.parseClassifier()]);m+=C+a}d=l.node().getBBox().height,d<=0&&(d=n/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const C=await oi(h,b,y,[b.parseClassifier()]);y+=C+a}let x=o.node().getBBox();if(s!==null){const b=s.node().getBBox();s.attr("transform",`translate(${-b.width/2})`)}return c.attr("transform",`translate(${-g.width/2}, ${u})`),x=o.node().getBBox(),l.attr("transform",`translate(0, ${u+f+n*2})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(d?d+n*4:n*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}p(Cp,"textHelper");async function oi(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Ut();let o="useHtmlLabels"in t?t.useHtmlLabels:kt(a.htmlLabels)??!0,s="";"text"in t?s=t.text:s=t.label,!o&&s.startsWith("\\")&&(s=s.substring(1)),Br(s)&&(o=!0);const c=await je(n,Ns(cr(s)),{width:Me(s,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let l,h=1;if(o){const u=c.children[0],f=lt(c);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const g=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,k=parseInt(b,10)*5+"px";m.style.minWidth=k,m.style.maxWidth=k}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}l=u.getBoundingClientRect(),f.attr("width",l.width),f.attr("height",l.height)}else{i.includes("font-weight: bolder")&&lt(c).selectAll("tspan").attr("font-weight",""),h=c.children.length;const u=c.children[0];(c.textContent===""||c.textContent.includes("&gt"))&&(u.textContent=s[0]+s.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),s[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),l=c.getBBox()}return n.attr("transform","translate(0,"+(-l.height/(2*h)+r)+")"),l.height}p(oi,"addText");async function wp(e,t){const r=ht(),i=r.class.padding??12,n=i,a=t.useHtmlLabels??kt(r.htmlLabels)??!0,o=t;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:s,bbox:c}=await Cp(e,t,r,a,n),{labelStyles:l,nodeStyles:h}=X(t);t.labelStyle=l,t.cssStyles=o.styles||"";const u=o.styles?.join(";")||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const f=o.members.length===0&&o.methods.length===0&&!r.class?.hideEmptyMembersBox,d=Y.svg(s),g=G(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=c.width;let y=c.height;o.members.length===0&&o.methods.length===0?y+=n:o.members.length>0&&o.methods.length===0&&(y+=n*2);const x=-m/2,b=-y/2,C=d.rectangle(x-i,b-i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0),m+2*i,y+2*i+(f?i*2:o.members.length===0&&o.methods.length===0?-i:0),g),k=s.insert(()=>C,":first-child");k.attr("class","basic label-container");const v=k.node().getBBox();s.selectAll(".text").each((R,$,L)=>{const z=lt(L[$]),P=z.attr("transform");let M=0;if(P){const A=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(P);A&&(M=parseFloat(A[2]))}let E=M+b+i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0);a||(E-=4);let T=x;(z.attr("class").includes("label-group")||z.attr("class").includes("annotation-group"))&&(T=-z.node()?.getBBox().width/2||0,s.selectAll("text").each(function(F,A,N){window.getComputedStyle(N[A]).textAnchor==="middle"&&(T=0)})),z.attr("transform",`translate(${T}, ${E})`)});const B=s.select(".annotation-group").node().getBBox().height-(f?i/2:0)||0,S=s.select(".label-group").node().getBBox().height-(f?i/2:0)||0,D=s.select(".members-group").node().getBBox().height-(f?i/2:0)||0;if(o.members.length>0||o.methods.length>0||f){const R=d.line(v.x,B+S+b+i,v.x+v.width,B+S+b+i,g);s.insert(()=>R).attr("class","divider").attr("style",u)}if(f||o.members.length>0||o.methods.length>0){const R=d.line(v.x,B+S+D+b+n*2+i,v.x+v.width,B+S+D+b+i+n*2,g);s.insert(()=>R).attr("class","divider").attr("style",u)}if(o.look!=="handDrawn"&&s.selectAll("path").attr("style",u),k.select(":nth-child(2)").attr("style",u),s.selectAll(".divider").select("path").attr("style",u),t.labelStyle?s.selectAll("span").attr("style",t.labelStyle):s.selectAll("span").attr("style",u),!a){const R=RegExp(/color\s*:\s*([^;]*)/),$=R.exec(u);if($){const L=$[0].replace("color","fill");s.selectAll("tspan").attr("style",L)}else if(l){const L=R.exec(l);if(L){const z=L[0].replace("color","fill");s.selectAll("tspan").attr("style",z)}}}return V(t,k),t.intersect=function(R){return j.rect(t,R)},s}p(wp,"classBox");async function _p(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const n=t,a=t,o=20,s=20,c="verifyMethod"in t,l=et(t),h=e.insert("g").attr("class",l).attr("id",t.domId??t.id);let u;c?u=await ce(h,`&lt;&lt;${n.type}&gt;&gt;`,0,t.labelStyle):u=await ce(h,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let f=u;const d=await ce(h,n.name,f,t.labelStyle+"; font-weight: bold;");if(f+=d+s,c){const B=await ce(h,`${n.requirementId?`Id: ${n.requirementId}`:""}`,f,t.labelStyle);f+=B;const S=await ce(h,`${n.text?`Text: ${n.text}`:""}`,f,t.labelStyle);f+=S;const D=await ce(h,`${n.risk?`Risk: ${n.risk}`:""}`,f,t.labelStyle);f+=D,await ce(h,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,f,t.labelStyle)}else{const B=await ce(h,`${a.type?`Type: ${a.type}`:""}`,f,t.labelStyle);f+=B,await ce(h,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,f,t.labelStyle)}const g=(h.node()?.getBBox().width??200)+o,m=(h.node()?.getBBox().height??200)+o,y=-g/2,x=-m/2,b=Y.svg(h),C=G(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=b.rectangle(y,x,g,m,C),v=h.insert(()=>k,":first-child");if(v.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((B,S,D)=>{const R=lt(D[S]),$=R.attr("transform");let L=0,z=0;if($){const T=RegExp(/translate\(([^,]+),([^)]+)\)/).exec($);T&&(L=parseFloat(T[1]),z=parseFloat(T[2]))}const P=z-m/2;let M=y+o/2;(S===0||S===1)&&(M=L),R.attr("transform",`translate(${M}, ${P+o})`)}),f>u+d+s){const B=b.line(y,x+u+d+s,y+g,x+u+d+s,C);h.insert(()=>B).attr("style",i)}return V(t,v),t.intersect=function(B){return j.rect(t,B)},h}p(_p,"requirementBox");async function ce(e,t,r,i=""){if(t==="")return 0;const n=e.insert("g").attr("class","label").attr("style",i),a=ht(),o=a.htmlLabels??!0,s=await je(n,Ns(cr(t)),{width:Me(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let c;if(o){const l=s.children[0],h=lt(s);c=l.getBoundingClientRect(),h.attr("width",c.width),h.attr("height",c.height)}else{const l=s.children[0];for(const h of l.children)h.textContent=h.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),i&&h.setAttribute("style",i);c=s.getBBox(),c.height+=6}return n.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}p(ce,"addText");var ok=p(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function kp(e,t,{config:r}){const{labelStyles:i,nodeStyles:n}=X(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:s,bbox:c,label:l}=await it(e,t,et(t)),h=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(u=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),f=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;f?{label:g,bbox:m}=await Ra(f,"ticket"in t&&t.ticket||"",d):{label:g,bbox:m}=await Ra(s,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:x}=await Ra(s,"assigned"in t&&t.assigned||"",d);t.width=o;const b=10,C=t?.width||0,k=Math.max(m.height,x.height)/2,v=Math.max(c.height+b*2,t?.height||0)+k,B=-C/2,S=-v/2;l.attr("transform","translate("+(h-C/2)+", "+(-k-c.height/2)+")"),g.attr("transform","translate("+(h-C/2)+", "+(-k+c.height/2)+")"),y.attr("transform","translate("+(h+C/2-x.width-2*a)+", "+(-k+c.height/2)+")");let D;const{rx:R,ry:$}=t,{cssStyles:L}=t;if(t.look==="handDrawn"){const z=Y.svg(s),P=G(t,{}),M=R||$?z.path($e(B,S,C,v,R||0),P):z.rectangle(B,S,C,v,P);D=s.insert(()=>M,":first-child"),D.attr("class","basic label-container").attr("style",L||null)}else{D=s.insert("rect",":first-child"),D.attr("class","basic label-container __APA__").attr("style",n).attr("rx",R??5).attr("ry",$??5).attr("x",B).attr("y",S).attr("width",C).attr("height",v);const z="priority"in t&&t.priority;if(z){const P=s.append("line"),M=B+2,E=S+Math.floor((R??0)/2),T=S+v-Math.floor((R??0)/2);P.attr("x1",M).attr("y1",E).attr("x2",M).attr("y2",T).attr("stroke-width","4").attr("stroke",ok(z))}}return V(t,D),t.height=v,t.intersect=function(z){return j.rect(t,z)},s}p(kp,"kanbanItem");var lk=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:np},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:ep},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:ap},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:cp},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Ld},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:wd},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Qd},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Dd},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Yd},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:jd},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:pp},{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:qd},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Ed},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:fp},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:bd},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:rp},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:lp},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:op},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Od},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Rd},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:vd},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Sd},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Td},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Ud},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:yp},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:$d},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:dp},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Gd},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Bd},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Ad},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:mp},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:bp},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Md},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:gp},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Fd},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:ip},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Zd},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Xd},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:xd},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:kd},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:up},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:hp},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:xp},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Jd},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Vd}],ck=p(()=>{const t=[...Object.entries({state:sp,choice:Cd,note:Kd,rectWithTitle:tp,labelRect:Hd,iconSquare:zd,iconCircle:Pd,icon:Id,iconRounded:Nd,imageSquare:Wd,anchor:yd,kanbanItem:kp,classBox:wp,erBox:Bo,requirementBox:_p}),...lk.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),vp=ck();function hk(e){return e in vp}p(hk,"isValidShape");var ca=new Map;async function Sp(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?vp[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),n=await a(i,t,r)}else n=await a(e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),ca.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(Sp,"insertNode");var rB=p((e,t)=>{ca.set(t.id,e)},"setNodeElem"),iB=p(()=>{ca.clear()},"clear"),nB=p(e=>{const t=ca.get(e.id);O.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),uk=p((e,t,r,i,n,a)=>{t.arrowTypeStart&&rc(e,"start",t.arrowTypeStart,r,i,n,a),t.arrowTypeEnd&&rc(e,"end",t.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),fk={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}},rc=p((e,t,r,i,n,a,o)=>{const s=fk[r];if(!s){O.warn(`Unknown arrow type: ${r}`);return}const c=s.type,h=`${n}_${a}-${c}${t==="start"?"Start":"End"}`;if(o&&o.trim()!==""){const u=o.replace(/[^\dA-Za-z]/g,"_"),f=`${h}_${u}`;if(!document.getElementById(f)){const d=document.getElementById(h);if(d){const g=d.cloneNode(!0);g.id=f,g.querySelectorAll("path, circle, line").forEach(y=>{y.setAttribute("stroke",o),s.fill&&y.setAttribute("fill",o)}),d.parentNode?.appendChild(g)}}e.attr(`marker-${t}`,`url(${i}#${f})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),zn=new Map,Bt=new Map,aB=p(()=>{zn.clear(),Bt.clear()},"clear"),ei=p(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),dk=p(async(e,t)=>{let r=kt(ht().flowchart.htmlLabels);const i=await je(e,t.label,{style:ei(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});O.info("abc82",t,t.labelType);const n=e.insert("g").attr("class","edgeLabel"),a=n.insert("g").attr("class","label");a.node().appendChild(i);let o=i.getBBox();if(r){const c=i.children[0],l=lt(i);o=c.getBoundingClientRect(),l.attr("width",o.width),l.attr("height",o.height)}a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),zn.set(t.id,n),t.width=o.width,t.height=o.height;let s;if(t.startLabelLeft){const c=await Je(t.startLabelLeft,ei(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=h.node().appendChild(c);const u=c.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Bt.get(t.id)||Bt.set(t.id,{}),Bt.get(t.id).startLeft=l,li(s,t.startLabelLeft)}if(t.startLabelRight){const c=await Je(t.startLabelRight,ei(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=l.node().appendChild(c),h.node().appendChild(c);const u=c.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Bt.get(t.id)||Bt.set(t.id,{}),Bt.get(t.id).startRight=l,li(s,t.startLabelRight)}if(t.endLabelLeft){const c=await Je(t.endLabelLeft,ei(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=h.node().appendChild(c);const u=c.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),l.node().appendChild(c),Bt.get(t.id)||Bt.set(t.id,{}),Bt.get(t.id).endLeft=l,li(s,t.endLabelLeft)}if(t.endLabelRight){const c=await Je(t.endLabelRight,ei(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=h.node().appendChild(c);const u=c.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),l.node().appendChild(c),Bt.get(t.id)||Bt.set(t.id,{}),Bt.get(t.id).endRight=l,li(s,t.endLabelRight)}return i},"insertEdgeLabel");function li(e,t){ht().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(li,"setTerminalWidth");var pk=p((e,t)=>{O.debug("Moving label abc88 ",e.id,e.label,zn.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ht(),{subGraphTitleTotalMargin:n}=Gs(i);if(e.label){const a=zn.get(e.id);let o=e.x,s=e.y;if(r){const c=ue.calcLabelPosition(r);O.debug("Moving label "+e.label+" from (",o,",",s,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(o=c.x,s=c.y)}a.attr("transform",`translate(${o}, ${s+n/2})`)}if(e.startLabelLeft){const a=Bt.get(e.id).startLeft;let o=e.x,s=e.y;if(r){const c=ue.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=c.x,s=c.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.startLabelRight){const a=Bt.get(e.id).startRight;let o=e.x,s=e.y;if(r){const c=ue.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=c.x,s=c.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelLeft){const a=Bt.get(e.id).endLeft;let o=e.x,s=e.y;if(r){const c=ue.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=c.x,s=c.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelRight){const a=Bt.get(e.id).endRight;let o=e.x,s=e.y;if(r){const c=ue.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=c.x,s=c.y}a.attr("transform",`translate(${o}, ${s})`)}},"positionEdgeLabel"),gk=p((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,s=e.height/2;return n>=o||a>=s},"outsideNode"),mk=p((e,t,r)=>{O.debug(`intersection calc abc89:
197
+ outsidePoint: ${JSON.stringify(t)}
198
+ insidePoint : ${JSON.stringify(r)}
199
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,a=Math.abs(i-r.x),o=e.width/2;let s=r.x<t.x?o-a:o+a;const c=e.height/2,l=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(n-t.y)*o>Math.abs(i-t.x)*c){let u=r.y<t.y?t.y-c-n:n-c-t.y;s=h*u/l;const f={x:r.x<t.x?r.x+s:r.x-h+s,y:r.y<t.y?r.y+l-u:r.y-l+u};return s===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),l===0&&(f.y=t.y),O.debug(`abc89 top/bottom calc, Q ${l}, q ${u}, R ${h}, r ${s}`,f),f}else{r.x<t.x?s=t.x-o-i:s=i-o-t.x;let u=l*s/h,f=r.x<t.x?r.x+h-s:r.x-h+s,d=r.y<t.y?r.y+u:r.y-u;return O.debug(`sides calc abc89, Q ${l}, q ${u}, R ${h}, r ${s}`,{_x:f,_y:d}),s===0&&(f=t.x,d=t.y),h===0&&(f=t.x),l===0&&(d=t.y),{x:f,y:d}}},"intersection"),ic=p((e,t)=>{O.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(O.info("abc88 checking point",a,t),!gk(t,a)&&!n){const o=mk(t,i,a);O.debug("abc88 inside",a,i,o),O.debug("abc88 intersection",o,t);let s=!1;r.forEach(c=>{s=s||c.x===o.x&&c.y===o.y}),r.some(c=>c.x===o.x&&c.y===o.y)?O.warn("abc88 no intersect",o,r):r.push(o),n=!0}else O.warn("abc88 outside",a,i),i=a,n||r.push(a)}),O.debug("returning points",r),r},"cutPathAtIntersect");function Tp(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const n=e[i-1],a=e[i],o=e[i+1];(n.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===o.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(Tp,"extractCornerPoints");var nc=p(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,a=Math.sqrt(i*i+n*n),o=r/a;return{x:t.x-o*i,y:t.y-o*n}},"findAdjacentPoint"),yk=p(function(e){const{cornerPointPositions:t}=Tp(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const n=e[i-1],a=e[i+1],o=e[i],s=nc(n,o,5),c=nc(a,o,5),l=c.x-s.x,h=c.y-s.y;r.push(s);const u=Math.sqrt(2)*2;let f={x:o.x,y:o.y};if(Math.abs(a.x-n.x)>10&&Math.abs(a.y-n.y)>=10){O.debug("Corner point fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));const d=5;o.x===s.x?f={x:l<0?s.x-d+u:s.x+d-u,y:h<0?s.y-u:s.y+u}:f={x:l<0?s.x-u:s.x+u,y:h<0?s.y-d+u:s.y+d-u}}else O.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(f,c)}else r.push(e[i]);return r},"fixCorners"),xk=p(function(e,t,r,i,n,a,o){const{handDrawnSeed:s}=ht();let c=t.points,l=!1;const h=n;var u=a;const f=[];for(const R in t.cssCompiledStyles)ld(R)||f.push(t.cssCompiledStyles[R]);u.intersect&&h.intersect&&(c=c.slice(1,t.points.length-1),c.unshift(h.intersect(c[0])),O.debug("Last point APA12",t.start,"-->",t.end,c[c.length-1],u,u.intersect(c[c.length-1])),c.push(u.intersect(c[c.length-1]))),t.toCluster&&(O.info("to cluster abc88",r.get(t.toCluster)),c=ic(t.points,r.get(t.toCluster).node),l=!0),t.fromCluster&&(O.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=ic(c.reverse(),r.get(t.fromCluster).node).reverse(),l=!0);let d=c.filter(R=>!Number.isNaN(R.y));d=yk(d);let g=Vi;switch(g=Na,t.curve){case"linear":g=Na;break;case"basis":g=Vi;break;case"cardinal":g=af;break;case"bumpX":g=Tc;break;case"bumpY":g=Sc;break;case"catmullRom":g=of;break;case"monotoneX":g=vc;break;case"monotoneY":g=kc;break;case"natural":g=_c;break;case"step":g=wc;break;case"stepAfter":g=Cc;break;case"stepBefore":g=bc;break;default:g=Vi}const{x:m,y}=g0(t),x=$g().x(m).y(y).curve(g);let b;switch(t.thickness){case"normal":b="edge-thickness-normal";break;case"thick":b="edge-thickness-thick";break;case"invisible":b="edge-thickness-invisible";break;default:b="edge-thickness-normal"}switch(t.pattern){case"solid":b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed";break;default:b+=" edge-pattern-solid"}let C,k=x(d);const v=Array.isArray(t.style)?t.style:[t.style];let B=v.find(R=>R?.startsWith("stroke:"));if(t.look==="handDrawn"){const R=Y.svg(e);Object.assign([],d);const $=R.path(k,{roughness:.3,seed:s});b+=" transition",C=lt($).select("path").attr("id",t.id).attr("class"," "+b+(t.classes?" "+t.classes:"")).attr("style",v?v.reduce((z,P)=>z+";"+P,""):"");let L=C.attr("d");C.attr("d",L),e.node().appendChild(C.node())}else{const R=f.join(";"),$=v?v.reduce((P,M)=>P+M+";",""):"";let L="";t.animate&&(L=" edge-animation-fast"),t.animation&&(L=" edge-animation-"+t.animation);const z=R?R+";"+$+";":$;C=e.append("path").attr("d",k).attr("id",t.id).attr("class"," "+b+(t.classes?" "+t.classes:"")+(L??"")).attr("style",z),B=z.match(/stroke:([^;]+)/)?.[1]}let S="";(ht().flowchart.arrowMarkerAbsolute||ht().state.arrowMarkerAbsolute)&&(S=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,S=S.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),O.info("arrowTypeStart",t.arrowTypeStart),O.info("arrowTypeEnd",t.arrowTypeEnd),uk(C,t,S,o,i,B);let D={};return l&&(D.updatedPath=c),D.originalPath=t.points,D},"insertEdge"),bk=p((e,t,r,i)=>{t.forEach(n=>{Dk[n](e,r,i)})},"insertMarkers"),Ck=p((e,t,r)=>{O.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),wk=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),_k=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),kk=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),vk=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Sk=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),Tk=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),Bk=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),Lk=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Ak=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Ek=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Mk=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),Fk=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Ok=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
200
+ L20,10
201
+ M20,10
202
+ L0,20`)},"requirement_arrow"),$k=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Dk={extension:Ck,composition:wk,aggregation:_k,dependency:kk,lollipop:vk,point:Sk,circle:Tk,cross:Bk,barb:Lk,only_one:Ak,zero_or_one:Ek,one_or_more:Mk,zero_or_more:Fk,requirement_arrow:Ok,requirement_contains:$k},Rk=bk,Ik={common:$r,getConfig:Ut,insertCluster:Y_,insertEdge:xk,insertEdgeLabel:dk,insertMarkers:Rk,insertNode:Sp,interpolateToCurve:oo,labelHelper:it,log:O,positionEdgeLabel:pk},_i={},Bp=p(e=>{for(const t of e)_i[t.name]=t},"registerLayoutLoaders"),Pk=p(()=>{Bp([{name:"dagre",loader:p(async()=>await dt(()=>import("./dagre-OKDRZEBW-DbOc711m.js"),__vite__mapDeps([4,5,6,7,8,9,0,1,2,3,10]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");Pk();var sB=p(async(e,t)=>{if(!(e.layoutAlgorithm in _i))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=_i[e.layoutAlgorithm];return(await r.loader()).render(e,t,Ik,{algorithm:r.algorithm})},"render"),oB=p((e="",{fallback:t="dagre"}={})=>{if(e in _i)return e;if(t in _i)return O.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),ac={name:"mermaid",version:"11.6.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^2.1.33","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.4",katex:"^0.16.9",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",chokidar:"^4.0.3",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.0.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.27.8","typedoc-plugin-markdown":"^4.4.2",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},Nk=p(e=>{const{securityLevel:t}=ht();let r=lt("body");if(t==="sandbox"){const a=lt(`#i${e}`).node()?.contentDocument??document;r=lt(a.body)}return r.select(`#${e}`)},"selectSvgElement"),Lp="comm",Ap="rule",Ep="decl",zk="@import",Wk="@namespace",qk="@keyframes",Hk="@layer",Mp=Math.abs,Lo=String.fromCharCode;function Fp(e){return e.trim()}function ln(e,t,r){return e.replace(t,r)}function jk(e,t,r){return e.indexOf(t,r)}function _r(e,t){return e.charCodeAt(t)|0}function Fr(e,t,r){return e.slice(t,r)}function he(e){return e.length}function Yk(e){return e.length}function Gi(e,t){return t.push(e),e}var ha=1,Or=1,Op=0,te=0,bt=0,Nr="";function Ao(e,t,r,i,n,a,o,s){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:ha,column:Or,length:o,return:"",siblings:s}}function Uk(){return bt}function Gk(){return bt=te>0?_r(Nr,--te):0,Or--,bt===10&&(Or=1,ha--),bt}function ae(){return bt=te<Op?_r(Nr,te++):0,Or++,bt===10&&(Or=1,ha++),bt}function Pe(){return _r(Nr,te)}function cn(){return te}function ua(e,t){return Fr(Nr,e,t)}function ki(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Vk(e){return ha=Or=1,Op=he(Nr=e),te=0,[]}function Xk(e){return Nr="",e}function Ia(e){return Fp(ua(te-1,vs(e===91?e+2:e===40?e+1:e)))}function Zk(e){for(;(bt=Pe())&&bt<33;)ae();return ki(e)>2||ki(bt)>3?"":" "}function Kk(e,t){for(;--t&&ae()&&!(bt<48||bt>102||bt>57&&bt<65||bt>70&&bt<97););return ua(e,cn()+(t<6&&Pe()==32&&ae()==32))}function vs(e){for(;ae();)switch(bt){case e:return te;case 34:case 39:e!==34&&e!==39&&vs(bt);break;case 40:e===41&&vs(e);break;case 92:ae();break}return te}function Qk(e,t){for(;ae()&&e+bt!==57;)if(e+bt===84&&Pe()===47)break;return"/*"+ua(t,te-1)+"*"+Lo(e===47?e:ae())}function Jk(e){for(;!ki(Pe());)ae();return ua(e,te)}function tv(e){return Xk(hn("",null,null,null,[""],e=Vk(e),0,[0],e))}function hn(e,t,r,i,n,a,o,s,c){for(var l=0,h=0,u=o,f=0,d=0,g=0,m=1,y=1,x=1,b=0,C="",k=n,v=a,B=i,S=C;y;)switch(g=b,b=ae()){case 40:if(g!=108&&_r(S,u-1)==58){jk(S+=ln(Ia(b),"&","&\f"),"&\f",Mp(l?s[l-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:S+=Ia(b);break;case 9:case 10:case 13:case 32:S+=Zk(g);break;case 92:S+=Kk(cn()-1,7);continue;case 47:switch(Pe()){case 42:case 47:Gi(ev(Qk(ae(),cn()),t,r,c),c),(ki(g||1)==5||ki(Pe()||1)==5)&&he(S)&&Fr(S,-1,void 0)!==" "&&(S+=" ");break;default:S+="/"}break;case 123*m:s[l++]=he(S)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(S=ln(S,/\f/g,"")),d>0&&(he(S)-u||m===0&&g===47)&&Gi(d>32?oc(S+";",i,r,u-1,c):oc(ln(S," ","")+";",i,r,u-2,c),c);break;case 59:S+=";";default:if(Gi(B=sc(S,t,r,l,h,n,s,C,k=[],v=[],u,a),a),b===123)if(h===0)hn(S,t,B,B,k,a,u,s,v);else{switch(f){case 99:if(_r(S,3)===110)break;case 108:if(_r(S,2)===97)break;default:h=0;case 100:case 109:case 115:}h?hn(e,B,B,i&&Gi(sc(e,B,B,0,0,n,s,C,n,k=[],u,v),v),n,v,u,s,i?k:v):hn(S,B,B,B,[""],v,0,s,v)}}l=h=d=0,m=x=1,C=S="",u=o;break;case 58:u=1+he(S),d=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&Gk()==125)continue}switch(S+=Lo(b),b*m){case 38:x=h>0?1:(S+="\f",-1);break;case 44:s[l++]=(he(S)-1)*x,x=1;break;case 64:Pe()===45&&(S+=Ia(ae())),f=Pe(),h=u=he(C=S+=Jk(cn())),b++;break;case 45:g===45&&he(S)==2&&(m=0)}}return a}function sc(e,t,r,i,n,a,o,s,c,l,h,u){for(var f=n-1,d=n===0?a:[""],g=Yk(d),m=0,y=0,x=0;m<i;++m)for(var b=0,C=Fr(e,f+1,f=Mp(y=o[m])),k=e;b<g;++b)(k=Fp(y>0?d[b]+" "+C:ln(C,/&\f/g,d[b])))&&(c[x++]=k);return Ao(e,t,r,n===0?Ap:s,c,l,h,u)}function ev(e,t,r,i){return Ao(e,t,r,Lp,Lo(Uk()),Fr(e,2,-2),0,i)}function oc(e,t,r,i,n){return Ao(e,t,r,Ep,Fr(e,0,i),Fr(e,i+1,-1),i,n)}function Ss(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function rv(e,t,r,i){switch(e.type){case Hk:if(e.children.length)break;case zk:case Wk:case Ep:return e.return=e.return||e.value;case Lp:return"";case qk:return e.return=e.value+"{"+Ss(e.children,i)+"}";case Ap:if(!he(e.value=e.props.join(",")))return""}return he(r=Ss(e.children,i))?e.return=e.value+"{"+r+"}":""}var iv=df(Object.keys,Object),nv=Object.prototype,av=nv.hasOwnProperty;function sv(e){if(!ea(e))return iv(e);var t=[];for(var r in Object(e))av.call(e,r)&&r!="constructor"&&t.push(r);return t}var Ts=lr(ge,"DataView"),Bs=lr(ge,"Promise"),Ls=lr(ge,"Set"),As=lr(ge,"WeakMap"),lc="[object Map]",ov="[object Object]",cc="[object Promise]",hc="[object Set]",uc="[object WeakMap]",fc="[object DataView]",lv=or(Ts),cv=or(wi),hv=or(Bs),uv=or(Ls),fv=or(As),Xe=Dr;(Ts&&Xe(new Ts(new ArrayBuffer(1)))!=fc||wi&&Xe(new wi)!=lc||Bs&&Xe(Bs.resolve())!=cc||Ls&&Xe(new Ls)!=hc||As&&Xe(new As)!=uc)&&(Xe=function(e){var t=Dr(e),r=t==ov?e.constructor:void 0,i=r?or(r):"";if(i)switch(i){case lv:return fc;case cv:return lc;case hv:return cc;case uv:return hc;case fv:return uc}return t});var dv="[object Map]",pv="[object Set]",gv=Object.prototype,mv=gv.hasOwnProperty;function dc(e){if(e==null)return!0;if(ra(e)&&(Mn(e)||typeof e=="string"||typeof e.splice=="function"||ao(e)||so(e)||En(e)))return!e.length;var t=Xe(e);if(t==dv||t==pv)return!e.size;if(ea(e))return!sv(e).length;for(var r in e)if(mv.call(e,r))return!1;return!0}var $p="c4",yv=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),xv=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./c4Diagram-VJAJSXHY-C0Hp8OKf.js");return{diagram:t}},__vite__mapDeps([11,12,0,1,2,3,10]),import.meta.url);return{id:$p,diagram:e}},"loader"),bv={id:$p,detector:yv,loader:xv},Cv=bv,Dp="flowchart",wv=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),_v=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./flowDiagram-4HSFHLVR-D5vc3yns.js");return{diagram:t}},__vite__mapDeps([13,14,15,0,1,2,3,10]),import.meta.url);return{id:Dp,diagram:e}},"loader"),kv={id:Dp,detector:wv,loader:_v},vv=kv,Rp="flowchart-v2",Sv=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),Tv=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./flowDiagram-4HSFHLVR-D5vc3yns.js");return{diagram:t}},__vite__mapDeps([13,14,15,0,1,2,3,10]),import.meta.url);return{id:Rp,diagram:e}},"loader"),Bv={id:Rp,detector:Sv,loader:Tv},Lv=Bv,Ip="er",Av=p(e=>/^\s*erDiagram/.test(e),"detector"),Ev=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./erDiagram-Q7BY3M3F-CxFuapOs.js");return{diagram:t}},__vite__mapDeps([16,14,15,0,1,2,3,10]),import.meta.url);return{id:Ip,diagram:e}},"loader"),Mv={id:Ip,detector:Av,loader:Ev},Fv=Mv,Pp="gitGraph",Ov=p(e=>/^\s*gitGraph/.test(e),"detector"),$v=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-7IBYFJ6S-6m7tU_G2.js");return{diagram:t}},__vite__mapDeps([17,18,19,20,0,1,2,3,6,8,9,10]),import.meta.url);return{id:Pp,diagram:e}},"loader"),Dv={id:Pp,detector:Ov,loader:$v},Rv=Dv,Np="gantt",Iv=p(e=>/^\s*gantt/.test(e),"detector"),Pv=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./ganttDiagram-APWFNJXF-ejBZIm6I.js");return{diagram:t}},__vite__mapDeps([21,1,2,22,23,10,24,0,3]),import.meta.url);return{id:Np,diagram:e}},"loader"),Nv={id:Np,detector:Iv,loader:Pv},zv=Nv,zp="info",Wv=p(e=>/^\s*info/.test(e),"detector"),qv=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./infoDiagram-PH2N3AL5-D1KBOewb.js");return{diagram:t}},__vite__mapDeps([25,20,0,1,2,3,6,8,9,10]),import.meta.url);return{id:zp,diagram:e}},"loader"),Hv={id:zp,detector:Wv,loader:qv},Wp="pie",jv=p(e=>/^\s*pie/.test(e),"detector"),Yv=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./pieDiagram-IB7DONF6-CeYuFnxD.js");return{diagram:t}},__vite__mapDeps([26,18,20,0,1,2,3,6,8,9,27,10,28,24]),import.meta.url);return{id:Wp,diagram:e}},"loader"),Uv={id:Wp,detector:jv,loader:Yv},qp="quadrantChart",Gv=p(e=>/^\s*quadrantChart/.test(e),"detector"),Vv=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./quadrantDiagram-7GDLP6J5-urCUNLvr.js");return{diagram:t}},__vite__mapDeps([29,23,10,24,0,1,2,3]),import.meta.url);return{id:qp,diagram:e}},"loader"),Xv={id:qp,detector:Gv,loader:Vv},Zv=Xv,Hp="xychart",Kv=p(e=>/^\s*xychart-beta/.test(e),"detector"),Qv=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./xychartDiagram-VJFVF3MP-O2pD61nn.js");return{diagram:t}},__vite__mapDeps([30,31,24,28,23,10,0,1,2,3]),import.meta.url);return{id:Hp,diagram:e}},"loader"),Jv={id:Hp,detector:Kv,loader:Qv},tS=Jv,jp="requirement",eS=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),rS=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./requirementDiagram-KVF5MWMF-7WDiFe7C.js");return{diagram:t}},__vite__mapDeps([32,14,0,1,2,3,10]),import.meta.url);return{id:jp,diagram:e}},"loader"),iS={id:jp,detector:eS,loader:rS},nS=iS,Yp="sequence",aS=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),sS=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./sequenceDiagram-X6HHIX6F-DGlKyLMu.js");return{diagram:t}},__vite__mapDeps([33,12,19,0,1,2,3,10]),import.meta.url);return{id:Yp,diagram:e}},"loader"),oS={id:Yp,detector:aS,loader:sS},lS=oS,Up="class",cS=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),hS=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./classDiagram-GIVACNV2-DyZfTBa4.js");return{diagram:t}},__vite__mapDeps([34,35,14,0,1,2,3,10]),import.meta.url);return{id:Up,diagram:e}},"loader"),uS={id:Up,detector:cS,loader:hS},fS=uS,Gp="classDiagram",dS=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),pS=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./classDiagram-v2-COTLJTTW-DyZfTBa4.js");return{diagram:t}},__vite__mapDeps([36,35,14,0,1,2,3,10]),import.meta.url);return{id:Gp,diagram:e}},"loader"),gS={id:Gp,detector:dS,loader:pS},mS=gS,Vp="state",yS=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),xS=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./stateDiagram-DGXRK772-BY_eMRWs.js");return{diagram:t}},__vite__mapDeps([37,38,14,5,6,7,8,10,0,1,2,3]),import.meta.url);return{id:Vp,diagram:e}},"loader"),bS={id:Vp,detector:yS,loader:xS},CS=bS,Xp="stateDiagram",wS=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),_S=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-YXO3MK2T-DecHc3j6.js");return{diagram:t}},__vite__mapDeps([39,38,14,0,1,2,3,10]),import.meta.url);return{id:Xp,diagram:e}},"loader"),kS={id:Xp,detector:wS,loader:_S},vS=kS,Zp="journey",SS=p(e=>/^\s*journey/.test(e),"detector"),TS=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./journeyDiagram-U35MCT3I-DsqwRdF3.js");return{diagram:t}},__vite__mapDeps([40,12,27,10,0,1,2,3]),import.meta.url);return{id:Zp,diagram:e}},"loader"),BS={id:Zp,detector:SS,loader:TS},LS=BS,AS=p((e,t,r)=>{O.debug(`rendering svg for syntax error
203
+ `);const i=Nk(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),Zc(i,100,512,!0),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),Kp={draw:AS},ES=Kp,MS={db:{},renderer:Kp,parser:{parse:p(()=>{},"parse")}},FS=MS,Qp="flowchart-elk",OS=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*flowchart|graph/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),$S=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./flowDiagram-4HSFHLVR-D5vc3yns.js");return{diagram:t}},__vite__mapDeps([13,14,15,0,1,2,3,10]),import.meta.url);return{id:Qp,diagram:e}},"loader"),DS={id:Qp,detector:OS,loader:$S},RS=DS,Jp="timeline",IS=p(e=>/^\s*timeline/.test(e),"detector"),PS=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./timeline-definition-BDJGKUSR-9Ezq9kKH.js");return{diagram:t}},__vite__mapDeps([41,27,10,0,1,2,3]),import.meta.url);return{id:Jp,diagram:e}},"loader"),NS={id:Jp,detector:IS,loader:PS},zS=NS,tg="mindmap",WS=p(e=>/^\s*mindmap/.test(e),"detector"),qS=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./mindmap-definition-ALO5MXBD-CTSdCgh1.js");return{diagram:t}},__vite__mapDeps([42,43,1,2,0,3,10]),import.meta.url);return{id:tg,diagram:e}},"loader"),HS={id:tg,detector:WS,loader:qS},jS=HS,eg="kanban",YS=p(e=>/^\s*kanban/.test(e),"detector"),US=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./kanban-definition-NDS4AKOZ-BQvBdP_9.js");return{diagram:t}},__vite__mapDeps([44,0,1,2,3,10]),import.meta.url);return{id:eg,diagram:e}},"loader"),GS={id:eg,detector:YS,loader:US},VS=GS,rg="sankey",XS=p(e=>/^\s*sankey-beta/.test(e),"detector"),ZS=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./sankeyDiagram-QLVOVGJD-BvCTETAk.js");return{diagram:t}},__vite__mapDeps([45,28,24,0,1,2,3,10]),import.meta.url);return{id:rg,diagram:e}},"loader"),KS={id:rg,detector:XS,loader:ZS},QS=KS,ig="packet",JS=p(e=>/^\s*packet-beta/.test(e),"detector"),tT=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./diagram-VNBRO52H-DHzPX2Ws.js");return{diagram:t}},__vite__mapDeps([46,18,20,0,1,2,3,6,8,9,10]),import.meta.url);return{id:ig,diagram:e}},"loader"),eT={id:ig,detector:JS,loader:tT},ng="radar",rT=p(e=>/^\s*radar-beta/.test(e),"detector"),iT=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./diagram-SSKATNLV-YLnBMg9L.js");return{diagram:t}},__vite__mapDeps([47,18,20,0,1,2,3,6,8,9,10]),import.meta.url);return{id:ng,diagram:e}},"loader"),nT={id:ng,detector:rT,loader:iT},ag="block",aT=p(e=>/^\s*block-beta/.test(e),"detector"),sT=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./blockDiagram-JOT3LUYC-Dk6LFvtm.js");return{diagram:t}},__vite__mapDeps([48,9,6,5,15,10,0,1,2,3]),import.meta.url);return{id:ag,diagram:e}},"loader"),oT={id:ag,detector:aT,loader:sT},lT=oT,sg="architecture",cT=p(e=>/^\s*architecture/.test(e),"detector"),hT=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./architectureDiagram-IEHRJDOE-p5UIRlv1.js");return{diagram:t}},__vite__mapDeps([49,18,19,20,0,1,2,3,6,8,9,43,10]),import.meta.url);return{id:sg,diagram:e}},"loader"),uT={id:sg,detector:cT,loader:hT},fT=uT,pc=!1,fa=p(()=>{pc||(pc=!0,gn("error",FS,e=>e.toLowerCase().trim()==="error"),gn("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{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:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Ic(Cv,VS,mS,fS,Fv,zv,Hv,Uv,nS,lS,RS,Lv,vv,jS,zS,Rv,vS,CS,LS,Zv,QS,eT,tS,lT,fT,nT))},"addDiagrams"),dT=p(async()=>{O.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(vr).map(async([r,{detector:i,loader:n}])=>{if(n)try{Ya(r)}catch{try{const{diagram:a,id:o}=await n();gn(o,a,i)}catch(a){throw O.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete vr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){O.error(`Failed to load ${t.length} external diagrams`);for(const r of t)O.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),pT="graphics-document document";function og(e,t){e.attr("role",pT),t!==""&&e.attr("aria-roledescription",t)}p(og,"setA11yDiagramInfo");function lg(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}p(lg,"addSVGa11yTitleDescription");var Es=class cg{constructor(t,r,i,n,a){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=a}static{p(this,"Diagram")}static async fromText(t,r={}){const i=Ut(),n=Os(t,i);t=Dw(t)+`
204
+ `;try{Ya(n)}catch{const l=gm(n);if(!l)throw new Rc(`Diagram ${n} not found.`);const{id:h,diagram:u}=await l();gn(h,u)}const{db:a,parser:o,renderer:s,init:c}=Ya(n);return o.parser&&(o.parser.yy=a),a.clear?.(),c?.(i),r.title&&a.setDiagramTitle?.(r.title),await o.parse(t),new cg(n,t,a,o,s)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},gc=[],gT=p(()=>{gc.forEach(e=>{e()}),gc=[]},"attachFunctions"),mT=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function hg(e){const t=e.match(Dc);if(!t)return{text:e,metadata:{}};let r=p0(t[1],{schema:d0})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}p(hg,"extractFrontMatter");var yT=p(e=>e.replace(/\r\n?/g,`
205
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),xT=p(e=>{const{text:t,metadata:r}=hg(e),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:t}},"processFrontmatter"),bT=p(e=>{const t=ue.detectInit(e)??{},r=ue.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:_w(e),directive:t}},"processDirectives");function Eo(e){const t=yT(e),r=xT(t),i=bT(r.text),n=fo(r.config,i.directive);return e=mT(i.text),{code:e,title:r.title,config:n}}p(Eo,"preprocessDiagram");function ug(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(ug,"toBase64");var CT=5e4,wT="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",_T="sandbox",kT="loose",vT="http://www.w3.org/2000/svg",ST="http://www.w3.org/1999/xlink",TT="http://www.w3.org/1999/xhtml",BT="100%",LT="100%",AT="border:0;margin:0;",ET="margin:0",MT="allow-top-navigation-by-user-activation allow-popups",FT='The "iframe" tag is not supported by your browser.',OT=["foreignobject"],$T=["dominant-baseline"];function Mo(e){const t=Eo(e);return dn(),Mm(t.config??{}),t}p(Mo,"processAndSetConfigs");async function fg(e,t){fa();try{const{code:r,config:i}=Mo(e);return{diagramType:(await pg(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(fg,"parse");var mc=p((e,t,r=[])=>`
206
+ .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),DT=p((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
207
+ ${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
208
+ :root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
209
+ :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const o=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(s=>{dc(s.styles)||o.forEach(c=>{r+=mc(s.id,c,s.styles)}),dc(s.textStyles)||(r+=mc(s.id,"tspan",(s?.textStyles||[]).map(c=>c.replace("color","fill"))))})}return r},"createCssStyles"),RT=p((e,t,r,i)=>{const n=DT(e,r),a=Zm(t,n,e.themeVariables);return Ss(tv(`${i}{${a}}`),rv)},"createUserStyles"),IT=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=cr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),PT=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":LT,i=ug(`<body style="${ET}">${e}</body>`);return`<iframe style="width:${BT};height:${r};${AT}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${MT}">
210
+ ${FT}
211
+ </iframe>`},"putIntoIFrame"),yc=p((e,t,r,i,n)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",vT);return n&&o.attr("xmlns:xlink",n),o.append("g"),e},"appendDivSvgG");function Ms(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(Ms,"sandboxedIframe");var NT=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),zT=p(async function(e,t,r){fa();const i=Mo(t);t=i.code;const n=Ut();O.debug(n),t.length>(n?.maxTextSize??CT)&&(t=wT);const a="#"+e,o="i"+e,s="#"+o,c="d"+e,l="#"+c,h=p(()=>{const P=lt(f?s:l).node();P&&"remove"in P&&P.remove()},"removeTempElements");let u=lt("body");const f=n.securityLevel===_T,d=n.securityLevel===kT,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const z=Ms(lt(r),o);u=lt(z.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=lt(r);yc(u,e,c,`font-family: ${g}`,ST)}else{if(NT(document,e,c,o),f){const z=Ms(lt("body"),o);u=lt(z.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=lt("body");yc(u,e,c)}let m,y;try{m=await Es.fromText(t,{title:i.title})}catch(z){if(n.suppressErrorRendering)throw h(),z;m=await Es.fromText("error"),y=z}const x=u.select(l).node(),b=m.type,C=x.firstChild,k=C.firstChild,v=m.renderer.getClasses?.(t,m),B=RT(n,b,v,a),S=document.createElement("style");S.innerHTML=B,C.insertBefore(S,k);try{await m.renderer.draw(t,e,ac.version,m)}catch(z){throw n.suppressErrorRendering?h():ES.draw(t,e,ac.version),z}const D=u.select(`${l} svg`),R=m.db.getAccTitle?.(),$=m.db.getAccDescription?.();gg(b,D,R,$),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",TT);let L=u.select(l).node().innerHTML;if(O.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),L=IT(L,f,kt(n.arrowMarkerAbsolute)),f){const z=u.select(l+" svg").node();L=PT(L,z)}else d||(L=kr.sanitize(L,{ADD_TAGS:OT,ADD_ATTR:$T,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(gT(),y)throw y;return h(),{diagramType:b,svg:L,bindFunctions:m.db.bindFunctions}},"render");function dg(e={}){const t=Lt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Am(t),t?.theme&&t.theme in Le?t.themeVariables=Le[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Le.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Lm(t):Hc();Fs(r.logLevel),fa()}p(dg,"initialize");var pg=p((e,t={})=>{const{code:r}=Eo(e);return Es.fromText(r,t)},"getDiagramFromText");function gg(e,t,r,i){og(t,e),lg(t,r,i,t.attr("id"))}p(gg,"addA11yInfo");var ar=Object.freeze({render:zT,parse:fg,getDiagramFromText:pg,initialize:dg,getConfig:Ut,setConfig:jc,getSiteConfig:Hc,updateSiteConfig:Em,reset:p(()=>{dn()},"reset"),globalReset:p(()=>{dn(Sr)},"globalReset"),defaultConfig:Sr});Fs(Ut().logLevel);dn(Ut());var WT=p((e,t,r)=>{O.warn(e),uo(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),mg=p(async function(e={querySelector:".mermaid"}){try{await qT(e)}catch(t){if(uo(t)&&O.error(t.str),Fe.parseError&&Fe.parseError(t),!e.suppressErrors)throw O.error("Use the suppressErrors option to suppress these errors"),t}},"run"),qT=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=ar.getConfig();O.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");O.debug(`Found ${n.length} diagrams`),i?.startOnLoad!==void 0&&(O.debug("Start On Load: "+i?.startOnLoad),ar.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new ue.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const s=[];for(const c of Array.from(n)){if(O.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");const l=`mermaid-${a.next()}`;o=c.innerHTML,o=Hf(ue.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=ue.detectInit(o);h&&O.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await Cg(l,o,c);c.innerHTML=u,e&&await e(l),f&&f(c)}catch(u){WT(u,s,Fe.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),yg=p(function(e){ar.initialize(e)},"initialize"),HT=p(async function(e,t,r){O.warn("mermaid.init is deprecated. Please use run instead."),e&&yg(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await mg(i)},"init"),jT=p(async(e,{lazyLoad:t=!0}={})=>{fa(),Ic(...e),t===!1&&await dT()},"registerExternalDiagrams"),xg=p(function(){if(Fe.startOnLoad){const{startOnLoad:e}=ar.getConfig();e&&Fe.run().catch(t=>O.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",xg,!1);var YT=p(function(e){Fe.parseError=e},"setParseErrorHandler"),Wn=[],Pa=!1,bg=p(async()=>{if(!Pa){for(Pa=!0;Wn.length>0;){const e=Wn.shift();if(e)try{await e()}catch(t){O.error("Error executing queue",t)}}Pa=!1}},"executeQueue"),UT=p(async(e,t)=>new Promise((r,i)=>{const n=p(()=>new Promise((a,o)=>{ar.parse(e,t).then(s=>{a(s),r(s)},s=>{O.error("Error parsing",s),Fe.parseError?.(s),o(s),i(s)})}),"performCall");Wn.push(n),bg().catch(i)}),"parse"),Cg=p((e,t,r)=>new Promise((i,n)=>{const a=p(()=>new Promise((o,s)=>{ar.render(e,t,r).then(c=>{o(c),i(c)},c=>{O.error("Error parsing",c),Fe.parseError?.(c),s(c),n(c)})}),"performCall");Wn.push(a),bg().catch(n)}),"render"),Fe={startOnLoad:!0,mermaidAPI:ar,parse:UT,render:Cg,init:HT,run:mg,registerExternalDiagrams:jT,registerLayoutLoaders:Bp,initialize:yg,parseError:void 0,contentLoaded:xg,setParseErrorHandler:YT,detectType:Os,registerIconPacks:I0},GT=Fe;/*! Check if previously processed *//*!
212
+ * Wait for document loaded before starting the execution
213
+ */const lB=Object.freeze(Object.defineProperty({__proto__:null,default:GT},Symbol.toStringTag,{value:"Module"}));export{Kc as $,JT as A,hi as B,fe as C,dm as D,ay as E,fo as F,Ut as G,Wc as H,Bw as I,d0 as J,Nk as K,ac as L,wm as M,x_ as N,Br as O,KT as P,ia as Q,$s as R,ul as S,Tw as T,rt as U,Gm as V,vi as W,H as X,J as Y,xw as Z,p as _,Jm as a,so as a$,Y_ as a0,Sp as a1,nB as a2,g0 as a3,kt as a4,je as a5,Gs as a6,Jf as a7,cr as a8,Af as a9,YC as aA,dw as aB,sw as aC,G1 as aD,no as aE,WC as aF,yw as aG,Ai as aH,Dr as aI,Ln as aJ,QC as aK,sv as aL,Li as aM,En as aN,UC as aO,pf as aP,Z1 as aQ,K1 as aR,Xe as aS,Pl as aT,Q1 as aU,ao as aV,X1 as aW,eC as aX,Rr as aY,He as aZ,Ol as a_,pw as aa,sC as ab,ow as ac,io as ad,dc as ae,Rk as af,iB as ag,aB as ah,eB as ai,V as aj,rB as ak,xk as al,pk as am,dk as an,Vn as ao,I0 as ap,R0 as aq,Pg as ar,sr as as,gw as at,wf as au,Qn as av,ra as aw,Mn as ax,kf as ay,Cf as az,Qm as b,mf as b0,Ls as b1,mw as b2,ea as b3,lB as b4,ht as c,lt as d,Zc as e,Lt as f,ey as g,Me as h,tr as i,W0 as j,$r as k,O as l,Mf as m,Si as n,QT as o,oB as p,ry as q,sB as r,ty as s,iy as t,ue as u,p0 as v,Ew as w,hk as x,tB as y,Km as z};