cc-viewer 1.6.183 → 1.6.192

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 (135) hide show
  1. package/dist/assets/App-DuGHwadX.js +31 -0
  2. package/dist/assets/{AppHeader-Dc7WvorH.css → AppHeader-D8MCV07q.css} +3 -3
  3. package/dist/assets/AppHeader.module-CozRDKfP.js +573 -0
  4. package/dist/assets/Mobile-Bab634xx.js +10 -0
  5. package/dist/assets/_baseUniq-DJPPdHyT.js +1 -0
  6. package/dist/assets/arc-DZ3Bjq-l.js +1 -0
  7. package/dist/assets/architectureDiagram-Q4EWVU46-xy0J2lr0.js +36 -0
  8. package/dist/assets/blockDiagram-DXYQGD6D-CoUm8UC5.js +132 -0
  9. package/dist/assets/c4Diagram-AHTNJAMY-CFHX4Dfx.js +10 -0
  10. package/dist/assets/channel-G3S1FOvm.js +1 -0
  11. package/dist/assets/chunk-4BX2VUAB-CiktxOyY.js +1 -0
  12. package/dist/assets/chunk-4TB4RGXK-DHl7ZlQV.js +206 -0
  13. package/dist/assets/chunk-55IACEB6-DcgWxDD5.js +1 -0
  14. package/dist/assets/chunk-EDXVE4YY-DeUzWpQx.js +1 -0
  15. package/dist/assets/{chunk-FMBD7UC4-Bb0LARSp.js → chunk-FMBD7UC4-BCaKpugk.js} +2 -2
  16. package/dist/assets/chunk-OYMX7WX6-DKMEMbG9.js +231 -0
  17. package/dist/assets/chunk-QZHKN3VN-BREApeQ-.js +1 -0
  18. package/dist/assets/chunk-YZCP3GAM-BYW1PNda.js +1 -0
  19. package/dist/assets/classDiagram-6PBFFD2Q-B0-7EUsz.js +1 -0
  20. package/dist/assets/classDiagram-v2-HSJHXN6E-B0-7EUsz.js +1 -0
  21. package/dist/assets/clone-CX_D5SrR.js +1 -0
  22. package/dist/assets/cose-bilkent-S5V4N54A-DpwiMCiq.js +1 -0
  23. package/dist/assets/cytoscape.esm-BMgRe88L.js +331 -0
  24. package/dist/assets/dagre-KV5264BT-Dc7qbya2.js +4 -0
  25. package/dist/assets/defaultLocale-CcTwRAjA.js +1 -0
  26. package/dist/assets/diagram-5BDNPKRD-v7FsHeLQ.js +10 -0
  27. package/dist/assets/diagram-G4DWMVQ6-BhKNBlcE.js +24 -0
  28. package/dist/assets/diagram-MMDJMWI5-C-3cRdzG.js +43 -0
  29. package/dist/assets/diagram-TYMM5635-HfNcJIfT.js +24 -0
  30. package/dist/assets/erDiagram-SMLLAGMA-Ckj0dkk7.js +85 -0
  31. package/dist/assets/flowDiagram-DWJPFMVM-yf315tJr.js +162 -0
  32. package/dist/assets/ganttDiagram-T4ZO3ILL-Ch2bINVC.js +292 -0
  33. package/dist/assets/gitGraphDiagram-UUTBAWPF-CesdgsJi.js +106 -0
  34. package/dist/assets/graph-CRpmapJV.js +1 -0
  35. package/dist/assets/html2canvas.esm-B8c0f9Wq.js +22 -0
  36. package/dist/assets/index-DJ0iGKLy.js +2 -0
  37. package/dist/assets/infoDiagram-42DDH7IO-CuD16P9Y.js +2 -0
  38. package/dist/assets/init-C7FSzFHJ.js +1 -0
  39. package/dist/assets/ishikawaDiagram-UXIWVN3A-4y8aG54G.js +70 -0
  40. package/dist/assets/journeyDiagram-VCZTEJTY-B6TtR2Zk.js +139 -0
  41. package/dist/assets/kanban-definition-6JOO6SKY-DTcNHYUS.js +89 -0
  42. package/dist/assets/katex-CJRKSY_b.js +257 -0
  43. package/dist/assets/layout-CX5hpkD2.js +1 -0
  44. package/dist/assets/linear-tWlC-NXc.js +1 -0
  45. package/dist/assets/mermaid.core-DNvsWVDx.js +308 -0
  46. package/dist/assets/min-CDExe3RN.js +1 -0
  47. package/dist/assets/mindmap-definition-QFDTVHPH-CW0yNQcb.js +96 -0
  48. package/dist/assets/ordinal-aRyHI6gl.js +1 -0
  49. package/dist/assets/pieDiagram-DEJITSTG-DNrnOqmz.js +30 -0
  50. package/dist/assets/quadrantDiagram-34T5L4WZ-Cl176vnh.js +7 -0
  51. package/dist/assets/requirementDiagram-MS252O5E-DKp3A5f_.js +84 -0
  52. package/dist/assets/sankeyDiagram-XADWPNL6-BMV0lAz8.js +10 -0
  53. package/dist/assets/sequenceDiagram-FGHM5R23-CQ4preep.js +157 -0
  54. package/dist/assets/stateDiagram-FHFEXIEX-BKqYYN8H.js +1 -0
  55. package/dist/assets/stateDiagram-v2-QKLJ7IA2-C1W1ECmZ.js +1 -0
  56. package/dist/assets/timeline-definition-GMOUNBTQ-4kgeuumv.js +120 -0
  57. package/dist/assets/vendor-antd-Dk5s46Ag.js +406 -0
  58. package/dist/assets/vendor-codemirror-DxvDOrio.js +46 -0
  59. package/dist/assets/vendor-highlight-DVwgAdJY.js +3 -0
  60. package/dist/assets/vendor-markdown-DO-Ppp4f.js +60 -0
  61. package/dist/assets/vendor-qrcode-hI5wlAgK.js +9 -0
  62. package/dist/assets/vendor-virtuoso-HW77kTCh.js +1 -0
  63. package/dist/assets/vendor-xterm-D2cUrYEx.js +140 -0
  64. package/dist/assets/vennDiagram-DHZGUBPP-CqBcUIdK.js +34 -0
  65. package/dist/assets/wardley-RL74JXVD-CbEnkKx8.js +162 -0
  66. package/dist/assets/wardleyDiagram-NUSXRM2D-BJrjkZMg.js +20 -0
  67. package/dist/assets/xychartDiagram-5P7HB3ND-D8aBEz8e.js +7 -0
  68. package/dist/index.html +3 -3
  69. package/package.json +1 -1
  70. package/server.js +13 -4
  71. package/dist/assets/App-BHfyP8-J.js +0 -31
  72. package/dist/assets/AppHeader.module-W_78JZt9.js +0 -573
  73. package/dist/assets/Mobile-ca5EOMpN.js +0 -10
  74. package/dist/assets/_baseUniq-DYSZB4Xx.js +0 -1
  75. package/dist/assets/arc-BChSP8hM.js +0 -1
  76. package/dist/assets/architectureDiagram-Q4EWVU46-vlr5Q6DQ.js +0 -36
  77. package/dist/assets/blockDiagram-DXYQGD6D-4C3Amh2i.js +0 -132
  78. package/dist/assets/c4Diagram-AHTNJAMY-wI0efLSs.js +0 -10
  79. package/dist/assets/channel-d8DITadq.js +0 -1
  80. package/dist/assets/chunk-4BX2VUAB-BX9brpDB.js +0 -1
  81. package/dist/assets/chunk-4TB4RGXK-DvFQ-X9V.js +0 -206
  82. package/dist/assets/chunk-55IACEB6-BNmYjPNf.js +0 -1
  83. package/dist/assets/chunk-EDXVE4YY-BNvDPqBE.js +0 -1
  84. package/dist/assets/chunk-OYMX7WX6-BwlvIpeD.js +0 -231
  85. package/dist/assets/chunk-QZHKN3VN-BS6RK8_X.js +0 -1
  86. package/dist/assets/chunk-YZCP3GAM-oOqmydQz.js +0 -1
  87. package/dist/assets/classDiagram-6PBFFD2Q-B1oRrMCc.js +0 -1
  88. package/dist/assets/classDiagram-v2-HSJHXN6E-B1oRrMCc.js +0 -1
  89. package/dist/assets/clone-BrNOd7Lq.js +0 -1
  90. package/dist/assets/cose-bilkent-S5V4N54A-CamsIqkY.js +0 -1
  91. package/dist/assets/cytoscape.esm-DxGcaOPV.js +0 -331
  92. package/dist/assets/dagre-KV5264BT-CPAWWiBh.js +0 -4
  93. package/dist/assets/defaultLocale-DX6XiGOO.js +0 -1
  94. package/dist/assets/diagram-5BDNPKRD-D6TmzGhl.js +0 -10
  95. package/dist/assets/diagram-G4DWMVQ6-DDuJnMCL.js +0 -24
  96. package/dist/assets/diagram-MMDJMWI5-CQWhvrpz.js +0 -43
  97. package/dist/assets/diagram-TYMM5635-CEDj3w_h.js +0 -24
  98. package/dist/assets/erDiagram-SMLLAGMA-B_eQqha6.js +0 -85
  99. package/dist/assets/flowDiagram-DWJPFMVM-B985i3uQ.js +0 -162
  100. package/dist/assets/ganttDiagram-T4ZO3ILL-DKp62vr3.js +0 -292
  101. package/dist/assets/gitGraphDiagram-UUTBAWPF-Cc1gyz1Q.js +0 -106
  102. package/dist/assets/graph-C-1-3bsA.js +0 -1
  103. package/dist/assets/html2canvas.esm-QH1iLAAe.js +0 -22
  104. package/dist/assets/index-LH2WLu05.js +0 -2
  105. package/dist/assets/infoDiagram-42DDH7IO-DqXaAHZz.js +0 -2
  106. package/dist/assets/init-Gi6I4Gst.js +0 -1
  107. package/dist/assets/ishikawaDiagram-UXIWVN3A-zdUdDJX2.js +0 -70
  108. package/dist/assets/journeyDiagram-VCZTEJTY-ip5SzODy.js +0 -139
  109. package/dist/assets/kanban-definition-6JOO6SKY-D5EYh6AP.js +0 -89
  110. package/dist/assets/katex-DkKDou_j.js +0 -257
  111. package/dist/assets/layout-Cjq8AL8G.js +0 -1
  112. package/dist/assets/linear-U0KsEJ2u.js +0 -1
  113. package/dist/assets/mermaid.core-CT-5crLN.js +0 -308
  114. package/dist/assets/min-C7G6pq26.js +0 -1
  115. package/dist/assets/mindmap-definition-QFDTVHPH-CIzhFOw1.js +0 -96
  116. package/dist/assets/ordinal-Cboi1Yqb.js +0 -1
  117. package/dist/assets/pieDiagram-DEJITSTG-Cp1Zd1MQ.js +0 -30
  118. package/dist/assets/quadrantDiagram-34T5L4WZ-Cp31xM90.js +0 -7
  119. package/dist/assets/requirementDiagram-MS252O5E-Dbg_eQqB.js +0 -84
  120. package/dist/assets/sankeyDiagram-XADWPNL6-CMrzwpwC.js +0 -10
  121. package/dist/assets/sequenceDiagram-FGHM5R23-KJegoBnN.js +0 -157
  122. package/dist/assets/stateDiagram-FHFEXIEX-BDWprYzE.js +0 -1
  123. package/dist/assets/stateDiagram-v2-QKLJ7IA2-CCUmB0qI.js +0 -1
  124. package/dist/assets/timeline-definition-GMOUNBTQ-BOWeG5LY.js +0 -120
  125. package/dist/assets/vendor-antd-CtdKd5xs.js +0 -406
  126. package/dist/assets/vendor-codemirror-CdXaVX4e.js +0 -46
  127. package/dist/assets/vendor-highlight-D4ATuRwX.js +0 -3
  128. package/dist/assets/vendor-markdown-CO-jRjTB.js +0 -60
  129. package/dist/assets/vendor-qrcode-D05RfzwB.js +0 -9
  130. package/dist/assets/vendor-virtuoso-BhnFrbmh.js +0 -1
  131. package/dist/assets/vendor-xterm-DWMOrwSy.js +0 -140
  132. package/dist/assets/vennDiagram-DHZGUBPP-B6mLodPk.js +0 -34
  133. package/dist/assets/wardley-RL74JXVD-CovHs24Z.js +0 -162
  134. package/dist/assets/wardleyDiagram-NUSXRM2D-CBg_VXF7.js +0 -20
  135. package/dist/assets/xychartDiagram-5P7HB3ND-BRxgk_oX.js +0 -7
@@ -0,0 +1,308 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-KV5264BT-Dc7qbya2.js","assets/graph-CRpmapJV.js","assets/_baseUniq-DJPPdHyT.js","assets/layout-CX5hpkD2.js","assets/min-CDExe3RN.js","assets/clone-CX_D5SrR.js","assets/index-DJ0iGKLy.js","assets/vendor-codemirror-DxvDOrio.js","assets/vendor-antd-Dk5s46Ag.js","assets/index-D7bDh8fW.css","assets/vendor-markdown-DO-Ppp4f.js","assets/cose-bilkent-S5V4N54A-DpwiMCiq.js","assets/cytoscape.esm-BMgRe88L.js","assets/c4Diagram-AHTNJAMY-CFHX4Dfx.js","assets/chunk-YZCP3GAM-BYW1PNda.js","assets/flowDiagram-DWJPFMVM-yf315tJr.js","assets/chunk-FMBD7UC4-BCaKpugk.js","assets/chunk-55IACEB6-DcgWxDD5.js","assets/chunk-EDXVE4YY-DeUzWpQx.js","assets/channel-G3S1FOvm.js","assets/erDiagram-SMLLAGMA-Ckj0dkk7.js","assets/gitGraphDiagram-UUTBAWPF-CesdgsJi.js","assets/chunk-4BX2VUAB-CiktxOyY.js","assets/chunk-QZHKN3VN-BREApeQ-.js","assets/wardley-RL74JXVD-CbEnkKx8.js","assets/ganttDiagram-T4ZO3ILL-Ch2bINVC.js","assets/linear-tWlC-NXc.js","assets/init-C7FSzFHJ.js","assets/defaultLocale-CcTwRAjA.js","assets/infoDiagram-42DDH7IO-CuD16P9Y.js","assets/pieDiagram-DEJITSTG-DNrnOqmz.js","assets/arc-DZ3Bjq-l.js","assets/ordinal-aRyHI6gl.js","assets/quadrantDiagram-34T5L4WZ-Cl176vnh.js","assets/xychartDiagram-5P7HB3ND-D8aBEz8e.js","assets/requirementDiagram-MS252O5E-DKp3A5f_.js","assets/sequenceDiagram-FGHM5R23-CQ4preep.js","assets/classDiagram-6PBFFD2Q-B0-7EUsz.js","assets/chunk-4TB4RGXK-DHl7ZlQV.js","assets/classDiagram-v2-HSJHXN6E-B0-7EUsz.js","assets/stateDiagram-FHFEXIEX-BKqYYN8H.js","assets/chunk-OYMX7WX6-DKMEMbG9.js","assets/stateDiagram-v2-QKLJ7IA2-C1W1ECmZ.js","assets/journeyDiagram-VCZTEJTY-B6TtR2Zk.js","assets/timeline-definition-GMOUNBTQ-4kgeuumv.js","assets/mindmap-definition-QFDTVHPH-CW0yNQcb.js","assets/kanban-definition-6JOO6SKY-DTcNHYUS.js","assets/sankeyDiagram-XADWPNL6-BMV0lAz8.js","assets/diagram-TYMM5635-HfNcJIfT.js","assets/diagram-MMDJMWI5-C-3cRdzG.js","assets/blockDiagram-DXYQGD6D-CoUm8UC5.js","assets/diagram-5BDNPKRD-v7FsHeLQ.js","assets/architectureDiagram-Q4EWVU46-xy0J2lr0.js","assets/ishikawaDiagram-UXIWVN3A-4y8aG54G.js","assets/vennDiagram-DHZGUBPP-CqBcUIdK.js","assets/diagram-G4DWMVQ6-BhKNBlcE.js","assets/wardleyDiagram-NUSXRM2D-BJrjkZMg.js"])))=>i.map(i=>d[i]);
2
+ var __defProp=Object.defineProperty;var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value;var __publicField=(obj,key,value)=>__defNormalProp(obj,typeof key!="symbol"?key+"":key,value);import{_ as __vitePreload}from"./index-DJ0iGKLy.js";import{l as dayjs2,a2 as serialize,a3 as stringify,a4 as compile}from"./vendor-antd-Dk5s46Ag.js";import{p as purify}from"./vendor-markdown-DO-Ppp4f.js";var __defProp2=Object.defineProperty,__name=(target,value)=>__defProp2(target,"name",{value,configurable:!0}),__export=(target,all)=>{for(var name in all)__defProp2(target,name,{get:all[name],enumerable:!0})},LEVELS={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},log={trace:__name((..._args)=>{},"trace"),debug:__name((..._args)=>{},"debug"),info:__name((..._args)=>{},"info"),warn:__name((..._args)=>{},"warn"),error:__name((..._args)=>{},"error"),fatal:__name((..._args)=>{},"fatal")},setLogLevel=__name(function(level="fatal"){let numericLevel=LEVELS.fatal;typeof level=="string"?level.toLowerCase()in LEVELS&&(numericLevel=LEVELS[level]):typeof level=="number"&&(numericLevel=level),log.trace=()=>{},log.debug=()=>{},log.info=()=>{},log.warn=()=>{},log.error=()=>{},log.fatal=()=>{},numericLevel<=LEVELS.fatal&&(log.fatal=console.error?console.error.bind(console,format("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",format("FATAL"))),numericLevel<=LEVELS.error&&(log.error=console.error?console.error.bind(console,format("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",format("ERROR"))),numericLevel<=LEVELS.warn&&(log.warn=console.warn?console.warn.bind(console,format("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",format("WARN"))),numericLevel<=LEVELS.info&&(log.info=console.info?console.info.bind(console,format("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",format("INFO"))),numericLevel<=LEVELS.debug&&(log.debug=console.debug?console.debug.bind(console,format("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",format("DEBUG"))),numericLevel<=LEVELS.trace&&(log.trace=console.debug?console.debug.bind(console,format("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",format("TRACE")))},"setLogLevel"),format=__name(level=>`%c${dayjs2().format("ss.SSS")} : ${level} : `,"format");const Channel={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:r2=>r2>=255?255:r2<0?0:r2,g:g2=>g2>=255?255:g2<0?0:g2,b:b2=>b2>=255?255:b2<0?0:b2,h:h2=>h2%360,s:s2=>s2>=100?100:s2<0?0:s2,l:l4=>l4>=100?100:l4<0?0:l4,a:a2=>a2>=1?1:a2<0?0:a2},toLinear:c2=>{const n2=c2/255;return c2>.03928?Math.pow((n2+.055)/1.055,2.4):n2/12.92},hue2rgb:(p2,q2,t2)=>(t2<0&&(t2+=1),t2>1&&(t2-=1),t2<1/6?p2+(q2-p2)*6*t2:t2<1/2?q2:t2<2/3?p2+(q2-p2)*(2/3-t2)*6:p2),hsl2rgb:({h:h2,s:s2,l:l4},channel)=>{if(!s2)return l4*2.55;h2/=360,s2/=100,l4/=100;const q2=l4<.5?l4*(1+s2):l4+s2-l4*s2,p2=2*l4-q2;switch(channel){case"r":return Channel.hue2rgb(p2,q2,h2+1/3)*255;case"g":return Channel.hue2rgb(p2,q2,h2)*255;case"b":return Channel.hue2rgb(p2,q2,h2-1/3)*255}},rgb2hsl:({r:r2,g:g2,b:b2},channel)=>{r2/=255,g2/=255,b2/=255;const max2=Math.max(r2,g2,b2),min2=Math.min(r2,g2,b2),l4=(max2+min2)/2;if(channel==="l")return l4*100;if(max2===min2)return 0;const d2=max2-min2,s2=l4>.5?d2/(2-max2-min2):d2/(max2+min2);if(channel==="s")return s2*100;switch(max2){case r2:return((g2-b2)/d2+(g2<b2?6:0))*60;case g2:return((b2-r2)/d2+2)*60;case b2:return((r2-g2)/d2+4)*60;default:return-1}}},Lang={clamp:(number,lower2,upper)=>lower2>upper?Math.min(lower2,Math.max(upper,number)):Math.min(upper,Math.max(lower2,number)),round:number=>Math.round(number*1e10)/1e10},Unit={dec2hex:dec=>{const hex2=Math.round(dec).toString(16);return hex2.length>1?hex2:`0${hex2}`}},Utils={channel:Channel,lang:Lang,unit:Unit},DEC2HEX={};for(let i2=0;i2<=255;i2++)DEC2HEX[i2]=Utils.unit.dec2hex(i2);const TYPE={ALL:0,RGB:1,HSL:2};class Type{constructor(){this.type=TYPE.ALL}get(){return this.type}set(type2){if(this.type&&this.type!==type2)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=type2}reset(){this.type=TYPE.ALL}is(type2){return this.type===type2}}class Channels{constructor(data,color2){this.color=color2,this.changed=!1,this.data=data,this.type=new Type}set(data,color2){return this.color=color2,this.changed=!1,this.data=data,this.type.type=TYPE.ALL,this}_ensureHSL(){const data=this.data,{h:h2,s:s2,l:l4}=data;h2===void 0&&(data.h=Utils.channel.rgb2hsl(data,"h")),s2===void 0&&(data.s=Utils.channel.rgb2hsl(data,"s")),l4===void 0&&(data.l=Utils.channel.rgb2hsl(data,"l"))}_ensureRGB(){const data=this.data,{r:r2,g:g2,b:b2}=data;r2===void 0&&(data.r=Utils.channel.hsl2rgb(data,"r")),g2===void 0&&(data.g=Utils.channel.hsl2rgb(data,"g")),b2===void 0&&(data.b=Utils.channel.hsl2rgb(data,"b"))}get r(){const data=this.data,r2=data.r;return!this.type.is(TYPE.HSL)&&r2!==void 0?r2:(this._ensureHSL(),Utils.channel.hsl2rgb(data,"r"))}get g(){const data=this.data,g2=data.g;return!this.type.is(TYPE.HSL)&&g2!==void 0?g2:(this._ensureHSL(),Utils.channel.hsl2rgb(data,"g"))}get b(){const data=this.data,b2=data.b;return!this.type.is(TYPE.HSL)&&b2!==void 0?b2:(this._ensureHSL(),Utils.channel.hsl2rgb(data,"b"))}get h(){const data=this.data,h2=data.h;return!this.type.is(TYPE.RGB)&&h2!==void 0?h2:(this._ensureRGB(),Utils.channel.rgb2hsl(data,"h"))}get s(){const data=this.data,s2=data.s;return!this.type.is(TYPE.RGB)&&s2!==void 0?s2:(this._ensureRGB(),Utils.channel.rgb2hsl(data,"s"))}get l(){const data=this.data,l4=data.l;return!this.type.is(TYPE.RGB)&&l4!==void 0?l4:(this._ensureRGB(),Utils.channel.rgb2hsl(data,"l"))}get a(){return this.data.a}set r(r2){this.type.set(TYPE.RGB),this.changed=!0,this.data.r=r2}set g(g2){this.type.set(TYPE.RGB),this.changed=!0,this.data.g=g2}set b(b2){this.type.set(TYPE.RGB),this.changed=!0,this.data.b=b2}set h(h2){this.type.set(TYPE.HSL),this.changed=!0,this.data.h=h2}set s(s2){this.type.set(TYPE.HSL),this.changed=!0,this.data.s=s2}set l(l4){this.type.set(TYPE.HSL),this.changed=!0,this.data.l=l4}set a(a2){this.changed=!0,this.data.a=a2}}const channels=new Channels({r:0,g:0,b:0,a:0},"transparent"),Hex={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:color2=>{if(color2.charCodeAt(0)!==35)return;const match=color2.match(Hex.re);if(!match)return;const hex2=match[1],dec=parseInt(hex2,16),length=hex2.length,hasAlpha=length%4===0,isFullLength=length>4,multiplier=isFullLength?1:17,bits=isFullLength?8:4,bitsOffset=hasAlpha?0:-1,mask=isFullLength?255:15;return channels.set({r:(dec>>bits*(bitsOffset+3)&mask)*multiplier,g:(dec>>bits*(bitsOffset+2)&mask)*multiplier,b:(dec>>bits*(bitsOffset+1)&mask)*multiplier,a:hasAlpha?(dec&mask)*multiplier/255:1},color2)},stringify:channels2=>{const{r:r2,g:g2,b:b2,a:a2}=channels2;return a2<1?`#${DEC2HEX[Math.round(r2)]}${DEC2HEX[Math.round(g2)]}${DEC2HEX[Math.round(b2)]}${DEC2HEX[Math.round(a2*255)]}`:`#${DEC2HEX[Math.round(r2)]}${DEC2HEX[Math.round(g2)]}${DEC2HEX[Math.round(b2)]}`}},HSL={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:hue2=>{const match=hue2.match(HSL.hueRe);if(match){const[,number,unit]=match;switch(unit){case"grad":return Utils.channel.clamp.h(parseFloat(number)*.9);case"rad":return Utils.channel.clamp.h(parseFloat(number)*180/Math.PI);case"turn":return Utils.channel.clamp.h(parseFloat(number)*360)}}return Utils.channel.clamp.h(parseFloat(hue2))},parse:color2=>{const charCode=color2.charCodeAt(0);if(charCode!==104&&charCode!==72)return;const match=color2.match(HSL.re);if(!match)return;const[,h2,s2,l4,a2,isAlphaPercentage]=match;return channels.set({h:HSL._hue2deg(h2),s:Utils.channel.clamp.s(parseFloat(s2)),l:Utils.channel.clamp.l(parseFloat(l4)),a:a2?Utils.channel.clamp.a(isAlphaPercentage?parseFloat(a2)/100:parseFloat(a2)):1},color2)},stringify:channels2=>{const{h:h2,s:s2,l:l4,a:a2}=channels2;return a2<1?`hsla(${Utils.lang.round(h2)}, ${Utils.lang.round(s2)}%, ${Utils.lang.round(l4)}%, ${a2})`:`hsl(${Utils.lang.round(h2)}, ${Utils.lang.round(s2)}%, ${Utils.lang.round(l4)}%)`}},Keyword={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:color2=>{color2=color2.toLowerCase();const hex2=Keyword.colors[color2];if(hex2)return Hex.parse(hex2)},stringify:channels2=>{const hex2=Hex.stringify(channels2);for(const name in Keyword.colors)if(Keyword.colors[name]===hex2)return name}},RGB={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:color2=>{const charCode=color2.charCodeAt(0);if(charCode!==114&&charCode!==82)return;const match=color2.match(RGB.re);if(!match)return;const[,r2,isRedPercentage,g2,isGreenPercentage,b2,isBluePercentage,a2,isAlphaPercentage]=match;return channels.set({r:Utils.channel.clamp.r(isRedPercentage?parseFloat(r2)*2.55:parseFloat(r2)),g:Utils.channel.clamp.g(isGreenPercentage?parseFloat(g2)*2.55:parseFloat(g2)),b:Utils.channel.clamp.b(isBluePercentage?parseFloat(b2)*2.55:parseFloat(b2)),a:a2?Utils.channel.clamp.a(isAlphaPercentage?parseFloat(a2)/100:parseFloat(a2)):1},color2)},stringify:channels2=>{const{r:r2,g:g2,b:b2,a:a2}=channels2;return a2<1?`rgba(${Utils.lang.round(r2)}, ${Utils.lang.round(g2)}, ${Utils.lang.round(b2)}, ${Utils.lang.round(a2)})`:`rgb(${Utils.lang.round(r2)}, ${Utils.lang.round(g2)}, ${Utils.lang.round(b2)})`}},Color$1={format:{keyword:Keyword,hex:Hex,rgb:RGB,rgba:RGB,hsl:HSL,hsla:HSL},parse:color2=>{if(typeof color2!="string")return color2;const channels2=Hex.parse(color2)||RGB.parse(color2)||HSL.parse(color2)||Keyword.parse(color2);if(channels2)return channels2;throw new Error(`Unsupported color format: "${color2}"`)},stringify:channels2=>!channels2.changed&&channels2.color?channels2.color:channels2.type.is(TYPE.HSL)||channels2.data.r===void 0?HSL.stringify(channels2):channels2.a<1||!Number.isInteger(channels2.r)||!Number.isInteger(channels2.g)||!Number.isInteger(channels2.b)?RGB.stringify(channels2):Hex.stringify(channels2)},change=(color2,channels2)=>{const ch=Color$1.parse(color2);for(const c2 in channels2)ch[c2]=Utils.channel.clamp[c2](channels2[c2]);return Color$1.stringify(ch)},rgba$1=(r2,g2,b2=0,a2=1)=>{if(typeof r2!="number")return change(r2,{a:g2});const channels$1=channels.set({r:Utils.channel.clamp.r(r2),g:Utils.channel.clamp.g(g2),b:Utils.channel.clamp.b(b2),a:Utils.channel.clamp.a(a2)});return Color$1.stringify(channels$1)},luminance=color2=>{const{r:r2,g:g2,b:b2}=Color$1.parse(color2),luminance2=.2126*Utils.channel.toLinear(r2)+.7152*Utils.channel.toLinear(g2)+.0722*Utils.channel.toLinear(b2);return Utils.lang.round(luminance2)},isLight=color2=>luminance(color2)>=.5,isDark=color2=>!isLight(color2),adjustChannel=(color2,channel,amount)=>{const channels2=Color$1.parse(color2),amountCurrent=channels2[channel],amountNext=Utils.channel.clamp[channel](amountCurrent+amount);return amountCurrent!==amountNext&&(channels2[channel]=amountNext),Color$1.stringify(channels2)},lighten=(color2,amount)=>adjustChannel(color2,"l",amount),darken=(color2,amount)=>adjustChannel(color2,"l",-amount),adjust=(color2,channels2)=>{const ch=Color$1.parse(color2),changes={};for(const c2 in channels2)channels2[c2]&&(changes[c2]=ch[c2]+channels2[c2]);return change(color2,changes)},mix=(color1,color2,weight=50)=>{const{r:r1,g:g1,b:b1,a:a1}=Color$1.parse(color1),{r:r2,g:g2,b:b2,a:a2}=Color$1.parse(color2),weightScale=weight/100,weightNormalized=weightScale*2-1,alphaDelta=a1-a2,weight1=((weightNormalized*alphaDelta===-1?weightNormalized:(weightNormalized+alphaDelta)/(1+weightNormalized*alphaDelta))+1)/2,weight2=1-weight1,r3=r1*weight1+r2*weight2,g3=g1*weight1+g2*weight2,b3=b1*weight1+b2*weight2,a3=a1*weightScale+a2*(1-weightScale);return rgba$1(r3,g3,b3,a3)},invert=(color2,weight=100)=>{const inverse=Color$1.parse(color2);return inverse.r=255-inverse.r,inverse.g=255-inverse.g,inverse.b=255-inverse.b,mix(inverse,color2,weight)};var frontMatterRegex=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,directiveRegex=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,anyCommentRegex=/\s*%%.*\n/gm,_a,UnknownDiagramError=(_a=class extends Error{constructor(message){super(message),this.name="UnknownDiagramError"}},__name(_a,"UnknownDiagramError"),_a),detectors={},detectType$1=__name(function(text2,config2){text2=text2.replace(frontMatterRegex,"").replace(directiveRegex,"").replace(anyCommentRegex,`
3
+ `);for(const[key,{detector:detector32}]of Object.entries(detectors))if(detector32(text2,config2))return key;throw new UnknownDiagramError(`No diagram type detected matching given configuration for text: ${text2}`)},"detectType"),registerLazyLoadedDiagrams=__name((...diagrams2)=>{for(const{id:id32,detector:detector32,loader:loader32}of diagrams2)addDetector(id32,detector32,loader32)},"registerLazyLoadedDiagrams"),addDetector=__name((key,detector32,loader32)=>{detectors[key]&&log.warn(`Detector with key ${key} already exists. Overwriting.`),detectors[key]={detector:detector32,loader:loader32},log.debug(`Detector with key ${key} added${loader32?" with loader":""}`)},"addDetector"),getDiagramLoader=__name(key=>detectors[key].loader,"getDiagramLoader"),assignWithDepth=__name((dst,src,{depth=2,clobber=!1}={})=>{const config2={depth,clobber};return Array.isArray(src)&&!Array.isArray(dst)?(src.forEach(s2=>assignWithDepth(dst,s2,config2)),dst):Array.isArray(src)&&Array.isArray(dst)?(src.forEach(s2=>{dst.includes(s2)||dst.push(s2)}),dst):dst===void 0||depth<=0?dst!=null&&typeof dst=="object"&&typeof src=="object"?Object.assign(dst,src):src:(src!==void 0&&typeof dst=="object"&&typeof src=="object"&&Object.keys(src).forEach(key=>{typeof src[key]=="object"&&src[key]!==null&&(dst[key]===void 0||typeof dst[key]=="object")?(dst[key]===void 0&&(dst[key]=Array.isArray(src[key])?[]:{}),dst[key]=assignWithDepth(dst[key],src[key],{depth:depth-1,clobber})):(clobber||typeof dst[key]!="object"&&typeof src[key]!="object")&&(dst[key]=src[key])}),dst)},"assignWithDepth"),assignWithDepth_default=assignWithDepth,oldAttributeBackgroundColorOdd="#ffffff",oldAttributeBackgroundColorEven="#f2f2f2",mkBorder=__name((col,darkMode)=>darkMode?adjust(col,{s:-40,l:10}):adjust(col,{s:-40,l:-10}),"mkBorder"),_a2,Theme=(_a2=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var _a17,_b,_c,_d,_e2,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r,_s,_t,_u,_v;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||adjust(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||adjust(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mkBorder(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mkBorder(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||invert(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||invert(this.tertiaryColor),this.lineColor=this.lineColor||invert(this.background),this.arrowheadColor=this.arrowheadColor||invert(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?darken(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||darken(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||invert(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||lighten(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||darken(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||darken(this.mainBkg,10)):(this.rowOdd=this.rowOdd||lighten(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||lighten(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||adjust(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||adjust(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust(this.primaryColor,{h:330}),this.darkMode)for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScale"+i2]=darken(this["cScale"+i2],75);else for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScale"+i2]=darken(this["cScale"+i2],25);for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleInv"+i2]=this["cScaleInv"+i2]||invert(this["cScale"+i2]);for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this.darkMode?this["cScalePeer"+i2]=this["cScalePeer"+i2]||lighten(this["cScale"+i2],10):this["cScalePeer"+i2]=this["cScalePeer"+i2]||darken(this["cScale"+i2],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleLabel"+i2]=this["cScaleLabel"+i2]||this.scaleLabelColor;const multiplier=this.darkMode?-4:-1;for(let i2=0;i2<5;i2++)this["surface"+i2]=this["surface"+i2]||adjust(this.mainBkg,{h:180,s:-15,l:multiplier*(5+i2*3)}),this["surfacePeer"+i2]=this["surfacePeer"+i2]||adjust(this.mainBkg,{h:180,s:-15,l:multiplier*(8+i2*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||adjust(this.primaryColor,{h:64}),this.fillType3=this.fillType3||adjust(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||adjust(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||adjust(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||adjust(this.primaryColor,{h:128}),this.fillType7=this.fillType7||adjust(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||adjust(this.primaryColor,{l:-10}),this.pie5=this.pie5||adjust(this.secondaryColor,{l:-10}),this.pie6=this.pie6||adjust(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||adjust(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||adjust(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||adjust(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||adjust(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||adjust(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||adjust(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??adjust(this.primaryColor,{l:-30}),this.venn2=this.venn2??adjust(this.secondaryColor,{l:-30}),this.venn3=this.venn3??adjust(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??adjust(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??adjust(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??adjust(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??adjust(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??adjust(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((_a17=this.radar)==null?void 0:_a17.axisColor)||this.lineColor,axisStrokeWidth:((_b=this.radar)==null?void 0:_b.axisStrokeWidth)||2,axisLabelFontSize:((_c=this.radar)==null?void 0:_c.axisLabelFontSize)||12,curveOpacity:((_d=this.radar)==null?void 0:_d.curveOpacity)||.5,curveStrokeWidth:((_e2=this.radar)==null?void 0:_e2.curveStrokeWidth)||2,graticuleColor:((_f=this.radar)==null?void 0:_f.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((_g=this.radar)==null?void 0:_g.graticuleStrokeWidth)||1,graticuleOpacity:((_h=this.radar)==null?void 0:_h.graticuleOpacity)||.3,legendBoxSize:((_i=this.radar)==null?void 0:_i.legendBoxSize)||12,legendFontSize:((_j=this.radar)==null?void 0:_j.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||adjust(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||adjust(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||adjust(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||adjust(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||adjust(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||adjust(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||isDark(this.quadrant1Fill)?lighten(this.quadrant1Fill):darken(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:((_k=this.xyChart)==null?void 0:_k.backgroundColor)||this.background,titleColor:((_l=this.xyChart)==null?void 0:_l.titleColor)||this.primaryTextColor,dataLabelColor:((_m=this.xyChart)==null?void 0:_m.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((_n=this.xyChart)==null?void 0:_n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_o=this.xyChart)==null?void 0:_o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_p=this.xyChart)==null?void 0:_p.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_q=this.xyChart)==null?void 0:_q.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((_r=this.xyChart)==null?void 0:_r.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_s=this.xyChart)==null?void 0:_s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_t=this.xyChart)==null?void 0:_t.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_u=this.xyChart)==null?void 0:_u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_v=this.xyChart)==null?void 0:_v.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?darken(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||adjust(this.primaryColor,{h:-30}),this.git4=this.git4||adjust(this.primaryColor,{h:-60}),this.git5=this.git5||adjust(this.primaryColor,{h:-90}),this.git6=this.git6||adjust(this.primaryColor,{h:60}),this.git7=this.git7||adjust(this.primaryColor,{h:120}),this.darkMode?(this.git0=lighten(this.git0,25),this.git1=lighten(this.git1,25),this.git2=lighten(this.git2,25),this.git3=lighten(this.git3,25),this.git4=lighten(this.git4,25),this.git5=lighten(this.git5,25),this.git6=lighten(this.git6,25),this.git7=lighten(this.git7,25)):(this.git0=darken(this.git0,25),this.git1=darken(this.git1,25),this.git2=darken(this.git2,25),this.git3=darken(this.git3,25),this.git4=darken(this.git4,25),this.git5=darken(this.git5,25),this.git6=darken(this.git6,25),this.git7=darken(this.git7,25)),this.gitInv0=this.gitInv0||invert(this.git0),this.gitInv1=this.gitInv1||invert(this.git1),this.gitInv2=this.gitInv2||invert(this.git2),this.gitInv3=this.gitInv3||invert(this.git3),this.gitInv4=this.gitInv4||invert(this.git4),this.gitInv5=this.gitInv5||invert(this.git5),this.gitInv6=this.gitInv6||invert(this.git6),this.gitInv7=this.gitInv7||invert(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||oldAttributeBackgroundColorOdd,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||oldAttributeBackgroundColorEven,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(overrides){if(typeof overrides!="object"){this.updateColors();return}const keys=Object.keys(overrides);keys.forEach(k2=>{this[k2]=overrides[k2]}),this.updateColors(),keys.forEach(k2=>{this[k2]=overrides[k2]})}},__name(_a2,"Theme"),_a2),getThemeVariables=__name(userOverrides=>{const theme=new Theme;return theme.calculate(userOverrides),theme},"getThemeVariables"),_a3,Theme2=(_a3=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=lighten(this.primaryColor,16),this.tertiaryColor=adjust(this.primaryColor,{h:-160}),this.primaryBorderColor=invert(this.background),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert(this.primaryColor),this.secondaryTextColor=invert(this.secondaryColor),this.tertiaryTextColor=invert(this.tertiaryColor),this.lineColor=invert(this.background),this.textColor=invert(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=lighten(invert("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=rgba$1(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=darken("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=darken(this.sectionBkgColor,10),this.taskBorderColor=rgba$1(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=rgba$1(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||lighten(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||darken(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var _a17,_b,_c,_d,_e2,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r,_s,_t,_u,_v;this.secondBkg=lighten(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=lighten(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=lighten(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=invert(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=adjust(this.primaryColor,{h:64}),this.fillType3=adjust(this.secondaryColor,{h:64}),this.fillType4=adjust(this.primaryColor,{h:-64}),this.fillType5=adjust(this.secondaryColor,{h:-64}),this.fillType6=adjust(this.primaryColor,{h:128}),this.fillType7=adjust(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||adjust(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust(this.primaryColor,{h:210}),this.cScale9=this.cScale9||adjust(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust(this.primaryColor,{h:330});for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleInv"+i2]=this["cScaleInv"+i2]||invert(this["cScale"+i2]);for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScalePeer"+i2]=this["cScalePeer"+i2]||lighten(this["cScale"+i2],10);for(let i2=0;i2<5;i2++)this["surface"+i2]=this["surface"+i2]||adjust(this.mainBkg,{h:30,s:-30,l:-(-10+i2*4)}),this["surfacePeer"+i2]=this["surfacePeer"+i2]||adjust(this.mainBkg,{h:30,s:-30,l:-(-7+i2*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleLabel"+i2]=this["cScaleLabel"+i2]||this.scaleLabelColor;for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["pie"+i2]=this["cScale"+i2];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let i2=0;i2<8;i2++)this["venn"+(i2+1)]=this["venn"+(i2+1)]??lighten(this["cScale"+i2],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||adjust(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||adjust(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||adjust(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||adjust(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||adjust(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||adjust(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||isDark(this.quadrant1Fill)?lighten(this.quadrant1Fill):darken(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:((_a17=this.xyChart)==null?void 0:_a17.backgroundColor)||this.background,titleColor:((_b=this.xyChart)==null?void 0:_b.titleColor)||this.primaryTextColor,dataLabelColor:((_c=this.xyChart)==null?void 0:_c.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((_d=this.xyChart)==null?void 0:_d.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_e2=this.xyChart)==null?void 0:_e2.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_f=this.xyChart)==null?void 0:_f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_g=this.xyChart)==null?void 0:_g.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((_h=this.xyChart)==null?void 0:_h.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_i=this.xyChart)==null?void 0:_i.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_j=this.xyChart)==null?void 0:_j.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_k=this.xyChart)==null?void 0:_k.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_l=this.xyChart)==null?void 0:_l.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:((_m=this.radar)==null?void 0:_m.axisColor)||this.lineColor,axisStrokeWidth:((_n=this.radar)==null?void 0:_n.axisStrokeWidth)||2,axisLabelFontSize:((_o=this.radar)==null?void 0:_o.axisLabelFontSize)||12,curveOpacity:((_p=this.radar)==null?void 0:_p.curveOpacity)||.5,curveStrokeWidth:((_q=this.radar)==null?void 0:_q.curveStrokeWidth)||2,graticuleColor:((_r=this.radar)==null?void 0:_r.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((_s=this.radar)==null?void 0:_s.graticuleStrokeWidth)||1,graticuleOpacity:((_t=this.radar)==null?void 0:_t.graticuleOpacity)||.3,legendBoxSize:((_u=this.radar)==null?void 0:_u.legendBoxSize)||12,legendFontSize:((_v=this.radar)==null?void 0:_v.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?darken(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=lighten(this.secondaryColor,20),this.git1=lighten(this.pie2||this.secondaryColor,20),this.git2=lighten(this.pie3||this.tertiaryColor,20),this.git3=lighten(this.pie4||adjust(this.primaryColor,{h:-30}),20),this.git4=lighten(this.pie5||adjust(this.primaryColor,{h:-60}),20),this.git5=lighten(this.pie6||adjust(this.primaryColor,{h:-90}),10),this.git6=lighten(this.pie7||adjust(this.primaryColor,{h:60}),10),this.git7=lighten(this.pie8||adjust(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||invert(this.git0),this.gitInv1=this.gitInv1||invert(this.git1),this.gitInv2=this.gitInv2||invert(this.git2),this.gitInv3=this.gitInv3||invert(this.git3),this.gitInv4=this.gitInv4||invert(this.git4),this.gitInv5=this.gitInv5||invert(this.git5),this.gitInv6=this.gitInv6||invert(this.git6),this.gitInv7=this.gitInv7||invert(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||invert(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||invert(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||lighten(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lighten(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(overrides){if(typeof overrides!="object"){this.updateColors();return}const keys=Object.keys(overrides);keys.forEach(k2=>{this[k2]=overrides[k2]}),this.updateColors(),keys.forEach(k2=>{this[k2]=overrides[k2]})}},__name(_a3,"Theme"),_a3),getThemeVariables2=__name(userOverrides=>{const theme=new Theme2;return theme.calculate(userOverrides),theme},"getThemeVariables"),_a4,Theme3=(_a4=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=adjust(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=adjust(this.primaryColor,{h:-160}),this.primaryBorderColor=mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert(this.primaryColor),this.secondaryTextColor=invert(this.secondaryColor),this.tertiaryTextColor=invert(this.tertiaryColor),this.lineColor=invert(this.background),this.textColor=invert(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=mkBorder(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=rgba$1(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var _a17,_b,_c,_d,_e2,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r,_s,_t,_u,_v;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||adjust(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust(this.primaryColor,{h:210}),this.cScale9=this.cScale9||adjust(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||darken(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||darken(this.tertiaryColor,40);for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScale"+i2]=darken(this["cScale"+i2],10),this["cScalePeer"+i2]=this["cScalePeer"+i2]||darken(this["cScale"+i2],25);for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleInv"+i2]=this["cScaleInv"+i2]||adjust(this["cScale"+i2],{h:180});for(let i2=0;i2<5;i2++)this["surface"+i2]=this["surface"+i2]||adjust(this.mainBkg,{h:30,l:-(5+i2*5)}),this["surfacePeer"+i2]=this["surfacePeer"+i2]||adjust(this.mainBkg,{h:30,l:-(7+i2*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||invert(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||invert(this.labelTextColor);for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleLabel"+i2]=this["cScaleLabel"+i2]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||lighten(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||lighten(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=adjust(this.primaryColor,{h:64}),this.fillType3=adjust(this.secondaryColor,{h:64}),this.fillType4=adjust(this.primaryColor,{h:-64}),this.fillType5=adjust(this.secondaryColor,{h:-64}),this.fillType6=adjust(this.primaryColor,{h:128}),this.fillType7=adjust(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||adjust(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||adjust(this.primaryColor,{l:-10}),this.pie5=this.pie5||adjust(this.secondaryColor,{l:-30}),this.pie6=this.pie6||adjust(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||adjust(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||adjust(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||adjust(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||adjust(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||adjust(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||adjust(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??adjust(this.primaryColor,{l:-30}),this.venn2=this.venn2??adjust(this.secondaryColor,{l:-30}),this.venn3=this.venn3??adjust(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??adjust(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??adjust(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??adjust(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??adjust(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??adjust(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||adjust(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||adjust(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||adjust(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||adjust(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||adjust(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||adjust(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||isDark(this.quadrant1Fill)?lighten(this.quadrant1Fill):darken(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:((_a17=this.radar)==null?void 0:_a17.axisColor)||this.lineColor,axisStrokeWidth:((_b=this.radar)==null?void 0:_b.axisStrokeWidth)||2,axisLabelFontSize:((_c=this.radar)==null?void 0:_c.axisLabelFontSize)||12,curveOpacity:((_d=this.radar)==null?void 0:_d.curveOpacity)||.5,curveStrokeWidth:((_e2=this.radar)==null?void 0:_e2.curveStrokeWidth)||2,graticuleColor:((_f=this.radar)==null?void 0:_f.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((_g=this.radar)==null?void 0:_g.graticuleStrokeWidth)||1,graticuleOpacity:((_h=this.radar)==null?void 0:_h.graticuleOpacity)||.3,legendBoxSize:((_i=this.radar)==null?void 0:_i.legendBoxSize)||12,legendFontSize:((_j=this.radar)==null?void 0:_j.legendFontSize)||12},this.xyChart={backgroundColor:((_k=this.xyChart)==null?void 0:_k.backgroundColor)||this.background,titleColor:((_l=this.xyChart)==null?void 0:_l.titleColor)||this.primaryTextColor,dataLabelColor:((_m=this.xyChart)==null?void 0:_m.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((_n=this.xyChart)==null?void 0:_n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_o=this.xyChart)==null?void 0:_o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_p=this.xyChart)==null?void 0:_p.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_q=this.xyChart)==null?void 0:_q.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((_r=this.xyChart)==null?void 0:_r.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_s=this.xyChart)==null?void 0:_s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_t=this.xyChart)==null?void 0:_t.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_u=this.xyChart)==null?void 0:_u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_v=this.xyChart)==null?void 0:_v.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||adjust(this.primaryColor,{h:-30}),this.git4=this.git4||adjust(this.primaryColor,{h:-60}),this.git5=this.git5||adjust(this.primaryColor,{h:-90}),this.git6=this.git6||adjust(this.primaryColor,{h:60}),this.git7=this.git7||adjust(this.primaryColor,{h:120}),this.darkMode?(this.git0=lighten(this.git0,25),this.git1=lighten(this.git1,25),this.git2=lighten(this.git2,25),this.git3=lighten(this.git3,25),this.git4=lighten(this.git4,25),this.git5=lighten(this.git5,25),this.git6=lighten(this.git6,25),this.git7=lighten(this.git7,25)):(this.git0=darken(this.git0,25),this.git1=darken(this.git1,25),this.git2=darken(this.git2,25),this.git3=darken(this.git3,25),this.git4=darken(this.git4,25),this.git5=darken(this.git5,25),this.git6=darken(this.git6,25),this.git7=darken(this.git7,25)),this.gitInv0=this.gitInv0||darken(invert(this.git0),25),this.gitInv1=this.gitInv1||invert(this.git1),this.gitInv2=this.gitInv2||invert(this.git2),this.gitInv3=this.gitInv3||invert(this.git3),this.gitInv4=this.gitInv4||invert(this.git4),this.gitInv5=this.gitInv5||invert(this.git5),this.gitInv6=this.gitInv6||invert(this.git6),this.gitInv7=this.gitInv7||invert(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||invert(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||invert(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||oldAttributeBackgroundColorOdd,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||oldAttributeBackgroundColorEven}calculate(overrides){if(Object.keys(this).forEach(k2=>{this[k2]==="calculated"&&(this[k2]=void 0)}),typeof overrides!="object"){this.updateColors();return}const keys=Object.keys(overrides);keys.forEach(k2=>{this[k2]=overrides[k2]}),this.updateColors(),keys.forEach(k2=>{this[k2]=overrides[k2]})}},__name(_a4,"Theme"),_a4),getThemeVariables3=__name(userOverrides=>{const theme=new Theme3;return theme.calculate(userOverrides),theme},"getThemeVariables"),_a5,Theme4=(_a5=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=lighten("#cde498",10),this.primaryBorderColor=mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert(this.primaryColor),this.secondaryTextColor=invert(this.secondaryColor),this.tertiaryTextColor=invert(this.primaryColor),this.lineColor=invert(this.background),this.textColor=invert(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var _a17,_b,_c,_d,_e2,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r,_s,_t,_u,_v;this.actorBorder=darken(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||adjust(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust(this.primaryColor,{h:210}),this.cScale9=this.cScale9||adjust(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||darken(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||darken(this.tertiaryColor,40);for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScale"+i2]=darken(this["cScale"+i2],10),this["cScalePeer"+i2]=this["cScalePeer"+i2]||darken(this["cScale"+i2],25);for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleInv"+i2]=this["cScaleInv"+i2]||adjust(this["cScale"+i2],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleLabel"+i2]=this["cScaleLabel"+i2]||this.scaleLabelColor;for(let i2=0;i2<5;i2++)this["surface"+i2]=this["surface"+i2]||adjust(this.mainBkg,{h:30,s:-30,l:-(5+i2*5)}),this["surfacePeer"+i2]=this["surfacePeer"+i2]||adjust(this.mainBkg,{h:30,s:-30,l:-(8+i2*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||lighten(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||lighten(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=adjust(this.primaryColor,{h:64}),this.fillType3=adjust(this.secondaryColor,{h:64}),this.fillType4=adjust(this.primaryColor,{h:-64}),this.fillType5=adjust(this.secondaryColor,{h:-64}),this.fillType6=adjust(this.primaryColor,{h:128}),this.fillType7=adjust(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||adjust(this.primaryColor,{l:-30}),this.pie5=this.pie5||adjust(this.secondaryColor,{l:-30}),this.pie6=this.pie6||adjust(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||adjust(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||adjust(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||adjust(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||adjust(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||adjust(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||adjust(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??adjust(this.primaryColor,{l:-30}),this.venn2=this.venn2??adjust(this.secondaryColor,{l:-30}),this.venn3=this.venn3??adjust(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??adjust(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??adjust(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??adjust(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??adjust(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??adjust(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||adjust(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||adjust(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||adjust(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||adjust(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||adjust(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||adjust(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||isDark(this.quadrant1Fill)?lighten(this.quadrant1Fill):darken(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:((_a17=this.radar)==null?void 0:_a17.axisColor)||this.lineColor,axisStrokeWidth:((_b=this.radar)==null?void 0:_b.axisStrokeWidth)||2,axisLabelFontSize:((_c=this.radar)==null?void 0:_c.axisLabelFontSize)||12,curveOpacity:((_d=this.radar)==null?void 0:_d.curveOpacity)||.5,curveStrokeWidth:((_e2=this.radar)==null?void 0:_e2.curveStrokeWidth)||2,graticuleColor:((_f=this.radar)==null?void 0:_f.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((_g=this.radar)==null?void 0:_g.graticuleStrokeWidth)||1,graticuleOpacity:((_h=this.radar)==null?void 0:_h.graticuleOpacity)||.3,legendBoxSize:((_i=this.radar)==null?void 0:_i.legendBoxSize)||12,legendFontSize:((_j=this.radar)==null?void 0:_j.legendFontSize)||12},this.xyChart={backgroundColor:((_k=this.xyChart)==null?void 0:_k.backgroundColor)||this.background,titleColor:((_l=this.xyChart)==null?void 0:_l.titleColor)||this.primaryTextColor,dataLabelColor:((_m=this.xyChart)==null?void 0:_m.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((_n=this.xyChart)==null?void 0:_n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_o=this.xyChart)==null?void 0:_o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_p=this.xyChart)==null?void 0:_p.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_q=this.xyChart)==null?void 0:_q.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((_r=this.xyChart)==null?void 0:_r.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_s=this.xyChart)==null?void 0:_s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_t=this.xyChart)==null?void 0:_t.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_u=this.xyChart)==null?void 0:_u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_v=this.xyChart)==null?void 0:_v.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||adjust(this.primaryColor,{h:-30}),this.git4=this.git4||adjust(this.primaryColor,{h:-60}),this.git5=this.git5||adjust(this.primaryColor,{h:-90}),this.git6=this.git6||adjust(this.primaryColor,{h:60}),this.git7=this.git7||adjust(this.primaryColor,{h:120}),this.darkMode?(this.git0=lighten(this.git0,25),this.git1=lighten(this.git1,25),this.git2=lighten(this.git2,25),this.git3=lighten(this.git3,25),this.git4=lighten(this.git4,25),this.git5=lighten(this.git5,25),this.git6=lighten(this.git6,25),this.git7=lighten(this.git7,25)):(this.git0=darken(this.git0,25),this.git1=darken(this.git1,25),this.git2=darken(this.git2,25),this.git3=darken(this.git3,25),this.git4=darken(this.git4,25),this.git5=darken(this.git5,25),this.git6=darken(this.git6,25),this.git7=darken(this.git7,25)),this.gitInv0=this.gitInv0||invert(this.git0),this.gitInv1=this.gitInv1||invert(this.git1),this.gitInv2=this.gitInv2||invert(this.git2),this.gitInv3=this.gitInv3||invert(this.git3),this.gitInv4=this.gitInv4||invert(this.git4),this.gitInv5=this.gitInv5||invert(this.git5),this.gitInv6=this.gitInv6||invert(this.git6),this.gitInv7=this.gitInv7||invert(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||invert(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||invert(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||oldAttributeBackgroundColorOdd,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||oldAttributeBackgroundColorEven}calculate(overrides){if(typeof overrides!="object"){this.updateColors();return}const keys=Object.keys(overrides);keys.forEach(k2=>{this[k2]=overrides[k2]}),this.updateColors(),keys.forEach(k2=>{this[k2]=overrides[k2]})}},__name(_a5,"Theme"),_a5),getThemeVariables4=__name(userOverrides=>{const theme=new Theme4;return theme.calculate(userOverrides),theme},"getThemeVariables"),_a6,Theme5=(_a6=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=lighten(this.contrast,55),this.background="#ffffff",this.tertiaryColor=adjust(this.primaryColor,{h:-160}),this.primaryBorderColor=mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert(this.primaryColor),this.secondaryTextColor=invert(this.secondaryColor),this.tertiaryTextColor=invert(this.tertiaryColor),this.lineColor=invert(this.background),this.textColor=invert(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||lighten(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var _a17,_b,_c,_d,_e2,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r,_s,_t,_u,_v;this.secondBkg=lighten(this.contrast,55),this.border2=this.contrast,this.actorBorder=lighten(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 i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleInv"+i2]=this["cScaleInv"+i2]||invert(this["cScale"+i2]);for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this.darkMode?this["cScalePeer"+i2]=this["cScalePeer"+i2]||lighten(this["cScale"+i2],10):this["cScalePeer"+i2]=this["cScalePeer"+i2]||darken(this["cScale"+i2],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleLabel"+i2]=this["cScaleLabel"+i2]||this.scaleLabelColor;for(let i2=0;i2<5;i2++)this["surface"+i2]=this["surface"+i2]||adjust(this.mainBkg,{l:-(5+i2*5)}),this["surfacePeer"+i2]=this["surfacePeer"+i2]||adjust(this.mainBkg,{l:-(8+i2*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=lighten(this.contrast,30),this.sectionBkgColor2=lighten(this.contrast,30),this.taskBorderColor=darken(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=lighten(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=darken(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=adjust(this.primaryColor,{h:64}),this.fillType3=adjust(this.secondaryColor,{h:64}),this.fillType4=adjust(this.primaryColor,{h:-64}),this.fillType5=adjust(this.secondaryColor,{h:-64}),this.fillType6=adjust(this.primaryColor,{h:128}),this.fillType7=adjust(this.secondaryColor,{h:128});for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["pie"+i2]=this["cScale"+i2];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let i2=0;i2<8;i2++)this["venn"+(i2+1)]=this["venn"+(i2+1)]??this["cScale"+i2];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||adjust(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||adjust(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||adjust(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||adjust(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||adjust(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||adjust(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||isDark(this.quadrant1Fill)?lighten(this.quadrant1Fill):darken(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:((_a17=this.xyChart)==null?void 0:_a17.backgroundColor)||this.background,titleColor:((_b=this.xyChart)==null?void 0:_b.titleColor)||this.primaryTextColor,dataLabelColor:((_c=this.xyChart)==null?void 0:_c.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((_d=this.xyChart)==null?void 0:_d.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_e2=this.xyChart)==null?void 0:_e2.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_f=this.xyChart)==null?void 0:_f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_g=this.xyChart)==null?void 0:_g.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((_h=this.xyChart)==null?void 0:_h.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_i=this.xyChart)==null?void 0:_i.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_j=this.xyChart)==null?void 0:_j.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_k=this.xyChart)==null?void 0:_k.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_l=this.xyChart)==null?void 0:_l.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((_m=this.radar)==null?void 0:_m.axisColor)||this.lineColor,axisStrokeWidth:((_n=this.radar)==null?void 0:_n.axisStrokeWidth)||2,axisLabelFontSize:((_o=this.radar)==null?void 0:_o.axisLabelFontSize)||12,curveOpacity:((_p=this.radar)==null?void 0:_p.curveOpacity)||.5,curveStrokeWidth:((_q=this.radar)==null?void 0:_q.curveStrokeWidth)||2,graticuleColor:((_r=this.radar)==null?void 0:_r.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((_s=this.radar)==null?void 0:_s.graticuleStrokeWidth)||1,graticuleOpacity:((_t=this.radar)==null?void 0:_t.graticuleOpacity)||.3,legendBoxSize:((_u=this.radar)==null?void 0:_u.legendBoxSize)||12,legendFontSize:((_v=this.radar)==null?void 0:_v.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=darken(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||adjust(this.primaryColor,{h:-30}),this.git4=this.pie5||adjust(this.primaryColor,{h:-60}),this.git5=this.pie6||adjust(this.primaryColor,{h:-90}),this.git6=this.pie7||adjust(this.primaryColor,{h:60}),this.git7=this.pie8||adjust(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||invert(this.git0),this.gitInv1=this.gitInv1||invert(this.git1),this.gitInv2=this.gitInv2||invert(this.git2),this.gitInv3=this.gitInv3||invert(this.git3),this.gitInv4=this.gitInv4||invert(this.git4),this.gitInv5=this.gitInv5||invert(this.git5),this.gitInv6=this.gitInv6||invert(this.git6),this.gitInv7=this.gitInv7||invert(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||oldAttributeBackgroundColorOdd,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||oldAttributeBackgroundColorEven}calculate(overrides){if(typeof overrides!="object"){this.updateColors();return}const keys=Object.keys(overrides);keys.forEach(k2=>{this[k2]=overrides[k2]}),this.updateColors(),keys.forEach(k2=>{this[k2]=overrides[k2]})}},__name(_a6,"Theme"),_a6),getThemeVariables5=__name(userOverrides=>{const theme=new Theme5;return theme.calculate(userOverrides),theme},"getThemeVariables"),_a7,Theme6=(_a7=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=mkBorder(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var _a17,_b,_c,_d,_e2,_f,_g,_h,_i,_j,_k;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||adjust(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||adjust(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mkBorder(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mkBorder(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||invert(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||invert(this.tertiaryColor),this.lineColor=this.lineColor||invert(this.background),this.arrowheadColor=this.arrowheadColor||invert(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?darken(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||darken(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||invert(this.lineColor);const primaryColor="#ECECFE",secondaryColor="#E9E9F1",tertiaryColor=adjust(primaryColor,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||lighten(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.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||primaryColor,this.cScale1=this.cScale1||secondaryColor,this.cScale2=this.cScale2||tertiaryColor,this.cScale3=this.cScale3||adjust(primaryColor,{h:30}),this.cScale4=this.cScale4||adjust(primaryColor,{h:60}),this.cScale5=this.cScale5||adjust(primaryColor,{h:90}),this.cScale6=this.cScale6||adjust(primaryColor,{h:120}),this.cScale7=this.cScale7||adjust(primaryColor,{h:150}),this.cScale8=this.cScale8||adjust(primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||adjust(primaryColor,{h:270}),this.cScale10=this.cScale10||adjust(primaryColor,{h:300}),this.cScale11=this.cScale11||adjust(primaryColor,{h:330}),this.darkMode)for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScale"+i2]=darken(this["cScale"+i2],75);else for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScale"+i2]=darken(this["cScale"+i2],25);for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleInv"+i2]=this["cScaleInv"+i2]||invert(this["cScale"+i2]);for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this.darkMode?this["cScalePeer"+i2]=this["cScalePeer"+i2]||lighten(this["cScale"+i2],10):this["cScalePeer"+i2]=this["cScalePeer"+i2]||darken(this["cScale"+i2],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleLabel"+i2]=this["cScaleLabel"+i2]||this.scaleLabelColor;const multiplier=this.darkMode?-4:-1;for(let i2=0;i2<5;i2++)this["surface"+i2]=this["surface"+i2]||adjust(this.mainBkg,{h:180,s:-15,l:multiplier*(5+i2*3)}),this["surfacePeer"+i2]=this["surfacePeer"+i2]||adjust(this.mainBkg,{h:180,s:-15,l:multiplier*(8+i2*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||primaryColor,this.fillType1=this.fillType1||secondaryColor,this.fillType2=this.fillType2||adjust(primaryColor,{h:64}),this.fillType3=this.fillType3||adjust(secondaryColor,{h:64}),this.fillType4=this.fillType4||adjust(primaryColor,{h:-64}),this.fillType5=this.fillType5||adjust(secondaryColor,{h:-64}),this.fillType6=this.fillType6||adjust(primaryColor,{h:128}),this.fillType7=this.fillType7||adjust(secondaryColor,{h:128}),this.pie1=this.pie1||primaryColor,this.pie2=this.pie2||secondaryColor,this.pie3=this.pie3||tertiaryColor,this.pie4=this.pie4||adjust(primaryColor,{l:-10}),this.pie5=this.pie5||adjust(secondaryColor,{l:-10}),this.pie6=this.pie6||adjust(tertiaryColor,{l:-10}),this.pie7=this.pie7||adjust(primaryColor,{h:60,l:-10}),this.pie8=this.pie8||adjust(primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||adjust(primaryColor,{h:120,l:0}),this.pie10=this.pie10||adjust(primaryColor,{h:60,l:-20}),this.pie11=this.pie11||adjust(primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||adjust(primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||primaryColor,this.quadrant2Fill=this.quadrant2Fill||adjust(primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||adjust(primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||adjust(primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||adjust(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||adjust(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||adjust(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||isDark(this.quadrant1Fill)?lighten(this.quadrant1Fill):darken(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:((_a17=this.xyChart)==null?void 0:_a17.backgroundColor)||this.background,titleColor:((_b=this.xyChart)==null?void 0:_b.titleColor)||this.primaryTextColor,xAxisTitleColor:((_c=this.xyChart)==null?void 0:_c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_d=this.xyChart)==null?void 0:_d.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_e2=this.xyChart)==null?void 0:_e2.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_f=this.xyChart)==null?void 0:_f.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((_g=this.xyChart)==null?void 0:_g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_h=this.xyChart)==null?void 0:_h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_i=this.xyChart)==null?void 0:_i.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_j=this.xyChart)==null?void 0:_j.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_k=this.xyChart)==null?void 0:_k.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?darken(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||primaryColor,this.git1=this.git1||secondaryColor,this.git2=this.git2||tertiaryColor,this.git3=this.git3||adjust(primaryColor,{h:-30}),this.git4=this.git4||adjust(primaryColor,{h:-60}),this.git5=this.git5||adjust(primaryColor,{h:-90}),this.git6=this.git6||adjust(primaryColor,{h:60}),this.git7=this.git7||adjust(primaryColor,{h:120}),this.darkMode?(this.git0=lighten(this.git0,25),this.git1=lighten(this.git1,25),this.git2=lighten(this.git2,25),this.git3=lighten(this.git3,25),this.git4=lighten(this.git4,25),this.git5=lighten(this.git5,25),this.git6=lighten(this.git6,25),this.git7=lighten(this.git7,25)):(this.git0=darken(this.git0,25),this.git1=darken(this.git1,25),this.git2=darken(this.git2,25),this.git3=darken(this.git3,25),this.git4=darken(this.git4,25),this.git5=darken(this.git5,25),this.git6=darken(this.git6,25),this.git7=darken(this.git7,25)),this.gitInv0=this.gitInv0||invert(this.git0),this.gitInv1=this.gitInv1||invert(this.git1),this.gitInv2=this.gitInv2||invert(this.git2),this.gitInv3=this.gitInv3||invert(this.git3),this.gitInv4=this.gitInv4||invert(this.git4),this.gitInv5=this.gitInv5||invert(this.git5),this.gitInv6=this.gitInv6||invert(this.git6),this.gitInv7=this.gitInv7||invert(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||oldAttributeBackgroundColorOdd,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||oldAttributeBackgroundColorEven}calculate(overrides){if(typeof overrides!="object"){this.updateColors();return}const keys=Object.keys(overrides);keys.forEach(k2=>{this[k2]=overrides[k2]}),this.updateColors(),keys.forEach(k2=>{this[k2]=overrides[k2]})}},__name(_a7,"Theme"),_a7),getThemeVariables6=__name(userOverrides=>{const theme=new Theme6;return theme.calculate(userOverrides),theme},"getThemeVariables"),_a8,Theme7=(_a8=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=lighten(this.primaryColor,16),this.tertiaryColor=adjust(this.primaryColor,{h:-160}),this.primaryBorderColor=invert(this.background),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert(this.primaryColor),this.secondaryTextColor=invert(this.secondaryColor),this.tertiaryTextColor=invert(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=lighten(invert("#323D47"),10),this.border1="#ccc",this.border2=rgba$1(255,255,255,.25),this.arrowheadColor=invert(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var _a17,_b,_c,_d,_e2,_f,_g,_h,_i,_j,_k;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||adjust(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||adjust(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mkBorder(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mkBorder(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||invert(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||invert(this.tertiaryColor),this.lineColor=this.lineColor||invert(this.background),this.arrowheadColor=this.arrowheadColor||invert(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?darken(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||darken(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||invert(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||lighten(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||adjust(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||adjust(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust(this.primaryColor,{h:330}),this.darkMode)for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScale"+i2]=darken(this["cScale"+i2],75);else for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScale"+i2]=darken(this["cScale"+i2],25);for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleInv"+i2]=this["cScaleInv"+i2]||invert(this["cScale"+i2]);for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this.darkMode?this["cScalePeer"+i2]=this["cScalePeer"+i2]||lighten(this["cScale"+i2],10):this["cScalePeer"+i2]=this["cScalePeer"+i2]||darken(this["cScale"+i2],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleLabel"+i2]=this["cScaleLabel"+i2]||this.scaleLabelColor;const multiplier=this.darkMode?-4:-1;for(let i2=0;i2<5;i2++)this["surface"+i2]=this["surface"+i2]||adjust(this.mainBkg,{h:180,s:-15,l:multiplier*(5+i2*3)}),this["surfacePeer"+i2]=this["surfacePeer"+i2]||adjust(this.mainBkg,{h:180,s:-15,l:multiplier*(8+i2*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||adjust(this.primaryColor,{h:64}),this.fillType3=this.fillType3||adjust(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||adjust(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||adjust(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||adjust(this.primaryColor,{h:128}),this.fillType7=this.fillType7||adjust(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||adjust(this.primaryColor,{l:-10}),this.pie5=this.pie5||adjust(this.secondaryColor,{l:-10}),this.pie6=this.pie6||adjust(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||adjust(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||adjust(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||adjust(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||adjust(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||adjust(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||adjust(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||adjust(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||adjust(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||adjust(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||adjust(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||adjust(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||adjust(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||isDark(this.quadrant1Fill)?lighten(this.quadrant1Fill):darken(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:((_a17=this.xyChart)==null?void 0:_a17.backgroundColor)||this.background,titleColor:((_b=this.xyChart)==null?void 0:_b.titleColor)||this.primaryTextColor,xAxisTitleColor:((_c=this.xyChart)==null?void 0:_c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_d=this.xyChart)==null?void 0:_d.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_e2=this.xyChart)==null?void 0:_e2.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_f=this.xyChart)==null?void 0:_f.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((_g=this.xyChart)==null?void 0:_g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_h=this.xyChart)==null?void 0:_h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_i=this.xyChart)==null?void 0:_i.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_j=this.xyChart)==null?void 0:_j.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_k=this.xyChart)==null?void 0:_k.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?darken(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=lighten(this.git0,25),this.git1=lighten(this.git1,25),this.git2=lighten(this.git2,25),this.git3=lighten(this.git3,25),this.git4=lighten(this.git4,25),this.git5=lighten(this.git5,25),this.git6=lighten(this.git6,25),this.git7=lighten(this.git7,25)):(this.git0=darken(this.git0,25),this.git1=darken(this.git1,25),this.git2=darken(this.git2,25),this.git3=darken(this.git3,25),this.git4=darken(this.git4,25),this.git5=darken(this.git5,25),this.git6=darken(this.git6,25),this.git7=darken(this.git7,25)),this.gitInv0=this.gitInv0||invert(this.git0),this.gitInv1=this.gitInv1||invert(this.git1),this.gitInv2=this.gitInv2||invert(this.git2),this.gitInv3=this.gitInv3||invert(this.git3),this.gitInv4=this.gitInv4||invert(this.git4),this.gitInv5=this.gitInv5||invert(this.git5),this.gitInv6=this.gitInv6||invert(this.git6),this.gitInv7=this.gitInv7||invert(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||oldAttributeBackgroundColorOdd,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||oldAttributeBackgroundColorEven}calculate(overrides){if(typeof overrides!="object"){this.updateColors();return}const keys=Object.keys(overrides);keys.forEach(k2=>{this[k2]=overrides[k2]}),this.updateColors(),keys.forEach(k2=>{this[k2]=overrides[k2]})}},__name(_a8,"Theme"),_a8),getThemeVariables7=__name(userOverrides=>{const theme=new Theme7;return theme.calculate(userOverrides),theme},"getThemeVariables"),_a9,Theme8=(_a9=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=mkBorder("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var _a17,_b,_c,_d,_e2,_f,_g,_h,_i,_j,_k;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||adjust(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||adjust(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mkBorder(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mkBorder(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||invert(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||invert(this.tertiaryColor),this.lineColor=this.lineColor||invert(this.background),this.arrowheadColor=this.arrowheadColor||invert(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?darken(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||darken(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||invert(this.lineColor);const primaryColor="#ECECFE",secondaryColor="#E9E9F1",tertiaryColor=adjust(primaryColor,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||lighten(primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScale"+i2]=this.mainBkg;if(this.darkMode)for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScale"+i2]=darken(this["cScale"+i2],75);else for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScale"+i2]=darken(this["cScale"+i2],25);for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleInv"+i2]=this["cScaleInv"+i2]||invert(this["cScale"+i2]);for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this.darkMode?this["cScalePeer"+i2]=this["cScalePeer"+i2]||lighten(this["cScale"+i2],10):this["cScalePeer"+i2]=this["cScalePeer"+i2]||darken(this["cScale"+i2],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleLabel"+i2]=this["cScaleLabel"+i2]||this.scaleLabelColor;const multiplier=this.darkMode?-4:-1;for(let i2=0;i2<5;i2++)this["surface"+i2]=this["surface"+i2]||adjust(this.mainBkg,{h:180,s:-15,l:multiplier*(5+i2*3)}),this["surfacePeer"+i2]=this["surfacePeer"+i2]||adjust(this.mainBkg,{h:180,s:-15,l:multiplier*(8+i2*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||primaryColor,this.fillType1=this.fillType1||secondaryColor,this.fillType2=this.fillType2||adjust(primaryColor,{h:64}),this.fillType3=this.fillType3||adjust(secondaryColor,{h:64}),this.fillType4=this.fillType4||adjust(primaryColor,{h:-64}),this.fillType5=this.fillType5||adjust(secondaryColor,{h:-64}),this.fillType6=this.fillType6||adjust(primaryColor,{h:128}),this.fillType7=this.fillType7||adjust(secondaryColor,{h:128}),this.pie1=this.pie1||primaryColor,this.pie2=this.pie2||secondaryColor,this.pie3=this.pie3||tertiaryColor,this.pie4=this.pie4||adjust(primaryColor,{l:-10}),this.pie5=this.pie5||adjust(secondaryColor,{l:-10}),this.pie6=this.pie6||adjust(tertiaryColor,{l:-10}),this.pie7=this.pie7||adjust(primaryColor,{h:60,l:-10}),this.pie8=this.pie8||adjust(primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||adjust(primaryColor,{h:120,l:0}),this.pie10=this.pie10||adjust(primaryColor,{h:60,l:-20}),this.pie11=this.pie11||adjust(primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||adjust(primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||primaryColor,this.quadrant2Fill=this.quadrant2Fill||adjust(primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||adjust(primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||adjust(primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||adjust(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||adjust(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||adjust(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||isDark(this.quadrant1Fill)?lighten(this.quadrant1Fill):darken(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:((_a17=this.xyChart)==null?void 0:_a17.backgroundColor)||this.background,titleColor:((_b=this.xyChart)==null?void 0:_b.titleColor)||this.primaryTextColor,xAxisTitleColor:((_c=this.xyChart)==null?void 0:_c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_d=this.xyChart)==null?void 0:_d.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_e2=this.xyChart)==null?void 0:_e2.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_f=this.xyChart)==null?void 0:_f.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((_g=this.xyChart)==null?void 0:_g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_h=this.xyChart)==null?void 0:_h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_i=this.xyChart)==null?void 0:_i.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_j=this.xyChart)==null?void 0:_j.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_k=this.xyChart)==null?void 0:_k.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?darken(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||primaryColor,this.git1=this.git1||secondaryColor,this.git2=this.git2||tertiaryColor,this.git3=this.git3||adjust(primaryColor,{h:-30}),this.git4=this.git4||adjust(primaryColor,{h:-60}),this.git5=this.git5||adjust(primaryColor,{h:-90}),this.git6=this.git6||adjust(primaryColor,{h:60}),this.git7=this.git7||adjust(primaryColor,{h:120}),this.darkMode?(this.git0=lighten(this.git0,25),this.git1=lighten(this.git1,25),this.git2=lighten(this.git2,25),this.git3=lighten(this.git3,25),this.git4=lighten(this.git4,25),this.git5=lighten(this.git5,25),this.git6=lighten(this.git6,25),this.git7=lighten(this.git7,25)):(this.git0=darken(this.git0,25),this.git1=darken(this.git1,25),this.git2=darken(this.git2,25),this.git3=darken(this.git3,25),this.git4=darken(this.git4,25),this.git5=darken(this.git5,25),this.git6=darken(this.git6,25),this.git7=darken(this.git7,25)),this.gitInv0=this.gitInv0||invert(this.git0),this.gitInv1=this.gitInv1||invert(this.git1),this.gitInv2=this.gitInv2||invert(this.git2),this.gitInv3=this.gitInv3||invert(this.git3),this.gitInv4=this.gitInv4||invert(this.git4),this.gitInv5=this.gitInv5||invert(this.git5),this.gitInv6=this.gitInv6||invert(this.git6),this.gitInv7=this.gitInv7||invert(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oldAttributeBackgroundColorOdd,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||oldAttributeBackgroundColorEven}calculate(overrides){if(typeof overrides!="object"){this.updateColors();return}const keys=Object.keys(overrides);keys.forEach(k2=>{this[k2]=overrides[k2]}),this.updateColors(),keys.forEach(k2=>{this[k2]=overrides[k2]})}},__name(_a9,"Theme"),_a9),getThemeVariables8=__name(userOverrides=>{const theme=new Theme8;return theme.calculate(userOverrides),theme},"getThemeVariables"),_a10,Theme9=(_a10=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=lighten(this.primaryColor,16),this.tertiaryColor=adjust(this.primaryColor,{h:-160}),this.primaryBorderColor=invert(this.background),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert(this.primaryColor),this.secondaryTextColor=invert(this.secondaryColor),this.tertiaryTextColor=invert(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=lighten(invert("#323D47"),10),this.border1="#ccc",this.border2=rgba$1(255,255,255,.25),this.arrowheadColor=invert(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var _a17,_b,_c,_d,_e2,_f,_g,_h,_i,_j,_k;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||adjust(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||adjust(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mkBorder(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mkBorder(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||invert(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||invert(this.tertiaryColor),this.lineColor=this.lineColor||invert(this.background),this.arrowheadColor=this.arrowheadColor||invert(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?darken(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||darken(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||invert(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||lighten(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||adjust(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||adjust(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust(this.primaryColor,{h:330}),this.darkMode)for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScale"+i2]=darken(this["cScale"+i2],75);else for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScale"+i2]=darken(this["cScale"+i2],25);for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleInv"+i2]=this["cScaleInv"+i2]||invert(this["cScale"+i2]);for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this.darkMode?this["cScalePeer"+i2]=this["cScalePeer"+i2]||lighten(this["cScale"+i2],10):this["cScalePeer"+i2]=this["cScalePeer"+i2]||darken(this["cScale"+i2],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleLabel"+i2]=this["cScaleLabel"+i2]||this.scaleLabelColor;const multiplier=this.darkMode?-4:-1;for(let i2=0;i2<5;i2++)this["surface"+i2]=this["surface"+i2]||adjust(this.mainBkg,{h:180,s:-15,l:multiplier*(5+i2*3)}),this["surfacePeer"+i2]=this["surfacePeer"+i2]||adjust(this.mainBkg,{h:180,s:-15,l:multiplier*(8+i2*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||adjust(this.primaryColor,{h:64}),this.fillType3=this.fillType3||adjust(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||adjust(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||adjust(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||adjust(this.primaryColor,{h:128}),this.fillType7=this.fillType7||adjust(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||adjust(this.primaryColor,{l:-10}),this.pie5=this.pie5||adjust(this.secondaryColor,{l:-10}),this.pie6=this.pie6||adjust(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||adjust(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||adjust(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||adjust(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||adjust(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||adjust(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||adjust(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||adjust(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||adjust(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||adjust(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||adjust(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||adjust(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||adjust(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||isDark(this.quadrant1Fill)?lighten(this.quadrant1Fill):darken(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:((_a17=this.xyChart)==null?void 0:_a17.backgroundColor)||this.background,titleColor:((_b=this.xyChart)==null?void 0:_b.titleColor)||this.primaryTextColor,xAxisTitleColor:((_c=this.xyChart)==null?void 0:_c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_d=this.xyChart)==null?void 0:_d.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_e2=this.xyChart)==null?void 0:_e2.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_f=this.xyChart)==null?void 0:_f.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((_g=this.xyChart)==null?void 0:_g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_h=this.xyChart)==null?void 0:_h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_i=this.xyChart)==null?void 0:_i.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_j=this.xyChart)==null?void 0:_j.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_k=this.xyChart)==null?void 0:_k.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?darken(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||adjust(this.primaryColor,{h:-30}),this.git4=this.git4||adjust(this.primaryColor,{h:-60}),this.git5=this.git5||adjust(this.primaryColor,{h:-90}),this.git6=this.git6||adjust(this.primaryColor,{h:60}),this.git7=this.git7||adjust(this.primaryColor,{h:120}),this.darkMode?(this.git0=lighten(this.git0,25),this.git1=lighten(this.git1,25),this.git2=lighten(this.git2,25),this.git3=lighten(this.git3,25),this.git4=lighten(this.git4,25),this.git5=lighten(this.git5,25),this.git6=lighten(this.git6,25),this.git7=lighten(this.git7,25)):(this.git0=darken(this.git0,25),this.git1=darken(this.git1,25),this.git2=darken(this.git2,25),this.git3=darken(this.git3,25),this.git4=darken(this.git4,25),this.git5=darken(this.git5,25),this.git6=darken(this.git6,25),this.git7=darken(this.git7,25)),this.gitInv0=this.gitInv0||invert(this.git0),this.gitInv1=this.gitInv1||invert(this.git1),this.gitInv2=this.gitInv2||invert(this.git2),this.gitInv3=this.gitInv3||invert(this.git3),this.gitInv4=this.gitInv4||invert(this.git4),this.gitInv5=this.gitInv5||invert(this.git5),this.gitInv6=this.gitInv6||invert(this.git6),this.gitInv7=this.gitInv7||invert(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oldAttributeBackgroundColorOdd,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||oldAttributeBackgroundColorEven}calculate(overrides){if(typeof overrides!="object"){this.updateColors();return}const keys=Object.keys(overrides);keys.forEach(k2=>{this[k2]=overrides[k2]}),this.updateColors(),keys.forEach(k2=>{this[k2]=overrides[k2]})}},__name(_a10,"Theme"),_a10),getThemeVariables9=__name(userOverrides=>{const theme=new Theme9;return theme.calculate(userOverrides),theme},"getThemeVariables"),_a11,Theme10=(_a11=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=mkBorder(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var _a17,_b,_c,_d,_e2,_f,_g,_h,_i,_j,_k;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||adjust(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||adjust(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mkBorder(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mkBorder(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||invert(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||invert(this.tertiaryColor),this.lineColor=this.lineColor||invert(this.background),this.arrowheadColor=this.arrowheadColor||invert(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?darken(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||darken(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||invert(this.lineColor);const primaryColor="#ECECFE",secondaryColor="#E9E9F1",tertiaryColor=adjust(primaryColor,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||lighten(primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleInv"+i2]=this["cScaleInv"+i2]||invert(this["cScale"+i2]);for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this.darkMode?this["cScalePeer"+i2]=this["cScalePeer"+i2]||lighten(this["cScale"+i2],10):this["cScalePeer"+i2]=this["cScalePeer"+i2]||darken(this["cScale"+i2],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleLabel"+i2]=this["cScaleLabel"+i2]||this.scaleLabelColor;const multiplier=this.darkMode?-4:-1;for(let i2=0;i2<5;i2++)this["surface"+i2]=this["surface"+i2]||adjust(this.mainBkg,{h:180,s:-15,l:multiplier*(5+i2*3)}),this["surfacePeer"+i2]=this["surfacePeer"+i2]||adjust(this.mainBkg,{h:180,s:-15,l:multiplier*(8+i2*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||primaryColor,this.fillType1=this.fillType1||secondaryColor,this.fillType2=this.fillType2||adjust(primaryColor,{h:64}),this.fillType3=this.fillType3||adjust(secondaryColor,{h:64}),this.fillType4=this.fillType4||adjust(primaryColor,{h:-64}),this.fillType5=this.fillType5||adjust(secondaryColor,{h:-64}),this.fillType6=this.fillType6||adjust(primaryColor,{h:128}),this.fillType7=this.fillType7||adjust(secondaryColor,{h:128}),this.pie1=this.pie1||primaryColor,this.pie2=this.pie2||secondaryColor,this.pie3=this.pie3||tertiaryColor,this.pie4=this.pie4||adjust(primaryColor,{l:-10}),this.pie5=this.pie5||adjust(secondaryColor,{l:-10}),this.pie6=this.pie6||adjust(tertiaryColor,{l:-10}),this.pie7=this.pie7||adjust(primaryColor,{h:60,l:-10}),this.pie8=this.pie8||adjust(primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||adjust(primaryColor,{h:120,l:0}),this.pie10=this.pie10||adjust(primaryColor,{h:60,l:-20}),this.pie11=this.pie11||adjust(primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||adjust(primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||primaryColor,this.quadrant2Fill=this.quadrant2Fill||adjust(primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||adjust(primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||adjust(primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||adjust(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||adjust(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||adjust(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||isDark(this.quadrant1Fill)?lighten(this.quadrant1Fill):darken(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:((_a17=this.xyChart)==null?void 0:_a17.backgroundColor)||this.background,titleColor:((_b=this.xyChart)==null?void 0:_b.titleColor)||this.primaryTextColor,xAxisTitleColor:((_c=this.xyChart)==null?void 0:_c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_d=this.xyChart)==null?void 0:_d.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_e2=this.xyChart)==null?void 0:_e2.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_f=this.xyChart)==null?void 0:_f.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((_g=this.xyChart)==null?void 0:_g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_h=this.xyChart)==null?void 0:_h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_i=this.xyChart)==null?void 0:_i.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_j=this.xyChart)==null?void 0:_j.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_k=this.xyChart)==null?void 0:_k.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?darken(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||primaryColor,this.git1=this.git1||secondaryColor,this.git2=this.git2||tertiaryColor,this.git3=this.git3||adjust(primaryColor,{h:-30}),this.git4=this.git4||adjust(primaryColor,{h:-60}),this.git5=this.git5||adjust(primaryColor,{h:-90}),this.git6=this.git6||adjust(primaryColor,{h:60}),this.git7=this.git7||adjust(primaryColor,{h:120}),this.darkMode?(this.git0=lighten(this.git0,25),this.git1=lighten(this.git1,25),this.git2=lighten(this.git2,25),this.git3=lighten(this.git3,25),this.git4=lighten(this.git4,25),this.git5=lighten(this.git5,25),this.git6=lighten(this.git6,25),this.git7=lighten(this.git7,25)):(this.git0=darken(this.git0,25),this.git1=darken(this.git1,25),this.git2=darken(this.git2,25),this.git3=darken(this.git3,25),this.git4=darken(this.git4,25),this.git5=darken(this.git5,25),this.git6=darken(this.git6,25),this.git7=darken(this.git7,25)),this.gitInv0=this.gitInv0||invert(this.git0),this.gitInv1=this.gitInv1||invert(this.git1),this.gitInv2=this.gitInv2||invert(this.git2),this.gitInv3=this.gitInv3||invert(this.git3),this.gitInv4=this.gitInv4||invert(this.git4),this.gitInv5=this.gitInv5||invert(this.git5),this.gitInv6=this.gitInv6||invert(this.git6),this.gitInv7=this.gitInv7||invert(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oldAttributeBackgroundColorOdd,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||oldAttributeBackgroundColorEven}calculate(overrides){if(typeof overrides!="object"){this.updateColors();return}const keys=Object.keys(overrides);keys.forEach(k2=>{this[k2]=overrides[k2]}),this.updateColors(),keys.forEach(k2=>{this[k2]=overrides[k2]})}},__name(_a11,"Theme"),_a11),getThemeVariables10=__name(userOverrides=>{const theme=new Theme10;return theme.calculate(userOverrides),theme},"getThemeVariables"),_a12,Theme11=(_a12=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=lighten(this.primaryColor,16),this.tertiaryColor=adjust(this.primaryColor,{h:-160}),this.primaryBorderColor=invert(this.background),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert(this.primaryColor),this.secondaryTextColor=invert(this.secondaryColor),this.tertiaryTextColor=invert(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=lighten(invert("#323D47"),10),this.border1="#ccc",this.border2=rgba$1(255,255,255,.25),this.arrowheadColor=invert(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var _a17,_b,_c,_d,_e2,_f,_g,_h,_i,_j,_k;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||adjust(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||adjust(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mkBorder(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mkBorder(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||invert(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||invert(this.tertiaryColor),this.lineColor=this.lineColor||invert(this.background),this.arrowheadColor=this.arrowheadColor||invert(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?darken(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||darken(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||invert(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||lighten(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleInv"+i2]=this["cScaleInv"+i2]||invert(this["cScale"+i2]);for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this.darkMode?this["cScalePeer"+i2]=this["cScalePeer"+i2]||lighten(this["cScale"+i2],10):this["cScalePeer"+i2]=this["cScalePeer"+i2]||darken(this["cScale"+i2],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i2=0;i2<this.THEME_COLOR_LIMIT;i2++)this["cScaleLabel"+i2]=darken(this["cScale"+i2],75);const multiplier=this.darkMode?-4:-1;for(let i2=0;i2<5;i2++)this["surface"+i2]=this["surface"+i2]||adjust(this.mainBkg,{h:180,s:-15,l:multiplier*(5+i2*3)}),this["surfacePeer"+i2]=this["surfacePeer"+i2]||adjust(this.mainBkg,{h:180,s:-15,l:multiplier*(8+i2*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||adjust(this.primaryColor,{h:64}),this.fillType3=this.fillType3||adjust(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||adjust(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||adjust(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||adjust(this.primaryColor,{h:128}),this.fillType7=this.fillType7||adjust(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||adjust(this.primaryColor,{l:-10}),this.pie5=this.pie5||adjust(this.secondaryColor,{l:-10}),this.pie6=this.pie6||adjust(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||adjust(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||adjust(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||adjust(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||adjust(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||adjust(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||adjust(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||adjust(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||adjust(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||adjust(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||adjust(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||adjust(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||adjust(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||isDark(this.quadrant1Fill)?lighten(this.quadrant1Fill):darken(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:((_a17=this.xyChart)==null?void 0:_a17.backgroundColor)||this.background,titleColor:((_b=this.xyChart)==null?void 0:_b.titleColor)||this.primaryTextColor,xAxisTitleColor:((_c=this.xyChart)==null?void 0:_c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_d=this.xyChart)==null?void 0:_d.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_e2=this.xyChart)==null?void 0:_e2.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_f=this.xyChart)==null?void 0:_f.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((_g=this.xyChart)==null?void 0:_g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_h=this.xyChart)==null?void 0:_h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_i=this.xyChart)==null?void 0:_i.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_j=this.xyChart)==null?void 0:_j.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_k=this.xyChart)==null?void 0:_k.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?darken(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||adjust(this.primaryColor,{h:-30}),this.git4=this.git4||adjust(this.primaryColor,{h:-60}),this.git5=this.git5||adjust(this.primaryColor,{h:-90}),this.git6=this.git6||adjust(this.primaryColor,{h:60}),this.git7=this.git7||adjust(this.primaryColor,{h:120}),this.darkMode?(this.git0=lighten(this.git0,25),this.git1=lighten(this.git1,25),this.git2=lighten(this.git2,25),this.git3=lighten(this.git3,25),this.git4=lighten(this.git4,25),this.git5=lighten(this.git5,25),this.git6=lighten(this.git6,25),this.git7=lighten(this.git7,25)):(this.git0=darken(this.git0,25),this.git1=darken(this.git1,25),this.git2=darken(this.git2,25),this.git3=darken(this.git3,25),this.git4=darken(this.git4,25),this.git5=darken(this.git5,25),this.git6=darken(this.git6,25),this.git7=darken(this.git7,25)),this.gitInv0=this.gitInv0||invert(this.git0),this.gitInv1=this.gitInv1||invert(this.git1),this.gitInv2=this.gitInv2||invert(this.git2),this.gitInv3=this.gitInv3||invert(this.git3),this.gitInv4=this.gitInv4||invert(this.git4),this.gitInv5=this.gitInv5||invert(this.git5),this.gitInv6=this.gitInv6||invert(this.git6),this.gitInv7=this.gitInv7||invert(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oldAttributeBackgroundColorOdd,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||oldAttributeBackgroundColorEven}calculate(overrides){if(typeof overrides!="object"){this.updateColors();return}const keys=Object.keys(overrides);keys.forEach(k2=>{this[k2]=overrides[k2]}),this.updateColors(),keys.forEach(k2=>{this[k2]=overrides[k2]})}},__name(_a12,"Theme"),_a12),getThemeVariables11=__name(userOverrides=>{const theme=new Theme11;return theme.calculate(userOverrides),theme},"getThemeVariables"),themes_default={base:{getThemeVariables},dark:{getThemeVariables:getThemeVariables2},default:{getThemeVariables:getThemeVariables3},forest:{getThemeVariables:getThemeVariables4},neutral:{getThemeVariables:getThemeVariables5},neo:{getThemeVariables:getThemeVariables6},"neo-dark":{getThemeVariables:getThemeVariables7},redux:{getThemeVariables:getThemeVariables8},"redux-dark":{getThemeVariables:getThemeVariables9},"redux-color":{getThemeVariables:getThemeVariables10},"redux-dark-color":{getThemeVariables:getThemeVariables11}},config_schema_default={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},config={...config_schema_default,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:themes_default.default.getThemeVariables(),sequence:{...config_schema_default.sequence,messageFont:__name(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:__name(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:__name(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...config_schema_default.gantt,tickInterval:void 0,useWidth:void 0},c4:{...config_schema_default.c4,useWidth:void 0,personFont:__name(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...config_schema_default.flowchart,inheritDir:!1},external_personFont:__name(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:__name(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:__name(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:__name(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:__name(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:__name(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:__name(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:__name(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:__name(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:__name(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:__name(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:__name(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:__name(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:__name(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:__name(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:__name(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:__name(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:__name(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:__name(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:__name(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:__name(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...config_schema_default.pie,useWidth:984},xyChart:{...config_schema_default.xyChart,useWidth:void 0},requirement:{...config_schema_default.requirement,useWidth:void 0},packet:{...config_schema_default.packet},treeView:{...config_schema_default.treeView,useWidth:void 0},radar:{...config_schema_default.radar},ishikawa:{...config_schema_default.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...config_schema_default.venn}},keyify=__name((obj,prefix="")=>Object.keys(obj).reduce((res,el)=>Array.isArray(obj[el])?res:typeof obj[el]=="object"&&obj[el]!==null?[...res,prefix+el,...keyify(obj[el],"")]:[...res,prefix+el],[]),"keyify"),configKeys=new Set(keyify(config,"")),defaultConfig_default=config,sanitizeDirective=__name(args=>{if(log.debug("sanitizeDirective called with",args),!(typeof args!="object"||args==null)){if(Array.isArray(args)){args.forEach(arg=>sanitizeDirective(arg));return}for(const key of Object.keys(args)){if(log.debug("Checking key",key),key.startsWith("__")||key.includes("proto")||key.includes("constr")||!configKeys.has(key)||args[key]==null){log.debug("sanitize deleting key: ",key),delete args[key];continue}if(typeof args[key]=="object"){log.debug("sanitizing object",key),sanitizeDirective(args[key]);continue}const cssMatchers=["themeCSS","fontFamily","altFontFamily"];for(const cssKey of cssMatchers)key.includes(cssKey)&&(log.debug("sanitizing css option",key),args[key]=sanitizeCss(args[key]))}if(args.themeVariables)for(const k2 of Object.keys(args.themeVariables)){const val=args.themeVariables[k2];val!=null&&val.match&&!val.match(/^[\d "#%(),.;A-Za-z]+$/)&&(args.themeVariables[k2]="")}log.debug("After sanitization",args)}},"sanitizeDirective"),sanitizeCss=__name(str2=>{let startCnt=0,endCnt=0;for(const element of str2){if(startCnt<endCnt)return"{ /* ERROR: Unbalanced CSS */ }";element==="{"?startCnt++:element==="}"&&endCnt++}return startCnt!==endCnt?"{ /* ERROR: Unbalanced CSS */ }":str2},"sanitizeCss"),defaultConfig=Object.freeze(defaultConfig_default),evaluate=__name(val=>!(val===!1||["false","null","0"].includes(String(val).trim().toLowerCase())),"evaluate"),siteConfig=assignWithDepth_default({},defaultConfig),configFromInitialize,directives=[],currentConfig=assignWithDepth_default({},defaultConfig),updateCurrentConfig=__name((siteCfg,_directives)=>{let cfg=assignWithDepth_default({},siteCfg),sumOfDirectives={};for(const d2 of _directives)sanitize(d2),sumOfDirectives=assignWithDepth_default(sumOfDirectives,d2);if(cfg=assignWithDepth_default(cfg,sumOfDirectives),sumOfDirectives.theme&&sumOfDirectives.theme in themes_default){const tmpConfigFromInitialize=assignWithDepth_default({},configFromInitialize),themeVariables=assignWithDepth_default(tmpConfigFromInitialize.themeVariables||{},sumOfDirectives.themeVariables);cfg.theme&&cfg.theme in themes_default&&(cfg.themeVariables=themes_default[cfg.theme].getThemeVariables(themeVariables))}return currentConfig=cfg,checkConfig(currentConfig),currentConfig},"updateCurrentConfig"),setSiteConfig=__name(conf=>(siteConfig=assignWithDepth_default({},defaultConfig),siteConfig=assignWithDepth_default(siteConfig,conf),conf.theme&&themes_default[conf.theme]&&(siteConfig.themeVariables=themes_default[conf.theme].getThemeVariables(conf.themeVariables)),updateCurrentConfig(siteConfig,directives),siteConfig),"setSiteConfig"),saveConfigFromInitialize=__name(conf=>{configFromInitialize=assignWithDepth_default({},conf)},"saveConfigFromInitialize"),updateSiteConfig=__name(conf=>(siteConfig=assignWithDepth_default(siteConfig,conf),updateCurrentConfig(siteConfig,directives),siteConfig),"updateSiteConfig"),getSiteConfig=__name(()=>assignWithDepth_default({},siteConfig),"getSiteConfig"),setConfig=__name(conf=>(checkConfig(conf),assignWithDepth_default(currentConfig,conf),getConfig()),"setConfig"),getConfig=__name(()=>assignWithDepth_default({},currentConfig),"getConfig"),sanitize=__name(options=>{options&&(["secure",...siteConfig.secure??[]].forEach(key=>{Object.hasOwn(options,key)&&(log.debug(`Denied attempt to modify a secure key ${key}`,options[key]),delete options[key])}),Object.keys(options).forEach(key=>{key.startsWith("__")&&delete options[key]}),Object.keys(options).forEach(key=>{typeof options[key]=="string"&&(options[key].includes("<")||options[key].includes(">")||options[key].includes("url(data:"))&&delete options[key],typeof options[key]=="object"&&sanitize(options[key])}))},"sanitize"),addDirective=__name(directive=>{var _a17;sanitizeDirective(directive),directive.fontFamily&&!((_a17=directive.themeVariables)!=null&&_a17.fontFamily)&&(directive.themeVariables={...directive.themeVariables,fontFamily:directive.fontFamily}),directives.push(directive),updateCurrentConfig(siteConfig,directives)},"addDirective"),reset=__name((config2=siteConfig)=>{directives=[],updateCurrentConfig(config2,directives)},"reset"),ConfigWarning={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},issuedWarnings={},issueWarning=__name(warning=>{issuedWarnings[warning]||(log.warn(ConfigWarning[warning]),issuedWarnings[warning]=!0)},"issueWarning"),checkConfig=__name(config2=>{config2&&(config2.lazyLoadedDiagrams||config2.loadExternalDiagramsAtStartup)&&issueWarning("LAZY_LOAD_DEPRECATED")},"checkConfig"),getUserDefinedConfig=__name(()=>{let userConfig={};configFromInitialize&&(userConfig=assignWithDepth_default(userConfig,configFromInitialize));for(const d2 of directives)userConfig=assignWithDepth_default(userConfig,d2);return userConfig},"getUserDefinedConfig"),getEffectiveHtmlLabels=__name(config2=>{var _a17,_b;return((_a17=config2.flowchart)==null?void 0:_a17.htmlLabels)!=null&&issueWarning("FLOWCHART_HTML_LABELS_DEPRECATED"),evaluate(config2.htmlLabels??((_b=config2.flowchart)==null?void 0:_b.htmlLabels)??!0)},"getEffectiveHtmlLabels"),lineBreakRegex=/<br\s*\/?>/gi,getRows=__name(s2=>s2?breakToPlaceholder(s2).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),setupDompurifyHooksIfNotSetup=(()=>{let setup=!1;return()=>{setup||(setupDompurifyHooks(),setup=!0)}})();function setupDompurifyHooks(){const TEMPORARY_ATTRIBUTE="data-temp-href-target";purify.addHook("beforeSanitizeAttributes",node=>{node.tagName==="A"&&node.hasAttribute("target")&&node.setAttribute(TEMPORARY_ATTRIBUTE,node.getAttribute("target")??"")}),purify.addHook("afterSanitizeAttributes",node=>{node.tagName==="A"&&node.hasAttribute(TEMPORARY_ATTRIBUTE)&&(node.setAttribute("target",node.getAttribute(TEMPORARY_ATTRIBUTE)??""),node.removeAttribute(TEMPORARY_ATTRIBUTE),node.getAttribute("target")==="_blank"&&node.setAttribute("rel","noopener"))})}__name(setupDompurifyHooks,"setupDompurifyHooks");var removeScript=__name(txt=>(setupDompurifyHooksIfNotSetup(),purify.sanitize(txt)),"removeScript"),sanitizeMore=__name((text2,config2)=>{if(getEffectiveHtmlLabels(config2)){const level=config2.securityLevel;level==="antiscript"||level==="strict"||level==="sandbox"?text2=removeScript(text2):level!=="loose"&&(text2=breakToPlaceholder(text2),text2=text2.replace(/</g,"&lt;").replace(/>/g,"&gt;"),text2=text2.replace(/=/g,"&equals;"),text2=placeholderToBreak(text2))}return text2},"sanitizeMore"),sanitizeText=__name((text2,config2)=>text2&&(config2.dompurifyConfig?text2=purify.sanitize(sanitizeMore(text2,config2),config2.dompurifyConfig).toString():text2=purify.sanitize(sanitizeMore(text2,config2),{FORBID_TAGS:["style"]}).toString(),text2),"sanitizeText"),sanitizeTextOrArray=__name((a2,config2)=>typeof a2=="string"?sanitizeText(a2,config2):a2.flat().map(x2=>sanitizeText(x2,config2)),"sanitizeTextOrArray"),hasBreaks=__name(text2=>lineBreakRegex.test(text2),"hasBreaks"),splitBreaks=__name(text2=>text2.split(lineBreakRegex),"splitBreaks"),placeholderToBreak=__name(s2=>s2.replace(/#br#/g,"<br/>"),"placeholderToBreak"),breakToPlaceholder=__name(s2=>s2.replace(lineBreakRegex,"#br#"),"breakToPlaceholder"),getUrl=__name(useAbsolute=>{let url="";return useAbsolute&&(url=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,url=CSS.escape(url)),url},"getUrl"),getMax=__name(function(...values){const newValues=values.filter(value=>!isNaN(value));return Math.max(...newValues)},"getMax"),getMin=__name(function(...values){const newValues=values.filter(value=>!isNaN(value));return Math.min(...newValues)},"getMin"),parseGenericTypes=__name(function(input){const inputSets=input.split(/(,)/),output=[];for(let i2=0;i2<inputSets.length;i2++){let thisSet=inputSets[i2];if(thisSet===","&&i2>0&&i2+1<inputSets.length){const previousSet=inputSets[i2-1],nextSet=inputSets[i2+1];shouldCombineSets(previousSet,nextSet)&&(thisSet=previousSet+","+nextSet,i2++,output.pop())}output.push(processSet(thisSet))}return output.join("")},"parseGenericTypes"),countOccurrence=__name((string,substring)=>Math.max(0,string.split(substring).length-1),"countOccurrence"),shouldCombineSets=__name((previousSet,nextSet)=>{const prevCount=countOccurrence(previousSet,"~"),nextCount=countOccurrence(nextSet,"~");return prevCount===1&&nextCount===1},"shouldCombineSets"),processSet=__name(input=>{const tildeCount=countOccurrence(input,"~");let hasStartingTilde=!1;if(tildeCount<=1)return input;tildeCount%2!==0&&input.startsWith("~")&&(input=input.substring(1),hasStartingTilde=!0);const chars=[...input];let first=chars.indexOf("~"),last=chars.lastIndexOf("~");for(;first!==-1&&last!==-1&&first!==last;)chars[first]="<",chars[last]=">",first=chars.indexOf("~"),last=chars.lastIndexOf("~");return hasStartingTilde&&chars.unshift("~"),chars.join("")},"processSet"),isMathMLSupported=__name(()=>window.MathMLElement!==void 0,"isMathMLSupported"),katexRegex=/\$\$(.*)\$\$/g,hasKatex=__name(text2=>{var _a17;return(((_a17=text2.match(katexRegex))==null?void 0:_a17.length)??0)>0},"hasKatex"),calculateMathMLDimensions=__name(async(text2,config2)=>{const divElem=document.createElement("div");divElem.innerHTML=await renderKatexSanitized(text2,config2),divElem.id="katex-temp",divElem.style.visibility="hidden",divElem.style.position="absolute",divElem.style.top="0";const body=document.querySelector("body");body==null||body.insertAdjacentElement("beforeend",divElem);const dim={width:divElem.clientWidth,height:divElem.clientHeight};return divElem.remove(),dim},"calculateMathMLDimensions"),renderKatexUnsanitized=__name(async(text2,config2)=>{if(!hasKatex(text2))return text2;if(!(isMathMLSupported()||config2.legacyMathML||config2.forceLegacyMathML))return text2.replace(katexRegex,"MathML is unsupported in this environment.");{const{default:katex}=await __vitePreload(async()=>{const{default:katex2}=await import("./katex-CJRKSY_b.js");return{default:katex2}},[]),outputMode=config2.forceLegacyMathML||!isMathMLSupported()&&config2.legacyMathML?"htmlAndMathml":"mathml";return text2.split(lineBreakRegex).map(line2=>hasKatex(line2)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${line2}</div>`:`<div>${line2}</div>`).join("").replace(katexRegex,(_2,c2)=>katex.renderToString(c2,{throwOnError:!0,displayMode:!0,output:outputMode}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),renderKatexSanitized=__name(async(text2,config2)=>sanitizeText(await renderKatexUnsanitized(text2,config2),config2),"renderKatexSanitized"),common_default={getRows,sanitizeText,sanitizeTextOrArray,hasBreaks,splitBreaks,lineBreakRegex,removeScript,getUrl,evaluate,getMax,getMin},d3Attrs=__name(function(d3Elem,attrs){for(let attr of attrs)d3Elem.attr(attr[0],attr[1])},"d3Attrs"),calculateSvgSizeAttrs=__name(function(height,width,useMaxWidth){let attrs=new Map;return useMaxWidth?(attrs.set("width","100%"),attrs.set("style",`max-width: ${width}px;`)):(attrs.set("height",height),attrs.set("width",width)),attrs},"calculateSvgSizeAttrs"),configureSvgSize=__name(function(svgElem,height,width,useMaxWidth){const attrs=calculateSvgSizeAttrs(height,width,useMaxWidth);d3Attrs(svgElem,attrs)},"configureSvgSize"),setupGraphViewbox=__name(function(graph,svgElem,padding,useMaxWidth){const svgBounds=svgElem.node().getBBox(),sWidth=svgBounds.width,sHeight=svgBounds.height;log.info(`SVG bounds: ${sWidth}x${sHeight}`,svgBounds);let width=0,height=0;log.info(`Graph bounds: ${width}x${height}`,graph),width=sWidth+padding*2,height=sHeight+padding*2,log.info(`Calculated bounds: ${width}x${height}`),configureSvgSize(svgElem,height,width,useMaxWidth);const vBox=`${svgBounds.x-padding} ${svgBounds.y-padding} ${svgBounds.width+2*padding} ${svgBounds.height+2*padding}`;svgElem.attr("viewBox",vBox)},"setupGraphViewbox"),themes={},getStyles=__name((type2,userStyles,options,svgId)=>{let diagramStyles="";return type2 in themes&&themes[type2]?diagramStyles=themes[type2]({...options,svgId}):log.warn(`No theme found for ${type2}`),` & {
4
+ font-family: ${options.fontFamily};
5
+ font-size: ${options.fontSize};
6
+ fill: ${options.textColor}
7
+ }
8
+ @keyframes edge-animation-frame {
9
+ from {
10
+ stroke-dashoffset: 0;
11
+ }
12
+ }
13
+ @keyframes dash {
14
+ to {
15
+ stroke-dashoffset: 0;
16
+ }
17
+ }
18
+ & .edge-animation-slow {
19
+ stroke-dasharray: 9,5 !important;
20
+ stroke-dashoffset: 900;
21
+ animation: dash 50s linear infinite;
22
+ stroke-linecap: round;
23
+ }
24
+ & .edge-animation-fast {
25
+ stroke-dasharray: 9,5 !important;
26
+ stroke-dashoffset: 900;
27
+ animation: dash 20s linear infinite;
28
+ stroke-linecap: round;
29
+ }
30
+ /* Classes common for multiple diagrams */
31
+
32
+ & .error-icon {
33
+ fill: ${options.errorBkgColor};
34
+ }
35
+ & .error-text {
36
+ fill: ${options.errorTextColor};
37
+ stroke: ${options.errorTextColor};
38
+ }
39
+
40
+ & .edge-thickness-normal {
41
+ stroke-width: ${options.strokeWidth??1}px;
42
+ }
43
+ & .edge-thickness-thick {
44
+ stroke-width: 3.5px
45
+ }
46
+ & .edge-pattern-solid {
47
+ stroke-dasharray: 0;
48
+ }
49
+ & .edge-thickness-invisible {
50
+ stroke-width: 0;
51
+ fill: none;
52
+ }
53
+ & .edge-pattern-dashed{
54
+ stroke-dasharray: 3;
55
+ }
56
+ .edge-pattern-dotted {
57
+ stroke-dasharray: 2;
58
+ }
59
+
60
+ & .marker {
61
+ fill: ${options.lineColor};
62
+ stroke: ${options.lineColor};
63
+ }
64
+ & .marker.cross {
65
+ stroke: ${options.lineColor};
66
+ }
67
+
68
+ & svg {
69
+ font-family: ${options.fontFamily};
70
+ font-size: ${options.fontSize};
71
+ }
72
+ & p {
73
+ margin: 0
74
+ }
75
+
76
+ ${diagramStyles}
77
+ .node .neo-node {
78
+ stroke: ${options.nodeBorder};
79
+ }
80
+
81
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
82
+ stroke: ${options.useGradient?"url("+svgId+"-gradient)":options.nodeBorder};
83
+ filter: ${options.dropShadow?options.dropShadow.replace("url(#drop-shadow)",`url(${svgId}-drop-shadow)`):"none"};
84
+ }
85
+
86
+
87
+ [data-look="neo"].node path {
88
+ stroke: ${options.useGradient?"url("+svgId+"-gradient)":options.nodeBorder};
89
+ stroke-width: ${options.strokeWidth??1}px;
90
+ }
91
+
92
+ [data-look="neo"].node .outer-path {
93
+ filter: ${options.dropShadow?options.dropShadow.replace("url(#drop-shadow)",`url(${svgId}-drop-shadow)`):"none"};
94
+ }
95
+
96
+ [data-look="neo"].node .neo-line path {
97
+ stroke: ${options.nodeBorder};
98
+ filter: none;
99
+ }
100
+
101
+ [data-look="neo"].node circle{
102
+ stroke: ${options.useGradient?"url("+svgId+"-gradient)":options.nodeBorder};
103
+ filter: ${options.dropShadow?options.dropShadow.replace("url(#drop-shadow)",`url(${svgId}-drop-shadow)`):"none"};
104
+ }
105
+
106
+ [data-look="neo"].node circle .state-start{
107
+ fill: #000000;
108
+ }
109
+
110
+ [data-look="neo"].icon-shape .icon {
111
+ fill: ${options.useGradient?"url("+svgId+"-gradient)":options.nodeBorder};
112
+ filter: ${options.dropShadow?options.dropShadow.replace("url(#drop-shadow)",`url(${svgId}-drop-shadow)`):"none"};
113
+ }
114
+
115
+ [data-look="neo"].icon-shape .icon-neo path {
116
+ stroke: ${options.useGradient?"url("+svgId+"-gradient)":options.nodeBorder};
117
+ filter: ${options.dropShadow?options.dropShadow.replace("url(#drop-shadow)",`url(${svgId}-drop-shadow)`):"none"};
118
+ }
119
+
120
+ ${userStyles}
121
+ `},"getStyles"),addStylesForDiagram=__name((type2,diagramTheme)=>{diagramTheme!==void 0&&(themes[type2]=diagramTheme)},"addStylesForDiagram"),styles_default=getStyles,commonDb_exports={};__export(commonDb_exports,{clear:()=>clear$2,getAccDescription:()=>getAccDescription,getAccTitle:()=>getAccTitle,getDiagramTitle:()=>getDiagramTitle,setAccDescription:()=>setAccDescription,setAccTitle:()=>setAccTitle,setDiagramTitle:()=>setDiagramTitle});var accTitle="",diagramTitle="",accDescription="",sanitizeText2=__name(txt=>sanitizeText(txt,getConfig()),"sanitizeText"),clear$2=__name(()=>{accTitle="",accDescription="",diagramTitle=""},"clear"),setAccTitle=__name(txt=>{accTitle=sanitizeText2(txt).replace(/^\s+/g,"")},"setAccTitle"),getAccTitle=__name(()=>accTitle,"getAccTitle"),setAccDescription=__name(txt=>{accDescription=sanitizeText2(txt).replace(/\n\s+/g,`
122
+ `)},"setAccDescription"),getAccDescription=__name(()=>accDescription,"getAccDescription"),setDiagramTitle=__name(txt=>{diagramTitle=sanitizeText2(txt)},"setDiagramTitle"),getDiagramTitle=__name(()=>diagramTitle,"getDiagramTitle"),log2=log,setLogLevel2=setLogLevel,getConfig2=getConfig,setConfig2=setConfig,defaultConfig2=defaultConfig,sanitizeText3=__name(text2=>sanitizeText(text2,getConfig2()),"sanitizeText"),setupGraphViewbox2=setupGraphViewbox,getCommonDb=__name(()=>commonDb_exports,"getCommonDb"),diagrams={},registerDiagram=__name((id32,diagram2,detector32)=>{var _a17;diagrams[id32]&&log2.warn(`Diagram with id ${id32} already registered. Overwriting.`),diagrams[id32]=diagram2,detector32&&addDetector(id32,detector32),addStylesForDiagram(id32,diagram2.styles),(_a17=diagram2.injectUtils)==null||_a17.call(diagram2,log2,setLogLevel2,getConfig2,sanitizeText3,setupGraphViewbox2,getCommonDb(),()=>{})},"registerDiagram"),getDiagram=__name(name=>{if(name in diagrams)return diagrams[name];throw new DiagramNotFoundError(name)},"getDiagram"),_a13,DiagramNotFoundError=(_a13=class extends Error{constructor(name){super(`Diagram ${name} not found.`)}},__name(_a13,"DiagramNotFoundError"),_a13),noop$1={value:()=>{}};function dispatch(){for(var i2=0,n2=arguments.length,_2={},t2;i2<n2;++i2){if(!(t2=arguments[i2]+"")||t2 in _2||/[\s.]/.test(t2))throw new Error("illegal type: "+t2);_2[t2]=[]}return new Dispatch(_2)}function Dispatch(_2){this._=_2}function parseTypenames$1(typenames,types){return typenames.trim().split(/^|\s+/).map(function(t2){var name="",i2=t2.indexOf(".");if(i2>=0&&(name=t2.slice(i2+1),t2=t2.slice(0,i2)),t2&&!types.hasOwnProperty(t2))throw new Error("unknown type: "+t2);return{type:t2,name}})}Dispatch.prototype=dispatch.prototype={constructor:Dispatch,on:function(typename,callback){var _2=this._,T2=parseTypenames$1(typename+"",_2),t2,i2=-1,n2=T2.length;if(arguments.length<2){for(;++i2<n2;)if((t2=(typename=T2[i2]).type)&&(t2=get$1(_2[t2],typename.name)))return t2;return}if(callback!=null&&typeof callback!="function")throw new Error("invalid callback: "+callback);for(;++i2<n2;)if(t2=(typename=T2[i2]).type)_2[t2]=set$2(_2[t2],typename.name,callback);else if(callback==null)for(t2 in _2)_2[t2]=set$2(_2[t2],typename.name,null);return this},copy:function(){var copy={},_2=this._;for(var t2 in _2)copy[t2]=_2[t2].slice();return new Dispatch(copy)},call:function(type2,that){if((n2=arguments.length-2)>0)for(var args=new Array(n2),i2=0,n2,t2;i2<n2;++i2)args[i2]=arguments[i2+2];if(!this._.hasOwnProperty(type2))throw new Error("unknown type: "+type2);for(t2=this._[type2],i2=0,n2=t2.length;i2<n2;++i2)t2[i2].value.apply(that,args)},apply:function(type2,that,args){if(!this._.hasOwnProperty(type2))throw new Error("unknown type: "+type2);for(var t2=this._[type2],i2=0,n2=t2.length;i2<n2;++i2)t2[i2].value.apply(that,args)}};function get$1(type2,name){for(var i2=0,n2=type2.length,c2;i2<n2;++i2)if((c2=type2[i2]).name===name)return c2.value}function set$2(type2,name,callback){for(var i2=0,n2=type2.length;i2<n2;++i2)if(type2[i2].name===name){type2[i2]=noop$1,type2=type2.slice(0,i2).concat(type2.slice(i2+1));break}return callback!=null&&type2.push({name,value:callback}),type2}var xhtml="http://www.w3.org/1999/xhtml";const namespaces={svg:"http://www.w3.org/2000/svg",xhtml,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function namespace(name){var prefix=name+="",i2=prefix.indexOf(":");return i2>=0&&(prefix=name.slice(0,i2))!=="xmlns"&&(name=name.slice(i2+1)),namespaces.hasOwnProperty(prefix)?{space:namespaces[prefix],local:name}:name}function creatorInherit(name){return function(){var document2=this.ownerDocument,uri=this.namespaceURI;return uri===xhtml&&document2.documentElement.namespaceURI===xhtml?document2.createElement(name):document2.createElementNS(uri,name)}}function creatorFixed(fullname){return function(){return this.ownerDocument.createElementNS(fullname.space,fullname.local)}}function creator(name){var fullname=namespace(name);return(fullname.local?creatorFixed:creatorInherit)(fullname)}function none(){}function selector(selector2){return selector2==null?none:function(){return this.querySelector(selector2)}}function selection_select(select2){typeof select2!="function"&&(select2=selector(select2));for(var groups=this._groups,m2=groups.length,subgroups=new Array(m2),j2=0;j2<m2;++j2)for(var group=groups[j2],n2=group.length,subgroup=subgroups[j2]=new Array(n2),node,subnode,i2=0;i2<n2;++i2)(node=group[i2])&&(subnode=select2.call(node,node.__data__,i2,group))&&("__data__"in node&&(subnode.__data__=node.__data__),subgroup[i2]=subnode);return new Selection$1(subgroups,this._parents)}function array$1(x2){return x2==null?[]:Array.isArray(x2)?x2:Array.from(x2)}function empty(){return[]}function selectorAll(selector2){return selector2==null?empty:function(){return this.querySelectorAll(selector2)}}function arrayAll(select2){return function(){return array$1(select2.apply(this,arguments))}}function selection_selectAll(select2){typeof select2=="function"?select2=arrayAll(select2):select2=selectorAll(select2);for(var groups=this._groups,m2=groups.length,subgroups=[],parents=[],j2=0;j2<m2;++j2)for(var group=groups[j2],n2=group.length,node,i2=0;i2<n2;++i2)(node=group[i2])&&(subgroups.push(select2.call(node,node.__data__,i2,group)),parents.push(node));return new Selection$1(subgroups,parents)}function matcher(selector2){return function(){return this.matches(selector2)}}function childMatcher(selector2){return function(node){return node.matches(selector2)}}var find=Array.prototype.find;function childFind(match){return function(){return find.call(this.children,match)}}function childFirst(){return this.firstElementChild}function selection_selectChild(match){return this.select(match==null?childFirst:childFind(typeof match=="function"?match:childMatcher(match)))}var filter=Array.prototype.filter;function children(){return Array.from(this.children)}function childrenFilter(match){return function(){return filter.call(this.children,match)}}function selection_selectChildren(match){return this.selectAll(match==null?children:childrenFilter(typeof match=="function"?match:childMatcher(match)))}function selection_filter(match){typeof match!="function"&&(match=matcher(match));for(var groups=this._groups,m2=groups.length,subgroups=new Array(m2),j2=0;j2<m2;++j2)for(var group=groups[j2],n2=group.length,subgroup=subgroups[j2]=[],node,i2=0;i2<n2;++i2)(node=group[i2])&&match.call(node,node.__data__,i2,group)&&subgroup.push(node);return new Selection$1(subgroups,this._parents)}function sparse(update){return new Array(update.length)}function selection_enter(){return new Selection$1(this._enter||this._groups.map(sparse),this._parents)}function EnterNode(parent,datum2){this.ownerDocument=parent.ownerDocument,this.namespaceURI=parent.namespaceURI,this._next=null,this._parent=parent,this.__data__=datum2}EnterNode.prototype={constructor:EnterNode,appendChild:function(child){return this._parent.insertBefore(child,this._next)},insertBefore:function(child,next){return this._parent.insertBefore(child,next)},querySelector:function(selector2){return this._parent.querySelector(selector2)},querySelectorAll:function(selector2){return this._parent.querySelectorAll(selector2)}};function constant$3(x2){return function(){return x2}}function bindIndex(parent,group,enter,update,exit,data){for(var i2=0,node,groupLength=group.length,dataLength=data.length;i2<dataLength;++i2)(node=group[i2])?(node.__data__=data[i2],update[i2]=node):enter[i2]=new EnterNode(parent,data[i2]);for(;i2<groupLength;++i2)(node=group[i2])&&(exit[i2]=node)}function bindKey(parent,group,enter,update,exit,data,key){var i2,node,nodeByKeyValue=new Map,groupLength=group.length,dataLength=data.length,keyValues=new Array(groupLength),keyValue;for(i2=0;i2<groupLength;++i2)(node=group[i2])&&(keyValues[i2]=keyValue=key.call(node,node.__data__,i2,group)+"",nodeByKeyValue.has(keyValue)?exit[i2]=node:nodeByKeyValue.set(keyValue,node));for(i2=0;i2<dataLength;++i2)keyValue=key.call(parent,data[i2],i2,data)+"",(node=nodeByKeyValue.get(keyValue))?(update[i2]=node,node.__data__=data[i2],nodeByKeyValue.delete(keyValue)):enter[i2]=new EnterNode(parent,data[i2]);for(i2=0;i2<groupLength;++i2)(node=group[i2])&&nodeByKeyValue.get(keyValues[i2])===node&&(exit[i2]=node)}function datum(node){return node.__data__}function selection_data(value,key){if(!arguments.length)return Array.from(this,datum);var bind=key?bindKey:bindIndex,parents=this._parents,groups=this._groups;typeof value!="function"&&(value=constant$3(value));for(var m2=groups.length,update=new Array(m2),enter=new Array(m2),exit=new Array(m2),j2=0;j2<m2;++j2){var parent=parents[j2],group=groups[j2],groupLength=group.length,data=arraylike(value.call(parent,parent&&parent.__data__,j2,parents)),dataLength=data.length,enterGroup=enter[j2]=new Array(dataLength),updateGroup=update[j2]=new Array(dataLength),exitGroup=exit[j2]=new Array(groupLength);bind(parent,group,enterGroup,updateGroup,exitGroup,data,key);for(var i0=0,i1=0,previous,next;i0<dataLength;++i0)if(previous=enterGroup[i0]){for(i0>=i1&&(i1=i0+1);!(next=updateGroup[i1])&&++i1<dataLength;);previous._next=next||null}}return update=new Selection$1(update,parents),update._enter=enter,update._exit=exit,update}function arraylike(data){return typeof data=="object"&&"length"in data?data:Array.from(data)}function selection_exit(){return new Selection$1(this._exit||this._groups.map(sparse),this._parents)}function selection_join(onenter,onupdate,onexit){var enter=this.enter(),update=this,exit=this.exit();return typeof onenter=="function"?(enter=onenter(enter),enter&&(enter=enter.selection())):enter=enter.append(onenter+""),onupdate!=null&&(update=onupdate(update),update&&(update=update.selection())),onexit==null?exit.remove():onexit(exit),enter&&update?enter.merge(update).order():update}function selection_merge(context){for(var selection2=context.selection?context.selection():context,groups0=this._groups,groups1=selection2._groups,m0=groups0.length,m1=groups1.length,m2=Math.min(m0,m1),merges=new Array(m0),j2=0;j2<m2;++j2)for(var group0=groups0[j2],group1=groups1[j2],n2=group0.length,merge2=merges[j2]=new Array(n2),node,i2=0;i2<n2;++i2)(node=group0[i2]||group1[i2])&&(merge2[i2]=node);for(;j2<m0;++j2)merges[j2]=groups0[j2];return new Selection$1(merges,this._parents)}function selection_order(){for(var groups=this._groups,j2=-1,m2=groups.length;++j2<m2;)for(var group=groups[j2],i2=group.length-1,next=group[i2],node;--i2>=0;)(node=group[i2])&&(next&&node.compareDocumentPosition(next)^4&&next.parentNode.insertBefore(node,next),next=node);return this}function selection_sort(compare){compare||(compare=ascending);function compareNode(a2,b2){return a2&&b2?compare(a2.__data__,b2.__data__):!a2-!b2}for(var groups=this._groups,m2=groups.length,sortgroups=new Array(m2),j2=0;j2<m2;++j2){for(var group=groups[j2],n2=group.length,sortgroup=sortgroups[j2]=new Array(n2),node,i2=0;i2<n2;++i2)(node=group[i2])&&(sortgroup[i2]=node);sortgroup.sort(compareNode)}return new Selection$1(sortgroups,this._parents).order()}function ascending(a2,b2){return a2<b2?-1:a2>b2?1:a2>=b2?0:NaN}function selection_call(){var callback=arguments[0];return arguments[0]=this,callback.apply(null,arguments),this}function selection_nodes(){return Array.from(this)}function selection_node(){for(var groups=this._groups,j2=0,m2=groups.length;j2<m2;++j2)for(var group=groups[j2],i2=0,n2=group.length;i2<n2;++i2){var node=group[i2];if(node)return node}return null}function selection_size(){let size=0;for(const node of this)++size;return size}function selection_empty(){return!this.node()}function selection_each(callback){for(var groups=this._groups,j2=0,m2=groups.length;j2<m2;++j2)for(var group=groups[j2],i2=0,n2=group.length,node;i2<n2;++i2)(node=group[i2])&&callback.call(node,node.__data__,i2,group);return this}function attrRemove$1(name){return function(){this.removeAttribute(name)}}function attrRemoveNS$1(fullname){return function(){this.removeAttributeNS(fullname.space,fullname.local)}}function attrConstant$1(name,value){return function(){this.setAttribute(name,value)}}function attrConstantNS$1(fullname,value){return function(){this.setAttributeNS(fullname.space,fullname.local,value)}}function attrFunction$1(name,value){return function(){var v2=value.apply(this,arguments);v2==null?this.removeAttribute(name):this.setAttribute(name,v2)}}function attrFunctionNS$1(fullname,value){return function(){var v2=value.apply(this,arguments);v2==null?this.removeAttributeNS(fullname.space,fullname.local):this.setAttributeNS(fullname.space,fullname.local,v2)}}function selection_attr(name,value){var fullname=namespace(name);if(arguments.length<2){var node=this.node();return fullname.local?node.getAttributeNS(fullname.space,fullname.local):node.getAttribute(fullname)}return this.each((value==null?fullname.local?attrRemoveNS$1:attrRemove$1:typeof value=="function"?fullname.local?attrFunctionNS$1:attrFunction$1:fullname.local?attrConstantNS$1:attrConstant$1)(fullname,value))}function defaultView(node){return node.ownerDocument&&node.ownerDocument.defaultView||node.document&&node||node.defaultView}function styleRemove$1(name){return function(){this.style.removeProperty(name)}}function styleConstant$1(name,value,priority){return function(){this.style.setProperty(name,value,priority)}}function styleFunction$1(name,value,priority){return function(){var v2=value.apply(this,arguments);v2==null?this.style.removeProperty(name):this.style.setProperty(name,v2,priority)}}function selection_style(name,value,priority){return arguments.length>1?this.each((value==null?styleRemove$1:typeof value=="function"?styleFunction$1:styleConstant$1)(name,value,priority??"")):styleValue(this.node(),name)}function styleValue(node,name){return node.style.getPropertyValue(name)||defaultView(node).getComputedStyle(node,null).getPropertyValue(name)}function propertyRemove(name){return function(){delete this[name]}}function propertyConstant(name,value){return function(){this[name]=value}}function propertyFunction(name,value){return function(){var v2=value.apply(this,arguments);v2==null?delete this[name]:this[name]=v2}}function selection_property(name,value){return arguments.length>1?this.each((value==null?propertyRemove:typeof value=="function"?propertyFunction:propertyConstant)(name,value)):this.node()[name]}function classArray(string){return string.trim().split(/^|\s+/)}function classList(node){return node.classList||new ClassList(node)}function ClassList(node){this._node=node,this._names=classArray(node.getAttribute("class")||"")}ClassList.prototype={add:function(name){var i2=this._names.indexOf(name);i2<0&&(this._names.push(name),this._node.setAttribute("class",this._names.join(" ")))},remove:function(name){var i2=this._names.indexOf(name);i2>=0&&(this._names.splice(i2,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(name){return this._names.indexOf(name)>=0}};function classedAdd(node,names){for(var list=classList(node),i2=-1,n2=names.length;++i2<n2;)list.add(names[i2])}function classedRemove(node,names){for(var list=classList(node),i2=-1,n2=names.length;++i2<n2;)list.remove(names[i2])}function classedTrue(names){return function(){classedAdd(this,names)}}function classedFalse(names){return function(){classedRemove(this,names)}}function classedFunction(names,value){return function(){(value.apply(this,arguments)?classedAdd:classedRemove)(this,names)}}function selection_classed(name,value){var names=classArray(name+"");if(arguments.length<2){for(var list=classList(this.node()),i2=-1,n2=names.length;++i2<n2;)if(!list.contains(names[i2]))return!1;return!0}return this.each((typeof value=="function"?classedFunction:value?classedTrue:classedFalse)(names,value))}function textRemove(){this.textContent=""}function textConstant$1(value){return function(){this.textContent=value}}function textFunction$1(value){return function(){var v2=value.apply(this,arguments);this.textContent=v2??""}}function selection_text(value){return arguments.length?this.each(value==null?textRemove:(typeof value=="function"?textFunction$1:textConstant$1)(value)):this.node().textContent}function htmlRemove(){this.innerHTML=""}function htmlConstant(value){return function(){this.innerHTML=value}}function htmlFunction(value){return function(){var v2=value.apply(this,arguments);this.innerHTML=v2??""}}function selection_html(value){return arguments.length?this.each(value==null?htmlRemove:(typeof value=="function"?htmlFunction:htmlConstant)(value)):this.node().innerHTML}function raise(){this.nextSibling&&this.parentNode.appendChild(this)}function selection_raise(){return this.each(raise)}function lower(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function selection_lower(){return this.each(lower)}function selection_append(name){var create2=typeof name=="function"?name:creator(name);return this.select(function(){return this.appendChild(create2.apply(this,arguments))})}function constantNull(){return null}function selection_insert(name,before){var create2=typeof name=="function"?name:creator(name),select2=before==null?constantNull:typeof before=="function"?before:selector(before);return this.select(function(){return this.insertBefore(create2.apply(this,arguments),select2.apply(this,arguments)||null)})}function remove(){var parent=this.parentNode;parent&&parent.removeChild(this)}function selection_remove(){return this.each(remove)}function selection_cloneShallow(){var clone=this.cloneNode(!1),parent=this.parentNode;return parent?parent.insertBefore(clone,this.nextSibling):clone}function selection_cloneDeep(){var clone=this.cloneNode(!0),parent=this.parentNode;return parent?parent.insertBefore(clone,this.nextSibling):clone}function selection_clone(deep){return this.select(deep?selection_cloneDeep:selection_cloneShallow)}function selection_datum(value){return arguments.length?this.property("__data__",value):this.node().__data__}function contextListener(listener){return function(event){listener.call(this,event,this.__data__)}}function parseTypenames(typenames){return typenames.trim().split(/^|\s+/).map(function(t2){var name="",i2=t2.indexOf(".");return i2>=0&&(name=t2.slice(i2+1),t2=t2.slice(0,i2)),{type:t2,name}})}function onRemove(typename){return function(){var on=this.__on;if(on){for(var j2=0,i2=-1,m2=on.length,o2;j2<m2;++j2)o2=on[j2],(!typename.type||o2.type===typename.type)&&o2.name===typename.name?this.removeEventListener(o2.type,o2.listener,o2.options):on[++i2]=o2;++i2?on.length=i2:delete this.__on}}}function onAdd(typename,value,options){return function(){var on=this.__on,o2,listener=contextListener(value);if(on){for(var j2=0,m2=on.length;j2<m2;++j2)if((o2=on[j2]).type===typename.type&&o2.name===typename.name){this.removeEventListener(o2.type,o2.listener,o2.options),this.addEventListener(o2.type,o2.listener=listener,o2.options=options),o2.value=value;return}}this.addEventListener(typename.type,listener,options),o2={type:typename.type,name:typename.name,value,listener,options},on?on.push(o2):this.__on=[o2]}}function selection_on(typename,value,options){var typenames=parseTypenames(typename+""),i2,n2=typenames.length,t2;if(arguments.length<2){var on=this.node().__on;if(on){for(var j2=0,m2=on.length,o2;j2<m2;++j2)for(i2=0,o2=on[j2];i2<n2;++i2)if((t2=typenames[i2]).type===o2.type&&t2.name===o2.name)return o2.value}return}for(on=value?onAdd:onRemove,i2=0;i2<n2;++i2)this.each(on(typenames[i2],value,options));return this}function dispatchEvent(node,type2,params){var window2=defaultView(node),event=window2.CustomEvent;typeof event=="function"?event=new event(type2,params):(event=window2.document.createEvent("Event"),params?(event.initEvent(type2,params.bubbles,params.cancelable),event.detail=params.detail):event.initEvent(type2,!1,!1)),node.dispatchEvent(event)}function dispatchConstant(type2,params){return function(){return dispatchEvent(this,type2,params)}}function dispatchFunction(type2,params){return function(){return dispatchEvent(this,type2,params.apply(this,arguments))}}function selection_dispatch(type2,params){return this.each((typeof params=="function"?dispatchFunction:dispatchConstant)(type2,params))}function*selection_iterator(){for(var groups=this._groups,j2=0,m2=groups.length;j2<m2;++j2)for(var group=groups[j2],i2=0,n2=group.length,node;i2<n2;++i2)(node=group[i2])&&(yield node)}var root$1=[null];function Selection$1(groups,parents){this._groups=groups,this._parents=parents}function selection(){return new Selection$1([[document.documentElement]],root$1)}function selection_selection(){return this}Selection$1.prototype=selection.prototype={constructor:Selection$1,select:selection_select,selectAll:selection_selectAll,selectChild:selection_selectChild,selectChildren:selection_selectChildren,filter:selection_filter,data:selection_data,enter:selection_enter,exit:selection_exit,join:selection_join,merge:selection_merge,selection:selection_selection,order:selection_order,sort:selection_sort,call:selection_call,nodes:selection_nodes,node:selection_node,size:selection_size,empty:selection_empty,each:selection_each,attr:selection_attr,style:selection_style,property:selection_property,classed:selection_classed,text:selection_text,html:selection_html,raise:selection_raise,lower:selection_lower,append:selection_append,insert:selection_insert,remove:selection_remove,clone:selection_clone,datum:selection_datum,on:selection_on,dispatch:selection_dispatch,[Symbol.iterator]:selection_iterator};function select(selector2){return typeof selector2=="string"?new Selection$1([[document.querySelector(selector2)]],[document.documentElement]):new Selection$1([[selector2]],root$1)}function define(constructor,factory,prototype){constructor.prototype=factory.prototype=prototype,prototype.constructor=constructor}function extend$1(parent,definition){var prototype=Object.create(parent.prototype);for(var key in definition)prototype[key]=definition[key];return prototype}function Color(){}var darker=.7,brighter=1/darker,reI="\\s*([+-]?\\d+)\\s*",reN="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",reP="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",reHex=/^#([0-9a-f]{3,8})$/,reRgbInteger=new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`),reRgbPercent=new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`),reRgbaInteger=new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`),reRgbaPercent=new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`),reHslPercent=new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`),reHslaPercent=new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`),named={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};define(Color,color,{copy(channels2){return Object.assign(new this.constructor,this,channels2)},displayable(){return this.rgb().displayable()},hex:color_formatHex,formatHex:color_formatHex,formatHex8:color_formatHex8,formatHsl:color_formatHsl,formatRgb:color_formatRgb,toString:color_formatRgb});function color_formatHex(){return this.rgb().formatHex()}function color_formatHex8(){return this.rgb().formatHex8()}function color_formatHsl(){return hslConvert(this).formatHsl()}function color_formatRgb(){return this.rgb().formatRgb()}function color(format2){var m2,l4;return format2=(format2+"").trim().toLowerCase(),(m2=reHex.exec(format2))?(l4=m2[1].length,m2=parseInt(m2[1],16),l4===6?rgbn(m2):l4===3?new Rgb(m2>>8&15|m2>>4&240,m2>>4&15|m2&240,(m2&15)<<4|m2&15,1):l4===8?rgba(m2>>24&255,m2>>16&255,m2>>8&255,(m2&255)/255):l4===4?rgba(m2>>12&15|m2>>8&240,m2>>8&15|m2>>4&240,m2>>4&15|m2&240,((m2&15)<<4|m2&15)/255):null):(m2=reRgbInteger.exec(format2))?new Rgb(m2[1],m2[2],m2[3],1):(m2=reRgbPercent.exec(format2))?new Rgb(m2[1]*255/100,m2[2]*255/100,m2[3]*255/100,1):(m2=reRgbaInteger.exec(format2))?rgba(m2[1],m2[2],m2[3],m2[4]):(m2=reRgbaPercent.exec(format2))?rgba(m2[1]*255/100,m2[2]*255/100,m2[3]*255/100,m2[4]):(m2=reHslPercent.exec(format2))?hsla(m2[1],m2[2]/100,m2[3]/100,1):(m2=reHslaPercent.exec(format2))?hsla(m2[1],m2[2]/100,m2[3]/100,m2[4]):named.hasOwnProperty(format2)?rgbn(named[format2]):format2==="transparent"?new Rgb(NaN,NaN,NaN,0):null}function rgbn(n2){return new Rgb(n2>>16&255,n2>>8&255,n2&255,1)}function rgba(r2,g2,b2,a2){return a2<=0&&(r2=g2=b2=NaN),new Rgb(r2,g2,b2,a2)}function rgbConvert(o2){return o2 instanceof Color||(o2=color(o2)),o2?(o2=o2.rgb(),new Rgb(o2.r,o2.g,o2.b,o2.opacity)):new Rgb}function rgb(r2,g2,b2,opacity){return arguments.length===1?rgbConvert(r2):new Rgb(r2,g2,b2,opacity??1)}function Rgb(r2,g2,b2,opacity){this.r=+r2,this.g=+g2,this.b=+b2,this.opacity=+opacity}define(Rgb,rgb,extend$1(Color,{brighter(k2){return k2=k2==null?brighter:Math.pow(brighter,k2),new Rgb(this.r*k2,this.g*k2,this.b*k2,this.opacity)},darker(k2){return k2=k2==null?darker:Math.pow(darker,k2),new Rgb(this.r*k2,this.g*k2,this.b*k2,this.opacity)},rgb(){return this},clamp(){return new Rgb(clampi(this.r),clampi(this.g),clampi(this.b),clampa(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:rgb_formatHex,formatHex:rgb_formatHex,formatHex8:rgb_formatHex8,formatRgb:rgb_formatRgb,toString:rgb_formatRgb}));function rgb_formatHex(){return`#${hex(this.r)}${hex(this.g)}${hex(this.b)}`}function rgb_formatHex8(){return`#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity)?1:this.opacity)*255)}`}function rgb_formatRgb(){const a2=clampa(this.opacity);return`${a2===1?"rgb(":"rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a2===1?")":`, ${a2})`}`}function clampa(opacity){return isNaN(opacity)?1:Math.max(0,Math.min(1,opacity))}function clampi(value){return Math.max(0,Math.min(255,Math.round(value)||0))}function hex(value){return value=clampi(value),(value<16?"0":"")+value.toString(16)}function hsla(h2,s2,l4,a2){return a2<=0?h2=s2=l4=NaN:l4<=0||l4>=1?h2=s2=NaN:s2<=0&&(h2=NaN),new Hsl(h2,s2,l4,a2)}function hslConvert(o2){if(o2 instanceof Hsl)return new Hsl(o2.h,o2.s,o2.l,o2.opacity);if(o2 instanceof Color||(o2=color(o2)),!o2)return new Hsl;if(o2 instanceof Hsl)return o2;o2=o2.rgb();var r2=o2.r/255,g2=o2.g/255,b2=o2.b/255,min2=Math.min(r2,g2,b2),max2=Math.max(r2,g2,b2),h2=NaN,s2=max2-min2,l4=(max2+min2)/2;return s2?(r2===max2?h2=(g2-b2)/s2+(g2<b2)*6:g2===max2?h2=(b2-r2)/s2+2:h2=(r2-g2)/s2+4,s2/=l4<.5?max2+min2:2-max2-min2,h2*=60):s2=l4>0&&l4<1?0:h2,new Hsl(h2,s2,l4,o2.opacity)}function hsl(h2,s2,l4,opacity){return arguments.length===1?hslConvert(h2):new Hsl(h2,s2,l4,opacity??1)}function Hsl(h2,s2,l4,opacity){this.h=+h2,this.s=+s2,this.l=+l4,this.opacity=+opacity}define(Hsl,hsl,extend$1(Color,{brighter(k2){return k2=k2==null?brighter:Math.pow(brighter,k2),new Hsl(this.h,this.s,this.l*k2,this.opacity)},darker(k2){return k2=k2==null?darker:Math.pow(darker,k2),new Hsl(this.h,this.s,this.l*k2,this.opacity)},rgb(){var h2=this.h%360+(this.h<0)*360,s2=isNaN(h2)||isNaN(this.s)?0:this.s,l4=this.l,m2=l4+(l4<.5?l4:1-l4)*s2,m1=2*l4-m2;return new Rgb(hsl2rgb(h2>=240?h2-240:h2+120,m1,m2),hsl2rgb(h2,m1,m2),hsl2rgb(h2<120?h2+240:h2-120,m1,m2),this.opacity)},clamp(){return new Hsl(clamph(this.h),clampt(this.s),clampt(this.l),clampa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const a2=clampa(this.opacity);return`${a2===1?"hsl(":"hsla("}${clamph(this.h)}, ${clampt(this.s)*100}%, ${clampt(this.l)*100}%${a2===1?")":`, ${a2})`}`}}));function clamph(value){return value=(value||0)%360,value<0?value+360:value}function clampt(value){return Math.max(0,Math.min(1,value||0))}function hsl2rgb(h2,m1,m2){return(h2<60?m1+(m2-m1)*h2/60:h2<180?m2:h2<240?m1+(m2-m1)*(240-h2)/60:m1)*255}const constant$2=x2=>()=>x2;function linear(a2,d2){return function(t2){return a2+t2*d2}}function exponential(a2,b2,y3){return a2=Math.pow(a2,y3),b2=Math.pow(b2,y3)-a2,y3=1/y3,function(t2){return Math.pow(a2+t2*b2,y3)}}function hue(a2,b2){var d2=b2-a2;return d2?linear(a2,d2>180||d2<-180?d2-360*Math.round(d2/360):d2):constant$2(isNaN(a2)?b2:a2)}function gamma(y3){return(y3=+y3)==1?nogamma:function(a2,b2){return b2-a2?exponential(a2,b2,y3):constant$2(isNaN(a2)?b2:a2)}}function nogamma(a2,b2){var d2=b2-a2;return d2?linear(a2,d2):constant$2(isNaN(a2)?b2:a2)}const interpolateRgb=(function rgbGamma(y3){var color2=gamma(y3);function rgb$1(start2,end){var r2=color2((start2=rgb(start2)).r,(end=rgb(end)).r),g2=color2(start2.g,end.g),b2=color2(start2.b,end.b),opacity=nogamma(start2.opacity,end.opacity);return function(t2){return start2.r=r2(t2),start2.g=g2(t2),start2.b=b2(t2),start2.opacity=opacity(t2),start2+""}}return rgb$1.gamma=rgbGamma,rgb$1})(1);function interpolateNumber(a2,b2){return a2=+a2,b2=+b2,function(t2){return a2*(1-t2)+b2*t2}}var reA=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,reB=new RegExp(reA.source,"g");function zero(b2){return function(){return b2}}function one(b2){return function(t2){return b2(t2)+""}}function interpolateString(a2,b2){var bi=reA.lastIndex=reB.lastIndex=0,am,bm,bs,i2=-1,s2=[],q2=[];for(a2=a2+"",b2=b2+"";(am=reA.exec(a2))&&(bm=reB.exec(b2));)(bs=bm.index)>bi&&(bs=b2.slice(bi,bs),s2[i2]?s2[i2]+=bs:s2[++i2]=bs),(am=am[0])===(bm=bm[0])?s2[i2]?s2[i2]+=bm:s2[++i2]=bm:(s2[++i2]=null,q2.push({i:i2,x:interpolateNumber(am,bm)})),bi=reB.lastIndex;return bi<b2.length&&(bs=b2.slice(bi),s2[i2]?s2[i2]+=bs:s2[++i2]=bs),s2.length<2?q2[0]?one(q2[0].x):zero(b2):(b2=q2.length,function(t2){for(var i3=0,o2;i3<b2;++i3)s2[(o2=q2[i3]).i]=o2.x(t2);return s2.join("")})}var degrees=180/Math.PI,identity$1={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function decompose(a2,b2,c2,d2,e2,f2){var scaleX,scaleY,skewX;return(scaleX=Math.sqrt(a2*a2+b2*b2))&&(a2/=scaleX,b2/=scaleX),(skewX=a2*c2+b2*d2)&&(c2-=a2*skewX,d2-=b2*skewX),(scaleY=Math.sqrt(c2*c2+d2*d2))&&(c2/=scaleY,d2/=scaleY,skewX/=scaleY),a2*d2<b2*c2&&(a2=-a2,b2=-b2,skewX=-skewX,scaleX=-scaleX),{translateX:e2,translateY:f2,rotate:Math.atan2(b2,a2)*degrees,skewX:Math.atan(skewX)*degrees,scaleX,scaleY}}var svgNode;function parseCss(value){const m2=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(value+"");return m2.isIdentity?identity$1:decompose(m2.a,m2.b,m2.c,m2.d,m2.e,m2.f)}function parseSvg(value){return value==null||(svgNode||(svgNode=document.createElementNS("http://www.w3.org/2000/svg","g")),svgNode.setAttribute("transform",value),!(value=svgNode.transform.baseVal.consolidate()))?identity$1:(value=value.matrix,decompose(value.a,value.b,value.c,value.d,value.e,value.f))}function interpolateTransform(parse3,pxComma,pxParen,degParen){function pop(s2){return s2.length?s2.pop()+" ":""}function translate(xa,ya,xb,yb,s2,q2){if(xa!==xb||ya!==yb){var i2=s2.push("translate(",null,pxComma,null,pxParen);q2.push({i:i2-4,x:interpolateNumber(xa,xb)},{i:i2-2,x:interpolateNumber(ya,yb)})}else(xb||yb)&&s2.push("translate("+xb+pxComma+yb+pxParen)}function rotate(a2,b2,s2,q2){a2!==b2?(a2-b2>180?b2+=360:b2-a2>180&&(a2+=360),q2.push({i:s2.push(pop(s2)+"rotate(",null,degParen)-2,x:interpolateNumber(a2,b2)})):b2&&s2.push(pop(s2)+"rotate("+b2+degParen)}function skewX(a2,b2,s2,q2){a2!==b2?q2.push({i:s2.push(pop(s2)+"skewX(",null,degParen)-2,x:interpolateNumber(a2,b2)}):b2&&s2.push(pop(s2)+"skewX("+b2+degParen)}function scale(xa,ya,xb,yb,s2,q2){if(xa!==xb||ya!==yb){var i2=s2.push(pop(s2)+"scale(",null,",",null,")");q2.push({i:i2-4,x:interpolateNumber(xa,xb)},{i:i2-2,x:interpolateNumber(ya,yb)})}else(xb!==1||yb!==1)&&s2.push(pop(s2)+"scale("+xb+","+yb+")")}return function(a2,b2){var s2=[],q2=[];return a2=parse3(a2),b2=parse3(b2),translate(a2.translateX,a2.translateY,b2.translateX,b2.translateY,s2,q2),rotate(a2.rotate,b2.rotate,s2,q2),skewX(a2.skewX,b2.skewX,s2,q2),scale(a2.scaleX,a2.scaleY,b2.scaleX,b2.scaleY,s2,q2),a2=b2=null,function(t2){for(var i2=-1,n2=q2.length,o2;++i2<n2;)s2[(o2=q2[i2]).i]=o2.x(t2);return s2.join("")}}}var interpolateTransformCss=interpolateTransform(parseCss,"px, ","px)","deg)"),interpolateTransformSvg=interpolateTransform(parseSvg,", ",")",")"),frame=0,timeout$1=0,interval=0,pokeDelay=1e3,taskHead,taskTail,clockLast=0,clockNow=0,clockSkew=0,clock=typeof performance=="object"&&performance.now?performance:Date,setFrame=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(f2){setTimeout(f2,17)};function now(){return clockNow||(setFrame(clearNow),clockNow=clock.now()+clockSkew)}function clearNow(){clockNow=0}function Timer(){this._call=this._time=this._next=null}Timer.prototype=timer.prototype={constructor:Timer,restart:function(callback,delay,time){if(typeof callback!="function")throw new TypeError("callback is not a function");time=(time==null?now():+time)+(delay==null?0:+delay),!this._next&&taskTail!==this&&(taskTail?taskTail._next=this:taskHead=this,taskTail=this),this._call=callback,this._time=time,sleep()},stop:function(){this._call&&(this._call=null,this._time=1/0,sleep())}};function timer(callback,delay,time){var t2=new Timer;return t2.restart(callback,delay,time),t2}function timerFlush(){now(),++frame;for(var t2=taskHead,e2;t2;)(e2=clockNow-t2._time)>=0&&t2._call.call(void 0,e2),t2=t2._next;--frame}function wake(){clockNow=(clockLast=clock.now())+clockSkew,frame=timeout$1=0;try{timerFlush()}finally{frame=0,nap(),clockNow=0}}function poke(){var now2=clock.now(),delay=now2-clockLast;delay>pokeDelay&&(clockSkew-=delay,clockLast=now2)}function nap(){for(var t0,t1=taskHead,t2,time=1/0;t1;)t1._call?(time>t1._time&&(time=t1._time),t0=t1,t1=t1._next):(t2=t1._next,t1._next=null,t1=t0?t0._next=t2:taskHead=t2);taskTail=t0,sleep(time)}function sleep(time){if(!frame){timeout$1&&(timeout$1=clearTimeout(timeout$1));var delay=time-clockNow;delay>24?(time<1/0&&(timeout$1=setTimeout(wake,time-clock.now()-clockSkew)),interval&&(interval=clearInterval(interval))):(interval||(clockLast=clock.now(),interval=setInterval(poke,pokeDelay)),frame=1,setFrame(wake))}}function timeout(callback,delay,time){var t2=new Timer;return delay=delay==null?0:+delay,t2.restart(elapsed=>{t2.stop(),callback(elapsed+delay)},delay,time),t2}var emptyOn=dispatch("start","end","cancel","interrupt"),emptyTween=[],CREATED=0,SCHEDULED=1,STARTING=2,STARTED=3,RUNNING=4,ENDING=5,ENDED=6;function schedule(node,name,id32,index,group,timing){var schedules=node.__transition;if(!schedules)node.__transition={};else if(id32 in schedules)return;create(node,id32,{name,index,group,on:emptyOn,tween:emptyTween,time:timing.time,delay:timing.delay,duration:timing.duration,ease:timing.ease,timer:null,state:CREATED})}function init$1(node,id32){var schedule2=get(node,id32);if(schedule2.state>CREATED)throw new Error("too late; already scheduled");return schedule2}function set$1(node,id32){var schedule2=get(node,id32);if(schedule2.state>STARTED)throw new Error("too late; already running");return schedule2}function get(node,id32){var schedule2=node.__transition;if(!schedule2||!(schedule2=schedule2[id32]))throw new Error("transition not found");return schedule2}function create(node,id32,self2){var schedules=node.__transition,tween;schedules[id32]=self2,self2.timer=timer(schedule2,0,self2.time);function schedule2(elapsed){self2.state=SCHEDULED,self2.timer.restart(start2,self2.delay,self2.time),self2.delay<=elapsed&&start2(elapsed-self2.delay)}function start2(elapsed){var i2,j2,n2,o2;if(self2.state!==SCHEDULED)return stop();for(i2 in schedules)if(o2=schedules[i2],o2.name===self2.name){if(o2.state===STARTED)return timeout(start2);o2.state===RUNNING?(o2.state=ENDED,o2.timer.stop(),o2.on.call("interrupt",node,node.__data__,o2.index,o2.group),delete schedules[i2]):+i2<id32&&(o2.state=ENDED,o2.timer.stop(),o2.on.call("cancel",node,node.__data__,o2.index,o2.group),delete schedules[i2])}if(timeout(function(){self2.state===STARTED&&(self2.state=RUNNING,self2.timer.restart(tick,self2.delay,self2.time),tick(elapsed))}),self2.state=STARTING,self2.on.call("start",node,node.__data__,self2.index,self2.group),self2.state===STARTING){for(self2.state=STARTED,tween=new Array(n2=self2.tween.length),i2=0,j2=-1;i2<n2;++i2)(o2=self2.tween[i2].value.call(node,node.__data__,self2.index,self2.group))&&(tween[++j2]=o2);tween.length=j2+1}}function tick(elapsed){for(var t2=elapsed<self2.duration?self2.ease.call(null,elapsed/self2.duration):(self2.timer.restart(stop),self2.state=ENDING,1),i2=-1,n2=tween.length;++i2<n2;)tween[i2].call(node,t2);self2.state===ENDING&&(self2.on.call("end",node,node.__data__,self2.index,self2.group),stop())}function stop(){self2.state=ENDED,self2.timer.stop(),delete schedules[id32];for(var i2 in schedules)return;delete node.__transition}}function interrupt(node,name){var schedules=node.__transition,schedule2,active,empty2=!0,i2;if(schedules){name=name==null?null:name+"";for(i2 in schedules){if((schedule2=schedules[i2]).name!==name){empty2=!1;continue}active=schedule2.state>STARTING&&schedule2.state<ENDING,schedule2.state=ENDED,schedule2.timer.stop(),schedule2.on.call(active?"interrupt":"cancel",node,node.__data__,schedule2.index,schedule2.group),delete schedules[i2]}empty2&&delete node.__transition}}function selection_interrupt(name){return this.each(function(){interrupt(this,name)})}function tweenRemove(id32,name){var tween0,tween1;return function(){var schedule2=set$1(this,id32),tween=schedule2.tween;if(tween!==tween0){tween1=tween0=tween;for(var i2=0,n2=tween1.length;i2<n2;++i2)if(tween1[i2].name===name){tween1=tween1.slice(),tween1.splice(i2,1);break}}schedule2.tween=tween1}}function tweenFunction(id32,name,value){var tween0,tween1;if(typeof value!="function")throw new Error;return function(){var schedule2=set$1(this,id32),tween=schedule2.tween;if(tween!==tween0){tween1=(tween0=tween).slice();for(var t2={name,value},i2=0,n2=tween1.length;i2<n2;++i2)if(tween1[i2].name===name){tween1[i2]=t2;break}i2===n2&&tween1.push(t2)}schedule2.tween=tween1}}function transition_tween(name,value){var id32=this._id;if(name+="",arguments.length<2){for(var tween=get(this.node(),id32).tween,i2=0,n2=tween.length,t2;i2<n2;++i2)if((t2=tween[i2]).name===name)return t2.value;return null}return this.each((value==null?tweenRemove:tweenFunction)(id32,name,value))}function tweenValue(transition,name,value){var id32=transition._id;return transition.each(function(){var schedule2=set$1(this,id32);(schedule2.value||(schedule2.value={}))[name]=value.apply(this,arguments)}),function(node){return get(node,id32).value[name]}}function interpolate(a2,b2){var c2;return(typeof b2=="number"?interpolateNumber:b2 instanceof color?interpolateRgb:(c2=color(b2))?(b2=c2,interpolateRgb):interpolateString)(a2,b2)}function attrRemove(name){return function(){this.removeAttribute(name)}}function attrRemoveNS(fullname){return function(){this.removeAttributeNS(fullname.space,fullname.local)}}function attrConstant(name,interpolate2,value1){var string00,string1=value1+"",interpolate0;return function(){var string0=this.getAttribute(name);return string0===string1?null:string0===string00?interpolate0:interpolate0=interpolate2(string00=string0,value1)}}function attrConstantNS(fullname,interpolate2,value1){var string00,string1=value1+"",interpolate0;return function(){var string0=this.getAttributeNS(fullname.space,fullname.local);return string0===string1?null:string0===string00?interpolate0:interpolate0=interpolate2(string00=string0,value1)}}function attrFunction(name,interpolate2,value){var string00,string10,interpolate0;return function(){var string0,value1=value(this),string1;return value1==null?void this.removeAttribute(name):(string0=this.getAttribute(name),string1=value1+"",string0===string1?null:string0===string00&&string1===string10?interpolate0:(string10=string1,interpolate0=interpolate2(string00=string0,value1)))}}function attrFunctionNS(fullname,interpolate2,value){var string00,string10,interpolate0;return function(){var string0,value1=value(this),string1;return value1==null?void this.removeAttributeNS(fullname.space,fullname.local):(string0=this.getAttributeNS(fullname.space,fullname.local),string1=value1+"",string0===string1?null:string0===string00&&string1===string10?interpolate0:(string10=string1,interpolate0=interpolate2(string00=string0,value1)))}}function transition_attr(name,value){var fullname=namespace(name),i2=fullname==="transform"?interpolateTransformSvg:interpolate;return this.attrTween(name,typeof value=="function"?(fullname.local?attrFunctionNS:attrFunction)(fullname,i2,tweenValue(this,"attr."+name,value)):value==null?(fullname.local?attrRemoveNS:attrRemove)(fullname):(fullname.local?attrConstantNS:attrConstant)(fullname,i2,value))}function attrInterpolate(name,i2){return function(t2){this.setAttribute(name,i2.call(this,t2))}}function attrInterpolateNS(fullname,i2){return function(t2){this.setAttributeNS(fullname.space,fullname.local,i2.call(this,t2))}}function attrTweenNS(fullname,value){var t0,i0;function tween(){var i2=value.apply(this,arguments);return i2!==i0&&(t0=(i0=i2)&&attrInterpolateNS(fullname,i2)),t0}return tween._value=value,tween}function attrTween(name,value){var t0,i0;function tween(){var i2=value.apply(this,arguments);return i2!==i0&&(t0=(i0=i2)&&attrInterpolate(name,i2)),t0}return tween._value=value,tween}function transition_attrTween(name,value){var key="attr."+name;if(arguments.length<2)return(key=this.tween(key))&&key._value;if(value==null)return this.tween(key,null);if(typeof value!="function")throw new Error;var fullname=namespace(name);return this.tween(key,(fullname.local?attrTweenNS:attrTween)(fullname,value))}function delayFunction(id32,value){return function(){init$1(this,id32).delay=+value.apply(this,arguments)}}function delayConstant(id32,value){return value=+value,function(){init$1(this,id32).delay=value}}function transition_delay(value){var id32=this._id;return arguments.length?this.each((typeof value=="function"?delayFunction:delayConstant)(id32,value)):get(this.node(),id32).delay}function durationFunction(id32,value){return function(){set$1(this,id32).duration=+value.apply(this,arguments)}}function durationConstant(id32,value){return value=+value,function(){set$1(this,id32).duration=value}}function transition_duration(value){var id32=this._id;return arguments.length?this.each((typeof value=="function"?durationFunction:durationConstant)(id32,value)):get(this.node(),id32).duration}function easeConstant(id32,value){if(typeof value!="function")throw new Error;return function(){set$1(this,id32).ease=value}}function transition_ease(value){var id32=this._id;return arguments.length?this.each(easeConstant(id32,value)):get(this.node(),id32).ease}function easeVarying(id32,value){return function(){var v2=value.apply(this,arguments);if(typeof v2!="function")throw new Error;set$1(this,id32).ease=v2}}function transition_easeVarying(value){if(typeof value!="function")throw new Error;return this.each(easeVarying(this._id,value))}function transition_filter(match){typeof match!="function"&&(match=matcher(match));for(var groups=this._groups,m2=groups.length,subgroups=new Array(m2),j2=0;j2<m2;++j2)for(var group=groups[j2],n2=group.length,subgroup=subgroups[j2]=[],node,i2=0;i2<n2;++i2)(node=group[i2])&&match.call(node,node.__data__,i2,group)&&subgroup.push(node);return new Transition(subgroups,this._parents,this._name,this._id)}function transition_merge(transition){if(transition._id!==this._id)throw new Error;for(var groups0=this._groups,groups1=transition._groups,m0=groups0.length,m1=groups1.length,m2=Math.min(m0,m1),merges=new Array(m0),j2=0;j2<m2;++j2)for(var group0=groups0[j2],group1=groups1[j2],n2=group0.length,merge2=merges[j2]=new Array(n2),node,i2=0;i2<n2;++i2)(node=group0[i2]||group1[i2])&&(merge2[i2]=node);for(;j2<m0;++j2)merges[j2]=groups0[j2];return new Transition(merges,this._parents,this._name,this._id)}function start(name){return(name+"").trim().split(/^|\s+/).every(function(t2){var i2=t2.indexOf(".");return i2>=0&&(t2=t2.slice(0,i2)),!t2||t2==="start"})}function onFunction(id32,name,listener){var on0,on1,sit=start(name)?init$1:set$1;return function(){var schedule2=sit(this,id32),on=schedule2.on;on!==on0&&(on1=(on0=on).copy()).on(name,listener),schedule2.on=on1}}function transition_on(name,listener){var id32=this._id;return arguments.length<2?get(this.node(),id32).on.on(name):this.each(onFunction(id32,name,listener))}function removeFunction(id32){return function(){var parent=this.parentNode;for(var i2 in this.__transition)if(+i2!==id32)return;parent&&parent.removeChild(this)}}function transition_remove(){return this.on("end.remove",removeFunction(this._id))}function transition_select(select2){var name=this._name,id32=this._id;typeof select2!="function"&&(select2=selector(select2));for(var groups=this._groups,m2=groups.length,subgroups=new Array(m2),j2=0;j2<m2;++j2)for(var group=groups[j2],n2=group.length,subgroup=subgroups[j2]=new Array(n2),node,subnode,i2=0;i2<n2;++i2)(node=group[i2])&&(subnode=select2.call(node,node.__data__,i2,group))&&("__data__"in node&&(subnode.__data__=node.__data__),subgroup[i2]=subnode,schedule(subgroup[i2],name,id32,i2,subgroup,get(node,id32)));return new Transition(subgroups,this._parents,name,id32)}function transition_selectAll(select2){var name=this._name,id32=this._id;typeof select2!="function"&&(select2=selectorAll(select2));for(var groups=this._groups,m2=groups.length,subgroups=[],parents=[],j2=0;j2<m2;++j2)for(var group=groups[j2],n2=group.length,node,i2=0;i2<n2;++i2)if(node=group[i2]){for(var children2=select2.call(node,node.__data__,i2,group),child,inherit2=get(node,id32),k2=0,l4=children2.length;k2<l4;++k2)(child=children2[k2])&&schedule(child,name,id32,k2,children2,inherit2);subgroups.push(children2),parents.push(node)}return new Transition(subgroups,parents,name,id32)}var Selection=selection.prototype.constructor;function transition_selection(){return new Selection(this._groups,this._parents)}function styleNull(name,interpolate2){var string00,string10,interpolate0;return function(){var string0=styleValue(this,name),string1=(this.style.removeProperty(name),styleValue(this,name));return string0===string1?null:string0===string00&&string1===string10?interpolate0:interpolate0=interpolate2(string00=string0,string10=string1)}}function styleRemove(name){return function(){this.style.removeProperty(name)}}function styleConstant(name,interpolate2,value1){var string00,string1=value1+"",interpolate0;return function(){var string0=styleValue(this,name);return string0===string1?null:string0===string00?interpolate0:interpolate0=interpolate2(string00=string0,value1)}}function styleFunction(name,interpolate2,value){var string00,string10,interpolate0;return function(){var string0=styleValue(this,name),value1=value(this),string1=value1+"";return value1==null&&(string1=value1=(this.style.removeProperty(name),styleValue(this,name))),string0===string1?null:string0===string00&&string1===string10?interpolate0:(string10=string1,interpolate0=interpolate2(string00=string0,value1))}}function styleMaybeRemove(id32,name){var on0,on1,listener0,key="style."+name,event="end."+key,remove2;return function(){var schedule2=set$1(this,id32),on=schedule2.on,listener=schedule2.value[key]==null?remove2||(remove2=styleRemove(name)):void 0;(on!==on0||listener0!==listener)&&(on1=(on0=on).copy()).on(event,listener0=listener),schedule2.on=on1}}function transition_style(name,value,priority){var i2=(name+="")=="transform"?interpolateTransformCss:interpolate;return value==null?this.styleTween(name,styleNull(name,i2)).on("end.style."+name,styleRemove(name)):typeof value=="function"?this.styleTween(name,styleFunction(name,i2,tweenValue(this,"style."+name,value))).each(styleMaybeRemove(this._id,name)):this.styleTween(name,styleConstant(name,i2,value),priority).on("end.style."+name,null)}function styleInterpolate(name,i2,priority){return function(t2){this.style.setProperty(name,i2.call(this,t2),priority)}}function styleTween(name,value,priority){var t2,i0;function tween(){var i2=value.apply(this,arguments);return i2!==i0&&(t2=(i0=i2)&&styleInterpolate(name,i2,priority)),t2}return tween._value=value,tween}function transition_styleTween(name,value,priority){var key="style."+(name+="");if(arguments.length<2)return(key=this.tween(key))&&key._value;if(value==null)return this.tween(key,null);if(typeof value!="function")throw new Error;return this.tween(key,styleTween(name,value,priority??""))}function textConstant(value){return function(){this.textContent=value}}function textFunction(value){return function(){var value1=value(this);this.textContent=value1??""}}function transition_text(value){return this.tween("text",typeof value=="function"?textFunction(tweenValue(this,"text",value)):textConstant(value==null?"":value+""))}function textInterpolate(i2){return function(t2){this.textContent=i2.call(this,t2)}}function textTween(value){var t0,i0;function tween(){var i2=value.apply(this,arguments);return i2!==i0&&(t0=(i0=i2)&&textInterpolate(i2)),t0}return tween._value=value,tween}function transition_textTween(value){var key="text";if(arguments.length<1)return(key=this.tween(key))&&key._value;if(value==null)return this.tween(key,null);if(typeof value!="function")throw new Error;return this.tween(key,textTween(value))}function transition_transition(){for(var name=this._name,id0=this._id,id1=newId(),groups=this._groups,m2=groups.length,j2=0;j2<m2;++j2)for(var group=groups[j2],n2=group.length,node,i2=0;i2<n2;++i2)if(node=group[i2]){var inherit2=get(node,id0);schedule(node,name,id1,i2,group,{time:inherit2.time+inherit2.delay+inherit2.duration,delay:0,duration:inherit2.duration,ease:inherit2.ease})}return new Transition(groups,this._parents,name,id1)}function transition_end(){var on0,on1,that=this,id32=that._id,size=that.size();return new Promise(function(resolve,reject){var cancel={value:reject},end={value:function(){--size===0&&resolve()}};that.each(function(){var schedule2=set$1(this,id32),on=schedule2.on;on!==on0&&(on1=(on0=on).copy(),on1._.cancel.push(cancel),on1._.interrupt.push(cancel),on1._.end.push(end)),schedule2.on=on1}),size===0&&resolve()})}var id$1=0;function Transition(groups,parents,name,id32){this._groups=groups,this._parents=parents,this._name=name,this._id=id32}function newId(){return++id$1}var selection_prototype=selection.prototype;Transition.prototype={constructor:Transition,select:transition_select,selectAll:transition_selectAll,selectChild:selection_prototype.selectChild,selectChildren:selection_prototype.selectChildren,filter:transition_filter,merge:transition_merge,selection:transition_selection,transition:transition_transition,call:selection_prototype.call,nodes:selection_prototype.nodes,node:selection_prototype.node,size:selection_prototype.size,empty:selection_prototype.empty,each:selection_prototype.each,on:transition_on,attr:transition_attr,attrTween:transition_attrTween,style:transition_style,styleTween:transition_styleTween,text:transition_text,textTween:transition_textTween,remove:transition_remove,tween:transition_tween,delay:transition_delay,duration:transition_duration,ease:transition_ease,easeVarying:transition_easeVarying,end:transition_end,[Symbol.iterator]:selection_prototype[Symbol.iterator]};function cubicInOut(t2){return((t2*=2)<=1?t2*t2*t2:(t2-=2)*t2*t2+2)/2}var defaultTiming={time:null,delay:0,duration:250,ease:cubicInOut};function inherit(node,id32){for(var timing;!(timing=node.__transition)||!(timing=timing[id32]);)if(!(node=node.parentNode))throw new Error(`transition ${id32} not found`);return timing}function selection_transition(name){var id32,timing;name instanceof Transition?(id32=name._id,name=name._name):(id32=newId(),(timing=defaultTiming).time=now(),name=name==null?null:name+"");for(var groups=this._groups,m2=groups.length,j2=0;j2<m2;++j2)for(var group=groups[j2],n2=group.length,node,i2=0;i2<n2;++i2)(node=group[i2])&&schedule(node,name,id32,i2,group,timing||inherit(node,id32));return new Transition(groups,this._parents,name,id32)}selection.prototype.interrupt=selection_interrupt;selection.prototype.transition=selection_transition;const pi$1=Math.PI,tau$1=2*pi$1,epsilon$1=1e-6,tauEpsilon=tau$1-epsilon$1;function append(strings){this._+=strings[0];for(let i2=1,n2=strings.length;i2<n2;++i2)this._+=arguments[i2]+strings[i2]}function appendRound(digits){let d2=Math.floor(digits);if(!(d2>=0))throw new Error(`invalid digits: ${digits}`);if(d2>15)return append;const k2=10**d2;return function(strings){this._+=strings[0];for(let i2=1,n2=strings.length;i2<n2;++i2)this._+=Math.round(arguments[i2]*k2)/k2+strings[i2]}}class Path{constructor(digits){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=digits==null?append:appendRound(digits)}moveTo(x2,y3){this._append`M${this._x0=this._x1=+x2},${this._y0=this._y1=+y3}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(x2,y3){this._append`L${this._x1=+x2},${this._y1=+y3}`}quadraticCurveTo(x1,y1,x2,y3){this._append`Q${+x1},${+y1},${this._x1=+x2},${this._y1=+y3}`}bezierCurveTo(x1,y1,x2,y22,x3,y3){this._append`C${+x1},${+y1},${+x2},${+y22},${this._x1=+x3},${this._y1=+y3}`}arcTo(x1,y1,x2,y22,r2){if(x1=+x1,y1=+y1,x2=+x2,y22=+y22,r2=+r2,r2<0)throw new Error(`negative radius: ${r2}`);let x0=this._x1,y0=this._y1,x21=x2-x1,y21=y22-y1,x01=x0-x1,y01=y0-y1,l01_2=x01*x01+y01*y01;if(this._x1===null)this._append`M${this._x1=x1},${this._y1=y1}`;else if(l01_2>epsilon$1)if(!(Math.abs(y01*x21-y21*x01)>epsilon$1)||!r2)this._append`L${this._x1=x1},${this._y1=y1}`;else{let x20=x2-x0,y20=y22-y0,l21_2=x21*x21+y21*y21,l20_2=x20*x20+y20*y20,l21=Math.sqrt(l21_2),l01=Math.sqrt(l01_2),l4=r2*Math.tan((pi$1-Math.acos((l21_2+l01_2-l20_2)/(2*l21*l01)))/2),t01=l4/l01,t21=l4/l21;Math.abs(t01-1)>epsilon$1&&this._append`L${x1+t01*x01},${y1+t01*y01}`,this._append`A${r2},${r2},0,0,${+(y01*x20>x01*y20)},${this._x1=x1+t21*x21},${this._y1=y1+t21*y21}`}}arc(x2,y3,r2,a0,a1,ccw){if(x2=+x2,y3=+y3,r2=+r2,ccw=!!ccw,r2<0)throw new Error(`negative radius: ${r2}`);let dx=r2*Math.cos(a0),dy=r2*Math.sin(a0),x0=x2+dx,y0=y3+dy,cw=1^ccw,da=ccw?a0-a1:a1-a0;this._x1===null?this._append`M${x0},${y0}`:(Math.abs(this._x1-x0)>epsilon$1||Math.abs(this._y1-y0)>epsilon$1)&&this._append`L${x0},${y0}`,r2&&(da<0&&(da=da%tau$1+tau$1),da>tauEpsilon?this._append`A${r2},${r2},0,1,${cw},${x2-dx},${y3-dy}A${r2},${r2},0,1,${cw},${this._x1=x0},${this._y1=y0}`:da>epsilon$1&&this._append`A${r2},${r2},0,${+(da>=pi$1)},${cw},${this._x1=x2+r2*Math.cos(a1)},${this._y1=y3+r2*Math.sin(a1)}`)}rect(x2,y3,w2,h2){this._append`M${this._x0=this._x1=+x2},${this._y0=this._y1=+y3}h${w2=+w2}v${+h2}h${-w2}Z`}toString(){return this._}}function constant$1(x2){return function(){return x2}}const abs=Math.abs,atan2=Math.atan2,cos=Math.cos,max=Math.max,min=Math.min,sin=Math.sin,sqrt=Math.sqrt,epsilon=1e-12,pi=Math.PI,halfPi=pi/2,tau=2*pi;function acos(x2){return x2>1?0:x2<-1?pi:Math.acos(x2)}function asin(x2){return x2>=1?halfPi:x2<=-1?-halfPi:Math.asin(x2)}function withPath(shape){let digits=3;return shape.digits=function(_2){if(!arguments.length)return digits;if(_2==null)digits=null;else{const d2=Math.floor(_2);if(!(d2>=0))throw new RangeError(`invalid digits: ${_2}`);digits=d2}return shape},()=>new Path(digits)}function array(x2){return typeof x2=="object"&&"length"in x2?x2:Array.from(x2)}function Linear(context){this._context=context}Linear.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(x2,y3){switch(x2=+x2,y3=+y3,this._point){case 0:this._point=1,this._line?this._context.lineTo(x2,y3):this._context.moveTo(x2,y3);break;case 1:this._point=2;default:this._context.lineTo(x2,y3);break}}};function curveLinear(context){return new Linear(context)}function x$2(p2){return p2[0]}function y$2(p2){return p2[1]}function line(x2,y3){var defined=constant$1(!0),context=null,curve=curveLinear,output=null,path=withPath(line2);x2=typeof x2=="function"?x2:x2===void 0?x$2:constant$1(x2),y3=typeof y3=="function"?y3:y3===void 0?y$2:constant$1(y3);function line2(data){var i2,n2=(data=array(data)).length,d2,defined0=!1,buffer;for(context==null&&(output=curve(buffer=path())),i2=0;i2<=n2;++i2)!(i2<n2&&defined(d2=data[i2],i2,data))===defined0&&((defined0=!defined0)?output.lineStart():output.lineEnd()),defined0&&output.point(+x2(d2,i2,data),+y3(d2,i2,data));if(buffer)return output=null,buffer+""||null}return line2.x=function(_2){return arguments.length?(x2=typeof _2=="function"?_2:constant$1(+_2),line2):x2},line2.y=function(_2){return arguments.length?(y3=typeof _2=="function"?_2:constant$1(+_2),line2):y3},line2.defined=function(_2){return arguments.length?(defined=typeof _2=="function"?_2:constant$1(!!_2),line2):defined},line2.curve=function(_2){return arguments.length?(curve=_2,context!=null&&(output=curve(context)),line2):curve},line2.context=function(_2){return arguments.length?(_2==null?context=output=null:output=curve(context=_2),line2):context},line2}class Bump{constructor(context,x2){this._context=context,this._x=x2}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(x2,y3){switch(x2=+x2,y3=+y3,this._point){case 0:{this._point=1,this._line?this._context.lineTo(x2,y3):this._context.moveTo(x2,y3);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+x2)/2,this._y0,this._x0,y3,x2,y3):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+y3)/2,x2,this._y0,x2,y3);break}}this._x0=x2,this._y0=y3}}function bumpX(context){return new Bump(context,!0)}function bumpY(context){return new Bump(context,!1)}function noop(){}function point$4(that,x2,y3){that._context.bezierCurveTo((2*that._x0+that._x1)/3,(2*that._y0+that._y1)/3,(that._x0+2*that._x1)/3,(that._y0+2*that._y1)/3,(that._x0+4*that._x1+x2)/6,(that._y0+4*that._y1+y3)/6)}function Basis(context){this._context=context}Basis.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:point$4(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(x2,y3){switch(x2=+x2,y3=+y3,this._point){case 0:this._point=1,this._line?this._context.lineTo(x2,y3):this._context.moveTo(x2,y3);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:point$4(this,x2,y3);break}this._x0=this._x1,this._x1=x2,this._y0=this._y1,this._y1=y3}};function curveBasis(context){return new Basis(context)}function BasisClosed(context){this._context=context}BasisClosed.prototype={areaStart:noop,areaEnd:noop,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(x2,y3){switch(x2=+x2,y3=+y3,this._point){case 0:this._point=1,this._x2=x2,this._y2=y3;break;case 1:this._point=2,this._x3=x2,this._y3=y3;break;case 2:this._point=3,this._x4=x2,this._y4=y3,this._context.moveTo((this._x0+4*this._x1+x2)/6,(this._y0+4*this._y1+y3)/6);break;default:point$4(this,x2,y3);break}this._x0=this._x1,this._x1=x2,this._y0=this._y1,this._y1=y3}};function curveBasisClosed(context){return new BasisClosed(context)}function BasisOpen(context){this._context=context}BasisOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(x2,y3){switch(x2=+x2,y3=+y3,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var x0=(this._x0+4*this._x1+x2)/6,y0=(this._y0+4*this._y1+y3)/6;this._line?this._context.lineTo(x0,y0):this._context.moveTo(x0,y0);break;case 3:this._point=4;default:point$4(this,x2,y3);break}this._x0=this._x1,this._x1=x2,this._y0=this._y1,this._y1=y3}};function curveBasisOpen(context){return new BasisOpen(context)}function Bundle(context,beta){this._basis=new Basis(context),this._beta=beta}Bundle.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var x2=this._x,y3=this._y,j2=x2.length-1;if(j2>0)for(var x0=x2[0],y0=y3[0],dx=x2[j2]-x0,dy=y3[j2]-y0,i2=-1,t2;++i2<=j2;)t2=i2/j2,this._basis.point(this._beta*x2[i2]+(1-this._beta)*(x0+t2*dx),this._beta*y3[i2]+(1-this._beta)*(y0+t2*dy));this._x=this._y=null,this._basis.lineEnd()},point:function(x2,y3){this._x.push(+x2),this._y.push(+y3)}};const curveBundle=(function custom(beta){function bundle(context){return beta===1?new Basis(context):new Bundle(context,beta)}return bundle.beta=function(beta2){return custom(+beta2)},bundle})(.85);function point$3(that,x2,y3){that._context.bezierCurveTo(that._x1+that._k*(that._x2-that._x0),that._y1+that._k*(that._y2-that._y0),that._x2+that._k*(that._x1-x2),that._y2+that._k*(that._y1-y3),that._x2,that._y2)}function Cardinal(context,tension){this._context=context,this._k=(1-tension)/6}Cardinal.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:point$3(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(x2,y3){switch(x2=+x2,y3=+y3,this._point){case 0:this._point=1,this._line?this._context.lineTo(x2,y3):this._context.moveTo(x2,y3);break;case 1:this._point=2,this._x1=x2,this._y1=y3;break;case 2:this._point=3;default:point$3(this,x2,y3);break}this._x0=this._x1,this._x1=this._x2,this._x2=x2,this._y0=this._y1,this._y1=this._y2,this._y2=y3}};const curveCardinal=(function custom2(tension){function cardinal(context){return new Cardinal(context,tension)}return cardinal.tension=function(tension2){return custom2(+tension2)},cardinal})(0);function CardinalClosed(context,tension){this._context=context,this._k=(1-tension)/6}CardinalClosed.prototype={areaStart:noop,areaEnd:noop,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(x2,y3){switch(x2=+x2,y3=+y3,this._point){case 0:this._point=1,this._x3=x2,this._y3=y3;break;case 1:this._point=2,this._context.moveTo(this._x4=x2,this._y4=y3);break;case 2:this._point=3,this._x5=x2,this._y5=y3;break;default:point$3(this,x2,y3);break}this._x0=this._x1,this._x1=this._x2,this._x2=x2,this._y0=this._y1,this._y1=this._y2,this._y2=y3}};const curveCardinalClosed=(function custom3(tension){function cardinal(context){return new CardinalClosed(context,tension)}return cardinal.tension=function(tension2){return custom3(+tension2)},cardinal})(0);function CardinalOpen(context,tension){this._context=context,this._k=(1-tension)/6}CardinalOpen.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(x2,y3){switch(x2=+x2,y3=+y3,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:point$3(this,x2,y3);break}this._x0=this._x1,this._x1=this._x2,this._x2=x2,this._y0=this._y1,this._y1=this._y2,this._y2=y3}};const curveCardinalOpen=(function custom4(tension){function cardinal(context){return new CardinalOpen(context,tension)}return cardinal.tension=function(tension2){return custom4(+tension2)},cardinal})(0);function point$2(that,x2,y3){var x1=that._x1,y1=that._y1,x22=that._x2,y22=that._y2;if(that._l01_a>epsilon){var a2=2*that._l01_2a+3*that._l01_a*that._l12_a+that._l12_2a,n2=3*that._l01_a*(that._l01_a+that._l12_a);x1=(x1*a2-that._x0*that._l12_2a+that._x2*that._l01_2a)/n2,y1=(y1*a2-that._y0*that._l12_2a+that._y2*that._l01_2a)/n2}if(that._l23_a>epsilon){var b2=2*that._l23_2a+3*that._l23_a*that._l12_a+that._l12_2a,m2=3*that._l23_a*(that._l23_a+that._l12_a);x22=(x22*b2+that._x1*that._l23_2a-x2*that._l12_2a)/m2,y22=(y22*b2+that._y1*that._l23_2a-y3*that._l12_2a)/m2}that._context.bezierCurveTo(x1,y1,x22,y22,that._x2,that._y2)}function CatmullRom(context,alpha){this._context=context,this._alpha=alpha}CatmullRom.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(x2,y3){if(x2=+x2,y3=+y3,this._point){var x23=this._x2-x2,y23=this._y2-y3;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(x23*x23+y23*y23,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(x2,y3):this._context.moveTo(x2,y3);break;case 1:this._point=2;break;case 2:this._point=3;default:point$2(this,x2,y3);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=x2,this._y0=this._y1,this._y1=this._y2,this._y2=y3}};const curveCatmullRom=(function custom5(alpha){function catmullRom(context){return alpha?new CatmullRom(context,alpha):new Cardinal(context,0)}return catmullRom.alpha=function(alpha2){return custom5(+alpha2)},catmullRom})(.5);function CatmullRomClosed(context,alpha){this._context=context,this._alpha=alpha}CatmullRomClosed.prototype={areaStart:noop,areaEnd:noop,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(x2,y3){if(x2=+x2,y3=+y3,this._point){var x23=this._x2-x2,y23=this._y2-y3;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(x23*x23+y23*y23,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=x2,this._y3=y3;break;case 1:this._point=2,this._context.moveTo(this._x4=x2,this._y4=y3);break;case 2:this._point=3,this._x5=x2,this._y5=y3;break;default:point$2(this,x2,y3);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=x2,this._y0=this._y1,this._y1=this._y2,this._y2=y3}};const curveCatmullRomClosed=(function custom6(alpha){function catmullRom(context){return alpha?new CatmullRomClosed(context,alpha):new CardinalClosed(context,0)}return catmullRom.alpha=function(alpha2){return custom6(+alpha2)},catmullRom})(.5);function CatmullRomOpen(context,alpha){this._context=context,this._alpha=alpha}CatmullRomOpen.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(x2,y3){if(x2=+x2,y3=+y3,this._point){var x23=this._x2-x2,y23=this._y2-y3;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(x23*x23+y23*y23,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:point$2(this,x2,y3);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=x2,this._y0=this._y1,this._y1=this._y2,this._y2=y3}};const curveCatmullRomOpen=(function custom7(alpha){function catmullRom(context){return alpha?new CatmullRomOpen(context,alpha):new CardinalOpen(context,0)}return catmullRom.alpha=function(alpha2){return custom7(+alpha2)},catmullRom})(.5);function LinearClosed(context){this._context=context}LinearClosed.prototype={areaStart:noop,areaEnd:noop,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(x2,y3){x2=+x2,y3=+y3,this._point?this._context.lineTo(x2,y3):(this._point=1,this._context.moveTo(x2,y3))}};function curveLinearClosed(context){return new LinearClosed(context)}function sign(x2){return x2<0?-1:1}function slope3(that,x2,y22){var h0=that._x1-that._x0,h1=x2-that._x1,s0=(that._y1-that._y0)/(h0||h1<0&&-0),s1=(y22-that._y1)/(h1||h0<0&&-0),p2=(s0*h1+s1*h0)/(h0+h1);return(sign(s0)+sign(s1))*Math.min(Math.abs(s0),Math.abs(s1),.5*Math.abs(p2))||0}function slope2(that,t2){var h2=that._x1-that._x0;return h2?(3*(that._y1-that._y0)/h2-t2)/2:t2}function point$1(that,t0,t1){var x0=that._x0,y0=that._y0,x1=that._x1,y1=that._y1,dx=(x1-x0)/3;that._context.bezierCurveTo(x0+dx,y0+dx*t0,x1-dx,y1-dx*t1,x1,y1)}function MonotoneX(context){this._context=context}MonotoneX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:point$1(this,this._t0,slope2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(x2,y3){var t1=NaN;if(x2=+x2,y3=+y3,!(x2===this._x1&&y3===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(x2,y3):this._context.moveTo(x2,y3);break;case 1:this._point=2;break;case 2:this._point=3,point$1(this,slope2(this,t1=slope3(this,x2,y3)),t1);break;default:point$1(this,this._t0,t1=slope3(this,x2,y3));break}this._x0=this._x1,this._x1=x2,this._y0=this._y1,this._y1=y3,this._t0=t1}}};function MonotoneY(context){this._context=new ReflectContext(context)}(MonotoneY.prototype=Object.create(MonotoneX.prototype)).point=function(x2,y3){MonotoneX.prototype.point.call(this,y3,x2)};function ReflectContext(context){this._context=context}ReflectContext.prototype={moveTo:function(x2,y3){this._context.moveTo(y3,x2)},closePath:function(){this._context.closePath()},lineTo:function(x2,y3){this._context.lineTo(y3,x2)},bezierCurveTo:function(x1,y1,x2,y22,x3,y3){this._context.bezierCurveTo(y1,x1,y22,x2,y3,x3)}};function monotoneX(context){return new MonotoneX(context)}function monotoneY(context){return new MonotoneY(context)}function Natural(context){this._context=context}Natural.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var x2=this._x,y3=this._y,n2=x2.length;if(n2)if(this._line?this._context.lineTo(x2[0],y3[0]):this._context.moveTo(x2[0],y3[0]),n2===2)this._context.lineTo(x2[1],y3[1]);else for(var px=controlPoints(x2),py=controlPoints(y3),i0=0,i1=1;i1<n2;++i0,++i1)this._context.bezierCurveTo(px[0][i0],py[0][i0],px[1][i0],py[1][i0],x2[i1],y3[i1]);(this._line||this._line!==0&&n2===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(x2,y3){this._x.push(+x2),this._y.push(+y3)}};function controlPoints(x2){var i2,n2=x2.length-1,m2,a2=new Array(n2),b2=new Array(n2),r2=new Array(n2);for(a2[0]=0,b2[0]=2,r2[0]=x2[0]+2*x2[1],i2=1;i2<n2-1;++i2)a2[i2]=1,b2[i2]=4,r2[i2]=4*x2[i2]+2*x2[i2+1];for(a2[n2-1]=2,b2[n2-1]=7,r2[n2-1]=8*x2[n2-1]+x2[n2],i2=1;i2<n2;++i2)m2=a2[i2]/b2[i2-1],b2[i2]-=m2,r2[i2]-=m2*r2[i2-1];for(a2[n2-1]=r2[n2-1]/b2[n2-1],i2=n2-2;i2>=0;--i2)a2[i2]=(r2[i2]-a2[i2+1])/b2[i2];for(b2[n2-1]=(x2[n2]+a2[n2-1])/2,i2=0;i2<n2-1;++i2)b2[i2]=2*x2[i2+1]-a2[i2+1];return[a2,b2]}function curveNatural(context){return new Natural(context)}function Step(context,t2){this._context=context,this._t=t2}Step.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(x2,y3){switch(x2=+x2,y3=+y3,this._point){case 0:this._point=1,this._line?this._context.lineTo(x2,y3):this._context.moveTo(x2,y3);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,y3),this._context.lineTo(x2,y3);else{var x1=this._x*(1-this._t)+x2*this._t;this._context.lineTo(x1,this._y),this._context.lineTo(x1,y3)}break}}this._x=x2,this._y=y3}};function curveStep(context){return new Step(context,.5)}function stepBefore(context){return new Step(context,0)}function stepAfter(context){return new Step(context,1)}function Transform(k2,x2,y3){this.k=k2,this.x=x2,this.y=y3}Transform.prototype={constructor:Transform,scale:function(k2){return k2===1?this:new Transform(this.k*k2,this.x,this.y)},translate:function(x2,y3){return x2===0&y3===0?this:new Transform(this.k,this.x+this.k*x2,this.y+this.k*y3)},apply:function(point2){return[point2[0]*this.k+this.x,point2[1]*this.k+this.y]},applyX:function(x2){return x2*this.k+this.x},applyY:function(y3){return y3*this.k+this.y},invert:function(location){return[(location[0]-this.x)/this.k,(location[1]-this.y)/this.k]},invertX:function(x2){return(x2-this.x)/this.k},invertY:function(y3){return(y3-this.y)/this.k},rescaleX:function(x2){return x2.copy().domain(x2.range().map(this.invertX,this).map(x2.invert,x2))},rescaleY:function(y3){return y3.copy().domain(y3.range().map(this.invertY,this).map(y3.invert,y3))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Transform.prototype;var selectSvgElement=__name(id32=>{var _a17;const{securityLevel}=getConfig2();let root2=select("body");if(securityLevel==="sandbox"){const doc=((_a17=select(`#i${id32}`).node())==null?void 0:_a17.contentDocument)??document;root2=select(doc.body)}return root2.select(`#${id32}`)},"selectSvgElement");function isNothing(subject){return typeof subject>"u"||subject===null}__name(isNothing,"isNothing");function isObject$1(subject){return typeof subject=="object"&&subject!==null}__name(isObject$1,"isObject");function toArray(sequence){return Array.isArray(sequence)?sequence:isNothing(sequence)?[]:[sequence]}__name(toArray,"toArray");function extend(target,source){var index,length,key,sourceKeys;if(source)for(sourceKeys=Object.keys(source),index=0,length=sourceKeys.length;index<length;index+=1)key=sourceKeys[index],target[key]=source[key];return target}__name(extend,"extend");function repeat(string,count){var result="",cycle;for(cycle=0;cycle<count;cycle+=1)result+=string;return result}__name(repeat,"repeat");function isNegativeZero(number){return number===0&&Number.NEGATIVE_INFINITY===1/number}__name(isNegativeZero,"isNegativeZero");var isNothing_1=isNothing,isObject_1=isObject$1,toArray_1=toArray,repeat_1=repeat,isNegativeZero_1=isNegativeZero,extend_1=extend,common={isNothing:isNothing_1,isObject:isObject_1,toArray:toArray_1,repeat:repeat_1,isNegativeZero:isNegativeZero_1,extend:extend_1};function formatError(exception2,compact){var where="",message=exception2.reason||"(unknown reason)";return exception2.mark?(exception2.mark.name&&(where+='in "'+exception2.mark.name+'" '),where+="("+(exception2.mark.line+1)+":"+(exception2.mark.column+1)+")",!compact&&exception2.mark.snippet&&(where+=`
123
+
124
+ `+exception2.mark.snippet),message+" "+where):message}__name(formatError,"formatError");function YAMLException$1(reason,mark){Error.call(this),this.name="YAMLException",this.reason=reason,this.mark=mark,this.message=formatError(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}__name(YAMLException$1,"YAMLException$1");YAMLException$1.prototype=Object.create(Error.prototype);YAMLException$1.prototype.constructor=YAMLException$1;YAMLException$1.prototype.toString=__name(function(compact){return this.name+": "+formatError(this,compact)},"toString");var exception=YAMLException$1;function getLine(buffer,lineStart,lineEnd,position,maxLineLength){var head="",tail="",maxHalfLength=Math.floor(maxLineLength/2)-1;return position-lineStart>maxHalfLength&&(head=" ... ",lineStart=position-maxHalfLength+head.length),lineEnd-position>maxHalfLength&&(tail=" ...",lineEnd=position+maxHalfLength-tail.length),{str:head+buffer.slice(lineStart,lineEnd).replace(/\t/g,"→")+tail,pos:position-lineStart+head.length}}__name(getLine,"getLine");function padStart(string,max2){return common.repeat(" ",max2-string.length)+string}__name(padStart,"padStart");function makeSnippet(mark,options){if(options=Object.create(options||null),!mark.buffer)return null;options.maxLength||(options.maxLength=79),typeof options.indent!="number"&&(options.indent=1),typeof options.linesBefore!="number"&&(options.linesBefore=3),typeof options.linesAfter!="number"&&(options.linesAfter=2);for(var re2=/\r?\n|\r|\0/g,lineStarts=[0],lineEnds=[],match,foundLineNo=-1;match=re2.exec(mark.buffer);)lineEnds.push(match.index),lineStarts.push(match.index+match[0].length),mark.position<=match.index&&foundLineNo<0&&(foundLineNo=lineStarts.length-2);foundLineNo<0&&(foundLineNo=lineStarts.length-1);var result="",i2,line2,lineNoLength=Math.min(mark.line+options.linesAfter,lineEnds.length).toString().length,maxLineLength=options.maxLength-(options.indent+lineNoLength+3);for(i2=1;i2<=options.linesBefore&&!(foundLineNo-i2<0);i2++)line2=getLine(mark.buffer,lineStarts[foundLineNo-i2],lineEnds[foundLineNo-i2],mark.position-(lineStarts[foundLineNo]-lineStarts[foundLineNo-i2]),maxLineLength),result=common.repeat(" ",options.indent)+padStart((mark.line-i2+1).toString(),lineNoLength)+" | "+line2.str+`
125
+ `+result;for(line2=getLine(mark.buffer,lineStarts[foundLineNo],lineEnds[foundLineNo],mark.position,maxLineLength),result+=common.repeat(" ",options.indent)+padStart((mark.line+1).toString(),lineNoLength)+" | "+line2.str+`
126
+ `,result+=common.repeat("-",options.indent+lineNoLength+3+line2.pos)+`^
127
+ `,i2=1;i2<=options.linesAfter&&!(foundLineNo+i2>=lineEnds.length);i2++)line2=getLine(mark.buffer,lineStarts[foundLineNo+i2],lineEnds[foundLineNo+i2],mark.position-(lineStarts[foundLineNo]-lineStarts[foundLineNo+i2]),maxLineLength),result+=common.repeat(" ",options.indent)+padStart((mark.line+i2+1).toString(),lineNoLength)+" | "+line2.str+`
128
+ `;return result.replace(/\n$/,"")}__name(makeSnippet,"makeSnippet");var snippet=makeSnippet,TYPE_CONSTRUCTOR_OPTIONS=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],YAML_NODE_KINDS=["scalar","sequence","mapping"];function compileStyleAliases(map2){var result={};return map2!==null&&Object.keys(map2).forEach(function(style){map2[style].forEach(function(alias){result[String(alias)]=style})}),result}__name(compileStyleAliases,"compileStyleAliases");function Type$1(tag,options){if(options=options||{},Object.keys(options).forEach(function(name){if(TYPE_CONSTRUCTOR_OPTIONS.indexOf(name)===-1)throw new exception('Unknown option "'+name+'" is met in definition of "'+tag+'" YAML type.')}),this.options=options,this.tag=tag,this.kind=options.kind||null,this.resolve=options.resolve||function(){return!0},this.construct=options.construct||function(data){return data},this.instanceOf=options.instanceOf||null,this.predicate=options.predicate||null,this.represent=options.represent||null,this.representName=options.representName||null,this.defaultStyle=options.defaultStyle||null,this.multi=options.multi||!1,this.styleAliases=compileStyleAliases(options.styleAliases||null),YAML_NODE_KINDS.indexOf(this.kind)===-1)throw new exception('Unknown kind "'+this.kind+'" is specified for "'+tag+'" YAML type.')}__name(Type$1,"Type$1");var type=Type$1;function compileList(schema2,name){var result=[];return schema2[name].forEach(function(currentType){var newIndex=result.length;result.forEach(function(previousType,previousIndex){previousType.tag===currentType.tag&&previousType.kind===currentType.kind&&previousType.multi===currentType.multi&&(newIndex=previousIndex)}),result[newIndex]=currentType}),result}__name(compileList,"compileList");function compileMap(){var result={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},index,length;function collectType(type2){type2.multi?(result.multi[type2.kind].push(type2),result.multi.fallback.push(type2)):result[type2.kind][type2.tag]=result.fallback[type2.tag]=type2}for(__name(collectType,"collectType"),index=0,length=arguments.length;index<length;index+=1)arguments[index].forEach(collectType);return result}__name(compileMap,"compileMap");function Schema$1(definition){return this.extend(definition)}__name(Schema$1,"Schema$1");Schema$1.prototype.extend=__name(function(definition){var implicit=[],explicit=[];if(definition instanceof type)explicit.push(definition);else if(Array.isArray(definition))explicit=explicit.concat(definition);else if(definition&&(Array.isArray(definition.implicit)||Array.isArray(definition.explicit)))definition.implicit&&(implicit=implicit.concat(definition.implicit)),definition.explicit&&(explicit=explicit.concat(definition.explicit));else throw new exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");implicit.forEach(function(type$1){if(!(type$1 instanceof type))throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(type$1.loadKind&&type$1.loadKind!=="scalar")throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(type$1.multi)throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),explicit.forEach(function(type$1){if(!(type$1 instanceof type))throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var result=Object.create(Schema$1.prototype);return result.implicit=(this.implicit||[]).concat(implicit),result.explicit=(this.explicit||[]).concat(explicit),result.compiledImplicit=compileList(result,"implicit"),result.compiledExplicit=compileList(result,"explicit"),result.compiledTypeMap=compileMap(result.compiledImplicit,result.compiledExplicit),result},"extend");var schema=Schema$1,str=new type("tag:yaml.org,2002:str",{kind:"scalar",construct:__name(function(data){return data!==null?data:""},"construct")}),seq=new type("tag:yaml.org,2002:seq",{kind:"sequence",construct:__name(function(data){return data!==null?data:[]},"construct")}),map=new type("tag:yaml.org,2002:map",{kind:"mapping",construct:__name(function(data){return data!==null?data:{}},"construct")}),failsafe=new schema({explicit:[str,seq,map]});function resolveYamlNull(data){if(data===null)return!0;var max2=data.length;return max2===1&&data==="~"||max2===4&&(data==="null"||data==="Null"||data==="NULL")}__name(resolveYamlNull,"resolveYamlNull");function constructYamlNull(){return null}__name(constructYamlNull,"constructYamlNull");function isNull(object){return object===null}__name(isNull,"isNull");var _null=new type("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:__name(function(){return"~"},"canonical"),lowercase:__name(function(){return"null"},"lowercase"),uppercase:__name(function(){return"NULL"},"uppercase"),camelcase:__name(function(){return"Null"},"camelcase"),empty:__name(function(){return""},"empty")},defaultStyle:"lowercase"});function resolveYamlBoolean(data){if(data===null)return!1;var max2=data.length;return max2===4&&(data==="true"||data==="True"||data==="TRUE")||max2===5&&(data==="false"||data==="False"||data==="FALSE")}__name(resolveYamlBoolean,"resolveYamlBoolean");function constructYamlBoolean(data){return data==="true"||data==="True"||data==="TRUE"}__name(constructYamlBoolean,"constructYamlBoolean");function isBoolean(object){return Object.prototype.toString.call(object)==="[object Boolean]"}__name(isBoolean,"isBoolean");var bool=new type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:__name(function(object){return object?"true":"false"},"lowercase"),uppercase:__name(function(object){return object?"TRUE":"FALSE"},"uppercase"),camelcase:__name(function(object){return object?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function isHexCode(c2){return 48<=c2&&c2<=57||65<=c2&&c2<=70||97<=c2&&c2<=102}__name(isHexCode,"isHexCode");function isOctCode(c2){return 48<=c2&&c2<=55}__name(isOctCode,"isOctCode");function isDecCode(c2){return 48<=c2&&c2<=57}__name(isDecCode,"isDecCode");function resolveYamlInteger(data){if(data===null)return!1;var max2=data.length,index=0,hasDigits=!1,ch;if(!max2)return!1;if(ch=data[index],(ch==="-"||ch==="+")&&(ch=data[++index]),ch==="0"){if(index+1===max2)return!0;if(ch=data[++index],ch==="b"){for(index++;index<max2;index++)if(ch=data[index],ch!=="_"){if(ch!=="0"&&ch!=="1")return!1;hasDigits=!0}return hasDigits&&ch!=="_"}if(ch==="x"){for(index++;index<max2;index++)if(ch=data[index],ch!=="_"){if(!isHexCode(data.charCodeAt(index)))return!1;hasDigits=!0}return hasDigits&&ch!=="_"}if(ch==="o"){for(index++;index<max2;index++)if(ch=data[index],ch!=="_"){if(!isOctCode(data.charCodeAt(index)))return!1;hasDigits=!0}return hasDigits&&ch!=="_"}}if(ch==="_")return!1;for(;index<max2;index++)if(ch=data[index],ch!=="_"){if(!isDecCode(data.charCodeAt(index)))return!1;hasDigits=!0}return!(!hasDigits||ch==="_")}__name(resolveYamlInteger,"resolveYamlInteger");function constructYamlInteger(data){var value=data,sign2=1,ch;if(value.indexOf("_")!==-1&&(value=value.replace(/_/g,"")),ch=value[0],(ch==="-"||ch==="+")&&(ch==="-"&&(sign2=-1),value=value.slice(1),ch=value[0]),value==="0")return 0;if(ch==="0"){if(value[1]==="b")return sign2*parseInt(value.slice(2),2);if(value[1]==="x")return sign2*parseInt(value.slice(2),16);if(value[1]==="o")return sign2*parseInt(value.slice(2),8)}return sign2*parseInt(value,10)}__name(constructYamlInteger,"constructYamlInteger");function isInteger(object){return Object.prototype.toString.call(object)==="[object Number]"&&object%1===0&&!common.isNegativeZero(object)}__name(isInteger,"isInteger");var int=new type("tag:yaml.org,2002:int",{kind:"scalar",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:__name(function(obj){return obj>=0?"0b"+obj.toString(2):"-0b"+obj.toString(2).slice(1)},"binary"),octal:__name(function(obj){return obj>=0?"0o"+obj.toString(8):"-0o"+obj.toString(8).slice(1)},"octal"),decimal:__name(function(obj){return obj.toString(10)},"decimal"),hexadecimal:__name(function(obj){return obj>=0?"0x"+obj.toString(16).toUpperCase():"-0x"+obj.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(data){return!(data===null||!YAML_FLOAT_PATTERN.test(data)||data[data.length-1]==="_")}__name(resolveYamlFloat,"resolveYamlFloat");function constructYamlFloat(data){var value,sign2;return value=data.replace(/_/g,"").toLowerCase(),sign2=value[0]==="-"?-1:1,"+-".indexOf(value[0])>=0&&(value=value.slice(1)),value===".inf"?sign2===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:value===".nan"?NaN:sign2*parseFloat(value,10)}__name(constructYamlFloat,"constructYamlFloat");var SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;function representYamlFloat(object,style){var res;if(isNaN(object))switch(style){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===object)switch(style){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===object)switch(style){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(common.isNegativeZero(object))return"-0.0";return res=object.toString(10),SCIENTIFIC_WITHOUT_DOT.test(res)?res.replace("e",".e"):res}__name(representYamlFloat,"representYamlFloat");function isFloat(object){return Object.prototype.toString.call(object)==="[object Number]"&&(object%1!==0||common.isNegativeZero(object))}__name(isFloat,"isFloat");var float=new type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"}),json=failsafe.extend({implicit:[_null,bool,int,float]}),core=json,YAML_DATE_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),YAML_TIMESTAMP_REGEXP=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 resolveYamlTimestamp(data){return data===null?!1:YAML_DATE_REGEXP.exec(data)!==null||YAML_TIMESTAMP_REGEXP.exec(data)!==null}__name(resolveYamlTimestamp,"resolveYamlTimestamp");function constructYamlTimestamp(data){var match,year,month,day,hour,minute,second,fraction=0,delta=null,tz_hour,tz_minute,date;if(match=YAML_DATE_REGEXP.exec(data),match===null&&(match=YAML_TIMESTAMP_REGEXP.exec(data)),match===null)throw new Error("Date resolve error");if(year=+match[1],month=+match[2]-1,day=+match[3],!match[4])return new Date(Date.UTC(year,month,day));if(hour=+match[4],minute=+match[5],second=+match[6],match[7]){for(fraction=match[7].slice(0,3);fraction.length<3;)fraction+="0";fraction=+fraction}return match[9]&&(tz_hour=+match[10],tz_minute=+(match[11]||0),delta=(tz_hour*60+tz_minute)*6e4,match[9]==="-"&&(delta=-delta)),date=new Date(Date.UTC(year,month,day,hour,minute,second,fraction)),delta&&date.setTime(date.getTime()-delta),date}__name(constructYamlTimestamp,"constructYamlTimestamp");function representYamlTimestamp(object){return object.toISOString()}__name(representYamlTimestamp,"representYamlTimestamp");var timestamp=new type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp});function resolveYamlMerge(data){return data==="<<"||data===null}__name(resolveYamlMerge,"resolveYamlMerge");var merge$1=new type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge}),BASE64_MAP=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
129
+ \r`;function resolveYamlBinary(data){if(data===null)return!1;var code,idx,bitlen=0,max2=data.length,map2=BASE64_MAP;for(idx=0;idx<max2;idx++)if(code=map2.indexOf(data.charAt(idx)),!(code>64)){if(code<0)return!1;bitlen+=6}return bitlen%8===0}__name(resolveYamlBinary,"resolveYamlBinary");function constructYamlBinary(data){var idx,tailbits,input=data.replace(/[\r\n=]/g,""),max2=input.length,map2=BASE64_MAP,bits=0,result=[];for(idx=0;idx<max2;idx++)idx%4===0&&idx&&(result.push(bits>>16&255),result.push(bits>>8&255),result.push(bits&255)),bits=bits<<6|map2.indexOf(input.charAt(idx));return tailbits=max2%4*6,tailbits===0?(result.push(bits>>16&255),result.push(bits>>8&255),result.push(bits&255)):tailbits===18?(result.push(bits>>10&255),result.push(bits>>2&255)):tailbits===12&&result.push(bits>>4&255),new Uint8Array(result)}__name(constructYamlBinary,"constructYamlBinary");function representYamlBinary(object){var result="",bits=0,idx,tail,max2=object.length,map2=BASE64_MAP;for(idx=0;idx<max2;idx++)idx%3===0&&idx&&(result+=map2[bits>>18&63],result+=map2[bits>>12&63],result+=map2[bits>>6&63],result+=map2[bits&63]),bits=(bits<<8)+object[idx];return tail=max2%3,tail===0?(result+=map2[bits>>18&63],result+=map2[bits>>12&63],result+=map2[bits>>6&63],result+=map2[bits&63]):tail===2?(result+=map2[bits>>10&63],result+=map2[bits>>4&63],result+=map2[bits<<2&63],result+=map2[64]):tail===1&&(result+=map2[bits>>2&63],result+=map2[bits<<4&63],result+=map2[64],result+=map2[64]),result}__name(representYamlBinary,"representYamlBinary");function isBinary(obj){return Object.prototype.toString.call(obj)==="[object Uint8Array]"}__name(isBinary,"isBinary");var binary=new type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary}),_hasOwnProperty$3=Object.prototype.hasOwnProperty,_toString$2=Object.prototype.toString;function resolveYamlOmap(data){if(data===null)return!0;var objectKeys=[],index,length,pair,pairKey,pairHasKey,object=data;for(index=0,length=object.length;index<length;index+=1){if(pair=object[index],pairHasKey=!1,_toString$2.call(pair)!=="[object Object]")return!1;for(pairKey in pair)if(_hasOwnProperty$3.call(pair,pairKey))if(!pairHasKey)pairHasKey=!0;else return!1;if(!pairHasKey)return!1;if(objectKeys.indexOf(pairKey)===-1)objectKeys.push(pairKey);else return!1}return!0}__name(resolveYamlOmap,"resolveYamlOmap");function constructYamlOmap(data){return data!==null?data:[]}__name(constructYamlOmap,"constructYamlOmap");var omap=new type("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap}),_toString$1=Object.prototype.toString;function resolveYamlPairs(data){if(data===null)return!0;var index,length,pair,keys,result,object=data;for(result=new Array(object.length),index=0,length=object.length;index<length;index+=1){if(pair=object[index],_toString$1.call(pair)!=="[object Object]"||(keys=Object.keys(pair),keys.length!==1))return!1;result[index]=[keys[0],pair[keys[0]]]}return!0}__name(resolveYamlPairs,"resolveYamlPairs");function constructYamlPairs(data){if(data===null)return[];var index,length,pair,keys,result,object=data;for(result=new Array(object.length),index=0,length=object.length;index<length;index+=1)pair=object[index],keys=Object.keys(pair),result[index]=[keys[0],pair[keys[0]]];return result}__name(constructYamlPairs,"constructYamlPairs");var pairs=new type("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs}),_hasOwnProperty$2=Object.prototype.hasOwnProperty;function resolveYamlSet(data){if(data===null)return!0;var key,object=data;for(key in object)if(_hasOwnProperty$2.call(object,key)&&object[key]!==null)return!1;return!0}__name(resolveYamlSet,"resolveYamlSet");function constructYamlSet(data){return data!==null?data:{}}__name(constructYamlSet,"constructYamlSet");var set=new type("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet}),_default=core.extend({implicit:[timestamp,merge$1],explicit:[binary,omap,pairs,set]}),_hasOwnProperty$1=Object.prototype.hasOwnProperty,CONTEXT_FLOW_IN=1,CONTEXT_FLOW_OUT=2,CONTEXT_BLOCK_IN=3,CONTEXT_BLOCK_OUT=4,CHOMPING_CLIP=1,CHOMPING_STRIP=2,CHOMPING_KEEP=3,PATTERN_NON_PRINTABLE=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,PATTERN_NON_ASCII_LINE_BREAKS=/[\x85\u2028\u2029]/,PATTERN_FLOW_INDICATORS=/[,\[\]\{\}]/,PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z\-]+!)$/i,PATTERN_TAG_URI=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(obj){return Object.prototype.toString.call(obj)}__name(_class,"_class");function is_EOL(c2){return c2===10||c2===13}__name(is_EOL,"is_EOL");function is_WHITE_SPACE(c2){return c2===9||c2===32}__name(is_WHITE_SPACE,"is_WHITE_SPACE");function is_WS_OR_EOL(c2){return c2===9||c2===32||c2===10||c2===13}__name(is_WS_OR_EOL,"is_WS_OR_EOL");function is_FLOW_INDICATOR(c2){return c2===44||c2===91||c2===93||c2===123||c2===125}__name(is_FLOW_INDICATOR,"is_FLOW_INDICATOR");function fromHexCode(c2){var lc;return 48<=c2&&c2<=57?c2-48:(lc=c2|32,97<=lc&&lc<=102?lc-97+10:-1)}__name(fromHexCode,"fromHexCode");function escapedHexLen(c2){return c2===120?2:c2===117?4:c2===85?8:0}__name(escapedHexLen,"escapedHexLen");function fromDecimalCode(c2){return 48<=c2&&c2<=57?c2-48:-1}__name(fromDecimalCode,"fromDecimalCode");function simpleEscapeSequence(c2){return c2===48?"\0":c2===97?"\x07":c2===98?"\b":c2===116||c2===9?" ":c2===110?`
130
+ `:c2===118?"\v":c2===102?"\f":c2===114?"\r":c2===101?"\x1B":c2===32?" ":c2===34?'"':c2===47?"/":c2===92?"\\":c2===78?"…":c2===95?" ":c2===76?"\u2028":c2===80?"\u2029":""}__name(simpleEscapeSequence,"simpleEscapeSequence");function charFromCodepoint(c2){return c2<=65535?String.fromCharCode(c2):String.fromCharCode((c2-65536>>10)+55296,(c2-65536&1023)+56320)}__name(charFromCodepoint,"charFromCodepoint");function setProperty(object,key,value){key==="__proto__"?Object.defineProperty(object,key,{configurable:!0,enumerable:!0,writable:!0,value}):object[key]=value}__name(setProperty,"setProperty");var simpleEscapeCheck=new Array(256),simpleEscapeMap=new Array(256);for(i$1=0;i$1<256;i$1++)simpleEscapeCheck[i$1]=simpleEscapeSequence(i$1)?1:0,simpleEscapeMap[i$1]=simpleEscapeSequence(i$1);var i$1;function State$1(input,options){this.input=input,this.filename=options.filename||null,this.schema=options.schema||_default,this.onWarning=options.onWarning||null,this.legacy=options.legacy||!1,this.json=options.json||!1,this.listener=options.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=input.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}__name(State$1,"State$1");function generateError(state2,message){var mark={name:state2.filename,buffer:state2.input.slice(0,-1),position:state2.position,line:state2.line,column:state2.position-state2.lineStart};return mark.snippet=snippet(mark),new exception(message,mark)}__name(generateError,"generateError");function throwError(state2,message){throw generateError(state2,message)}__name(throwError,"throwError");function throwWarning(state2,message){state2.onWarning&&state2.onWarning.call(null,generateError(state2,message))}__name(throwWarning,"throwWarning");var directiveHandlers={YAML:__name(function(state2,name,args){var match,major,minor;state2.version!==null&&throwError(state2,"duplication of %YAML directive"),args.length!==1&&throwError(state2,"YAML directive accepts exactly one argument"),match=/^([0-9]+)\.([0-9]+)$/.exec(args[0]),match===null&&throwError(state2,"ill-formed argument of the YAML directive"),major=parseInt(match[1],10),minor=parseInt(match[2],10),major!==1&&throwError(state2,"unacceptable YAML version of the document"),state2.version=args[0],state2.checkLineBreaks=minor<2,minor!==1&&minor!==2&&throwWarning(state2,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:__name(function(state2,name,args){var handle,prefix;args.length!==2&&throwError(state2,"TAG directive accepts exactly two arguments"),handle=args[0],prefix=args[1],PATTERN_TAG_HANDLE.test(handle)||throwError(state2,"ill-formed tag handle (first argument) of the TAG directive"),_hasOwnProperty$1.call(state2.tagMap,handle)&&throwError(state2,'there is a previously declared suffix for "'+handle+'" tag handle'),PATTERN_TAG_URI.test(prefix)||throwError(state2,"ill-formed tag prefix (second argument) of the TAG directive");try{prefix=decodeURIComponent(prefix)}catch{throwError(state2,"tag prefix is malformed: "+prefix)}state2.tagMap[handle]=prefix},"handleTagDirective")};function captureSegment(state2,start2,end,checkJson){var _position,_length,_character,_result;if(start2<end){if(_result=state2.input.slice(start2,end),checkJson)for(_position=0,_length=_result.length;_position<_length;_position+=1)_character=_result.charCodeAt(_position),_character===9||32<=_character&&_character<=1114111||throwError(state2,"expected valid JSON character");else PATTERN_NON_PRINTABLE.test(_result)&&throwError(state2,"the stream contains non-printable characters");state2.result+=_result}}__name(captureSegment,"captureSegment");function mergeMappings(state2,destination,source,overridableKeys){var sourceKeys,key,index,quantity;for(common.isObject(source)||throwError(state2,"cannot merge mappings; the provided source object is unacceptable"),sourceKeys=Object.keys(source),index=0,quantity=sourceKeys.length;index<quantity;index+=1)key=sourceKeys[index],_hasOwnProperty$1.call(destination,key)||(setProperty(destination,key,source[key]),overridableKeys[key]=!0)}__name(mergeMappings,"mergeMappings");function storeMappingPair(state2,_result,overridableKeys,keyTag,keyNode,valueNode,startLine,startLineStart,startPos){var index,quantity;if(Array.isArray(keyNode))for(keyNode=Array.prototype.slice.call(keyNode),index=0,quantity=keyNode.length;index<quantity;index+=1)Array.isArray(keyNode[index])&&throwError(state2,"nested arrays are not supported inside keys"),typeof keyNode=="object"&&_class(keyNode[index])==="[object Object]"&&(keyNode[index]="[object Object]");if(typeof keyNode=="object"&&_class(keyNode)==="[object Object]"&&(keyNode="[object Object]"),keyNode=String(keyNode),_result===null&&(_result={}),keyTag==="tag:yaml.org,2002:merge")if(Array.isArray(valueNode))for(index=0,quantity=valueNode.length;index<quantity;index+=1)mergeMappings(state2,_result,valueNode[index],overridableKeys);else mergeMappings(state2,_result,valueNode,overridableKeys);else!state2.json&&!_hasOwnProperty$1.call(overridableKeys,keyNode)&&_hasOwnProperty$1.call(_result,keyNode)&&(state2.line=startLine||state2.line,state2.lineStart=startLineStart||state2.lineStart,state2.position=startPos||state2.position,throwError(state2,"duplicated mapping key")),setProperty(_result,keyNode,valueNode),delete overridableKeys[keyNode];return _result}__name(storeMappingPair,"storeMappingPair");function readLineBreak(state2){var ch;ch=state2.input.charCodeAt(state2.position),ch===10?state2.position++:ch===13?(state2.position++,state2.input.charCodeAt(state2.position)===10&&state2.position++):throwError(state2,"a line break is expected"),state2.line+=1,state2.lineStart=state2.position,state2.firstTabInLine=-1}__name(readLineBreak,"readLineBreak");function skipSeparationSpace(state2,allowComments,checkIndent){for(var lineBreaks=0,ch=state2.input.charCodeAt(state2.position);ch!==0;){for(;is_WHITE_SPACE(ch);)ch===9&&state2.firstTabInLine===-1&&(state2.firstTabInLine=state2.position),ch=state2.input.charCodeAt(++state2.position);if(allowComments&&ch===35)do ch=state2.input.charCodeAt(++state2.position);while(ch!==10&&ch!==13&&ch!==0);if(is_EOL(ch))for(readLineBreak(state2),ch=state2.input.charCodeAt(state2.position),lineBreaks++,state2.lineIndent=0;ch===32;)state2.lineIndent++,ch=state2.input.charCodeAt(++state2.position);else break}return checkIndent!==-1&&lineBreaks!==0&&state2.lineIndent<checkIndent&&throwWarning(state2,"deficient indentation"),lineBreaks}__name(skipSeparationSpace,"skipSeparationSpace");function testDocumentSeparator(state2){var _position=state2.position,ch;return ch=state2.input.charCodeAt(_position),!!((ch===45||ch===46)&&ch===state2.input.charCodeAt(_position+1)&&ch===state2.input.charCodeAt(_position+2)&&(_position+=3,ch=state2.input.charCodeAt(_position),ch===0||is_WS_OR_EOL(ch)))}__name(testDocumentSeparator,"testDocumentSeparator");function writeFoldedLines(state2,count){count===1?state2.result+=" ":count>1&&(state2.result+=common.repeat(`
131
+ `,count-1))}__name(writeFoldedLines,"writeFoldedLines");function readPlainScalar(state2,nodeIndent,withinFlowCollection){var preceding,following,captureStart,captureEnd,hasPendingContent,_line,_lineStart,_lineIndent,_kind=state2.kind,_result=state2.result,ch;if(ch=state2.input.charCodeAt(state2.position),is_WS_OR_EOL(ch)||is_FLOW_INDICATOR(ch)||ch===35||ch===38||ch===42||ch===33||ch===124||ch===62||ch===39||ch===34||ch===37||ch===64||ch===96||(ch===63||ch===45)&&(following=state2.input.charCodeAt(state2.position+1),is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)))return!1;for(state2.kind="scalar",state2.result="",captureStart=captureEnd=state2.position,hasPendingContent=!1;ch!==0;){if(ch===58){if(following=state2.input.charCodeAt(state2.position+1),is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following))break}else if(ch===35){if(preceding=state2.input.charCodeAt(state2.position-1),is_WS_OR_EOL(preceding))break}else{if(state2.position===state2.lineStart&&testDocumentSeparator(state2)||withinFlowCollection&&is_FLOW_INDICATOR(ch))break;if(is_EOL(ch))if(_line=state2.line,_lineStart=state2.lineStart,_lineIndent=state2.lineIndent,skipSeparationSpace(state2,!1,-1),state2.lineIndent>=nodeIndent){hasPendingContent=!0,ch=state2.input.charCodeAt(state2.position);continue}else{state2.position=captureEnd,state2.line=_line,state2.lineStart=_lineStart,state2.lineIndent=_lineIndent;break}}hasPendingContent&&(captureSegment(state2,captureStart,captureEnd,!1),writeFoldedLines(state2,state2.line-_line),captureStart=captureEnd=state2.position,hasPendingContent=!1),is_WHITE_SPACE(ch)||(captureEnd=state2.position+1),ch=state2.input.charCodeAt(++state2.position)}return captureSegment(state2,captureStart,captureEnd,!1),state2.result?!0:(state2.kind=_kind,state2.result=_result,!1)}__name(readPlainScalar,"readPlainScalar");function readSingleQuotedScalar(state2,nodeIndent){var ch,captureStart,captureEnd;if(ch=state2.input.charCodeAt(state2.position),ch!==39)return!1;for(state2.kind="scalar",state2.result="",state2.position++,captureStart=captureEnd=state2.position;(ch=state2.input.charCodeAt(state2.position))!==0;)if(ch===39)if(captureSegment(state2,captureStart,state2.position,!0),ch=state2.input.charCodeAt(++state2.position),ch===39)captureStart=state2.position,state2.position++,captureEnd=state2.position;else return!0;else is_EOL(ch)?(captureSegment(state2,captureStart,captureEnd,!0),writeFoldedLines(state2,skipSeparationSpace(state2,!1,nodeIndent)),captureStart=captureEnd=state2.position):state2.position===state2.lineStart&&testDocumentSeparator(state2)?throwError(state2,"unexpected end of the document within a single quoted scalar"):(state2.position++,captureEnd=state2.position);throwError(state2,"unexpected end of the stream within a single quoted scalar")}__name(readSingleQuotedScalar,"readSingleQuotedScalar");function readDoubleQuotedScalar(state2,nodeIndent){var captureStart,captureEnd,hexLength,hexResult,tmp,ch;if(ch=state2.input.charCodeAt(state2.position),ch!==34)return!1;for(state2.kind="scalar",state2.result="",state2.position++,captureStart=captureEnd=state2.position;(ch=state2.input.charCodeAt(state2.position))!==0;){if(ch===34)return captureSegment(state2,captureStart,state2.position,!0),state2.position++,!0;if(ch===92){if(captureSegment(state2,captureStart,state2.position,!0),ch=state2.input.charCodeAt(++state2.position),is_EOL(ch))skipSeparationSpace(state2,!1,nodeIndent);else if(ch<256&&simpleEscapeCheck[ch])state2.result+=simpleEscapeMap[ch],state2.position++;else if((tmp=escapedHexLen(ch))>0){for(hexLength=tmp,hexResult=0;hexLength>0;hexLength--)ch=state2.input.charCodeAt(++state2.position),(tmp=fromHexCode(ch))>=0?hexResult=(hexResult<<4)+tmp:throwError(state2,"expected hexadecimal character");state2.result+=charFromCodepoint(hexResult),state2.position++}else throwError(state2,"unknown escape sequence");captureStart=captureEnd=state2.position}else is_EOL(ch)?(captureSegment(state2,captureStart,captureEnd,!0),writeFoldedLines(state2,skipSeparationSpace(state2,!1,nodeIndent)),captureStart=captureEnd=state2.position):state2.position===state2.lineStart&&testDocumentSeparator(state2)?throwError(state2,"unexpected end of the document within a double quoted scalar"):(state2.position++,captureEnd=state2.position)}throwError(state2,"unexpected end of the stream within a double quoted scalar")}__name(readDoubleQuotedScalar,"readDoubleQuotedScalar");function readFlowCollection(state2,nodeIndent){var readNext=!0,_line,_lineStart,_pos,_tag=state2.tag,_result,_anchor=state2.anchor,following,terminator,isPair,isExplicitPair,isMapping,overridableKeys=Object.create(null),keyNode,keyTag,valueNode,ch;if(ch=state2.input.charCodeAt(state2.position),ch===91)terminator=93,isMapping=!1,_result=[];else if(ch===123)terminator=125,isMapping=!0,_result={};else return!1;for(state2.anchor!==null&&(state2.anchorMap[state2.anchor]=_result),ch=state2.input.charCodeAt(++state2.position);ch!==0;){if(skipSeparationSpace(state2,!0,nodeIndent),ch=state2.input.charCodeAt(state2.position),ch===terminator)return state2.position++,state2.tag=_tag,state2.anchor=_anchor,state2.kind=isMapping?"mapping":"sequence",state2.result=_result,!0;readNext?ch===44&&throwError(state2,"expected the node content, but found ','"):throwError(state2,"missed comma between flow collection entries"),keyTag=keyNode=valueNode=null,isPair=isExplicitPair=!1,ch===63&&(following=state2.input.charCodeAt(state2.position+1),is_WS_OR_EOL(following)&&(isPair=isExplicitPair=!0,state2.position++,skipSeparationSpace(state2,!0,nodeIndent))),_line=state2.line,_lineStart=state2.lineStart,_pos=state2.position,composeNode(state2,nodeIndent,CONTEXT_FLOW_IN,!1,!0),keyTag=state2.tag,keyNode=state2.result,skipSeparationSpace(state2,!0,nodeIndent),ch=state2.input.charCodeAt(state2.position),(isExplicitPair||state2.line===_line)&&ch===58&&(isPair=!0,ch=state2.input.charCodeAt(++state2.position),skipSeparationSpace(state2,!0,nodeIndent),composeNode(state2,nodeIndent,CONTEXT_FLOW_IN,!1,!0),valueNode=state2.result),isMapping?storeMappingPair(state2,_result,overridableKeys,keyTag,keyNode,valueNode,_line,_lineStart,_pos):isPair?_result.push(storeMappingPair(state2,null,overridableKeys,keyTag,keyNode,valueNode,_line,_lineStart,_pos)):_result.push(keyNode),skipSeparationSpace(state2,!0,nodeIndent),ch=state2.input.charCodeAt(state2.position),ch===44?(readNext=!0,ch=state2.input.charCodeAt(++state2.position)):readNext=!1}throwError(state2,"unexpected end of the stream within a flow collection")}__name(readFlowCollection,"readFlowCollection");function readBlockScalar(state2,nodeIndent){var captureStart,folding,chomping=CHOMPING_CLIP,didReadContent=!1,detectedIndent=!1,textIndent=nodeIndent,emptyLines=0,atMoreIndented=!1,tmp,ch;if(ch=state2.input.charCodeAt(state2.position),ch===124)folding=!1;else if(ch===62)folding=!0;else return!1;for(state2.kind="scalar",state2.result="";ch!==0;)if(ch=state2.input.charCodeAt(++state2.position),ch===43||ch===45)CHOMPING_CLIP===chomping?chomping=ch===43?CHOMPING_KEEP:CHOMPING_STRIP:throwError(state2,"repeat of a chomping mode identifier");else if((tmp=fromDecimalCode(ch))>=0)tmp===0?throwError(state2,"bad explicit indentation width of a block scalar; it cannot be less than one"):detectedIndent?throwError(state2,"repeat of an indentation width identifier"):(textIndent=nodeIndent+tmp-1,detectedIndent=!0);else break;if(is_WHITE_SPACE(ch)){do ch=state2.input.charCodeAt(++state2.position);while(is_WHITE_SPACE(ch));if(ch===35)do ch=state2.input.charCodeAt(++state2.position);while(!is_EOL(ch)&&ch!==0)}for(;ch!==0;){for(readLineBreak(state2),state2.lineIndent=0,ch=state2.input.charCodeAt(state2.position);(!detectedIndent||state2.lineIndent<textIndent)&&ch===32;)state2.lineIndent++,ch=state2.input.charCodeAt(++state2.position);if(!detectedIndent&&state2.lineIndent>textIndent&&(textIndent=state2.lineIndent),is_EOL(ch)){emptyLines++;continue}if(state2.lineIndent<textIndent){chomping===CHOMPING_KEEP?state2.result+=common.repeat(`
132
+ `,didReadContent?1+emptyLines:emptyLines):chomping===CHOMPING_CLIP&&didReadContent&&(state2.result+=`
133
+ `);break}for(folding?is_WHITE_SPACE(ch)?(atMoreIndented=!0,state2.result+=common.repeat(`
134
+ `,didReadContent?1+emptyLines:emptyLines)):atMoreIndented?(atMoreIndented=!1,state2.result+=common.repeat(`
135
+ `,emptyLines+1)):emptyLines===0?didReadContent&&(state2.result+=" "):state2.result+=common.repeat(`
136
+ `,emptyLines):state2.result+=common.repeat(`
137
+ `,didReadContent?1+emptyLines:emptyLines),didReadContent=!0,detectedIndent=!0,emptyLines=0,captureStart=state2.position;!is_EOL(ch)&&ch!==0;)ch=state2.input.charCodeAt(++state2.position);captureSegment(state2,captureStart,state2.position,!1)}return!0}__name(readBlockScalar,"readBlockScalar");function readBlockSequence(state2,nodeIndent){var _line,_tag=state2.tag,_anchor=state2.anchor,_result=[],following,detected=!1,ch;if(state2.firstTabInLine!==-1)return!1;for(state2.anchor!==null&&(state2.anchorMap[state2.anchor]=_result),ch=state2.input.charCodeAt(state2.position);ch!==0&&(state2.firstTabInLine!==-1&&(state2.position=state2.firstTabInLine,throwError(state2,"tab characters must not be used in indentation")),!(ch!==45||(following=state2.input.charCodeAt(state2.position+1),!is_WS_OR_EOL(following))));){if(detected=!0,state2.position++,skipSeparationSpace(state2,!0,-1)&&state2.lineIndent<=nodeIndent){_result.push(null),ch=state2.input.charCodeAt(state2.position);continue}if(_line=state2.line,composeNode(state2,nodeIndent,CONTEXT_BLOCK_IN,!1,!0),_result.push(state2.result),skipSeparationSpace(state2,!0,-1),ch=state2.input.charCodeAt(state2.position),(state2.line===_line||state2.lineIndent>nodeIndent)&&ch!==0)throwError(state2,"bad indentation of a sequence entry");else if(state2.lineIndent<nodeIndent)break}return detected?(state2.tag=_tag,state2.anchor=_anchor,state2.kind="sequence",state2.result=_result,!0):!1}__name(readBlockSequence,"readBlockSequence");function readBlockMapping(state2,nodeIndent,flowIndent){var following,allowCompact,_line,_keyLine,_keyLineStart,_keyPos,_tag=state2.tag,_anchor=state2.anchor,_result={},overridableKeys=Object.create(null),keyTag=null,keyNode=null,valueNode=null,atExplicitKey=!1,detected=!1,ch;if(state2.firstTabInLine!==-1)return!1;for(state2.anchor!==null&&(state2.anchorMap[state2.anchor]=_result),ch=state2.input.charCodeAt(state2.position);ch!==0;){if(!atExplicitKey&&state2.firstTabInLine!==-1&&(state2.position=state2.firstTabInLine,throwError(state2,"tab characters must not be used in indentation")),following=state2.input.charCodeAt(state2.position+1),_line=state2.line,(ch===63||ch===58)&&is_WS_OR_EOL(following))ch===63?(atExplicitKey&&(storeMappingPair(state2,_result,overridableKeys,keyTag,keyNode,null,_keyLine,_keyLineStart,_keyPos),keyTag=keyNode=valueNode=null),detected=!0,atExplicitKey=!0,allowCompact=!0):atExplicitKey?(atExplicitKey=!1,allowCompact=!0):throwError(state2,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),state2.position+=1,ch=following;else{if(_keyLine=state2.line,_keyLineStart=state2.lineStart,_keyPos=state2.position,!composeNode(state2,flowIndent,CONTEXT_FLOW_OUT,!1,!0))break;if(state2.line===_line){for(ch=state2.input.charCodeAt(state2.position);is_WHITE_SPACE(ch);)ch=state2.input.charCodeAt(++state2.position);if(ch===58)ch=state2.input.charCodeAt(++state2.position),is_WS_OR_EOL(ch)||throwError(state2,"a whitespace character is expected after the key-value separator within a block mapping"),atExplicitKey&&(storeMappingPair(state2,_result,overridableKeys,keyTag,keyNode,null,_keyLine,_keyLineStart,_keyPos),keyTag=keyNode=valueNode=null),detected=!0,atExplicitKey=!1,allowCompact=!1,keyTag=state2.tag,keyNode=state2.result;else if(detected)throwError(state2,"can not read an implicit mapping pair; a colon is missed");else return state2.tag=_tag,state2.anchor=_anchor,!0}else if(detected)throwError(state2,"can not read a block mapping entry; a multiline key may not be an implicit key");else return state2.tag=_tag,state2.anchor=_anchor,!0}if((state2.line===_line||state2.lineIndent>nodeIndent)&&(atExplicitKey&&(_keyLine=state2.line,_keyLineStart=state2.lineStart,_keyPos=state2.position),composeNode(state2,nodeIndent,CONTEXT_BLOCK_OUT,!0,allowCompact)&&(atExplicitKey?keyNode=state2.result:valueNode=state2.result),atExplicitKey||(storeMappingPair(state2,_result,overridableKeys,keyTag,keyNode,valueNode,_keyLine,_keyLineStart,_keyPos),keyTag=keyNode=valueNode=null),skipSeparationSpace(state2,!0,-1),ch=state2.input.charCodeAt(state2.position)),(state2.line===_line||state2.lineIndent>nodeIndent)&&ch!==0)throwError(state2,"bad indentation of a mapping entry");else if(state2.lineIndent<nodeIndent)break}return atExplicitKey&&storeMappingPair(state2,_result,overridableKeys,keyTag,keyNode,null,_keyLine,_keyLineStart,_keyPos),detected&&(state2.tag=_tag,state2.anchor=_anchor,state2.kind="mapping",state2.result=_result),detected}__name(readBlockMapping,"readBlockMapping");function readTagProperty(state2){var _position,isVerbatim=!1,isNamed=!1,tagHandle,tagName,ch;if(ch=state2.input.charCodeAt(state2.position),ch!==33)return!1;if(state2.tag!==null&&throwError(state2,"duplication of a tag property"),ch=state2.input.charCodeAt(++state2.position),ch===60?(isVerbatim=!0,ch=state2.input.charCodeAt(++state2.position)):ch===33?(isNamed=!0,tagHandle="!!",ch=state2.input.charCodeAt(++state2.position)):tagHandle="!",_position=state2.position,isVerbatim){do ch=state2.input.charCodeAt(++state2.position);while(ch!==0&&ch!==62);state2.position<state2.length?(tagName=state2.input.slice(_position,state2.position),ch=state2.input.charCodeAt(++state2.position)):throwError(state2,"unexpected end of the stream within a verbatim tag")}else{for(;ch!==0&&!is_WS_OR_EOL(ch);)ch===33&&(isNamed?throwError(state2,"tag suffix cannot contain exclamation marks"):(tagHandle=state2.input.slice(_position-1,state2.position+1),PATTERN_TAG_HANDLE.test(tagHandle)||throwError(state2,"named tag handle cannot contain such characters"),isNamed=!0,_position=state2.position+1)),ch=state2.input.charCodeAt(++state2.position);tagName=state2.input.slice(_position,state2.position),PATTERN_FLOW_INDICATORS.test(tagName)&&throwError(state2,"tag suffix cannot contain flow indicator characters")}tagName&&!PATTERN_TAG_URI.test(tagName)&&throwError(state2,"tag name cannot contain such characters: "+tagName);try{tagName=decodeURIComponent(tagName)}catch{throwError(state2,"tag name is malformed: "+tagName)}return isVerbatim?state2.tag=tagName:_hasOwnProperty$1.call(state2.tagMap,tagHandle)?state2.tag=state2.tagMap[tagHandle]+tagName:tagHandle==="!"?state2.tag="!"+tagName:tagHandle==="!!"?state2.tag="tag:yaml.org,2002:"+tagName:throwError(state2,'undeclared tag handle "'+tagHandle+'"'),!0}__name(readTagProperty,"readTagProperty");function readAnchorProperty(state2){var _position,ch;if(ch=state2.input.charCodeAt(state2.position),ch!==38)return!1;for(state2.anchor!==null&&throwError(state2,"duplication of an anchor property"),ch=state2.input.charCodeAt(++state2.position),_position=state2.position;ch!==0&&!is_WS_OR_EOL(ch)&&!is_FLOW_INDICATOR(ch);)ch=state2.input.charCodeAt(++state2.position);return state2.position===_position&&throwError(state2,"name of an anchor node must contain at least one character"),state2.anchor=state2.input.slice(_position,state2.position),!0}__name(readAnchorProperty,"readAnchorProperty");function readAlias(state2){var _position,alias,ch;if(ch=state2.input.charCodeAt(state2.position),ch!==42)return!1;for(ch=state2.input.charCodeAt(++state2.position),_position=state2.position;ch!==0&&!is_WS_OR_EOL(ch)&&!is_FLOW_INDICATOR(ch);)ch=state2.input.charCodeAt(++state2.position);return state2.position===_position&&throwError(state2,"name of an alias node must contain at least one character"),alias=state2.input.slice(_position,state2.position),_hasOwnProperty$1.call(state2.anchorMap,alias)||throwError(state2,'unidentified alias "'+alias+'"'),state2.result=state2.anchorMap[alias],skipSeparationSpace(state2,!0,-1),!0}__name(readAlias,"readAlias");function composeNode(state2,parentIndent,nodeContext,allowToSeek,allowCompact){var allowBlockStyles,allowBlockScalars,allowBlockCollections,indentStatus=1,atNewLine=!1,hasContent=!1,typeIndex,typeQuantity,typeList,type2,flowIndent,blockIndent;if(state2.listener!==null&&state2.listener("open",state2),state2.tag=null,state2.anchor=null,state2.kind=null,state2.result=null,allowBlockStyles=allowBlockScalars=allowBlockCollections=CONTEXT_BLOCK_OUT===nodeContext||CONTEXT_BLOCK_IN===nodeContext,allowToSeek&&skipSeparationSpace(state2,!0,-1)&&(atNewLine=!0,state2.lineIndent>parentIndent?indentStatus=1:state2.lineIndent===parentIndent?indentStatus=0:state2.lineIndent<parentIndent&&(indentStatus=-1)),indentStatus===1)for(;readTagProperty(state2)||readAnchorProperty(state2);)skipSeparationSpace(state2,!0,-1)?(atNewLine=!0,allowBlockCollections=allowBlockStyles,state2.lineIndent>parentIndent?indentStatus=1:state2.lineIndent===parentIndent?indentStatus=0:state2.lineIndent<parentIndent&&(indentStatus=-1)):allowBlockCollections=!1;if(allowBlockCollections&&(allowBlockCollections=atNewLine||allowCompact),(indentStatus===1||CONTEXT_BLOCK_OUT===nodeContext)&&(CONTEXT_FLOW_IN===nodeContext||CONTEXT_FLOW_OUT===nodeContext?flowIndent=parentIndent:flowIndent=parentIndent+1,blockIndent=state2.position-state2.lineStart,indentStatus===1?allowBlockCollections&&(readBlockSequence(state2,blockIndent)||readBlockMapping(state2,blockIndent,flowIndent))||readFlowCollection(state2,flowIndent)?hasContent=!0:(allowBlockScalars&&readBlockScalar(state2,flowIndent)||readSingleQuotedScalar(state2,flowIndent)||readDoubleQuotedScalar(state2,flowIndent)?hasContent=!0:readAlias(state2)?(hasContent=!0,(state2.tag!==null||state2.anchor!==null)&&throwError(state2,"alias node should not have any properties")):readPlainScalar(state2,flowIndent,CONTEXT_FLOW_IN===nodeContext)&&(hasContent=!0,state2.tag===null&&(state2.tag="?")),state2.anchor!==null&&(state2.anchorMap[state2.anchor]=state2.result)):indentStatus===0&&(hasContent=allowBlockCollections&&readBlockSequence(state2,blockIndent))),state2.tag===null)state2.anchor!==null&&(state2.anchorMap[state2.anchor]=state2.result);else if(state2.tag==="?"){for(state2.result!==null&&state2.kind!=="scalar"&&throwError(state2,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+state2.kind+'"'),typeIndex=0,typeQuantity=state2.implicitTypes.length;typeIndex<typeQuantity;typeIndex+=1)if(type2=state2.implicitTypes[typeIndex],type2.resolve(state2.result)){state2.result=type2.construct(state2.result),state2.tag=type2.tag,state2.anchor!==null&&(state2.anchorMap[state2.anchor]=state2.result);break}}else if(state2.tag!=="!"){if(_hasOwnProperty$1.call(state2.typeMap[state2.kind||"fallback"],state2.tag))type2=state2.typeMap[state2.kind||"fallback"][state2.tag];else for(type2=null,typeList=state2.typeMap.multi[state2.kind||"fallback"],typeIndex=0,typeQuantity=typeList.length;typeIndex<typeQuantity;typeIndex+=1)if(state2.tag.slice(0,typeList[typeIndex].tag.length)===typeList[typeIndex].tag){type2=typeList[typeIndex];break}type2||throwError(state2,"unknown tag !<"+state2.tag+">"),state2.result!==null&&type2.kind!==state2.kind&&throwError(state2,"unacceptable node kind for !<"+state2.tag+'> tag; it should be "'+type2.kind+'", not "'+state2.kind+'"'),type2.resolve(state2.result,state2.tag)?(state2.result=type2.construct(state2.result,state2.tag),state2.anchor!==null&&(state2.anchorMap[state2.anchor]=state2.result)):throwError(state2,"cannot resolve a node with !<"+state2.tag+"> explicit tag")}return state2.listener!==null&&state2.listener("close",state2),state2.tag!==null||state2.anchor!==null||hasContent}__name(composeNode,"composeNode");function readDocument(state2){var documentStart=state2.position,_position,directiveName,directiveArgs,hasDirectives=!1,ch;for(state2.version=null,state2.checkLineBreaks=state2.legacy,state2.tagMap=Object.create(null),state2.anchorMap=Object.create(null);(ch=state2.input.charCodeAt(state2.position))!==0&&(skipSeparationSpace(state2,!0,-1),ch=state2.input.charCodeAt(state2.position),!(state2.lineIndent>0||ch!==37));){for(hasDirectives=!0,ch=state2.input.charCodeAt(++state2.position),_position=state2.position;ch!==0&&!is_WS_OR_EOL(ch);)ch=state2.input.charCodeAt(++state2.position);for(directiveName=state2.input.slice(_position,state2.position),directiveArgs=[],directiveName.length<1&&throwError(state2,"directive name must not be less than one character in length");ch!==0;){for(;is_WHITE_SPACE(ch);)ch=state2.input.charCodeAt(++state2.position);if(ch===35){do ch=state2.input.charCodeAt(++state2.position);while(ch!==0&&!is_EOL(ch));break}if(is_EOL(ch))break;for(_position=state2.position;ch!==0&&!is_WS_OR_EOL(ch);)ch=state2.input.charCodeAt(++state2.position);directiveArgs.push(state2.input.slice(_position,state2.position))}ch!==0&&readLineBreak(state2),_hasOwnProperty$1.call(directiveHandlers,directiveName)?directiveHandlers[directiveName](state2,directiveName,directiveArgs):throwWarning(state2,'unknown document directive "'+directiveName+'"')}if(skipSeparationSpace(state2,!0,-1),state2.lineIndent===0&&state2.input.charCodeAt(state2.position)===45&&state2.input.charCodeAt(state2.position+1)===45&&state2.input.charCodeAt(state2.position+2)===45?(state2.position+=3,skipSeparationSpace(state2,!0,-1)):hasDirectives&&throwError(state2,"directives end mark is expected"),composeNode(state2,state2.lineIndent-1,CONTEXT_BLOCK_OUT,!1,!0),skipSeparationSpace(state2,!0,-1),state2.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(state2.input.slice(documentStart,state2.position))&&throwWarning(state2,"non-ASCII line breaks are interpreted as content"),state2.documents.push(state2.result),state2.position===state2.lineStart&&testDocumentSeparator(state2)){state2.input.charCodeAt(state2.position)===46&&(state2.position+=3,skipSeparationSpace(state2,!0,-1));return}if(state2.position<state2.length-1)throwError(state2,"end of the stream or a document separator is expected");else return}__name(readDocument,"readDocument");function loadDocuments(input,options){input=String(input),options=options||{},input.length!==0&&(input.charCodeAt(input.length-1)!==10&&input.charCodeAt(input.length-1)!==13&&(input+=`
138
+ `),input.charCodeAt(0)===65279&&(input=input.slice(1)));var state2=new State$1(input,options),nullpos=input.indexOf("\0");for(nullpos!==-1&&(state2.position=nullpos,throwError(state2,"null byte is not allowed in input")),state2.input+="\0";state2.input.charCodeAt(state2.position)===32;)state2.lineIndent+=1,state2.position+=1;for(;state2.position<state2.length-1;)readDocument(state2);return state2.documents}__name(loadDocuments,"loadDocuments");function loadAll$1(input,iterator,options){iterator!==null&&typeof iterator=="object"&&typeof options>"u"&&(options=iterator,iterator=null);var documents=loadDocuments(input,options);if(typeof iterator!="function")return documents;for(var index=0,length=documents.length;index<length;index+=1)iterator(documents[index])}__name(loadAll$1,"loadAll$1");function load$1(input,options){var documents=loadDocuments(input,options);if(documents.length!==0){if(documents.length===1)return documents[0];throw new exception("expected a single document in the stream, but found more")}}__name(load$1,"load$1");var load_1=load$1,loader$1={load:load_1},_toString=Object.prototype.toString,_hasOwnProperty=Object.prototype.hasOwnProperty,CHAR_BOM=65279,CHAR_TAB=9,CHAR_LINE_FEED=10,CHAR_CARRIAGE_RETURN=13,CHAR_SPACE=32,CHAR_EXCLAMATION=33,CHAR_DOUBLE_QUOTE=34,CHAR_SHARP=35,CHAR_PERCENT=37,CHAR_AMPERSAND=38,CHAR_SINGLE_QUOTE=39,CHAR_ASTERISK=42,CHAR_COMMA=44,CHAR_MINUS=45,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_GREATER_THAN=62,CHAR_QUESTION=63,CHAR_COMMERCIAL_AT=64,CHAR_LEFT_SQUARE_BRACKET=91,CHAR_RIGHT_SQUARE_BRACKET=93,CHAR_GRAVE_ACCENT=96,CHAR_LEFT_CURLY_BRACKET=123,CHAR_VERTICAL_LINE=124,CHAR_RIGHT_CURLY_BRACKET=125,ESCAPE_SEQUENCES={};ESCAPE_SEQUENCES[0]="\\0";ESCAPE_SEQUENCES[7]="\\a";ESCAPE_SEQUENCES[8]="\\b";ESCAPE_SEQUENCES[9]="\\t";ESCAPE_SEQUENCES[10]="\\n";ESCAPE_SEQUENCES[11]="\\v";ESCAPE_SEQUENCES[12]="\\f";ESCAPE_SEQUENCES[13]="\\r";ESCAPE_SEQUENCES[27]="\\e";ESCAPE_SEQUENCES[34]='\\"';ESCAPE_SEQUENCES[92]="\\\\";ESCAPE_SEQUENCES[133]="\\N";ESCAPE_SEQUENCES[160]="\\_";ESCAPE_SEQUENCES[8232]="\\L";ESCAPE_SEQUENCES[8233]="\\P";var DEPRECATED_BOOLEANS_SYNTAX=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],DEPRECATED_BASE60_SYNTAX=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function compileStyleMap(schema2,map2){var result,keys,index,length,tag,style,type2;if(map2===null)return{};for(result={},keys=Object.keys(map2),index=0,length=keys.length;index<length;index+=1)tag=keys[index],style=String(map2[tag]),tag.slice(0,2)==="!!"&&(tag="tag:yaml.org,2002:"+tag.slice(2)),type2=schema2.compiledTypeMap.fallback[tag],type2&&_hasOwnProperty.call(type2.styleAliases,style)&&(style=type2.styleAliases[style]),result[tag]=style;return result}__name(compileStyleMap,"compileStyleMap");function encodeHex(character){var string,handle,length;if(string=character.toString(16).toUpperCase(),character<=255)handle="x",length=2;else if(character<=65535)handle="u",length=4;else if(character<=4294967295)handle="U",length=8;else throw new exception("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+handle+common.repeat("0",length-string.length)+string}__name(encodeHex,"encodeHex");var QUOTING_TYPE_SINGLE=1,QUOTING_TYPE_DOUBLE=2;function State(options){this.schema=options.schema||_default,this.indent=Math.max(1,options.indent||2),this.noArrayIndent=options.noArrayIndent||!1,this.skipInvalid=options.skipInvalid||!1,this.flowLevel=common.isNothing(options.flowLevel)?-1:options.flowLevel,this.styleMap=compileStyleMap(this.schema,options.styles||null),this.sortKeys=options.sortKeys||!1,this.lineWidth=options.lineWidth||80,this.noRefs=options.noRefs||!1,this.noCompatMode=options.noCompatMode||!1,this.condenseFlow=options.condenseFlow||!1,this.quotingType=options.quotingType==='"'?QUOTING_TYPE_DOUBLE:QUOTING_TYPE_SINGLE,this.forceQuotes=options.forceQuotes||!1,this.replacer=typeof options.replacer=="function"?options.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}__name(State,"State");function indentString(string,spaces){for(var ind=common.repeat(" ",spaces),position=0,next=-1,result="",line2,length=string.length;position<length;)next=string.indexOf(`
139
+ `,position),next===-1?(line2=string.slice(position),position=length):(line2=string.slice(position,next+1),position=next+1),line2.length&&line2!==`
140
+ `&&(result+=ind),result+=line2;return result}__name(indentString,"indentString");function generateNextLine(state2,level){return`
141
+ `+common.repeat(" ",state2.indent*level)}__name(generateNextLine,"generateNextLine");function testImplicitResolving(state2,str2){var index,length,type2;for(index=0,length=state2.implicitTypes.length;index<length;index+=1)if(type2=state2.implicitTypes[index],type2.resolve(str2))return!0;return!1}__name(testImplicitResolving,"testImplicitResolving");function isWhitespace(c2){return c2===CHAR_SPACE||c2===CHAR_TAB}__name(isWhitespace,"isWhitespace");function isPrintable(c2){return 32<=c2&&c2<=126||161<=c2&&c2<=55295&&c2!==8232&&c2!==8233||57344<=c2&&c2<=65533&&c2!==CHAR_BOM||65536<=c2&&c2<=1114111}__name(isPrintable,"isPrintable");function isNsCharOrWhitespace(c2){return isPrintable(c2)&&c2!==CHAR_BOM&&c2!==CHAR_CARRIAGE_RETURN&&c2!==CHAR_LINE_FEED}__name(isNsCharOrWhitespace,"isNsCharOrWhitespace");function isPlainSafe(c2,prev,inblock){var cIsNsCharOrWhitespace=isNsCharOrWhitespace(c2),cIsNsChar=cIsNsCharOrWhitespace&&!isWhitespace(c2);return(inblock?cIsNsCharOrWhitespace:cIsNsCharOrWhitespace&&c2!==CHAR_COMMA&&c2!==CHAR_LEFT_SQUARE_BRACKET&&c2!==CHAR_RIGHT_SQUARE_BRACKET&&c2!==CHAR_LEFT_CURLY_BRACKET&&c2!==CHAR_RIGHT_CURLY_BRACKET)&&c2!==CHAR_SHARP&&!(prev===CHAR_COLON&&!cIsNsChar)||isNsCharOrWhitespace(prev)&&!isWhitespace(prev)&&c2===CHAR_SHARP||prev===CHAR_COLON&&cIsNsChar}__name(isPlainSafe,"isPlainSafe");function isPlainSafeFirst(c2){return isPrintable(c2)&&c2!==CHAR_BOM&&!isWhitespace(c2)&&c2!==CHAR_MINUS&&c2!==CHAR_QUESTION&&c2!==CHAR_COLON&&c2!==CHAR_COMMA&&c2!==CHAR_LEFT_SQUARE_BRACKET&&c2!==CHAR_RIGHT_SQUARE_BRACKET&&c2!==CHAR_LEFT_CURLY_BRACKET&&c2!==CHAR_RIGHT_CURLY_BRACKET&&c2!==CHAR_SHARP&&c2!==CHAR_AMPERSAND&&c2!==CHAR_ASTERISK&&c2!==CHAR_EXCLAMATION&&c2!==CHAR_VERTICAL_LINE&&c2!==CHAR_EQUALS&&c2!==CHAR_GREATER_THAN&&c2!==CHAR_SINGLE_QUOTE&&c2!==CHAR_DOUBLE_QUOTE&&c2!==CHAR_PERCENT&&c2!==CHAR_COMMERCIAL_AT&&c2!==CHAR_GRAVE_ACCENT}__name(isPlainSafeFirst,"isPlainSafeFirst");function isPlainSafeLast(c2){return!isWhitespace(c2)&&c2!==CHAR_COLON}__name(isPlainSafeLast,"isPlainSafeLast");function codePointAt(string,pos){var first=string.charCodeAt(pos),second;return first>=55296&&first<=56319&&pos+1<string.length&&(second=string.charCodeAt(pos+1),second>=56320&&second<=57343)?(first-55296)*1024+second-56320+65536:first}__name(codePointAt,"codePointAt");function needIndentIndicator(string){var leadingSpaceRe=/^\n* /;return leadingSpaceRe.test(string)}__name(needIndentIndicator,"needIndentIndicator");var STYLE_PLAIN=1,STYLE_SINGLE=2,STYLE_LITERAL=3,STYLE_FOLDED=4,STYLE_DOUBLE=5;function chooseScalarStyle(string,singleLineOnly,indentPerLevel,lineWidth,testAmbiguousType,quotingType,forceQuotes,inblock){var i2,char=0,prevChar=null,hasLineBreak=!1,hasFoldableLine=!1,shouldTrackWidth=lineWidth!==-1,previousLineBreak=-1,plain=isPlainSafeFirst(codePointAt(string,0))&&isPlainSafeLast(codePointAt(string,string.length-1));if(singleLineOnly||forceQuotes)for(i2=0;i2<string.length;char>=65536?i2+=2:i2++){if(char=codePointAt(string,i2),!isPrintable(char))return STYLE_DOUBLE;plain=plain&&isPlainSafe(char,prevChar,inblock),prevChar=char}else{for(i2=0;i2<string.length;char>=65536?i2+=2:i2++){if(char=codePointAt(string,i2),char===CHAR_LINE_FEED)hasLineBreak=!0,shouldTrackWidth&&(hasFoldableLine=hasFoldableLine||i2-previousLineBreak-1>lineWidth&&string[previousLineBreak+1]!==" ",previousLineBreak=i2);else if(!isPrintable(char))return STYLE_DOUBLE;plain=plain&&isPlainSafe(char,prevChar,inblock),prevChar=char}hasFoldableLine=hasFoldableLine||shouldTrackWidth&&i2-previousLineBreak-1>lineWidth&&string[previousLineBreak+1]!==" "}return!hasLineBreak&&!hasFoldableLine?plain&&!forceQuotes&&!testAmbiguousType(string)?STYLE_PLAIN:quotingType===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE:indentPerLevel>9&&needIndentIndicator(string)?STYLE_DOUBLE:forceQuotes?quotingType===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE:hasFoldableLine?STYLE_FOLDED:STYLE_LITERAL}__name(chooseScalarStyle,"chooseScalarStyle");function writeScalar(state2,string,level,iskey,inblock){state2.dump=(function(){if(string.length===0)return state2.quotingType===QUOTING_TYPE_DOUBLE?'""':"''";if(!state2.noCompatMode&&(DEPRECATED_BOOLEANS_SYNTAX.indexOf(string)!==-1||DEPRECATED_BASE60_SYNTAX.test(string)))return state2.quotingType===QUOTING_TYPE_DOUBLE?'"'+string+'"':"'"+string+"'";var indent=state2.indent*Math.max(1,level),lineWidth=state2.lineWidth===-1?-1:Math.max(Math.min(state2.lineWidth,40),state2.lineWidth-indent),singleLineOnly=iskey||state2.flowLevel>-1&&level>=state2.flowLevel;function testAmbiguity(string2){return testImplicitResolving(state2,string2)}switch(__name(testAmbiguity,"testAmbiguity"),chooseScalarStyle(string,singleLineOnly,state2.indent,lineWidth,testAmbiguity,state2.quotingType,state2.forceQuotes&&!iskey,inblock)){case STYLE_PLAIN:return string;case STYLE_SINGLE:return"'"+string.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+blockHeader(string,state2.indent)+dropEndingNewline(indentString(string,indent));case STYLE_FOLDED:return">"+blockHeader(string,state2.indent)+dropEndingNewline(indentString(foldString(string,lineWidth),indent));case STYLE_DOUBLE:return'"'+escapeString(string)+'"';default:throw new exception("impossible error: invalid scalar style")}})()}__name(writeScalar,"writeScalar");function blockHeader(string,indentPerLevel){var indentIndicator=needIndentIndicator(string)?String(indentPerLevel):"",clip=string[string.length-1]===`
142
+ `,keep=clip&&(string[string.length-2]===`
143
+ `||string===`
144
+ `),chomp=keep?"+":clip?"":"-";return indentIndicator+chomp+`
145
+ `}__name(blockHeader,"blockHeader");function dropEndingNewline(string){return string[string.length-1]===`
146
+ `?string.slice(0,-1):string}__name(dropEndingNewline,"dropEndingNewline");function foldString(string,width){for(var lineRe=/(\n+)([^\n]*)/g,result=(function(){var nextLF=string.indexOf(`
147
+ `);return nextLF=nextLF!==-1?nextLF:string.length,lineRe.lastIndex=nextLF,foldLine(string.slice(0,nextLF),width)})(),prevMoreIndented=string[0]===`
148
+ `||string[0]===" ",moreIndented,match;match=lineRe.exec(string);){var prefix=match[1],line2=match[2];moreIndented=line2[0]===" ",result+=prefix+(!prevMoreIndented&&!moreIndented&&line2!==""?`
149
+ `:"")+foldLine(line2,width),prevMoreIndented=moreIndented}return result}__name(foldString,"foldString");function foldLine(line2,width){if(line2===""||line2[0]===" ")return line2;for(var breakRe=/ [^ ]/g,match,start2=0,end,curr=0,next=0,result="";match=breakRe.exec(line2);)next=match.index,next-start2>width&&(end=curr>start2?curr:next,result+=`
150
+ `+line2.slice(start2,end),start2=end+1),curr=next;return result+=`
151
+ `,line2.length-start2>width&&curr>start2?result+=line2.slice(start2,curr)+`
152
+ `+line2.slice(curr+1):result+=line2.slice(start2),result.slice(1)}__name(foldLine,"foldLine");function escapeString(string){for(var result="",char=0,escapeSeq,i2=0;i2<string.length;char>=65536?i2+=2:i2++)char=codePointAt(string,i2),escapeSeq=ESCAPE_SEQUENCES[char],!escapeSeq&&isPrintable(char)?(result+=string[i2],char>=65536&&(result+=string[i2+1])):result+=escapeSeq||encodeHex(char);return result}__name(escapeString,"escapeString");function writeFlowSequence(state2,level,object){var _result="",_tag=state2.tag,index,length,value;for(index=0,length=object.length;index<length;index+=1)value=object[index],state2.replacer&&(value=state2.replacer.call(object,String(index),value)),(writeNode(state2,level,value,!1,!1)||typeof value>"u"&&writeNode(state2,level,null,!1,!1))&&(_result!==""&&(_result+=","+(state2.condenseFlow?"":" ")),_result+=state2.dump);state2.tag=_tag,state2.dump="["+_result+"]"}__name(writeFlowSequence,"writeFlowSequence");function writeBlockSequence(state2,level,object,compact){var _result="",_tag=state2.tag,index,length,value;for(index=0,length=object.length;index<length;index+=1)value=object[index],state2.replacer&&(value=state2.replacer.call(object,String(index),value)),(writeNode(state2,level+1,value,!0,!0,!1,!0)||typeof value>"u"&&writeNode(state2,level+1,null,!0,!0,!1,!0))&&((!compact||_result!=="")&&(_result+=generateNextLine(state2,level)),state2.dump&&CHAR_LINE_FEED===state2.dump.charCodeAt(0)?_result+="-":_result+="- ",_result+=state2.dump);state2.tag=_tag,state2.dump=_result||"[]"}__name(writeBlockSequence,"writeBlockSequence");function writeFlowMapping(state2,level,object){var _result="",_tag=state2.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,pairBuffer;for(index=0,length=objectKeyList.length;index<length;index+=1)pairBuffer="",_result!==""&&(pairBuffer+=", "),state2.condenseFlow&&(pairBuffer+='"'),objectKey=objectKeyList[index],objectValue=object[objectKey],state2.replacer&&(objectValue=state2.replacer.call(object,objectKey,objectValue)),writeNode(state2,level,objectKey,!1,!1)&&(state2.dump.length>1024&&(pairBuffer+="? "),pairBuffer+=state2.dump+(state2.condenseFlow?'"':"")+":"+(state2.condenseFlow?"":" "),writeNode(state2,level,objectValue,!1,!1)&&(pairBuffer+=state2.dump,_result+=pairBuffer));state2.tag=_tag,state2.dump="{"+_result+"}"}__name(writeFlowMapping,"writeFlowMapping");function writeBlockMapping(state2,level,object,compact){var _result="",_tag=state2.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,explicitPair,pairBuffer;if(state2.sortKeys===!0)objectKeyList.sort();else if(typeof state2.sortKeys=="function")objectKeyList.sort(state2.sortKeys);else if(state2.sortKeys)throw new exception("sortKeys must be a boolean or a function");for(index=0,length=objectKeyList.length;index<length;index+=1)pairBuffer="",(!compact||_result!=="")&&(pairBuffer+=generateNextLine(state2,level)),objectKey=objectKeyList[index],objectValue=object[objectKey],state2.replacer&&(objectValue=state2.replacer.call(object,objectKey,objectValue)),writeNode(state2,level+1,objectKey,!0,!0,!0)&&(explicitPair=state2.tag!==null&&state2.tag!=="?"||state2.dump&&state2.dump.length>1024,explicitPair&&(state2.dump&&CHAR_LINE_FEED===state2.dump.charCodeAt(0)?pairBuffer+="?":pairBuffer+="? "),pairBuffer+=state2.dump,explicitPair&&(pairBuffer+=generateNextLine(state2,level)),writeNode(state2,level+1,objectValue,!0,explicitPair)&&(state2.dump&&CHAR_LINE_FEED===state2.dump.charCodeAt(0)?pairBuffer+=":":pairBuffer+=": ",pairBuffer+=state2.dump,_result+=pairBuffer));state2.tag=_tag,state2.dump=_result||"{}"}__name(writeBlockMapping,"writeBlockMapping");function detectType(state2,object,explicit){var _result,typeList,index,length,type2,style;for(typeList=explicit?state2.explicitTypes:state2.implicitTypes,index=0,length=typeList.length;index<length;index+=1)if(type2=typeList[index],(type2.instanceOf||type2.predicate)&&(!type2.instanceOf||typeof object=="object"&&object instanceof type2.instanceOf)&&(!type2.predicate||type2.predicate(object))){if(explicit?type2.multi&&type2.representName?state2.tag=type2.representName(object):state2.tag=type2.tag:state2.tag="?",type2.represent){if(style=state2.styleMap[type2.tag]||type2.defaultStyle,_toString.call(type2.represent)==="[object Function]")_result=type2.represent(object,style);else if(_hasOwnProperty.call(type2.represent,style))_result=type2.represent[style](object,style);else throw new exception("!<"+type2.tag+'> tag resolver accepts not "'+style+'" style');state2.dump=_result}return!0}return!1}__name(detectType,"detectType");function writeNode(state2,level,object,block,compact,iskey,isblockseq){state2.tag=null,state2.dump=object,detectType(state2,object,!1)||detectType(state2,object,!0);var type2=_toString.call(state2.dump),inblock=block,tagStr;block&&(block=state2.flowLevel<0||state2.flowLevel>level);var objectOrArray=type2==="[object Object]"||type2==="[object Array]",duplicateIndex,duplicate;if(objectOrArray&&(duplicateIndex=state2.duplicates.indexOf(object),duplicate=duplicateIndex!==-1),(state2.tag!==null&&state2.tag!=="?"||duplicate||state2.indent!==2&&level>0)&&(compact=!1),duplicate&&state2.usedDuplicates[duplicateIndex])state2.dump="*ref_"+duplicateIndex;else{if(objectOrArray&&duplicate&&!state2.usedDuplicates[duplicateIndex]&&(state2.usedDuplicates[duplicateIndex]=!0),type2==="[object Object]")block&&Object.keys(state2.dump).length!==0?(writeBlockMapping(state2,level,state2.dump,compact),duplicate&&(state2.dump="&ref_"+duplicateIndex+state2.dump)):(writeFlowMapping(state2,level,state2.dump),duplicate&&(state2.dump="&ref_"+duplicateIndex+" "+state2.dump));else if(type2==="[object Array]")block&&state2.dump.length!==0?(state2.noArrayIndent&&!isblockseq&&level>0?writeBlockSequence(state2,level-1,state2.dump,compact):writeBlockSequence(state2,level,state2.dump,compact),duplicate&&(state2.dump="&ref_"+duplicateIndex+state2.dump)):(writeFlowSequence(state2,level,state2.dump),duplicate&&(state2.dump="&ref_"+duplicateIndex+" "+state2.dump));else if(type2==="[object String]")state2.tag!=="?"&&writeScalar(state2,state2.dump,level,iskey,inblock);else{if(type2==="[object Undefined]")return!1;if(state2.skipInvalid)return!1;throw new exception("unacceptable kind of an object to dump "+type2)}state2.tag!==null&&state2.tag!=="?"&&(tagStr=encodeURI(state2.tag[0]==="!"?state2.tag.slice(1):state2.tag).replace(/!/g,"%21"),state2.tag[0]==="!"?tagStr="!"+tagStr:tagStr.slice(0,18)==="tag:yaml.org,2002:"?tagStr="!!"+tagStr.slice(18):tagStr="!<"+tagStr+">",state2.dump=tagStr+" "+state2.dump)}return!0}__name(writeNode,"writeNode");function getDuplicateReferences(object,state2){var objects=[],duplicatesIndexes=[],index,length;for(inspectNode(object,objects,duplicatesIndexes),index=0,length=duplicatesIndexes.length;index<length;index+=1)state2.duplicates.push(objects[duplicatesIndexes[index]]);state2.usedDuplicates=new Array(length)}__name(getDuplicateReferences,"getDuplicateReferences");function inspectNode(object,objects,duplicatesIndexes){var objectKeyList,index,length;if(object!==null&&typeof object=="object")if(index=objects.indexOf(object),index!==-1)duplicatesIndexes.indexOf(index)===-1&&duplicatesIndexes.push(index);else if(objects.push(object),Array.isArray(object))for(index=0,length=object.length;index<length;index+=1)inspectNode(object[index],objects,duplicatesIndexes);else for(objectKeyList=Object.keys(object),index=0,length=objectKeyList.length;index<length;index+=1)inspectNode(object[objectKeyList[index]],objects,duplicatesIndexes)}__name(inspectNode,"inspectNode");function dump$1(input,options){options=options||{};var state2=new State(options);state2.noRefs||getDuplicateReferences(input,state2);var value=input;return state2.replacer&&(value=state2.replacer.call({"":value},"",value)),writeNode(state2,0,value,!0,!0)?state2.dump+`
153
+ `:""}__name(dump$1,"dump$1");function renamed(from,to){return function(){throw new Error("Function yaml."+from+" is removed in js-yaml 4. Use yaml."+to+" instead, which is now safe by default.")}}__name(renamed,"renamed");var JSON_SCHEMA=json,load=loader$1.load;/*! Bundled license information:
154
+
155
+ js-yaml/dist/js-yaml.mjs:
156
+ (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
157
+ */var computeLabelTransform=__name((bbox,useHtmlLabels)=>{if(useHtmlLabels)return"translate("+-bbox.width/2+", "+-bbox.height/2+")";const x2=bbox.x??0,y3=bbox.y??0;return"translate("+-(x2+bbox.width/2)+", "+-(y3+bbox.height/2)+")"},"computeLabelTransform"),markerOffsets={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},markerOffsets2={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function calculateDeltaAndAngle$1(point1,point2){if(point1===void 0||point2===void 0)return{angle:0,deltaX:0,deltaY:0};point1=pointTransformer(point1),point2=pointTransformer(point2);const[x1,y1]=[point1.x,point1.y],[x2,y22]=[point2.x,point2.y],deltaX=x2-x1,deltaY=y22-y1;return{angle:Math.atan(deltaY/deltaX),deltaX,deltaY}}__name(calculateDeltaAndAngle$1,"calculateDeltaAndAngle");var pointTransformer=__name(data=>Array.isArray(data)?{x:data[0],y:data[1]}:data,"pointTransformer"),getLineFunctionsWithOffset=__name(edge=>({x:__name(function(d2,i2,data){let offset=0;const DIRECTION=pointTransformer(data[0]).x<pointTransformer(data[data.length-1]).x?"left":"right";if(i2===0&&Object.hasOwn(markerOffsets,edge.arrowTypeStart)){const{angle,deltaX}=calculateDeltaAndAngle$1(data[0],data[1]);offset=markerOffsets[edge.arrowTypeStart]*Math.cos(angle)*(deltaX>=0?1:-1)}else if(i2===data.length-1&&Object.hasOwn(markerOffsets,edge.arrowTypeEnd)){const{angle,deltaX}=calculateDeltaAndAngle$1(data[data.length-1],data[data.length-2]);offset=markerOffsets[edge.arrowTypeEnd]*Math.cos(angle)*(deltaX>=0?1:-1)}const differenceToEnd=Math.abs(pointTransformer(d2).x-pointTransformer(data[data.length-1]).x),differenceInYEnd=Math.abs(pointTransformer(d2).y-pointTransformer(data[data.length-1]).y),differenceToStart=Math.abs(pointTransformer(d2).x-pointTransformer(data[0]).x),differenceInYStart=Math.abs(pointTransformer(d2).y-pointTransformer(data[0]).y),startMarkerHeight=markerOffsets[edge.arrowTypeStart],endMarkerHeight=markerOffsets[edge.arrowTypeEnd],extraRoom=1;if(differenceToEnd<endMarkerHeight&&differenceToEnd>0&&differenceInYEnd<endMarkerHeight){let adjustment=endMarkerHeight+extraRoom-differenceToEnd;adjustment*=DIRECTION==="right"?-1:1,offset-=adjustment}if(differenceToStart<startMarkerHeight&&differenceToStart>0&&differenceInYStart<startMarkerHeight){let adjustment=startMarkerHeight+extraRoom-differenceToStart;adjustment*=DIRECTION==="right"?-1:1,offset+=adjustment}return pointTransformer(d2).x+offset},"x"),y:__name(function(d2,i2,data){let offset=0;const DIRECTION=pointTransformer(data[0]).y<pointTransformer(data[data.length-1]).y?"down":"up";if(i2===0&&Object.hasOwn(markerOffsets,edge.arrowTypeStart)){const{angle,deltaY}=calculateDeltaAndAngle$1(data[0],data[1]);offset=markerOffsets[edge.arrowTypeStart]*Math.abs(Math.sin(angle))*(deltaY>=0?1:-1)}else if(i2===data.length-1&&Object.hasOwn(markerOffsets,edge.arrowTypeEnd)){const{angle,deltaY}=calculateDeltaAndAngle$1(data[data.length-1],data[data.length-2]);offset=markerOffsets[edge.arrowTypeEnd]*Math.abs(Math.sin(angle))*(deltaY>=0?1:-1)}const differenceToEnd=Math.abs(pointTransformer(d2).y-pointTransformer(data[data.length-1]).y),differenceInXEnd=Math.abs(pointTransformer(d2).x-pointTransformer(data[data.length-1]).x),differenceToStart=Math.abs(pointTransformer(d2).y-pointTransformer(data[0]).y),differenceInXStart=Math.abs(pointTransformer(d2).x-pointTransformer(data[0]).x),startMarkerHeight=markerOffsets[edge.arrowTypeStart],endMarkerHeight=markerOffsets[edge.arrowTypeEnd],extraRoom=1;if(differenceToEnd<endMarkerHeight&&differenceToEnd>0&&differenceInXEnd<endMarkerHeight){let adjustment=endMarkerHeight+extraRoom-differenceToEnd;adjustment*=DIRECTION==="up"?-1:1,offset-=adjustment}if(differenceToStart<startMarkerHeight&&differenceToStart>0&&differenceInXStart<startMarkerHeight){let adjustment=startMarkerHeight+extraRoom-differenceToStart;adjustment*=DIRECTION==="up"?-1:1,offset+=adjustment}return pointTransformer(d2).y+offset},"y")}),"getLineFunctionsWithOffset"),dist={},constants={},hasRequiredConstants;function requireConstants(){return hasRequiredConstants||(hasRequiredConstants=1,Object.defineProperty(constants,"__esModule",{value:!0}),constants.BLANK_URL=constants.relativeFirstCharacters=constants.whitespaceEscapeCharsRegex=constants.urlSchemeRegex=constants.ctrlCharactersRegex=constants.htmlCtrlEntityRegex=constants.htmlEntitiesRegex=constants.invalidProtocolRegex=void 0,constants.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,constants.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,constants.htmlCtrlEntityRegex=/&(newline|tab);/gi,constants.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,constants.urlSchemeRegex=/^.+(:|&colon;)/gim,constants.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,constants.relativeFirstCharacters=[".","/"],constants.BLANK_URL="about:blank"),constants}var hasRequiredDist;function requireDist(){if(hasRequiredDist)return dist;hasRequiredDist=1,Object.defineProperty(dist,"__esModule",{value:!0}),dist.sanitizeUrl=sanitizeUrl;var constants_1=requireConstants();function isRelativeUrlWithoutProtocol(url){return constants_1.relativeFirstCharacters.indexOf(url[0])>-1}function decodeHtmlCharacters(str2){var removedNullByte=str2.replace(constants_1.ctrlCharactersRegex,"");return removedNullByte.replace(constants_1.htmlEntitiesRegex,function(match,dec){return String.fromCharCode(dec)})}function isValidUrl(url){return URL.canParse(url)}function decodeURI(uri){try{return decodeURIComponent(uri)}catch{return uri}}function sanitizeUrl(url){if(!url)return constants_1.BLANK_URL;var charsToDecode,decodedUrl=decodeURI(url.trim());do decodedUrl=decodeHtmlCharacters(decodedUrl).replace(constants_1.htmlCtrlEntityRegex,"").replace(constants_1.ctrlCharactersRegex,"").replace(constants_1.whitespaceEscapeCharsRegex,"").trim(),decodedUrl=decodeURI(decodedUrl),charsToDecode=decodedUrl.match(constants_1.ctrlCharactersRegex)||decodedUrl.match(constants_1.htmlEntitiesRegex)||decodedUrl.match(constants_1.htmlCtrlEntityRegex)||decodedUrl.match(constants_1.whitespaceEscapeCharsRegex);while(charsToDecode&&charsToDecode.length>0);var sanitizedUrl=decodedUrl;if(!sanitizedUrl)return constants_1.BLANK_URL;if(isRelativeUrlWithoutProtocol(sanitizedUrl))return sanitizedUrl;var trimmedUrl=sanitizedUrl.trimStart(),urlSchemeParseResults=trimmedUrl.match(constants_1.urlSchemeRegex);if(!urlSchemeParseResults)return sanitizedUrl;var urlScheme=urlSchemeParseResults[0].toLowerCase().trim();if(constants_1.invalidProtocolRegex.test(urlScheme))return constants_1.BLANK_URL;var backSanitized=trimmedUrl.replace(/\\/g,"/");if(urlScheme==="mailto:"||urlScheme.includes("://"))return backSanitized;if(urlScheme==="http:"||urlScheme==="https:"){if(!isValidUrl(backSanitized))return constants_1.BLANK_URL;var url_1=new URL(backSanitized);return url_1.protocol=url_1.protocol.toLowerCase(),url_1.hostname=url_1.hostname.toLowerCase(),url_1.toString()}return backSanitized}return dist}var distExports=requireDist(),freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global,freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),Symbol$1=root.Symbol,objectProto$c=Object.prototype,hasOwnProperty$a=objectProto$c.hasOwnProperty,nativeObjectToString$1=objectProto$c.toString,symToStringTag$1=Symbol$1?Symbol$1.toStringTag:void 0;function getRawTag(value){var isOwn=hasOwnProperty$a.call(value,symToStringTag$1),tag=value[symToStringTag$1];try{value[symToStringTag$1]=void 0;var unmasked=!0}catch{}var result=nativeObjectToString$1.call(value);return unmasked&&(isOwn?value[symToStringTag$1]=tag:delete value[symToStringTag$1]),result}var objectProto$b=Object.prototype,nativeObjectToString=objectProto$b.toString;function objectToString(value){return nativeObjectToString.call(value)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0;function baseGetTag(value){return value==null?value===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(value)?getRawTag(value):objectToString(value)}function isObject(value){var type2=typeof value;return value!=null&&(type2=="object"||type2=="function")}var asyncTag="[object AsyncFunction]",funcTag$1="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(value){if(!isObject(value))return!1;var tag=baseGetTag(value);return tag==funcTag$1||tag==genTag||tag==asyncTag||tag==proxyTag}var coreJsData=root["__core-js_shared__"],maskSrcKey=(function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return uid?"Symbol(src)_1."+uid:""})();function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}var funcProto$2=Function.prototype,funcToString$2=funcProto$2.toString;function toSource(func){if(func!=null){try{return funcToString$2.call(func)}catch{}try{return func+""}catch{}}return""}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto$1=Function.prototype,objectProto$a=Object.prototype,funcToString$1=funcProto$1.toString,hasOwnProperty$9=objectProto$a.hasOwnProperty,reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$9).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(value){if(!isObject(value)||isMasked(value))return!1;var pattern=isFunction(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value))}function getValue(object,key){return object==null?void 0:object[key]}function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:void 0}var nativeCreate=getNative(Object,"create");function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0}function hashDelete(key){var result=this.has(key)&&delete this.__data__[key];return this.size-=result?1:0,result}var HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$9=Object.prototype,hasOwnProperty$8=objectProto$9.hasOwnProperty;function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED$1?void 0:result}return hasOwnProperty$8.call(data,key)?data[key]:void 0}var objectProto$8=Object.prototype,hasOwnProperty$7=objectProto$8.hasOwnProperty;function hashHas(key){var data=this.__data__;return nativeCreate?data[key]!==void 0:hasOwnProperty$7.call(data,key)}var HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet(key,value){var data=this.__data__;return this.size+=this.has(key)?0:1,data[key]=nativeCreate&&value===void 0?HASH_UNDEFINED:value,this}function Hash(entries){var index=-1,length=entries==null?0:entries.length;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}Hash.prototype.clear=hashClear;Hash.prototype.delete=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;function listCacheClear(){this.__data__=[],this.size=0}function eq(value,other){return value===other||value!==value&&other!==other}function assocIndexOf(array2,key){for(var length=array2.length;length--;)if(eq(array2[length][0],key))return length;return-1}var arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);if(index<0)return!1;var lastIndex=data.length-1;return index==lastIndex?data.pop():splice.call(data,index,1),--this.size,!0}function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?void 0:data[index][1]}function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1}function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);return index<0?(++this.size,data.push([key,value])):data[index][1]=value,this}function ListCache(entries){var index=-1,length=entries==null?0:entries.length;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}ListCache.prototype.clear=listCacheClear;ListCache.prototype.delete=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;var Map$1=getNative(root,"Map");function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map$1||ListCache),string:new Hash}}function isKeyable(value){var type2=typeof value;return type2=="string"||type2=="number"||type2=="symbol"||type2=="boolean"?value!=="__proto__":value===null}function getMapData(map2,key){var data=map2.__data__;return isKeyable(key)?data[typeof key=="string"?"string":"hash"]:data.map}function mapCacheDelete(key){var result=getMapData(this,key).delete(key);return this.size-=result?1:0,result}function mapCacheGet(key){return getMapData(this,key).get(key)}function mapCacheHas(key){return getMapData(this,key).has(key)}function mapCacheSet(key,value){var data=getMapData(this,key),size=data.size;return data.set(key,value),this.size+=data.size==size?0:1,this}function MapCache(entries){var index=-1,length=entries==null?0:entries.length;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}MapCache.prototype.clear=mapCacheClear;MapCache.prototype.delete=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;var FUNC_ERROR_TEXT="Expected a function";function memoize(func,resolver){if(typeof func!="function"||resolver!=null&&typeof resolver!="function")throw new TypeError(FUNC_ERROR_TEXT);var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key))return cache.get(key);var result=func.apply(this,args);return memoized.cache=cache.set(key,result)||cache,result};return memoized.cache=new(memoize.Cache||MapCache),memoized}memoize.Cache=MapCache;function stackClear(){this.__data__=new ListCache,this.size=0}function stackDelete(key){var data=this.__data__,result=data.delete(key);return this.size=data.size,result}function stackGet(key){return this.__data__.get(key)}function stackHas(key){return this.__data__.has(key)}var LARGE_ARRAY_SIZE=200;function stackSet(key,value){var data=this.__data__;if(data instanceof ListCache){var pairs2=data.__data__;if(!Map$1||pairs2.length<LARGE_ARRAY_SIZE-1)return pairs2.push([key,value]),this.size=++data.size,this;data=this.__data__=new MapCache(pairs2)}return data.set(key,value),this.size=data.size,this}function Stack(entries){var data=this.__data__=new ListCache(entries);this.size=data.size}Stack.prototype.clear=stackClear;Stack.prototype.delete=stackDelete;Stack.prototype.get=stackGet;Stack.prototype.has=stackHas;Stack.prototype.set=stackSet;var defineProperty=(function(){try{var func=getNative(Object,"defineProperty");return func({},"",{}),func}catch{}})();function baseAssignValue(object,key,value){key=="__proto__"&&defineProperty?defineProperty(object,key,{configurable:!0,enumerable:!0,value,writable:!0}):object[key]=value}function assignMergeValue(object,key,value){(value!==void 0&&!eq(object[key],value)||value===void 0&&!(key in object))&&baseAssignValue(object,key,value)}function createBaseFor(fromRight){return function(object,iteratee,keysFunc){for(var index=-1,iterable=Object(object),props=keysFunc(object),length=props.length;length--;){var key=props[++index];if(iteratee(iterable[key],key,iterable)===!1)break}return object}}var baseFor=createBaseFor(),freeExports$2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$2=freeExports$2&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$2=freeModule$2&&freeModule$2.exports===freeExports$2,Buffer$1=moduleExports$2?root.Buffer:void 0,allocUnsafe=Buffer$1?Buffer$1.allocUnsafe:void 0;function cloneBuffer(buffer,isDeep){if(isDeep)return buffer.slice();var length=buffer.length,result=allocUnsafe?allocUnsafe(length):new buffer.constructor(length);return buffer.copy(result),result}var Uint8Array$1=root.Uint8Array;function cloneArrayBuffer(arrayBuffer){var result=new arrayBuffer.constructor(arrayBuffer.byteLength);return new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer)),result}function cloneTypedArray(typedArray,isDeep){var buffer=isDeep?cloneArrayBuffer(typedArray.buffer):typedArray.buffer;return new typedArray.constructor(buffer,typedArray.byteOffset,typedArray.length)}function copyArray(source,array2){var index=-1,length=source.length;for(array2||(array2=Array(length));++index<length;)array2[index]=source[index];return array2}var objectCreate=Object.create,baseCreate=(function(){function object(){}return function(proto){if(!isObject(proto))return{};if(objectCreate)return objectCreate(proto);object.prototype=proto;var result=new object;return object.prototype=void 0,result}})();function overArg(func,transform){return function(arg){return func(transform(arg))}}var getPrototype=overArg(Object.getPrototypeOf,Object),objectProto$7=Object.prototype;function isPrototype(value){var Ctor=value&&value.constructor,proto=typeof Ctor=="function"&&Ctor.prototype||objectProto$7;return value===proto}function initCloneObject(object){return typeof object.constructor=="function"&&!isPrototype(object)?baseCreate(getPrototype(object)):{}}function isObjectLike(value){return value!=null&&typeof value=="object"}var argsTag$1="[object Arguments]";function baseIsArguments(value){return isObjectLike(value)&&baseGetTag(value)==argsTag$1}var objectProto$6=Object.prototype,hasOwnProperty$6=objectProto$6.hasOwnProperty,propertyIsEnumerable=objectProto$6.propertyIsEnumerable,isArguments=baseIsArguments((function(){return arguments})())?baseIsArguments:function(value){return isObjectLike(value)&&hasOwnProperty$6.call(value,"callee")&&!propertyIsEnumerable.call(value,"callee")},isArray=Array.isArray,MAX_SAFE_INTEGER$1=9007199254740991;function isLength(value){return typeof value=="number"&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER$1}function isArrayLike(value){return value!=null&&isLength(value.length)&&!isFunction(value)}function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value)}function stubFalse(){return!1}var freeExports$1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$1=freeExports$1&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$1=freeModule$1&&freeModule$1.exports===freeExports$1,Buffer2=moduleExports$1?root.Buffer:void 0,nativeIsBuffer=Buffer2?Buffer2.isBuffer:void 0,isBuffer=nativeIsBuffer||stubFalse,objectTag$2="[object Object]",funcProto=Function.prototype,objectProto$5=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$5=objectProto$5.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject(value){if(!isObjectLike(value)||baseGetTag(value)!=objectTag$2)return!1;var proto=getPrototype(value);if(proto===null)return!0;var Ctor=hasOwnProperty$5.call(proto,"constructor")&&proto.constructor;return typeof Ctor=="function"&&Ctor instanceof Ctor&&funcToString.call(Ctor)==objectCtorString}var argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag$2="[object Map]",numberTag="[object Number]",objectTag$1="[object Object]",regexpTag="[object RegExp]",setTag$2="[object Set]",stringTag="[object String]",weakMapTag$1="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0;typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag$1]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag$2]=typedArrayTags[numberTag]=typedArrayTags[objectTag$1]=typedArrayTags[regexpTag]=typedArrayTags[setTag$2]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag$1]=!1;function baseIsTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[baseGetTag(value)]}function baseUnary(func){return function(value){return func(value)}}var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,freeProcess=moduleExports&&freeGlobal.process,nodeUtil=(function(){try{var types=freeModule&&freeModule.require&&freeModule.require("util").types;return types||freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch{}})(),nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;function safeGet(object,key){if(!(key==="constructor"&&typeof object[key]=="function")&&key!="__proto__")return object[key]}var objectProto$4=Object.prototype,hasOwnProperty$4=objectProto$4.hasOwnProperty;function assignValue(object,key,value){var objValue=object[key];(!(hasOwnProperty$4.call(object,key)&&eq(objValue,value))||value===void 0&&!(key in object))&&baseAssignValue(object,key,value)}function copyObject(source,props,object,customizer){var isNew=!object;object||(object={});for(var index=-1,length=props.length;++index<length;){var key=props[index],newValue=void 0;newValue===void 0&&(newValue=source[key]),isNew?baseAssignValue(object,key,newValue):assignValue(object,key,newValue)}return object}function baseTimes(n2,iteratee){for(var index=-1,result=Array(n2);++index<n2;)result[index]=iteratee(index);return result}var MAX_SAFE_INTEGER=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(value,length){var type2=typeof value;return length=length??MAX_SAFE_INTEGER,!!length&&(type2=="number"||type2!="symbol"&&reIsUint.test(value))&&value>-1&&value%1==0&&value<length}var objectProto$3=Object.prototype,hasOwnProperty$3=objectProto$3.hasOwnProperty;function arrayLikeKeys(value,inherited){var isArr=isArray(value),isArg=!isArr&&isArguments(value),isBuff=!isArr&&!isArg&&isBuffer(value),isType=!isArr&&!isArg&&!isBuff&&isTypedArray(value),skipIndexes=isArr||isArg||isBuff||isType,result=skipIndexes?baseTimes(value.length,String):[],length=result.length;for(var key in value)(inherited||hasOwnProperty$3.call(value,key))&&!(skipIndexes&&(key=="length"||isBuff&&(key=="offset"||key=="parent")||isType&&(key=="buffer"||key=="byteLength"||key=="byteOffset")||isIndex(key,length)))&&result.push(key);return result}function nativeKeysIn(object){var result=[];if(object!=null)for(var key in Object(object))result.push(key);return result}var objectProto$2=Object.prototype,hasOwnProperty$2=objectProto$2.hasOwnProperty;function baseKeysIn(object){if(!isObject(object))return nativeKeysIn(object);var isProto=isPrototype(object),result=[];for(var key in object)key=="constructor"&&(isProto||!hasOwnProperty$2.call(object,key))||result.push(key);return result}function keysIn(object){return isArrayLike(object)?arrayLikeKeys(object,!0):baseKeysIn(object)}function toPlainObject(value){return copyObject(value,keysIn(value))}function baseMergeDeep(object,source,key,srcIndex,mergeFunc,customizer,stack){var objValue=safeGet(object,key),srcValue=safeGet(source,key),stacked=stack.get(srcValue);if(stacked){assignMergeValue(object,key,stacked);return}var newValue=customizer?customizer(objValue,srcValue,key+"",object,source,stack):void 0,isCommon=newValue===void 0;if(isCommon){var isArr=isArray(srcValue),isBuff=!isArr&&isBuffer(srcValue),isTyped=!isArr&&!isBuff&&isTypedArray(srcValue);newValue=srcValue,isArr||isBuff||isTyped?isArray(objValue)?newValue=objValue:isArrayLikeObject(objValue)?newValue=copyArray(objValue):isBuff?(isCommon=!1,newValue=cloneBuffer(srcValue,!0)):isTyped?(isCommon=!1,newValue=cloneTypedArray(srcValue,!0)):newValue=[]:isPlainObject(srcValue)||isArguments(srcValue)?(newValue=objValue,isArguments(objValue)?newValue=toPlainObject(objValue):(!isObject(objValue)||isFunction(objValue))&&(newValue=initCloneObject(srcValue))):isCommon=!1}isCommon&&(stack.set(srcValue,newValue),mergeFunc(newValue,srcValue,srcIndex,customizer,stack),stack.delete(srcValue)),assignMergeValue(object,key,newValue)}function baseMerge(object,source,srcIndex,customizer,stack){object!==source&&baseFor(source,function(srcValue,key){if(stack||(stack=new Stack),isObject(srcValue))baseMergeDeep(object,source,key,srcIndex,baseMerge,customizer,stack);else{var newValue=customizer?customizer(safeGet(object,key),srcValue,key+"",object,source,stack):void 0;newValue===void 0&&(newValue=srcValue),assignMergeValue(object,key,newValue)}},keysIn)}function identity(value){return value}function apply(func,thisArg,args){switch(args.length){case 0:return func.call(thisArg);case 1:return func.call(thisArg,args[0]);case 2:return func.call(thisArg,args[0],args[1]);case 3:return func.call(thisArg,args[0],args[1],args[2])}return func.apply(thisArg,args)}var nativeMax=Math.max;function overRest(func,start2,transform){return start2=nativeMax(start2===void 0?func.length-1:start2,0),function(){for(var args=arguments,index=-1,length=nativeMax(args.length-start2,0),array2=Array(length);++index<length;)array2[index]=args[start2+index];index=-1;for(var otherArgs=Array(start2+1);++index<start2;)otherArgs[index]=args[index];return otherArgs[start2]=transform(array2),apply(func,this,otherArgs)}}function constant(value){return function(){return value}}var baseSetToString=defineProperty?function(func,string){return defineProperty(func,"toString",{configurable:!0,enumerable:!1,value:constant(string),writable:!0})}:identity,HOT_COUNT=800,HOT_SPAN=16,nativeNow=Date.now;function shortOut(func){var count=0,lastCalled=0;return function(){var stamp=nativeNow(),remaining=HOT_SPAN-(stamp-lastCalled);if(lastCalled=stamp,remaining>0){if(++count>=HOT_COUNT)return arguments[0]}else count=0;return func.apply(void 0,arguments)}}var setToString=shortOut(baseSetToString);function baseRest(func,start2){return setToString(overRest(func,start2,identity),func+"")}function isIterateeCall(value,index,object){if(!isObject(object))return!1;var type2=typeof index;return(type2=="number"?isArrayLike(object)&&isIndex(index,object.length):type2=="string"&&index in object)?eq(object[index],value):!1}function createAssigner(assigner){return baseRest(function(object,sources){var index=-1,length=sources.length,customizer=length>1?sources[length-1]:void 0,guard=length>2?sources[2]:void 0;for(customizer=assigner.length>3&&typeof customizer=="function"?(length--,customizer):void 0,guard&&isIterateeCall(sources[0],sources[1],guard)&&(customizer=length<3?void 0:customizer,length=1),object=Object(object);++index<length;){var source=sources[index];source&&assigner(object,source,index,customizer)}return object})}var merge=createAssigner(function(object,source,srcIndex){baseMerge(object,source,srcIndex)}),ZERO_WIDTH_SPACE="​",d3CurveTypes={curveBasis,curveBasisClosed,curveBasisOpen,curveBumpX:bumpX,curveBumpY:bumpY,curveBundle,curveCardinalClosed,curveCardinalOpen,curveCardinal,curveCatmullRomClosed,curveCatmullRomOpen,curveCatmullRom,curveLinear,curveLinearClosed,curveMonotoneX:monotoneX,curveMonotoneY:monotoneY,curveNatural,curveStep,curveStepAfter:stepAfter,curveStepBefore:stepBefore},directiveWithoutOpen=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,detectInit=__name(function(text2,config2){const inits=detectDirective(text2,/(?:init\b)|(?:initialize\b)/);let results={};if(Array.isArray(inits)){const args=inits.map(init2=>init2.args);sanitizeDirective(args),results=assignWithDepth_default(results,[...args])}else results=inits.args;if(!results)return;let type2=detectType$1(text2,config2);const prop="config";return results[prop]!==void 0&&(type2==="flowchart-v2"&&(type2="flowchart"),results[type2]=results[prop],delete results[prop]),results},"detectInit"),detectDirective=__name(function(text2,type2=null){var _a17,_b;try{const commentWithoutDirectives=new RegExp(`[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).*
158
+ `,"ig");text2=text2.trim().replace(commentWithoutDirectives,"").replace(/'/gm,'"'),log.debug(`Detecting diagram directive${type2!==null?" type:"+type2:""} based on the text:${text2}`);let match;const result=[];for(;(match=directiveRegex.exec(text2))!==null;)if(match.index===directiveRegex.lastIndex&&directiveRegex.lastIndex++,match&&!type2||type2&&((_a17=match[1])!=null&&_a17.match(type2))||type2&&((_b=match[2])!=null&&_b.match(type2))){const type22=match[1]?match[1]:match[2],args=match[3]?match[3].trim():match[4]?JSON.parse(match[4].trim()):null;result.push({type:type22,args})}return result.length===0?{type:text2,args:null}:result.length===1?result[0]:result}catch(error){return log.error(`ERROR: ${error.message} - Unable to parse directive type: '${type2}' based on the text: '${text2}'`),{type:void 0,args:null}}},"detectDirective"),removeDirectives=__name(function(text2){return text2.replace(directiveRegex,"")},"removeDirectives"),isSubstringInArray=__name(function(str2,arr){for(const[i2,element]of arr.entries())if(element.match(str2))return i2;return-1},"isSubstringInArray");function interpolateToCurve(interpolate2,defaultCurve){if(!interpolate2)return defaultCurve;const curveName=`curve${interpolate2.charAt(0).toUpperCase()+interpolate2.slice(1)}`;return d3CurveTypes[curveName]??defaultCurve}__name(interpolateToCurve,"interpolateToCurve");function formatUrl(linkStr,config2){const url=linkStr.trim();if(url)return config2.securityLevel!=="loose"?distExports.sanitizeUrl(url):url}__name(formatUrl,"formatUrl");var runFunc=__name((functionName,...params)=>{const arrPaths=functionName.split("."),len=arrPaths.length-1,fnName=arrPaths[len];let obj=window;for(let i2=0;i2<len;i2++)if(obj=obj[arrPaths[i2]],!obj){log.error(`Function name: ${functionName} not found in window`);return}obj[fnName](...params)},"runFunc");function distance(p1,p2){return!p1||!p2?0:Math.sqrt(Math.pow(p2.x-p1.x,2)+Math.pow(p2.y-p1.y,2))}__name(distance,"distance");function traverseEdge(points){let prevPoint,totalDistance=0;points.forEach(point2=>{totalDistance+=distance(point2,prevPoint),prevPoint=point2});const remainingDistance=totalDistance/2;return calculatePoint(points,remainingDistance)}__name(traverseEdge,"traverseEdge");function calcLabelPosition(points){return points.length===1?points[0]:traverseEdge(points)}__name(calcLabelPosition,"calcLabelPosition");var roundNumber=__name((num,precision=2)=>{const factor=Math.pow(10,precision);return Math.round(num*factor)/factor},"roundNumber"),calculatePoint=__name((points,distanceToTraverse)=>{let prevPoint,remainingDistance=distanceToTraverse;for(const point2 of points){if(prevPoint){const vectorDistance=distance(point2,prevPoint);if(vectorDistance===0)return prevPoint;if(vectorDistance<remainingDistance)remainingDistance-=vectorDistance;else{const distanceRatio=remainingDistance/vectorDistance;if(distanceRatio<=0)return prevPoint;if(distanceRatio>=1)return{x:point2.x,y:point2.y};if(distanceRatio>0&&distanceRatio<1)return{x:roundNumber((1-distanceRatio)*prevPoint.x+distanceRatio*point2.x,5),y:roundNumber((1-distanceRatio)*prevPoint.y+distanceRatio*point2.y,5)}}}prevPoint=point2}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),calcCardinalityPosition=__name((isRelationTypePresent,points,initialPosition)=>{log.info(`our points ${JSON.stringify(points)}`),points[0]!==initialPosition&&(points=points.reverse());const center=calculatePoint(points,25),d2=isRelationTypePresent?10:5,angle=Math.atan2(points[0].y-center.y,points[0].x-center.x),cardinalityPosition={x:0,y:0};return cardinalityPosition.x=Math.sin(angle)*d2+(points[0].x+center.x)/2,cardinalityPosition.y=-Math.cos(angle)*d2+(points[0].y+center.y)/2,cardinalityPosition},"calcCardinalityPosition");function calcTerminalLabelPosition(terminalMarkerSize,position,_points){const points=structuredClone(_points);log.info("our points",points),position!=="start_left"&&position!=="start_right"&&points.reverse();const distanceToCardinalityPoint=25+terminalMarkerSize,center=calculatePoint(points,distanceToCardinalityPoint),d2=10+terminalMarkerSize*.5,angle=Math.atan2(points[0].y-center.y,points[0].x-center.x),cardinalityPosition={x:0,y:0};return position==="start_left"?(cardinalityPosition.x=Math.sin(angle+Math.PI)*d2+(points[0].x+center.x)/2,cardinalityPosition.y=-Math.cos(angle+Math.PI)*d2+(points[0].y+center.y)/2):position==="end_right"?(cardinalityPosition.x=Math.sin(angle-Math.PI)*d2+(points[0].x+center.x)/2-5,cardinalityPosition.y=-Math.cos(angle-Math.PI)*d2+(points[0].y+center.y)/2-5):position==="end_left"?(cardinalityPosition.x=Math.sin(angle)*d2+(points[0].x+center.x)/2-5,cardinalityPosition.y=-Math.cos(angle)*d2+(points[0].y+center.y)/2-5):(cardinalityPosition.x=Math.sin(angle)*d2+(points[0].x+center.x)/2,cardinalityPosition.y=-Math.cos(angle)*d2+(points[0].y+center.y)/2),cardinalityPosition}__name(calcTerminalLabelPosition,"calcTerminalLabelPosition");function getStylesFromArray(arr){let style="",labelStyle="";for(const element of arr)element!==void 0&&(element.startsWith("color:")||element.startsWith("text-align:")?labelStyle=labelStyle+element+";":style=style+element+";");return{style,labelStyle}}__name(getStylesFromArray,"getStylesFromArray");var cnt=0,generateId=__name(()=>(cnt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+cnt),"generateId");function makeRandomHex(length){let result="";const characters="0123456789abcdef",charactersLength=characters.length;for(let i2=0;i2<length;i2++)result+=characters.charAt(Math.floor(Math.random()*charactersLength));return result}__name(makeRandomHex,"makeRandomHex");var random=__name(options=>makeRandomHex(options.length),"random"),getTextObj=__name(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"),drawSimpleText=__name(function(elem,textData){const nText=textData.text.replace(common_default.lineBreakRegex," "),[,_fontSizePx]=parseFontSize(textData.fontSize),textElem=elem.append("text");textElem.attr("x",textData.x),textElem.attr("y",textData.y),textElem.style("text-anchor",textData.anchor),textElem.style("font-family",textData.fontFamily),textElem.style("font-size",_fontSizePx),textElem.style("font-weight",textData.fontWeight),textElem.attr("fill",textData.fill),textData.class!==void 0&&textElem.attr("class",textData.class);const span=textElem.append("tspan");return span.attr("x",textData.x+textData.textMargin*2),span.attr("fill",textData.fill),span.text(nText),textElem},"drawSimpleText"),wrapLabel=memoize((label,maxWidth,config2)=>{if(!label||(config2=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},config2),common_default.lineBreakRegex.test(label)))return label;const words=label.split(" ").filter(Boolean),completedLines=[];let nextLine="";return words.forEach((word,index)=>{const wordLength=calculateTextWidth(`${word} `,config2),nextLineLength=calculateTextWidth(nextLine,config2);if(wordLength>maxWidth){const{hyphenatedStrings,remainingWord}=breakString(word,maxWidth,"-",config2);completedLines.push(nextLine,...hyphenatedStrings),nextLine=remainingWord}else nextLineLength+wordLength>=maxWidth?(completedLines.push(nextLine),nextLine=word):nextLine=[nextLine,word].filter(Boolean).join(" ");index+1===words.length&&completedLines.push(nextLine)}),completedLines.filter(line2=>line2!=="").join(config2.joinWith)},(label,maxWidth,config2)=>`${label}${maxWidth}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}${config2.joinWith}`),breakString=memoize((word,maxWidth,hyphenCharacter="-",config2)=>{config2=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},config2);const characters=[...word],lines=[];let currentLine="";return characters.forEach((character,index)=>{const nextLine=`${currentLine}${character}`;if(calculateTextWidth(nextLine,config2)>=maxWidth){const currentCharacter=index+1,isLastLine=characters.length===currentCharacter,hyphenatedNextLine=`${nextLine}${hyphenCharacter}`;lines.push(isLastLine?nextLine:hyphenatedNextLine),currentLine=""}else currentLine=nextLine}),{hyphenatedStrings:lines,remainingWord:currentLine}},(word,maxWidth,hyphenCharacter="-",config2)=>`${word}${maxWidth}${hyphenCharacter}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}`);function calculateTextHeight(text2,config2){return calculateTextDimensions(text2,config2).height}__name(calculateTextHeight,"calculateTextHeight");function calculateTextWidth(text2,config2){return calculateTextDimensions(text2,config2).width}__name(calculateTextWidth,"calculateTextWidth");var calculateTextDimensions=memoize((text2,config2)=>{const{fontSize=12,fontFamily="Arial",fontWeight=400}=config2;if(!text2)return{width:0,height:0};const[,_fontSizePx]=parseFontSize(fontSize),fontFamilies=["sans-serif",fontFamily],lines=text2.split(common_default.lineBreakRegex),dims=[],body=select("body");if(!body.remove)return{width:0,height:0,lineHeight:0};const g2=body.append("svg");for(const fontFamily2 of fontFamilies){let cHeight=0;const dim={width:0,height:0,lineHeight:0};for(const line2 of lines){const textObj=getTextObj();textObj.text=line2||ZERO_WIDTH_SPACE;const textElem=drawSimpleText(g2,textObj).style("font-size",_fontSizePx).style("font-weight",fontWeight).style("font-family",fontFamily2),bBox=(textElem._groups||textElem)[0][0].getBBox();if(bBox.width===0&&bBox.height===0)throw new Error("svg element not in render tree");dim.width=Math.round(Math.max(dim.width,bBox.width)),cHeight=Math.round(bBox.height),dim.height+=cHeight,dim.lineHeight=Math.round(Math.max(dim.lineHeight,cHeight))}dims.push(dim)}g2.remove();const index=isNaN(dims[1].height)||isNaN(dims[1].width)||isNaN(dims[1].lineHeight)||dims[0].height>dims[1].height&&dims[0].width>dims[1].width&&dims[0].lineHeight>dims[1].lineHeight?0:1;return dims[index]},(text2,config2)=>`${text2}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}`),_a14,InitIDGenerator=(_a14=class{constructor(deterministic=!1,seed){this.count=0,this.count=seed?seed.length:0,this.next=deterministic?()=>this.count++:()=>Date.now()}},__name(_a14,"InitIDGenerator"),_a14),decoder,entityDecode=__name(function(html){return decoder=decoder||document.createElement("div"),html=escape(html).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),decoder.innerHTML=html,unescape(decoder.textContent)},"entityDecode");function isDetailedError(error){return"str"in error}__name(isDetailedError,"isDetailedError");var insertTitle=__name((parent,cssClass,titleTopMargin,title)=>{var _a17;if(!title)return;const bounds=(_a17=parent.node())==null?void 0:_a17.getBBox();bounds&&parent.append("text").text(title).attr("text-anchor","middle").attr("x",bounds.x+bounds.width/2).attr("y",-titleTopMargin).attr("class",cssClass)},"insertTitle"),parseFontSize=__name(fontSize=>{if(typeof fontSize=="number")return[fontSize,fontSize+"px"];const fontSizeNumber=parseInt(fontSize??"",10);return Number.isNaN(fontSizeNumber)?[void 0,void 0]:fontSize===String(fontSizeNumber)?[fontSizeNumber,fontSize+"px"]:[fontSizeNumber,fontSize]},"parseFontSize");function cleanAndMerge(defaultData,data){return merge({},defaultData,data)}__name(cleanAndMerge,"cleanAndMerge");var utils_default={assignWithDepth:assignWithDepth_default,wrapLabel,calculateTextHeight,calculateTextWidth,calculateTextDimensions,cleanAndMerge,detectInit,detectDirective,isSubstringInArray,interpolateToCurve,calcLabelPosition,calcCardinalityPosition,calcTerminalLabelPosition,formatUrl,getStylesFromArray,generateId,random,runFunc,entityDecode,insertTitle,isLabelCoordinateInPath,parseFontSize,InitIDGenerator},encodeEntities=__name(function(text2){let txt=text2;return txt=txt.replace(/style.*:\S*#.*;/g,function(s2){return s2.substring(0,s2.length-1)}),txt=txt.replace(/classDef.*:\S*#.*;/g,function(s2){return s2.substring(0,s2.length-1)}),txt=txt.replace(/#\w+;/g,function(s2){const innerTxt=s2.substring(1,s2.length-1);return/^\+?\d+$/.test(innerTxt)?"fl°°"+innerTxt+"¶ß":"fl°"+innerTxt+"¶ß"}),txt},"encodeEntities"),decodeEntities=__name(function(text2){return text2.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),getEdgeId=__name((from,to,{counter=0,prefix,suffix},id32)=>id32||`${prefix?`${prefix}_`:""}${from}_${to}_${counter}${suffix?`_${suffix}`:""}`,"getEdgeId");function handleUndefinedAttr(attrValue){return attrValue??null}__name(handleUndefinedAttr,"handleUndefinedAttr");function isLabelCoordinateInPath(point2,dAttr){const roundedX=Math.round(point2.x),roundedY=Math.round(point2.y),sanitizedD=dAttr.replace(/(\d+\.\d+)/g,match=>Math.round(parseFloat(match)).toString());return sanitizedD.includes(roundedX.toString())||sanitizedD.includes(roundedY.toString())}__name(isLabelCoordinateInPath,"isLabelCoordinateInPath");var getSubGraphTitleMargins=__name(({flowchart})=>{var _a17,_b;const subGraphTitleTopMargin=((_a17=flowchart==null?void 0:flowchart.subGraphTitleMargin)==null?void 0:_a17.top)??0,subGraphTitleBottomMargin=((_b=flowchart==null?void 0:flowchart.subGraphTitleMargin)==null?void 0:_b.bottom)??0,subGraphTitleTotalMargin=subGraphTitleTopMargin+subGraphTitleBottomMargin;return{subGraphTitleTopMargin,subGraphTitleBottomMargin,subGraphTitleTotalMargin}},"getSubGraphTitleMargins");async function configureLabelImages(container,labelText){const images=container.getElementsByTagName("img");if(!images||images.length===0)return;const noImgText=labelText.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...images].map(img=>new Promise(res=>{function setupImage(){if(img.style.display="flex",img.style.flexDirection="column",noImgText){const bodyFontSize=getConfig2().fontSize?getConfig2().fontSize:window.getComputedStyle(document.body).fontSize,enlargingFactor=5,[parsedBodyFontSize=defaultConfig_default.fontSize]=parseFontSize(bodyFontSize),width=parsedBodyFontSize*enlargingFactor+"px";img.style.minWidth=width,img.style.maxWidth=width}else img.style.width="100%";res(img)}__name(setupImage,"setupImage"),setTimeout(()=>{img.complete&&setupImage()}),img.addEventListener("error",setupImage),img.addEventListener("load",setupImage)})))}__name(configureLabelImages,"configureLabelImages");var solidStateFill=__name(color2=>{const{handDrawnSeed}=getConfig2();return{fill:color2,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:color2,seed:handDrawnSeed}},"solidStateFill"),compileStyles=__name(node=>{const stylesMap=styles2Map([...node.cssCompiledStyles||[],...node.cssStyles||[],...node.labelStyle||[]]);return{stylesMap,stylesArray:[...stylesMap]}},"compileStyles"),styles2Map=__name(styles=>{const styleMap=new Map;return styles.forEach(style=>{const[key,value]=style.split(":");styleMap.set(key.trim(),value==null?void 0:value.trim())}),styleMap},"styles2Map"),isLabelStyle=__name(key=>key==="color"||key==="font-size"||key==="font-family"||key==="font-weight"||key==="font-style"||key==="text-decoration"||key==="text-align"||key==="text-transform"||key==="line-height"||key==="letter-spacing"||key==="word-spacing"||key==="text-shadow"||key==="text-overflow"||key==="white-space"||key==="word-wrap"||key==="word-break"||key==="overflow-wrap"||key==="hyphens","isLabelStyle"),styles2String=__name(node=>{const{stylesArray}=compileStyles(node),labelStyles=[],nodeStyles=[],borderStyles=[],backgroundStyles=[];return stylesArray.forEach(style=>{const key=style[0];isLabelStyle(key)?labelStyles.push(style.join(":")+" !important"):(nodeStyles.push(style.join(":")+" !important"),key.includes("stroke")&&borderStyles.push(style.join(":")+" !important"),key==="fill"&&backgroundStyles.push(style.join(":")+" !important"))}),{labelStyles:labelStyles.join(";"),nodeStyles:nodeStyles.join(";"),stylesArray,borderStyles,backgroundStyles}},"styles2String"),userNodeOverrides=__name((node,options)=>{var _a17;const{themeVariables,handDrawnSeed}=getConfig2(),{nodeBorder,mainBkg}=themeVariables,{stylesMap}=compileStyles(node);return Object.assign({roughness:.7,fill:stylesMap.get("fill")||mainBkg,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:stylesMap.get("stroke")||nodeBorder,seed:handDrawnSeed,strokeWidth:((_a17=stylesMap.get("stroke-width"))==null?void 0:_a17.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:getStrokeDashArray(stylesMap.get("stroke-dasharray"))},options)},"userNodeOverrides"),getStrokeDashArray=__name(strokeDasharrayStyle=>{if(!strokeDasharrayStyle)return[0,0];const dashArray=strokeDasharrayStyle.trim().split(/\s+/).map(Number);if(dashArray.length===1){const val=isNaN(dashArray[0])?0:dashArray[0];return[val,val]}const first=isNaN(dashArray[0])?0:dashArray[0],second=isNaN(dashArray[1])?0:dashArray[1];return[first,second]},"getStrokeDashArray");const defaultIconDimensions=Object.freeze({left:0,top:0,width:16,height:16}),defaultIconTransformations=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),defaultIconProps=Object.freeze({...defaultIconDimensions,...defaultIconTransformations}),defaultExtendedIconProps=Object.freeze({...defaultIconProps,body:"",hidden:!1}),defaultIconSizeCustomisations=Object.freeze({width:null,height:null}),defaultIconCustomisations=Object.freeze({...defaultIconSizeCustomisations,...defaultIconTransformations}),stringToIcon=(value,validate,allowSimpleName,provider="")=>{const colonSeparated=value.split(":");if(value.slice(0,1)==="@"){if(colonSeparated.length<2||colonSeparated.length>3)return null;provider=colonSeparated.shift().slice(1)}if(colonSeparated.length>3||!colonSeparated.length)return null;if(colonSeparated.length>1){const name$1=colonSeparated.pop(),prefix=colonSeparated.pop(),result={provider:colonSeparated.length>0?colonSeparated[0]:provider,prefix,name:name$1};return validateIconName(result)?result:null}const name=colonSeparated[0],dashSeparated=name.split("-");if(dashSeparated.length>1){const result={provider,prefix:dashSeparated.shift(),name:dashSeparated.join("-")};return validateIconName(result)?result:null}if(allowSimpleName&&provider===""){const result={provider,prefix:"",name};return validateIconName(result,allowSimpleName)?result:null}return null},validateIconName=(icon2,allowSimpleName)=>icon2?!!((allowSimpleName&&icon2.prefix===""||icon2.prefix)&&icon2.name):!1;function mergeIconTransformations(obj1,obj2){const result={};!obj1.hFlip!=!obj2.hFlip&&(result.hFlip=!0),!obj1.vFlip!=!obj2.vFlip&&(result.vFlip=!0);const rotate=((obj1.rotate||0)+(obj2.rotate||0))%4;return rotate&&(result.rotate=rotate),result}function mergeIconData(parent,child){const result=mergeIconTransformations(parent,child);for(const key in defaultExtendedIconProps)key in defaultIconTransformations?key in parent&&!(key in result)&&(result[key]=defaultIconTransformations[key]):key in child?result[key]=child[key]:key in parent&&(result[key]=parent[key]);return result}function getIconsTree(data,names){const icons=data.icons,aliases=data.aliases||Object.create(null),resolved=Object.create(null);function resolve(name){if(icons[name])return resolved[name]=[];if(!(name in resolved)){resolved[name]=null;const parent=aliases[name]&&aliases[name].parent,value=parent&&resolve(parent);value&&(resolved[name]=[parent].concat(value))}return resolved[name]}return(names||Object.keys(icons).concat(Object.keys(aliases))).forEach(resolve),resolved}function internalGetIconData(data,name,tree){const icons=data.icons,aliases=data.aliases||Object.create(null);let currentProps={};function parse3(name$1){currentProps=mergeIconData(icons[name$1]||aliases[name$1],currentProps)}return parse3(name),tree.forEach(parse3),mergeIconData(data,currentProps)}function getIconData(data,name){if(data.icons[name])return internalGetIconData(data,name,[]);const tree=getIconsTree(data,[name])[name];return tree?internalGetIconData(data,name,tree):null}const unitsSplit=/(-?[0-9.]*[0-9]+[0-9.]*)/g,unitsTest=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function calculateSize(size,ratio,precision){if(ratio===1)return size;if(precision=precision||100,typeof size=="number")return Math.ceil(size*ratio*precision)/precision;if(typeof size!="string")return size;const oldParts=size.split(unitsSplit);if(oldParts===null||!oldParts.length)return size;const newParts=[];let code=oldParts.shift(),isNumber=unitsTest.test(code);for(;;){if(isNumber){const num=parseFloat(code);isNaN(num)?newParts.push(code):newParts.push(Math.ceil(num*ratio*precision)/precision)}else newParts.push(code);if(code=oldParts.shift(),code===void 0)return newParts.join("");isNumber=!isNumber}}function splitSVGDefs(content,tag="defs"){let defs="";const index=content.indexOf("<"+tag);for(;index>=0;){const start2=content.indexOf(">",index),end=content.indexOf("</"+tag);if(start2===-1||end===-1)break;const endEnd=content.indexOf(">",end);if(endEnd===-1)break;defs+=content.slice(start2+1,end).trim(),content=content.slice(0,index).trim()+content.slice(endEnd+1)}return{defs,content}}function mergeDefsAndContent(defs,content){return defs?"<defs>"+defs+"</defs>"+content:content}function wrapSVGContent(body,start2,end){const split=splitSVGDefs(body);return mergeDefsAndContent(split.defs,start2+split.content+end)}const isUnsetKeyword=value=>value==="unset"||value==="undefined"||value==="none";function iconToSVG(icon2,customisations){const fullIcon={...defaultIconProps,...icon2},fullCustomisations={...defaultIconCustomisations,...customisations},box={left:fullIcon.left,top:fullIcon.top,width:fullIcon.width,height:fullIcon.height};let body=fullIcon.body;[fullIcon,fullCustomisations].forEach(props=>{const transformations=[],hFlip=props.hFlip,vFlip=props.vFlip;let rotation=props.rotate;hFlip?vFlip?rotation+=2:(transformations.push("translate("+(box.width+box.left).toString()+" "+(0-box.top).toString()+")"),transformations.push("scale(-1 1)"),box.top=box.left=0):vFlip&&(transformations.push("translate("+(0-box.left).toString()+" "+(box.height+box.top).toString()+")"),transformations.push("scale(1 -1)"),box.top=box.left=0);let tempValue;switch(rotation<0&&(rotation-=Math.floor(rotation/4)*4),rotation=rotation%4,rotation){case 1:tempValue=box.height/2+box.top,transformations.unshift("rotate(90 "+tempValue.toString()+" "+tempValue.toString()+")");break;case 2:transformations.unshift("rotate(180 "+(box.width/2+box.left).toString()+" "+(box.height/2+box.top).toString()+")");break;case 3:tempValue=box.width/2+box.left,transformations.unshift("rotate(-90 "+tempValue.toString()+" "+tempValue.toString()+")");break}rotation%2===1&&(box.left!==box.top&&(tempValue=box.left,box.left=box.top,box.top=tempValue),box.width!==box.height&&(tempValue=box.width,box.width=box.height,box.height=tempValue)),transformations.length&&(body=wrapSVGContent(body,'<g transform="'+transformations.join(" ")+'">',"</g>"))});const customisationsWidth=fullCustomisations.width,customisationsHeight=fullCustomisations.height,boxWidth=box.width,boxHeight=box.height;let width,height;customisationsWidth===null?(height=customisationsHeight===null?"1em":customisationsHeight==="auto"?boxHeight:customisationsHeight,width=calculateSize(height,boxWidth/boxHeight)):(width=customisationsWidth==="auto"?boxWidth:customisationsWidth,height=customisationsHeight===null?calculateSize(width,boxHeight/boxWidth):customisationsHeight==="auto"?boxHeight:customisationsHeight);const attributes={},setAttr=(prop,value)=>{isUnsetKeyword(value)||(attributes[prop]=value.toString())};setAttr("width",width),setAttr("height",height);const viewBox=[box.left,box.top,boxWidth,boxHeight];return attributes.viewBox=viewBox.join(" "),{attributes,viewBox,body}}const regex=/\sid="(\S+)"/g,counters=new Map;function nextID(id32){id32=id32.replace(/[0-9]+$/,"")||"a";const count=counters.get(id32)||0;return counters.set(id32,count+1),count?`${id32}${count}`:id32}function replaceIDs(body){const ids=[];let match;for(;match=regex.exec(body);)ids.push(match[1]);if(!ids.length)return body;const suffix="suffix"+(Math.random()*16777216|Date.now()).toString(16);return ids.forEach(id32=>{const newID=nextID(id32),escapedID=id32.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");body=body.replace(new RegExp('([#;"])('+escapedID+')([")]|\\.[a-z])',"g"),"$1"+newID+suffix+"$3")}),body=body.replace(new RegExp(suffix,"g"),""),body}function iconToHTML(body,attributes){let renderAttribsHTML=body.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const attr in attributes)renderAttribsHTML+=" "+attr+'="'+attributes[attr]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+renderAttribsHTML+">"+body+"</svg>"}function L$1(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var T$1=L$1();function G$1(l4){T$1=l4}var E$1={exec:()=>null};function d$1(l4,e2=""){let t2=typeof l4=="string"?l4:l4.source,n2={replace:(r2,i2)=>{let s2=typeof i2=="string"?i2:i2.source;return s2=s2.replace(m$1.caret,"$1"),t2=t2.replace(r2,s2),n2},getRegex:()=>new RegExp(t2,e2)};return n2}var be=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),m$1={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:l4=>new RegExp(`^( {0,3}${l4})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:l4=>new RegExp(`^ {0,${Math.min(3,l4-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:l4=>new RegExp(`^ {0,${Math.min(3,l4-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:l4=>new RegExp(`^ {0,${Math.min(3,l4-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:l4=>new RegExp(`^ {0,${Math.min(3,l4-1)}}#`),htmlBeginRegex:l4=>new RegExp(`^ {0,${Math.min(3,l4-1)}}<(?:[a-z].*>|!--)`,"i")},Re=/^(?:[ \t]*(?:\n|$))+/,Te=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Oe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,I$1=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,we=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,F$1=/(?:[*+-]|\d{1,9}[.)])/,ie=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,oe=d$1(ie).replace(/bull/g,F$1).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(),ye=d$1(ie).replace(/bull/g,F$1).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(),j$1=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Pe=/^[^\n]+/,Q$1=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Se=d$1(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Q$1).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),$e=d$1(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,F$1).getRegex(),v$1="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",U$1=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,_e=d$1("^ {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",U$1).replace("tag",v$1).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ae=d$1(j$1).replace("hr",I$1).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",v$1).getRegex(),Le=d$1(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ae).getRegex(),K$1={blockquote:Le,code:Te,def:Se,fences:Oe,heading:we,hr:I$1,html:_e,lheading:oe,list:$e,newline:Re,paragraph:ae,table:E$1,text:Pe},re=d$1("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",I$1).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",v$1).getRegex(),Me={...K$1,lheading:ye,table:re,paragraph:d$1(j$1).replace("hr",I$1).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",re).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",v$1).getRegex()},ze={...K$1,html:d$1(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",U$1).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:E$1,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:d$1(j$1).replace("hr",I$1).replace("heading",` *#{1,6} *[^
159
+ ]`).replace("lheading",oe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ae=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ee=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,le=/^( {2,}|\\)\n(?!\s*$)/,Ie=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,D$1=/[\p{P}\p{S}]/u,W$1=/[\s\p{P}\p{S}]/u,ue=/[^\s\p{P}\p{S}]/u,Ce=d$1(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,W$1).getRegex(),pe=/(?!~)[\p{P}\p{S}]/u,Be=/(?!~)[\s\p{P}\p{S}]/u,qe=/(?:[^\s\p{P}\p{S}]|~)/u,ve=d$1(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",be?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ce=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,De=d$1(ce,"u").replace(/punct/g,D$1).getRegex(),He=d$1(ce,"u").replace(/punct/g,pe).getRegex(),he="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ze=d$1(he,"gu").replace(/notPunctSpace/g,ue).replace(/punctSpace/g,W$1).replace(/punct/g,D$1).getRegex(),Ge=d$1(he,"gu").replace(/notPunctSpace/g,qe).replace(/punctSpace/g,Be).replace(/punct/g,pe).getRegex(),Ne=d$1("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ue).replace(/punctSpace/g,W$1).replace(/punct/g,D$1).getRegex(),Fe=d$1(/\\(punct)/,"gu").replace(/punct/g,D$1).getRegex(),je=d$1(/^<(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(),Qe=d$1(U$1).replace("(?:-->|$)","-->").getRegex(),Ue=d$1("^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",Qe).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),q$1=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Ke=d$1(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",q$1).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),de=d$1(/^!?\[(label)\]\[(ref)\]/).replace("label",q$1).replace("ref",Q$1).getRegex(),ke=d$1(/^!?\[(ref)\](?:\[\])?/).replace("ref",Q$1).getRegex(),We=d$1("reflink|nolink(?!\\()","g").replace("reflink",de).replace("nolink",ke).getRegex(),se=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,X$1={_backpedal:E$1,anyPunctuation:Fe,autolink:je,blockSkip:ve,br:le,code:Ee,del:E$1,emStrongLDelim:De,emStrongRDelimAst:Ze,emStrongRDelimUnd:Ne,escape:Ae,link:Ke,nolink:ke,punctuation:Ce,reflink:de,reflinkSearch:We,tag:Ue,text:Ie,url:E$1},Xe={...X$1,link:d$1(/^!?\[(label)\]\((.*?)\)/).replace("label",q$1).getRegex(),reflink:d$1(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",q$1).getRegex()},N$1={...X$1,emStrongRDelimAst:Ge,emStrongLDelim:He,url:d$1(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",se).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:d$1(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",se).getRegex()},Je={...N$1,br:d$1(le).replace("{2,}","*").getRegex(),text:d$1(N$1.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},C$1={normal:K$1,gfm:Me,pedantic:ze},M$1={normal:X$1,gfm:N$1,breaks:Je,pedantic:Xe},Ve={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ge=l4=>Ve[l4];function w$1(l4,e2){if(e2){if(m$1.escapeTest.test(l4))return l4.replace(m$1.escapeReplace,ge)}else if(m$1.escapeTestNoEncode.test(l4))return l4.replace(m$1.escapeReplaceNoEncode,ge);return l4}function J$1(l4){try{l4=encodeURI(l4).replace(m$1.percentDecode,"%")}catch{return null}return l4}function V$1(l4,e2){var _a17;let t2=l4.replace(m$1.findPipe,(i2,s2,a2)=>{let o2=!1,p2=s2;for(;--p2>=0&&a2[p2]==="\\";)o2=!o2;return o2?"|":" |"}),n2=t2.split(m$1.splitPipe),r2=0;if(n2[0].trim()||n2.shift(),n2.length>0&&!((_a17=n2.at(-1))!=null&&_a17.trim())&&n2.pop(),e2)if(n2.length>e2)n2.splice(e2);else for(;n2.length<e2;)n2.push("");for(;r2<n2.length;r2++)n2[r2]=n2[r2].trim().replace(m$1.slashPipe,"|");return n2}function z$1(l4,e2,t2){let n2=l4.length;if(n2===0)return"";let r2=0;for(;r2<n2&&l4.charAt(n2-r2-1)===e2;)r2++;return l4.slice(0,n2-r2)}function fe(l4,e2){if(l4.indexOf(e2[1])===-1)return-1;let t2=0;for(let n2=0;n2<l4.length;n2++)if(l4[n2]==="\\")n2++;else if(l4[n2]===e2[0])t2++;else if(l4[n2]===e2[1]&&(t2--,t2<0))return n2;return t2>0?-2:-1}function me(l4,e2,t2,n2,r2){let i2=e2.href,s2=e2.title||null,a2=l4[1].replace(r2.other.outputLinkReplace,"$1");n2.state.inLink=!0;let o2={type:l4[0].charAt(0)==="!"?"image":"link",raw:t2,href:i2,title:s2,text:a2,tokens:n2.inlineTokens(a2)};return n2.state.inLink=!1,o2}function Ye(l4,e2,t2){let n2=l4.match(t2.other.indentCodeCompensation);if(n2===null)return e2;let r2=n2[1];return e2.split(`
160
+ `).map(i2=>{let s2=i2.match(t2.other.beginningSpace);if(s2===null)return i2;let[a2]=s2;return a2.length>=r2.length?i2.slice(r2.length):i2}).join(`
161
+ `)}var y$1=class{constructor(e2){__publicField(this,"options");__publicField(this,"rules");__publicField(this,"lexer");this.options=e2||T$1}space(e2){let t2=this.rules.block.newline.exec(e2);if(t2&&t2[0].length>0)return{type:"space",raw:t2[0]}}code(e2){let t2=this.rules.block.code.exec(e2);if(t2){let n2=t2[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t2[0],codeBlockStyle:"indented",text:this.options.pedantic?n2:z$1(n2,`
162
+ `)}}}fences(e2){let t2=this.rules.block.fences.exec(e2);if(t2){let n2=t2[0],r2=Ye(n2,t2[3]||"",this.rules);return{type:"code",raw:n2,lang:t2[2]?t2[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t2[2],text:r2}}}heading(e2){let t2=this.rules.block.heading.exec(e2);if(t2){let n2=t2[2].trim();if(this.rules.other.endingHash.test(n2)){let r2=z$1(n2,"#");(this.options.pedantic||!r2||this.rules.other.endingSpaceChar.test(r2))&&(n2=r2.trim())}return{type:"heading",raw:t2[0],depth:t2[1].length,text:n2,tokens:this.lexer.inline(n2)}}}hr(e2){let t2=this.rules.block.hr.exec(e2);if(t2)return{type:"hr",raw:z$1(t2[0],`
163
+ `)}}blockquote(e2){let t2=this.rules.block.blockquote.exec(e2);if(t2){let n2=z$1(t2[0],`
164
+ `).split(`
165
+ `),r2="",i2="",s2=[];for(;n2.length>0;){let a2=!1,o2=[],p2;for(p2=0;p2<n2.length;p2++)if(this.rules.other.blockquoteStart.test(n2[p2]))o2.push(n2[p2]),a2=!0;else if(!a2)o2.push(n2[p2]);else break;n2=n2.slice(p2);let u2=o2.join(`
166
+ `),c2=u2.replace(this.rules.other.blockquoteSetextReplace,`
167
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r2=r2?`${r2}
168
+ ${u2}`:u2,i2=i2?`${i2}
169
+ ${c2}`:c2;let g2=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c2,s2,!0),this.lexer.state.top=g2,n2.length===0)break;let h2=s2.at(-1);if((h2==null?void 0:h2.type)==="code")break;if((h2==null?void 0:h2.type)==="blockquote"){let R2=h2,f2=R2.raw+`
170
+ `+n2.join(`
171
+ `),O2=this.blockquote(f2);s2[s2.length-1]=O2,r2=r2.substring(0,r2.length-R2.raw.length)+O2.raw,i2=i2.substring(0,i2.length-R2.text.length)+O2.text;break}else if((h2==null?void 0:h2.type)==="list"){let R2=h2,f2=R2.raw+`
172
+ `+n2.join(`
173
+ `),O2=this.list(f2);s2[s2.length-1]=O2,r2=r2.substring(0,r2.length-h2.raw.length)+O2.raw,i2=i2.substring(0,i2.length-R2.raw.length)+O2.raw,n2=f2.substring(s2.at(-1).raw.length).split(`
174
+ `);continue}}return{type:"blockquote",raw:r2,tokens:s2,text:i2}}}list(e2){let t2=this.rules.block.list.exec(e2);if(t2){let n2=t2[1].trim(),r2=n2.length>1,i2={type:"list",raw:"",ordered:r2,start:r2?+n2.slice(0,-1):"",loose:!1,items:[]};n2=r2?`\\d{1,9}\\${n2.slice(-1)}`:`\\${n2}`,this.options.pedantic&&(n2=r2?n2:"[*+-]");let s2=this.rules.other.listItemRegex(n2),a2=!1;for(;e2;){let p2=!1,u2="",c2="";if(!(t2=s2.exec(e2))||this.rules.block.hr.test(e2))break;u2=t2[0],e2=e2.substring(u2.length);let g2=t2[2].split(`
175
+ `,1)[0].replace(this.rules.other.listReplaceTabs,H2=>" ".repeat(3*H2.length)),h2=e2.split(`
176
+ `,1)[0],R2=!g2.trim(),f2=0;if(this.options.pedantic?(f2=2,c2=g2.trimStart()):R2?f2=t2[1].length+1:(f2=t2[2].search(this.rules.other.nonSpaceChar),f2=f2>4?1:f2,c2=g2.slice(f2),f2+=t2[1].length),R2&&this.rules.other.blankLine.test(h2)&&(u2+=h2+`
177
+ `,e2=e2.substring(h2.length+1),p2=!0),!p2){let H2=this.rules.other.nextBulletRegex(f2),ee=this.rules.other.hrRegex(f2),te=this.rules.other.fencesBeginRegex(f2),ne=this.rules.other.headingBeginRegex(f2),xe=this.rules.other.htmlBeginRegex(f2);for(;e2;){let Z2=e2.split(`
178
+ `,1)[0],A2;if(h2=Z2,this.options.pedantic?(h2=h2.replace(this.rules.other.listReplaceNesting," "),A2=h2):A2=h2.replace(this.rules.other.tabCharGlobal," "),te.test(h2)||ne.test(h2)||xe.test(h2)||H2.test(h2)||ee.test(h2))break;if(A2.search(this.rules.other.nonSpaceChar)>=f2||!h2.trim())c2+=`
179
+ `+A2.slice(f2);else{if(R2||g2.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||te.test(g2)||ne.test(g2)||ee.test(g2))break;c2+=`
180
+ `+h2}!R2&&!h2.trim()&&(R2=!0),u2+=Z2+`
181
+ `,e2=e2.substring(Z2.length+1),g2=A2.slice(f2)}}i2.loose||(a2?i2.loose=!0:this.rules.other.doubleBlankLine.test(u2)&&(a2=!0));let O2=null,Y2;this.options.gfm&&(O2=this.rules.other.listIsTask.exec(c2),O2&&(Y2=O2[0]!=="[ ] ",c2=c2.replace(this.rules.other.listReplaceTask,""))),i2.items.push({type:"list_item",raw:u2,task:!!O2,checked:Y2,loose:!1,text:c2,tokens:[]}),i2.raw+=u2}let o2=i2.items.at(-1);if(o2)o2.raw=o2.raw.trimEnd(),o2.text=o2.text.trimEnd();else return;i2.raw=i2.raw.trimEnd();for(let p2=0;p2<i2.items.length;p2++)if(this.lexer.state.top=!1,i2.items[p2].tokens=this.lexer.blockTokens(i2.items[p2].text,[]),!i2.loose){let u2=i2.items[p2].tokens.filter(g2=>g2.type==="space"),c2=u2.length>0&&u2.some(g2=>this.rules.other.anyLine.test(g2.raw));i2.loose=c2}if(i2.loose)for(let p2=0;p2<i2.items.length;p2++)i2.items[p2].loose=!0;return i2}}html(e2){let t2=this.rules.block.html.exec(e2);if(t2)return{type:"html",block:!0,raw:t2[0],pre:t2[1]==="pre"||t2[1]==="script"||t2[1]==="style",text:t2[0]}}def(e2){let t2=this.rules.block.def.exec(e2);if(t2){let n2=t2[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r2=t2[2]?t2[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i2=t2[3]?t2[3].substring(1,t2[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t2[3];return{type:"def",tag:n2,raw:t2[0],href:r2,title:i2}}}table(e2){var _a17;let t2=this.rules.block.table.exec(e2);if(!t2||!this.rules.other.tableDelimiter.test(t2[2]))return;let n2=V$1(t2[1]),r2=t2[2].replace(this.rules.other.tableAlignChars,"").split("|"),i2=(_a17=t2[3])!=null&&_a17.trim()?t2[3].replace(this.rules.other.tableRowBlankLine,"").split(`
182
+ `):[],s2={type:"table",raw:t2[0],header:[],align:[],rows:[]};if(n2.length===r2.length){for(let a2 of r2)this.rules.other.tableAlignRight.test(a2)?s2.align.push("right"):this.rules.other.tableAlignCenter.test(a2)?s2.align.push("center"):this.rules.other.tableAlignLeft.test(a2)?s2.align.push("left"):s2.align.push(null);for(let a2=0;a2<n2.length;a2++)s2.header.push({text:n2[a2],tokens:this.lexer.inline(n2[a2]),header:!0,align:s2.align[a2]});for(let a2 of i2)s2.rows.push(V$1(a2,s2.header.length).map((o2,p2)=>({text:o2,tokens:this.lexer.inline(o2),header:!1,align:s2.align[p2]})));return s2}}lheading(e2){let t2=this.rules.block.lheading.exec(e2);if(t2)return{type:"heading",raw:t2[0],depth:t2[2].charAt(0)==="="?1:2,text:t2[1],tokens:this.lexer.inline(t2[1])}}paragraph(e2){let t2=this.rules.block.paragraph.exec(e2);if(t2){let n2=t2[1].charAt(t2[1].length-1)===`
183
+ `?t2[1].slice(0,-1):t2[1];return{type:"paragraph",raw:t2[0],text:n2,tokens:this.lexer.inline(n2)}}}text(e2){let t2=this.rules.block.text.exec(e2);if(t2)return{type:"text",raw:t2[0],text:t2[0],tokens:this.lexer.inline(t2[0])}}escape(e2){let t2=this.rules.inline.escape.exec(e2);if(t2)return{type:"escape",raw:t2[0],text:t2[1]}}tag(e2){let t2=this.rules.inline.tag.exec(e2);if(t2)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t2[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t2[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t2[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t2[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t2[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t2[0]}}link(e2){let t2=this.rules.inline.link.exec(e2);if(t2){let n2=t2[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n2)){if(!this.rules.other.endAngleBracket.test(n2))return;let s2=z$1(n2.slice(0,-1),"\\");if((n2.length-s2.length)%2===0)return}else{let s2=fe(t2[2],"()");if(s2===-2)return;if(s2>-1){let o2=(t2[0].indexOf("!")===0?5:4)+t2[1].length+s2;t2[2]=t2[2].substring(0,s2),t2[0]=t2[0].substring(0,o2).trim(),t2[3]=""}}let r2=t2[2],i2="";if(this.options.pedantic){let s2=this.rules.other.pedanticHrefTitle.exec(r2);s2&&(r2=s2[1],i2=s2[3])}else i2=t2[3]?t2[3].slice(1,-1):"";return r2=r2.trim(),this.rules.other.startAngleBracket.test(r2)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n2)?r2=r2.slice(1):r2=r2.slice(1,-1)),me(t2,{href:r2&&r2.replace(this.rules.inline.anyPunctuation,"$1"),title:i2&&i2.replace(this.rules.inline.anyPunctuation,"$1")},t2[0],this.lexer,this.rules)}}reflink(e2,t2){let n2;if((n2=this.rules.inline.reflink.exec(e2))||(n2=this.rules.inline.nolink.exec(e2))){let r2=(n2[2]||n2[1]).replace(this.rules.other.multipleSpaceGlobal," "),i2=t2[r2.toLowerCase()];if(!i2){let s2=n2[0].charAt(0);return{type:"text",raw:s2,text:s2}}return me(n2,i2,n2[0],this.lexer,this.rules)}}emStrong(e2,t2,n2=""){let r2=this.rules.inline.emStrongLDelim.exec(e2);if(!(!r2||r2[3]&&n2.match(this.rules.other.unicodeAlphaNumeric))&&(!(r2[1]||r2[2])||!n2||this.rules.inline.punctuation.exec(n2))){let s2=[...r2[0]].length-1,a2,o2,p2=s2,u2=0,c2=r2[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c2.lastIndex=0,t2=t2.slice(-1*e2.length+s2);(r2=c2.exec(t2))!=null;){if(a2=r2[1]||r2[2]||r2[3]||r2[4]||r2[5]||r2[6],!a2)continue;if(o2=[...a2].length,r2[3]||r2[4]){p2+=o2;continue}else if((r2[5]||r2[6])&&s2%3&&!((s2+o2)%3)){u2+=o2;continue}if(p2-=o2,p2>0)continue;o2=Math.min(o2,o2+p2+u2);let g2=[...r2[0]][0].length,h2=e2.slice(0,s2+r2.index+g2+o2);if(Math.min(s2,o2)%2){let f2=h2.slice(1,-1);return{type:"em",raw:h2,text:f2,tokens:this.lexer.inlineTokens(f2)}}let R2=h2.slice(2,-2);return{type:"strong",raw:h2,text:R2,tokens:this.lexer.inlineTokens(R2)}}}}codespan(e2){let t2=this.rules.inline.code.exec(e2);if(t2){let n2=t2[2].replace(this.rules.other.newLineCharGlobal," "),r2=this.rules.other.nonSpaceChar.test(n2),i2=this.rules.other.startingSpaceChar.test(n2)&&this.rules.other.endingSpaceChar.test(n2);return r2&&i2&&(n2=n2.substring(1,n2.length-1)),{type:"codespan",raw:t2[0],text:n2}}}br(e2){let t2=this.rules.inline.br.exec(e2);if(t2)return{type:"br",raw:t2[0]}}del(e2){let t2=this.rules.inline.del.exec(e2);if(t2)return{type:"del",raw:t2[0],text:t2[2],tokens:this.lexer.inlineTokens(t2[2])}}autolink(e2){let t2=this.rules.inline.autolink.exec(e2);if(t2){let n2,r2;return t2[2]==="@"?(n2=t2[1],r2="mailto:"+n2):(n2=t2[1],r2=n2),{type:"link",raw:t2[0],text:n2,href:r2,tokens:[{type:"text",raw:n2,text:n2}]}}}url(e2){var _a17;let t2;if(t2=this.rules.inline.url.exec(e2)){let n2,r2;if(t2[2]==="@")n2=t2[0],r2="mailto:"+n2;else{let i2;do i2=t2[0],t2[0]=((_a17=this.rules.inline._backpedal.exec(t2[0]))==null?void 0:_a17[0])??"";while(i2!==t2[0]);n2=t2[0],t2[1]==="www."?r2="http://"+t2[0]:r2=t2[0]}return{type:"link",raw:t2[0],text:n2,href:r2,tokens:[{type:"text",raw:n2,text:n2}]}}}inlineText(e2){let t2=this.rules.inline.text.exec(e2);if(t2){let n2=this.lexer.state.inRawBlock;return{type:"text",raw:t2[0],text:t2[0],escaped:n2}}}},x$1=class l{constructor(e2){__publicField(this,"tokens");__publicField(this,"options");__publicField(this,"state");__publicField(this,"tokenizer");__publicField(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e2||T$1,this.options.tokenizer=this.options.tokenizer||new y$1,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t2={other:m$1,block:C$1.normal,inline:M$1.normal};this.options.pedantic?(t2.block=C$1.pedantic,t2.inline=M$1.pedantic):this.options.gfm&&(t2.block=C$1.gfm,this.options.breaks?t2.inline=M$1.breaks:t2.inline=M$1.gfm),this.tokenizer.rules=t2}static get rules(){return{block:C$1,inline:M$1}}static lex(e2,t2){return new l(t2).lex(e2)}static lexInline(e2,t2){return new l(t2).inlineTokens(e2)}lex(e2){e2=e2.replace(m$1.carriageReturn,`
184
+ `),this.blockTokens(e2,this.tokens);for(let t2=0;t2<this.inlineQueue.length;t2++){let n2=this.inlineQueue[t2];this.inlineTokens(n2.src,n2.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e2,t2=[],n2=!1){var _a17,_b,_c;for(this.options.pedantic&&(e2=e2.replace(m$1.tabCharGlobal," ").replace(m$1.spaceLine,""));e2;){let r2;if((_b=(_a17=this.options.extensions)==null?void 0:_a17.block)!=null&&_b.some(s2=>(r2=s2.call({lexer:this},e2,t2))?(e2=e2.substring(r2.raw.length),t2.push(r2),!0):!1))continue;if(r2=this.tokenizer.space(e2)){e2=e2.substring(r2.raw.length);let s2=t2.at(-1);r2.raw.length===1&&s2!==void 0?s2.raw+=`
185
+ `:t2.push(r2);continue}if(r2=this.tokenizer.code(e2)){e2=e2.substring(r2.raw.length);let s2=t2.at(-1);(s2==null?void 0:s2.type)==="paragraph"||(s2==null?void 0:s2.type)==="text"?(s2.raw+=(s2.raw.endsWith(`
186
+ `)?"":`
187
+ `)+r2.raw,s2.text+=`
188
+ `+r2.text,this.inlineQueue.at(-1).src=s2.text):t2.push(r2);continue}if(r2=this.tokenizer.fences(e2)){e2=e2.substring(r2.raw.length),t2.push(r2);continue}if(r2=this.tokenizer.heading(e2)){e2=e2.substring(r2.raw.length),t2.push(r2);continue}if(r2=this.tokenizer.hr(e2)){e2=e2.substring(r2.raw.length),t2.push(r2);continue}if(r2=this.tokenizer.blockquote(e2)){e2=e2.substring(r2.raw.length),t2.push(r2);continue}if(r2=this.tokenizer.list(e2)){e2=e2.substring(r2.raw.length),t2.push(r2);continue}if(r2=this.tokenizer.html(e2)){e2=e2.substring(r2.raw.length),t2.push(r2);continue}if(r2=this.tokenizer.def(e2)){e2=e2.substring(r2.raw.length);let s2=t2.at(-1);(s2==null?void 0:s2.type)==="paragraph"||(s2==null?void 0:s2.type)==="text"?(s2.raw+=(s2.raw.endsWith(`
189
+ `)?"":`
190
+ `)+r2.raw,s2.text+=`
191
+ `+r2.raw,this.inlineQueue.at(-1).src=s2.text):this.tokens.links[r2.tag]||(this.tokens.links[r2.tag]={href:r2.href,title:r2.title},t2.push(r2));continue}if(r2=this.tokenizer.table(e2)){e2=e2.substring(r2.raw.length),t2.push(r2);continue}if(r2=this.tokenizer.lheading(e2)){e2=e2.substring(r2.raw.length),t2.push(r2);continue}let i2=e2;if((_c=this.options.extensions)!=null&&_c.startBlock){let s2=1/0,a2=e2.slice(1),o2;this.options.extensions.startBlock.forEach(p2=>{o2=p2.call({lexer:this},a2),typeof o2=="number"&&o2>=0&&(s2=Math.min(s2,o2))}),s2<1/0&&s2>=0&&(i2=e2.substring(0,s2+1))}if(this.state.top&&(r2=this.tokenizer.paragraph(i2))){let s2=t2.at(-1);n2&&(s2==null?void 0:s2.type)==="paragraph"?(s2.raw+=(s2.raw.endsWith(`
192
+ `)?"":`
193
+ `)+r2.raw,s2.text+=`
194
+ `+r2.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s2.text):t2.push(r2),n2=i2.length!==e2.length,e2=e2.substring(r2.raw.length);continue}if(r2=this.tokenizer.text(e2)){e2=e2.substring(r2.raw.length);let s2=t2.at(-1);(s2==null?void 0:s2.type)==="text"?(s2.raw+=(s2.raw.endsWith(`
195
+ `)?"":`
196
+ `)+r2.raw,s2.text+=`
197
+ `+r2.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s2.text):t2.push(r2);continue}if(e2){let s2="Infinite loop on byte: "+e2.charCodeAt(0);if(this.options.silent){console.error(s2);break}else throw new Error(s2)}}return this.state.top=!0,t2}inline(e2,t2=[]){return this.inlineQueue.push({src:e2,tokens:t2}),t2}inlineTokens(e2,t2=[]){var _a17,_b,_c,_d,_e2;let n2=e2,r2=null;if(this.tokens.links){let o2=Object.keys(this.tokens.links);if(o2.length>0)for(;(r2=this.tokenizer.rules.inline.reflinkSearch.exec(n2))!=null;)o2.includes(r2[0].slice(r2[0].lastIndexOf("[")+1,-1))&&(n2=n2.slice(0,r2.index)+"["+"a".repeat(r2[0].length-2)+"]"+n2.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r2=this.tokenizer.rules.inline.anyPunctuation.exec(n2))!=null;)n2=n2.slice(0,r2.index)+"++"+n2.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i2;for(;(r2=this.tokenizer.rules.inline.blockSkip.exec(n2))!=null;)i2=r2[2]?r2[2].length:0,n2=n2.slice(0,r2.index+i2)+"["+"a".repeat(r2[0].length-i2-2)+"]"+n2.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n2=((_b=(_a17=this.options.hooks)==null?void 0:_a17.emStrongMask)==null?void 0:_b.call({lexer:this},n2))??n2;let s2=!1,a2="";for(;e2;){s2||(a2=""),s2=!1;let o2;if((_d=(_c=this.options.extensions)==null?void 0:_c.inline)!=null&&_d.some(u2=>(o2=u2.call({lexer:this},e2,t2))?(e2=e2.substring(o2.raw.length),t2.push(o2),!0):!1))continue;if(o2=this.tokenizer.escape(e2)){e2=e2.substring(o2.raw.length),t2.push(o2);continue}if(o2=this.tokenizer.tag(e2)){e2=e2.substring(o2.raw.length),t2.push(o2);continue}if(o2=this.tokenizer.link(e2)){e2=e2.substring(o2.raw.length),t2.push(o2);continue}if(o2=this.tokenizer.reflink(e2,this.tokens.links)){e2=e2.substring(o2.raw.length);let u2=t2.at(-1);o2.type==="text"&&(u2==null?void 0:u2.type)==="text"?(u2.raw+=o2.raw,u2.text+=o2.text):t2.push(o2);continue}if(o2=this.tokenizer.emStrong(e2,n2,a2)){e2=e2.substring(o2.raw.length),t2.push(o2);continue}if(o2=this.tokenizer.codespan(e2)){e2=e2.substring(o2.raw.length),t2.push(o2);continue}if(o2=this.tokenizer.br(e2)){e2=e2.substring(o2.raw.length),t2.push(o2);continue}if(o2=this.tokenizer.del(e2)){e2=e2.substring(o2.raw.length),t2.push(o2);continue}if(o2=this.tokenizer.autolink(e2)){e2=e2.substring(o2.raw.length),t2.push(o2);continue}if(!this.state.inLink&&(o2=this.tokenizer.url(e2))){e2=e2.substring(o2.raw.length),t2.push(o2);continue}let p2=e2;if((_e2=this.options.extensions)!=null&&_e2.startInline){let u2=1/0,c2=e2.slice(1),g2;this.options.extensions.startInline.forEach(h2=>{g2=h2.call({lexer:this},c2),typeof g2=="number"&&g2>=0&&(u2=Math.min(u2,g2))}),u2<1/0&&u2>=0&&(p2=e2.substring(0,u2+1))}if(o2=this.tokenizer.inlineText(p2)){e2=e2.substring(o2.raw.length),o2.raw.slice(-1)!=="_"&&(a2=o2.raw.slice(-1)),s2=!0;let u2=t2.at(-1);(u2==null?void 0:u2.type)==="text"?(u2.raw+=o2.raw,u2.text+=o2.text):t2.push(o2);continue}if(e2){let u2="Infinite loop on byte: "+e2.charCodeAt(0);if(this.options.silent){console.error(u2);break}else throw new Error(u2)}}return t2}},P$1=class{constructor(e2){__publicField(this,"options");__publicField(this,"parser");this.options=e2||T$1}space(e2){return""}code({text:e2,lang:t2,escaped:n2}){var _a17;let r2=(_a17=(t2||"").match(m$1.notSpaceStart))==null?void 0:_a17[0],i2=e2.replace(m$1.endingNewline,"")+`
198
+ `;return r2?'<pre><code class="language-'+w$1(r2)+'">'+(n2?i2:w$1(i2,!0))+`</code></pre>
199
+ `:"<pre><code>"+(n2?i2:w$1(i2,!0))+`</code></pre>
200
+ `}blockquote({tokens:e2}){return`<blockquote>
201
+ ${this.parser.parse(e2)}</blockquote>
202
+ `}html({text:e2}){return e2}def(e2){return""}heading({tokens:e2,depth:t2}){return`<h${t2}>${this.parser.parseInline(e2)}</h${t2}>
203
+ `}hr(e2){return`<hr>
204
+ `}list(e2){let t2=e2.ordered,n2=e2.start,r2="";for(let a2=0;a2<e2.items.length;a2++){let o2=e2.items[a2];r2+=this.listitem(o2)}let i2=t2?"ol":"ul",s2=t2&&n2!==1?' start="'+n2+'"':"";return"<"+i2+s2+`>
205
+ `+r2+"</"+i2+`>
206
+ `}listitem(e2){var _a17;let t2="";if(e2.task){let n2=this.checkbox({checked:!!e2.checked});e2.loose?((_a17=e2.tokens[0])==null?void 0:_a17.type)==="paragraph"?(e2.tokens[0].text=n2+" "+e2.tokens[0].text,e2.tokens[0].tokens&&e2.tokens[0].tokens.length>0&&e2.tokens[0].tokens[0].type==="text"&&(e2.tokens[0].tokens[0].text=n2+" "+w$1(e2.tokens[0].tokens[0].text),e2.tokens[0].tokens[0].escaped=!0)):e2.tokens.unshift({type:"text",raw:n2+" ",text:n2+" ",escaped:!0}):t2+=n2+" "}return t2+=this.parser.parse(e2.tokens,!!e2.loose),`<li>${t2}</li>
207
+ `}checkbox({checked:e2}){return"<input "+(e2?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e2}){return`<p>${this.parser.parseInline(e2)}</p>
208
+ `}table(e2){let t2="",n2="";for(let i2=0;i2<e2.header.length;i2++)n2+=this.tablecell(e2.header[i2]);t2+=this.tablerow({text:n2});let r2="";for(let i2=0;i2<e2.rows.length;i2++){let s2=e2.rows[i2];n2="";for(let a2=0;a2<s2.length;a2++)n2+=this.tablecell(s2[a2]);r2+=this.tablerow({text:n2})}return r2&&(r2=`<tbody>${r2}</tbody>`),`<table>
209
+ <thead>
210
+ `+t2+`</thead>
211
+ `+r2+`</table>
212
+ `}tablerow({text:e2}){return`<tr>
213
+ ${e2}</tr>
214
+ `}tablecell(e2){let t2=this.parser.parseInline(e2.tokens),n2=e2.header?"th":"td";return(e2.align?`<${n2} align="${e2.align}">`:`<${n2}>`)+t2+`</${n2}>
215
+ `}strong({tokens:e2}){return`<strong>${this.parser.parseInline(e2)}</strong>`}em({tokens:e2}){return`<em>${this.parser.parseInline(e2)}</em>`}codespan({text:e2}){return`<code>${w$1(e2,!0)}</code>`}br(e2){return"<br>"}del({tokens:e2}){return`<del>${this.parser.parseInline(e2)}</del>`}link({href:e2,title:t2,tokens:n2}){let r2=this.parser.parseInline(n2),i2=J$1(e2);if(i2===null)return r2;e2=i2;let s2='<a href="'+e2+'"';return t2&&(s2+=' title="'+w$1(t2)+'"'),s2+=">"+r2+"</a>",s2}image({href:e2,title:t2,text:n2,tokens:r2}){r2&&(n2=this.parser.parseInline(r2,this.parser.textRenderer));let i2=J$1(e2);if(i2===null)return w$1(n2);e2=i2;let s2=`<img src="${e2}" alt="${n2}"`;return t2&&(s2+=` title="${w$1(t2)}"`),s2+=">",s2}text(e2){return"tokens"in e2&&e2.tokens?this.parser.parseInline(e2.tokens):"escaped"in e2&&e2.escaped?e2.text:w$1(e2.text)}},$$1=class{strong({text:e2}){return e2}em({text:e2}){return e2}codespan({text:e2}){return e2}del({text:e2}){return e2}html({text:e2}){return e2}text({text:e2}){return e2}link({text:e2}){return""+e2}image({text:e2}){return""+e2}br(){return""}},b$1=class l2{constructor(e2){__publicField(this,"options");__publicField(this,"renderer");__publicField(this,"textRenderer");this.options=e2||T$1,this.options.renderer=this.options.renderer||new P$1,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new $$1}static parse(e2,t2){return new l2(t2).parse(e2)}static parseInline(e2,t2){return new l2(t2).parseInline(e2)}parse(e2,t2=!0){var _a17,_b;let n2="";for(let r2=0;r2<e2.length;r2++){let i2=e2[r2];if((_b=(_a17=this.options.extensions)==null?void 0:_a17.renderers)!=null&&_b[i2.type]){let a2=i2,o2=this.options.extensions.renderers[a2.type].call({parser:this},a2);if(o2!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a2.type)){n2+=o2||"";continue}}let s2=i2;switch(s2.type){case"space":{n2+=this.renderer.space(s2);continue}case"hr":{n2+=this.renderer.hr(s2);continue}case"heading":{n2+=this.renderer.heading(s2);continue}case"code":{n2+=this.renderer.code(s2);continue}case"table":{n2+=this.renderer.table(s2);continue}case"blockquote":{n2+=this.renderer.blockquote(s2);continue}case"list":{n2+=this.renderer.list(s2);continue}case"html":{n2+=this.renderer.html(s2);continue}case"def":{n2+=this.renderer.def(s2);continue}case"paragraph":{n2+=this.renderer.paragraph(s2);continue}case"text":{let a2=s2,o2=this.renderer.text(a2);for(;r2+1<e2.length&&e2[r2+1].type==="text";)a2=e2[++r2],o2+=`
216
+ `+this.renderer.text(a2);t2?n2+=this.renderer.paragraph({type:"paragraph",raw:o2,text:o2,tokens:[{type:"text",raw:o2,text:o2,escaped:!0}]}):n2+=o2;continue}default:{let a2='Token with "'+s2.type+'" type was not found.';if(this.options.silent)return console.error(a2),"";throw new Error(a2)}}}return n2}parseInline(e2,t2=this.renderer){var _a17,_b;let n2="";for(let r2=0;r2<e2.length;r2++){let i2=e2[r2];if((_b=(_a17=this.options.extensions)==null?void 0:_a17.renderers)!=null&&_b[i2.type]){let a2=this.options.extensions.renderers[i2.type].call({parser:this},i2);if(a2!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i2.type)){n2+=a2||"";continue}}let s2=i2;switch(s2.type){case"escape":{n2+=t2.text(s2);break}case"html":{n2+=t2.html(s2);break}case"link":{n2+=t2.link(s2);break}case"image":{n2+=t2.image(s2);break}case"strong":{n2+=t2.strong(s2);break}case"em":{n2+=t2.em(s2);break}case"codespan":{n2+=t2.codespan(s2);break}case"br":{n2+=t2.br(s2);break}case"del":{n2+=t2.del(s2);break}case"text":{n2+=t2.text(s2);break}default:{let a2='Token with "'+s2.type+'" type was not found.';if(this.options.silent)return console.error(a2),"";throw new Error(a2)}}}return n2}},_a15,S$1=(_a15=class{constructor(e2){__publicField(this,"options");__publicField(this,"block");this.options=e2||T$1}preprocess(e2){return e2}postprocess(e2){return e2}processAllTokens(e2){return e2}emStrongMask(e2){return e2}provideLexer(){return this.block?x$1.lex:x$1.lexInline}provideParser(){return this.block?b$1.parse:b$1.parseInline}},__publicField(_a15,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),__publicField(_a15,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),_a15),B$1=class{constructor(...e2){__publicField(this,"defaults",L$1());__publicField(this,"options",this.setOptions);__publicField(this,"parse",this.parseMarkdown(!0));__publicField(this,"parseInline",this.parseMarkdown(!1));__publicField(this,"Parser",b$1);__publicField(this,"Renderer",P$1);__publicField(this,"TextRenderer",$$1);__publicField(this,"Lexer",x$1);__publicField(this,"Tokenizer",y$1);__publicField(this,"Hooks",S$1);this.use(...e2)}walkTokens(e2,t2){var _a17,_b;let n2=[];for(let r2 of e2)switch(n2=n2.concat(t2.call(this,r2)),r2.type){case"table":{let i2=r2;for(let s2 of i2.header)n2=n2.concat(this.walkTokens(s2.tokens,t2));for(let s2 of i2.rows)for(let a2 of s2)n2=n2.concat(this.walkTokens(a2.tokens,t2));break}case"list":{let i2=r2;n2=n2.concat(this.walkTokens(i2.items,t2));break}default:{let i2=r2;(_b=(_a17=this.defaults.extensions)==null?void 0:_a17.childTokens)!=null&&_b[i2.type]?this.defaults.extensions.childTokens[i2.type].forEach(s2=>{let a2=i2[s2].flat(1/0);n2=n2.concat(this.walkTokens(a2,t2))}):i2.tokens&&(n2=n2.concat(this.walkTokens(i2.tokens,t2)))}}return n2}use(...e2){let t2=this.defaults.extensions||{renderers:{},childTokens:{}};return e2.forEach(n2=>{let r2={...n2};if(r2.async=this.defaults.async||r2.async||!1,n2.extensions&&(n2.extensions.forEach(i2=>{if(!i2.name)throw new Error("extension name required");if("renderer"in i2){let s2=t2.renderers[i2.name];s2?t2.renderers[i2.name]=function(...a2){let o2=i2.renderer.apply(this,a2);return o2===!1&&(o2=s2.apply(this,a2)),o2}:t2.renderers[i2.name]=i2.renderer}if("tokenizer"in i2){if(!i2.level||i2.level!=="block"&&i2.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s2=t2[i2.level];s2?s2.unshift(i2.tokenizer):t2[i2.level]=[i2.tokenizer],i2.start&&(i2.level==="block"?t2.startBlock?t2.startBlock.push(i2.start):t2.startBlock=[i2.start]:i2.level==="inline"&&(t2.startInline?t2.startInline.push(i2.start):t2.startInline=[i2.start]))}"childTokens"in i2&&i2.childTokens&&(t2.childTokens[i2.name]=i2.childTokens)}),r2.extensions=t2),n2.renderer){let i2=this.defaults.renderer||new P$1(this.defaults);for(let s2 in n2.renderer){if(!(s2 in i2))throw new Error(`renderer '${s2}' does not exist`);if(["options","parser"].includes(s2))continue;let a2=s2,o2=n2.renderer[a2],p2=i2[a2];i2[a2]=(...u2)=>{let c2=o2.apply(i2,u2);return c2===!1&&(c2=p2.apply(i2,u2)),c2||""}}r2.renderer=i2}if(n2.tokenizer){let i2=this.defaults.tokenizer||new y$1(this.defaults);for(let s2 in n2.tokenizer){if(!(s2 in i2))throw new Error(`tokenizer '${s2}' does not exist`);if(["options","rules","lexer"].includes(s2))continue;let a2=s2,o2=n2.tokenizer[a2],p2=i2[a2];i2[a2]=(...u2)=>{let c2=o2.apply(i2,u2);return c2===!1&&(c2=p2.apply(i2,u2)),c2}}r2.tokenizer=i2}if(n2.hooks){let i2=this.defaults.hooks||new S$1;for(let s2 in n2.hooks){if(!(s2 in i2))throw new Error(`hook '${s2}' does not exist`);if(["options","block"].includes(s2))continue;let a2=s2,o2=n2.hooks[a2],p2=i2[a2];S$1.passThroughHooks.has(s2)?i2[a2]=u2=>{if(this.defaults.async&&S$1.passThroughHooksRespectAsync.has(s2))return(async()=>{let g2=await o2.call(i2,u2);return p2.call(i2,g2)})();let c2=o2.call(i2,u2);return p2.call(i2,c2)}:i2[a2]=(...u2)=>{if(this.defaults.async)return(async()=>{let g2=await o2.apply(i2,u2);return g2===!1&&(g2=await p2.apply(i2,u2)),g2})();let c2=o2.apply(i2,u2);return c2===!1&&(c2=p2.apply(i2,u2)),c2}}r2.hooks=i2}if(n2.walkTokens){let i2=this.defaults.walkTokens,s2=n2.walkTokens;r2.walkTokens=function(a2){let o2=[];return o2.push(s2.call(this,a2)),i2&&(o2=o2.concat(i2.call(this,a2))),o2}}this.defaults={...this.defaults,...r2}}),this}setOptions(e2){return this.defaults={...this.defaults,...e2},this}lexer(e2,t2){return x$1.lex(e2,t2??this.defaults)}parser(e2,t2){return b$1.parse(e2,t2??this.defaults)}parseMarkdown(e2){return(n2,r2)=>{let i2={...r2},s2={...this.defaults,...i2},a2=this.onError(!!s2.silent,!!s2.async);if(this.defaults.async===!0&&i2.async===!1)return a2(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 n2>"u"||n2===null)return a2(new Error("marked(): input parameter is undefined or null"));if(typeof n2!="string")return a2(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n2)+", string expected"));if(s2.hooks&&(s2.hooks.options=s2,s2.hooks.block=e2),s2.async)return(async()=>{let o2=s2.hooks?await s2.hooks.preprocess(n2):n2,u2=await(s2.hooks?await s2.hooks.provideLexer():e2?x$1.lex:x$1.lexInline)(o2,s2),c2=s2.hooks?await s2.hooks.processAllTokens(u2):u2;s2.walkTokens&&await Promise.all(this.walkTokens(c2,s2.walkTokens));let h2=await(s2.hooks?await s2.hooks.provideParser():e2?b$1.parse:b$1.parseInline)(c2,s2);return s2.hooks?await s2.hooks.postprocess(h2):h2})().catch(a2);try{s2.hooks&&(n2=s2.hooks.preprocess(n2));let p2=(s2.hooks?s2.hooks.provideLexer():e2?x$1.lex:x$1.lexInline)(n2,s2);s2.hooks&&(p2=s2.hooks.processAllTokens(p2)),s2.walkTokens&&this.walkTokens(p2,s2.walkTokens);let c2=(s2.hooks?s2.hooks.provideParser():e2?b$1.parse:b$1.parseInline)(p2,s2);return s2.hooks&&(c2=s2.hooks.postprocess(c2)),c2}catch(o2){return a2(o2)}}}onError(e2,t2){return n2=>{if(n2.message+=`
217
+ Please report this to https://github.com/markedjs/marked.`,e2){let r2="<p>An error occurred:</p><pre>"+w$1(n2.message+"",!0)+"</pre>";return t2?Promise.resolve(r2):r2}if(t2)return Promise.reject(n2);throw n2}}},_$1=new B$1;function k$1(l4,e2){return _$1.parse(l4,e2)}k$1.options=k$1.setOptions=function(l4){return _$1.setOptions(l4),k$1.defaults=_$1.defaults,G$1(k$1.defaults),k$1};k$1.getDefaults=L$1;k$1.defaults=T$1;k$1.use=function(...l4){return _$1.use(...l4),k$1.defaults=_$1.defaults,G$1(k$1.defaults),k$1};k$1.walkTokens=function(l4,e2){return _$1.walkTokens(l4,e2)};k$1.parseInline=_$1.parseInline;k$1.Parser=b$1;k$1.parser=b$1.parse;k$1.Renderer=P$1;k$1.TextRenderer=$$1;k$1.Lexer=x$1;k$1.lexer=x$1.lex;k$1.Tokenizer=y$1;k$1.Hooks=S$1;k$1.parse=k$1;k$1.options;k$1.setOptions;k$1.use;k$1.walkTokens;k$1.parseInline;b$1.parse;x$1.lex;function dedent(templ){for(var values=[],_i=1;_i<arguments.length;_i++)values[_i-1]=arguments[_i];var strings=Array.from(typeof templ=="string"?[templ]:templ);strings[strings.length-1]=strings[strings.length-1].replace(/\r?\n([\t ]*)$/,"");var indentLengths=strings.reduce(function(arr,str2){var matches=str2.match(/\n([\t ]+|(?!\s).)/g);return matches?arr.concat(matches.map(function(match){var _a17,_b;return(_b=(_a17=match.match(/[\t ]/g))===null||_a17===void 0?void 0:_a17.length)!==null&&_b!==void 0?_b:0})):arr},[]);if(indentLengths.length){var pattern_1=new RegExp(`
218
+ [ ]{`+Math.min.apply(Math,indentLengths)+"}","g");strings=strings.map(function(str2){return str2.replace(pattern_1,`
219
+ `)})}strings[0]=strings[0].replace(/^\r?\n/,"");var string=strings[0];return values.forEach(function(value,i2){var endentations=string.match(/(?:^|\n)( *)$/),endentation=endentations?endentations[1]:"",indentedValue=value;typeof value=="string"&&value.includes(`
220
+ `)&&(indentedValue=String(value).split(`
221
+ `).map(function(str2,i3){return i3===0?str2:""+endentation+str2}).join(`
222
+ `)),string+=indentedValue+strings[i2+1]}),string}var unknownIcon={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},iconsStore=new Map,loaderStore=new Map,registerIconPacks=__name(iconLoaders=>{for(const iconLoader of iconLoaders){if(!iconLoader.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(log.debug("Registering icon pack:",iconLoader.name),"loader"in iconLoader)loaderStore.set(iconLoader.name,iconLoader.loader);else if("icons"in iconLoader)iconsStore.set(iconLoader.name,iconLoader.icons);else throw log.error("Invalid icon loader:",iconLoader),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),getRegisteredIconData=__name(async(iconName,fallbackPrefix)=>{const data=stringToIcon(iconName,!0,fallbackPrefix!==void 0);if(!data)throw new Error(`Invalid icon name: ${iconName}`);const prefix=data.prefix||fallbackPrefix;if(!prefix)throw new Error(`Icon name must contain a prefix: ${iconName}`);let icons=iconsStore.get(prefix);if(!icons){const loader32=loaderStore.get(prefix);if(!loader32)throw new Error(`Icon set not found: ${data.prefix}`);try{icons={...await loader32(),prefix},iconsStore.set(prefix,icons)}catch(e2){throw log.error(e2),new Error(`Failed to load icon set: ${data.prefix}`)}}const iconData=getIconData(icons,data.name);if(!iconData)throw new Error(`Icon not found: ${iconName}`);return iconData},"getRegisteredIconData"),isIconAvailable=__name(async iconName=>{try{return await getRegisteredIconData(iconName),!0}catch{return!1}},"isIconAvailable"),getIconSVG=__name(async(iconName,customisations,extraAttributes)=>{let iconData;try{iconData=await getRegisteredIconData(iconName,customisations==null?void 0:customisations.fallbackPrefix)}catch(e2){log.error(e2),iconData=unknownIcon}const renderData=iconToSVG(iconData,customisations),svg=iconToHTML(replaceIDs(renderData.body),{...renderData.attributes,...extraAttributes});return sanitizeText(svg,getConfig())},"getIconSVG");function preprocessMarkdown(markdown,{markdownAutoWrap}){const withoutMultipleNewlines=markdown.replace(/<br\/>/g,`
223
+ `).replace(/\n{2,}/g,`
224
+ `);return dedent(withoutMultipleNewlines)}__name(preprocessMarkdown,"preprocessMarkdown");function nonMarkdownToLines(nonMarkdownText){return nonMarkdownText.split(/\\n|\n|<br\s*\/?>/gi).map(line2=>{var _a17;return((_a17=line2.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:_a17.map(word=>({content:word,type:"normal"})))??[]})}__name(nonMarkdownToLines,"nonMarkdownToLines");function markdownToLines(markdown,config2={}){const preprocessedMarkdown=preprocessMarkdown(markdown,config2),nodes=k$1.lexer(preprocessedMarkdown),lines=[[]];let currentLine=0;function processNode(node,parentType="normal"){node.type==="text"?node.text.split(`
225
+ `).forEach((textLine,index)=>{index!==0&&(currentLine++,lines.push([])),textLine.split(" ").forEach(word=>{word=word.replace(/&#39;/g,"'"),word&&lines[currentLine].push({content:word,type:parentType})})}):node.type==="strong"||node.type==="em"?node.tokens.forEach(contentNode=>{processNode(contentNode,node.type)}):node.type==="html"&&lines[currentLine].push({content:node.text,type:"normal"})}return __name(processNode,"processNode"),nodes.forEach(treeNode=>{var _a17;treeNode.type==="paragraph"?(_a17=treeNode.tokens)==null||_a17.forEach(contentNode=>{processNode(contentNode)}):treeNode.type==="html"?lines[currentLine].push({content:treeNode.text,type:"normal"}):lines[currentLine].push({content:treeNode.raw,type:"normal"})}),lines}__name(markdownToLines,"markdownToLines");function nonMarkdownToHTML(text2){return text2?`<p>${text2.replace(/\\n|\n/g,"<br />")}</p>`:""}__name(nonMarkdownToHTML,"nonMarkdownToHTML");function markdownToHTML(markdown,{markdownAutoWrap}={}){const nodes=k$1.lexer(markdown);function output(node){var _a17,_b,_c;return node.type==="text"?markdownAutoWrap===!1?node.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):node.text.replace(/\n */g,"<br/>"):node.type==="strong"?`<strong>${(_a17=node.tokens)==null?void 0:_a17.map(output).join("")}</strong>`:node.type==="em"?`<em>${(_b=node.tokens)==null?void 0:_b.map(output).join("")}</em>`:node.type==="paragraph"?`<p>${(_c=node.tokens)==null?void 0:_c.map(output).join("")}</p>`:node.type==="space"?"":node.type==="html"?`${node.text}`:node.type==="escape"?node.text:(log.warn(`Unsupported markdown: ${node.type}`),node.raw)}return __name(output,"output"),nodes.map(output).join("")}__name(markdownToHTML,"markdownToHTML");function splitTextToChars(text2){return Intl.Segmenter?[...new Intl.Segmenter().segment(text2)].map(s2=>s2.segment):[...text2]}__name(splitTextToChars,"splitTextToChars");function splitWordToFitWidth(checkFit,word){const characters=splitTextToChars(word.content);return splitWordToFitWidthRecursion(checkFit,[],characters,word.type)}__name(splitWordToFitWidth,"splitWordToFitWidth");function splitWordToFitWidthRecursion(checkFit,usedChars,remainingChars,type2){if(remainingChars.length===0)return[{content:usedChars.join(""),type:type2},{content:"",type:type2}];const[nextChar,...rest]=remainingChars,newWord=[...usedChars,nextChar];return checkFit([{content:newWord.join(""),type:type2}])?splitWordToFitWidthRecursion(checkFit,newWord,rest,type2):(usedChars.length===0&&nextChar&&(usedChars.push(nextChar),remainingChars.shift()),[{content:usedChars.join(""),type:type2},{content:remainingChars.join(""),type:type2}])}__name(splitWordToFitWidthRecursion,"splitWordToFitWidthRecursion");function splitLineToFitWidth(line2,checkFit){if(line2.some(({content})=>content.includes(`
226
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return splitLineToFitWidthRecursion(line2,checkFit)}__name(splitLineToFitWidth,"splitLineToFitWidth");function splitLineToFitWidthRecursion(words,checkFit,lines=[],newLine=[]){if(words.length===0)return newLine.length>0&&lines.push(newLine),lines.length>0?lines:[];let joiner="";words[0].content===" "&&(joiner=" ",words.shift());const nextWord=words.shift()??{content:" ",type:"normal"},lineWithNextWord=[...newLine];if(joiner!==""&&lineWithNextWord.push({content:joiner,type:"normal"}),lineWithNextWord.push(nextWord),checkFit(lineWithNextWord))return splitLineToFitWidthRecursion(words,checkFit,lines,lineWithNextWord);if(newLine.length>0)lines.push(newLine),words.unshift(nextWord);else if(nextWord.content){const[line2,rest]=splitWordToFitWidth(checkFit,nextWord);lines.push([line2]),rest.content&&words.unshift(rest)}return splitLineToFitWidthRecursion(words,checkFit,lines)}__name(splitLineToFitWidthRecursion,"splitLineToFitWidthRecursion");function applyStyle(dom,styleFn){styleFn&&dom.attr("style",styleFn)}__name(applyStyle,"applyStyle");var maxSafeSizeForWidth=16384;async function addHtmlSpan(element,node,width,classes,addBackground=!1,config2=getConfig()){const fo=element.append("foreignObject");fo.attr("width",`${Math.min(10*width,maxSafeSizeForWidth)}px`),fo.attr("height",`${Math.min(10*width,maxSafeSizeForWidth)}px`);const div=fo.append("xhtml:div"),sanitizedLabel=hasKatex(node.label)?await renderKatexSanitized(node.label.replace(common_default.lineBreakRegex,`
227
+ `),config2):sanitizeText(node.label,config2),labelClass=node.isNode?"nodeLabel":"edgeLabel",span=div.append("span");span.html(sanitizedLabel),applyStyle(span,node.labelStyle),span.attr("class",`${labelClass} ${classes}`),applyStyle(div,node.labelStyle),div.style("display","table-cell"),div.style("white-space","nowrap"),div.style("line-height","1.5"),width!==Number.POSITIVE_INFINITY&&(div.style("max-width",width+"px"),div.style("text-align","center")),div.attr("xmlns","http://www.w3.org/1999/xhtml"),addBackground&&div.attr("class","labelBkg");let bbox=div.node().getBoundingClientRect();return bbox.width===width&&(div.style("display","table"),div.style("white-space","break-spaces"),div.style("width",width+"px"),bbox=div.node().getBoundingClientRect()),fo.node()}__name(addHtmlSpan,"addHtmlSpan");function createTspan(textElement,lineIndex,lineHeight,centerText=!1){const tspan=textElement.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",lineIndex*lineHeight-.1+"em").attr("dy",lineHeight+"em");return centerText&&tspan.attr("text-anchor","middle"),tspan}__name(createTspan,"createTspan");function computeWidthOfText(parentNode,lineHeight,line2){const testElement=parentNode.append("text"),testSpan=createTspan(testElement,1,lineHeight);updateTextContentAndStyles(testSpan,line2);const textLength=testSpan.node().getComputedTextLength();return testElement.remove(),textLength}__name(computeWidthOfText,"computeWidthOfText");function computeDimensionOfText(parentNode,lineHeight,text2){var _a17;const testElement=parentNode.append("text"),testSpan=createTspan(testElement,1,lineHeight);updateTextContentAndStyles(testSpan,[{content:text2,type:"normal"}]);const textDimension=(_a17=testSpan.node())==null?void 0:_a17.getBoundingClientRect();return textDimension&&testElement.remove(),textDimension}__name(computeDimensionOfText,"computeDimensionOfText");function createFormattedText(width,g2,structuredText,addBackground=!1,centerText=!1){const labelGroup=g2.append("g"),bkg=labelGroup.insert("rect").attr("class","background").attr("style","stroke: none"),textElement=labelGroup.append("text").attr("y","-10.1");centerText&&textElement.attr("text-anchor","middle");let lineIndex=0;for(const line2 of structuredText){const checkWidth=__name(line22=>computeWidthOfText(labelGroup,1.1,line22)<=width,"checkWidth"),linesUnderWidth=checkWidth(line2)?[line2]:splitLineToFitWidth(line2,checkWidth);for(const preparedLine of linesUnderWidth){const tspan=createTspan(textElement,lineIndex,1.1,centerText);updateTextContentAndStyles(tspan,preparedLine),lineIndex++}}if(addBackground){const bbox=textElement.node().getBBox(),padding=2;return bkg.attr("x",bbox.x-padding).attr("y",bbox.y-padding).attr("width",bbox.width+2*padding).attr("height",bbox.height+2*padding),labelGroup.node()}else return textElement.node()}__name(createFormattedText,"createFormattedText");function decodeHTMLEntities(text2){const regex2=/&(amp|lt|gt);/g;return text2.replace(regex2,(match,entity)=>{switch(entity){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return match}})}__name(decodeHTMLEntities,"decodeHTMLEntities");function updateTextContentAndStyles(tspan,wrappedLine){tspan.text(""),wrappedLine.forEach((word,index)=>{const innerTspan=tspan.append("tspan").attr("font-style",word.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",word.type==="strong"?"bold":"normal");index===0?innerTspan.text(decodeHTMLEntities(word.content)):innerTspan.text(" "+decodeHTMLEntities(word.content))})}__name(updateTextContentAndStyles,"updateTextContentAndStyles");async function replaceIconSubstring(text2,config2={}){const pendingReplacements=[];text2.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(fullMatch,prefix,iconName)=>(pendingReplacements.push((async()=>{const registeredIconName=`${prefix}:${iconName}`;return await isIconAvailable(registeredIconName)?await getIconSVG(registeredIconName,void 0,{class:"label-icon"}):`<i class='${sanitizeText(fullMatch,config2).replace(":"," ")}'></i>`})()),fullMatch));const replacements=await Promise.all(pendingReplacements);return text2.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>replacements.shift()??"")}__name(replaceIconSubstring,"replaceIconSubstring");var createText=__name(async(el,text2="",{style="",isTitle=!1,classes="",useHtmlLabels=!0,markdown=!0,isNode=!0,width=200,addSvgBackground=!1}={},config2)=>{if(log.debug("XYZ createText",text2,style,isTitle,classes,useHtmlLabels,isNode,"addSvgBackground: ",addSvgBackground),useHtmlLabels){const htmlText=markdown?markdownToHTML(text2,config2):nonMarkdownToHTML(text2),decodedReplacedText=await replaceIconSubstring(decodeEntities(htmlText),config2),inputForKatex=text2.replace(/\\\\/g,"\\"),node={isNode,label:hasKatex(text2)?inputForKatex:decodedReplacedText,labelStyle:style.replace("fill:","color:")};return await addHtmlSpan(el,node,width,classes,addSvgBackground,config2)}else{const sanitizeBR=decodeEntities(text2.replace(/<br\s*\/?>/g,"<br/>")),structuredText=markdown?markdownToLines(sanitizeBR.replace("<br>","<br/>"),config2):nonMarkdownToLines(sanitizeBR),svgLabel=createFormattedText(width,el,structuredText,text2?addSvgBackground:!1,!isNode);if(isNode){/stroke:/.exec(style)&&(style=style.replace("stroke:","lineColor:"));const nodeLabelTextStyle=style.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");select(svgLabel).attr("style",nodeLabelTextStyle)}else{const edgeLabelRectStyle=style.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");select(svgLabel).select("rect").attr("style",edgeLabelRectStyle.replace(/background:/g,"fill:"));const edgeLabelTextStyle=style.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");select(svgLabel).select("text").attr("style",edgeLabelTextStyle)}return isTitle?select(svgLabel).selectAll("tspan.text-outer-tspan").classed("title-row",!0):select(svgLabel).selectAll("tspan.text-outer-tspan").classed("row",!0),svgLabel}},"createText");function t(t2,e2,s2){if(t2&&t2.length){const[n2,o2]=e2,a2=Math.PI/180*s2,h2=Math.cos(a2),r2=Math.sin(a2);for(const e3 of t2){const[t3,s3]=e3;e3[0]=(t3-n2)*h2-(s3-o2)*r2+n2,e3[1]=(t3-n2)*r2+(s3-o2)*h2+o2}}}function e(t2,e2){return t2[0]===e2[0]&&t2[1]===e2[1]}function s(s2,n2,o2,a2=1){const h2=o2,r2=Math.max(n2,.1),i2=s2[0]&&s2[0][0]&&typeof s2[0][0]=="number"?[s2]:s2,c2=[0,0];if(h2)for(const e2 of i2)t(e2,c2,h2);const l4=(function(t2,s3,n3){const o3=[];for(const s4 of t2){const t3=[...s4];e(t3[0],t3[t3.length-1])||t3.push([t3[0][0],t3[0][1]]),t3.length>2&&o3.push(t3)}const a3=[];s3=Math.max(s3,.1);const h3=[];for(const t3 of o3)for(let e2=0;e2<t3.length-1;e2++){const s4=t3[e2],n4=t3[e2+1];if(s4[1]!==n4[1]){const t4=Math.min(s4[1],n4[1]);h3.push({ymin:t4,ymax:Math.max(s4[1],n4[1]),x:t4===s4[1]?s4[0]:n4[0],islope:(n4[0]-s4[0])/(n4[1]-s4[1])})}}if(h3.sort(((t3,e2)=>t3.ymin<e2.ymin?-1:t3.ymin>e2.ymin?1:t3.x<e2.x?-1:t3.x>e2.x?1:t3.ymax===e2.ymax?0:(t3.ymax-e2.ymax)/Math.abs(t3.ymax-e2.ymax))),!h3.length)return a3;let r3=[],i3=h3[0].ymin,c3=0;for(;r3.length||h3.length;){if(h3.length){let t3=-1;for(let e2=0;e2<h3.length&&!(h3[e2].ymin>i3);e2++)t3=e2;h3.splice(0,t3+1).forEach((t4=>{r3.push({s:i3,edge:t4})}))}if(r3=r3.filter((t3=>!(t3.edge.ymax<=i3))),r3.sort(((t3,e2)=>t3.edge.x===e2.edge.x?0:(t3.edge.x-e2.edge.x)/Math.abs(t3.edge.x-e2.edge.x))),(n3!==1||c3%s3==0)&&r3.length>1)for(let t3=0;t3<r3.length;t3+=2){const e2=t3+1;if(e2>=r3.length)break;const s4=r3[t3].edge,n4=r3[e2].edge;a3.push([[Math.round(s4.x),i3],[Math.round(n4.x),i3]])}i3+=n3,r3.forEach((t3=>{t3.edge.x=t3.edge.x+n3*t3.edge.islope})),c3++}return a3})(i2,r2,a2);if(h2){for(const e2 of i2)t(e2,c2,-h2);(function(e2,s3,n3){const o3=[];e2.forEach((t2=>o3.push(...t2))),t(o3,s3,n3)})(l4,c2,-h2)}return l4}function n(t2,e2){var n2;const o2=e2.hachureAngle+90;let a2=e2.hachureGap;a2<0&&(a2=4*e2.strokeWidth),a2=Math.round(Math.max(a2,.1));let h2=1;return e2.roughness>=1&&(((n2=e2.randomizer)===null||n2===void 0?void 0:n2.next())||Math.random())>.7&&(h2=a2),s(t2,a2,o2,h2||1)}class o{constructor(t2){this.helper=t2}fillPolygons(t2,e2){return this._fillPolygons(t2,e2)}_fillPolygons(t2,e2){const s2=n(t2,e2);return{type:"fillSketch",ops:this.renderLines(s2,e2)}}renderLines(t2,e2){const s2=[];for(const n2 of t2)s2.push(...this.helper.doubleLineOps(n2[0][0],n2[0][1],n2[1][0],n2[1][1],e2));return s2}}function a(t2){const e2=t2[0],s2=t2[1];return Math.sqrt(Math.pow(e2[0]-s2[0],2)+Math.pow(e2[1]-s2[1],2))}class h extends o{fillPolygons(t2,e2){let s2=e2.hachureGap;s2<0&&(s2=4*e2.strokeWidth),s2=Math.max(s2,.1);const o2=n(t2,Object.assign({},e2,{hachureGap:s2})),h2=Math.PI/180*e2.hachureAngle,r2=[],i2=.5*s2*Math.cos(h2),c2=.5*s2*Math.sin(h2);for(const[t3,e3]of o2)a([t3,e3])&&r2.push([[t3[0]-i2,t3[1]+c2],[...e3]],[[t3[0]+i2,t3[1]-c2],[...e3]]);return{type:"fillSketch",ops:this.renderLines(r2,e2)}}}class r extends o{fillPolygons(t2,e2){const s2=this._fillPolygons(t2,e2),n2=Object.assign({},e2,{hachureAngle:e2.hachureAngle+90}),o2=this._fillPolygons(t2,n2);return s2.ops=s2.ops.concat(o2.ops),s2}}class i{constructor(t2){this.helper=t2}fillPolygons(t2,e2){const s2=n(t2,e2=Object.assign({},e2,{hachureAngle:0}));return this.dotsOnLines(s2,e2)}dotsOnLines(t2,e2){const s2=[];let n2=e2.hachureGap;n2<0&&(n2=4*e2.strokeWidth),n2=Math.max(n2,.1);let o2=e2.fillWeight;o2<0&&(o2=e2.strokeWidth/2);const h2=n2/4;for(const r2 of t2){const t3=a(r2),i2=t3/n2,c2=Math.ceil(i2)-1,l4=t3-c2*n2,u2=(r2[0][0]+r2[1][0])/2-n2/4,p2=Math.min(r2[0][1],r2[1][1]);for(let t4=0;t4<c2;t4++){const a2=p2+l4+t4*n2,r3=u2-h2+2*Math.random()*h2,i3=a2-h2+2*Math.random()*h2,c3=this.helper.ellipse(r3,i3,o2,o2,e2);s2.push(...c3.ops)}}return{type:"fillSketch",ops:s2}}}class c{constructor(t2){this.helper=t2}fillPolygons(t2,e2){const s2=n(t2,e2);return{type:"fillSketch",ops:this.dashedLine(s2,e2)}}dashedLine(t2,e2){const s2=e2.dashOffset<0?e2.hachureGap<0?4*e2.strokeWidth:e2.hachureGap:e2.dashOffset,n2=e2.dashGap<0?e2.hachureGap<0?4*e2.strokeWidth:e2.hachureGap:e2.dashGap,o2=[];return t2.forEach((t3=>{const h2=a(t3),r2=Math.floor(h2/(s2+n2)),i2=(h2+n2-r2*(s2+n2))/2;let c2=t3[0],l4=t3[1];c2[0]>l4[0]&&(c2=t3[1],l4=t3[0]);const u2=Math.atan((l4[1]-c2[1])/(l4[0]-c2[0]));for(let t4=0;t4<r2;t4++){const a2=t4*(s2+n2),h3=a2+s2,r3=[c2[0]+a2*Math.cos(u2)+i2*Math.cos(u2),c2[1]+a2*Math.sin(u2)+i2*Math.sin(u2)],l5=[c2[0]+h3*Math.cos(u2)+i2*Math.cos(u2),c2[1]+h3*Math.sin(u2)+i2*Math.sin(u2)];o2.push(...this.helper.doubleLineOps(r3[0],r3[1],l5[0],l5[1],e2))}})),o2}}class l3{constructor(t2){this.helper=t2}fillPolygons(t2,e2){const s2=e2.hachureGap<0?4*e2.strokeWidth:e2.hachureGap,o2=e2.zigzagOffset<0?s2:e2.zigzagOffset,a2=n(t2,e2=Object.assign({},e2,{hachureGap:s2+o2}));return{type:"fillSketch",ops:this.zigzagLines(a2,o2,e2)}}zigzagLines(t2,e2,s2){const n2=[];return t2.forEach((t3=>{const o2=a(t3),h2=Math.round(o2/(2*e2));let r2=t3[0],i2=t3[1];r2[0]>i2[0]&&(r2=t3[1],i2=t3[0]);const c2=Math.atan((i2[1]-r2[1])/(i2[0]-r2[0]));for(let t4=0;t4<h2;t4++){const o3=2*t4*e2,a2=2*(t4+1)*e2,h3=Math.sqrt(2*Math.pow(e2,2)),i3=[r2[0]+o3*Math.cos(c2),r2[1]+o3*Math.sin(c2)],l4=[r2[0]+a2*Math.cos(c2),r2[1]+a2*Math.sin(c2)],u2=[i3[0]+h3*Math.cos(c2+Math.PI/4),i3[1]+h3*Math.sin(c2+Math.PI/4)];n2.push(...this.helper.doubleLineOps(i3[0],i3[1],u2[0],u2[1],s2),...this.helper.doubleLineOps(u2[0],u2[1],l4[0],l4[1],s2))}})),n2}}const u={};class p{constructor(t2){this.seed=t2}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const f=0,d=1,g=2,M={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 k(t2,e2){return t2.type===e2}function b(t2){const e2=[],s2=(function(t3){const e3=new Array;for(;t3!=="";)if(t3.match(/^([ \t\r\n,]+)/))t3=t3.substr(RegExp.$1.length);else if(t3.match(/^([aAcChHlLmMqQsStTvVzZ])/))e3[e3.length]={type:f,text:RegExp.$1},t3=t3.substr(RegExp.$1.length);else{if(!t3.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e3[e3.length]={type:d,text:`${parseFloat(RegExp.$1)}`},t3=t3.substr(RegExp.$1.length)}return e3[e3.length]={type:g,text:""},e3})(t2);let n2="BOD",o2=0,a2=s2[o2];for(;!k(a2,g);){let h2=0;const r2=[];if(n2==="BOD"){if(a2.text!=="M"&&a2.text!=="m")return b("M0,0"+t2);o2++,h2=M[a2.text],n2=a2.text}else k(a2,d)?h2=M[n2]:(o2++,h2=M[a2.text],n2=a2.text);if(!(o2+h2<s2.length))throw new Error("Path data ended short");for(let t3=o2;t3<o2+h2;t3++){const e3=s2[t3];if(!k(e3,d))throw new Error("Param not a number: "+n2+","+e3.text);r2[r2.length]=+e3.text}if(typeof M[n2]!="number")throw new Error("Bad segment: "+n2);{const t3={key:n2,data:r2};e2.push(t3),o2+=h2,a2=s2[o2],n2==="M"&&(n2="L"),n2==="m"&&(n2="l")}}return e2}function y2(t2){let e2=0,s2=0,n2=0,o2=0;const a2=[];for(const{key:h2,data:r2}of t2)switch(h2){case"M":a2.push({key:"M",data:[...r2]}),[e2,s2]=r2,[n2,o2]=r2;break;case"m":e2+=r2[0],s2+=r2[1],a2.push({key:"M",data:[e2,s2]}),n2=e2,o2=s2;break;case"L":a2.push({key:"L",data:[...r2]}),[e2,s2]=r2;break;case"l":e2+=r2[0],s2+=r2[1],a2.push({key:"L",data:[e2,s2]});break;case"C":a2.push({key:"C",data:[...r2]}),e2=r2[4],s2=r2[5];break;case"c":{const t3=r2.map(((t4,n3)=>n3%2?t4+s2:t4+e2));a2.push({key:"C",data:t3}),e2=t3[4],s2=t3[5];break}case"Q":a2.push({key:"Q",data:[...r2]}),e2=r2[2],s2=r2[3];break;case"q":{const t3=r2.map(((t4,n3)=>n3%2?t4+s2:t4+e2));a2.push({key:"Q",data:t3}),e2=t3[2],s2=t3[3];break}case"A":a2.push({key:"A",data:[...r2]}),e2=r2[5],s2=r2[6];break;case"a":e2+=r2[5],s2+=r2[6],a2.push({key:"A",data:[r2[0],r2[1],r2[2],r2[3],r2[4],e2,s2]});break;case"H":a2.push({key:"H",data:[...r2]}),e2=r2[0];break;case"h":e2+=r2[0],a2.push({key:"H",data:[e2]});break;case"V":a2.push({key:"V",data:[...r2]}),s2=r2[0];break;case"v":s2+=r2[0],a2.push({key:"V",data:[s2]});break;case"S":a2.push({key:"S",data:[...r2]}),e2=r2[2],s2=r2[3];break;case"s":{const t3=r2.map(((t4,n3)=>n3%2?t4+s2:t4+e2));a2.push({key:"S",data:t3}),e2=t3[2],s2=t3[3];break}case"T":a2.push({key:"T",data:[...r2]}),e2=r2[0],s2=r2[1];break;case"t":e2+=r2[0],s2+=r2[1],a2.push({key:"T",data:[e2,s2]});break;case"Z":case"z":a2.push({key:"Z",data:[]}),e2=n2,s2=o2}return a2}function m(t2){const e2=[];let s2="",n2=0,o2=0,a2=0,h2=0,r2=0,i2=0;for(const{key:c2,data:l4}of t2){switch(c2){case"M":e2.push({key:"M",data:[...l4]}),[n2,o2]=l4,[a2,h2]=l4;break;case"C":e2.push({key:"C",data:[...l4]}),n2=l4[4],o2=l4[5],r2=l4[2],i2=l4[3];break;case"L":e2.push({key:"L",data:[...l4]}),[n2,o2]=l4;break;case"H":n2=l4[0],e2.push({key:"L",data:[n2,o2]});break;case"V":o2=l4[0],e2.push({key:"L",data:[n2,o2]});break;case"S":{let t3=0,a3=0;s2==="C"||s2==="S"?(t3=n2+(n2-r2),a3=o2+(o2-i2)):(t3=n2,a3=o2),e2.push({key:"C",data:[t3,a3,...l4]}),r2=l4[0],i2=l4[1],n2=l4[2],o2=l4[3];break}case"T":{const[t3,a3]=l4;let h3=0,c3=0;s2==="Q"||s2==="T"?(h3=n2+(n2-r2),c3=o2+(o2-i2)):(h3=n2,c3=o2);const u2=n2+2*(h3-n2)/3,p2=o2+2*(c3-o2)/3,f2=t3+2*(h3-t3)/3,d2=a3+2*(c3-a3)/3;e2.push({key:"C",data:[u2,p2,f2,d2,t3,a3]}),r2=h3,i2=c3,n2=t3,o2=a3;break}case"Q":{const[t3,s3,a3,h3]=l4,c3=n2+2*(t3-n2)/3,u2=o2+2*(s3-o2)/3,p2=a3+2*(t3-a3)/3,f2=h3+2*(s3-h3)/3;e2.push({key:"C",data:[c3,u2,p2,f2,a3,h3]}),r2=t3,i2=s3,n2=a3,o2=h3;break}case"A":{const t3=Math.abs(l4[0]),s3=Math.abs(l4[1]),a3=l4[2],h3=l4[3],r3=l4[4],i3=l4[5],c3=l4[6];t3===0||s3===0?(e2.push({key:"C",data:[n2,o2,i3,c3,i3,c3]}),n2=i3,o2=c3):(n2!==i3||o2!==c3)&&(x(n2,o2,i3,c3,t3,s3,a3,h3,r3).forEach((function(t4){e2.push({key:"C",data:t4})})),n2=i3,o2=c3);break}case"Z":e2.push({key:"Z",data:[]}),n2=a2,o2=h2}s2=c2}return e2}function w(t2,e2,s2){return[t2*Math.cos(s2)-e2*Math.sin(s2),t2*Math.sin(s2)+e2*Math.cos(s2)]}function x(t2,e2,s2,n2,o2,a2,h2,r2,i2,c2){const l4=(u2=h2,Math.PI*u2/180);var u2;let p2=[],f2=0,d2=0,g2=0,M2=0;if(c2)[f2,d2,g2,M2]=c2;else{[t2,e2]=w(t2,e2,-l4),[s2,n2]=w(s2,n2,-l4);const h3=(t2-s2)/2,c3=(e2-n2)/2;let u3=h3*h3/(o2*o2)+c3*c3/(a2*a2);u3>1&&(u3=Math.sqrt(u3),o2*=u3,a2*=u3);const p3=o2*o2,k3=a2*a2,b3=p3*k3-p3*c3*c3-k3*h3*h3,y4=p3*c3*c3+k3*h3*h3,m3=(r2===i2?-1:1)*Math.sqrt(Math.abs(b3/y4));g2=m3*o2*c3/a2+(t2+s2)/2,M2=m3*-a2*h3/o2+(e2+n2)/2,f2=Math.asin(parseFloat(((e2-M2)/a2).toFixed(9))),d2=Math.asin(parseFloat(((n2-M2)/a2).toFixed(9))),t2<g2&&(f2=Math.PI-f2),s2<g2&&(d2=Math.PI-d2),f2<0&&(f2=2*Math.PI+f2),d2<0&&(d2=2*Math.PI+d2),i2&&f2>d2&&(f2-=2*Math.PI),!i2&&d2>f2&&(d2-=2*Math.PI)}let k2=d2-f2;if(Math.abs(k2)>120*Math.PI/180){const t3=d2,e3=s2,r3=n2;d2=i2&&d2>f2?f2+120*Math.PI/180*1:f2+120*Math.PI/180*-1,p2=x(s2=g2+o2*Math.cos(d2),n2=M2+a2*Math.sin(d2),e3,r3,o2,a2,h2,0,i2,[d2,t3,g2,M2])}k2=d2-f2;const b2=Math.cos(f2),y3=Math.sin(f2),m2=Math.cos(d2),P3=Math.sin(d2),v2=Math.tan(k2/4),S3=4/3*o2*v2,O2=4/3*a2*v2,L2=[t2,e2],T2=[t2+S3*y3,e2-O2*b2],D2=[s2+S3*P3,n2-O2*m2],A2=[s2,n2];if(T2[0]=2*L2[0]-T2[0],T2[1]=2*L2[1]-T2[1],c2)return[T2,D2,A2].concat(p2);{p2=[T2,D2,A2].concat(p2);const t3=[];for(let e3=0;e3<p2.length;e3+=3){const s3=w(p2[e3][0],p2[e3][1],l4),n3=w(p2[e3+1][0],p2[e3+1][1],l4),o3=w(p2[e3+2][0],p2[e3+2][1],l4);t3.push([s3[0],s3[1],n3[0],n3[1],o3[0],o3[1]])}return t3}}const P2={randOffset:function(t2,e2){return G(t2,e2)},randOffsetWithRange:function(t2,e2,s2){return E(t2,e2,s2)},ellipse:function(t2,e2,s2,n2,o2){const a2=T(s2,n2,o2);return D(t2,e2,o2,a2).opset},doubleLineOps:function(t2,e2,s2,n2,o2){return $2(t2,e2,s2,n2,o2,!0)}};function v(t2,e2,s2,n2,o2){return{type:"path",ops:$2(t2,e2,s2,n2,o2)}}function S2(t2,e2,s2){const n2=(t2||[]).length;if(n2>2){const o2=[];for(let e3=0;e3<n2-1;e3++)o2.push(...$2(t2[e3][0],t2[e3][1],t2[e3+1][0],t2[e3+1][1],s2));return e2&&o2.push(...$2(t2[n2-1][0],t2[n2-1][1],t2[0][0],t2[0][1],s2)),{type:"path",ops:o2}}return n2===2?v(t2[0][0],t2[0][1],t2[1][0],t2[1][1],s2):{type:"path",ops:[]}}function O(t2,e2,s2,n2,o2){return(function(t3,e3){return S2(t3,!0,e3)})([[t2,e2],[t2+s2,e2],[t2+s2,e2+n2],[t2,e2+n2]],o2)}function L(t2,e2){if(t2.length){const s2=typeof t2[0][0]=="number"?[t2]:t2,n2=j(s2[0],1*(1+.2*e2.roughness),e2),o2=e2.disableMultiStroke?[]:j(s2[0],1.5*(1+.22*e2.roughness),z(e2));for(let t3=1;t3<s2.length;t3++){const a2=s2[t3];if(a2.length){const t4=j(a2,1*(1+.2*e2.roughness),e2),s3=e2.disableMultiStroke?[]:j(a2,1.5*(1+.22*e2.roughness),z(e2));for(const e3 of t4)e3.op!=="move"&&n2.push(e3);for(const t5 of s3)t5.op!=="move"&&o2.push(t5)}}return{type:"path",ops:n2.concat(o2)}}return{type:"path",ops:[]}}function T(t2,e2,s2){const n2=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t2/2,2)+Math.pow(e2/2,2))/2)),o2=Math.ceil(Math.max(s2.curveStepCount,s2.curveStepCount/Math.sqrt(200)*n2)),a2=2*Math.PI/o2;let h2=Math.abs(t2/2),r2=Math.abs(e2/2);const i2=1-s2.curveFitting;return h2+=G(h2*i2,s2),r2+=G(r2*i2,s2),{increment:a2,rx:h2,ry:r2}}function D(t2,e2,s2,n2){const[o2,a2]=F(n2.increment,t2,e2,n2.rx,n2.ry,1,n2.increment*E(.1,E(.4,1,s2),s2),s2);let h2=q(o2,null,s2);if(!s2.disableMultiStroke&&s2.roughness!==0){const[o3]=F(n2.increment,t2,e2,n2.rx,n2.ry,1.5,0,s2),a3=q(o3,null,s2);h2=h2.concat(a3)}return{estimatedPoints:a2,opset:{type:"path",ops:h2}}}function A(t2,e2,s2,n2,o2,a2,h2,r2,i2){const c2=t2,l4=e2;let u2=Math.abs(s2/2),p2=Math.abs(n2/2);u2+=G(.01*u2,i2),p2+=G(.01*p2,i2);let f2=o2,d2=a2;for(;f2<0;)f2+=2*Math.PI,d2+=2*Math.PI;d2-f2>2*Math.PI&&(f2=0,d2=2*Math.PI);const g2=2*Math.PI/i2.curveStepCount,M2=Math.min(g2/2,(d2-f2)/2),k2=V(M2,c2,l4,u2,p2,f2,d2,1,i2);if(!i2.disableMultiStroke){const t3=V(M2,c2,l4,u2,p2,f2,d2,1.5,i2);k2.push(...t3)}return h2&&(r2?k2.push(...$2(c2,l4,c2+u2*Math.cos(f2),l4+p2*Math.sin(f2),i2),...$2(c2,l4,c2+u2*Math.cos(d2),l4+p2*Math.sin(d2),i2)):k2.push({op:"lineTo",data:[c2,l4]},{op:"lineTo",data:[c2+u2*Math.cos(f2),l4+p2*Math.sin(f2)]})),{type:"path",ops:k2}}function _(t2,e2){const s2=m(y2(b(t2))),n2=[];let o2=[0,0],a2=[0,0];for(const{key:t3,data:h2}of s2)switch(t3){case"M":a2=[h2[0],h2[1]],o2=[h2[0],h2[1]];break;case"L":n2.push(...$2(a2[0],a2[1],h2[0],h2[1],e2)),a2=[h2[0],h2[1]];break;case"C":{const[t4,s3,o3,r2,i2,c2]=h2;n2.push(...Z(t4,s3,o3,r2,i2,c2,a2,e2)),a2=[i2,c2];break}case"Z":n2.push(...$2(a2[0],a2[1],o2[0],o2[1],e2)),a2=[o2[0],o2[1]]}return{type:"path",ops:n2}}function I(t2,e2){const s2=[];for(const n2 of t2)if(n2.length){const t3=e2.maxRandomnessOffset||0,o2=n2.length;if(o2>2){s2.push({op:"move",data:[n2[0][0]+G(t3,e2),n2[0][1]+G(t3,e2)]});for(let a2=1;a2<o2;a2++)s2.push({op:"lineTo",data:[n2[a2][0]+G(t3,e2),n2[a2][1]+G(t3,e2)]})}}return{type:"fillPath",ops:s2}}function C(t2,e2){return(function(t3,e3){let s2=t3.fillStyle||"hachure";if(!u[s2])switch(s2){case"zigzag":u[s2]||(u[s2]=new h(e3));break;case"cross-hatch":u[s2]||(u[s2]=new r(e3));break;case"dots":u[s2]||(u[s2]=new i(e3));break;case"dashed":u[s2]||(u[s2]=new c(e3));break;case"zigzag-line":u[s2]||(u[s2]=new l3(e3));break;default:s2="hachure",u[s2]||(u[s2]=new o(e3))}return u[s2]})(e2,P2).fillPolygons(t2,e2)}function z(t2){const e2=Object.assign({},t2);return e2.randomizer=void 0,t2.seed&&(e2.seed=t2.seed+1),e2}function W(t2){return t2.randomizer||(t2.randomizer=new p(t2.seed||0)),t2.randomizer.next()}function E(t2,e2,s2,n2=1){return s2.roughness*n2*(W(s2)*(e2-t2)+t2)}function G(t2,e2,s2=1){return E(-t2,t2,e2,s2)}function $2(t2,e2,s2,n2,o2,a2=!1){const h2=a2?o2.disableMultiStrokeFill:o2.disableMultiStroke,r2=R(t2,e2,s2,n2,o2,!0,!1);if(h2)return r2;const i2=R(t2,e2,s2,n2,o2,!0,!0);return r2.concat(i2)}function R(t2,e2,s2,n2,o2,a2,h2){const r2=Math.pow(t2-s2,2)+Math.pow(e2-n2,2),i2=Math.sqrt(r2);let c2=1;c2=i2<200?1:i2>500?.4:-.0016668*i2+1.233334;let l4=o2.maxRandomnessOffset||0;l4*l4*100>r2&&(l4=i2/10);const u2=l4/2,p2=.2+.2*W(o2);let f2=o2.bowing*o2.maxRandomnessOffset*(n2-e2)/200,d2=o2.bowing*o2.maxRandomnessOffset*(t2-s2)/200;f2=G(f2,o2,c2),d2=G(d2,o2,c2);const g2=[],M2=()=>G(u2,o2,c2),k2=()=>G(l4,o2,c2),b2=o2.preserveVertices;return h2?g2.push({op:"move",data:[t2+(b2?0:M2()),e2+(b2?0:M2())]}):g2.push({op:"move",data:[t2+(b2?0:G(l4,o2,c2)),e2+(b2?0:G(l4,o2,c2))]}),h2?g2.push({op:"bcurveTo",data:[f2+t2+(s2-t2)*p2+M2(),d2+e2+(n2-e2)*p2+M2(),f2+t2+2*(s2-t2)*p2+M2(),d2+e2+2*(n2-e2)*p2+M2(),s2+(b2?0:M2()),n2+(b2?0:M2())]}):g2.push({op:"bcurveTo",data:[f2+t2+(s2-t2)*p2+k2(),d2+e2+(n2-e2)*p2+k2(),f2+t2+2*(s2-t2)*p2+k2(),d2+e2+2*(n2-e2)*p2+k2(),s2+(b2?0:k2()),n2+(b2?0:k2())]}),g2}function j(t2,e2,s2){if(!t2.length)return[];const n2=[];n2.push([t2[0][0]+G(e2,s2),t2[0][1]+G(e2,s2)]),n2.push([t2[0][0]+G(e2,s2),t2[0][1]+G(e2,s2)]);for(let o2=1;o2<t2.length;o2++)n2.push([t2[o2][0]+G(e2,s2),t2[o2][1]+G(e2,s2)]),o2===t2.length-1&&n2.push([t2[o2][0]+G(e2,s2),t2[o2][1]+G(e2,s2)]);return q(n2,null,s2)}function q(t2,e2,s2){const n2=t2.length,o2=[];if(n2>3){const a2=[],h2=1-s2.curveTightness;o2.push({op:"move",data:[t2[1][0],t2[1][1]]});for(let e3=1;e3+2<n2;e3++){const s3=t2[e3];a2[0]=[s3[0],s3[1]],a2[1]=[s3[0]+(h2*t2[e3+1][0]-h2*t2[e3-1][0])/6,s3[1]+(h2*t2[e3+1][1]-h2*t2[e3-1][1])/6],a2[2]=[t2[e3+1][0]+(h2*t2[e3][0]-h2*t2[e3+2][0])/6,t2[e3+1][1]+(h2*t2[e3][1]-h2*t2[e3+2][1])/6],a2[3]=[t2[e3+1][0],t2[e3+1][1]],o2.push({op:"bcurveTo",data:[a2[1][0],a2[1][1],a2[2][0],a2[2][1],a2[3][0],a2[3][1]]})}}else n2===3?(o2.push({op:"move",data:[t2[1][0],t2[1][1]]}),o2.push({op:"bcurveTo",data:[t2[1][0],t2[1][1],t2[2][0],t2[2][1],t2[2][0],t2[2][1]]})):n2===2&&o2.push(...R(t2[0][0],t2[0][1],t2[1][0],t2[1][1],s2,!0,!0));return o2}function F(t2,e2,s2,n2,o2,a2,h2,r2){const i2=[],c2=[];if(r2.roughness===0){t2/=4,c2.push([e2+n2*Math.cos(-t2),s2+o2*Math.sin(-t2)]);for(let a3=0;a3<=2*Math.PI;a3+=t2){const t3=[e2+n2*Math.cos(a3),s2+o2*Math.sin(a3)];i2.push(t3),c2.push(t3)}c2.push([e2+n2*Math.cos(0),s2+o2*Math.sin(0)]),c2.push([e2+n2*Math.cos(t2),s2+o2*Math.sin(t2)])}else{const l4=G(.5,r2)-Math.PI/2;c2.push([G(a2,r2)+e2+.9*n2*Math.cos(l4-t2),G(a2,r2)+s2+.9*o2*Math.sin(l4-t2)]);const u2=2*Math.PI+l4-.01;for(let h3=l4;h3<u2;h3+=t2){const t3=[G(a2,r2)+e2+n2*Math.cos(h3),G(a2,r2)+s2+o2*Math.sin(h3)];i2.push(t3),c2.push(t3)}c2.push([G(a2,r2)+e2+n2*Math.cos(l4+2*Math.PI+.5*h2),G(a2,r2)+s2+o2*Math.sin(l4+2*Math.PI+.5*h2)]),c2.push([G(a2,r2)+e2+.98*n2*Math.cos(l4+h2),G(a2,r2)+s2+.98*o2*Math.sin(l4+h2)]),c2.push([G(a2,r2)+e2+.9*n2*Math.cos(l4+.5*h2),G(a2,r2)+s2+.9*o2*Math.sin(l4+.5*h2)])}return[c2,i2]}function V(t2,e2,s2,n2,o2,a2,h2,r2,i2){const c2=a2+G(.1,i2),l4=[];l4.push([G(r2,i2)+e2+.9*n2*Math.cos(c2-t2),G(r2,i2)+s2+.9*o2*Math.sin(c2-t2)]);for(let a3=c2;a3<=h2;a3+=t2)l4.push([G(r2,i2)+e2+n2*Math.cos(a3),G(r2,i2)+s2+o2*Math.sin(a3)]);return l4.push([e2+n2*Math.cos(h2),s2+o2*Math.sin(h2)]),l4.push([e2+n2*Math.cos(h2),s2+o2*Math.sin(h2)]),q(l4,null,i2)}function Z(t2,e2,s2,n2,o2,a2,h2,r2){const i2=[],c2=[r2.maxRandomnessOffset||1,(r2.maxRandomnessOffset||1)+.3];let l4=[0,0];const u2=r2.disableMultiStroke?1:2,p2=r2.preserveVertices;for(let f2=0;f2<u2;f2++)f2===0?i2.push({op:"move",data:[h2[0],h2[1]]}):i2.push({op:"move",data:[h2[0]+(p2?0:G(c2[0],r2)),h2[1]+(p2?0:G(c2[0],r2))]}),l4=p2?[o2,a2]:[o2+G(c2[f2],r2),a2+G(c2[f2],r2)],i2.push({op:"bcurveTo",data:[t2+G(c2[f2],r2),e2+G(c2[f2],r2),s2+G(c2[f2],r2),n2+G(c2[f2],r2),l4[0],l4[1]]});return i2}function Q(t2){return[...t2]}function H(t2,e2=0){const s2=t2.length;if(s2<3)throw new Error("A curve must have at least three points.");const n2=[];if(s2===3)n2.push(Q(t2[0]),Q(t2[1]),Q(t2[2]),Q(t2[2]));else{const s3=[];s3.push(t2[0],t2[0]);for(let e3=1;e3<t2.length;e3++)s3.push(t2[e3]),e3===t2.length-1&&s3.push(t2[e3]);const o2=[],a2=1-e2;n2.push(Q(s3[0]));for(let t3=1;t3+2<s3.length;t3++){const e3=s3[t3];o2[0]=[e3[0],e3[1]],o2[1]=[e3[0]+(a2*s3[t3+1][0]-a2*s3[t3-1][0])/6,e3[1]+(a2*s3[t3+1][1]-a2*s3[t3-1][1])/6],o2[2]=[s3[t3+1][0]+(a2*s3[t3][0]-a2*s3[t3+2][0])/6,s3[t3+1][1]+(a2*s3[t3][1]-a2*s3[t3+2][1])/6],o2[3]=[s3[t3+1][0],s3[t3+1][1]],n2.push(o2[1],o2[2],o2[3])}}return n2}function N(t2,e2){return Math.pow(t2[0]-e2[0],2)+Math.pow(t2[1]-e2[1],2)}function B2(t2,e2,s2){const n2=N(e2,s2);if(n2===0)return N(t2,e2);let o2=((t2[0]-e2[0])*(s2[0]-e2[0])+(t2[1]-e2[1])*(s2[1]-e2[1]))/n2;return o2=Math.max(0,Math.min(1,o2)),N(t2,J(e2,s2,o2))}function J(t2,e2,s2){return[t2[0]+(e2[0]-t2[0])*s2,t2[1]+(e2[1]-t2[1])*s2]}function K(t2,e2,s2,n2){const o2=n2||[];if((function(t3,e3){const s3=t3[e3+0],n3=t3[e3+1],o3=t3[e3+2],a3=t3[e3+3];let h3=3*n3[0]-2*s3[0]-a3[0];h3*=h3;let r2=3*n3[1]-2*s3[1]-a3[1];r2*=r2;let i2=3*o3[0]-2*a3[0]-s3[0];i2*=i2;let c2=3*o3[1]-2*a3[1]-s3[1];return c2*=c2,h3<i2&&(h3=i2),r2<c2&&(r2=c2),h3+r2})(t2,e2)<s2){const s3=t2[e2+0];o2.length?(a2=o2[o2.length-1],h2=s3,Math.sqrt(N(a2,h2))>1&&o2.push(s3)):o2.push(s3),o2.push(t2[e2+3])}else{const a3=t2[e2+0],h3=t2[e2+1],r2=t2[e2+2],i2=t2[e2+3],c2=J(a3,h3,.5),l4=J(h3,r2,.5),u2=J(r2,i2,.5),p2=J(c2,l4,.5),f2=J(l4,u2,.5),d2=J(p2,f2,.5);K([a3,c2,p2,d2],0,s2,o2),K([d2,f2,u2,i2],0,s2,o2)}var a2,h2;return o2}function U(t2,e2){return X(t2,0,t2.length,e2)}function X(t2,e2,s2,n2,o2){const a2=o2||[],h2=t2[e2],r2=t2[s2-1];let i2=0,c2=1;for(let n3=e2+1;n3<s2-1;++n3){const e3=B2(t2[n3],h2,r2);e3>i2&&(i2=e3,c2=n3)}return Math.sqrt(i2)>n2?(X(t2,e2,c2+1,n2,a2),X(t2,c2,s2,n2,a2)):(a2.length||a2.push(h2),a2.push(r2)),a2}function Y(t2,e2=.15,s2){const n2=[],o2=(t2.length-1)/3;for(let s3=0;s3<o2;s3++)K(t2,3*s3,e2,n2);return s2&&s2>0?X(n2,0,n2.length,s2):n2}const tt="none";class et{constructor(t2){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=t2||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t2){return t2?Object.assign({},this.defaultOptions,t2):this.defaultOptions}_d(t2,e2,s2){return{shape:t2,sets:e2||[],options:s2||this.defaultOptions}}line(t2,e2,s2,n2,o2){const a2=this._o(o2);return this._d("line",[v(t2,e2,s2,n2,a2)],a2)}rectangle(t2,e2,s2,n2,o2){const a2=this._o(o2),h2=[],r2=O(t2,e2,s2,n2,a2);if(a2.fill){const o3=[[t2,e2],[t2+s2,e2],[t2+s2,e2+n2],[t2,e2+n2]];a2.fillStyle==="solid"?h2.push(I([o3],a2)):h2.push(C([o3],a2))}return a2.stroke!==tt&&h2.push(r2),this._d("rectangle",h2,a2)}ellipse(t2,e2,s2,n2,o2){const a2=this._o(o2),h2=[],r2=T(s2,n2,a2),i2=D(t2,e2,a2,r2);if(a2.fill)if(a2.fillStyle==="solid"){const s3=D(t2,e2,a2,r2).opset;s3.type="fillPath",h2.push(s3)}else h2.push(C([i2.estimatedPoints],a2));return a2.stroke!==tt&&h2.push(i2.opset),this._d("ellipse",h2,a2)}circle(t2,e2,s2,n2){const o2=this.ellipse(t2,e2,s2,s2,n2);return o2.shape="circle",o2}linearPath(t2,e2){const s2=this._o(e2);return this._d("linearPath",[S2(t2,!1,s2)],s2)}arc(t2,e2,s2,n2,o2,a2,h2=!1,r2){const i2=this._o(r2),c2=[],l4=A(t2,e2,s2,n2,o2,a2,h2,!0,i2);if(h2&&i2.fill)if(i2.fillStyle==="solid"){const h3=Object.assign({},i2);h3.disableMultiStroke=!0;const r3=A(t2,e2,s2,n2,o2,a2,!0,!1,h3);r3.type="fillPath",c2.push(r3)}else c2.push((function(t3,e3,s3,n3,o3,a3,h3){const r3=t3,i3=e3;let c3=Math.abs(s3/2),l5=Math.abs(n3/2);c3+=G(.01*c3,h3),l5+=G(.01*l5,h3);let u2=o3,p2=a3;for(;u2<0;)u2+=2*Math.PI,p2+=2*Math.PI;p2-u2>2*Math.PI&&(u2=0,p2=2*Math.PI);const f2=(p2-u2)/h3.curveStepCount,d2=[];for(let t4=u2;t4<=p2;t4+=f2)d2.push([r3+c3*Math.cos(t4),i3+l5*Math.sin(t4)]);return d2.push([r3+c3*Math.cos(p2),i3+l5*Math.sin(p2)]),d2.push([r3,i3]),C([d2],h3)})(t2,e2,s2,n2,o2,a2,i2));return i2.stroke!==tt&&c2.push(l4),this._d("arc",c2,i2)}curve(t2,e2){const s2=this._o(e2),n2=[],o2=L(t2,s2);if(s2.fill&&s2.fill!==tt)if(s2.fillStyle==="solid"){const e3=L(t2,Object.assign(Object.assign({},s2),{disableMultiStroke:!0,roughness:s2.roughness?s2.roughness+s2.fillShapeRoughnessGain:0}));n2.push({type:"fillPath",ops:this._mergedShape(e3.ops)})}else{const e3=[],o3=t2;if(o3.length){const t3=typeof o3[0][0]=="number"?[o3]:o3;for(const n3 of t3)n3.length<3?e3.push(...n3):n3.length===3?e3.push(...Y(H([n3[0],n3[0],n3[1],n3[2]]),10,(1+s2.roughness)/2)):e3.push(...Y(H(n3),10,(1+s2.roughness)/2))}e3.length&&n2.push(C([e3],s2))}return s2.stroke!==tt&&n2.push(o2),this._d("curve",n2,s2)}polygon(t2,e2){const s2=this._o(e2),n2=[],o2=S2(t2,!0,s2);return s2.fill&&(s2.fillStyle==="solid"?n2.push(I([t2],s2)):n2.push(C([t2],s2))),s2.stroke!==tt&&n2.push(o2),this._d("polygon",n2,s2)}path(t2,e2){const s2=this._o(e2),n2=[];if(!t2)return this._d("path",n2,s2);t2=(t2||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o2=s2.fill&&s2.fill!=="transparent"&&s2.fill!==tt,a2=s2.stroke!==tt,h2=!!(s2.simplification&&s2.simplification<1),r2=(function(t3,e3,s3){const n3=m(y2(b(t3))),o3=[];let a3=[],h3=[0,0],r3=[];const i3=()=>{r3.length>=4&&a3.push(...Y(r3,e3)),r3=[]},c2=()=>{i3(),a3.length&&(o3.push(a3),a3=[])};for(const{key:t4,data:e4}of n3)switch(t4){case"M":c2(),h3=[e4[0],e4[1]],a3.push(h3);break;case"L":i3(),a3.push([e4[0],e4[1]]);break;case"C":if(!r3.length){const t5=a3.length?a3[a3.length-1]:h3;r3.push([t5[0],t5[1]])}r3.push([e4[0],e4[1]]),r3.push([e4[2],e4[3]]),r3.push([e4[4],e4[5]]);break;case"Z":i3(),a3.push([h3[0],h3[1]])}if(c2(),!s3)return o3;const l4=[];for(const t4 of o3){const e4=U(t4,s3);e4.length&&l4.push(e4)}return l4})(t2,1,h2?4-4*(s2.simplification||1):(1+s2.roughness)/2),i2=_(t2,s2);if(o2)if(s2.fillStyle==="solid")if(r2.length===1){const e3=_(t2,Object.assign(Object.assign({},s2),{disableMultiStroke:!0,roughness:s2.roughness?s2.roughness+s2.fillShapeRoughnessGain:0}));n2.push({type:"fillPath",ops:this._mergedShape(e3.ops)})}else n2.push(I(r2,s2));else n2.push(C(r2,s2));return a2&&(h2?r2.forEach((t3=>{n2.push(S2(t3,!1,s2))})):n2.push(i2)),this._d("path",n2,s2)}opsToPath(t2,e2){let s2="";for(const n2 of t2.ops){const t3=typeof e2=="number"&&e2>=0?n2.data.map((t4=>+t4.toFixed(e2))):n2.data;switch(n2.op){case"move":s2+=`M${t3[0]} ${t3[1]} `;break;case"bcurveTo":s2+=`C${t3[0]} ${t3[1]}, ${t3[2]} ${t3[3]}, ${t3[4]} ${t3[5]} `;break;case"lineTo":s2+=`L${t3[0]} ${t3[1]} `}}return s2.trim()}toPaths(t2){const e2=t2.sets||[],s2=t2.options||this.defaultOptions,n2=[];for(const t3 of e2){let e3=null;switch(t3.type){case"path":e3={d:this.opsToPath(t3),stroke:s2.stroke,strokeWidth:s2.strokeWidth,fill:tt};break;case"fillPath":e3={d:this.opsToPath(t3),stroke:tt,strokeWidth:0,fill:s2.fill||tt};break;case"fillSketch":e3=this.fillSketch(t3,s2)}e3&&n2.push(e3)}return n2}fillSketch(t2,e2){let s2=e2.fillWeight;return s2<0&&(s2=e2.strokeWidth/2),{d:this.opsToPath(t2),stroke:e2.fill||tt,strokeWidth:s2,fill:tt}}_mergedShape(t2){return t2.filter(((t3,e2)=>e2===0||t3.op!=="move"))}}class st{constructor(t2,e2){this.canvas=t2,this.ctx=this.canvas.getContext("2d"),this.gen=new et(e2)}draw(t2){const e2=t2.sets||[],s2=t2.options||this.getDefaultOptions(),n2=this.ctx,o2=t2.options.fixedDecimalPlaceDigits;for(const a2 of e2)switch(a2.type){case"path":n2.save(),n2.strokeStyle=s2.stroke==="none"?"transparent":s2.stroke,n2.lineWidth=s2.strokeWidth,s2.strokeLineDash&&n2.setLineDash(s2.strokeLineDash),s2.strokeLineDashOffset&&(n2.lineDashOffset=s2.strokeLineDashOffset),this._drawToContext(n2,a2,o2),n2.restore();break;case"fillPath":{n2.save(),n2.fillStyle=s2.fill||"";const e3=t2.shape==="curve"||t2.shape==="polygon"||t2.shape==="path"?"evenodd":"nonzero";this._drawToContext(n2,a2,o2,e3),n2.restore();break}case"fillSketch":this.fillSketch(n2,a2,s2)}}fillSketch(t2,e2,s2){let n2=s2.fillWeight;n2<0&&(n2=s2.strokeWidth/2),t2.save(),s2.fillLineDash&&t2.setLineDash(s2.fillLineDash),s2.fillLineDashOffset&&(t2.lineDashOffset=s2.fillLineDashOffset),t2.strokeStyle=s2.fill||"",t2.lineWidth=n2,this._drawToContext(t2,e2,s2.fixedDecimalPlaceDigits),t2.restore()}_drawToContext(t2,e2,s2,n2="nonzero"){t2.beginPath();for(const n3 of e2.ops){const e3=typeof s2=="number"&&s2>=0?n3.data.map((t3=>+t3.toFixed(s2))):n3.data;switch(n3.op){case"move":t2.moveTo(e3[0],e3[1]);break;case"bcurveTo":t2.bezierCurveTo(e3[0],e3[1],e3[2],e3[3],e3[4],e3[5]);break;case"lineTo":t2.lineTo(e3[0],e3[1])}}e2.type==="fillPath"?t2.fill(n2):t2.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t2,e2,s2,n2,o2){const a2=this.gen.line(t2,e2,s2,n2,o2);return this.draw(a2),a2}rectangle(t2,e2,s2,n2,o2){const a2=this.gen.rectangle(t2,e2,s2,n2,o2);return this.draw(a2),a2}ellipse(t2,e2,s2,n2,o2){const a2=this.gen.ellipse(t2,e2,s2,n2,o2);return this.draw(a2),a2}circle(t2,e2,s2,n2){const o2=this.gen.circle(t2,e2,s2,n2);return this.draw(o2),o2}linearPath(t2,e2){const s2=this.gen.linearPath(t2,e2);return this.draw(s2),s2}polygon(t2,e2){const s2=this.gen.polygon(t2,e2);return this.draw(s2),s2}arc(t2,e2,s2,n2,o2,a2,h2=!1,r2){const i2=this.gen.arc(t2,e2,s2,n2,o2,a2,h2,r2);return this.draw(i2),i2}curve(t2,e2){const s2=this.gen.curve(t2,e2);return this.draw(s2),s2}path(t2,e2){const s2=this.gen.path(t2,e2);return this.draw(s2),s2}}const nt="http://www.w3.org/2000/svg";class ot{constructor(t2,e2){this.svg=t2,this.gen=new et(e2)}draw(t2){const e2=t2.sets||[],s2=t2.options||this.getDefaultOptions(),n2=this.svg.ownerDocument||window.document,o2=n2.createElementNS(nt,"g"),a2=t2.options.fixedDecimalPlaceDigits;for(const h2 of e2){let e3=null;switch(h2.type){case"path":e3=n2.createElementNS(nt,"path"),e3.setAttribute("d",this.opsToPath(h2,a2)),e3.setAttribute("stroke",s2.stroke),e3.setAttribute("stroke-width",s2.strokeWidth+""),e3.setAttribute("fill","none"),s2.strokeLineDash&&e3.setAttribute("stroke-dasharray",s2.strokeLineDash.join(" ").trim()),s2.strokeLineDashOffset&&e3.setAttribute("stroke-dashoffset",`${s2.strokeLineDashOffset}`);break;case"fillPath":e3=n2.createElementNS(nt,"path"),e3.setAttribute("d",this.opsToPath(h2,a2)),e3.setAttribute("stroke","none"),e3.setAttribute("stroke-width","0"),e3.setAttribute("fill",s2.fill||""),t2.shape!=="curve"&&t2.shape!=="polygon"||e3.setAttribute("fill-rule","evenodd");break;case"fillSketch":e3=this.fillSketch(n2,h2,s2)}e3&&o2.appendChild(e3)}return o2}fillSketch(t2,e2,s2){let n2=s2.fillWeight;n2<0&&(n2=s2.strokeWidth/2);const o2=t2.createElementNS(nt,"path");return o2.setAttribute("d",this.opsToPath(e2,s2.fixedDecimalPlaceDigits)),o2.setAttribute("stroke",s2.fill||""),o2.setAttribute("stroke-width",n2+""),o2.setAttribute("fill","none"),s2.fillLineDash&&o2.setAttribute("stroke-dasharray",s2.fillLineDash.join(" ").trim()),s2.fillLineDashOffset&&o2.setAttribute("stroke-dashoffset",`${s2.fillLineDashOffset}`),o2}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t2,e2){return this.gen.opsToPath(t2,e2)}line(t2,e2,s2,n2,o2){const a2=this.gen.line(t2,e2,s2,n2,o2);return this.draw(a2)}rectangle(t2,e2,s2,n2,o2){const a2=this.gen.rectangle(t2,e2,s2,n2,o2);return this.draw(a2)}ellipse(t2,e2,s2,n2,o2){const a2=this.gen.ellipse(t2,e2,s2,n2,o2);return this.draw(a2)}circle(t2,e2,s2,n2){const o2=this.gen.circle(t2,e2,s2,n2);return this.draw(o2)}linearPath(t2,e2){const s2=this.gen.linearPath(t2,e2);return this.draw(s2)}polygon(t2,e2){const s2=this.gen.polygon(t2,e2);return this.draw(s2)}arc(t2,e2,s2,n2,o2,a2,h2=!1,r2){const i2=this.gen.arc(t2,e2,s2,n2,o2,a2,h2,r2);return this.draw(i2)}curve(t2,e2){const s2=this.gen.curve(t2,e2);return this.draw(s2)}path(t2,e2){const s2=this.gen.path(t2,e2);return this.draw(s2)}}var at={canvas:(t2,e2)=>new st(t2,e2),svg:(t2,e2)=>new ot(t2,e2),generator:t2=>new et(t2),newSeed:()=>et.newSeed()},labelHelper=__name(async(parent,node,_classes)=>{var _a17,_b;let cssClasses;const useHtmlLabels=node.useHtmlLabels||evaluate((_a17=getConfig2())==null?void 0:_a17.htmlLabels);_classes?cssClasses=_classes:cssClasses="node default";const shapeSvg=parent.insert("g").attr("class",cssClasses).attr("id",node.domId||node.id),labelEl=shapeSvg.insert("g").attr("class","label").attr("style",handleUndefinedAttr(node.labelStyle));let label;node.label===void 0?label="":label=typeof node.label=="string"?node.label:node.label[0];const addBackground=!!node.icon||!!node.img,isMarkdown=node.labelType==="markdown",text2=await createText(labelEl,sanitizeText(decodeEntities(label),getConfig2()),{useHtmlLabels,width:node.width||((_b=getConfig2().flowchart)==null?void 0:_b.wrappingWidth),classes:isMarkdown?"markdown-node-label":"",style:node.labelStyle,addSvgBackground:addBackground,markdown:isMarkdown},getConfig2());let bbox=text2.getBBox();const halfPadding=((node==null?void 0:node.padding)??0)/2;if(useHtmlLabels){const div=text2.children[0],dv=select(text2);await configureLabelImages(div,label),bbox=div.getBoundingClientRect(),dv.attr("width",bbox.width),dv.attr("height",bbox.height)}return useHtmlLabels?labelEl.attr("transform","translate("+-bbox.width/2+", "+-bbox.height/2+")"):labelEl.attr("transform","translate(0, "+-bbox.height/2+")"),node.centerLabel&&labelEl.attr("transform","translate("+-bbox.width/2+", "+-bbox.height/2+")"),labelEl.insert("rect",":first-child"),{shapeSvg,bbox,halfPadding,label:labelEl}},"labelHelper"),insertLabel=__name(async(parent,label,options)=>{var _a17,_b;const useHtmlLabels=options.useHtmlLabels??getEffectiveHtmlLabels(getConfig2()),labelEl=parent.insert("g").attr("class","label").attr("style",options.labelStyle||""),text2=await createText(labelEl,sanitizeText(decodeEntities(label),getConfig2()),{useHtmlLabels,width:options.width||((_b=(_a17=getConfig2())==null?void 0:_a17.flowchart)==null?void 0:_b.wrappingWidth),style:options.labelStyle,addSvgBackground:!!options.icon||!!options.img});let bbox=text2.getBBox();const halfPadding=options.padding/2;if(getEffectiveHtmlLabels(getConfig2())){const div=text2.children[0],dv=select(text2);bbox=div.getBoundingClientRect(),dv.attr("width",bbox.width),dv.attr("height",bbox.height)}return useHtmlLabels?labelEl.attr("transform","translate("+-bbox.width/2+", "+-bbox.height/2+")"):labelEl.attr("transform","translate(0, "+-bbox.height/2+")"),options.centerLabel&&labelEl.attr("transform","translate("+-bbox.width/2+", "+-bbox.height/2+")"),labelEl.insert("rect",":first-child"),{shapeSvg:parent,bbox,halfPadding,label:labelEl}},"insertLabel"),updateNodeBounds=__name((node,element)=>{const bbox=element.node().getBBox();node.width=bbox.width,node.height=bbox.height},"updateNodeBounds"),getNodeClasses=__name((node,extra)=>(node.look==="handDrawn"?"rough-node":"node")+" "+node.cssClasses+" "+(extra||""),"getNodeClasses");function createPathFromPoints(points){const pointStrings=points.map((p2,i2)=>`${i2===0?"M":"L"}${p2.x},${p2.y}`);return pointStrings.push("Z"),pointStrings.join(" ")}__name(createPathFromPoints,"createPathFromPoints");function generateFullSineWavePoints(x1,y1,x2,y22,amplitude,numCycles){const points=[],deltaX=x2-x1,deltaY=y22-y1,cycleLength=deltaX/numCycles,frequency=2*Math.PI/cycleLength,midY=y1+deltaY/2;for(let i2=0;i2<=50;i2++){const t2=i2/50,x3=x1+t2*deltaX,y3=midY+amplitude*Math.sin(frequency*(x3-x1));points.push({x:x3,y:y3})}return points}__name(generateFullSineWavePoints,"generateFullSineWavePoints");function generateCirclePoints(centerX,centerY,radius,numPoints,startAngle,endAngle){const points=[],startAngleRad=startAngle*Math.PI/180,angleStep=(endAngle*Math.PI/180-startAngleRad)/(numPoints-1);for(let i2=0;i2<numPoints;i2++){const angle=startAngleRad+i2*angleStep,x2=centerX+radius*Math.cos(angle),y3=centerY+radius*Math.sin(angle);points.push({x:-x2,y:-y3})}return points}__name(generateCirclePoints,"generateCirclePoints");function mergePaths(roughElement){const paths=Array.from(roughElement.childNodes).filter(node=>node.tagName==="path"),mergedPath=document.createElementNS("http://www.w3.org/2000/svg","path"),combinedPathData=paths.map(path=>path.getAttribute("d")).filter(d2=>d2!==null).join(" ");mergedPath.setAttribute("d",combinedPathData);const fillPath=paths.find(path=>path.getAttribute("fill")!=="none"),strokePath=paths.find(path=>path.getAttribute("stroke")!=="none"),getAttr=__name((element,attr)=>(element==null?void 0:element.getAttribute(attr))??void 0,"getAttr");if(fillPath){const fillAttrs={fill:getAttr(fillPath,"fill"),"fill-opacity":getAttr(fillPath,"fill-opacity")??"1"};Object.entries(fillAttrs).forEach(([attr,value])=>{value&&mergedPath.setAttribute(attr,value)})}if(strokePath){const strokeAttrs={stroke:getAttr(strokePath,"stroke"),"stroke-width":getAttr(strokePath,"stroke-width")??"1","stroke-opacity":getAttr(strokePath,"stroke-opacity")??"1"};Object.entries(strokeAttrs).forEach(([attr,value])=>{value&&mergedPath.setAttribute(attr,value)})}const group=document.createElementNS("http://www.w3.org/2000/svg","g");return group.appendChild(mergedPath),group}__name(mergePaths,"mergePaths");var intersectRect=__name((node,point2)=>{var x2=node.x,y3=node.y,dx=point2.x-x2,dy=point2.y-y3,w2=node.width/2,h2=node.height/2,sx,sy;return Math.abs(dy)*w2>Math.abs(dx)*h2?(dy<0&&(h2=-h2),sx=dy===0?0:h2*dx/dy,sy=h2):(dx<0&&(w2=-w2),sx=w2,sy=dx===0?0:w2*dy/dx),{x:x2+sx,y:y3+sy}},"intersectRect"),intersect_rect_default=intersectRect,createLabel=__name(async(element,_vertexText,style,isTitle=!1,isNode=!1)=>{let vertexText=_vertexText||"";typeof vertexText=="object"&&(vertexText=vertexText[0]);const config2=getConfig2(),useHtmlLabels=getEffectiveHtmlLabels(config2);return await createText(element,vertexText,{style,isTitle,useHtmlLabels,markdown:!1,isNode,width:Number.POSITIVE_INFINITY},config2)},"createLabel"),createLabel_default=createLabel,createRoundedRectPathD=__name((x2,y3,totalWidth,totalHeight,radius)=>["M",x2+radius,y3,"H",x2+totalWidth-radius,"A",radius,radius,0,0,1,x2+totalWidth,y3+radius,"V",y3+totalHeight-radius,"A",radius,radius,0,0,1,x2+totalWidth-radius,y3+totalHeight,"H",x2+radius,"A",radius,radius,0,0,1,x2,y3+totalHeight-radius,"V",y3+radius,"A",radius,radius,0,0,1,x2+radius,y3,"Z"].join(" "),"createRoundedRectPathD"),rect=__name(async(parent,node)=>{log.info("Creating subgraph rect for ",node.id,node);const siteConfig2=getConfig2(),{themeVariables,handDrawnSeed}=siteConfig2,{clusterBkg,clusterBorder}=themeVariables,{labelStyles,nodeStyles,borderStyles,backgroundStyles}=styles2String(node),shapeSvg=parent.insert("g").attr("class","cluster "+node.cssClasses).attr("id",node.domId).attr("data-look",node.look),useHtmlLabels=getEffectiveHtmlLabels(siteConfig2),labelEl=shapeSvg.insert("g").attr("class","cluster-label ");let text2;node.labelType==="markdown"?text2=await createText(labelEl,node.label,{style:node.labelStyle,useHtmlLabels,isNode:!0,width:node.width}):text2=await createLabel_default(labelEl,node.label,node.labelStyle||"",!1,!0);let bbox=text2.getBBox();if(getEffectiveHtmlLabels(siteConfig2)){const div=text2.children[0],dv=select(text2);bbox=div.getBoundingClientRect(),dv.attr("width",bbox.width),dv.attr("height",bbox.height)}const width=node.width<=bbox.width+node.padding?bbox.width+node.padding:node.width;node.width<=bbox.width+node.padding?node.diff=(width-node.width)/2-node.padding:node.diff=-node.padding;const height=node.height,x2=node.x-width/2,y3=node.y-height/2;log.trace("Data ",node,JSON.stringify(node));let rect2;if(node.look==="handDrawn"){const rc=at.svg(shapeSvg),options=userNodeOverrides(node,{roughness:.7,fill:clusterBkg,stroke:clusterBorder,fillWeight:3,seed:handDrawnSeed}),roughNode=rc.path(createRoundedRectPathD(x2,y3,width,height,0),options);rect2=shapeSvg.insert(()=>(log.debug("Rough node insert CXC",roughNode),roughNode),":first-child"),rect2.select("path:nth-child(2)").attr("style",borderStyles.join(";")),rect2.select("path").attr("style",backgroundStyles.join(";").replace("fill","stroke"))}else rect2=shapeSvg.insert("rect",":first-child"),rect2.attr("style",nodeStyles).attr("rx",node.rx).attr("ry",node.ry).attr("x",x2).attr("y",y3).attr("width",width).attr("height",height);const{subGraphTitleTopMargin}=getSubGraphTitleMargins(siteConfig2);if(labelEl.attr("transform",`translate(${node.x-bbox.width/2}, ${node.y-node.height/2+subGraphTitleTopMargin})`),labelStyles){const span=labelEl.select("span");span&&span.attr("style",labelStyles)}const rectBox=rect2.node().getBBox();return node.offsetX=0,node.width=rectBox.width,node.height=rectBox.height,node.offsetY=bbox.height-node.padding/2,node.intersect=function(point2){return intersect_rect_default(node,point2)},{cluster:shapeSvg,labelBBox:bbox}},"rect"),noteGroup=__name((parent,node)=>{const shapeSvg=parent.insert("g").attr("class","note-cluster").attr("id",node.domId),rect2=shapeSvg.insert("rect",":first-child"),padding=0*node.padding,halfPadding=padding/2;rect2.attr("rx",node.rx).attr("ry",node.ry).attr("x",node.x-node.width/2-halfPadding).attr("y",node.y-node.height/2-halfPadding).attr("width",node.width+padding).attr("height",node.height+padding).attr("fill","none");const rectBox=rect2.node().getBBox();return node.width=rectBox.width,node.height=rectBox.height,node.intersect=function(point2){return intersect_rect_default(node,point2)},{cluster:shapeSvg,labelBBox:{width:0,height:0}}},"noteGroup"),roundedWithTitle=__name(async(parent,node)=>{const siteConfig2=getConfig2(),{themeVariables,handDrawnSeed}=siteConfig2,{altBackground,compositeBackground,compositeTitleBackground,nodeBorder}=themeVariables,shapeSvg=parent.insert("g").attr("class",node.cssClasses).attr("id",node.domId).attr("data-id",node.id).attr("data-look",node.look),outerRectG=shapeSvg.insert("g",":first-child"),label=shapeSvg.insert("g").attr("class","cluster-label");let innerRect=shapeSvg.append("rect");const text2=await createLabel_default(label,node.label,node.labelStyle,void 0,!0);let bbox=text2.getBBox();if(getEffectiveHtmlLabels(siteConfig2)){const div=text2.children[0],dv=select(text2);bbox=div.getBoundingClientRect(),dv.attr("width",bbox.width),dv.attr("height",bbox.height)}const padding=0*node.padding,halfPadding=padding/2,width=(node.width<=bbox.width+node.padding?bbox.width+node.padding:node.width)+padding;node.width<=bbox.width+node.padding?node.diff=(width-node.width)/2-node.padding:node.diff=-node.padding;const height=node.height+padding,innerHeight=node.height+padding-bbox.height-6,x2=node.x-width/2,y3=node.y-height/2;node.width=width;const innerY=node.y-node.height/2-halfPadding+bbox.height+2;let rect2;if(node.look==="handDrawn"){const isAlt=node.cssClasses.includes("statediagram-cluster-alt"),rc=at.svg(shapeSvg),roughOuterNode=node.rx||node.ry?rc.path(createRoundedRectPathD(x2,y3,width,height,10),{roughness:.7,fill:compositeTitleBackground,fillStyle:"solid",stroke:nodeBorder,seed:handDrawnSeed}):rc.rectangle(x2,y3,width,height,{seed:handDrawnSeed});rect2=shapeSvg.insert(()=>roughOuterNode,":first-child");const roughInnerNode=rc.rectangle(x2,innerY,width,innerHeight,{fill:isAlt?altBackground:compositeBackground,fillStyle:isAlt?"hachure":"solid",stroke:nodeBorder,seed:handDrawnSeed});rect2=shapeSvg.insert(()=>roughOuterNode,":first-child"),innerRect=shapeSvg.insert(()=>roughInnerNode)}else rect2=outerRectG.insert("rect",":first-child"),rect2.attr("class","outer").attr("x",x2).attr("y",y3).attr("width",width).attr("height",height).attr("data-look",node.look),innerRect.attr("class","inner").attr("x",x2).attr("y",innerY).attr("width",width).attr("height",innerHeight);label.attr("transform",`translate(${node.x-bbox.width/2}, ${y3+1-(getEffectiveHtmlLabels(siteConfig2)?0:3)})`);const rectBox=rect2.node().getBBox();return node.height=rectBox.height,node.offsetX=0,node.offsetY=bbox.height-node.padding/2,node.labelBBox=bbox,node.intersect=function(point2){return intersect_rect_default(node,point2)},{cluster:shapeSvg,labelBBox:bbox}},"roundedWithTitle"),kanbanSection=__name(async(parent,node)=>{log.info("Creating subgraph rect for ",node.id,node);const siteConfig2=getConfig2(),{themeVariables,handDrawnSeed}=siteConfig2,{clusterBkg,clusterBorder}=themeVariables,{labelStyles,nodeStyles,borderStyles,backgroundStyles}=styles2String(node),shapeSvg=parent.insert("g").attr("class","cluster "+node.cssClasses).attr("id",node.domId).attr("data-look",node.look),useHtmlLabels=getEffectiveHtmlLabels(siteConfig2),labelEl=shapeSvg.insert("g").attr("class","cluster-label "),text2=await createText(labelEl,node.label,{style:node.labelStyle,useHtmlLabels,isNode:!0,width:node.width});let bbox=text2.getBBox();if(getEffectiveHtmlLabels(siteConfig2)){const div=text2.children[0],dv=select(text2);bbox=div.getBoundingClientRect(),dv.attr("width",bbox.width),dv.attr("height",bbox.height)}const width=node.width<=bbox.width+node.padding?bbox.width+node.padding:node.width;node.width<=bbox.width+node.padding?node.diff=(width-node.width)/2-node.padding:node.diff=-node.padding;const height=node.height,x2=node.x-width/2,y3=node.y-height/2;log.trace("Data ",node,JSON.stringify(node));let rect2;if(node.look==="handDrawn"){const rc=at.svg(shapeSvg),options=userNodeOverrides(node,{roughness:.7,fill:clusterBkg,stroke:clusterBorder,fillWeight:4,seed:handDrawnSeed}),roughNode=rc.path(createRoundedRectPathD(x2,y3,width,height,node.rx),options);rect2=shapeSvg.insert(()=>(log.debug("Rough node insert CXC",roughNode),roughNode),":first-child"),rect2.select("path:nth-child(2)").attr("style",borderStyles.join(";")),rect2.select("path").attr("style",backgroundStyles.join(";").replace("fill","stroke"))}else rect2=shapeSvg.insert("rect",":first-child"),rect2.attr("style",nodeStyles).attr("rx",node.rx).attr("ry",node.ry).attr("x",x2).attr("y",y3).attr("width",width).attr("height",height);const{subGraphTitleTopMargin}=getSubGraphTitleMargins(siteConfig2);if(labelEl.attr("transform",`translate(${node.x-bbox.width/2}, ${node.y-node.height/2+subGraphTitleTopMargin})`),labelStyles){const span=labelEl.select("span");span&&span.attr("style",labelStyles)}const rectBox=rect2.node().getBBox();return node.offsetX=0,node.width=rectBox.width,node.height=rectBox.height,node.offsetY=bbox.height-node.padding/2,node.intersect=function(point2){return intersect_rect_default(node,point2)},{cluster:shapeSvg,labelBBox:bbox}},"kanbanSection"),divider=__name((parent,node)=>{const siteConfig2=getConfig2(),{themeVariables,handDrawnSeed}=siteConfig2,{nodeBorder}=themeVariables,shapeSvg=parent.insert("g").attr("class",node.cssClasses).attr("id",node.domId).attr("data-look",node.look),outerRectG=shapeSvg.insert("g",":first-child"),padding=0*node.padding,width=node.width+padding;node.diff=-node.padding;const height=node.height+padding,x2=node.x-width/2,y3=node.y-height/2;node.width=width;let rect2;if(node.look==="handDrawn"){const roughOuterNode=at.svg(shapeSvg).rectangle(x2,y3,width,height,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:nodeBorder,seed:handDrawnSeed});rect2=shapeSvg.insert(()=>roughOuterNode,":first-child")}else{rect2=outerRectG.insert("rect",":first-child");let outerRectClass="outer";node.look,outerRectClass="divider",rect2.attr("class",outerRectClass).attr("x",x2).attr("y",y3).attr("width",width).attr("height",height).attr("data-look",node.look)}const rectBox=rect2.node().getBBox();return node.height=rectBox.height,node.offsetX=0,node.offsetY=0,node.intersect=function(point2){return intersect_rect_default(node,point2)},{cluster:shapeSvg,labelBBox:{}}},"divider"),squareRect=rect,shapes={rect,squareRect,roundedWithTitle,noteGroup,divider,kanbanSection},clusterElems=new Map,insertCluster=__name(async(elem,node)=>{const shape=node.shape||"rect",cluster=await shapes[shape](elem,node);return clusterElems.set(node.id,cluster),cluster},"insertCluster"),clear$1=__name(()=>{clusterElems=new Map},"clear");function intersectNode(node,point2){return node.intersect(point2)}__name(intersectNode,"intersectNode");var intersect_node_default=intersectNode;function intersectEllipse(node,rx,ry,point2){var cx=node.x,cy=node.y,px=cx-point2.x,py=cy-point2.y,det=Math.sqrt(rx*rx*py*py+ry*ry*px*px),dx=Math.abs(rx*ry*px/det);point2.x<cx&&(dx=-dx);var dy=Math.abs(rx*ry*py/det);return point2.y<cy&&(dy=-dy),{x:cx+dx,y:cy+dy}}__name(intersectEllipse,"intersectEllipse");var intersect_ellipse_default=intersectEllipse;function intersectCircle(node,rx,point2){return intersect_ellipse_default(node,rx,rx,point2)}__name(intersectCircle,"intersectCircle");var intersect_circle_default=intersectCircle;function intersectLine(p1,p2,q1,q2){{const a1=p2.y-p1.y,b1=p1.x-p2.x,c1=p2.x*p1.y-p1.x*p2.y,r3=a1*q1.x+b1*q1.y+c1,r4=a1*q2.x+b1*q2.y+c1,epsilon2=1e-6;if(r3!==0&&r4!==0&&sameSign(r3,r4))return;const a2=q2.y-q1.y,b2=q1.x-q2.x,c2=q2.x*q1.y-q1.x*q2.y,r1=a2*p1.x+b2*p1.y+c2,r2=a2*p2.x+b2*p2.y+c2;if(Math.abs(r1)<epsilon2&&Math.abs(r2)<epsilon2&&sameSign(r1,r2))return;const denom=a1*b2-a2*b1;if(denom===0)return;const offset=Math.abs(denom/2);let num=b1*c2-b2*c1;const x2=num<0?(num-offset)/denom:(num+offset)/denom;num=a2*c1-a1*c2;const y3=num<0?(num-offset)/denom:(num+offset)/denom;return{x:x2,y:y3}}}__name(intersectLine,"intersectLine");function sameSign(r1,r2){return r1*r2>0}__name(sameSign,"sameSign");var intersect_line_default=intersectLine;function intersectPolygon(node,polyPoints,point2){let x1=node.x,y1=node.y,intersections=[],minX=Number.POSITIVE_INFINITY,minY=Number.POSITIVE_INFINITY;typeof polyPoints.forEach=="function"?polyPoints.forEach(function(entry){minX=Math.min(minX,entry.x),minY=Math.min(minY,entry.y)}):(minX=Math.min(minX,polyPoints.x),minY=Math.min(minY,polyPoints.y));let left=x1-node.width/2-minX,top=y1-node.height/2-minY;for(let i2=0;i2<polyPoints.length;i2++){let p1=polyPoints[i2],p2=polyPoints[i2<polyPoints.length-1?i2+1:0],intersect=intersect_line_default(node,point2,{x:left+p1.x,y:top+p1.y},{x:left+p2.x,y:top+p2.y});intersect&&intersections.push(intersect)}return intersections.length?(intersections.length>1&&intersections.sort(function(p2,q2){let pdx=p2.x-point2.x,pdy=p2.y-point2.y,distp=Math.sqrt(pdx*pdx+pdy*pdy),qdx=q2.x-point2.x,qdy=q2.y-point2.y,distq=Math.sqrt(qdx*qdx+qdy*qdy);return distp<distq?-1:distp===distq?0:1}),intersections[0]):node}__name(intersectPolygon,"intersectPolygon");var intersect_polygon_default=intersectPolygon,intersect_default={node:intersect_node_default,circle:intersect_circle_default,ellipse:intersect_ellipse_default,polygon:intersect_polygon_default,rect:intersect_rect_default};function anchor(parent,node){const{labelStyles}=styles2String(node);node.labelStyle=labelStyles;const classes=getNodeClasses(node);let cssClasses=classes;classes||(cssClasses="anchor");const shapeSvg=parent.insert("g").attr("class",cssClasses).attr("id",node.domId||node.id),radius=1,{cssStyles}=node,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{fill:"black",stroke:"none",fillStyle:"solid"});node.look!=="handDrawn"&&(options.roughness=0);const roughNode=rc.circle(0,0,radius*2,options),circleElem=shapeSvg.insert(()=>roughNode,":first-child");return circleElem.attr("class","anchor").attr("style",handleUndefinedAttr(cssStyles)),updateNodeBounds(node,circleElem),node.intersect=function(point2){return log.info("Circle intersect",node,radius,point2),intersect_default.circle(node,radius,point2)},shapeSvg}__name(anchor,"anchor");function generateArcPoints(x1,y1,x2,y22,rx,ry,clockwise){const midX=(x1+x2)/2,midY=(y1+y22)/2,angle=Math.atan2(y22-y1,x2-x1),dx=(x2-x1)/2,dy=(y22-y1)/2,transformedX=dx/rx,transformedY=dy/ry,distance2=Math.sqrt(transformedX**2+transformedY**2);if(distance2>1)throw new Error("The given radii are too small to create an arc between the points.");const scaledCenterDistance=Math.sqrt(1-distance2**2),centerX=midX+scaledCenterDistance*ry*Math.sin(angle)*(clockwise?-1:1),centerY=midY-scaledCenterDistance*rx*Math.cos(angle)*(clockwise?-1:1),startAngle=Math.atan2((y1-centerY)/ry,(x1-centerX)/rx);let angleRange=Math.atan2((y22-centerY)/ry,(x2-centerX)/rx)-startAngle;clockwise&&angleRange<0&&(angleRange+=2*Math.PI),!clockwise&&angleRange>0&&(angleRange-=2*Math.PI);const points=[];for(let i2=0;i2<20;i2++){const t2=i2/19,angle2=startAngle+t2*angleRange,x3=centerX+rx*Math.cos(angle2),y3=centerY+ry*Math.sin(angle2);points.push({x:x3,y:y3})}return points}__name(generateArcPoints,"generateArcPoints");function calculateArcSagitta(chord,radiusX,radiusY){const[semiMajorAxis,semiMinorAxis]=[radiusX,radiusY].sort((a2,b2)=>b2-a2);return semiMinorAxis*(1-Math.sqrt(1-(chord/semiMajorAxis/2)**2))}__name(calculateArcSagitta,"calculateArcSagitta");async function bowTieRect(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=node.padding??0,labelPaddingX=node.look==="neo"?16:nodePadding,labelPaddingY=node.look==="neo"?12:nodePadding,calcTotalHeight=__name(labelHeight=>labelHeight+labelPaddingY,"calcTotalHeight"),calcEllipseRadius=__name(totalHeight2=>{const ry2=totalHeight2/2;return[ry2/(2.5+totalHeight2/50),ry2]},"calcEllipseRadius"),{shapeSvg,bbox}=await labelHelper(parent,node,getNodeClasses(node)),totalHeight=calcTotalHeight(node!=null&&node.height?node==null?void 0:node.height:bbox.height),[rx,ry]=calcEllipseRadius(totalHeight),sagitta=calculateArcSagitta(totalHeight,rx,ry),w2=(node!=null&&node.width?node==null?void 0:node.width:bbox.width)+labelPaddingX*2+sagitta-sagitta,h2=totalHeight,{cssStyles}=node,points=[{x:w2/2,y:-h2/2},{x:-w2/2,y:-h2/2},...generateArcPoints(-w2/2,-h2/2,-w2/2,h2/2,rx,ry,!1),{x:w2/2,y:h2/2},...generateArcPoints(w2/2,h2/2,w2/2,-h2/2,rx,ry,!0)],rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const bowTieRectPath=createPathFromPoints(points),bowTieRectShapePath=rc.path(bowTieRectPath,options),bowTieRectShape=shapeSvg.insert(()=>bowTieRectShapePath,":first-child");return bowTieRectShape.attr("class","basic label-container outer-path"),cssStyles&&node.look!=="handDrawn"&&bowTieRectShape.selectAll("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&bowTieRectShape.selectAll("path").attr("style",nodeStyles),bowTieRectShape.attr("transform",`translate(${rx/2}, 0)`),updateNodeBounds(node,bowTieRectShape),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg}__name(bowTieRect,"bowTieRect");function insertPolygonShape(parent,w2,h2,points){return parent.insert("polygon",":first-child").attr("points",points.map(function(d2){return d2.x+","+d2.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-w2/2+","+h2/2+")")}__name(insertPolygonShape,"insertPolygonShape");var NOTCH_SIZE=12;async function card(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=node.padding??0,labelPaddingX=node.look==="neo"?28:nodePadding,labelPaddingY=node.look==="neo"?24:nodePadding,{shapeSvg,bbox}=await labelHelper(parent,node,getNodeClasses(node)),w2=((node==null?void 0:node.width)??bbox.width)+(node.look==="neo"?labelPaddingX*2:labelPaddingX+NOTCH_SIZE),h2=((node==null?void 0:node.height)??bbox.height)+(node.look==="neo"?labelPaddingY*2:labelPaddingY),left=0,right=w2,top=-h2,bottom=0,points=[{x:left+NOTCH_SIZE,y:top},{x:right,y:top},{x:right,y:bottom},{x:left,y:bottom},{x:left,y:top+NOTCH_SIZE},{x:left+NOTCH_SIZE,y:top}];let polygon;const{cssStyles}=node;if(node.look==="handDrawn"){const rc=at.svg(shapeSvg),options=userNodeOverrides(node,{}),pathData=createPathFromPoints(points),roughNode=rc.path(pathData,options);polygon=shapeSvg.insert(()=>roughNode,":first-child").attr("transform",`translate(${-w2/2}, ${h2/2})`),cssStyles&&polygon.attr("style",cssStyles)}else polygon=insertPolygonShape(shapeSvg,w2,h2,points);return nodeStyles&&polygon.attr("style",nodeStyles),updateNodeBounds(node,polygon),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg}__name(card,"card");function choice(parent,node){const{nodeStyles}=styles2String(node);node.label="";const shapeSvg=parent.insert("g").attr("class",getNodeClasses(node)).attr("id",node.domId??node.id),{cssStyles}=node,s2=Math.max(28,node.width??0),points=[{x:0,y:s2/2},{x:s2/2,y:0},{x:0,y:-s2/2},{x:-s2/2,y:0}],rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const choicePath=createPathFromPoints(points),roughNode=rc.path(choicePath,options),choiceShape=shapeSvg.insert(()=>roughNode,":first-child");return cssStyles&&node.look!=="handDrawn"&&choiceShape.selectAll("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&choiceShape.selectAll("path").attr("style",nodeStyles),node.width=28,node.height=28,node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg}__name(choice,"choice");async function circle$1(parent,node,options){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const{shapeSvg,bbox,halfPadding}=await labelHelper(parent,node,getNodeClasses(node)),labelPadding=16,padding=(options==null?void 0:options.padding)??halfPadding,radius=node.look==="neo"?bbox.width/2+labelPadding*2:bbox.width/2+padding;let circleElem;const{cssStyles}=node;if(node.look==="handDrawn"){const rc=at.svg(shapeSvg),options2=userNodeOverrides(node,{}),roughNode=rc.circle(0,0,radius*2,options2);circleElem=shapeSvg.insert(()=>roughNode,":first-child"),circleElem.attr("class","basic label-container").attr("style",handleUndefinedAttr(cssStyles))}else circleElem=shapeSvg.insert("circle",":first-child").attr("class","basic label-container").attr("style",nodeStyles).attr("r",radius).attr("cx",0).attr("cy",0);return updateNodeBounds(node,circleElem),node.calcIntersect=function(bounds,point2){const radius2=bounds.width/2;return intersect_default.circle(bounds,radius2,point2)},node.intersect=function(point2){return log.info("Circle intersect",node,radius,point2),intersect_default.circle(node,radius,point2)},shapeSvg}__name(circle$1,"circle");function createLine(r2){const xAxis45=Math.cos(Math.PI/4),yAxis45=Math.sin(Math.PI/4),lineLength=r2*2,pointQ1={x:lineLength/2*xAxis45,y:lineLength/2*yAxis45},pointQ2={x:-(lineLength/2)*xAxis45,y:lineLength/2*yAxis45},pointQ3={x:-(lineLength/2)*xAxis45,y:-(lineLength/2)*yAxis45},pointQ4={x:lineLength/2*xAxis45,y:-(lineLength/2)*yAxis45};return`M ${pointQ2.x},${pointQ2.y} L ${pointQ4.x},${pointQ4.y}
228
+ M ${pointQ1.x},${pointQ1.y} L ${pointQ3.x},${pointQ3.y}`}__name(createLine,"createLine");function crossedCircle(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles,node.label="";const shapeSvg=parent.insert("g").attr("class",getNodeClasses(node)).attr("id",node.domId??node.id),radius=Math.max(30,(node==null?void 0:node.width)??0),{cssStyles}=node,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const circleNode=rc.circle(0,0,radius*2,options),linePath=createLine(radius),lineNode=rc.path(linePath,options),crossedCircle2=shapeSvg.insert(()=>circleNode,":first-child");return crossedCircle2.insert(()=>lineNode),crossedCircle2.attr("class","outer-path"),cssStyles&&node.look!=="handDrawn"&&crossedCircle2.selectAll("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&crossedCircle2.selectAll("path").attr("style",nodeStyles),updateNodeBounds(node,crossedCircle2),node.intersect=function(point2){return log.info("crossedCircle intersect",node,{radius,point:point2}),intersect_default.circle(node,radius,point2)},shapeSvg}__name(crossedCircle,"crossedCircle");function generateCirclePoints2(centerX,centerY,radius,numPoints=100,startAngle=0,endAngle=180){const points=[],startAngleRad=startAngle*Math.PI/180,angleStep=(endAngle*Math.PI/180-startAngleRad)/(numPoints-1);for(let i2=0;i2<numPoints;i2++){const angle=startAngleRad+i2*angleStep,x2=centerX+radius*Math.cos(angle),y3=centerY+radius*Math.sin(angle);points.push({x:-x2,y:-y3})}return points}__name(generateCirclePoints2,"generateCirclePoints");async function curlyBraceLeft(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const{shapeSvg,bbox,label}=await labelHelper(parent,node,getNodeClasses(node)),paddingX=node.look==="neo"?18:node.padding??0,paddingY=node.look==="neo"?12:node.padding??0,w2=bbox.width+paddingX,h2=bbox.height+paddingY,radius=Math.max(5,h2*.1),{cssStyles}=node,points=[...generateCirclePoints2(w2/2,-h2/2,radius,30,-90,0),{x:-w2/2-radius,y:radius},...generateCirclePoints2(w2/2+radius*2,-radius,radius,20,-180,-270),...generateCirclePoints2(w2/2+radius*2,radius,radius,20,-90,-180),{x:-w2/2-radius,y:-h2/2},...generateCirclePoints2(w2/2,h2/2,radius,20,0,90)],rectPoints=[{x:w2/2,y:-h2/2-radius},{x:-w2/2,y:-h2/2-radius},...generateCirclePoints2(w2/2,-h2/2,radius,20,-90,0),{x:-w2/2-radius,y:-radius},...generateCirclePoints2(w2/2+w2*.1,-radius,radius,20,-180,-270),...generateCirclePoints2(w2/2+w2*.1,radius,radius,20,-90,-180),{x:-w2/2-radius,y:h2/2},...generateCirclePoints2(w2/2,h2/2,radius,20,0,90),{x:-w2/2,y:h2/2+radius},{x:w2/2,y:h2/2+radius}],rc=at.svg(shapeSvg),options=userNodeOverrides(node,{fill:"none"});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const newCurlyBracePath=createPathFromPoints(points).replace("Z",""),curlyBraceLeftNode=rc.path(newCurlyBracePath,options),rectPath=createPathFromPoints(rectPoints),rectShape=rc.path(rectPath,{...options}),curlyBraceLeftShape=shapeSvg.insert("g",":first-child");return curlyBraceLeftShape.insert(()=>rectShape,":first-child").attr("stroke-opacity",0),curlyBraceLeftShape.insert(()=>curlyBraceLeftNode,":first-child"),curlyBraceLeftShape.attr("class","text"),cssStyles&&node.look!=="handDrawn"&&curlyBraceLeftShape.selectAll("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&curlyBraceLeftShape.selectAll("path").attr("style",nodeStyles),curlyBraceLeftShape.attr("transform",`translate(${radius}, 0)`),label.attr("transform",`translate(${-w2/2+radius-(bbox.x-(bbox.left??0))},${-h2/2+(node.padding??0)/2-(bbox.y-(bbox.top??0))})`),updateNodeBounds(node,curlyBraceLeftShape),node.intersect=function(point2){return intersect_default.polygon(node,rectPoints,point2)},shapeSvg}__name(curlyBraceLeft,"curlyBraceLeft");function generateCirclePoints3(centerX,centerY,radius,numPoints=100,startAngle=0,endAngle=180){const points=[],startAngleRad=startAngle*Math.PI/180,angleStep=(endAngle*Math.PI/180-startAngleRad)/(numPoints-1);for(let i2=0;i2<numPoints;i2++){const angle=startAngleRad+i2*angleStep,x2=centerX+radius*Math.cos(angle),y3=centerY+radius*Math.sin(angle);points.push({x:x2,y:y3})}return points}__name(generateCirclePoints3,"generateCirclePoints");async function curlyBraceRight(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const{shapeSvg,bbox,label}=await labelHelper(parent,node,getNodeClasses(node)),labelPaddingX=node.look==="neo"?18:node.padding??0,labelPaddingY=node.look==="neo"?12:node.padding??0,w2=bbox.width+(node.look==="neo"?labelPaddingX*2:labelPaddingX),h2=bbox.height+(node.look==="neo"?labelPaddingY*2:labelPaddingY),radius=Math.max(5,h2*.1),{cssStyles}=node,points=[...generateCirclePoints3(w2/2,-h2/2,radius,20,-90,0),{x:w2/2+radius,y:-radius},...generateCirclePoints3(w2/2+radius*2,-radius,radius,20,-180,-270),...generateCirclePoints3(w2/2+radius*2,radius,radius,20,-90,-180),{x:w2/2+radius,y:h2/2},...generateCirclePoints3(w2/2,h2/2,radius,20,0,90)],rectPoints=[{x:-w2/2,y:-h2/2-radius},{x:w2/2,y:-h2/2-radius},...generateCirclePoints3(w2/2,-h2/2,radius,20,-90,0),{x:w2/2+radius,y:-radius},...generateCirclePoints3(w2/2+radius*2,-radius,radius,20,-180,-270),...generateCirclePoints3(w2/2+radius*2,radius,radius,20,-90,-180),{x:w2/2+radius,y:h2/2},...generateCirclePoints3(w2/2,h2/2,radius,20,0,90),{x:w2/2,y:h2/2+radius},{x:-w2/2,y:h2/2+radius}],rc=at.svg(shapeSvg),options=userNodeOverrides(node,{fill:"none"});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const newCurlyBracePath=createPathFromPoints(points).replace("Z",""),curlyBraceRightNode=rc.path(newCurlyBracePath,options),rectPath=createPathFromPoints(rectPoints),rectShape=rc.path(rectPath,{...options}),curlyBraceRightShape=shapeSvg.insert("g",":first-child");return curlyBraceRightShape.insert(()=>rectShape,":first-child").attr("stroke-opacity",0),curlyBraceRightShape.insert(()=>curlyBraceRightNode,":first-child"),curlyBraceRightShape.attr("class","text"),cssStyles&&node.look!=="handDrawn"&&curlyBraceRightShape.selectAll("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&curlyBraceRightShape.selectAll("path").attr("style",nodeStyles),curlyBraceRightShape.attr("transform",`translate(${-radius}, 0)`),label.attr("transform",`translate(${-w2/2+(node.padding??0)/2-(bbox.x-(bbox.left??0))},${-h2/2+(node.padding??0)/2-(bbox.y-(bbox.top??0))})`),updateNodeBounds(node,curlyBraceRightShape),node.intersect=function(point2){return intersect_default.polygon(node,rectPoints,point2)},shapeSvg}__name(curlyBraceRight,"curlyBraceRight");function generateCirclePoints4(centerX,centerY,radius,numPoints=100,startAngle=0,endAngle=180){const points=[],startAngleRad=startAngle*Math.PI/180,angleStep=(endAngle*Math.PI/180-startAngleRad)/(numPoints-1);for(let i2=0;i2<numPoints;i2++){const angle=startAngleRad+i2*angleStep,x2=centerX+radius*Math.cos(angle),y3=centerY+radius*Math.sin(angle);points.push({x:-x2,y:-y3})}return points}__name(generateCirclePoints4,"generateCirclePoints");async function curlyBraces(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const{shapeSvg,bbox,label}=await labelHelper(parent,node,getNodeClasses(node)),labelPaddingX=node.look==="neo"?18:node.padding??0,labelPaddingY=node.look==="neo"?12:node.padding??0,w2=bbox.width+(node.look==="neo"?labelPaddingX*2:labelPaddingX),h2=bbox.height+(node.look==="neo"?labelPaddingY*2:labelPaddingY),radius=Math.max(5,h2*.1),{cssStyles}=node,leftCurlyBracePoints=[...generateCirclePoints4(w2/2,-h2/2,radius,30,-90,0),{x:-w2/2-radius,y:radius},...generateCirclePoints4(w2/2+radius*2,-radius,radius,20,-180,-270),...generateCirclePoints4(w2/2+radius*2,radius,radius,20,-90,-180),{x:-w2/2-radius,y:-h2/2},...generateCirclePoints4(w2/2,h2/2,radius,20,0,90)],rightCurlyBracePoints=[...generateCirclePoints4(-w2/2+radius+radius/2,-h2/2,radius,20,-90,-180),{x:w2/2-radius/2,y:radius},...generateCirclePoints4(-w2/2-radius/2,-radius,radius,20,0,90),...generateCirclePoints4(-w2/2-radius/2,radius,radius,20,-90,0),{x:w2/2-radius/2,y:-radius},...generateCirclePoints4(-w2/2+radius+radius/2,h2/2,radius,30,-180,-270)],rectPoints=[{x:w2/2,y:-h2/2-radius},{x:-w2/2,y:-h2/2-radius},...generateCirclePoints4(w2/2,-h2/2,radius,20,-90,0),{x:-w2/2-radius,y:-radius},...generateCirclePoints4(w2/2+radius*2,-radius,radius,20,-180,-270),...generateCirclePoints4(w2/2+radius*2,radius,radius,20,-90,-180),{x:-w2/2-radius,y:h2/2},...generateCirclePoints4(w2/2,h2/2,radius,20,0,90),{x:-w2/2,y:h2/2+radius},{x:w2/2-radius-radius/2,y:h2/2+radius},...generateCirclePoints4(-w2/2+radius+radius/2,-h2/2,radius,20,-90,-180),{x:w2/2-radius/2,y:radius},...generateCirclePoints4(-w2/2-radius/2,-radius,radius,20,0,90),...generateCirclePoints4(-w2/2-radius/2,radius,radius,20,-90,0),{x:w2/2-radius/2,y:-radius},...generateCirclePoints4(-w2/2+radius+radius/2,h2/2,radius,30,-180,-270)],rc=at.svg(shapeSvg),options=userNodeOverrides(node,{fill:"none"});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const newLeftCurlyBracePath=createPathFromPoints(leftCurlyBracePoints).replace("Z",""),leftCurlyBraceNode=rc.path(newLeftCurlyBracePath,options),newRightCurlyBracePath=createPathFromPoints(rightCurlyBracePoints).replace("Z",""),rightCurlyBraceNode=rc.path(newRightCurlyBracePath,options),rectPath=createPathFromPoints(rectPoints),rectShape=rc.path(rectPath,{...options}),curlyBracesShape=shapeSvg.insert("g",":first-child");return curlyBracesShape.insert(()=>rectShape,":first-child").attr("stroke-opacity",0),curlyBracesShape.insert(()=>leftCurlyBraceNode,":first-child"),curlyBracesShape.insert(()=>rightCurlyBraceNode,":first-child"),curlyBracesShape.attr("class","text"),cssStyles&&node.look!=="handDrawn"&&curlyBracesShape.selectAll("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&curlyBracesShape.selectAll("path").attr("style",nodeStyles),curlyBracesShape.attr("transform",`translate(${radius-radius/4}, 0)`),label.attr("transform",`translate(${-w2/2+(node.padding??0)/2-(bbox.x-(bbox.left??0))},${-h2/2+(node.padding??0)/2-(bbox.y-(bbox.top??0))})`),updateNodeBounds(node,curlyBracesShape),node.intersect=function(point2){return intersect_default.polygon(node,rectPoints,point2)},shapeSvg}__name(curlyBraces,"curlyBraces");async function curvedTrapezoid(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=node.padding??0,labelPaddingX=node.look==="neo"?16:nodePadding,labelPaddingY=node.look==="neo"?12:nodePadding,minWidth=20,minHeight=5,{shapeSvg,bbox}=await labelHelper(parent,node,getNodeClasses(node)),w2=Math.max(minWidth,(bbox.width+labelPaddingX*2)*1.25,(node==null?void 0:node.width)??0),h2=Math.max(minHeight,bbox.height+labelPaddingY*2,(node==null?void 0:node.height)??0),radius=h2/2,{cssStyles}=node,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const totalWidth=w2,totalHeight=h2,rw=totalWidth-radius,tw=totalHeight/4,points=[{x:rw,y:0},{x:tw,y:0},{x:0,y:totalHeight/2},{x:tw,y:totalHeight},{x:rw,y:totalHeight},...generateCirclePoints(-rw,-totalHeight/2,radius,50,270,90)],pathData=createPathFromPoints(points),shapeNode=rc.path(pathData,options),polygon=shapeSvg.insert(()=>shapeNode,":first-child");return polygon.attr("class","basic label-container outer-path"),cssStyles&&node.look!=="handDrawn"&&polygon.selectChildren("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&polygon.selectChildren("path").attr("style",nodeStyles),polygon.attr("transform",`translate(${-w2/2}, ${-h2/2})`),updateNodeBounds(node,polygon),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg}__name(curvedTrapezoid,"curvedTrapezoid");var createCylinderPathD=__name((x2,y3,width,height,rx,ry)=>[`M${x2},${y3+ry}`,`a${rx},${ry} 0,0,0 ${width},0`,`a${rx},${ry} 0,0,0 ${-width},0`,`l0,${height}`,`a${rx},${ry} 0,0,0 ${width},0`,`l0,${-height}`].join(" "),"createCylinderPathD"),createOuterCylinderPathD=__name((x2,y3,width,height,rx,ry)=>[`M${x2},${y3+ry}`,`M${x2+width},${y3+ry}`,`a${rx},${ry} 0,0,0 ${-width},0`,`l0,${height}`,`a${rx},${ry} 0,0,0 ${width},0`,`l0,${-height}`].join(" "),"createOuterCylinderPathD"),createInnerCylinderPathD=__name((x2,y3,width,height,rx,ry)=>[`M${x2-width/2},${-height/2}`,`a${rx},${ry} 0,0,0 ${width},0`].join(" "),"createInnerCylinderPathD"),MIN_HEIGHT=8,MIN_WIDTH=8;async function cylinder(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=node.padding??0,labelPaddingX=node.look==="neo"?24:nodePadding,labelPaddingY=node.look==="neo"?24:nodePadding;if(node.width||node.height){const originalWidth=node.width??0;node.width=(node.width??0)-labelPaddingY,node.width<MIN_WIDTH&&(node.width=MIN_WIDTH);const ry2=originalWidth/2/(2.5+originalWidth/50);node.height=(node.height??0)-labelPaddingX-ry2*3,node.height<MIN_HEIGHT&&(node.height=MIN_HEIGHT)}const{shapeSvg,bbox,label}=await labelHelper(parent,node,getNodeClasses(node)),w2=(node.width?node.width:bbox.width)+labelPaddingY,rx=w2/2,ry=rx/(2.5+w2/50),h2=(node.height?node.height:bbox.height)+labelPaddingX+ry;let cylinder2;const{cssStyles}=node;if(node.look==="handDrawn"){const rc=at.svg(shapeSvg),outerPathData=createOuterCylinderPathD(0,0,w2,h2,rx,ry),innerPathData=createInnerCylinderPathD(0,ry,w2,h2,rx,ry),options=userNodeOverrides(node,{}),outerNode=rc.path(outerPathData,options),innerLine=rc.path(innerPathData,userNodeOverrides(node,{fill:"none"}));cylinder2=shapeSvg.insert(()=>innerLine,":first-child"),cylinder2=shapeSvg.insert(()=>outerNode,":first-child"),cylinder2.attr("class","basic label-container"),cssStyles&&cylinder2.attr("style",cssStyles)}else{const pathData=createCylinderPathD(0,0,w2,h2,rx,ry);cylinder2=shapeSvg.insert("path",":first-child").attr("d",pathData).attr("class","basic label-container outer-path").attr("style",handleUndefinedAttr(cssStyles)).attr("style",nodeStyles)}return cylinder2.attr("label-offset-y",ry),cylinder2.attr("transform",`translate(${-w2/2}, ${-(h2/2+ry)})`),updateNodeBounds(node,cylinder2),label.attr("transform",`translate(${-(bbox.width/2)-(bbox.x-(bbox.left??0))}, ${-(bbox.height/2)+(node.padding??0)/1.5-(bbox.y-(bbox.top??0))})`),node.intersect=function(point2){const pos=intersect_default.rect(node,point2),x2=pos.x-(node.x??0);if(rx!=0&&(Math.abs(x2)<(node.width??0)/2||Math.abs(x2)==(node.width??0)/2&&Math.abs(pos.y-(node.y??0))>(node.height??0)/2-ry)){let y3=ry*ry*(1-x2*x2/(rx*rx));y3>0&&(y3=Math.sqrt(y3)),y3=ry-y3,point2.y-(node.y??0)>0&&(y3=-y3),pos.y+=y3}return pos},shapeSvg}__name(cylinder,"cylinder");async function dividedRectangle(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const paddingX=node.look==="neo"?16:node.padding??0,paddingY=node.look==="neo"?16:node.padding??0,{shapeSvg,bbox,label}=await labelHelper(parent,node,getNodeClasses(node)),w2=bbox.width+paddingX,h2=bbox.height+paddingY,rectOffset2=h2*.2,x2=-w2/2,y3=-h2/2-rectOffset2/2,{cssStyles}=node,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const pts=[{x:x2,y:y3+rectOffset2},{x:-x2,y:y3+rectOffset2},{x:-x2,y:-y3},{x:x2,y:-y3},{x:x2,y:y3},{x:-x2,y:y3},{x:-x2,y:y3+rectOffset2}],poly=rc.polygon(pts.map(p2=>[p2.x,p2.y]),options),polygon=shapeSvg.insert(()=>poly,":first-child");return polygon.attr("class","basic label-container outer-path"),cssStyles&&node.look!=="handDrawn"&&polygon.selectAll("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&polygon.selectAll("path").attr("style",nodeStyles),label.attr("transform",`translate(${x2+(node.padding??0)/2-(bbox.x-(bbox.left??0))}, ${y3+rectOffset2+(node.padding??0)/2-(bbox.y-(bbox.top??0))})`),updateNodeBounds(node,polygon),node.intersect=function(point2){return intersect_default.rect(node,point2)},shapeSvg}__name(dividedRectangle,"dividedRectangle");async function doublecircle(parent,node){var _a17,_b;const{labelStyles,nodeStyles}=styles2String(node),gap=node.look==="neo"?12:5;node.labelStyle=labelStyles;const padding=node.padding??0,labelPadding=node.look==="neo"?16:padding,{shapeSvg,bbox}=await labelHelper(parent,node,getNodeClasses(node)),outerRadius=(node!=null&&node.width?(node==null?void 0:node.width)/2:bbox.width/2)+(labelPadding??0),innerRadius=outerRadius-gap;let circleGroup;const{cssStyles}=node;if(node.look==="handDrawn"){const rc=at.svg(shapeSvg),outerOptions=userNodeOverrides(node,{roughness:.2,strokeWidth:2.5}),innerOptions=userNodeOverrides(node,{roughness:.2,strokeWidth:1.5}),outerRoughNode=rc.circle(0,0,outerRadius*2,outerOptions),innerRoughNode=rc.circle(0,0,innerRadius*2,innerOptions);circleGroup=shapeSvg.insert("g",":first-child"),circleGroup.attr("class",handleUndefinedAttr(node.cssClasses)).attr("style",handleUndefinedAttr(cssStyles)),(_a17=circleGroup.node())==null||_a17.appendChild(outerRoughNode),(_b=circleGroup.node())==null||_b.appendChild(innerRoughNode)}else{circleGroup=shapeSvg.insert("g",":first-child");const outerCircle=circleGroup.insert("circle",":first-child"),innerCircle=circleGroup.insert("circle");circleGroup.attr("class","basic label-container").attr("style",nodeStyles),outerCircle.attr("class","outer-circle").attr("style",nodeStyles).attr("r",outerRadius).attr("cx",0).attr("cy",0),innerCircle.attr("class","inner-circle").attr("style",nodeStyles).attr("r",innerRadius).attr("cx",0).attr("cy",0)}return updateNodeBounds(node,circleGroup),node.intersect=function(point2){return log.info("DoubleCircle intersect",node,outerRadius,point2),intersect_default.circle(node,outerRadius,point2)},shapeSvg}__name(doublecircle,"doublecircle");function filledCircle(parent,node,{config:{themeVariables}}){const{labelStyles,nodeStyles}=styles2String(node);node.label="",node.labelStyle=labelStyles;const shapeSvg=parent.insert("g").attr("class",getNodeClasses(node)).attr("id",node.domId??node.id),radius=7,{cssStyles}=node,rc=at.svg(shapeSvg),{nodeBorder}=themeVariables,options=userNodeOverrides(node,{fillStyle:"solid"});node.look!=="handDrawn"&&(options.roughness=0);const circleNode=rc.circle(0,0,radius*2,options),filledCircle2=shapeSvg.insert(()=>circleNode,":first-child");return filledCircle2.selectAll("path").attr("style",`fill: ${nodeBorder} !important;`),cssStyles&&cssStyles.length>0&&node.look!=="handDrawn"&&filledCircle2.selectAll("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&filledCircle2.selectAll("path").attr("style",nodeStyles),updateNodeBounds(node,filledCircle2),node.intersect=function(point2){return log.info("filledCircle intersect",node,{radius,point:point2}),intersect_default.circle(node,radius,point2)},shapeSvg}__name(filledCircle,"filledCircle");var MIN_HEIGHT2=10,MIN_WIDTH2=10;async function flippedTriangle(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=node.padding??0,labelPaddingX=node.look==="neo"?nodePadding*2:nodePadding;(node.width||node.height)&&(node.height=(node==null?void 0:node.height)??0,node.height<MIN_HEIGHT2&&(node.height=MIN_HEIGHT2),node.width=((node==null?void 0:node.width)??0)-labelPaddingX-labelPaddingX/2,node.width<MIN_WIDTH2&&(node.width=MIN_WIDTH2));const{shapeSvg,bbox,label}=await labelHelper(parent,node,getNodeClasses(node)),w2=(node!=null&&node.width?node==null?void 0:node.width:bbox.width)+(labelPaddingX??0),h2=node!=null&&node.height?node==null?void 0:node.height:w2+bbox.height,tw=h2,points=[{x:0,y:-h2},{x:tw,y:-h2},{x:tw/2,y:0}],{cssStyles}=node,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const pathData=createPathFromPoints(points),roughNode=rc.path(pathData,options),flippedTriangle2=shapeSvg.insert(()=>roughNode,":first-child").attr("transform",`translate(${-h2/2}, ${h2/2})`).attr("class","outer-path");return cssStyles&&node.look!=="handDrawn"&&flippedTriangle2.selectChildren("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&flippedTriangle2.selectChildren("path").attr("style",nodeStyles),node.width=w2,node.height=h2,updateNodeBounds(node,flippedTriangle2),label.attr("transform",`translate(${-bbox.width/2-(bbox.x-(bbox.left??0))}, ${-h2/2+(node.padding??0)/2+(bbox.y-(bbox.top??0))})`),node.intersect=function(point2){return log.info("Triangle intersect",node,points,point2),intersect_default.polygon(node,points,point2)},shapeSvg}__name(flippedTriangle,"flippedTriangle");function forkJoin(parent,node,{dir,config:{state:state2,themeVariables}}){const{nodeStyles}=styles2String(node);node.label="";const shapeSvg=parent.insert("g").attr("class",getNodeClasses(node)).attr("id",node.domId??node.id),{cssStyles}=node;let width=Math.max(70,(node==null?void 0:node.width)??0),height=Math.max(10,(node==null?void 0:node.height)??0);dir==="LR"&&(width=Math.max(10,(node==null?void 0:node.width)??0),height=Math.max(70,(node==null?void 0:node.height)??0));const x2=-1*width/2,y3=-1*height/2,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{stroke:themeVariables.lineColor,fill:themeVariables.lineColor});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const roughNode=rc.rectangle(x2,y3,width,height,options),shape=shapeSvg.insert(()=>roughNode,":first-child");cssStyles&&node.look!=="handDrawn"&&shape.selectAll("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&shape.selectAll("path").attr("style",nodeStyles),updateNodeBounds(node,shape);const padding=(state2==null?void 0:state2.padding)??0;return node.width&&node.height&&(node.width+=padding/2||0,node.height+=padding/2||0),node.intersect=function(point2){return intersect_default.rect(node,point2)},shapeSvg}__name(forkJoin,"forkJoin");async function halfRoundedRectangle(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const minWidth=15,minHeight=10,paddingX=node.look==="neo"?16:node.padding??0,paddingY=node.look==="neo"?12:node.padding??0;(node.width||node.height)&&(node.height=((node==null?void 0:node.height)??0)-paddingY*2,node.height<minHeight&&(node.height=minHeight),node.width=((node==null?void 0:node.width)??0)-paddingX*2,node.width<minWidth&&(node.width=minWidth));const{shapeSvg,bbox}=await labelHelper(parent,node,getNodeClasses(node)),w2=(node!=null&&node.width?node==null?void 0:node.width:Math.max(minWidth,bbox.width))+paddingX*2,h2=(node!=null&&node.height?node==null?void 0:node.height:Math.max(minHeight,bbox.height))+paddingY*2,radius=h2/2,{cssStyles}=node,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const points=[{x:-w2/2,y:-h2/2},{x:w2/2-radius,y:-h2/2},...generateCirclePoints(-w2/2+radius,0,radius,50,90,270),{x:w2/2-radius,y:h2/2},{x:-w2/2,y:h2/2}],pathData=createPathFromPoints(points),shapeNode=rc.path(pathData,options),polygon=shapeSvg.insert(()=>shapeNode,":first-child");return polygon.attr("class","basic label-container outer-path"),cssStyles&&node.look!=="handDrawn"&&polygon.selectChildren("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&polygon.selectChildren("path").attr("style",nodeStyles),updateNodeBounds(node,polygon),node.intersect=function(point2){return log.info("Pill intersect",node,{radius,point:point2}),intersect_default.polygon(node,points,point2)},shapeSvg}__name(halfRoundedRectangle,"halfRoundedRectangle");var createHexagonPathD=__name((x2,y3,width,height,m2)=>[`M${x2+m2},${y3}`,`L${x2+width-m2},${y3}`,`L${x2+width},${y3-height/2}`,`L${x2+width-m2},${y3-height}`,`L${x2+m2},${y3-height}`,`L${x2},${y3-height/2}`,"Z"].join(" "),"createHexagonPathD");async function hexagon(parent,node){const{labelStyles,nodeStyles}=styles2String(node),f2=node.look==="neo"?3.5:4;node.labelStyle=labelStyles;const nodePadding=node.padding??0,wa=70,ha=32,labelPaddingX=node.look==="neo"?wa:nodePadding,labelPaddingY=node.look==="neo"?ha:nodePadding;if(node.width||node.height){const m22=(node.height??0)/f2;node.width=((node==null?void 0:node.width)??0)-2*m22-labelPaddingY,node.height=(node.height??0)-labelPaddingX}const{shapeSvg,bbox}=await labelHelper(parent,node,getNodeClasses(node)),h2=(node!=null&&node.height?node==null?void 0:node.height:bbox.height)+labelPaddingX,m2=h2/f2,w2=(node!=null&&node.width?node==null?void 0:node.width:bbox.width)+2*m2+labelPaddingY,points=[{x:m2,y:0},{x:w2-m2,y:0},{x:w2,y:-h2/2},{x:w2-m2,y:-h2},{x:m2,y:-h2},{x:0,y:-h2/2}];let polygon;const{cssStyles}=node;if(node.look==="handDrawn"){const rc=at.svg(shapeSvg),options=userNodeOverrides(node,{}),pathData=createHexagonPathD(0,0,w2,h2,m2),roughNode=rc.path(pathData,options);polygon=shapeSvg.insert(()=>roughNode,":first-child").attr("transform",`translate(${-w2/2}, ${h2/2})`),cssStyles&&polygon.attr("style",cssStyles)}else polygon=insertPolygonShape(shapeSvg,w2,h2,points);return nodeStyles&&polygon.attr("style",nodeStyles),node.width=w2,node.height=h2,updateNodeBounds(node,polygon),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg}__name(hexagon,"hexagon");async function hourglass(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.label="",node.labelStyle=labelStyles;const{shapeSvg}=await labelHelper(parent,node,getNodeClasses(node)),w2=Math.max(30,(node==null?void 0:node.width)??0),h2=Math.max(30,(node==null?void 0:node.height)??0),{cssStyles}=node,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const points=[{x:0,y:0},{x:w2,y:0},{x:0,y:h2},{x:w2,y:h2}],pathData=createPathFromPoints(points),shapeNode=rc.path(pathData,options),polygon=shapeSvg.insert(()=>shapeNode,":first-child");return polygon.attr("class","basic label-container outer-path"),cssStyles&&node.look!=="handDrawn"&&polygon.selectChildren("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&polygon.selectChildren("path").attr("style",nodeStyles),polygon.attr("transform",`translate(${-w2/2}, ${-h2/2})`),updateNodeBounds(node,polygon),node.intersect=function(point2){return log.info("Pill intersect",node,{points}),intersect_default.polygon(node,points,point2)},shapeSvg}__name(hourglass,"hourglass");async function icon(parent,node,{config:{themeVariables,flowchart}}){const{labelStyles}=styles2String(node);node.labelStyle=labelStyles;const assetHeight=node.assetHeight??48,assetWidth=node.assetWidth??48,iconSize=Math.max(assetHeight,assetWidth),defaultWidth=flowchart==null?void 0:flowchart.wrappingWidth;node.width=Math.max(iconSize,defaultWidth??0);const{shapeSvg,bbox,label}=await labelHelper(parent,node,"icon-shape default"),topLabel=node.pos==="t",height=iconSize,width=iconSize,{nodeBorder}=themeVariables,{stylesMap}=compileStyles(node),x2=-width/2,y3=-height/2,labelPadding=node.label?8:0,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{stroke:"none",fill:"none"});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const iconNode=rc.rectangle(x2,y3,width,height,options),outerWidth=Math.max(width,bbox.width),outerHeight=height+bbox.height+labelPadding,outerNode=rc.rectangle(-outerWidth/2,-outerHeight/2,outerWidth,outerHeight,{...options,fill:"transparent",stroke:"none"}),iconShape=shapeSvg.insert(()=>iconNode,":first-child"),outerShape=shapeSvg.insert(()=>outerNode);if(node.icon){const iconElem=shapeSvg.append("g");iconElem.html(`<g>${await getIconSVG(node.icon,{height:iconSize,width:iconSize,fallbackPrefix:""})}</g>`);const iconBBox=iconElem.node().getBBox(),iconWidth=iconBBox.width,iconHeight=iconBBox.height,iconX=iconBBox.x,iconY=iconBBox.y;iconElem.attr("transform",`translate(${-iconWidth/2-iconX},${topLabel?bbox.height/2+labelPadding/2-iconHeight/2-iconY:-bbox.height/2-labelPadding/2-iconHeight/2-iconY})`),iconElem.attr("style",`color: ${stylesMap.get("stroke")??nodeBorder};`)}return label.attr("transform",`translate(${-bbox.width/2-(bbox.x-(bbox.left??0))},${topLabel?-outerHeight/2:outerHeight/2-bbox.height})`),iconShape.attr("transform",`translate(0,${topLabel?bbox.height/2+labelPadding/2:-bbox.height/2-labelPadding/2})`),updateNodeBounds(node,outerShape),node.intersect=function(point2){if(log.info("iconSquare intersect",node,point2),!node.label)return intersect_default.rect(node,point2);const dx=node.x??0,dy=node.y??0,nodeHeight=node.height??0;let points=[];return topLabel?points=[{x:dx-bbox.width/2,y:dy-nodeHeight/2},{x:dx+bbox.width/2,y:dy-nodeHeight/2},{x:dx+bbox.width/2,y:dy-nodeHeight/2+bbox.height+labelPadding},{x:dx+width/2,y:dy-nodeHeight/2+bbox.height+labelPadding},{x:dx+width/2,y:dy+nodeHeight/2},{x:dx-width/2,y:dy+nodeHeight/2},{x:dx-width/2,y:dy-nodeHeight/2+bbox.height+labelPadding},{x:dx-bbox.width/2,y:dy-nodeHeight/2+bbox.height+labelPadding}]:points=[{x:dx-width/2,y:dy-nodeHeight/2},{x:dx+width/2,y:dy-nodeHeight/2},{x:dx+width/2,y:dy-nodeHeight/2+height},{x:dx+bbox.width/2,y:dy-nodeHeight/2+height},{x:dx+bbox.width/2/2,y:dy+nodeHeight/2},{x:dx-bbox.width/2,y:dy+nodeHeight/2},{x:dx-bbox.width/2,y:dy-nodeHeight/2+height},{x:dx-width/2,y:dy-nodeHeight/2+height}],intersect_default.polygon(node,points,point2)},shapeSvg}__name(icon,"icon");async function iconCircle(parent,node,{config:{themeVariables,flowchart}}){const{labelStyles}=styles2String(node);node.labelStyle=labelStyles;const assetHeight=node.assetHeight??48,assetWidth=node.assetWidth??48,iconSize=Math.max(assetHeight,assetWidth),defaultWidth=flowchart==null?void 0:flowchart.wrappingWidth;node.width=Math.max(iconSize,defaultWidth??0);const{shapeSvg,bbox,label}=await labelHelper(parent,node,"icon-shape default"),padding=20,labelPadding=node.label?8:0,topLabel=node.pos==="t",{nodeBorder,mainBkg}=themeVariables,{stylesMap}=compileStyles(node),rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const fill=stylesMap.get("fill");options.stroke=fill??mainBkg;const iconElem=shapeSvg.append("g");node.icon&&iconElem.html(`<g>${await getIconSVG(node.icon,{height:iconSize,width:iconSize,fallbackPrefix:""})}</g>`);const iconBBox=iconElem.node().getBBox(),iconWidth=iconBBox.width,iconHeight=iconBBox.height,iconX=iconBBox.x,iconY=iconBBox.y,diameter=Math.max(iconWidth,iconHeight)*Math.SQRT2+padding*2,iconNode=rc.circle(0,0,diameter,options),outerWidth=Math.max(diameter,bbox.width),outerHeight=diameter+bbox.height+labelPadding,outerNode=rc.rectangle(-outerWidth/2,-outerHeight/2,outerWidth,outerHeight,{...options,fill:"transparent",stroke:"none"}),iconShape=shapeSvg.insert(()=>iconNode,":first-child"),outerShape=shapeSvg.insert(()=>outerNode);return iconElem.attr("transform",`translate(${-iconWidth/2-iconX},${topLabel?bbox.height/2+labelPadding/2-iconHeight/2-iconY:-bbox.height/2-labelPadding/2-iconHeight/2-iconY})`),iconElem.attr("style",`color: ${stylesMap.get("stroke")??nodeBorder};`),label.attr("transform",`translate(${-bbox.width/2-(bbox.x-(bbox.left??0))},${topLabel?-outerHeight/2:outerHeight/2-bbox.height})`),iconShape.attr("transform",`translate(0,${topLabel?bbox.height/2+labelPadding/2:-bbox.height/2-labelPadding/2})`),updateNodeBounds(node,outerShape),node.intersect=function(point2){return log.info("iconSquare intersect",node,point2),intersect_default.rect(node,point2)},shapeSvg}__name(iconCircle,"iconCircle");async function iconRounded(parent,node,{config:{themeVariables,flowchart}}){const{labelStyles}=styles2String(node);node.labelStyle=labelStyles;const assetHeight=node.assetHeight??48,assetWidth=node.assetWidth??48,iconSize=Math.max(assetHeight,assetWidth),defaultWidth=flowchart==null?void 0:flowchart.wrappingWidth;node.width=Math.max(iconSize,defaultWidth??0);const{shapeSvg,bbox,halfPadding,label}=await labelHelper(parent,node,"icon-shape default"),topLabel=node.pos==="t",height=iconSize+halfPadding*2,width=iconSize+halfPadding*2,{nodeBorder,mainBkg}=themeVariables,{stylesMap}=compileStyles(node),x2=-width/2,y3=-height/2,labelPadding=node.label?8:0,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const fill=stylesMap.get("fill");options.stroke=fill??mainBkg;const iconNode=rc.path(createRoundedRectPathD(x2,y3,width,height,5),options),outerWidth=Math.max(width,bbox.width),outerHeight=height+bbox.height+labelPadding,outerNode=rc.rectangle(-outerWidth/2,-outerHeight/2,outerWidth,outerHeight,{...options,fill:"transparent",stroke:"none"}),iconShape=shapeSvg.insert(()=>iconNode,":first-child").attr("class","icon-shape2"),outerShape=shapeSvg.insert(()=>outerNode);if(node.icon){const iconElem=shapeSvg.append("g");iconElem.html(`<g>${await getIconSVG(node.icon,{height:iconSize,width:iconSize,fallbackPrefix:""})}</g>`);const iconBBox=iconElem.node().getBBox(),iconWidth=iconBBox.width,iconHeight=iconBBox.height,iconX=iconBBox.x,iconY=iconBBox.y;iconElem.attr("transform",`translate(${-iconWidth/2-iconX},${topLabel?bbox.height/2+labelPadding/2-iconHeight/2-iconY:-bbox.height/2-labelPadding/2-iconHeight/2-iconY})`),iconElem.attr("style",`color: ${stylesMap.get("stroke")??nodeBorder};`)}return label.attr("transform",`translate(${-bbox.width/2-(bbox.x-(bbox.left??0))},${topLabel?-outerHeight/2:outerHeight/2-bbox.height})`),iconShape.attr("transform",`translate(0,${topLabel?bbox.height/2+labelPadding/2:-bbox.height/2-labelPadding/2})`),updateNodeBounds(node,outerShape),node.intersect=function(point2){if(log.info("iconSquare intersect",node,point2),!node.label)return intersect_default.rect(node,point2);const dx=node.x??0,dy=node.y??0,nodeHeight=node.height??0;let points=[];return topLabel?points=[{x:dx-bbox.width/2,y:dy-nodeHeight/2},{x:dx+bbox.width/2,y:dy-nodeHeight/2},{x:dx+bbox.width/2,y:dy-nodeHeight/2+bbox.height+labelPadding},{x:dx+width/2,y:dy-nodeHeight/2+bbox.height+labelPadding},{x:dx+width/2,y:dy+nodeHeight/2},{x:dx-width/2,y:dy+nodeHeight/2},{x:dx-width/2,y:dy-nodeHeight/2+bbox.height+labelPadding},{x:dx-bbox.width/2,y:dy-nodeHeight/2+bbox.height+labelPadding}]:points=[{x:dx-width/2,y:dy-nodeHeight/2},{x:dx+width/2,y:dy-nodeHeight/2},{x:dx+width/2,y:dy-nodeHeight/2+height},{x:dx+bbox.width/2,y:dy-nodeHeight/2+height},{x:dx+bbox.width/2/2,y:dy+nodeHeight/2},{x:dx-bbox.width/2,y:dy+nodeHeight/2},{x:dx-bbox.width/2,y:dy-nodeHeight/2+height},{x:dx-width/2,y:dy-nodeHeight/2+height}],intersect_default.polygon(node,points,point2)},shapeSvg}__name(iconRounded,"iconRounded");async function iconSquare(parent,node,{config:{themeVariables,flowchart}}){const{labelStyles}=styles2String(node);node.labelStyle=labelStyles;const assetHeight=node.assetHeight??48,assetWidth=node.assetWidth??48,iconSize=Math.max(assetHeight,assetWidth),defaultWidth=flowchart==null?void 0:flowchart.wrappingWidth;node.width=Math.max(iconSize,defaultWidth??0);const{shapeSvg,bbox,halfPadding,label}=await labelHelper(parent,node,"icon-shape default"),topLabel=node.pos==="t",height=iconSize+halfPadding*2,width=iconSize+halfPadding*2,{nodeBorder,mainBkg}=themeVariables,{stylesMap}=compileStyles(node),x2=-width/2,y3=-height/2,labelPadding=node.label?8:0,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const fill=stylesMap.get("fill");options.stroke=fill??mainBkg;const iconNode=rc.path(createRoundedRectPathD(x2,y3,width,height,.1),options),outerWidth=Math.max(width,bbox.width),outerHeight=height+bbox.height+labelPadding,outerNode=rc.rectangle(-outerWidth/2,-outerHeight/2,outerWidth,outerHeight,{...options,fill:"transparent",stroke:"none"}),iconShape=shapeSvg.insert(()=>iconNode,":first-child"),outerShape=shapeSvg.insert(()=>outerNode);if(node.icon){const iconElem=shapeSvg.append("g");iconElem.html(`<g>${await getIconSVG(node.icon,{height:iconSize,width:iconSize,fallbackPrefix:""})}</g>`);const iconBBox=iconElem.node().getBBox(),iconWidth=iconBBox.width,iconHeight=iconBBox.height,iconX=iconBBox.x,iconY=iconBBox.y;iconElem.attr("transform",`translate(${-iconWidth/2-iconX},${topLabel?bbox.height/2+labelPadding/2-iconHeight/2-iconY:-bbox.height/2-labelPadding/2-iconHeight/2-iconY})`),iconElem.attr("style",`color: ${stylesMap.get("stroke")??nodeBorder};`)}return label.attr("transform",`translate(${-bbox.width/2-(bbox.x-(bbox.left??0))},${topLabel?-outerHeight/2:outerHeight/2-bbox.height})`),iconShape.attr("transform",`translate(0,${topLabel?bbox.height/2+labelPadding/2:-bbox.height/2-labelPadding/2})`),updateNodeBounds(node,outerShape),node.intersect=function(point2){if(log.info("iconSquare intersect",node,point2),!node.label)return intersect_default.rect(node,point2);const dx=node.x??0,dy=node.y??0,nodeHeight=node.height??0;let points=[];return topLabel?points=[{x:dx-bbox.width/2,y:dy-nodeHeight/2},{x:dx+bbox.width/2,y:dy-nodeHeight/2},{x:dx+bbox.width/2,y:dy-nodeHeight/2+bbox.height+labelPadding},{x:dx+width/2,y:dy-nodeHeight/2+bbox.height+labelPadding},{x:dx+width/2,y:dy+nodeHeight/2},{x:dx-width/2,y:dy+nodeHeight/2},{x:dx-width/2,y:dy-nodeHeight/2+bbox.height+labelPadding},{x:dx-bbox.width/2,y:dy-nodeHeight/2+bbox.height+labelPadding}]:points=[{x:dx-width/2,y:dy-nodeHeight/2},{x:dx+width/2,y:dy-nodeHeight/2},{x:dx+width/2,y:dy-nodeHeight/2+height},{x:dx+bbox.width/2,y:dy-nodeHeight/2+height},{x:dx+bbox.width/2/2,y:dy+nodeHeight/2},{x:dx-bbox.width/2,y:dy+nodeHeight/2},{x:dx-bbox.width/2,y:dy-nodeHeight/2+height},{x:dx-width/2,y:dy-nodeHeight/2+height}],intersect_default.polygon(node,points,point2)},shapeSvg}__name(iconSquare,"iconSquare");async function imageSquare(parent,node,{config:{flowchart}}){const img=new Image;img.src=(node==null?void 0:node.img)??"",await img.decode();const imageNaturalWidth=Number(img.naturalWidth.toString().replace("px","")),imageNaturalHeight=Number(img.naturalHeight.toString().replace("px",""));node.imageAspectRatio=imageNaturalWidth/imageNaturalHeight;const{labelStyles}=styles2String(node);node.labelStyle=labelStyles;const defaultWidth=flowchart==null?void 0:flowchart.wrappingWidth;node.defaultWidth=flowchart==null?void 0:flowchart.wrappingWidth;const imageRawWidth=Math.max(node.label?defaultWidth??0:0,(node==null?void 0:node.assetWidth)??imageNaturalWidth),imageWidth=node.constraint==="on"&&node!=null&&node.assetHeight?node.assetHeight*node.imageAspectRatio:imageRawWidth,imageHeight=node.constraint==="on"?imageWidth/node.imageAspectRatio:(node==null?void 0:node.assetHeight)??imageNaturalHeight;node.width=Math.max(imageWidth,defaultWidth??0);const{shapeSvg,bbox,label}=await labelHelper(parent,node,"image-shape default"),topLabel=node.pos==="t",x2=-imageWidth/2,y3=-imageHeight/2,labelPadding=node.label?8:0,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const imageNode=rc.rectangle(x2,y3,imageWidth,imageHeight,options),outerWidth=Math.max(imageWidth,bbox.width),outerHeight=imageHeight+bbox.height+labelPadding,outerNode=rc.rectangle(-outerWidth/2,-outerHeight/2,outerWidth,outerHeight,{...options,fill:"none",stroke:"none"}),iconShape=shapeSvg.insert(()=>imageNode,":first-child"),outerShape=shapeSvg.insert(()=>outerNode);if(node.img){const image=shapeSvg.append("image");image.attr("href",node.img),image.attr("width",imageWidth),image.attr("height",imageHeight),image.attr("preserveAspectRatio","none"),image.attr("transform",`translate(${-imageWidth/2},${topLabel?outerHeight/2-imageHeight:-outerHeight/2})`)}return label.attr("transform",`translate(${-bbox.width/2-(bbox.x-(bbox.left??0))},${topLabel?-imageHeight/2-bbox.height/2-labelPadding/2:imageHeight/2-bbox.height/2+labelPadding/2})`),iconShape.attr("transform",`translate(0,${topLabel?bbox.height/2+labelPadding/2:-bbox.height/2-labelPadding/2})`),updateNodeBounds(node,outerShape),node.intersect=function(point2){if(log.info("iconSquare intersect",node,point2),!node.label)return intersect_default.rect(node,point2);const dx=node.x??0,dy=node.y??0,nodeHeight=node.height??0;let points=[];return topLabel?points=[{x:dx-bbox.width/2,y:dy-nodeHeight/2},{x:dx+bbox.width/2,y:dy-nodeHeight/2},{x:dx+bbox.width/2,y:dy-nodeHeight/2+bbox.height+labelPadding},{x:dx+imageWidth/2,y:dy-nodeHeight/2+bbox.height+labelPadding},{x:dx+imageWidth/2,y:dy+nodeHeight/2},{x:dx-imageWidth/2,y:dy+nodeHeight/2},{x:dx-imageWidth/2,y:dy-nodeHeight/2+bbox.height+labelPadding},{x:dx-bbox.width/2,y:dy-nodeHeight/2+bbox.height+labelPadding}]:points=[{x:dx-imageWidth/2,y:dy-nodeHeight/2},{x:dx+imageWidth/2,y:dy-nodeHeight/2},{x:dx+imageWidth/2,y:dy-nodeHeight/2+imageHeight},{x:dx+bbox.width/2,y:dy-nodeHeight/2+imageHeight},{x:dx+bbox.width/2/2,y:dy+nodeHeight/2},{x:dx-bbox.width/2,y:dy+nodeHeight/2},{x:dx-bbox.width/2,y:dy-nodeHeight/2+imageHeight},{x:dx-imageWidth/2,y:dy-nodeHeight/2+imageHeight}],intersect_default.polygon(node,points,point2)},shapeSvg}__name(imageSquare,"imageSquare");async function inv_trapezoid(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=node.padding??0,labelPaddingY=nodePadding,labelPaddingX=node.look==="neo"?nodePadding*2:nodePadding,{shapeSvg,bbox}=await labelHelper(parent,node,getNodeClasses(node)),w2=Math.max(bbox.width+(labelPaddingX??0)*2,(node==null?void 0:node.width)??0),h2=Math.max(bbox.height+(labelPaddingY??0)*2,(node==null?void 0:node.height)??0),points=[{x:0,y:0},{x:w2,y:0},{x:w2+3*h2/6,y:-h2},{x:-3*h2/6,y:-h2}];let polygon;const{cssStyles}=node;if(node.look==="handDrawn"){const rc=at.svg(shapeSvg),options=userNodeOverrides(node,{}),pathData=createPathFromPoints(points),roughNode=rc.path(pathData,options);polygon=shapeSvg.insert(()=>roughNode,":first-child").attr("transform",`translate(${-w2/2}, ${h2/2})`),cssStyles&&polygon.attr("style",cssStyles)}else polygon=insertPolygonShape(shapeSvg,w2,h2,points);return nodeStyles&&polygon.attr("style",nodeStyles),node.width=w2,node.height=h2,updateNodeBounds(node,polygon),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg}__name(inv_trapezoid,"inv_trapezoid");async function drawRect(parent,node,options){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const{shapeSvg,bbox}=await labelHelper(parent,node,getNodeClasses(node)),totalWidth=Math.max(bbox.width+options.labelPaddingX*2,(node==null?void 0:node.width)||0),totalHeight=Math.max(bbox.height+options.labelPaddingY*2,(node==null?void 0:node.height)||0),x2=-totalWidth/2,y3=-totalHeight/2;let rect2,{rx,ry}=node;const{cssStyles}=node;if(options!=null&&options.rx&&options.ry&&(rx=options.rx,ry=options.ry),node.look==="handDrawn"){const rc=at.svg(shapeSvg),options2=userNodeOverrides(node,{}),roughNode=rx||ry?rc.path(createRoundedRectPathD(x2,y3,totalWidth,totalHeight,rx||0),options2):rc.rectangle(x2,y3,totalWidth,totalHeight,options2);rect2=shapeSvg.insert(()=>roughNode,":first-child"),rect2.attr("class","basic label-container").attr("style",handleUndefinedAttr(cssStyles))}else rect2=shapeSvg.insert("rect",":first-child"),rect2.attr("class","basic label-container").attr("style",nodeStyles).attr("rx",handleUndefinedAttr(rx)).attr("ry",handleUndefinedAttr(ry)).attr("x",x2).attr("y",y3).attr("width",totalWidth).attr("height",totalHeight);return updateNodeBounds(node,rect2),node.calcIntersect=function(bounds,point2){return intersect_default.rect(bounds,point2)},node.intersect=function(point2){return intersect_default.rect(node,point2)},shapeSvg}__name(drawRect,"drawRect");async function labelRect(parent,node){const{shapeSvg,bbox,label}=await labelHelper(parent,node,"label"),rect2=shapeSvg.insert("rect",":first-child");return rect2.attr("width",.1).attr("height",.1),shapeSvg.attr("class","label edgeLabel"),label.attr("transform",`translate(${-(bbox.width/2)-(bbox.x-(bbox.left??0))}, ${-(bbox.height/2)-(bbox.y-(bbox.top??0))})`),updateNodeBounds(node,rect2),node.intersect=function(point2){return intersect_default.rect(node,point2)},shapeSvg}__name(labelRect,"labelRect");async function lean_left(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=node.padding??0,labelPaddingY=nodePadding,labelPaddingX=node.look==="neo"?nodePadding*2:nodePadding,{shapeSvg,bbox}=await labelHelper(parent,node,getNodeClasses(node)),h2=((node==null?void 0:node.height)??bbox.height)+labelPaddingY,w2=((node==null?void 0:node.width)??bbox.width)+labelPaddingX,points=[{x:0,y:0},{x:w2+3*h2/6,y:0},{x:w2,y:-h2},{x:-(3*h2)/6,y:-h2}];let polygon;const{cssStyles}=node;if(node.look==="handDrawn"){const rc=at.svg(shapeSvg),options=userNodeOverrides(node,{}),pathData=createPathFromPoints(points),roughNode=rc.path(pathData,options);polygon=shapeSvg.insert(()=>roughNode,":first-child").attr("transform",`translate(${-w2/2}, ${h2/2})`),cssStyles&&polygon.attr("style",cssStyles)}else polygon=insertPolygonShape(shapeSvg,w2,h2,points);return nodeStyles&&polygon.attr("style",nodeStyles),node.width=w2,node.height=h2,updateNodeBounds(node,polygon),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg}__name(lean_left,"lean_left");async function lean_right(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=node.padding??0,labelPaddingY=nodePadding,labelPaddingX=node.look==="neo"?nodePadding*2:nodePadding,{shapeSvg,bbox}=await labelHelper(parent,node,getNodeClasses(node)),h2=((node==null?void 0:node.height)??bbox.height)+labelPaddingY,w2=((node==null?void 0:node.width)??bbox.width)+labelPaddingX,points=[{x:-3*h2/6,y:0},{x:w2,y:0},{x:w2+3*h2/6,y:-h2},{x:0,y:-h2}];let polygon;const{cssStyles}=node;if(node.look==="handDrawn"){const rc=at.svg(shapeSvg),options=userNodeOverrides(node,{}),pathData=createPathFromPoints(points),roughNode=rc.path(pathData,options);polygon=shapeSvg.insert(()=>roughNode,":first-child").attr("transform",`translate(${-w2/2}, ${h2/2})`),cssStyles&&polygon.attr("style",cssStyles)}else polygon=insertPolygonShape(shapeSvg,w2,h2,points);return nodeStyles&&polygon.attr("style",nodeStyles),node.width=w2,node.height=h2,updateNodeBounds(node,polygon),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg}__name(lean_right,"lean_right");function lightningBolt(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.label="",node.labelStyle=labelStyles;const shapeSvg=parent.insert("g").attr("class",getNodeClasses(node)).attr("id",node.domId??node.id),{cssStyles}=node,width=Math.max(35,(node==null?void 0:node.width)??0),height=Math.max(35,(node==null?void 0:node.height)??0),gap=7,points=[{x:width,y:0},{x:0,y:height+gap/2},{x:width-2*gap,y:height+gap/2},{x:0,y:2*height},{x:width,y:height-gap/2},{x:2*gap,y:height-gap/2}],rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const linePath=createPathFromPoints(points),lineNode=rc.path(linePath,options),lightningBolt2=shapeSvg.insert(()=>lineNode,":first-child");return lightningBolt2.attr("class","outer-path"),cssStyles&&node.look!=="handDrawn"&&lightningBolt2.selectAll("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&lightningBolt2.selectAll("path").attr("style",nodeStyles),lightningBolt2.attr("transform",`translate(-${width/2},${-height})`),updateNodeBounds(node,lightningBolt2),node.intersect=function(point2){return log.info("lightningBolt intersect",node,point2),intersect_default.polygon(node,points,point2)},shapeSvg}__name(lightningBolt,"lightningBolt");var createCylinderPathD2=__name((x2,y3,width,height,rx,ry,outerOffset)=>[`M${x2},${y3+ry}`,`a${rx},${ry} 0,0,0 ${width},0`,`a${rx},${ry} 0,0,0 ${-width},0`,`l0,${height}`,`a${rx},${ry} 0,0,0 ${width},0`,`l0,${-height}`,`M${x2},${y3+ry+outerOffset}`,`a${rx},${ry} 0,0,0 ${width},0`].join(" "),"createCylinderPathD"),createOuterCylinderPathD2=__name((x2,y3,width,height,rx,ry,outerOffset)=>[`M${x2},${y3+ry}`,`M${x2+width},${y3+ry}`,`a${rx},${ry} 0,0,0 ${-width},0`,`l0,${height}`,`a${rx},${ry} 0,0,0 ${width},0`,`l0,${-height}`,`M${x2},${y3+ry+outerOffset}`,`a${rx},${ry} 0,0,0 ${width},0`].join(" "),"createOuterCylinderPathD"),createInnerCylinderPathD2=__name((x2,y3,width,height,rx,ry)=>[`M${x2-width/2},${-height/2}`,`a${rx},${ry} 0,0,0 ${width},0`].join(" "),"createInnerCylinderPathD"),MIN_HEIGHT3=10,MIN_WIDTH3=10;async function linedCylinder(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=node.padding??0,labelPaddingX=node.look==="neo"?16:nodePadding,labelPaddingY=node.look==="neo"?24:nodePadding;if(node.width||node.height){const originalWidth=node.width??0;node.width=(node.width??0)-labelPaddingX,node.width<MIN_WIDTH3&&(node.width=MIN_WIDTH3);const ry2=originalWidth/2/(2.5+originalWidth/50);node.height=(node.height??0)-labelPaddingY-ry2*3,node.height<MIN_HEIGHT3&&(node.height=MIN_HEIGHT3)}const{shapeSvg,bbox,label}=await labelHelper(parent,node,getNodeClasses(node)),w2=(node!=null&&node.width?node==null?void 0:node.width:bbox.width)+labelPaddingX*2,rx=w2/2,ry=rx/(2.5+w2/50),h2=(node!=null&&node.height?node==null?void 0:node.height:bbox.height)+ry+labelPaddingY*2,outerOffset=h2*.1;let cylinder2;const{cssStyles}=node;if(node.look==="handDrawn"){const rc=at.svg(shapeSvg),outerPathData=createOuterCylinderPathD2(0,0,w2,h2,rx,ry,outerOffset),innerPathData=createInnerCylinderPathD2(0,ry,w2,h2,rx,ry),options=userNodeOverrides(node,{}),outerNode=rc.path(outerPathData,options),innerLine=rc.path(innerPathData,options);shapeSvg.insert(()=>innerLine,":first-child").attr("class","line"),cylinder2=shapeSvg.insert(()=>outerNode,":first-child"),cylinder2.attr("class","basic label-container"),cssStyles&&cylinder2.attr("style",cssStyles)}else{const pathData=createCylinderPathD2(0,0,w2,h2,rx,ry,outerOffset);cylinder2=shapeSvg.insert("path",":first-child").attr("d",pathData).attr("class","basic label-container outer-path").attr("style",handleUndefinedAttr(cssStyles)).attr("style",nodeStyles)}return cylinder2.attr("label-offset-y",ry),cylinder2.attr("transform",`translate(${-w2/2}, ${-(h2/2+ry)})`),updateNodeBounds(node,cylinder2),label.attr("transform",`translate(${-(bbox.width/2)-(bbox.x-(bbox.left??0))}, ${-(bbox.height/2)+ry-(bbox.y-(bbox.top??0))})`),node.intersect=function(point2){const pos=intersect_default.rect(node,point2),x2=pos.x-(node.x??0);if(rx!=0&&(Math.abs(x2)<(node.width??0)/2||Math.abs(x2)==(node.width??0)/2&&Math.abs(pos.y-(node.y??0))>(node.height??0)/2-ry)){let y3=ry*ry*(1-x2*x2/(rx*rx));y3>0&&(y3=Math.sqrt(y3)),y3=ry-y3,point2.y-(node.y??0)>0&&(y3=-y3),pos.y+=y3}return pos},shapeSvg}__name(linedCylinder,"linedCylinder");async function linedWaveEdgedRect(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=node.padding??0,labelPaddingX=node.look==="neo"?16:nodePadding,labelPaddingY=node.look==="neo"?12:nodePadding;if(node.width||node.height){const originalWidth=node.width;node.width=(originalWidth??0)*10/11-labelPaddingX*2,node.width<10&&(node.width=10),node.height=((node==null?void 0:node.height)??0)-labelPaddingY*2,node.height<10&&(node.height=10)}const{shapeSvg,bbox,label}=await labelHelper(parent,node,getNodeClasses(node)),w2=(node!=null&&node.width?node==null?void 0:node.width:bbox.width)+(labelPaddingX??0)*2,h2=(node!=null&&node.height?node==null?void 0:node.height:bbox.height)+(labelPaddingY??0)*2,waveAmplitude=node.look==="neo"?h2/4:h2/8,finalH=h2+waveAmplitude,{cssStyles}=node,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const points=[{x:-w2/2-w2/2*.1,y:-finalH/2},{x:-w2/2-w2/2*.1,y:finalH/2},...generateFullSineWavePoints(-w2/2-w2/2*.1,finalH/2,w2/2+w2/2*.1,finalH/2,waveAmplitude,.8),{x:w2/2+w2/2*.1,y:-finalH/2},{x:-w2/2-w2/2*.1,y:-finalH/2},{x:-w2/2,y:-finalH/2},{x:-w2/2,y:finalH/2*1.1},{x:-w2/2,y:-finalH/2}],poly=rc.polygon(points.map(p2=>[p2.x,p2.y]),options),waveEdgeRect=shapeSvg.insert(()=>poly,":first-child");return waveEdgeRect.attr("class","basic label-container outer-path"),cssStyles&&node.look!=="handDrawn"&&waveEdgeRect.selectAll("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&waveEdgeRect.selectAll("path").attr("style",nodeStyles),waveEdgeRect.attr("transform",`translate(0,${-waveAmplitude/2})`),label.attr("transform",`translate(${-w2/2+(node.padding??0)+w2/2*.1/2-(bbox.x-(bbox.left??0))},${-h2/2+(node.padding??0)-waveAmplitude/2-(bbox.y-(bbox.top??0))})`),updateNodeBounds(node,waveEdgeRect),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg}__name(linedWaveEdgedRect,"linedWaveEdgedRect");async function multiRect(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=node.padding??0,labelPaddingX=node.look==="neo"?16:nodePadding,labelPaddingY=node.look==="neo"?12:nodePadding,rectOffset2=node.look==="neo"?10:5;(node.width||node.height)&&(node.width=Math.max(((node==null?void 0:node.width)??0)-labelPaddingX*2-2*rectOffset2,10),node.height=Math.max(((node==null?void 0:node.height)??0)-labelPaddingY*2-2*rectOffset2,10));const{shapeSvg,bbox,label}=await labelHelper(parent,node,getNodeClasses(node)),totalWidth=(node!=null&&node.width?node==null?void 0:node.width:bbox.width)+labelPaddingX*2+2*rectOffset2,totalHeight=(node!=null&&node.height?node==null?void 0:node.height:bbox.height)+labelPaddingY*2+2*rectOffset2,w2=totalWidth-2*rectOffset2,h2=totalHeight-2*rectOffset2,x2=-w2/2,y3=-h2/2,{cssStyles}=node,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{}),outerPathPoints=[{x:x2-rectOffset2,y:y3+rectOffset2},{x:x2-rectOffset2,y:y3+h2+rectOffset2},{x:x2+w2-rectOffset2,y:y3+h2+rectOffset2},{x:x2+w2-rectOffset2,y:y3+h2},{x:x2+w2,y:y3+h2},{x:x2+w2,y:y3+h2-rectOffset2},{x:x2+w2+rectOffset2,y:y3+h2-rectOffset2},{x:x2+w2+rectOffset2,y:y3-rectOffset2},{x:x2+rectOffset2,y:y3-rectOffset2},{x:x2+rectOffset2,y:y3},{x:x2,y:y3},{x:x2,y:y3+rectOffset2}],innerPathPoints=[{x:x2,y:y3+rectOffset2},{x:x2+w2-rectOffset2,y:y3+rectOffset2},{x:x2+w2-rectOffset2,y:y3+h2},{x:x2+w2,y:y3+h2},{x:x2+w2,y:y3},{x:x2,y:y3}];node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const outerPath=createPathFromPoints(outerPathPoints);let outerNode=rc.path(outerPath,options);const innerPath=createPathFromPoints(innerPathPoints);let innerNode=rc.path(innerPath,options);node.look!=="handDrawn"&&(outerNode=mergePaths(outerNode),innerNode=mergePaths(innerNode));const multiRect2=shapeSvg.insert("g",":first-child");return multiRect2.insert(()=>outerNode),multiRect2.insert(()=>innerNode),multiRect2.attr("class","basic label-container outer-path"),cssStyles&&node.look!=="handDrawn"&&multiRect2.selectAll("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&multiRect2.selectAll("path").attr("style",nodeStyles),label.attr("transform",`translate(${-(bbox.width/2)-rectOffset2-(bbox.x-(bbox.left??0))}, ${-(bbox.height/2)+rectOffset2-(bbox.y-(bbox.top??0))})`),updateNodeBounds(node,multiRect2),node.intersect=function(point2){return intersect_default.polygon(node,outerPathPoints,point2)},shapeSvg}__name(multiRect,"multiRect");async function multiWaveEdgedRectangle(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const{shapeSvg,bbox,label}=await labelHelper(parent,node,getNodeClasses(node)),nodePadding=node.padding??0,labelPaddingX=node.look==="neo"?16:nodePadding,labelPaddingY=node.look==="neo"?12:nodePadding;let adjustFinalHeight=!0;(node.width||node.height)&&(adjustFinalHeight=!1,node.width=((node==null?void 0:node.width)??0)-labelPaddingX*2,node.height=((node==null?void 0:node.height)??0)-labelPaddingY*3);const w2=Math.max(bbox.width,(node==null?void 0:node.width)??0)+labelPaddingX*2,h2=Math.max(bbox.height,(node==null?void 0:node.height)??0)+labelPaddingY*3,waveAmplitude=node.look==="neo"?h2/4:h2/8,finalH=h2+(adjustFinalHeight?waveAmplitude/2:-waveAmplitude/2),x2=-w2/2,y3=-finalH/2,rectOffset2=10,{cssStyles}=node,wavePoints=generateFullSineWavePoints(x2-rectOffset2,y3+finalH+rectOffset2,x2+w2-rectOffset2,y3+finalH+rectOffset2,waveAmplitude,.8),lastWavePoint=wavePoints==null?void 0:wavePoints[wavePoints.length-1],outerPathPoints=[{x:x2-rectOffset2,y:y3+rectOffset2},{x:x2-rectOffset2,y:y3+finalH+rectOffset2},...wavePoints,{x:x2+w2-rectOffset2,y:lastWavePoint.y-rectOffset2},{x:x2+w2,y:lastWavePoint.y-rectOffset2},{x:x2+w2,y:lastWavePoint.y-2*rectOffset2},{x:x2+w2+rectOffset2,y:lastWavePoint.y-2*rectOffset2},{x:x2+w2+rectOffset2,y:y3-rectOffset2},{x:x2+rectOffset2,y:y3-rectOffset2},{x:x2+rectOffset2,y:y3},{x:x2,y:y3},{x:x2,y:y3+rectOffset2}],innerPathPoints=[{x:x2,y:y3+rectOffset2},{x:x2+w2-rectOffset2,y:y3+rectOffset2},{x:x2+w2-rectOffset2,y:lastWavePoint.y-rectOffset2},{x:x2+w2,y:lastWavePoint.y-rectOffset2},{x:x2+w2,y:y3},{x:x2,y:y3}],rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const outerPath=createPathFromPoints(outerPathPoints),outerNode=rc.path(outerPath,options),innerPath=createPathFromPoints(innerPathPoints),innerNode=rc.path(innerPath,options),shape=shapeSvg.insert(()=>outerNode,":first-child");return shape.insert(()=>innerNode),shape.attr("class","basic label-container outer-path"),cssStyles&&node.look!=="handDrawn"&&shape.selectAll("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&shape.selectAll("path").attr("style",nodeStyles),shape.attr("transform",`translate(0,${-waveAmplitude/2})`),label.attr("transform",`translate(${-(bbox.width/2)-rectOffset2-(bbox.x-(bbox.left??0))}, ${-(bbox.height/2)+rectOffset2-waveAmplitude/2-(bbox.y-(bbox.top??0))})`),updateNodeBounds(node,shape),node.intersect=function(point2){return intersect_default.polygon(node,outerPathPoints,point2)},shapeSvg}__name(multiWaveEdgedRectangle,"multiWaveEdgedRectangle");async function note(parent,node,{config:{themeVariables}}){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles,node.useHtmlLabels||getEffectiveHtmlLabels(getConfig())||(node.centerLabel=!0);const{shapeSvg,bbox,label}=await labelHelper(parent,node,getNodeClasses(node)),totalWidth=Math.max(bbox.width+(node.padding??0)*2,(node==null?void 0:node.width)??0),totalHeight=Math.max(bbox.height+(node.padding??0)*2,(node==null?void 0:node.height)??0),x2=-totalWidth/2,y3=-totalHeight/2,{cssStyles}=node,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{fill:themeVariables.noteBkgColor,stroke:themeVariables.noteBorderColor});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const noteShapeNode=rc.rectangle(x2,y3,totalWidth,totalHeight,options),rect2=shapeSvg.insert(()=>noteShapeNode,":first-child");return rect2.attr("class","basic label-container outer-path"),label.attr("class","label noteLabel"),cssStyles&&node.look!=="handDrawn"&&rect2.selectAll("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&rect2.selectAll("path").attr("style",nodeStyles),label.attr("transform",`translate(${-bbox.width/2-(bbox.x-(bbox.left??0))}, ${-(bbox.height/2)-(bbox.y-(bbox.top??0))})`),updateNodeBounds(node,rect2),node.intersect=function(point2){return intersect_default.rect(node,point2)},shapeSvg}__name(note,"note");var createDecisionBoxPathD=__name((x2,y3,size)=>[`M${x2+size/2},${y3}`,`L${x2+size},${y3-size/2}`,`L${x2+size/2},${y3-size}`,`L${x2},${y3-size/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function question(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const{shapeSvg,bbox}=await labelHelper(parent,node,getNodeClasses(node)),w2=bbox.width+(node.padding??0),h2=bbox.height+(node.padding??0),s2=w2+h2,adjustment=.5,points=[{x:s2/2,y:0},{x:s2,y:-s2/2},{x:s2/2,y:-s2},{x:0,y:-s2/2}];let polygon;const{cssStyles}=node;if(node.look==="handDrawn"){const rc=at.svg(shapeSvg),options=userNodeOverrides(node,{}),pathData=createDecisionBoxPathD(0,0,s2),roughNode=rc.path(pathData,options);polygon=shapeSvg.insert(()=>roughNode,":first-child").attr("transform",`translate(${-s2/2+adjustment}, ${s2/2})`),cssStyles&&polygon.attr("style",cssStyles)}else polygon=insertPolygonShape(shapeSvg,s2,s2,points),polygon.attr("transform",`translate(${-s2/2+adjustment}, ${s2/2})`);return nodeStyles&&polygon.attr("style",nodeStyles),updateNodeBounds(node,polygon),node.calcIntersect=function(bounds,point2){const s22=bounds.width,points2=[{x:s22/2,y:0},{x:s22,y:-s22/2},{x:s22/2,y:-s22},{x:0,y:-s22/2}],res=intersect_default.polygon(bounds,points2,point2);return{x:res.x-.5,y:res.y-.5}},node.intersect=function(point2){return this.calcIntersect(node,point2)},shapeSvg}__name(question,"question");async function rect_left_inv_arrow(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=node.padding??0,labelPaddingX=node.look==="neo"?21:nodePadding??0,labelPaddingY=node.look==="neo"?12:nodePadding??0,{shapeSvg,bbox,label}=await labelHelper(parent,node,getNodeClasses(node)),w2=((node==null?void 0:node.width)??bbox.width)+(node.look==="neo"?labelPaddingX*2:labelPaddingX),h2=((node==null?void 0:node.height)??bbox.height)+(node.look==="neo"?labelPaddingY*2:labelPaddingY),x2=-w2/2,y3=-h2/2,notch=y3/2,points=[{x:x2+notch,y:y3},{x:x2,y:0},{x:x2+notch,y:-y3},{x:-x2,y:-y3},{x:-x2,y:y3}],{cssStyles}=node,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const pathData=createPathFromPoints(points),roughNode=rc.path(pathData,options),polygon=shapeSvg.insert(()=>roughNode,":first-child");return polygon.attr("class","basic label-container outer-path"),cssStyles&&node.look!=="handDrawn"&&polygon.selectAll("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&polygon.selectAll("path").attr("style",nodeStyles),polygon.attr("transform",`translate(${-notch/2},0)`),label.attr("transform",`translate(${-notch/2-bbox.width/2-(bbox.x-(bbox.left??0))}, ${-(bbox.height/2)-(bbox.y-(bbox.top??0))})`),updateNodeBounds(node,polygon),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg}__name(rect_left_inv_arrow,"rect_left_inv_arrow");async function rectWithTitle(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;let classes;node.cssClasses?classes="node "+node.cssClasses:classes="node default";const shapeSvg=parent.insert("g").attr("class",classes).attr("id",node.domId||node.id),g2=shapeSvg.insert("g"),label=shapeSvg.insert("g").attr("class","label").attr("style",nodeStyles),description=node.description,title=node.label,text2=await createLabel_default(label,title,node.labelStyle,!0,!0);let bbox={width:0,height:0};if(getEffectiveHtmlLabels(getConfig2())){const div2=text2.children[0],dv2=select(text2);bbox=div2.getBoundingClientRect(),dv2.attr("width",bbox.width),dv2.attr("height",bbox.height)}log.info("Text 2",description);const textRows=description||[],titleBox=text2.getBBox(),descr=await createLabel_default(label,Array.isArray(textRows)?textRows.join("<br/>"):textRows,node.labelStyle,!0,!0),div=descr.children[0],dv=select(descr);bbox=div.getBoundingClientRect(),dv.attr("width",bbox.width),dv.attr("height",bbox.height);const halfPadding=(node.padding||0)/2;select(descr).attr("transform","translate( "+(bbox.width>titleBox.width?0:(titleBox.width-bbox.width)/2)+", "+(titleBox.height+halfPadding+5)+")"),select(text2).attr("transform","translate( "+(bbox.width<titleBox.width?0:-(titleBox.width-bbox.width)/2)+", 0)"),bbox=label.node().getBBox(),label.attr("transform","translate("+-bbox.width/2+", "+(-bbox.height/2-halfPadding+3)+")");const totalWidth=bbox.width+(node.padding||0),totalHeight=bbox.height+(node.padding||0),x2=-bbox.width/2-halfPadding,y3=-bbox.height/2-halfPadding;let rect2,innerLine;if(node.look==="handDrawn"){const rc=at.svg(shapeSvg),options=userNodeOverrides(node,{}),roughNode=rc.path(createRoundedRectPathD(x2,y3,totalWidth,totalHeight,node.rx||0),options),roughLine=rc.line(-bbox.width/2-halfPadding,-bbox.height/2-halfPadding+titleBox.height+halfPadding,bbox.width/2+halfPadding,-bbox.height/2-halfPadding+titleBox.height+halfPadding,options);innerLine=shapeSvg.insert(()=>(log.debug("Rough node insert CXC",roughNode),roughLine),":first-child"),rect2=shapeSvg.insert(()=>(log.debug("Rough node insert CXC",roughNode),roughNode),":first-child")}else rect2=g2.insert("rect",":first-child"),innerLine=g2.insert("line"),rect2.attr("class","outer title-state").attr("style",nodeStyles).attr("x",-bbox.width/2-halfPadding).attr("y",-bbox.height/2-halfPadding).attr("width",bbox.width+(node.padding||0)).attr("height",bbox.height+(node.padding||0)),innerLine.attr("class","divider").attr("x1",-bbox.width/2-halfPadding).attr("x2",bbox.width/2+halfPadding).attr("y1",-bbox.height/2-halfPadding+titleBox.height+halfPadding).attr("y2",-bbox.height/2-halfPadding+titleBox.height+halfPadding);return updateNodeBounds(node,rect2),node.intersect=function(point2){return intersect_default.rect(node,point2)},shapeSvg}__name(rectWithTitle,"rectWithTitle");async function roundedRect(parent,node,{config:{themeVariables}}){const radius=(themeVariables==null?void 0:themeVariables.radius)??5,options={rx:radius,ry:radius,labelPaddingX:((node==null?void 0:node.padding)??0)*1,labelPaddingY:((node==null?void 0:node.padding)??0)*1};return drawRect(parent,node,options)}__name(roundedRect,"roundedRect");var FRAME_WIDTH=8;async function shadedProcess(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const paddingX=node.look==="neo"?16:node.padding??0,paddingY=node.look==="neo"?12:node.padding??0,{shapeSvg,bbox,label}=await labelHelper(parent,node,getNodeClasses(node)),totalWidth=((node==null?void 0:node.width)??bbox.width)+paddingX*2+(node.look==="neo"?FRAME_WIDTH:FRAME_WIDTH*2),totalHeight=((node==null?void 0:node.height)??bbox.height)+paddingY*2,w2=totalWidth-FRAME_WIDTH,h2=totalHeight,x2=FRAME_WIDTH-totalWidth/2,y3=-totalHeight/2,{cssStyles}=node,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const points=[{x:x2,y:y3},{x:x2+w2,y:y3},{x:x2+w2,y:y3+h2},{x:x2-FRAME_WIDTH,y:y3+h2},{x:x2-FRAME_WIDTH,y:y3},{x:x2,y:y3},{x:x2,y:y3+h2}],roughNode=rc.polygon(points.map(p2=>[p2.x,p2.y]),options),rect2=shapeSvg.insert(()=>roughNode,":first-child");return rect2.attr("class","basic label-container outer-path").attr("style",handleUndefinedAttr(cssStyles)),nodeStyles&&node.look!=="handDrawn"&&rect2.selectAll("path").attr("style",nodeStyles),cssStyles&&node.look!=="handDrawn"&&rect2.selectAll("path").attr("style",nodeStyles),label.attr("transform",`translate(${FRAME_WIDTH/2-bbox.width/2-(bbox.x-(bbox.left??0))}, ${-(bbox.height/2)-(bbox.y-(bbox.top??0))})`),updateNodeBounds(node,rect2),node.intersect=function(point2){return intersect_default.rect(node,point2)},shapeSvg}__name(shadedProcess,"shadedProcess");async function slopedRect(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=node.padding??0,labelPaddingX=node.look==="neo"?16:nodePadding,labelPaddingY=node.look==="neo"?12:nodePadding;(node.width||node.height)&&(node.width=Math.max(((node==null?void 0:node.width)??0)-labelPaddingX*2,10),node.height=Math.max(((node==null?void 0:node.height)??0)/1.5-labelPaddingY*2,10));const{shapeSvg,bbox,label}=await labelHelper(parent,node,getNodeClasses(node)),totalWidth=(node!=null&&node.width?node==null?void 0:node.width:bbox.width)+labelPaddingX*2,totalHeight=((node!=null&&node.height?node==null?void 0:node.height:bbox.height)+labelPaddingY*2)*1.5,w2=totalWidth,h2=totalHeight/1.5,x2=-w2/2,y3=-h2/2,{cssStyles}=node,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const points=[{x:x2,y:y3},{x:x2,y:y3+h2},{x:x2+w2,y:y3+h2},{x:x2+w2,y:y3-h2/2}],pathData=createPathFromPoints(points),shapeNode=rc.path(pathData,options),polygon=shapeSvg.insert(()=>shapeNode,":first-child");return polygon.attr("class","basic label-container outer-path"),cssStyles&&node.look!=="handDrawn"&&polygon.selectChildren("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&polygon.selectChildren("path").attr("style",nodeStyles),polygon.attr("transform",`translate(0, ${h2/4})`),label.attr("transform",`translate(${-w2/2+(node.padding??0)-(bbox.x-(bbox.left??0))}, ${-h2/4+(node.padding??0)-(bbox.y-(bbox.top??0))})`),updateNodeBounds(node,polygon),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg}__name(slopedRect,"slopedRect");async function squareRect2(parent,node){const nodePadding=node.padding??0,labelPaddingX=node.look==="neo"?16:nodePadding*2,labelPaddingY=node.look==="neo"?12:nodePadding,options={rx:0,ry:0,labelPaddingX:node.labelPaddingX??labelPaddingX,labelPaddingY};return drawRect(parent,node,options)}__name(squareRect2,"squareRect");async function stadium(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=node.padding??0,labelPaddingX=node.look==="neo"?20:nodePadding,labelPaddingY=node.look==="neo"?12:nodePadding,{shapeSvg,bbox}=await labelHelper(parent,node,getNodeClasses(node)),h2=bbox.height+(node.look==="neo"?labelPaddingY*2:labelPaddingY),w2=bbox.width+h2/4+(node.look==="neo"?labelPaddingX*2:labelPaddingX),radius=h2/2,{cssStyles}=node,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const points=[{x:-w2/2+radius,y:-h2/2},{x:w2/2-radius,y:-h2/2},...generateCirclePoints(-w2/2+radius,0,radius,50,90,270),{x:w2/2-radius,y:h2/2},...generateCirclePoints(w2/2-radius,0,radius,50,270,450)],pathData=createPathFromPoints(points),shapeNode=rc.path(pathData,options),polygon=shapeSvg.insert(()=>shapeNode,":first-child");return polygon.attr("class","basic label-container outer-path"),cssStyles&&node.look!=="handDrawn"&&polygon.selectChildren("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&polygon.selectChildren("path").attr("style",nodeStyles),updateNodeBounds(node,polygon),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg}__name(stadium,"stadium");async function state(parent,node){const options={rx:node.look==="neo"?3:5,ry:node.look==="neo"?3:5};return drawRect(parent,node,options)}__name(state,"state");function stateEnd(parent,node,{config:{themeVariables}}){var _a17,_b;const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const{cssStyles}=node,{lineColor,stateBorder,nodeBorder,nodeShadow}=themeVariables;(node.width||node.height)&&((node.width??0)<14&&(node.width=14),(node.height??0)<14&&(node.height=14)),node.width||(node.width=14),node.height||(node.height=14);const shapeSvg=parent.insert("g").attr("class","node default").attr("id",node.domId??node.id),rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const roughNode=rc.circle(0,0,node.width,{...options,stroke:lineColor,strokeWidth:2}),innerFill=stateBorder??nodeBorder,innerNodeRadius=(node.width??0)*5/14,roughInnerNode=rc.circle(0,0,innerNodeRadius,{...options,fill:innerFill,stroke:innerFill,strokeWidth:2,fillStyle:"solid"}),circle2=shapeSvg.insert(()=>roughNode,":first-child");if(circle2.insert(()=>roughInnerNode),node.look!=="handDrawn"&&circle2.attr("class","outer-path"),cssStyles&&circle2.selectAll("path").attr("style",cssStyles),nodeStyles&&circle2.selectAll("path").attr("style",nodeStyles),node.width<25&&nodeShadow&&node.look!=="handDrawn"){const svgId=((_b=(_a17=parent.node())==null?void 0:_a17.ownerSVGElement)==null?void 0:_b.id)??"",filterId=svgId?`${svgId}-drop-shadow-small`:"drop-shadow-small";circle2.attr("style",`filter:url(#${filterId})`)}return updateNodeBounds(node,circle2),node.intersect=function(point2){return intersect_default.circle(node,(node.width??0)/2,point2)},shapeSvg}__name(stateEnd,"stateEnd");function stateStart(parent,node,{config:{themeVariables}}){var _a17,_b;const{lineColor,nodeShadow}=themeVariables;(node.width||node.height)&&((node.width??0)<14&&(node.width=14),(node.height??0)<14&&(node.height=14)),node.width||(node.width=14),node.height||(node.height=14);const shapeSvg=parent.insert("g").attr("class","node default").attr("id",node.domId||node.id);let circle2;if(node.look==="handDrawn"){const roughNode=at.svg(shapeSvg).circle(0,0,node.width,solidStateFill(lineColor));circle2=shapeSvg.insert(()=>roughNode),circle2.attr("class","state-start").attr("r",(node.width??7)/2).attr("width",node.width??14).attr("height",node.height??14)}else circle2=shapeSvg.insert("circle",":first-child"),circle2.attr("class","state-start").attr("r",(node.width??7)/2).attr("width",node.width??14).attr("height",node.height??14);if(node.width<25&&nodeShadow&&node.look!=="handDrawn"){const svgId=((_b=(_a17=parent.node())==null?void 0:_a17.ownerSVGElement)==null?void 0:_b.id)??"",filterId=svgId?`${svgId}-drop-shadow-small`:"drop-shadow-small";circle2.attr("style",`filter:url(#${filterId})`)}return updateNodeBounds(node,circle2),node.intersect=function(point2){return intersect_default.circle(node,(node.width??7)/2,point2)},shapeSvg}__name(stateStart,"stateStart");var FRAME_WIDTH2=8;async function subroutine(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=(node==null?void 0:node.padding)??8,labelPaddingX=node.look==="neo"?28:nodePadding,labelPaddingY=node.look==="neo"?12:nodePadding,{shapeSvg,bbox}=await labelHelper(parent,node,getNodeClasses(node)),totalWidth=((node==null?void 0:node.width)??bbox.width)+2*FRAME_WIDTH2+labelPaddingX,totalHeight=((node==null?void 0:node.height)??bbox.height)+labelPaddingY,w2=totalWidth-2*FRAME_WIDTH2,h2=totalHeight,x2=-totalWidth/2,y3=-totalHeight/2,points=[{x:0,y:0},{x:w2,y:0},{x:w2,y:-h2},{x:0,y:-h2},{x:0,y:0},{x:-8,y:0},{x:w2+8,y:0},{x:w2+8,y:-h2},{x:-8,y:-h2},{x:-8,y:0}];if(node.look==="handDrawn"){const rc=at.svg(shapeSvg),options=userNodeOverrides(node,{}),roughNode=rc.rectangle(x2,y3,w2+16,h2,options),l1=rc.line(x2+FRAME_WIDTH2,y3,x2+FRAME_WIDTH2,y3+h2,options),l22=rc.line(x2+FRAME_WIDTH2+w2,y3,x2+FRAME_WIDTH2+w2,y3+h2,options);shapeSvg.insert(()=>l1,":first-child"),shapeSvg.insert(()=>l22,":first-child");const rect2=shapeSvg.insert(()=>roughNode,":first-child"),{cssStyles}=node;rect2.attr("class","basic label-container").attr("style",handleUndefinedAttr(cssStyles)),updateNodeBounds(node,rect2)}else{const el=insertPolygonShape(shapeSvg,w2,h2,points);nodeStyles&&el.attr("style",nodeStyles),updateNodeBounds(node,el)}return node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg}__name(subroutine,"subroutine");var TAG_RATIO=.2;async function taggedRect(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=node.padding??0,labelPaddingX=node.look==="neo"?16:nodePadding,labelPaddingY=node.look==="neo"?12:nodePadding;(node.width||node.height)&&(node.height=Math.max(((node==null?void 0:node.height)??0)-labelPaddingY*2,10),node.width=Math.max(((node==null?void 0:node.width)??0)-labelPaddingX*2-TAG_RATIO*(node.height+labelPaddingY*2),10));const{shapeSvg,bbox}=await labelHelper(parent,node,getNodeClasses(node)),totalHeight=(node!=null&&node.height?node==null?void 0:node.height:bbox.height)+labelPaddingY*2,tagWidth=TAG_RATIO*totalHeight,tagHeight=TAG_RATIO*totalHeight,w2=(node!=null&&node.width?node==null?void 0:node.width:bbox.width)+labelPaddingX*2+tagWidth-tagWidth,h2=totalHeight,x2=-w2/2,y3=-h2/2,{cssStyles}=node,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{}),rectPoints=[{x:x2-tagWidth/2,y:y3},{x:x2+w2+tagWidth/2,y:y3},{x:x2+w2+tagWidth/2,y:y3+h2},{x:x2-tagWidth/2,y:y3+h2}],tagPoints=[{x:x2+w2-tagWidth/2,y:y3+h2},{x:x2+w2+tagWidth/2,y:y3+h2},{x:x2+w2+tagWidth/2,y:y3+h2-tagHeight}];node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const rectPath=createPathFromPoints(rectPoints),rectNode=rc.path(rectPath,options),tagPath=createPathFromPoints(tagPoints),tagNode=rc.path(tagPath,{...options,fillStyle:"solid"}),taggedRect2=shapeSvg.insert(()=>tagNode,":first-child");return taggedRect2.insert(()=>rectNode,":first-child"),taggedRect2.attr("class","basic label-container outer-path"),cssStyles&&node.look!=="handDrawn"&&taggedRect2.selectAll("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&taggedRect2.selectAll("path").attr("style",nodeStyles),updateNodeBounds(node,taggedRect2),node.intersect=function(point2){return intersect_default.polygon(node,rectPoints,point2)},shapeSvg}__name(taggedRect,"taggedRect");async function taggedWaveEdgedRectangle(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const{shapeSvg,bbox,label}=await labelHelper(parent,node,getNodeClasses(node)),w2=Math.max(bbox.width+(node.padding??0)*2,(node==null?void 0:node.width)??0),h2=Math.max(bbox.height+(node.padding??0)*2,(node==null?void 0:node.height)??0),waveAmplitude=h2/8,tagWidth=.2*w2,tagHeight=.2*h2,finalH=h2+waveAmplitude,{cssStyles}=node,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const points=[{x:-w2/2-w2/2*.1,y:finalH/2},...generateFullSineWavePoints(-w2/2-w2/2*.1,finalH/2,w2/2+w2/2*.1,finalH/2,waveAmplitude,.8),{x:w2/2+w2/2*.1,y:-finalH/2},{x:-w2/2-w2/2*.1,y:-finalH/2}],x2=-w2/2+w2/2*.1,y3=-finalH/2-tagHeight*.4,tagPoints=[{x:x2+w2-tagWidth,y:(y3+h2)*1.3},{x:x2+w2,y:y3+h2-tagHeight},{x:x2+w2,y:(y3+h2)*.9},...generateFullSineWavePoints(x2+w2,(y3+h2)*1.25,x2+w2-tagWidth,(y3+h2)*1.3,-h2*.02,.5)],waveEdgeRectPath=createPathFromPoints(points),waveEdgeRectNode=rc.path(waveEdgeRectPath,options),taggedWaveEdgeRectPath=createPathFromPoints(tagPoints),taggedWaveEdgeRectNode=rc.path(taggedWaveEdgeRectPath,{...options,fillStyle:"solid"}),waveEdgeRect=shapeSvg.insert(()=>taggedWaveEdgeRectNode,":first-child");return waveEdgeRect.insert(()=>waveEdgeRectNode,":first-child"),waveEdgeRect.attr("class","basic label-container outer-path"),cssStyles&&node.look!=="handDrawn"&&waveEdgeRect.selectAll("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&waveEdgeRect.selectAll("path").attr("style",nodeStyles),waveEdgeRect.attr("transform",`translate(0,${-waveAmplitude/2})`),label.attr("transform",`translate(${-w2/2+(node.padding??0)-(bbox.x-(bbox.left??0))},${-h2/2+(node.padding??0)-waveAmplitude/2-(bbox.y-(bbox.top??0))})`),updateNodeBounds(node,waveEdgeRect),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg}__name(taggedWaveEdgedRectangle,"taggedWaveEdgedRectangle");async function text(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const{shapeSvg,bbox}=await labelHelper(parent,node,getNodeClasses(node)),totalWidth=Math.max(bbox.width+(node.padding??0),(node==null?void 0:node.width)||0),totalHeight=Math.max(bbox.height+(node.padding??0),(node==null?void 0:node.height)||0),x2=-totalWidth/2,y3=-totalHeight/2,rect2=shapeSvg.insert("rect",":first-child");return rect2.attr("class","text").attr("style",nodeStyles).attr("rx",0).attr("ry",0).attr("x",x2).attr("y",y3).attr("width",totalWidth).attr("height",totalHeight),updateNodeBounds(node,rect2),node.intersect=function(point2){return intersect_default.rect(node,point2)},shapeSvg}__name(text,"text");var createCylinderPathD3=__name((x2,y3,width,height,rx,ry)=>`M${x2},${y3}
229
+ a${rx},${ry} 0,0,1 0,${-height}
230
+ l${width},0
231
+ a${rx},${ry} 0,0,1 0,${height}
232
+ M${width},${-height}
233
+ a${rx},${ry} 0,0,0 0,${height}
234
+ l${-width},0`,"createCylinderPathD"),createOuterCylinderPathD3=__name((x2,y3,width,height,rx,ry)=>[`M${x2},${y3}`,`M${x2+width},${y3}`,`a${rx},${ry} 0,0,0 0,${-height}`,`l${-width},0`,`a${rx},${ry} 0,0,0 0,${height}`,`l${width},0`].join(" "),"createOuterCylinderPathD"),createInnerCylinderPathD3=__name((x2,y3,width,height,rx,ry)=>[`M${x2+width/2},${-height/2}`,`a${rx},${ry} 0,0,0 0,${height}`].join(" "),"createInnerCylinderPathD"),MIN_HEIGHT4=5,MIN_WIDTH4=10;async function tiltedCylinder(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=node.padding??0,labelPadding=node.look==="neo"?12:nodePadding/2;if(node.width||node.height){const originalHeight=node.height??0;node.height=(node.height??0)-labelPadding,node.height<MIN_HEIGHT4&&(node.height=MIN_HEIGHT4);const rx2=originalHeight/2/(2.5+originalHeight/50);node.width=(node.width??0)-labelPadding-rx2*3,node.width<MIN_WIDTH4&&(node.width=MIN_WIDTH4)}const{shapeSvg,bbox,label}=await labelHelper(parent,node,getNodeClasses(node)),h2=(node.height?node.height:bbox.height)+labelPadding,ry=h2/2,rx=ry/(2.5+h2/50),w2=(node.width?node.width:bbox.width)+rx+labelPadding,{cssStyles}=node;let cylinder2;if(node.look==="handDrawn"){const rc=at.svg(shapeSvg),outerPathData=createOuterCylinderPathD3(0,0,w2,h2,rx,ry),innerPathData=createInnerCylinderPathD3(0,0,w2,h2,rx,ry),outerNode=rc.path(outerPathData,userNodeOverrides(node,{})),innerLine=rc.path(innerPathData,userNodeOverrides(node,{fill:"none"}));cylinder2=shapeSvg.insert(()=>innerLine,":first-child"),cylinder2=shapeSvg.insert(()=>outerNode,":first-child"),cylinder2.attr("class","basic label-container"),cssStyles&&cylinder2.attr("style",cssStyles)}else{const pathData=createCylinderPathD3(0,0,w2,h2,rx,ry);cylinder2=shapeSvg.insert("path",":first-child").attr("d",pathData).attr("class","basic label-container").attr("style",handleUndefinedAttr(cssStyles)).attr("style",nodeStyles),cylinder2.attr("class","basic label-container outer-path"),cssStyles&&cylinder2.selectAll("path").attr("style",cssStyles),nodeStyles&&cylinder2.selectAll("path").attr("style",nodeStyles)}return cylinder2.attr("label-offset-x",rx),cylinder2.attr("transform",`translate(${-w2/2}, ${h2/2} )`),label.attr("transform",`translate(${-(bbox.width/2)-rx-(bbox.x-(bbox.left??0))}, ${-(bbox.height/2)-(bbox.y-(bbox.top??0))})`),updateNodeBounds(node,cylinder2),node.intersect=function(point2){const pos=intersect_default.rect(node,point2),y3=pos.y-(node.y??0);if(ry!=0&&(Math.abs(y3)<(node.height??0)/2||Math.abs(y3)==(node.height??0)/2&&Math.abs(pos.x-(node.x??0))>(node.width??0)/2-rx)){let x2=rx*rx*(1-y3*y3/(ry*ry));x2!=0&&(x2=Math.sqrt(Math.abs(x2))),x2=rx-x2,point2.x-(node.x??0)>0&&(x2=-x2),pos.x+=x2}return pos},shapeSvg}__name(tiltedCylinder,"tiltedCylinder");async function trapezoid(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=node.padding??0,labelPaddingY=(node.look==="neo",nodePadding),labelPaddingX=node.look==="neo"?nodePadding*2:nodePadding,{shapeSvg,bbox}=await labelHelper(parent,node,getNodeClasses(node)),h2=((node==null?void 0:node.height)??bbox.height)+labelPaddingY,w2=((node==null?void 0:node.width)??bbox.width)+labelPaddingX,points=[{x:-3*h2/6,y:0},{x:w2+3*h2/6,y:0},{x:w2,y:-h2},{x:0,y:-h2}];let polygon;const{cssStyles}=node;if(node.look==="handDrawn"){const rc=at.svg(shapeSvg),options=userNodeOverrides(node,{}),pathData=createPathFromPoints(points),roughNode=rc.path(pathData,options);polygon=shapeSvg.insert(()=>roughNode,":first-child").attr("transform",`translate(${-w2/2}, ${h2/2})`),cssStyles&&polygon.attr("style",cssStyles)}else polygon=insertPolygonShape(shapeSvg,w2,h2,points);return nodeStyles&&polygon.attr("style",nodeStyles),node.width=w2,node.height=h2,updateNodeBounds(node,polygon),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg}__name(trapezoid,"trapezoid");async function trapezoidalPentagon(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=node.padding??0,labelPaddingX=node.look==="neo"?16:nodePadding,labelPaddingY=node.look==="neo"?12:nodePadding,minWidth=15,minHeight=5;(node.width||node.height)&&(node.height=(node.height??0)-labelPaddingY*2,node.height<minHeight&&(node.height=minHeight),node.width=(node.width??0)-labelPaddingX*2,node.width<minWidth&&(node.width=minWidth));const{shapeSvg,bbox}=await labelHelper(parent,node,getNodeClasses(node)),w2=(node!=null&&node.width?node==null?void 0:node.width:bbox.width)+labelPaddingX*2,h2=(node!=null&&node.height?node==null?void 0:node.height:bbox.height)+labelPaddingY*2,{cssStyles}=node,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const points=[{x:-w2/2*.8,y:-h2/2},{x:w2/2*.8,y:-h2/2},{x:w2/2,y:-h2/2*.6},{x:w2/2,y:h2/2},{x:-w2/2,y:h2/2},{x:-w2/2,y:-h2/2*.6}],pathData=createPathFromPoints(points),shapeNode=rc.path(pathData,options),polygon=shapeSvg.insert(()=>shapeNode,":first-child");return polygon.attr("class","basic label-container outer-path"),cssStyles&&node.look!=="handDrawn"&&polygon.selectChildren("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&polygon.selectChildren("path").attr("style",nodeStyles),updateNodeBounds(node,polygon),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg}__name(trapezoidalPentagon,"trapezoidalPentagon");var MIN_HEIGHT5=10,MIN_WIDTH5=10;async function triangle(parent,node){var _a17;const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=node.padding??0,labelPaddingX=node.look==="neo"?nodePadding*2:nodePadding;(node.width||node.height)&&(node.width=(((node==null?void 0:node.width)??0)-labelPaddingX)/2,node.width<MIN_WIDTH5&&(node.width=MIN_WIDTH5),node.height=(node==null?void 0:node.height)??0,node.height<MIN_HEIGHT5&&(node.height=MIN_HEIGHT5));const{shapeSvg,bbox,label}=await labelHelper(parent,node,getNodeClasses(node)),useHtmlLabels=evaluate((_a17=getConfig2().flowchart)==null?void 0:_a17.htmlLabels),w2=(node!=null&&node.width?node==null?void 0:node.width:bbox.width)+labelPaddingX,h2=node!=null&&node.height?node==null?void 0:node.height:w2+bbox.height,tw=h2,points=[{x:0,y:0},{x:tw,y:0},{x:tw/2,y:-h2}],{cssStyles}=node,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const pathData=createPathFromPoints(points),roughNode=rc.path(pathData,options),polygon=shapeSvg.insert(()=>roughNode,":first-child").attr("transform",`translate(${-h2/2}, ${h2/2})`).attr("class","outer-path");return cssStyles&&node.look!=="handDrawn"&&polygon.selectChildren("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&polygon.selectChildren("path").attr("style",nodeStyles),node.width=w2,node.height=h2,updateNodeBounds(node,polygon),label.attr("transform",`translate(${-bbox.width/2-(bbox.x-(bbox.left??0))}, ${h2/2-(bbox.height+(node.padding??0)/(useHtmlLabels?2:1)-(bbox.y-(bbox.top??0)))})`),node.intersect=function(point2){return log.info("Triangle intersect",node,points,point2),intersect_default.polygon(node,points,point2)},shapeSvg}__name(triangle,"triangle");async function waveEdgedRectangle(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=node.padding??0,labelPaddingX=node.look==="neo"?16:nodePadding,labelPaddingY=node.look==="neo"?12:nodePadding;let adjustFinalHeight=!0;(node.width||node.height)&&(adjustFinalHeight=!1,node.width=((node==null?void 0:node.width)??0)-labelPaddingX*2,node.width<10&&(node.width=10),node.height=((node==null?void 0:node.height)??0)-labelPaddingY*2,node.height<10&&(node.height=10));const{shapeSvg,bbox,label}=await labelHelper(parent,node,getNodeClasses(node)),w2=(node!=null&&node.width?node==null?void 0:node.width:bbox.width)+(labelPaddingX??0)*2,h2=(node!=null&&node.height?node==null?void 0:node.height:bbox.height)+(labelPaddingY??0)*2,waveAmplitude=node.look==="neo"?h2/4:h2/8,finalH=h2+(adjustFinalHeight?waveAmplitude:-waveAmplitude),{cssStyles}=node,widthDif=14-w2,extraW=widthDif>0?widthDif/2:0,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const points=[{x:-w2/2-extraW,y:finalH/2},...generateFullSineWavePoints(-w2/2-extraW,finalH/2,w2/2+extraW,finalH/2,waveAmplitude,.8),{x:w2/2+extraW,y:-finalH/2},{x:-w2/2-extraW,y:-finalH/2}],waveEdgeRectPath=createPathFromPoints(points),waveEdgeRectNode=rc.path(waveEdgeRectPath,options),waveEdgeRect=shapeSvg.insert(()=>waveEdgeRectNode,":first-child");return waveEdgeRect.attr("class","basic label-container outer-path"),cssStyles&&node.look!=="handDrawn"&&waveEdgeRect.selectAll("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&waveEdgeRect.selectAll("path").attr("style",nodeStyles),waveEdgeRect.attr("transform",`translate(0,${-waveAmplitude/2})`),label.attr("transform",`translate(${-w2/2+(node.padding??0)-(bbox.x-(bbox.left??0))},${-h2/2+(node.padding??0)-waveAmplitude-(bbox.y-(bbox.top??0))})`),updateNodeBounds(node,waveEdgeRect),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg}__name(waveEdgedRectangle,"waveEdgedRectangle");async function waveRectangle(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const nodePadding=node.padding??0,labelPaddingX=node.look==="neo"?16:nodePadding,labelPaddingY=node.look==="neo"?20:nodePadding;if(node.width||node.height){node.width=(node==null?void 0:node.width)??0,node.width<20&&(node.width=20),node.height=(node==null?void 0:node.height)??0,node.height<10&&(node.height=10);const waveAmplitude2=Math.min(node.height*.2,node.height/4);node.height=Math.ceil(node.height-labelPaddingY-waveAmplitude2*(20/9)),node.width=node.width-labelPaddingX*2}const{shapeSvg,bbox}=await labelHelper(parent,node,getNodeClasses(node)),w2=(node!=null&&node.width?node==null?void 0:node.width:bbox.width)+labelPaddingX*2,h2=(node!=null&&node.height?node==null?void 0:node.height:bbox.height)+labelPaddingY,waveAmplitude=h2/8,finalH=h2+waveAmplitude*2,{cssStyles}=node,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const points=[{x:-w2/2,y:finalH/2},...generateFullSineWavePoints(-w2/2,finalH/2,w2/2,finalH/2,waveAmplitude,1),{x:w2/2,y:-finalH/2},...generateFullSineWavePoints(w2/2,-finalH/2,-w2/2,-finalH/2,waveAmplitude,-1)],waveRectPath=createPathFromPoints(points),waveRectNode=rc.path(waveRectPath,options),waveRect=shapeSvg.insert(()=>waveRectNode,":first-child");return waveRect.attr("class","basic label-container"),cssStyles&&node.look!=="handDrawn"&&waveRect.selectAll("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&waveRect.selectAll("path").attr("style",nodeStyles),updateNodeBounds(node,waveRect),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg}__name(waveRectangle,"waveRectangle");var rectOffset=10;async function windowPane(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const paddingX=node.look==="neo"?16:node.padding??0,paddingY=node.look==="neo"?12:node.padding??0;(node.width||node.height)&&(node.width=Math.max(((node==null?void 0:node.width)??0)-paddingX*2-rectOffset,10),node.height=Math.max(((node==null?void 0:node.height)??0)-paddingY*2-rectOffset,10));const{shapeSvg,bbox,label}=await labelHelper(parent,node,getNodeClasses(node)),totalWidth=(node!=null&&node.width?node==null?void 0:node.width:bbox.width)+paddingX*2+rectOffset,totalHeight=(node!=null&&node.height?node==null?void 0:node.height:bbox.height)+paddingY*2+rectOffset,w2=totalWidth-rectOffset,h2=totalHeight-rectOffset,x2=-w2/2,y3=-h2/2,{cssStyles}=node,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{}),outerPathPoints=[{x:x2-rectOffset,y:y3-rectOffset},{x:x2-rectOffset,y:y3+h2},{x:x2+w2,y:y3+h2},{x:x2+w2,y:y3-rectOffset}],path=`M${x2-rectOffset},${y3-rectOffset} L${x2+w2},${y3-rectOffset} L${x2+w2},${y3+h2} L${x2-rectOffset},${y3+h2} L${x2-rectOffset},${y3-rectOffset}
235
+ M${x2-rectOffset},${y3} L${x2+w2},${y3}
236
+ M${x2},${y3-rectOffset} L${x2},${y3+h2}`;node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const no=rc.path(path,options),windowPane2=shapeSvg.insert(()=>no,":first-child");return windowPane2.attr("transform",`translate(${rectOffset/2}, ${rectOffset/2})`),windowPane2.attr("class","basic label-container outer-path"),cssStyles&&node.look!=="handDrawn"&&windowPane2.selectAll("path").attr("style",cssStyles),nodeStyles&&node.look!=="handDrawn"&&windowPane2.selectAll("path").attr("style",nodeStyles),label.attr("transform",`translate(${-(bbox.width/2)+rectOffset/2-(bbox.x-(bbox.left??0))}, ${-(bbox.height/2)+rectOffset/2-(bbox.y-(bbox.top??0))})`),updateNodeBounds(node,windowPane2),node.intersect=function(point2){return intersect_default.polygon(node,outerPathPoints,point2)},shapeSvg}__name(windowPane,"windowPane");var COLOR_THEMES=new Set(["redux-color","redux-dark-color"]),REDUX_THEMES=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function erBox(parent,node){var _a17,_b,_c,_d;const entityNode=node;entityNode.alias&&(node.label=entityNode.alias);const{theme,themeVariables}=getConfig(),{rowEven,rowOdd,nodeBorder,borderColorArray}=themeVariables;if(node.look==="handDrawn"){const{themeVariables:themeVariables2}=getConfig(),{background}=themeVariables2,backgroundNode={...node,id:node.id+"-background",domId:(node.domId||node.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${background}`]};await erBox(parent,backgroundNode)}const config2=getConfig();node.useHtmlLabels=config2.htmlLabels;let PADDING=((_a17=config2.er)==null?void 0:_a17.diagramPadding)??10,TEXT_PADDING=((_b=config2.er)==null?void 0:_b.entityPadding)??6;const{cssStyles}=node,{labelStyles,nodeStyles}=styles2String(node);if(entityNode.attributes.length===0&&node.label){const options2={rx:0,ry:0,labelPaddingX:PADDING,labelPaddingY:PADDING*1.5};calculateTextWidth(node.label,config2)+options2.labelPaddingX*2<config2.er.minEntityWidth&&(node.width=config2.er.minEntityWidth);const shapeSvg2=await drawRect(parent,node,options2);if(theme!=null&&COLOR_THEMES.has(theme)){const colorIndex=entityNode.colorIndex??0;shapeSvg2.attr("data-color-id",`color-${colorIndex%borderColorArray.length}`)}if(!evaluate(config2.htmlLabels)){const textElement=shapeSvg2.select("text"),bbox=(_c=textElement.node())==null?void 0:_c.getBBox();textElement.attr("transform",`translate(${-bbox.width/2}, 0)`)}return shapeSvg2}config2.htmlLabels||(PADDING*=1.25,TEXT_PADDING*=1.25);let cssClasses=getNodeClasses(node);cssClasses||(cssClasses="node default");const shapeSvg=parent.insert("g").attr("class",cssClasses).attr("id",node.domId||node.id),nameBBox=await addText(shapeSvg,node.label??"",config2,0,0,["name"],labelStyles);nameBBox.height+=TEXT_PADDING;let yOffset=0;const yOffsets=[],rows=[];let maxTypeWidth=0,maxNameWidth=0,maxKeysWidth=0,maxCommentWidth=0,keysPresent=!0,commentPresent=!0;for(const attribute of entityNode.attributes){const typeBBox=await addText(shapeSvg,attribute.type,config2,0,yOffset,["attribute-type"],labelStyles);maxTypeWidth=Math.max(maxTypeWidth,typeBBox.width+PADDING);const nameBBox2=await addText(shapeSvg,attribute.name,config2,0,yOffset,["attribute-name"],labelStyles);maxNameWidth=Math.max(maxNameWidth,nameBBox2.width+PADDING);const keysBBox=await addText(shapeSvg,attribute.keys.join(),config2,0,yOffset,["attribute-keys"],labelStyles);maxKeysWidth=Math.max(maxKeysWidth,keysBBox.width+PADDING);const commentBBox=await addText(shapeSvg,attribute.comment,config2,0,yOffset,["attribute-comment"],labelStyles);maxCommentWidth=Math.max(maxCommentWidth,commentBBox.width+PADDING);const rowHeight=Math.max(typeBBox.height,nameBBox2.height,keysBBox.height,commentBBox.height)+TEXT_PADDING;rows.push({yOffset,rowHeight}),yOffset+=rowHeight}let totalWidthSections=4;maxKeysWidth<=PADDING&&(keysPresent=!1,maxKeysWidth=0,totalWidthSections--),maxCommentWidth<=PADDING&&(commentPresent=!1,maxCommentWidth=0,totalWidthSections--);const shapeBBox=shapeSvg.node().getBBox();if(nameBBox.width+PADDING*2-(maxTypeWidth+maxNameWidth+maxKeysWidth+maxCommentWidth)>0){const difference=nameBBox.width+PADDING*2-(maxTypeWidth+maxNameWidth+maxKeysWidth+maxCommentWidth);maxTypeWidth+=difference/totalWidthSections,maxNameWidth+=difference/totalWidthSections,maxKeysWidth>0&&(maxKeysWidth+=difference/totalWidthSections),maxCommentWidth>0&&(maxCommentWidth+=difference/totalWidthSections)}const maxWidth=maxTypeWidth+maxNameWidth+maxKeysWidth+maxCommentWidth,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");let totalShapeBBoxHeight=0;rows.length>0&&(totalShapeBBoxHeight=rows.reduce((sum,row)=>sum+((row==null?void 0:row.rowHeight)??0),0));const w2=Math.max(shapeBBox.width+PADDING*2,(node==null?void 0:node.width)||0,maxWidth),h2=Math.max((totalShapeBBoxHeight??0)+nameBBox.height,(node==null?void 0:node.height)||0),x2=-w2/2,y3=-h2/2;if(shapeSvg.selectAll("g:not(:first-child)").each((_2,i2,nodes)=>{const text2=select(nodes[i2]),transform=text2.attr("transform");let translateX=0,translateY=0;if(transform){const translate=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(transform);translate&&(translateX=parseFloat(translate[1]),translateY=parseFloat(translate[2]),text2.attr("class").includes("attribute-name")?translateX+=maxTypeWidth:text2.attr("class").includes("attribute-keys")?translateX+=maxTypeWidth+maxNameWidth:text2.attr("class").includes("attribute-comment")&&(translateX+=maxTypeWidth+maxNameWidth+maxKeysWidth))}text2.attr("transform",`translate(${x2+PADDING/2+translateX}, ${translateY+y3+nameBBox.height+TEXT_PADDING/2})`)}),shapeSvg.select(".name").attr("transform","translate("+-nameBBox.width/2+", "+(y3+TEXT_PADDING/2)+")"),theme!=null&&COLOR_THEMES.has(theme)){const colorIndex=entityNode.colorIndex??0;shapeSvg.attr("data-color-id",`color-${colorIndex%borderColorArray.length}`)}const roughRect=rc.rectangle(x2,y3,w2,h2,options),rect2=shapeSvg.insert(()=>roughRect,":first-child").attr("class","outer-path").attr("style",cssStyles.join(""));yOffsets.push(0);for(const[i2,row]of rows.entries()){const isEven=(i2+1)%2===0&&row.yOffset!==0,roughRect2=rc.rectangle(x2,nameBBox.height+y3+(row==null?void 0:row.yOffset),w2,row==null?void 0:row.rowHeight,{...options,fill:isEven?rowEven:rowOdd,stroke:nodeBorder});shapeSvg.insert(()=>roughRect2,"g.label").attr("style",cssStyles.join("")).attr("class",`row-rect-${isEven?"even":"odd"}`)}const thickness=1e-4;let points=lineToPolygon(x2,nameBBox.height+y3,w2+x2,nameBBox.height+y3,thickness),roughLine=rc.polygon(points.map(p2=>[p2.x,p2.y]),options);if(shapeSvg.insert(()=>roughLine).attr("class","divider"),points=lineToPolygon(maxTypeWidth+x2,nameBBox.height+y3,maxTypeWidth+x2,h2+y3,thickness),roughLine=rc.polygon(points.map(p2=>[p2.x,p2.y]),options),shapeSvg.insert(()=>roughLine).attr("class","divider"),keysPresent){const xCoord=maxTypeWidth+maxNameWidth+x2;points=lineToPolygon(xCoord,nameBBox.height+y3,xCoord,h2+y3,thickness),roughLine=rc.polygon(points.map(p2=>[p2.x,p2.y]),options),shapeSvg.insert(()=>roughLine).attr("class","divider")}if(commentPresent){const xCoord=maxTypeWidth+maxNameWidth+maxKeysWidth+x2;points=lineToPolygon(xCoord,nameBBox.height+y3,xCoord,h2+y3,thickness),roughLine=rc.polygon(points.map(p2=>[p2.x,p2.y]),options),shapeSvg.insert(()=>roughLine).attr("class","divider")}for(const yOffset2 of yOffsets){const yCoord=nameBBox.height+y3+yOffset2;points=lineToPolygon(x2,yCoord,w2+x2,yCoord,thickness),roughLine=rc.polygon(points.map(p2=>[p2.x,p2.y]),options),shapeSvg.insert(()=>roughLine).attr("class","divider")}if(updateNodeBounds(node,rect2),nodeStyles&&node.look!=="handDrawn")if(theme!=null&&REDUX_THEMES.has(theme))shapeSvg.selectAll("path").attr("style",nodeStyles);else{const allStyle=nodeStyles.split(";"),strokeStyles=(_d=allStyle==null?void 0:allStyle.filter(e2=>e2.includes("stroke")))==null?void 0:_d.map(s2=>`${s2}`).join("; ");shapeSvg.selectAll("path").attr("style",strokeStyles??""),shapeSvg.selectAll(".row-rect-even path").attr("style",nodeStyles)}return node.intersect=function(point2){return intersect_default.rect(node,point2)},shapeSvg}__name(erBox,"erBox");async function addText(shapeSvg,labelText,config2,translateX=0,translateY=0,classes=[],style=""){const label=shapeSvg.insert("g").attr("class",`label ${classes.join(" ")}`).attr("transform",`translate(${translateX}, ${translateY})`).attr("style",style);labelText!==parseGenericTypes(labelText)&&(labelText=parseGenericTypes(labelText),labelText=labelText.replaceAll("<","&lt;").replaceAll(">","&gt;"));const text2=label.node().appendChild(await createText(label,labelText,{width:calculateTextWidth(labelText,config2)+100,style,useHtmlLabels:config2.htmlLabels},config2));if(labelText.includes("&lt;")||labelText.includes("&gt;")){let child=text2.children[0];for(child.textContent=child.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");child.childNodes[0];)child=child.childNodes[0],child.textContent=child.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let bbox=text2.getBBox();if(evaluate(config2.htmlLabels)){const div=text2.children[0];div.style.textAlign="start";const dv=select(text2);bbox=div.getBoundingClientRect(),dv.attr("width",bbox.width),dv.attr("height",bbox.height)}return bbox}__name(addText,"addText");function lineToPolygon(x1,y1,x2,y22,thickness){return x1===x2?[{x:x1-thickness/2,y:y1},{x:x1+thickness/2,y:y1},{x:x2+thickness/2,y:y22},{x:x2-thickness/2,y:y22}]:[{x:x1,y:y1-thickness/2},{x:x1,y:y1+thickness/2},{x:x2,y:y22+thickness/2},{x:x2,y:y22-thickness/2}]}__name(lineToPolygon,"lineToPolygon");async function textHelper(parent,node,config2,useHtmlLabels,GAP=config2.class.padding??12){const TEXT_PADDING=useHtmlLabels?0:3,shapeSvg=parent.insert("g").attr("class",getNodeClasses(node)).attr("id",node.domId||node.id);let annotationGroup=null,labelGroup=null,membersGroup=null,methodsGroup=null,annotationGroupHeight=0,labelGroupHeight=0,membersGroupHeight=0;if(annotationGroup=shapeSvg.insert("g").attr("class","annotation-group text"),node.annotations.length>0){const annotation=node.annotations[0];await addText2(annotationGroup,{text:`«${annotation}»`},0),annotationGroupHeight=annotationGroup.node().getBBox().height}labelGroup=shapeSvg.insert("g").attr("class","label-group text"),await addText2(labelGroup,node,0,["font-weight: bolder"]);const labelGroupBBox=labelGroup.node().getBBox();labelGroupHeight=labelGroupBBox.height,membersGroup=shapeSvg.insert("g").attr("class","members-group text");let yOffset=0;for(const member of node.members){const height=await addText2(membersGroup,member,yOffset,[member.parseClassifier()]);yOffset+=height+TEXT_PADDING}membersGroupHeight=membersGroup.node().getBBox().height,membersGroupHeight<=0&&(membersGroupHeight=GAP/2),methodsGroup=shapeSvg.insert("g").attr("class","methods-group text");let methodsYOffset=0;for(const method of node.methods){const height=await addText2(methodsGroup,method,methodsYOffset,[method.parseClassifier()]);methodsYOffset+=height+TEXT_PADDING}let bbox=shapeSvg.node().getBBox();if(annotationGroup!==null){const annotationGroupBBox=annotationGroup.node().getBBox();annotationGroup.attr("transform",`translate(${-annotationGroupBBox.width/2})`)}return labelGroup.attr("transform",`translate(${-labelGroupBBox.width/2}, ${annotationGroupHeight})`),bbox=shapeSvg.node().getBBox(),membersGroup.attr("transform",`translate(0, ${annotationGroupHeight+labelGroupHeight+GAP*2})`),bbox=shapeSvg.node().getBBox(),methodsGroup.attr("transform",`translate(0, ${annotationGroupHeight+labelGroupHeight+(membersGroupHeight?membersGroupHeight+GAP*4:GAP*2)})`),bbox=shapeSvg.node().getBBox(),{shapeSvg,bbox}}__name(textHelper,"textHelper");async function addText2(parentGroup,node,yOffset,styles=[]){const textEl=parentGroup.insert("g").attr("class","label").attr("style",styles.join("; ")),config2=getConfig();let useHtmlLabels="useHtmlLabels"in node?node.useHtmlLabels:evaluate(config2.htmlLabels)??!0,textContent="";"text"in node?textContent=node.text:textContent=node.label,!useHtmlLabels&&textContent.startsWith("\\")&&(textContent=textContent.substring(1)),hasKatex(textContent)&&(useHtmlLabels=!0);const text2=await createText(textEl,sanitizeText3(decodeEntities(textContent)),{width:calculateTextWidth(textContent,config2)+50,classes:"markdown-node-label",useHtmlLabels},config2);let bbox,numberOfLines=1;if(useHtmlLabels){const div=text2.children[0],dv=select(text2);numberOfLines=div.innerHTML.split("<br>").length,div.innerHTML.includes("</math>")&&(numberOfLines+=div.innerHTML.split("<mrow>").length-1);const images=div.getElementsByTagName("img");if(images){const noImgText=textContent.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...images].map(img=>new Promise(res=>{function setupImage(){var _a17;if(img.style.display="flex",img.style.flexDirection="column",noImgText){const bodyFontSize=((_a17=config2.fontSize)==null?void 0:_a17.toString())??window.getComputedStyle(document.body).fontSize,width=parseInt(bodyFontSize,10)*5+"px";img.style.minWidth=width,img.style.maxWidth=width}else img.style.width="100%";res(img)}__name(setupImage,"setupImage"),setTimeout(()=>{img.complete&&setupImage()}),img.addEventListener("error",setupImage),img.addEventListener("load",setupImage)})))}bbox=div.getBoundingClientRect(),dv.attr("width",bbox.width),dv.attr("height",bbox.height)}else{styles.includes("font-weight: bolder")&&select(text2).selectAll("tspan").attr("font-weight",""),numberOfLines=text2.children.length;const textChild=text2.children[0];(text2.textContent===""||text2.textContent.includes("&gt"))&&(textChild.textContent=textContent[0]+textContent.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),textContent[1]===" "&&(textChild.textContent=textChild.textContent[0]+" "+textChild.textContent.substring(1))),textChild.textContent==="undefined"&&(textChild.textContent=""),bbox=text2.getBBox()}return textEl.attr("transform","translate(0,"+(-bbox.height/(2*numberOfLines)+yOffset)+")"),bbox.height}__name(addText2,"addText");async function classBox(parent,node){var _a17,_b;const config2=getConfig2(),{themeVariables}=config2,{useGradient}=themeVariables,PADDING=config2.class.padding??12,GAP=PADDING,useHtmlLabels=node.useHtmlLabels??evaluate(config2.htmlLabels)??!0,classNode=node;classNode.annotations=classNode.annotations??[],classNode.members=classNode.members??[],classNode.methods=classNode.methods??[];const{shapeSvg,bbox}=await textHelper(parent,node,config2,useHtmlLabels,GAP),{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles,node.cssStyles=classNode.styles||"";const styles=((_a17=classNode.styles)==null?void 0:_a17.join(";"))||nodeStyles||"";node.cssStyles||(node.cssStyles=styles.replaceAll("!important","").split(";"));const renderExtraBox=classNode.members.length===0&&classNode.methods.length===0&&!((_b=config2.class)!=null&&_b.hideEmptyMembersBox),rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const w2=Math.max(node.width??0,bbox.width);let h2=Math.max(node.height??0,bbox.height);const nodeHeightGreater=(node.height??0)>bbox.height;classNode.members.length===0&&classNode.methods.length===0?h2+=GAP:classNode.members.length>0&&classNode.methods.length===0&&(h2+=GAP*2);const x2=-w2/2,y3=-h2/2;let extraHeight=renderExtraBox?PADDING*2:classNode.members.length===0&&classNode.methods.length===0?-PADDING:0;nodeHeightGreater&&(extraHeight=PADDING*2);const roughRect=rc.rectangle(x2-PADDING,y3-PADDING-(renderExtraBox?PADDING:classNode.members.length===0&&classNode.methods.length===0?-PADDING/2:0),w2+2*PADDING,h2+2*PADDING+extraHeight,options),rect2=shapeSvg.insert(()=>roughRect,":first-child");rect2.attr("class","basic label-container outer-path");const rectBBox=rect2.node().getBBox(),annotationGroupHeight=shapeSvg.select(".annotation-group").node().getBBox().height-(renderExtraBox?PADDING/2:0)||0,labelGroupHeight=shapeSvg.select(".label-group").node().getBBox().height-(renderExtraBox?PADDING/2:0)||0,membersGroupHeight=shapeSvg.select(".members-group").node().getBBox().height-(renderExtraBox?PADDING/2:0)||0,methodsAreaPlacement=(annotationGroupHeight+labelGroupHeight+y3+PADDING-(y3-PADDING-(renderExtraBox?PADDING:classNode.members.length===0&&classNode.methods.length===0?-PADDING/2:0)))/2;if(shapeSvg.selectAll(".text").each((_2,i2,nodes)=>{var _a18,_b2;const text2=select(nodes[i2]),transform=text2.attr("transform");let translateY=0;if(transform){const translate=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(transform);translate&&(translateY=parseFloat(translate[2]))}let newTranslateY=translateY+y3+PADDING-(renderExtraBox?PADDING:classNode.members.length===0&&classNode.methods.length===0?-PADDING/2:0);if(text2.attr("class").includes("methods-group")){const membersGroupHeightForMethods=Math.max(membersGroupHeight,GAP/2);nodeHeightGreater?newTranslateY=Math.max(methodsAreaPlacement,annotationGroupHeight+labelGroupHeight+membersGroupHeightForMethods+y3+GAP*2+PADDING)+GAP*2:newTranslateY=annotationGroupHeight+labelGroupHeight+membersGroupHeightForMethods+y3+GAP*4+PADDING}classNode.members.length===0&&classNode.methods.length===0&&((_a18=config2.class)!=null&&_a18.hideEmptyMembersBox)&&(classNode.annotations.length>0?newTranslateY=translateY-GAP:newTranslateY=translateY),useHtmlLabels||(newTranslateY-=4);let newTranslateX=x2;(text2.attr("class").includes("label-group")||text2.attr("class").includes("annotation-group"))&&(newTranslateX=-((_b2=text2.node())==null?void 0:_b2.getBBox().width)/2||0,shapeSvg.selectAll("text").each(function(_22,i22,nodes2){window.getComputedStyle(nodes2[i22]).textAnchor==="middle"&&(newTranslateX=0)})),text2.attr("transform",`translate(${newTranslateX}, ${newTranslateY})`)}),classNode.members.length>0||classNode.methods.length>0||renderExtraBox){const firstLineY=annotationGroupHeight+labelGroupHeight+y3+PADDING,roughLine=rc.line(rectBBox.x,firstLineY,rectBBox.x+rectBBox.width,firstLineY+.001,options);shapeSvg.insert(()=>roughLine).attr("class",`divider${node.look==="neo"&&!useGradient?" neo-line":""}`).attr("style",styles)}if(renderExtraBox||classNode.members.length>0||classNode.methods.length>0){const secondLineY=annotationGroupHeight+labelGroupHeight+membersGroupHeight+y3+GAP*2+PADDING,roughLine=rc.line(rectBBox.x,nodeHeightGreater?Math.max(methodsAreaPlacement,secondLineY):secondLineY,rectBBox.x+rectBBox.width,(nodeHeightGreater?Math.max(methodsAreaPlacement,secondLineY):secondLineY)+.001,options);shapeSvg.insert(()=>roughLine).attr("class",`divider${node.look==="neo"&&!useGradient?" neo-line":""}`).attr("style",styles)}if(classNode.look!=="handDrawn"&&shapeSvg.selectAll("path").attr("style",styles),rect2.select(":nth-child(2)").attr("style",styles),shapeSvg.selectAll(".divider").select("path").attr("style",styles),node.labelStyle?shapeSvg.selectAll("span").attr("style",node.labelStyle):shapeSvg.selectAll("span").attr("style",styles),!useHtmlLabels){const colorRegex=RegExp(/color\s*:\s*([^;]*)/),match=colorRegex.exec(styles);if(match){const colorStyle=match[0].replace("color","fill");shapeSvg.selectAll("tspan").attr("style",colorStyle)}else if(labelStyles){const match2=colorRegex.exec(labelStyles);if(match2){const colorStyle=match2[0].replace("color","fill");shapeSvg.selectAll("tspan").attr("style",colorStyle)}}}return updateNodeBounds(node,rect2),node.intersect=function(point2){return intersect_default.rect(node,point2)},shapeSvg}__name(classBox,"classBox");async function requirementBox(parent,node){var _a17,_b;const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const requirementNode=node,elementNode=node,padding=20,gap=20,isRequirementNode="verifyMethod"in node,classes=getNodeClasses(node),{themeVariables}=getConfig2(),{borderColorArray,requirementEdgeLabelBackground}=themeVariables,shapeSvg=parent.insert("g").attr("class",classes).attr("id",node.domId??node.id);let typeHeight;isRequirementNode?typeHeight=await addText3(shapeSvg,`&lt;&lt;${requirementNode.type}&gt;&gt;`,0,node.labelStyle):typeHeight=await addText3(shapeSvg,"&lt;&lt;Element&gt;&gt;",0,node.labelStyle);let accumulativeHeight=typeHeight;const nameHeight=await addText3(shapeSvg,requirementNode.name,accumulativeHeight,node.labelStyle+"; font-weight: bold;");if(accumulativeHeight+=nameHeight+gap,isRequirementNode){const idHeight=await addText3(shapeSvg,`${requirementNode.requirementId?`ID: ${requirementNode.requirementId}`:""}`,accumulativeHeight,node.labelStyle);accumulativeHeight+=idHeight;const textHeight=await addText3(shapeSvg,`${requirementNode.text?`Text: ${requirementNode.text}`:""}`,accumulativeHeight,node.labelStyle);accumulativeHeight+=textHeight;const riskHeight=await addText3(shapeSvg,`${requirementNode.risk?`Risk: ${requirementNode.risk}`:""}`,accumulativeHeight,node.labelStyle);accumulativeHeight+=riskHeight,await addText3(shapeSvg,`${requirementNode.verifyMethod?`Verification: ${requirementNode.verifyMethod}`:""}`,accumulativeHeight,node.labelStyle)}else{const typeHeight2=await addText3(shapeSvg,`${elementNode.type?`Type: ${elementNode.type}`:""}`,accumulativeHeight,node.labelStyle);accumulativeHeight+=typeHeight2,await addText3(shapeSvg,`${elementNode.docRef?`Doc Ref: ${elementNode.docRef}`:""}`,accumulativeHeight,node.labelStyle)}const totalWidth=(((_a17=shapeSvg.node())==null?void 0:_a17.getBBox().width)??200)+padding,totalHeight=(((_b=shapeSvg.node())==null?void 0:_b.getBBox().height)??200)+padding,x2=-totalWidth/2,y3=-totalHeight/2,rc=at.svg(shapeSvg),options=userNodeOverrides(node,{});node.look!=="handDrawn"&&(options.roughness=0,options.fillStyle="solid");const roughRect=rc.rectangle(x2,y3,totalWidth,totalHeight,options),rect2=shapeSvg.insert(()=>roughRect,":first-child");if(rect2.attr("class","basic label-container outer-path").attr("style",nodeStyles),borderColorArray!=null&&borderColorArray.length){const colorIndex=node.colorIndex??0;shapeSvg.attr("data-color-id",`color-${colorIndex%borderColorArray.length}`)}if(shapeSvg.selectAll(".label").each((_2,i2,nodes)=>{const text2=select(nodes[i2]),transform=text2.attr("transform");let translateX=0,translateY=0;if(transform){const translate=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(transform);translate&&(translateX=parseFloat(translate[1]),translateY=parseFloat(translate[2]))}const newTranslateY=translateY-totalHeight/2;let newTranslateX=x2+padding/2;(i2===0||i2===1)&&(newTranslateX=translateX),text2.attr("transform",`translate(${newTranslateX}, ${newTranslateY+padding})`)}),accumulativeHeight>typeHeight+nameHeight+gap){const lineY=y3+typeHeight+nameHeight+gap;let roughLine;if(node.look==="neo"){const polygonPoints=[[x2,lineY],[x2+totalWidth,lineY],[x2+totalWidth,lineY+.001],[x2,lineY+.001]];roughLine=rc.polygon(polygonPoints,options)}else roughLine=rc.line(x2,lineY,x2+totalWidth,lineY,options);shapeSvg.insert(()=>roughLine).attr("class","divider")}return updateNodeBounds(node,rect2),node.intersect=function(point2){return intersect_default.rect(node,point2)},nodeStyles&&node.look!=="handDrawn"&&(requirementEdgeLabelBackground||borderColorArray!=null&&borderColorArray.length)&&shapeSvg.selectAll("path").attr("style",nodeStyles),shapeSvg}__name(requirementBox,"requirementBox");async function addText3(parentGroup,inputText,yOffset,style=""){if(inputText==="")return 0;const textEl=parentGroup.insert("g").attr("class","label").attr("style",style),config2=getConfig2(),useHtmlLabels=config2.htmlLabels??!0,text2=await createText(textEl,sanitizeText3(decodeEntities(inputText)),{width:calculateTextWidth(inputText,config2)+50,classes:"markdown-node-label",useHtmlLabels,style},config2);let bbox;if(useHtmlLabels){const div=text2.children[0],dv=select(text2);bbox=div.getBoundingClientRect(),dv.attr("width",bbox.width),dv.attr("height",bbox.height)}else{const textChild=text2.children[0];for(const child of textChild.children)style&&child.setAttribute("style",style);bbox=text2.getBBox(),bbox.height+=6}return textEl.attr("transform",`translate(${-bbox.width/2},${-bbox.height/2+yOffset})`),bbox.height}__name(addText3,"addText");var colorFromPriority=__name(priority=>{switch(priority){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 kanbanItem(parent,kanbanNode,{config:config2}){var _a17,_b;const{labelStyles,nodeStyles}=styles2String(kanbanNode);kanbanNode.labelStyle=labelStyles||"";const labelPaddingX=10,orgWidth=kanbanNode.width;kanbanNode.width=(kanbanNode.width??200)-10;const{shapeSvg,bbox,label:labelElTitle}=await labelHelper(parent,kanbanNode,getNodeClasses(kanbanNode)),padding=kanbanNode.padding||10;let ticketUrl="",link;"ticket"in kanbanNode&&kanbanNode.ticket&&((_a17=config2==null?void 0:config2.kanban)!=null&&_a17.ticketBaseUrl)&&(ticketUrl=(_b=config2==null?void 0:config2.kanban)==null?void 0:_b.ticketBaseUrl.replace("#TICKET#",kanbanNode.ticket),link=shapeSvg.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",ticketUrl).attr("target","_blank"));const options={useHtmlLabels:kanbanNode.useHtmlLabels,labelStyle:kanbanNode.labelStyle||"",width:kanbanNode.width,img:kanbanNode.img,padding:kanbanNode.padding||8,centerLabel:!1};let labelEl,bbox2;link?{label:labelEl,bbox:bbox2}=await insertLabel(link,"ticket"in kanbanNode&&kanbanNode.ticket||"",options):{label:labelEl,bbox:bbox2}=await insertLabel(shapeSvg,"ticket"in kanbanNode&&kanbanNode.ticket||"",options);const{label:labelElAssigned,bbox:bboxAssigned}=await insertLabel(shapeSvg,"assigned"in kanbanNode&&kanbanNode.assigned||"",options);kanbanNode.width=orgWidth;const labelPaddingY=10,totalWidth=(kanbanNode==null?void 0:kanbanNode.width)||0,heightAdj=Math.max(bbox2.height,bboxAssigned.height)/2,totalHeight=Math.max(bbox.height+labelPaddingY*2,(kanbanNode==null?void 0:kanbanNode.height)||0)+heightAdj,x2=-totalWidth/2,y3=-totalHeight/2;labelElTitle.attr("transform","translate("+(padding-totalWidth/2)+", "+(-heightAdj-bbox.height/2)+")"),labelEl.attr("transform","translate("+(padding-totalWidth/2)+", "+(-heightAdj+bbox.height/2)+")"),labelElAssigned.attr("transform","translate("+(padding+totalWidth/2-bboxAssigned.width-2*labelPaddingX)+", "+(-heightAdj+bbox.height/2)+")");let rect2;const{rx,ry}=kanbanNode,{cssStyles}=kanbanNode;if(kanbanNode.look==="handDrawn"){const rc=at.svg(shapeSvg),options2=userNodeOverrides(kanbanNode,{}),roughNode=rx||ry?rc.path(createRoundedRectPathD(x2,y3,totalWidth,totalHeight,rx||0),options2):rc.rectangle(x2,y3,totalWidth,totalHeight,options2);rect2=shapeSvg.insert(()=>roughNode,":first-child"),rect2.attr("class","basic label-container").attr("style",cssStyles||null)}else{rect2=shapeSvg.insert("rect",":first-child"),rect2.attr("class","basic label-container __APA__").attr("style",nodeStyles).attr("rx",rx??5).attr("ry",ry??5).attr("x",x2).attr("y",y3).attr("width",totalWidth).attr("height",totalHeight);const priority="priority"in kanbanNode&&kanbanNode.priority;if(priority){const line2=shapeSvg.append("line"),lineX=x2+2,y1=y3+Math.floor((rx??0)/2),y22=y3+totalHeight-Math.floor((rx??0)/2);line2.attr("x1",lineX).attr("y1",y1).attr("x2",lineX).attr("y2",y22).attr("stroke-width","4").attr("stroke",colorFromPriority(priority))}}return updateNodeBounds(kanbanNode,rect2),kanbanNode.height=totalHeight,kanbanNode.intersect=function(point2){return intersect_default.rect(kanbanNode,point2)},shapeSvg}__name(kanbanItem,"kanbanItem");async function bang(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const{shapeSvg,bbox,halfPadding,label}=await labelHelper(parent,node,getNodeClasses(node)),w2=bbox.width+10*halfPadding,h2=bbox.height+8*halfPadding,r2=.15*w2,{cssStyles}=node,minWidth=bbox.width+20,minHeight=bbox.height+20,effectiveWidth=Math.max(w2,minWidth),effectiveHeight=Math.max(h2,minHeight);label.attr("transform",`translate(${-bbox.width/2}, ${-bbox.height/2})`);let bangElem;const path=`M0 0
237
+ a${r2},${r2} 1 0,0 ${effectiveWidth*.25},${-1*effectiveHeight*.1}
238
+ a${r2},${r2} 1 0,0 ${effectiveWidth*.25},0
239
+ a${r2},${r2} 1 0,0 ${effectiveWidth*.25},0
240
+ a${r2},${r2} 1 0,0 ${effectiveWidth*.25},${effectiveHeight*.1}
241
+
242
+ a${r2},${r2} 1 0,0 ${effectiveWidth*.15},${effectiveHeight*.33}
243
+ a${r2*.8},${r2*.8} 1 0,0 0,${effectiveHeight*.34}
244
+ a${r2},${r2} 1 0,0 ${-1*effectiveWidth*.15},${effectiveHeight*.33}
245
+
246
+ a${r2},${r2} 1 0,0 ${-1*effectiveWidth*.25},${effectiveHeight*.15}
247
+ a${r2},${r2} 1 0,0 ${-1*effectiveWidth*.25},0
248
+ a${r2},${r2} 1 0,0 ${-1*effectiveWidth*.25},0
249
+ a${r2},${r2} 1 0,0 ${-1*effectiveWidth*.25},${-1*effectiveHeight*.15}
250
+
251
+ a${r2},${r2} 1 0,0 ${-1*effectiveWidth*.1},${-1*effectiveHeight*.33}
252
+ a${r2*.8},${r2*.8} 1 0,0 0,${-1*effectiveHeight*.34}
253
+ a${r2},${r2} 1 0,0 ${effectiveWidth*.1},${-1*effectiveHeight*.33}
254
+ H0 V0 Z`;if(node.look==="handDrawn"){const rc=at.svg(shapeSvg),options=userNodeOverrides(node,{}),roughNode=rc.path(path,options);bangElem=shapeSvg.insert(()=>roughNode,":first-child"),bangElem.attr("class","basic label-container").attr("style",handleUndefinedAttr(cssStyles))}else bangElem=shapeSvg.insert("path",":first-child").attr("class","basic label-container").attr("style",nodeStyles).attr("d",path);return bangElem.attr("transform",`translate(${-effectiveWidth/2}, ${-effectiveHeight/2})`),updateNodeBounds(node,bangElem),node.calcIntersect=function(bounds,point2){return intersect_default.rect(bounds,point2)},node.intersect=function(point2){return log.info("Bang intersect",node,point2),intersect_default.rect(node,point2)},shapeSvg}__name(bang,"bang");async function cloud(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const{shapeSvg,bbox,halfPadding,label}=await labelHelper(parent,node,getNodeClasses(node)),w2=bbox.width+2*halfPadding,h2=bbox.height+2*halfPadding,r1=.15*w2,r2=.25*w2,r3=.35*w2,r4=.2*w2,{cssStyles}=node;let cloudElem;const path=`M0 0
255
+ a${r1},${r1} 0 0,1 ${w2*.25},${-1*w2*.1}
256
+ a${r3},${r3} 1 0,1 ${w2*.4},${-1*w2*.1}
257
+ a${r2},${r2} 1 0,1 ${w2*.35},${w2*.2}
258
+
259
+ a${r1},${r1} 1 0,1 ${w2*.15},${h2*.35}
260
+ a${r4},${r4} 1 0,1 ${-1*w2*.15},${h2*.65}
261
+
262
+ a${r2},${r1} 1 0,1 ${-1*w2*.25},${w2*.15}
263
+ a${r3},${r3} 1 0,1 ${-1*w2*.5},0
264
+ a${r1},${r1} 1 0,1 ${-1*w2*.25},${-1*w2*.15}
265
+
266
+ a${r1},${r1} 1 0,1 ${-1*w2*.1},${-1*h2*.35}
267
+ a${r4},${r4} 1 0,1 ${w2*.1},${-1*h2*.65}
268
+ H0 V0 Z`;if(node.look==="handDrawn"){const rc=at.svg(shapeSvg),options=userNodeOverrides(node,{}),roughNode=rc.path(path,options);cloudElem=shapeSvg.insert(()=>roughNode,":first-child"),cloudElem.attr("class","basic label-container").attr("style",handleUndefinedAttr(cssStyles))}else cloudElem=shapeSvg.insert("path",":first-child").attr("class","basic label-container").attr("style",nodeStyles).attr("d",path);return label.attr("transform",`translate(${-bbox.width/2}, ${-bbox.height/2})`),cloudElem.attr("transform",`translate(${-w2/2}, ${-h2/2})`),updateNodeBounds(node,cloudElem),node.calcIntersect=function(bounds,point2){return intersect_default.rect(bounds,point2)},node.intersect=function(point2){return log.info("Cloud intersect",node,point2),intersect_default.rect(node,point2)},shapeSvg}__name(cloud,"cloud");async function defaultMindmapNode(parent,node){const{labelStyles,nodeStyles}=styles2String(node);node.labelStyle=labelStyles;const{shapeSvg,bbox,halfPadding,label}=await labelHelper(parent,node,getNodeClasses(node)),w2=bbox.width+8*halfPadding,h2=bbox.height+2*halfPadding,rd=5,rectPath=node.look==="neo"?`
269
+ M${-w2/2} ${h2/2-rd}
270
+ v${-h2+2*rd}
271
+ q0,-${rd} ${rd},-${rd}
272
+ h${w2-2*rd}
273
+ q${rd},0 ${rd},${rd}
274
+ v${h2-rd}
275
+ H${-w2/2}
276
+ Z
277
+ `:`
278
+ M${-w2/2} ${h2/2-rd}
279
+ v${-h2+2*rd}
280
+ q0,-${rd} ${rd},-${rd}
281
+ h${w2-2*rd}
282
+ q${rd},0 ${rd},${rd}
283
+ v${h2-2*rd}
284
+ q0,${rd} ${-rd},${rd}
285
+ h${-(w2-2*rd)}
286
+ q${-rd},0 ${-rd},${-rd}
287
+ Z
288
+ `;if(!node.domId)throw new Error(`defaultMindmapNode: node "${node.id}" is missing a domId — was render.ts domId prefixing skipped?`);const bg=shapeSvg.append("path").attr("id",node.domId).attr("class","node-bkg node-"+node.type).attr("style",nodeStyles).attr("d",rectPath);return shapeSvg.append("line").attr("class","node-line-").attr("x1",-w2/2).attr("y1",h2/2).attr("x2",w2/2).attr("y2",h2/2),label.attr("transform",`translate(${-bbox.width/2}, ${-bbox.height/2})`),shapeSvg.append(()=>label.node()),updateNodeBounds(node,bg),node.calcIntersect=function(bounds,point2){return intersect_default.rect(bounds,point2)},node.intersect=function(point2){return intersect_default.rect(node,point2)},shapeSvg}__name(defaultMindmapNode,"defaultMindmapNode");async function mindmapCircle(parent,node){const options={padding:node.padding??0};return circle$1(parent,node,options)}__name(mindmapCircle,"mindmapCircle");var shapesDefs=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:squareRect2},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:roundedRect},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:stadium},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:subroutine},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:cylinder},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:circle$1},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:bang},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:cloud},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:question},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:hexagon},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:lean_right},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:lean_left},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:trapezoid},{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:inv_trapezoid},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:doublecircle},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:text},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:card},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:shadedProcess},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:stateStart},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:stateEnd},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:forkJoin},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:hourglass},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:curlyBraceLeft},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:curlyBraceRight},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:curlyBraces},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:lightningBolt},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:waveEdgedRectangle},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:halfRoundedRectangle},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:tiltedCylinder},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:linedCylinder},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:curvedTrapezoid},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:dividedRectangle},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:triangle},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:windowPane},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:filledCircle},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:trapezoidalPentagon},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:flippedTriangle},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:slopedRect},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:multiWaveEdgedRectangle},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:multiRect},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:bowTieRect},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:crossedCircle},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:taggedWaveEdgedRectangle},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:taggedRect},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:waveRectangle},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:rect_left_inv_arrow},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:linedWaveEdgedRect}],generateShapeMap=__name(()=>{const entries=[...Object.entries({state,choice,note,rectWithTitle,labelRect,iconSquare,iconCircle,icon,iconRounded,imageSquare,anchor,kanbanItem,mindmapCircle,defaultMindmapNode,classBox,erBox,requirementBox}),...shapesDefs.flatMap(shape=>[shape.shortName,..."aliases"in shape?shape.aliases:[],..."internalAliases"in shape?shape.internalAliases:[]].map(alias=>[alias,shape.handler]))];return Object.fromEntries(entries)},"generateShapeMap"),shapes2=generateShapeMap();function isValidShape(shape){return shape in shapes2}__name(isValidShape,"isValidShape");var nodeElems=new Map;async function insertNode(elem,node,renderOptions){let newEl,el;node.shape==="rect"&&(node.rx&&node.ry?node.shape="roundedRect":node.shape="squareRect");const shapeHandler=node.shape?shapes2[node.shape]:void 0;if(!shapeHandler)throw new Error(`No such shape: ${node.shape}. Please check your syntax.`);if(node.link){let target;renderOptions.config.securityLevel==="sandbox"?target="_top":node.linkTarget&&(target=node.linkTarget||"_blank"),newEl=elem.insert("svg:a").attr("xlink:href",node.link).attr("target",target??null),el=await shapeHandler(newEl,node,renderOptions)}else el=await shapeHandler(elem,node,renderOptions),newEl=el;return newEl.attr("data-look",handleUndefinedAttr(node.look)),node.tooltip&&el.attr("title",node.tooltip),nodeElems.set(node.id,newEl),node.haveCallback&&newEl.attr("class",newEl.attr("class")+" clickable"),newEl}__name(insertNode,"insertNode");var setNodeElem=__name((elem,node)=>{nodeElems.set(node.id,elem)},"setNodeElem"),clear2=__name(()=>{nodeElems.clear()},"clear"),positionNode=__name(node=>{const el=nodeElems.get(node.id);log.trace("Transforming node",node.diff,node,"translate("+(node.x-node.width/2-5)+", "+node.width/2+")");const padding=8,diff=node.diff||0;return node.clusterNode?el.attr("transform","translate("+(node.x+diff-node.width/2)+", "+(node.y-node.height/2-padding)+")"):el.attr("transform","translate("+node.x+", "+node.y+")"),diff},"positionNode"),addEdgeMarkers=__name((svgPath,edge,url,id32,diagramType,useMargin=!1,strokeColor)=>{edge.arrowTypeStart&&addEdgeMarker(svgPath,"start",edge.arrowTypeStart,url,id32,diagramType,useMargin,strokeColor),edge.arrowTypeEnd&&addEdgeMarker(svgPath,"end",edge.arrowTypeEnd,url,id32,diagramType,useMargin,strokeColor)},"addEdgeMarkers"),arrowTypesMap={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},arrowTypesWithMarginSupport=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],addEdgeMarker=__name((svgPath,position,arrowType,url,id32,diagramType,useMargin=!1,strokeColor)=>{var _a17;const arrowTypeInfo=arrowTypesMap[arrowType],marginSupport=arrowTypeInfo&&arrowTypesWithMarginSupport.includes(arrowTypeInfo.type);if(!arrowTypeInfo){log.warn(`Unknown arrow type: ${arrowType}`);return}const endMarkerType=arrowTypeInfo.type,originalMarkerId=`${id32}_${diagramType}-${endMarkerType}${position==="start"?"Start":"End"}${useMargin&&marginSupport?"-margin":""}`;if(strokeColor&&strokeColor.trim()!==""){const colorId=strokeColor.replace(/[^\dA-Za-z]/g,"_"),coloredMarkerId=`${originalMarkerId}_${colorId}`;if(!document.getElementById(coloredMarkerId)){const originalMarker=document.getElementById(originalMarkerId);if(originalMarker){const coloredMarker=originalMarker.cloneNode(!0);coloredMarker.id=coloredMarkerId,coloredMarker.querySelectorAll("path, circle, line").forEach(path=>{path.setAttribute("stroke",strokeColor),arrowTypeInfo.fill&&path.setAttribute("fill",strokeColor)}),(_a17=originalMarker.parentNode)==null||_a17.appendChild(coloredMarker)}}svgPath.attr(`marker-${position}`,`url(${url}#${coloredMarkerId})`)}else svgPath.attr(`marker-${position}`,`url(${url}#${originalMarkerId})`)},"addEdgeMarker"),resolveEdgeCurveType=__name(edgeCurve=>{var _a17,_b;return typeof edgeCurve=="string"?edgeCurve:(_b=(_a17=getConfig2())==null?void 0:_a17.flowchart)==null?void 0:_b.curve},"resolveEdgeCurveType"),edgeLabels=new Map,terminalLabels=new Map,clear=__name(()=>{edgeLabels.clear(),terminalLabels.clear()},"clear"),getLabelStyles=__name(styleArray=>styleArray?typeof styleArray=="string"?styleArray:styleArray.reduce((acc,style)=>acc+";"+style,""):"","getLabelStyles"),insertEdgeLabel=__name(async(elem,edge)=>{const config2=getConfig2();let useHtmlLabels=getEffectiveHtmlLabels(config2);const{labelStyles}=styles2String(edge);edge.labelStyle=labelStyles;const edgeLabel=elem.insert("g").attr("class","edgeLabel"),label=edgeLabel.insert("g").attr("class","label").attr("data-id",edge.id),isMarkdown=edge.labelType==="markdown",labelElement=await createText(elem,edge.label,{style:getLabelStyles(edge.labelStyle),useHtmlLabels,addSvgBackground:!0,isNode:!1,markdown:isMarkdown,width:isMarkdown?void 0:void 0},config2);label.node().appendChild(labelElement),log.info("abc82",edge,edge.labelType);let bbox=labelElement.getBBox(),transformBbox=bbox;if(useHtmlLabels){const div=labelElement.children[0],dv=select(labelElement);bbox=div.getBoundingClientRect(),transformBbox=bbox,dv.attr("width",bbox.width),dv.attr("height",bbox.height)}else{const textEl=select(labelElement).select("text").node();textEl&&typeof textEl.getBBox=="function"&&(transformBbox=textEl.getBBox())}label.attr("transform",computeLabelTransform(transformBbox,useHtmlLabels)),edgeLabels.set(edge.id,edgeLabel),edge.width=bbox.width,edge.height=bbox.height;let fo;if(edge.startLabelLeft){const startEdgeLabelLeft=elem.insert("g").attr("class","edgeTerminals"),inner=startEdgeLabelLeft.insert("g").attr("class","inner"),startLabelElement=await createLabel_default(inner,edge.startLabelLeft,getLabelStyles(edge.labelStyle)||"",!1,!1);fo=startLabelElement;let slBox=startLabelElement.getBBox();if(useHtmlLabels){const div=startLabelElement.children[0],dv=select(startLabelElement);slBox=div.getBoundingClientRect(),dv.attr("width",slBox.width),dv.attr("height",slBox.height)}inner.attr("transform",computeLabelTransform(slBox,useHtmlLabels)),terminalLabels.get(edge.id)||terminalLabels.set(edge.id,{}),terminalLabels.get(edge.id).startLeft=startEdgeLabelLeft,setTerminalWidth(fo,edge.startLabelLeft)}if(edge.startLabelRight){const startEdgeLabelRight=elem.insert("g").attr("class","edgeTerminals"),inner=startEdgeLabelRight.insert("g").attr("class","inner"),startLabelElement=await createLabel_default(inner,edge.startLabelRight,getLabelStyles(edge.labelStyle)||"",!1,!1);fo=startLabelElement,inner.node().appendChild(startLabelElement);let slBox=startLabelElement.getBBox();if(useHtmlLabels){const div=startLabelElement.children[0],dv=select(startLabelElement);slBox=div.getBoundingClientRect(),dv.attr("width",slBox.width),dv.attr("height",slBox.height)}inner.attr("transform",computeLabelTransform(slBox,useHtmlLabels)),terminalLabels.get(edge.id)||terminalLabels.set(edge.id,{}),terminalLabels.get(edge.id).startRight=startEdgeLabelRight,setTerminalWidth(fo,edge.startLabelRight)}if(edge.endLabelLeft){const endEdgeLabelLeft=elem.insert("g").attr("class","edgeTerminals"),inner=endEdgeLabelLeft.insert("g").attr("class","inner"),endLabelElement=await createLabel_default(inner,edge.endLabelLeft,getLabelStyles(edge.labelStyle)||"",!1,!1);fo=endLabelElement;let slBox=endLabelElement.getBBox();if(useHtmlLabels){const div=endLabelElement.children[0],dv=select(endLabelElement);slBox=div.getBoundingClientRect(),dv.attr("width",slBox.width),dv.attr("height",slBox.height)}inner.attr("transform",computeLabelTransform(slBox,useHtmlLabels)),endEdgeLabelLeft.node().appendChild(endLabelElement),terminalLabels.get(edge.id)||terminalLabels.set(edge.id,{}),terminalLabels.get(edge.id).endLeft=endEdgeLabelLeft,setTerminalWidth(fo,edge.endLabelLeft)}if(edge.endLabelRight){const endEdgeLabelRight=elem.insert("g").attr("class","edgeTerminals"),inner=endEdgeLabelRight.insert("g").attr("class","inner"),endLabelElement=await createLabel_default(inner,edge.endLabelRight,getLabelStyles(edge.labelStyle)||"",!1,!1);fo=endLabelElement;let slBox=endLabelElement.getBBox();if(useHtmlLabels){const div=endLabelElement.children[0],dv=select(endLabelElement);slBox=div.getBoundingClientRect(),dv.attr("width",slBox.width),dv.attr("height",slBox.height)}inner.attr("transform",computeLabelTransform(slBox,useHtmlLabels)),endEdgeLabelRight.node().appendChild(endLabelElement),terminalLabels.get(edge.id)||terminalLabels.set(edge.id,{}),terminalLabels.get(edge.id).endRight=endEdgeLabelRight,setTerminalWidth(fo,edge.endLabelRight)}return labelElement},"insertEdgeLabel");function setTerminalWidth(fo,value){getEffectiveHtmlLabels(getConfig2())&&fo&&(fo.style.width=value.length*9+"px",fo.style.height="12px")}__name(setTerminalWidth,"setTerminalWidth");var positionEdgeLabel=__name((edge,paths)=>{log.debug("Moving label abc88 ",edge.id,edge.label,edgeLabels.get(edge.id),paths);let path=paths.updatedPath?paths.updatedPath:paths.originalPath;const siteConfig2=getConfig2(),{subGraphTitleTotalMargin}=getSubGraphTitleMargins(siteConfig2);if(edge.label){const el=edgeLabels.get(edge.id);let x2=edge.x,y3=edge.y;if(path){const pos=utils_default.calcLabelPosition(path);log.debug("Moving label "+edge.label+" from (",x2,",",y3,") to (",pos.x,",",pos.y,") abc88"),paths.updatedPath&&(x2=pos.x,y3=pos.y)}el.attr("transform",`translate(${x2}, ${y3+subGraphTitleTotalMargin/2})`)}if(edge.startLabelLeft){const el=terminalLabels.get(edge.id).startLeft;let x2=edge.x,y3=edge.y;if(path){const pos=utils_default.calcTerminalLabelPosition(edge.arrowTypeStart?10:0,"start_left",path);x2=pos.x,y3=pos.y}el.attr("transform",`translate(${x2}, ${y3})`)}if(edge.startLabelRight){const el=terminalLabels.get(edge.id).startRight;let x2=edge.x,y3=edge.y;if(path){const pos=utils_default.calcTerminalLabelPosition(edge.arrowTypeStart?10:0,"start_right",path);x2=pos.x,y3=pos.y}el.attr("transform",`translate(${x2}, ${y3})`)}if(edge.endLabelLeft){const el=terminalLabels.get(edge.id).endLeft;let x2=edge.x,y3=edge.y;if(path){const pos=utils_default.calcTerminalLabelPosition(edge.arrowTypeEnd?10:0,"end_left",path);x2=pos.x,y3=pos.y}el.attr("transform",`translate(${x2}, ${y3})`)}if(edge.endLabelRight){const el=terminalLabels.get(edge.id).endRight;let x2=edge.x,y3=edge.y;if(path){const pos=utils_default.calcTerminalLabelPosition(edge.arrowTypeEnd?10:0,"end_right",path);x2=pos.x,y3=pos.y}el.attr("transform",`translate(${x2}, ${y3})`)}},"positionEdgeLabel"),outsideNode=__name((node,point2)=>{const x2=node.x,y3=node.y,dx=Math.abs(point2.x-x2),dy=Math.abs(point2.y-y3),w2=node.width/2,h2=node.height/2;return dx>=w2||dy>=h2},"outsideNode"),intersection=__name((node,outsidePoint,insidePoint)=>{log.debug(`intersection calc abc89:
289
+ outsidePoint: ${JSON.stringify(outsidePoint)}
290
+ insidePoint : ${JSON.stringify(insidePoint)}
291
+ node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`);const x2=node.x,y3=node.y,dx=Math.abs(x2-insidePoint.x),w2=node.width/2;let r2=insidePoint.x<outsidePoint.x?w2-dx:w2+dx;const h2=node.height/2,Q2=Math.abs(outsidePoint.y-insidePoint.y),R2=Math.abs(outsidePoint.x-insidePoint.x);if(Math.abs(y3-outsidePoint.y)*w2>Math.abs(x2-outsidePoint.x)*h2){let q2=insidePoint.y<outsidePoint.y?outsidePoint.y-h2-y3:y3-h2-outsidePoint.y;r2=R2*q2/Q2;const res={x:insidePoint.x<outsidePoint.x?insidePoint.x+r2:insidePoint.x-R2+r2,y:insidePoint.y<outsidePoint.y?insidePoint.y+Q2-q2:insidePoint.y-Q2+q2};return r2===0&&(res.x=outsidePoint.x,res.y=outsidePoint.y),R2===0&&(res.x=outsidePoint.x),Q2===0&&(res.y=outsidePoint.y),log.debug(`abc89 top/bottom calc, Q ${Q2}, q ${q2}, R ${R2}, r ${r2}`,res),res}else{insidePoint.x<outsidePoint.x?r2=outsidePoint.x-w2-x2:r2=x2-w2-outsidePoint.x;let q2=Q2*r2/R2,_x=insidePoint.x<outsidePoint.x?insidePoint.x+R2-r2:insidePoint.x-R2+r2,_y=insidePoint.y<outsidePoint.y?insidePoint.y+q2:insidePoint.y-q2;return log.debug(`sides calc abc89, Q ${Q2}, q ${q2}, R ${R2}, r ${r2}`,{_x,_y}),r2===0&&(_x=outsidePoint.x,_y=outsidePoint.y),R2===0&&(_x=outsidePoint.x),Q2===0&&(_y=outsidePoint.y),{x:_x,y:_y}}},"intersection"),cutPathAtIntersect=__name((_points,boundaryNode)=>{log.warn("abc88 cutPathAtIntersect",_points,boundaryNode);let points=[],lastPointOutside=_points[0],isInside=!1;return _points.forEach(point2=>{if(log.info("abc88 checking point",point2,boundaryNode),!outsideNode(boundaryNode,point2)&&!isInside){const inter=intersection(boundaryNode,lastPointOutside,point2);log.debug("abc88 inside",point2,lastPointOutside,inter),log.debug("abc88 intersection",inter,boundaryNode);let pointPresent=!1;points.forEach(p2=>{pointPresent=pointPresent||p2.x===inter.x&&p2.y===inter.y}),points.some(e2=>e2.x===inter.x&&e2.y===inter.y)?log.warn("abc88 no intersect",inter,points):points.push(inter),isInside=!0}else log.warn("abc88 outside",point2,lastPointOutside),lastPointOutside=point2,isInside||points.push(point2)}),log.debug("returning points",points),points},"cutPathAtIntersect");function extractCornerPoints(points){const cornerPoints=[],cornerPointPositions=[];for(let i2=1;i2<points.length-1;i2++){const prev=points[i2-1],curr=points[i2],next=points[i2+1];(prev.x===curr.x&&curr.y===next.y&&Math.abs(curr.x-next.x)>5&&Math.abs(curr.y-prev.y)>5||prev.y===curr.y&&curr.x===next.x&&Math.abs(curr.x-prev.x)>5&&Math.abs(curr.y-next.y)>5)&&(cornerPoints.push(curr),cornerPointPositions.push(i2))}return{cornerPoints,cornerPointPositions}}__name(extractCornerPoints,"extractCornerPoints");var findAdjacentPoint=__name(function(pointA,pointB,distance2){const xDiff=pointB.x-pointA.x,yDiff=pointB.y-pointA.y,length=Math.sqrt(xDiff*xDiff+yDiff*yDiff),ratio=distance2/length;return{x:pointB.x-ratio*xDiff,y:pointB.y-ratio*yDiff}},"findAdjacentPoint"),fixCorners=__name(function(lineData){const{cornerPointPositions}=extractCornerPoints(lineData),newLineData=[];for(let i2=0;i2<lineData.length;i2++)if(cornerPointPositions.includes(i2)){const prevPoint=lineData[i2-1],nextPoint=lineData[i2+1],cornerPoint=lineData[i2],newPrevPoint=findAdjacentPoint(prevPoint,cornerPoint,5),newNextPoint=findAdjacentPoint(nextPoint,cornerPoint,5),xDiff=newNextPoint.x-newPrevPoint.x,yDiff=newNextPoint.y-newPrevPoint.y;newLineData.push(newPrevPoint);const a2=Math.sqrt(2)*2;let newCornerPoint={x:cornerPoint.x,y:cornerPoint.y};if(Math.abs(nextPoint.x-prevPoint.x)>10&&Math.abs(nextPoint.y-prevPoint.y)>=10){log.debug("Corner point fixing",Math.abs(nextPoint.x-prevPoint.x),Math.abs(nextPoint.y-prevPoint.y));const r2=5;cornerPoint.x===newPrevPoint.x?newCornerPoint={x:xDiff<0?newPrevPoint.x-r2+a2:newPrevPoint.x+r2-a2,y:yDiff<0?newPrevPoint.y-a2:newPrevPoint.y+a2}:newCornerPoint={x:xDiff<0?newPrevPoint.x-a2:newPrevPoint.x+a2,y:yDiff<0?newPrevPoint.y-r2+a2:newPrevPoint.y+r2-a2}}else log.debug("Corner point skipping fixing",Math.abs(nextPoint.x-prevPoint.x),Math.abs(nextPoint.y-prevPoint.y));newLineData.push(newCornerPoint,newNextPoint)}else newLineData.push(lineData[i2]);return newLineData},"fixCorners"),generateDashArray=__name((len,oValueS,oValueE)=>{const middleLength=len-oValueS-oValueE,dashLength=2,gapLength=2,dashGapPairLength=dashLength+gapLength,numberOfPairs=Math.floor(middleLength/dashGapPairLength),middlePattern=Array(numberOfPairs).fill(`${dashLength} ${gapLength}`).join(" ");return`0 ${oValueS} ${middlePattern} ${oValueE}`},"generateDashArray"),insertEdge=__name(function(elem,edge,clusterDb,diagramType,startNode,endNode,diagramId,skipIntersect=!1){var _a17;if(!diagramId)throw new Error(`insertEdge: missing diagramId for edge "${edge.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed}=getConfig2();let points=edge.points,pointsHasChanged=!1;const tail=startNode;var head=endNode;const edgeClassStyles=[];for(const key in edge.cssCompiledStyles)isLabelStyle(key)||edgeClassStyles.push(edge.cssCompiledStyles[key]);log.debug("UIO intersect check",edge.points,head.x,tail.x),head.intersect&&tail.intersect&&!skipIntersect&&(points=points.slice(1,edge.points.length-1),points.unshift(tail.intersect(points[0])),log.debug("Last point UIO",edge.start,"-->",edge.end,points[points.length-1],head,head.intersect(points[points.length-1])),points.push(head.intersect(points[points.length-1])));const pointsStr=btoa(JSON.stringify(points));edge.toCluster&&(log.info("to cluster abc88",clusterDb.get(edge.toCluster)),points=cutPathAtIntersect(edge.points,clusterDb.get(edge.toCluster).node),pointsHasChanged=!0),edge.fromCluster&&(log.debug("from cluster abc88",clusterDb.get(edge.fromCluster),JSON.stringify(points,null,2)),points=cutPathAtIntersect(points.reverse(),clusterDb.get(edge.fromCluster).node).reverse(),pointsHasChanged=!0);let lineData=points.filter(p2=>!Number.isNaN(p2.y));const edgeCurveType=resolveEdgeCurveType(edge.curve);edgeCurveType!=="rounded"&&(lineData=fixCorners(lineData));let curve=curveLinear;switch(edgeCurveType){case"linear":curve=curveLinear;break;case"basis":curve=curveBasis;break;case"cardinal":curve=curveCardinal;break;case"bumpX":curve=bumpX;break;case"bumpY":curve=bumpY;break;case"catmullRom":curve=curveCatmullRom;break;case"monotoneX":curve=monotoneX;break;case"monotoneY":curve=monotoneY;break;case"natural":curve=curveNatural;break;case"step":curve=curveStep;break;case"stepAfter":curve=stepAfter;break;case"stepBefore":curve=stepBefore;break;case"rounded":curve=curveLinear;break;default:curve=curveBasis}const{x:x2,y:y3}=getLineFunctionsWithOffset(edge),lineFunction=line().x(x2).y(y3).curve(curve);let strokeClasses;switch(edge.thickness){case"normal":strokeClasses="edge-thickness-normal";break;case"thick":strokeClasses="edge-thickness-thick";break;case"invisible":strokeClasses="edge-thickness-invisible";break;default:strokeClasses="edge-thickness-normal"}switch(edge.pattern){case"solid":strokeClasses+=" edge-pattern-solid";break;case"dotted":strokeClasses+=" edge-pattern-dotted";break;case"dashed":strokeClasses+=" edge-pattern-dashed";break;default:strokeClasses+=" edge-pattern-solid"}let svgPath,linePath=edgeCurveType==="rounded"?generateRoundedPath(applyMarkerOffsetsToPoints(lineData,edge),5):lineFunction(lineData);const edgeStyles=Array.isArray(edge.style)?edge.style:[edge.style];let strokeColor=edgeStyles.find(style=>style==null?void 0:style.startsWith("stroke:")),animationClass="";edge.animate&&(animationClass="edge-animation-fast"),edge.animation&&(animationClass="edge-animation-"+edge.animation);let animatedEdge=!1;if(edge.look==="handDrawn"){const rc=at.svg(elem);Object.assign([],lineData);const svgPathNode=rc.path(linePath,{roughness:.3,seed:handDrawnSeed});strokeClasses+=" transition",svgPath=select(svgPathNode).select("path").attr("id",`${diagramId}-${edge.id}`).attr("class"," "+strokeClasses+(edge.classes?" "+edge.classes:"")+(animationClass?" "+animationClass:"")).attr("style",edgeStyles?edgeStyles.reduce((acc,style)=>acc+";"+style,""):"");let d2=svgPath.attr("d");svgPath.attr("d",d2),elem.node().appendChild(svgPath.node())}else{const stylesFromClasses=edgeClassStyles.join(";"),styles=edgeStyles?edgeStyles.reduce((acc,style)=>acc+style+";",""):"",pathStyle=(stylesFromClasses?stylesFromClasses+";"+styles+";":styles)+";"+(edgeStyles?edgeStyles.reduce((acc,style)=>acc+";"+style,""):"");svgPath=elem.append("path").attr("d",linePath).attr("id",`${diagramId}-${edge.id}`).attr("class"," "+strokeClasses+(edge.classes?" "+edge.classes:"")+(animationClass?" "+animationClass:"")).attr("style",pathStyle),strokeColor=(_a17=pathStyle.match(/stroke:([^;]+)/))==null?void 0:_a17[1],animatedEdge=edge.animate===!0||!!edge.animation||stylesFromClasses.includes("animation");const pathNode=svgPath.node(),len=typeof pathNode.getTotalLength=="function"?pathNode.getTotalLength():0,oValueS=markerOffsets2[edge.arrowTypeStart]||0,oValueE=markerOffsets2[edge.arrowTypeEnd]||0;if(edge.look==="neo"&&!animatedEdge){const mOffset=`stroke-dasharray: ${edge.pattern==="dotted"||edge.pattern==="dashed"?generateDashArray(len,oValueS,oValueE):`0 ${oValueS} ${len-oValueS-oValueE} ${oValueE}`}; stroke-dashoffset: 0;`;svgPath.attr("style",mOffset+svgPath.attr("style"))}}svgPath.attr("data-edge",!0),svgPath.attr("data-et","edge"),svgPath.attr("data-id",edge.id),svgPath.attr("data-points",pointsStr),svgPath.attr("data-look",handleUndefinedAttr(edge.look)),edge.showPoints&&lineData.forEach(point3=>{elem.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",point3.x).attr("cy",point3.y)});let url="";(getConfig2().flowchart.arrowMarkerAbsolute||getConfig2().state.arrowMarkerAbsolute)&&(url=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,url=url.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),log.info("arrowTypeStart",edge.arrowTypeStart),log.info("arrowTypeEnd",edge.arrowTypeEnd);const useMargin=!animatedEdge&&(edge==null?void 0:edge.look)==="neo";addEdgeMarkers(svgPath,edge,url,diagramId,diagramType,useMargin,strokeColor);const midIndex=Math.floor(points.length/2),point2=points[midIndex];utils_default.isLabelCoordinateInPath(point2,svgPath.attr("d"))||(pointsHasChanged=!0);let paths={};return pointsHasChanged&&(paths.updatedPath=points),paths.originalPath=edge.points,paths},"insertEdge");function generateRoundedPath(points,radius){if(points.length<2)return"";let path="";const size=points.length,epsilon2=1e-5;for(let i2=0;i2<size;i2++){const currPoint=points[i2],prevPoint=points[i2-1],nextPoint=points[i2+1];if(i2===0)path+=`M${currPoint.x},${currPoint.y}`;else if(i2===size-1)path+=`L${currPoint.x},${currPoint.y}`;else{const dx1=currPoint.x-prevPoint.x,dy1=currPoint.y-prevPoint.y,dx2=nextPoint.x-currPoint.x,dy2=nextPoint.y-currPoint.y,len1=Math.hypot(dx1,dy1),len2=Math.hypot(dx2,dy2);if(len1<epsilon2||len2<epsilon2){path+=`L${currPoint.x},${currPoint.y}`;continue}const nx1=dx1/len1,ny1=dy1/len1,nx2=dx2/len2,ny2=dy2/len2,dot=nx1*nx2+ny1*ny2,clampedDot=Math.max(-1,Math.min(1,dot)),angle=Math.acos(clampedDot);if(angle<epsilon2||Math.abs(Math.PI-angle)<epsilon2){path+=`L${currPoint.x},${currPoint.y}`;continue}const cutLen=Math.min(radius/Math.sin(angle/2),len1/2,len2/2),startX=currPoint.x-nx1*cutLen,startY=currPoint.y-ny1*cutLen,endX=currPoint.x+nx2*cutLen,endY=currPoint.y+ny2*cutLen;path+=`L${startX},${startY}`,path+=`Q${currPoint.x},${currPoint.y} ${endX},${endY}`}}return path}__name(generateRoundedPath,"generateRoundedPath");function calculateDeltaAndAngle(point1,point2){if(!point1||!point2)return{angle:0,deltaX:0,deltaY:0};const deltaX=point2.x-point1.x,deltaY=point2.y-point1.y;return{angle:Math.atan2(deltaY,deltaX),deltaX,deltaY}}__name(calculateDeltaAndAngle,"calculateDeltaAndAngle");function applyMarkerOffsetsToPoints(points,edge){const newPoints=points.map(point2=>({...point2}));if(points.length>=2&&markerOffsets[edge.arrowTypeStart]){const offsetValue=markerOffsets[edge.arrowTypeStart],point1=points[0],point2=points[1],{angle}=calculateDeltaAndAngle(point1,point2),offsetX=offsetValue*Math.cos(angle),offsetY=offsetValue*Math.sin(angle);newPoints[0].x=point1.x+offsetX,newPoints[0].y=point1.y+offsetY}const n2=points.length;if(n2>=2&&markerOffsets[edge.arrowTypeEnd]){const offsetValue=markerOffsets[edge.arrowTypeEnd],point1=points[n2-1],point2=points[n2-2],{angle}=calculateDeltaAndAngle(point2,point1),offsetX=offsetValue*Math.cos(angle),offsetY=offsetValue*Math.sin(angle);newPoints[n2-1].x=point1.x-offsetX,newPoints[n2-1].y=point1.y-offsetY}return newPoints}__name(applyMarkerOffsetsToPoints,"applyMarkerOffsetsToPoints");var insertMarkers=__name((elem,markerArray,type2,id32)=>{markerArray.forEach(markerName=>{markers[markerName](elem,type2,id32)})},"insertMarkers"),extension=__name((elem,type2,id32)=>{log.trace("Making markers for ",id32),elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-extensionStart").attr("class","marker extension "+type2).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-extensionEnd").attr("class","marker extension "+type2).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"),elem.append("marker").attr("id",id32+"_"+type2+"-extensionStart-margin").attr("class","marker extension "+type2).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-extensionEnd-margin").attr("class","marker extension "+type2).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),composition=__name((elem,type2,id32)=>{elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-compositionStart").attr("class","marker composition "+type2).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"),elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-compositionEnd").attr("class","marker composition "+type2).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"),elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-compositionStart-margin").attr("class","marker composition "+type2).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-compositionEnd-margin").attr("class","marker composition "+type2).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aggregation=__name((elem,type2,id32)=>{elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-aggregationStart").attr("class","marker aggregation "+type2).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"),elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-aggregationEnd").attr("class","marker aggregation "+type2).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"),elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-aggregationStart-margin").attr("class","marker aggregation "+type2).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-aggregationEnd-margin").attr("class","marker aggregation "+type2).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dependency=__name((elem,type2,id32)=>{elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-dependencyStart").attr("class","marker dependency "+type2).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"),elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-dependencyEnd").attr("class","marker dependency "+type2).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"),elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-dependencyStart-margin").attr("class","marker dependency "+type2).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-dependencyEnd-margin").attr("class","marker dependency "+type2).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lollipop=__name((elem,type2,id32)=>{elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-lollipopStart").attr("class","marker lollipop "+type2).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-lollipopEnd").attr("class","marker lollipop "+type2).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-lollipopStart-margin").attr("class","marker lollipop "+type2).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-lollipopEnd-margin").attr("class","marker lollipop "+type2).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),point=__name((elem,type2,id32)=>{elem.append("marker").attr("id",id32+"_"+type2+"-pointEnd").attr("class","marker "+type2).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"),elem.append("marker").attr("id",id32+"_"+type2+"-pointStart").attr("class","marker "+type2).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"),elem.append("marker").attr("id",id32+"_"+type2+"-pointEnd-margin").attr("class","marker "+type2).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),elem.append("marker").attr("id",id32+"_"+type2+"-pointStart-margin").attr("class","marker "+type2).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),circle=__name((elem,type2,id32)=>{elem.append("marker").attr("id",id32+"_"+type2+"-circleEnd").attr("class","marker "+type2).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"),elem.append("marker").attr("id",id32+"_"+type2+"-circleStart").attr("class","marker "+type2).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"),elem.append("marker").attr("id",id32+"_"+type2+"-circleEnd-margin").attr("class","marker "+type2).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),elem.append("marker").attr("id",id32+"_"+type2+"-circleStart-margin").attr("class","marker "+type2).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),cross=__name((elem,type2,id32)=>{elem.append("marker").attr("id",id32+"_"+type2+"-crossEnd").attr("class","marker cross "+type2).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"),elem.append("marker").attr("id",id32+"_"+type2+"-crossStart").attr("class","marker cross "+type2).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"),elem.append("marker").attr("id",id32+"_"+type2+"-crossEnd-margin").attr("class","marker cross "+type2).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),elem.append("marker").attr("id",id32+"_"+type2+"-crossStart-margin").attr("class","marker cross "+type2).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),barb=__name((elem,type2,id32)=>{elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-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"),barbNeo=__name((elem,type2,id32)=>{const config2=getConfig(),{themeVariables}=config2,{transitionColor}=themeVariables;elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${transitionColor}`)},"barbNeo"),only_one=__name((elem,type2,id32)=>{elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-onlyOneStart").attr("class","marker onlyOne "+type2).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"),elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-onlyOneEnd").attr("class","marker onlyOne "+type2).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"),zero_or_one=__name((elem,type2,id32)=>{const startMarker=elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-zeroOrOneStart").attr("class","marker zeroOrOne "+type2).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");startMarker.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),startMarker.append("path").attr("d","M9,0 L9,18");const endMarker=elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+type2).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");endMarker.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),endMarker.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),one_or_more=__name((elem,type2,id32)=>{elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-oneOrMoreStart").attr("class","marker oneOrMore "+type2).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"),elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-oneOrMoreEnd").attr("class","marker oneOrMore "+type2).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"),zero_or_more=__name((elem,type2,id32)=>{const startMarker=elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+type2).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");startMarker.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),startMarker.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const endMarker=elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+type2).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");endMarker.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),endMarker.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),only_one_neo=__name((elem,type2,id32)=>{const config2=getConfig(),{themeVariables}=config2,{strokeWidth}=themeVariables;elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-onlyOneStart").attr("class","marker onlyOne "+type2).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${strokeWidth}`),elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-onlyOneEnd").attr("class","marker onlyOne "+type2).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${strokeWidth}`)},"only_one_neo"),zero_or_one_neo=__name((elem,type2,id32)=>{const config2=getConfig(),{themeVariables}=config2,{strokeWidth,mainBkg}=themeVariables,startMarker=elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-zeroOrOneStart").attr("class","marker zeroOrOne "+type2).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");startMarker.append("circle").attr("fill",mainBkg??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${strokeWidth}`).attr("r",6),startMarker.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${strokeWidth}`);const endMarker=elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+type2).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");endMarker.append("circle").attr("fill",mainBkg??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${strokeWidth}`).attr("r",6),endMarker.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${strokeWidth}`)},"zero_or_one_neo"),one_or_more_neo=__name((elem,type2,id32)=>{const config2=getConfig(),{themeVariables}=config2,{strokeWidth}=themeVariables;elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-oneOrMoreStart").attr("class","marker oneOrMore "+type2).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${strokeWidth}`),elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-oneOrMoreEnd").attr("class","marker oneOrMore "+type2).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${strokeWidth}`)},"one_or_more_neo"),zero_or_more_neo=__name((elem,type2,id32)=>{const config2=getConfig(),{themeVariables}=config2,{strokeWidth,mainBkg}=themeVariables,startMarker=elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+type2).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");startMarker.append("circle").attr("fill",mainBkg??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${strokeWidth}`),startMarker.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${strokeWidth}`);const endMarker=elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+type2).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");endMarker.append("circle").attr("fill",mainBkg??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${strokeWidth}`),endMarker.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${strokeWidth}`)},"zero_or_more_neo"),requirement_arrow=__name((elem,type2,id32)=>{elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
292
+ L20,10
293
+ M20,10
294
+ L0,20`)},"requirement_arrow"),requirement_arrow_neo=__name((elem,type2,id32)=>{const config2=getConfig(),{themeVariables}=config2,{strokeWidth}=themeVariables;elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${strokeWidth}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
295
+ L20,10
296
+ M20,10
297
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),requirement_contains=__name((elem,type2,id32)=>{const containsNode=elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");containsNode.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),containsNode.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),containsNode.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),requirement_contains_neo=__name((elem,type2,id32)=>{const config2=getConfig(),{themeVariables}=config2,{strokeWidth}=themeVariables,containsNode=elem.append("defs").append("marker").attr("id",id32+"_"+type2+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");containsNode.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),containsNode.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),containsNode.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),containsNode.selectAll("*").attr("stroke-width",`${strokeWidth}`)},"requirement_contains_neo"),markers={extension,composition,aggregation,dependency,lollipop,point,circle,cross,barb,barbNeo,only_one,zero_or_one,one_or_more,zero_or_more,only_one_neo,zero_or_one_neo,one_or_more_neo,zero_or_more_neo,requirement_arrow,requirement_contains,requirement_arrow_neo,requirement_contains_neo},markers_default=insertMarkers,internalHelpers={common:common_default,getConfig,insertCluster,insertEdge,insertEdgeLabel,insertMarkers:markers_default,insertNode,interpolateToCurve,labelHelper,log,positionEdgeLabel},layoutAlgorithms={},registerLayoutLoaders=__name(loaders=>{for(const loader32 of loaders)layoutAlgorithms[loader32.name]=loader32},"registerLayoutLoaders"),registerDefaultLayoutLoaders=__name(()=>{registerLayoutLoaders([{name:"dagre",loader:__name(async()=>await __vitePreload(()=>import("./dagre-KV5264BT-Dc7qbya2.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])),"loader")},{name:"cose-bilkent",loader:__name(async()=>await __vitePreload(()=>import("./cose-bilkent-S5V4N54A-DpwiMCiq.js"),__vite__mapDeps([11,12,8,6,7,9,10])),"loader")}])},"registerDefaultLayoutLoaders");registerDefaultLayoutLoaders();var render$1=__name(async(data4Layout,svg)=>{if(!(data4Layout.layoutAlgorithm in layoutAlgorithms))throw new Error(`Unknown layout algorithm: ${data4Layout.layoutAlgorithm}`);if(data4Layout.diagramId)for(const node of data4Layout.nodes){const originalDomId=node.domId||node.id;node.domId=`${data4Layout.diagramId}-${originalDomId}`}const layoutDefinition=layoutAlgorithms[data4Layout.layoutAlgorithm],layoutRenderer=await layoutDefinition.loader(),{theme,themeVariables}=data4Layout.config,{useGradient,gradientStart,gradientStop}=themeVariables,svgId=svg.attr("id");if(svg.append("defs").append("filter").attr("id",`${svgId}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${theme!=null&&theme.includes("dark")?"#FFFFFF":"#000000"}`),svg.append("defs").append("filter").attr("id",`${svgId}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${theme!=null&&theme.includes("dark")?"#FFFFFF":"#000000"}`),useGradient){const gradient=svg.append("linearGradient").attr("id",svg.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");gradient.append("svg:stop").attr("offset","0%").attr("stop-color",gradientStart).attr("stop-opacity",1),gradient.append("svg:stop").attr("offset","100%").attr("stop-color",gradientStop).attr("stop-opacity",1)}return layoutRenderer.render(data4Layout,svg,internalHelpers,{algorithm:layoutDefinition.algorithm})},"render"),getRegisteredLayoutAlgorithm=__name((algorithm="",{fallback="dagre"}={})=>{if(algorithm in layoutAlgorithms)return algorithm;if(fallback in layoutAlgorithms)return log.warn(`Layout algorithm ${algorithm} is not registered. Using ${fallback} as fallback.`),fallback;throw new Error(`Both layout algorithms ${algorithm} and ${fallback} are not registered.`)},"getRegisteredLayoutAlgorithm"),nativeKeys=overArg(Object.keys,Object),objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function baseKeys(object){if(!isPrototype(object))return nativeKeys(object);var result=[];for(var key in Object(object))hasOwnProperty$1.call(object,key)&&key!="constructor"&&result.push(key);return result}var DataView=getNative(root,"DataView"),Promise$1=getNative(root,"Promise"),Set$1=getNative(root,"Set"),WeakMap=getNative(root,"WeakMap"),mapTag$1="[object Map]",objectTag="[object Object]",promiseTag="[object Promise]",setTag$1="[object Set]",weakMapTag="[object WeakMap]",dataViewTag="[object DataView]",dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map$1),promiseCtorString=toSource(Promise$1),setCtorString=toSource(Set$1),weakMapCtorString=toSource(WeakMap),getTag=baseGetTag;(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map$1&&getTag(new Map$1)!=mapTag$1||Promise$1&&getTag(Promise$1.resolve())!=promiseTag||Set$1&&getTag(new Set$1)!=setTag$1||WeakMap&&getTag(new WeakMap)!=weakMapTag)&&(getTag=function(value){var result=baseGetTag(value),Ctor=result==objectTag?value.constructor:void 0,ctorString=Ctor?toSource(Ctor):"";if(ctorString)switch(ctorString){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag$1;case promiseCtorString:return promiseTag;case setCtorString:return setTag$1;case weakMapCtorString:return weakMapTag}return result});var mapTag="[object Map]",setTag="[object Set]",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function isEmpty(value){if(value==null)return!0;if(isArrayLike(value)&&(isArray(value)||typeof value=="string"||typeof value.splice=="function"||isBuffer(value)||isTypedArray(value)||isArguments(value)))return!value.length;var tag=getTag(value);if(tag==mapTag||tag==setTag)return!value.size;if(isPrototype(value))return!baseKeys(value).length;for(var key in value)if(hasOwnProperty.call(value,key))return!1;return!0}var id="c4",detector=__name(txt=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(txt),"detector"),loader=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./c4Diagram-AHTNJAMY-CFHX4Dfx.js");return{diagram:diagram22}},__vite__mapDeps([13,14,6,7,8,9,10]));return{id,diagram:diagram2}},"loader"),plugin={id,detector,loader},c4Detector_default=plugin,id2="flowchart",detector2=__name((txt,config2)=>{var _a17,_b;return((_a17=config2==null?void 0:config2.flowchart)==null?void 0:_a17.defaultRenderer)==="dagre-wrapper"||((_b=config2==null?void 0:config2.flowchart)==null?void 0:_b.defaultRenderer)==="elk"?!1:/^\s*graph/.test(txt)},"detector"),loader2=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./flowDiagram-DWJPFMVM-yf315tJr.js");return{diagram:diagram22}},__vite__mapDeps([15,16,14,17,18,10,19,6,7,8,9]));return{id:id2,diagram:diagram2}},"loader"),plugin2={id:id2,detector:detector2,loader:loader2},flowDetector_default=plugin2,id3="flowchart-v2",detector3=__name((txt,config2)=>{var _a17,_b,_c;return((_a17=config2==null?void 0:config2.flowchart)==null?void 0:_a17.defaultRenderer)==="dagre-d3"?!1:(((_b=config2==null?void 0:config2.flowchart)==null?void 0:_b.defaultRenderer)==="elk"&&(config2.layout="elk"),/^\s*graph/.test(txt)&&((_c=config2==null?void 0:config2.flowchart)==null?void 0:_c.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(txt))},"detector"),loader3=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./flowDiagram-DWJPFMVM-yf315tJr.js");return{diagram:diagram22}},__vite__mapDeps([15,16,14,17,18,10,19,6,7,8,9]));return{id:id3,diagram:diagram2}},"loader"),plugin3={id:id3,detector:detector3,loader:loader3},flowDetector_v2_default=plugin3,id4="er",detector4=__name(txt=>/^\s*erDiagram/.test(txt),"detector"),loader4=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./erDiagram-SMLLAGMA-Ckj0dkk7.js");return{diagram:diagram22}},__vite__mapDeps([20,17,18,19,6,7,8,9,10]));return{id:id4,diagram:diagram2}},"loader"),plugin4={id:id4,detector:detector4,loader:loader4},erDetector_default=plugin4,id5="gitGraph",detector5=__name(txt=>/^\s*gitGraph/.test(txt),"detector"),loader5=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./gitGraphDiagram-UUTBAWPF-CesdgsJi.js");return{diagram:diagram22}},__vite__mapDeps([21,22,23,24,6,7,8,9,4,2,10]));return{id:id5,diagram:diagram2}},"loader"),plugin5={id:id5,detector:detector5,loader:loader5},gitGraphDetector_default=plugin5,id6="gantt",detector6=__name(txt=>/^\s*gantt/.test(txt),"detector"),loader6=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./ganttDiagram-T4ZO3ILL-Ch2bINVC.js");return{diagram:diagram22}},__vite__mapDeps([25,8,26,27,28,6,7,9,10]));return{id:id6,diagram:diagram2}},"loader"),plugin6={id:id6,detector:detector6,loader:loader6},ganttDetector_default=plugin6,id7="info",detector7=__name(txt=>/^\s*info/.test(txt),"detector"),loader7=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./infoDiagram-42DDH7IO-CuD16P9Y.js");return{diagram:diagram22}},__vite__mapDeps([29,24,6,7,8,9,4,2,10]));return{id:id7,diagram:diagram2}},"loader"),info={id:id7,detector:detector7,loader:loader7},id8="pie",detector8=__name(txt=>/^\s*pie/.test(txt),"detector"),loader8=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./pieDiagram-DEJITSTG-DNrnOqmz.js");return{diagram:diagram22}},__vite__mapDeps([30,22,24,6,7,8,9,4,2,31,32,27,10]));return{id:id8,diagram:diagram2}},"loader"),pie={id:id8,detector:detector8,loader:loader8},id9="quadrantChart",detector9=__name(txt=>/^\s*quadrantChart/.test(txt),"detector"),loader9=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./quadrantDiagram-34T5L4WZ-Cl176vnh.js");return{diagram:diagram22}},__vite__mapDeps([33,26,27,28,6,7,8,9,10]));return{id:id9,diagram:diagram2}},"loader"),plugin7={id:id9,detector:detector9,loader:loader9},quadrantDetector_default=plugin7,id10="xychart",detector10=__name(txt=>/^\s*xychart(-beta)?/.test(txt),"detector"),loader10=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./xychartDiagram-5P7HB3ND-D8aBEz8e.js");return{diagram:diagram22}},__vite__mapDeps([34,27,32,26,28,6,7,8,9,10]));return{id:id10,diagram:diagram2}},"loader"),plugin8={id:id10,detector:detector10,loader:loader10},xychartDetector_default=plugin8,id11="requirement",detector11=__name(txt=>/^\s*requirement(Diagram)?/.test(txt),"detector"),loader11=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./requirementDiagram-MS252O5E-DKp3A5f_.js");return{diagram:diagram22}},__vite__mapDeps([35,17,18,6,7,8,9,10]));return{id:id11,diagram:diagram2}},"loader"),plugin9={id:id11,detector:detector11,loader:loader11},requirementDetector_default=plugin9,id12="sequence",detector12=__name(txt=>/^\s*sequenceDiagram/.test(txt),"detector"),loader12=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./sequenceDiagram-FGHM5R23-CQ4preep.js");return{diagram:diagram22}},__vite__mapDeps([36,14,23,6,7,8,9,10]));return{id:id12,diagram:diagram2}},"loader"),plugin10={id:id12,detector:detector12,loader:loader12},sequenceDetector_default=plugin10,id13="class",detector13=__name((txt,config2)=>{var _a17;return((_a17=config2==null?void 0:config2.class)==null?void 0:_a17.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(txt)},"detector"),loader13=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./classDiagram-6PBFFD2Q-B0-7EUsz.js");return{diagram:diagram22}},__vite__mapDeps([37,38,16,14,17,18,10,6,7,8,9]));return{id:id13,diagram:diagram2}},"loader"),plugin11={id:id13,detector:detector13,loader:loader13},classDetector_default=plugin11,id14="classDiagram",detector14=__name((txt,config2)=>{var _a17;return/^\s*classDiagram/.test(txt)&&((_a17=config2==null?void 0:config2.class)==null?void 0:_a17.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(txt)},"detector"),loader14=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./classDiagram-v2-HSJHXN6E-B0-7EUsz.js");return{diagram:diagram22}},__vite__mapDeps([39,38,16,14,17,18,10,6,7,8,9]));return{id:id14,diagram:diagram2}},"loader"),plugin12={id:id14,detector:detector14,loader:loader14},classDetector_V2_default=plugin12,id15="state",detector15=__name((txt,config2)=>{var _a17;return((_a17=config2==null?void 0:config2.state)==null?void 0:_a17.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(txt)},"detector"),loader15=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./stateDiagram-FHFEXIEX-BKqYYN8H.js");return{diagram:diagram22}},__vite__mapDeps([40,41,17,18,1,2,3,4,6,7,8,9,10]));return{id:id15,diagram:diagram2}},"loader"),plugin13={id:id15,detector:detector15,loader:loader15},stateDetector_default=plugin13,id16="stateDiagram",detector16=__name((txt,config2)=>{var _a17;return!!(/^\s*stateDiagram-v2/.test(txt)||/^\s*stateDiagram/.test(txt)&&((_a17=config2==null?void 0:config2.state)==null?void 0:_a17.defaultRenderer)==="dagre-wrapper")},"detector"),loader16=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./stateDiagram-v2-QKLJ7IA2-C1W1ECmZ.js");return{diagram:diagram22}},__vite__mapDeps([42,41,17,18,6,7,8,9,10]));return{id:id16,diagram:diagram2}},"loader"),plugin14={id:id16,detector:detector16,loader:loader16},stateDetector_V2_default=plugin14,id17="journey",detector17=__name(txt=>/^\s*journey/.test(txt),"detector"),loader17=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./journeyDiagram-VCZTEJTY-B6TtR2Zk.js");return{diagram:diagram22}},__vite__mapDeps([43,16,14,31,6,7,8,9,10]));return{id:id17,diagram:diagram2}},"loader"),plugin15={id:id17,detector:detector17,loader:loader17},journeyDetector_default=plugin15,draw=__name((_text,id32,version)=>{log.debug(`rendering svg for syntax error
298
+ `);const svg=selectSvgElement(id32),g2=svg.append("g");svg.attr("viewBox","0 0 2412 512"),configureSvgSize(svg,100,512,!0),g2.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"),g2.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"),g2.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"),g2.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"),g2.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"),g2.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"),g2.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"),g2.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${version}`)},"draw"),renderer={draw},errorRenderer_default=renderer,diagram={db:{},renderer,parser:{parse:__name(()=>{},"parse")}},errorDiagram_default=diagram,id18="flowchart-elk",detector18=__name((txt,config2={})=>{var _a17;return/^\s*flowchart-elk/.test(txt)||/^\s*(flowchart|graph)/.test(txt)&&((_a17=config2==null?void 0:config2.flowchart)==null?void 0:_a17.defaultRenderer)==="elk"?(config2.layout="elk",!0):!1},"detector"),loader18=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./flowDiagram-DWJPFMVM-yf315tJr.js");return{diagram:diagram22}},__vite__mapDeps([15,16,14,17,18,10,19,6,7,8,9]));return{id:id18,diagram:diagram2}},"loader"),plugin16={id:id18,detector:detector18,loader:loader18},detector_default=plugin16,id19="timeline",detector19=__name(txt=>/^\s*timeline/.test(txt),"detector"),loader19=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./timeline-definition-GMOUNBTQ-4kgeuumv.js");return{diagram:diagram22}},__vite__mapDeps([44,31,6,7,8,9,10]));return{id:id19,diagram:diagram2}},"loader"),plugin17={id:id19,detector:detector19,loader:loader19},detector_default2=plugin17,id20="mindmap",detector20=__name(txt=>/^\s*mindmap/.test(txt),"detector"),loader20=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./mindmap-definition-QFDTVHPH-CW0yNQcb.js");return{diagram:diagram22}},__vite__mapDeps([45,17,18,6,7,8,9,10]));return{id:id20,diagram:diagram2}},"loader"),plugin18={id:id20,detector:detector20,loader:loader20},detector_default3=plugin18,id21="kanban",detector21=__name(txt=>/^\s*kanban/.test(txt),"detector"),loader21=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./kanban-definition-6JOO6SKY-DTcNHYUS.js");return{diagram:diagram22}},__vite__mapDeps([46,16,6,7,8,9,10]));return{id:id21,diagram:diagram2}},"loader"),plugin19={id:id21,detector:detector21,loader:loader21},detector_default4=plugin19,id22="sankey",detector22=__name(txt=>/^\s*sankey(-beta)?/.test(txt),"detector"),loader22=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./sankeyDiagram-XADWPNL6-BMV0lAz8.js");return{diagram:diagram22}},__vite__mapDeps([47,32,27,6,7,8,9,10]));return{id:id22,diagram:diagram2}},"loader"),plugin20={id:id22,detector:detector22,loader:loader22},sankeyDetector_default=plugin20,id23="packet",detector23=__name(txt=>/^\s*packet(-beta)?/.test(txt),"detector"),loader23=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./diagram-TYMM5635-HfNcJIfT.js");return{diagram:diagram22}},__vite__mapDeps([48,22,24,6,7,8,9,4,2,10]));return{id:id23,diagram:diagram2}},"loader"),packet={id:id23,detector:detector23,loader:loader23},id24="radar",detector24=__name(txt=>/^\s*radar-beta/.test(txt),"detector"),loader24=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./diagram-MMDJMWI5-C-3cRdzG.js");return{diagram:diagram22}},__vite__mapDeps([49,22,24,6,7,8,9,4,2,10]));return{id:id24,diagram:diagram2}},"loader"),radar={id:id24,detector:detector24,loader:loader24},id25="block",detector25=__name(txt=>/^\s*block(-beta)?/.test(txt),"detector"),loader25=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./blockDiagram-DXYQGD6D-CoUm8UC5.js");return{diagram:diagram22}},__vite__mapDeps([50,16,5,1,2,19,6,7,8,9,10]));return{id:id25,diagram:diagram2}},"loader"),plugin21={id:id25,detector:detector25,loader:loader25},blockDetector_default=plugin21,id26="treeView",detector26=__name(txt=>/^\s*treeView-beta/.test(txt),"detector"),loader26=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./diagram-5BDNPKRD-v7FsHeLQ.js");return{diagram:diagram22}},__vite__mapDeps([51,22,23,24,6,7,8,9,4,2,10]));return{id:id26,diagram:diagram2}},"loader"),plugin22={id:id26,detector:detector26,loader:loader26},detector_default5=plugin22,id27="architecture",detector27=__name(txt=>/^\s*architecture/.test(txt),"detector"),loader27=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./architectureDiagram-Q4EWVU46-xy0J2lr0.js");return{diagram:diagram22}},__vite__mapDeps([52,22,24,6,7,8,9,4,2,12,10]));return{id:id27,diagram:diagram2}},"loader"),architecture={id:id27,detector:detector27,loader:loader27},architectureDetector_default=architecture,id28="ishikawa",detector28=__name(txt=>/^\s*ishikawa(-beta)?\b/i.test(txt),"detector"),loader28=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./ishikawaDiagram-UXIWVN3A-4y8aG54G.js");return{diagram:diagram22}},__vite__mapDeps([53,6,7,8,9,10]));return{id:id28,diagram:diagram2}},"loader"),ishikawa={id:id28,detector:detector28,loader:loader28},id29="venn",detector29=__name(txt=>/^\s*venn-beta/.test(txt),"detector"),loader29=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./vennDiagram-DHZGUBPP-CqBcUIdK.js");return{diagram:diagram22}},__vite__mapDeps([54,6,7,8,9,10]));return{id:id29,diagram:diagram2}},"loader"),plugin23={id:id29,detector:detector29,loader:loader29},vennDetector_default=plugin23,id30="treemap",detector30=__name(txt=>/^\s*treemap/.test(txt),"detector"),loader30=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./diagram-G4DWMVQ6-BhKNBlcE.js");return{diagram:diagram22}},__vite__mapDeps([55,18,22,24,6,7,8,9,4,2,28,32,27,10]));return{id:id30,diagram:diagram2}},"loader"),treemap={id:id30,detector:detector30,loader:loader30},id31="wardley-beta",detector31=__name(text2=>/^\s*wardley-beta/i.test(text2),"detector"),loader31=__name(async()=>{const{diagram:diagram2}=await __vitePreload(async()=>{const{diagram:diagram22}=await import("./wardleyDiagram-NUSXRM2D-BJrjkZMg.js");return{diagram:diagram22}},__vite__mapDeps([56,22,24,6,7,8,9,4,2,10]));return{id:id31,diagram:diagram2}},"loader"),plugin24={id:id31,detector:detector31,loader:loader31},wardleyDetector_default=plugin24,hasLoadedDiagrams=!1,addDiagrams=__name(()=>{hasLoadedDiagrams||(hasLoadedDiagrams=!0,registerDiagram("error",errorDiagram_default,text2=>text2.toLowerCase().trim()==="error"),registerDiagram("---",{db:{clear:__name(()=>{},"clear")},styles:{},renderer:{draw:__name(()=>{},"draw")},parser:{parse:__name(()=>{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:__name(()=>null,"init")},text2=>text2.toLowerCase().trimStart().startsWith("---")),registerLazyLoadedDiagrams(detector_default,detector_default3,architectureDetector_default),registerLazyLoadedDiagrams(c4Detector_default,detector_default4,classDetector_V2_default,classDetector_default,erDetector_default,ganttDetector_default,info,pie,requirementDetector_default,sequenceDetector_default,flowDetector_v2_default,flowDetector_default,detector_default2,gitGraphDetector_default,stateDetector_V2_default,stateDetector_default,journeyDetector_default,quadrantDetector_default,sankeyDetector_default,packet,xychartDetector_default,blockDetector_default,detector_default5,radar,ishikawa,treemap,vennDetector_default,wardleyDetector_default))},"addDiagrams"),loadRegisteredDiagrams=__name(async()=>{log.debug("Loading registered diagrams");const failed=(await Promise.allSettled(Object.entries(detectors).map(async([key,{detector:detector32,loader:loader32}])=>{if(loader32)try{getDiagram(key)}catch{try{const{diagram:diagram2,id:id32}=await loader32();registerDiagram(id32,diagram2,detector32)}catch(err){throw log.error(`Failed to load external diagram with key ${key}. Removing from detectors.`),delete detectors[key],err}}}))).filter(result=>result.status==="rejected");if(failed.length>0){log.error(`Failed to load ${failed.length} external diagrams`);for(const res of failed)log.error(res);throw new Error(`Failed to load ${failed.length} external diagrams`)}},"loadRegisteredDiagrams"),SVG_ROLE="graphics-document document";function setA11yDiagramInfo(svg,diagramType){svg.attr("role",SVG_ROLE),diagramType!==""&&svg.attr("aria-roledescription",diagramType)}__name(setA11yDiagramInfo,"setA11yDiagramInfo");function addSVGa11yTitleDescription(svg,a11yTitle,a11yDesc,baseId){if(svg.insert!==void 0){if(a11yDesc){const descId=`chart-desc-${baseId}`;svg.attr("aria-describedby",descId),svg.insert("desc",":first-child").attr("id",descId).text(a11yDesc)}if(a11yTitle){const titleId=`chart-title-${baseId}`;svg.attr("aria-labelledby",titleId),svg.insert("title",":first-child").attr("id",titleId).text(a11yTitle)}}}__name(addSVGa11yTitleDescription,"addSVGa11yTitleDescription");var _a16,Diagram=(_a16=class{constructor(type2,text2,db,parser,renderer2){this.type=type2,this.text=text2,this.db=db,this.parser=parser,this.renderer=renderer2}static async fromText(text2,metadata={}){var _a17,_b;const config2=getConfig(),type2=detectType$1(text2,config2);text2=encodeEntities(text2)+`
299
+ `;try{getDiagram(type2)}catch{const loader32=getDiagramLoader(type2);if(!loader32)throw new UnknownDiagramError(`Diagram ${type2} not found.`);const{id:id32,diagram:diagram2}=await loader32();registerDiagram(id32,diagram2)}const{db,parser,renderer:renderer2,init:init2}=getDiagram(type2);return parser.parser&&(parser.parser.yy=db),(_a17=db.clear)==null||_a17.call(db),init2==null||init2(config2),metadata.title&&((_b=db.setDiagramTitle)==null||_b.call(db,metadata.title)),await parser.parse(text2),new _a16(type2,text2,db,parser,renderer2)}async render(id32,version){await this.renderer.draw(this.text,id32,version,this)}getParser(){return this.parser}getType(){return this.type}},__name(_a16,"Diagram"),_a16),interactionFunctions=[],attachFunctions=__name(()=>{interactionFunctions.forEach(f2=>{f2()}),interactionFunctions=[]},"attachFunctions"),cleanupComments=__name(text2=>text2.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function extractFrontMatter(text2){const matches=text2.match(frontMatterRegex);if(!matches)return{text:text2,metadata:{}};let parsed=load(matches[1],{schema:JSON_SCHEMA})??{};parsed=typeof parsed=="object"&&!Array.isArray(parsed)?parsed:{};const metadata={};return parsed.displayMode&&(metadata.displayMode=parsed.displayMode.toString()),parsed.title&&(metadata.title=parsed.title.toString()),parsed.config&&(metadata.config=parsed.config),{text:text2.slice(matches[0].length),metadata}}__name(extractFrontMatter,"extractFrontMatter");var cleanupText=__name(code=>code.replace(/\r\n?/g,`
300
+ `).replace(/<(\w+)([^>]*)>/g,(match,tag,attributes)=>"<"+tag+attributes.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),processFrontmatter=__name(code=>{const{text:text2,metadata}=extractFrontMatter(code),{displayMode,title,config:config2={}}=metadata;return displayMode&&(config2.gantt||(config2.gantt={}),config2.gantt.displayMode=displayMode),{title,config:config2,text:text2}},"processFrontmatter"),processDirectives=__name(code=>{const initDirective=utils_default.detectInit(code)??{},wrapDirectives=utils_default.detectDirective(code,"wrap");return Array.isArray(wrapDirectives)?initDirective.wrap=wrapDirectives.some(({type:type2})=>type2==="wrap"):(wrapDirectives==null?void 0:wrapDirectives.type)==="wrap"&&(initDirective.wrap=!0),{text:removeDirectives(code),directive:initDirective}},"processDirectives");function preprocessDiagram(code){const cleanedCode=cleanupText(code),frontMatterResult=processFrontmatter(cleanedCode),directiveResult=processDirectives(frontMatterResult.text),config2=cleanAndMerge(frontMatterResult.config,directiveResult.directive);return code=cleanupComments(directiveResult.text),{code,title:frontMatterResult.title,config:config2}}__name(preprocessDiagram,"preprocessDiagram");function toBase64(str2){const utf8Bytes=new TextEncoder().encode(str2),utf8Str=Array.from(utf8Bytes,byte=>String.fromCodePoint(byte)).join("");return btoa(utf8Str)}__name(toBase64,"toBase64");var MAX_TEXTLENGTH=5e4,MAX_TEXTLENGTH_EXCEEDED_MSG="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",SECURITY_LVL_SANDBOX="sandbox",SECURITY_LVL_LOOSE="loose",XMLNS_SVG_STD="http://www.w3.org/2000/svg",XMLNS_XLINK_STD="http://www.w3.org/1999/xlink",XMLNS_XHTML_STD="http://www.w3.org/1999/xhtml",IFRAME_WIDTH="100%",IFRAME_HEIGHT="100%",IFRAME_STYLES="border:0;margin:0;",IFRAME_BODY_STYLE="margin:0",IFRAME_SANDBOX_OPTS="allow-top-navigation-by-user-activation allow-popups",IFRAME_NOT_SUPPORTED_MSG='The "iframe" tag is not supported by your browser.',DOMPURIFY_TAGS=["foreignobject"],DOMPURIFY_ATTR=["dominant-baseline"];function processAndSetConfigs(text2){const processed=preprocessDiagram(text2);return reset(),addDirective(processed.config??{}),processed}__name(processAndSetConfigs,"processAndSetConfigs");async function parse(text2,parseOptions){addDiagrams();try{const{code,config:config2}=processAndSetConfigs(text2);return{diagramType:(await getDiagramFromText(code)).type,config:config2}}catch(error){if(parseOptions!=null&&parseOptions.suppressErrors)return!1;throw error}}__name(parse,"parse");var cssImportantStyles=__name((cssClass,element,cssClasses=[])=>`
301
+ .${cssClass} ${element} { ${cssClasses.join(" !important; ")} !important; }`,"cssImportantStyles"),createCssStyles=__name((config2,classDefs=new Map)=>{let cssStyles="";if(config2.themeCSS!==void 0&&(cssStyles+=`
302
+ ${config2.themeCSS}`),config2.fontFamily!==void 0&&(cssStyles+=`
303
+ :root { --mermaid-font-family: ${config2.fontFamily}}`),config2.altFontFamily!==void 0&&(cssStyles+=`
304
+ :root { --mermaid-alt-font-family: ${config2.altFontFamily}}`),classDefs instanceof Map){const cssElements=getEffectiveHtmlLabels(config2)?["> *","span"]:["rect","polygon","ellipse","circle","path"];classDefs.forEach(styleClassDef=>{isEmpty(styleClassDef.styles)||cssElements.forEach(cssElement=>{cssStyles+=cssImportantStyles(styleClassDef.id,cssElement,styleClassDef.styles)}),isEmpty(styleClassDef.textStyles)||(cssStyles+=cssImportantStyles(styleClassDef.id,"tspan",((styleClassDef==null?void 0:styleClassDef.textStyles)||[]).map(s2=>s2.replace("color","fill"))))})}return cssStyles},"createCssStyles"),createUserStyles=__name((config2,graphType,classDefs,svgId)=>{const userCSSstyles=createCssStyles(config2,classDefs),allStyles=styles_default(graphType,userCSSstyles,{...config2.themeVariables,theme:config2.theme,look:config2.look},svgId);return serialize(compile(`${svgId}{${allStyles}}`),stringify)},"createUserStyles"),cleanUpSvgCode=__name((svgCode="",inSandboxMode,useArrowMarkerUrls)=>{let cleanedUpSvg=svgCode;return!useArrowMarkerUrls&&!inSandboxMode&&(cleanedUpSvg=cleanedUpSvg.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),cleanedUpSvg=decodeEntities(cleanedUpSvg),cleanedUpSvg=cleanedUpSvg.replace(/<br>/g,"<br/>"),cleanedUpSvg},"cleanUpSvgCode"),putIntoIFrame=__name((svgCode="",svgElement)=>{var _a17,_b;const height=(_b=(_a17=svgElement==null?void 0:svgElement.viewBox)==null?void 0:_a17.baseVal)!=null&&_b.height?svgElement.viewBox.baseVal.height+"px":IFRAME_HEIGHT,base64encodedSrc=toBase64(`<body style="${IFRAME_BODY_STYLE}">${svgCode}</body>`);return`<iframe style="width:${IFRAME_WIDTH};height:${height};${IFRAME_STYLES}" src="data:text/html;charset=UTF-8;base64,${base64encodedSrc}" sandbox="${IFRAME_SANDBOX_OPTS}">
305
+ ${IFRAME_NOT_SUPPORTED_MSG}
306
+ </iframe>`},"putIntoIFrame"),appendDivSvgG=__name((parentRoot,id32,enclosingDivId,divStyle,svgXlink)=>{const enclosingDiv=parentRoot.append("div");enclosingDiv.attr("id",enclosingDivId),divStyle&&enclosingDiv.attr("style",divStyle);const svgNode2=enclosingDiv.append("svg").attr("id",id32).attr("width","100%").attr("xmlns",XMLNS_SVG_STD);return svgXlink&&svgNode2.attr("xmlns:xlink",svgXlink),svgNode2.append("g"),parentRoot},"appendDivSvgG");function sandboxedIframe(parentNode,iFrameId){return parentNode.append("iframe").attr("id",iFrameId).attr("style","width: 100%; height: 100%;").attr("sandbox","")}__name(sandboxedIframe,"sandboxedIframe");var removeExistingElements=__name((doc,id32,divId,iFrameId)=>{var _a17,_b,_c;(_a17=doc.getElementById(id32))==null||_a17.remove(),(_b=doc.getElementById(divId))==null||_b.remove(),(_c=doc.getElementById(iFrameId))==null||_c.remove()},"removeExistingElements"),render=__name(async function(id32,text2,svgContainingElement){var _a17,_b,_c,_d,_e2,_f;addDiagrams();const processed=processAndSetConfigs(text2);text2=processed.code;const config2=getConfig();log.debug(config2),text2.length>((config2==null?void 0:config2.maxTextSize)??MAX_TEXTLENGTH)&&(text2=MAX_TEXTLENGTH_EXCEEDED_MSG);const idSelector="#"+id32,iFrameID="i"+id32,iFrameID_selector="#"+iFrameID,enclosingDivID="d"+id32,enclosingDivID_selector="#"+enclosingDivID,removeTempElements=__name(()=>{const node=select(isSandboxed?iFrameID_selector:enclosingDivID_selector).node();node&&"remove"in node&&node.remove()},"removeTempElements");let root2=select("body");const isSandboxed=config2.securityLevel===SECURITY_LVL_SANDBOX,isLooseSecurityLevel=config2.securityLevel===SECURITY_LVL_LOOSE,fontFamily=config2.fontFamily;if(svgContainingElement!==void 0){if(svgContainingElement&&(svgContainingElement.innerHTML=""),isSandboxed){const iframe=sandboxedIframe(select(svgContainingElement),iFrameID);root2=select(iframe.nodes()[0].contentDocument.body),root2.node().style.margin=0}else root2=select(svgContainingElement);appendDivSvgG(root2,id32,enclosingDivID,`font-family: ${fontFamily}`,XMLNS_XLINK_STD)}else{if(removeExistingElements(document,id32,enclosingDivID,iFrameID),isSandboxed){const iframe=sandboxedIframe(select("body"),iFrameID);root2=select(iframe.nodes()[0].contentDocument.body),root2.node().style.margin=0}else root2=select("body");appendDivSvgG(root2,id32,enclosingDivID)}let diag,parseEncounteredException;try{diag=await Diagram.fromText(text2,{title:processed.title})}catch(error){if(config2.suppressErrorRendering)throw removeTempElements(),error;diag=await Diagram.fromText("error"),parseEncounteredException=error}const element=root2.select(enclosingDivID_selector).node(),diagramType=diag.type,svg=element.firstChild,firstChild=svg.firstChild,diagramClassDefs=(_b=(_a17=diag.renderer).getClasses)==null?void 0:_b.call(_a17,text2,diag),rules=createUserStyles(config2,diagramType,diagramClassDefs,idSelector),style1=document.createElement("style");style1.innerHTML=rules,svg.insertBefore(style1,firstChild);try{await diag.renderer.draw(text2,id32,"11.14.0",diag)}catch(e2){throw config2.suppressErrorRendering?removeTempElements():errorRenderer_default.draw(text2,id32,"11.14.0"),e2}const svgNode2=root2.select(`${enclosingDivID_selector} svg`),a11yTitle=(_d=(_c=diag.db).getAccTitle)==null?void 0:_d.call(_c),a11yDescr=(_f=(_e2=diag.db).getAccDescription)==null?void 0:_f.call(_e2);addA11yInfo(diagramType,svgNode2,a11yTitle,a11yDescr),root2.select(`[id="${id32}"]`).selectAll("foreignobject > *").attr("xmlns",XMLNS_XHTML_STD);let svgCode=root2.select(enclosingDivID_selector).node().innerHTML;if(log.debug("config.arrowMarkerAbsolute",config2.arrowMarkerAbsolute),svgCode=cleanUpSvgCode(svgCode,isSandboxed,evaluate(config2.arrowMarkerAbsolute)),isSandboxed){const svgEl=root2.select(enclosingDivID_selector+" svg").node();svgCode=putIntoIFrame(svgCode,svgEl)}else isLooseSecurityLevel||(svgCode=purify.sanitize(svgCode,{ADD_TAGS:DOMPURIFY_TAGS,ADD_ATTR:DOMPURIFY_ATTR,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(attachFunctions(),parseEncounteredException)throw parseEncounteredException;return removeTempElements(),{diagramType,svg:svgCode,bindFunctions:diag.db.bindFunctions}},"render");function initialize(userOptions={}){var _a17;const options=assignWithDepth_default({},userOptions);options!=null&&options.fontFamily&&!((_a17=options.themeVariables)!=null&&_a17.fontFamily)&&(options.themeVariables||(options.themeVariables={}),options.themeVariables.fontFamily=options.fontFamily),saveConfigFromInitialize(options),options!=null&&options.theme&&options.theme in themes_default?options.themeVariables=themes_default[options.theme].getThemeVariables(options.themeVariables):options&&(options.themeVariables=themes_default.default.getThemeVariables(options.themeVariables));const config2=typeof options=="object"?setSiteConfig(options):getSiteConfig();setLogLevel(config2.logLevel),addDiagrams()}__name(initialize,"initialize");var getDiagramFromText=__name((text2,metadata={})=>{const{code}=preprocessDiagram(text2);return Diagram.fromText(code,metadata)},"getDiagramFromText");function addA11yInfo(diagramType,svgNode2,a11yTitle,a11yDescr){setA11yDiagramInfo(svgNode2,diagramType),addSVGa11yTitleDescription(svgNode2,a11yTitle,a11yDescr,svgNode2.attr("id"))}__name(addA11yInfo,"addA11yInfo");var mermaidAPI=Object.freeze({render,parse,getDiagramFromText,initialize,getConfig,setConfig,getSiteConfig,updateSiteConfig,reset:__name(()=>{reset()},"reset"),globalReset:__name(()=>{reset(defaultConfig)},"globalReset"),defaultConfig});setLogLevel(getConfig().logLevel);reset(getConfig());var handleError=__name((error,errors,parseError)=>{log.warn(error),isDetailedError(error)?(parseError&&parseError(error.str,error.hash),errors.push({...error,message:error.str,error})):(parseError&&parseError(error),error instanceof Error&&errors.push({str:error.message,message:error.message,hash:error.name,error}))},"handleError"),run=__name(async function(options={querySelector:".mermaid"}){try{await runThrowsErrors(options)}catch(e2){if(isDetailedError(e2)&&log.error(e2.str),mermaid.parseError&&mermaid.parseError(e2),!options.suppressErrors)throw log.error("Use the suppressErrors option to suppress these errors"),e2}},"run"),runThrowsErrors=__name(async function({postRenderCallback,querySelector,nodes}={querySelector:".mermaid"}){const conf=mermaidAPI.getConfig();log.debug(`${postRenderCallback?"":"No "}Callback function found`);let nodesToProcess;if(nodes)nodesToProcess=nodes;else if(querySelector)nodesToProcess=document.querySelectorAll(querySelector);else throw new Error("Nodes and querySelector are both undefined");log.debug(`Found ${nodesToProcess.length} diagrams`),(conf==null?void 0:conf.startOnLoad)!==void 0&&(log.debug("Start On Load: "+(conf==null?void 0:conf.startOnLoad)),mermaidAPI.updateSiteConfig({startOnLoad:conf==null?void 0:conf.startOnLoad}));const idGenerator=new utils_default.InitIDGenerator(conf.deterministicIds,conf.deterministicIDSeed);let txt;const errors=[];for(const element of Array.from(nodesToProcess)){if(log.info("Rendering diagram: "+element.id),element.getAttribute("data-processed"))continue;element.setAttribute("data-processed","true");const id32=`mermaid-${idGenerator.next()}`;txt=element.innerHTML,txt=dedent(utils_default.entityDecode(txt)).trim().replace(/<br\s*\/?>/gi,"<br/>");const init2=utils_default.detectInit(txt);init2&&log.debug("Detected early reinit: ",init2);try{const{svg,bindFunctions}=await render2(id32,txt,element);element.innerHTML=svg,postRenderCallback&&await postRenderCallback(id32),bindFunctions&&bindFunctions(element)}catch(error){handleError(error,errors,mermaid.parseError)}}if(errors.length>0)throw errors[0]},"runThrowsErrors"),initialize2=__name(function(config2){mermaidAPI.initialize(config2)},"initialize"),init=__name(async function(config2,nodes,callback){log.warn("mermaid.init is deprecated. Please use run instead."),config2&&initialize2(config2);const runOptions={postRenderCallback:callback,querySelector:".mermaid"};typeof nodes=="string"?runOptions.querySelector=nodes:nodes&&(nodes instanceof HTMLElement?runOptions.nodes=[nodes]:runOptions.nodes=nodes),await run(runOptions)},"init"),registerExternalDiagrams=__name(async(diagrams2,{lazyLoad=!0}={})=>{addDiagrams(),registerLazyLoadedDiagrams(...diagrams2),lazyLoad===!1&&await loadRegisteredDiagrams()},"registerExternalDiagrams"),contentLoaded=__name(function(){if(mermaid.startOnLoad){const{startOnLoad}=mermaidAPI.getConfig();startOnLoad&&mermaid.run().catch(err=>log.error("Mermaid failed to initialize",err))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",contentLoaded,!1);var setParseErrorHandler=__name(function(parseErrorHandler){mermaid.parseError=parseErrorHandler},"setParseErrorHandler"),executionQueue=[],executionQueueRunning=!1,executeQueue=__name(async()=>{if(!executionQueueRunning){for(executionQueueRunning=!0;executionQueue.length>0;){const f2=executionQueue.shift();if(f2)try{await f2()}catch(e2){log.error("Error executing queue",e2)}}executionQueueRunning=!1}},"executeQueue"),parse2=__name(async(text2,parseOptions)=>new Promise((resolve,reject)=>{const performCall=__name(()=>new Promise((res,rej)=>{mermaidAPI.parse(text2,parseOptions).then(r2=>{res(r2),resolve(r2)},e2=>{var _a17;log.error("Error parsing",e2),(_a17=mermaid.parseError)==null||_a17.call(mermaid,e2),rej(e2),reject(e2)})}),"performCall");executionQueue.push(performCall),executeQueue().catch(reject)}),"parse"),render2=__name((id32,text2,container)=>new Promise((resolve,reject)=>{const performCall=__name(()=>new Promise((res,rej)=>{mermaidAPI.render(id32,text2,container).then(r2=>{res(r2),resolve(r2)},e2=>{var _a17;log.error("Error parsing",e2),(_a17=mermaid.parseError)==null||_a17.call(mermaid,e2),rej(e2),reject(e2)})}),"performCall");executionQueue.push(performCall),executeQueue().catch(reject)}),"render"),getRegisteredDiagramsMetadata=__name(()=>Object.keys(detectors).map(id32=>({id:id32})),"getRegisteredDiagramsMetadata"),mermaid={startOnLoad:!0,mermaidAPI,parse:parse2,render:render2,init,run,registerExternalDiagrams,registerLayoutLoaders,initialize:initialize2,parseError:void 0,contentLoaded,setParseErrorHandler,detectType:detectType$1,registerIconPacks,getRegisteredDiagramsMetadata},mermaid_default=mermaid;/*! Check if previously processed *//*!
307
+ * Wait for document loaded before starting the execution
308
+ */const mermaid_core=Object.freeze(Object.defineProperty({__proto__:null,default:mermaid_default},Symbol.toStringTag,{value:"Module"}));export{withPath as $,rgba$1 as A,__export as B,getConfig as C,setupGraphViewbox2 as D,cleanAndMerge as E,defaultConfig_default as F,random as G,selectSvgElement as H,getThemeVariables3 as I,JSON_SCHEMA as J,hasKatex as K,calculateMathMLDimensions as L,parseFontSize as M,getUrl as N,renderKatexSanitized as O,parseGenericTypes as P,line as Q,curveBasis as R,generateId as S,lineBreakRegex as T,isDark as U,lighten as V,darken as W,setupGraphViewbox as X,commonDb_exports as Y,ZERO_WIDTH_SPACE as Z,__name as _,getAccTitle as a,copyArray as a$,pi as a0,cos as a1,sin as a2,constant$1 as a3,halfPi as a4,epsilon as a5,tau as a6,sqrt as a7,min as a8,abs as a9,insertEdgeLabel as aA,computeDimensionOfText as aB,adjustChannel as aC,array as aD,getUserDefinedConfig as aE,isArrayLike as aF,isArray as aG,identity as aH,getIconSVG as aI,registerIconPacks as aJ,unknownIcon as aK,constant$2 as aL,interpolateNumber as aM,color as aN,interpolateRgb as aO,interpolateString as aP,copyObject as aQ,keysIn as aR,getPrototype as aS,cloneArrayBuffer as aT,Symbol$1 as aU,cloneTypedArray as aV,isObjectLike as aW,getTag as aX,baseUnary as aY,nodeUtil as aZ,isObject as a_,atan2 as aa,max as ab,asin as ac,acos as ad,insertCluster as ae,insertNode as af,positionNode as ag,getLineFunctionsWithOffset as ah,getEffectiveHtmlLabels as ai,createText as aj,computeLabelTransform as ak,getSubGraphTitleMargins as al,getStylesFromArray as am,decodeEntities as an,configureLabelImages as ao,Utils as ap,Color$1 as aq,at as ar,markers_default as as,clear2 as at,clear as au,clear$1 as av,updateNodeBounds as aw,setNodeElem as ax,insertEdge as ay,positionEdgeLabel as az,setAccTitle as b,isBuffer as b0,cloneBuffer as b1,initCloneObject as b2,Stack as b3,assignValue as b4,baseRest as b5,isArrayLikeObject as b6,constant as b7,isFunction as b8,isEmpty as b9,merge as bA,mermaid_core as bB,styles2String as ba,isLabelStyle as bb,Rgb as bc,rgbConvert as bd,define as be,extend$1 as bf,Color as bg,nogamma as bh,hue as bi,baseGetTag as bj,arrayLikeKeys as bk,baseKeys as bl,memoize as bm,isArguments as bn,MapCache as bo,eq as bp,Uint8Array$1 as bq,isTypedArray as br,isLength as bs,isIndex as bt,baseFor as bu,Set$1 as bv,setToString as bw,overRest as bx,isIterateeCall as by,baseAssignValue as bz,getConfig2 as c,select as d,configureSvgSize as e,assignWithDepth_default as f,getAccDescription as g,calculateTextWidth as h,sanitizeText as i,distExports as j,common_default as k,log as l,calculateTextHeight as m,setConfig2 as n,getRegisteredLayoutAlgorithm as o,setDiagramTitle as p,getDiagramTitle as q,render$1 as r,setAccDescription as s,load as t,utils_default as u,isValidShape as v,wrapLabel as w,getEdgeId as x,clear$2 as y,defaultConfig2 as z};