promptfoo 0.121.3 → 0.121.4

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 (378) hide show
  1. package/README.md +1 -1
  2. package/dist/src/{ListApp-Du7YVwj5.js → ListApp-DQkFNqE9.js} +1 -1
  3. package/dist/src/{accounts-Xatc0RYb.js → accounts-DdJ2pHMI.js} +5 -5
  4. package/dist/src/{accounts-B2XmGjty.js → accounts-DhMYUUbu.js} +5 -5
  5. package/dist/src/{accounts-BPyfpSeU.cjs → accounts-Dy17bs4D.cjs} +5 -5
  6. package/dist/src/{accounts-CFLK3mnD.js → accounts-F9d_5sMC.js} +6 -6
  7. package/dist/src/{agentic-utils-DAVsChuB.cjs → agentic-utils-BpX5b23w.cjs} +3 -3
  8. package/dist/src/{agentic-utils-DIYAAYE7.js → agentic-utils-P172hM8B.js} +3 -3
  9. package/dist/src/{agentic-utils-D8yXo5Lm.js → agentic-utils-qFlm6zes.js} +4 -4
  10. package/dist/src/{agentic-utils-36epdqwB.js → agentic-utils-w68v6_Dz.js} +3 -3
  11. package/dist/src/{agents-CLQ-P15P.js → agents-8FDnTriG.js} +6 -7
  12. package/dist/src/{agents-CAYbM7qD.cjs → agents-BahDpe5G.cjs} +34 -12
  13. package/dist/src/{agents-DSSTV4bv.js → agents-C-R_jfzI.js} +35 -13
  14. package/dist/src/{agents-wg3ohknq.js → agents-CgaMXvLM.js} +5 -7
  15. package/dist/src/{agents-BBWxKSM0.cjs → agents-D7-HGxUj.cjs} +5 -7
  16. package/dist/src/{agents-BBVJCIYr.js → agents-DJ35I3Nt.js} +35 -13
  17. package/dist/src/{agents-CgBniSlI.js → agents-aYPQLf8W.js} +5 -9
  18. package/dist/src/{agents-Bqgfdokm.js → agents-pQeBEXMm.js} +35 -14
  19. package/dist/src/{aimlapi-BwGC1TtS.js → aimlapi-BCq3MHeL.js} +8 -14
  20. package/dist/src/{aimlapi-MgSLdvy7.js → aimlapi-BD6J9oKt.js} +7 -14
  21. package/dist/src/{aimlapi-Bv8Fmc-b.cjs → aimlapi-qcK4OT55.cjs} +8 -15
  22. package/dist/src/{aimlapi-DaC3qZ-o.js → aimlapi-sgYnkE54.js} +7 -16
  23. package/dist/src/app/app/tsconfig.app.tsbuildinfo +1 -0
  24. package/dist/src/app/assets/Report-CQYFezYu.js +1 -0
  25. package/dist/src/app/assets/index-BXGkeMwh.css +1 -0
  26. package/dist/src/app/assets/index-BzJt18Jz.js +385 -0
  27. package/dist/src/app/assets/rolldown-runtime-COnpUsM8.js +1 -0
  28. package/dist/src/app/assets/scroll-timeline-D9IT_e8Z.js +1 -0
  29. package/dist/src/app/assets/sync-IjzpWrOE.js +4 -0
  30. package/dist/src/app/assets/vendor-charts-BNdH8TCw.js +36 -0
  31. package/dist/src/app/assets/vendor-markdown-Ch00wnNI.js +29 -0
  32. package/dist/src/app/assets/vendor-react-CVvmk1UB.js +9 -0
  33. package/dist/src/app/assets/vendor-utils-BnEYbx2Q.js +37 -0
  34. package/dist/src/app/index.html +7 -7
  35. package/dist/src/{audio-DjU9GswO.js → audio-B7izf48x.js} +4 -5
  36. package/dist/src/{audio-DVFjQ67_.cjs → audio-BQtNuYBj.cjs} +4 -4
  37. package/dist/src/{audio-Bn44pQxv.js → audio-COrn8rM6.js} +4 -4
  38. package/dist/src/{audio-DDA5WHdx.js → audio-DcVKoInv.js} +4 -4
  39. package/dist/src/{base-BboXIF_0.cjs → base-D-670DX8.cjs} +3 -3
  40. package/dist/src/{base-CqzQ4K8j.js → base-PYJvBE1i.js} +3 -3
  41. package/dist/src/{base-CKjwebIH.js → base-fZ9wgg50.js} +3 -3
  42. package/dist/src/{base-Cz2ZC_iA.js → base-yrI1Yal4.js} +3 -3
  43. package/dist/src/{blobs-BUWmKWzo.js → blobs-BCZavS8s.js} +4 -4
  44. package/dist/src/{blobs-B1JriOyi.js → blobs-BQWqnnvL.js} +4 -4
  45. package/dist/src/{blobs-DXTl6J3H.js → blobs-C-F78Kfn.js} +3 -3
  46. package/dist/src/{blobs-C6j0bvFz.cjs → blobs-D2FAd1Q5.cjs} +3 -3
  47. package/dist/src/cache-BIyPcp5v.cjs +376 -0
  48. package/dist/src/cache-C4Xb-hNb.js +310 -0
  49. package/dist/src/cache-Cr9oLMUa.js +3 -0
  50. package/dist/src/cache-D5NZmMiT.js +310 -0
  51. package/dist/src/cache-DbLsVWB2.cjs +3 -0
  52. package/dist/src/cache-mb7c8hbp.js +280 -0
  53. package/dist/src/{chat-DK1U-eZ-.js → chat-0bwXjVP0.js} +3 -13
  54. package/dist/src/{chat-BtIKkLKx.cjs → chat-BPXSW8Bv.cjs} +3 -13
  55. package/dist/src/{chat-B0iaWhoh.js → chat-BfPaS15_.js} +63 -37
  56. package/dist/src/{chat-CM8qWR3_.cjs → chat-CclRbxGf.cjs} +63 -37
  57. package/dist/src/{chat-BEwdgGEg.js → chat-Dr3DUQ0D.js} +63 -37
  58. package/dist/src/{chat-pxmiVpWe.js → chat-I9izLm49.js} +62 -36
  59. package/dist/src/{chat-B-52XYI1.js → chat-MKxMnZJZ.js} +3 -13
  60. package/dist/src/{chat-BE0qTA8e.js → chat-mW0ORo8G.js} +3 -14
  61. package/dist/src/{chatkit-Cx174XI3.cjs → chatkit-BoWoSgXl.cjs} +4 -4
  62. package/dist/src/{chatkit-BYGQlHlV.js → chatkit-CJnHRRMM.js} +4 -4
  63. package/dist/src/{chatkit-a2D6mY6s.js → chatkit-Cv6AhukM.js} +4 -4
  64. package/dist/src/{chatkit-_8eJqKcD.js → chatkit-zUIVoDos.js} +4 -4
  65. package/dist/src/{claude-agent-sdk-CMjh4LFH.js → claude-agent-sdk-BQNuLaAK.js} +19 -14
  66. package/dist/src/{claude-agent-sdk-8ddRp1L2.cjs → claude-agent-sdk-CPJo3dBQ.cjs} +21 -16
  67. package/dist/src/{claude-agent-sdk-HgbFioFw.js → claude-agent-sdk-Dtq_L-Sc.js} +20 -15
  68. package/dist/src/{claude-agent-sdk-Bq5EArsX.js → claude-agent-sdk-nfAIcxNf.js} +21 -17
  69. package/dist/src/{cloud-z8KZpUoa.js → cloud-DQZ5sVjW.js} +25 -13
  70. package/dist/src/cloud-Hphvo8kr.js +3 -0
  71. package/dist/src/{cloudflare-ai-Bbp26N0L.js → cloudflare-ai-BIB567w6.js} +5 -14
  72. package/dist/src/{cloudflare-ai-BGyXlpXJ.js → cloudflare-ai-DGLte7Py.js} +5 -14
  73. package/dist/src/{cloudflare-ai-C62x6MQG.cjs → cloudflare-ai-Dl3N9OVD.cjs} +6 -15
  74. package/dist/src/{cloudflare-ai-DdKP9TKT.js → cloudflare-ai-DlKr0rY7.js} +5 -15
  75. package/dist/src/{cloudflare-gateway-D-e9i1Sn.js → cloudflare-gateway-BDZrYydE.js} +4 -16
  76. package/dist/src/{cloudflare-gateway-Dx36ftqF.cjs → cloudflare-gateway-BYDp495F.cjs} +4 -15
  77. package/dist/src/{cloudflare-gateway-DXhtXDRb.js → cloudflare-gateway-CiIZHU0Q.js} +4 -15
  78. package/dist/src/{cloudflare-gateway-BwAaUgeW.js → cloudflare-gateway-DI1HNP5F.js} +4 -15
  79. package/dist/src/codex-sdk-BAmYE7qy.js +3 -0
  80. package/dist/src/codex-sdk-C2_M2pl_.cjs +1172 -0
  81. package/dist/src/codex-sdk-CErXn7qh.js +1165 -0
  82. package/dist/src/codex-sdk-CWEnH70W.cjs +2 -0
  83. package/dist/src/codex-sdk-CpqiOqDO.js +1164 -0
  84. package/dist/src/codex-sdk-Rtky3M4I.js +1165 -0
  85. package/dist/src/{cometapi-BDyV-NNm.js → cometapi-BUlt_ELa.js} +8 -15
  86. package/dist/src/{cometapi-hhL4TAh3.js → cometapi-CtJ-mS8R.js} +9 -15
  87. package/dist/src/{cometapi-sp7sJpBD.js → cometapi-DT-jlVCB.js} +8 -17
  88. package/dist/src/{cometapi-C3hOlM7-.cjs → cometapi-UVOryo4W.cjs} +9 -16
  89. package/dist/src/{completion-DlXUhj5c.cjs → completion-BozdoXba.cjs} +7 -62
  90. package/dist/src/{completion-BCimtq-h.js → completion-Dnxn7E-j.js} +8 -57
  91. package/dist/src/{completion-DCjv7RZ3.js → completion-HUe8wDhZ.js} +8 -57
  92. package/dist/src/{completion-DoYy49ti.js → completion-x0a_c2y1.js} +8 -57
  93. package/dist/src/{createHash-CTQmL3G2.js → createHash-4gFQpDDv.js} +3 -3
  94. package/dist/src/{createHash-BYwImsYv.cjs → createHash-B7KvgoOD.cjs} +4 -4
  95. package/dist/src/{createHash-Da8fMwqB.js → createHash-ChI45QR1.js} +3 -3
  96. package/dist/src/{createHash-DmPQkvBh.js → createHash-CwDVU5xr.js} +3 -3
  97. package/dist/src/{docker-FeBni2dw.js → docker-CQmlA2NU.js} +7 -14
  98. package/dist/src/{docker-CxCkwMzc.js → docker-ClnmCf1Z.js} +6 -14
  99. package/dist/src/{docker-DpguQj-w.js → docker-DCgsveLD.js} +6 -16
  100. package/dist/src/{docker-Cqj2-QVi.cjs → docker-DS4_Osau.cjs} +7 -15
  101. package/dist/src/embedding-D3xTseo7.js +59 -0
  102. package/dist/src/embedding-DD9wa3ae.js +58 -0
  103. package/dist/src/embedding-I45KG3o7.cjs +63 -0
  104. package/dist/src/embedding-nFbumxcv.js +58 -0
  105. package/dist/src/entrypoint.js +69 -6
  106. package/dist/src/{errors-P6ll7XSJ.js → errors-Cw810C93.js} +1 -1
  107. package/dist/src/{esm-SUNIX1x3.js → esm-C7PnfdF8.js} +15 -6
  108. package/dist/src/{esm-CipptfDu.cjs → esm-CtEPLdAj.cjs} +15 -6
  109. package/dist/src/{esm-CKWP3u_P.js → esm-Dh4dOLlt.js} +16 -7
  110. package/dist/src/{esm-7UIl0pPM.js → esm-tVgYPY-f.js} +27 -18
  111. package/dist/src/eval-CzJFfFO9.js +3 -0
  112. package/dist/src/{eval-BTqTn7lb.js → eval-u4UVafl6.js} +49 -20
  113. package/dist/src/{evalResult-BkIhRdTe.js → evalResult-Bgm9ZH31.js} +7 -7
  114. package/dist/src/{evalResult-DUDShQrm.js → evalResult-D3hVYFis.js} +7 -7
  115. package/dist/src/evalResult-D8MT9p0s.js +3 -0
  116. package/dist/src/evalResult-DElBuddX.js +2 -0
  117. package/dist/src/evalResult-Dvc-iucu.cjs +2 -0
  118. package/dist/src/{evalResult-DpARzUCb.cjs → evalResult-KZqXl4XP.cjs} +7 -7
  119. package/dist/src/evaluator-CVessDWe.js +3 -0
  120. package/dist/src/{evaluator-BcvOGaam.js → evaluator-IvuDYSvQ.js} +3178 -2102
  121. package/dist/src/{extractor-C8XwivI9.js → extractor-CAfTSraf.js} +6 -6
  122. package/dist/src/{extractor-CAZ2G3Kh.js → extractor-DNSeBVOJ.js} +6 -6
  123. package/dist/src/{extractor-D_wd8jxt.js → extractor-Dk6bRWkv.js} +6 -6
  124. package/dist/src/{extractor-DG3sSfXE.cjs → extractor-WVPOrH43.cjs} +6 -6
  125. package/dist/src/{fetch-BiYv2BZc.js → fetch-B0Z3Oe4k.js} +218 -55
  126. package/dist/src/{fetch-DoVRJZhJ.js → fetch-BEWnXrrG.js} +195 -45
  127. package/dist/src/fetch-C7bGKDlQ.js +3 -0
  128. package/dist/src/{fetch-BnR9wSnm.cjs → fetch-CJU5ELPa.cjs} +223 -48
  129. package/dist/src/{fetch-CVAtKnI3.js → fetch-Di00EQrc.js} +218 -55
  130. package/dist/src/{fileExtensions-Ds-foDzt.js → fileExtensions-AWa2ZML4.js} +1 -1
  131. package/dist/src/{fileExtensions-LcDYkU4v.js → fileExtensions-BArZuxsI.js} +1 -1
  132. package/dist/src/{formatDuration-DgBVMN65.js → formatDuration-DZzPsexs.js} +1 -1
  133. package/dist/src/{genaiTracer-70Z8BIuV.js → genaiTracer-COYDi-tC.js} +6 -2
  134. package/dist/src/{genaiTracer-C1rxGO8Q.js → genaiTracer-DWdZ28hY.js} +6 -2
  135. package/dist/src/{genaiTracer-D3fD9dNV.js → genaiTracer-XnrcgDCe.js} +6 -2
  136. package/dist/src/{genaiTracer-BfxrvSUb.cjs → genaiTracer-yRuxj9-L.cjs} +7 -3
  137. package/dist/src/golang/wrapper.go +1 -1
  138. package/dist/src/{graders-BElhu9ZY.cjs → graders--zknU_uk.cjs} +3772 -1302
  139. package/dist/src/graders-BOAzQEUe.cjs +2 -0
  140. package/dist/src/graders-D4BTsZdG2.js +3 -0
  141. package/dist/src/graders-DOJK1XpV.js +2 -0
  142. package/dist/src/graders-NAv9LcBn.js +2 -0
  143. package/dist/src/{graders-DG7mhg-b.js → graders-Zy3x0zqX.js} +5691 -3247
  144. package/dist/src/{graders-RjHF8VfG.js → graders-eIHhRqoC.js} +5683 -3239
  145. package/dist/src/{graders-BXAJ0sbS.js → graders-pvbReLLn.js} +5692 -3248
  146. package/dist/src/{image-6WQXK8m8.js → image-9302QVqR.js} +4 -4
  147. package/dist/src/{image-B8b6f36E.js → image-B5Mv-Z3h.js} +8 -8
  148. package/dist/src/{image-PoF6DN3x.js → image-DVz2RiMF.js} +8 -8
  149. package/dist/src/{image-fza3zuKs.cjs → image-De2FBmYV.cjs} +4 -4
  150. package/dist/src/{image-DO0RYnjH.js → image-dnoUgPrC.js} +4 -5
  151. package/dist/src/{image-CoxZp9PZ.js → image-qUpPvmNZ.js} +8 -8
  152. package/dist/src/{image-xNbw5ph2.js → image-u7-rKnYU.js} +4 -4
  153. package/dist/src/{image--F58eEIn.cjs → image-x6KqLQl4.cjs} +8 -8
  154. package/dist/src/index.cjs +3641 -2144
  155. package/dist/src/index.d.cts +2660 -20
  156. package/dist/src/index.d.ts +2660 -20
  157. package/dist/src/index.js +3649 -2152
  158. package/dist/src/{interactiveCheck-BnMYOjMu.js → interactiveCheck-CLERUB0c.js} +2 -2
  159. package/dist/src/{knowledgeBase-DqrLX8fy.cjs → knowledgeBase-Bpoe_nLu.cjs} +6 -8
  160. package/dist/src/{knowledgeBase-Bi7CmDbx.js → knowledgeBase-Dgc7CBWF.js} +6 -8
  161. package/dist/src/{knowledgeBase-DFRXPZl_.js → knowledgeBase-RhFPGWDc.js} +6 -8
  162. package/dist/src/{knowledgeBase-Ce3ofVan.js → knowledgeBase-lm9RXSAm.js} +6 -9
  163. package/dist/src/{litellm-CKiAxnoM.js → litellm-C2kqjxqp.js} +6 -14
  164. package/dist/src/{litellm-CnHI69aj.cjs → litellm-CoyI4IAl.cjs} +6 -15
  165. package/dist/src/{litellm-Tc294Jhj.js → litellm-DRjpcSa7.js} +5 -14
  166. package/dist/src/{litellm-Bo2gQXpo.js → litellm-p37R1dzQ.js} +5 -16
  167. package/dist/src/{logger-BnkjG2jt.js → logger-B88EkIn6.js} +40 -11
  168. package/dist/src/{logger-D5iKBpu_.cjs → logger-COuQb2xB.cjs} +51 -10
  169. package/dist/src/{logger-DO8_zM18.js → logger-Ct2S6Yx-.js} +40 -11
  170. package/dist/src/{logger-BcJBzSSA.js → logger-DksKw1Qc.js} +40 -11
  171. package/dist/src/{luma-ray-C9q8rdQe.js → luma-ray-B863CmuZ.js} +6 -10
  172. package/dist/src/{luma-ray-DP0QA9qn.js → luma-ray-BTTLtqQ8.js} +7 -10
  173. package/dist/src/{luma-ray-m9Ku2meV.cjs → luma-ray-BxVKaW2a.cjs} +6 -10
  174. package/dist/src/{luma-ray-0ehMPt5N.js → luma-ray-KgTCXrZC.js} +6 -12
  175. package/dist/src/main.d.ts +1 -26
  176. package/dist/src/main.js +985 -520
  177. package/dist/src/{messages-HJsyEh4o.cjs → messages-811uVVW5.cjs} +69 -19
  178. package/dist/src/{messages-Dy9QecMs.js → messages-BTQz42fn.js} +69 -19
  179. package/dist/src/{messages-biC_ex-p.js → messages-MYTQ2TWp.js} +69 -19
  180. package/dist/src/{messages-DJNo37Ko.js → messages-zWbkLLHz.js} +69 -19
  181. package/dist/src/{meteor-D-SotUw9.js → meteor-CU5UAE-H.js} +1 -1
  182. package/dist/src/{meteor-DLZZ3osF.cjs → meteor-Co1VQ1u5.cjs} +1 -1
  183. package/dist/src/{meteor-44VjEACX.js → meteor-DHdzY1Ss.js} +1 -1
  184. package/dist/src/{meteor-DUiCJRC-.js → meteor-DuAFv6gF.js} +1 -1
  185. package/dist/src/{modelslab-B5J-ZM5c.js → modelslab-D0erNWKe.js} +7 -10
  186. package/dist/src/{modelslab-BTOT8FUO.js → modelslab-DIq-6y7x.js} +7 -10
  187. package/dist/src/{modelslab-IQbNg-r7.cjs → modelslab-Dk1JAtVo.cjs} +7 -10
  188. package/dist/src/{modelslab-BI458moT.js → modelslab-wu9yi5GE.js} +7 -11
  189. package/dist/src/{nova-reel-BZ9y-Y5s.js → nova-reel-CCFRfeRb.js} +7 -10
  190. package/dist/src/{nova-reel-CE5etkv9.cjs → nova-reel-CrLXVKQf.cjs} +6 -10
  191. package/dist/src/{nova-reel-Xw1SXLpg.js → nova-reel-DQrm74ng.js} +6 -10
  192. package/dist/src/{nova-reel-DEeQlnOJ.js → nova-reel-gr11WG7f.js} +6 -12
  193. package/dist/src/{nova-sonic-Ogqf-csn.js → nova-sonic-BYdp-QLs.js} +5 -7
  194. package/dist/src/{nova-sonic-DXTLpi-r.js → nova-sonic-B_ZXcUJB.js} +4 -7
  195. package/dist/src/{nova-sonic-DWswpN1E.js → nova-sonic-TDgrlTk7.js} +4 -9
  196. package/dist/src/{nova-sonic-N0yCm0vb.cjs → nova-sonic-i5tUvXKn.cjs} +4 -7
  197. package/dist/src/{openai-BcB5KlTk.js → openai-DhVEmgeZ.js} +6 -3
  198. package/dist/src/{openai-BMcwgD5C.js → openai-Qsvz25mV.js} +6 -3
  199. package/dist/src/{openai-CoxGAQwn.cjs → openai-URNyItar.cjs} +6 -3
  200. package/dist/src/{openai-D6wITiVn.js → openai-iYtrXzOX.js} +6 -3
  201. package/dist/src/openclaw-CLWrW03k.js +1200 -0
  202. package/dist/src/openclaw-CnQ363Wi.js +1199 -0
  203. package/dist/src/openclaw-CwzlQSQX.js +1199 -0
  204. package/dist/src/openclaw-wX9rtfke.cjs +1205 -0
  205. package/dist/src/{opencode-sdk-CHCs7dEb.js → opencode-sdk-BUu5Nevv.js} +6 -8
  206. package/dist/src/{opencode-sdk-WWJhnbKr.cjs → opencode-sdk-BZ2idgYA.cjs} +6 -8
  207. package/dist/src/{opencode-sdk-DDxj4QqH.js → opencode-sdk-BxD8vXp_.js} +7 -8
  208. package/dist/src/{opencode-sdk-C71Z0ehR.js → opencode-sdk-GI2KaAXq.js} +6 -10
  209. package/dist/src/{otlpReceiver-CZL48YfC.js → otlpReceiver-B2z58l4e.js} +154 -98
  210. package/dist/src/{otlpReceiver-DHKqJlsz.cjs → otlpReceiver-BfcVq2Nq.cjs} +154 -98
  211. package/dist/src/{otlpReceiver-CavGAA6k.js → otlpReceiver-BntK801g.js} +154 -98
  212. package/dist/src/{otlpReceiver-C9KlUtxh.js → otlpReceiver-DmVulbhC.js} +154 -98
  213. package/dist/src/{providerRegistry-BkzVH5Ba.js → providerRegistry-Bvh8mv85.js} +2 -2
  214. package/dist/src/{providerRegistry-CUWki5mQ.js → providerRegistry-CPQ_CmVO.js} +2 -2
  215. package/dist/src/{providerRegistry-BTDgfV5h.cjs → providerRegistry-CQMdTmHP.cjs} +2 -2
  216. package/dist/src/{providerRegistry-B9lh-_tx.js → providerRegistry-CWoPjKFZ.js} +2 -2
  217. package/dist/src/{providers-CScd1wN6.cjs → providers-1eKkXBKp.cjs} +792 -556
  218. package/dist/src/{providers-Ch6Mr0gn.js → providers-BV_KMZje.js} +699 -493
  219. package/dist/src/providers-Bp4S-FvO.js +2 -0
  220. package/dist/src/providers-DV3ax9e_.cjs +3 -0
  221. package/dist/src/{providers-DvddrgxL.js → providers-Domz_llv.js} +707 -501
  222. package/dist/src/{providers-Cn73d5sr.js → providers-DruaQfwu.js} +704 -498
  223. package/dist/src/providers-iUt5fbAN.js +3 -0
  224. package/dist/src/providers-u9Enmfok.js +2 -0
  225. package/dist/src/python/persistent_wrapper.py +0 -5
  226. package/dist/src/{pythonUtils-Cpo0Ez1p.js → pythonUtils-C2UQ30Rz.js} +3 -3
  227. package/dist/src/{pythonUtils-Bzwbgpbg.js → pythonUtils-Cldx7huE.js} +3 -3
  228. package/dist/src/{pythonUtils-wIqk7zAf.js → pythonUtils-CnndUbW-.js} +3 -3
  229. package/dist/src/{pythonUtils-dAVigVK-.cjs → pythonUtils-tAJvvpS-.cjs} +3 -3
  230. package/dist/src/{quiverai-BeofbLVc.js → quiverai-CtWi6x_g.js} +4 -4
  231. package/dist/src/{quiverai-CcUhPIBg.cjs → quiverai-DFotyafY.cjs} +4 -4
  232. package/dist/src/{quiverai-DVSEqJiq.js → quiverai-DR0SnIQV.js} +4 -4
  233. package/dist/src/{quiverai-CCQn73lq.js → quiverai-aPPvXOgn.js} +4 -5
  234. package/dist/src/render-CH-62LbA.js +135 -0
  235. package/dist/src/render-CMEpfLaO.js +136 -0
  236. package/dist/src/{render-BHl6QVq9.js → render-CgVDrJmM.js} +2 -3
  237. package/dist/src/render-DHIZ6_k8.js +135 -0
  238. package/dist/src/render-DfQSFxGE.cjs +165 -0
  239. package/dist/src/{responses-CQb1Tj69.js → responses--OsX2aYW.js} +17 -12
  240. package/dist/src/{responses-mo0KQDbu.cjs → responses-Bi9vBuW_.cjs} +18 -13
  241. package/dist/src/{responses-CgNyTPsY.js → responses-C-flexAY.js} +18 -13
  242. package/dist/src/{responses-BKP_WYis.js → responses-DL9m8CyY.js} +18 -13
  243. package/dist/src/{rubyUtils-CGeUtCfW.cjs → rubyUtils-B6eljPuh.cjs} +3 -3
  244. package/dist/src/{rubyUtils-DECSbsfY.js → rubyUtils-CYSQEG4a.js} +3 -3
  245. package/dist/src/rubyUtils-D1L2d3jb.js +3 -0
  246. package/dist/src/rubyUtils-DUbq4tff.cjs +2 -0
  247. package/dist/src/{rubyUtils-PgU-gHmx.js → rubyUtils-DVLeA2jg.js} +3 -3
  248. package/dist/src/{rubyUtils-CiVfln3g.js → rubyUtils-DsGrTx8R.js} +3 -3
  249. package/dist/src/{sagemaker-CqeASYE5.js → sagemaker-BVkaG2-l.js} +14 -18
  250. package/dist/src/{sagemaker-CVv8W7so.js → sagemaker-BveBvuxm.js} +14 -18
  251. package/dist/src/{sagemaker-MUbD5V3v.js → sagemaker-D67yzMzs.js} +14 -19
  252. package/dist/src/{sagemaker-jiw1wQa-.cjs → sagemaker-XnfhheQv.cjs} +14 -18
  253. package/dist/src/{scanner-DVDeUz1r.js → scanner-1DqWi1Ej.js} +130 -35
  254. package/dist/src/server/golang/wrapper.go +1 -1
  255. package/dist/src/server/index.js +3596 -2098
  256. package/dist/src/server/python/persistent_wrapper.py +0 -5
  257. package/dist/src/{server-DZ9MtCn0.js → server-BNYztJkh.js} +128 -9
  258. package/dist/src/{server-Cns05F1j.js → server-BSB45Nt9.js} +127 -8
  259. package/dist/src/{server-CP9qKM40.js → server-D6Il2Sob.js} +126 -7
  260. package/dist/src/server-DCtHUqlp.js +3 -0
  261. package/dist/src/server-DaA2eR26.cjs +2 -0
  262. package/dist/src/{server-BtoCXeXI.cjs → server-Dx2TyCH2.cjs} +140 -6
  263. package/dist/src/{signal-C3ZTsUgi.js → signal-CE5G3a7x.js} +3 -3
  264. package/dist/src/{slack-94iG3T0s.cjs → slack-1Rhq0EoV.cjs} +2 -2
  265. package/dist/src/{slack-BR0HtO3K.js → slack-D5Wpy8LM.js} +2 -2
  266. package/dist/src/{slack-DCEV-vWP.js → slack-DDUe-5MC.js} +2 -2
  267. package/dist/src/{slack-2sdpGzbt.js → slack-acRb0IqQ.js} +2 -2
  268. package/dist/src/store-CWOSz6D_.cjs +2 -0
  269. package/dist/src/{store-P8OKm19S.js → store-CYEy5J2D.js} +3 -3
  270. package/dist/src/{store-CLyU7AtI.cjs → store-DAAyxcy6.cjs} +3 -3
  271. package/dist/src/store-DCDBhv7B.js +3 -0
  272. package/dist/src/{store-VB0GP46K.js → store-Dn9HUkdW.js} +3 -3
  273. package/dist/src/{store-Cj258DgL.js → store-M0b1WfYb.js} +3 -3
  274. package/dist/src/{tables-DmzvLbeZ.js → tables-C4CH3zRr.js} +3 -3
  275. package/dist/src/{tables-BEIFz2tM.js → tables-CsWou1Bx.js} +3 -3
  276. package/dist/src/{tables-kC7R5kiK.js → tables-DQ4WU5tX.js} +3 -3
  277. package/dist/src/{tables-BdZQEpRz.cjs → tables-DUfh1F7Z.cjs} +3 -3
  278. package/dist/src/telemetry-C1IqxcdW.js +3 -0
  279. package/dist/src/telemetry-C4ZEa_es.cjs +2 -0
  280. package/dist/src/{telemetry-BnH5VJAU.js → telemetry-CQPez_Jp.js} +4 -4
  281. package/dist/src/{telemetry-re627Lre.cjs → telemetry-Dsw_faFj.cjs} +4 -4
  282. package/dist/src/{telemetry-BugWqKiu.js → telemetry-Dvqxv3YC.js} +4 -4
  283. package/dist/src/{telemetry-DPXLd7UE.js → telemetry-dbaJ0E98.js} +4 -4
  284. package/dist/src/{text-CW1cyrwj.cjs → text-BVi-cLPJ.cjs} +1 -1
  285. package/dist/src/{text-B_UCRPp2.js → text-CZr46tp_.js} +1 -1
  286. package/dist/src/{text-TIv0QYnd.js → text-DHxdyQqT.js} +1 -1
  287. package/dist/src/{text-Db-Wt2u2.js → text-KvuD2Iko.js} +1 -1
  288. package/dist/src/{tokenUsageUtils-bVa1ga6f.cjs → tokenUsageUtils-Bb7DkZPz.cjs} +7 -3
  289. package/dist/src/{tokenUsageUtils-BDGe-iyI.js → tokenUsageUtils-C-bmyHoE.js} +7 -3
  290. package/dist/src/{tokenUsageUtils-DflFMjS0.js → tokenUsageUtils-CXrvO-wA.js} +7 -3
  291. package/dist/src/{transcription-BvtsrzRG.cjs → transcription-BvjmiYB1.cjs} +9 -13
  292. package/dist/src/{transcription-Hb3VnC4M.js → transcription-CJspiD2c.js} +8 -11
  293. package/dist/src/{transcription-CaMivnjG.js → transcription-DuWDupG7.js} +7 -11
  294. package/dist/src/{transcription-DOMMTu01.js → transcription-V2HaAmy2.js} +7 -13
  295. package/dist/src/{transform-BqPkNPYm.js → transform-Bbg6A8Jk.js} +4 -4
  296. package/dist/src/{transform-DrleutM3.js → transform-CG0ehZNG.js} +9 -8
  297. package/dist/src/{transform-0BwoBsvO.cjs → transform-CTeuTR3S.cjs} +16 -8
  298. package/dist/src/{transform-ZrG2dvlo.cjs → transform-CUnzlsbn.cjs} +4 -4
  299. package/dist/src/{transform-BzK09Q_9.js → transform-DYX1_Xnh.js} +5 -5
  300. package/dist/src/transform-DgKlRr73.cjs +2 -0
  301. package/dist/src/transform-M6ITAESf.js +3 -0
  302. package/dist/src/{transform-ljLYHEPh.js → transform-UN5UGu8U.js} +5 -5
  303. package/dist/src/{transform-B2-jIv68.js → transform-lQrDE1BQ.js} +8 -6
  304. package/dist/src/{transform-DyDAwEpE.js → transform-zDhMmzwX.js} +10 -7
  305. package/dist/src/{transformersAvailability-BGkzavwb.js → transformersAvailability-CcHusyhw.js} +1 -1
  306. package/dist/src/{transformersAvailability-DKoRtQLy.cjs → transformersAvailability-Cju9mHgR.cjs} +1 -1
  307. package/dist/src/{transformersAvailability-D6c6ROpT.js → transformersAvailability-DLlROWhg.js} +1 -1
  308. package/dist/src/{types-q8GXGF65.js → types-BGQDAP8i.js} +351 -22
  309. package/dist/src/{types-Cd3ygw8W.js → types-Bgh5SOn6.js} +352 -24
  310. package/dist/src/{types-D8cGDZbL.cjs → types-CeaeaZdP.cjs} +387 -22
  311. package/dist/src/{types-CIhFeUC4.js → types-Dm9JM6Vb.js} +362 -23
  312. package/dist/src/{util-vNmDL5DT.js → util-BYvQUPp7.js} +138 -36
  313. package/dist/src/{util-CuLo2pMR.cjs → util-Bxn8emtE.cjs} +14 -167
  314. package/dist/src/{util-BLvy9qfE.js → util-C8e5uydV.js} +18 -141
  315. package/dist/src/{util-DM2rTn_6.js → util-C9J8ahRn.js} +4 -4
  316. package/dist/src/{util-CFj4YKIn.cjs → util-CN3SrLT4.cjs} +4 -4
  317. package/dist/src/{util-BtoGs5Cb.js → util-D3q0WQ-0.js} +4 -4
  318. package/dist/src/{util-CgDCK4KI.js → util-D9TisOyk.js} +4 -4
  319. package/dist/src/{util-DMFeUvLz.js → util-DDs-7g6-.js} +138 -36
  320. package/dist/src/{util-DbVG-yZU.js → util-DvU2Pw8c.js} +138 -36
  321. package/dist/src/{util-Bm3E9jpK.js → util-DxWpWjhc.js} +12 -135
  322. package/dist/src/{util-CMMkIxfU.js → util-oGMLA7vc.js} +16 -139
  323. package/dist/src/{util--9u9UVCt.cjs → util-olYL5C6N.cjs} +143 -35
  324. package/dist/src/{utils-DKw8mrgr.cjs → utils-B05gLxER.cjs} +6 -4
  325. package/dist/src/{utils-DEuL4VNB.js → utils-BLJKfv0y.js} +6 -4
  326. package/dist/src/{utils-DOjD4dTC.js → utils-DJfvjyMj.js} +6 -4
  327. package/dist/src/{utils-CFxO9KGo.js → utils-hXtCYanr.js} +6 -4
  328. package/dist/tsconfig.tsbuildinfo +1 -1
  329. package/package.json +51 -42
  330. package/dist/src/app/assets/index-B6l9CVVb.js +0 -439
  331. package/dist/src/app/assets/index-DyZ0Ep37.css +0 -1
  332. package/dist/src/app/assets/scroll-timeline-BdJZVXlz.js +0 -1
  333. package/dist/src/app/assets/sync-CStkzc6u.js +0 -4
  334. package/dist/src/app/assets/vendor-charts-BnDWwBlI.js +0 -36
  335. package/dist/src/app/assets/vendor-markdown-Bz7N-ca6.js +0 -29
  336. package/dist/src/app/assets/vendor-react-AtKqiNEf.js +0 -4
  337. package/dist/src/app/assets/vendor-syntax-D06x6TQF.js +0 -2
  338. package/dist/src/app/assets/vendor-utils-BvMHZmO7.js +0 -37
  339. package/dist/src/cache-C5yFZ4gC.cjs +0 -816
  340. package/dist/src/cache-CaT5tPgo.js +0 -756
  341. package/dist/src/cache-CyCanoMu.js +0 -6
  342. package/dist/src/cache-DSqR6ezl.js +0 -726
  343. package/dist/src/cache-Df_QFDNu.cjs +0 -5
  344. package/dist/src/cache-HP0NP4k3.js +0 -756
  345. package/dist/src/cloud-DE3t1-ZI.js +0 -4
  346. package/dist/src/codex-sdk-BQEw16R_.js +0 -834
  347. package/dist/src/codex-sdk-C_07GuVS.js +0 -834
  348. package/dist/src/codex-sdk-DE5G18dx.js +0 -835
  349. package/dist/src/codex-sdk-ZLKfDjqP.cjs +0 -838
  350. package/dist/src/eval-7aEqoMs3.js +0 -15
  351. package/dist/src/evalResult-CYNHkk5A.js +0 -12
  352. package/dist/src/evalResult-CuvJeNiM.js +0 -10
  353. package/dist/src/evalResult-tGdilrWt.cjs +0 -10
  354. package/dist/src/evaluator-BBUqRhz1.js +0 -36
  355. package/dist/src/fetch-UWU706qb.js +0 -5
  356. package/dist/src/graders-BxfEguVY.js +0 -32
  357. package/dist/src/graders-CzVMbEnv.js +0 -34
  358. package/dist/src/graders-DjCXfj0l.cjs +0 -32
  359. package/dist/src/graders-kHzIWOKu.js +0 -32
  360. package/dist/src/openclaw-0Sv7AK3O.js +0 -580
  361. package/dist/src/openclaw-CXxbKgDH.cjs +0 -586
  362. package/dist/src/openclaw-D1FSCps-.js +0 -580
  363. package/dist/src/openclaw-D2ENvu7a.js +0 -582
  364. package/dist/src/providers-BSLEaIQG.js +0 -32
  365. package/dist/src/providers-D-FnDg8k.cjs +0 -31
  366. package/dist/src/providers-DEYiFVAo.js +0 -30
  367. package/dist/src/providers-sS2WI8YD.js +0 -30
  368. package/dist/src/rubyUtils-B1HXG4ej.cjs +0 -4
  369. package/dist/src/rubyUtils-Rt6pKA96.js +0 -5
  370. package/dist/src/server-B0Xh1Gx-.js +0 -7
  371. package/dist/src/server-DJTKu9IR.cjs +0 -5
  372. package/dist/src/store-C5u6MgC8.js +0 -6
  373. package/dist/src/store-CNHk-De4.cjs +0 -5
  374. package/dist/src/telemetry-Yig0Tino.js +0 -7
  375. package/dist/src/telemetry-p8Pwqm1i.cjs +0 -5
  376. package/dist/src/tokenUsageUtils-NYT-WKS6.js +0 -138
  377. package/dist/src/transform-ChNIpHz7.js +0 -6
  378. package/dist/src/transform-PtQ6rAE3.cjs +0 -5
@@ -1,36 +0,0 @@
1
- import{r as w,g as Jt,a as Fu,b as Fm,R as Ix}from"./vendor-react-AtKqiNEf.js";function Bm(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Bm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Je(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Bm(e))&&(r&&(r+=" "),r+=t);return r}var Rx="Invariant failed";function qL(e,t){if(!e)throw new Error(Rx)}function vi(e){return e+.5|0}const Wt=(e,t,n)=>Math.max(Math.min(e,n),t);function Wr(e){return Wt(vi(e*2.55),0,255)}function Ht(e){return Wt(vi(e*255),0,255)}function Pt(e){return Wt(vi(e/2.55)/100,0,1)}function Pf(e){return Wt(vi(e*100),0,100)}const Xe={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},$l=[..."0123456789ABCDEF"],jx=e=>$l[e&15],Lx=e=>$l[(e&240)>>4]+$l[e&15],Li=e=>(e&240)>>4===(e&15),Nx=e=>Li(e.r)&&Li(e.g)&&Li(e.b)&&Li(e.a);function Fx(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Xe[e[1]]*17,g:255&Xe[e[2]]*17,b:255&Xe[e[3]]*17,a:t===5?Xe[e[4]]*17:255}:(t===7||t===9)&&(n={r:Xe[e[1]]<<4|Xe[e[2]],g:Xe[e[3]]<<4|Xe[e[4]],b:Xe[e[5]]<<4|Xe[e[6]],a:t===9?Xe[e[7]]<<4|Xe[e[8]]:255})),n}const Bx=(e,t)=>e<255?t(e):"";function zx(e){var t=Nx(e)?jx:Lx;return e?"#"+t(e.r)+t(e.g)+t(e.b)+Bx(e.a,t):void 0}const $x=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function zm(e,t,n){const r=t*Math.min(n,1-n),i=(a,o=(a+e/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function Wx(e,t,n){const r=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[r(5),r(3),r(1)]}function qx(e,t,n){const r=zm(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function Ux(e,t,n,r,i){return e===i?(t-n)/r+(t<n?6:0):t===i?(n-e)/r+2:(e-t)/r+4}function Bu(e){const n=e.r/255,r=e.g/255,i=e.b/255,a=Math.max(n,r,i),o=Math.min(n,r,i),s=(a+o)/2;let l,u,c;return a!==o&&(c=a-o,u=s>.5?c/(2-a-o):c/(a+o),l=Ux(n,r,i,c,a),l=l*60+.5),[l|0,u||0,s]}function zu(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(Ht)}function $u(e,t,n){return zu(zm,e,t,n)}function Vx(e,t,n){return zu(qx,e,t,n)}function Hx(e,t,n){return zu(Wx,e,t,n)}function $m(e){return(e%360+360)%360}function Kx(e){const t=$x.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?Wr(+t[5]):Ht(+t[5]));const i=$m(+t[2]),a=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?r=Vx(i,a,o):t[1]==="hsv"?r=Hx(i,a,o):r=$u(i,a,o),{r:r[0],g:r[1],b:r[2],a:n}}function Yx(e,t){var n=Bu(e);n[0]=$m(n[0]+t),n=$u(n),e.r=n[0],e.g=n[1],e.b=n[2]}function Xx(e){if(!e)return;const t=Bu(e),n=t[0],r=Pf(t[1]),i=Pf(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${Pt(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const Mf={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Af={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Gx(){const e={},t=Object.keys(Af),n=Object.keys(Mf);let r,i,a,o,s;for(r=0;r<t.length;r++){for(o=s=t[r],i=0;i<n.length;i++)a=n[i],s=s.replace(a,Mf[a]);a=parseInt(Af[o],16),e[s]=[a>>16&255,a>>8&255,a&255]}return e}let Ni;function Zx(e){Ni||(Ni=Gx(),Ni.transparent=[0,0,0,0]);const t=Ni[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Qx=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Jx(e){const t=Qx.exec(e);let n=255,r,i,a;if(t){if(t[7]!==r){const o=+t[7];n=t[8]?Wr(o):Wt(o*255,0,255)}return r=+t[1],i=+t[3],a=+t[5],r=255&(t[2]?Wr(r):Wt(r,0,255)),i=255&(t[4]?Wr(i):Wt(i,0,255)),a=255&(t[6]?Wr(a):Wt(a,0,255)),{r,g:i,b:a,a:n}}}function e_(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Pt(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Jo=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,$n=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function t_(e,t,n){const r=$n(Pt(e.r)),i=$n(Pt(e.g)),a=$n(Pt(e.b));return{r:Ht(Jo(r+n*($n(Pt(t.r))-r))),g:Ht(Jo(i+n*($n(Pt(t.g))-i))),b:Ht(Jo(a+n*($n(Pt(t.b))-a))),a:e.a+n*(t.a-e.a)}}function Fi(e,t,n){if(e){let r=Bu(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=$u(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function Wm(e,t){return e&&Object.assign(t||{},e)}function kf(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Ht(e[3]))):(t=Wm(e,{r:0,g:0,b:0,a:1}),t.a=Ht(t.a)),t}function n_(e){return e.charAt(0)==="r"?Jx(e):Kx(e)}let qm=class Wl{constructor(t){if(t instanceof Wl)return t;const n=typeof t;let r;n==="object"?r=kf(t):n==="string"&&(r=Fx(t)||Zx(t)||n_(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=Wm(this._rgb);return t&&(t.a=Pt(t.a)),t}set rgb(t){this._rgb=kf(t)}rgbString(){return this._valid?e_(this._rgb):void 0}hexString(){return this._valid?zx(this._rgb):void 0}hslString(){return this._valid?Xx(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let a;const o=n===a?.5:n,s=2*o-1,l=r.a-i.a,u=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;a=1-u,r.r=255&u*r.r+a*i.r+.5,r.g=255&u*r.g+a*i.g+.5,r.b=255&u*r.b+a*i.b+.5,r.a=o*r.a+(1-o)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=t_(this._rgb,t._rgb,n)),this}clone(){return new Wl(this.rgb)}alpha(t){return this._rgb.a=Ht(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=vi(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Fi(this._rgb,2,t),this}darken(t){return Fi(this._rgb,2,-t),this}saturate(t){return Fi(this._rgb,1,t),this}desaturate(t){return Fi(this._rgb,1,-t),this}rotate(t){return Yx(this._rgb,t),this}};function wt(){}const r_=(()=>{let e=0;return()=>e++})();function Y(e){return e==null}function me(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function W(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function et(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function ut(e,t){return et(e)?e:t}function K(e,t){return typeof e>"u"?t:e}const i_=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,Um=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function le(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function X(e,t,n,r){let i,a,o;if(me(e))for(a=e.length,i=0;i<a;i++)t.call(n,e[i],i);else if(W(e))for(o=Object.keys(e),a=o.length,i=0;i<a;i++)t.call(n,e[o[i]],o[i])}function ya(e,t){let n,r,i,a;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],a=t[n],i.datasetIndex!==a.datasetIndex||i.index!==a.index)return!1;return!0}function ba(e){if(me(e))return e.map(ba);if(W(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=ba(e[n[i]]);return t}return e}function Vm(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function a_(e,t,n,r){if(!Vm(e))return;const i=t[e],a=n[e];W(i)&&W(a)?Qr(i,a,r):t[e]=ba(a)}function Qr(e,t,n){const r=me(t)?t:[t],i=r.length;if(!W(e))return e;n=n||{};const a=n.merger||a_;let o;for(let s=0;s<i;++s){if(o=r[s],!W(o))continue;const l=Object.keys(o);for(let u=0,c=l.length;u<c;++u)a(l[u],e,o,n)}return e}function Kr(e,t){return Qr(e,t,{merger:o_})}function o_(e,t,n){if(!Vm(e))return;const r=t[e],i=n[e];W(r)&&W(i)?Kr(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=ba(i))}const Cf={"":e=>e,x:e=>e.x,y:e=>e.y};function s_(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function l_(e){const t=s_(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function Xt(e,t){return(Cf[t]||(Cf[t]=l_(t)))(e)}function Wu(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Jr=e=>typeof e<"u",Gt=e=>typeof e=="function",Ef=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function u_(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const de=Math.PI,Le=2*de,c_=Le+de,xa=Number.POSITIVE_INFINITY,f_=de/180,We=de/2,cn=de/4,Tf=de*2/3,Hm=Math.log10,yt=Math.sign;function Yr(e,t,n){return Math.abs(e-t)<n}function Df(e){const t=Math.round(e);e=Yr(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(Hm(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function d_(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((i,a)=>i-a).pop(),t}function h_(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function er(e){return!h_(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function p_(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function g_(e,t,n){let r,i,a;for(r=0,i=e.length;r<i;r++)a=e[r][n],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function pt(e){return e*(de/180)}function m_(e){return e*(180/de)}function If(e){if(!et(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function v_(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let a=Math.atan2(r,n);return a<-.5*de&&(a+=Le),{angle:a,distance:i}}function ql(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function y_(e,t){return(e-t+c_)%Le-de}function Bt(e){return(e%Le+Le)%Le}function _a(e,t,n,r){const i=Bt(e),a=Bt(t),o=Bt(n),s=Bt(a-i),l=Bt(o-i),u=Bt(i-a),c=Bt(i-o);return i===a||i===o||r&&a===o||s>l&&u<c}function qe(e,t,n){return Math.max(t,Math.min(n,e))}function b_(e){return qe(e,-32768,32767)}function Ul(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function qu(e,t,n){n=n||(o=>e[o]<t);let r=e.length-1,i=0,a;for(;r-i>1;)a=i+r>>1,n(a)?i=a:r=a;return{lo:i,hi:r}}const wn=(e,t,n,r)=>qu(e,n,r?i=>{const a=e[i][t];return a<n||a===n&&e[i+1][t]===n}:i=>e[i][t]<n),x_=(e,t,n)=>qu(e,n,r=>e[r][t]>=n);function __(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}const Km=["push","pop","shift","splice","unshift"];function w_(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Km.forEach(n=>{const r="_onData"+Wu(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...a){const o=i.apply(this,a);return e._chartjs.listeners.forEach(s=>{typeof s[r]=="function"&&s[r](...a)}),o}})})}function Rf(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(Km.forEach(a=>{delete e[a]}),delete e._chartjs)}function Ym(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const Xm=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function Gm(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,Xm.call(window,()=>{r=!1,e.apply(t,n)}))}}function S_(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const O_=e=>e==="start"?"left":e==="end"?"right":"center",jf=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2;function Zm(e,t,n){const r=t.length;let i=0,a=r;if(e._sorted){const{iScale:o,vScale:s,_parsed:l}=e,u=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,c=o.axis,{min:f,max:d,minDefined:h,maxDefined:p}=o.getUserBounds();if(h){if(i=Math.min(wn(l,c,f).lo,n?r:wn(t,c,o.getPixelForValue(f)).lo),u){const m=l.slice(0,i+1).reverse().findIndex(g=>!Y(g[s.axis]));i-=Math.max(0,m)}i=qe(i,0,r-1)}if(p){let m=Math.max(wn(l,o.axis,d,!0).hi+1,n?0:wn(t,c,o.getPixelForValue(d),!0).hi+1);if(u){const g=l.slice(m-1).findIndex(v=>!Y(v[s.axis]));m+=Math.max(0,g)}a=qe(m,i,r)-i}else a=r-i}return{start:i,count:a}}function Qm(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const a=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),a}const Bi=e=>e===0||e===1,Lf=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Le/n)),Nf=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Le/n)+1,Xr={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*We)+1,easeOutSine:e=>Math.sin(e*We),easeInOutSine:e=>-.5*(Math.cos(de*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Bi(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Bi(e)?e:Lf(e,.075,.3),easeOutElastic:e=>Bi(e)?e:Nf(e,.075,.3),easeInOutElastic(e){return Bi(e)?e:e<.5?.5*Lf(e*2,.1125,.45):.5+.5*Nf(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Xr.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Xr.easeInBounce(e*2)*.5:Xr.easeOutBounce(e*2-1)*.5+.5};function Uu(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Ff(e){return Uu(e)?e:new qm(e)}function es(e){return Uu(e)?e:new qm(e).saturate(.5).darken(.1).hexString()}const P_=["x","y","borderWidth","radius","tension"],M_=["color","borderColor","backgroundColor"];function A_(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:M_},numbers:{type:"number",properties:P_}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function k_(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Bf=new Map;function C_(e,t){t=t||{};const n=e+JSON.stringify(t);let r=Bf.get(n);return r||(r=new Intl.NumberFormat(e,t),Bf.set(n,r)),r}function fo(e,t,n){return C_(t,n).format(e)}const E_={values(e){return me(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,a=e;if(n.length>1){const u=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(u<1e-4||u>1e15)&&(i="scientific"),a=T_(e,n)}const o=Hm(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),fo(e,r,l)}};function T_(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Jm={formatters:E_};function D_(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Jm.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Tn=Object.create(null),Vl=Object.create(null);function Gr(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const a=n[r];e=e[a]||(e[a]=Object.create(null))}return e}function ts(e,t,n){return typeof t=="string"?Qr(Gr(e,t),n):Qr(Gr(e,""),t)}class I_{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>es(i.backgroundColor),this.hoverBorderColor=(r,i)=>es(i.borderColor),this.hoverColor=(r,i)=>es(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return ts(this,t,n)}get(t){return Gr(this,t)}describe(t,n){return ts(Vl,t,n)}override(t,n){return ts(Tn,t,n)}route(t,n,r,i){const a=Gr(this,t),o=Gr(this,r),s="_"+n;Object.defineProperties(a,{[s]:{value:a[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[s],u=o[i];return W(l)?Object.assign({},u,l):K(l,u)},set(l){this[s]=l}}})}apply(t){t.forEach(n=>n(this))}}var ae=new I_({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[A_,k_,D_]);function R_(e){return!e||Y(e.size)||Y(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function zf(e,t,n,r,i){let a=t[i];return a||(a=t[i]=e.measureText(i).width,n.push(i)),a>r&&(r=a),r}function fn(e,t,n){const r=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function $f(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function Hl(e,t,n,r){j_(e,t,n,r)}function j_(e,t,n,r,i){let a,o,s,l,u,c,f,d;const h=t.pointStyle,p=t.rotation,m=t.radius;let g=(p||0)*f_;if(h&&typeof h=="object"&&(a=h.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(g),e.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),e.restore();return}if(!(isNaN(m)||m<=0)){switch(e.beginPath(),h){default:e.arc(n,r,m,0,Le),e.closePath();break;case"triangle":c=m,e.moveTo(n+Math.sin(g)*c,r-Math.cos(g)*m),g+=Tf,e.lineTo(n+Math.sin(g)*c,r-Math.cos(g)*m),g+=Tf,e.lineTo(n+Math.sin(g)*c,r-Math.cos(g)*m),e.closePath();break;case"rectRounded":u=m*.516,l=m-u,o=Math.cos(g+cn)*l,f=Math.cos(g+cn)*l,s=Math.sin(g+cn)*l,d=Math.sin(g+cn)*l,e.arc(n-f,r-s,u,g-de,g-We),e.arc(n+d,r-o,u,g-We,g),e.arc(n+f,r+s,u,g,g+We),e.arc(n-d,r+o,u,g+We,g+de),e.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*m,c=l,e.rect(n-c,r-l,2*c,2*l);break}g+=cn;case"rectRot":f=Math.cos(g)*m,o=Math.cos(g)*m,s=Math.sin(g)*m,d=Math.sin(g)*m,e.moveTo(n-f,r-s),e.lineTo(n+d,r-o),e.lineTo(n+f,r+s),e.lineTo(n-d,r+o),e.closePath();break;case"crossRot":g+=cn;case"cross":f=Math.cos(g)*m,o=Math.cos(g)*m,s=Math.sin(g)*m,d=Math.sin(g)*m,e.moveTo(n-f,r-s),e.lineTo(n+f,r+s),e.moveTo(n+d,r-o),e.lineTo(n-d,r+o);break;case"star":f=Math.cos(g)*m,o=Math.cos(g)*m,s=Math.sin(g)*m,d=Math.sin(g)*m,e.moveTo(n-f,r-s),e.lineTo(n+f,r+s),e.moveTo(n+d,r-o),e.lineTo(n-d,r+o),g+=cn,f=Math.cos(g)*m,o=Math.cos(g)*m,s=Math.sin(g)*m,d=Math.sin(g)*m,e.moveTo(n-f,r-s),e.lineTo(n+f,r+s),e.moveTo(n+d,r-o),e.lineTo(n-d,r+o);break;case"line":o=Math.cos(g)*m,s=Math.sin(g)*m,e.moveTo(n-o,r-s),e.lineTo(n+o,r+s);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(g)*m,r+Math.sin(g)*m);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function ei(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function ev(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function tv(e){e.restore()}function L_(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const a=(t.x+n.x)/2;e.lineTo(a,t.y),e.lineTo(a,n.y)}else i==="after"!=!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function N_(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function F_(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Y(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function B_(e,t,n,r,i){if(i.strikethrough||i.underline){const a=e.measureText(r),o=t-a.actualBoundingBoxLeft,s=t+a.actualBoundingBoxRight,l=n-a.actualBoundingBoxAscent,u=n+a.actualBoundingBoxDescent,c=i.strikethrough?(l+u)/2:u;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(o,c),e.lineTo(s,c),e.stroke()}}function z_(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Wf(e,t,n,r,i,a={}){const o=me(t)?t:[t],s=a.strokeWidth>0&&a.strokeColor!=="";let l,u;for(e.save(),e.font=i.string,F_(e,a),l=0;l<o.length;++l)u=o[l],a.backdrop&&z_(e,a.backdrop),s&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),Y(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(u,n,r,a.maxWidth)),e.fillText(u,n,r,a.maxWidth),B_(e,n,r,u,a),r+=Number(i.lineHeight);e.restore()}function Kl(e,t){const{x:n,y:r,w:i,h:a,radius:o}=t;e.arc(n+o.topLeft,r+o.topLeft,o.topLeft,1.5*de,de,!0),e.lineTo(n,r+a-o.bottomLeft),e.arc(n+o.bottomLeft,r+a-o.bottomLeft,o.bottomLeft,de,We,!0),e.lineTo(n+i-o.bottomRight,r+a),e.arc(n+i-o.bottomRight,r+a-o.bottomRight,o.bottomRight,We,0,!0),e.lineTo(n+i,r+o.topRight),e.arc(n+i-o.topRight,r+o.topRight,o.topRight,0,-We,!0),e.lineTo(n+o.topLeft,r)}const $_=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,W_=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function q_(e,t){const n=(""+e).match($_);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const U_=e=>+e||0;function nv(e,t){const n={},r=W(t),i=r?Object.keys(t):t,a=W(e)?r?o=>K(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of i)n[o]=U_(a(o));return n}function rv(e){return nv(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Zr(e){return nv(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Zt(e){const t=rv(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function gt(e,t){e=e||{},t=t||ae.font;let n=K(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=K(e.style,t.style);r&&!(""+r).match(W_)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:K(e.family,t.family),lineHeight:q_(K(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:K(e.weight,t.weight),string:""};return i.string=R_(i),i}function zi(e,t,n,r){let i,a,o;for(i=0,a=e.length;i<a;++i)if(o=e[i],o!==void 0&&o!==void 0)return o}function V_(e,t,n){const{min:r,max:i}=e,a=Um(t,(i-r)/2),o=(s,l)=>n&&s===0?0:s+l;return{min:o(r,-Math.abs(a)),max:o(i,a)}}function Fn(e,t){return Object.assign(Object.create(e),t)}function Vu(e,t=[""],n,r,i=()=>e[0]){const a=n||e;typeof r>"u"&&(r=sv("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:r,_getTarget:i,override:s=>Vu([s,...e],t,a,r)};return new Proxy(o,{deleteProperty(s,l){return delete s[l],delete s._keys,delete e[0][l],!0},get(s,l){return av(s,l,()=>J_(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return Uf(s).includes(l)},ownKeys(s){return Uf(s)},set(s,l,u){const c=s._storage||(s._storage=i());return s[l]=c[l]=u,delete s._keys,!0}})}function tr(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:iv(e,r),setContext:a=>tr(e,a,n,r),override:a=>tr(e.override(a),t,n,r)};return new Proxy(i,{deleteProperty(a,o){return delete a[o],delete e[o],!0},get(a,o,s){return av(a,o,()=>K_(a,o,s))},getOwnPropertyDescriptor(a,o){return a._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(a,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(a,o,s){return e[o]=s,delete a[o],!0}})}function iv(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Gt(n)?n:()=>n,isIndexable:Gt(r)?r:()=>r}}const H_=(e,t)=>e?e+Wu(t):t,Hu=(e,t)=>W(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function av(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function K_(e,t,n){const{_proxy:r,_context:i,_subProxy:a,_descriptors:o}=e;let s=r[t];return Gt(s)&&o.isScriptable(t)&&(s=Y_(t,s,e,n)),me(s)&&s.length&&(s=X_(t,s,e,o.isIndexable)),Hu(t,s)&&(s=tr(s,i,a&&a[t],o)),s}function Y_(e,t,n,r){const{_proxy:i,_context:a,_subProxy:o,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(a,o||r);return s.delete(e),Hu(e,l)&&(l=Ku(i._scopes,i,e,l)),l}function X_(e,t,n,r){const{_proxy:i,_context:a,_subProxy:o,_descriptors:s}=n;if(typeof a.index<"u"&&r(e))return t[a.index%t.length];if(W(t[0])){const l=t,u=i._scopes.filter(c=>c!==l);t=[];for(const c of l){const f=Ku(u,i,e,c);t.push(tr(f,a,o&&o[e],s))}}return t}function ov(e,t,n){return Gt(e)?e(t,n):e}const G_=(e,t)=>e===!0?t:typeof e=="string"?Xt(t,e):void 0;function Z_(e,t,n,r,i){for(const a of t){const o=G_(n,a);if(o){e.add(o);const s=ov(o._fallback,n,i);if(typeof s<"u"&&s!==n&&s!==r)return s}else if(o===!1&&typeof r<"u"&&n!==r)return null}return!1}function Ku(e,t,n,r){const i=t._rootScopes,a=ov(t._fallback,n,r),o=[...e,...i],s=new Set;s.add(r);let l=qf(s,o,n,a||n,r);return l===null||typeof a<"u"&&a!==n&&(l=qf(s,o,a,l,r),l===null)?!1:Vu(Array.from(s),[""],i,a,()=>Q_(t,n,r))}function qf(e,t,n,r,i){for(;n;)n=Z_(e,t,n,r,i);return n}function Q_(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return me(i)&&W(n)?n:i||{}}function J_(e,t,n,r){let i;for(const a of t)if(i=sv(H_(a,e),n),typeof i<"u")return Hu(e,i)?Ku(n,r,e,i):i}function sv(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function Uf(e){let t=e._keys;return t||(t=e._keys=ew(e._scopes)),t}function ew(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}function tw(e,t,n,r){const{iScale:i}=e,{key:a="r"}=this._parsing,o=new Array(r);let s,l,u,c;for(s=0,l=r;s<l;++s)u=s+n,c=t[u],o[s]={r:i.parse(Xt(c,a),u)};return o}const nw=Number.EPSILON||1e-14,nr=(e,t)=>t<e.length&&!e[t].skip&&e[t],lv=e=>e==="x"?"y":"x";function rw(e,t,n,r){const i=e.skip?t:e,a=t,o=n.skip?t:n,s=ql(a,i),l=ql(o,a);let u=s/(s+l),c=l/(s+l);u=isNaN(u)?0:u,c=isNaN(c)?0:c;const f=r*u,d=r*c;return{previous:{x:a.x-f*(o.x-i.x),y:a.y-f*(o.y-i.y)},next:{x:a.x+d*(o.x-i.x),y:a.y+d*(o.y-i.y)}}}function iw(e,t,n){const r=e.length;let i,a,o,s,l,u=nr(e,0);for(let c=0;c<r-1;++c)if(l=u,u=nr(e,c+1),!(!l||!u)){if(Yr(t[c],0,nw)){n[c]=n[c+1]=0;continue}i=n[c]/t[c],a=n[c+1]/t[c],s=Math.pow(i,2)+Math.pow(a,2),!(s<=9)&&(o=3/Math.sqrt(s),n[c]=i*o*t[c],n[c+1]=a*o*t[c])}}function aw(e,t,n="x"){const r=lv(n),i=e.length;let a,o,s,l=nr(e,0);for(let u=0;u<i;++u){if(o=s,s=l,l=nr(e,u+1),!s)continue;const c=s[n],f=s[r];o&&(a=(c-o[n])/3,s[`cp1${n}`]=c-a,s[`cp1${r}`]=f-a*t[u]),l&&(a=(l[n]-c)/3,s[`cp2${n}`]=c+a,s[`cp2${r}`]=f+a*t[u])}}function ow(e,t="x"){const n=lv(t),r=e.length,i=Array(r).fill(0),a=Array(r);let o,s,l,u=nr(e,0);for(o=0;o<r;++o)if(s=l,l=u,u=nr(e,o+1),!!l){if(u){const c=u[t]-l[t];i[o]=c!==0?(u[n]-l[n])/c:0}a[o]=s?u?yt(i[o-1])!==yt(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}iw(e,i,a),aw(e,a,t)}function $i(e,t,n){return Math.max(Math.min(e,n),t)}function sw(e,t){let n,r,i,a,o,s=ei(e[0],t);for(n=0,r=e.length;n<r;++n)o=a,a=s,s=n<r-1&&ei(e[n+1],t),a&&(i=e[n],o&&(i.cp1x=$i(i.cp1x,t.left,t.right),i.cp1y=$i(i.cp1y,t.top,t.bottom)),s&&(i.cp2x=$i(i.cp2x,t.left,t.right),i.cp2y=$i(i.cp2y,t.top,t.bottom)))}function lw(e,t,n,r,i){let a,o,s,l;if(t.spanGaps&&(e=e.filter(u=>!u.skip)),t.cubicInterpolationMode==="monotone")ow(e,i);else{let u=r?e[e.length-1]:e[0];for(a=0,o=e.length;a<o;++a)s=e[a],l=rw(u,s,e[Math.min(a+1,o-(r?0:1))%o],t.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,u=s}t.capBezierPoints&&sw(e,n)}function Yu(){return typeof window<"u"&&typeof document<"u"}function Xu(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function wa(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const ho=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function uw(e,t){return ho(e).getPropertyValue(t)}const cw=["top","right","bottom","left"];function An(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const a=cw[i];r[a]=parseFloat(e[t+"-"+a+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const fw=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function dw(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:a}=r;let o=!1,s,l;if(fw(i,a,e.target))s=i,l=a;else{const u=t.getBoundingClientRect();s=r.clientX-u.left,l=r.clientY-u.top,o=!0}return{x:s,y:l,box:o}}function vn(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=ho(n),a=i.boxSizing==="border-box",o=An(i,"padding"),s=An(i,"border","width"),{x:l,y:u,box:c}=dw(e,n),f=o.left+(c&&s.left),d=o.top+(c&&s.top);let{width:h,height:p}=t;return a&&(h-=o.width+s.width,p-=o.height+s.height),{x:Math.round((l-f)/h*n.width/r),y:Math.round((u-d)/p*n.height/r)}}function hw(e,t,n){let r,i;if(t===void 0||n===void 0){const a=e&&Xu(e);if(!a)t=e.clientWidth,n=e.clientHeight;else{const o=a.getBoundingClientRect(),s=ho(a),l=An(s,"border","width"),u=An(s,"padding");t=o.width-u.width-l.width,n=o.height-u.height-l.height,r=wa(s.maxWidth,a,"clientWidth"),i=wa(s.maxHeight,a,"clientHeight")}}return{width:t,height:n,maxWidth:r||xa,maxHeight:i||xa}}const qt=e=>Math.round(e*10)/10;function pw(e,t,n,r){const i=ho(e),a=An(i,"margin"),o=wa(i.maxWidth,e,"clientWidth")||xa,s=wa(i.maxHeight,e,"clientHeight")||xa,l=hw(e,t,n);let{width:u,height:c}=l;if(i.boxSizing==="content-box"){const d=An(i,"border","width"),h=An(i,"padding");u-=h.width+d.width,c-=h.height+d.height}return u=Math.max(0,u-a.width),c=Math.max(0,r?u/r:c-a.height),u=qt(Math.min(u,o,l.maxWidth)),c=qt(Math.min(c,s,l.maxHeight)),u&&!c&&(c=qt(u/2)),(t!==void 0||n!==void 0)&&r&&l.height&&c>l.height&&(c=l.height,u=qt(Math.floor(c*r))),{width:u,height:c}}function Vf(e,t,n){const r=t||1,i=qt(e.height*r),a=qt(e.width*r);e.height=qt(e.height),e.width=qt(e.width);const o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==i||o.width!==a?(e.currentDevicePixelRatio=r,o.height=i,o.width=a,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const gw=(function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Yu()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e})();function Hf(e,t){const n=uw(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function yn(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function mw(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function vw(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},o=yn(e,i,n),s=yn(i,a,n),l=yn(a,t,n),u=yn(o,s,n),c=yn(s,l,n);return yn(u,c,n)}const yw=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},bw=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function ns(e,t,n){return e?yw(t,n):bw()}function xw(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function _w(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function uv(e){return e==="angle"?{between:_a,compare:y_,normalize:Bt}:{between:Ul,compare:(t,n)=>t-n,normalize:t=>t}}function Kf({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function ww(e,t,n){const{property:r,start:i,end:a}=n,{between:o,normalize:s}=uv(r),l=t.length;let{start:u,end:c,loop:f}=e,d,h;if(f){for(u+=l,c+=l,d=0,h=l;d<h&&o(s(t[u%l][r]),i,a);++d)u--,c--;u%=l,c%=l}return c<u&&(c+=l),{start:u,end:c,loop:f,style:e.style}}function Sw(e,t,n){if(!n)return[e];const{property:r,start:i,end:a}=n,o=t.length,{compare:s,between:l,normalize:u}=uv(r),{start:c,end:f,loop:d,style:h}=ww(e,t,n),p=[];let m=!1,g=null,v,y,b;const _=()=>l(i,b,v)&&s(i,b)!==0,x=()=>s(a,v)===0||l(a,b,v),S=()=>m||_(),O=()=>!m||x();for(let M=c,k=c;M<=f;++M)y=t[M%o],!y.skip&&(v=u(y[r]),v!==b&&(m=l(v,i,a),g===null&&S()&&(g=s(v,i)===0?M:k),g!==null&&O()&&(p.push(Kf({start:g,end:M,loop:d,count:o,style:h})),g=null),k=M,b=v));return g!==null&&p.push(Kf({start:g,end:f,loop:d,count:o,style:h})),p}function Ow(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const a=Sw(r[i],e.points,t);a.length&&n.push(...a)}return n}function Pw(e,t,n,r){let i=0,a=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(a+=i);a>i&&e[a%t].skip;)a--;return a%=t,{start:i,end:a}}function Mw(e,t,n,r){const i=e.length,a=[];let o=t,s=e[t],l;for(l=t+1;l<=n;++l){const u=e[l%i];u.skip||u.stop?s.skip||(r=!1,a.push({start:t%i,end:(l-1)%i,loop:r}),t=o=u.stop?l:null):(o=l,s.skip&&(t=l)),s=u}return o!==null&&a.push({start:t%i,end:o%i,loop:r}),a}function Aw(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const a=!!e._loop,{start:o,end:s}=Pw(n,i,a,r);if(r===!0)return Yf(e,[{start:o,end:s,loop:a}],n,t);const l=s<o?s+i:s,u=!!e._fullLoop&&o===0&&s===i-1;return Yf(e,Mw(n,o,l,u),n,t)}function Yf(e,t,n,r){return!r||!r.setContext||!n?t:kw(e,t,n,r)}function kw(e,t,n,r){const i=e._chart.getContext(),a=Xf(e.options),{_datasetIndex:o,options:{spanGaps:s}}=e,l=n.length,u=[];let c=a,f=t[0].start,d=f;function h(p,m,g,v){const y=s?-1:1;if(p!==m){for(p+=l;n[p%l].skip;)p-=y;for(;n[m%l].skip;)m+=y;p%l!==m%l&&(u.push({start:p%l,end:m%l,loop:g,style:v}),c=v,f=m%l)}}for(const p of t){f=s?f:p.start;let m=n[f%l],g;for(d=f+1;d<=p.end;d++){const v=n[d%l];g=Xf(r.setContext(Fn(i,{type:"segment",p0:m,p1:v,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:o}))),Cw(g,c)&&h(f,d-1,p.loop,c),m=v,c=g}f<d-1&&h(f,d-1,p.loop,c)}return u}function Xf(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Cw(e,t){if(!t)return!1;const n=[],r=function(i,a){return Uu(a)?(n.includes(a)||n.push(a),n.indexOf(a)):a};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function Wi(e,t,n){return e.options.clip?e[n]:t[n]}function Ew(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:Wi(n,t,"left"),right:Wi(n,t,"right"),top:Wi(r,t,"top"),bottom:Wi(r,t,"bottom")}:t}function Tw(e,t){const n=t._clip;if(n.disabled)return!1;const r=Ew(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}class Dw{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const a=n.listeners[i],o=n.duration;a.forEach(s=>s({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(r-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Xm.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const a=r.items;let o=a.length-1,s=!1,l;for(;o>=0;--o)l=a[o],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),s=!0):(a[o]=a[a.length-1],a.pop());s&&(i.draw(),this._notify(i,r,t,"progress")),a.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=a.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var St=new Dw;const Gf="transparent",Iw={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=Ff(e||Gf),i=r.valid&&Ff(t||Gf);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class Rw{constructor(t,n,r,i){const a=n[r];i=zi([t.to,i,a,t.from]);const o=zi([t.from,a,i]);this._active=!0,this._fn=t.fn||Iw[t.type||typeof o],this._easing=Xr[t.easing]||Xr.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],a=r-this._start,o=this._duration-a;this._start=r,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=zi([t.to,n,i,t.from]),this._from=zi([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,a=this._from,o=this._loop,s=this._to;let l;if(this._active=a!==s&&(o||n<r),!this._active){this._target[i]=s,this._notify(!0);return}if(n<0){this._target[i]=a;return}l=n/r%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(a,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class cv{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!W(t))return;const n=Object.keys(ae.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const a=t[i];if(!W(a))return;const o={};for(const s of n)o[s]=a[s];(me(a.properties)&&a.properties||[i]).forEach(s=>{(s===i||!r.has(s))&&r.set(s,o)})})}_animateOptions(t,n){const r=n.options,i=Lw(t,r);if(!i)return[];const a=this._createAnimations(i,r);return r.$shared&&jw(t.options.$animations,r).then(()=>{t.options=r},()=>{}),a}_createAnimations(t,n){const r=this._properties,i=[],a=t.$animations||(t.$animations={}),o=Object.keys(n),s=Date.now();let l;for(l=o.length-1;l>=0;--l){const u=o[l];if(u.charAt(0)==="$")continue;if(u==="options"){i.push(...this._animateOptions(t,n));continue}const c=n[u];let f=a[u];const d=r.get(u);if(f)if(d&&f.active()){f.update(d,c,s);continue}else f.cancel();if(!d||!d.duration){t[u]=c;continue}a[u]=f=new Rw(d,t,u,c),i.push(f)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return St.add(this._chart,r),!0}}function jw(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const a=e[r[i]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function Lw(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Zf(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,a=n.max===void 0?t:0;return{start:r?a:i,end:r?i:a}}function Nw(e,t,n){if(n===!1)return!1;const r=Zf(e,n),i=Zf(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function Fw(e){let t,n,r,i;return W(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function fv(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,a;for(i=0,a=r.length;i<a;++i)n.push(r[i].index);return n}function Qf(e,t,n,r={}){const i=e.keys,a=r.mode==="single";let o,s,l,u;if(t===null)return;let c=!1;for(o=0,s=i.length;o<s;++o){if(l=+i[o],l===n){if(c=!0,r.all)continue;break}u=e.values[l],et(u)&&(a||t===0||yt(t)===yt(u))&&(t+=u)}return!c&&!r.all?0:t}function Bw(e,t){const{iScale:n,vScale:r}=t,i=n.axis==="x"?"x":"y",a=r.axis==="x"?"x":"y",o=Object.keys(e),s=new Array(o.length);let l,u,c;for(l=0,u=o.length;l<u;++l)c=o[l],s[l]={[i]:c,[a]:e[c]};return s}function rs(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function zw(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function $w(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function Ww(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function Jf(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const a=e[i.index];if(n&&a>0||!n&&a<0)return i.index}return null}function ed(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:a,vScale:o,index:s}=r,l=a.axis,u=o.axis,c=zw(a,o,r),f=t.length;let d;for(let h=0;h<f;++h){const p=t[h],{[l]:m,[u]:g}=p,v=p._stacks||(p._stacks={});d=v[u]=Ww(i,c,m),d[s]=g,d._top=Jf(d,o,!0,r.type),d._bottom=Jf(d,o,!1,r.type);const y=d._visualValues||(d._visualValues={});y[s]=g}}function is(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function qw(e,t){return Fn(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Uw(e,t,n){return Fn(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Ar(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const a=i._stacks;if(!a||a[r]===void 0||a[r][n]===void 0)return;delete a[r][n],a[r]._visualValues!==void 0&&a[r]._visualValues[n]!==void 0&&delete a[r]._visualValues[n]}}}const as=e=>e==="reset"||e==="none",td=(e,t)=>t?e:Object.assign({},e),Vw=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:fv(n,!0),values:null};class dr{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=rs(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Ar(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(f,d,h,p)=>f==="x"?d:f==="r"?p:h,a=n.xAxisID=K(r.xAxisID,is(t,"x")),o=n.yAxisID=K(r.yAxisID,is(t,"y")),s=n.rAxisID=K(r.rAxisID,is(t,"r")),l=n.indexAxis,u=n.iAxisID=i(l,a,o,s),c=n.vAxisID=i(l,o,a,s);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(s),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Rf(this._data,this),t._stacked&&Ar(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(W(n)){const i=this._cachedMeta;this._data=Bw(n,i)}else if(r!==n){if(r){Rf(r,this);const i=this._cachedMeta;Ar(i),i._parsed=[]}n&&Object.isExtensible(n)&&w_(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const a=n._stacked;n._stacked=rs(n.vScale,n),n.stack!==r.stack&&(i=!0,Ar(n),n.stack=r.stack),this._resyncElements(t),(i||a!==n._stacked)&&(ed(this,n._parsed),n._stacked=rs(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:a,_stacked:o}=r,s=a.axis;let l=t===0&&n===i.length?!0:r._sorted,u=t>0&&r._parsed[t-1],c,f,d;if(this._parsing===!1)r._parsed=i,r._sorted=!0,d=i;else{me(i[t])?d=this.parseArrayData(r,i,t,n):W(i[t])?d=this.parseObjectData(r,i,t,n):d=this.parsePrimitiveData(r,i,t,n);const h=()=>f[s]===null||u&&f[s]<u[s];for(c=0;c<n;++c)r._parsed[c+t]=f=d[c],l&&(h()&&(l=!1),u=f);r._sorted=l}o&&ed(this,d)}parsePrimitiveData(t,n,r,i){const{iScale:a,vScale:o}=t,s=a.axis,l=o.axis,u=a.getLabels(),c=a===o,f=new Array(i);let d,h,p;for(d=0,h=i;d<h;++d)p=d+r,f[d]={[s]:c||a.parse(u[p],p),[l]:o.parse(n[p],p)};return f}parseArrayData(t,n,r,i){const{xScale:a,yScale:o}=t,s=new Array(i);let l,u,c,f;for(l=0,u=i;l<u;++l)c=l+r,f=n[c],s[l]={x:a.parse(f[0],c),y:o.parse(f[1],c)};return s}parseObjectData(t,n,r,i){const{xScale:a,yScale:o}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,u=new Array(i);let c,f,d,h;for(c=0,f=i;c<f;++c)d=c+r,h=n[d],u[c]={x:a.parse(Xt(h,s),d),y:o.parse(Xt(h,l),d)};return u}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,a=this._cachedMeta,o=n[t.axis],s={keys:fv(i,!0),values:n._stacks[t.axis]._visualValues};return Qf(s,o,a.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const a=r[n.axis];let o=a===null?NaN:a;const s=i&&r._stacks[n.axis];i&&s&&(i.values=s,o=Qf(i,a,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,a=r._sorted&&t===r.iScale,o=i.length,s=this._getOtherScale(t),l=Vw(n,r,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:f}=$w(s);let d,h;function p(){h=i[d];const m=h[s.axis];return!et(h[t.axis])||c>m||f<m}for(d=0;d<o&&!(!p()&&(this.updateRangeFromParsed(u,t,h,l),a));++d);if(a){for(d=o-1;d>=0;--d)if(!p()){this.updateRangeFromParsed(u,t,h,l);break}}return u}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,a,o;for(i=0,a=n.length;i<a;++i)o=n[i][t.axis],et(o)&&r.push(o);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,a=this.getParsed(t);return{label:r?""+r.getLabelForValue(a[r.axis]):"",value:i?""+i.getLabelForValue(a[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=Fw(K(this.options.clip,Nw(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],a=n.chartArea,o=[],s=this._drawStart||0,l=this._drawCount||i.length-s,u=this.options.drawActiveElementsOnTop;let c;for(r.dataset&&r.dataset.draw(t,a,s,l),c=s;c<s+l;++c){const f=i[c];f.hidden||(f.active&&u?o.push(f):f.draw(t,a))}for(c=0;c<o.length;++c)o[c].draw(t,a)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];a=o.$context||(o.$context=Uw(this.getContext(),t,o)),a.parsed=this.getParsed(t),a.raw=i.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=qw(this.chart.getContext(),this.index)),a.dataset=i,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=r,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",a=this._cachedDataOpts,o=t+"-"+n,s=a[o],l=this.enableOptionSharing&&Jr(r);if(s)return td(s,l);const u=this.chart.config,c=u.datasetElementScopeKeys(this._type,t),f=i?[`${t}Hover`,"hover",t,""]:[t,""],d=u.getOptionScopes(this.getDataset(),c),h=Object.keys(ae.elements[t]),p=()=>this.getContext(r,i,n),m=u.resolveNamedOptions(d,h,p,f);return m.$shared&&(m.$shared=l,a[o]=Object.freeze(td(m,l))),m}_resolveAnimations(t,n,r){const i=this.chart,a=this._cachedDataOpts,o=`animation-${n}`,s=a[o];if(s)return s;let l;if(i.options.animation!==!1){const c=this.chart.config,f=c.datasetAnimationScopeKeys(this._type,n),d=c.getOptionScopes(this.getDataset(),f);l=c.createResolver(d,this.getContext(t,r,n))}const u=new cv(i,l&&l.animations);return l&&l._cacheable&&(a[o]=Object.freeze(u)),u}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||as(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,a=this.getSharedOptions(r),o=this.includeOptions(n,a)||a!==i;return this.updateSharedOptions(a,n,r),{sharedOptions:a,includeOptions:o}}updateElement(t,n,r,i){as(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!as(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const a=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[s,l,u]of this._syncList)this[s](l,u);this._syncList=[];const i=r.length,a=n.length,o=Math.min(a,i);o&&this.parse(0,o),a>i?this._insertElements(i,a-i,t):a<i&&this._removeElements(a,i-a)}_insertElements(t,n,r=!0){const i=this._cachedMeta,a=i.data,o=t+n;let s;const l=u=>{for(u.length+=n,s=u.length-1;s>=o;s--)u[s]=u[s-n]};for(l(a),s=t;s<o;++s)a[s]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),r&&this.updateElements(a,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&Ar(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Hw(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let i=0,a=n.length;i<a;i++)r=r.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=Ym(r.sort((i,a)=>i-a))}return e._cache.$bar}function Kw(e){const t=e.iScale,n=Hw(t,e.type);let r=t._length,i,a,o,s;const l=()=>{o===32767||o===-32768||(Jr(s)&&(r=Math.min(r,Math.abs(o-s)||r)),s=o)};for(i=0,a=n.length;i<a;++i)o=t.getPixelForValue(n[i]),l();for(s=void 0,i=0,a=t.ticks.length;i<a;++i)o=t.getPixelForTick(i),l();return r}function Yw(e,t,n,r){const i=n.barThickness;let a,o;return Y(i)?(a=t.min*n.categoryPercentage,o=n.barPercentage):(a=i*r,o=1),{chunk:a/r,ratio:o,start:t.pixels[e]-a/2}}function Xw(e,t,n,r){const i=t.pixels,a=i[e];let o=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;o===null&&(o=a-(s===null?t.end-t.start:s-a)),s===null&&(s=a+a-o);const u=a-(a-Math.min(o,s))/2*l;return{chunk:Math.abs(s-o)/2*l/r,ratio:n.barPercentage,start:u}}function Gw(e,t,n,r){const i=n.parse(e[0],r),a=n.parse(e[1],r),o=Math.min(i,a),s=Math.max(i,a);let l=o,u=s;Math.abs(o)>Math.abs(s)&&(l=s,u=o),t[n.axis]=u,t._custom={barStart:l,barEnd:u,start:i,end:a,min:o,max:s}}function dv(e,t,n,r){return me(e)?Gw(e,t,n,r):t[n.axis]=n.parse(e,r),t}function nd(e,t,n,r){const i=e.iScale,a=e.vScale,o=i.getLabels(),s=i===a,l=[];let u,c,f,d;for(u=n,c=n+r;u<c;++u)d=t[u],f={},f[i.axis]=s||i.parse(o[u],u),l.push(dv(d,f,a,u));return l}function os(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function Zw(e,t,n){return e!==0?yt(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function Qw(e){let t,n,r,i,a;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(i="end",a="start"):(i="start",a="end"),{start:n,end:r,reverse:t,top:i,bottom:a}}function Jw(e,t,n,r){let i=t.borderSkipped;const a={};if(!i){e.borderSkipped=a;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:s,reverse:l,top:u,bottom:c}=Qw(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=u:(n._bottom||0)===r?i=c:(a[rd(c,o,s,l)]=!0,i=u)),a[rd(i,o,s,l)]=!0,e.borderSkipped=a}function rd(e,t,n,r){return r?(e=e1(e,t,n),e=id(e,n,t)):e=id(e,t,n),e}function e1(e,t,n){return e===t?n:e===n?t:e}function id(e,t,n){return e==="start"?t:e==="end"?n:e}function t1(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class UL extends dr{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,n,r,i){return nd(t,n,r,i)}parseArrayData(t,n,r,i){return nd(t,n,r,i)}parseObjectData(t,n,r,i){const{iScale:a,vScale:o}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,u=a.axis==="x"?s:l,c=o.axis==="x"?s:l,f=[];let d,h,p,m;for(d=r,h=r+i;d<h;++d)m=n[d],p={},p[a.axis]=a.parse(Xt(m,u),d),f.push(dv(Xt(m,c),p,o,d));return f}updateRangeFromParsed(t,n,r,i){super.updateRangeFromParsed(t,n,r,i);const a=r._custom;a&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:i}=n,a=this.getParsed(t),o=a._custom,s=os(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(a[i.axis]);return{label:""+r.getLabelForValue(a[r.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,i){const a=i==="reset",{index:o,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),u=s.isHorizontal(),c=this._getRuler(),{sharedOptions:f,includeOptions:d}=this._getSharedOptions(n,i);for(let h=n;h<n+r;h++){const p=this.getParsed(h),m=a||Y(p[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(h),g=this._calculateBarIndexPixels(h,c),v=(p._stacks||{})[s.axis],y={horizontal:u,base:m.base,enableBorderRadius:!v||os(p._custom)||o===v._top||o===v._bottom,x:u?m.head:g.center,y:u?g.center:m.head,height:u?g.size:Math.abs(m.size),width:u?Math.abs(m.size):g.size};d&&(y.options=f||this.resolveDataElementOptions(h,t[h].active?"active":i));const b=y.options||t[h].options;Jw(y,b,v,o),t1(y,b,c.ratio),this.updateElement(t[h],h,y,i)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),a=r.options.stacked,o=[],s=this._cachedMeta.controller.getParsed(n),l=s&&s[r.axis],u=c=>{const f=c._parsed.find(h=>h[r.axis]===l),d=f&&f[c.vScale.axis];if(Y(d)||isNaN(d))return!0};for(const c of i)if(!(n!==void 0&&u(c))&&((a===!1||o.indexOf(c.stack)===-1||a===void 0&&c.stack===void 0)&&o.push(c.stack),c.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(r=>t[r].axis===n).shift()}_getAxis(){const t={},n=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)t[K(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,r){const i=this._getStacks(t,r),a=n!==void 0?i.indexOf(n):-1;return a===-1?i.length-1:a}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let a,o;for(a=0,o=n.data.length;a<o;++a)i.push(r.getPixelForValue(this.getParsed(a)[r.axis],a));const s=t.barThickness;return{min:s||Kw(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:a,minBarLength:o}}=this,s=a||0,l=this.getParsed(t),u=l._custom,c=os(u);let f=l[n.axis],d=0,h=r?this.applyStack(n,l,r):f,p,m;h!==f&&(d=h-f,h=f),c&&(f=u.barStart,h=u.barEnd-u.barStart,f!==0&&yt(f)!==yt(u.barEnd)&&(d=0),d+=f);const g=!Y(a)&&!c?a:d;let v=n.getPixelForValue(g);if(this.chart.getDataVisibility(t)?p=n.getPixelForValue(d+h):p=v,m=p-v,Math.abs(m)<o){m=Zw(m,n,s)*o,f===s&&(v-=m/2);const y=n.getPixelForDecimal(0),b=n.getPixelForDecimal(1),_=Math.min(y,b),x=Math.max(y,b);v=Math.max(Math.min(v,x),_),p=v+m,r&&!c&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(p)-n.getValueForPixel(v))}if(v===n.getPixelForValue(s)){const y=yt(m)*n.getLineWidthForValue(s)/2;v+=y,m-=y}return{size:m,base:v,head:p,center:p+m/2}}_calculateBarIndexPixels(t,n){const r=n.scale,i=this.options,a=i.skipNull,o=K(i.maxBarThickness,1/0);let s,l;const u=this._getAxisCount();if(n.grouped){const c=a?this._getStackCount(t):n.stackCount,f=i.barThickness==="flex"?Xw(t,n,i,c*u):Yw(t,n,i,c*u),d=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,h=this._getAxis().indexOf(K(d,this.getFirstScaleIdForIndexAxis())),p=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0)+h;s=f.start+f.chunk*p+f.chunk/2,l=Math.min(o,f.chunk*f.ratio)}else s=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(o,n.min*n.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,i=r.length;let a=0;for(;a<i;++a)this.getParsed(a)[n.axis]!==null&&!r[a].hidden&&r[a].draw(this._ctx)}}function n1(e,t,n){let r=1,i=1,a=0,o=0;if(t<Le){const s=e,l=s+t,u=Math.cos(s),c=Math.sin(s),f=Math.cos(l),d=Math.sin(l),h=(b,_,x)=>_a(b,s,l,!0)?1:Math.max(_,_*n,x,x*n),p=(b,_,x)=>_a(b,s,l,!0)?-1:Math.min(_,_*n,x,x*n),m=h(0,u,f),g=h(We,c,d),v=p(de,u,f),y=p(de+We,c,d);r=(m-v)/2,i=(g-y)/2,a=-(m+v)/2,o=-(g+y)/2}return{ratioX:r,ratioY:i,offsetX:a,offsetY:o}}class r1 extends dr{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data,{labels:{pointStyle:r,textAlign:i,color:a,useBorderRadius:o,borderRadius:s}}=t.legend.options;return n.labels.length&&n.datasets.length?n.labels.map((l,u)=>{const f=t.getDatasetMeta(0).controller.getStyle(u);return{text:l,fillStyle:f.backgroundColor,fontColor:a,hidden:!t.getDataVisibility(u),lineDash:f.borderDash,lineDashOffset:f.borderDashOffset,lineJoin:f.borderJoinStyle,lineWidth:f.borderWidth,strokeStyle:f.borderColor,textAlign:i,pointStyle:r,borderRadius:o&&(s||f.borderRadius),index:u}}):[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}};constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let a=l=>+r[l];if(W(r[t])){const{key:l="value"}=this._parsing;a=u=>+Xt(r[u],l)}let o,s;for(o=t,s=t+n;o<s;++o)i._parsed[o]=a(o)}}_getRotation(){return pt(this.options.rotation-90)}_getCircumference(){return pt(this.options.circumference)}_getRotationExtents(){let t=Le,n=-Le;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,a=i._getRotation(),o=i._getCircumference();t=Math.min(t,a),n=Math.max(n,a+o)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,a=i.data,o=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,s=Math.max((Math.min(r.width,r.height)-o)/2,0),l=Math.min(i_(this.options.cutout,s),1),u=this._getRingWeight(this.index),{circumference:c,rotation:f}=this._getRotationExtents(),{ratioX:d,ratioY:h,offsetX:p,offsetY:m}=n1(f,c,l),g=(r.width-o)/d,v=(r.height-o)/h,y=Math.max(Math.min(g,v)/2,0),b=Um(this.options.radius,y),_=Math.max(b*l,0),x=(b-_)/this._getVisibleDatasetWeightTotal();this.offsetX=p*b,this.offsetY=m*b,i.total=this.calculateTotal(),this.outerRadius=b-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*u,0),this.updateElements(a,0,a.length,t)}_circumference(t,n){const r=this.options,i=this._cachedMeta,a=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*a/Le)}updateElements(t,n,r,i){const a=i==="reset",o=this.chart,s=o.chartArea,u=o.options.animation,c=(s.left+s.right)/2,f=(s.top+s.bottom)/2,d=a&&u.animateScale,h=d?0:this.innerRadius,p=d?0:this.outerRadius,{sharedOptions:m,includeOptions:g}=this._getSharedOptions(n,i);let v=this._getRotation(),y;for(y=0;y<n;++y)v+=this._circumference(y,a);for(y=n;y<n+r;++y){const b=this._circumference(y,a),_=t[y],x={x:c+this.offsetX,y:f+this.offsetY,startAngle:v,endAngle:v+b,circumference:b,outerRadius:p,innerRadius:h};g&&(x.options=m||this.resolveDataElementOptions(y,_.active?"active":i)),v+=b,this.updateElement(_,y,x,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let r=0,i;for(i=0;i<n.length;i++){const a=t._parsed[i];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(a))}return r}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?Le*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],a=fo(n._parsed[t],r.options.locale);return{label:i[t]||"",value:a}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,a,o,s,l;if(!t){for(i=0,a=r.data.datasets.length;i<a;++i)if(r.isDatasetVisible(i)){o=r.getDatasetMeta(i),t=o.data,s=o.controller;break}}if(!t)return 0;for(i=0,a=t.length;i<a;++i)l=s.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,i=t.length;r<i;++r){const a=this.resolveDataElementOptions(r);n=Math.max(n,a.offset||0,a.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(K(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class VL extends dr{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:a}=n,o=this.chart._animationsDisabled;let{start:s,count:l}=Zm(n,i,o);this._drawStart=s,this._drawCount=l,Qm(n)&&(s=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!a._decimated,r.points=i;const u=this.resolveDatasetElementOptions(t);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(r,void 0,{animated:!o,options:u},t),this.updateElements(i,s,l,t)}updateElements(t,n,r,i){const a=i==="reset",{iScale:o,vScale:s,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:c,includeOptions:f}=this._getSharedOptions(n,i),d=o.axis,h=s.axis,{spanGaps:p,segment:m}=this.options,g=er(p)?p:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||a||i==="none",y=n+r,b=t.length;let _=n>0&&this.getParsed(n-1);for(let x=0;x<b;++x){const S=t[x],O=v?S:{};if(x<n||x>=y){O.skip=!0;continue}const M=this.getParsed(x),k=Y(M[h]),E=O[d]=o.getPixelForValue(M[d],x),T=O[h]=a||k?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,M,l):M[h],x);O.skip=isNaN(E)||isNaN(T)||k,O.stop=x>0&&Math.abs(M[d]-_[d])>g,m&&(O.parsed=M,O.raw=u.data[x]),f&&(O.options=c||this.resolveDataElementOptions(x,S.active?"active":i)),v||this.updateElement(S,x,O,i),_=M}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const a=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,a,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}class i1 extends dr{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((a,o)=>{const l=t.getDatasetMeta(0).controller.getStyle(o);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],a=fo(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:a}}parseObjectData(t,n,r,i){return tw.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,i)=>{const a=this.getParsed(i).r;!isNaN(a)&&this.chart.getDataVisibility(i)&&(a<n.min&&(n.min=a),a>n.max&&(n.max=a))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),a=Math.max(i/2,0),o=Math.max(r.cutoutPercentage?a/100*r.cutoutPercentage:1,0),s=(a-o)/t.getVisibleDatasetCount();this.outerRadius=a-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,n,r,i){const a=i==="reset",o=this.chart,l=o.options.animation,u=this._cachedMeta.rScale,c=u.xCenter,f=u.yCenter,d=u.getIndexAngle(0)-.5*de;let h=d,p;const m=360/this.countVisibleElements();for(p=0;p<n;++p)h+=this._computeAngle(p,i,m);for(p=n;p<n+r;p++){const g=t[p];let v=h,y=h+this._computeAngle(p,i,m),b=o.getDataVisibility(p)?u.getDistanceFromCenterForValue(this.getParsed(p).r):0;h=y,a&&(l.animateScale&&(b=0),l.animateRotate&&(v=y=d));const _={x:c,y:f,innerRadius:0,outerRadius:b,startAngle:v,endAngle:y,options:this.resolveDataElementOptions(p,g.active?"active":i)};this.updateElement(g,p,_,i)}}countVisibleElements(){const t=this._cachedMeta;let n=0;return t.data.forEach((r,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?pt(this.resolveDataElementOptions(t,n).angle||r):0}}class HL extends dr{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:a}=n,o=this.getParsed(t),s=i.getLabelForValue(o.x),l=a.getLabelForValue(o.y);return{label:r[t]||"",value:"("+s+", "+l+")"}}update(t){const n=this._cachedMeta,{data:r=[]}=n,i=this.chart._animationsDisabled;let{start:a,count:o}=Zm(n,r,i);if(this._drawStart=a,this._drawCount=o,Qm(n)&&(a=0,o=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:s,_dataset:l}=n;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!l._decimated,s.points=r;const u=this.resolveDatasetElementOptions(t);u.segment=this.options.segment,this.updateElement(s,void 0,{animated:!i,options:u},t)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(r,a,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,r,i){const a=i==="reset",{iScale:o,vScale:s,_stacked:l,_dataset:u}=this._cachedMeta,c=this.resolveDataElementOptions(n,i),f=this.getSharedOptions(c),d=this.includeOptions(i,f),h=o.axis,p=s.axis,{spanGaps:m,segment:g}=this.options,v=er(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||a||i==="none";let b=n>0&&this.getParsed(n-1);for(let _=n;_<n+r;++_){const x=t[_],S=this.getParsed(_),O=y?x:{},M=Y(S[p]),k=O[h]=o.getPixelForValue(S[h],_),E=O[p]=a||M?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,S,l):S[p],_);O.skip=isNaN(k)||isNaN(E)||M,O.stop=_>0&&Math.abs(S[h]-b[h])>v,g&&(O.parsed=S,O.raw=u.data[_]),d&&(O.options=f||this.resolveDataElementOptions(_,x.active?"active":i)),y||this.updateElement(x,_,O,i),b=S}this.updateSharedOptions(f,i,c)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let s=0;for(let l=n.length-1;l>=0;--l)s=Math.max(s,n[l].size(this.resolveDataElementOptions(l))/2);return s>0&&s}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const a=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,a,o)/2}}function dn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Gu{static override(t){Object.assign(Gu.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return dn()}parse(){return dn()}format(){return dn()}add(){return dn()}diff(){return dn()}startOf(){return dn()}endOf(){return dn()}}var a1={_date:Gu};function o1(e,t,n,r){const{controller:i,data:a,_sorted:o}=e,s=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!=="r"&&o&&a.length){const u=s._reversePixels?x_:wn;if(r){if(i._sharedOptions){const c=a[0],f=typeof c.getRange=="function"&&c.getRange(t);if(f){const d=u(a,t,n-f),h=u(a,t,n+f);return{lo:d.lo,hi:h.hi}}}}else{const c=u(a,t,n);if(l){const{vScale:f}=i._cachedMeta,{_parsed:d}=e,h=d.slice(0,c.lo+1).reverse().findIndex(m=>!Y(m[f.axis]));c.lo-=Math.max(0,h);const p=d.slice(c.hi).findIndex(m=>!Y(m[f.axis]));c.hi+=Math.max(0,p)}return c}}return{lo:0,hi:a.length-1}}function po(e,t,n,r,i){const a=e.getSortedVisibleDatasetMetas(),o=n[t];for(let s=0,l=a.length;s<l;++s){const{index:u,data:c}=a[s],{lo:f,hi:d}=o1(a[s],t,o,i);for(let h=f;h<=d;++h){const p=c[h];p.skip||r(p,u,h)}}}function s1(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const a=t?Math.abs(r.x-i.x):0,o=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(o,2))}}function ss(e,t,n,r,i){const a=[];return!i&&!e.isPointInArea(t)||po(e,n,t,function(s,l,u){!i&&!ei(s,e.chartArea,0)||s.inRange(t.x,t.y,r)&&a.push({element:s,datasetIndex:l,index:u})},!0),a}function l1(e,t,n,r){let i=[];function a(o,s,l){const{startAngle:u,endAngle:c}=o.getProps(["startAngle","endAngle"],r),{angle:f}=v_(o,{x:t.x,y:t.y});_a(f,u,c)&&i.push({element:o,datasetIndex:s,index:l})}return po(e,n,t,a),i}function u1(e,t,n,r,i,a){let o=[];const s=s1(n);let l=Number.POSITIVE_INFINITY;function u(c,f,d){const h=c.inRange(t.x,t.y,i);if(r&&!h)return;const p=c.getCenterPoint(i);if(!(!!a||e.isPointInArea(p))&&!h)return;const g=s(t,p);g<l?(o=[{element:c,datasetIndex:f,index:d}],l=g):g===l&&o.push({element:c,datasetIndex:f,index:d})}return po(e,n,t,u),o}function ls(e,t,n,r,i,a){return!a&&!e.isPointInArea(t)?[]:n==="r"&&!r?l1(e,t,n,i):u1(e,t,n,r,i,a)}function ad(e,t,n,r,i){const a=[],o=n==="x"?"inXRange":"inYRange";let s=!1;return po(e,n,t,(l,u,c)=>{l[o]&&l[o](t[n],i)&&(a.push({element:l,datasetIndex:u,index:c}),s=s||l.inRange(t.x,t.y,i))}),r&&!s?[]:a}var c1={modes:{index(e,t,n,r){const i=vn(t,e),a=n.axis||"x",o=n.includeInvisible||!1,s=n.intersect?ss(e,i,a,r,o):ls(e,i,a,!1,r,o),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(u=>{const c=s[0].index,f=u.data[c];f&&!f.skip&&l.push({element:f,datasetIndex:u.index,index:c})}),l):[]},dataset(e,t,n,r){const i=vn(t,e),a=n.axis||"xy",o=n.includeInvisible||!1;let s=n.intersect?ss(e,i,a,r,o):ls(e,i,a,!1,r,o);if(s.length>0){const l=s[0].datasetIndex,u=e.getDatasetMeta(l).data;s=[];for(let c=0;c<u.length;++c)s.push({element:u[c],datasetIndex:l,index:c})}return s},point(e,t,n,r){const i=vn(t,e),a=n.axis||"xy",o=n.includeInvisible||!1;return ss(e,i,a,r,o)},nearest(e,t,n,r){const i=vn(t,e),a=n.axis||"xy",o=n.includeInvisible||!1;return ls(e,i,a,n.intersect,r,o)},x(e,t,n,r){const i=vn(t,e);return ad(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=vn(t,e);return ad(e,i,"y",n.intersect,r)}}};const hv=["left","top","right","bottom"];function kr(e,t){return e.filter(n=>n.pos===t)}function od(e,t){return e.filter(n=>hv.indexOf(n.pos)===-1&&n.box.axis===t)}function Cr(e,t){return e.sort((n,r)=>{const i=t?r:n,a=t?n:r;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function f1(e){const t=[];let n,r,i,a,o,s;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:a,options:{stack:o,stackWeight:s=1}}=i,t.push({index:n,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&a+o,stackWeight:s});return t}function d1(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:a}=n;if(!r||!hv.includes(i))continue;const o=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=a}return t}function h1(e,t){const n=d1(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let a,o,s;for(a=0,o=e.length;a<o;++a){s=e[a];const{fullSize:l}=s.box,u=n[s.stack],c=u&&s.stackWeight/u.weight;s.horizontal?(s.width=c?c*r:l&&t.availableWidth,s.height=i):(s.width=r,s.height=c?c*i:l&&t.availableHeight)}return n}function p1(e){const t=f1(e),n=Cr(t.filter(u=>u.box.fullSize),!0),r=Cr(kr(t,"left"),!0),i=Cr(kr(t,"right")),a=Cr(kr(t,"top"),!0),o=Cr(kr(t,"bottom")),s=od(t,"x"),l=od(t,"y");return{fullSize:n,leftAndTop:r.concat(a),rightAndBottom:i.concat(l).concat(o).concat(s),chartArea:kr(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:a.concat(o).concat(s)}}function sd(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function pv(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function g1(e,t,n,r){const{pos:i,box:a}=n,o=e.maxPadding;if(!W(i)){n.size&&(e[i]-=n.size);const f=r[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?a.height:a.width),n.size=f.size/f.count,e[i]+=n.size}a.getPadding&&pv(o,a.getPadding());const s=Math.max(0,t.outerWidth-sd(o,e,"left","right")),l=Math.max(0,t.outerHeight-sd(o,e,"top","bottom")),u=s!==e.w,c=l!==e.h;return e.w=s,e.h=l,n.horizontal?{same:u,other:c}:{same:c,other:u}}function m1(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function v1(e,t){const n=t.maxPadding;function r(i){const a={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{a[o]=Math.max(t[o],n[o])}),a}return r(e?["left","right"]:["top","bottom"])}function qr(e,t,n,r){const i=[];let a,o,s,l,u,c;for(a=0,o=e.length,u=0;a<o;++a){s=e[a],l=s.box,l.update(s.width||t.w,s.height||t.h,v1(s.horizontal,t));const{same:f,other:d}=g1(t,n,s,r);u|=f&&i.length,c=c||d,l.fullSize||i.push(s)}return u&&qr(i,t,n,r)||c}function qi(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function ld(e,t,n,r){const i=n.padding;let{x:a,y:o}=t;for(const s of e){const l=s.box,u=r[s.stack]||{placed:0,weight:1},c=s.stackWeight/u.weight||1;if(s.horizontal){const f=t.w*c,d=u.size||l.height;Jr(u.start)&&(o=u.start),l.fullSize?qi(l,i.left,o,n.outerWidth-i.right-i.left,d):qi(l,t.left+u.placed,o,f,d),u.start=o,u.placed+=f,o=l.bottom}else{const f=t.h*c,d=u.size||l.width;Jr(u.start)&&(a=u.start),l.fullSize?qi(l,a,i.top,d,n.outerHeight-i.bottom-i.top):qi(l,a,t.top+u.placed,d,f),u.start=a,u.placed+=f,a=l.right}}t.x=a,t.y=o}var Ui={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=Zt(e.options.layout.padding),a=Math.max(t-i.width,0),o=Math.max(n-i.height,0),s=p1(e.boxes),l=s.vertical,u=s.horizontal;X(e.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const c=l.reduce((m,g)=>g.box.options&&g.box.options.display===!1?m:m+1,0)||1,f=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/c,hBoxMaxHeight:o/2}),d=Object.assign({},i);pv(d,Zt(r));const h=Object.assign({maxPadding:d,w:a,h:o,x:i.left,y:i.top},i),p=h1(l.concat(u),f);qr(s.fullSize,h,f,p),qr(l,h,f,p),qr(u,h,f,p)&&qr(l,h,f,p),m1(h),ld(s.leftAndTop,h,f,p),h.x+=h.w,h.y+=h.h,ld(s.rightAndBottom,h,f,p),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},X(s.chartArea,m=>{const g=m.box;Object.assign(g,e.chartArea),g.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class gv{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class y1 extends gv{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ha="$chartjs",b1={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ud=e=>e===null||e==="";function x1(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[ha]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",ud(i)){const a=Hf(e,"width");a!==void 0&&(e.width=a)}if(ud(r))if(e.style.height==="")e.height=e.width/(t||2);else{const a=Hf(e,"height");a!==void 0&&(e.height=a)}return e}const mv=gw?{passive:!0}:!1;function _1(e,t,n){e&&e.addEventListener(t,n,mv)}function w1(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,mv)}function S1(e,t){const n=b1[e.type]||e.type,{x:r,y:i}=vn(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function Sa(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function O1(e,t,n){const r=e.canvas,i=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||Sa(s.addedNodes,r),o=o&&!Sa(s.removedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function P1(e,t,n){const r=e.canvas,i=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||Sa(s.removedNodes,r),o=o&&!Sa(s.addedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const ti=new Map;let cd=0;function vv(){const e=window.devicePixelRatio;e!==cd&&(cd=e,ti.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function M1(e,t){ti.size||window.addEventListener("resize",vv),ti.set(e,t)}function A1(e){ti.delete(e),ti.size||window.removeEventListener("resize",vv)}function k1(e,t,n){const r=e.canvas,i=r&&Xu(r);if(!i)return;const a=Gm((s,l)=>{const u=i.clientWidth;n(s,l),u<i.clientWidth&&n()},window),o=new ResizeObserver(s=>{const l=s[0],u=l.contentRect.width,c=l.contentRect.height;u===0&&c===0||a(u,c)});return o.observe(i),M1(e,a),o}function us(e,t,n){n&&n.disconnect(),t==="resize"&&A1(e)}function C1(e,t,n){const r=e.canvas,i=Gm(a=>{e.ctx!==null&&n(S1(a,e))},e);return _1(r,t,i),i}class E1 extends gv{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(x1(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[ha])return!1;const r=n[ha].initial;["height","width"].forEach(a=>{const o=r[a];Y(o)?n.removeAttribute(a):n.setAttribute(a,o)});const i=r.style||{};return Object.keys(i).forEach(a=>{n.style[a]=i[a]}),n.width=n.width,delete n[ha],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),o={attach:O1,detach:P1,resize:k1}[n]||C1;i[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:us,detach:us,resize:us}[n]||w1)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return pw(t,n,r,i)}isAttached(t){const n=t&&Xu(t);return!!(n&&n.isConnected)}}function T1(e){return!Yu()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?y1:E1}class hr{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return er(this.x)&&er(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(a=>{i[a]=r[a]&&r[a].active()?r[a]._to:this[a]}),i}}function D1(e,t){const n=e.options.ticks,r=I1(e),i=Math.min(n.maxTicksLimit||r,r),a=n.major.enabled?j1(t):[],o=a.length,s=a[0],l=a[o-1],u=[];if(o>i)return L1(t,u,a,o/i),u;const c=R1(a,t,i);if(o>0){let f,d;const h=o>1?Math.round((l-s)/(o-1)):null;for(Vi(t,u,c,Y(h)?0:s-h,s),f=0,d=o-1;f<d;f++)Vi(t,u,c,a[f],a[f+1]);return Vi(t,u,c,l,Y(h)?t.length:l+h),u}return Vi(t,u,c),u}function I1(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function R1(e,t,n){const r=N1(e),i=t.length/n;if(!r)return Math.max(i,1);const a=d_(r);for(let o=0,s=a.length-1;o<s;o++){const l=a[o];if(l>i)return l}return Math.max(i,1)}function j1(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function L1(e,t,n,r){let i=0,a=n[0],o;for(r=Math.ceil(r),o=0;o<e.length;o++)o===a&&(t.push(e[o]),i++,a=n[i*r])}function Vi(e,t,n,r,i){const a=K(r,0),o=Math.min(K(i,e.length),e.length);let s=0,l,u,c;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),c=a;c<0;)s++,c=Math.round(a+s*n);for(u=Math.max(a,0);u<o;u++)u===c&&(t.push(e[u]),s++,c=Math.round(a+s*n))}function N1(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const F1=e=>e==="left"?"right":e==="right"?"left":e,fd=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,dd=(e,t)=>Math.min(t||e,e);function hd(e,t){const n=[],r=e.length/t,i=e.length;let a=0;for(;a<i;a+=r)n.push(e[Math.floor(a)]);return n}function B1(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),a=e._startPixel,o=e._endPixel,s=1e-6;let l=e.getPixelForTick(i),u;if(!(n&&(r===1?u=Math.max(l-a,o-l):t===0?u=(e.getPixelForTick(1)-l)/2:u=(l-e.getPixelForTick(i-1))/2,l+=i<t?u:-u,l<a-s||l>o+s)))return l}function z1(e,t){X(e,n=>{const r=n.gc,i=r.length/2;let a;if(i>t){for(a=0;a<i;++a)delete n.data[r[a]];r.splice(0,i)}})}function Er(e){return e.drawTicks?e.tickLength:0}function pd(e,t){if(!e.display)return 0;const n=gt(e.font,t),r=Zt(e.padding);return(me(e.text)?e.text.length:1)*n.lineHeight+r.height}function $1(e,t){return Fn(e,{scale:t,type:"scale"})}function W1(e,t,n){return Fn(e,{tick:n,index:t,type:"tick"})}function q1(e,t,n){let r=O_(e);return(n&&t!=="right"||!n&&t==="right")&&(r=F1(r)),r}function U1(e,t,n,r){const{top:i,left:a,bottom:o,right:s,chart:l}=e,{chartArea:u,scales:c}=l;let f=0,d,h,p;const m=o-i,g=s-a;if(e.isHorizontal()){if(h=jf(r,a,s),W(n)){const v=Object.keys(n)[0],y=n[v];p=c[v].getPixelForValue(y)+m-t}else n==="center"?p=(u.bottom+u.top)/2+m-t:p=fd(e,n,t);d=s-a}else{if(W(n)){const v=Object.keys(n)[0],y=n[v];h=c[v].getPixelForValue(y)-g+t}else n==="center"?h=(u.left+u.right)/2-g+t:h=fd(e,n,t);p=jf(r,o,i),f=n==="left"?-We:We}return{titleX:h,titleY:p,maxWidth:d,rotation:f}}class pr extends hr{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=ut(t,Number.POSITIVE_INFINITY),n=ut(n,Number.NEGATIVE_INFINITY),r=ut(r,Number.POSITIVE_INFINITY),i=ut(i,Number.NEGATIVE_INFINITY),{min:ut(t,r),max:ut(n,i),minDefined:et(t),maxDefined:et(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:a}=this.getUserBounds(),o;if(i&&a)return{min:n,max:r};const s=this.getMatchingVisibleMetas();for(let l=0,u=s.length;l<u;++l)o=s[l].controller.getMinMax(this,t),i||(n=Math.min(n,o.min)),a||(r=Math.max(r,o.max));return n=a&&n>r?r:n,r=i&&n>r?n:r,{min:ut(n,ut(r,n)),max:ut(r,ut(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){le(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:a,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=V_(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?hd(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=D1(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){le(this.options.afterUpdate,[this])}beforeSetDimensions(){le(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){le(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),le(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){le(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,a;for(r=0,i=t.length;r<i;r++)a=t[r],a.label=le(n.callback,[a.value,r,t],this)}afterTickToLabelConversion(){le(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){le(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=dd(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,a=n.maxRotation;let o=i,s,l,u;if(!this._isVisible()||!n.display||i>=a||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const c=this._getLabelSizes(),f=c.widest.width,d=c.highest.height,h=qe(this.chart.width-f,0,this.maxWidth);s=t.offset?this.maxWidth/r:h/(r-1),f+6>s&&(s=h/(r-(t.offset?.5:1)),l=this.maxHeight-Er(t.grid)-n.padding-pd(t.title,this.chart.options.font),u=Math.sqrt(f*f+d*d),o=m_(Math.min(Math.asin(qe((c.highest.height+6)/s,-1,1)),Math.asin(qe(l/u,-1,1))-Math.asin(qe(d/u,-1,1)))),o=Math.max(i,Math.min(a,o))),this.labelRotation=o}afterCalculateLabelRotation(){le(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){le(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:a}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const l=pd(i,n.options.font);if(s?(t.width=this.maxWidth,t.height=Er(a)+l):(t.height=this.maxHeight,t.width=Er(a)+l),r.display&&this.ticks.length){const{first:u,last:c,widest:f,highest:d}=this._getLabelSizes(),h=r.padding*2,p=pt(this.labelRotation),m=Math.cos(p),g=Math.sin(p);if(s){const v=r.mirror?0:g*f.width+m*d.height;t.height=Math.min(this.maxHeight,t.height+v+h)}else{const v=r.mirror?0:m*f.width+g*d.height;t.width=Math.min(this.maxWidth,t.width+v+h)}this._calculatePadding(u,c,g,m)}}this._handleMargins(),s?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:a,padding:o},position:s}=this.options,l=this.labelRotation!==0,u=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,h=0;l?u?(d=i*t.width,h=r*n.height):(d=r*t.height,h=i*n.width):a==="start"?h=n.width:a==="end"?d=t.width:a!=="inner"&&(d=t.width/2,h=n.width/2),this.paddingLeft=Math.max((d-c+o)*this.width/(this.width-c),0),this.paddingRight=Math.max((h-f+o)*this.width/(this.width-f),0)}else{let c=n.height/2,f=t.height/2;a==="start"?(c=0,f=t.height):a==="end"&&(c=n.height,f=0),this.paddingTop=c+o,this.paddingBottom=f+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){le(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)Y(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=hd(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:a}=this,o=[],s=[],l=Math.floor(n/dd(n,r));let u=0,c=0,f,d,h,p,m,g,v,y,b,_,x;for(f=0;f<n;f+=l){if(p=t[f].label,m=this._resolveTickFontOptions(f),i.font=g=m.string,v=a[g]=a[g]||{data:{},gc:[]},y=m.lineHeight,b=_=0,!Y(p)&&!me(p))b=zf(i,v.data,v.gc,b,p),_=y;else if(me(p))for(d=0,h=p.length;d<h;++d)x=p[d],!Y(x)&&!me(x)&&(b=zf(i,v.data,v.gc,b,x),_+=y);o.push(b),s.push(_),u=Math.max(b,u),c=Math.max(_,c)}z1(a,n);const S=o.indexOf(u),O=s.indexOf(c),M=k=>({width:o[k]||0,height:s[k]||0});return{first:M(0),last:M(n-1),widest:M(S),highest:M(O),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return b_(this._alignToPixels?fn(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=W1(this.getContext(),t,r))}return this.$context||(this.$context=$1(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=pt(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),a=this._getLabelSizes(),o=t.autoSkipPadding||0,s=a?a.widest.width+o:0,l=a?a.highest.height+o:0;return this.isHorizontal()?l*r>s*i?s/r:l/i:l*i<s*r?l/r:s/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:a,position:o,border:s}=i,l=a.offset,u=this.isHorizontal(),f=this.ticks.length+(l?1:0),d=Er(a),h=[],p=s.setContext(this.getContext()),m=p.display?p.width:0,g=m/2,v=function(N){return fn(r,N,m)};let y,b,_,x,S,O,M,k,E,T,A,F;if(o==="top")y=v(this.bottom),O=this.bottom-d,k=y-g,T=v(t.top)+g,F=t.bottom;else if(o==="bottom")y=v(this.top),T=t.top,F=v(t.bottom)-g,O=y+g,k=this.top+d;else if(o==="left")y=v(this.right),S=this.right-d,M=y-g,E=v(t.left)+g,A=t.right;else if(o==="right")y=v(this.left),E=t.left,A=v(t.right)-g,S=y+g,M=this.left+d;else if(n==="x"){if(o==="center")y=v((t.top+t.bottom)/2+.5);else if(W(o)){const N=Object.keys(o)[0],B=o[N];y=v(this.chart.scales[N].getPixelForValue(B))}T=t.top,F=t.bottom,O=y+g,k=O+d}else if(n==="y"){if(o==="center")y=v((t.left+t.right)/2);else if(W(o)){const N=Object.keys(o)[0],B=o[N];y=v(this.chart.scales[N].getPixelForValue(B))}S=y-g,M=S-d,E=t.left,A=t.right}const L=K(i.ticks.maxTicksLimit,f),I=Math.max(1,Math.ceil(f/L));for(b=0;b<f;b+=I){const N=this.getContext(b),B=a.setContext(N),oe=s.setContext(N),J=B.lineWidth,H=B.color,Me=oe.dash||[],se=oe.dashOffset,_e=B.tickWidth,re=B.tickColor,we=B.tickBorderDash||[],Se=B.tickBorderDashOffset;_=B1(this,b,l),_!==void 0&&(x=fn(r,_,J),u?S=M=E=A=x:O=k=T=F=x,h.push({tx1:S,ty1:O,tx2:M,ty2:k,x1:E,y1:T,x2:A,y2:F,width:J,color:H,borderDash:Me,borderDashOffset:se,tickWidth:_e,tickColor:re,tickBorderDash:we,tickBorderDashOffset:Se}))}return this._ticksLength=f,this._borderValue=y,h}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:a}=r,o=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:u,padding:c,mirror:f}=a,d=Er(r.grid),h=d+c,p=f?-c:h,m=-pt(this.labelRotation),g=[];let v,y,b,_,x,S,O,M,k,E,T,A,F="middle";if(i==="top")S=this.bottom-p,O=this._getXAxisLabelAlignment();else if(i==="bottom")S=this.top+p,O=this._getXAxisLabelAlignment();else if(i==="left"){const I=this._getYAxisLabelAlignment(d);O=I.textAlign,x=I.x}else if(i==="right"){const I=this._getYAxisLabelAlignment(d);O=I.textAlign,x=I.x}else if(n==="x"){if(i==="center")S=(t.top+t.bottom)/2+h;else if(W(i)){const I=Object.keys(i)[0],N=i[I];S=this.chart.scales[I].getPixelForValue(N)+h}O=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")x=(t.left+t.right)/2-h;else if(W(i)){const I=Object.keys(i)[0],N=i[I];x=this.chart.scales[I].getPixelForValue(N)}O=this._getYAxisLabelAlignment(d).textAlign}n==="y"&&(l==="start"?F="top":l==="end"&&(F="bottom"));const L=this._getLabelSizes();for(v=0,y=s.length;v<y;++v){b=s[v],_=b.label;const I=a.setContext(this.getContext(v));M=this.getPixelForTick(v)+a.labelOffset,k=this._resolveTickFontOptions(v),E=k.lineHeight,T=me(_)?_.length:1;const N=T/2,B=I.color,oe=I.textStrokeColor,J=I.textStrokeWidth;let H=O;o?(x=M,O==="inner"&&(v===y-1?H=this.options.reverse?"left":"right":v===0?H=this.options.reverse?"right":"left":H="center"),i==="top"?u==="near"||m!==0?A=-T*E+E/2:u==="center"?A=-L.highest.height/2-N*E+E:A=-L.highest.height+E/2:u==="near"||m!==0?A=E/2:u==="center"?A=L.highest.height/2-N*E:A=L.highest.height-T*E,f&&(A*=-1),m!==0&&!I.showLabelBackdrop&&(x+=E/2*Math.sin(m))):(S=M,A=(1-T)*E/2);let Me;if(I.showLabelBackdrop){const se=Zt(I.backdropPadding),_e=L.heights[v],re=L.widths[v];let we=A-se.top,Se=0-se.left;switch(F){case"middle":we-=_e/2;break;case"bottom":we-=_e;break}switch(O){case"center":Se-=re/2;break;case"right":Se-=re;break;case"inner":v===y-1?Se-=re:v>0&&(Se-=re/2);break}Me={left:Se,top:we,width:re+se.width,height:_e+se.height,color:I.backdropColor}}g.push({label:_,font:k,textOffset:A,options:{rotation:m,color:B,strokeColor:oe,strokeWidth:J,textAlign:H,textBaseline:F,translation:[x,S],backdrop:Me}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-pt(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:a}}=this.options,o=this._getLabelSizes(),s=t+a,l=o.widest.width;let u,c;return n==="left"?i?(c=this.right+a,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c+=l)):(c=this.right-s,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c=this.left)):n==="right"?i?(c=this.left+a,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c-=l)):(c=this.left+s,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c=this.right)):u="right",{textAlign:u,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:a,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,a,o),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(a=>a.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,o;const s=(l,u,c)=>{!c.width||!c.color||(r.save(),r.lineWidth=c.width,r.strokeStyle=c.color,r.setLineDash(c.borderDash||[]),r.lineDashOffset=c.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(u.x,u.y),r.stroke(),r.restore())};if(n.display)for(a=0,o=i.length;a<o;++a){const l=i[a];n.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:i}}=this,a=r.setContext(this.getContext()),o=r.display?a.width:0;if(!o)return;const s=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let u,c,f,d;this.isHorizontal()?(u=fn(t,this.left,o)-o/2,c=fn(t,this.right,s)+s/2,f=d=l):(f=fn(t,this.top,o)-o/2,d=fn(t,this.bottom,s)+s/2,u=c=l),n.save(),n.lineWidth=a.width,n.strokeStyle=a.color,n.beginPath(),n.moveTo(u,f),n.lineTo(c,d),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&ev(r,i);const a=this.getLabelItems(t);for(const o of a){const s=o.options,l=o.font,u=o.label,c=o.textOffset;Wf(r,u,0,c,l,s)}i&&tv(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const a=gt(r.font),o=Zt(r.padding),s=r.align;let l=a.lineHeight/2;n==="bottom"||n==="center"||W(n)?(l+=o.bottom,me(r.text)&&(l+=a.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:u,titleY:c,maxWidth:f,rotation:d}=U1(this,l,n,s);Wf(t,r.text,0,0,a,{color:r.color,maxWidth:f,rotation:d,textAlign:q1(s,n,i),textBaseline:"middle",translation:[u,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=K(t.grid&&t.grid.z,-1),i=K(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==pr.prototype.draw?[{z:n,draw:a=>{this.draw(a)}}]:[{z:r,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let a,o;for(a=0,o=n.length;a<o;++a){const s=n[a];s[r]===this.id&&(!t||s.type===t)&&i.push(s)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return gt(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Hi{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;K1(n)&&(r=this.register(n));const i=this.items,a=t.id,o=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in i||(i[a]=t,V1(t,o,r),this.override&&ae.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in ae[i]&&(delete ae[i][r],this.override&&delete Tn[r])}}function V1(e,t,n){const r=Qr(Object.create(null),[n?ae.get(n):{},ae.get(t),e.defaults]);ae.set(t,r),e.defaultRoutes&&H1(t,e.defaultRoutes),e.descriptors&&ae.describe(t,e.descriptors)}function H1(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),a=[e].concat(r).join("."),o=t[n].split("."),s=o.pop(),l=o.join(".");ae.route(a,i,l,s)})}function K1(e){return"id"in e&&"defaults"in e}class Y1{constructor(){this.controllers=new Hi(dr,"datasets",!0),this.elements=new Hi(hr,"elements"),this.plugins=new Hi(Object,"plugins"),this.scales=new Hi(pr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const a=r||this._getRegistryForType(i);r||a.isForType(i)||a===this.plugins&&i.id?this._exec(t,a,i):X(i,o=>{const s=r||this._getRegistryForType(o);this._exec(t,s,o)})})}_exec(t,n,r){const i=Wu(t);le(r["before"+i],[],r),n[t](r),le(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var ht=new Y1;class X1{constructor(){this._init=void 0}notify(t,n,r,i){if(n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;const a=i?this._descriptors(t).filter(i):this._descriptors(t),o=this._notify(a,t,n,r);return n==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),o}_notify(t,n,r,i){i=i||{};for(const a of t){const o=a.plugin,s=o[r],l=[n,i,a.options];if(le(s,l,o)===!1&&i.cancelable)return!1}return!0}invalidate(){Y(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=K(r.options&&r.options.plugins,{}),a=G1(r);return i===!1&&!n?[]:Q1(t,a,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(a,o)=>a.filter(s=>!o.some(l=>s.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function G1(e){const t={},n=[],r=Object.keys(ht.plugins.items);for(let a=0;a<r.length;a++)n.push(ht.getPlugin(r[a]));const i=e.plugins||[];for(let a=0;a<i.length;a++){const o=i[a];n.indexOf(o)===-1&&(n.push(o),t[o.id]=!0)}return{plugins:n,localIds:t}}function Z1(e,t){return!t&&e===!1?null:e===!0?{}:e}function Q1(e,{plugins:t,localIds:n},r,i){const a=[],o=e.getContext();for(const s of t){const l=s.id,u=Z1(r[l],i);u!==null&&a.push({plugin:s,options:J1(e.config,{plugin:s,local:n[l]},u,o)})}return a}function J1(e,{plugin:t,local:n},r,i){const a=e.pluginScopeKeys(t),o=e.getOptionScopes(r,a);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Yl(e,t){const n=ae.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function eS(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function tS(e,t){return e===t?"_index_":"_value_"}function gd(e){if(e==="x"||e==="y"||e==="r")return e}function nS(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Xl(e,...t){if(gd(e))return e;for(const n of t){const r=n.axis||nS(n.position)||e.length>1&&gd(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function md(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function rS(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return md(e,"x",n[0])||md(e,"y",n[0])}return{}}function iS(e,t){const n=Tn[e.type]||{scales:{}},r=t.scales||{},i=Yl(e.type,t),a=Object.create(null);return Object.keys(r).forEach(o=>{const s=r[o];if(!W(s))return console.error(`Invalid scale configuration for scale: ${o}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=Xl(o,s,rS(o,e),ae.scales[s.type]),u=tS(l,i),c=n.scales||{};a[o]=Kr(Object.create(null),[{axis:l},s,c[l],c[u]])}),e.data.datasets.forEach(o=>{const s=o.type||e.type,l=o.indexAxis||Yl(s,t),c=(Tn[s]||{}).scales||{};Object.keys(c).forEach(f=>{const d=eS(f,l),h=o[d+"AxisID"]||d;a[h]=a[h]||Object.create(null),Kr(a[h],[{axis:d},r[h],c[f]])})}),Object.keys(a).forEach(o=>{const s=a[o];Kr(s,[ae.scales[s.type],ae.scale])}),a}function yv(e){const t=e.options||(e.options={});t.plugins=K(t.plugins,{}),t.scales=iS(e,t)}function bv(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function aS(e){return e=e||{},e.data=bv(e.data),yv(e),e}const vd=new Map,xv=new Set;function Ki(e,t){let n=vd.get(e);return n||(n=t(),vd.set(e,n),xv.add(n)),n}const Tr=(e,t,n)=>{const r=Xt(t,n);r!==void 0&&e.add(r)};class oS{constructor(t){this._config=aS(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=bv(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),yv(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ki(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Ki(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Ki(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Ki(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:a}=this,o=this._cachedScopes(t,r),s=o.get(n);if(s)return s;const l=new Set;n.forEach(c=>{t&&(l.add(t),c.forEach(f=>Tr(l,t,f))),c.forEach(f=>Tr(l,i,f)),c.forEach(f=>Tr(l,Tn[a]||{},f)),c.forEach(f=>Tr(l,ae,f)),c.forEach(f=>Tr(l,Vl,f))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),xv.has(n)&&o.set(n,u),u}chartOptionScopes(){const{options:t,type:n}=this;return[t,Tn[n]||{},ae.datasets[n]||{},{type:n},ae,Vl]}resolveNamedOptions(t,n,r,i=[""]){const a={$shared:!0},{resolver:o,subPrefixes:s}=yd(this._resolverCache,t,i);let l=o;if(lS(o,n)){a.$shared=!1,r=Gt(r)?r():r;const u=this.createResolver(t,r,s);l=tr(o,r,u)}for(const u of n)a[u]=l[u];return a}createResolver(t,n,r=[""],i){const{resolver:a}=yd(this._resolverCache,t,r);return W(n)?tr(a,n,void 0,i):a}}function yd(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let a=r.get(i);return a||(a={resolver:Vu(t,n),subPrefixes:n.filter(s=>!s.toLowerCase().includes("hover"))},r.set(i,a)),a}const sS=e=>W(e)&&Object.getOwnPropertyNames(e).some(t=>Gt(e[t]));function lS(e,t){const{isScriptable:n,isIndexable:r}=iv(e);for(const i of t){const a=n(i),o=r(i),s=(o||a)&&e[i];if(a&&(Gt(s)||sS(s))||o&&me(s))return!0}return!1}var uS="4.5.1";const cS=["top","bottom","left","right","chartArea"];function bd(e,t){return e==="top"||e==="bottom"||cS.indexOf(e)===-1&&t==="x"}function xd(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function _d(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),le(n&&n.onComplete,[e],t)}function fS(e){const t=e.chart,n=t.options.animation;le(n&&n.onProgress,[e],t)}function _v(e){return Yu()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const pa={},wd=e=>{const t=_v(e);return Object.values(pa).filter(n=>n.canvas===t).pop()};function dS(e,t,n){const r=Object.keys(e);for(const i of r){const a=+i;if(a>=t){const o=e[i];delete e[i],(n>0||a>t)&&(e[a+n]=o)}}}function hS(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}class pS{static defaults=ae;static instances=pa;static overrides=Tn;static registry=ht;static version=uS;static getChart=wd;static register(...t){ht.add(...t),Sd()}static unregister(...t){ht.remove(...t),Sd()}constructor(t,n){const r=this.config=new oS(n),i=_v(t),a=wd(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const o=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||T1(i)),this.platform.updateConfig(r);const s=this.platform.acquireContext(i,o.aspectRatio),l=s&&s.canvas,u=l&&l.height,c=l&&l.width;if(this.id=r_(),this.ctx=s,this.canvas=l,this.width=c,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new X1,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=S_(f=>this.update(f),o.resizeDelay||0),this._dataChanges=[],pa[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}St.listen(this,"complete",_d),St.listen(this,"progress",fS),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:a}=this;return Y(t)?n&&a?a:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return ht}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Vf(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return $f(this.canvas,this.ctx),this}stop(){return St.stop(this),this}resize(t,n){St.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,a=r.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,t,n,a),s=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Vf(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),le(r.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};X(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((o,s)=>(o[s]=!1,o),{});let a=[];n&&(a=a.concat(Object.keys(n).map(o=>{const s=n[o],l=Xl(o,s),u=l==="r",c=l==="x";return{options:s,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),X(a,o=>{const s=o.options,l=s.id,u=Xl(l,s),c=K(s.type,o.dtype);(s.position===void 0||bd(s.position,u)!==bd(o.dposition))&&(s.position=o.dposition),i[l]=!0;let f=null;if(l in r&&r[l].type===c)f=r[l];else{const d=ht.getScale(c);f=new d({id:l,type:c,ctx:this.ctx,chart:this}),r[f.id]=f}f.init(s,t)}),X(i,(o,s)=>{o||delete r[s]}),X(r,o=>{Ui.configure(this,o,o.options),Ui.addBox(this,o)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,a)=>i.index-a.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(xd("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(a=>a===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const a=n[r];let o=this.getDatasetMeta(r);const s=a.type||this.config.type;if(o.type&&o.type!==s&&(this._destroyDatasetMeta(r),o=this.getDatasetMeta(r)),o.type=s,o.indexAxis=a.indexAxis||Yl(s,this.options),o.order=a.order||0,o.index=r,o.label=""+a.label,o.visible=this.isDatasetVisible(r),o.controller)o.controller.updateIndex(r),o.controller.linkScales();else{const l=ht.getController(s),{datasetElementType:u,dataElementType:c}=ae.datasets[s];Object.assign(l,{dataElementType:ht.getElement(c),datasetElementType:u&&ht.getElement(u)}),o.controller=new l(this,r),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){X(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,c=this.data.datasets.length;u<c;u++){const{controller:f}=this.getDatasetMeta(u),d=!i&&a.indexOf(f)===-1;f.buildOrUpdateElements(d),o=Math.max(+f.getMaxOverflow(),o)}o=this._minPadding=r.layout.autoPadding?o:0,this._updateLayout(o),i||X(a,u=>{u.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(xd("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){X(this.scales,t=>{Ui.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!Ef(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:a}of n){const o=r==="_removeElements"?-a:a;dS(t,i,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=a=>new Set(t.filter(o=>o[0]===a).map((o,s)=>s+","+o.splice(1).join(","))),i=r(0);for(let a=1;a<n;a++)if(!Ef(i,r(a)))return;return Array.from(i).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Ui.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],X(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Gt(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(St.has(this)?this.attached&&!St.running(this)&&St.start(this):(this.draw(),_d({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,a;for(i=0,a=n.length;i<a;++i){const o=n[i];(!t||o.visible)&&r.push(o)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r={meta:t,index:t.index,cancelable:!0},i=Tw(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&ev(n,i),t.controller.draw(),i&&tv(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return ei(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const a=c1.modes[n];return typeof a=="function"?a(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(a=>a&&a._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=Fn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",a=this.getDatasetMeta(t),o=a.controller._resolveAnimations(void 0,i);Jr(n)?(a.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),o.update(a,{visible:r}),this.update(s=>s.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),St.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),$f(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete pa[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(a,o)=>{n.addEventListener(this,a,o),t[a]=o},i=(a,o,s)=>{a.offsetX=o,a.offsetY=s,this._eventHandler(a)};X(this.options.events,a=>r(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,u)=>{n.addEventListener(this,l,u),t[l]=u},i=(l,u)=>{t[l]&&(n.removeEventListener(this,l,u),delete t[l])},a=(l,u)=>{this.canvas&&this.resize(l,u)};let o;const s=()=>{i("attach",s),this.attached=!0,this.resize(),r("resize",a),r("detach",o)};o=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),r("attach",s)},n.isAttached(this.canvas)?s():o()}unbindEvents(){X(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},X(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let a,o,s,l;for(n==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),s=0,l=t.length;s<l;++s){o=t[s];const u=o&&this.getDatasetMeta(o.datasetIndex).controller;u&&u[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:a,index:o})=>{const s=this.getDatasetMeta(a);if(!s)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:s.data[o],index:o}});!ya(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,a=(l,u)=>l.filter(c=>!u.some(f=>c.datasetIndex===f.datasetIndex&&c.index===f.index)),o=a(n,t),s=r?t:a(t,n);o.length&&this.updateHoverStyle(o,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const a=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(a||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:a}=this,o=n,s=this._getActiveElements(t,i,r,o),l=u_(t),u=hS(t,this._lastEvent,r,l);r&&(this._lastEvent=null,le(a.onHover,[t,s,this],this),l&&le(a.onClick,[t,s,this],this));const c=!ya(s,i);return(c||n)&&(this._active=s,this._updateHoverStyles(s,i,n)),this._lastEvent=u,c}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,i)}}function Sd(){return X(pS.instances,e=>e._plugins.invalidate())}function wv(e,t,n=t){e.lineCap=K(n.borderCapStyle,t.borderCapStyle),e.setLineDash(K(n.borderDash,t.borderDash)),e.lineDashOffset=K(n.borderDashOffset,t.borderDashOffset),e.lineJoin=K(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=K(n.borderWidth,t.borderWidth),e.strokeStyle=K(n.borderColor,t.borderColor)}function gS(e,t,n){e.lineTo(n.x,n.y)}function mS(e){return e.stepped?L_:e.tension||e.cubicInterpolationMode==="monotone"?N_:gS}function Sv(e,t,n={}){const r=e.length,{start:i=0,end:a=r-1}=n,{start:o,end:s}=t,l=Math.max(i,o),u=Math.min(a,s),c=i<o&&a<o||i>s&&a>s;return{count:r,start:l,loop:t.loop,ilen:u<l&&!c?r+u-l:u-l}}function vS(e,t,n,r){const{points:i,options:a}=t,{count:o,start:s,loop:l,ilen:u}=Sv(i,n,r),c=mS(a);let{move:f=!0,reverse:d}=r||{},h,p,m;for(h=0;h<=u;++h)p=i[(s+(d?u-h:h))%o],!p.skip&&(f?(e.moveTo(p.x,p.y),f=!1):c(e,m,p,d,a.stepped),m=p);return l&&(p=i[(s+(d?u:0))%o],c(e,m,p,d,a.stepped)),!!l}function yS(e,t,n,r){const i=t.points,{count:a,start:o,ilen:s}=Sv(i,n,r),{move:l=!0,reverse:u}=r||{};let c=0,f=0,d,h,p,m,g,v;const y=_=>(o+(u?s-_:_))%a,b=()=>{m!==g&&(e.lineTo(c,g),e.lineTo(c,m),e.lineTo(c,v))};for(l&&(h=i[y(0)],e.moveTo(h.x,h.y)),d=0;d<=s;++d){if(h=i[y(d)],h.skip)continue;const _=h.x,x=h.y,S=_|0;S===p?(x<m?m=x:x>g&&(g=x),c=(f*c+_)/++f):(b(),e.lineTo(_,x),p=S,f=0,m=g=x),v=x}b()}function Gl(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?yS:vS}function bS(e){return e.stepped?mw:e.tension||e.cubicInterpolationMode==="monotone"?vw:yn}function xS(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),wv(e,t.options),e.stroke(i)}function _S(e,t,n,r){const{segments:i,options:a}=t,o=Gl(t);for(const s of i)wv(e,a,s.style),e.beginPath(),o(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const wS=typeof Path2D=="function";function SS(e,t,n,r){wS&&!t.options.segment?xS(e,t,n,r):_S(e,t,n,r)}class KL extends hr{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;lw(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Aw(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],a=this.points,o=Ow(this,{property:n,start:i,end:i});if(!o.length)return;const s=[],l=bS(r);let u,c;for(u=0,c=o.length;u<c;++u){const{start:f,end:d}=o[u],h=a[f],p=a[d];if(h===p){s.push(h);continue}const m=Math.abs((i-h[n])/(p[n]-h[n])),g=l(h,p,m,r.stepped);g[n]=t[n],s.push(g)}return s.length===1?s[0]:s}pathSegment(t,n,r){return Gl(this)(t,this,n,r)}path(t,n,r){const i=this.segments,a=Gl(this);let o=this._loop;n=n||0,r=r||this.points.length-n;for(const s of i)o&=a(t,this,s,{start:n,end:n+r-1});return!!o}draw(t,n,r,i){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),SS(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Od(e,t,n,r){const i=e.options,{[n]:a}=e.getProps([n],r);return Math.abs(t-a)<i.radius+i.hitRadius}class YL extends hr{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,n,r){const i=this.options,{x:a,y:o}=this.getProps(["x","y"],r);return Math.pow(t-a,2)+Math.pow(n-o,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,n){return Od(this,t,"x",n)}inYRange(t,n){return Od(this,t,"y",n)}getCenterPoint(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);const r=n&&t.borderWidth||0;return(n+r)*2}draw(t,n){const r=this.options;this.skip||r.radius<.1||!ei(this,n,this.size(r)/2)||(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.fillStyle=r.backgroundColor,Hl(t,r,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Ov(e,t){const{x:n,y:r,base:i,width:a,height:o}=e.getProps(["x","y","base","width","height"],t);let s,l,u,c,f;return e.horizontal?(f=o/2,s=Math.min(n,i),l=Math.max(n,i),u=r-f,c=r+f):(f=a/2,s=n-f,l=n+f,u=Math.min(r,i),c=Math.max(r,i)),{left:s,top:u,right:l,bottom:c}}function Ut(e,t,n,r){return e?0:qe(t,n,r)}function OS(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,a=rv(r);return{t:Ut(i.top,a.top,0,n),r:Ut(i.right,a.right,0,t),b:Ut(i.bottom,a.bottom,0,n),l:Ut(i.left,a.left,0,t)}}function PS(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,a=Zr(i),o=Math.min(t,n),s=e.borderSkipped,l=r||W(i);return{topLeft:Ut(!l||s.top||s.left,a.topLeft,0,o),topRight:Ut(!l||s.top||s.right,a.topRight,0,o),bottomLeft:Ut(!l||s.bottom||s.left,a.bottomLeft,0,o),bottomRight:Ut(!l||s.bottom||s.right,a.bottomRight,0,o)}}function MS(e){const t=Ov(e),n=t.right-t.left,r=t.bottom-t.top,i=OS(e,n/2,r/2),a=PS(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:a},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,a.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(i.b,i.r))}}}}function cs(e,t,n,r){const i=t===null,a=n===null,s=e&&!(i&&a)&&Ov(e,r);return s&&(i||Ul(t,s.left,s.right))&&(a||Ul(n,s.top,s.bottom))}function AS(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function kS(e,t){e.rect(t.x,t.y,t.w,t.h)}function fs(e,t,n={}){const r=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,a=(e.x+e.w!==n.x+n.w?t:0)-r,o=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+r,y:e.y+i,w:e.w+a,h:e.h+o,radius:e.radius}}class XL extends hr{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:a,outer:o}=MS(this),s=AS(o.radius)?Kl:kS;t.save(),(o.w!==a.w||o.h!==a.h)&&(t.beginPath(),s(t,fs(o,n,a)),t.clip(),s(t,fs(a,-n,o)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),s(t,fs(a,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return cs(this,t,n,r)}inXRange(t,n){return cs(this,t,null,n)}inYRange(t,n){return cs(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:i,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(n+i)/2:n,y:a?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}const Zl=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Pd=Zl.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function Pv(e){return Zl[e%Zl.length]}function Mv(e){return Pd[e%Pd.length]}function CS(e,t){return e.borderColor=Pv(t),e.backgroundColor=Mv(t),++t}function ES(e,t){return e.backgroundColor=e.data.map(()=>Pv(t++)),t}function TS(e,t){return e.backgroundColor=e.data.map(()=>Mv(t++)),t}function DS(e){let t=0;return(n,r)=>{const i=e.getDatasetMeta(r).controller;i instanceof r1?t=ES(n,t):i instanceof i1?t=TS(n,t):i&&(t=CS(n,t))}}function Md(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function IS(e){return e&&(e.borderColor||e.backgroundColor)}function RS(){return ae.borderColor!=="rgba(0,0,0,0.1)"||ae.backgroundColor!=="rgba(0,0,0,0.1)"}var GL={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:r},options:i}=e.config,{elements:a}=i,o=Md(r)||IS(i)||a&&Md(a)||RS();if(!n.forceOverride&&o)return;const s=DS(e);r.forEach(s)}};const Ur={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,a=0;for(t=0,n=e.length;t<n;++t){const s=e[t].element;if(s&&s.hasValue()){const l=s.tooltipPosition();r.add(l.x),i+=l.y,++a}}return a===0||r.size===0?!1:{x:[...r].reduce((s,l)=>s+l)/r.size,y:i/a}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,a,o,s;for(a=0,o=e.length;a<o;++a){const l=e[a].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),c=ql(t,u);c<i&&(i=c,s=l)}}if(s){const l=s.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function dt(e,t){return t&&(me(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Ot(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
2
- `)>-1?e.split(`
3
- `):e}function jS(e,t){const{element:n,datasetIndex:r,index:i}=t,a=e.getDatasetMeta(r).controller,{label:o,value:s}=a.getLabelAndValue(i);return{chart:e,label:o,parsed:a.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:a.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function Ad(e,t){const n=e.chart.ctx,{body:r,footer:i,title:a}=e,{boxWidth:o,boxHeight:s}=t,l=gt(t.bodyFont),u=gt(t.titleFont),c=gt(t.footerFont),f=a.length,d=i.length,h=r.length,p=Zt(t.padding);let m=p.height,g=0,v=r.reduce((_,x)=>_+x.before.length+x.lines.length+x.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,f&&(m+=f*u.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),v){const _=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;m+=h*_+(v-h)*l.lineHeight+(v-1)*t.bodySpacing}d&&(m+=t.footerMarginTop+d*c.lineHeight+(d-1)*t.footerSpacing);let y=0;const b=function(_){g=Math.max(g,n.measureText(_).width+y)};return n.save(),n.font=u.string,X(e.title,b),n.font=l.string,X(e.beforeBody.concat(e.afterBody),b),y=t.displayColors?o+2+t.boxPadding:0,X(r,_=>{X(_.before,b),X(_.lines,b),X(_.after,b)}),y=0,n.font=c.string,X(e.footer,b),n.restore(),g+=p.width,{width:g,height:m}}function LS(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function NS(e,t,n,r){const{x:i,width:a}=r,o=n.caretSize+n.caretPadding;if(e==="left"&&i+a+o>t.width||e==="right"&&i-a-o<0)return!0}function FS(e,t,n,r){const{x:i,width:a}=n,{width:o,chartArea:{left:s,right:l}}=e;let u="center";return r==="center"?u=i<=(s+l)/2?"left":"right":i<=a/2?u="left":i>=o-a/2&&(u="right"),NS(u,e,t,n)&&(u="center"),u}function kd(e,t,n){const r=n.yAlign||t.yAlign||LS(e,n);return{xAlign:n.xAlign||t.xAlign||FS(e,t,n,r),yAlign:r}}function BS(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function zS(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function Cd(e,t,n,r){const{caretSize:i,caretPadding:a,cornerRadius:o}=e,{xAlign:s,yAlign:l}=n,u=i+a,{topLeft:c,topRight:f,bottomLeft:d,bottomRight:h}=Zr(o);let p=BS(t,s);const m=zS(t,l,u);return l==="center"?s==="left"?p+=u:s==="right"&&(p-=u):s==="left"?p-=Math.max(c,d)+i:s==="right"&&(p+=Math.max(f,h)+i),{x:qe(p,0,r.width-t.width),y:qe(m,0,r.height-t.height)}}function Yi(e,t,n){const r=Zt(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function Ed(e){return dt([],Ot(e))}function $S(e,t,n){return Fn(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Td(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const Av={beforeTitle:wt,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:wt,beforeBody:wt,beforeLabel:wt,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return Y(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:wt,afterBody:wt,beforeFooter:wt,footer:wt,afterFooter:wt};function Re(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?Av[t].call(n,r):i}let Dd=class extends hr{static positioners=Ur;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,a=new cv(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=$S(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=Re(r,"beforeTitle",this,t),a=Re(r,"title",this,t),o=Re(r,"afterTitle",this,t);let s=[];return s=dt(s,Ot(i)),s=dt(s,Ot(a)),s=dt(s,Ot(o)),s}getBeforeBody(t,n){return Ed(Re(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return X(t,a=>{const o={before:[],lines:[],after:[]},s=Td(r,a);dt(o.before,Ot(Re(s,"beforeLabel",this,a))),dt(o.lines,Re(s,"label",this,a)),dt(o.after,Ot(Re(s,"afterLabel",this,a))),i.push(o)}),i}getAfterBody(t,n){return Ed(Re(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=Re(r,"beforeFooter",this,t),a=Re(r,"footer",this,t),o=Re(r,"afterFooter",this,t);let s=[];return s=dt(s,Ot(i)),s=dt(s,Ot(a)),s=dt(s,Ot(o)),s}_createItems(t){const n=this._active,r=this.chart.data,i=[],a=[],o=[];let s=[],l,u;for(l=0,u=n.length;l<u;++l)s.push(jS(this.chart,n[l]));return t.filter&&(s=s.filter((c,f,d)=>t.filter(c,f,d,r))),t.itemSort&&(s=s.sort((c,f)=>t.itemSort(c,f,r))),X(s,c=>{const f=Td(t.callbacks,c);i.push(Re(f,"labelColor",this,c)),a.push(Re(f,"labelPointStyle",this,c)),o.push(Re(f,"labelTextColor",this,c))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=o,this.dataPoints=s,s}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let a,o=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const s=Ur[r.position].call(this,i,this._eventPosition);o=this._createItems(r),this.title=this.getTitle(o,r),this.beforeBody=this.getBeforeBody(o,r),this.body=this.getBody(o,r),this.afterBody=this.getAfterBody(o,r),this.footer=this.getFooter(o,r);const l=this._size=Ad(this,r),u=Object.assign({},s,l),c=kd(this.chart,r,u),f=Cd(r,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,a={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=o,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const a=this.getCaretPosition(t,r,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:a}=this,{caretSize:o,cornerRadius:s}=r,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:f}=Zr(s),{x:d,y:h}=t,{width:p,height:m}=n;let g,v,y,b,_,x;return a==="center"?(_=h+m/2,i==="left"?(g=d,v=g-o,b=_+o,x=_-o):(g=d+p,v=g+o,b=_-o,x=_+o),y=g):(i==="left"?v=d+Math.max(l,c)+o:i==="right"?v=d+p-Math.max(u,f)-o:v=this.caretX,a==="top"?(b=h,_=b-o,g=v-o,y=v+o):(b=h+m,_=b+o,g=v+o,y=v-o),x=b),{x1:g,x2:v,x3:y,y1:b,y2:_,y3:x}}drawTitle(t,n,r){const i=this.title,a=i.length;let o,s,l;if(a){const u=ns(r.rtl,this.x,this.width);for(t.x=Yi(this,r.titleAlign,r),n.textAlign=u.textAlign(r.titleAlign),n.textBaseline="middle",o=gt(r.titleFont),s=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,l=0;l<a;++l)n.fillText(i[l],u.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+s,l+1===a&&(t.y+=r.titleMarginBottom-s)}}_drawColorBox(t,n,r,i,a){const o=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:l,boxWidth:u}=a,c=gt(a.bodyFont),f=Yi(this,"left",a),d=i.x(f),h=l<c.lineHeight?(c.lineHeight-l)/2:0,p=n.y+h;if(a.usePointStyle){const m={radius:Math.min(u,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=i.leftForLtr(d,u)+u/2,v=p+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,Hl(t,m,g,v),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,Hl(t,m,g,v)}else{t.lineWidth=W(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const m=i.leftForLtr(d,u),g=i.leftForLtr(i.xPlus(d,1),u-2),v=Zr(o.borderRadius);Object.values(v).some(y=>y!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,Kl(t,{x:m,y:p,w:u,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),Kl(t,{x:g,y:p+1,w:u-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(m,p,u,l),t.strokeRect(m,p,u,l),t.fillStyle=o.backgroundColor,t.fillRect(g,p+1,u-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:a,bodyAlign:o,displayColors:s,boxHeight:l,boxWidth:u,boxPadding:c}=r,f=gt(r.bodyFont);let d=f.lineHeight,h=0;const p=ns(r.rtl,this.x,this.width),m=function(M){n.fillText(M,p.x(t.x+h),t.y+d/2),t.y+=d+a},g=p.textAlign(o);let v,y,b,_,x,S,O;for(n.textAlign=o,n.textBaseline="middle",n.font=f.string,t.x=Yi(this,g,r),n.fillStyle=r.bodyColor,X(this.beforeBody,m),h=s&&g!=="right"?o==="center"?u/2+c:u+2+c:0,_=0,S=i.length;_<S;++_){for(v=i[_],y=this.labelTextColors[_],n.fillStyle=y,X(v.before,m),b=v.lines,s&&b.length&&(this._drawColorBox(n,t,_,p,r),d=Math.max(f.lineHeight,l)),x=0,O=b.length;x<O;++x)m(b[x]),d=f.lineHeight;X(v.after,m)}h=0,d=f.lineHeight,X(this.afterBody,m),t.y-=a}drawFooter(t,n,r){const i=this.footer,a=i.length;let o,s;if(a){const l=ns(r.rtl,this.x,this.width);for(t.x=Yi(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=gt(r.footerFont),n.fillStyle=r.footerColor,n.font=o.string,s=0;s<a;++s)n.fillText(i[s],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:a,yAlign:o}=this,{x:s,y:l}=t,{width:u,height:c}=r,{topLeft:f,topRight:d,bottomLeft:h,bottomRight:p}=Zr(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(s+f,l),o==="top"&&this.drawCaret(t,n,r,i),n.lineTo(s+u-d,l),n.quadraticCurveTo(s+u,l,s+u,l+d),o==="center"&&a==="right"&&this.drawCaret(t,n,r,i),n.lineTo(s+u,l+c-p),n.quadraticCurveTo(s+u,l+c,s+u-p,l+c),o==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(s+h,l+c),n.quadraticCurveTo(s,l+c,s,l+c-h),o==="center"&&a==="left"&&this.drawCaret(t,n,r,i),n.lineTo(s,l+f),n.quadraticCurveTo(s,l,s+f,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,a=r&&r.y;if(i||a){const o=Ur[t.position].call(this,this._active,this._eventPosition);if(!o)return;const s=this._size=Ad(this,t),l=Object.assign({},o,this._size),u=kd(n,t,l),c=Cd(t,l,u,n);(i._to!==c.x||a._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=s.width,this.height=s.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const o=Zt(n.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(a,t,i,n),xw(t,n.textDirection),a.y+=o.top,this.drawTitle(a,t,n),this.drawBody(a,t,n),this.drawFooter(a,t,n),_w(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:s,index:l})=>{const u=this.chart.getDatasetMeta(s);if(!u)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:u.data[l],index:l}}),a=!ya(r,i),o=this._positionChanged(i,n);(a||o)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],o=this._getActiveElements(t,a,n,r),s=this._positionChanged(o,t),l=n||!ya(o,a)||s;return l&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const a=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,a.mode,a,r);return a.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:r,caretY:i,options:a}=this,o=Ur[a.position].call(this,t,n);return o!==!1&&(r!==o.x||i!==o.y)}};var QL={id:"tooltip",_element:Dd,positioners:Ur,afterInit(e,t,n){n&&(e.tooltip=new Dd({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Av},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const WS=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function qS(e,t,n,r){const i=e.indexOf(t);if(i===-1)return WS(e,t,n,r);const a=e.lastIndexOf(t);return i!==a?n:i}const US=(e,t)=>e===null?null:qe(Math.round(e),0,t);function Id(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class JL extends pr{static id="category";static defaults={ticks:{callback:Id}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:a}of n)r[i]===a&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Y(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:qS(r,t,K(n,t),this._addedLabels),US(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let a=this.getLabels();a=t===0&&n===a.length-1?a:a.slice(t,n+1),this._valueRange=Math.max(a.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let o=t;o<=n;o++)i.push({value:o});return i}getLabelForValue(t){return Id.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function VS(e,t){const n=[],{bounds:i,step:a,min:o,max:s,precision:l,count:u,maxTicks:c,maxDigits:f,includeBounds:d}=e,h=a||1,p=c-1,{min:m,max:g}=t,v=!Y(o),y=!Y(s),b=!Y(u),_=(g-m)/(f+1);let x=Df((g-m)/p/h)*h,S,O,M,k;if(x<1e-14&&!v&&!y)return[{value:m},{value:g}];k=Math.ceil(g/x)-Math.floor(m/x),k>p&&(x=Df(k*x/p/h)*h),Y(l)||(S=Math.pow(10,l),x=Math.ceil(x*S)/S),i==="ticks"?(O=Math.floor(m/x)*x,M=Math.ceil(g/x)*x):(O=m,M=g),v&&y&&a&&p_((s-o)/a,x/1e3)?(k=Math.round(Math.min((s-o)/x,c)),x=(s-o)/k,O=o,M=s):b?(O=v?o:O,M=y?s:M,k=u-1,x=(M-O)/k):(k=(M-O)/x,Yr(k,Math.round(k),x/1e3)?k=Math.round(k):k=Math.ceil(k));const E=Math.max(If(x),If(O));S=Math.pow(10,Y(l)?E:l),O=Math.round(O*S)/S,M=Math.round(M*S)/S;let T=0;for(v&&(d&&O!==o?(n.push({value:o}),O<o&&T++,Yr(Math.round((O+T*x)*S)/S,o,Rd(o,_,e))&&T++):O<o&&T++);T<k;++T){const A=Math.round((O+T*x)*S)/S;if(y&&A>s)break;n.push({value:A})}return y&&d&&M!==s?n.length&&Yr(n[n.length-1].value,s,Rd(s,_,e))?n[n.length-1].value=s:n.push({value:s}):(!y||M===s)&&n.push({value:M}),n}function Rd(e,t,{horizontal:n,minRotation:r}){const i=pt(r),a=(n?Math.sin(i):Math.cos(i))||.001,o=.75*t*(""+e).length;return Math.min(t/a,o)}class HS extends pr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return Y(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:a}=this;const o=l=>i=n?i:l,s=l=>a=r?a:l;if(t){const l=yt(i),u=yt(a);l<0&&u<0?s(0):l>0&&u>0&&o(0)}if(i===a){let l=a===0?1:Math.abs(a*.05);s(a+l),t||o(i-l)}this.min=i,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,o=VS(i,a);return t.bounds==="ticks"&&g_(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return fo(t,this.chart.options.locale,this.options.ticks.format)}}class eN extends HS{static id="linear";static defaults={ticks:{callback:Jm.formatters.numeric}};determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=et(t)?t:0,this.max=et(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=pt(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const go={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},je=Object.keys(go);function jd(e,t){return e-t}function Ld(e,t){if(Y(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:a}=e._parseOpts;let o=t;return typeof r=="function"&&(o=r(o)),et(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(i&&(o=i==="week"&&(er(a)||a===!0)?n.startOf(o,"isoWeek",a):n.startOf(o,i)),+o)}function Nd(e,t,n,r){const i=je.length;for(let a=je.indexOf(e);a<i-1;++a){const o=go[je[a]],s=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(s*o.size))<=r)return je[a]}return je[i-1]}function KS(e,t,n,r,i){for(let a=je.length-1;a>=je.indexOf(n);a--){const o=je[a];if(go[o].common&&e._adapter.diff(i,r,o)>=t-1)return o}return je[n?je.indexOf(n):0]}function YS(e){for(let t=je.indexOf(e)+1,n=je.length;t<n;++t)if(go[je[t]].common)return je[t]}function Fd(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=qu(n,t),a=n[r]>=t?n[r]:n[i];e[a]=!0}}function XS(e,t,n,r){const i=e._adapter,a=+i.startOf(t[0].value,r),o=t[t.length-1].value;let s,l;for(s=a;s<=o;s=+i.add(s,1,r))l=n[s],l>=0&&(t[l].major=!0);return t}function Bd(e,t,n){const r=[],i={},a=t.length;let o,s;for(o=0;o<a;++o)s=t[o],i[s]=o,r.push({value:s,major:!1});return a===0||!n?r:XS(e,r,i,n)}class zd extends pr{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),i=this._adapter=new a1._date(t.adapters.date);i.init(n),Kr(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:Ld(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:a,minDefined:o,maxDefined:s}=this.getUserBounds();function l(u){!o&&!isNaN(u.min)&&(i=Math.min(i,u.min)),!s&&!isNaN(u.max)&&(a=Math.max(a,u.max))}(!o||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=et(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),a=et(a)&&!isNaN(a)?a:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,o=this.max,s=__(i,a,o);return this._unit=n.unit||(r.autoSkip?Nd(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):KS(this,s.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:YS(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),Bd(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,a;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?r=a:r=(a-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=qe(n,0,o),r=qe(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,a=i.time,o=a.unit||Nd(a.minUnit,n,r,this._getLabelCapacity(n)),s=K(i.ticks.stepSize,1),l=o==="week"?a.isoWeekday:!1,u=er(l)||l===!0,c={};let f=n,d,h;if(u&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,u?"day":o),t.diff(r,n,o)>1e5*s)throw new Error(n+" and "+r+" are too far apart with stepSize of "+s+" "+o);const p=i.ticks.source==="data"&&this.getDataTimestamps();for(d=f,h=0;d<r;d=+t.add(d,s,o),h++)Fd(c,d,p);return(d===r||i.bounds==="ticks"||h===1)&&Fd(c,d,p),Object.keys(c).sort(jd).map(m=>+m)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,a=this._unit,o=n||i[a];return this._adapter.format(t,o)}_tickFormatFunction(t,n,r,i){const a=this.options,o=a.ticks.callback;if(o)return le(o,[t,n,r],this);const s=a.time.displayFormats,l=this._unit,u=this._majorUnit,c=l&&s[l],f=u&&s[u],d=r[n],h=u&&f&&d&&d.major;return this._adapter.format(t,i||(h?f:c))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=pt(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(i),o=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:r*a+s*o,h:r*o+s*a}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,a=this._tickFormatFunction(t,0,Bd(this,[t],this._majorUnit),i),o=this._getLabelSize(a),s=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(Ld(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Ym(t.sort(jd))}}function Xi(e,t,n){let r=0,i=e.length-1,a,o,s,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=wn(e,"pos",t)),{pos:a,time:s}=e[r],{pos:o,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=wn(e,"time",t)),{time:a,pos:s}=e[r],{time:o,pos:l}=e[i]);const u=o-a;return u?s+(l-s)*(t-a)/u:s}class tN extends zd{static id="timeseries";static defaults=zd.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Xi(n,this.min),this._tableRange=Xi(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],a=[];let o,s,l,u,c;for(o=0,s=t.length;o<s;++o)u=t[o],u>=n&&u<=r&&i.push(u);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(o=0,s=i.length;o<s;++o)c=i[o+1],l=i[o-1],u=i[o],Math.round((c+l)/2)!==u&&a.push({time:u,pos:o/(s-1)});return a}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,a)=>i-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Xi(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Xi(this._table,r*this._tableRange+this._minPos,!0)}}var GS=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function kv(e){if(typeof e!="string")return!1;var t=GS;return t.includes(e)}var ZS=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],QS=new Set(ZS);function Cv(e){return typeof e!="string"?!1:QS.has(e)}function Ev(e){return typeof e=="string"&&e.startsWith("data-")}function rr(e){if(typeof e!="object"||e===null)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Cv(n)||Ev(n))&&(t[n]=e[n]);return t}function Zu(e){if(e==null)return null;if(w.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return rr(t)}return typeof e=="object"&&!Array.isArray(e)?rr(e):null}function ir(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Cv(n)||Ev(n)||kv(n))&&(t[n]=e[n]);return t}var JS=["children","width","height","viewBox","className","style","title","desc"];function Ql(){return Ql=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ql.apply(null,arguments)}function eO(e,t){if(e==null)return{};var n,r,i=tO(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function tO(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var nO=w.forwardRef((e,t)=>{var{children:n,width:r,height:i,viewBox:a,className:o,style:s,title:l,desc:u}=e,c=eO(e,JS),f=a||{width:r,height:i,x:0,y:0},d=Je("recharts-surface",o);return w.createElement("svg",Ql({},ir(c),{className:d,width:r,height:i,style:s,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),w.createElement("title",null,l),w.createElement("desc",null,u),n)}),rO=["children","className"];function Jl(){return Jl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jl.apply(null,arguments)}function iO(e,t){if(e==null)return{};var n,r,i=aO(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function aO(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var mo=w.forwardRef((e,t)=>{var{children:n,className:r}=e,i=iO(e,rO),a=Je("recharts-layer",r);return w.createElement("g",Jl({className:a},ir(i),{ref:t}),n)}),oO=w.createContext(null);function ie(e){return function(){return e}}const eu=Math.PI,tu=2*eu,bn=1e-6,sO=tu-bn;function Tv(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function lO(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Tv;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class uO{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Tv:lO(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,l=r-t,u=i-n,c=o-t,f=s-n,d=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(d>bn)if(!(Math.abs(f*l-u*c)>bn)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-o,p=i-s,m=l*l+u*u,g=h*h+p*p,v=Math.sqrt(m),y=Math.sqrt(d),b=a*Math.tan((eu-Math.acos((m+d-g)/(2*v*y)))/2),_=b/y,x=b/v;Math.abs(_-1)>bn&&this._append`L${t+_*c},${n+_*f}`,this._append`A${a},${a},0,0,${+(f*h>c*p)},${this._x1=t+x*l},${this._y1=n+x*u}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),u=t+s,c=n+l,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>bn||Math.abs(this._y1-c)>bn)&&this._append`L${u},${c}`,r&&(d<0&&(d=d%tu+tu),d>sO?this._append`A${r},${r},0,1,${f},${t-s},${n-l}A${r},${r},0,1,${f},${this._x1=u},${this._y1=c}`:d>bn&&this._append`A${r},${r},0,${+(d>=eu)},${f},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function Dv(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new uO(t)}function Qu(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Iv(e){this._context=e}Iv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function vo(e){return new Iv(e)}function Rv(e){return e[0]}function jv(e){return e[1]}function Lv(e,t){var n=ie(!0),r=null,i=vo,a=null,o=Dv(s);e=typeof e=="function"?e:e===void 0?Rv:ie(e),t=typeof t=="function"?t:t===void 0?jv:ie(t);function s(l){var u,c=(l=Qu(l)).length,f,d=!1,h;for(r==null&&(a=i(h=o())),u=0;u<=c;++u)!(u<c&&n(f=l[u],u,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(f,u,l),+t(f,u,l));if(h)return a=null,h+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:ie(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:ie(+l),s):t},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:ie(!!l),s):n},s.curve=function(l){return arguments.length?(i=l,r!=null&&(a=i(r)),s):i},s.context=function(l){return arguments.length?(l==null?r=a=null:a=i(r=l),s):r},s}function Gi(e,t,n){var r=null,i=ie(!0),a=null,o=vo,s=null,l=Dv(u);e=typeof e=="function"?e:e===void 0?Rv:ie(+e),t=typeof t=="function"?t:ie(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?jv:ie(+n);function u(f){var d,h,p,m=(f=Qu(f)).length,g,v=!1,y,b=new Array(m),_=new Array(m);for(a==null&&(s=o(y=l())),d=0;d<=m;++d){if(!(d<m&&i(g=f[d],d,f))===v)if(v=!v)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=d-1;p>=h;--p)s.point(b[p],_[p]);s.lineEnd(),s.areaEnd()}v&&(b[d]=+e(g,d,f),_[d]=+t(g,d,f),s.point(r?+r(g,d,f):b[d],n?+n(g,d,f):_[d]))}if(y)return s=null,y+""||null}function c(){return Lv().defined(i).curve(o).context(a)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:ie(+f),r=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:ie(+f),u):e},u.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:ie(+f),u):r},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:ie(+f),n=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:ie(+f),u):t},u.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:ie(+f),u):n},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(n)},u.lineX1=function(){return c().x(r).y(t)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:ie(!!f),u):i},u.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),u):o},u.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),u):a},u}class Nv{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function cO(e){return new Nv(e,!0)}function fO(e){return new Nv(e,!1)}function Oa(){}function Pa(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Fv(e){this._context=e}Fv.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:Pa(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Pa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function dO(e){return new Fv(e)}function Bv(e){this._context=e}Bv.prototype={areaStart:Oa,areaEnd:Oa,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Pa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function hO(e){return new Bv(e)}function zv(e){this._context=e}zv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Pa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function pO(e){return new zv(e)}function $v(e){this._context=e}$v.prototype={areaStart:Oa,areaEnd:Oa,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function gO(e){return new $v(e)}function $d(e){return e<0?-1:1}function Wd(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return($d(a)+$d(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function qd(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ds(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Ma(e){this._context=e}Ma.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:ds(this,this._t0,qd(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ds(this,qd(this,n=Wd(this,e,t)),n);break;default:ds(this,this._t0,n=Wd(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Wv(e){this._context=new qv(e)}(Wv.prototype=Object.create(Ma.prototype)).point=function(e,t){Ma.prototype.point.call(this,t,e)};function qv(e){this._context=e}qv.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function mO(e){return new Ma(e)}function vO(e){return new Wv(e)}function Uv(e){this._context=e}Uv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Ud(e),i=Ud(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Ud(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function yO(e){return new Uv(e)}function yo(e,t){this._context=e,this._t=t}yo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function bO(e){return new yo(e,.5)}function xO(e){return new yo(e,0)}function _O(e){return new yo(e,1)}function Dn(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function nu(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function wO(e,t){return e[t]}function SO(e){const t=[];return t.key=e,t}function OO(){var e=ie([]),t=nu,n=Dn,r=wO;function i(a){var o=Array.from(e.apply(this,arguments),SO),s,l=o.length,u=-1,c;for(const f of a)for(s=0,++u;s<l;++s)(o[s][u]=[0,+r(f,o[s].key,u,a)]).data=f;for(s=0,c=Qu(t(o));s<l;++s)o[c[s]].index=s;return n(o,c),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:ie(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:ie(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?nu:typeof a=="function"?a:ie(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??Dn,i):n},i}function PO(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}Dn(e,t)}}function MO(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}Dn(e,t)}}function AO(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,l=0,u=0;s<o;++s){for(var c=e[t[s]],f=c[r][1]||0,d=c[r-1][1]||0,h=(f-d)/2,p=0;p<s;++p){var m=e[t[p]],g=m[r][1]||0,v=m[r-1][1]||0;h+=g-v}l+=f,u+=h*f}i[r-1][1]+=i[r-1][0]=n,l&&(n-=u/l)}i[r-1][1]+=i[r-1][0]=n,Dn(e,t)}}var hs={},ps={},Vd;function kO(){return Vd||(Vd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(ps)),ps}var gs={},Hd;function Vv(){return Hd||(Hd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=t})(gs)),gs}var ms={},Kd;function Ju(){return Kd||(Kd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="string"||typeof n=="symbol"?n:Object.is(n?.valueOf?.(),-0)?"-0":String(n)}e.toKey=t})(ms)),ms}var vs={},ys={},Yd;function CO(){return Yd||(Yd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(t).join(",");const r=String(n);return r==="0"&&Object.is(Number(n),-0)?"-0":r}e.toString=t})(ys)),ys}var Xd;function ec(){return Xd||(Xd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=CO(),n=Ju();function r(i){if(Array.isArray(i))return i.map(n.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const a=[],o=i.length;if(o===0)return a;let s=0,l="",u="",c=!1;for(i.charCodeAt(0)===46&&(a.push(""),s++);s<o;){const f=i[s];u?f==="\\"&&s+1<o?(s++,l+=i[s]):f===u?u="":l+=f:c?f==='"'||f==="'"?u=f:f==="]"?(c=!1,a.push(l),l=""):l+=f:f==="["?(c=!0,l&&(a.push(l),l="")):f==="."?l&&(a.push(l),l=""):l+=f,s++}return l&&a.push(l),a}e.toPath=r})(vs)),vs}var Gd;function tc(){return Gd||(Gd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kO(),n=Vv(),r=Ju(),i=ec();function a(s,l,u){if(s==null)return u;switch(typeof l){case"string":{if(t.isUnsafeProperty(l))return u;const c=s[l];return c===void 0?n.isDeepKey(l)?a(s,i.toPath(l),u):u:c}case"number":case"symbol":{typeof l=="number"&&(l=r.toKey(l));const c=s[l];return c===void 0?u:c}default:{if(Array.isArray(l))return o(s,l,u);if(Object.is(l?.valueOf(),-0)?l="-0":l=String(l),t.isUnsafeProperty(l))return u;const c=s[l];return c===void 0?u:c}}}function o(s,l,u){if(l.length===0)return u;let c=s;for(let f=0;f<l.length;f++){if(c==null||t.isUnsafeProperty(l[f]))return u;c=c[l[f]]}return c===void 0?u:c}e.get=a})(hs)),hs}var bs,Zd;function EO(){return Zd||(Zd=1,bs=tc().get),bs}var TO=EO();const nc=Jt(TO);var DO=4;function Vt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:DO,n=10**t,r=Math.round(e*n)/n;return Object.is(r,-0)?0:r}function Pe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((i,a,o)=>{var s=n[o-1];return typeof s=="string"?i+s+a:s!==void 0?i+Vt(s)+a:i+a},"")}var At=e=>e===0?0:e>0?1:-1,gr=e=>typeof e=="number"&&e!=+e,ni=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,$=e=>(typeof e=="number"||e instanceof Number)&&!gr(e),In=e=>$(e)||typeof e=="string",IO=0,ru=e=>{var t=++IO;return"".concat(e||"").concat(t)},ar=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!$(t)&&typeof t!="string")return r;var a;if(ni(t)){if(n==null)return r;var o=t.indexOf("%");a=n*parseFloat(t.slice(0,o))/100}else a=+t;return gr(a)&&(a=r),i&&n!=null&&a>n&&(a=n),a},Hv=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function Zi(e,t,n){return $(e)&&$(t)?Vt(e+n*(t-e)):t}function RO(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):nc(r,t))===n)}var Aa=e=>e===null||typeof e>"u",rc=e=>Aa(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function ot(e){return e!=null}function mr(){}var Kv=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,jO=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(w.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(i=>{kv(i)&&typeof n[i]=="function"&&(r[i]=(a=>n[i](n,a)))}),r};function Qd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function LO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qd(Object(n),!0).forEach(function(r){NO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function NO(e,t,n){return(t=FO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FO(e){var t=BO(e,"string");return typeof t=="symbol"?t:t+""}function BO(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yi(e,t){var n=LO({},e),r=t,i=Object.keys(t),a=i.reduce((o,s)=>(o[s]===void 0&&r[s]!==void 0&&(o[s]=r[s]),o),n);return a}var xs={},_s={},Jd;function zO(){return Jd||(Jd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const i=new Map;for(let a=0;a<n.length;a++){const o=n[a],s=r(o,a,n);i.has(s)||i.set(s,o)}return Array.from(i.values())}e.uniqBy=t})(_s)),_s}var ws={},eh;function $O(){return eh||(eh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return function(...i){return n.apply(this,i.slice(0,r))}}e.ary=t})(ws)),ws}var Ss={},th;function ic(){return th||(th=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(Ss)),Ss}var Os={},Ps={},Ms={},nh;function WO(){return nh||(nh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=t})(Ms)),Ms}var rh;function Yv(){return rh||(rh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=WO();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(Ps)),Ps}var As={},ih;function qO(){return ih||(ih=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(As)),As}var ah;function UO(){return ah||(ah=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Yv(),n=qO();function r(i){return n.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=r})(Os)),Os}var ks={},Cs={},oh;function VO(){return oh||(oh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tc();function n(r){return function(i){return t.get(i,r)}}e.property=n})(Cs)),Cs}var Es={},Ts={},Ds={},Is={},sh;function Xv(){return sh||(sh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t})(Is)),Is}var Rs={},lh;function Gv(){return lh||(lh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t})(Rs)),Rs}var js={},uh;function Zv(){return uh||(uh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}e.isEqualsSameValueZero=t})(js)),js}var ch;function HO(){return ch||(ch=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Xv(),n=Gv(),r=Zv();function i(c,f,d){return typeof d!="function"?i(c,f,()=>{}):a(c,f,function h(p,m,g,v,y,b){const _=d(p,m,g,v,y,b);return _!==void 0?!!_:a(p,m,h,b)},new Map)}function a(c,f,d,h){if(f===c)return!0;switch(typeof f){case"object":return o(c,f,d,h);case"function":return Object.keys(f).length>0?a(c,{...f},d,h):r.isEqualsSameValueZero(c,f);default:return t.isObject(c)?typeof f=="string"?f==="":!0:r.isEqualsSameValueZero(c,f)}}function o(c,f,d,h){if(f==null)return!0;if(Array.isArray(f))return l(c,f,d,h);if(f instanceof Map)return s(c,f,d,h);if(f instanceof Set)return u(c,f,d,h);const p=Object.keys(f);if(c==null||n.isPrimitive(c))return p.length===0;if(p.length===0)return!0;if(h?.has(f))return h.get(f)===c;h?.set(f,c);try{for(let m=0;m<p.length;m++){const g=p[m];if(!n.isPrimitive(c)&&!(g in c)||f[g]===void 0&&c[g]!==void 0||f[g]===null&&c[g]!==null||!d(c[g],f[g],g,c,f,h))return!1}return!0}finally{h?.delete(f)}}function s(c,f,d,h){if(f.size===0)return!0;if(!(c instanceof Map))return!1;for(const[p,m]of f.entries()){const g=c.get(p);if(d(g,m,p,c,f,h)===!1)return!1}return!0}function l(c,f,d,h){if(f.length===0)return!0;if(!Array.isArray(c))return!1;const p=new Set;for(let m=0;m<f.length;m++){const g=f[m];let v=!1;for(let y=0;y<c.length;y++){if(p.has(y))continue;const b=c[y];let _=!1;if(d(b,g,m,c,f,h)&&(_=!0),_){p.add(y),v=!0;break}}if(!v)return!1}return!0}function u(c,f,d,h){return f.size===0?!0:c instanceof Set?l([...c],[...f],d,h):!1}e.isMatchWith=i,e.isSetMatch=u})(Ds)),Ds}var fh;function Qv(){return fh||(fh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=HO();function n(r,i){return t.isMatchWith(r,i,()=>{})}e.isMatch=n})(Ts)),Ts}var Ls={},Ns={},Fs={},dh;function KO(){return dh||(dh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Object.getOwnPropertySymbols(n).filter(r=>Object.prototype.propertyIsEnumerable.call(n,r))}e.getSymbols=t})(Fs)),Fs}var Bs={},hh;function ac(){return hh||(hh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=t})(Bs)),Bs}var zs={},ph;function Jv(){return ph||(ph=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",i="[object Boolean]",a="[object Arguments]",o="[object Symbol]",s="[object Date]",l="[object Map]",u="[object Set]",c="[object Array]",f="[object Function]",d="[object ArrayBuffer]",h="[object Object]",p="[object Error]",m="[object DataView]",g="[object Uint8Array]",v="[object Uint8ClampedArray]",y="[object Uint16Array]",b="[object Uint32Array]",_="[object BigUint64Array]",x="[object Int8Array]",S="[object Int16Array]",O="[object Int32Array]",M="[object BigInt64Array]",k="[object Float32Array]",E="[object Float64Array]";e.argumentsTag=a,e.arrayBufferTag=d,e.arrayTag=c,e.bigInt64ArrayTag=M,e.bigUint64ArrayTag=_,e.booleanTag=i,e.dataViewTag=m,e.dateTag=s,e.errorTag=p,e.float32ArrayTag=k,e.float64ArrayTag=E,e.functionTag=f,e.int16ArrayTag=S,e.int32ArrayTag=O,e.int8ArrayTag=x,e.mapTag=l,e.numberTag=r,e.objectTag=h,e.regexpTag=t,e.setTag=u,e.stringTag=n,e.symbolTag=o,e.uint16ArrayTag=y,e.uint32ArrayTag=b,e.uint8ArrayTag=g,e.uint8ClampedArrayTag=v})(zs)),zs}var $s={},gh;function YO(){return gh||(gh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t})($s)),$s}var mh;function ey(){return mh||(mh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=KO(),n=ac(),r=Jv(),i=Gv(),a=YO();function o(c,f){return s(c,void 0,c,new Map,f)}function s(c,f,d,h=new Map,p=void 0){const m=p?.(c,f,d,h);if(m!==void 0)return m;if(i.isPrimitive(c))return c;if(h.has(c))return h.get(c);if(Array.isArray(c)){const g=new Array(c.length);h.set(c,g);for(let v=0;v<c.length;v++)g[v]=s(c[v],v,d,h,p);return Object.hasOwn(c,"index")&&(g.index=c.index),Object.hasOwn(c,"input")&&(g.input=c.input),g}if(c instanceof Date)return new Date(c.getTime());if(c instanceof RegExp){const g=new RegExp(c.source,c.flags);return g.lastIndex=c.lastIndex,g}if(c instanceof Map){const g=new Map;h.set(c,g);for(const[v,y]of c)g.set(v,s(y,v,d,h,p));return g}if(c instanceof Set){const g=new Set;h.set(c,g);for(const v of c)g.add(s(v,void 0,d,h,p));return g}if(typeof Buffer<"u"&&Buffer.isBuffer(c))return c.subarray();if(a.isTypedArray(c)){const g=new(Object.getPrototypeOf(c)).constructor(c.length);h.set(c,g);for(let v=0;v<c.length;v++)g[v]=s(c[v],v,d,h,p);return g}if(c instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&c instanceof SharedArrayBuffer)return c.slice(0);if(c instanceof DataView){const g=new DataView(c.buffer.slice(0),c.byteOffset,c.byteLength);return h.set(c,g),l(g,c,d,h,p),g}if(typeof File<"u"&&c instanceof File){const g=new File([c],c.name,{type:c.type});return h.set(c,g),l(g,c,d,h,p),g}if(typeof Blob<"u"&&c instanceof Blob){const g=new Blob([c],{type:c.type});return h.set(c,g),l(g,c,d,h,p),g}if(c instanceof Error){const g=structuredClone(c);return h.set(c,g),g.message=c.message,g.name=c.name,g.stack=c.stack,g.cause=c.cause,g.constructor=c.constructor,l(g,c,d,h,p),g}if(c instanceof Boolean){const g=new Boolean(c.valueOf());return h.set(c,g),l(g,c,d,h,p),g}if(c instanceof Number){const g=new Number(c.valueOf());return h.set(c,g),l(g,c,d,h,p),g}if(c instanceof String){const g=new String(c.valueOf());return h.set(c,g),l(g,c,d,h,p),g}if(typeof c=="object"&&u(c)){const g=Object.create(Object.getPrototypeOf(c));return h.set(c,g),l(g,c,d,h,p),g}return c}function l(c,f,d=c,h,p){const m=[...Object.keys(f),...t.getSymbols(f)];for(let g=0;g<m.length;g++){const v=m[g],y=Object.getOwnPropertyDescriptor(c,v);(y==null||y.writable)&&(c[v]=s(f[v],v,d,h,p))}}function u(c){switch(n.getTag(c)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=o,e.cloneDeepWithImpl=s,e.copyProperties=l})(Ns)),Ns}var vh;function XO(){return vh||(vh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ey();function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n})(Ls)),Ls}var yh;function GO(){return yh||(yh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Qv(),n=XO();function r(i){return i=n.cloneDeep(i),a=>t.isMatch(a,i)}e.matches=r})(Es)),Es}var Ws={},qs={},Us={},bh;function ZO(){return bh||(bh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ey(),n=ac(),r=Jv();function i(a,o){return t.cloneDeepWith(a,(s,l,u,c)=>{const f=o?.(s,l,u,c);if(f!==void 0)return f;if(typeof a=="object"){if(n.getTag(a)===r.objectTag&&typeof a.constructor!="function"){const d={};return c.set(a,d),t.copyProperties(d,a,u,c),d}switch(Object.prototype.toString.call(a)){case r.numberTag:case r.stringTag:case r.booleanTag:{const d=new a.constructor(a?.valueOf());return t.copyProperties(d,a),d}case r.argumentsTag:{const d={};return t.copyProperties(d,a),d.length=a.length,d[Symbol.iterator]=a[Symbol.iterator],d}default:return}}})}e.cloneDeepWith=i})(Us)),Us}var xh;function QO(){return xh||(xh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ZO();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(qs)),qs}var Vs={},Hs={},_h;function ty(){return _h||(_h=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(r,i=Number.MAX_SAFE_INTEGER){switch(typeof r){case"number":return Number.isInteger(r)&&r>=0&&r<i;case"symbol":return!1;case"string":return t.test(r)}}e.isIndex=n})(Hs)),Hs}var Ks={},wh;function JO(){return wh||(wh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ac();function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n})(Ks)),Ks}var Sh;function eP(){return Sh||(Sh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Vv(),n=ty(),r=JO(),i=ec();function a(o,s){let l;if(Array.isArray(s)?l=s:typeof s=="string"&&t.isDeepKey(s)&&o?.[s]==null?l=i.toPath(s):l=[s],l.length===0)return!1;let u=o;for(let c=0;c<l.length;c++){const f=l[c];if((u==null||!Object.hasOwn(u,f))&&!((Array.isArray(u)||r.isArguments(u))&&n.isIndex(f)&&f<u.length))return!1;u=u[f]}return!0}e.has=a})(Vs)),Vs}var Oh;function tP(){return Oh||(Oh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Qv(),n=Ju(),r=QO(),i=tc(),a=eP();function o(s,l){switch(typeof s){case"object":{Object.is(s?.valueOf(),-0)&&(s="-0");break}case"number":{s=n.toKey(s);break}}return l=r.cloneDeep(l),function(u){const c=i.get(u,s);return c===void 0?a.has(u,s):l===void 0?c===void 0:t.isMatch(c,l)}}e.matchesProperty=o})(Ws)),Ws}var Ph;function oc(){return Ph||(Ph=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ic(),n=VO(),r=GO(),i=tP();function a(o){if(o==null)return t.identity;switch(typeof o){case"function":return o;case"object":return Array.isArray(o)&&o.length===2?i.matchesProperty(o[0],o[1]):r.matches(o);case"string":case"symbol":case"number":return n.property(o)}}e.iteratee=a})(ks)),ks}var Mh;function nP(){return Mh||(Mh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zO(),n=$O(),r=ic(),i=UO(),a=oc();function o(s,l=r.identity){return i.isArrayLikeObject(s)?t.uniqBy(Array.from(s),n.ary(a.iteratee(l),1)):[]}e.uniqBy=o})(xs)),xs}var Ys,Ah;function rP(){return Ah||(Ah=1,Ys=nP().uniqBy),Ys}var iP=rP();const kh=Jt(iP);function aP(e,t,n){return t===!0?kh(e,n):typeof t=="function"?kh(e,t):e}var Xs={exports:{}},Gs={},Zs={exports:{}},Qs={};var Ch;function oP(){if(Ch)return Qs;Ch=1;var e=Fu();function t(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function s(f,d){var h=d(),p=r({inst:{value:h,getSnapshot:d}}),m=p[0].inst,g=p[1];return a(function(){m.value=h,m.getSnapshot=d,l(m)&&g({inst:m})},[f,h,d]),i(function(){return l(m)&&g({inst:m}),f(function(){l(m)&&g({inst:m})})},[f]),o(h),h}function l(f){var d=f.getSnapshot;f=f.value;try{var h=d();return!n(f,h)}catch{return!0}}function u(f,d){return d()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return Qs.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,Qs}var Eh;function sP(){return Eh||(Eh=1,Zs.exports=oP()),Zs.exports}var Th;function lP(){if(Th)return Gs;Th=1;var e=Fu(),t=sP();function n(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Gs.useSyncExternalStoreWithSelector=function(u,c,f,d,h){var p=a(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=s(function(){function v(S){if(!y){if(y=!0,b=S,S=d(S),h!==void 0&&m.hasValue){var O=m.value;if(h(O,S))return _=O}return _=S}if(O=_,r(b,S))return O;var M=d(S);return h!==void 0&&h(O,M)?(b=S,O):(b=S,_=M)}var y=!1,b,_,x=f===void 0?null:f;return[function(){return v(c())},x===null?void 0:function(){return v(x())}]},[c,f,d,h]);var g=i(u,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},Gs}var Dh;function uP(){return Dh||(Dh=1,Xs.exports=lP()),Xs.exports}var cP=uP(),sc=w.createContext(null),fP=e=>e,Fe=()=>{var e=w.useContext(sc);return e?e.store.dispatch:fP},ga=()=>{},dP=()=>ga,hP=(e,t)=>e===t;function U(e){var t=w.useContext(sc),n=w.useMemo(()=>t?r=>{if(r!=null)return e(r)}:ga,[t,e]);return cP.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:dP,t?t.store.getState:ga,t?t.store.getState:ga,n,hP)}function pP(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function gP(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function mP(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Ih=e=>Array.isArray(e)?e:[e];function vP(e){const t=Array.isArray(e[0])?e[0]:e;return mP(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function yP(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var bP=class{constructor(e){this.value=e}deref(){return this.value}},xP=typeof WeakRef<"u"?WeakRef:bP,_P=0,Rh=1;function Qi(){return{s:_P,v:void 0,o:null,p:null}}function ny(e,t={}){let n=Qi();const{resultEqualityCheck:r}=t;let i,a=0;function o(){let s=n;const{length:l}=arguments;for(let f=0,d=l;f<d;f++){const h=arguments[f];if(typeof h=="function"||typeof h=="object"&&h!==null){let p=s.o;p===null&&(s.o=p=new WeakMap);const m=p.get(h);m===void 0?(s=Qi(),p.set(h,s)):s=m}else{let p=s.p;p===null&&(s.p=p=new Map);const m=p.get(h);m===void 0?(s=Qi(),p.set(h,s)):s=m}}const u=s;let c;if(s.s===Rh)c=s.v;else if(c=e.apply(null,arguments),a++,r){const f=i?.deref?.()??i;f!=null&&r(f,c)&&(c=f,a!==0&&a--),i=typeof c=="object"&&c!==null||typeof c=="function"?new xP(c):c}return u.s=Rh,u.v=c,c}return o.clearCache=()=>{n=Qi(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function wP(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let a=0,o=0,s,l={},u=i.pop();typeof u=="object"&&(l=u,u=i.pop()),pP(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const c={...n,...l},{memoize:f,memoizeOptions:d=[],argsMemoize:h=ny,argsMemoizeOptions:p=[]}=c,m=Ih(d),g=Ih(p),v=vP(i),y=f(function(){return a++,u.apply(null,arguments)},...m),b=h(function(){o++;const x=yP(v,arguments);return s=y.apply(null,x),s},...g);return Object.assign(b,{resultFunc:u,memoizedResultFunc:y,dependencies:v,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:h})};return Object.assign(r,{withTypes:()=>r}),r}var P=wP(ny),SP=Object.assign((e,t=P)=>{gP(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(a=>e[a]);return t(r,(...a)=>a.reduce((o,s,l)=>(o[n[l]]=s,o),{}))},{withTypes:()=>SP}),Js={},el={},tl={},jh;function OP(){return jh||(jh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"?1:r===null?2:r===void 0?3:r!==r?4:0}const n=(r,i,a)=>{if(r!==i){const o=t(r),s=t(i);if(o===s&&o===0){if(r<i)return a==="desc"?1:-1;if(r>i)return a==="desc"?-1:1}return a==="desc"?s-o:o-s}return 0};e.compareValues=n})(tl)),tl}var nl={},rl={},Lh;function ry(){return Lh||(Lh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=t})(rl)),rl}var Nh;function PP(){return Nh||(Nh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ry(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(a,o){return Array.isArray(a)?!1:typeof a=="number"||typeof a=="boolean"||a==null||t.isSymbol(a)?!0:typeof a=="string"&&(r.test(a)||!n.test(a))||o!=null&&Object.hasOwn(o,a)}e.isKey=i})(nl)),nl}var Fh;function MP(){return Fh||(Fh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=OP(),n=PP(),r=ec();function i(a,o,s,l){if(a==null)return[];s=l?void 0:s,Array.isArray(a)||(a=Object.values(a)),Array.isArray(o)||(o=o==null?[null]:[o]),o.length===0&&(o=[null]),Array.isArray(s)||(s=s==null?[]:[s]),s=s.map(h=>String(h));const u=(h,p)=>{let m=h;for(let g=0;g<p.length&&m!=null;++g)m=m[p[g]];return m},c=(h,p)=>p==null||h==null?p:typeof h=="object"&&"key"in h?Object.hasOwn(p,h.key)?p[h.key]:u(p,h.path):typeof h=="function"?h(p):Array.isArray(h)?u(p,h):typeof p=="object"?p[h]:p,f=o.map(h=>(Array.isArray(h)&&h.length===1&&(h=h[0]),h==null||typeof h=="function"||Array.isArray(h)||n.isKey(h)?h:{key:h,path:r.toPath(h)}));return a.map(h=>({original:h,criteria:f.map(p=>c(p,h))})).slice().sort((h,p)=>{for(let m=0;m<f.length;m++){const g=t.compareValues(h.criteria[m],p.criteria[m],s[m]);if(g!==0)return g}return 0}).map(h=>h.original)}e.orderBy=i})(el)),el}var il={},Bh;function AP(){return Bh||(Bh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r=1){const i=[],a=Math.floor(r),o=(s,l)=>{for(let u=0;u<s.length;u++){const c=s[u];Array.isArray(c)&&l<a?o(c,l+1):i.push(c)}};return o(n,0),i}e.flatten=t})(il)),il}var al={},zh;function iy(){return zh||(zh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ty(),n=Yv(),r=Xv(),i=Zv();function a(o,s,l){return r.isObject(l)&&(typeof s=="number"&&n.isArrayLike(l)&&t.isIndex(s)&&s<l.length||typeof s=="string"&&s in l)?i.isEqualsSameValueZero(l[s],o):!1}e.isIterateeCall=a})(al)),al}var $h;function kP(){return $h||($h=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MP(),n=AP(),r=iy();function i(a,...o){const s=o.length;return s>1&&r.isIterateeCall(a,o[0],o[1])?o=[]:s>2&&r.isIterateeCall(o[0],o[1],o[2])&&(o=[o[0]]),t.orderBy(a,n.flatten(o),["asc"])}e.sortBy=i})(Js)),Js}var ol,Wh;function CP(){return Wh||(Wh=1,ol=kP().sortBy),ol}var EP=CP();const bo=Jt(EP);var ay=e=>e.legend.settings,TP=e=>e.legend.size,DP=e=>e.legend.payload;P([DP,ay],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?bo(r,n):r});var Ji=1;function IP(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=w.useState({height:0,left:0,top:0,width:0}),r=w.useCallback(i=>{if(i!=null){var a=i.getBoundingClientRect(),o={height:a.height,left:a.left,top:a.top,width:a.width};(Math.abs(o.height-t.height)>Ji||Math.abs(o.left-t.left)>Ji||Math.abs(o.top-t.top)>Ji||Math.abs(o.width-t.width)>Ji)&&n({height:o.height,left:o.left,top:o.top,width:o.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}function Oe(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var RP=typeof Symbol=="function"&&Symbol.observable||"@@observable",qh=RP,sl=()=>Math.random().toString(36).substring(7).split("").join("."),jP={INIT:`@@redux/INIT${sl()}`,REPLACE:`@@redux/REPLACE${sl()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${sl()}`},ka=jP;function lc(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function oy(e,t,n){if(typeof e!="function")throw new Error(Oe(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Oe(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Oe(1));return n(oy)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,l=!1;function u(){o===a&&(o=new Map,a.forEach((g,v)=>{o.set(v,g)}))}function c(){if(l)throw new Error(Oe(3));return i}function f(g){if(typeof g!="function")throw new Error(Oe(4));if(l)throw new Error(Oe(5));let v=!0;u();const y=s++;return o.set(y,g),function(){if(v){if(l)throw new Error(Oe(6));v=!1,u(),o.delete(y),a=null}}}function d(g){if(!lc(g))throw new Error(Oe(7));if(typeof g.type>"u")throw new Error(Oe(8));if(typeof g.type!="string")throw new Error(Oe(17));if(l)throw new Error(Oe(9));try{l=!0,i=r(i,g)}finally{l=!1}return(a=o).forEach(y=>{y()}),g}function h(g){if(typeof g!="function")throw new Error(Oe(10));r=g,d({type:ka.REPLACE})}function p(){const g=f;return{subscribe(v){if(typeof v!="object"||v===null)throw new Error(Oe(11));function y(){const _=v;_.next&&_.next(c())}return y(),{unsubscribe:g(y)}},[qh](){return this}}}return d({type:ka.INIT}),{dispatch:d,subscribe:f,getState:c,replaceReducer:h,[qh]:p}}function LP(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:ka.INIT})>"u")throw new Error(Oe(12));if(typeof n(void 0,{type:ka.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Oe(13))})}function sy(e){const t=Object.keys(e),n={};for(let a=0;a<t.length;a++){const o=t[a];typeof e[o]=="function"&&(n[o]=e[o])}const r=Object.keys(n);let i;try{LP(n)}catch(a){i=a}return function(o={},s){if(i)throw i;let l=!1;const u={};for(let c=0;c<r.length;c++){const f=r[c],d=n[f],h=o[f],p=d(h,s);if(typeof p>"u")throw s&&s.type,new Error(Oe(14));u[f]=p,l=l||p!==h}return l=l||r.length!==Object.keys(o).length,l?u:o}}function Ca(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function NP(...e){return t=>(n,r)=>{const i=t(n,r);let a=()=>{throw new Error(Oe(15))};const o={getState:i.getState,dispatch:(l,...u)=>a(l,...u)},s=e.map(l=>l(o));return a=Ca(...s)(i.dispatch),{...i,dispatch:a}}}function ly(e){return lc(e)&&"type"in e&&typeof e.type=="string"}var uy=Symbol.for("immer-nothing"),Uh=Symbol.for("immer-draftable"),Ee=Symbol.for("immer-state");function rt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ue=Object,or=Ue.getPrototypeOf,Ea="constructor",xo="prototype",iu="configurable",Ta="enumerable",ma="writable",ri="value",Tt=e=>!!e&&!!e[Ee];function lt(e){return e?cy(e)||wo(e)||!!e[Uh]||!!e[Ea]?.[Uh]||So(e)||Oo(e):!1}var FP=Ue[xo][Ea].toString(),Vh=new WeakMap;function cy(e){if(!e||!uc(e))return!1;const t=or(e);if(t===null||t===Ue[xo])return!0;const n=Ue.hasOwnProperty.call(t,Ea)&&t[Ea];if(n===Object)return!0;if(!Xn(n))return!1;let r=Vh.get(n);return r===void 0&&(r=Function.toString.call(n),Vh.set(n,r)),r===FP}function _o(e,t,n=!0){bi(e)===0?(n?Reflect.ownKeys(e):Ue.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function bi(e){const t=e[Ee];return t?t.type_:wo(e)?1:So(e)?2:Oo(e)?3:0}var Hh=(e,t,n=bi(e))=>n===2?e.has(t):Ue[xo].hasOwnProperty.call(e,t),au=(e,t,n=bi(e))=>n===2?e.get(t):e[t],Da=(e,t,n,r=bi(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function BP(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var wo=Array.isArray,So=e=>e instanceof Map,Oo=e=>e instanceof Set,uc=e=>typeof e=="object",Xn=e=>typeof e=="function",ll=e=>typeof e=="boolean";function zP(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Mt=e=>e.copy_||e.base_,cc=e=>e.modified_?e.copy_:e.base_;function ou(e,t){if(So(e))return new Map(e);if(Oo(e))return new Set(e);if(wo(e))return Array[xo].slice.call(e);const n=cy(e);if(t===!0||t==="class_only"&&!n){const r=Ue.getOwnPropertyDescriptors(e);delete r[Ee];let i=Reflect.ownKeys(r);for(let a=0;a<i.length;a++){const o=i[a],s=r[o];s[ma]===!1&&(s[ma]=!0,s[iu]=!0),(s.get||s.set)&&(r[o]={[iu]:!0,[ma]:!0,[Ta]:s[Ta],[ri]:e[o]})}return Ue.create(or(e),r)}else{const r=or(e);if(r!==null&&n)return{...e};const i=Ue.create(r);return Ue.assign(i,e)}}function fc(e,t=!1){return Po(e)||Tt(e)||!lt(e)||(bi(e)>1&&Ue.defineProperties(e,{set:ea,add:ea,clear:ea,delete:ea}),Ue.freeze(e),t&&_o(e,(n,r)=>{fc(r,!0)},!1)),e}function $P(){rt(2)}var ea={[ri]:$P};function Po(e){return e===null||!uc(e)?!0:Ue.isFrozen(e)}var Ia="MapSet",su="Patches",Kh="ArrayMethods",fy={};function Rn(e){const t=fy[e];return t||rt(0,e),t}var Yh=e=>!!fy[e],ii,dy=()=>ii,WP=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Yh(Ia)?Rn(Ia):void 0,arrayMethodsPlugin_:Yh(Kh)?Rn(Kh):void 0});function Xh(e,t){t&&(e.patchPlugin_=Rn(su),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function lu(e){uu(e),e.drafts_.forEach(qP),e.drafts_=null}function uu(e){e===ii&&(ii=e.parent_)}var Gh=e=>ii=WP(ii,e);function qP(e){const t=e[Ee];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Zh(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[Ee].modified_&&(lu(t),rt(4)),lt(e)&&(e=Qh(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[Ee].base_,e,t)}else e=Qh(t,n);return UP(t,e,!0),lu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==uy?e:void 0}function Qh(e,t){if(Po(t))return t;const n=t[Ee];if(!n)return Ra(t,e.handledSet_,e);if(!Mo(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);gy(n,e)}return n.copy_}function UP(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&fc(t,n)}function hy(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Mo=(e,t)=>e.scope_===t,VP=[];function py(e,t,n,r){const i=Mt(e),a=e.type_;if(r!==void 0&&au(i,r,a)===t){Da(i,r,n,a);return}if(!e.draftLocations_){const s=e.draftLocations_=new Map;_o(i,(l,u)=>{if(Tt(u)){const c=s.get(u)||[];c.push(l),s.set(u,c)}})}const o=e.draftLocations_.get(t)??VP;for(const s of o)Da(i,s,n,a)}function HP(e,t,n){e.callbacks_.push(function(i){const a=t;if(!a||!Mo(a,i))return;i.mapSetPlugin_?.fixSetContents(a);const o=cc(a);py(e,a.draft_??a,o,n),gy(a,i)})}function gy(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const i=r.getPath(e);i&&r.generatePatches_(e,i,t)}hy(e)}}function KP(e,t,n){const{scope_:r}=e;if(Tt(n)){const i=n[Ee];Mo(i,r)&&i.callbacks_.push(function(){va(e);const o=cc(i);py(e,n,o,t)})}else lt(n)&&e.callbacks_.push(function(){const a=Mt(e);e.type_===3?a.has(n)&&Ra(n,r.handledSet_,r):au(a,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Ra(au(e.copy_,t,e.type_),r.handledSet_,r)})}function Ra(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Tt(e)||t.has(e)||!lt(e)||Po(e)||(t.add(e),_o(e,(r,i)=>{if(Tt(i)){const a=i[Ee];if(Mo(a,n)){const o=cc(a);Da(e,r,o,e.type_),hy(a)}}else lt(i)&&Ra(i,t,n)})),e}function YP(e,t){const n=wo(e),r={type_:n?1:0,scope_:t?t.scope_:dy(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,a=ja;n&&(i=[r],a=ai);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var ja={get(e,t){if(t===Ee)return e;let n=e.scope_.arrayMethodsPlugin_;const r=e.type_===1&&typeof t=="string";if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const i=Mt(e);if(!Hh(i,t,e.type_))return XP(e,i,t);const a=i[t];if(e.finalized_||!lt(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&zP(t))return a;if(a===ul(e.base_,t)){va(e);const o=e.type_===1?+t:t,s=fu(e.scope_,a,e,o);return e.copy_[o]=s}return a},has(e,t){return t in Mt(e)},ownKeys(e){return Reflect.ownKeys(Mt(e))},set(e,t,n){const r=my(Mt(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=ul(Mt(e),t),a=i?.[Ee];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(BP(n,i)&&(n!==void 0||Hh(e.base_,t,e.type_)))return!0;va(e),cu(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),KP(e,t,n)),!0},deleteProperty(e,t){return va(e),ul(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),cu(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Mt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[ma]:!0,[iu]:e.type_!==1||t!=="length",[Ta]:r[Ta],[ri]:n[t]}},defineProperty(){rt(11)},getPrototypeOf(e){return or(e.base_)},setPrototypeOf(){rt(12)}},ai={};for(let e in ja){let t=ja[e];ai[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}ai.deleteProperty=function(e,t){return ai.set.call(this,e,t,void 0)};ai.set=function(e,t,n){return ja.set.call(this,e[0],t,n,e[0])};function ul(e,t){const n=e[Ee];return(n?Mt(n):e)[t]}function XP(e,t,n){const r=my(t,n);return r?ri in r?r[ri]:r.get?.call(e.draft_):void 0}function my(e,t){if(!(t in e))return;let n=or(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=or(n)}}function cu(e){e.modified_||(e.modified_=!0,e.parent_&&cu(e.parent_))}function va(e){e.copy_||(e.assigned_=new Map,e.copy_=ou(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var GP=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,i)=>{if(Xn(n)&&!Xn(r)){const o=r;r=n;const s=this;return function(u=o,...c){return s.produce(u,f=>r.call(this,f,...c))}}Xn(r)||rt(6),i!==void 0&&!Xn(i)&&rt(7);let a;if(lt(n)){const o=Gh(this),s=fu(o,n,void 0);let l=!0;try{a=r(s),l=!1}finally{l?lu(o):uu(o)}return Xh(o,i),Zh(a,o)}else if(!n||!uc(n)){if(a=r(n),a===void 0&&(a=n),a===uy&&(a=void 0),this.autoFreeze_&&fc(a,!0),i){const o=[],s=[];Rn(su).generateReplacementPatches_(n,a,{patches_:o,inversePatches_:s}),i(o,s)}return a}else rt(1,n)},this.produceWithPatches=(n,r)=>{if(Xn(n))return(s,...l)=>this.produceWithPatches(s,u=>n(u,...l));let i,a;return[this.produce(n,r,(s,l)=>{i=s,a=l}),i,a]},ll(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),ll(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),ll(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){lt(t)||rt(8),Tt(t)&&(t=Ze(t));const n=Gh(this),r=fu(n,t,void 0);return r[Ee].isManual_=!0,uu(n),r}finishDraft(t,n){const r=t&&t[Ee];(!r||!r.isManual_)&&rt(9);const{scope_:i}=r;return Xh(i,n),Zh(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let r;for(r=n.length-1;r>=0;r--){const a=n[r];if(a.path.length===0&&a.op==="replace"){t=a.value;break}}r>-1&&(n=n.slice(r+1));const i=Rn(su).applyPatches_;return Tt(t)?i(t,n):this.produce(t,a=>i(a,n))}};function fu(e,t,n,r){const[i,a]=So(t)?Rn(Ia).proxyMap_(t,n):Oo(t)?Rn(Ia).proxySet_(t,n):YP(t,n);return(n?.scope_??dy()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?HP(n,a,r):a.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(a);const{patchPlugin_:u}=l;a.modified_&&u&&u.generatePatches_(a,[],l)}),i}function Ze(e){return Tt(e)||rt(10,e),vy(e)}function vy(e){if(!lt(e)||Po(e))return e;const t=e[Ee];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=ou(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=ou(e,!0);return _o(n,(i,a)=>{Da(n,i,vy(a))},r),t&&(t.finalized_=!1),n}var ZP=new GP,yy=ZP.produce;function by(e){return({dispatch:n,getState:r})=>i=>a=>typeof a=="function"?a(n,r,e):i(a)}var QP=by(),JP=by,eM=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ca:Ca.apply(null,arguments)};function Ke(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(He(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>ly(r)&&r.type===e,n}var xy=class Vr extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Vr.prototype)}static get[Symbol.species](){return Vr}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Vr(...t[0].concat(this)):new Vr(...t.concat(this))}};function Jh(e){return lt(e)?yy(e,()=>{}):e}function ta(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function tM(e){return typeof e=="boolean"}var nM=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let o=new xy;return n&&(tM(n)?o.push(QP):o.push(JP(n.extraArgument))),o},_y="RTK_autoBatch",ee=()=>e=>({payload:e,meta:{[_y]:!0}}),ep=e=>t=>{setTimeout(t,e)},wy=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,a=!1,o=!1;const s=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ep(10):e.type==="callback"?e.queueNotification:ep(e.timeout),u=()=>{o=!1,a&&(a=!1,s.forEach(c=>c()))};return Object.assign({},r,{subscribe(c){const f=()=>i&&c(),d=r.subscribe(f);return s.add(c),()=>{d(),s.delete(c)}},dispatch(c){try{return i=!c?.meta?.[_y],a=!i,a&&(o||(o=!0,l(u))),r.dispatch(c)}finally{i=!0}}})},rM=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new xy(e);return r&&i.push(wy(typeof r=="object"?r:void 0)),i};function iM(e){const t=nM(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:a=void 0,enhancers:o=void 0}=e||{};let s;if(typeof n=="function")s=n;else if(lc(n))s=sy(n);else throw new Error(He(1));let l;typeof r=="function"?l=r(t):l=t();let u=Ca;i&&(u=eM({trace:!1,...typeof i=="object"&&i}));const c=NP(...l),f=rM(c);let d=typeof o=="function"?o(f):f();const h=u(...d);return oy(s,a,h)}function Sy(e){const t={},n=[];let r;const i={addCase(a,o){const s=typeof a=="string"?a:a.type;if(!s)throw new Error(He(28));if(s in t)throw new Error(He(29));return t[s]=o,i},addAsyncThunk(a,o){return o.pending&&(t[a.pending.type]=o.pending),o.rejected&&(t[a.rejected.type]=o.rejected),o.fulfilled&&(t[a.fulfilled.type]=o.fulfilled),o.settled&&n.push({matcher:a.settled,reducer:o.settled}),i},addMatcher(a,o){return n.push({matcher:a,reducer:o}),i},addDefaultCase(a){return r=a,i}};return e(i),[t,n,r]}function aM(e){return typeof e=="function"}function oM(e,t){let[n,r,i]=Sy(t),a;if(aM(e))a=()=>Jh(e());else{const s=Jh(e);a=()=>s}function o(s=a(),l){let u=[n[l.type],...r.filter(({matcher:c})=>c(l)).map(({reducer:c})=>c)];return u.filter(c=>!!c).length===0&&(u=[i]),u.reduce((c,f)=>{if(f)if(Tt(c)){const h=f(c,l);return h===void 0?c:h}else{if(lt(c))return yy(c,d=>f(d,l));{const d=f(c,l);if(d===void 0){if(c===null)return c;throw Error("A case reducer on a non-draftable value must not return undefined")}return d}}return c},s)}return o.getInitialState=a,o}var sM="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",lM=(e=21)=>{let t="",n=e;for(;n--;)t+=sM[Math.random()*64|0];return t},uM=Symbol.for("rtk-slice-createasyncthunk");function cM(e,t){return`${e}/${t}`}function fM({creators:e}={}){const t=e?.asyncThunk?.[uM];return function(r){const{name:i,reducerPath:a=i}=r;if(!i)throw new Error(He(11));const o=(typeof r.reducers=="function"?r.reducers(hM()):r.reducers)||{},s=Object.keys(o),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(b,_){const x=typeof b=="string"?b:b.type;if(!x)throw new Error(He(12));if(x in l.sliceCaseReducersByType)throw new Error(He(13));return l.sliceCaseReducersByType[x]=_,u},addMatcher(b,_){return l.sliceMatchers.push({matcher:b,reducer:_}),u},exposeAction(b,_){return l.actionCreators[b]=_,u},exposeCaseReducer(b,_){return l.sliceCaseReducersByName[b]=_,u}};s.forEach(b=>{const _=o[b],x={reducerName:b,type:cM(i,b),createNotation:typeof r.reducers=="function"};gM(_)?vM(x,_,u,t):pM(x,_,u)});function c(){const[b={},_=[],x=void 0]=typeof r.extraReducers=="function"?Sy(r.extraReducers):[r.extraReducers],S={...b,...l.sliceCaseReducersByType};return oM(r.initialState,O=>{for(let M in S)O.addCase(M,S[M]);for(let M of l.sliceMatchers)O.addMatcher(M.matcher,M.reducer);for(let M of _)O.addMatcher(M.matcher,M.reducer);x&&O.addDefaultCase(x)})}const f=b=>b,d=new Map,h=new WeakMap;let p;function m(b,_){return p||(p=c()),p(b,_)}function g(){return p||(p=c()),p.getInitialState()}function v(b,_=!1){function x(O){let M=O[b];return typeof M>"u"&&_&&(M=ta(h,x,g)),M}function S(O=f){const M=ta(d,_,()=>new WeakMap);return ta(M,O,()=>{const k={};for(const[E,T]of Object.entries(r.selectors??{}))k[E]=dM(T,O,()=>ta(h,O,g),_);return k})}return{reducerPath:b,getSelectors:S,get selectors(){return S(x)},selectSlice:x}}const y={name:i,reducer:m,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:g,...v(a),injectInto(b,{reducerPath:_,...x}={}){const S=_??a;return b.inject({reducerPath:S,reducer:m},x),{...y,...v(S,!0)}}};return y}}function dM(e,t,n,r){function i(a,...o){let s=t(a);return typeof s>"u"&&r&&(s=n()),e(s,...o)}return i.unwrapped=e,i}var Ae=fM();function hM(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function pM({type:e,reducerName:t,createNotation:n},r,i){let a,o;if("reducer"in r){if(n&&!mM(r))throw new Error(He(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?Ke(e,o):Ke(e))}function gM(e){return e._reducerDefinitionType==="asyncThunk"}function mM(e){return e._reducerDefinitionType==="reducerWithPrepare"}function vM({type:e,reducerName:t},n,r,i){if(!i)throw new Error(He(18));const{payloadCreator:a,fulfilled:o,pending:s,rejected:l,settled:u,options:c}=n,f=i(e,a,c);r.exposeAction(t,f),o&&r.addCase(f.fulfilled,o),s&&r.addCase(f.pending,s),l&&r.addCase(f.rejected,l),u&&r.addMatcher(f.settled,u),r.exposeCaseReducer(t,{fulfilled:o||na,pending:s||na,rejected:l||na,settled:u||na})}function na(){}var yM="task",Oy="listener",Py="completed",dc="cancelled",bM=`task-${dc}`,xM=`task-${Py}`,du=`${Oy}-${dc}`,_M=`${Oy}-${Py}`,Ao=class{constructor(e){this.code=e,this.message=`${yM} ${dc} (reason: ${e})`}name="TaskAbortError";message},hc=(e,t)=>{if(typeof e!="function")throw new TypeError(He(32))},La=()=>{},My=(e,t=La)=>(e.catch(t),e),Ay=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),kn=e=>{if(e.aborted)throw new Ao(e.reason)};function ky(e,t){let n=La;return new Promise((r,i)=>{const a=()=>i(new Ao(e.reason));if(e.aborted){a();return}n=Ay(e,a),t.finally(()=>n()).then(r,i)}).finally(()=>{n=La})}var wM=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof Ao?"cancelled":"rejected",error:n}}finally{t?.()}},Na=e=>t=>My(ky(e,t).then(n=>(kn(e),n))),Cy=e=>{const t=Na(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:Zn}=Object,tp={},ko="listenerMiddleware",SM=(e,t)=>{const n=r=>Ay(e,()=>r.abort(e.reason));return(r,i)=>{hc(r);const a=new AbortController;n(a);const o=wM(async()=>{kn(e),kn(a.signal);const s=await r({pause:Na(a.signal),delay:Cy(a.signal),signal:a.signal});return kn(a.signal),s},()=>a.abort(xM));return i?.autoJoin&&t.push(o.catch(La)),{result:Na(e)(o),cancel(){a.abort(bM)}}}},OM=(e,t)=>{const n=async(r,i)=>{kn(t);let a=()=>{};const s=[new Promise((l,u)=>{let c=e({predicate:r,effect:(f,d)=>{d.unsubscribe(),l([f,d.getState(),d.getOriginalState()])}});a=()=>{c(),u()}})];i!=null&&s.push(new Promise(l=>setTimeout(l,i,null)));try{const l=await ky(t,Promise.race(s));return kn(t),l}finally{a()}};return(r,i)=>My(n(r,i))},Ey=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=Ke(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(He(21));return hc(a),{predicate:i,type:t,effect:a}},Ty=Zn(e=>{const{type:t,predicate:n,effect:r}=Ey(e);return{id:lM(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(He(22))}}},{withTypes:()=>Ty}),np=(e,t)=>{const{type:n,effect:r,predicate:i}=Ey(t);return Array.from(e.values()).find(a=>(typeof n=="string"?a.type===n:a.predicate===i)&&a.effect===r)},hu=e=>{e.pending.forEach(t=>{t.abort(du)})},PM=(e,t)=>()=>{for(const n of t.keys())hu(n);e.clear()},rp=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},Dy=Zn(Ke(`${ko}/add`),{withTypes:()=>Dy}),MM=Ke(`${ko}/removeAll`),Iy=Zn(Ke(`${ko}/remove`),{withTypes:()=>Iy}),AM=(...e)=>{console.error(`${ko}/error`,...e)},xi=(e={})=>{const t=new Map,n=new Map,r=h=>{const p=n.get(h)??0;n.set(h,p+1)},i=h=>{const p=n.get(h)??1;p===1?n.delete(h):n.set(h,p-1)},{extra:a,onError:o=AM}=e;hc(o);const s=h=>(h.unsubscribe=()=>t.delete(h.id),t.set(h.id,h),p=>{h.unsubscribe(),p?.cancelActive&&hu(h)}),l=h=>{const p=np(t,h)??Ty(h);return s(p)};Zn(l,{withTypes:()=>l});const u=h=>{const p=np(t,h);return p&&(p.unsubscribe(),h.cancelActive&&hu(p)),!!p};Zn(u,{withTypes:()=>u});const c=async(h,p,m,g)=>{const v=new AbortController,y=OM(l,v.signal),b=[];try{h.pending.add(v),r(h),await Promise.resolve(h.effect(p,Zn({},m,{getOriginalState:g,condition:(_,x)=>y(_,x).then(Boolean),take:y,delay:Cy(v.signal),pause:Na(v.signal),extra:a,signal:v.signal,fork:SM(v.signal,b),unsubscribe:h.unsubscribe,subscribe:()=>{t.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((_,x,S)=>{_!==v&&(_.abort(du),S.delete(_))})},cancel:()=>{v.abort(du),h.pending.delete(v)},throwIfCancelled:()=>{kn(v.signal)}})))}catch(_){_ instanceof Ao||rp(o,_,{raisedBy:"effect"})}finally{await Promise.all(b),v.abort(_M),i(h),h.pending.delete(v)}},f=PM(t,n);return{middleware:h=>p=>m=>{if(!ly(m))return p(m);if(Dy.match(m))return l(m.payload);if(MM.match(m)){f();return}if(Iy.match(m))return u(m.payload);let g=h.getState();const v=()=>{if(g===tp)throw new Error(He(23));return g};let y;try{if(y=p(m),t.size>0){const b=h.getState(),_=Array.from(t.values());for(const x of _){let S=!1;try{S=x.predicate(m,b,g)}catch(O){S=!1,rp(o,O,{raisedBy:"predicate"})}S&&c(x,m,h,v)}}}finally{g=tp}return y},startListening:l,stopListening:u,clearListeners:f}};function He(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var kM={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},Ry=Ae({name:"chartLayout",initialState:kM,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,i,a;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(a=t.payload.left)!==null&&a!==void 0?a:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:CM,setLayout:rN,setChartSize:EM,setScale:TM}=Ry.actions,DM=Ry.reducer;function jy(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function Q(e){return Number.isFinite(e)}function Qt(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function ip(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ip(Object(n),!0).forEach(function(r){IM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ip(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IM(e,t,n){return(t=RM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RM(e){var t=jM(e,"string");return typeof t=="symbol"?t:t+""}function jM(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ve(e,t,n){return Aa(e)||Aa(t)?n:In(t)?nc(e,t,n):typeof t=="function"?t(e):n}var LM=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:a,verticalAlign:o,layout:s}=t;if((s==="vertical"||s==="horizontal"&&o==="middle")&&a!=="center"&&$(e[a]))return Gn(Gn({},e),{},{[a]:e[a]+(r||0)});if((s==="horizontal"||s==="vertical"&&a==="center")&&o!=="middle"&&$(e[o]))return Gn(Gn({},e),{},{[o]:e[o]+(i||0)})}return e},en=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",NM=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var i=0;i<r;++i)for(var a=0,o=0,s=0;s<n;++s){var l=e[s],u=l?.[i];if(u!=null){var c=u[1],f=u[0],d=gr(c)?f:c;d>=0?(u[0]=a,a+=d,u[1]=a):(u[0]=o,o+=d,u[1]=o)}}}},FM=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var i=0;i<r;++i)for(var a=0,o=0;o<n;++o){var s=e[o],l=s?.[i];if(l!=null){var u=gr(l[1])?l[0]:l[1];u>=0?(l[0]=a,a+=u,l[1]=a):(l[0]=0,l[1]=0)}}}},BM={sign:NM,expand:PO,none:Dn,silhouette:MO,wiggle:AO,positive:FM},zM=(e,t,n)=>{var r,i=(r=BM[n])!==null&&r!==void 0?r:Dn,a=OO().keys(t).value((s,l)=>Number(ve(s,l,0))).order(nu).offset(i),o=a(e);return o.forEach((s,l)=>{s.forEach((u,c)=>{var f=ve(e[c],t[l],0);Array.isArray(f)&&f.length===2&&$(f[0])&&$(f[1])&&(u[0]=f[0],u[1]=f[1])})}),o},$M=e=>{var t=e.flat(2).filter($);return[Math.min(...t),Math.max(...t)]},WM=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],qM=(e,t,n)=>{if(e!=null)return WM(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var{stackedData:o}=a,s=o.reduce((l,u)=>{var c=jy(u,t,n),f=$M(c);return!Q(f[0])||!Q(f[1])?l:[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]))},ap=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,op=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,sp=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();return r}if(e&&t&&t.length>=2){for(var i=bo(t,c=>c.coordinate),a=1/0,o=1,s=i.length;o<s;o++){var l=i[o],u=i[o-1];a=Math.min((l?.coordinate||0)-(u?.coordinate||0),a)}return a===1/0?0:a}return n?void 0:0};function lp(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:a}=e;return Gn(Gn({},t),{},{dataKey:n,payload:r,value:i,name:a})}var UM=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},VM=(e,t)=>t==="centric"?e.angle:e.radius,tn=e=>e.layout.width,nn=e=>e.layout.height,HM=e=>e.layout.scale,Ly=e=>e.layout.margin,Co=P(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Eo=P(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),KM="data-recharts-item-index",YM="data-recharts-item-id",_i=60;function up(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ra(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?up(Object(n),!0).forEach(function(r){XM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):up(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XM(e,t,n){return(t=GM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GM(e){var t=ZM(e,"string");return typeof t=="symbol"?t:t+""}function ZM(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var QM=e=>e.brush.height;function JM(e){var t=Eo(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:_i;return n+i}return n},0)}function eA(e){var t=Eo(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:_i;return n+i}return n},0)}function tA(e){var t=Co(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function nA(e){var t=Co(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var ke=P([tn,nn,Ly,QM,JM,eA,tA,nA,ay,TP],(e,t,n,r,i,a,o,s,l,u)=>{var c={left:(n.left||0)+i,right:(n.right||0)+a},f={top:(n.top||0)+o,bottom:(n.bottom||0)+s},d=ra(ra({},f),c),h=d.bottom;d.bottom+=r,d=LM(d,l,u);var p=e-d.left-d.right,m=t-d.top-d.bottom;return ra(ra({brushBottom:h},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),rA=P(ke,e=>({x:e.left,y:e.top,width:e.width,height:e.height}));P(tn,nn,(e,t)=>({x:0,y:0,width:e,height:t}));var iA=w.createContext(null),wi=()=>w.useContext(iA)!=null,To=e=>e.brush,pc=P([To,ke,Ly],(e,t,n)=>({height:e.height,x:$(e.x)?e.x:t.left,y:$(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:$(e.width)?e.width:t.width})),cl={},fl={},dl={},cp;function aA(){return cp||(cp=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:i,edges:a}={}){let o,s=null;const l=a!=null&&a.includes("leading"),u=a==null||a.includes("trailing"),c=()=>{s!==null&&(n.apply(o,s),o=void 0,s=null)},f=()=>{u&&c(),m()};let d=null;const h=()=>{d!=null&&clearTimeout(d),d=setTimeout(()=>{d=null,f()},r)},p=()=>{d!==null&&(clearTimeout(d),d=null)},m=()=>{p(),o=void 0,s=null},g=()=>{c()},v=function(...y){if(i?.aborted)return;o=this,s=y;const b=d==null;h(),l&&b&&c()};return v.schedule=h,v.cancel=m,v.flush=g,i?.addEventListener("abort",m,{once:!0}),v}e.debounce=t})(dl)),dl}var fp;function oA(){return fp||(fp=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=aA();function n(r,i=0,a={}){typeof a!="object"&&(a={});const{leading:o=!1,trailing:s=!0,maxWait:l}=a,u=Array(2);o&&(u[0]="leading"),s&&(u[1]="trailing");let c,f=null;const d=t.debounce(function(...m){c=r.apply(this,m),f=null},i,{edges:u}),h=function(...m){return l!=null&&(f===null&&(f=Date.now()),Date.now()-f>=l)?(c=r.apply(this,m),f=Date.now(),d.cancel(),d.schedule(),c):(d.apply(this,m),c)},p=()=>(d.flush(),c);return h.cancel=d.cancel,h.flush=p,h}e.debounce=n})(fl)),fl}var dp;function sA(){return dp||(dp=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oA();function n(r,i=0,a={}){const{leading:o=!0,trailing:s=!0}=a;return t.debounce(r,i,{leading:o,maxWait:i,trailing:s})}e.throttle=n})(cl)),cl}var hl,hp;function lA(){return hp||(hp=1,hl=sA().throttle),hl}var uA=lA();const cA=Jt(uA);var pp=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];if(typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(n.replace(/%s/g,()=>i[o++]))}},mt={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},Ny=(e,t,n)=>{var{width:r=mt.width,height:i=mt.height,aspect:a,maxHeight:o}=n,s=ni(r)?e:Number(r),l=ni(i)?t:Number(i);return a&&a>0&&(s?l=s/a:l&&(s=l*a),o&&l!=null&&l>o&&(l=o)),{calculatedWidth:s,calculatedHeight:l}},fA={width:0,height:0,overflow:"visible"},dA={width:0,overflowX:"visible"},hA={height:0,overflowY:"visible"},pA={},gA=e=>{var{width:t,height:n}=e,r=ni(t),i=ni(n);return r&&i?fA:r?dA:i?hA:pA};function mA(e){var{width:t,height:n,aspect:r}=e,i=t,a=n;return i===void 0&&a===void 0?(i=mt.width,a=mt.height):i===void 0?i=r&&r>0?void 0:mt.width:a===void 0&&(a=r&&r>0?void 0:mt.height),{width:i,height:a}}function pu(){return pu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pu.apply(null,arguments)}function gp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gp(Object(n),!0).forEach(function(r){vA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vA(e,t,n){return(t=yA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yA(e){var t=bA(e,"string");return typeof t=="symbol"?t:t+""}function bA(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Fy=w.createContext(mt.initialDimension);function xA(e){return Qt(e.width)&&Qt(e.height)}function By(e){var{children:t,width:n,height:r}=e,i=w.useMemo(()=>({width:n,height:r}),[n,r]);return xA(i)?w.createElement(Fy.Provider,{value:i},t):null}var gc=()=>w.useContext(Fy),_A=w.forwardRef((e,t)=>{var{aspect:n,initialDimension:r=mt.initialDimension,width:i,height:a,minWidth:o=mt.minWidth,minHeight:s,maxHeight:l,children:u,debounce:c=mt.debounce,id:f,className:d,onResize:h,style:p={}}=e,m=w.useRef(null),g=w.useRef();g.current=h,w.useImperativeHandle(t,()=>m.current);var[v,y]=w.useState({containerWidth:r.width,containerHeight:r.height}),b=w.useCallback((M,k)=>{y(E=>{var T=Math.round(M),A=Math.round(k);return E.containerWidth===T&&E.containerHeight===A?E:{containerWidth:T,containerHeight:A}})},[]);w.useEffect(()=>{if(m.current==null||typeof ResizeObserver>"u")return mr;var M=A=>{var F,L=A[0];if(L!=null){var{width:I,height:N}=L.contentRect;b(I,N),(F=g.current)===null||F===void 0||F.call(g,I,N)}};c>0&&(M=cA(M,c,{trailing:!0,leading:!1}));var k=new ResizeObserver(M),{width:E,height:T}=m.current.getBoundingClientRect();return b(E,T),k.observe(m.current),()=>{k.disconnect()}},[b,c]);var{containerWidth:_,containerHeight:x}=v;pp(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:S,calculatedHeight:O}=Ny(_,x,{width:i,height:a,aspect:n,maxHeight:l});return pp(S!=null&&S>0||O!=null&&O>0,`The width(%s) and height(%s) of chart should be greater than 0,
4
- please check the style of container, or the props width(%s) and height(%s),
5
- or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
6
- height and width.`,S,O,i,a,o,s,n),w.createElement("div",{id:f?"".concat(f):void 0,className:Je("recharts-responsive-container",d),style:mp(mp({},p),{},{width:i,height:a,minWidth:o,minHeight:s,maxHeight:l}),ref:m},w.createElement("div",{style:gA({width:i,height:a})},w.createElement(By,{width:S,height:O},u)))}),iN=w.forwardRef((e,t)=>{var n=gc();if(Qt(n.width)&&Qt(n.height))return e.children;var{width:r,height:i}=mA({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:a,calculatedHeight:o}=Ny(void 0,void 0,{width:r,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return $(a)&&$(o)?w.createElement(By,{width:a,height:o},e.children):w.createElement(_A,pu({},e,{width:r,height:i,ref:t}))}),mc=()=>{var e,t=wi(),n=U(rA),r=U(pc),i=(e=U(To))===null||e===void 0?void 0:e.padding;return!t||!r||!i?n:{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}},wA={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},SA=()=>{var e;return(e=U(ke))!==null&&e!==void 0?e:wA},OA=()=>U(tn),PA=()=>U(nn),ue=e=>e.layout.layoutType,Do=()=>U(ue),zy=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},MA=()=>{var e=Do();return e!==void 0},Si=e=>{var t=Fe(),n=wi(),{width:r,height:i}=e,a=gc(),o=r,s=i;return a&&(o=a.width>0?a.width:r,s=a.height>0?a.height:i),w.useEffect(()=>{!n&&Qt(o)&&Qt(s)&&t(EM({width:o,height:s}))},[t,n,o,s]),null},AA=e=>{var{margin:t}=e,n=Fe();return w.useEffect(()=>{n(CM(t))},[n,t]),null},$y=Symbol.for("immer-nothing"),vp=Symbol.for("immer-draftable"),Ye=Symbol.for("immer-state");function it(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var oi=Object.getPrototypeOf;function sr(e){return!!e&&!!e[Ye]}function jn(e){return e?Wy(e)||Array.isArray(e)||!!e[vp]||!!e.constructor?.[vp]||Oi(e)||Ro(e):!1}var kA=Object.prototype.constructor.toString(),yp=new WeakMap;function Wy(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=yp.get(n);return r===void 0&&(r=Function.toString.call(n),yp.set(n,r)),r===kA}function Fa(e,t,n=!0){Io(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function Io(e){const t=e[Ye];return t?t.type_:Array.isArray(e)?1:Oi(e)?2:Ro(e)?3:0}function gu(e,t){return Io(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function qy(e,t,n){const r=Io(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function CA(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Oi(e){return e instanceof Map}function Ro(e){return e instanceof Set}function xn(e){return e.copy_||e.base_}function mu(e,t){if(Oi(e))return new Map(e);if(Ro(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Wy(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Ye];let i=Reflect.ownKeys(r);for(let a=0;a<i.length;a++){const o=i[a],s=r[o];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(r[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[o]})}return Object.create(oi(e),r)}else{const r=oi(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function vc(e,t=!1){return jo(e)||sr(e)||!jn(e)||(Io(e)>1&&Object.defineProperties(e,{set:ia,add:ia,clear:ia,delete:ia}),Object.freeze(e),t&&Object.values(e).forEach(n=>vc(n,!0))),e}function EA(){it(2)}var ia={value:EA};function jo(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var TA={};function Ln(e){const t=TA[e];return t||it(0,e),t}var si;function Uy(){return si}function DA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function bp(e,t){t&&(Ln("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function vu(e){yu(e),e.drafts_.forEach(IA),e.drafts_=null}function yu(e){e===si&&(si=e.parent_)}function xp(e){return si=DA(si,e)}function IA(e){const t=e[Ye];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function _p(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ye].modified_&&(vu(t),it(4)),jn(e)&&(e=Ba(t,e),t.parent_||za(t,e)),t.patches_&&Ln("Patches").generateReplacementPatches_(n[Ye].base_,e,t.patches_,t.inversePatches_)):e=Ba(t,n,[]),vu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==$y?e:void 0}function Ba(e,t,n){if(jo(t))return t;const r=e.immer_.shouldUseStrictIteration(),i=t[Ye];if(!i)return Fa(t,(a,o)=>wp(e,i,t,a,o,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return za(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const a=i.copy_;let o=a,s=!1;i.type_===3&&(o=new Set(a),a.clear(),s=!0),Fa(o,(l,u)=>wp(e,i,a,l,u,n,s),r),za(e,a,!1),n&&e.patches_&&Ln("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function wp(e,t,n,r,i,a,o){if(i==null||typeof i!="object"&&!o)return;const s=jo(i);if(!(s&&!o)){if(sr(i)){const l=a&&t&&t.type_!==3&&!gu(t.assigned_,r)?a.concat(r):void 0,u=Ba(e,i,l);if(qy(n,r,u),sr(u))e.canAutoFreeze_=!1;else return}else o&&n.add(i);if(jn(i)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===i&&s)return;Ba(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(Oi(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&za(e,i)}}}function za(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&vc(t,n)}function RA(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Uy(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,a=yc;n&&(i=[r],a=li);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,s}var yc={get(e,t){if(t===Ye)return e;const n=xn(e);if(!gu(n,t))return jA(e,n,t);const r=n[t];return e.finalized_||!jn(r)?r:r===pl(e.base_,t)?(gl(e),e.copy_[t]=xu(r,e)):r},has(e,t){return t in xn(e)},ownKeys(e){return Reflect.ownKeys(xn(e))},set(e,t,n){const r=Vy(xn(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=pl(xn(e),t),a=i?.[Ye];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(CA(n,i)&&(n!==void 0||gu(e.base_,t)))return!0;gl(e),bu(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return pl(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,gl(e),bu(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=xn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){it(11)},getPrototypeOf(e){return oi(e.base_)},setPrototypeOf(){it(12)}},li={};Fa(yc,(e,t)=>{li[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});li.deleteProperty=function(e,t){return li.set.call(this,e,t,void 0)};li.set=function(e,t,n){return yc.set.call(this,e[0],t,n,e[0])};function pl(e,t){const n=e[Ye];return(n?xn(n):e)[t]}function jA(e,t,n){const r=Vy(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function Vy(e,t){if(!(t in e))return;let n=oi(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=oi(n)}}function bu(e){e.modified_||(e.modified_=!0,e.parent_&&bu(e.parent_))}function gl(e){e.copy_||(e.copy_=mu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var LA=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const o=this;return function(l=a,...u){return o.produce(l,c=>n.call(this,c,...u))}}typeof n!="function"&&it(6),r!==void 0&&typeof r!="function"&&it(7);let i;if(jn(t)){const a=xp(this),o=xu(t,void 0);let s=!0;try{i=n(o),s=!1}finally{s?vu(a):yu(a)}return bp(a,r),_p(i,a)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===$y&&(i=void 0),this.autoFreeze_&&vc(i,!0),r){const a=[],o=[];Ln("Patches").generateReplacementPatches_(t,i,a,o),r(a,o)}return i}else it(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...s)=>this.produceWithPatches(o,l=>t(l,...s));let r,i;return[this.produce(t,n,(o,s)=>{r=o,i=s}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){jn(e)||it(8),sr(e)&&(e=NA(e));const t=xp(this),n=xu(e,void 0);return n[Ye].isManual_=!0,yu(t),n}finishDraft(e,t){const n=e&&e[Ye];(!n||!n.isManual_)&&it(9);const{scope_:r}=n;return bp(r,t),_p(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Ln("Patches").applyPatches_;return sr(e)?r(e,t):this.produce(e,i=>r(i,t))}};function xu(e,t){const n=Oi(e)?Ln("MapSet").proxyMap_(e,t):Ro(e)?Ln("MapSet").proxySet_(e,t):RA(e,t);return(t?t.scope_:Uy()).drafts_.push(n),n}function NA(e){return sr(e)||it(10,e),Hy(e)}function Hy(e){if(!jn(e)||jo(e))return e;const t=e[Ye];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=mu(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=mu(e,!0);return Fa(n,(i,a)=>{qy(n,i,Hy(a))},r),t&&(t.finalized_=!1),n}var FA=new LA;FA.produce;var BA={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},Ky=Ae({name:"legend",initialState:BA,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:ee()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,i=Ze(e).payload.indexOf(n);i>-1&&(e.payload[i]=r)},prepare:ee()},removeLegendPayload:{reducer(e,t){var n=Ze(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:ee()}}}),{setLegendSize:aN,setLegendSettings:oN,addLegendPayload:sN,replaceLegendPayload:lN,removeLegendPayload:uN}=Ky.actions,zA=Ky.reducer,ml={exports:{}},vl={};var Sp;function $A(){if(Sp)return vl;Sp=1;var e=Fu();function t(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,s=e.useDebugValue;return vl.useSyncExternalStoreWithSelector=function(l,u,c,f,d){var h=i(null);if(h.current===null){var p={hasValue:!1,value:null};h.current=p}else p=h.current;h=o(function(){function g(x){if(!v){if(v=!0,y=x,x=f(x),d!==void 0&&p.hasValue){var S=p.value;if(d(S,x))return b=S}return b=x}if(S=b,n(y,x))return S;var O=f(x);return d!==void 0&&d(S,O)?(y=x,S):(y=x,b=O)}var v=!1,y,b,_=c===void 0?null:c;return[function(){return g(u())},_===null?void 0:function(){return g(_())}]},[u,c,f,d]);var m=r(l,h[0],h[1]);return a(function(){p.hasValue=!0,p.value=m},[m]),s(m),m},vl}var Op;function WA(){return Op||(Op=1,ml.exports=$A()),ml.exports}WA();function qA(e){e()}function UA(){let e=null,t=null;return{clear(){e=null,t=null},notify(){qA(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var Pp={notify(){},get:()=>[]};function VA(e,t){let n,r=Pp,i=0,a=!1;function o(m){c();const g=r.subscribe(m);let v=!1;return()=>{v||(v=!0,g(),f())}}function s(){r.notify()}function l(){p.onStateChange&&p.onStateChange()}function u(){return a}function c(){i++,n||(n=e.subscribe(l),r=UA())}function f(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=Pp)}function d(){a||(a=!0,c())}function h(){a&&(a=!1,f())}const p={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:u,trySubscribe:d,tryUnsubscribe:h,getListeners:()=>r};return p}var HA=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",KA=HA(),YA=()=>typeof navigator<"u"&&navigator.product==="ReactNative",XA=YA(),GA=()=>KA||XA?w.useLayoutEffect:w.useEffect,ZA=GA();function Mp(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function QA(e,t){if(Mp(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!Mp(e[n[i]],t[n[i]]))return!1;return!0}var JA=Symbol.for("react-redux-context"),ek=typeof globalThis<"u"?globalThis:{};function tk(){if(!w.createContext)return{};const e=ek[JA]??=new Map;let t=e.get(w.createContext);return t||(t=w.createContext(null),e.set(w.createContext,t)),t}var nk=tk();function rk(e){const{children:t,context:n,serverState:r,store:i}=e,a=w.useMemo(()=>{const l=VA(i);return{store:i,subscription:l,getServerState:r?()=>r:void 0}},[i,r]),o=w.useMemo(()=>i.getState(),[i]);ZA(()=>{const{subscription:l}=a;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),o!==i.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[a,o]);const s=n||nk;return w.createElement(s.Provider,{value:a},t)}var ik=rk,ak=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function ok(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function sk(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(ak.has(r)){if(e[r]==null&&t[r]==null)continue;if(!QA(e[r],t[r]))return!1}else if(!ok(e[r],t[r]))return!1;return!0}function _u(){return _u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_u.apply(null,arguments)}function Ap(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Dr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ap(Object(n),!0).forEach(function(r){lk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ap(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lk(e,t,n){return(t=uk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uk(e){var t=ck(e,"string");return typeof t=="symbol"?t:t+""}function ck(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fk(e){return Array.isArray(e)&&In(e[0])&&In(e[1])?e.join(" ~ "):e}var Wn={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function dk(e,t){return t==null?e:bo(e,t)}var hk=e=>{var{separator:t=Wn.separator,contentStyle:n,itemStyle:r,labelStyle:i=Wn.labelStyle,payload:a,formatter:o,itemSorter:s,wrapperClassName:l,labelClassName:u,label:c,labelFormatter:f,accessibilityLayer:d=Wn.accessibilityLayer}=e,h=()=>{if(a&&a.length){var x={padding:0,margin:0},S=dk(a,s),O=S.map((M,k)=>{if(M.type==="none")return null;var E=M.formatter||o||fk,{value:T,name:A}=M,F=T,L=A;if(E){var I=E(T,A,M,k,a);if(Array.isArray(I))[F,L]=I;else if(I!=null)F=I;else return null}var N=Dr(Dr({},Wn.itemStyle),{},{color:M.color||Wn.itemStyle.color},r);return w.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(k),style:N},In(L)?w.createElement("span",{className:"recharts-tooltip-item-name"},L):null,In(L)?w.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,w.createElement("span",{className:"recharts-tooltip-item-value"},F),w.createElement("span",{className:"recharts-tooltip-item-unit"},M.unit||""))});return w.createElement("ul",{className:"recharts-tooltip-item-list",style:x},O)}return null},p=Dr(Dr({},Wn.contentStyle),n),m=Dr({margin:0},i),g=!Aa(c),v=g?c:"",y=Je("recharts-default-tooltip",l),b=Je("recharts-tooltip-label",u);g&&f&&a!==void 0&&a!==null&&(v=f(c,a));var _=d?{role:"status","aria-live":"assertive"}:{};return w.createElement("div",_u({className:y,style:p},_),w.createElement("p",{className:b,style:m},w.isValidElement(v)?v:"".concat(v)),h())},Ir="recharts-tooltip-wrapper",pk={visibility:"hidden"};function gk(e){var{coordinate:t,translateX:n,translateY:r}=e;return Je(Ir,{["".concat(Ir,"-right")]:$(n)&&t&&$(t.x)&&n>=t.x,["".concat(Ir,"-left")]:$(n)&&t&&$(t.x)&&n<t.x,["".concat(Ir,"-bottom")]:$(r)&&t&&$(t.y)&&r>=t.y,["".concat(Ir,"-top")]:$(r)&&t&&$(t.y)&&r<t.y})}function kp(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offset:i,position:a,reverseDirection:o,tooltipDimension:s,viewBox:l,viewBoxDimension:u}=e;if(a&&$(a[r]))return a[r];var c=n[r]-s-(i>0?i:0),f=n[r]+i;if(t[r])return o[r]?c:f;var d=l[r];if(d==null)return 0;if(o[r]){var h=c,p=d;return h<p?Math.max(f,d):Math.max(c,d)}if(u==null)return 0;var m=f+s,g=d+u;return m>g?Math.max(c,d):Math.max(f,d)}function mk(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function vk(e){var{allowEscapeViewBox:t,coordinate:n,offsetTop:r,offsetLeft:i,position:a,reverseDirection:o,tooltipBox:s,useTranslate3d:l,viewBox:u}=e,c,f,d;return s.height>0&&s.width>0&&n?(f=kp({allowEscapeViewBox:t,coordinate:n,key:"x",offset:i,position:a,reverseDirection:o,tooltipDimension:s.width,viewBox:u,viewBoxDimension:u.width}),d=kp({allowEscapeViewBox:t,coordinate:n,key:"y",offset:r,position:a,reverseDirection:o,tooltipDimension:s.height,viewBox:u,viewBoxDimension:u.height}),c=mk({translateX:f,translateY:d,useTranslate3d:l})):c=pk,{cssProperties:c,cssClasses:gk({translateX:f,translateY:d,coordinate:n})}}var yk=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Yy={isSsr:yk()};function Xy(){var[e,t]=w.useState(()=>Yy.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return w.useEffect(()=>{if(window.matchMedia){var n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=()=>{t(n.matches)};return n.addEventListener("change",r),()=>{n.removeEventListener("change",r)}}},[]),e}function Cp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cp(Object(n),!0).forEach(function(r){bk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bk(e,t,n){return(t=xk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xk(e){var t=_k(e,"string");return typeof t=="symbol"?t:t+""}function _k(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wk(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function Sk(e){var t,n,r,i,a,o,s=Xy(),[l,u]=w.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));w.useEffect(()=>{var p=m=>{if(m.key==="Escape"){var g,v,y,b;u({dismissed:!0,dismissedAtCoordinate:{x:(g=(v=e.coordinate)===null||v===void 0?void 0:v.x)!==null&&g!==void 0?g:0,y:(y=(b=e.coordinate)===null||b===void 0?void 0:b.y)!==null&&y!==void 0?y:0}})}};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(n=e.coordinate)===null||n===void 0?void 0:n.y]),l.dismissed&&(((r=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)!==l.dismissedAtCoordinate.x||((a=(o=e.coordinate)===null||o===void 0?void 0:o.y)!==null&&a!==void 0?a:0)!==l.dismissedAtCoordinate.y)&&u(qn(qn({},l),{},{dismissed:!1}));var{cssClasses:c,cssProperties:f}=vk({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),d=e.hasPortalFromProps?{}:qn(qn({transition:wk({prefersReducedMotion:s,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},f),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),h=qn(qn({},d),{},{visibility:!l.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return w.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:c,style:h,ref:e.innerRef},e.children)}var Ok=w.memo(Sk),Pk=()=>{var e;return(e=U(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function wu(){return wu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wu.apply(null,arguments)}function Ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Tp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ep(Object(n),!0).forEach(function(r){Mk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ep(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mk(e,t,n){return(t=Ak(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ak(e){var t=kk(e,"string");return typeof t=="symbol"?t:t+""}function kk(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Dp={curveBasisClosed:hO,curveBasisOpen:pO,curveBasis:dO,curveBumpX:cO,curveBumpY:fO,curveLinearClosed:gO,curveLinear:vo,curveMonotoneX:mO,curveMonotoneY:vO,curveNatural:yO,curveStep:bO,curveStepAfter:_O,curveStepBefore:xO},$a=e=>Q(e.x)&&Q(e.y),Ip=e=>e.base!=null&&$a(e.base)&&$a(e),Rr=e=>e.x,jr=e=>e.y,Ck=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(rc(e));if((n==="curveMonotone"||n==="curveBump")&&t){var r=Dp["".concat(n).concat(t==="vertical"?"Y":"X")];if(r)return r}return Dp[n]||vo},Rp={connectNulls:!1,type:"linear"},Ek=e=>{var{type:t=Rp.type,points:n=[],baseLine:r,layout:i,connectNulls:a=Rp.connectNulls}=e,o=Ck(t,i),s=a?n.filter($a):n;if(Array.isArray(r)){var l,u=n.map((p,m)=>Tp(Tp({},p),{},{base:r[m]}));i==="vertical"?l=Gi().y(jr).x1(Rr).x0(p=>p.base.x):l=Gi().x(Rr).y1(jr).y0(p=>p.base.y);var c=l.defined(Ip).curve(o),f=a?u.filter(Ip):u;return c(f)}var d;i==="vertical"&&$(r)?d=Gi().y(jr).x1(Rr).x0(r):$(r)?d=Gi().x(Rr).y1(jr).y0(r):d=Lv().x(Rr).y(jr);var h=d.defined($a).curve(o);return h(s)},Tk=e=>{var{className:t,points:n,path:r,pathRef:i}=e,a=Do();if((!n||!n.length)&&!r)return null;var o={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||a,connectNulls:e.connectNulls},s=n&&n.length?Ek(o):r;return w.createElement("path",wu({},rr(e),jO(e),{className:Je("recharts-curve",t),d:s===null?void 0:s,ref:i}))},Dk=["x","y","top","left","width","height","className"];function Su(){return Su=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Su.apply(null,arguments)}function jp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ik(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jp(Object(n),!0).forEach(function(r){Rk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rk(e,t,n){return(t=jk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jk(e){var t=Lk(e,"string");return typeof t=="symbol"?t:t+""}function Lk(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nk(e,t){if(e==null)return{};var n,r,i=Fk(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Fk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Bk=(e,t,n,r,i,a)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(a,",").concat(t,"h").concat(n),zk=e=>{var{x:t=0,y:n=0,top:r=0,left:i=0,width:a=0,height:o=0,className:s}=e,l=Nk(e,Dk),u=Ik({x:t,y:n,top:r,left:i,width:a,height:o},l);return!$(t)||!$(n)||!$(a)||!$(o)||!$(r)||!$(i)?null:w.createElement("path",Su({},ir(u),{className:Je("recharts-cross",s),d:Bk(t,n,a,o,r,i)}))};function $k(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function Lp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Np(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lp(Object(n),!0).forEach(function(r){Wk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wk(e,t,n){return(t=qk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qk(e){var t=Uk(e,"string");return typeof t=="symbol"?t:t+""}function Uk(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Vk=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),Hk=(e,t,n)=>e.map(r=>"".concat(Vk(r)," ").concat(t,"ms ").concat(n)).join(","),Kk=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(i=>r.includes(i))),ui=(e,t)=>Object.keys(t).reduce((n,r)=>Np(Np({},n),{},{[r]:e(r,t[r])}),{});function Fp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fp(Object(n),!0).forEach(function(r){Yk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yk(e,t,n){return(t=Xk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xk(e){var t=Gk(e,"string");return typeof t=="symbol"?t:t+""}function Gk(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Wa=(e,t,n)=>e+(t-e)*n,Ou=e=>{var{from:t,to:n}=e;return t!==n},Gy=(e,t,n)=>{var r=ui((i,a)=>{if(Ou(a)){var[o,s]=e(a.from,a.to,a.velocity);return fe(fe({},a),{},{from:o,velocity:s})}return a},t);return n<1?ui((i,a)=>Ou(a)&&r[i]!=null?fe(fe({},a),{},{velocity:Wa(a.velocity,r[i].velocity,n),from:Wa(a.from,r[i].from,n)}):a,t):Gy(e,r,n-1)};function Zk(e,t,n,r,i,a){var o,s=r.reduce((d,h)=>fe(fe({},d),{},{[h]:{from:e[h],velocity:0,to:t[h]}}),{}),l=()=>ui((d,h)=>h.from,s),u=()=>!Object.values(s).filter(Ou).length,c=null,f=d=>{o||(o=d);var h=d-o,p=h/n.dt;s=Gy(n,s,p),i(fe(fe(fe({},e),t),l())),o=d,u()||(c=a.setTimeout(f))};return()=>(c=a.setTimeout(f),()=>{var d;(d=c)===null||d===void 0||d()})}function Qk(e,t,n,r,i,a,o){var s=null,l=i.reduce((f,d)=>{var h=e[d],p=t[d];return h==null||p==null?f:fe(fe({},f),{},{[d]:[h,p]})},{}),u,c=f=>{u||(u=f);var d=(f-u)/r,h=ui((m,g)=>Wa(...g,n(d)),l);if(a(fe(fe(fe({},e),t),h)),d<1)s=o.setTimeout(c);else{var p=ui((m,g)=>Wa(...g,n(1)),l);a(fe(fe(fe({},e),t),p))}};return()=>(s=o.setTimeout(c),()=>{var f;(f=s)===null||f===void 0||f()})}const Jk=(e,t,n,r,i,a)=>{var o=Kk(e,t);return n==null?()=>(i(fe(fe({},e),t)),()=>{}):n.isStepper===!0?Zk(e,t,n,o,i,a):Qk(e,t,n,r,o,i,a)};var qa=1e-4,Zy=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],Qy=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),Bp=(e,t)=>n=>{var r=Zy(e,t);return Qy(r,n)},eC=(e,t)=>n=>{var r=Zy(e,t),i=[...r.map((a,o)=>a*o).slice(1),0];return Qy(i,n)},tC=e=>{var t,n=e.split("(");if(n.length!==2||n[0]!=="cubic-bezier")return null;var r=(t=n[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(r==null||r.length!==4)return null;var i=r.map(a=>parseFloat(a));return[i[0],i[1],i[2],i[3]]},nC=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(n.length===1)switch(n[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var i=tC(n[0]);if(i)return i}}return n.length===4?n:[0,0,1,1]},rC=(e,t,n,r)=>{var i=Bp(e,n),a=Bp(t,r),o=eC(e,n),s=u=>u>1?1:u<0?0:u,l=u=>{for(var c=u>1?1:u,f=c,d=0;d<8;++d){var h=i(f)-c,p=o(f);if(Math.abs(h-c)<qa||p<qa)return a(f);f=s(f-h/p)}return a(f)};return l.isStepper=!1,l},zp=function(){return rC(...nC(...arguments))},iC=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:i=17}=t,a=(o,s,l)=>{var u=-(o-s)*n,c=l*r,f=l+(u-c)*i/1e3,d=l*i/1e3+o;return Math.abs(d-s)<qa&&Math.abs(f)<qa?[s,0]:[d,f]};return a.isStepper=!0,a.dt=i,a},aC=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return zp(e);case"spring":return iC();default:if(e.split("(")[0]==="cubic-bezier")return zp(e)}return typeof e=="function"?e:null};function oC(e){var t,n=()=>null,r=!1,i=null,a=o=>{if(!r){if(Array.isArray(o)){if(!o.length)return;var s=o,[l,...u]=s;if(typeof l=="number"){i=e.setTimeout(a.bind(null,u),l);return}a(l),i=e.setTimeout(a.bind(null,u));return}typeof o=="string"&&(t=o,n(t)),typeof o=="object"&&(t=o,n(t)),typeof o=="function"&&o()}};return{stop:()=>{r=!0},start:o=>{r=!1,i&&(i(),i=null),a(o)},subscribe:o=>(n=o,()=>{n=()=>null}),getTimeoutController:()=>e}}class sC{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),i=null,a=o=>{o-r>=n?t(o):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(a))};return i=requestAnimationFrame(a),()=>{i!=null&&cancelAnimationFrame(i)}}}function lC(){return oC(new sC)}var uC=w.createContext(lC);function cC(e,t){var n=w.useContext(uC);return w.useMemo(()=>t??n(e),[e,t,n])}var fC={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},$p={t:0},yl={t:1};function dC(e){var t=yi(e,fC),{isActive:n,canBegin:r,duration:i,easing:a,begin:o,onAnimationEnd:s,onAnimationStart:l,children:u}=t,c=Xy(),f=n==="auto"?!Yy.isSsr&&!c:n,d=cC(t.animationId,t.animationManager),[h,p]=w.useState(f?$p:yl),m=w.useRef(null);return w.useEffect(()=>{f||p(yl)},[f]),w.useEffect(()=>{if(!f||!r)return mr;var g=Jk($p,yl,aC(a),i,p,d.getTimeoutController()),v=()=>{m.current=g()};return d.start([l,o,v,i,s]),()=>{d.stop(),m.current&&m.current(),s()}},[f,r,i,a,o,l,s,d]),u(h.t)}function hC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=w.useRef(ru(t)),r=w.useRef(e);return r.current!==e&&(n.current=ru(t),r.current=e),n.current}var pC=["radius"],gC=["radius"],Wp,qp,Up,Vp,Hp,Kp,Yp,Xp,Gp,Zp;function Qp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Jp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qp(Object(n),!0).forEach(function(r){mC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mC(e,t,n){return(t=vC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vC(e){var t=yC(e,"string");return typeof t=="symbol"?t:t+""}function yC(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ua(){return Ua=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ua.apply(null,arguments)}function eg(e,t){if(e==null)return{};var n,r,i=bC(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function bC(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ct(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var tg=(e,t,n,r,i)=>{var a=Vt(n),o=Vt(r),s=Math.min(Math.abs(a)/2,Math.abs(o)/2),l=o>=0?1:-1,u=a>=0?1:-1,c=o>=0&&a>=0||o<0&&a<0?1:0,f;if(s>0&&Array.isArray(i)){for(var d=[0,0,0,0],h=0,p=4;h<p;h++){var m,g=(m=i[h])!==null&&m!==void 0?m:0;d[h]=g>s?s:g}f=Pe(Wp||(Wp=ct(["M",",",""])),e,t+l*d[0]),d[0]>0&&(f+=Pe(qp||(qp=ct(["A ",",",",0,0,",",",",",""])),d[0],d[0],c,e+u*d[0],t)),f+=Pe(Up||(Up=ct(["L ",",",""])),e+n-u*d[1],t),d[1]>0&&(f+=Pe(Vp||(Vp=ct(["A ",",",",0,0,",`,
7
- `,",",""])),d[1],d[1],c,e+n,t+l*d[1])),f+=Pe(Hp||(Hp=ct(["L ",",",""])),e+n,t+r-l*d[2]),d[2]>0&&(f+=Pe(Kp||(Kp=ct(["A ",",",",0,0,",`,
8
- `,",",""])),d[2],d[2],c,e+n-u*d[2],t+r)),f+=Pe(Yp||(Yp=ct(["L ",",",""])),e+u*d[3],t+r),d[3]>0&&(f+=Pe(Xp||(Xp=ct(["A ",",",",0,0,",`,
9
- `,",",""])),d[3],d[3],c,e,t+r-l*d[3])),f+="Z"}else if(s>0&&i===+i&&i>0){var v=Math.min(s,i);f=Pe(Gp||(Gp=ct(["M ",",",`
10
- A `,",",",0,0,",",",",",`
11
- L `,",",`
12
- A `,",",",0,0,",",",",",`
13
- L `,",",`
14
- A `,",",",0,0,",",",",",`
15
- L `,",",`
16
- A `,",",",0,0,",",",","," Z"])),e,t+l*v,v,v,c,e+u*v,t,e+n-u*v,t,v,v,c,e+n,t+l*v,e+n,t+r-l*v,v,v,c,e+n-u*v,t+r,e+u*v,t+r,v,v,c,e,t+r-l*v)}else f=Pe(Zp||(Zp=ct(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return f},ng={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Jy=e=>{var t=yi(e,ng),n=w.useRef(null),[r,i]=w.useState(-1);w.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var B=n.current.getTotalLength();B&&i(B)}catch{}},[]);var{x:a,y:o,width:s,height:l,radius:u,className:c}=t,{animationEasing:f,animationDuration:d,animationBegin:h,isAnimationActive:p,isUpdateAnimationActive:m}=t,g=w.useRef(s),v=w.useRef(l),y=w.useRef(a),b=w.useRef(o),_=w.useMemo(()=>({x:a,y:o,width:s,height:l,radius:u}),[a,o,s,l,u]),x=hC(_,"rectangle-");if(a!==+a||o!==+o||s!==+s||l!==+l||s===0||l===0)return null;var S=Je("recharts-rectangle",c);if(!m){var O=ir(t),{radius:M}=O,k=eg(O,pC);return w.createElement("path",Ua({},k,{x:Vt(a),y:Vt(o),width:Vt(s),height:Vt(l),radius:typeof u=="number"?u:void 0,className:S,d:tg(a,o,s,l,u)}))}var E=g.current,T=v.current,A=y.current,F=b.current,L="0px ".concat(r===-1?1:r,"px"),I="".concat(r,"px ").concat(r,"px"),N=Hk(["strokeDasharray"],d,typeof f=="string"?f:ng.animationEasing);return w.createElement(dC,{animationId:x,key:x,canBegin:r>0,duration:d,easing:f,isActive:m,begin:h},B=>{var oe=Zi(E,s,B),J=Zi(T,l,B),H=Zi(A,a,B),Me=Zi(F,o,B);n.current&&(g.current=oe,v.current=J,y.current=H,b.current=Me);var se;p?B>0?se={transition:N,strokeDasharray:I}:se={strokeDasharray:L}:se={strokeDasharray:I};var _e=ir(t),{radius:re}=_e,we=eg(_e,gC);return w.createElement("path",Ua({},we,{radius:typeof u=="number"?u:void 0,className:S,d:tg(H,Me,oe,J,u),ref:n,style:Jp(Jp({},se),t.style)}))})};function rg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ig(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rg(Object(n),!0).forEach(function(r){xC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xC(e,t,n){return(t=_C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _C(e){var t=wC(e,"string");return typeof t=="symbol"?t:t+""}function wC(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Va=Math.PI/180,SC=e=>e*180/Math.PI,Ve=(e,t,n,r)=>({x:e+Math.cos(-Va*r)*n,y:t+Math.sin(-Va*r)*n}),OC=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},PC=(e,t)=>{var{x:n,y:r}=e,{x:i,y:a}=t;return Math.sqrt((n-i)**2+(r-a)**2)},MC=(e,t)=>{var{x:n,y:r}=e,{cx:i,cy:a}=t,o=PC({x:n,y:r},{x:i,y:a});if(o<=0)return{radius:o,angle:0};var s=(n-i)/o,l=Math.acos(s);return r>a&&(l=2*Math.PI-l),{radius:o,angle:SC(l),angleInRadian:l}},AC=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),i=Math.floor(n/360),a=Math.min(r,i);return{startAngle:t-a*360,endAngle:n-a*360}},kC=(e,t)=>{var{startAngle:n,endAngle:r}=t,i=Math.floor(n/360),a=Math.floor(r/360),o=Math.min(i,a);return e+o*360},CC=(e,t)=>{var{relativeX:n,relativeY:r}=e,{radius:i,angle:a}=MC({x:n,y:r},t),{innerRadius:o,outerRadius:s}=t;if(i<o||i>s||i===0)return null;var{startAngle:l,endAngle:u}=AC(t),c=a,f;if(l<=u){for(;c>u;)c-=360;for(;c<l;)c+=360;f=c>=l&&c<=u}else{for(;c>l;)c-=360;for(;c<u;)c+=360;f=c>=u&&c<=l}return f?ig(ig({},t),{},{radius:i,angle:kC(c,t)}):null};function e0(e){var{cx:t,cy:n,radius:r,startAngle:i,endAngle:a}=e,o=Ve(t,n,r,i),s=Ve(t,n,r,a);return{points:[o,s],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}var ag,og,sg,lg,ug,cg,fg;function Pu(){return Pu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pu.apply(null,arguments)}function Sn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var EC=(e,t)=>{var n=At(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},aa=e=>{var{cx:t,cy:n,radius:r,angle:i,sign:a,isExternal:o,cornerRadius:s,cornerIsExternal:l}=e,u=s*(o?1:-1)+r,c=Math.asin(s/u)/Va,f=l?i:i+a*c,d=Ve(t,n,u,f),h=Ve(t,n,r,f),p=l?i-a*c:i,m=Ve(t,n,u*Math.cos(c*Va),p);return{center:d,circleTangency:h,lineTangency:m,theta:c}},t0=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:a,endAngle:o}=e,s=EC(a,o),l=a+s,u=Ve(t,n,i,a),c=Ve(t,n,i,l),f=Pe(ag||(ag=Sn(["M ",",",`
17
- A `,",",`,0,
18
- `,",",`,
19
- `,",",`
20
- `])),u.x,u.y,i,i,+(Math.abs(s)>180),+(a>l),c.x,c.y);if(r>0){var d=Ve(t,n,r,a),h=Ve(t,n,r,l);f+=Pe(og||(og=Sn(["L ",",",`
21
- A `,",",`,0,
22
- `,",",`,
23
- `,","," Z"])),h.x,h.y,r,r,+(Math.abs(s)>180),+(a<=l),d.x,d.y)}else f+=Pe(sg||(sg=Sn(["L ",","," Z"])),t,n);return f},TC=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,cornerRadius:a,forceCornerRadius:o,cornerIsExternal:s,startAngle:l,endAngle:u}=e,c=At(u-l),{circleTangency:f,lineTangency:d,theta:h}=aa({cx:t,cy:n,radius:i,angle:l,sign:c,cornerRadius:a,cornerIsExternal:s}),{circleTangency:p,lineTangency:m,theta:g}=aa({cx:t,cy:n,radius:i,angle:u,sign:-c,cornerRadius:a,cornerIsExternal:s}),v=s?Math.abs(l-u):Math.abs(l-u)-h-g;if(v<0)return o?Pe(lg||(lg=Sn(["M ",",",`
24
- a`,",",",0,0,1,",`,0
25
- a`,",",",0,0,1,",`,0
26
- `])),d.x,d.y,a,a,a*2,a,a,-a*2):t0({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:l,endAngle:u});var y=Pe(ug||(ug=Sn(["M ",",",`
27
- A`,",",",0,0,",",",",",`
28
- A`,",",",0,",",",",",",",`
29
- A`,",",",0,0,",",",",",`
30
- `])),d.x,d.y,a,a,+(c<0),f.x,f.y,i,i,+(v>180),+(c<0),p.x,p.y,a,a,+(c<0),m.x,m.y);if(r>0){var{circleTangency:b,lineTangency:_,theta:x}=aa({cx:t,cy:n,radius:r,angle:l,sign:c,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),{circleTangency:S,lineTangency:O,theta:M}=aa({cx:t,cy:n,radius:r,angle:u,sign:-c,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),k=s?Math.abs(l-u):Math.abs(l-u)-x-M;if(k<0&&a===0)return"".concat(y,"L").concat(t,",").concat(n,"Z");y+=Pe(cg||(cg=Sn(["L",",",`
31
- A`,",",",0,0,",",",",",`
32
- A`,",",",0,",",",",",",",`
33
- A`,",",",0,0,",",",",","Z"])),O.x,O.y,a,a,+(c<0),S.x,S.y,r,r,+(k>180),+(c>0),b.x,b.y,a,a,+(c<0),_.x,_.y)}else y+=Pe(fg||(fg=Sn(["L",",","Z"])),t,n);return y},DC={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},IC=e=>{var t=yi(e,DC),{cx:n,cy:r,innerRadius:i,outerRadius:a,cornerRadius:o,forceCornerRadius:s,cornerIsExternal:l,startAngle:u,endAngle:c,className:f}=t;if(a<i||u===c)return null;var d=Je("recharts-sector",f),h=a-i,p=ar(o,h,0,!0),m;return p>0&&Math.abs(u-c)<360?m=TC({cx:n,cy:r,innerRadius:i,outerRadius:a,cornerRadius:Math.min(p,h/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:u,endAngle:c}):m=t0({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:u,endAngle:c}),w.createElement("path",Pu({},ir(t),{className:d,d:m}))};function RC(e,t,n){if(e==="horizontal")return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e==="vertical")return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(Kv(t)){if(e==="centric"){var{cx:r,cy:i,innerRadius:a,outerRadius:o,angle:s}=t,l=Ve(r,i,a,s),u=Ve(r,i,o,s);return[{x:l.x,y:l.y},{x:u.x,y:u.y}]}return e0(t)}}var bl={},xl={},_l={},dg;function jC(){return dg||(dg=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ry();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(_l)),_l}var hg;function LC(){return hg||(hg=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=jC();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(xl)),xl}var pg;function NC(){return pg||(pg=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iy(),n=LC();function r(i,a,o){o&&typeof o!="number"&&t.isIterateeCall(i,a,o)&&(a=o=void 0),i=n.toFinite(i),a===void 0?(a=i,i=0):a=n.toFinite(a),o=o===void 0?i<a?1:-1:n.toFinite(o);const s=Math.max(Math.ceil((a-i)/(o||1)),0),l=new Array(s);for(let u=0;u<s;u++)l[u]=i,i+=o;return l}e.range=r})(bl)),bl}var wl,gg;function FC(){return gg||(gg=1,wl=NC().range),wl}var BC=FC();const n0=Jt(BC);var rn=e=>e.chartData,zC=P([rn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),r0=(e,t,n,r)=>r?zC(e):rn(e);function bt(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(Q(t)&&Q(n))return!0}return!1}function mg(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function i0(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,i,a;if(Q(n))i=n;else if(typeof n=="function")return;if(Q(r))a=r;else if(typeof r=="function")return;var o=[i,a];if(bt(o))return o}}function $C(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(bt(r))return mg(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,a]=e,o,s;if(i==="auto")t!=null&&(o=Math.min(...t));else if($(i))o=i;else if(typeof i=="function")try{t!=null&&(o=i(t?.[0]))}catch{}else if(typeof i=="string"&&ap.test(i)){var l=ap.exec(i);if(l==null||l[1]==null||t==null)o=void 0;else{var u=+l[1];o=t[0]-u}}else o=t?.[0];if(a==="auto")t!=null&&(s=Math.max(...t));else if($(a))s=a;else if(typeof a=="function")try{t!=null&&(s=a(t?.[1]))}catch{}else if(typeof a=="string"&&op.test(a)){var c=op.exec(a);if(c==null||c[1]==null||t==null)s=void 0;else{var f=+c[1];s=t[1]+f}}else s=t?.[1];var d=[o,s];if(bt(d))return t==null?d:mg(d,t,n)}}}var vr=1e9,WC={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},xc,ne=!0,tt="[DecimalError] ",Cn=tt+"Invalid argument: ",bc=tt+"Exponent out of range: ",yr=Math.floor,_n=Math.pow,qC=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,$e,ge=1e7,te=7,a0=9007199254740991,Ha=yr(a0/te),R={};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};R.comparedTo=R.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};R.decimalPlaces=R.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*te;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};R.dividedBy=R.div=function(e){return Et(this,new this.constructor(e))};R.dividedToIntegerBy=R.idiv=function(e){var t=this,n=t.constructor;return G(Et(t,new n(e),0,1),n.precision)};R.equals=R.eq=function(e){return!this.cmp(e)};R.exponent=function(){return ce(this)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){return this.cmp(e)>=0};R.isInteger=R.isint=function(){return this.e>this.d.length-2};R.isNegative=R.isneg=function(){return this.s<0};R.isPositive=R.ispos=function(){return this.s>0};R.isZero=function(){return this.s===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,n=this,r=n.constructor,i=r.precision,a=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq($e))throw Error(tt+"NaN");if(n.s<1)throw Error(tt+(n.s?"NaN":"-Infinity"));return n.eq($e)?new r(0):(ne=!1,t=Et(ci(n,a),ci(e,a),a),ne=!0,G(t,i))};R.minus=R.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?l0(t,e):o0(t,(e.s=-e.s,e))};R.modulo=R.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(tt+"NaN");return n.s?(ne=!1,t=Et(n,e,0,1).times(e),ne=!0,n.minus(t)):G(new r(n),i)};R.naturalExponential=R.exp=function(){return s0(this)};R.naturalLogarithm=R.ln=function(){return ci(this)};R.negated=R.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};R.plus=R.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?o0(t,e):l0(t,(e.s=-e.s,e))};R.precision=R.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Cn+e);if(t=ce(i)+1,r=i.d.length-1,n=r*te+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};R.squareRoot=R.sqrt=function(){var e,t,n,r,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(tt+"NaN")}for(e=ce(s),ne=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=vt(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=yr((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(i.toString()),n=l.precision,i=o=n+3;;)if(a=r,r=a.plus(Et(s,a,o+2)).times(.5),vt(a.d).slice(0,o)===(t=vt(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(G(a,n+1,0),a.times(a).eq(s)){r=a;break}}else if(t!="9999")break;o+=4}return ne=!0,G(r,n)};R.times=R.mul=function(e){var t,n,r,i,a,o,s,l,u,c=this,f=c.constructor,d=c.d,h=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,n=c.e+e.e,l=d.length,u=h.length,l<u&&(a=d,d=h,h=a,o=l,l=u,u=o),a=[],o=l+u,r=o;r--;)a.push(0);for(r=u;--r>=0;){for(t=0,i=l+r;i>r;)s=a[i]+h[r]*d[i-r-1]+t,a[i--]=s%ge|0,t=s/ge|0;a[i]=(a[i]+t)%ge|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,ne?G(e,f.precision):e};R.toDecimalPlaces=R.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(_t(e,0,vr),t===void 0?t=r.rounding:_t(t,0,8),G(n,e+ce(n)+1,t))};R.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Nn(r,!0):(_t(e,0,vr),t===void 0?t=i.rounding:_t(t,0,8),r=G(new i(r),e+1,t),n=Nn(r,!0,e+1)),n};R.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?Nn(i):(_t(e,0,vr),t===void 0?t=a.rounding:_t(t,0,8),r=G(new a(i),e+ce(i)+1,t),n=Nn(r.abs(),!1,e+ce(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};R.toInteger=R.toint=function(){var e=this,t=e.constructor;return G(new t(e),ce(e)+1,t.rounding)};R.toNumber=function(){return+this};R.toPower=R.pow=function(e){var t,n,r,i,a,o,s=this,l=s.constructor,u=12,c=+(e=new l(e));if(!e.s)return new l($e);if(s=new l(s),!s.s){if(e.s<1)throw Error(tt+"Infinity");return s}if(s.eq($e))return s;if(r=l.precision,e.eq($e))return G(s,r);if(t=e.e,n=e.d.length-1,o=t>=n,a=s.s,o){if((n=c<0?-c:c)<=a0){for(i=new l($e),t=Math.ceil(r/te+4),ne=!1;n%2&&(i=i.times(s),yg(i.d,t)),n=yr(n/2),n!==0;)s=s.times(s),yg(s.d,t);return ne=!0,e.s<0?new l($e).div(i):G(i,r)}}else if(a<0)throw Error(tt+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,ne=!1,i=e.times(ci(s,r+u)),ne=!0,i=s0(i),i.s=a,i};R.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?(n=ce(i),r=Nn(i,n<=a.toExpNeg||n>=a.toExpPos)):(_t(e,1,vr),t===void 0?t=a.rounding:_t(t,0,8),i=G(new a(i),e,t),n=ce(i),r=Nn(i,e<=n||n<=a.toExpNeg,e)),r};R.toSignificantDigits=R.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(_t(e,1,vr),t===void 0?t=r.rounding:_t(t,0,8)),G(new r(n),e,t)};R.toString=R.valueOf=R.val=R.toJSON=R[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=ce(e),n=e.constructor;return Nn(e,t<=n.toExpNeg||t>=n.toExpPos)};function o0(e,t){var n,r,i,a,o,s,l,u,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),ne?G(t,f):t;if(l=e.d,u=t.d,o=e.e,i=t.e,l=l.slice(),a=o-i,a){for(a<0?(r=l,a=-a,s=u.length):(r=u,i=o,s=l.length),o=Math.ceil(f/te),s=o>s?o+1:s+1,a>s&&(a=s,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(s=l.length,a=u.length,s-a<0&&(a=s,r=u,u=l,l=r),n=0;a;)n=(l[--a]=l[a]+u[a]+n)/ge|0,l[a]%=ge;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,ne?G(t,f):t}function _t(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Cn+e)}function vt(e){var t,n,r,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+"",n=te-r.length,n&&(a+=zt(n)),a+=r;o=e[t],r=o+"",n=te-r.length,n&&(a+=zt(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var Et=(function(){function e(r,i){var a,o=0,s=r.length;for(r=r.slice();s--;)a=r[s]*i+o,r[s]=a%ge|0,o=a/ge|0;return o&&r.unshift(o),r}function t(r,i,a,o){var s,l;if(a!=o)l=a>o?1:-1;else for(s=l=0;s<a;s++)if(r[s]!=i[s]){l=r[s]>i[s]?1:-1;break}return l}function n(r,i,a){for(var o=0;a--;)r[a]-=o,o=r[a]<i[a]?1:0,r[a]=o*ge+r[a]-i[a];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,a,o){var s,l,u,c,f,d,h,p,m,g,v,y,b,_,x,S,O,M,k=r.constructor,E=r.s==i.s?1:-1,T=r.d,A=i.d;if(!r.s)return new k(r);if(!i.s)throw Error(tt+"Division by zero");for(l=r.e-i.e,O=A.length,x=T.length,h=new k(E),p=h.d=[],u=0;A[u]==(T[u]||0);)++u;if(A[u]>(T[u]||0)&&--l,a==null?y=a=k.precision:o?y=a+(ce(r)-ce(i))+1:y=a,y<0)return new k(0);if(y=y/te+2|0,u=0,O==1)for(c=0,A=A[0],y++;(u<x||c)&&y--;u++)b=c*ge+(T[u]||0),p[u]=b/A|0,c=b%A|0;else{for(c=ge/(A[0]+1)|0,c>1&&(A=e(A,c),T=e(T,c),O=A.length,x=T.length),_=O,m=T.slice(0,O),g=m.length;g<O;)m[g++]=0;M=A.slice(),M.unshift(0),S=A[0],A[1]>=ge/2&&++S;do c=0,s=t(A,m,O,g),s<0?(v=m[0],O!=g&&(v=v*ge+(m[1]||0)),c=v/S|0,c>1?(c>=ge&&(c=ge-1),f=e(A,c),d=f.length,g=m.length,s=t(f,m,d,g),s==1&&(c--,n(f,O<d?M:A,d))):(c==0&&(s=c=1),f=A.slice()),d=f.length,d<g&&f.unshift(0),n(m,f,g),s==-1&&(g=m.length,s=t(A,m,O,g),s<1&&(c++,n(m,O<g?M:A,g))),g=m.length):s===0&&(c++,m=[0]),p[u++]=c,s&&m[0]?m[g++]=T[_]||0:(m=[T[_]],g=1);while((_++<x||m[0]!==void 0)&&y--)}return p[0]||p.shift(),h.e=l,G(h,o?a+ce(h)+1:a)}})();function s0(e,t){var n,r,i,a,o,s,l=0,u=0,c=e.constructor,f=c.precision;if(ce(e)>16)throw Error(bc+ce(e));if(!e.s)return new c($e);for(ne=!1,s=f,o=new c(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(r=Math.log(_n(2,u))/Math.LN10*2+5|0,s+=r,n=i=a=new c($e),c.precision=s;;){if(i=G(i.times(e),s),n=n.times(++l),o=a.plus(Et(i,n,s)),vt(o.d).slice(0,s)===vt(a.d).slice(0,s)){for(;u--;)a=G(a.times(a),s);return c.precision=f,t==null?(ne=!0,G(a,f)):a}a=o}}function ce(e){for(var t=e.e*te,n=e.d[0];n>=10;n/=10)t++;return t}function Sl(e,t,n){if(t>e.LN10.sd())throw ne=!0,n&&(e.precision=n),Error(tt+"LN10 precision limit exceeded");return G(new e(e.LN10),t)}function zt(e){for(var t="";e--;)t+="0";return t}function ci(e,t){var n,r,i,a,o,s,l,u,c,f=1,d=10,h=e,p=h.d,m=h.constructor,g=m.precision;if(h.s<1)throw Error(tt+(h.s?"NaN":"-Infinity"));if(h.eq($e))return new m(0);if(t==null?(ne=!1,u=g):u=t,h.eq(10))return t==null&&(ne=!0),Sl(m,u);if(u+=d,m.precision=u,n=vt(p),r=n.charAt(0),a=ce(h),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)h=h.times(e),n=vt(h.d),r=n.charAt(0),f++;a=ce(h),r>1?(h=new m("0."+n),a++):h=new m(r+"."+n.slice(1))}else return l=Sl(m,u+2,g).times(a+""),h=ci(new m(r+"."+n.slice(1)),u-d).plus(l),m.precision=g,t==null?(ne=!0,G(h,g)):h;for(s=o=h=Et(h.minus($e),h.plus($e),u),c=G(h.times(h),u),i=3;;){if(o=G(o.times(c),u),l=s.plus(Et(o,new m(i),u)),vt(l.d).slice(0,u)===vt(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(Sl(m,u+2,g).times(a+""))),s=Et(s,new m(f),u),m.precision=g,t==null?(ne=!0,G(s,g)):s;s=l,i+=2}}function vg(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=yr(n/te),e.d=[],r=(n+1)%te,n<0&&(r+=te),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=te;r<i;)e.d.push(+t.slice(r,r+=te));t=t.slice(r),r=te-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),ne&&(e.e>Ha||e.e<-Ha))throw Error(bc+n)}else e.s=0,e.e=0,e.d=[0];return e}function G(e,t,n){var r,i,a,o,s,l,u,c,f=e.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(r=t-o,r<0)r+=te,i=t,u=f[c=0];else{if(c=Math.ceil((r+1)/te),a=f.length,c>=a)return e;for(u=a=f[c],o=1;a>=10;a/=10)o++;r%=te,i=r-te+o}if(n!==void 0&&(a=_n(10,o-i-1),s=u/a%10|0,l=t<0||f[c+1]!==void 0||u%a,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?u/_n(10,o-i):0:f[c-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return l?(a=ce(e),f.length=1,t=t-a-1,f[0]=_n(10,(te-t%te)%te),e.e=yr(-t/te)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=c,a=1,c--):(f.length=c+1,a=_n(10,te-r),f[c]=i>0?(u/_n(10,o-i)%_n(10,i)|0)*a:0),l)for(;;)if(c==0){(f[0]+=a)==ge&&(f[0]=1,++e.e);break}else{if(f[c]+=a,f[c]!=ge)break;f[c--]=0,a=1}for(r=f.length;f[--r]===0;)f.pop();if(ne&&(e.e>Ha||e.e<-Ha))throw Error(bc+ce(e));return e}function l0(e,t){var n,r,i,a,o,s,l,u,c,f,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),ne?G(t,h):t;if(l=e.d,f=t.d,r=t.e,u=e.e,l=l.slice(),o=u-r,o){for(c=o<0,c?(n=l,o=-o,s=f.length):(n=f,r=u,s=l.length),i=Math.max(Math.ceil(h/te),s)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=f.length,c=i<s,c&&(s=i),i=0;i<s;i++)if(l[i]!=f[i]){c=l[i]<f[i];break}o=0}for(c&&(n=l,l=f,f=n,t.s=-t.s),s=l.length,i=f.length-s;i>0;--i)l[s++]=0;for(i=f.length;i>o;){if(l[--i]<f[i]){for(a=i;a&&l[--a]===0;)l[a]=ge-1;--l[a],l[i]+=ge}l[i]-=f[i]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,ne?G(t,h):t):new d(0)}function Nn(e,t,n){var r,i=ce(e),a=vt(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+"."+a.slice(1)+zt(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+zt(-i-1)+a,n&&(r=n-o)>0&&(a+=zt(r))):i>=o?(a+=zt(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+zt(r))):((r=i+1)<o&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+="."),a+=zt(r))),e.s<0?"-"+a:a}function yg(e,t){if(e.length>t)return e.length=t,!0}function u0(e){var t,n,r;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Cn+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return vg(o,a.toString())}else if(typeof a!="string")throw Error(Cn+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,qC.test(a))vg(o,a);else throw Error(Cn+a)}if(i.prototype=R,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=u0,i.config=i.set=UC,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function UC(e){if(!e||typeof e!="object")throw Error(tt+"Object expected");var t,n,r,i=["precision",1,vr,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(yr(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Cn+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Cn+n+": "+r);return this}var xc=u0(WC);$e=new xc(1);const z=xc;function c0(e){var t;return e===0?t=1:t=Math.floor(new z(e).abs().log(10).toNumber())+1,t}function f0(e,t,n){for(var r=new z(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var d0=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},_c=(e,t,n)=>{if(e.lte(0))return new z(0);var r=c0(e.toNumber()),i=new z(10).pow(r),a=e.div(i),o=r!==1?.05:.1,s=new z(Math.ceil(a.div(o).toNumber())).add(n).mul(o),l=s.mul(i);return t?new z(l.toNumber()):new z(Math.ceil(l.toNumber()))},h0=(e,t,n)=>{var r;if(e.lte(0))return new z(0);var i=[1,2,2.5,5],a=e.toNumber(),o=Math.floor(new z(a).abs().log(10).toNumber()),s=new z(10).pow(o),l=e.div(s).toNumber(),u=i.findIndex(h=>h>=l-1e-10);if(u===-1&&(s=s.mul(10),u=0),u+=n,u>=i.length){var c=Math.floor(u/i.length);u%=i.length,s=s.mul(new z(10).pow(c))}var f=(r=i[u])!==null&&r!==void 0?r:1,d=new z(f).mul(s);return t?d:new z(Math.ceil(d.toNumber()))},VC=(e,t,n)=>{var r=new z(1),i=new z(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new z(10).pow(c0(e)-1),i=new z(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new z(Math.floor(e)))}else e===0?i=new z(Math.floor((t-1)/2)):n||(i=new z(Math.floor(e)));for(var o=Math.floor((t-1)/2),s=[],l=0;l<t;l++)s.push(i.add(new z(l-o).mul(r)).toNumber());return s},p0=function(t,n,r,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:_c;if(!Number.isFinite((n-t)/(r-1)))return{step:new z(0),tickMin:new z(0),tickMax:new z(0)};var s=o(new z(n).sub(t).div(r-1),i,a),l;t<=0&&n>=0?l=new z(0):(l=new z(t).add(n).div(2),l=l.sub(new z(l).mod(s)));var u=Math.ceil(l.sub(t).div(s).toNumber()),c=Math.ceil(new z(n).sub(l).div(s).toNumber()),f=u+c+1;return f>r?p0(t,n,r,i,a+1,o):(f<r&&(c=n>0?c+(r-f):c,u=n>0?u:u+(r-f)),{step:s,tickMin:l.sub(new z(u).mul(s)),tickMax:l.add(new z(c).mul(s))})},bg=function(t){var[n,r]=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",s=Math.max(i,2),[l,u]=d0([n,r]);if(l===-1/0||u===1/0){var c=u===1/0?[l,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),u];return n>r?c.reverse():c}if(l===u)return VC(l,i,a);var f=o==="snap125"?h0:_c,{step:d,tickMin:h,tickMax:p}=p0(l,u,s,a,0,f),m=f0(h,p.add(new z(.1).mul(d)),d);return n>r?m.reverse():m},xg=function(t,n){var[r,i]=t,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[s,l]=d0([r,i]);if(s===-1/0||l===1/0)return[r,i];if(s===l)return[s];var u=o==="snap125"?h0:_c,c=Math.max(n,2),f=u(new z(l).sub(s).div(c-1),a,0),d=[...f0(new z(s),new z(l),f),l];return a===!1&&(d=d.map(h=>Math.round(h))),r>i?d.reverse():d},HC=e=>e.rootProps.barCategoryGap,Lo=e=>e.rootProps.stackOffset,g0=e=>e.rootProps.reverseStackOrder,wc=e=>e.options.chartName,Sc=e=>e.rootProps.syncId,m0=e=>e.rootProps.syncMethod,Oc=e=>e.options.eventEmitter,On={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},hn={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},ft={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},No=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function v0(e,t,n){if(n!=="auto")return n;if(e!=null)return en(e,t)?"category":"number"}function _g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ka(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_g(Object(n),!0).forEach(function(r){KC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_g(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KC(e,t,n){return(t=YC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YC(e){var t=XC(e,"string");return typeof t=="symbol"?t:t+""}function XC(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wg={allowDataOverflow:hn.allowDataOverflow,allowDecimals:hn.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:hn.angleAxisId,includeHidden:!1,name:void 0,reversed:hn.reversed,scale:hn.scale,tick:hn.tick,tickCount:void 0,ticks:void 0,type:hn.type,unit:void 0,niceTicks:"auto"},Sg={allowDataOverflow:ft.allowDataOverflow,allowDecimals:ft.allowDecimals,allowDuplicatedCategory:ft.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:ft.radiusAxisId,includeHidden:ft.includeHidden,name:void 0,reversed:ft.reversed,scale:ft.scale,tick:ft.tick,tickCount:ft.tickCount,ticks:void 0,type:ft.type,unit:void 0,niceTicks:"auto"},GC=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},Pc=P([GC,zy],(e,t)=>{var n;if(e!=null)return e;var r=(n=v0(t,"angleAxis",wg.type))!==null&&n!==void 0?n:"category";return Ka(Ka({},wg),{},{type:r})}),ZC=(e,t)=>e.polarAxis.radiusAxis[t],Mc=P([ZC,zy],(e,t)=>{var n;if(e!=null)return e;var r=(n=v0(t,"radiusAxis",Sg.type))!==null&&n!==void 0?n:"category";return Ka(Ka({},Sg),{},{type:r})}),Fo=e=>e.polarOptions,Ac=P([tn,nn,ke],OC),y0=P([Fo,Ac],(e,t)=>{if(e!=null)return ar(e.innerRadius,t,0)}),b0=P([Fo,Ac],(e,t)=>{if(e!=null)return ar(e.outerRadius,t,t*.8)}),QC=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},x0=P([Fo],QC);P([Pc,x0],No);var _0=P([Ac,y0,b0],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});P([Mc,_0],No);var JC=P([ue,Fo,y0,b0,tn,nn],(e,t,n,r,i,a)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:o,cy:s,startAngle:l,endAngle:u}=t;return{cx:ar(o,i,i/2),cy:ar(s,a,a/2),innerRadius:n,outerRadius:r,startAngle:l,endAngle:u,clockWise:!1}}}),ye=(e,t)=>t,Bo=(e,t,n)=>n;function w0(e){return e?.id}function S0(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:a}=n,o=new Map;return e.forEach(s=>{var l,u=(l=s.data)!==null&&l!==void 0?l:r;if(!(u==null||u.length===0)){var c=w0(s);u.forEach((f,d)=>{var h=a==null||i?d:String(ve(f,a,null)),p=ve(f,s.dataKey,0),m;o.has(h)?m=o.get(h):m={},Object.assign(m,{[c]:p}),o.set(h,m)})}}),Array.from(o.values())}function kc(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var zo=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function $o(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function eE(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}var be=e=>{var t=ue(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},br=e=>e.tooltip.settings.axisId;function Cc(e){if(e!=null){var t=e.ticks,n=e.bandwidth,r=e.range(),i=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:(function(a){function o(){return a.apply(this,arguments)}return o.toString=function(){return a.toString()},o})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(a){var o=i[0],s=i[1];return o<=s?a>=o&&a<=s:a>=s&&a<=o},bandwidth:n?()=>n.call(e):void 0,ticks:t?a=>t.call(e,a):void 0,map:(a,o)=>{var s=e(a);if(s!=null){if(e.bandwidth&&o!==null&&o!==void 0&&o.position){var l=e.bandwidth();switch(o.position){case"middle":s+=l/2;break;case"end":s+=l;break}}return s}}}}}var tE=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!bt(t)){for(var n,r,i=0;i<t.length;i++){var a=t[i];Q(a)&&((n===void 0||a<n)&&(n=a),(r===void 0||a>r)&&(r=a))}return n!==void 0&&r!==void 0?[n,r]:void 0}return t}default:return t}};function Kt(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function nE(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ec(e){let t,n,r;e.length!==2?(t=Kt,n=(s,l)=>Kt(e(s),l),r=(s,l)=>e(s)-l):(t=e===Kt||e===nE?e:rE,n=e,r=e);function i(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;n(s[f],l)<0?u=f+1:c=f}while(u<c)}return u}function a(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;n(s[f],l)<=0?u=f+1:c=f}while(u<c)}return u}function o(s,l,u=0,c=s.length){const f=i(s,l,u,c-1);return f>u&&r(s[f-1],l)>-r(s[f],l)?f-1:f}return{left:i,center:o,right:a}}function rE(){return 0}function O0(e){return e===null?NaN:+e}function*iE(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const aE=Ec(Kt),Pi=aE.right;Ec(O0).center;class Og extends Map{constructor(t,n=lE){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(Pg(this,t))}has(t){return super.has(Pg(this,t))}set(t,n){return super.set(oE(this,t),n)}delete(t){return super.delete(sE(this,t))}}function Pg({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function oE({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function sE({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function lE(e){return e!==null&&typeof e=="object"?e.valueOf():e}function uE(e=Kt){if(e===Kt)return P0;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function P0(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const cE=Math.sqrt(50),fE=Math.sqrt(10),dE=Math.sqrt(2);function Ya(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=cE?10:a>=fE?5:a>=dE?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=n&&n<2?Ya(e,t,n*2):[s,l,u]}function Mu(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,o]=r?Ya(t,e,n):Ya(e,t,n);if(!(a>=i))return[];const s=a-i+1,l=new Array(s);if(r)if(o<0)for(let u=0;u<s;++u)l[u]=(a-u)/-o;else for(let u=0;u<s;++u)l[u]=(a-u)*o;else if(o<0)for(let u=0;u<s;++u)l[u]=(i+u)/-o;else for(let u=0;u<s;++u)l[u]=(i+u)*o;return l}function Au(e,t,n){return t=+t,e=+e,n=+n,Ya(e,t,n)[2]}function ku(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Au(t,e,n):Au(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function Mg(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function Ag(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function M0(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?P0:uE(i);r>n;){if(r-n>600){const l=r-n+1,u=t-n+1,c=Math.log(l),f=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),h=Math.max(n,Math.floor(t-u*f/l+d)),p=Math.min(r,Math.floor(t+(l-u)*f/l+d));M0(e,t,h,p,i)}const a=e[t];let o=n,s=r;for(Lr(e,n,t),i(e[r],a)>0&&Lr(e,n,r);o<s;){for(Lr(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?Lr(e,n,s):(++s,Lr(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Lr(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function hE(e,t,n){if(e=Float64Array.from(iE(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Ag(e);if(t>=1)return Mg(e);var r,i=(r-1)*t,a=Math.floor(i),o=Mg(M0(e,a).subarray(0,a+1)),s=Ag(e.subarray(a+1));return o+(s-o)*(i-a)}}function pE(e,t,n=O0){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e),s=+n(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function gE(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function nt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Lt(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Cu=Symbol("implicit");function Tc(){var e=new Og,t=[],n=[],r=Cu;function i(a){let o=e.get(a);if(o===void 0){if(r!==Cu)return r;e.set(a,o=t.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new Og;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return Tc(t,n).unknown(r)},nt.apply(i,arguments),i}function Dc(){var e=Tc().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,l=0,u=0,c=.5;delete e.unknown;function f(){var d=t().length,h=i<r,p=h?i:r,m=h?r:i;a=(m-p)/Math.max(1,d-l+u*2),s&&(a=Math.floor(a)),p+=(m-p-a*(d-l))*c,o=a*(1-l),s&&(p=Math.round(p),o=Math.round(o));var g=gE(d).map(function(v){return p+a*v});return n(h?g.reverse():g)}return e.domain=function(d){return arguments.length?(t(d),f()):t()},e.range=function(d){return arguments.length?([r,i]=d,r=+r,i=+i,f()):[r,i]},e.rangeRound=function(d){return[r,i]=d,r=+r,i=+i,s=!0,f()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(d){return arguments.length?(s=!!d,f()):s},e.padding=function(d){return arguments.length?(l=Math.min(1,u=+d),f()):l},e.paddingInner=function(d){return arguments.length?(l=Math.min(1,d),f()):l},e.paddingOuter=function(d){return arguments.length?(u=+d,f()):u},e.align=function(d){return arguments.length?(c=Math.max(0,Math.min(1,d)),f()):c},e.copy=function(){return Dc(t(),[r,i]).round(s).paddingInner(l).paddingOuter(u).align(c)},nt.apply(f(),arguments)}function A0(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return A0(t())},e}function mE(){return A0(Dc.apply(null,arguments).paddingInner(1))}function Ic(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function k0(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Mi(){}var fi=.7,Xa=1/fi,Qn="\\s*([+-]?\\d+)\\s*",di="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",vE=/^#([0-9a-f]{3,8})$/,yE=new RegExp(`^rgb\\(${Qn},${Qn},${Qn}\\)$`),bE=new RegExp(`^rgb\\(${xt},${xt},${xt}\\)$`),xE=new RegExp(`^rgba\\(${Qn},${Qn},${Qn},${di}\\)$`),_E=new RegExp(`^rgba\\(${xt},${xt},${xt},${di}\\)$`),wE=new RegExp(`^hsl\\(${di},${xt},${xt}\\)$`),SE=new RegExp(`^hsla\\(${di},${xt},${xt},${di}\\)$`),kg={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};Ic(Mi,hi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Cg,formatHex:Cg,formatHex8:OE,formatHsl:PE,formatRgb:Eg,toString:Eg});function Cg(){return this.rgb().formatHex()}function OE(){return this.rgb().formatHex8()}function PE(){return C0(this).formatHsl()}function Eg(){return this.rgb().formatRgb()}function hi(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=vE.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Tg(t):n===3?new Ne(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?oa(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?oa(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=yE.exec(e))?new Ne(t[1],t[2],t[3],1):(t=bE.exec(e))?new Ne(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=xE.exec(e))?oa(t[1],t[2],t[3],t[4]):(t=_E.exec(e))?oa(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=wE.exec(e))?Rg(t[1],t[2]/100,t[3]/100,1):(t=SE.exec(e))?Rg(t[1],t[2]/100,t[3]/100,t[4]):kg.hasOwnProperty(e)?Tg(kg[e]):e==="transparent"?new Ne(NaN,NaN,NaN,0):null}function Tg(e){return new Ne(e>>16&255,e>>8&255,e&255,1)}function oa(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ne(e,t,n,r)}function ME(e){return e instanceof Mi||(e=hi(e)),e?(e=e.rgb(),new Ne(e.r,e.g,e.b,e.opacity)):new Ne}function Eu(e,t,n,r){return arguments.length===1?ME(e):new Ne(e,t,n,r??1)}function Ne(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Ic(Ne,Eu,k0(Mi,{brighter(e){return e=e==null?Xa:Math.pow(Xa,e),new Ne(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?fi:Math.pow(fi,e),new Ne(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ne(En(this.r),En(this.g),En(this.b),Ga(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:Dg,formatHex:Dg,formatHex8:AE,formatRgb:Ig,toString:Ig}));function Dg(){return`#${Pn(this.r)}${Pn(this.g)}${Pn(this.b)}`}function AE(){return`#${Pn(this.r)}${Pn(this.g)}${Pn(this.b)}${Pn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ig(){const e=Ga(this.opacity);return`${e===1?"rgb(":"rgba("}${En(this.r)}, ${En(this.g)}, ${En(this.b)}${e===1?")":`, ${e})`}`}function Ga(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function En(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Pn(e){return e=En(e),(e<16?"0":"")+e.toString(16)}function Rg(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new at(e,t,n,r)}function C0(e){if(e instanceof at)return new at(e.h,e.s,e.l,e.opacity);if(e instanceof Mi||(e=hi(e)),!e)return new at;if(e instanceof at)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(n-r)/s+(n<r)*6:n===a?o=(r-t)/s+2:o=(t-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new at(o,s,l,e.opacity)}function kE(e,t,n,r){return arguments.length===1?C0(e):new at(e,t,n,r??1)}function at(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ic(at,kE,k0(Mi,{brighter(e){return e=e==null?Xa:Math.pow(Xa,e),new at(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?fi:Math.pow(fi,e),new at(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ne(Ol(e>=240?e-240:e+120,i,r),Ol(e,i,r),Ol(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new at(jg(this.h),sa(this.s),sa(this.l),Ga(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ga(this.opacity);return`${e===1?"hsl(":"hsla("}${jg(this.h)}, ${sa(this.s)*100}%, ${sa(this.l)*100}%${e===1?")":`, ${e})`}`}}));function jg(e){return e=(e||0)%360,e<0?e+360:e}function sa(e){return Math.max(0,Math.min(1,e||0))}function Ol(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Rc=e=>()=>e;function CE(e,t){return function(n){return e+n*t}}function EE(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function TE(e){return(e=+e)==1?E0:function(t,n){return n-t?EE(t,n,e):Rc(isNaN(t)?n:t)}}function E0(e,t){var n=t-e;return n?CE(e,n):Rc(isNaN(e)?t:e)}const Lg=(function e(t){var n=TE(t);function r(i,a){var o=n((i=Eu(i)).r,(a=Eu(a)).r),s=n(i.g,a.g),l=n(i.b,a.b),u=E0(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=e,r})(1);function DE(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function IE(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function RE(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=xr(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(s){for(o=0;o<r;++o)a[o]=i[o](s);return a}}function jE(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Za(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function LE(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=xr(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var Tu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Pl=new RegExp(Tu.source,"g");function NE(e){return function(){return e}}function FE(e){return function(t){return e(t)+""}}function BE(e,t){var n=Tu.lastIndex=Pl.lastIndex=0,r,i,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(r=Tu.exec(e))&&(i=Pl.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:Za(r,i)})),n=Pl.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?FE(l[0].x):NE(t):(t=l.length,function(u){for(var c=0,f;c<t;++c)s[(f=l[c]).i]=f.x(u);return s.join("")})}function xr(e,t){var n=typeof t,r;return t==null||n==="boolean"?Rc(t):(n==="number"?Za:n==="string"?(r=hi(t))?(t=r,Lg):BE:t instanceof hi?Lg:t instanceof Date?jE:IE(t)?DE:Array.isArray(t)?RE:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?LE:Za)(e,t)}function jc(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function zE(e,t){t===void 0&&(t=e,e=xr);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(o){var s=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return a[s](o-s)}}function $E(e){return function(){return e}}function Qa(e){return+e}var Ng=[0,1];function Ce(e){return e}function Du(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:$E(isNaN(t)?NaN:.5)}function WE(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function qE(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=Du(i,r),a=n(o,a)):(r=Du(r,i),a=n(a,o)),function(s){return a(r(s))}}function UE(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=Du(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(s){var l=Pi(e,s,1,r)-1;return a[l](i[l](s))}}function Ai(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Wo(){var e=Ng,t=Ng,n=xr,r,i,a,o=Ce,s,l,u;function c(){var d=Math.min(e.length,t.length);return o!==Ce&&(o=WE(e[0],e[d-1])),s=d>2?UE:qE,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?a:(l||(l=s(e.map(r),t,n)))(r(o(d)))}return f.invert=function(d){return o(i((u||(u=s(t,e.map(r),Za)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,Qa),c()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),c()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),n=jc,c()},f.clamp=function(d){return arguments.length?(o=d?!0:Ce,c()):o!==Ce},f.interpolate=function(d){return arguments.length?(n=d,c()):n},f.unknown=function(d){return arguments.length?(a=d,f):a},function(d,h){return r=d,i=h,c()}}function Lc(){return Wo()(Ce,Ce)}function VE(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Ja(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function lr(e){return e=Ja(Math.abs(e)),e?e[1]:NaN}function HE(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function KE(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var YE=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pi(e){if(!(t=YE.exec(e)))throw new Error("invalid format: "+e);var t;return new Nc({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}pi.prototype=Nc.prototype;function Nc(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Nc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function XE(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var eo;function GE(e,t){var n=Ja(e,t);if(!n)return eo=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(eo=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Ja(e,Math.max(0,t+a-1))[0]}function Fg(e,t){var n=Ja(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Bg={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:VE,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Fg(e*100,t),r:Fg,s:GE,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function zg(e){return e}var $g=Array.prototype.map,Wg=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ZE(e){var t=e.grouping===void 0||e.thousands===void 0?zg:HE($g.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?zg:KE($g.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f,d){f=pi(f);var h=f.fill,p=f.align,m=f.sign,g=f.symbol,v=f.zero,y=f.width,b=f.comma,_=f.precision,x=f.trim,S=f.type;S==="n"?(b=!0,S="g"):Bg[S]||(_===void 0&&(_=12),x=!0,S="g"),(v||h==="0"&&p==="=")&&(v=!0,h="0",p="=");var O=(d&&d.prefix!==void 0?d.prefix:"")+(g==="$"?n:g==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():""),M=(g==="$"?r:/[%p]/.test(S)?o:"")+(d&&d.suffix!==void 0?d.suffix:""),k=Bg[S],E=/[defgprs%]/.test(S);_=_===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function T(A){var F=O,L=M,I,N,B;if(S==="c")L=k(A)+L,A="";else{A=+A;var oe=A<0||1/A<0;if(A=isNaN(A)?l:k(Math.abs(A),_),x&&(A=XE(A)),oe&&+A==0&&m!=="+"&&(oe=!1),F=(oe?m==="("?m:s:m==="-"||m==="("?"":m)+F,L=(S==="s"&&!isNaN(A)&&eo!==void 0?Wg[8+eo/3]:"")+L+(oe&&m==="("?")":""),E){for(I=-1,N=A.length;++I<N;)if(B=A.charCodeAt(I),48>B||B>57){L=(B===46?i+A.slice(I+1):A.slice(I))+L,A=A.slice(0,I);break}}}b&&!v&&(A=t(A,1/0));var J=F.length+A.length+L.length,H=J<y?new Array(y-J+1).join(h):"";switch(b&&v&&(A=t(H+A,H.length?y-L.length:1/0),H=""),p){case"<":A=F+A+L+H;break;case"=":A=F+H+A+L;break;case"^":A=H.slice(0,J=H.length>>1)+F+A+L+H.slice(J);break;default:A=H+F+A+L;break}return a(A)}return T.toString=function(){return f+""},T}function c(f,d){var h=Math.max(-8,Math.min(8,Math.floor(lr(d)/3)))*3,p=Math.pow(10,-h),m=u((f=pi(f),f.type="f",f),{suffix:Wg[8+h/3]});return function(g){return m(p*g)}}return{format:u,formatPrefix:c}}var la,Fc,T0;QE({thousands:",",grouping:[3],currency:["$",""]});function QE(e){return la=ZE(e),Fc=la.format,T0=la.formatPrefix,la}function JE(e){return Math.max(0,-lr(Math.abs(e)))}function eT(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(lr(t)/3)))*3-lr(Math.abs(e)))}function tT(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,lr(t)-lr(e))+1}function D0(e,t,n,r){var i=ku(e,t,n),a;switch(r=pi(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=eT(i,o))&&(r.precision=a),T0(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=tT(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=JE(i))&&(r.precision=a-(r.type==="%")*2);break}}return Fc(r)}function an(e){var t=e.domain;return e.ticks=function(n){var r=t();return Mu(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return D0(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],l,u,c=10;for(s<o&&(u=o,o=s,s=u,u=i,i=a,a=u);c-- >0;){if(u=Au(o,s,n),u===l)return r[i]=o,r[a]=s,t(r);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function I0(){var e=Lc();return e.copy=function(){return Ai(e,I0())},nt.apply(e,arguments),an(e)}function R0(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Qa),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return R0(e).unknown(t)},e=arguments.length?Array.from(e,Qa):[0,1],an(n)}function j0(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function qg(e){return Math.log(e)}function Ug(e){return Math.exp(e)}function nT(e){return-Math.log(-e)}function rT(e){return-Math.exp(-e)}function iT(e){return isFinite(e)?+("1e"+e):e<0?0:e}function aT(e){return e===10?iT:e===Math.E?Math.exp:t=>Math.pow(e,t)}function oT(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Vg(e){return(t,n)=>-e(-t,n)}function Bc(e){const t=e(qg,Ug),n=t.domain;let r=10,i,a;function o(){return i=oT(r),a=aT(r),n()[0]<0?(i=Vg(i),a=Vg(a),e(nT,rT)):e(qg,Ug),t}return t.base=function(s){return arguments.length?(r=+s,o()):r},t.domain=function(s){return arguments.length?(n(s),o()):n()},t.ticks=s=>{const l=n();let u=l[0],c=l[l.length-1];const f=c<u;f&&([u,c]=[c,u]);let d=i(u),h=i(c),p,m;const g=s==null?10:+s;let v=[];if(!(r%1)&&h-d<g){if(d=Math.floor(d),h=Math.ceil(h),u>0){for(;d<=h;++d)for(p=1;p<r;++p)if(m=d<0?p/a(-d):p*a(d),!(m<u)){if(m>c)break;v.push(m)}}else for(;d<=h;++d)for(p=r-1;p>=1;--p)if(m=d>0?p/a(-d):p*a(d),!(m<u)){if(m>c)break;v.push(m)}v.length*2<g&&(v=Mu(u,c,g))}else v=Mu(d,h,Math.min(h-d,g)).map(a);return f?v.reverse():v},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=pi(l)).precision==null&&(l.trim=!0),l=Fc(l)),s===1/0)return l;const u=Math.max(1,r*s/t.ticks().length);return c=>{let f=c/a(Math.round(i(c)));return f*r<r-.5&&(f*=r),f<=u?l(c):""}},t.nice=()=>n(j0(n(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function L0(){const e=Bc(Wo()).domain([1,10]);return e.copy=()=>Ai(e,L0()).base(e.base()),nt.apply(e,arguments),e}function Hg(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Kg(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function zc(e){var t=1,n=e(Hg(t),Kg(t));return n.constant=function(r){return arguments.length?e(Hg(t=+r),Kg(t)):t},an(n)}function N0(){var e=zc(Wo());return e.copy=function(){return Ai(e,N0()).constant(e.constant())},nt.apply(e,arguments)}function Yg(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function sT(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function lT(e){return e<0?-e*e:e*e}function $c(e){var t=e(Ce,Ce),n=1;function r(){return n===1?e(Ce,Ce):n===.5?e(sT,lT):e(Yg(n),Yg(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},an(t)}function Wc(){var e=$c(Wo());return e.copy=function(){return Ai(e,Wc()).exponent(e.exponent())},nt.apply(e,arguments),e}function uT(){return Wc.apply(null,arguments).exponent(.5)}function Xg(e){return Math.sign(e)*e*e}function cT(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function F0(){var e=Lc(),t=[0,1],n=!1,r;function i(a){var o=cT(e(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return e.invert(Xg(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Qa)).map(Xg)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return F0(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},nt.apply(i,arguments),an(i)}function B0(){var e=[],t=[],n=[],r;function i(){var o=0,s=Math.max(1,t.length);for(n=new Array(s-1);++o<s;)n[o-1]=pE(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?r:t[Pi(n,o)]}return a.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Kt),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return B0().domain(e).range(t).unknown(r)},nt.apply(a,arguments)}function z0(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(l){return l!=null&&l<=l?i[Pi(r,l,0,n)]:a}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return o}return o.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},o.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},o.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return r.slice()},o.copy=function(){return z0().domain([e,t]).range(i).unknown(a)},nt.apply(an(o),arguments)}function $0(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[Pi(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return $0().domain(e).range(t).unknown(n)},nt.apply(i,arguments)}const Ml=new Date,Al=new Date;function he(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return l;let u;do l.push(u=new Date(+a)),t(a,s),e(a);while(u<a&&a<o);return l},i.filter=a=>he(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(Ml.setTime(+a),Al.setTime(+o),e(Ml),e(Al),Math.floor(n(Ml,Al))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const to=he(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);to.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?he(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):to);to.range;const kt=1e3,Qe=kt*60,Ct=Qe*60,Dt=Ct*24,qc=Dt*7,Gg=Dt*30,kl=Dt*365,Mn=he(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*kt)},(e,t)=>(t-e)/kt,e=>e.getUTCSeconds());Mn.range;const Uc=he(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*kt)},(e,t)=>{e.setTime(+e+t*Qe)},(e,t)=>(t-e)/Qe,e=>e.getMinutes());Uc.range;const Vc=he(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Qe)},(e,t)=>(t-e)/Qe,e=>e.getUTCMinutes());Vc.range;const Hc=he(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*kt-e.getMinutes()*Qe)},(e,t)=>{e.setTime(+e+t*Ct)},(e,t)=>(t-e)/Ct,e=>e.getHours());Hc.range;const Kc=he(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ct)},(e,t)=>(t-e)/Ct,e=>e.getUTCHours());Kc.range;const ki=he(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Qe)/Dt,e=>e.getDate()-1);ki.range;const qo=he(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Dt,e=>e.getUTCDate()-1);qo.range;const W0=he(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Dt,e=>Math.floor(e/Dt));W0.range;function Bn(e){return he(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Qe)/qc)}const Uo=Bn(0),no=Bn(1),fT=Bn(2),dT=Bn(3),ur=Bn(4),hT=Bn(5),pT=Bn(6);Uo.range;no.range;fT.range;dT.range;ur.range;hT.range;pT.range;function zn(e){return he(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/qc)}const Vo=zn(0),ro=zn(1),gT=zn(2),mT=zn(3),cr=zn(4),vT=zn(5),yT=zn(6);Vo.range;ro.range;gT.range;mT.range;cr.range;vT.range;yT.range;const Yc=he(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Yc.range;const Xc=he(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Xc.range;const It=he(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());It.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:he(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});It.range;const Rt=he(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Rt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:he(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Rt.range;function q0(e,t,n,r,i,a){const o=[[Mn,1,kt],[Mn,5,5*kt],[Mn,15,15*kt],[Mn,30,30*kt],[a,1,Qe],[a,5,5*Qe],[a,15,15*Qe],[a,30,30*Qe],[i,1,Ct],[i,3,3*Ct],[i,6,6*Ct],[i,12,12*Ct],[r,1,Dt],[r,2,2*Dt],[n,1,qc],[t,1,Gg],[t,3,3*Gg],[e,1,kl]];function s(u,c,f){const d=c<u;d&&([u,c]=[c,u]);const h=f&&typeof f.range=="function"?f:l(u,c,f),p=h?h.range(u,+c+1):[];return d?p.reverse():p}function l(u,c,f){const d=Math.abs(c-u)/f,h=Ec(([,,g])=>g).right(o,d);if(h===o.length)return e.every(ku(u/kl,c/kl,f));if(h===0)return to.every(Math.max(ku(u,c,f),1));const[p,m]=o[d/o[h-1][2]<o[h][2]/d?h-1:h];return p.every(m)}return[s,l]}const[bT,xT]=q0(Rt,Xc,Vo,W0,Kc,Vc),[_T,wT]=q0(It,Yc,Uo,ki,Hc,Uc);function Cl(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function El(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Nr(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function ST(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,u=Fr(i),c=Br(i),f=Fr(a),d=Br(a),h=Fr(o),p=Br(o),m=Fr(s),g=Br(s),v=Fr(l),y=Br(l),b={a:B,A:oe,b:J,B:H,c:null,d:nm,e:nm,f:HT,g:nD,G:iD,H:qT,I:UT,j:VT,L:U0,m:KT,M:YT,p:Me,q:se,Q:am,s:om,S:XT,u:GT,U:ZT,V:QT,w:JT,W:eD,x:null,X:null,y:tD,Y:rD,Z:aD,"%":im},_={a:_e,A:re,b:we,B:Se,c:null,d:rm,e:rm,f:uD,g:bD,G:_D,H:oD,I:sD,j:lD,L:H0,m:cD,M:fD,p:Mr,q:De,Q:am,s:om,S:dD,u:hD,U:pD,V:gD,w:mD,W:vD,x:null,X:null,y:yD,Y:xD,Z:wD,"%":im},x={a:E,A:T,b:A,B:F,c:L,d:em,e:em,f:BT,g:Jg,G:Qg,H:tm,I:tm,j:jT,L:FT,m:RT,M:LT,p:k,q:IT,Q:$T,s:WT,S:NT,u:kT,U:CT,V:ET,w:AT,W:TT,x:I,X:N,y:Jg,Y:Qg,Z:DT,"%":zT};b.x=S(n,b),b.X=S(r,b),b.c=S(t,b),_.x=S(n,_),_.X=S(r,_),_.c=S(t,_);function S(j,D){return function(q){var C=[],Ie=-1,Z=0,Be=j.length,ze,un,Of;for(q instanceof Date||(q=new Date(+q));++Ie<Be;)j.charCodeAt(Ie)===37&&(C.push(j.slice(Z,Ie)),(un=Zg[ze=j.charAt(++Ie)])!=null?ze=j.charAt(++Ie):un=ze==="e"?" ":"0",(Of=D[ze])&&(ze=Of(q,un)),C.push(ze),Z=Ie+1);return C.push(j.slice(Z,Ie)),C.join("")}}function O(j,D){return function(q){var C=Nr(1900,void 0,1),Ie=M(C,j,q+="",0),Z,Be;if(Ie!=q.length)return null;if("Q"in C)return new Date(C.Q);if("s"in C)return new Date(C.s*1e3+("L"in C?C.L:0));if(D&&!("Z"in C)&&(C.Z=0),"p"in C&&(C.H=C.H%12+C.p*12),C.m===void 0&&(C.m="q"in C?C.q:0),"V"in C){if(C.V<1||C.V>53)return null;"w"in C||(C.w=1),"Z"in C?(Z=El(Nr(C.y,0,1)),Be=Z.getUTCDay(),Z=Be>4||Be===0?ro.ceil(Z):ro(Z),Z=qo.offset(Z,(C.V-1)*7),C.y=Z.getUTCFullYear(),C.m=Z.getUTCMonth(),C.d=Z.getUTCDate()+(C.w+6)%7):(Z=Cl(Nr(C.y,0,1)),Be=Z.getDay(),Z=Be>4||Be===0?no.ceil(Z):no(Z),Z=ki.offset(Z,(C.V-1)*7),C.y=Z.getFullYear(),C.m=Z.getMonth(),C.d=Z.getDate()+(C.w+6)%7)}else("W"in C||"U"in C)&&("w"in C||(C.w="u"in C?C.u%7:"W"in C?1:0),Be="Z"in C?El(Nr(C.y,0,1)).getUTCDay():Cl(Nr(C.y,0,1)).getDay(),C.m=0,C.d="W"in C?(C.w+6)%7+C.W*7-(Be+5)%7:C.w+C.U*7-(Be+6)%7);return"Z"in C?(C.H+=C.Z/100|0,C.M+=C.Z%100,El(C)):Cl(C)}}function M(j,D,q,C){for(var Ie=0,Z=D.length,Be=q.length,ze,un;Ie<Z;){if(C>=Be)return-1;if(ze=D.charCodeAt(Ie++),ze===37){if(ze=D.charAt(Ie++),un=x[ze in Zg?D.charAt(Ie++):ze],!un||(C=un(j,q,C))<0)return-1}else if(ze!=q.charCodeAt(C++))return-1}return C}function k(j,D,q){var C=u.exec(D.slice(q));return C?(j.p=c.get(C[0].toLowerCase()),q+C[0].length):-1}function E(j,D,q){var C=h.exec(D.slice(q));return C?(j.w=p.get(C[0].toLowerCase()),q+C[0].length):-1}function T(j,D,q){var C=f.exec(D.slice(q));return C?(j.w=d.get(C[0].toLowerCase()),q+C[0].length):-1}function A(j,D,q){var C=v.exec(D.slice(q));return C?(j.m=y.get(C[0].toLowerCase()),q+C[0].length):-1}function F(j,D,q){var C=m.exec(D.slice(q));return C?(j.m=g.get(C[0].toLowerCase()),q+C[0].length):-1}function L(j,D,q){return M(j,t,D,q)}function I(j,D,q){return M(j,n,D,q)}function N(j,D,q){return M(j,r,D,q)}function B(j){return o[j.getDay()]}function oe(j){return a[j.getDay()]}function J(j){return l[j.getMonth()]}function H(j){return s[j.getMonth()]}function Me(j){return i[+(j.getHours()>=12)]}function se(j){return 1+~~(j.getMonth()/3)}function _e(j){return o[j.getUTCDay()]}function re(j){return a[j.getUTCDay()]}function we(j){return l[j.getUTCMonth()]}function Se(j){return s[j.getUTCMonth()]}function Mr(j){return i[+(j.getUTCHours()>=12)]}function De(j){return 1+~~(j.getUTCMonth()/3)}return{format:function(j){var D=S(j+="",b);return D.toString=function(){return j},D},parse:function(j){var D=O(j+="",!1);return D.toString=function(){return j},D},utcFormat:function(j){var D=S(j+="",_);return D.toString=function(){return j},D},utcParse:function(j){var D=O(j+="",!0);return D.toString=function(){return j},D}}}var Zg={"-":"",_:" ",0:"0"},xe=/^\s*\d+/,OT=/^%/,PT=/[\\^$*+?|[\]().{}]/g;function V(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function MT(e){return e.replace(PT,"\\$&")}function Fr(e){return new RegExp("^(?:"+e.map(MT).join("|")+")","i")}function Br(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function AT(e,t,n){var r=xe.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function kT(e,t,n){var r=xe.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function CT(e,t,n){var r=xe.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function ET(e,t,n){var r=xe.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function TT(e,t,n){var r=xe.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Qg(e,t,n){var r=xe.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Jg(e,t,n){var r=xe.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function DT(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function IT(e,t,n){var r=xe.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function RT(e,t,n){var r=xe.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function em(e,t,n){var r=xe.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function jT(e,t,n){var r=xe.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function tm(e,t,n){var r=xe.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function LT(e,t,n){var r=xe.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function NT(e,t,n){var r=xe.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function FT(e,t,n){var r=xe.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function BT(e,t,n){var r=xe.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function zT(e,t,n){var r=OT.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function $T(e,t,n){var r=xe.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function WT(e,t,n){var r=xe.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function nm(e,t){return V(e.getDate(),t,2)}function qT(e,t){return V(e.getHours(),t,2)}function UT(e,t){return V(e.getHours()%12||12,t,2)}function VT(e,t){return V(1+ki.count(It(e),e),t,3)}function U0(e,t){return V(e.getMilliseconds(),t,3)}function HT(e,t){return U0(e,t)+"000"}function KT(e,t){return V(e.getMonth()+1,t,2)}function YT(e,t){return V(e.getMinutes(),t,2)}function XT(e,t){return V(e.getSeconds(),t,2)}function GT(e){var t=e.getDay();return t===0?7:t}function ZT(e,t){return V(Uo.count(It(e)-1,e),t,2)}function V0(e){var t=e.getDay();return t>=4||t===0?ur(e):ur.ceil(e)}function QT(e,t){return e=V0(e),V(ur.count(It(e),e)+(It(e).getDay()===4),t,2)}function JT(e){return e.getDay()}function eD(e,t){return V(no.count(It(e)-1,e),t,2)}function tD(e,t){return V(e.getFullYear()%100,t,2)}function nD(e,t){return e=V0(e),V(e.getFullYear()%100,t,2)}function rD(e,t){return V(e.getFullYear()%1e4,t,4)}function iD(e,t){var n=e.getDay();return e=n>=4||n===0?ur(e):ur.ceil(e),V(e.getFullYear()%1e4,t,4)}function aD(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+V(t/60|0,"0",2)+V(t%60,"0",2)}function rm(e,t){return V(e.getUTCDate(),t,2)}function oD(e,t){return V(e.getUTCHours(),t,2)}function sD(e,t){return V(e.getUTCHours()%12||12,t,2)}function lD(e,t){return V(1+qo.count(Rt(e),e),t,3)}function H0(e,t){return V(e.getUTCMilliseconds(),t,3)}function uD(e,t){return H0(e,t)+"000"}function cD(e,t){return V(e.getUTCMonth()+1,t,2)}function fD(e,t){return V(e.getUTCMinutes(),t,2)}function dD(e,t){return V(e.getUTCSeconds(),t,2)}function hD(e){var t=e.getUTCDay();return t===0?7:t}function pD(e,t){return V(Vo.count(Rt(e)-1,e),t,2)}function K0(e){var t=e.getUTCDay();return t>=4||t===0?cr(e):cr.ceil(e)}function gD(e,t){return e=K0(e),V(cr.count(Rt(e),e)+(Rt(e).getUTCDay()===4),t,2)}function mD(e){return e.getUTCDay()}function vD(e,t){return V(ro.count(Rt(e)-1,e),t,2)}function yD(e,t){return V(e.getUTCFullYear()%100,t,2)}function bD(e,t){return e=K0(e),V(e.getUTCFullYear()%100,t,2)}function xD(e,t){return V(e.getUTCFullYear()%1e4,t,4)}function _D(e,t){var n=e.getUTCDay();return e=n>=4||n===0?cr(e):cr.ceil(e),V(e.getUTCFullYear()%1e4,t,4)}function wD(){return"+0000"}function im(){return"%"}function am(e){return+e}function om(e){return Math.floor(+e/1e3)}var Un,Y0,X0;SD({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function SD(e){return Un=ST(e),Y0=Un.format,Un.parse,X0=Un.utcFormat,Un.utcParse,Un}function OD(e){return new Date(e)}function PD(e){return e instanceof Date?+e:+new Date(+e)}function Gc(e,t,n,r,i,a,o,s,l,u){var c=Lc(),f=c.invert,d=c.domain,h=u(".%L"),p=u(":%S"),m=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),y=u("%b %d"),b=u("%B"),_=u("%Y");function x(S){return(l(S)<S?h:s(S)<S?p:o(S)<S?m:a(S)<S?g:r(S)<S?i(S)<S?v:y:n(S)<S?b:_)(S)}return c.invert=function(S){return new Date(f(S))},c.domain=function(S){return arguments.length?d(Array.from(S,PD)):d().map(OD)},c.ticks=function(S){var O=d();return e(O[0],O[O.length-1],S??10)},c.tickFormat=function(S,O){return O==null?x:u(O)},c.nice=function(S){var O=d();return(!S||typeof S.range!="function")&&(S=t(O[0],O[O.length-1],S??10)),S?d(j0(O,S)):c},c.copy=function(){return Ai(c,Gc(e,t,n,r,i,a,o,s,l,u))},c}function MD(){return nt.apply(Gc(_T,wT,It,Yc,Uo,ki,Hc,Uc,Mn,Y0).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function AD(){return nt.apply(Gc(bT,xT,Rt,Xc,Vo,qo,Kc,Vc,Mn,X0).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Ho(){var e=0,t=1,n,r,i,a,o=Ce,s=!1,l;function u(f){return f==null||isNaN(f=+f)?l:o(i===0?.5:(f=(a(f)-n)*i,s?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(f){return arguments.length?(s=!!f,u):s},u.interpolator=function(f){return arguments.length?(o=f,u):o};function c(f){return function(d){var h,p;return arguments.length?([h,p]=d,o=f(h,p),u):[o(0),o(1)]}}return u.range=c(xr),u.rangeRound=c(jc),u.unknown=function(f){return arguments.length?(l=f,u):l},function(f){return a=f,n=f(e),r=f(t),i=n===r?0:1/(r-n),u}}function on(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function G0(){var e=an(Ho()(Ce));return e.copy=function(){return on(e,G0())},Lt.apply(e,arguments)}function Z0(){var e=Bc(Ho()).domain([1,10]);return e.copy=function(){return on(e,Z0()).base(e.base())},Lt.apply(e,arguments)}function Q0(){var e=zc(Ho());return e.copy=function(){return on(e,Q0()).constant(e.constant())},Lt.apply(e,arguments)}function Zc(){var e=$c(Ho());return e.copy=function(){return on(e,Zc()).exponent(e.exponent())},Lt.apply(e,arguments)}function kD(){return Zc.apply(null,arguments).exponent(.5)}function J0(){var e=[],t=Ce;function n(r){if(r!=null&&!isNaN(r=+r))return t((Pi(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Kt),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>hE(e,a/r))},n.copy=function(){return J0(t).domain(e)},Lt.apply(n,arguments)}function Ko(){var e=0,t=.5,n=1,r=1,i,a,o,s,l,u=Ce,c,f=!1,d;function h(m){return isNaN(m=+m)?d:(m=.5+((m=+c(m))-a)*(r*m<r*a?s:l),u(f?Math.max(0,Math.min(1,m)):m))}h.domain=function(m){return arguments.length?([e,t,n]=m,i=c(e=+e),a=c(t=+t),o=c(n=+n),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),r=a<i?-1:1,h):[e,t,n]},h.clamp=function(m){return arguments.length?(f=!!m,h):f},h.interpolator=function(m){return arguments.length?(u=m,h):u};function p(m){return function(g){var v,y,b;return arguments.length?([v,y,b]=g,u=zE(m,[v,y,b]),h):[u(0),u(.5),u(1)]}}return h.range=p(xr),h.rangeRound=p(jc),h.unknown=function(m){return arguments.length?(d=m,h):d},function(m){return c=m,i=m(e),a=m(t),o=m(n),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),r=a<i?-1:1,h}}function eb(){var e=an(Ko()(Ce));return e.copy=function(){return on(e,eb())},Lt.apply(e,arguments)}function tb(){var e=Bc(Ko()).domain([.1,1,10]);return e.copy=function(){return on(e,tb()).base(e.base())},Lt.apply(e,arguments)}function nb(){var e=zc(Ko());return e.copy=function(){return on(e,nb()).constant(e.constant())},Lt.apply(e,arguments)}function Qc(){var e=$c(Ko());return e.copy=function(){return on(e,Qc()).exponent(e.exponent())},Lt.apply(e,arguments)}function CD(){return Qc.apply(null,arguments).exponent(.5)}const Hr=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Dc,scaleDiverging:eb,scaleDivergingLog:tb,scaleDivergingPow:Qc,scaleDivergingSqrt:CD,scaleDivergingSymlog:nb,scaleIdentity:R0,scaleImplicit:Cu,scaleLinear:I0,scaleLog:L0,scaleOrdinal:Tc,scalePoint:mE,scalePow:Wc,scaleQuantile:B0,scaleQuantize:z0,scaleRadial:F0,scaleSequential:G0,scaleSequentialLog:Z0,scaleSequentialPow:Zc,scaleSequentialQuantile:J0,scaleSequentialSqrt:kD,scaleSequentialSymlog:Q0,scaleSqrt:uT,scaleSymlog:N0,scaleThreshold:$0,scaleTime:MD,scaleUtc:AD,tickFormat:D0},Symbol.toStringTag,{value:"Module"}));function ED(e){if(e in Hr)return Hr[e]();var t="scale".concat(rc(e));if(t in Hr)return Hr[t]()}function sm(e,t,n){if(typeof e=="function")return e.copy().domain(t).range(n);if(e!=null){var r=ED(e);if(r!=null)return r.domain(t).range(n),r}}function Jc(e,t,n,r){if(!(n==null||r==null))return typeof e.scale=="function"?sm(e.scale,n,r):sm(t,n,r)}function TD(e){return"scale".concat(rc(e))}function DD(e){return TD(e)in Hr}var rb=(e,t,n)=>{if(e!=null){var{scale:r,type:i}=e;if(r==="auto")return i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!t)?"point":i==="category"?"band":"linear";if(typeof r=="string")return DD(r)?r:"point"}};function ID(e,t){for(var n=0,r=e.length,i=e[0]<e[e.length-1];n<r;){var a=Math.floor((n+r)/2);(i?e[a]<t:e[a]>t)?n=a+1:r=a}return n}function ib(e,t){if(e){var n=t??e.domain(),r=n.map(a=>{var o;return(o=e(a))!==null&&o!==void 0?o:0}),i=e.range();if(!(n.length===0||i.length<2))return a=>{var o,s,l=ID(r,a);if(l<=0)return n[0];if(l>=n.length)return n[n.length-1];var u=(o=r[l-1])!==null&&o!==void 0?o:0,c=(s=r[l])!==null&&s!==void 0?s:0;return Math.abs(a-u)<=Math.abs(a-c)?n[l-1]:n[l]}}}function RD(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):ib(e,void 0)}function lm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function io(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lm(Object(n),!0).forEach(function(r){jD(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jD(e,t,n){return(t=LD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LD(e){var t=ND(e,"string");return typeof t=="symbol"?t:t+""}function ND(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Iu=[0,"auto"],FD={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},BD=(e,t)=>e.cartesianAxis.xAxis[t],sn=(e,t)=>{var n=BD(e,t);return n??FD},zD={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Iu,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:_i},$D=(e,t)=>e.cartesianAxis.yAxis[t],ln=(e,t)=>{var n=$D(e,t);return n??zD},WD={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},ef=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??WD},Te=(e,t,n)=>{switch(t){case"xAxis":return sn(e,n);case"yAxis":return ln(e,n);case"zAxis":return ef(e,n);case"angleAxis":return Pc(e,n);case"radiusAxis":return Mc(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},qD=(e,t,n)=>{switch(t){case"xAxis":return sn(e,n);case"yAxis":return ln(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Ci=(e,t,n)=>{switch(t){case"xAxis":return sn(e,n);case"yAxis":return ln(e,n);case"angleAxis":return Pc(e,n);case"radiusAxis":return Mc(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},ab=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function ob(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var UD=e=>e.graphicalItems.cartesianItems,VD=P([ye,Bo],ob),sb=(e,t,n)=>e.filter(n).filter(r=>t?.includeHidden===!0?!0:!r.hide),Ei=P([UD,Te,VD],sb,{memoizeOptions:{resultEqualityCheck:$o}}),lb=P([Ei],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(kc)),ub=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),HD=P([Ei],ub),cb=e=>e.map(t=>t.data).filter(Boolean).flat(1),KD=P([Ei],cb,{memoizeOptions:{resultEqualityCheck:$o}}),fb=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},tf=P([KD,r0],fb),db=(e,t,n)=>t?.dataKey!=null?e.map(r=>({value:ve(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(i=>({value:ve(i,r)}))):e.map(r=>({value:r})),Ti=P([tf,Te,Ei],db);function Jn(e){if(In(e)||e instanceof Date){var t=Number(e);if(Q(t))return t}}function um(e){if(Array.isArray(e)){var t=[Jn(e[0]),Jn(e[1])];return bt(t)?t:void 0}var n=Jn(e);if(n!=null)return[n,n]}function jt(e){return e.map(Jn).filter(ot)}function YD(e,t){var n=Jn(e),r=Jn(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}var XD=P([Ti],e=>e?.map(t=>t.value).sort(YD));function hb(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function GD(e,t,n){return!n||typeof t!="number"||gr(t)?[]:n.length?jt(n.flatMap(r=>{var i=ve(e,r.dataKey),a,o;if(Array.isArray(i)?[a,o]=i:a=o=i,!(!Q(a)||!Q(o)))return[t-a,t+o]})):[]}var pe=e=>{var t=be(e),n=br(e);return Ci(e,t,n)},Di=P([pe],e=>e?.dataKey),ZD=P([lb,r0,pe],S0),pb=(e,t,n,r)=>{var i={},a=t.reduce((o,s)=>{if(s.stackId==null)return o;var l=o[s.stackId];return l==null&&(l=[]),l.push(s),o[s.stackId]=l,o},i);return Object.fromEntries(Object.entries(a).map(o=>{var[s,l]=o,u=r?[...l].reverse():l,c=u.map(w0);return[s,{stackedData:zM(e,c,n),graphicalItems:u}]}))},QD=P([ZD,lb,Lo,g0],pb),gb=(e,t,n,r)=>{var{dataStartIndex:i,dataEndIndex:a}=t;if(r==null&&n!=="zAxis"){var o=qM(e,i,a);if(!(o!=null&&o[0]===0&&o[1]===0))return o}},JD=P([Te],e=>e.allowDataOverflow),nf=e=>{var t;if(e==null||!("domain"in e))return Iu;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var n=jt(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:Iu},mb=P([Te],nf),vb=P([mb,JD],i0),eI=P([QD,rn,ye,vb],gb,{memoizeOptions:{resultEqualityCheck:zo}}),rf=e=>e.errorBars,tI=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>hb(n,r)),ao=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.filter(Boolean);if(i.length!==0){var a=i.flat(),o=Math.min(...a),s=Math.max(...a);return[o,s]}},yb=(e,t,n,r,i)=>{var a,o;if(n.length>0&&e.forEach(s=>{n.forEach(l=>{var u,c,f=(u=r[l.id])===null||u===void 0?void 0:u.filter(v=>hb(i,v)),d=ve(s,(c=t.dataKey)!==null&&c!==void 0?c:l.dataKey),h=GD(s,d,f);if(h.length>=2){var p=Math.min(...h),m=Math.max(...h);(a==null||p<a)&&(a=p),(o==null||m>o)&&(o=m)}var g=um(d);g!=null&&(a=a==null?g[0]:Math.min(a,g[0]),o=o==null?g[1]:Math.max(o,g[1]))})}),t?.dataKey!=null&&e.forEach(s=>{var l=um(ve(s,t.dataKey));l!=null&&(a=a==null?l[0]:Math.min(a,l[0]),o=o==null?l[1]:Math.max(o,l[1]))}),Q(a)&&Q(o))return[a,o]},nI=P([tf,Te,HD,rf,ye],yb,{memoizeOptions:{resultEqualityCheck:zo}});function rI(e){var{value:t}=e;if(In(t)||t instanceof Date)return t}var iI=(e,t,n)=>{var r=e.map(rI).filter(i=>i!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&Hv(r))?n0(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},bb=e=>e.referenceElements.dots,_r=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),aI=P([bb,ye,Bo],_r),xb=e=>e.referenceElements.areas,oI=P([xb,ye,Bo],_r),_b=e=>e.referenceElements.lines,sI=P([_b,ye,Bo],_r),wb=(e,t)=>{if(e!=null){var n=jt(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},lI=P(aI,ye,wb),Sb=(e,t)=>{if(e!=null){var n=jt(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},uI=P([oI,ye],Sb);function cI(e){var t;if(e.x!=null)return jt([e.x]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.x);return n==null||n.length===0?[]:jt(n)}function fI(e){var t;if(e.y!=null)return jt([e.y]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.y);return n==null||n.length===0?[]:jt(n)}var Ob=(e,t)=>{if(e!=null){var n=e.flatMap(r=>t==="xAxis"?cI(r):fI(r));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},dI=P([sI,ye],Ob),hI=P(lI,dI,uI,(e,t,n)=>ao(e,n,t)),Pb=(e,t,n,r,i,a,o,s)=>{if(n!=null)return n;var l=o==="vertical"&&s==="xAxis"||o==="horizontal"&&s==="yAxis",u=l?ao(r,a,i):ao(a,i);return $C(t,u,e.allowDataOverflow)},pI=P([Te,mb,vb,eI,nI,hI,ue,ye],Pb,{memoizeOptions:{resultEqualityCheck:zo}}),gI=[0,1],Mb=(e,t,n,r,i,a,o)=>{if(!((e==null||n==null||n.length===0)&&o===void 0)){var{dataKey:s,type:l}=e,u=en(t,a);if(u&&s==null){var c;return n0(0,(c=n?.length)!==null&&c!==void 0?c:0)}return l==="category"?iI(r,e,u):i==="expand"?gI:o}},af=P([Te,ue,tf,Ti,Lo,ye,pI],Mb),wr=P([Te,ab,wc],rb),Ab=(e,t,n)=>{var{niceTicks:r}=t;if(r!=="none"){var i=nf(t),a=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((r==="snap125"||r==="adaptive")&&t!=null&&t.tickCount&&bt(e)){if(a)return bg(e,t.tickCount,t.allowDecimals,r);if(t.type==="number")return xg(e,t.tickCount,t.allowDecimals,r)}if(r==="auto"&&n==="linear"&&t!=null&&t.tickCount){if(a&&bt(e))return bg(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&bt(e))return xg(e,t.tickCount,t.allowDecimals,"adaptive")}}},of=P([af,Ci,wr],Ab),kb=(e,t,n,r)=>{if(r!=="angleAxis"&&e?.type==="number"&&bt(t)&&Array.isArray(n)&&n.length>0){var i,a,o=t[0],s=(i=n[0])!==null&&i!==void 0?i:0,l=t[1],u=(a=n[n.length-1])!==null&&a!==void 0?a:0;return[Math.min(o,s),Math.max(l,u)]}return t},mI=P([Te,af,of,ye],kb),vI=P(Ti,Te,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(jt(e.map(f=>f.value))).sort((f,d)=>f-d),i=r[0],a=r[r.length-1];if(i==null||a==null)return 1/0;var o=a-i;if(o===0)return 1/0;for(var s=0;s<r.length-1;s++){var l=r[s],u=r[s+1];if(!(l==null||u==null)){var c=u-l;n=Math.min(n,c)}}return n/o}}),Cb=P(vI,ue,HC,ke,(e,t,n,r,i)=>i,(e,t,n,r,i)=>{if(!Q(e))return 0;var a=t==="vertical"?r.height:r.width;if(i==="gap")return e*a/2;if(i==="no-gap"){var o=ar(n,e*a),s=e*a/2;return s-o-(s-o)/a*o}return 0}),yI=(e,t,n)=>{var r=sn(e,t);return r==null||typeof r.padding!="string"?0:Cb(e,"xAxis",t,n,r.padding)},bI=(e,t,n)=>{var r=ln(e,t);return r==null||typeof r.padding!="string"?0:Cb(e,"yAxis",t,n,r.padding)},xI=P(sn,yI,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((n=i.left)!==null&&n!==void 0?n:0)+t,right:((r=i.right)!==null&&r!==void 0?r:0)+t}}),_I=P(ln,bI,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((n=i.top)!==null&&n!==void 0?n:0)+t,bottom:((r=i.bottom)!==null&&r!==void 0?r:0)+t}}),wI=P([ke,xI,pc,To,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:a}=r;return i?[a.left,n.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),SI=P([ke,ue,_I,pc,To,(e,t,n)=>n],(e,t,n,r,i,a)=>{var{padding:o}=i;return a?[r.height-o.bottom,o.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),Ii=(e,t,n,r)=>{var i;switch(t){case"xAxis":return wI(e,n,r);case"yAxis":return SI(e,n,r);case"zAxis":return(i=ef(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return x0(e);case"radiusAxis":return _0(e,n);default:return}},Eb=P([Te,Ii],No),OI=P([wr,mI],tE),sf=P([Te,wr,OI,Eb],Jc),Tb=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:a}=n,o=en(e,r);if(o&&(i==="number"||a!=="auto"))return t.map(s=>s.value)}},lf=P([ue,Ti,Ci,ye],Tb),Yo=P([sf],Cc);P([sf],RD);P([sf,XD],ib);P([Ei,rf,ye],tI);function Db(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Xo=(e,t)=>t,Go=(e,t,n)=>n,PI=P(Co,Xo,Go,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(Db)),MI=P(Eo,Xo,Go,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(Db)),Ib=(e,t)=>({width:e.width,height:t.height}),AI=(e,t)=>{var n=typeof t.width=="number"?t.width:_i;return{width:n,height:e.height}};P(ke,sn,Ib);var kI=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},CI=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},EI=P(nn,ke,PI,Xo,Go,(e,t,n,r,i)=>{var a={},o;return n.forEach(s=>{var l=Ib(t,s);o==null&&(o=kI(t,r,e));var u=r==="top"&&!i||r==="bottom"&&i;a[s.id]=o-Number(u)*l.height,o+=(u?-1:1)*l.height}),a}),TI=P(tn,ke,MI,Xo,Go,(e,t,n,r,i)=>{var a={},o;return n.forEach(s=>{var l=AI(t,s);o==null&&(o=CI(t,r,e));var u=r==="left"&&!i||r==="right"&&i;a[s.id]=o-Number(u)*l.width,o+=(u?-1:1)*l.width}),a}),DI=(e,t)=>{var n=sn(e,t);if(n!=null)return EI(e,n.orientation,n.mirror)};P([ke,sn,DI,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}});var II=(e,t)=>{var n=ln(e,t);if(n!=null)return TI(e,n.orientation,n.mirror)};P([ke,ln,II,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}});P(ke,ln,(e,t)=>{var n=typeof t.width=="number"?t.width:_i;return{width:n,height:e.height}});var Rb=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:i,type:a,dataKey:o}=n,s=en(e,r),l=t.map(u=>u.value);if(o&&s&&a==="category"&&i&&Hv(l))return l}},uf=P([ue,Ti,Te,ye],Rb);P([ue,qD,wr,Yo,uf,lf,Ii,of,ye],(e,t,n,r,i,a,o,s,l)=>{if(t!=null){var u=en(e,l);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:l,categoricalDomain:a,duplicateDomain:i,isCategorical:u,niceTicks:s,range:o,realScaleType:n,scale:r}}});var RI=(e,t,n,r,i,a,o,s,l)=>{if(!(t==null||r==null)){var u=en(e,l),{type:c,ticks:f,tickCount:d}=t,h=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,p=c==="category"&&r.bandwidth?r.bandwidth()/h:0;p=l==="angleAxis"&&a!=null&&a.length>=2?At(a[0]-a[1])*2*p:p;var m=f||i;return m?m.map((g,v)=>{var y=o?o.indexOf(g):g,b=r.map(y);return Q(b)?{index:v,coordinate:b+p,value:g,offset:p}:null}).filter(ot):u&&s?s.map((g,v)=>{var y=r.map(g);return Q(y)?{coordinate:y+p,value:g,index:v,offset:p}:null}).filter(ot):r.ticks?r.ticks(d).map((g,v)=>{var y=r.map(g);return Q(y)?{coordinate:y+p,value:g,index:v,offset:p}:null}).filter(ot):r.domain().map((g,v)=>{var y=r.map(g);return Q(y)?{coordinate:y+p,value:o?o[g]:g,index:v,offset:p}:null}).filter(ot)}};P([ue,Ci,wr,Yo,of,Ii,uf,lf,ye],RI);var jI=(e,t,n,r,i,a,o)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var s=en(e,o),{tickCount:l}=t,u=0;return u=o==="angleAxis"&&r?.length>=2?At(r[0]-r[1])*2*u:u,s&&a?a.map((c,f)=>{var d=n.map(c);return Q(d)?{coordinate:d+u,value:c,index:f,offset:u}:null}).filter(ot):n.ticks?n.ticks(l).map((c,f)=>{var d=n.map(c);return Q(d)?{coordinate:d+u,value:c,index:f,offset:u}:null}).filter(ot):n.domain().map((c,f)=>{var d=n.map(c);return Q(d)?{coordinate:d+u,value:i?i[c]:c,index:f,offset:u}:null}).filter(ot)}};P([ue,Ci,Yo,Ii,uf,lf,ye],jI);P(Te,Yo,(e,t)=>{if(!(e==null||t==null))return io(io({},e),{},{scale:t})});var LI=P([Te,wr,af,Eb],Jc),NI=P([LI],Cc);P((e,t,n)=>ef(e,n),NI,(e,t)=>{if(!(e==null||t==null))return io(io({},e),{},{scale:t})});var FI=P([ue,Co,Eo],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),BI=(e,t,n)=>{var r;return(r=e.renderedTicks[t])===null||r===void 0?void 0:r[n]};P([BI],e=>{if(!(!e||e.length===0))return t=>{var n,r=1/0,i=e[0];for(var a of e){var o=Math.abs(a.coordinate-t);o<r&&(r=o,i=a)}return(n=i)===null||n===void 0?void 0:n.value}});var jb=e=>e.options.defaultTooltipEventType,Lb=e=>e.options.validateTooltipEventTypes;function Nb(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function cf(e,t){var n=jb(e),r=Lb(e);return Nb(t,n,r)}function zI(e){return U(t=>cf(t,e))}var Fb=(e,t)=>{var n,r=Number(t);if(!(gr(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},$I=e=>e.tooltip.settings,$t={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},WI={itemInteraction:{click:$t,hover:$t},axisInteraction:{click:$t,hover:$t},keyboardInteraction:$t,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},Bb=Ae({name:"tooltip",initialState:WI,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:ee()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,i=Ze(e).tooltipItemPayloads.indexOf(n);i>-1&&(e.tooltipItemPayloads[i]=r)},prepare:ee()},removeTooltipEntrySettings:{reducer(e,t){var n=Ze(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:ee()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:qI,replaceTooltipEntrySettings:UI,removeTooltipEntrySettings:VI,setTooltipSettingsState:HI,setActiveMouseOverItemIndex:ff,mouseLeaveItem:zb,mouseLeaveChart:$b,setActiveClickItemIndex:Wb,setMouseOverAxisIndex:qb,setMouseClickAxisIndex:KI,setSyncInteraction:Ru,setKeyboardInteraction:oo}=Bb.actions,YI=Bb.reducer;function cm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ua(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cm(Object(n),!0).forEach(function(r){XI(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XI(e,t,n){return(t=GI(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GI(e){var t=ZI(e,"string");return typeof t=="symbol"?t:t+""}function ZI(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QI(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function JI(e){return e.index!=null}var Ub=(e,t,n,r)=>{if(t==null)return $t;var i=QI(e,t,n);if(i==null)return $t;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var a=e.settings.active===!0;if(JI(i)){if(a)return ua(ua({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return ua(ua({},$t),{},{coordinate:i.coordinate})};function e2(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function t2(e,t){var n=e2(e),r=t[0],i=t[1];if(n===void 0)return!1;var a=Math.min(r,i),o=Math.max(r,i);return n>=a&&n<=o}function n2(e,t,n){if(n==null||t==null)return!0;var r=ve(e,t);return r==null||!bt(n)?!0:t2(r,n)}var df=(e,t,n,r)=>{var i=e?.index;if(i==null)return null;var a=Number(i);if(!Q(a))return i;var o=0,s=1/0;t.length>0&&(s=t.length-1);var l=Math.max(o,Math.min(a,s)),u=t[l];return u==null||n2(u,n,r)?String(l):null},Vb=(e,t,n,r,i,a,o)=>{if(a!=null){var s=o[0],l=s?.getPosition(a);if(l!=null)return l;var u=i?.[Number(a)];if(u)return n==="horizontal"?{x:u.coordinate,y:(r.top+t)/2}:{x:(r.left+e)/2,y:u.coordinate}}},Hb=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(n==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&r!=null){var a=e.tooltipItemPayloads[0];return a!=null?[a]:[]}return e.tooltipItemPayloads.filter(o=>{var s;return((s=o.settings)===null||s===void 0?void 0:s.graphicalItemId)===i})},Kb=e=>e.options.tooltipPayloadSearcher,Sr=e=>e.tooltip;function fm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function dm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fm(Object(n),!0).forEach(function(r){r2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function r2(e,t,n){return(t=i2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i2(e){var t=a2(e,"string");return typeof t=="symbol"?t:t+""}function a2(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function o2(e){if(typeof e=="string"||typeof e=="number")return e}function s2(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function l2(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function hm(e){if(typeof e=="string")return e}function u2(e){if(!(e==null||typeof e!="object")){var t="name"in e?o2(e.name):void 0,n="unit"in e?s2(e.unit):void 0,r="dataKey"in e?l2(e.dataKey):void 0,i="payload"in e?e.payload:void 0,a="color"in e?hm(e.color):void 0,o="fill"in e?hm(e.fill):void 0;return{name:t,unit:n,dataKey:r,payload:i,color:a,fill:o}}}function c2(e,t){return e??t}var Yb=(e,t,n,r,i,a,o)=>{if(!(t==null||a==null)){var{chartData:s,computedData:l,dataStartIndex:u,dataEndIndex:c}=n,f=[];return e.reduce((d,h)=>{var p,{dataDefinedOnItem:m,settings:g}=h,v=c2(m,s),y=Array.isArray(v)?jy(v,u,c):v,b=(p=g?.dataKey)!==null&&p!==void 0?p:r,_=g?.nameKey,x;if(r&&Array.isArray(y)&&!Array.isArray(y[0])&&o==="axis"?x=RO(y,r,i):x=a(y,t,l,_),Array.isArray(x))x.forEach(O=>{var M,k,E=u2(O),T=E?.name,A=E?.dataKey,F=E?.payload,L=dm(dm({},g),{},{name:T,unit:E?.unit,color:(M=E?.color)!==null&&M!==void 0?M:g?.color,fill:(k=E?.fill)!==null&&k!==void 0?k:g?.fill});d.push(lp({tooltipEntrySettings:L,dataKey:A,payload:F,value:ve(F,A),name:T==null?void 0:String(T)}))});else{var S;d.push(lp({tooltipEntrySettings:g,dataKey:b,payload:x,value:ve(x,b),name:(S=ve(x,_))!==null&&S!==void 0?S:g?.name}))}return d},f)}},hf=P([pe,ab,wc],rb),f2=P([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),d2=P([be,br],ob),Or=P([f2,pe,d2],sb,{memoizeOptions:{resultEqualityCheck:$o}}),h2=P([Or],e=>e.filter(kc)),p2=P([Or],cb,{memoizeOptions:{resultEqualityCheck:$o}}),Pr=P([p2,rn],fb),g2=P([h2,rn,pe],S0),pf=P([Pr,pe,Or],db),Xb=P([pe],nf),m2=P([pe],e=>e.allowDataOverflow),Gb=P([Xb,m2],i0),v2=P([Or],e=>e.filter(kc)),y2=P([g2,v2,Lo,g0],pb),b2=P([y2,rn,be,Gb],gb),x2=P([Or],ub),_2=P([Pr,pe,x2,rf,be],yb,{memoizeOptions:{resultEqualityCheck:zo}}),w2=P([bb,be,br],_r),S2=P([w2,be],wb),O2=P([xb,be,br],_r),P2=P([O2,be],Sb),M2=P([_b,be,br],_r),A2=P([M2,be],Ob),k2=P([S2,A2,P2],ao),C2=P([pe,Xb,Gb,b2,_2,k2,ue,be],Pb),Ri=P([pe,ue,Pr,pf,Lo,be,C2],Mb),E2=P([Ri,pe,hf],Ab),T2=P([pe,Ri,E2,be],kb),Zb=e=>{var t=be(e),n=br(e),r=!1;return Ii(e,t,n,r)},Qb=P([pe,Zb],No),D2=P([pe,hf,T2,Qb],Jc),Jb=P([D2],Cc),I2=P([ue,pf,pe,be],Rb),R2=P([ue,pf,pe,be],Tb),j2=(e,t,n,r,i,a,o,s)=>{if(t){var{type:l}=t,u=en(e,s);if(r){var c=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,f=l==="category"&&r.bandwidth?r.bandwidth()/c:0;return f=s==="angleAxis"&&i!=null&&i?.length>=2?At(i[0]-i[1])*2*f:f,u&&o?o.map((d,h)=>{var p=r.map(d);return Q(p)?{coordinate:p+f,value:d,index:h,offset:f}:null}).filter(ot):r.domain().map((d,h)=>{var p=r.map(d);return Q(p)?{coordinate:p+f,value:a?a[d]:d,index:h,offset:f}:null}).filter(ot)}}},Nt=P([ue,pe,hf,Jb,Zb,I2,R2,be],j2),gf=P([jb,Lb,$I],(e,t,n)=>Nb(n.shared,e,t)),ex=e=>e.tooltip.settings.trigger,mf=e=>e.tooltip.settings.defaultIndex,ji=P([Sr,gf,ex,mf],Ub),so=P([ji,Pr,Di,Ri],df),tx=P([Nt,so],Fb),L2=P([ji],e=>{if(e)return e.dataKey}),N2=P([ji],e=>{if(e)return e.graphicalItemId}),nx=P([Sr,gf,ex,mf],Hb),F2=P([tn,nn,ue,ke,Nt,mf,nx],Vb),B2=P([ji,F2],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),z2=P([ji],e=>{var t;return(t=e?.active)!==null&&t!==void 0?t:!1}),$2=P([nx,so,rn,Di,tx,Kb,gf],Yb);P([$2],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function pm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pm(Object(n),!0).forEach(function(r){W2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function W2(e,t,n){return(t=q2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q2(e){var t=U2(e,"string");return typeof t=="symbol"?t:t+""}function U2(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var V2=()=>U(pe),H2=()=>{var e=V2(),t=U(Nt),n=U(Jb);return sp(!e||!n?void 0:gm(gm({},e),{},{scale:n}),t)};function mm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mm(Object(n),!0).forEach(function(r){K2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function K2(e,t,n){return(t=Y2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y2(e){var t=X2(e,"string");return typeof t=="symbol"?t:t+""}function X2(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var G2=(e,t,n,r)=>{var i=t.find(a=>a&&a.index===n);if(i){if(e==="horizontal")return{x:i.coordinate,y:r.relativeY};if(e==="vertical")return{x:r.relativeX,y:i.coordinate}}return{x:0,y:0}},Z2=(e,t,n,r)=>{var i=t.find(u=>u&&u.index===n);if(i){if(e==="centric"){var a=i.coordinate,{radius:o}=r;return Vn(Vn(Vn({},r),Ve(r.cx,r.cy,o,a)),{},{angle:a,radius:o})}var s=i.coordinate,{angle:l}=r;return Vn(Vn(Vn({},r),Ve(r.cx,r.cy,s,l)),{},{angle:l,radius:s})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function Q2(e,t){var{relativeX:n,relativeY:r}=e;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}var rx=(e,t,n,r,i)=>{var a,o=(a=t?.length)!==null&&a!==void 0?a:0;if(o<=1||e==null)return 0;if(r==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var s=0;s<o;s++){var l,u,c,f,d,h=s>0?(l=n[s-1])===null||l===void 0?void 0:l.coordinate:(u=n[o-1])===null||u===void 0?void 0:u.coordinate,p=(c=n[s])===null||c===void 0?void 0:c.coordinate,m=s>=o-1?(f=n[0])===null||f===void 0?void 0:f.coordinate:(d=n[s+1])===null||d===void 0?void 0:d.coordinate,g=void 0;if(!(h==null||p==null||m==null))if(At(p-h)!==At(m-p)){var v=[];if(At(m-p)===At(i[1]-i[0])){g=m;var y=p+i[1]-i[0];v[0]=Math.min(y,(y+h)/2),v[1]=Math.max(y,(y+h)/2)}else{g=h;var b=m+i[1]-i[0];v[0]=Math.min(p,(b+p)/2),v[1]=Math.max(p,(b+p)/2)}var _=[Math.min(p,(g+p)/2),Math.max(p,(g+p)/2)];if(e>_[0]&&e<=_[1]||e>=v[0]&&e<=v[1]){var x;return(x=n[s])===null||x===void 0?void 0:x.index}}else{var S=Math.min(h,m),O=Math.max(h,m);if(e>(S+p)/2&&e<=(O+p)/2){var M;return(M=n[s])===null||M===void 0?void 0:M.index}}}else if(t)for(var k=0;k<o;k++){var E=t[k];if(E!=null){var T=t[k+1],A=t[k-1];if(k===0&&T!=null&&e<=(E.coordinate+T.coordinate)/2||k===o-1&&A!=null&&e>(E.coordinate+A.coordinate)/2||k>0&&k<o-1&&A!=null&&T!=null&&e>(E.coordinate+A.coordinate)/2&&e<=(E.coordinate+T.coordinate)/2)return E.index}}return-1},J2=()=>U(wc),vf=(e,t)=>t,ix=(e,t,n)=>n,yf=(e,t,n,r)=>r,eR=P(Nt,e=>bo(e,t=>t.coordinate)),bf=P([Sr,vf,ix,yf],Ub),xf=P([bf,Pr,Di,Ri],df),tR=(e,t,n)=>{if(t!=null){var r=Sr(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},ax=P([Sr,vf,ix,yf],Hb),lo=P([tn,nn,ue,ke,Nt,yf,ax],Vb),nR=P([bf,lo],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),ox=P([Nt,xf],Fb),rR=P([ax,xf,rn,Di,ox,Kb,vf],Yb),iR=P([bf,xf],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),aR=(e,t,n,r,i,a,o)=>{if(!(!e||!n||!r||!i)&&Q2(e,o)){var s=UM(e,t),l=rx(s,a,i,n,r),u=G2(t,i,l,e);return{activeIndex:String(l),activeCoordinate:u}}},oR=(e,t,n,r,i,a,o)=>{if(!(!e||!r||!i||!a||!n)){var s=CC(e,n);if(s){var l=VM(s,t),u=rx(l,o,a,r,i),c=Z2(t,a,u,s);return{activeIndex:String(u),activeCoordinate:c}}}},sR=(e,t,n,r,i,a,o,s)=>{if(!(!e||!t||!r||!i||!a))return t==="horizontal"||t==="vertical"?aR(e,t,r,i,a,o,s):oR(e,t,n,r,i,a,o)},lR=P(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElement:r.element}});P(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(r=>parseInt(r,10)).concat(Object.values(On)),n=Array.from(new Set(t));return n.sort((r,i)=>r-i)},{memoizeOptions:{resultEqualityCheck:eE}});function vm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ym(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vm(Object(n),!0).forEach(function(r){uR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uR(e,t,n){return(t=cR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cR(e){var t=fR(e,"string");return typeof t=="symbol"?t:t+""}function fR(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dR={},hR={zIndexMap:Object.values(On).reduce((e,t)=>ym(ym({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),dR)},pR=new Set(Object.values(On));function gR(e){return pR.has(e)}var sx=Ae({name:"zIndex",initialState:hR,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:ee()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!gR(n)&&delete e.zIndexMap[n])},prepare:ee()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n,element:r,isPanorama:i}=t.payload;e.zIndexMap[n]?i?e.zIndexMap[n].panoramaElement=r:e.zIndexMap[n].element=r:e.zIndexMap[n]={consumers:0,element:i?void 0:r,panoramaElement:i?r:void 0}},prepare:ee()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:ee()}}}),{registerZIndexPortal:mR,unregisterZIndexPortal:vR,registerZIndexPortalElement:cN,unregisterZIndexPortalElement:fN}=sx.actions,yR=sx.reducer;function bR(e){var{zIndex:t,children:n}=e,r=MA(),i=r&&t!==void 0&&t!==0,a=wi(),o=Fe();w.useLayoutEffect(()=>i?(o(mR({zIndex:t})),()=>{o(vR({zIndex:t}))}):mr,[o,t,i]);var s=U(l=>lR(l,t,a));return i?s?Fm.createPortal(n,s):null:n}function ju(){return ju=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ju.apply(null,arguments)}function bm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ca(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bm(Object(n),!0).forEach(function(r){xR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xR(e,t,n){return(t=_R(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _R(e){var t=wR(e,"string");return typeof t=="symbol"?t:t+""}function wR(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function SR(e){var{cursor:t,cursorComp:n,cursorProps:r}=e;return w.isValidElement(t)?w.cloneElement(t,r):w.createElement(n,r)}function OR(e){var t,{coordinate:n,payload:r,index:i,offset:a,tooltipAxisBandSize:o,layout:s,cursor:l,tooltipEventType:u,chartName:c}=e,f=n,d=r,h=i;if(!l||!f||c!=="ScatterChart"&&u!=="axis")return null;var p,m,g;if(c==="ScatterChart")p=f,m=zk,g=On.cursorLine;else if(c==="BarChart")p=$k(s,f,a,o),m=Jy,g=On.cursorRectangle;else if(s==="radial"&&Kv(f)){var{cx:v,cy:y,radius:b,startAngle:_,endAngle:x}=e0(f);p={cx:v,cy:y,startAngle:_,endAngle:x,innerRadius:b,outerRadius:b},m=IC,g=On.cursorLine}else p={points:RC(s,f,a)},m=Tk,g=On.cursorLine;var S=typeof l=="object"&&"className"in l?l.className:void 0,O=ca(ca(ca(ca({stroke:"#ccc",pointerEvents:"none"},a),p),Zu(l)),{},{payload:d,payloadIndex:h,className:Je("recharts-tooltip-cursor",S)});return w.createElement(bR,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:g},w.createElement(SR,{cursor:l,cursorComp:m,cursorProps:O}))}function PR(e){var t=H2(),n=SA(),r=Do(),i=J2();return t==null||n==null||r==null||i==null?null:w.createElement(OR,ju({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var _f=w.createContext(null),MR=()=>w.useContext(_f),Tl={exports:{}},xm;function AR(){return xm||(xm=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,u,c){this.fn=l,this.context=u,this.once=c||!1}function a(l,u,c,f,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var h=new i(c,f||l,d),p=n?n+u:u;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],h]:l._events[p].push(h):(l._events[p]=h,l._eventsCount++),l}function o(l,u){--l._eventsCount===0?l._events=new r:delete l._events[u]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],c,f;if(this._eventsCount===0)return u;for(f in c=this._events)t.call(c,f)&&u.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},s.prototype.listeners=function(u){var c=n?n+u:u,f=this._events[c];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,p=new Array(h);d<h;d++)p[d]=f[d].fn;return p},s.prototype.listenerCount=function(u){var c=n?n+u:u,f=this._events[c];return f?f.fn?1:f.length:0},s.prototype.emit=function(u,c,f,d,h,p){var m=n?n+u:u;if(!this._events[m])return!1;var g=this._events[m],v=arguments.length,y,b;if(g.fn){switch(g.once&&this.removeListener(u,g.fn,void 0,!0),v){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,c),!0;case 3:return g.fn.call(g.context,c,f),!0;case 4:return g.fn.call(g.context,c,f,d),!0;case 5:return g.fn.call(g.context,c,f,d,h),!0;case 6:return g.fn.call(g.context,c,f,d,h,p),!0}for(b=1,y=new Array(v-1);b<v;b++)y[b-1]=arguments[b];g.fn.apply(g.context,y)}else{var _=g.length,x;for(b=0;b<_;b++)switch(g[b].once&&this.removeListener(u,g[b].fn,void 0,!0),v){case 1:g[b].fn.call(g[b].context);break;case 2:g[b].fn.call(g[b].context,c);break;case 3:g[b].fn.call(g[b].context,c,f);break;case 4:g[b].fn.call(g[b].context,c,f,d);break;default:if(!y)for(x=1,y=new Array(v-1);x<v;x++)y[x-1]=arguments[x];g[b].fn.apply(g[b].context,y)}}return!0},s.prototype.on=function(u,c,f){return a(this,u,c,f,!1)},s.prototype.once=function(u,c,f){return a(this,u,c,f,!0)},s.prototype.removeListener=function(u,c,f,d){var h=n?n+u:u;if(!this._events[h])return this;if(!c)return o(this,h),this;var p=this._events[h];if(p.fn)p.fn===c&&(!d||p.once)&&(!f||p.context===f)&&o(this,h);else{for(var m=0,g=[],v=p.length;m<v;m++)(p[m].fn!==c||d&&!p[m].once||f&&p[m].context!==f)&&g.push(p[m]);g.length?this._events[h]=g.length===1?g[0]:g:o(this,h)}return this},s.prototype.removeAllListeners=function(u){var c;return u?(c=n?n+u:u,this._events[c]&&o(this,c)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(Tl)),Tl.exports}var kR=AR();const CR=Jt(kR);var gi=new CR,Lu="recharts.syncEvent.tooltip",_m="recharts.syncEvent.brush",ER={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},lx=Ae({name:"options",initialState:ER,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),TR=lx.reducer,{createEventEmitter:DR}=lx.actions;function IR(e){return e.tooltip.syncInteraction}var RR={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},ux=Ae({name:"chartData",initialState:RR,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:jR,setDataStartEndIndexes:LR,setComputedData:NR}=ux.actions,FR=ux.reducer,BR=["x","y"];function wm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Hn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wm(Object(n),!0).forEach(function(r){zR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zR(e,t,n){return(t=$R(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $R(e){var t=WR(e,"string");return typeof t=="symbol"?t:t+""}function WR(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qR(e,t){if(e==null)return{};var n,r,i=UR(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function UR(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function VR(){var e=U(Sc),t=U(Oc),n=Fe(),r=U(m0),i=U(Nt),a=Do(),o=mc(),s=U(l=>l.rootProps.className);w.useEffect(()=>{if(e==null)return mr;var l=(u,c,f)=>{if(t!==f&&e===u){if(r==="index"){var d;if(o&&c!==null&&c!==void 0&&(d=c.payload)!==null&&d!==void 0&&d.coordinate&&c.payload.sourceViewBox){var h=c.payload.coordinate,{x:p,y:m}=h,g=qR(h,BR),{x:v,y,width:b,height:_}=c.payload.sourceViewBox,x=Hn(Hn({},g),{},{x:o.x+(b?(p-v)/b:0)*o.width,y:o.y+(_?(m-y)/_:0)*o.height});n(Hn(Hn({},c),{},{payload:Hn(Hn({},c.payload),{},{coordinate:x})}))}else n(c);return}if(i!=null){var S;if(typeof r=="function"){var O={activeTooltipIndex:c.payload.index==null?void 0:Number(c.payload.index),isTooltipActive:c.payload.active,activeIndex:c.payload.index==null?void 0:Number(c.payload.index),activeLabel:c.payload.label,activeDataKey:c.payload.dataKey,activeCoordinate:c.payload.coordinate},M=r(i,O);S=i[M]}else r==="value"&&(S=i.find(N=>String(N.value)===c.payload.label));var{coordinate:k}=c.payload;if(S==null||c.payload.active===!1||k==null||o==null){n(Ru({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:E,y:T}=k,A=Math.min(E,o.x+o.width),F=Math.min(T,o.y+o.height),L={x:a==="horizontal"?S.coordinate:A,y:a==="horizontal"?F:S.coordinate},I=Ru({active:c.payload.active,coordinate:L,dataKey:c.payload.dataKey,index:String(S.index),label:c.payload.label,sourceViewBox:c.payload.sourceViewBox,graphicalItemId:c.payload.graphicalItemId});n(I)}}};return gi.on(Lu,l),()=>{gi.off(Lu,l)}},[s,n,t,e,r,i,a,o])}function HR(){var e=U(Sc),t=U(Oc),n=Fe();w.useEffect(()=>{if(e==null)return mr;var r=(i,a,o)=>{t!==o&&e===i&&n(LR(a))};return gi.on(_m,r),()=>{gi.off(_m,r)}},[n,t,e])}function KR(){var e=Fe();w.useEffect(()=>{e(DR())},[e]),VR(),HR()}function YR(e,t,n,r,i,a){var o=U(p=>tR(p,e,t)),s=U(N2),l=U(Oc),u=U(Sc),c=U(m0),f=U(IR),d=f?.active,h=mc();w.useEffect(()=>{if(!d&&u!=null&&l!=null){var p=Ru({active:a,coordinate:n,dataKey:o,index:i,label:typeof r=="number"?String(r):r,sourceViewBox:h,graphicalItemId:s});gi.emit(Lu,u,p,l)}},[d,n,o,s,i,r,l,u,c,a,h])}function Sm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Om(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Sm(Object(n),!0).forEach(function(r){XR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XR(e,t,n){return(t=GR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GR(e){var t=ZR(e,"string");return typeof t=="symbol"?t:t+""}function ZR(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QR(e){return e.dataKey}function JR(e,t){return w.isValidElement(e)?w.cloneElement(e,t):typeof e=="function"?w.createElement(e,t):w.createElement(hk,t)}var Pm=[],ej={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function dN(e){var t,n,r=yi(e,ej),{active:i,allowEscapeViewBox:a,animationDuration:o,animationEasing:s,content:l,filterNull:u,isAnimationActive:c,offset:f,payloadUniqBy:d,position:h,reverseDirection:p,useTranslate3d:m,wrapperStyle:g,cursor:v,shared:y,trigger:b,defaultIndex:_,portal:x,axisId:S}=r,O=Fe(),M=typeof _=="number"?String(_):_;w.useEffect(()=>{O(HI({shared:y,trigger:b,axisId:S,active:i,defaultIndex:M}))},[O,y,b,S,i,M]);var k=mc(),E=Pk(),T=zI(y),{activeIndex:A,isActive:F}=(t=U(De=>iR(De,T,b,M)))!==null&&t!==void 0?t:{},L=U(De=>rR(De,T,b,M)),I=U(De=>ox(De,T,b,M)),N=U(De=>nR(De,T,b,M)),B=L,oe=MR(),J=(n=i??F)!==null&&n!==void 0?n:!1,[H,Me]=IP([B,J]),se=T==="axis"?I:void 0;YR(T,b,N,se,A,J);var _e=x??oe;if(_e==null||k==null||T==null)return null;var re=B??Pm;J||(re=Pm),u&&re.length&&(re=aP(re.filter(De=>De.value!=null&&(De.hide!==!0||r.includeHidden)),d,QR));var we=re.length>0,Se=Om(Om({},r),{},{payload:re,label:se,active:J,activeIndex:A,coordinate:N,accessibilityLayer:E}),Mr=w.createElement(Ok,{allowEscapeViewBox:a,animationDuration:o,animationEasing:s,isAnimationActive:c,active:J,coordinate:N,hasPayload:we,offset:f,position:h,reverseDirection:p,useTranslate3d:m,viewBox:k,wrapperStyle:g,lastBoundingBox:H,innerRef:Me,hasPortalFromProps:!!x},JR(l,Se));return w.createElement(w.Fragment,null,Fm.createPortal(Mr,_e),J&&w.createElement(PR,{cursor:v,tooltipEventType:T,coordinate:N,payload:re,index:A}))}var Dl={},Il={},Mm;function tj(){return Mm||(Mm=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){if(n.length===0)return;let i=n[0],a=r(i,0,n);for(let o=1;o<n.length;o++){const s=n[o],l=r(s,o,n);l>a&&(a=l,i=s)}return i}e.maxBy=t})(Il)),Il}var Am;function nj(){return Am||(Am=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tj(),n=ic(),r=oc();function i(a,o){if(a!=null)return t.maxBy(Array.from(a),r.iteratee(o??n.identity))}e.maxBy=i})(Dl)),Dl}var Rl,km;function rj(){return km||(km=1,Rl=nj().maxBy),Rl}var ij=rj();const aj=Jt(ij);var oj={radiusAxis:{},angleAxis:{}},cx=Ae({name:"polarAxis",initialState:oj,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:hN,removeRadiusAxis:pN,addAngleAxis:gN,removeAngleAxis:mN}=cx.actions,sj=cx.reducer;function lj(e){var{tooltipEntrySettings:t}=e,n=Fe(),r=wi(),i=w.useRef(null);return w.useLayoutEffect(()=>{r||(i.current===null?n(qI(t)):i.current!==t&&n(UI({prev:i.current,next:t})),i.current=t)},[t,n,r]),w.useLayoutEffect(()=>()=>{i.current&&(n(VI(i.current)),i.current=null)},[n]),null}var jl,uj=()=>{var[e]=w.useState(()=>ru("uid-"));return e},cj=(jl=Ix.useId)!==null&&jl!==void 0?jl:uj;function fj(e,t){var n=cj();return t||(e?"".concat(e,"-").concat(n):n)}var dj=w.createContext(void 0),hj=e=>{var{id:t,type:n,children:r}=e,i=fj("recharts-".concat(n),t);return w.createElement(dj.Provider,{value:i},r(i))},pj={cartesianItems:[],polarItems:[]},fx=Ae({name:"graphicalItems",initialState:pj,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:ee()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,i=Ze(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=r)},prepare:ee()},removeCartesianGraphicalItem:{reducer(e,t){var n=Ze(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:ee()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:ee()},removePolarGraphicalItem:{reducer(e,t){var n=Ze(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:ee()},replacePolarGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,i=Ze(e).polarItems.indexOf(n);i>-1&&(e.polarItems[i]=r)},prepare:ee()}}}),{addCartesianGraphicalItem:vN,replaceCartesianGraphicalItem:yN,removeCartesianGraphicalItem:bN,addPolarGraphicalItem:xN,removePolarGraphicalItem:_N,replacePolarGraphicalItem:wN}=fx.actions,gj=fx.reducer;function Cm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Em(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cm(Object(n),!0).forEach(function(r){mj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mj(e,t,n){return(t=vj(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vj(e){var t=yj(e,"string");return typeof t=="symbol"?t:t+""}function yj(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bj={xAxis:{},yAxis:{},zAxis:{}},dx=Ae({name:"cartesianAxis",initialState:bj,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:ee()},replaceXAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.xAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.xAxis[n.id],e.xAxis[r.id]=r)},prepare:ee()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:ee()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:ee()},replaceYAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.yAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.yAxis[n.id],e.yAxis[r.id]=r)},prepare:ee()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:ee()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:ee()},replaceZAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.zAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.zAxis[n.id],e.zAxis[r.id]=r)},prepare:ee()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:ee()},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload,i=e.yAxis[n];if(i){var a,o=i.widthHistory||[];if(o.length===3&&o[0]===o[2]&&r===o[1]&&r!==i.width&&Math.abs(r-((a=o[0])!==null&&a!==void 0?a:0))<=1)return;var s=[...o,r].slice(-3);e.yAxis[n]=Em(Em({},i),{},{width:r,widthHistory:s})}}}}),{addXAxis:SN,replaceXAxis:ON,removeXAxis:PN,addYAxis:MN,replaceYAxis:AN,removeYAxis:kN,addZAxis:CN,replaceZAxis:EN,removeZAxis:TN,updateYAxisWidth:DN}=dx.actions,xj=dx.reducer,_j=e=>{var{computedData:t}=e,n=Fe();return w.useEffect(()=>(n(NR(t)),()=>{n(jR(void 0))}),[t,n]),null},Tm={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},hx=Ae({name:"brush",initialState:Tm,reducers:{setBrushSettings(e,t){return t.payload==null?Tm:t.payload}}}),{setBrushSettings:IN}=hx.actions,wj=hx.reducer,Sj={dots:[],areas:[],lines:[]},px=Ae({name:"referenceElements",initialState:Sj,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=Ze(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=Ze(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=Ze(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:RN,removeDot:jN,addArea:LN,removeArea:NN,addLine:FN,removeLine:BN}=px.actions,Oj=px.reducer,Pj={xAxis:{},yAxis:{}},gx=Ae({name:"renderedTicks",initialState:Pj,reducers:{setRenderedTicks:(e,t)=>{var{axisType:n,axisId:r,ticks:i}=t.payload;e[n][r]=i},removeRenderedTicks:(e,t)=>{var{axisType:n,axisId:r}=t.payload;delete e[n][r]}}}),{setRenderedTicks:zN,removeRenderedTicks:$N}=gx.actions,Mj=gx.reducer,Aj={},mx=Ae({name:"errorBars",initialState:Aj,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:i}=t.payload;e[n]&&(e[n]=e[n].map(a=>a.dataKey===r.dataKey&&a.direction===r.direction?i:a))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(i=>i.dataKey!==r.dataKey||i.direction!==r.direction))}}}),{addErrorBar:WN,replaceErrorBar:qN,removeErrorBar:UN}=mx.actions,kj=mx.reducer,Cj=(e,t)=>t,wf=P([Cj,ue,JC,be,Qb,Nt,eR,ke],sR);function Ej(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function Sf(e){var t=e.currentTarget.getBoundingClientRect(),n,r;if(Ej(e)){var i=e.currentTarget.getBBox();n=i.width>0?t.width/i.width:1,r=i.height>0?t.height/i.height:1}else{var a=e.currentTarget;n=a.offsetWidth>0?t.width/a.offsetWidth:1,r=a.offsetHeight>0?t.height/a.offsetHeight:1}var o=(s,l)=>({relativeX:Math.round((s-t.left)/n),relativeY:Math.round((l-t.top)/r)});return"touches"in e?Array.from(e.touches).map(s=>o(s.clientX,s.clientY)):o(e.clientX,e.clientY)}var vx=Ke("mouseClick"),yx=xi();yx.startListening({actionCreator:vx,effect:(e,t)=>{var n=e.payload,r=wf(t.getState(),Sf(n));r?.activeIndex!=null&&t.dispatch(KI({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var Nu=Ke("mouseMove"),bx=xi(),Kn=null,pn=null,Ll=null;bx.startListening({actionCreator:Nu,effect:(e,t)=>{var n=e.payload,r=t.getState(),{throttleDelay:i,throttledEvents:a}=r.eventSettings,o=a==="all"||a?.includes("mousemove");Kn!==null&&(cancelAnimationFrame(Kn),Kn=null),pn!==null&&(typeof i!="number"||!o)&&(clearTimeout(pn),pn=null),Ll=Sf(n);var s=()=>{var l=t.getState(),u=cf(l,l.tooltip.settings.shared);if(!Ll){Kn=null,pn=null;return}if(u==="axis"){var c=wf(l,Ll);c?.activeIndex!=null?t.dispatch(qb({activeIndex:c.activeIndex,activeDataKey:void 0,activeCoordinate:c.activeCoordinate})):t.dispatch($b())}Kn=null,pn=null};if(!o){s();return}i==="raf"?Kn=requestAnimationFrame(s):typeof i=="number"&&pn===null&&(pn=setTimeout(s,i))}});function Tj(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var Dm={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},xx=Ae({name:"rootProps",initialState:Dm,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:Dm.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),Dj=xx.reducer,{updateOptions:VN}=xx.actions,Ij=null,Rj={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},_x=Ae({name:"polarOptions",initialState:Ij,reducers:Rj}),{updatePolarOptions:HN}=_x.actions,jj=_x.reducer,wx=Ke("keyDown"),Sx=Ke("focus"),Ox=Ke("blur"),Zo=xi(),Yn=null,gn=null,fa=null;Zo.startListening({actionCreator:wx,effect:(e,t)=>{fa=e.payload,Yn!==null&&(cancelAnimationFrame(Yn),Yn=null);var n=t.getState(),{throttleDelay:r,throttledEvents:i}=n.eventSettings,a=i==="all"||i.includes("keydown");gn!==null&&(typeof r!="number"||!a)&&(clearTimeout(gn),gn=null);var o=()=>{try{var s=t.getState(),l=s.rootProps.accessibilityLayer!==!1;if(!l)return;var{keyboardInteraction:u}=s.tooltip,c=fa;if(c!=="ArrowRight"&&c!=="ArrowLeft"&&c!=="Enter")return;var f=df(u,Pr(s),Di(s),Ri(s)),d=f==null?-1:Number(f);if(!Number.isFinite(d)||d<0)return;var h=Nt(s);if(c==="Enter"){var p=lo(s,"axis","hover",String(u.index));t.dispatch(oo({active:!u.active,activeIndex:u.index,activeCoordinate:p}));return}var m=FI(s),g=m==="left-to-right"?1:-1,v=c==="ArrowRight"?1:-1,y=d+v*g;if(h==null||y>=h.length||y<0)return;var b=lo(s,"axis","hover",String(y));t.dispatch(oo({active:!0,activeIndex:y.toString(),activeCoordinate:b}))}finally{Yn=null,gn=null}};if(!a){o();return}r==="raf"?Yn=requestAnimationFrame(o):typeof r=="number"&&gn===null&&(o(),fa=null,gn=setTimeout(()=>{fa?o():(gn=null,Yn=null)},r))}});Zo.startListening({actionCreator:Sx,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;if(!i.active&&i.index==null){var a="0",o=lo(n,"axis","hover",String(a));t.dispatch(oo({active:!0,activeIndex:a,activeCoordinate:o}))}}}});Zo.startListening({actionCreator:Ox,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;i.active&&t.dispatch(oo({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function Px(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(n,r)=>{if(r==="currentTarget")return t;var i=Reflect.get(n,r);return typeof i=="function"?i.bind(n):i}})}var Ge=Ke("externalEvent"),Mx=xi(),da=new Map,zr=new Map,Nl=new Map;Mx.startListening({actionCreator:Ge,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(n!=null){var i=r.type,a=Px(r);Nl.set(i,{handler:n,reactEvent:a});var o=da.get(i);o!==void 0&&(cancelAnimationFrame(o),da.delete(i));var s=t.getState(),{throttleDelay:l,throttledEvents:u}=s.eventSettings,c=u,f=c==="all"||c?.includes(i),d=zr.get(i);d!==void 0&&(typeof l!="number"||!f)&&(clearTimeout(d),zr.delete(i));var h=()=>{var g=Nl.get(i);try{if(!g)return;var{handler:v,reactEvent:y}=g,b=t.getState(),_={activeCoordinate:B2(b),activeDataKey:L2(b),activeIndex:so(b),activeLabel:tx(b),activeTooltipIndex:so(b),isTooltipActive:z2(b)};v&&v(_,y)}finally{da.delete(i),zr.delete(i),Nl.delete(i)}};if(!f){h();return}if(l==="raf"){var p=requestAnimationFrame(h);da.set(i,p)}else if(typeof l=="number"){if(!zr.has(i)){h();var m=setTimeout(h,l);zr.set(i,m)}}else h()}}});var Lj=P([Sr],e=>e.tooltipItemPayloads),Nj=P([Lj,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(t!=null){var r=e.find(a=>a.settings.graphicalItemId===n);if(r!=null){var{getPosition:i}=r;if(i!=null)return i(t)}}}),Ax=Ke("touchMove"),kx=xi(),mn=null,Ft=null,Im=null,$r=null;kx.startListening({actionCreator:Ax,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){$r=Px(n);var r=t.getState(),{throttleDelay:i,throttledEvents:a}=r.eventSettings,o=a==="all"||a.includes("touchmove");mn!==null&&(cancelAnimationFrame(mn),mn=null),Ft!==null&&(typeof i!="number"||!o)&&(clearTimeout(Ft),Ft=null),Im=Array.from(n.touches).map(l=>Sf({clientX:l.clientX,clientY:l.clientY,currentTarget:n.currentTarget}));var s=()=>{if($r!=null){var l=t.getState(),u=cf(l,l.tooltip.settings.shared);if(u==="axis"){var c,f=(c=Im)===null||c===void 0?void 0:c[0];if(f==null){mn=null,Ft=null;return}var d=wf(l,f);d?.activeIndex!=null&&t.dispatch(qb({activeIndex:d.activeIndex,activeDataKey:void 0,activeCoordinate:d.activeCoordinate}))}else if(u==="item"){var h,p=$r.touches[0];if(document.elementFromPoint==null||p==null)return;var m=document.elementFromPoint(p.clientX,p.clientY);if(!m||!m.getAttribute)return;var g=m.getAttribute(KM),v=(h=m.getAttribute(YM))!==null&&h!==void 0?h:void 0,y=Or(l).find(x=>x.id===v);if(g==null||y==null||v==null)return;var{dataKey:b}=y,_=Nj(l,g,v);t.dispatch(ff({activeDataKey:b,activeIndex:g,activeCoordinate:_,activeGraphicalItemId:v}))}mn=null,Ft=null}};if(!o){s();return}i==="raf"?mn=requestAnimationFrame(s):typeof i=="number"&&Ft===null&&(s(),$r=null,Ft=setTimeout(()=>{$r?s():(Ft=null,mn=null)},i))}}});var Cx={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},Ex=Ae({name:"eventSettings",initialState:Cx,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:Fj}=Ex.actions,Bj=Ex.reducer,zj=sy({brush:wj,cartesianAxis:xj,chartData:FR,errorBars:kj,eventSettings:Bj,graphicalItems:gj,layout:DM,legend:zA,options:TR,polarAxis:sj,polarOptions:jj,referenceElements:Oj,renderedTicks:Mj,rootProps:Dj,tooltip:YI,zIndex:yR}),$j=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return iM({reducer:zj,preloadedState:t,middleware:r=>{var i;return r({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([yx.middleware,bx.middleware,Zo.middleware,Mx.middleware,kx.middleware])},enhancers:r=>{var i=r;return typeof r=="function"&&(i=r()),i.concat(wy({type:"raf"}))},devTools:{serialize:{replacer:Tj},name:"recharts-".concat(n)}})};function Wj(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,i=wi(),a=w.useRef(null);if(i)return n;a.current==null&&(a.current=$j(t,r));var o=sc;return w.createElement(ik,{context:o,store:a.current},n)}var qj=e=>{var t=Fe();return w.useEffect(()=>{t(Fj(e))},[t,e]),null},Uj=w.memo(qj,sk);function Vj(){var e=Fe(),[t,n]=w.useState(null),r=U(HM);return w.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),a=i.width/t.offsetWidth;Q(a)&&a!==r&&e(TM(a))}},[t,e,r]),n}function Rm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Hj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rm(Object(n),!0).forEach(function(r){Kj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kj(e,t,n){return(t=Yj(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yj(e){var t=Xj(e,"string");return typeof t=="symbol"?t:t+""}function Xj(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yt(){return Yt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yt.apply(null,arguments)}var Gj=()=>(KR(),null);function uo(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var Zj=w.forwardRef((e,t)=>{var n,r,i=w.useRef(null),[a,o]=w.useState({containerWidth:uo((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:uo((r=e.style)===null||r===void 0?void 0:r.height)}),s=w.useCallback((u,c)=>{o(f=>{var d=Math.round(u),h=Math.round(c);return f.containerWidth===d&&f.containerHeight===h?f:{containerWidth:d,containerHeight:h}})},[]),l=w.useCallback(u=>{if(typeof t=="function"&&t(u),u!=null&&typeof ResizeObserver<"u"){var{width:c,height:f}=u.getBoundingClientRect();s(c,f);var d=p=>{var m=p[0];if(m!=null){var{width:g,height:v}=m.contentRect;s(g,v)}},h=new ResizeObserver(d);h.observe(u),i.current=h}},[t,s]);return w.useEffect(()=>()=>{var u=i.current;u?.disconnect()},[s]),w.createElement(w.Fragment,null,w.createElement(Si,{width:a.containerWidth,height:a.containerHeight}),w.createElement("div",Yt({ref:l},e)))}),Qj=w.forwardRef((e,t)=>{var{width:n,height:r}=e,[i,a]=w.useState({containerWidth:uo(n),containerHeight:uo(r)}),o=w.useCallback((l,u)=>{a(c=>{var f=Math.round(l),d=Math.round(u);return c.containerWidth===f&&c.containerHeight===d?c:{containerWidth:f,containerHeight:d}})},[]),s=w.useCallback(l=>{if(typeof t=="function"&&t(l),l!=null){var{width:u,height:c}=l.getBoundingClientRect();o(u,c)}},[t,o]);return w.createElement(w.Fragment,null,w.createElement(Si,{width:i.containerWidth,height:i.containerHeight}),w.createElement("div",Yt({ref:s},e)))}),Jj=w.forwardRef((e,t)=>{var{width:n,height:r}=e;return w.createElement(w.Fragment,null,w.createElement(Si,{width:n,height:r}),w.createElement("div",Yt({ref:t},e)))}),eL=w.forwardRef((e,t)=>{var{width:n,height:r}=e;return typeof n=="string"||typeof r=="string"?w.createElement(Qj,Yt({},e,{ref:t})):typeof n=="number"&&typeof r=="number"?w.createElement(Jj,Yt({},e,{width:n,height:r,ref:t})):w.createElement(w.Fragment,null,w.createElement(Si,{width:n,height:r}),w.createElement("div",Yt({ref:t},e)))});function tL(e){return e?Zj:eL}var nL=w.forwardRef((e,t)=>{var{children:n,className:r,height:i,onClick:a,onContextMenu:o,onDoubleClick:s,onMouseDown:l,onMouseEnter:u,onMouseLeave:c,onMouseMove:f,onMouseUp:d,onTouchEnd:h,onTouchMove:p,onTouchStart:m,style:g,width:v,responsive:y,dispatchTouchEvents:b=!0}=e,_=w.useRef(null),x=Fe(),[S,O]=w.useState(null),[M,k]=w.useState(null),E=Vj(),T=gc(),A=T?.width>0?T.width:v,F=T?.height>0?T.height:i,L=w.useCallback(D=>{E(D),typeof t=="function"&&t(D),O(D),k(D),D!=null&&(_.current=D)},[E,t,O,k]),I=w.useCallback(D=>{x(vx(D)),x(Ge({handler:a,reactEvent:D}))},[x,a]),N=w.useCallback(D=>{x(Nu(D)),x(Ge({handler:u,reactEvent:D}))},[x,u]),B=w.useCallback(D=>{x($b()),x(Ge({handler:c,reactEvent:D}))},[x,c]),oe=w.useCallback(D=>{x(Nu(D)),x(Ge({handler:f,reactEvent:D}))},[x,f]),J=w.useCallback(()=>{x(Sx())},[x]),H=w.useCallback(()=>{x(Ox())},[x]),Me=w.useCallback(D=>{x(wx(D.key))},[x]),se=w.useCallback(D=>{x(Ge({handler:o,reactEvent:D}))},[x,o]),_e=w.useCallback(D=>{x(Ge({handler:s,reactEvent:D}))},[x,s]),re=w.useCallback(D=>{x(Ge({handler:l,reactEvent:D}))},[x,l]),we=w.useCallback(D=>{x(Ge({handler:d,reactEvent:D}))},[x,d]),Se=w.useCallback(D=>{x(Ge({handler:m,reactEvent:D}))},[x,m]),Mr=w.useCallback(D=>{b&&x(Ax(D)),x(Ge({handler:p,reactEvent:D}))},[x,b,p]),De=w.useCallback(D=>{x(Ge({handler:h,reactEvent:D}))},[x,h]),j=tL(y);return w.createElement(_f.Provider,{value:S},w.createElement(oO.Provider,{value:M},w.createElement(j,{width:A??g?.width,height:F??g?.height,className:Je("recharts-wrapper",r),style:Hj({position:"relative",cursor:"default",width:A,height:F},g),onClick:I,onContextMenu:se,onDoubleClick:_e,onFocus:J,onBlur:H,onKeyDown:Me,onMouseDown:re,onMouseEnter:N,onMouseLeave:B,onMouseMove:oe,onMouseUp:we,onTouchEnd:De,onTouchMove:Mr,onTouchStart:Se,ref:L},w.createElement(Gj,null),n)))}),Fl={},jm;function rL(){return jm||(jm=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oc();function n(r,i){if(!r||!r.length)return 0;i!=null&&(i=t.iteratee(i));let a;for(let o=0;o<r.length;o++){const s=i?i(r[o]):r[o];s!==void 0&&(a===void 0?a=s:a+=s)}return a}e.sumBy=n})(Fl)),Fl}var Bl,Lm;function iL(){return Lm||(Lm=1,Bl=rL().sumBy),Bl}var aL=iL();const oL=Jt(aL);var sL=["sourceX","sourceY","sourceControlX","targetX","targetY","targetControlX","linkWidth"],lL=["className","style","children","id"];function fr(){return fr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fr.apply(null,arguments)}function Tx(e,t){if(e==null)return{};var n,r,i=uL(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function uL(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Nm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function st(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nm(Object(n),!0).forEach(function(r){cL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cL(e,t,n){return(t=fL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fL(e){var t=dL(e,"string");return typeof t=="symbol"?t:t+""}function dL(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hL=(e,t)=>{var n=+e,r=t-n;return i=>n+r*i},Qo=e=>e.y+e.dy/2,mi=e=>e&&e.value||0,co=(e,t)=>t.reduce((n,r)=>n+mi(e[r]),0),pL=(e,t,n)=>n.reduce((r,i)=>{var a=t[i];if(a==null)return r;var o=e[a.source];return o==null?r:r+Qo(o)*mi(t[i])},0),gL=(e,t,n)=>n.reduce((r,i)=>{var a=t[i];if(a==null)return r;var o=e[a.target];return o==null?r:r+Qo(o)*mi(t[i])},0),mL=(e,t)=>e.y-t.y,vL=(e,t)=>{for(var n=[],r=[],i=[],a=[],o=0,s=e.length;o<s;o++){var l=e[o];l?.source===t&&(i.push(l.target),a.push(o)),l?.target===t&&(n.push(l.source),r.push(o))}return{sourceNodes:n,sourceLinks:r,targetLinks:a,targetNodes:i}},Dx=(e,t)=>{for(var{targetNodes:n}=t,r=0,i=n.length;r<i;r++){var a=n[r];if(a!=null){var o=e[a];o&&(o.depth=Math.max(t.depth+1,o.depth),Dx(e,o))}}},yL=(e,t,n,r)=>{for(var i,a,{nodes:o,links:s}=e,l=o.map((v,y)=>{var b=vL(s,y);return st(st(st({},v),b),{},{value:Math.max(co(s,b.sourceLinks),co(s,b.targetLinks)),depth:0})}),u=0,c=l.length;u<c;u++){var f=l[u];f!=null&&!f.sourceNodes.length&&Dx(l,f)}var d=(i=(a=aj(l,v=>v.depth))===null||a===void 0?void 0:a.depth)!==null&&i!==void 0?i:0;if(d>=1)for(var h=(t-n)/d,p=0,m=l.length;p<m;p++){var g=l[p];g!=null&&(g.targetNodes.length||r==="justify"&&(g.depth=d),g.x=g.depth*h,g.dx=n)}return{tree:l,maxDepth:d}},bL=e=>{for(var t=[],n=0,r=e.length;n<r;n++){var i,a=e[n];a!=null&&(t[a.depth]||(t[a.depth]=[]),(i=t[a.depth])===null||i===void 0||i.push(a))}return t},xL=(e,t,n,r,i)=>{for(var a=Math.min(...e.map(g=>(t-(g.length-1)*n)/oL(g,mi))),o=0,s=e.length;o<s;o++){var l=e[o];if(l!=null)if(i==="top")for(var u=0,c=0,f=l.length;c<f;c++){var d=l[c];d!=null&&(d.dy=d.value*a,d.y=u,u+=d.dy+n)}else for(var h=0,p=l.length;h<p;h++){var m=l[h];m!=null&&(m.y=h,m.dy=m.value*a)}}return r.map(g=>st(st({},g),{},{dy:mi(g)*a}))},zl=function(t,n,r){for(var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=0,o=t.length;a<o;a++){var s=t[a];if(s!=null){var l=s.length;i&&s.sort(mL);for(var u=0,c=0;c<l;c++){var f=s[c];if(f!=null){var d=u-f.y;d>0&&(f.y+=d),u=f.y+f.dy+r}}u=n+r;for(var h=l-1;h>=0;h--){var p=s[h];if(p!=null){var m=p.y+p.dy+r-u;if(m>0)p.y-=m,u=p.y;else break}}}}},_L=(e,t,n,r)=>{for(var i=0,a=t.length;i<a;i++){var o=t[i];if(o!=null)for(var s=0,l=o.length;s<l;s++){var u=o[s];if(u!=null&&u.sourceLinks.length){var c=co(n,u.sourceLinks),f=pL(e,n,u.sourceLinks),d=f/c;u.y+=(d-Qo(u))*r}}}},wL=(e,t,n,r)=>{for(var i=t.length-1;i>=0;i--){var a=t[i];if(a!=null)for(var o=0,s=a.length;o<s;o++){var l=a[o];if(l!=null&&l.targetLinks.length){var u=co(n,l.targetLinks),c=gL(e,n,l.targetLinks),f=c/u;l.y+=(f-Qo(l))*r}}}},SL=(e,t)=>{for(var n=0,r=e.length;n<r;n++){var i=e[n];if(i!=null){var a=0,o=0;i.targetLinks.sort((m,g)=>{var v,y,b,_,x=(v=t[m])===null||v===void 0?void 0:v.target,S=(y=t[g])===null||y===void 0?void 0:y.target;if(x==null||S==null)return 0;var O=(b=e[x])===null||b===void 0?void 0:b.y,M=(_=e[S])===null||_===void 0?void 0:_.y;return O==null||M==null?0:O-M}),i.sourceLinks.sort((m,g)=>{var v,y,b,_,x=(v=t[m])===null||v===void 0?void 0:v.source,S=(y=t[g])===null||y===void 0?void 0:y.source;if(x==null||S==null)return 0;var O=(b=e[x])===null||b===void 0?void 0:b.y,M=(_=e[S])===null||_===void 0?void 0:_.y;return O==null||M==null?0:O-M});for(var s=0,l=i.targetLinks.length;s<l;s++){var u=i.targetLinks[s];if(u!=null){var c=t[u];c&&(c.sy=a,a+=c.dy)}}for(var f=0,d=i.sourceLinks.length;f<d;f++){var h=i.sourceLinks[f];if(h!=null){var p=t[h];p&&(p.ty=o,o+=p.dy)}}}}},OL=e=>{var{data:t,width:n,height:r,iterations:i,nodeWidth:a,nodePadding:o,sort:s,verticalAlign:l,align:u}=e,{links:c}=t,{tree:f}=yL(t,n,a,u),d=bL(f),h=xL(d,r,o,c,l);if(zl(d,r,o,s),l==="justify")for(var p=1,m=1;m<=i;m++)wL(f,d,h,p*=.99),zl(d,r,o,s),_L(f,d,h,p),zl(d,r,o,s);SL(f,h);var g=h;return{nodes:f,links:g}},PL=e=>({x:+e.x+ +e.width/2,y:+e.y+ +e.height/2}),ML=e=>"sourceX"in e?{x:(e.sourceX+e.targetX)/2,y:(e.sourceY+e.targetY)/2}:void 0,AL=(e,t,n)=>{var{payload:r}=e;if(t==="node")return{payload:r,name:ve(r,n,""),value:ve(r,"value")};if("source"in r&&r.source&&r.target){var i=ve(r.source,n,""),a=ve(r.target,n,"");return{payload:r,name:"".concat(i," - ").concat(a),value:ve(r,"value")}}},kL=(e,t,n,r)=>{if(!(t==null||typeof t!="string")&&!(n==null||typeof n!="object")){var i=t.split("-"),[a,o]=i,s=nc(n,"".concat(a,"s[").concat(o,"]"));if(s){var l=AL(s,a,r);return l}}},CL={chartName:"Sankey",defaultTooltipEventType:"item",validateTooltipEventTypes:["item"],tooltipPayloadSearcher:kL,eventEmitter:void 0},EL=w.memo(e=>{var{dataKey:t,nameKey:n,stroke:r,strokeWidth:i,fill:a,name:o,data:s,id:l}=e,u={dataDefinedOnItem:s,getPosition:mr,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,name:o,nameKey:n,hide:!1,type:void 0,color:a,unit:"",graphicalItemId:l}};return w.createElement(lj,{tooltipEntrySettings:u})});function TL(e,t){if(w.isValidElement(e))return w.cloneElement(e,t);if(typeof e=="function")return e(t);var{sourceX:n,sourceY:r,sourceControlX:i,targetX:a,targetY:o,targetControlX:s,linkWidth:l}=t,u=Tx(t,sL);return w.createElement("path",fr({className:"recharts-sankey-link",d:`
34
- M`.concat(n,",").concat(r,`
35
- C`).concat(i,",").concat(r," ").concat(s,",").concat(o," ").concat(a,",").concat(o,`
36
- `),fill:"none",stroke:"#333",strokeWidth:l,strokeOpacity:"0.2"},rr(u)))}var DL=e=>{var{link:t,nodes:n,left:r,top:i,i:a,linkContent:o,linkCurvature:s}=e,{sy:l,ty:u,dy:c}=t,f=n[t.source],d=n[t.target];if(!(f==null||d==null)){var h=f.x+f.dx+r,p=d.x+r,m=hL(h,p),g=m(s),v=m(1-s),y=f.y+l+c/2+i,b=d.y+u+c/2+i,_=st({sourceX:h,targetX:p,sourceY:y,targetY:b,sourceControlX:g,targetControlX:v,sourceRelativeY:l,targetRelativeY:u,linkWidth:c,index:a,payload:st(st({},t),{},{source:f,target:d})},Zu(o));return _}};function IL(e){var{graphicalItemId:t,props:n,i:r,linkContent:i,onMouseEnter:a,onMouseLeave:o,onClick:s,dataKey:l}=e,u=ML(n),c="link-".concat(r),f=Fe(),d={onMouseEnter:h=>{f(ff({activeIndex:c,activeDataKey:l,activeCoordinate:u,activeGraphicalItemId:t})),a(n,h)},onMouseLeave:h=>{f(zb()),o(n,h)},onClick:h=>{f(Wb({activeIndex:c,activeDataKey:l,activeCoordinate:u,activeGraphicalItemId:t})),s(n,h)}};return w.createElement(mo,d,TL(i,n))}function RL(e){var{graphicalItemId:t,modifiedLinks:n,links:r,linkContent:i,onMouseEnter:a,onMouseLeave:o,onClick:s,dataKey:l}=e;return w.createElement(mo,{className:"recharts-sankey-links",key:"recharts-sankey-links"},r.map((u,c)=>{var f=n[c];return f==null?null:w.createElement(IL,{graphicalItemId:t,key:"link-".concat(u.source,"-").concat(u.target,"-").concat(u.value),props:f,linkContent:i,i:c,onMouseEnter:a,onMouseLeave:o,onClick:s,dataKey:l})}))}function jL(e,t){return w.isValidElement(e)?w.cloneElement(e,t):typeof e=="function"?e(t):w.createElement(Jy,fr({className:"recharts-sankey-node",fill:"#0088fe",fillOpacity:"0.8"},rr(t)))}var LL=e=>{var{node:t,nodeContent:n,top:r,left:i,i:a}=e,{x:o,y:s,dx:l,dy:u}=t,c=st(st({},Zu(n)),{},{x:o+i,y:s+r,width:l,height:u,index:a,payload:t});return c};function NL(e){var{graphicalItemId:t,props:n,nodeContent:r,i,onMouseEnter:a,onMouseLeave:o,onClick:s,dataKey:l}=e,u=Fe(),c=PL(n),f="node-".concat(i),d={onMouseEnter:h=>{u(ff({activeIndex:f,activeDataKey:l,activeCoordinate:c,activeGraphicalItemId:t})),a(n,h)},onMouseLeave:h=>{u(zb()),o(n,h)},onClick:h=>{u(Wb({activeIndex:f,activeDataKey:l,activeCoordinate:c,activeGraphicalItemId:t})),s(n,h)}};return w.createElement(mo,d,jL(r,n))}function FL(e){var{graphicalItemId:t,modifiedNodes:n,nodeContent:r,onMouseEnter:i,onMouseLeave:a,onClick:o,dataKey:s}=e;return w.createElement(mo,{className:"recharts-sankey-nodes",key:"recharts-sankey-nodes"},n.map((l,u)=>w.createElement(NL,{graphicalItemId:t,key:"node-".concat(l.index,"-").concat(l.x,"-").concat(l.y),props:l,nodeContent:r,i:u,onMouseEnter:i,onMouseLeave:a,onClick:o,dataKey:s})))}var BL=st({align:"justify",dataKey:"value",iterations:32,linkCurvature:.5,margin:{top:5,right:5,bottom:5,left:5},nameKey:"name",nodePadding:10,nodeWidth:10,sort:!0,verticalAlign:"justify"},Cx);function zL(e){var{className:t,style:n,children:r,id:i}=e,a=Tx(e,lL),{link:o,dataKey:s,node:l,onMouseEnter:u,onMouseLeave:c,onClick:f,data:d,iterations:h,nodeWidth:p,nodePadding:m,sort:g,linkCurvature:v,margin:y,verticalAlign:b,align:_}=e,x=rr(a),S=OA(),O=PA(),{links:M,modifiedLinks:k,modifiedNodes:E}=w.useMemo(()=>{var L,I,N,B;if(!d||!S||!O||S<=0||O<=0)return{nodes:[],links:[],modifiedLinks:[],modifiedNodes:[]};var oe=S-((L=y.left)!==null&&L!==void 0?L:0)-((I=y.right)!==null&&I!==void 0?I:0),J=O-((N=y.top)!==null&&N!==void 0?N:0)-((B=y.bottom)!==null&&B!==void 0?B:0),H=OL({data:d,width:oe,height:J,iterations:h,nodeWidth:p,nodePadding:m,sort:g,verticalAlign:b,align:_}),Me=y.top||0,se=y.left||0,_e=H.links.map((we,Se)=>DL({link:we,nodes:H.nodes,i:Se,top:Me,left:se,linkContent:o,linkCurvature:v})).filter(ot),re=H.nodes.map((we,Se)=>LL({node:we,nodeContent:l,i:Se,top:Me,left:se}));return{nodes:H.nodes,links:H.links,modifiedLinks:_e,modifiedNodes:re}},[d,S,O,y,h,p,m,g,o,l,v,_,b]),T=w.useCallback((L,I,N)=>{u&&u(L,I,N)},[u]),A=w.useCallback((L,I,N)=>{c&&c(L,I,N)},[c]),F=w.useCallback((L,I,N)=>{f&&f(L,I,N)},[f]);return!Qt(S)||!Qt(O)||!d||!d.links||!d.nodes?null:w.createElement(w.Fragment,null,w.createElement(_j,{computedData:{links:k,nodes:E}}),w.createElement(nO,fr({},x,{width:S,height:O}),r,w.createElement(RL,{graphicalItemId:i,links:M,modifiedLinks:k,linkContent:o,dataKey:s,onMouseEnter:(L,I)=>T(L,"link",I),onMouseLeave:(L,I)=>A(L,"link",I),onClick:(L,I)=>F(L,"link",I)}),w.createElement(FL,{graphicalItemId:i,modifiedNodes:E,nodeContent:l,dataKey:s,onMouseEnter:(L,I)=>T(L,"node",I),onMouseLeave:(L,I)=>A(L,"node",I),onClick:(L,I)=>F(L,"node",I)})))}function $L(e){var t=yi(e,BL),{width:n,height:r,style:i,className:a,id:o,throttleDelay:s,throttledEvents:l}=t,[u,c]=w.useState(null);return w.createElement(Wj,{preloadedState:{options:CL},reduxStoreName:a??"Sankey"},w.createElement(Si,{width:n,height:r}),w.createElement(AA,{margin:t.margin}),w.createElement(Uj,{throttleDelay:s,throttledEvents:l}),w.createElement(nL,{className:a,style:i,width:n,height:r,responsive:!1,ref:f=>{f&&!u&&c(f)},onMouseEnter:void 0,onMouseLeave:void 0,onClick:void 0,onMouseMove:void 0,onMouseDown:void 0,onMouseUp:void 0,onContextMenu:void 0,onDoubleClick:void 0,onTouchStart:void 0,onTouchMove:void 0,onTouchEnd:void 0},w.createElement(_f.Provider,{value:u},w.createElement(hj,{id:o,type:"sankey"},f=>w.createElement(w.Fragment,null,w.createElement(EL,{dataKey:t.dataKey,nameKey:t.nameKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,data:t.data,id:f}),w.createElement(zL,fr({},t,{id:f})))))))}$L.displayName="Sankey";export{UL as B,pS as C,VL as L,YL as P,iN as R,HL as S,dN as T,JL as a,eN as b,Je as c,XL as d,KL as e,GL as f,$L as g,Jy as h,qL as i,mo as j,QL as p};