promptfoo 0.119.13 → 0.119.14

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 (131) hide show
  1. package/dist/package.json +28 -26
  2. package/dist/src/app/assets/index-eJ2lMe94.js +51 -0
  3. package/dist/src/app/assets/{source-map-support-Bnh0UQ2S.js → source-map-support-1v4oeb7P.js} +1 -1
  4. package/dist/src/app/assets/sync-CtLQRuC1.js +1 -0
  5. package/dist/src/app/assets/{vendor-charts-T60Uk0Z3.js → vendor-charts-DnVv66VV.js} +1 -1
  6. package/dist/src/app/assets/{vendor-markdown-DLig-KJh.js → vendor-markdown-DCpQIyMA.js} +1 -1
  7. package/dist/src/app/assets/{vendor-mui-core-5BLaiG3c.js → vendor-mui-core-Boqnpf9f.js} +1 -1
  8. package/dist/src/app/assets/{vendor-mui-icons-fn39Fu2e.js → vendor-mui-icons-B8MqoVbj.js} +1 -1
  9. package/dist/src/app/assets/vendor-mui-x-CGSS6QHF.js +45 -0
  10. package/dist/src/app/assets/{vendor-utils-DYBMEuwX.js → vendor-utils-DdfHIEy8.js} +1 -1
  11. package/dist/src/app/index.html +7 -7
  12. package/dist/src/assertions/guardrails.d.ts +1 -1
  13. package/dist/src/assertions/guardrails.js +18 -9
  14. package/dist/src/assertions/index.d.ts +1 -1
  15. package/dist/src/assertions/index.js +9 -3
  16. package/dist/src/assertions/searchRubric.d.ts +3 -0
  17. package/dist/src/assertions/searchRubric.js +18 -0
  18. package/dist/src/commands/eval.js +1 -1
  19. package/dist/src/commands/modelScan.d.ts +7 -1
  20. package/dist/src/commands/modelScan.js +121 -59
  21. package/dist/src/database/index.d.ts +6 -0
  22. package/dist/src/database/index.js +11 -0
  23. package/dist/src/database/tables.d.ts +46 -24
  24. package/dist/src/envars.d.ts +17 -0
  25. package/dist/src/generated/constants.js +1 -1
  26. package/dist/src/logger.d.ts +5 -0
  27. package/dist/src/logger.js +28 -0
  28. package/dist/src/main.js +17 -6
  29. package/dist/src/matchers.d.ts +1 -0
  30. package/dist/src/matchers.js +80 -0
  31. package/dist/src/models/eval.d.ts +2 -1
  32. package/dist/src/models/eval.js +44 -2
  33. package/dist/src/prompts/grading.d.ts +1 -0
  34. package/dist/src/prompts/grading.js +26 -1
  35. package/dist/src/prompts/index.d.ts +1 -0
  36. package/dist/src/prompts/index.js +4 -1
  37. package/dist/src/providers/adaline.gateway.js +2 -2
  38. package/dist/src/providers/anthropic/defaults.d.ts +1 -1
  39. package/dist/src/providers/anthropic/defaults.js +15 -0
  40. package/dist/src/providers/azure/chat.d.ts +3 -1
  41. package/dist/src/providers/azure/chat.js +16 -3
  42. package/dist/src/providers/azure/defaults.js +660 -141
  43. package/dist/src/providers/azure/responses.d.ts +5 -0
  44. package/dist/src/providers/azure/responses.js +33 -4
  45. package/dist/src/providers/azure/types.d.ts +4 -0
  46. package/dist/src/providers/bedrock/agents.d.ts +1 -1
  47. package/dist/src/providers/bedrock/agents.js +2 -2
  48. package/dist/src/providers/bedrock/base.d.ts +40 -0
  49. package/dist/src/providers/bedrock/base.js +171 -0
  50. package/dist/src/providers/bedrock/converse.d.ts +146 -0
  51. package/dist/src/providers/bedrock/converse.js +1044 -0
  52. package/dist/src/providers/bedrock/index.d.ts +1 -34
  53. package/dist/src/providers/bedrock/index.js +4 -159
  54. package/dist/src/providers/bedrock/knowledgeBase.d.ts +1 -1
  55. package/dist/src/providers/bedrock/knowledgeBase.js +2 -2
  56. package/dist/src/providers/bedrock/nova-sonic.d.ts +2 -1
  57. package/dist/src/providers/bedrock/nova-sonic.js +2 -2
  58. package/dist/src/providers/claude-agent-sdk.d.ts +58 -1
  59. package/dist/src/providers/claude-agent-sdk.js +22 -1
  60. package/dist/src/providers/defaults.js +4 -0
  61. package/dist/src/providers/github/defaults.js +6 -6
  62. package/dist/src/providers/google/types.d.ts +25 -0
  63. package/dist/src/providers/google/util.d.ts +2 -0
  64. package/dist/src/providers/google/vertex.js +78 -22
  65. package/dist/src/providers/{groq.d.ts → groq/chat.d.ts} +26 -20
  66. package/dist/src/providers/groq/chat.js +79 -0
  67. package/dist/src/providers/groq/index.d.ts +5 -0
  68. package/dist/src/providers/groq/index.js +24 -0
  69. package/dist/src/providers/groq/responses.d.ts +106 -0
  70. package/dist/src/providers/groq/responses.js +64 -0
  71. package/dist/src/providers/groq/types.d.ts +44 -0
  72. package/dist/src/providers/groq/types.js +3 -0
  73. package/dist/src/providers/groq/util.d.ts +15 -0
  74. package/dist/src/providers/groq/util.js +28 -0
  75. package/dist/src/providers/mcp/client.d.ts +8 -0
  76. package/dist/src/providers/mcp/client.js +60 -10
  77. package/dist/src/providers/mcp/types.d.ts +21 -0
  78. package/dist/src/providers/openai/chatkit-pool.d.ts +114 -0
  79. package/dist/src/providers/openai/chatkit-pool.js +548 -0
  80. package/dist/src/providers/openai/chatkit-types.d.ts +73 -0
  81. package/dist/src/providers/openai/chatkit-types.js +3 -0
  82. package/dist/src/providers/openai/chatkit.d.ts +76 -0
  83. package/dist/src/providers/openai/chatkit.js +879 -0
  84. package/dist/src/providers/openai/codex-sdk.d.ts +109 -0
  85. package/dist/src/providers/openai/codex-sdk.js +346 -0
  86. package/dist/src/providers/openai/defaults.d.ts +2 -0
  87. package/dist/src/providers/openai/defaults.js +10 -4
  88. package/dist/src/providers/registry.js +48 -9
  89. package/dist/src/providers/responses/types.d.ts +1 -1
  90. package/dist/src/providers/sagemaker.d.ts +2 -2
  91. package/dist/src/providers/webSearchUtils.d.ts +17 -0
  92. package/dist/src/providers/webSearchUtils.js +169 -0
  93. package/dist/src/providers/xai/chat.d.ts +61 -0
  94. package/dist/src/providers/xai/chat.js +68 -3
  95. package/dist/src/providers/xai/responses.d.ts +189 -0
  96. package/dist/src/providers/xai/responses.js +268 -0
  97. package/dist/src/redteam/constants/plugins.d.ts +1 -1
  98. package/dist/src/redteam/constants/plugins.js +1 -1
  99. package/dist/src/redteam/constants/strategies.d.ts +1 -1
  100. package/dist/src/redteam/constants/strategies.js +1 -0
  101. package/dist/src/redteam/plugins/vlguard.d.ts +53 -4
  102. package/dist/src/redteam/plugins/vlguard.js +362 -46
  103. package/dist/src/redteam/providers/constants.d.ts +2 -2
  104. package/dist/src/redteam/providers/constants.js +2 -2
  105. package/dist/src/redteam/providers/crescendo/index.d.ts +1 -1
  106. package/dist/src/redteam/providers/crescendo/index.js +5 -3
  107. package/dist/src/redteam/providers/hydra/index.js +1 -1
  108. package/dist/src/server/routes/modelAudit.js +4 -4
  109. package/dist/src/share.js +4 -2
  110. package/dist/src/telemetry.js +44 -8
  111. package/dist/src/types/env.d.ts +3 -0
  112. package/dist/src/types/env.js +1 -0
  113. package/dist/src/types/index.d.ts +896 -615
  114. package/dist/src/types/index.js +1 -0
  115. package/dist/src/types/providers.d.ts +1 -0
  116. package/dist/src/types/tracing.d.ts +3 -0
  117. package/dist/src/util/database.d.ts +6 -4
  118. package/dist/src/util/file.js +6 -4
  119. package/dist/src/util/modelAuditCliParser.d.ts +4 -4
  120. package/dist/src/util/xlsx.js +52 -26
  121. package/dist/src/validators/providers.d.ts +142 -122
  122. package/dist/src/validators/providers.js +4 -6
  123. package/dist/src/validators/redteam.d.ts +36 -28
  124. package/dist/src/validators/redteam.js +9 -3
  125. package/dist/tsconfig.tsbuildinfo +1 -1
  126. package/package.json +28 -26
  127. package/dist/drizzle/CLAUDE.md +0 -65
  128. package/dist/src/app/assets/index-DifT6VGT.js +0 -51
  129. package/dist/src/app/assets/sync-Oo-W_Rbj.js +0 -1
  130. package/dist/src/app/assets/vendor-mui-x-C2xF-yiO.js +0 -45
  131. package/dist/src/providers/groq.js +0 -48
@@ -1 +1 @@
1
- import{r as t,g as e,c as n,d as r}from"./vendor-react-BuO7LJGJ.js";import{r as i}from"./vendor-mui-core-5BLaiG3c.js";import{w as o,c as a,s,a as c,b as l,d as u,e as h,f as d,g as f,h as p,i as g,j as y,k as v,l as m,m as b,n as x,o as w,p as _,q as O,r as S,t as P,u as M,v as k,x as E,y as A,z as C,A as j,B as I,C as D,D as T,E as R,F as L,G as B,H as N,I as z,J as F,K as V,L as W,M as U,N as K,O as H,P as $,Q as Y,R as X,S as q,T as G,U as Z,V as Q,W as J,X as tt,Y as et}from"./vendor-mui-x-C2xF-yiO.js";for(var nt={},rt={byteLength:function(t){var e=lt(t),n=e[0],r=e[1];return 3*(n+r)/4-r},toByteArray:function(t){var e,n,r=lt(t),i=r[0],o=r[1],a=new at(function(t,e,n){return 3*(e+n)/4-n}(0,i,o)),s=0,c=o>0?i-4:i;for(n=0;n<c;n+=4)e=ot[t.charCodeAt(n)]<<18|ot[t.charCodeAt(n+1)]<<12|ot[t.charCodeAt(n+2)]<<6|ot[t.charCodeAt(n+3)],a[s++]=e>>16&255,a[s++]=e>>8&255,a[s++]=255&e;2===o&&(e=ot[t.charCodeAt(n)]<<2|ot[t.charCodeAt(n+1)]>>4,a[s++]=255&e);1===o&&(e=ot[t.charCodeAt(n)]<<10|ot[t.charCodeAt(n+1)]<<4|ot[t.charCodeAt(n+2)]>>2,a[s++]=e>>8&255,a[s++]=255&e);return a},fromByteArray:function(t){for(var e,n=t.length,r=n%3,i=[],o=16383,a=0,s=n-r;a<s;a+=o)i.push(ht(t,a,a+o>s?s:a+o));1===r?(e=t[n-1],i.push(it[e>>2]+it[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],i.push(it[e>>10]+it[e>>4&63]+it[e<<2&63]+"="));return i.join("")}},it=[],ot=[],at="undefined"!=typeof Uint8Array?Uint8Array:Array,st="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ct=0;ct<64;++ct)it[ct]=st[ct],ot[st.charCodeAt(ct)]=ct;function lt(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function ut(t){return it[t>>18&63]+it[t>>12&63]+it[t>>6&63]+it[63&t]}function ht(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(ut(r));return i.join("")}ot["-".charCodeAt(0)]=62,ot["_".charCodeAt(0)]=63;var dt={read:function(t,e,n,r,i){var o,a,s=8*i-r-1,c=(1<<s)-1,l=c>>1,u=-7,h=n?i-1:0,d=n?-1:1,f=t[e+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=s;u>0;o=256*o+t[e+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+t[e+h],h+=d,u-=8);if(0===o)o=1-l;else{if(o===c)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=l}return(f?-1:1)*a*Math.pow(2,o-r)},write:function(t,e,n,r,i,o){var a,s,c,l=8*o-i-1,u=(1<<l)-1,h=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),(e+=a+h>=1?d/c:d*Math.pow(2,1-h))*c>=2&&(a++,c/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(e*c-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[n+f]=255&s,f+=p,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;t[n+f]=255&a,f+=p,a/=256,l-=8);t[n+f-p]|=128*g}};!function(t){const e=rt,n=dt,r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(t){+t!=t&&(t=0);return l.alloc(+t)},t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i;const{Uint8Array:o,ArrayBuffer:a,SharedArrayBuffer:s}=globalThis;function c(t){if(t>i)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new o(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return d(t)}return u(t,e,n)}function u(t,e,n){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|y(t,e);let r=c(n);const i=r.write(t,e);i!==n&&(r=r.slice(0,i));return r}(t,e);if(a.isView(t))return function(t){if(G(t,o)){const e=new o(t);return p(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(G(t,a)||t&&G(t.buffer,a))return p(t,e,n);if(void 0!==s&&(G(t,s)||t&&G(t.buffer,s)))return p(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return l.from(r,e,n);const i=function(t){if(l.isBuffer(t)){const e=0|g(t.length),n=c(e);return 0===n.length||t.copy(n,0,0,e),n}if(void 0!==t.length)return"number"!=typeof t.length||Z(t.length)?c(0):f(t);if("Buffer"===t.type&&Array.isArray(t.data))return f(t.data)}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function d(t){return h(t),c(t<0?0:0|g(t))}function f(t){const e=t.length<0?0:0|g(t.length),n=c(e);for(let r=0;r<e;r+=1)n[r]=255&t[r];return n}function p(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===e&&void 0===n?new o(t):void 0===n?new o(t,e):new o(t,e,n),Object.setPrototypeOf(r,l.prototype),r}function g(t){if(t>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function y(t,e){if(l.isBuffer(t))return t.length;if(a.isView(t)||G(t,a))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Y(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(t).length;default:if(i)return r?-1:Y(t).length;e=(""+e).toLowerCase(),i=!0}}function v(t,e,n){let r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return j(this,e,n);case"utf8":case"utf-8":return k(this,e,n);case"ascii":return A(this,e,n);case"latin1":case"binary":return C(this,e,n);case"base64":return M(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function b(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Z(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=l.from(e,r)),l.isBuffer(e))return 0===e.length?-1:x(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof o.prototype.indexOf?i?o.prototype.indexOf.call(t,e,n):o.prototype.lastIndexOf.call(t,e,n):x(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function x(t,e,n,r,i){let o,a=1,s=t.length,c=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,c/=2,n/=2}function l(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){let r=-1;for(o=n;o<s;o++)if(l(t,o)===l(e,-1===r?0:o-r)){if(-1===r&&(r=o),o-r+1===c)return r*a}else-1!==r&&(o-=o-r),r=-1}else for(n+c>s&&(n=s-c),o=n;o>=0;o--){let n=!0;for(let r=0;r<c;r++)if(l(t,o+r)!==l(e,r)){n=!1;break}if(n)return o}return-1}function w(t,e,n,r){n=Number(n)||0;const i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;const o=e.length;let a;for(r>o/2&&(r=o/2),a=0;a<r;++a){const r=parseInt(e.substr(2*a,2),16);if(Z(r))return a;t[n+a]=r}return a}function _(t,e,n,r){return q(Y(e,t.length-n),t,n,r)}function O(t,e,n,r){return q(function(t){const e=[];for(let n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function S(t,e,n,r){return q(X(e),t,n,r)}function P(t,e,n,r){return q(function(t,e){let n,r,i;const o=[];for(let a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function M(t,n,r){return 0===n&&r===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(n,r))}function k(t,e,n){n=Math.min(t.length,n);const r=[];let i=e;for(;i<n;){const e=t[i];let o=null,a=e>239?4:e>223?3:e>191?2:1;if(i+a<=n){let n,r,s,c;switch(a){case 1:e<128&&(o=e);break;case 2:n=t[i+1],128==(192&n)&&(c=(31&e)<<6|63&n,c>127&&(o=c));break;case 3:n=t[i+1],r=t[i+2],128==(192&n)&&128==(192&r)&&(c=(15&e)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:n=t[i+1],r=t[i+2],s=t[i+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&e)<<18|(63&n)<<12|(63&r)<<6|63&s,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(t){const e=t.length;if(e<=E)return String.fromCharCode.apply(String,t);let n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=E));return n}(r)}l.TYPED_ARRAY_SUPPORT=function(){try{const t=new o(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,o.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(t,e,n){return u(t,e,n)},Object.setPrototypeOf(l.prototype,o.prototype),Object.setPrototypeOf(l,o),l.alloc=function(t,e,n){return function(t,e,n){return h(t),t<=0?c(t):void 0!==e?"string"==typeof n?c(t).fill(e,n):c(t).fill(e):c(t)}(t,e,n)},l.allocUnsafe=function(t){return d(t)},l.allocUnsafeSlow=function(t){return d(t)},l.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==l.prototype},l.compare=function(t,e){if(G(t,o)&&(t=l.from(t,t.offset,t.byteLength)),G(e,o)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,r=e.length;for(let i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);let n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;const r=l.allocUnsafe(e);let i=0;for(n=0;n<t.length;++n){let e=t[n];if(G(e,o))i+e.length>r.length?(l.isBuffer(e)||(e=l.from(e)),e.copy(r,i)):o.prototype.set.call(r,e,i);else{if(!l.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(r,i)}i+=e.length}return r},l.byteLength=y,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)m(this,e,e+1);return this},l.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},l.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},l.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?k(this,0,t):v.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},r&&(l.prototype[r]=l.prototype.inspect),l.prototype.compare=function(t,e,n,r,i){if(G(t,o)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;let a=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0);const c=Math.min(a,s),u=this.slice(r,i),h=t.slice(e,n);for(let o=0;o<c;++o)if(u[o]!==h[o]){a=u[o],s=h[o];break}return a<s?-1:s<a?1:0},l.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},l.prototype.indexOf=function(t,e,n){return b(this,t,e,n,!0)},l.prototype.lastIndexOf=function(t,e,n){return b(this,t,e,n,!1)},l.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":case"latin1":case"binary":return O(this,t,e,n);case"base64":return S(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const E=4096;function A(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function C(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function j(t,e,n){const r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);let i="";for(let o=e;o<n;++o)i+=Q[t[o]];return i}function I(t,e,n){const r=t.slice(e,n);let i="";for(let o=0;o<r.length-1;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function D(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function T(t,e,n,r,i,o){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function R(t,e,n,r,i){U(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,n}function L(t,e,n,r,i){U(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n+7]=o,o>>=8,t[n+6]=o,o>>=8,t[n+5]=o,o>>=8,t[n+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=a,a>>=8,t[n+2]=a,a>>=8,t[n+1]=a,a>>=8,t[n]=a,n+8}function B(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(t,e,r,i,o){return e=+e,r>>>=0,o||B(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function z(t,e,r,i,o){return e=+e,r>>>=0,o||B(t,0,r,8),n.write(t,e,r,i,52,8),r+8}l.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);const r=this.subarray(t,e);return Object.setPrototypeOf(r,l.prototype),r},l.prototype.readUintLE=l.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||D(t,e,this.length);let r=this[t],i=1,o=0;for(;++o<e&&(i*=256);)r+=this[t+o]*i;return r},l.prototype.readUintBE=l.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||D(t,e,this.length);let r=this[t+--e],i=1;for(;e>0&&(i*=256);)r+=this[t+--e]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t>>>=0,e||D(t,1,this.length),this[t]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||D(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||D(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readBigUInt64LE=J(function(t){K(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))}),l.prototype.readBigUInt64BE=J(function(t){K(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),l.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||D(t,e,this.length);let r=this[t],i=1,o=0;for(;++o<e&&(i*=256);)r+=this[t+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},l.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||D(t,e,this.length);let r=e,i=1,o=this[t+--r];for(;r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},l.prototype.readInt8=function(t,e){return t>>>=0,e||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||D(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(t,e){t>>>=0,e||D(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return t>>>=0,e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readBigInt64LE=J(function(t){K(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)}),l.prototype.readBigInt64BE=J(function(t){K(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(r)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+n)}),l.prototype.readFloatLE=function(t,e){return t>>>=0,e||D(t,4,this.length),n.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||D(t,4,this.length),n.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||D(t,8,this.length),n.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||D(t,8,this.length),n.read(this,t,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e>>>=0,n>>>=0,!r){T(this,t,e,n,Math.pow(2,8*n)-1,0)}let i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(t,e,n,r){if(t=+t,e>>>=0,n>>>=0,!r){T(this,t,e,n,Math.pow(2,8*n)-1,0)}let i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigUInt64LE=J(function(t,e=0){return R(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=J(function(t,e=0){return L(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);T(this,t,e,n,r-1,-r)}let i=0,o=1,a=0;for(this[e]=255&t;++i<n&&(o*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/o|0)-a&255;return e+n},l.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);T(this,t,e,n,r-1,-r)}let i=n-1,o=1,a=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/o|0)-a&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigInt64LE=J(function(t,e=0){return R(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=J(function(t,e=0){return L(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeFloatLE=function(t,e,n){return N(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return N(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return z(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return z(this,t,e,!1,n)},l.prototype.copy=function(t,e,n,r){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);const i=r-n;return this===t&&"function"==typeof o.prototype.copyWithin?this.copyWithin(e,n,r):o.prototype.set.call(t,this.subarray(n,r),e),i},l.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){const e=t.charCodeAt(0);("utf8"===r&&e<128||"latin1"===r)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;let i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{const o=l.isBuffer(t)?t:l.from(t,r),a=o.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<n-e;++i)this[i+e]=o[i%a]}return this};const F={};function V(t,e,n){F[t]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function W(t){let e="",n=t.length;const r="-"===t[0]?1:0;for(;n>=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function U(t,e,n,r,i,o){if(t>n||t<e){const n="bigint"==typeof e?"n":"";let r;throw r=0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`,new F.ERR_OUT_OF_RANGE("value",r,t)}!function(t,e,n){K(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||H(e,t.length-(n+1))}(r,i,o)}function K(t,e){if("number"!=typeof t)throw new F.ERR_INVALID_ARG_TYPE(e,"number",t)}function H(t,e,n){if(Math.floor(t)!==t)throw K(t,n),new F.ERR_OUT_OF_RANGE("offset","an integer",t);if(e<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${e}`,t)}V("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),V("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),V("ERR_OUT_OF_RANGE",function(t,e,n){let r=`The value of "${t}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=W(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=W(i)),i+="n"),r+=` It must be ${e}. Received ${i}`,r},RangeError);const $=/[^+/0-9A-Za-z-_]/g;function Y(t,e){let n;e=e||1/0;const r=t.length;let i=null;const o=[];for(let a=0;a<r;++a){if(n=t.charCodeAt(a),n>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function X(t){return e.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace($,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,n,r){let i;for(i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function G(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Z(t){return t!=t}const Q=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)e[r+i]=t[n]+t[i]}return e}();function J(t){return"undefined"==typeof BigInt?tt:t}function tt(){throw new Error("BigInt not supported")}}(nt);const ft=nt.Buffer;function pt(t,e){if(!t)throw new Error("Invariant failed")}function gt(t){return t+.5|0}const yt=(t,e,n)=>Math.max(Math.min(t,n),e);function vt(t){return yt(gt(2.55*t),0,255)}function mt(t){return yt(gt(255*t),0,255)}function bt(t){return yt(gt(t/2.55)/100,0,1)}function xt(t){return yt(gt(100*t),0,100)}const wt={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},_t=[..."0123456789ABCDEF"],Ot=t=>_t[15&t],St=t=>_t[(240&t)>>4]+_t[15&t],Pt=t=>(240&t)>>4==(15&t);function Mt(t){var e=(t=>Pt(t.r)&&Pt(t.g)&&Pt(t.b)&&Pt(t.a))(t)?Ot:St;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const kt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Et(t,e,n){const r=e*Math.min(n,1-n),i=(e,i=(e+t/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return[i(0),i(8),i(4)]}function At(t,e,n){const r=(r,i=(r+t/60)%6)=>n-n*e*Math.max(Math.min(i,4-i,1),0);return[r(5),r(3),r(1)]}function Ct(t,e,n){const r=Et(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)r[i]*=1-e-n,r[i]+=e;return r}function jt(t){const e=t.r/255,n=t.g/255,r=t.b/255,i=Math.max(e,n,r),o=Math.min(e,n,r),a=(i+o)/2;let s,c,l;return i!==o&&(l=i-o,c=a>.5?l/(2-i-o):l/(i+o),s=function(t,e,n,r,i){return t===i?(e-n)/r+(e<n?6:0):e===i?(n-t)/r+2:(t-e)/r+4}(e,n,r,l,i),s=60*s+.5),[0|s,c||0,a]}function It(t,e,n,r){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,r)).map(mt)}function Dt(t,e,n){return It(Et,t,e,n)}function Tt(t){return(t%360+360)%360}function Rt(t){const e=kt.exec(t);let n,r=255;if(!e)return;e[5]!==n&&(r=e[6]?vt(+e[5]):mt(+e[5]));const i=Tt(+e[2]),o=+e[3]/100,a=+e[4]/100;return n="hwb"===e[1]?function(t,e,n){return It(Ct,t,e,n)}(i,o,a):"hsv"===e[1]?function(t,e,n){return It(At,t,e,n)}(i,o,a):Dt(i,o,a),{r:n[0],g:n[1],b:n[2],a:r}}const Lt={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"},Bt={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"};let Nt;function zt(t){Nt||(Nt=function(){const t={},e=Object.keys(Bt),n=Object.keys(Lt);let r,i,o,a,s;for(r=0;r<e.length;r++){for(a=s=e[r],i=0;i<n.length;i++)o=n[i],s=s.replace(o,Lt[o]);o=parseInt(Bt[a],16),t[s]=[o>>16&255,o>>8&255,255&o]}return t}(),Nt.transparent=[0,0,0,0]);const e=Nt[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const Ft=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Vt=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Wt=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Ut(t,e,n){if(t){let r=jt(t);r[e]=Math.max(0,Math.min(r[e]+r[e]*n,0===e?360:1)),r=Dt(r),t.r=r[0],t.g=r[1],t.b=r[2]}}function Kt(t,e){return t?Object.assign(e||{},t):t}function Ht(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=mt(t[3]))):(e=Kt(t,{r:0,g:0,b:0,a:1})).a=mt(e.a),e}function $t(t){return"r"===t.charAt(0)?function(t){const e=Ft.exec(t);let n,r,i,o=255;if(e){if(e[7]!==n){const t=+e[7];o=e[8]?vt(t):yt(255*t,0,255)}return n=+e[1],r=+e[3],i=+e[5],n=255&(e[2]?vt(n):yt(n,0,255)),r=255&(e[4]?vt(r):yt(r,0,255)),i=255&(e[6]?vt(i):yt(i,0,255)),{r:n,g:r,b:i,a:o}}}(t):Rt(t)}class Yt{constructor(t){if(t instanceof Yt)return t;const e=typeof t;let n;"object"===e?n=Ht(t):"string"===e&&(n=function(t){var e,n=t.length;return"#"===t[0]&&(4===n||5===n?e={r:255&17*wt[t[1]],g:255&17*wt[t[2]],b:255&17*wt[t[3]],a:5===n?17*wt[t[4]]:255}:7!==n&&9!==n||(e={r:wt[t[1]]<<4|wt[t[2]],g:wt[t[3]]<<4|wt[t[4]],b:wt[t[5]]<<4|wt[t[6]],a:9===n?wt[t[7]]<<4|wt[t[8]]:255})),e}(t)||zt(t)||$t(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=Kt(this._rgb);return t&&(t.a=bt(t.a)),t}set rgb(t){this._rgb=Ht(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${bt(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?Mt(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=jt(t),n=e[0],r=xt(e[1]),i=xt(e[2]);return t.a<255?`hsla(${n}, ${r}%, ${i}%, ${bt(t.a)})`:`hsl(${n}, ${r}%, ${i}%)`}(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,r=t.rgb;let i;const o=e===i?.5:e,a=2*o-1,s=n.a-r.a,c=((a*s===-1?a:(a+s)/(1+a*s))+1)/2;i=1-c,n.r=255&c*n.r+i*r.r+.5,n.g=255&c*n.g+i*r.g+.5,n.b=255&c*n.b+i*r.b+.5,n.a=o*n.a+(1-o)*r.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,n){const r=Wt(bt(t.r)),i=Wt(bt(t.g)),o=Wt(bt(t.b));return{r:mt(Vt(r+n*(Wt(bt(e.r))-r))),g:mt(Vt(i+n*(Wt(bt(e.g))-i))),b:mt(Vt(o+n*(Wt(bt(e.b))-o))),a:t.a+n*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new Yt(this.rgb)}alpha(t){return this._rgb.a=mt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=gt(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.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 Ut(this._rgb,2,t),this}darken(t){return Ut(this._rgb,2,-t),this}saturate(t){return Ut(this._rgb,1,t),this}desaturate(t){return Ut(this._rgb,1,-t),this}rotate(t){return function(t,e){var n=jt(t);n[0]=Tt(n[0]+e),n=Dt(n),t.r=n[0],t.g=n[1],t.b=n[2]}(this._rgb,t),this}}function Xt(){}const qt=(()=>{let t=0;return()=>t++})();function Gt(t){return null==t}function Zt(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function Qt(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function Jt(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function te(t,e){return Jt(t)?t:e}function ee(t,e){return void 0===t?e:t}const ne=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function re(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)}function ie(t,e,n,r){let i,o,a;if(Zt(t))for(o=t.length,i=0;i<o;i++)e.call(n,t[i],i);else if(Qt(t))for(a=Object.keys(t),o=a.length,i=0;i<o;i++)e.call(n,t[a[i]],a[i])}function oe(t,e){let n,r,i,o;if(!t||!e||t.length!==e.length)return!1;for(n=0,r=t.length;n<r;++n)if(i=t[n],o=e[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function ae(t){if(Zt(t))return t.map(ae);if(Qt(t)){const e=Object.create(null),n=Object.keys(t),r=n.length;let i=0;for(;i<r;++i)e[n[i]]=ae(t[n[i]]);return e}return t}function se(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function ce(t,e,n,r){if(!se(t))return;const i=e[t],o=n[t];Qt(i)&&Qt(o)?le(i,o,r):e[t]=ae(o)}function le(t,e,n){const r=Zt(e)?e:[e],i=r.length;if(!Qt(t))return t;const o=(n=n||{}).merger||ce;let a;for(let s=0;s<i;++s){if(a=r[s],!Qt(a))continue;const e=Object.keys(a);for(let r=0,i=e.length;r<i;++r)o(e[r],t,a,n)}return t}function ue(t,e){return le(t,e,{merger:he})}function he(t,e,n){if(!se(t))return;const r=e[t],i=n[t];Qt(r)&&Qt(i)?ue(r,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=ae(i))}const de={"":t=>t,x:t=>t.x,y:t=>t.y};function fe(t,e){const n=de[e]||(de[e]=function(t){const e=function(t){const e=t.split("."),n=[];let r="";for(const i of e)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}(t);return t=>{for(const n of e){if(""===n)break;t=t&&t[n]}return t}}(e));return n(t)}function pe(t){return t.charAt(0).toUpperCase()+t.slice(1)}const ge=t=>void 0!==t,ye=t=>"function"==typeof t,ve=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};const me=Math.PI,be=2*me,xe=be+me,we=Number.POSITIVE_INFINITY,_e=me/180,Oe=me/2,Se=me/4,Pe=2*me/3,Me=Math.log10,ke=Math.sign;function Ee(t,e,n){return Math.abs(t-e)<n}function Ae(t){const e=Math.round(t);t=Ee(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(Me(t))),r=t/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function Ce(t){return!function(t){return"symbol"==typeof t||"object"==typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function je(t){return t*(me/180)}function Ie(t){if(!Jt(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function De(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Te(t,e){return(t-e+xe)%be-me}function Re(t){return(t%be+be)%be}function Le(t,e,n,r){const i=Re(t),o=Re(e),a=Re(n),s=Re(o-i),c=Re(a-i),l=Re(i-o),u=Re(i-a);return i===o||i===a||r&&o===a||s>c&&l<u}function Be(t,e,n){return Math.max(e,Math.min(n,t))}function Ne(t,e,n,r=1e-6){return t>=Math.min(e,n)-r&&t<=Math.max(e,n)+r}function ze(t,e,n){n=n||(n=>t[n]<e);let r,i=t.length-1,o=0;for(;i-o>1;)r=o+i>>1,n(r)?o=r:i=r;return{lo:o,hi:i}}const Fe=(t,e,n,r)=>ze(t,n,r?r=>{const i=t[r][e];return i<n||i===n&&t[r+1][e]===n}:r=>t[r][e]<n),Ve=(t,e,n)=>ze(t,n,r=>t[r][e]>=n);const We=["push","pop","shift","splice","unshift"];function Ue(t,e){const n=t._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(e);-1!==i&&r.splice(i,1),r.length>0||(We.forEach(e=>{delete t[e]}),delete t._chartjs)}function Ke(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const He="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function $e(t,e){let n=[],r=!1;return function(...i){n=i,r||(r=!0,He.call(window,()=>{r=!1,t.apply(e,n)}))}}const Ye=(t,e,n)=>"start"===t?e:"end"===t?n:(e+n)/2;function Xe(t,e,n){const r=e.length;let i=0,o=r;if(t._sorted){const{iScale:a,vScale:s,_parsed:c}=t,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,u=a.axis,{min:h,max:d,minDefined:f,maxDefined:p}=a.getUserBounds();if(f){if(i=Math.min(Fe(c,u,h).lo,n?r:Fe(e,u,a.getPixelForValue(h)).lo),l){const t=c.slice(0,i+1).reverse().findIndex(t=>!Gt(t[s.axis]));i-=Math.max(0,t)}i=Be(i,0,r-1)}if(p){let t=Math.max(Fe(c,a.axis,d,!0).hi+1,n?0:Fe(e,u,a.getPixelForValue(d),!0).hi+1);if(l){const e=c.slice(t-1).findIndex(t=>!Gt(t[s.axis]));t+=Math.max(0,e)}o=Be(t,i,r)-i}else o=r-i}return{start:i,count:o}}function qe(t){const{xScale:e,yScale:n,_scaleRanges:r}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!r)return t._scaleRanges=i,!0;const o=r.xmin!==e.min||r.xmax!==e.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const Ge=t=>0===t||1===t,Ze=(t,e,n)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*be/n),Qe=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*be/n)+1,Je={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*Oe),easeOutSine:t=>Math.sin(t*Oe),easeInOutSine:t=>-.5*(Math.cos(me*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>Ge(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Ge(t)?t:Ze(t,.075,.3),easeOutElastic:t=>Ge(t)?t:Qe(t,.075,.3),easeInOutElastic(t){const e=.1125;return Ge(t)?t:t<.5?.5*Ze(2*t,e,.45):.5+.5*Qe(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Je.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},easeInOutBounce:t=>t<.5?.5*Je.easeInBounce(2*t):.5*Je.easeOutBounce(2*t-1)+.5};function tn(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function en(t){return tn(t)?t:new Yt(t)}function nn(t){return tn(t)?t:new Yt(t).saturate(.5).darken(.1).hexString()}const rn=["x","y","borderWidth","radius","tension"],on=["color","borderColor","backgroundColor"];const an=new Map;function sn(t,e,n){return function(t,e){e=e||{};const n=t+JSON.stringify(e);let r=an.get(n);return r||(r=new Intl.NumberFormat(t,e),an.set(n,r)),r}(e,n).format(t)}var cn={formatters:{values:t=>Zt(t)?t:""+t,numeric(t,e,n){if(0===t)return"0";const r=this.chart.options.locale;let i,o=t;if(n.length>1){const e=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(e<1e-4||e>1e15)&&(i="scientific"),o=function(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t));return n}(t,n)}const a=Me(Math.abs(o)),s=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),c={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(c,this.options.ticks.format),sn(t,r,c)}}};const ln=Object.create(null),un=Object.create(null);function hn(t,e){if(!e)return t;const n=e.split(".");for(let r=0,i=n.length;r<i;++r){const e=n[r];t=t[e]||(t[e]=Object.create(null))}return t}function dn(t,e,n){return"string"==typeof e?le(hn(t,e),n):le(hn(t,""),e)}class fn{constructor(t,e){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=t=>t.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=(t,e)=>nn(e.backgroundColor),this.hoverBorderColor=(t,e)=>nn(e.borderColor),this.hoverColor=(t,e)=>nn(e.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(e)}set(t,e){return dn(this,t,e)}get(t){return hn(this,t)}describe(t,e){return dn(un,t,e)}override(t,e){return dn(ln,t,e)}route(t,e,n,r){const i=hn(this,t),o=hn(this,n),a="_"+e;Object.defineProperties(i,{[a]:{value:i[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=o[r];return Qt(t)?Object.assign({},e,t):ee(t,e)},set(t){this[a]=t}}})}apply(t){t.forEach(t=>t(this))}}var pn=new fn({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:on},numbers:{type:"number",properties:rn}}),t.describe("animations",{_fallback:"animation"}),t.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=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.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,e)=>e.lineWidth,tickColor:(t,e)=>e.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:cn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function gn(t,e,n,r,i){let o=e[i];return o||(o=e[i]=t.measureText(i).width,n.push(i)),o>r&&(r=o),r}function yn(t,e,n){const r=t.currentDevicePixelRatio,i=0!==n?Math.max(n/2,.5):0;return Math.round((e-i)*r)/r+i}function vn(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function mn(t,e,n,r){!function(t,e,n,r){let i,o,a,s,c,l,u,h;const d=e.pointStyle,f=e.rotation,p=e.radius;let g=(f||0)*_e;if(d&&"object"==typeof d&&(i=d.toString(),"[object HTMLImageElement]"===i||"[object HTMLCanvasElement]"===i))return t.save(),t.translate(n,r),t.rotate(g),t.drawImage(d,-d.width/2,-d.height/2,d.width,d.height),void t.restore();if(isNaN(p)||p<=0)return;switch(t.beginPath(),d){default:t.arc(n,r,p,0,be),t.closePath();break;case"triangle":l=p,t.moveTo(n+Math.sin(g)*l,r-Math.cos(g)*p),g+=Pe,t.lineTo(n+Math.sin(g)*l,r-Math.cos(g)*p),g+=Pe,t.lineTo(n+Math.sin(g)*l,r-Math.cos(g)*p),t.closePath();break;case"rectRounded":c=.516*p,s=p-c,o=Math.cos(g+Se)*s,u=Math.cos(g+Se)*s,a=Math.sin(g+Se)*s,h=Math.sin(g+Se)*s,t.arc(n-u,r-a,c,g-me,g-Oe),t.arc(n+h,r-o,c,g-Oe,g),t.arc(n+u,r+a,c,g,g+Oe),t.arc(n-h,r+o,c,g+Oe,g+me),t.closePath();break;case"rect":if(!f){s=Math.SQRT1_2*p,l=s,t.rect(n-l,r-s,2*l,2*s);break}g+=Se;case"rectRot":u=Math.cos(g)*p,o=Math.cos(g)*p,a=Math.sin(g)*p,h=Math.sin(g)*p,t.moveTo(n-u,r-a),t.lineTo(n+h,r-o),t.lineTo(n+u,r+a),t.lineTo(n-h,r+o),t.closePath();break;case"crossRot":g+=Se;case"cross":u=Math.cos(g)*p,o=Math.cos(g)*p,a=Math.sin(g)*p,h=Math.sin(g)*p,t.moveTo(n-u,r-a),t.lineTo(n+u,r+a),t.moveTo(n+h,r-o),t.lineTo(n-h,r+o);break;case"star":u=Math.cos(g)*p,o=Math.cos(g)*p,a=Math.sin(g)*p,h=Math.sin(g)*p,t.moveTo(n-u,r-a),t.lineTo(n+u,r+a),t.moveTo(n+h,r-o),t.lineTo(n-h,r+o),g+=Se,u=Math.cos(g)*p,o=Math.cos(g)*p,a=Math.sin(g)*p,h=Math.sin(g)*p,t.moveTo(n-u,r-a),t.lineTo(n+u,r+a),t.moveTo(n+h,r-o),t.lineTo(n-h,r+o);break;case"line":o=Math.cos(g)*p,a=Math.sin(g)*p,t.moveTo(n-o,r-a),t.lineTo(n+o,r+a);break;case"dash":t.moveTo(n,r),t.lineTo(n+Math.cos(g)*p,r+Math.sin(g)*p);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}(t,e,n,r)}function bn(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function xn(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function wn(t){t.restore()}function _n(t,e,n,r,i){if(!e)return t.lineTo(n.x,n.y);if("middle"===i){const r=(e.x+n.x)/2;t.lineTo(r,e.y),t.lineTo(r,n.y)}else"after"===i!=!!r?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function On(t,e,n,r){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(r?e.cp1x:e.cp2x,r?e.cp1y:e.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function Sn(t,e,n,r,i){if(i.strikethrough||i.underline){const o=t.measureText(r),a=e-o.actualBoundingBoxLeft,s=e+o.actualBoundingBoxRight,c=n-o.actualBoundingBoxAscent,l=n+o.actualBoundingBoxDescent,u=i.strikethrough?(c+l)/2:l;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(a,u),t.lineTo(s,u),t.stroke()}}function Pn(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Mn(t,e,n,r,i,o={}){const a=Zt(e)?e:[e],s=o.strokeWidth>0&&""!==o.strokeColor;let c,l;for(t.save(),t.font=i.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Gt(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),c=0;c<a.length;++c)l=a[c],o.backdrop&&Pn(t,o.backdrop),s&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),Gt(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(l,n,r,o.maxWidth)),t.fillText(l,n,r,o.maxWidth),Sn(t,n,r,l,o),r+=Number(i.lineHeight);t.restore()}function kn(t,e){const{x:n,y:r,w:i,h:o,radius:a}=e;t.arc(n+a.topLeft,r+a.topLeft,a.topLeft,1.5*me,me,!0),t.lineTo(n,r+o-a.bottomLeft),t.arc(n+a.bottomLeft,r+o-a.bottomLeft,a.bottomLeft,me,Oe,!0),t.lineTo(n+i-a.bottomRight,r+o),t.arc(n+i-a.bottomRight,r+o-a.bottomRight,a.bottomRight,Oe,0,!0),t.lineTo(n+i,r+a.topRight),t.arc(n+i-a.topRight,r+a.topRight,a.topRight,0,-Oe,!0),t.lineTo(n+a.topLeft,r)}const En=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,An=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Cn(t,e){const n=(""+t).match(En);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t}const jn=t=>+t||0;function In(t,e){const n={},r=Qt(e),i=r?Object.keys(e):e,o=Qt(t)?r?n=>ee(t[n],t[e[n]]):e=>t[e]:()=>t;for(const a of i)n[a]=jn(o(a));return n}function Dn(t){return In(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Tn(t){return In(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Rn(t){const e=Dn(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ln(t,e){t=t||{},e=e||pn.font;let n=ee(t.size,e.size);"string"==typeof n&&(n=parseInt(n,10));let r=ee(t.style,e.style);r&&!(""+r).match(An)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:ee(t.family,e.family),lineHeight:Cn(ee(t.lineHeight,e.lineHeight),n),size:n,style:r,weight:ee(t.weight,e.weight),string:""};return i.string=function(t){return!t||Gt(t.size)||Gt(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(i),i}function Bn(t,e,n,r){let i,o,a;for(i=0,o=t.length;i<o;++i)if(a=t[i],void 0!==a&&void 0!==a)return a}function Nn(t,e){return Object.assign(Object.create(t),e)}function zn(t,e=[""],n,r,i=()=>t[0]){const o=n||t;void 0===r&&(r=Gn("_fallback",t));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:r,_getTarget:i,override:n=>zn([n,...t],e,o,r)};return new Proxy(a,{deleteProperty:(e,n)=>(delete e[n],delete e._keys,delete t[0][n],!0),get:(n,r)=>Kn(n,r,()=>function(t,e,n,r){let i;for(const o of e)if(i=Gn(Wn(o,t),n),void 0!==i)return Un(t,i)?Xn(n,r,t,i):i}(r,e,t,n)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Zn(t).includes(e),ownKeys:t=>Zn(t),set(t,e,n){const r=t._storage||(t._storage=i());return t[e]=r[e]=n,delete t._keys,!0}})}function Fn(t,e,n,r){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Vn(t,r),setContext:e=>Fn(t,e,n,r),override:i=>Fn(t.override(i),e,n,r)};return new Proxy(i,{deleteProperty:(e,n)=>(delete e[n],delete t[n],!0),get:(t,e,n)=>Kn(t,e,()=>function(t,e,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:a}=t;let s=r[e];ye(s)&&a.isScriptable(e)&&(s=function(t,e,n,r){const{_proxy:i,_context:o,_subProxy:a,_stack:s}=n;if(s.has(t))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+t);s.add(t);let c=e(o,a||r);s.delete(t),Un(t,c)&&(c=Xn(i._scopes,i,t,c));return c}(e,s,t,n));Zt(s)&&s.length&&(s=function(t,e,n,r){const{_proxy:i,_context:o,_subProxy:a,_descriptors:s}=n;if(void 0!==o.index&&r(t))return e[o.index%e.length];if(Qt(e[0])){const n=e,r=i._scopes.filter(t=>t!==n);e=[];for(const c of n){const n=Xn(r,i,t,c);e.push(Fn(n,o,a&&a[t],s))}}return e}(e,s,t,a.isIndexable));Un(e,s)&&(s=Fn(s,i,o&&o[e],a));return s}(t,e,n)),getOwnPropertyDescriptor:(e,n)=>e._descriptors.allKeys?Reflect.has(t,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,n),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,n)=>Reflect.has(t,n),ownKeys:()=>Reflect.ownKeys(t),set:(e,n,r)=>(t[n]=r,delete e[n],!0)})}function Vn(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:r=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:r,isScriptable:ye(n)?n:()=>n,isIndexable:ye(r)?r:()=>r}}const Wn=(t,e)=>t?t+pe(e):e,Un=(t,e)=>Qt(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Kn(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const r=n();return t[e]=r,r}function Hn(t,e,n){return ye(t)?t(e,n):t}const $n=(t,e)=>!0===t?e:"string"==typeof t?fe(e,t):void 0;function Yn(t,e,n,r,i){for(const o of e){const e=$n(n,o);if(e){t.add(e);const o=Hn(e._fallback,n,i);if(void 0!==o&&o!==n&&o!==r)return o}else if(!1===e&&void 0!==r&&n!==r)return null}return!1}function Xn(t,e,n,r){const i=e._rootScopes,o=Hn(e._fallback,n,r),a=[...t,...i],s=new Set;s.add(r);let c=qn(s,a,n,o||n,r);return null!==c&&((void 0===o||o===n||(c=qn(s,a,o,c,r),null!==c))&&zn(Array.from(s),[""],i,o,()=>function(t,e,n){const r=t._getTarget();e in r||(r[e]={});const i=r[e];if(Zt(i)&&Qt(n))return n;return i||{}}(e,n,r)))}function qn(t,e,n,r,i){for(;n;)n=Yn(t,e,n,r,i);return n}function Gn(t,e){for(const n of e){if(!n)continue;const e=n[t];if(void 0!==e)return e}}function Zn(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const n of t)for(const t of Object.keys(n).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}function Qn(t,e,n,r){const{iScale:i}=t,{key:o="r"}=this._parsing,a=new Array(r);let s,c,l,u;for(s=0,c=r;s<c;++s)l=s+n,u=e[l],a[s]={r:i.parse(fe(u,o),l)};return a}const Jn=Number.EPSILON||1e-14,tr=(t,e)=>e<t.length&&!t[e].skip&&t[e],er=t=>"x"===t?"y":"x";function nr(t,e,n,r){const i=t.skip?e:t,o=e,a=n.skip?e:n,s=De(o,i),c=De(a,o);let l=s/(s+c),u=c/(s+c);l=isNaN(l)?0:l,u=isNaN(u)?0:u;const h=r*l,d=r*u;return{previous:{x:o.x-h*(a.x-i.x),y:o.y-h*(a.y-i.y)},next:{x:o.x+d*(a.x-i.x),y:o.y+d*(a.y-i.y)}}}function rr(t,e="x"){const n=er(e),r=t.length,i=Array(r).fill(0),o=Array(r);let a,s,c,l=tr(t,0);for(a=0;a<r;++a)if(s=c,c=l,l=tr(t,a+1),c){if(l){const t=l[e]-c[e];i[a]=0!==t?(l[n]-c[n])/t:0}o[a]=s?l?ke(i[a-1])!==ke(i[a])?0:(i[a-1]+i[a])/2:i[a-1]:i[a]}!function(t,e,n){const r=t.length;let i,o,a,s,c,l=tr(t,0);for(let u=0;u<r-1;++u)c=l,l=tr(t,u+1),c&&l&&(Ee(e[u],0,Jn)?n[u]=n[u+1]=0:(i=n[u]/e[u],o=n[u+1]/e[u],s=Math.pow(i,2)+Math.pow(o,2),s<=9||(a=3/Math.sqrt(s),n[u]=i*a*e[u],n[u+1]=o*a*e[u])))}(t,i,o),function(t,e,n="x"){const r=er(n),i=t.length;let o,a,s,c=tr(t,0);for(let l=0;l<i;++l){if(a=s,s=c,c=tr(t,l+1),!s)continue;const i=s[n],u=s[r];a&&(o=(i-a[n])/3,s[`cp1${n}`]=i-o,s[`cp1${r}`]=u-o*e[l]),c&&(o=(c[n]-i)/3,s[`cp2${n}`]=i+o,s[`cp2${r}`]=u+o*e[l])}}(t,o,e)}function ir(t,e,n){return Math.max(Math.min(t,n),e)}function or(t,e,n,r,i){let o,a,s,c;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)rr(t,i);else{let n=r?t[t.length-1]:t[0];for(o=0,a=t.length;o<a;++o)s=t[o],c=nr(n,s,t[Math.min(o+1,a-(r?0:1))%a],e.tension),s.cp1x=c.previous.x,s.cp1y=c.previous.y,s.cp2x=c.next.x,s.cp2y=c.next.y,n=s}e.capBezierPoints&&function(t,e){let n,r,i,o,a,s=bn(t[0],e);for(n=0,r=t.length;n<r;++n)a=o,o=s,s=n<r-1&&bn(t[n+1],e),o&&(i=t[n],a&&(i.cp1x=ir(i.cp1x,e.left,e.right),i.cp1y=ir(i.cp1y,e.top,e.bottom)),s&&(i.cp2x=ir(i.cp2x,e.left,e.right),i.cp2y=ir(i.cp2y,e.top,e.bottom)))}(t,n)}function ar(){return"undefined"!=typeof window&&"undefined"!=typeof document}function sr(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function cr(t,e,n){let r;return"string"==typeof t?(r=parseInt(t,10),-1!==t.indexOf("%")&&(r=r/100*e.parentNode[n])):r=t,r}const lr=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);const ur=["top","right","bottom","left"];function hr(t,e,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=ur[i];r[o]=parseFloat(t[e+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}function dr(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:r}=e,i=lr(n),o="border-box"===i.boxSizing,a=hr(i,"padding"),s=hr(i,"border","width"),{x:c,y:l,box:u}=function(t,e){const n=t.touches,r=n&&n.length?n[0]:t,{offsetX:i,offsetY:o}=r;let a,s,c=!1;if(((t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot))(i,o,t.target))a=i,s=o;else{const t=e.getBoundingClientRect();a=r.clientX-t.left,s=r.clientY-t.top,c=!0}return{x:a,y:s,box:c}}(t,n),h=a.left+(u&&s.left),d=a.top+(u&&s.top);let{width:f,height:p}=e;return o&&(f-=a.width+s.width,p-=a.height+s.height),{x:Math.round((c-h)/f*n.width/r),y:Math.round((l-d)/p*n.height/r)}}const fr=t=>Math.round(10*t)/10;function pr(t,e,n,r){const i=lr(t),o=hr(i,"margin"),a=cr(i.maxWidth,t,"clientWidth")||we,s=cr(i.maxHeight,t,"clientHeight")||we,c=function(t,e,n){let r,i;if(void 0===e||void 0===n){const o=t&&sr(t);if(o){const t=o.getBoundingClientRect(),a=lr(o),s=hr(a,"border","width"),c=hr(a,"padding");e=t.width-c.width-s.width,n=t.height-c.height-s.height,r=cr(a.maxWidth,o,"clientWidth"),i=cr(a.maxHeight,o,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:r||we,maxHeight:i||we}}(t,e,n);let{width:l,height:u}=c;if("content-box"===i.boxSizing){const t=hr(i,"border","width"),e=hr(i,"padding");l-=e.width+t.width,u-=e.height+t.height}l=Math.max(0,l-o.width),u=Math.max(0,r?l/r:u-o.height),l=fr(Math.min(l,a,c.maxWidth)),u=fr(Math.min(u,s,c.maxHeight)),l&&!u&&(u=fr(l/2));return(void 0!==e||void 0!==n)&&r&&c.height&&u>c.height&&(u=c.height,l=fr(Math.floor(u*r))),{width:l,height:u}}function gr(t,e,n){const r=e||1,i=fr(t.height*r),o=fr(t.width*r);t.height=fr(t.height),t.width=fr(t.width);const a=t.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==r||a.height!==i||a.width!==o)&&(t.currentDevicePixelRatio=r,a.height=i,a.width=o,t.ctx.setTransform(r,0,0,r,0,0),!0)}const yr=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};ar()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(e){}return t}();function vr(t,e){const n=function(t,e){return lr(t).getPropertyValue(e)}(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function mr(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function br(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:"middle"===r?n<.5?t.y:e.y:"after"===r?n<1?t.y:e.y:n>0?e.y:t.y}}function xr(t,e,n,r){const i={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},a=mr(t,i,n),s=mr(i,o,n),c=mr(o,e,n),l=mr(a,s,n),u=mr(s,c,n);return mr(l,u,n)}function wr(t,e,n){return t?function(t,e){return{x:n=>t+t+e-n,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,n):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function _r(t){return"angle"===t?{between:Le,compare:Te,normalize:Re}:{between:Ne,compare:(t,e)=>t-e,normalize:t=>t}}function Or({start:t,end:e,count:n,loop:r,style:i}){return{start:t%n,end:e%n,loop:r&&(e-t+1)%n==0,style:i}}function Sr(t,e,n){if(!n)return[t];const{property:r,start:i,end:o}=n,a=e.length,{compare:s,between:c,normalize:l}=_r(r),{start:u,end:h,loop:d,style:f}=function(t,e,n){const{property:r,start:i,end:o}=n,{between:a,normalize:s}=_r(r),c=e.length;let l,u,{start:h,end:d,loop:f}=t;if(f){for(h+=c,d+=c,l=0,u=c;l<u&&a(s(e[h%c][r]),i,o);++l)h--,d--;h%=c,d%=c}return d<h&&(d+=c),{start:h,end:d,loop:f,style:t.style}}(t,e,n),p=[];let g,y,v,m=!1,b=null;const x=()=>m||c(i,v,g)&&0!==s(i,v),w=()=>!m||0===s(o,g)||c(o,v,g);for(let _=u,O=u;_<=h;++_)y=e[_%a],y.skip||(g=l(y[r]),g!==v&&(m=c(g,i,o),null===b&&x()&&(b=0===s(g,i)?_:O),null!==b&&w()&&(p.push(Or({start:b,end:_,loop:d,count:a,style:f})),b=null),O=_,v=g));return null!==b&&p.push(Or({start:b,end:h,loop:d,count:a,style:f})),p}function Pr(t,e,n,r){return r&&r.setContext&&n?function(t,e,n,r){const i=t._chart.getContext(),o=Mr(t.options),{_datasetIndex:a,options:{spanGaps:s}}=t,c=n.length,l=[];let u=o,h=e[0].start,d=h;function f(t,e,r,i){const o=s?-1:1;if(t!==e){for(t+=c;n[t%c].skip;)t-=o;for(;n[e%c].skip;)e+=o;t%c!==e%c&&(l.push({start:t%c,end:e%c,loop:r,style:i}),u=i,h=e%c)}}for(const p of e){h=s?h:p.start;let t,e=n[h%c];for(d=h+1;d<=p.end;d++){const o=n[d%c];t=Mr(r.setContext(Nn(i,{type:"segment",p0:e,p1:o,p0DataIndex:(d-1)%c,p1DataIndex:d%c,datasetIndex:a}))),kr(t,u)&&f(h,d-1,p.loop,u),e=o,u=t}h<d-1&&f(h,d-1,p.loop,u)}return l}(t,e,n,r):e}function Mr(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function kr(t,e){if(!e)return!1;const n=[],r=function(t,e){return tn(e)?(n.includes(e)||n.push(e),n.indexOf(e)):e};return JSON.stringify(t,r)!==JSON.stringify(e,r)}function Er(t,e,n){return t.options.clip?t[n]:e[n]}function Ar(t,e){const n=e._clip;if(n.disabled)return!1;const r=function(t,e){const{xScale:n,yScale:r}=t;return n&&r?{left:Er(n,e,"left"),right:Er(n,e,"right"),top:Er(r,e,"top"),bottom:Er(r,e,"bottom")}:e}(e,t.chartArea);return{left:!1===n.left?0:r.left-(!0===n.left?0:n.left),right:!1===n.right?t.width:r.right+(!0===n.right?0:n.right),top:!1===n.top?0:r.top-(!0===n.top?0:n.top),bottom:!1===n.bottom?t.height:r.bottom+(!0===n.bottom?0:n.bottom)}}class Cr{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,r){const i=e.listeners[r],o=e.duration;i.forEach(r=>r({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(n-e.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=He.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((n,r)=>{if(!n.running||!n.items.length)return;const i=n.items;let o,a=i.length-1,s=!1;for(;a>=0;--a)o=i[a],o._active?(o._total>n.duration&&(n.duration=o._total),o.tick(t),s=!0):(i[a]=i[i.length-1],i.pop());s&&(r.draw(),this._notify(r,n,t,"progress")),i.length||(n.running=!1,this._notify(r,n,t,"complete"),n.initial=!1),e+=i.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let r=n.length-1;for(;r>=0;--r)n[r].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var jr=new Cr;const Ir="transparent",Dr={boolean:(t,e,n)=>n>.5?e:t,color(t,e,n){const r=en(t||Ir),i=r.valid&&en(e||Ir);return i&&i.valid?i.mix(r,n).hexString():e},number:(t,e,n)=>t+(e-t)*n};class Tr{constructor(t,e,n,r){const i=e[n];r=Bn([t.to,r,i,t.from]);const o=Bn([t.from,i,r]);this._active=!0,this._fn=t.fn||Dr[t.type||typeof o],this._easing=Je[t.easing]||Je.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=o,this._to=r,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const r=this._target[this._prop],i=n-this._start,o=this._duration-i;this._start=n,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=i,this._loop=!!t.loop,this._to=Bn([t.to,e,r,t.from]),this._from=Bn([t.from,r,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,r=this._prop,i=this._from,o=this._loop,a=this._to;let s;if(this._active=i!==a&&(o||e<n),!this._active)return this._target[r]=a,void this._notify(!0);e<0?this._target[r]=i:(s=e/n%2,s=o&&s>1?2-s:s,s=this._easing(Math.min(1,Math.max(0,s))),this._target[r]=this._fn(i,a,s))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,n)=>{t.push({res:e,rej:n})})}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let r=0;r<n.length;r++)n[r][e]()}}class Rr{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!Qt(t))return;const e=Object.keys(pn.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const i=t[r];if(!Qt(i))return;const o={};for(const t of e)o[t]=i[t];(Zt(i.properties)&&i.properties||[r]).forEach(t=>{t!==r&&n.has(t)||n.set(t,o)})})}_animateOptions(t,e){const n=e.options,r=function(t,e){if(!e)return;let n=t.options;if(!n)return void(t.options=e);n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}}));return n}(t,n);if(!r)return[];const i=this._createAnimations(r,n);return n.$shared&&function(t,e){const n=[],r=Object.keys(e);for(let i=0;i<r.length;i++){const e=t[r[i]];e&&e.active()&&n.push(e.wait())}return Promise.all(n)}(t.options.$animations,n).then(()=>{t.options=n},()=>{}),i}_createAnimations(t,e){const n=this._properties,r=[],i=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now();let s;for(s=o.length-1;s>=0;--s){const c=o[s];if("$"===c.charAt(0))continue;if("options"===c){r.push(...this._animateOptions(t,e));continue}const l=e[c];let u=i[c];const h=n.get(c);if(u){if(h&&u.active()){u.update(h,l,a);continue}u.cancel()}h&&h.duration?(i[c]=u=new Tr(h,t,c,l),r.push(u)):t[c]=l}return r}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const n=this._createAnimations(t,e);return n.length?(jr.add(this._chart,n),!0):void 0}}function Lr(t,e){const n=t&&t.options||{},r=n.reverse,i=void 0===n.min?e:0,o=void 0===n.max?e:0;return{start:r?o:i,end:r?i:o}}function Br(t,e){const n=[],r=t._getSortedDatasetMetas(e);let i,o;for(i=0,o=r.length;i<o;++i)n.push(r[i].index);return n}function Nr(t,e,n,r={}){const i=t.keys,o="single"===r.mode;let a,s,c,l;if(null===e)return;let u=!1;for(a=0,s=i.length;a<s;++a){if(c=+i[a],c===n){if(u=!0,r.all)continue;break}l=t.values[c],Jt(l)&&(o||0===e||ke(e)===ke(l))&&(e+=l)}return u||r.all?e:0}function zr(t,e){const n=t&&t.options.stacked;return n||void 0===n&&void 0!==e.stack}function Fr(t,e,n){const r=t[e]||(t[e]={});return r[n]||(r[n]={})}function Vr(t,e,n,r){for(const i of e.getMatchingVisibleMetas(r).reverse()){const e=t[i.index];if(n&&e>0||!n&&e<0)return i.index}return null}function Wr(t,e){const{chart:n,_cachedMeta:r}=t,i=n._stacks||(n._stacks={}),{iScale:o,vScale:a,index:s}=r,c=o.axis,l=a.axis,u=function(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}(o,a,r),h=e.length;let d;for(let f=0;f<h;++f){const t=e[f],{[c]:n,[l]:o}=t;d=(t._stacks||(t._stacks={}))[l]=Fr(i,u,n),d[s]=o,d._top=Vr(d,a,!0,r.type),d._bottom=Vr(d,a,!1,r.type);(d._visualValues||(d._visualValues={}))[s]=o}}function Ur(t,e){const n=t.scales;return Object.keys(n).filter(t=>n[t].axis===e).shift()}function Kr(t,e){const n=t.controller.index,r=t.vScale&&t.vScale.axis;if(r){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[r]||void 0===e[r][n])return;delete e[r][n],void 0!==e[r]._visualValues&&void 0!==e[r]._visualValues[n]&&delete e[r]._visualValues[n]}}}const Hr=t=>"reset"===t||"none"===t,$r=(t,e)=>e?t:Object.assign({},t);class Yr{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,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=zr(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&&Kr(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),r=(t,e,n,r)=>"x"===t?e:"r"===t?r:n,i=e.xAxisID=ee(n.xAxisID,Ur(t,"x")),o=e.yAxisID=ee(n.yAxisID,Ur(t,"y")),a=e.rAxisID=ee(n.rAxisID,Ur(t,"r")),s=e.indexAxis,c=e.iAxisID=r(s,i,o,a),l=e.vAxisID=r(s,o,i,a);e.xScale=this.getScaleForId(i),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(l)}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 e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Ue(this._data,this),t._stacked&&Kr(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(Qt(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:n,vScale:r}=e,i="x"===n.axis?"x":"y",o="x"===r.axis?"x":"y",a=Object.keys(t),s=new Array(a.length);let c,l,u;for(c=0,l=a.length;c<l;++c)u=a[c],s[c]={[i]:u,[o]:t[u]};return s}(e,t)}else if(n!==e){if(n){Ue(n,this);const t=this._cachedMeta;Kr(t),t._parsed=[]}e&&Object.isExtensible(e)&&(i=this,(r=e)._chartjs?r._chartjs.listeners.push(i):(Object.defineProperty(r,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[i]}}),We.forEach(t=>{const e="_onData"+pe(t),n=r[t];Object.defineProperty(r,t,{configurable:!0,enumerable:!1,value(...t){const i=n.apply(this,t);return r._chartjs.listeners.forEach(n=>{"function"==typeof n[e]&&n[e](...t)}),i}})}))),this._syncList=[],this._data=e}var r,i}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let r=!1;this._dataCheck();const i=e._stacked;e._stacked=zr(e.vScale,e),e.stack!==n.stack&&(r=!0,Kr(e),e.stack=n.stack),this._resyncElements(t),(r||i!==e._stacked)&&(Wr(this,e._parsed),e._stacked=zr(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:r}=this,{iScale:i,_stacked:o}=n,a=i.axis;let s,c,l,u=0===t&&e===r.length||n._sorted,h=t>0&&n._parsed[t-1];if(!1===this._parsing)n._parsed=r,n._sorted=!0,l=r;else{l=Zt(r[t])?this.parseArrayData(n,r,t,e):Qt(r[t])?this.parseObjectData(n,r,t,e):this.parsePrimitiveData(n,r,t,e);const i=()=>null===c[a]||h&&c[a]<h[a];for(s=0;s<e;++s)n._parsed[s+t]=c=l[s],u&&(i()&&(u=!1),h=c);n._sorted=u}o&&Wr(this,l)}parsePrimitiveData(t,e,n,r){const{iScale:i,vScale:o}=t,a=i.axis,s=o.axis,c=i.getLabels(),l=i===o,u=new Array(r);let h,d,f;for(h=0,d=r;h<d;++h)f=h+n,u[h]={[a]:l||i.parse(c[f],f),[s]:o.parse(e[f],f)};return u}parseArrayData(t,e,n,r){const{xScale:i,yScale:o}=t,a=new Array(r);let s,c,l,u;for(s=0,c=r;s<c;++s)l=s+n,u=e[l],a[s]={x:i.parse(u[0],l),y:o.parse(u[1],l)};return a}parseObjectData(t,e,n,r){const{xScale:i,yScale:o}=t,{xAxisKey:a="x",yAxisKey:s="y"}=this._parsing,c=new Array(r);let l,u,h,d;for(l=0,u=r;l<u;++l)h=l+n,d=e[h],c[l]={x:i.parse(fe(d,a),h),y:o.parse(fe(d,s),h)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){const r=this.chart,i=this._cachedMeta,o=e[t.axis];return Nr({keys:Br(r,!0),values:e._stacks[t.axis]._visualValues},o,i.index,{mode:n})}updateRangeFromParsed(t,e,n,r){const i=n[e.axis];let o=null===i?NaN:i;const a=r&&n._stacks[e.axis];r&&a&&(r.values=a,o=Nr(r,i,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const n=this._cachedMeta,r=n._parsed,i=n._sorted&&t===n.iScale,o=r.length,a=this._getOtherScale(t),s=((t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Br(n,!0),values:null})(e,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:l,max:u}=function(t){const{min:e,max:n,minDefined:r,maxDefined:i}=t.getUserBounds();return{min:r?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}(a);let h,d;function f(){d=r[h];const e=d[a.axis];return!Jt(d[t.axis])||l>e||u<e}for(h=0;h<o&&(f()||(this.updateRangeFromParsed(c,t,d,s),!i));++h);if(i)for(h=o-1;h>=0;--h)if(!f()){this.updateRangeFromParsed(c,t,d,s);break}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let r,i,o;for(r=0,i=e.length;r<i;++r)o=e[r][t.axis],Jt(o)&&n.push(o);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,n=e.iScale,r=e.vScale,i=this.getParsed(t);return{label:n?""+n.getLabelForValue(i[n.axis]):"",value:r?""+r.getLabelForValue(i[r.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,n,r,i;return Qt(t)?(e=t.top,n=t.right,r=t.bottom,i=t.left):e=n=r=i=t,{top:e,right:n,bottom:r,left:i,disabled:!1===t}}(ee(this.options.clip,function(t,e,n){if(!1===n)return!1;const r=Lr(t,n),i=Lr(e,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,n=this._cachedMeta,r=n.data||[],i=e.chartArea,o=[],a=this._drawStart||0,s=this._drawCount||r.length-a,c=this.options.drawActiveElementsOnTop;let l;for(n.dataset&&n.dataset.draw(t,i,a,s),l=a;l<a+s;++l){const e=r[l];e.hidden||(e.active&&c?o.push(e):e.draw(t,i))}for(l=0;l<o.length;++l)o[l].draw(t,i)}getStyle(t,e){const n=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){const r=this.getDataset();let i;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];i=e.$context||(e.$context=function(t,e,n){return Nn(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),i.parsed=this.getParsed(t),i.raw=r.data[t],i.index=i.dataIndex=t}else i=this.$context||(this.$context=function(t,e){return Nn(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),i.dataset=r,i.index=i.datasetIndex=this.index;return i.active=!!e,i.mode=n,i}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",n){const r="active"===e,i=this._cachedDataOpts,o=t+"-"+e,a=i[o],s=this.enableOptionSharing&&ge(n);if(a)return $r(a,s);const c=this.chart.config,l=c.datasetElementScopeKeys(this._type,t),u=r?[`${t}Hover`,"hover",t,""]:[t,""],h=c.getOptionScopes(this.getDataset(),l),d=Object.keys(pn.elements[t]),f=c.resolveNamedOptions(h,d,()=>this.getContext(n,r,e),u);return f.$shared&&(f.$shared=s,i[o]=Object.freeze($r(f,s))),f}_resolveAnimations(t,e,n){const r=this.chart,i=this._cachedDataOpts,o=`animation-${e}`,a=i[o];if(a)return a;let s;if(!1!==r.options.animation){const r=this.chart.config,i=r.datasetAnimationScopeKeys(this._type,e),o=r.getOptionScopes(this.getDataset(),i);s=r.createResolver(o,this.getContext(t,n,e))}const c=new Rr(r,s&&s.animations);return s&&s._cacheable&&(i[o]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Hr(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),r=this._sharedOptions,i=this.getSharedOptions(n),o=this.includeOptions(e,i)||i!==r;return this.updateSharedOptions(i,e,n),{sharedOptions:i,includeOptions:o}}updateElement(t,e,n,r){Hr(r)?Object.assign(t,n):this._resolveAnimations(e,r).update(t,n)}updateSharedOptions(t,e,n){t&&!Hr(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,r){t.active=r;const i=this.getStyle(e,r);this._resolveAnimations(e,n,r).update(t,{options:!r&&this.getSharedOptions(i)||i})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"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 e=this._data,n=this._cachedMeta.data;for(const[a,s,c]of this._syncList)this[a](s,c);this._syncList=[];const r=n.length,i=e.length,o=Math.min(i,r);o&&this.parse(0,o),i>r?this._insertElements(r,i-r,t):i<r&&this._removeElements(i,r-i)}_insertElements(t,e,n=!0){const r=this._cachedMeta,i=r.data,o=t+e;let a;const s=t=>{for(t.length+=e,a=t.length-1;a>=o;a--)t[a]=t[a-e]};for(s(i),a=t;a<o;++a)i[a]=new this.dataElementType;this._parsing&&s(r._parsed),this.parse(t,e),n&&this.updateElements(i,t,e,"reset")}updateElements(t,e,n,r){}_removeElements(t,e){const n=this._cachedMeta;if(this._parsing){const r=n._parsed.splice(t,e);n._stacked&&Kr(n,r)}n.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,n,r]=t;this[e](n,r)}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,e){e&&this._sync(["_removeElements",t,e]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Xr(t){const e=t.iScale,n=function(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let r=[];for(let e=0,i=n.length;e<i;e++)r=r.concat(n[e].controller.getAllParsedValues(t));t._cache.$bar=Ke(r.sort((t,e)=>t-e))}return t._cache.$bar}(e,t.type);let r,i,o,a,s=e._length;const c=()=>{32767!==o&&-32768!==o&&(ge(a)&&(s=Math.min(s,Math.abs(o-a)||s)),a=o)};for(r=0,i=n.length;r<i;++r)o=e.getPixelForValue(n[r]),c();for(a=void 0,r=0,i=e.ticks.length;r<i;++r)o=e.getPixelForTick(r),c();return s}function qr(t,e,n,r){return Zt(t)?function(t,e,n,r){const i=n.parse(t[0],r),o=n.parse(t[1],r),a=Math.min(i,o),s=Math.max(i,o);let c=a,l=s;Math.abs(a)>Math.abs(s)&&(c=s,l=a),e[n.axis]=l,e._custom={barStart:c,barEnd:l,start:i,end:o,min:a,max:s}}(t,e,n,r):e[n.axis]=n.parse(t,r),e}function Gr(t,e,n,r){const i=t.iScale,o=t.vScale,a=i.getLabels(),s=i===o,c=[];let l,u,h,d;for(l=n,u=n+r;l<u;++l)d=e[l],h={},h[i.axis]=s||i.parse(a[l],l),c.push(qr(d,h,o,l));return c}function Zr(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function Qr(t,e,n,r){let i=e.borderSkipped;const o={};if(!i)return void(t.borderSkipped=o);if(!0===i)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:a,end:s,reverse:c,top:l,bottom:u}=function(t){let e,n,r,i,o;return t.horizontal?(e=t.base>t.x,n="left",r="right"):(e=t.base<t.y,n="bottom",r="top"),e?(i="end",o="start"):(i="start",o="end"),{start:n,end:r,reverse:e,top:i,bottom:o}}(t);"middle"===i&&n&&(t.enableBorderRadius=!0,(n._top||0)===r?i=l:(n._bottom||0)===r?i=u:(o[Jr(u,a,s,c)]=!0,i=l)),o[Jr(i,a,s,c)]=!0,t.borderSkipped=o}function Jr(t,e,n,r){var i,o,a;return r?(a=n,t=ti(t=(i=t)===(o=e)?a:i===a?o:i,n,e)):t=ti(t,e,n),t}function ti(t,e,n){return"start"===t?e:"end"===t?n:t}function ei(t,{inflateAmount:e},n){t.inflateAmount="auto"===e?1===n?.33:0:e}class ni extends Yr{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,e,n,r){return Gr(t,e,n,r)}parseArrayData(t,e,n,r){return Gr(t,e,n,r)}parseObjectData(t,e,n,r){const{iScale:i,vScale:o}=t,{xAxisKey:a="x",yAxisKey:s="y"}=this._parsing,c="x"===i.axis?a:s,l="x"===o.axis?a:s,u=[];let h,d,f,p;for(h=n,d=n+r;h<d;++h)p=e[h],f={},f[i.axis]=i.parse(fe(p,c),h),u.push(qr(fe(p,l),f,o,h));return u}updateRangeFromParsed(t,e,n,r){super.updateRangeFromParsed(t,e,n,r);const i=n._custom;i&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,i.min),t.max=Math.max(t.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:n,vScale:r}=e,i=this.getParsed(t),o=i._custom,a=Zr(o)?"["+o.start+", "+o.end+"]":""+r.getLabelForValue(i[r.axis]);return{label:""+n.getLabelForValue(i[n.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,n,r){const i="reset"===r,{index:o,_cachedMeta:{vScale:a}}=this,s=a.getBasePixel(),c=a.isHorizontal(),l=this._getRuler(),{sharedOptions:u,includeOptions:h}=this._getSharedOptions(e,r);for(let d=e;d<e+n;d++){const e=this.getParsed(d),n=i||Gt(e[a.axis])?{base:s,head:s}:this._calculateBarValuePixels(d),f=this._calculateBarIndexPixels(d,l),p=(e._stacks||{})[a.axis],g={horizontal:c,base:n.base,enableBorderRadius:!p||Zr(e._custom)||o===p._top||o===p._bottom,x:c?n.head:f.center,y:c?f.center:n.head,height:c?f.size:Math.abs(n.size),width:c?Math.abs(n.size):f.size};h&&(g.options=u||this.resolveDataElementOptions(d,t[d].active?"active":r));const y=g.options||t[d].options;Qr(g,y,p,o),ei(g,y,l.ratio),this.updateElement(t[d],d,g,r)}}_getStacks(t,e){const{iScale:n}=this._cachedMeta,r=n.getMatchingVisibleMetas(this._type).filter(t=>t.controller.options.grouped),i=n.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(e),s=a&&a[n.axis],c=t=>{const e=t._parsed.find(t=>t[n.axis]===s),r=e&&e[t.vScale.axis];if(Gt(r)||isNaN(r))return!0};for(const l of r)if((void 0===e||!c(l))&&((!1===i||-1===o.indexOf(l.stack)||void 0===i&&void 0===l.stack)&&o.push(l.stack),l.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,e=this.chart.options.indexAxis;return Object.keys(t).filter(n=>t[n].axis===e).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const n of this.chart.data.datasets)t[ee("x"===this.chart.options.indexAxis?n.xAxisID:n.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,n){const r=this._getStacks(t,n),i=void 0!==e?r.indexOf(e):-1;return-1===i?r.length-1:i}_getRuler(){const t=this.options,e=this._cachedMeta,n=e.iScale,r=[];let i,o;for(i=0,o=e.data.length;i<o;++i)r.push(n.getPixelForValue(this.getParsed(i)[n.axis],i));const a=t.barThickness;return{min:a||Xr(e),pixels:r,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:n,index:r},options:{base:i,minBarLength:o}}=this,a=i||0,s=this.getParsed(t),c=s._custom,l=Zr(c);let u,h,d=s[e.axis],f=0,p=n?this.applyStack(e,s,n):d;p!==d&&(f=p-d,p=d),l&&(d=c.barStart,p=c.barEnd-c.barStart,0!==d&&ke(d)!==ke(c.barEnd)&&(f=0),f+=d);const g=Gt(i)||l?f:i;let y=e.getPixelForValue(g);if(u=this.chart.getDataVisibility(t)?e.getPixelForValue(f+p):y,h=u-y,Math.abs(h)<o){h=function(t,e,n){return 0!==t?ke(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}(h,e,a)*o,d===a&&(y-=h/2);const t=e.getPixelForDecimal(0),i=e.getPixelForDecimal(1),c=Math.min(t,i),f=Math.max(t,i);y=Math.max(Math.min(y,f),c),u=y+h,n&&!l&&(s._stacks[e.axis]._visualValues[r]=e.getValueForPixel(u)-e.getValueForPixel(y))}if(y===e.getPixelForValue(a)){const t=ke(h)*e.getLineWidthForValue(a)/2;y+=t,h-=t}return{size:h,base:y,head:u,center:u+h/2}}_calculateBarIndexPixels(t,e){const n=e.scale,r=this.options,i=r.skipNull,o=ee(r.maxBarThickness,1/0);let a,s;const c=this._getAxisCount();if(e.grouped){const n=i?this._getStackCount(t):e.stackCount,l="flex"===r.barThickness?function(t,e,n,r){const i=e.pixels,o=i[t];let a=t>0?i[t-1]:null,s=t<i.length-1?i[t+1]:null;const c=n.categoryPercentage;null===a&&(a=o-(null===s?e.end-e.start:s-o)),null===s&&(s=o+o-a);const l=o-(o-Math.min(a,s))/2*c;return{chunk:Math.abs(s-a)/2*c/r,ratio:n.barPercentage,start:l}}(t,e,r,n*c):function(t,e,n,r){const i=n.barThickness;let o,a;return Gt(i)?(o=e.min*n.categoryPercentage,a=n.barPercentage):(o=i*r,a=1),{chunk:o/r,ratio:a,start:e.pixels[t]-o/2}}(t,e,r,n*c),u="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,h=this._getAxis().indexOf(ee(u,this.getFirstScaleIdForIndexAxis())),d=this._getStackIndex(this.index,this._cachedMeta.stack,i?t:void 0)+h;a=l.start+l.chunk*d+l.chunk/2,s=Math.min(o,l.chunk*l.ratio)}else a=n.getPixelForValue(this.getParsed(t)[n.axis],t),s=Math.min(o,e.min*e.ratio);return{base:a-s/2,head:a+s/2,center:a,size:s}}draw(){const t=this._cachedMeta,e=t.vScale,n=t.data,r=n.length;let i=0;for(;i<r;++i)null===this.getParsed(i)[e.axis]||n[i].hidden||n[i].draw(this._ctx)}}class ri extends Yr{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=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data,{labels:{pointStyle:n,textAlign:r,color:i,useBorderRadius:o,borderRadius:a}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map((e,s)=>{const c=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:c.backgroundColor,fontColor:i,hidden:!t.getDataVisibility(s),lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:c.borderWidth,strokeStyle:c.borderColor,textAlign:r,pointStyle:n,borderRadius:o&&(a||c.borderRadius),index:s}}):[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const n=this.getDataset().data,r=this._cachedMeta;if(!1===this._parsing)r._parsed=n;else{let i,o,a=t=>+n[t];if(Qt(n[t])){const{key:t="value"}=this._parsing;a=e=>+fe(n[e],t)}for(i=t,o=t+e;i<o;++i)r._parsed[i]=a(i)}}_getRotation(){return je(this.options.rotation-90)}_getCircumference(){return je(this.options.circumference)}_getRotationExtents(){let t=be,e=-be;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const r=this.chart.getDatasetMeta(n).controller,i=r._getRotation(),o=r._getCircumference();t=Math.min(t,i),e=Math.max(e,i+o)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:n}=e,r=this._cachedMeta,i=r.data,o=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,a=Math.max((Math.min(n.width,n.height)-o)/2,0),s=Math.min((c=this.options.cutout,l=a,"string"==typeof c&&c.endsWith("%")?parseFloat(c)/100:+c/l),1);var c,l;const u=this._getRingWeight(this.index),{circumference:h,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:g,offsetY:y}=function(t,e,n){let r=1,i=1,o=0,a=0;if(e<be){const s=t,c=s+e,l=Math.cos(s),u=Math.sin(s),h=Math.cos(c),d=Math.sin(c),f=(t,e,r)=>Le(t,s,c,!0)?1:Math.max(e,e*n,r,r*n),p=(t,e,r)=>Le(t,s,c,!0)?-1:Math.min(e,e*n,r,r*n),g=f(0,l,h),y=f(Oe,u,d),v=p(me,l,h),m=p(me+Oe,u,d);r=(g-v)/2,i=(y-m)/2,o=-(g+v)/2,a=-(y+m)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:a}}(d,h,s),v=(n.width-o)/f,m=(n.height-o)/p,b=Math.max(Math.min(v,m)/2,0),x=ne(this.options.radius,b),w=(x-Math.max(x*s,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=y*x,r.total=this.calculateTotal(),this.outerRadius=x-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*u,0),this.updateElements(i,0,i.length,t)}_circumference(t,e){const n=this.options,r=this._cachedMeta,i=this._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===r._parsed[t]||r.data[t].hidden?0:this.calculateCircumference(r._parsed[t]*i/be)}updateElements(t,e,n,r){const i="reset"===r,o=this.chart,a=o.chartArea,s=o.options.animation,c=(a.left+a.right)/2,l=(a.top+a.bottom)/2,u=i&&s.animateScale,h=u?0:this.innerRadius,d=u?0:this.outerRadius,{sharedOptions:f,includeOptions:p}=this._getSharedOptions(e,r);let g,y=this._getRotation();for(g=0;g<e;++g)y+=this._circumference(g,i);for(g=e;g<e+n;++g){const e=this._circumference(g,i),n=t[g],o={x:c+this.offsetX,y:l+this.offsetY,startAngle:y,endAngle:y+e,circumference:e,outerRadius:d,innerRadius:h};p&&(o.options=f||this.resolveDataElementOptions(g,n.active?"active":r)),y+=e,this.updateElement(n,g,o,r)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let n,r=0;for(n=0;n<e.length;n++){const i=t._parsed[n];null===i||isNaN(i)||!this.chart.getDataVisibility(n)||e[n].hidden||(r+=Math.abs(i))}return r}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?be*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=sn(e._parsed[t],n.options.locale);return{label:r[t]||"",value:i}}getMaxBorderWidth(t){let e=0;const n=this.chart;let r,i,o,a,s;if(!t)for(r=0,i=n.data.datasets.length;r<i;++r)if(n.isDatasetVisible(r)){o=n.getDatasetMeta(r),t=o.data,a=o.controller;break}if(!t)return 0;for(r=0,i=t.length;r<i;++r)s=a.resolveDataElementOptions(r),"inner"!==s.borderAlign&&(e=Math.max(e,s.borderWidth||0,s.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let n=0,r=t.length;n<r;++n){const t=this.resolveDataElementOptions(n);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e}_getRingWeight(t){return Math.max(ee(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class ii extends Yr{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 e=this._cachedMeta,{dataset:n,data:r=[],_dataset:i}=e,o=this.chart._animationsDisabled;let{start:a,count:s}=Xe(e,r,o);this._drawStart=a,this._drawCount=s,qe(e)&&(a=0,s=r.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!i._decimated,n.points=r;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(n,void 0,{animated:!o,options:c},t),this.updateElements(r,a,s,t)}updateElements(t,e,n,r){const i="reset"===r,{iScale:o,vScale:a,_stacked:s,_dataset:c}=this._cachedMeta,{sharedOptions:l,includeOptions:u}=this._getSharedOptions(e,r),h=o.axis,d=a.axis,{spanGaps:f,segment:p}=this.options,g=Ce(f)?f:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||i||"none"===r,v=e+n,m=t.length;let b=e>0&&this.getParsed(e-1);for(let x=0;x<m;++x){const n=t[x],f=y?n:{};if(x<e||x>=v){f.skip=!0;continue}const m=this.getParsed(x),w=Gt(m[d]),_=f[h]=o.getPixelForValue(m[h],x),O=f[d]=i||w?a.getBasePixel():a.getPixelForValue(s?this.applyStack(a,m,s):m[d],x);f.skip=isNaN(_)||isNaN(O)||w,f.stop=x>0&&Math.abs(m[h]-b[h])>g,p&&(f.parsed=m,f.raw=c.data[x]),u&&(f.options=l||this.resolveDataElementOptions(x,n.active?"active":r)),y||this.updateElement(n,x,f,r),b=m}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,r=t.data||[];if(!r.length)return n;const i=r[0].size(this.resolveDataElementOptions(0)),o=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(n,i,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}class oi extends Yr{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 e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:r}}=t.legend.options;return e.labels.map((e,i)=>{const o=t.getDatasetMeta(0).controller.getStyle(i);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:r,lineWidth:o.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(i),index:i}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=sn(e._parsed[t].r,n.options.locale);return{label:r[t]||"",value:i}}parseObjectData(t,e,n,r){return Qn.bind(this)(t,e,n,r)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((t,n)=>{const r=this.getParsed(n).r;!isNaN(r)&&this.chart.getDataVisibility(n)&&(r<e.min&&(e.min=r),r>e.max&&(e.max=r))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,n=t.options,r=Math.min(e.right-e.left,e.bottom-e.top),i=Math.max(r/2,0),o=(i-Math.max(n.cutoutPercentage?i/100*n.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=i-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,n,r){const i="reset"===r,o=this.chart,a=o.options.animation,s=this._cachedMeta.rScale,c=s.xCenter,l=s.yCenter,u=s.getIndexAngle(0)-.5*me;let h,d=u;const f=360/this.countVisibleElements();for(h=0;h<e;++h)d+=this._computeAngle(h,r,f);for(h=e;h<e+n;h++){const e=t[h];let n=d,p=d+this._computeAngle(h,r,f),g=o.getDataVisibility(h)?s.getDistanceFromCenterForValue(this.getParsed(h).r):0;d=p,i&&(a.animateScale&&(g=0),a.animateRotate&&(n=p=u));const y={x:c,y:l,innerRadius:0,outerRadius:g,startAngle:n,endAngle:p,options:this.resolveDataElementOptions(h,e.active?"active":r)};this.updateElement(e,h,y,r)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((t,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?je(this.resolveDataElementOptions(t,e).angle||n):0}}class ai extends Yr{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 e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:r,yScale:i}=e,o=this.getParsed(t),a=r.getLabelForValue(o.x),s=i.getLabelForValue(o.y);return{label:n[t]||"",value:"("+a+", "+s+")"}}update(t){const e=this._cachedMeta,{data:n=[]}=e,r=this.chart._animationsDisabled;let{start:i,count:o}=Xe(e,n,r);if(this._drawStart=i,this._drawCount=o,qe(e)&&(i=0,o=n.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:i,_dataset:o}=e;i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=n;const a=this.resolveDatasetElementOptions(t);a.segment=this.options.segment,this.updateElement(i,void 0,{animated:!r,options:a},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(n,i,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,n,r){const i="reset"===r,{iScale:o,vScale:a,_stacked:s,_dataset:c}=this._cachedMeta,l=this.resolveDataElementOptions(e,r),u=this.getSharedOptions(l),h=this.includeOptions(r,u),d=o.axis,f=a.axis,{spanGaps:p,segment:g}=this.options,y=Ce(p)?p:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||i||"none"===r;let m=e>0&&this.getParsed(e-1);for(let b=e;b<e+n;++b){const e=t[b],n=this.getParsed(b),l=v?e:{},p=Gt(n[f]),x=l[d]=o.getPixelForValue(n[d],b),w=l[f]=i||p?a.getBasePixel():a.getPixelForValue(s?this.applyStack(a,n,s):n[f],b);l.skip=isNaN(x)||isNaN(w)||p,l.stop=b>0&&Math.abs(n[d]-m[d])>y,g&&(l.parsed=n,l.raw=c.data[b]),h&&(l.options=u||this.resolveDataElementOptions(b,e.active?"active":r)),v||this.updateElement(e,b,l,r),m=n}this.updateSharedOptions(u,r,l)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let n=e.length-1;n>=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}const n=t.dataset,r=n.options&&n.options.borderWidth||0;if(!e.length)return r;const i=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(r,i,o)/2}}function si(t,e,n,r){const{controller:i,data:o,_sorted:a}=t,s=i._cachedMeta.iScale,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(s&&e===s.axis&&"r"!==e&&a&&o.length){const a=s._reversePixels?Ve:Fe;if(!r){const r=a(o,e,n);if(c){const{vScale:e}=i._cachedMeta,{_parsed:n}=t,o=n.slice(0,r.lo+1).reverse().findIndex(t=>!Gt(t[e.axis]));r.lo-=Math.max(0,o);const a=n.slice(r.hi).findIndex(t=>!Gt(t[e.axis]));r.hi+=Math.max(0,a)}return r}if(i._sharedOptions){const t=o[0],r="function"==typeof t.getRange&&t.getRange(e);if(r){const t=a(o,e,n-r),i=a(o,e,n+r);return{lo:t.lo,hi:i.hi}}}}return{lo:0,hi:o.length-1}}function ci(t,e,n,r,i){const o=t.getSortedVisibleDatasetMetas(),a=n[e];for(let s=0,c=o.length;s<c;++s){const{index:t,data:n}=o[s],{lo:c,hi:l}=si(o[s],e,a,i);for(let e=c;e<=l;++e){const i=n[e];i.skip||r(i,t,e)}}}function li(t,e,n,r,i){const o=[];if(!i&&!t.isPointInArea(e))return o;return ci(t,n,e,function(n,a,s){(i||bn(n,t.chartArea,0))&&n.inRange(e.x,e.y,r)&&o.push({element:n,datasetIndex:a,index:s})},!0),o}function ui(t,e,n,r){let i=[];return ci(t,n,e,function(t,n,o){const{startAngle:a,endAngle:s}=t.getProps(["startAngle","endAngle"],r),{angle:c}=function(t,e){const n=e.x-t.x,r=e.y-t.y,i=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o<-.5*me&&(o+=be),{angle:o,distance:i}}(t,{x:e.x,y:e.y});Le(c,a,s)&&i.push({element:t,datasetIndex:n,index:o})}),i}function hi(t,e,n,r,i,o){let a=[];const s=function(t){const e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,r){const i=e?Math.abs(t.x-r.x):0,o=n?Math.abs(t.y-r.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))}}(n);let c=Number.POSITIVE_INFINITY;return ci(t,n,e,function(n,l,u){const h=n.inRange(e.x,e.y,i);if(r&&!h)return;const d=n.getCenterPoint(i);if(!(!!o||t.isPointInArea(d))&&!h)return;const f=s(e,d);f<c?(a=[{element:n,datasetIndex:l,index:u}],c=f):f===c&&a.push({element:n,datasetIndex:l,index:u})}),a}function di(t,e,n,r,i,o){return o||t.isPointInArea(e)?"r"!==n||r?hi(t,e,n,r,i,o):ui(t,e,n,i):[]}function fi(t,e,n,r,i){const o=[],a="x"===n?"inXRange":"inYRange";let s=!1;return ci(t,n,e,(t,r,c)=>{t[a]&&t[a](e[n],i)&&(o.push({element:t,datasetIndex:r,index:c}),s=s||t.inRange(e.x,e.y,i))}),r&&!s?[]:o}var pi={modes:{index(t,e,n,r){const i=dr(e,t),o=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?li(t,i,o,r,a):di(t,i,o,!1,r,a),c=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{const e=s[0].index,n=t.data[e];n&&!n.skip&&c.push({element:n,datasetIndex:t.index,index:e})}),c):[]},dataset(t,e,n,r){const i=dr(e,t),o=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?li(t,i,o,r,a):di(t,i,o,!1,r,a);if(s.length>0){const e=s[0].datasetIndex,n=t.getDatasetMeta(e).data;s=[];for(let t=0;t<n.length;++t)s.push({element:n[t],datasetIndex:e,index:t})}return s},point:(t,e,n,r)=>li(t,dr(e,t),n.axis||"xy",r,n.includeInvisible||!1),nearest(t,e,n,r){const i=dr(e,t),o=n.axis||"xy",a=n.includeInvisible||!1;return di(t,i,o,n.intersect,r,a)},x:(t,e,n,r)=>fi(t,dr(e,t),"x",n.intersect,r),y:(t,e,n,r)=>fi(t,dr(e,t),"y",n.intersect,r)}};const gi=["left","top","right","bottom"];function yi(t,e){return t.filter(t=>t.pos===e)}function vi(t,e){return t.filter(t=>-1===gi.indexOf(t.pos)&&t.box.axis===e)}function mi(t,e){return t.sort((t,n)=>{const r=e?n:t,i=e?t:n;return r.weight===i.weight?r.index-i.index:r.weight-i.weight})}function bi(t,e){const n=function(t){const e={};for(const n of t){const{stack:t,pos:r,stackWeight:i}=n;if(!t||!gi.includes(r))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=i}return e}(t),{vBoxMaxWidth:r,hBoxMaxHeight:i}=e;let o,a,s;for(o=0,a=t.length;o<a;++o){s=t[o];const{fullSize:a}=s.box,c=n[s.stack],l=c&&s.stackWeight/c.weight;s.horizontal?(s.width=l?l*r:a&&e.availableWidth,s.height=i):(s.width=r,s.height=l?l*i:a&&e.availableHeight)}return n}function xi(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function wi(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function _i(t,e,n,r){const{pos:i,box:o}=n,a=t.maxPadding;if(!Qt(i)){n.size&&(t[i]-=n.size);const e=r[n.stack]||{size:0,count:1};e.size=Math.max(e.size,n.horizontal?o.height:o.width),n.size=e.size/e.count,t[i]+=n.size}o.getPadding&&wi(a,o.getPadding());const s=Math.max(0,e.outerWidth-xi(a,t,"left","right")),c=Math.max(0,e.outerHeight-xi(a,t,"top","bottom")),l=s!==t.w,u=c!==t.h;return t.w=s,t.h=c,n.horizontal?{same:l,other:u}:{same:u,other:l}}function Oi(t,e){const n=e.maxPadding;function r(t){const r={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{r[t]=Math.max(e[t],n[t])}),r}return r(t?["left","right"]:["top","bottom"])}function Si(t,e,n,r){const i=[];let o,a,s,c,l,u;for(o=0,a=t.length,l=0;o<a;++o){s=t[o],c=s.box,c.update(s.width||e.w,s.height||e.h,Oi(s.horizontal,e));const{same:a,other:h}=_i(e,n,s,r);l|=a&&i.length,u=u||h,c.fullSize||i.push(s)}return l&&Si(i,e,n,r)||u}function Pi(t,e,n,r,i){t.top=n,t.left=e,t.right=e+r,t.bottom=n+i,t.width=r,t.height=i}function Mi(t,e,n,r){const i=n.padding;let{x:o,y:a}=e;for(const s of t){const t=s.box,c=r[s.stack]||{placed:0,weight:1},l=s.stackWeight/c.weight||1;if(s.horizontal){const r=e.w*l,o=c.size||t.height;ge(c.start)&&(a=c.start),t.fullSize?Pi(t,i.left,a,n.outerWidth-i.right-i.left,o):Pi(t,e.left+c.placed,a,r,o),c.start=a,c.placed+=r,a=t.bottom}else{const r=e.h*l,a=c.size||t.width;ge(c.start)&&(o=c.start),t.fullSize?Pi(t,o,i.top,a,n.outerHeight-i.bottom-i.top):Pi(t,o,e.top+c.placed,a,r),c.start=o,c.placed+=r,o=t.right}}e.x=o,e.y=a}var ki={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,r){if(!t)return;const i=Rn(t.options.layout.padding),o=Math.max(e-i.width,0),a=Math.max(n-i.height,0),s=function(t){const e=function(t){const e=[];let n,r,i,o,a,s;for(n=0,r=(t||[]).length;n<r;++n)i=t[n],({position:o,options:{stack:a,stackWeight:s=1}}=i),e.push({index:n,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&o+a,stackWeight:s});return e}(t),n=mi(e.filter(t=>t.box.fullSize),!0),r=mi(yi(e,"left"),!0),i=mi(yi(e,"right")),o=mi(yi(e,"top"),!0),a=mi(yi(e,"bottom")),s=vi(e,"x"),c=vi(e,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(c).concat(a).concat(s),chartArea:yi(e,"chartArea"),vertical:r.concat(i).concat(c),horizontal:o.concat(a).concat(s)}}(t.boxes),c=s.vertical,l=s.horizontal;ie(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});const u=c.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,h=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/u,hBoxMaxHeight:a/2}),d=Object.assign({},i);wi(d,Rn(r));const f=Object.assign({maxPadding:d,w:o,h:a,x:i.left,y:i.top},i),p=bi(c.concat(l),h);Si(s.fullSize,f,h,p),Si(c,f,h,p),Si(l,f,h,p)&&Si(c,f,h,p),function(t){const e=t.maxPadding;function n(n){const r=Math.max(e[n]-t[n],0);return t[n]+=r,r}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(f),Mi(s.leftAndTop,f,h,p),f.x+=f.w,f.y+=f.h,Mi(s.rightAndBottom,f,h,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},ie(s.chartArea,e=>{const n=e.box;Object.assign(n,t.chartArea),n.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class Ei{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,r){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,r?Math.floor(e/r):n)}}isAttached(t){return!0}updateConfig(t){}}class Ai extends Ei{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Ci="$chartjs",ji={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ii=t=>null===t||""===t;const Di=!!yr&&{passive:!0};function Ti(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,Di)}function Ri(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Li(t,e,n){const r=t.canvas,i=new MutationObserver(t=>{let e=!1;for(const n of t)e=e||Ri(n.addedNodes,r),e=e&&!Ri(n.removedNodes,r);e&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Bi(t,e,n){const r=t.canvas,i=new MutationObserver(t=>{let e=!1;for(const n of t)e=e||Ri(n.removedNodes,r),e=e&&!Ri(n.addedNodes,r);e&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Ni=new Map;let zi=0;function Fi(){const t=window.devicePixelRatio;t!==zi&&(zi=t,Ni.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Vi(t,e,n){const r=t.canvas,i=r&&sr(r);if(!i)return;const o=$e((t,e)=>{const r=i.clientWidth;n(t,e),r<i.clientWidth&&n()},window),a=new ResizeObserver(t=>{const e=t[0],n=e.contentRect.width,r=e.contentRect.height;0===n&&0===r||o(n,r)});return a.observe(i),function(t,e){Ni.size||window.addEventListener("resize",Fi),Ni.set(t,e)}(t,o),a}function Wi(t,e,n){n&&n.disconnect(),"resize"===e&&function(t){Ni.delete(t),Ni.size||window.removeEventListener("resize",Fi)}(t)}function Ui(t,e,n){const r=t.canvas,i=$e(e=>{null!==t.ctx&&n(function(t,e){const n=ji[t.type]||t.type,{x:r,y:i}=dr(t,e);return{type:n,chart:e,native:t,x:void 0!==r?r:null,y:void 0!==i?i:null}}(e,t))},t);return function(t,e,n){t&&t.addEventListener(e,n,Di)}(r,e,i),i}class Ki extends Ei{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(function(t,e){const n=t.style,r=t.getAttribute("height"),i=t.getAttribute("width");if(t[Ci]={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",Ii(i)){const e=vr(t,"width");void 0!==e&&(t.width=e)}if(Ii(r))if(""===t.style.height)t.height=t.width/(e||2);else{const e=vr(t,"height");void 0!==e&&(t.height=e)}}(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[Ci])return!1;const n=e[Ci].initial;["height","width"].forEach(t=>{const r=n[t];Gt(r)?e.removeAttribute(t):e.setAttribute(t,r)});const r=n.style||{};return Object.keys(r).forEach(t=>{e.style[t]=r[t]}),e.width=e.width,delete e[Ci],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const r=t.$proxies||(t.$proxies={}),i={attach:Li,detach:Bi,resize:Vi}[e]||Ui;r[e]=i(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),r=n[e];if(!r)return;({attach:Wi,detach:Wi,resize:Wi}[e]||Ti)(t,e,r),n[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,r){return pr(t,e,n,r)}isAttached(t){const e=t&&sr(t);return!(!e||!e.isConnected)}}class Hi{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return Ce(this.x)&&Ce(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const r={};return t.forEach(t=>{r[t]=n[t]&&n[t].active()?n[t]._to:this[t]}),r}}function $i(t,e){const n=t.options.ticks,r=function(t){const e=t.options.offset,n=t._tickSize(),r=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(r,i))}(t),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?function(t){const e=[];let n,r;for(n=0,r=t.length;n<r;n++)t[n].major&&e.push(n);return e}(e):[],a=o.length,s=o[0],c=o[a-1],l=[];if(a>i)return function(t,e,n,r){let i,o=0,a=n[0];for(r=Math.ceil(r),i=0;i<t.length;i++)i===a&&(e.push(t[i]),o++,a=n[o*r])}(e,l,o,a/i),l;const u=function(t,e,n){const r=function(t){const e=t.length;let n,r;if(e<2)return!1;for(r=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==r)return!1;return r}(t),i=e.length/n;if(!r)return Math.max(i,1);const o=function(t){const e=[],n=Math.sqrt(t);let r;for(r=1;r<n;r++)t%r===0&&(e.push(r),e.push(t/r));return n===(0|n)&&e.push(n),e.sort((t,e)=>t-e).pop(),e}(r);for(let a=0,s=o.length-1;a<s;a++){const t=o[a];if(t>i)return t}return Math.max(i,1)}(o,e,i);if(a>0){let t,n;const r=a>1?Math.round((c-s)/(a-1)):null;for(Yi(e,l,u,Gt(r)?0:s-r,s),t=0,n=a-1;t<n;t++)Yi(e,l,u,o[t],o[t+1]);return Yi(e,l,u,c,Gt(r)?e.length:c+r),l}return Yi(e,l,u),l}function Yi(t,e,n,r,i){const o=ee(r,0),a=Math.min(ee(i,t.length),t.length);let s,c,l,u=0;for(n=Math.ceil(n),i&&(s=i-r,n=s/Math.floor(s/n)),l=o;l<0;)u++,l=Math.round(o+u*n);for(c=Math.max(o,0);c<a;c++)c===l&&(e.push(t[c]),u++,l=Math.round(o+u*n))}const Xi=(t,e,n)=>"top"===e||"left"===e?t[e]+n:t[e]-n,qi=(t,e)=>Math.min(e||t,t);function Gi(t,e){const n=[],r=t.length/e,i=t.length;let o=0;for(;o<i;o+=r)n.push(t[Math.floor(o)]);return n}function Zi(t,e,n){const r=t.ticks.length,i=Math.min(e,r-1),o=t._startPixel,a=t._endPixel,s=1e-6;let c,l=t.getPixelForTick(i);if(!(n&&(c=1===r?Math.max(l-o,a-l):0===e?(t.getPixelForTick(1)-l)/2:(l-t.getPixelForTick(i-1))/2,l+=i<e?c:-c,l<o-s||l>a+s)))return l}function Qi(t){return t.drawTicks?t.tickLength:0}function Ji(t,e){if(!t.display)return 0;const n=Ln(t.font,e),r=Rn(t.padding);return(Zt(t.text)?t.text.length:1)*n.lineHeight+r.height}function to(t,e,n){let r=(t=>"start"===t?"left":"end"===t?"right":"center")(t);return(n&&"right"!==e||!n&&"right"===e)&&(r=(t=>"left"===t?"right":"right"===t?"left":t)(r)),r}class eo extends Hi{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,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:n,_suggestedMax:r}=this;return t=te(t,Number.POSITIVE_INFINITY),e=te(e,Number.NEGATIVE_INFINITY),n=te(n,Number.POSITIVE_INFINITY),r=te(r,Number.NEGATIVE_INFINITY),{min:te(t,n),max:te(e,r),minDefined:Jt(t),maxDefined:Jt(e)}}getMinMax(t){let e,{min:n,max:r,minDefined:i,maxDefined:o}=this.getUserBounds();if(i&&o)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let s=0,c=a.length;s<c;++s)e=a[s].controller.getMinMax(this,t),i||(n=Math.min(n,e.min)),o||(r=Math.max(r,e.max));return n=o&&n>r?r:n,r=i&&n>r?n:r,{min:te(n,te(r,n)),max:te(r,te(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(){re(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:r,grace:i,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,n){const{min:r,max:i}=t,o=ne(e,(i-r)/2),a=(t,e)=>n&&0===t?0:t+e;return{min:a(r,-Math.abs(o)),max:a(i,o)}}(this,i,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const s=a<this.ticks.length;this._convertTicksToLabels(s?Gi(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(this.ticks=$i(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),s&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,n=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,n=!n),this._startPixel=t,this._endPixel=e,this._reversePixels=n,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){re(this.options.afterUpdate,[this])}beforeSetDimensions(){re(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(){re(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),re(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){re(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let n,r,i;for(n=0,r=t.length;n<r;n++)i=t[n],i.label=re(e.callback,[i.value,n,t],this)}afterTickToLabelConversion(){re(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){re(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,n=qi(this.ticks.length,t.ticks.maxTicksLimit),r=e.minRotation||0,i=e.maxRotation;let o,a,s,c=r;if(!this._isVisible()||!e.display||r>=i||n<=1||!this.isHorizontal())return void(this.labelRotation=r);const l=this._getLabelSizes(),u=l.widest.width,h=l.highest.height,d=Be(this.chart.width-u,0,this.maxWidth);o=t.offset?this.maxWidth/n:d/(n-1),u+6>o&&(o=d/(n-(t.offset?.5:1)),a=this.maxHeight-Qi(t.grid)-e.padding-Ji(t.title,this.chart.options.font),s=Math.sqrt(u*u+h*h),c=Math.min(Math.asin(Be((l.highest.height+6)/o,-1,1)),Math.asin(Be(a/s,-1,1))-Math.asin(Be(h/s,-1,1)))*(180/me),c=Math.max(r,Math.min(i,c))),this.labelRotation=c}afterCalculateLabelRotation(){re(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){re(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:r,grid:i}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const o=Ji(r,e.options.font);if(a?(t.width=this.maxWidth,t.height=Qi(i)+o):(t.height=this.maxHeight,t.width=Qi(i)+o),n.display&&this.ticks.length){const{first:e,last:r,widest:i,highest:o}=this._getLabelSizes(),s=2*n.padding,c=je(this.labelRotation),l=Math.cos(c),u=Math.sin(c);if(a){const e=n.mirror?0:u*i.width+l*o.height;t.height=Math.min(this.maxHeight,t.height+e+s)}else{const e=n.mirror?0:l*i.width+u*o.height;t.width=Math.min(this.maxWidth,t.width+e+s)}this._calculatePadding(e,r,u,l)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,r){const{ticks:{align:i,padding:o},position:a}=this.options,s=0!==this.labelRotation,c="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,l=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,h=0;s?c?(u=r*t.width,h=n*e.height):(u=n*t.height,h=r*e.width):"start"===i?h=e.width:"end"===i?u=t.width:"inner"!==i&&(u=t.width/2,h=e.width/2),this.paddingLeft=Math.max((u-a+o)*this.width/(this.width-a),0),this.paddingRight=Math.max((h-l+o)*this.width/(this.width-l),0)}else{let n=e.height/2,r=t.height/2;"start"===i?(n=0,r=t.height):"end"===i&&(n=e.height,r=0),this.paddingTop=n+o,this.paddingBottom=r+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(){re(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,n=t.length;e<n;e++)Gt(t[e].label)&&(t.splice(e,1),n--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let n=this.ticks;e<n.length&&(n=Gi(n,e)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,n){const{ctx:r,_longestTextCache:i}=this,o=[],a=[],s=Math.floor(e/qi(e,n));let c,l,u,h,d,f,p,g,y,v,m,b=0,x=0;for(c=0;c<e;c+=s){if(h=t[c].label,d=this._resolveTickFontOptions(c),r.font=f=d.string,p=i[f]=i[f]||{data:{},gc:[]},g=d.lineHeight,y=v=0,Gt(h)||Zt(h)){if(Zt(h))for(l=0,u=h.length;l<u;++l)m=h[l],Gt(m)||Zt(m)||(y=gn(r,p.data,p.gc,y,m),v+=g)}else y=gn(r,p.data,p.gc,y,h),v=g;o.push(y),a.push(v),b=Math.max(y,b),x=Math.max(v,x)}!function(t,e){ie(t,t=>{const n=t.gc,r=n.length/2;let i;if(r>e){for(i=0;i<r;++i)delete t.data[n[i]];n.splice(0,r)}})}(i,e);const w=o.indexOf(b),_=a.indexOf(x),O=t=>({width:o[t]||0,height:a[t]||0});return{first:O(0),last:O(e-1),widest:O(w),highest:O(_),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Be(this._alignToPixels?yn(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const n=e[t];return n.$context||(n.$context=function(t,e,n){return Nn(t,{tick:n,index:e,type:"tick"})}(this.getContext(),t,n))}return this.$context||(this.$context=Nn(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=je(this.labelRotation),n=Math.abs(Math.cos(e)),r=Math.abs(Math.sin(e)),i=this._getLabelSizes(),o=t.autoSkipPadding||0,a=i?i.widest.width+o:0,s=i?i.highest.height+o:0;return this.isHorizontal()?s*n>a*r?a/n:s/r:s*r<a*n?s/n:a/r}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,n=this.chart,r=this.options,{grid:i,position:o,border:a}=r,s=i.offset,c=this.isHorizontal(),l=this.ticks.length+(s?1:0),u=Qi(i),h=[],d=a.setContext(this.getContext()),f=d.display?d.width:0,p=f/2,g=function(t){return yn(n,t,f)};let y,v,m,b,x,w,_,O,S,P,M,k;if("top"===o)y=g(this.bottom),w=this.bottom-u,O=y-p,P=g(t.top)+p,k=t.bottom;else if("bottom"===o)y=g(this.top),P=t.top,k=g(t.bottom)-p,w=y+p,O=this.top+u;else if("left"===o)y=g(this.right),x=this.right-u,_=y-p,S=g(t.left)+p,M=t.right;else if("right"===o)y=g(this.left),S=t.left,M=g(t.right)-p,x=y+p,_=this.left+u;else if("x"===e){if("center"===o)y=g((t.top+t.bottom)/2+.5);else if(Qt(o)){const t=Object.keys(o)[0],e=o[t];y=g(this.chart.scales[t].getPixelForValue(e))}P=t.top,k=t.bottom,w=y+p,O=w+u}else if("y"===e){if("center"===o)y=g((t.left+t.right)/2);else if(Qt(o)){const t=Object.keys(o)[0],e=o[t];y=g(this.chart.scales[t].getPixelForValue(e))}x=y-p,_=x-u,S=t.left,M=t.right}const E=ee(r.ticks.maxTicksLimit,l),A=Math.max(1,Math.ceil(l/E));for(v=0;v<l;v+=A){const t=this.getContext(v),e=i.setContext(t),r=a.setContext(t),o=e.lineWidth,l=e.color,u=r.dash||[],d=r.dashOffset,f=e.tickWidth,p=e.tickColor,g=e.tickBorderDash||[],y=e.tickBorderDashOffset;m=Zi(this,v,s),void 0!==m&&(b=yn(n,m,o),c?x=_=S=M=b:w=O=P=k=b,h.push({tx1:x,ty1:w,tx2:_,ty2:O,x1:S,y1:P,x2:M,y2:k,width:o,color:l,borderDash:u,borderDashOffset:d,tickWidth:f,tickColor:p,tickBorderDash:g,tickBorderDashOffset:y}))}return this._ticksLength=l,this._borderValue=y,h}_computeLabelItems(t){const e=this.axis,n=this.options,{position:r,ticks:i}=n,o=this.isHorizontal(),a=this.ticks,{align:s,crossAlign:c,padding:l,mirror:u}=i,h=Qi(n.grid),d=h+l,f=u?-l:d,p=-je(this.labelRotation),g=[];let y,v,m,b,x,w,_,O,S,P,M,k,E="middle";if("top"===r)w=this.bottom-f,_=this._getXAxisLabelAlignment();else if("bottom"===r)w=this.top+f,_=this._getXAxisLabelAlignment();else if("left"===r){const t=this._getYAxisLabelAlignment(h);_=t.textAlign,x=t.x}else if("right"===r){const t=this._getYAxisLabelAlignment(h);_=t.textAlign,x=t.x}else if("x"===e){if("center"===r)w=(t.top+t.bottom)/2+d;else if(Qt(r)){const t=Object.keys(r)[0],e=r[t];w=this.chart.scales[t].getPixelForValue(e)+d}_=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===r)x=(t.left+t.right)/2-d;else if(Qt(r)){const t=Object.keys(r)[0],e=r[t];x=this.chart.scales[t].getPixelForValue(e)}_=this._getYAxisLabelAlignment(h).textAlign}"y"===e&&("start"===s?E="top":"end"===s&&(E="bottom"));const A=this._getLabelSizes();for(y=0,v=a.length;y<v;++y){m=a[y],b=m.label;const t=i.setContext(this.getContext(y));O=this.getPixelForTick(y)+i.labelOffset,S=this._resolveTickFontOptions(y),P=S.lineHeight,M=Zt(b)?b.length:1;const e=M/2,n=t.color,s=t.textStrokeColor,l=t.textStrokeWidth;let h,d=_;if(o?(x=O,"inner"===_&&(d=y===v-1?this.options.reverse?"left":"right":0===y?this.options.reverse?"right":"left":"center"),k="top"===r?"near"===c||0!==p?-M*P+P/2:"center"===c?-A.highest.height/2-e*P+P:-A.highest.height+P/2:"near"===c||0!==p?P/2:"center"===c?A.highest.height/2-e*P:A.highest.height-M*P,u&&(k*=-1),0===p||t.showLabelBackdrop||(x+=P/2*Math.sin(p))):(w=O,k=(1-M)*P/2),t.showLabelBackdrop){const e=Rn(t.backdropPadding),n=A.heights[y],r=A.widths[y];let i=k-e.top,o=0-e.left;switch(E){case"middle":i-=n/2;break;case"bottom":i-=n}switch(_){case"center":o-=r/2;break;case"right":o-=r;break;case"inner":y===v-1?o-=r:y>0&&(o-=r/2)}h={left:o,top:i,width:r+e.width,height:n+e.height,color:t.backdropColor}}g.push({label:b,font:S,textOffset:k,options:{rotation:p,color:n,strokeColor:s,strokeWidth:l,textAlign:d,textBaseline:E,translation:[x,w],backdrop:h}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-je(this.labelRotation))return"top"===t?"left":"right";let n="center";return"start"===e.align?n="left":"end"===e.align?n="right":"inner"===e.align&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:n,mirror:r,padding:i}}=this.options,o=t+i,a=this._getLabelSizes().widest.width;let s,c;return"left"===e?r?(c=this.right+i,"near"===n?s="left":"center"===n?(s="center",c+=a/2):(s="right",c+=a)):(c=this.right-o,"near"===n?s="right":"center"===n?(s="center",c-=a/2):(s="left",c=this.left)):"right"===e?r?(c=this.left+i,"near"===n?s="right":"center"===n?(s="center",c-=a/2):(s="left",c-=a)):(c=this.left+o,"near"===n?s="left":"center"===n?(s="center",c+=a/2):(s="right",c=this.right)):s="right",{textAlign:s,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:n,top:r,width:i,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,r,i,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(e=>e.value===t);if(n>=0){return e.setContext(this.getContext(n)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,n=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let i,o;const a=(t,e,r)=>{r.width&&r.color&&(n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.setLineDash(r.borderDash||[]),n.lineDashOffset=r.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(e.display)for(i=0,o=r.length;i<o;++i){const t=r[i];e.drawOnChartArea&&a({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&a({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:n,grid:r}}=this,i=n.setContext(this.getContext()),o=n.display?i.width:0;if(!o)return;const a=r.setContext(this.getContext(0)).lineWidth,s=this._borderValue;let c,l,u,h;this.isHorizontal()?(c=yn(t,this.left,o)-o/2,l=yn(t,this.right,a)+a/2,u=h=s):(u=yn(t,this.top,o)-o/2,h=yn(t,this.bottom,a)+a/2,c=l=s),e.save(),e.lineWidth=i.width,e.strokeStyle=i.color,e.beginPath(),e.moveTo(c,u),e.lineTo(l,h),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,n=this._computeLabelArea();n&&xn(e,n);const r=this.getLabelItems(t);for(const i of r){const t=i.options,n=i.font;Mn(e,i.label,0,i.textOffset,n,t)}n&&wn(e)}drawTitle(){const{ctx:t,options:{position:e,title:n,reverse:r}}=this;if(!n.display)return;const i=Ln(n.font),o=Rn(n.padding),a=n.align;let s=i.lineHeight/2;"bottom"===e||"center"===e||Qt(e)?(s+=o.bottom,Zt(n.text)&&(s+=i.lineHeight*(n.text.length-1))):s+=o.top;const{titleX:c,titleY:l,maxWidth:u,rotation:h}=function(t,e,n,r){const{top:i,left:o,bottom:a,right:s,chart:c}=t,{chartArea:l,scales:u}=c;let h,d,f,p=0;const g=a-i,y=s-o;if(t.isHorizontal()){if(d=Ye(r,o,s),Qt(n)){const t=Object.keys(n)[0],r=n[t];f=u[t].getPixelForValue(r)+g-e}else f="center"===n?(l.bottom+l.top)/2+g-e:Xi(t,n,e);h=s-o}else{if(Qt(n)){const t=Object.keys(n)[0],r=n[t];d=u[t].getPixelForValue(r)-y+e}else d="center"===n?(l.left+l.right)/2-y+e:Xi(t,n,e);f=Ye(r,a,i),p="left"===n?-Oe:Oe}return{titleX:d,titleY:f,maxWidth:h,rotation:p}}(this,s,e,a);Mn(t,n.text,0,0,i,{color:n.color,maxWidth:u,rotation:h,textAlign:to(a,e,r),textBaseline:"middle",translation:[c,l]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,n=ee(t.grid&&t.grid.z,-1),r=ee(t.border&&t.border.z,0);return this._isVisible()&&this.draw===eo.prototype.draw?[{z:n,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",r=[];let i,o;for(i=0,o=e.length;i<o;++i){const o=e[i];o[n]!==this.id||t&&o.type!==t||r.push(o)}return r}_resolveTickFontOptions(t){return Ln(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class no{constructor(t,e,n){this.type=t,this.scope=e,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let n;(function(t){return"id"in t&&"defaults"in t})(e)&&(n=this.register(e));const r=this.items,i=t.id,o=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+t);return i in r||(r[i]=t,function(t,e,n){const r=le(Object.create(null),[n?pn.get(n):{},pn.get(e),t.defaults]);pn.set(e,r),t.defaultRoutes&&function(t,e){Object.keys(e).forEach(n=>{const r=n.split("."),i=r.pop(),o=[t].concat(r).join("."),a=e[n].split("."),s=a.pop(),c=a.join(".");pn.route(o,i,c,s)})}(e,t.defaultRoutes);t.descriptors&&pn.describe(e,t.descriptors)}(t,o,n),this.override&&pn.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,n=t.id,r=this.scope;n in e&&delete e[n],r&&n in pn[r]&&(delete pn[r][n],this.override&&delete ln[n])}}class ro{constructor(){this.controllers=new no(Yr,"datasets",!0),this.elements=new no(Hi,"elements"),this.plugins=new no(Object,"plugins"),this.scales=new no(eo,"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,e,n){[...e].forEach(e=>{const r=n||this._getRegistryForType(e);n||r.isForType(e)||r===this.plugins&&e.id?this._exec(t,r,e):ie(e,e=>{const r=n||this._getRegistryForType(e);this._exec(t,r,e)})})}_exec(t,e,n){const r=pe(t);re(n["before"+r],[],n),e[t](n),re(n["after"+r],[],n)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}_get(t,e,n){const r=e.get(t);if(void 0===r)throw new Error('"'+t+'" is not a registered '+n+".");return r}}var io=new ro;class oo{constructor(){this._init=void 0}notify(t,e,n,r){if("beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),void 0===this._init)return;const i=r?this._descriptors(t).filter(r):this._descriptors(t),o=this._notify(i,t,e,n);return"afterDestroy"===e&&(this._notify(i,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),o}_notify(t,e,n,r){r=r||{};for(const i of t){const t=i.plugin;if(!1===re(t[n],[e,r,i.options],t)&&r.cancelable)return!1}return!0}invalidate(){Gt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const n=t&&t.config,r=ee(n.options&&n.options.plugins,{}),i=function(t){const e={},n=[],r=Object.keys(io.plugins.items);for(let o=0;o<r.length;o++)n.push(io.getPlugin(r[o]));const i=t.plugins||[];for(let o=0;o<i.length;o++){const t=i[o];-1===n.indexOf(t)&&(n.push(t),e[t.id]=!0)}return{plugins:n,localIds:e}}(n);return!1!==r||e?function(t,{plugins:e,localIds:n},r,i){const o=[],a=t.getContext();for(const s of e){const e=s.id,c=ao(r[e],i);null!==c&&o.push({plugin:s,options:so(t.config,{plugin:s,local:n[e]},c,a)})}return o}(t,i,r,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],n=this._cache,r=(t,e)=>t.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(r(e,n),t,"stop"),this._notify(r(n,e),t,"start")}}function ao(t,e){return e||!1!==t?!0===t?{}:t:null}function so(t,{plugin:e,local:n},r,i){const o=t.pluginScopeKeys(e),a=t.getOptionScopes(r,o);return n&&e.defaults&&a.push(e.defaults),t.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function co(t,e){const n=pn.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function lo(t){if("x"===t||"y"===t||"r"===t)return t}function uo(t){return"top"===t||"bottom"===t?"x":"left"===t||"right"===t?"y":void 0}function ho(t,...e){if(lo(t))return t;for(const n of e){const e=n.axis||uo(n.position)||t.length>1&&lo(t[0].toLowerCase());if(e)return e}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function fo(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function po(t,e){const n=ln[t.type]||{scales:{}},r=e.scales||{},i=co(t.type,e),o=Object.create(null);return Object.keys(r).forEach(e=>{const a=r[e];if(!Qt(a))return console.error(`Invalid scale configuration for scale: ${e}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const s=ho(e,a,function(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(e=>e.xAxisID===t||e.yAxisID===t);if(n.length)return fo(t,"x",n[0])||fo(t,"y",n[0])}return{}}(e,t),pn.scales[a.type]),c=function(t,e){return t===e?"_index_":"_value_"}(s,i),l=n.scales||{};o[e]=ue(Object.create(null),[{axis:s},a,l[s],l[c]])}),t.data.datasets.forEach(n=>{const i=n.type||t.type,a=n.indexAxis||co(i,e),s=(ln[i]||{}).scales||{};Object.keys(s).forEach(t=>{const e=function(t,e){let n=t;return"_index_"===t?n=e:"_value_"===t&&(n="x"===e?"y":"x"),n}(t,a),i=n[e+"AxisID"]||e;o[i]=o[i]||Object.create(null),ue(o[i],[{axis:e},r[i],s[t]])})}),Object.keys(o).forEach(t=>{const e=o[t];ue(e,[pn.scales[e.type],pn.scale])}),o}function go(t){const e=t.options||(t.options={});e.plugins=ee(e.plugins,{}),e.scales=po(t,e)}function yo(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const vo=new Map,mo=new Set;function bo(t,e){let n=vo.get(t);return n||(n=e(),vo.set(t,n),mo.add(n)),n}const xo=(t,e,n)=>{const r=fe(e,n);void 0!==r&&t.add(r)};class wo{constructor(t){this._config=function(t){return(t=t||{}).data=yo(t.data),go(t),t}(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=yo(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(),go(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return bo(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return bo(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return bo(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id;return bo(`${this.type}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const n=this._scopeCache;let r=n.get(t);return r&&!e||(r=new Map,n.set(t,r)),r}getOptionScopes(t,e,n){const{options:r,type:i}=this,o=this._cachedScopes(t,n),a=o.get(e);if(a)return a;const s=new Set;e.forEach(e=>{t&&(s.add(t),e.forEach(e=>xo(s,t,e))),e.forEach(t=>xo(s,r,t)),e.forEach(t=>xo(s,ln[i]||{},t)),e.forEach(t=>xo(s,pn,t)),e.forEach(t=>xo(s,un,t))});const c=Array.from(s);return 0===c.length&&c.push(Object.create(null)),mo.has(e)&&o.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,ln[e]||{},pn.datasets[e]||{},{type:e},pn,un]}resolveNamedOptions(t,e,n,r=[""]){const i={$shared:!0},{resolver:o,subPrefixes:a}=_o(this._resolverCache,t,r);let s=o;if(function(t,e){const{isScriptable:n,isIndexable:r}=Vn(t);for(const i of e){const e=n(i),o=r(i),a=(o||e)&&t[i];if(e&&(ye(a)||Oo(a))||o&&Zt(a))return!0}return!1}(o,e)){i.$shared=!1;s=Fn(o,n=ye(n)?n():n,this.createResolver(t,n,a))}for(const c of e)i[c]=s[c];return i}createResolver(t,e,n=[""],r){const{resolver:i}=_o(this._resolverCache,t,n);return Qt(e)?Fn(i,e,void 0,r):i}}function _o(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));const i=n.join();let o=r.get(i);if(!o){o={resolver:zn(e,n),subPrefixes:n.filter(t=>!t.toLowerCase().includes("hover"))},r.set(i,o)}return o}const Oo=t=>Qt(t)&&Object.getOwnPropertyNames(t).some(e=>ye(t[e]));const So=["top","bottom","left","right","chartArea"];function Po(t,e){return"top"===t||"bottom"===t||-1===So.indexOf(t)&&"x"===e}function Mo(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}function ko(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),re(n&&n.onComplete,[t],e)}function Eo(t){const e=t.chart,n=e.options.animation;re(n&&n.onProgress,[t],e)}function Ao(t){return ar()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Co={},jo=t=>{const e=Ao(t);return Object.values(Co).filter(t=>t.canvas===e).pop()};function Io(t,e,n){const r=Object.keys(t);for(const i of r){const r=+i;if(r>=e){const o=t[i];delete t[i],(n>0||r>e)&&(t[r+n]=o)}}}class Do{static defaults=pn;static instances=Co;static overrides=ln;static registry=io;static version="4.5.1";static getChart=jo;static register(...t){io.add(...t),To()}static unregister(...t){io.remove(...t),To()}constructor(t,e){const n=this.config=new wo(e),r=Ao(t),i=jo(r);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const o=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function(t){return!ar()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Ai:Ki}(r)),this.platform.updateConfig(n);const a=this.platform.acquireContext(r,o.aspectRatio),s=a&&a.canvas,c=s&&s.height,l=s&&s.width;this.id=qt(),this.ctx=a,this.canvas=s,this.width=l,this.height=c,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 oo,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let n;return function(...r){return e?(clearTimeout(n),n=setTimeout(t,e,r)):t.apply(this,r),e}}(t=>this.update(t),o.resizeDelay||0),this._dataChanges=[],Co[this.id]=this,a&&s?(jr.listen(this,"complete",ko),jr.listen(this,"progress",Eo),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:r,_aspectRatio:i}=this;return Gt(t)?e&&i?i:r?n/r: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 io}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():gr(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return vn(this.canvas,this.ctx),this}stop(){return jr.stop(this),this}resize(t,e){jr.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,r=this.canvas,i=n.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(r,t,e,i),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,gr(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),re(n.onResize,[this,o],this),this.attached&&this._doResize(s)&&this.render())}ensureScalesHaveIDs(){ie(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,r=Object.keys(n).reduce((t,e)=>(t[e]=!1,t),{});let i=[];e&&(i=i.concat(Object.keys(e).map(t=>{const n=e[t],r=ho(t,n),i="r"===r,o="x"===r;return{options:n,dposition:i?"chartArea":o?"bottom":"left",dtype:i?"radialLinear":o?"category":"linear"}}))),ie(i,e=>{const i=e.options,o=i.id,a=ho(o,i),s=ee(i.type,e.dtype);void 0!==i.position&&Po(i.position,a)===Po(e.dposition)||(i.position=e.dposition),r[o]=!0;let c=null;if(o in n&&n[o].type===s)c=n[o];else{c=new(io.getScale(s))({id:o,type:s,ctx:this.ctx,chart:this}),n[c.id]=c}c.init(i,t)}),ie(r,(t,e)=>{t||delete n[e]}),ie(n,t=>{ki.configure(this,t,t.options),ki.addBox(this,t)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort((t,e)=>t.index-e.index),n>e){for(let t=e;t<n;++t)this._destroyDatasetMeta(t);t.splice(e,n-e)}this._sortedMetasets=t.slice(0).sort(Mo("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((t,n)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,r;for(this._removeUnreferencedMetasets(),n=0,r=e.length;n<r;n++){const r=e[n];let i=this.getDatasetMeta(n);const o=r.type||this.config.type;if(i.type&&i.type!==o&&(this._destroyDatasetMeta(n),i=this.getDatasetMeta(n)),i.type=o,i.indexAxis=r.indexAxis||co(o,this.options),i.order=r.order||0,i.index=n,i.label=""+r.label,i.visible=this.isDatasetVisible(n),i.controller)i.controller.updateIndex(n),i.controller.linkScales();else{const e=io.getController(o),{datasetElementType:r,dataElementType:a}=pn.datasets[o];Object.assign(e,{dataElementType:io.getElement(a),datasetElementType:r&&io.getElement(r)}),i.controller=new e(this,n),t.push(i.controller)}}return this._updateMetasets(),t}_resetElements(){ie(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,l=this.data.datasets.length;c<l;c++){const{controller:t}=this.getDatasetMeta(c),e=!r&&-1===i.indexOf(t);t.buildOrUpdateElements(e),o=Math.max(+t.getMaxOverflow(),o)}o=this._minPadding=n.layout.autoPadding?o:0,this._updateLayout(o),r||ie(i,t=>{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Mo("z","_idx"));const{_active:a,_lastEvent:s}=this;s?this._eventHandler(s,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){ie(this.scales,t=>{ki.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);ve(e,n)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:r,count:i}of e){Io(t,r,"_removeElements"===n?-i:i)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),r=n(0);for(let i=1;i<e;i++)if(!ve(r,n(i)))return;return Array.from(r).map(t=>t.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;ki.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],ie(this.boxes,t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,n=this.data.datasets.length;e<n;++e)this._updateDataset(e,ye(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const n=this.getDatasetMeta(t),r={meta:n,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",r)&&(n.controller._update(e),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(jr.has(this)?this.attached&&!jr.running(this)&&jr.start(this):(this.draw(),ko({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,n=[];let r,i;for(r=0,i=e.length;r<i;++r){const i=e[r];t&&!i.visible||n.push(i)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n={meta:t,index:t.index,cancelable:!0},r=Ar(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",n)&&(r&&xn(e,r),t.controller.draw(),r&&wn(e),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return bn(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,r){const i=pi.modes[e];return"function"==typeof i?i(this,t,n,r):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let r=n.filter(t=>t&&t._dataset===e).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||(this.$context=Nn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return"boolean"==typeof n.hidden?!n.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const r=n?"show":"hide",i=this.getDatasetMeta(t),o=i.controller._resolveAnimations(void 0,r);ge(e)?(i.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),o.update(i,{visible:n}),this.update(e=>e.datasetIndex===t?r:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),jr.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),vn(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Co[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,e=this.platform,n=(n,r)=>{e.addEventListener(this,n,r),t[n]=r},r=(t,e,n)=>{t.offsetX=e,t.offsetY=n,this._eventHandler(t)};ie(this.options.events,t=>n(t,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(n,r)=>{e.addEventListener(this,n,r),t[n]=r},r=(n,r)=>{t[n]&&(e.removeEventListener(this,n,r),delete t[n])},i=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const a=()=>{r("attach",a),this.attached=!0,this.resize(),n("resize",i),n("detach",o)};o=()=>{this.attached=!1,r("resize",i),this._stop(),this._resize(0,0),n("attach",a)},e.isAttached(this.canvas)?a():o()}unbindEvents(){ie(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},ie(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const r=n?"set":"remove";let i,o,a,s;for("dataset"===e&&(i=this.getDatasetMeta(t[0].datasetIndex),i.controller["_"+r+"DatasetHoverStyle"]()),a=0,s=t.length;a<s;++a){o=t[a];const e=o&&this.getDatasetMeta(o.datasetIndex).controller;e&&e[r+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],n=t.map(({datasetIndex:t,index:e})=>{const n=this.getDatasetMeta(t);if(!n)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[e],index:e}});!oe(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return 1===this._plugins._cache.filter(e=>e.plugin.id===t).length}_updateHoverStyles(t,e,n){const r=this.options.hover,i=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),o=i(e,t),a=n?t:i(t,e);o.length&&this.updateHoverStyle(o,r.mode,!1),a.length&&r.mode&&this.updateHoverStyle(a,r.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},r=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",n,r))return;const i=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,r),(i||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:r=[],options:i}=this,o=e,a=this._getActiveElements(t,r,n,o),s=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),c=function(t,e,n,r){return n&&"mouseout"!==t.type?r?e:t:null}(t,this._lastEvent,n,s);n&&(this._lastEvent=null,re(i.onHover,[t,a,this],this),s&&re(i.onClick,[t,a,this],this));const l=!oe(a,r);return(l||e)&&(this._active=a,this._updateHoverStyles(a,r,e)),this._lastEvent=c,l}_getActiveElements(t,e,n,r){if("mouseout"===t.type)return[];if(!n)return e;const i=this.options.hover;return this.getElementsAtEventForMode(t,i.mode,i,r)}}function To(){return ie(Do.instances,t=>t._plugins.invalidate())}function Ro(t,e,n=e){t.lineCap=ee(n.borderCapStyle,e.borderCapStyle),t.setLineDash(ee(n.borderDash,e.borderDash)),t.lineDashOffset=ee(n.borderDashOffset,e.borderDashOffset),t.lineJoin=ee(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=ee(n.borderWidth,e.borderWidth),t.strokeStyle=ee(n.borderColor,e.borderColor)}function Lo(t,e,n){t.lineTo(n.x,n.y)}function Bo(t,e,n={}){const r=t.length,{start:i=0,end:o=r-1}=n,{start:a,end:s}=e,c=Math.max(i,a),l=Math.min(o,s),u=i<a&&o<a||i>s&&o>s;return{count:r,start:c,loop:e.loop,ilen:l<c&&!u?r+l-c:l-c}}function No(t,e,n,r){const{points:i,options:o}=e,{count:a,start:s,loop:c,ilen:l}=Bo(i,n,r),u=function(t){return t.stepped?_n:t.tension||"monotone"===t.cubicInterpolationMode?On:Lo}(o);let h,d,f,{move:p=!0,reverse:g}=r||{};for(h=0;h<=l;++h)d=i[(s+(g?l-h:h))%a],d.skip||(p?(t.moveTo(d.x,d.y),p=!1):u(t,f,d,g,o.stepped),f=d);return c&&(d=i[(s+(g?l:0))%a],u(t,f,d,g,o.stepped)),!!c}function zo(t,e,n,r){const i=e.points,{count:o,start:a,ilen:s}=Bo(i,n,r),{move:c=!0,reverse:l}=r||{};let u,h,d,f,p,g,y=0,v=0;const m=t=>(a+(l?s-t:t))%o,b=()=>{f!==p&&(t.lineTo(y,p),t.lineTo(y,f),t.lineTo(y,g))};for(c&&(h=i[m(0)],t.moveTo(h.x,h.y)),u=0;u<=s;++u){if(h=i[m(u)],h.skip)continue;const e=h.x,n=h.y,r=0|e;r===d?(n<f?f=n:n>p&&(p=n),y=(v*y+e)/++v):(b(),t.lineTo(e,n),d=r,v=0,f=p=n),g=n}b()}function Fo(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||n)?zo:No}const Vo="function"==typeof Path2D;function Wo(t,e,n,r){Vo&&!e.options.segment?function(t,e,n,r){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,r)&&i.closePath()),Ro(t,e.options),t.stroke(i)}(t,e,n,r):function(t,e,n,r){const{segments:i,options:o}=e,a=Fo(e);for(const s of i)Ro(t,o,s.style),t.beginPath(),a(t,e,s,{start:n,end:n+r-1})&&t.closePath(),t.stroke()}(t,e,n,r)}class Uo extends Hi{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=>"borderDash"!==t&&"fill"!==t};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,e){const n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const r=n.spanGaps?this._loop:this._fullLoop;or(this._points,n,t,r,e),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=function(t,e){const n=t.points,r=t.options.spanGaps,i=n.length;if(!i)return[];const o=!!t._loop,{start:a,end:s}=function(t,e,n,r){let i=0,o=e-1;if(n&&!r)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(o+=i);o>i&&t[o%e].skip;)o--;return o%=e,{start:i,end:o}}(n,i,o,r);return Pr(t,!0===r?[{start:a,end:s,loop:o}]:function(t,e,n,r){const i=t.length,o=[];let a,s=e,c=t[e];for(a=e+1;a<=n;++a){const n=t[a%i];n.skip||n.stop?c.skip||(r=!1,o.push({start:e%i,end:(a-1)%i,loop:r}),e=s=n.stop?a:null):(s=a,c.skip&&(e=a)),c=n}return null!==s&&o.push({start:e%i,end:s%i,loop:r}),o}(n,a,s<a?s+i:s,!!t._fullLoop&&0===a&&s===i-1),n,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){const n=this.options,r=t[e],i=this.points,o=function(t,e){const n=[],r=t.segments;for(let i=0;i<r.length;i++){const o=Sr(r[i],t.points,e);o.length&&n.push(...o)}return n}(this,{property:e,start:r,end:r});if(!o.length)return;const a=[],s=function(t){return t.stepped?br:t.tension||"monotone"===t.cubicInterpolationMode?xr:mr}(n);let c,l;for(c=0,l=o.length;c<l;++c){const{start:l,end:u}=o[c],h=i[l],d=i[u];if(h===d){a.push(h);continue}const f=s(h,d,Math.abs((r-h[e])/(d[e]-h[e])),n.stepped);f[e]=t[e],a.push(f)}return 1===a.length?a[0]:a}pathSegment(t,e,n){return Fo(this)(t,this,e,n)}path(t,e,n){const r=this.segments,i=Fo(this);let o=this._loop;e=e||0,n=n||this.points.length-e;for(const a of r)o&=i(t,this,a,{start:e,end:e+n-1});return!!o}draw(t,e,n,r){const i=this.options||{};(this.points||[]).length&&i.borderWidth&&(t.save(),Wo(t,this,n,r),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Ko(t,e,n,r){const i=t.options,{[n]:o}=t.getProps([n],r);return Math.abs(e-o)<i.radius+i.hitRadius}class Ho extends Hi{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,e,n){const r=this.options,{x:i,y:o}=this.getProps(["x","y"],n);return Math.pow(t-i,2)+Math.pow(e-o,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(t,e){return Ko(this,t,"x",e)}inYRange(t,e){return Ko(this,t,"y",e)}getCenterPoint(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const n=this.options;this.skip||n.radius<.1||!bn(this,e,this.size(n)/2)||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,mn(t,n,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function $o(t,e){const{x:n,y:r,base:i,width:o,height:a}=t.getProps(["x","y","base","width","height"],e);let s,c,l,u,h;return t.horizontal?(h=a/2,s=Math.min(n,i),c=Math.max(n,i),l=r-h,u=r+h):(h=o/2,s=n-h,c=n+h,l=Math.min(r,i),u=Math.max(r,i)),{left:s,top:l,right:c,bottom:u}}function Yo(t,e,n,r){return t?0:Be(e,n,r)}function Xo(t){const e=$o(t),n=e.right-e.left,r=e.bottom-e.top,i=function(t,e,n){const r=t.options.borderWidth,i=t.borderSkipped,o=Dn(r);return{t:Yo(i.top,o.top,0,n),r:Yo(i.right,o.right,0,e),b:Yo(i.bottom,o.bottom,0,n),l:Yo(i.left,o.left,0,e)}}(t,n/2,r/2),o=function(t,e,n){const{enableBorderRadius:r}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,o=Tn(i),a=Math.min(e,n),s=t.borderSkipped,c=r||Qt(i);return{topLeft:Yo(!c||s.top||s.left,o.topLeft,0,a),topRight:Yo(!c||s.top||s.right,o.topRight,0,a),bottomLeft:Yo(!c||s.bottom||s.left,o.bottomLeft,0,a),bottomRight:Yo(!c||s.bottom||s.right,o.bottomRight,0,a)}}(t,n/2,r/2);return{outer:{x:e.left,y:e.top,w:n,h:r,radius:o},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function qo(t,e,n,r){const i=null===e,o=null===n,a=t&&!(i&&o)&&$o(t,r);return a&&(i||Ne(e,a.left,a.right))&&(o||Ne(n,a.top,a.bottom))}function Go(t,e){t.rect(e.x,e.y,e.w,e.h)}function Zo(t,e,n={}){const r=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,o=(t.x+t.w!==n.x+n.w?e:0)-r,a=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+r,y:t.y+i,w:t.w+o,h:t.h+a,radius:t.radius}}class Qo extends Hi{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:e,options:{borderColor:n,backgroundColor:r}}=this,{inner:i,outer:o}=Xo(this),a=(s=o.radius).topLeft||s.topRight||s.bottomLeft||s.bottomRight?kn:Go;var s;t.save(),o.w===i.w&&o.h===i.h||(t.beginPath(),a(t,Zo(o,e,i)),t.clip(),a(t,Zo(i,-e,o)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),a(t,Zo(i,e)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,e,n){return qo(this,t,e,n)}inXRange(t,e){return qo(this,t,null,e)}inYRange(t,e){return qo(this,null,t,e)}getCenterPoint(t){const{x:e,y:n,base:r,horizontal:i}=this.getProps(["x","y","base","horizontal"],t);return{x:i?(e+r)/2:e,y:i?n:(n+r)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}const Jo=["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)"],ta=Jo.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function ea(t){return Jo[t%Jo.length]}function na(t){return ta[t%ta.length]}function ra(t){let e=0;return(n,r)=>{const i=t.getDatasetMeta(r).controller;i instanceof ri?e=function(t,e){return t.backgroundColor=t.data.map(()=>ea(e++)),e}(n,e):i instanceof oi?e=function(t,e){return t.backgroundColor=t.data.map(()=>na(e++)),e}(n,e):i&&(e=function(t,e){return t.borderColor=ea(e),t.backgroundColor=na(e),++e}(n,e))}}function ia(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var oa={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:r},options:i}=t.config,{elements:o}=i,a=ia(r)||(s=i)&&(s.borderColor||s.backgroundColor)||o&&ia(o)||"rgba(0,0,0,0.1)"!==pn.borderColor||"rgba(0,0,0,0.1)"!==pn.backgroundColor;var s;if(!n.forceOverride&&a)return;const c=ra(t);r.forEach(c)}};const aa={average(t){if(!t.length)return!1;let e,n,r=new Set,i=0,o=0;for(e=0,n=t.length;e<n;++e){const n=t[e].element;if(n&&n.hasValue()){const t=n.tooltipPosition();r.add(t.x),i+=t.y,++o}}if(0===o||0===r.size)return!1;return{x:[...r].reduce((t,e)=>t+e)/r.size,y:i/o}},nearest(t,e){if(!t.length)return!1;let n,r,i,o=e.x,a=e.y,s=Number.POSITIVE_INFINITY;for(n=0,r=t.length;n<r;++n){const r=t[n].element;if(r&&r.hasValue()){const t=De(e,r.getCenterPoint());t<s&&(s=t,i=r)}}if(i){const t=i.tooltipPosition();o=t.x,a=t.y}return{x:o,y:a}}};function sa(t,e){return e&&(Zt(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function ca(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function la(t,e){const{element:n,datasetIndex:r,index:i}=e,o=t.getDatasetMeta(r).controller,{label:a,value:s}=o.getLabelAndValue(i);return{chart:t,label:a,parsed:o.getParsed(i),raw:t.data.datasets[r].data[i],formattedValue:s,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function ua(t,e){const n=t.chart.ctx,{body:r,footer:i,title:o}=t,{boxWidth:a,boxHeight:s}=e,c=Ln(e.bodyFont),l=Ln(e.titleFont),u=Ln(e.footerFont),h=o.length,d=i.length,f=r.length,p=Rn(e.padding);let g=p.height,y=0,v=r.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);if(v+=t.beforeBody.length+t.afterBody.length,h&&(g+=h*l.lineHeight+(h-1)*e.titleSpacing+e.titleMarginBottom),v){g+=f*(e.displayColors?Math.max(s,c.lineHeight):c.lineHeight)+(v-f)*c.lineHeight+(v-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*u.lineHeight+(d-1)*e.footerSpacing);let m=0;const b=function(t){y=Math.max(y,n.measureText(t).width+m)};return n.save(),n.font=l.string,ie(t.title,b),n.font=c.string,ie(t.beforeBody.concat(t.afterBody),b),m=e.displayColors?a+2+e.boxPadding:0,ie(r,t=>{ie(t.before,b),ie(t.lines,b),ie(t.after,b)}),m=0,n.font=u.string,ie(t.footer,b),n.restore(),y+=p.width,{width:y,height:g}}function ha(t,e,n,r){const{x:i,width:o}=n,{width:a,chartArea:{left:s,right:c}}=t;let l="center";return"center"===r?l=i<=(s+c)/2?"left":"right":i<=o/2?l="left":i>=a-o/2&&(l="right"),function(t,e,n,r){const{x:i,width:o}=r,a=n.caretSize+n.caretPadding;return"left"===t&&i+o+a>e.width||"right"===t&&i-o-a<0||void 0}(l,t,e,n)&&(l="center"),l}function da(t,e,n){const r=n.yAlign||e.yAlign||function(t,e){const{y:n,height:r}=e;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}(t,n);return{xAlign:n.xAlign||e.xAlign||ha(t,e,n,r),yAlign:r}}function fa(t,e,n,r){const{caretSize:i,caretPadding:o,cornerRadius:a}=t,{xAlign:s,yAlign:c}=n,l=i+o,{topLeft:u,topRight:h,bottomLeft:d,bottomRight:f}=Tn(a);let p=function(t,e){let{x:n,width:r}=t;return"right"===e?n-=r:"center"===e&&(n-=r/2),n}(e,s);const g=function(t,e,n){let{y:r,height:i}=t;return"top"===e?r+=n:r-="bottom"===e?i+n:i/2,r}(e,c,l);return"center"===c?"left"===s?p+=l:"right"===s&&(p-=l):"left"===s?p-=Math.max(u,d)+i:"right"===s&&(p+=Math.max(h,f)+i),{x:Be(p,0,r.width-e.width),y:Be(g,0,r.height-e.height)}}function pa(t,e,n){const r=Rn(n.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-r.right:t.x+r.left}function ga(t){return sa([],ca(t))}function ya(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const va={beforeTitle:Xt,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return n[e.dataIndex]}return""},afterTitle:Xt,beforeBody:Xt,beforeLabel:Xt,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return Gt(n)||(e+=n),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:Xt,afterBody:Xt,beforeFooter:Xt,footer:Xt,afterFooter:Xt};function ma(t,e,n,r){const i=t[e].call(n,r);return void 0===i?va[e].call(n,r):i}let ba=class extends Hi{static positioners=aa;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 e=this.chart,n=this.options.setContext(this.getContext()),r=n.enabled&&e.options.animation&&n.animations,i=new Rr(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,n=this._tooltipItems,Nn(t,{tooltip:e,tooltipItems:n,type:"tooltip"})));var t,e,n}getTitle(t,e){const{callbacks:n}=e,r=ma(n,"beforeTitle",this,t),i=ma(n,"title",this,t),o=ma(n,"afterTitle",this,t);let a=[];return a=sa(a,ca(r)),a=sa(a,ca(i)),a=sa(a,ca(o)),a}getBeforeBody(t,e){return ga(ma(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:n}=e,r=[];return ie(t,t=>{const e={before:[],lines:[],after:[]},i=ya(n,t);sa(e.before,ca(ma(i,"beforeLabel",this,t))),sa(e.lines,ma(i,"label",this,t)),sa(e.after,ca(ma(i,"afterLabel",this,t))),r.push(e)}),r}getAfterBody(t,e){return ga(ma(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:n}=e,r=ma(n,"beforeFooter",this,t),i=ma(n,"footer",this,t),o=ma(n,"afterFooter",this,t);let a=[];return a=sa(a,ca(r)),a=sa(a,ca(i)),a=sa(a,ca(o)),a}_createItems(t){const e=this._active,n=this.chart.data,r=[],i=[],o=[];let a,s,c=[];for(a=0,s=e.length;a<s;++a)c.push(la(this.chart,e[a]));return t.filter&&(c=c.filter((e,r,i)=>t.filter(e,r,i,n))),t.itemSort&&(c=c.sort((e,r)=>t.itemSort(e,r,n))),ie(c,e=>{const n=ya(t.callbacks,e);r.push(ma(n,"labelColor",this,e)),i.push(ma(n,"labelPointStyle",this,e)),o.push(ma(n,"labelTextColor",this,e))}),this.labelColors=r,this.labelPointStyles=i,this.labelTextColors=o,this.dataPoints=c,c}update(t,e){const n=this.options.setContext(this.getContext()),r=this._active;let i,o=[];if(r.length){const t=aa[n.position].call(this,r,this._eventPosition);o=this._createItems(n),this.title=this.getTitle(o,n),this.beforeBody=this.getBeforeBody(o,n),this.body=this.getBody(o,n),this.afterBody=this.getAfterBody(o,n),this.footer=this.getFooter(o,n);const e=this._size=ua(this,n),a=Object.assign({},t,e),s=da(this.chart,n,a),c=fa(n,a,s,this.chart);this.xAlign=s.xAlign,this.yAlign=s.yAlign,i={opacity:1,x:c.x,y:c.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(i={opacity:0});this._tooltipItems=o,this.$context=void 0,i&&this._resolveAnimations().update(this,i),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,r){const i=this.getCaretPosition(t,n,r);e.lineTo(i.x1,i.y1),e.lineTo(i.x2,i.y2),e.lineTo(i.x3,i.y3)}getCaretPosition(t,e,n){const{xAlign:r,yAlign:i}=this,{caretSize:o,cornerRadius:a}=n,{topLeft:s,topRight:c,bottomLeft:l,bottomRight:u}=Tn(a),{x:h,y:d}=t,{width:f,height:p}=e;let g,y,v,m,b,x;return"center"===i?(b=d+p/2,"left"===r?(g=h,y=g-o,m=b+o,x=b-o):(g=h+f,y=g+o,m=b-o,x=b+o),v=g):(y="left"===r?h+Math.max(s,l)+o:"right"===r?h+f-Math.max(c,u)-o:this.caretX,"top"===i?(m=d,b=m-o,g=y-o,v=y+o):(m=d+p,b=m+o,g=y+o,v=y-o),x=m),{x1:g,x2:y,x3:v,y1:m,y2:b,y3:x}}drawTitle(t,e,n){const r=this.title,i=r.length;let o,a,s;if(i){const c=wr(n.rtl,this.x,this.width);for(t.x=pa(this,n.titleAlign,n),e.textAlign=c.textAlign(n.titleAlign),e.textBaseline="middle",o=Ln(n.titleFont),a=n.titleSpacing,e.fillStyle=n.titleColor,e.font=o.string,s=0;s<i;++s)e.fillText(r[s],c.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a,s+1===i&&(t.y+=n.titleMarginBottom-a)}}_drawColorBox(t,e,n,r,i){const o=this.labelColors[n],a=this.labelPointStyles[n],{boxHeight:s,boxWidth:c}=i,l=Ln(i.bodyFont),u=pa(this,"left",i),h=r.x(u),d=s<l.lineHeight?(l.lineHeight-s)/2:0,f=e.y+d;if(i.usePointStyle){const e={radius:Math.min(c,s)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},n=r.leftForLtr(h,c)+c/2,l=f+s/2;t.strokeStyle=i.multiKeyBackground,t.fillStyle=i.multiKeyBackground,mn(t,e,n,l),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,mn(t,e,n,l)}else{t.lineWidth=Qt(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 e=r.leftForLtr(h,c),n=r.leftForLtr(r.xPlus(h,1),c-2),a=Tn(o.borderRadius);Object.values(a).some(t=>0!==t)?(t.beginPath(),t.fillStyle=i.multiKeyBackground,kn(t,{x:e,y:f,w:c,h:s,radius:a}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),kn(t,{x:n,y:f+1,w:c-2,h:s-2,radius:a}),t.fill()):(t.fillStyle=i.multiKeyBackground,t.fillRect(e,f,c,s),t.strokeRect(e,f,c,s),t.fillStyle=o.backgroundColor,t.fillRect(n,f+1,c-2,s-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:r}=this,{bodySpacing:i,bodyAlign:o,displayColors:a,boxHeight:s,boxWidth:c,boxPadding:l}=n,u=Ln(n.bodyFont);let h=u.lineHeight,d=0;const f=wr(n.rtl,this.x,this.width),p=function(n){e.fillText(n,f.x(t.x+d),t.y+h/2),t.y+=h+i},g=f.textAlign(o);let y,v,m,b,x,w,_;for(e.textAlign=o,e.textBaseline="middle",e.font=u.string,t.x=pa(this,g,n),e.fillStyle=n.bodyColor,ie(this.beforeBody,p),d=a&&"right"!==g?"center"===o?c/2+l:c+2+l:0,b=0,w=r.length;b<w;++b){for(y=r[b],v=this.labelTextColors[b],e.fillStyle=v,ie(y.before,p),m=y.lines,a&&m.length&&(this._drawColorBox(e,t,b,f,n),h=Math.max(u.lineHeight,s)),x=0,_=m.length;x<_;++x)p(m[x]),h=u.lineHeight;ie(y.after,p)}d=0,h=u.lineHeight,ie(this.afterBody,p),t.y-=i}drawFooter(t,e,n){const r=this.footer,i=r.length;let o,a;if(i){const s=wr(n.rtl,this.x,this.width);for(t.x=pa(this,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=s.textAlign(n.footerAlign),e.textBaseline="middle",o=Ln(n.footerFont),e.fillStyle=n.footerColor,e.font=o.string,a=0;a<i;++a)e.fillText(r[a],s.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+n.footerSpacing}}drawBackground(t,e,n,r){const{xAlign:i,yAlign:o}=this,{x:a,y:s}=t,{width:c,height:l}=n,{topLeft:u,topRight:h,bottomLeft:d,bottomRight:f}=Tn(r.cornerRadius);e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.beginPath(),e.moveTo(a+u,s),"top"===o&&this.drawCaret(t,e,n,r),e.lineTo(a+c-h,s),e.quadraticCurveTo(a+c,s,a+c,s+h),"center"===o&&"right"===i&&this.drawCaret(t,e,n,r),e.lineTo(a+c,s+l-f),e.quadraticCurveTo(a+c,s+l,a+c-f,s+l),"bottom"===o&&this.drawCaret(t,e,n,r),e.lineTo(a+d,s+l),e.quadraticCurveTo(a,s+l,a,s+l-d),"center"===o&&"left"===i&&this.drawCaret(t,e,n,r),e.lineTo(a,s+u),e.quadraticCurveTo(a,s,a+u,s),e.closePath(),e.fill(),r.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,r=n&&n.x,i=n&&n.y;if(r||i){const n=aa[t.position].call(this,this._active,this._eventPosition);if(!n)return;const o=this._size=ua(this,t),a=Object.assign({},n,this._size),s=da(e,t,a),c=fa(t,a,s,e);r._to===c.x&&i._to===c.y||(this.xAlign=s.xAlign,this.yAlign=s.yAlign,this.width=o.width,this.height=o.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const r={width:this.width,height:this.height},i={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const o=Rn(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=n,this.drawBackground(i,t,r,e),function(t,e){let n,r;"ltr"!==e&&"rtl"!==e||(n=t.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r)}(t,e.textDirection),i.y+=o.top,this.drawTitle(i,t,e),this.drawBody(i,t,e),this.drawFooter(i,t,e),function(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,r=t.map(({datasetIndex:t,index:e})=>{const n=this.chart.getDatasetMeta(t);if(!n)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}}),i=!oe(n,r),o=this._positionChanged(r,e);(i||o)&&(this._active=r,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,i=this._active||[],o=this._getActiveElements(t,i,e,n),a=this._positionChanged(o,t),s=e||!oe(o,i)||a;return s&&(this._active=o,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),s}_getActiveElements(t,e,n,r){const i=this.options;if("mouseout"===t.type)return[];if(!r)return e.filter(t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index));const o=this.chart.getElementsAtEventForMode(t,i.mode,i,n);return i.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:n,caretY:r,options:i}=this,o=aa[i.position].call(this,t,e);return!1!==o&&(n!==o.x||r!==o.y)}};var xa={id:"tooltip",_element:ba,positioners:aa,afterInit(t,e,n){n&&(t.tooltip=new ba({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.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:va},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function wa(t,e,n,r){const i=t.indexOf(e);if(-1===i)return((t,e,n,r)=>("string"==typeof e?(n=t.push(e)-1,r.unshift({index:n,label:e})):isNaN(e)&&(n=null),n))(t,e,n,r);return i!==t.lastIndexOf(e)?n:i}function _a(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Oa extends eo{static id="category";static defaults={ticks:{callback:_a}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:n,label:r}of e)t[n]===r&&t.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(Gt(t))return null;const n=this.getLabels();return((t,e)=>null===t?null:Be(Math.round(t),0,e))(e=isFinite(e)&&n[e]===t?e:wa(n,t,ee(e,t),this._addedLabels),n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:n,max:r}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(n=0),e||(r=this.getLabels().length-1)),this.min=n,this.max=r}buildTicks(){const t=this.min,e=this.max,n=this.options.offset,r=[];let i=this.getLabels();i=0===t&&e===i.length-1?i:i.slice(t,e+1),this._valueRange=Math.max(i.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let o=t;o<=e;o++)r.push({value:o});return r}getLabelForValue(t){return _a.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Sa(t,e){const n=[],{bounds:r,step:i,min:o,max:a,precision:s,count:c,maxTicks:l,maxDigits:u,includeBounds:h}=t,d=i||1,f=l-1,{min:p,max:g}=e,y=!Gt(o),v=!Gt(a),m=!Gt(c),b=(g-p)/(u+1);let x,w,_,O,S=Ae((g-p)/f/d)*d;if(S<1e-14&&!y&&!v)return[{value:p},{value:g}];O=Math.ceil(g/S)-Math.floor(p/S),O>f&&(S=Ae(O*S/f/d)*d),Gt(s)||(x=Math.pow(10,s),S=Math.ceil(S*x)/x),"ticks"===r?(w=Math.floor(p/S)*S,_=Math.ceil(g/S)*S):(w=p,_=g),y&&v&&i&&function(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}((a-o)/i,S/1e3)?(O=Math.round(Math.min((a-o)/S,l)),S=(a-o)/O,w=o,_=a):m?(w=y?o:w,_=v?a:_,O=c-1,S=(_-w)/O):(O=(_-w)/S,O=Ee(O,Math.round(O),S/1e3)?Math.round(O):Math.ceil(O));const P=Math.max(Ie(S),Ie(w));x=Math.pow(10,Gt(s)?P:s),w=Math.round(w*x)/x,_=Math.round(_*x)/x;let M=0;for(y&&(h&&w!==o?(n.push({value:o}),w<o&&M++,Ee(Math.round((w+M*S)*x)/x,o,Pa(o,b,t))&&M++):w<o&&M++);M<O;++M){const t=Math.round((w+M*S)*x)/x;if(v&&t>a)break;n.push({value:t})}return v&&h&&_!==a?n.length&&Ee(n[n.length-1].value,a,Pa(a,b,t))?n[n.length-1].value=a:n.push({value:a}):v&&_!==a||n.push({value:_}),n}function Pa(t,e,{horizontal:n,minRotation:r}){const i=je(r),o=(n?Math.sin(i):Math.cos(i))||.001,a=.75*e*(""+t).length;return Math.min(e/o,a)}class Ma extends eo{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,e){return Gt(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this;const o=t=>r=e?r:t,a=t=>i=n?i:t;if(t){const t=ke(r),e=ke(i);t<0&&e<0?a(0):t>0&&e>0&&o(0)}if(r===i){let e=0===i?1:Math.abs(.05*i);a(i+e),t||o(r-e)}this.min=r,this.max=i}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:n,stepSize:r}=t;return r?(e=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),n=n||11),n&&(e=Math.min(n,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const r=Sa({maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&function(t,e,n){let r,i,o;for(r=0,i=t.length;r<i;r++)o=t[r][n],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const r=(n-e)/Math.max(t.length-1,1)/2;e-=r,n+=r}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return sn(t,this.chart.options.locale,this.options.ticks.format)}}class ka extends Ma{static id="linear";static defaults={ticks:{callback:cn.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Jt(t)?t:0,this.max=Jt(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=je(this.options.ticks.minRotation),r=(t?Math.sin(n):Math.cos(n))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,i.lineHeight/r))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}var Ea=["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 Aa(t){return"string"==typeof t&&Ea.includes(t)}var Ca=new Set(["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"]);function ja(t){return"string"==typeof t&&Ca.has(t)}function Ia(t){return"string"==typeof t&&t.startsWith("data-")}function Da(t){if("object"!=typeof t||null===t)return{};var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(ja(n)||Ia(n))&&(e[n]=t[n]);return e}function Ta(e){return null==e?null:t.isValidElement(e)&&"object"==typeof e.props&&null!==e.props?Da(e.props):"object"!=typeof e||Array.isArray(e)?null:Da(e)}function Ra(t){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(ja(n)||Ia(n)||Aa(n))&&(e[n]=t[n]);return e}var La=["children","width","height","viewBox","className","style","title","desc"];function Ba(){return Ba=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ba.apply(null,arguments)}var Na=t.forwardRef((e,n)=>{var{children:r,width:o,height:a,viewBox:s,className:c,style:l,title:u,desc:h}=e,d=function(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(e,La),f=s||{width:o,height:a,x:0,y:0},p=i("recharts-surface",c);return t.createElement("svg",Ba({},Ra(d),{className:p,width:o,height:a,style:l,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:n}),t.createElement("title",null,u),t.createElement("desc",null,h),r)}),za=["children","className"];function Fa(){return Fa=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Fa.apply(null,arguments)}var Va,Wa=t.forwardRef((e,n)=>{var{children:r,className:o}=e,a=function(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(e,za),s=i("recharts-layer",o);return t.createElement("g",Fa({className:s},Ra(a),{ref:n}),r)}),Ua=t.createContext(null),Ka={},Ha={};function $a(){return Va||(Va=1,t=Ha,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isUnsafeProperty=function(t){return"__proto__"===t}),Ha;var t}var Ya,Xa={};function qa(){return Ya||(Ya=1,t=Xa,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isDeepKey=function(t){switch(typeof t){case"number":case"symbol":return!1;case"string":return t.includes(".")||t.includes("[")||t.includes("]")}}),Xa;var t}var Ga,Za={};function Qa(){return Ga||(Ga=1,t=Za,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.toKey=function(t){return"string"==typeof t||"symbol"==typeof t?t:Object.is(t?.valueOf?.(),-0)?"-0":String(t)}),Za;var t}var Ja,ts,es,ns,rs,is={},os={};function as(){return Ja||(Ja=1,t=os,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.toString=function t(e){if(null==e)return"";if("string"==typeof e)return e;if(Array.isArray(e))return e.map(t).join(",");const n=String(e);return"0"===n&&Object.is(Number(e),-0)?"-0":n}),os;var t}function ss(){return ts||(ts=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=as(),n=Qa();t.toPath=function(t){if(Array.isArray(t))return t.map(n.toKey);if("symbol"==typeof t)return[t];const r=[],i=(t=e.toString(t)).length;if(0===i)return r;let o=0,a="",s="",c=!1;for(46===t.charCodeAt(0)&&(r.push(""),o++);o<i;){const e=t[o];s?"\\"===e&&o+1<i?(o++,a+=t[o]):e===s?s="":a+=e:c?'"'===e||"'"===e?s=e:"]"===e?(c=!1,r.push(a),a=""):a+=e:"["===e?(c=!0,a&&(r.push(a),a="")):"."===e?a&&(r.push(a),a=""):a+=e,o++}return a&&r.push(a),r}}(is)),is}function cs(){return es||(es=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=$a(),n=qa(),r=Qa(),i=ss();t.get=function t(o,a,s){if(null==o)return s;switch(typeof a){case"string":{if(e.isUnsafeProperty(a))return s;const r=o[a];return void 0===r?n.isDeepKey(a)?t(o,i.toPath(a),s):s:r}case"number":case"symbol":{"number"==typeof a&&(a=r.toKey(a));const t=o[a];return void 0===t?s:t}default:{if(Array.isArray(a))return function(t,n,r){if(0===n.length)return r;let i=t;for(let o=0;o<n.length;o++){if(null==i)return r;if(e.isUnsafeProperty(n[o]))return r;i=i[n[o]]}if(void 0===i)return r;return i}(o,a,s);if(a=Object.is(a?.valueOf(),-0)?"-0":String(a),e.isUnsafeProperty(a))return s;const t=o[a];return void 0===t?s:t}}}}(Ka)),Ka}function ls(){return rs?ns:(rs=1,ns=cs().get)}const us=e(ls());var hs=t=>0===t?0:t>0?1:-1,ds=t=>"number"==typeof t&&t!=+t,fs=t=>"string"==typeof t&&t.indexOf("%")===t.length-1,ps=t=>("number"==typeof t||t instanceof Number)&&!ds(t),gs=t=>ps(t)||"string"==typeof t,ys=0,vs=t=>{var e=++ys;return"".concat(t||"").concat(e)},ms=function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!ps(t)&&"string"!=typeof t)return r;if(fs(t)){if(null==e)return r;var o=t.indexOf("%");n=e*parseFloat(t.slice(0,o))/100}else n=+t;return ds(n)&&(n=r),i&&null!=e&&n>e&&(n=e),n},bs=t=>{if(!Array.isArray(t))return!1;for(var e=t.length,n={},r=0;r<e;r++){if(n[t[r]])return!0;n[t[r]]=!0}return!1};function xs(t,e,n){return ps(t)&&ps(e)?t+n*(e-t):e}var ws=t=>null==t,_s=t=>ws(t)?t:"".concat(t.charAt(0).toUpperCase()).concat(t.slice(1));function Os(t){return null!=t}function Ss(){}var Ps=t=>"radius"in t&&"startAngle"in t&&"endAngle"in t;function Ms(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function ks(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Es(t,e){var n=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ms(Object(n),!0).forEach(function(e){ks(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ms(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t),r=e;return Object.keys(e).reduce((t,e)=>(void 0===t[e]&&void 0!==r[e]&&(t[e]=r[e]),t),n)}var As,Cs={},js={};function Is(){return As||(As=1,t=js,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.uniqBy=function(t,e){const n=new Map;for(let r=0;r<t.length;r++){const i=t[r],o=e(i);n.has(o)||n.set(o,i)}return Array.from(n.values())}),js;var t}var Ds,Ts={};function Rs(){return Ds||(Ds=1,t=Ts,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.identity=function(t){return t}),Ts;var t}var Ls,Bs,Ns={},zs={},Fs={};function Vs(){return Ls||(Ls=1,t=Fs,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isLength=function(t){return Number.isSafeInteger(t)&&t>=0}),Fs;var t}function Ws(){return Bs||(Bs=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Vs();t.isArrayLike=function(t){return null!=t&&"function"!=typeof t&&e.isLength(t.length)}}(zs)),zs}var Us,Ks,Hs={};function $s(){return Us||(Us=1,t=Hs,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isObjectLike=function(t){return"object"==typeof t&&null!==t}),Hs;var t}function Ys(){return Ks||(Ks=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Ws(),n=$s();t.isArrayLikeObject=function(t){return n.isObjectLike(t)&&e.isArrayLike(t)}}(Ns)),Ns}var Xs,qs={},Gs={};function Zs(){return Xs||(Xs=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=cs();t.property=function(t){return function(n){return e.get(n,t)}}}(Gs)),Gs}var Qs,Js={},tc={},ec={},nc={};function rc(){return Qs||(Qs=1,t=nc,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isObject=function(t){return null!==t&&("object"==typeof t||"function"==typeof t)}),nc;var t}var ic,oc={};function ac(){return ic||(ic=1,t=oc,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isPrimitive=function(t){return null==t||"object"!=typeof t&&"function"!=typeof t}),oc;var t}var sc,cc,lc,uc={};function hc(){return sc||(sc=1,t=uc,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.eq=function(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}),uc;var t}function dc(){return cc||(cc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=rc(),n=ac(),r=hc();function i(t,s,c,l){if(s===t)return!0;switch(typeof s){case"object":return function(t,e,r,i){if(null==e)return!0;if(Array.isArray(e))return o(t,e,r,i);if(e instanceof Map)return function(t,e,n,r){if(0===e.size)return!0;if(!(t instanceof Map))return!1;for(const[i,o]of e.entries()){if(!1===n(t.get(i),o,i,t,e,r))return!1}return!0}(t,e,r,i);if(e instanceof Set)return a(t,e,r,i);const s=Object.keys(e);if(null==t)return 0===s.length;if(0===s.length)return!0;if(i?.has(e))return i.get(e)===t;i?.set(e,t);try{for(let o=0;o<s.length;o++){const a=s[o];if(!n.isPrimitive(t)&&!(a in t))return!1;if(void 0===e[a]&&void 0!==t[a])return!1;if(null===e[a]&&null!==t[a])return!1;if(!r(t[a],e[a],a,t,e,i))return!1}return!0}finally{i?.delete(e)}}(t,s,c,l);case"function":return Object.keys(s).length>0?i(t,{...s},c,l):r.eq(t,s);default:return e.isObject(t)?"string"!=typeof s||""===s:r.eq(t,s)}}function o(t,e,n,r){if(0===e.length)return!0;if(!Array.isArray(t))return!1;const i=new Set;for(let o=0;o<e.length;o++){const a=e[o];let s=!1;for(let c=0;c<t.length;c++){if(i.has(c))continue;let l=!1;if(n(t[c],a,o,t,e,r)&&(l=!0),l){i.add(c),s=!0;break}}if(!s)return!1}return!0}function a(t,e,n,r){return 0===e.size||t instanceof Set&&o([...t],[...e],n,r)}t.isMatchWith=function t(e,n,r){return"function"!=typeof r?t(e,n,()=>{}):i(e,n,function t(e,n,o,a,s,c){const l=r(e,n,o,a,s,c);return void 0!==l?Boolean(l):i(e,n,t,c)},new Map)},t.isSetMatch=a}(ec)),ec}function fc(){return lc||(lc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=dc();t.isMatch=function(t,n){return e.isMatchWith(t,n,()=>{})}}(tc)),tc}var pc,gc={},yc={},vc={};function mc(){return pc||(pc=1,t=vc,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.getSymbols=function(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}),vc;var t}var bc,xc={};function wc(){return bc||(bc=1,t=xc,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.getTag=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}),xc;var t}var _c,Oc={};function Sc(){return _c||(_c=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});t.argumentsTag="[object Arguments]",t.arrayBufferTag="[object ArrayBuffer]",t.arrayTag="[object Array]",t.bigInt64ArrayTag="[object BigInt64Array]",t.bigUint64ArrayTag="[object BigUint64Array]",t.booleanTag="[object Boolean]",t.dataViewTag="[object DataView]",t.dateTag="[object Date]",t.errorTag="[object Error]",t.float32ArrayTag="[object Float32Array]",t.float64ArrayTag="[object Float64Array]",t.functionTag="[object Function]",t.int16ArrayTag="[object Int16Array]",t.int32ArrayTag="[object Int32Array]",t.int8ArrayTag="[object Int8Array]",t.mapTag="[object Map]",t.numberTag="[object Number]",t.objectTag="[object Object]",t.regexpTag="[object RegExp]",t.setTag="[object Set]",t.stringTag="[object String]",t.symbolTag="[object Symbol]",t.uint16ArrayTag="[object Uint16Array]",t.uint32ArrayTag="[object Uint32Array]",t.uint8ArrayTag="[object Uint8Array]",t.uint8ClampedArrayTag="[object Uint8ClampedArray]"}(Oc)),Oc}var Pc,Mc,kc,Ec,Ac={};function Cc(){return Pc||(Pc=1,t=Ac,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isTypedArray=function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}),Ac;var t}function jc(){return Mc||(Mc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=mc(),n=wc(),r=Sc(),i=ac(),o=Cc();function a(t,e,c,l=new Map,u=void 0){const h=u?.(t,e,c,l);if(void 0!==h)return h;if(i.isPrimitive(t))return t;if(l.has(t))return l.get(t);if(Array.isArray(t)){const e=new Array(t.length);l.set(t,e);for(let n=0;n<t.length;n++)e[n]=a(t[n],n,c,l,u);return Object.hasOwn(t,"index")&&(e.index=t.index),Object.hasOwn(t,"input")&&(e.input=t.input),e}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}if(t instanceof Map){const e=new Map;l.set(t,e);for(const[n,r]of t)e.set(n,a(r,n,c,l,u));return e}if(t instanceof Set){const e=new Set;l.set(t,e);for(const n of t)e.add(a(n,void 0,c,l,u));return e}if(void 0!==ft&&ft.isBuffer(t))return t.subarray();if(o.isTypedArray(t)){const e=new(Object.getPrototypeOf(t).constructor)(t.length);l.set(t,e);for(let n=0;n<t.length;n++)e[n]=a(t[n],n,c,l,u);return e}if(t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const e=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return l.set(t,e),s(e,t,c,l,u),e}if("undefined"!=typeof File&&t instanceof File){const e=new File([t],t.name,{type:t.type});return l.set(t,e),s(e,t,c,l,u),e}if("undefined"!=typeof Blob&&t instanceof Blob){const e=new Blob([t],{type:t.type});return l.set(t,e),s(e,t,c,l,u),e}if(t instanceof Error){const e=new t.constructor;return l.set(t,e),e.message=t.message,e.name=t.name,e.stack=t.stack,e.cause=t.cause,s(e,t,c,l,u),e}if(t instanceof Boolean){const e=new Boolean(t.valueOf());return l.set(t,e),s(e,t,c,l,u),e}if(t instanceof Number){const e=new Number(t.valueOf());return l.set(t,e),s(e,t,c,l,u),e}if(t instanceof String){const e=new String(t.valueOf());return l.set(t,e),s(e,t,c,l,u),e}if("object"==typeof t&&function(t){switch(n.getTag(t)){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}}(t)){const e=Object.create(Object.getPrototypeOf(t));return l.set(t,e),s(e,t,c,l,u),e}return t}function s(t,n,r=t,i,o){const s=[...Object.keys(n),...e.getSymbols(n)];for(let e=0;e<s.length;e++){const c=s[e],l=Object.getOwnPropertyDescriptor(t,c);(null==l||l.writable)&&(t[c]=a(n[c],c,r,i,o))}}t.cloneDeepWith=function(t,e){return a(t,void 0,t,new Map,e)},t.cloneDeepWithImpl=a,t.copyProperties=s}(yc)),yc}function Ic(){return kc||(kc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=jc();t.cloneDeep=function(t){return e.cloneDeepWithImpl(t,void 0,t,new Map,void 0)}}(gc)),gc}function Dc(){return Ec||(Ec=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=fc(),n=Ic();t.matches=function(t){return t=n.cloneDeep(t),n=>e.isMatch(n,t)}}(Js)),Js}var Tc,Rc,Lc={},Bc={},Nc={};function zc(){return Tc||(Tc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=jc(),n=Sc();t.cloneDeepWith=function(t,r){return e.cloneDeepWith(t,(i,o,a,s)=>{const c=r?.(i,o,a,s);if(void 0!==c)return c;if("object"==typeof t)switch(Object.prototype.toString.call(t)){case n.numberTag:case n.stringTag:case n.booleanTag:{const n=new t.constructor(t?.valueOf());return e.copyProperties(n,t),n}case n.argumentsTag:{const n={};return e.copyProperties(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}default:return}})}}(Nc)),Nc}function Fc(){return Rc||(Rc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=zc();t.cloneDeep=function(t){return e.cloneDeepWith(t)}}(Bc)),Bc}var Vc,Wc={},Uc={};function Kc(){return Vc||(Vc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=/^(?:0|[1-9]\d*)$/;t.isIndex=function(t,n=Number.MAX_SAFE_INTEGER){switch(typeof t){case"number":return Number.isInteger(t)&&t>=0&&t<n;case"symbol":return!1;case"string":return e.test(t)}}}(Uc)),Uc}var Hc,$c,Yc,Xc,qc,Gc,Zc,Qc={};function Jc(){return Hc||(Hc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=wc();t.isArguments=function(t){return null!==t&&"object"==typeof t&&"[object Arguments]"===e.getTag(t)}}(Qc)),Qc}function tl(){return $c||($c=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=qa(),n=Kc(),r=Jc(),i=ss();t.has=function(t,o){let a;if(a=Array.isArray(o)?o:"string"==typeof o&&e.isDeepKey(o)&&null==t?.[o]?i.toPath(o):[o],0===a.length)return!1;let s=t;for(let e=0;e<a.length;e++){const t=a[e];if(null==s||!Object.hasOwn(s,t)){if(!((Array.isArray(s)||r.isArguments(s))&&n.isIndex(t)&&t<s.length))return!1}s=s[t]}return!0}}(Wc)),Wc}function el(){return Yc||(Yc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=fc(),n=Qa(),r=Fc(),i=cs(),o=tl();t.matchesProperty=function(t,a){switch(typeof t){case"object":Object.is(t?.valueOf(),-0)&&(t="-0");break;case"number":t=n.toKey(t)}return a=r.cloneDeep(a),function(n){const r=i.get(n,t);return void 0===r?o.has(n,t):void 0===a?void 0===r:e.isMatch(r,a)}}}(Lc)),Lc}function nl(){return Xc||(Xc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Rs(),n=Zs(),r=Dc(),i=el();t.iteratee=function(t){if(null==t)return e.identity;switch(typeof t){case"function":return t;case"object":return Array.isArray(t)&&2===t.length?i.matchesProperty(t[0],t[1]):r.matches(t);case"string":case"symbol":case"number":return n.property(t)}}}(qs)),qs}function rl(){return Zc?Gc:(Zc=1,Gc=(qc||(qc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Is(),n=Rs(),r=Ys(),i=nl();t.uniqBy=function(t,o=n.identity){return r.isArrayLikeObject(t)?e.uniqBy(Array.from(t),i.iteratee(o)):[]}}(Cs)),Cs).uniqBy)}const il=e(rl());var ol=t.createContext(null),al=t=>t,sl=()=>{var e=t.useContext(ol);return e?e.store.dispatch:al},cl=()=>{},ll=()=>cl,ul=(t,e)=>t===e;function hl(e){var n=t.useContext(ol);return o.useSyncExternalStoreWithSelector(n?n.subscription.addNestedSub:ll,n?n.store.getState:cl,n?n.store.getState:cl,n?e:cl,ul)}var dl,fl={},pl={},gl={};function yl(){return dl||(dl=1,function(t){function e(t){return"symbol"==typeof t?1:null===t?2:void 0===t?3:t!=t?4:0}Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});t.compareValues=(t,n,r)=>{if(t!==n){const i=e(t),o=e(n);if(i===o&&0===i){if(t<n)return"desc"===r?1:-1;if(t>n)return"desc"===r?-1:1}return"desc"===r?o-i:i-o}return 0}}(gl)),gl}var vl,ml,bl,xl={},wl={};function _l(){return vl||(vl=1,t=wl,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isSymbol=function(t){return"symbol"==typeof t||t instanceof Symbol}),wl;var t}function Ol(){return ml||(ml=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=_l(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;t.isKey=function(t,i){return!Array.isArray(t)&&(!("number"!=typeof t&&"boolean"!=typeof t&&null!=t&&!e.isSymbol(t))||("string"==typeof t&&(r.test(t)||!n.test(t))||null!=i&&Object.hasOwn(i,t)))}}(xl)),xl}function Sl(){return bl||(bl=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=yl(),n=Ol(),r=ss();t.orderBy=function(t,i,o,a){if(null==t)return[];o=a?void 0:o,Array.isArray(t)||(t=Object.values(t)),Array.isArray(i)||(i=null==i?[null]:[i]),0===i.length&&(i=[null]),Array.isArray(o)||(o=null==o?[]:[o]),o=o.map(t=>String(t));const s=(t,e)=>{let n=t;for(let r=0;r<e.length&&null!=n;++r)n=n[e[r]];return n},c=i.map(t=>(Array.isArray(t)&&1===t.length&&(t=t[0]),null==t||"function"==typeof t||Array.isArray(t)||n.isKey(t)?t:{key:t,path:r.toPath(t)}));return t.map(t=>({original:t,criteria:c.map(e=>((t,e)=>null==e||null==t?e:"object"==typeof t&&"key"in t?Object.hasOwn(e,t.key)?e[t.key]:s(e,t.path):"function"==typeof t?t(e):Array.isArray(t)?s(e,t):"object"==typeof e?e[t]:e)(e,t))})).slice().sort((t,n)=>{for(let r=0;r<c.length;r++){const i=e.compareValues(t.criteria[r],n.criteria[r],o[r]);if(0!==i)return i}return 0}).map(t=>t.original)}}(pl)),pl}var Pl,Ml={};function kl(){return Pl||(Pl=1,t=Ml,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.flatten=function(t,e=1){const n=[],r=Math.floor(e),i=(t,e)=>{for(let o=0;o<t.length;o++){const a=t[o];Array.isArray(a)&&e<r?i(a,e+1):n.push(a)}};return i(t,0),n}),Ml;var t}var El,Al,Cl,jl,Il={};function Dl(){return El||(El=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Kc(),n=Ws(),r=rc(),i=hc();t.isIterateeCall=function(t,o,a){return!!r.isObject(a)&&(!!("number"==typeof o&&n.isArrayLike(a)&&e.isIndex(o)&&o<a.length||"string"==typeof o&&o in a)&&i.eq(a[o],t))}}(Il)),Il}function Tl(){return jl?Cl:(jl=1,Cl=(Al||(Al=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Sl(),n=kl(),r=Dl();t.sortBy=function(t,...i){const o=i.length;return o>1&&r.isIterateeCall(t,i[0],i[1])?i=[]:o>2&&r.isIterateeCall(i[0],i[1],i[2])&&(i=[i[0]]),e.orderBy(t,n.flatten(i),["asc"])}}(fl)),fl).sortBy)}const Rl=e(Tl());var Ll=t=>t.legend.settings;a([t=>t.legend.payload,Ll],(t,e)=>{var{itemSorter:n}=e,r=t.flat(1);return n?Rl(r,n):r});function Bl(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Nl=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),zl=()=>Math.random().toString(36).substring(7).split("").join("."),Fl={INIT:`@@redux/INIT${zl()}`,REPLACE:`@@redux/REPLACE${zl()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${zl()}`};function Vl(t){if("object"!=typeof t||null===t)return!1;let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||null===Object.getPrototypeOf(t)}function Wl(t,e,n){if("function"!=typeof t)throw new Error(Bl(2));if("function"==typeof e&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Bl(0));if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Bl(1));return n(Wl)(t,e)}let r=t,i=e,o=new Map,a=o,s=0,c=!1;function l(){a===o&&(a=new Map,o.forEach((t,e)=>{a.set(e,t)}))}function u(){if(c)throw new Error(Bl(3));return i}function h(t){if("function"!=typeof t)throw new Error(Bl(4));if(c)throw new Error(Bl(5));let e=!0;l();const n=s++;return a.set(n,t),function(){if(e){if(c)throw new Error(Bl(6));e=!1,l(),a.delete(n),o=null}}}function d(t){if(!Vl(t))throw new Error(Bl(7));if(void 0===t.type)throw new Error(Bl(8));if("string"!=typeof t.type)throw new Error(Bl(17));if(c)throw new Error(Bl(9));try{c=!0,i=r(i,t)}finally{c=!1}return(o=a).forEach(t=>{t()}),t}d({type:Fl.INIT});return{dispatch:d,subscribe:h,getState:u,replaceReducer:function(t){if("function"!=typeof t)throw new Error(Bl(10));r=t,d({type:Fl.REPLACE})},[Nl]:function(){const t=h;return{subscribe(e){if("object"!=typeof e||null===e)throw new Error(Bl(11));function n(){const t=e;t.next&&t.next(u())}n();return{unsubscribe:t(n)}},[Nl](){return this}}}}}function Ul(t){const e=Object.keys(t),n={};for(let a=0;a<e.length;a++){const r=e[a];"function"==typeof t[r]&&(n[r]=t[r])}const r=Object.keys(n);let i;try{!function(t){Object.keys(t).forEach(e=>{const n=t[e];if(void 0===n(void 0,{type:Fl.INIT}))throw new Error(Bl(12));if(void 0===n(void 0,{type:Fl.PROBE_UNKNOWN_ACTION()}))throw new Error(Bl(13))})}(n)}catch(o){i=o}return function(t={},e){if(i)throw i;let o=!1;const a={};for(let i=0;i<r.length;i++){const s=r[i],c=n[s],l=t[s],u=c(l,e);if(void 0===u)throw e&&e.type,new Error(Bl(14));a[s]=u,o=o||u!==l}return o=o||r.length!==Object.keys(t).length,o?a:t}}function Kl(...t){return 0===t.length?t=>t:1===t.length?t[0]:t.reduce((t,e)=>(...n)=>t(e(...n)))}function Hl(t){return Vl(t)&&"type"in t&&"string"==typeof t.type}var $l=Symbol.for("immer-nothing"),Yl=Symbol.for("immer-draftable"),Xl=Symbol.for("immer-state");function ql(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Gl=Object,Zl=Gl.getPrototypeOf,Ql="constructor",Jl="prototype",tu="configurable",eu="enumerable",nu="writable",ru="value",iu=t=>!!t&&!!t[Xl];function ou(t){return!!t&&(cu(t)||pu(t)||!!t[Yl]||!!t[Ql]?.[Yl]||gu(t)||yu(t))}var au=Gl[Jl][Ql].toString(),su=new WeakMap;function cu(t){if(!t||!vu(t))return!1;const e=Zl(t);if(null===e||e===Gl[Jl])return!0;const n=Gl.hasOwnProperty.call(e,Ql)&&e[Ql];if(n===Object)return!0;if(!mu(n))return!1;let r=su.get(n);return void 0===r&&(r=Function.toString.call(n),su.set(n,r)),r===au}function lu(t,e,n=!0){if(0===uu(t)){(n?Reflect.ownKeys(t):Gl.keys(t)).forEach(n=>{e(n,t[n],t)})}else t.forEach((n,r)=>e(r,n,t))}function uu(t){const e=t[Xl];return e?e.type_:pu(t)?1:gu(t)?2:yu(t)?3:0}var hu=(t,e,n=uu(t))=>2===n?t.has(e):Gl[Jl].hasOwnProperty.call(t,e),du=(t,e,n=uu(t))=>2===n?t.get(e):t[e],fu=(t,e,n,r=uu(t))=>{2===r?t.set(e,n):3===r?t.add(n):t[e]=n};var pu=Array.isArray,gu=t=>t instanceof Map,yu=t=>t instanceof Set,vu=t=>"object"==typeof t,mu=t=>"function"==typeof t,bu=t=>"boolean"==typeof t,xu=t=>t.copy_||t.base_,wu=t=>t.modified_?t.copy_:t.base_;function _u(t,e){if(gu(t))return new Map(t);if(yu(t))return new Set(t);if(pu(t))return Array[Jl].slice.call(t);const n=cu(t);if(!0===e||"class_only"===e&&!n){const e=Gl.getOwnPropertyDescriptors(t);delete e[Xl];let n=Reflect.ownKeys(e);for(let r=0;r<n.length;r++){const i=n[r],o=e[i];!1===o[nu]&&(o[nu]=!0,o[tu]=!0),(o.get||o.set)&&(e[i]={[tu]:!0,[nu]:!0,[eu]:o[eu],[ru]:t[i]})}return Gl.create(Zl(t),e)}{const e=Zl(t);if(null!==e&&n)return{...t};const r=Gl.create(e);return Gl.assign(r,t)}}function Ou(t,e=!1){return Pu(t)||iu(t)||(uu(t)>1&&Gl.defineProperties(t,{set:Su,add:Su,clear:Su,delete:Su}),Gl.freeze(t),e&&lu(t,(t,e)=>{Ou(e,!0)},!1)),t}var Su={[ru]:function(){ql(2)}};function Pu(t){return null===t||!vu(t)||Gl.isFrozen(t)}var Mu="MapSet",ku="Patches",Eu={};function Au(t){const e=Eu[t];return e||ql(0),e}var Cu,ju=()=>Cu;function Iu(t,e){e&&(t.patchPlugin_=Au(ku),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Du(t){Tu(t),t.drafts_.forEach(Lu),t.drafts_=null}function Tu(t){t===Cu&&(Cu=t.parent_)}var Ru=t=>{return Cu={drafts_:[],parent_:Cu,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:(e=Mu,Eu[e]?Au(Mu):void 0)};var e};function Lu(t){const e=t[Xl];0===e.type_||1===e.type_?e.revoke_():e.revoked_=!0}function Bu(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];if(void 0!==t&&t!==n){n[Xl].modified_&&(Du(e),ql(4)),ou(t)&&(t=Nu(e,t));const{patchPlugin_:r}=e;r&&r.generateReplacementPatches_(n[Xl].base_,t,e)}else t=Nu(e,n);return function(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Ou(e,n)}(e,t,!0),Du(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==$l?t:void 0}function Nu(t,e){if(Pu(e))return e;const n=e[Xl];if(!n){return Ku(e,t.handledSet_,t)}if(!Fu(n,t))return e;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:e}=n;if(e)for(;e.length>0;){e.pop()(t)}Uu(n,t)}return n.copy_}function zu(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Fu=(t,e)=>t.scope_===e,Vu=[];function Wu(t,e,n,r){const i=xu(t),o=t.type_;if(void 0!==r){if(du(i,r,o)===e)return void fu(i,r,n,o)}if(!t.draftLocations_){const e=t.draftLocations_=new Map;lu(i,(t,n)=>{if(iu(n)){const r=e.get(n)||[];r.push(t),e.set(n,r)}})}const a=t.draftLocations_.get(e)??Vu;for(const s of a)fu(i,s,n,o)}function Uu(t,e){if(t.modified_&&!t.finalized_&&(3===t.type_||(t.assigned_?.size??0)>0)){const{patchPlugin_:n}=e;if(n){const r=n.getPath(t);r&&n.generatePatches_(t,r,e)}zu(t)}}function Ku(t,e,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||iu(t)||e.has(t)||!ou(t)||Pu(t)||(e.add(t),lu(t,(r,i)=>{if(iu(i)){const e=i[Xl];if(Fu(e,n)){const n=wu(e);fu(t,r,n,t.type_),zu(e)}}else ou(i)&&Ku(i,e,n)})),t}var Hu={get(t,e){if(e===Xl)return t;const n=xu(t);if(!hu(n,e,t.type_))return function(t,e,n){const r=Xu(e,n);return r?ru in r?r[ru]:r.get?.call(t.draft_):void 0}(t,n,e);const r=n[e];if(t.finalized_||!ou(r))return r;if(r===Yu(t.base_,e)){Gu(t);const n=1===t.type_?+e:e,i=Zu(t.scope_,r,t,n);return t.copy_[n]=i}return r},has:(t,e)=>e in xu(t),ownKeys:t=>Reflect.ownKeys(xu(t)),set(t,e,n){const r=Xu(xu(t),e);if(r?.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const r=Yu(xu(t),e),a=r?.[Xl];if(a&&a.base_===n)return t.copy_[e]=n,t.assigned_.set(e,!1),!0;if(((i=n)===(o=r)?0!==i||1/i==1/o:i!=i&&o!=o)&&(void 0!==n||hu(t.base_,e,t.type_)))return!0;Gu(t),qu(t)}var i,o;return t.copy_[e]===n&&(void 0!==n||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_.set(e,!0),function(t,e,n){const{scope_:r}=t;if(iu(n)){const i=n[Xl];Fu(i,r)&&i.callbacks_.push(function(){Gu(t);const r=wu(i);Wu(t,n,r,e)})}else ou(n)&&t.callbacks_.push(function(){const i=xu(t);du(i,e,t.type_)===n&&r.drafts_.length>1&&!0===(t.assigned_.get(e)??!1)&&t.copy_&&Ku(du(t.copy_,e,t.type_),r.handledSet_,r)})}(t,e,n)),!0},deleteProperty:(t,e)=>(Gu(t),void 0!==Yu(t.base_,e)||e in t.base_?(t.assigned_.set(e,!1),qu(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0),getOwnPropertyDescriptor(t,e){const n=xu(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{[nu]:!0,[tu]:1!==t.type_||"length"!==e,[eu]:r[eu],[ru]:n[e]}:r},defineProperty(){ql(11)},getPrototypeOf:t=>Zl(t.base_),setPrototypeOf(){ql(12)}},$u={};function Yu(t,e){const n=t[Xl];return(n?xu(n):t)[e]}function Xu(t,e){if(!(e in t))return;let n=Zl(t);for(;n;){const t=Object.getOwnPropertyDescriptor(n,e);if(t)return t;n=Zl(n)}}function qu(t){t.modified_||(t.modified_=!0,t.parent_&&qu(t.parent_))}function Gu(t){t.copy_||(t.assigned_=new Map,t.copy_=_u(t.base_,t.scope_.immer_.useStrictShallowCopy_))}lu(Hu,(t,e)=>{$u[t]=function(){const t=arguments;return t[0]=t[0][0],e.apply(this,t)}}),$u.deleteProperty=function(t,e){return $u.set.call(this,t,e,void 0)},$u.set=function(t,e,n){return Hu.set.call(this,t[0],e,n,t[0])};function Zu(t,e,n,r){const[i,o]=gu(e)?Au(Mu).proxyMap_(e,n):yu(e)?Au(Mu).proxySet_(e,n):function(t,e){const n=pu(t),r={type_:n?1:0,scope_:e?e.scope_:ju(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,o=Hu;n&&(i=[r],o=$u);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,[s,r]}(e,n);return(n?.scope_??ju()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&void 0!==r?function(t,e,n){t.callbacks_.push(function(r){const i=e;if(!i||!Fu(i,r))return;r.mapSetPlugin_?.fixSetContents(i);const o=wu(i);Wu(t,i.draft_??i,o,n),Uu(i,r)})}(n,o,r):o.callbacks_.push(function(t){t.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:e}=t;o.modified_&&e&&e.generatePatches_(o,[],t)}),i}function Qu(t){return iu(t)||ql(10),Ju(t)}function Ju(t){if(!ou(t)||Pu(t))return t;const e=t[Xl];let n,r=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=_u(t,e.scope_.immer_.useStrictShallowCopy_),r=e.scope_.immer_.shouldUseStrictIteration()}else n=_u(t,!0);return lu(n,(t,e)=>{fu(n,t,Ju(e))},r),e&&(e.finalized_=!1),n}var th=new class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,e,n)=>{if(mu(t)&&!mu(e)){const n=e;e=t;const r=this;return function(t=n,...i){return r.produce(t,t=>e.call(this,t,...i))}}let r;if(mu(e)||ql(6),void 0===n||mu(n)||ql(7),ou(t)){const i=Ru(this),o=Zu(i,t,void 0);let a=!0;try{r=e(o),a=!1}finally{a?Du(i):Tu(i)}return Iu(i,n),Bu(r,i)}if(!t||!vu(t)){if(r=e(t),void 0===r&&(r=t),r===$l&&(r=void 0),this.autoFreeze_&&Ou(r,!0),n){const e=[],i=[];Au(ku).generateReplacementPatches_(t,r,{patches_:e,inversePatches_:i}),n(e,i)}return r}ql(1)},this.produceWithPatches=(t,e)=>{if(mu(t))return(e,...n)=>this.produceWithPatches(e,e=>t(e,...n));let n,r;return[this.produce(t,e,(t,e)=>{n=t,r=e}),n,r]},bu(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),bu(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),bu(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){ou(t)||ql(8),iu(t)&&(t=Qu(t));const e=Ru(this),n=Zu(e,t,void 0);return n[Xl].isManual_=!0,Tu(e),n}finishDraft(t,e){const n=t&&t[Xl];n&&n.isManual_||ql(9);const{scope_:r}=n;return Iu(r,e),Bu(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const r=e[n];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}n>-1&&(e=e.slice(n+1));const r=Au(ku).applyPatches_;return iu(t)?r(t,e):this.produce(t,t=>r(t,e))}},eh=th.produce;function nh(t){return({dispatch:e,getState:n})=>r=>i=>"function"==typeof i?i(e,n,t):r(i)}var rh=nh(),ih=nh,oh="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Kl:Kl.apply(null,arguments)};function ah(t,e){function n(...n){if(e){let r=e(...n);if(!r)throw new Error(ed(0));return{type:t,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:t,payload:n[0]}}return n.toString=()=>`${t}`,n.type=t,n.match=e=>Hl(e)&&e.type===t,n}var sh=class t extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,t.prototype)}static get[Symbol.species](){return t}concat(...t){return super.concat.apply(this,t)}prepend(...e){return 1===e.length&&Array.isArray(e[0])?new t(...e[0].concat(this)):new t(...e.concat(this))}};function ch(t){return ou(t)?eh(t,()=>{}):t}function lh(t,e,n){return t.has(e)?t.get(e):t.set(e,n(e)).get(e)}var uh="RTK_autoBatch",hh=()=>t=>({payload:t,meta:{[uh]:!0}}),dh=t=>e=>{setTimeout(e,t)},fh=(t={type:"raf"})=>e=>(...n)=>{const r=e(...n);let i=!0,o=!1,a=!1;const s=new Set,c="tick"===t.type?queueMicrotask:"raf"===t.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:dh(10):"callback"===t.type?t.queueNotification:dh(t.timeout),l=()=>{a=!1,o&&(o=!1,s.forEach(t=>t()))};return Object.assign({},r,{subscribe(t){const e=r.subscribe(()=>i&&t());return s.add(t),()=>{e(),s.delete(t)}},dispatch(t){try{return i=!t?.meta?.[uh],o=!i,o&&(a||(a=!0,c(l))),r.dispatch(t)}finally{i=!0}}})};function ph(t){const e=function(t){const{thunk:e=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=t??{};let o=new sh;return e&&("boolean"==typeof e?o.push(rh):o.push(ih(e.extraArgument))),o},{reducer:n,middleware:r,devTools:i=!0,preloadedState:o,enhancers:a}=t||{};let s,c;if("function"==typeof n)s=n;else{if(!Vl(n))throw new Error(ed(1));s=Ul(n)}c="function"==typeof r?r(e):e();let l=Kl;i&&(l=oh({trace:!1,..."object"==typeof i&&i}));const u=function(...t){return e=>(n,r)=>{const i=e(n,r);let o=()=>{throw new Error(Bl(15))};const a={getState:i.getState,dispatch:(t,...e)=>o(t,...e)},s=t.map(t=>t(a));return o=Kl(...s)(i.dispatch),{...i,dispatch:o}}}(...c),h=(t=>function(e){const{autoBatch:n=!0}=e??{};let r=new sh(t);return n&&r.push(fh("object"==typeof n?n:void 0)),r})(u);return Wl(s,o,l(..."function"==typeof a?a(h):h()))}function gh(t){const e={},n=[];let r;const i={addCase(t,n){const r="string"==typeof t?t:t.type;if(!r)throw new Error(ed(28));if(r in e)throw new Error(ed(29));return e[r]=n,i},addAsyncThunk:(t,r)=>(r.pending&&(e[t.pending.type]=r.pending),r.rejected&&(e[t.rejected.type]=r.rejected),r.fulfilled&&(e[t.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:t.settled,reducer:r.settled}),i),addMatcher:(t,e)=>(n.push({matcher:t,reducer:e}),i),addDefaultCase:t=>(r=t,i)};return t(i),[e,n,r]}var yh=(t=21)=>{let e="",n=t;for(;n--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e},vh=Symbol.for("rtk-slice-createasyncthunk");function mh(t,e){return`${t}/${e}`}function bh({creators:t}={}){const e=t?.asyncThunk?.[vh];return function(t){const{name:n,reducerPath:r=n}=t;if(!n)throw new Error(ed(11));const i=("function"==typeof t.reducers?t.reducers(function(){function t(t,e){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...e}}return t.withTypes=()=>t,{reducer:t=>Object.assign({[t.name]:(...e)=>t(...e)}[t.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(t,e)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:e}),asyncThunk:t}}()):t.reducers)||{},o=Object.keys(i),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(t,e){const n="string"==typeof t?t:t.type;if(!n)throw new Error(ed(12));if(n in a.sliceCaseReducersByType)throw new Error(ed(13));return a.sliceCaseReducersByType[n]=e,s},addMatcher:(t,e)=>(a.sliceMatchers.push({matcher:t,reducer:e}),s),exposeAction:(t,e)=>(a.actionCreators[t]=e,s),exposeCaseReducer:(t,e)=>(a.sliceCaseReducersByName[t]=e,s)};function c(){const[e={},n=[],r]="function"==typeof t.extraReducers?gh(t.extraReducers):[t.extraReducers],i={...e,...a.sliceCaseReducersByType};return function(t,e){let n,[r,i,o]=gh(e);if("function"==typeof t)n=()=>ch(t());else{const e=ch(t);n=()=>e}function a(t=n(),e){let a=[r[e.type],...i.filter(({matcher:t})=>t(e)).map(({reducer:t})=>t)];return 0===a.filter(t=>!!t).length&&(a=[o]),a.reduce((t,n)=>{if(n){if(iu(t)){const r=n(t,e);return void 0===r?t:r}if(ou(t))return eh(t,t=>n(t,e));{const r=n(t,e);if(void 0===r){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return t},t)}return a.getInitialState=n,a}(t.initialState,t=>{for(let e in i)t.addCase(e,i[e]);for(let e of a.sliceMatchers)t.addMatcher(e.matcher,e.reducer);for(let e of n)t.addMatcher(e.matcher,e.reducer);r&&t.addDefaultCase(r)})}o.forEach(r=>{const o=i[r],a={reducerName:r,type:mh(n,r),createNotation:"function"==typeof t.reducers};!function(t){return"asyncThunk"===t._reducerDefinitionType}(o)?function({type:t,reducerName:e,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!function(t){return"reducerWithPrepare"===t._reducerDefinitionType}(r))throw new Error(ed(17));o=r.reducer,a=r.prepare}else o=r;i.addCase(t,o).exposeCaseReducer(e,o).exposeAction(e,a?ah(t,a):ah(t))}(a,o,s):function({type:t,reducerName:e},n,r,i){if(!i)throw new Error(ed(18));const{payloadCreator:o,fulfilled:a,pending:s,rejected:c,settled:l,options:u}=n,h=i(t,o,u);r.exposeAction(e,h),a&&r.addCase(h.fulfilled,a);s&&r.addCase(h.pending,s);c&&r.addCase(h.rejected,c);l&&r.addMatcher(h.settled,l);r.exposeCaseReducer(e,{fulfilled:a||_h,pending:s||_h,rejected:c||_h,settled:l||_h})}(a,o,s,e)});const l=t=>t,u=new Map,h=new WeakMap;let d;function f(t,e){return d||(d=c()),d(t,e)}function p(){return d||(d=c()),d.getInitialState()}function g(e,n=!1){function r(t){let i=t[e];return void 0===i&&n&&(i=lh(h,r,p)),i}function i(e=l){const r=lh(u,n,()=>new WeakMap);return lh(r,e,()=>{const r={};for(const[i,o]of Object.entries(t.selectors??{}))r[i]=xh(o,e,()=>lh(h,e,p),n);return r})}return{reducerPath:e,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}const y={name:n,reducer:f,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:p,...g(r),injectInto(t,{reducerPath:e,...n}={}){const i=e??r;return t.inject({reducerPath:i,reducer:f},n),{...y,...g(i,!0)}}};return y}}function xh(t,e,n,r){function i(i,...o){let a=e(i);return void 0===a&&r&&(a=n()),t(a,...o)}return i.unwrapped=t,i}var wh=bh();function _h(){}var Oh="listener",Sh="completed",Ph="cancelled",Mh=`task-${Ph}`,kh=`task-${Sh}`,Eh=`${Oh}-${Ph}`,Ah=`${Oh}-${Sh}`,Ch=class{constructor(t){this.code=t,this.message=`task ${Ph} (reason: ${t})`}name="TaskAbortError";message},jh=(t,e)=>{if("function"!=typeof t)throw new TypeError(ed(32))},Ih=()=>{},Dh=(t,e=Ih)=>(t.catch(e),t),Th=(t,e)=>(t.addEventListener("abort",e,{once:!0}),()=>t.removeEventListener("abort",e)),Rh=(t,e)=>{const n=t.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:e,configurable:!0,writable:!0}),t.abort(e))},Lh=t=>{if(t.aborted){const{reason:e}=t;throw new Ch(e)}};function Bh(t,e){let n=Ih;return new Promise((r,i)=>{const o=()=>i(new Ch(t.reason));t.aborted?o():(n=Th(t,o),e.finally(()=>n()).then(r,i))}).finally(()=>{n=Ih})}var Nh=t=>e=>Dh(Bh(t,e).then(e=>(Lh(t),e))),zh=t=>{const e=Nh(t);return t=>e(new Promise(e=>setTimeout(e,t)))},{assign:Fh}=Object,Vh={},Wh="listenerMiddleware",Uh=(t,e)=>(n,r)=>{jh(n);const i=new AbortController;var o;o=i,Th(t,()=>Rh(o,t.reason));const a=(async(t,e)=>{try{return await Promise.resolve(),{status:"ok",value:await t()}}catch(n){return{status:n instanceof Ch?"cancelled":"rejected",error:n}}finally{e?.()}})(async()=>{Lh(t),Lh(i.signal);const e=await n({pause:Nh(i.signal),delay:zh(i.signal),signal:i.signal});return Lh(i.signal),e},()=>Rh(i,kh));return r?.autoJoin&&e.push(a.catch(Ih)),{result:Nh(t)(a),cancel(){Rh(i,Mh)}}},Kh=(t,e)=>(n,r)=>Dh((async(n,r)=>{Lh(e);let i=()=>{};const o=[new Promise((e,r)=>{let o=t({predicate:n,effect:(t,n)=>{n.unsubscribe(),e([t,n.getState(),n.getOriginalState()])}});i=()=>{o(),r()}})];null!=r&&o.push(new Promise(t=>setTimeout(t,r,null)));try{const t=await Bh(e,Promise.race(o));return Lh(e),t}finally{i()}})(n,r)),Hh=t=>{let{type:e,actionCreator:n,matcher:r,predicate:i,effect:o}=t;if(e)i=ah(e).match;else if(n)e=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(ed(21));return jh(o),{predicate:i,type:e,effect:o}},$h=Fh(t=>{const{type:e,predicate:n,effect:r}=Hh(t);return{id:yh(),effect:r,type:e,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(ed(22))}}},{withTypes:()=>$h}),Yh=(t,e)=>{const{type:n,effect:r,predicate:i}=Hh(e);return Array.from(t.values()).find(t=>("string"==typeof n?t.type===n:t.predicate===i)&&t.effect===r)},Xh=t=>{t.pending.forEach(t=>{Rh(t,Eh)})},qh=(t,e,n)=>{try{t(e,n)}catch(r){setTimeout(()=>{throw r},0)}},Gh=Fh(ah(`${Wh}/add`),{withTypes:()=>Gh}),Zh=ah(`${Wh}/removeAll`),Qh=Fh(ah(`${Wh}/remove`),{withTypes:()=>Qh}),Jh=(...t)=>{console.error(`${Wh}/error`,...t)},td=(t={})=>{const e=new Map,n=new Map,{extra:r,onError:i=Jh}=t;jh(i);const o=t=>(t=>(t.unsubscribe=()=>e.delete(t.id),e.set(t.id,t),e=>{t.unsubscribe(),e?.cancelActive&&Xh(t)}))(Yh(e,t)??$h(t));Fh(o,{withTypes:()=>o});const a=t=>{const n=Yh(e,t);return n&&(n.unsubscribe(),t.cancelActive&&Xh(n)),!!n};Fh(a,{withTypes:()=>a});const s=async(t,a,s,c)=>{const l=new AbortController,u=Kh(o,l.signal),h=[];try{t.pending.add(l),(t=>{const e=n.get(t)??0;n.set(t,e+1)})(t),await Promise.resolve(t.effect(a,Fh({},s,{getOriginalState:c,condition:(t,e)=>u(t,e).then(Boolean),take:u,delay:zh(l.signal),pause:Nh(l.signal),extra:r,signal:l.signal,fork:Uh(l.signal,h),unsubscribe:t.unsubscribe,subscribe:()=>{e.set(t.id,t)},cancelActiveListeners:()=>{t.pending.forEach((t,e,n)=>{t!==l&&(Rh(t,Eh),n.delete(t))})},cancel:()=>{Rh(l,Eh),t.pending.delete(l)},throwIfCancelled:()=>{Lh(l.signal)}})))}catch(d){d instanceof Ch||qh(i,d,{raisedBy:"effect"})}finally{await Promise.all(h),Rh(l,Ah),(t=>{const e=n.get(t)??1;1===e?n.delete(t):n.set(t,e-1)})(t),t.pending.delete(l)}},c=((t,e)=>()=>{for(const t of e.keys())Xh(t);t.clear()})(e,n);return{middleware:t=>n=>r=>{if(!Hl(r))return n(r);if(Gh.match(r))return o(r.payload);if(Zh.match(r))return void c();if(Qh.match(r))return a(r.payload);let l=t.getState();const u=()=>{if(l===Vh)throw new Error(ed(23));return l};let h;try{if(h=n(r),e.size>0){const n=t.getState(),o=Array.from(e.values());for(const e of o){let o=!1;try{o=e.predicate(r,n,l)}catch(d){o=!1,qh(i,d,{raisedBy:"predicate"})}o&&s(e,r,t,u)}}}finally{l=Vh}return h},startListening:o,stopListening:a,clearListeners:c}};function ed(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var nd=wh({name:"chartLayout",initialState:{layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(t,e){t.layoutType=e.payload},setChartSize(t,e){t.width=e.payload.width,t.height=e.payload.height},setMargin(t,e){var n,r,i,o;t.margin.top=null!==(n=e.payload.top)&&void 0!==n?n:0,t.margin.right=null!==(r=e.payload.right)&&void 0!==r?r:0,t.margin.bottom=null!==(i=e.payload.bottom)&&void 0!==i?i:0,t.margin.left=null!==(o=e.payload.left)&&void 0!==o?o:0},setScale(t,e){t.scale=e.payload}}}),{setMargin:rd,setLayout:id,setChartSize:od,setScale:ad}=nd.actions,sd=nd.reducer;function cd(t,e,n){return Array.isArray(t)&&t&&e+n!==0?t.slice(e,n+1):t}function ld(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function ud(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ld(Object(n),!0).forEach(function(e){hd(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ld(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function hd(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function dd(t,e,n){return ws(t)||ws(e)?n:gs(e)?us(t,e,n):"function"==typeof e?e(t):n}var fd=(t,e)=>"horizontal"===t&&"xAxis"===e||"vertical"===t&&"yAxis"===e||"centric"===t&&"angleAxis"===e||"radial"===t&&"radiusAxis"===e,pd=1e-4,gd={sign:t=>{var e=t.length;if(!(e<=0))for(var n=0,r=t[0].length;n<r;++n)for(var i=0,o=0,a=0;a<e;++a){var s=ds(t[a][n][1])?t[a][n][0]:t[a][n][1];s>=0?(t[a][n][0]=i,t[a][n][1]=i+s,i=t[a][n][1]):(t[a][n][0]=o,t[a][n][1]=o+s,o=t[a][n][1])}},expand:d,none:h,silhouette:u,wiggle:l,positive:t=>{var e=t.length;if(!(e<=0))for(var n=0,r=t[0].length;n<r;++n)for(var i=0,o=0;o<e;++o){var a=ds(t[o][n][1])?t[o][n][0]:t[o][n][1];a>=0?(t[o][n][0]=i,t[o][n][1]=i+a,i=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}}},yd=(t,e,n)=>{var r=gd[n];return s().keys(e).value((t,e)=>Number(dd(t,e,0))).order(c).offset(r)(t)},vd=(t,e,n)=>{var r;if(null!=t)return[(r=Object.keys(t).reduce((r,i)=>{var o=t[i],{stackedData:a}=o,s=a.reduce((t,r)=>{var i,o=cd(r,e,n),a=(i=o.flat(2).filter(ps),[Math.min(...i),Math.max(...i)]);return[Math.min(t[0],a[0]),Math.max(t[1],a[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]))[0]===1/0?0:r[0],r[1]===-1/0?0:r[1]]},md=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,bd=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,xd=(t,e,n)=>{if(t&&t.scale&&t.scale.bandwidth)return t.scale.bandwidth();if(t&&e&&e.length>=2){for(var r=Rl(e,t=>t.coordinate),i=1/0,o=1,a=r.length;o<a;o++){var s=r[o],c=r[o-1];i=Math.min((s.coordinate||0)-(c.coordinate||0),i)}return i===1/0?0:i}return n?void 0:0};function wd(t){var{tooltipEntrySettings:e,dataKey:n,payload:r,value:i,name:o}=t;return ud(ud({},e),{},{dataKey:n,payload:r,value:i,name:o})}var _d=t=>t.layout.width,Od=t=>t.layout.height,Sd=t=>t.layout.scale,Pd=t=>t.layout.margin,Md=a(t=>t.cartesianAxis.xAxis,t=>Object.values(t)),kd=a(t=>t.cartesianAxis.yAxis,t=>Object.values(t));function Ed(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Ad(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ed(Object(n),!0).forEach(function(e){Cd(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ed(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Cd(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var jd=a([_d,Od,Pd,t=>t.brush.height,function(t){return kd(t).reduce((t,e)=>"left"!==e.orientation||e.mirror||e.hide?t:t+("number"==typeof e.width?e.width:60),0)},function(t){return kd(t).reduce((t,e)=>"right"!==e.orientation||e.mirror||e.hide?t:t+("number"==typeof e.width?e.width:60),0)},function(t){return Md(t).reduce((t,e)=>"top"!==e.orientation||e.mirror||e.hide?t:t+e.height,0)},function(t){return Md(t).reduce((t,e)=>"bottom"!==e.orientation||e.mirror||e.hide?t:t+e.height,0)},Ll,t=>t.legend.size],(t,e,n,r,i,o,a,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+o},h=Ad(Ad({},{top:(n.top||0)+a,bottom:(n.bottom||0)+s}),u),d=h.bottom;h.bottom+=r,h=((t,e,n)=>{if(e&&n){var{width:r,height:i}=n,{align:o,verticalAlign:a,layout:s}=e;if(("vertical"===s||"horizontal"===s&&"middle"===a)&&"center"!==o&&ps(t[o]))return ud(ud({},t),{},{[o]:t[o]+(r||0)});if(("horizontal"===s||"vertical"===s&&"center"===o)&&"middle"!==a&&ps(t[a]))return ud(ud({},t),{},{[a]:t[a]+(i||0)})}return t})(h,c,l);var f=t-h.left-h.right,p=e-h.top-h.bottom;return Ad(Ad({brushBottom:d},h),{},{width:Math.max(f,0),height:Math.max(p,0)})}),Id=a(jd,t=>({x:t.left,y:t.top,width:t.width,height:t.height}));a(_d,Od,(t,e)=>({x:0,y:0,width:t,height:e}));var Dd,Td,Rd,Ld,Bd,Nd=t.createContext(null),zd=()=>null!=t.useContext(Nd),Fd=t=>t.brush,Vd=a([Fd,jd,Pd],(t,e,n)=>({height:t.height,x:ps(t.x)?t.x:e.left,y:ps(t.y)?t.y:e.top+e.height+e.brushBottom-((null==n?void 0:n.bottom)||0),width:ps(t.width)?t.width:e.width})),Wd={},Ud={},Kd={};function Hd(){return Dd||(Dd=1,t=Kd,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.debounce=function(t,e,{signal:n,edges:r}={}){let i,o=null;const a=null!=r&&r.includes("leading"),s=null==r||r.includes("trailing"),c=()=>{null!==o&&(t.apply(i,o),i=void 0,o=null)};let l=null;const u=()=>{null!=l&&clearTimeout(l),l=setTimeout(()=>{l=null,s&&c(),h()},e)},h=()=>{null!==l&&(clearTimeout(l),l=null),i=void 0,o=null},d=function(...t){if(n?.aborted)return;i=this,o=t;const e=null==l;u(),a&&e&&c()};return d.schedule=u,d.cancel=h,d.flush=()=>{c()},n?.addEventListener("abort",h,{once:!0}),d}),Kd;var t}function $d(){return Td||(Td=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Hd();t.debounce=function(t,n=0,r={}){"object"!=typeof r&&(r={});const{leading:i=!1,trailing:o=!0,maxWait:a}=r,s=Array(2);let c;i&&(s[0]="leading"),o&&(s[1]="trailing");let l=null;const u=e.debounce(function(...e){c=t.apply(this,e),l=null},n,{edges:s}),h=function(...e){return null!=a&&(null===l&&(l=Date.now()),Date.now()-l>=a)?(c=t.apply(this,e),l=Date.now(),u.cancel(),u.schedule(),c):(u.apply(this,e),c)};return h.cancel=u.cancel,h.flush=()=>(u.flush(),c),h}}(Ud)),Ud}function Yd(){return Bd?Ld:(Bd=1,Ld=(Rd||(Rd=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=$d();t.throttle=function(t,n=0,r={}){const{leading:i=!0,trailing:o=!0}=r;return e.debounce(t,n,{leading:i,maxWait:n,trailing:o})}}(Wd)),Wd).throttle)}const Xd=e(Yd());var qd=function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if("undefined"!=typeof console&&console.warn&&(void 0===e&&console.warn("LogUtils requires an error message argument"),!t))if(void 0===e)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(e.replace(/%s/g,()=>r[o++]))}},Gd=(t,e,n)=>{var{width:r="100%",height:i="100%",aspect:o,maxHeight:a}=n,s=fs(r)?t:Number(r),c=fs(i)?e:Number(i);return o&&o>0&&(s?c=s/o:c&&(s=c*o),a&&null!=c&&c>a&&(c=a)),{calculatedWidth:s,calculatedHeight:c}},Zd={width:0,height:0,overflow:"visible"},Qd={width:0,overflowX:"visible"},Jd={height:0,overflowY:"visible"},tf={},ef=t=>{var{width:e,height:n}=t,r=fs(e),i=fs(n);return r&&i?Zd:r?Qd:i?Jd:tf};function nf(t){return Number.isFinite(t)}function rf(t){return"number"==typeof t&&t>0&&Number.isFinite(t)}function of(){return of=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},of.apply(null,arguments)}function af(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function sf(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?af(Object(n),!0).forEach(function(e){cf(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):af(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function cf(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var lf=t.createContext({width:-1,height:-1});function uf(e){var{children:n,width:r,height:i}=e,o=t.useMemo(()=>({width:r,height:i}),[r,i]);return function(t){return rf(t.width)&&rf(t.height)}(o)?t.createElement(lf.Provider,{value:o},n):null}var hf=()=>t.useContext(lf),df=t.forwardRef((e,n)=>{var{aspect:r,initialDimension:o={width:-1,height:-1},width:a,height:s,minWidth:c=0,minHeight:l,maxHeight:u,children:h,debounce:d=0,id:f,className:p,onResize:g,style:y={}}=e,v=t.useRef(null),m=t.useRef();m.current=g,t.useImperativeHandle(n,()=>v.current);var[b,x]=t.useState({containerWidth:o.width,containerHeight:o.height}),w=t.useCallback((t,e)=>{x(n=>{var r=Math.round(t),i=Math.round(e);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);t.useEffect(()=>{if(null==v.current||"undefined"==typeof ResizeObserver)return Ss;var t=t=>{var e,{width:n,height:r}=t[0].contentRect;w(n,r),null===(e=m.current)||void 0===e||e.call(m,n,r)};d>0&&(t=Xd(t,d,{trailing:!0,leading:!1}));var e=new ResizeObserver(t),{width:n,height:r}=v.current.getBoundingClientRect();return w(n,r),e.observe(v.current),()=>{e.disconnect()}},[w,d]);var{containerWidth:_,containerHeight:O}=b;qd(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:S,calculatedHeight:P}=Gd(_,O,{width:a,height:s,aspect:r,maxHeight:u});return qd(null!=S&&S>0||null!=P&&P>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",S,P,a,s,c,l,r),t.createElement("div",{id:f?"".concat(f):void 0,className:i("recharts-responsive-container",p),style:sf(sf({},y),{},{width:a,height:s,minWidth:c,minHeight:l,maxHeight:u}),ref:v},t.createElement("div",{style:ef({width:a,height:s})},t.createElement(uf,{width:S,height:P},h)))}),ff=t.forwardRef((e,n)=>{var r=hf();if(rf(r.width)&&rf(r.height))return e.children;var{width:i,height:o}=function(t){var{width:e,height:n,aspect:r}=t,i=e,o=n;return void 0===i&&void 0===o?(i="100%",o="100%"):void 0===i?i=r&&r>0?void 0:"100%":void 0===o&&(o=r&&r>0?void 0:"100%"),{width:i,height:o}}({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:a,calculatedHeight:s}=Gd(void 0,void 0,{width:i,height:o,aspect:e.aspect,maxHeight:e.maxHeight});return ps(a)&&ps(s)?t.createElement(uf,{width:a,height:s},e.children):t.createElement(df,of({},e,{width:i,height:o,ref:n}))}),pf=()=>{var t,e=zd(),n=hl(Id),r=hl(Vd),i=null===(t=hl(Fd))||void 0===t?void 0:t.padding;return e&&r&&i?{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}:n},gf={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},yf=t=>t.layout.layoutType,vf=()=>hl(yf),mf=e=>{var n=sl(),r=zd(),{width:i,height:o}=e,a=hf(),s=i,c=o;return a&&(s=a.width>0?a.width:i,c=a.height>0?a.height:o),t.useEffect(()=>{!r&&rf(s)&&rf(c)&&n(od({width:s,height:c}))},[n,r,s,c]),null},bf=e=>{var{margin:n}=e,r=sl();return t.useEffect(()=>{r(rd(n))},[r,n]),null},xf=Symbol.for("immer-nothing"),wf=Symbol.for("immer-draftable"),_f=Symbol.for("immer-state");function Of(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Sf=Object.getPrototypeOf;function Pf(t){return!!t&&!!t[_f]}function Mf(t){return!!t&&(Af(t)||Array.isArray(t)||!!t[wf]||!!t.constructor?.[wf]||Tf(t)||Rf(t))}var kf=Object.prototype.constructor.toString(),Ef=new WeakMap;function Af(t){if(!t||"object"!=typeof t)return!1;const e=Object.getPrototypeOf(t);if(null===e||e===Object.prototype)return!0;const n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;if(n===Object)return!0;if("function"!=typeof n)return!1;let r=Ef.get(n);return void 0===r&&(r=Function.toString.call(n),Ef.set(n,r)),r===kf}function Cf(t,e,n=!0){if(0===jf(t)){(n?Reflect.ownKeys(t):Object.keys(t)).forEach(n=>{e(n,t[n],t)})}else t.forEach((n,r)=>e(r,n,t))}function jf(t){const e=t[_f];return e?e.type_:Array.isArray(t)?1:Tf(t)?2:Rf(t)?3:0}function If(t,e){return 2===jf(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Df(t,e,n){const r=jf(t);2===r?t.set(e,n):3===r?t.add(n):t[e]=n}function Tf(t){return t instanceof Map}function Rf(t){return t instanceof Set}function Lf(t){return t.copy_||t.base_}function Bf(t,e){if(Tf(t))return new Map(t);if(Rf(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=Af(t);if(!0===e||"class_only"===e&&!n){const e=Object.getOwnPropertyDescriptors(t);delete e[_f];let n=Reflect.ownKeys(e);for(let r=0;r<n.length;r++){const i=n[r],o=e[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Sf(t),e)}{const e=Sf(t);if(null!==e&&n)return{...t};const r=Object.create(e);return Object.assign(r,t)}}function Nf(t,e=!1){return Ff(t)||Pf(t)||!Mf(t)||(jf(t)>1&&Object.defineProperties(t,{set:zf,add:zf,clear:zf,delete:zf}),Object.freeze(t),e&&Object.values(t).forEach(t=>Nf(t,!0))),t}var zf={value:function(){Of(2)}};function Ff(t){return null===t||"object"!=typeof t||Object.isFrozen(t)}var Vf,Wf={};function Uf(t){const e=Wf[t];return e||Of(0),e}function Kf(){return Vf}function Hf(t,e){e&&(Uf("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function $f(t){Yf(t),t.drafts_.forEach(qf),t.drafts_=null}function Yf(t){t===Vf&&(Vf=t.parent_)}function Xf(t){return Vf={drafts_:[],parent_:Vf,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function qf(t){const e=t[_f];0===e.type_||1===e.type_?e.revoke_():e.revoked_=!0}function Gf(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return void 0!==t&&t!==n?(n[_f].modified_&&($f(e),Of(4)),Mf(t)&&(t=Zf(e,t),e.parent_||Jf(e,t)),e.patches_&&Uf("Patches").generateReplacementPatches_(n[_f].base_,t,e.patches_,e.inversePatches_)):t=Zf(e,n,[]),$f(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==xf?t:void 0}function Zf(t,e,n){if(Ff(e))return e;const r=t.immer_.shouldUseStrictIteration(),i=e[_f];if(!i)return Cf(e,(r,o)=>Qf(t,i,e,r,o,n),r),e;if(i.scope_!==t)return e;if(!i.modified_)return Jf(t,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const e=i.copy_;let o=e,a=!1;3===i.type_&&(o=new Set(e),e.clear(),a=!0),Cf(o,(r,o)=>Qf(t,i,e,r,o,n,a),r),Jf(t,e,!1),n&&t.patches_&&Uf("Patches").generatePatches_(i,n,t.patches_,t.inversePatches_)}return i.copy_}function Qf(t,e,n,r,i,o,a){if(null==i)return;if("object"!=typeof i&&!a)return;const s=Ff(i);if(!s||a){if(Pf(i)){const a=Zf(t,i,o&&e&&3!==e.type_&&!If(e.assigned_,r)?o.concat(r):void 0);if(Df(n,r,a),!Pf(a))return;t.canAutoFreeze_=!1}else a&&n.add(i);if(Mf(i)&&!s){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;if(e&&e.base_&&e.base_[r]===i&&s)return;Zf(t,i),e&&e.scope_.parent_||"symbol"==typeof r||!(Tf(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))||Jf(t,i)}}}function Jf(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Nf(e,n)}var tp={get(t,e){if(e===_f)return t;const n=Lf(t);if(!If(n,e))return function(t,e,n){const r=rp(e,n);return r?"value"in r?r.value:r.get?.call(t.draft_):void 0}(t,n,e);const r=n[e];return t.finalized_||!Mf(r)?r:r===np(t.base_,e)?(op(t),t.copy_[e]=ap(r,t)):r},has:(t,e)=>e in Lf(t),ownKeys:t=>Reflect.ownKeys(Lf(t)),set(t,e,n){const r=rp(Lf(t),e);if(r?.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const r=np(Lf(t),e),a=r?.[_f];if(a&&a.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(((i=n)===(o=r)?0!==i||1/i==1/o:i!=i&&o!=o)&&(void 0!==n||If(t.base_,e)))return!0;op(t),ip(t)}var i,o;return t.copy_[e]===n&&(void 0!==n||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_[e]=!0),!0},deleteProperty:(t,e)=>(void 0!==np(t.base_,e)||e in t.base_?(t.assigned_[e]=!1,op(t),ip(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0),getOwnPropertyDescriptor(t,e){const n=Lf(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{writable:!0,configurable:1!==t.type_||"length"!==e,enumerable:r.enumerable,value:n[e]}:r},defineProperty(){Of(11)},getPrototypeOf:t=>Sf(t.base_),setPrototypeOf(){Of(12)}},ep={};function np(t,e){const n=t[_f];return(n?Lf(n):t)[e]}function rp(t,e){if(!(e in t))return;let n=Sf(t);for(;n;){const t=Object.getOwnPropertyDescriptor(n,e);if(t)return t;n=Sf(n)}}function ip(t){t.modified_||(t.modified_=!0,t.parent_&&ip(t.parent_))}function op(t){t.copy_||(t.copy_=Bf(t.base_,t.scope_.immer_.useStrictShallowCopy_))}Cf(tp,(t,e)=>{ep[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),ep.deleteProperty=function(t,e){return ep.set.call(this,t,e,void 0)},ep.set=function(t,e,n){return tp.set.call(this,t[0],e,n,t[0])};function ap(t,e){const n=Tf(t)?Uf("MapSet").proxyMap_(t,e):Rf(t)?Uf("MapSet").proxySet_(t,e):function(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:Kf(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=tp;n&&(i=[r],o=ep);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}(t,e);return(e?e.scope_:Kf()).drafts_.push(n),n}function sp(t){if(!Mf(t)||Ff(t))return t;const e=t[_f];let n,r=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=Bf(t,e.scope_.immer_.useStrictShallowCopy_),r=e.scope_.immer_.shouldUseStrictIteration()}else n=Bf(t,!0);return Cf(n,(t,e)=>{Df(n,t,sp(e))},r),e&&(e.finalized_=!1),n}var cp=new class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,e,n)=>{if("function"==typeof t&&"function"!=typeof e){const n=e;e=t;const r=this;return function(t=n,...i){return r.produce(t,t=>e.call(this,t,...i))}}let r;if("function"!=typeof e&&Of(6),void 0!==n&&"function"!=typeof n&&Of(7),Mf(t)){const i=Xf(this),o=ap(t,void 0);let a=!0;try{r=e(o),a=!1}finally{a?$f(i):Yf(i)}return Hf(i,n),Gf(r,i)}if(!t||"object"!=typeof t){if(r=e(t),void 0===r&&(r=t),r===xf&&(r=void 0),this.autoFreeze_&&Nf(r,!0),n){const e=[],i=[];Uf("Patches").generateReplacementPatches_(t,r,e,i),n(e,i)}return r}Of(1)},this.produceWithPatches=(t,e)=>{if("function"==typeof t)return(e,...n)=>this.produceWithPatches(e,e=>t(e,...n));let n,r;return[this.produce(t,e,(t,e)=>{n=t,r=e}),n,r]},"boolean"==typeof t?.autoFreeze&&this.setAutoFreeze(t.autoFreeze),"boolean"==typeof t?.useStrictShallowCopy&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),"boolean"==typeof t?.useStrictIteration&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Mf(t)||Of(8),Pf(t)&&(t=function(t){Pf(t)||Of(10);return sp(t)}(t));const e=Xf(this),n=ap(t,void 0);return n[_f].isManual_=!0,Yf(e),n}finishDraft(t,e){const n=t&&t[_f];n&&n.isManual_||Of(9);const{scope_:r}=n;return Hf(r,e),Gf(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const r=e[n];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}n>-1&&(e=e.slice(n+1));const r=Uf("Patches").applyPatches_;return Pf(t)?r(t,e):this.produce(t,t=>r(t,e))}};cp.produce;var lp=wh({name:"legend",initialState:{settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(t,e){t.size.width=e.payload.width,t.size.height=e.payload.height},setLegendSettings(t,e){t.settings.align=e.payload.align,t.settings.layout=e.payload.layout,t.settings.verticalAlign=e.payload.verticalAlign,t.settings.itemSorter=e.payload.itemSorter},addLegendPayload:{reducer(t,e){t.payload.push(e.payload)},prepare:hh()},replaceLegendPayload:{reducer(t,e){var{prev:n,next:r}=e.payload,i=Qu(t).payload.indexOf(n);i>-1&&(t.payload[i]=r)},prepare:hh()},removeLegendPayload:{reducer(t,e){var n=Qu(t).payload.indexOf(e.payload);n>-1&&t.payload.splice(n,1)},prepare:hh()}}}),{setLegendSize:up,setLegendSettings:hp,addLegendPayload:dp,replaceLegendPayload:fp,removeLegendPayload:pp}=lp.actions,gp=lp.reducer;function yp(){return yp=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},yp.apply(null,arguments)}function vp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function mp(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?vp(Object(n),!0).forEach(function(e){bp(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vp(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function bp(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xp(t){return Array.isArray(t)&&gs(t[0])&&gs(t[1])?t.join(" ~ "):t}var wp=e=>{var{separator:n=" : ",contentStyle:r={},itemStyle:o={},labelStyle:a={},payload:s,formatter:c,itemSorter:l,wrapperClassName:u,labelClassName:h,label:d,labelFormatter:f,accessibilityLayer:p=!1}=e,g=mp({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},r),y=mp({margin:0},a),v=!ws(d),m=v?d:"",b=i("recharts-default-tooltip",u),x=i("recharts-tooltip-label",h);v&&f&&null!=s&&(m=f(d,s));var w=p?{role:"status","aria-live":"assertive"}:{};return t.createElement("div",yp({className:b,style:g},w),t.createElement("p",{className:x,style:y},t.isValidElement(m)?m:"".concat(m)),(()=>{if(s&&s.length){var e=(l?Rl(s,l):s).map((e,r)=>{if("none"===e.type)return null;var i=e.formatter||c||xp,{value:a,name:l}=e,u=a,h=l;if(i){var d=i(a,l,e,r,s);if(Array.isArray(d))[u,h]=d;else{if(null==d)return null;u=d}}var f=mp({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},o);return t.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(r),style:f},gs(h)?t.createElement("span",{className:"recharts-tooltip-item-name"},h):null,gs(h)?t.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,t.createElement("span",{className:"recharts-tooltip-item-value"},u),t.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return t.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null})())},_p="recharts-tooltip-wrapper",Op={visibility:"hidden"};function Sp(t){var{coordinate:e,translateX:n,translateY:r}=t;return i(_p,{["".concat(_p,"-right")]:ps(n)&&e&&ps(e.x)&&n>=e.x,["".concat(_p,"-left")]:ps(n)&&e&&ps(e.x)&&n<e.x,["".concat(_p,"-bottom")]:ps(r)&&e&&ps(e.y)&&r>=e.y,["".concat(_p,"-top")]:ps(r)&&e&&ps(e.y)&&r<e.y})}function Pp(t){var{allowEscapeViewBox:e,coordinate:n,key:r,offsetTopLeft:i,position:o,reverseDirection:a,tooltipDimension:s,viewBox:c,viewBoxDimension:l}=t;if(o&&ps(o[r]))return o[r];var u=n[r]-s-(i>0?i:0),h=n[r]+i;if(e[r])return a[r]?u:h;var d=c[r];return null==d?0:a[r]?u<d?Math.max(h,d):Math.max(u,d):null==l?0:h+s>d+l?Math.max(u,d):Math.max(h,d)}function Mp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function kp(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Mp(Object(n),!0).forEach(function(e){Ep(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mp(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ep(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Ap extends t.PureComponent{constructor(){super(...arguments),Ep(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Ep(this,"handleKeyDown",t=>{var e,n,r,i;"Escape"===t.key&&this.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(e=null===(n=this.props.coordinate)||void 0===n?void 0:n.x)&&void 0!==e?e:0,y:null!==(r=null===(i=this.props.coordinate)||void 0===i?void 0:i.y)&&void 0!==r?r:0}})})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,e;this.state.dismissed&&((null===(t=this.props.coordinate)||void 0===t?void 0:t.x)===this.state.dismissedAtCoordinate.x&&(null===(e=this.props.coordinate)||void 0===e?void 0:e.y)===this.state.dismissedAtCoordinate.y||(this.state.dismissed=!1))}render(){var{active:e,allowEscapeViewBox:n,animationDuration:r,animationEasing:i,children:o,coordinate:a,hasPayload:s,isAnimationActive:c,offset:l,position:u,reverseDirection:h,useTranslate3d:d,viewBox:f,wrapperStyle:p,lastBoundingBox:g,innerRef:y,hasPortalFromProps:v}=this.props,{cssClasses:m,cssProperties:b}=function(t){var e,n,r,{allowEscapeViewBox:i,coordinate:o,offsetTopLeft:a,position:s,reverseDirection:c,tooltipBox:l,useTranslate3d:u,viewBox:h}=t;return e=l.height>0&&l.width>0&&o?function(t){var{translateX:e,translateY:n,useTranslate3d:r}=t;return{transform:r?"translate3d(".concat(e,"px, ").concat(n,"px, 0)"):"translate(".concat(e,"px, ").concat(n,"px)")}}({translateX:n=Pp({allowEscapeViewBox:i,coordinate:o,key:"x",offsetTopLeft:a,position:s,reverseDirection:c,tooltipDimension:l.width,viewBox:h,viewBoxDimension:h.width}),translateY:r=Pp({allowEscapeViewBox:i,coordinate:o,key:"y",offsetTopLeft:a,position:s,reverseDirection:c,tooltipDimension:l.height,viewBox:h,viewBoxDimension:h.height}),useTranslate3d:u}):Op,{cssProperties:e,cssClasses:Sp({translateX:n,translateY:r,coordinate:o})}}({allowEscapeViewBox:n,coordinate:a,offsetTopLeft:l,position:u,reverseDirection:h,tooltipBox:{height:g.height,width:g.width},useTranslate3d:d,viewBox:f}),x=v?{}:kp(kp({transition:c&&e?"transform ".concat(r,"ms ").concat(i):void 0},b),{},{pointerEvents:"none",visibility:!this.state.dismissed&&e&&s?"visible":"hidden",position:"absolute",top:0,left:0}),w=kp(kp({},x),{},{visibility:!this.state.dismissed&&e&&s?"visible":"hidden"},p);return t.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:m,style:w,ref:y},o)}}var Cp=!1,jp=!("undefined"!=typeof window&&window.document&&Boolean(window.document.createElement)&&window.setTimeout);function Ip(){return Ip=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ip.apply(null,arguments)}function Dp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Tp(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Dp(Object(n),!0).forEach(function(e){Rp(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Dp(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Rp(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Lp={curveBasisClosed:k,curveBasisOpen:M,curveBasis:P,curveBumpX:S,curveBumpY:O,curveLinearClosed:_,curveLinear:w,curveMonotoneX:x,curveMonotoneY:b,curveNatural:m,curveStep:v,curveStepAfter:y,curveStepBefore:g},Bp=t=>nf(t.x)&&nf(t.y),Np=t=>null!=t.base&&Bp(t.base)&&Bp(t),zp=t=>t.x,Fp=t=>t.y,Vp=t=>{var{type:e="linear",points:n=[],baseLine:r,layout:i,connectNulls:o=!1}=t,a=((t,e)=>{if("function"==typeof t)return t;var n="curve".concat(_s(t));return"curveMonotone"!==n&&"curveBump"!==n||!e?Lp[n]||w:Lp["".concat(n).concat("vertical"===e?"Y":"X")]})(e,i),s=o?n.filter(Bp):n;if(Array.isArray(r)){var c=n.map((t,e)=>Tp(Tp({},t),{},{base:r[e]}));return("vertical"===i?f().y(Fp).x1(zp).x0(t=>t.base.x):f().x(zp).y1(Fp).y0(t=>t.base.y)).defined(Np).curve(a)(o?c.filter(Np):c)}return("vertical"===i&&ps(r)?f().y(Fp).x1(zp).x0(r):ps(r)?f().x(zp).y1(Fp).y0(r):p().x(zp).y(Fp)).defined(Bp).curve(a)(s)},Wp=e=>{var{className:n,points:r,path:o,pathRef:a}=e;if(!(r&&r.length||o))return null;var s=r&&r.length?Vp(e):o;return t.createElement("path",Ip({},Da(e),(e=>{if(!e||"function"==typeof e||"boolean"==typeof e)return null;var n=e;if(t.isValidElement(e)&&(n=e.props),"object"!=typeof n&&"function"!=typeof n)return null;var r={};return Object.keys(n).forEach(t=>{Aa(t)&&(r[t]=e=>n[t](n,e))}),r})(e),{className:i("recharts-curve",n),d:null===s?void 0:s,ref:a}))},Up=["x","y","top","left","width","height","className"];function Kp(){return Kp=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Kp.apply(null,arguments)}function Hp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function $p(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Yp=(t,e,n,r,i,o)=>"M".concat(t,",").concat(i,"v").concat(r,"M").concat(o,",").concat(e,"h").concat(n),Xp=e=>{var{x:n=0,y:r=0,top:o=0,left:a=0,width:s=0,height:c=0,className:l}=e,u=function(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(e,Up),h=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Hp(Object(n),!0).forEach(function(e){$p(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hp(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({x:n,y:r,top:o,left:a,width:s,height:c},u);return ps(n)&&ps(r)&&ps(s)&&ps(c)&&ps(o)&&ps(a)?t.createElement("path",Kp({},Ra(h),{className:i("recharts-cross",l),d:Yp(n,r,s,c,o,a)})):null};function qp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Gp(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?qp(Object(n),!0).forEach(function(e){Zp(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qp(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Zp(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Qp=(t,e)=>Object.keys(e).reduce((n,r)=>Gp(Gp({},n),{},{[r]:t(r,e[r])}),{});function Jp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function tg(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Jp(Object(n),!0).forEach(function(e){eg(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Jp(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function eg(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ng=(t,e,n)=>t+(e-t)*n,rg=t=>{var{from:e,to:n}=t;return e!==n},ig=(t,e,n)=>{var r=Qp((e,n)=>{if(rg(n)){var[r,i]=t(n.from,n.to,n.velocity);return tg(tg({},n),{},{from:r,velocity:i})}return n},e);return n<1?Qp((t,e)=>rg(e)?tg(tg({},e),{},{velocity:ng(e.velocity,r[t].velocity,n),from:ng(e.from,r[t].from,n)}):e,e):ig(t,r,n-1)};function og(t,e,n,r,i,o){var a,s=r.reduce((n,r)=>tg(tg({},n),{},{[r]:{from:t[r],velocity:0,to:e[r]}}),{}),c=null,l=r=>{a||(a=r);var u=(r-a)/n.dt;s=ig(n,s,u),i(tg(tg(tg({},t),e),Qp((t,e)=>e.from,s))),a=r,Object.values(s).filter(rg).length&&(c=o.setTimeout(l))};return()=>(c=o.setTimeout(l),()=>{var t;null===(t=c)||void 0===t||t()})}const ag=(t,e,n,r,i,o)=>{var a,s,c=(a=t,s=e,[Object.keys(a),Object.keys(s)].reduce((t,e)=>t.filter(t=>e.includes(t))));return null==n?()=>(i(tg(tg({},t),e)),()=>{}):!0===n.isStepper?og(t,e,n,c,i,o):function(t,e,n,r,i,o,a){var s,c=null,l=i.reduce((n,r)=>tg(tg({},n),{},{[r]:[t[r],e[r]]}),{}),u=i=>{s||(s=i);var h=(i-s)/r,d=Qp((t,e)=>ng(...e,n(h)),l);if(o(tg(tg(tg({},t),e),d)),h<1)c=a.setTimeout(u);else{var f=Qp((t,e)=>ng(...e,n(1)),l);o(tg(tg(tg({},t),e),f))}};return()=>(c=a.setTimeout(u),()=>{var t;null===(t=c)||void 0===t||t()})}(t,e,n,r,c,i,o)};var sg=1e-4,cg=(t,e)=>[0,3*t,3*e-6*t,3*t-3*e+1],lg=(t,e)=>t.map((t,n)=>t*e**n).reduce((t,e)=>t+e),ug=(t,e)=>n=>{var r=cg(t,e);return lg(r,n)},hg=(t,e,n,r)=>{var i,o,a=ug(t,n),s=ug(e,r),c=(i=t,o=n,t=>{var e=[...cg(i,o).map((t,e)=>t*e).slice(1),0];return lg(e,t)}),l=t=>t>1?1:t<0?0:t,u=t=>{for(var e=t>1?1:t,n=e,r=0;r<8;++r){var i=a(n)-e,o=c(n);if(Math.abs(i-e)<sg||o<sg)return s(n);n=l(n-i/o)}return s(n)};return u.isStepper=!1,u},dg=function(){return hg(...function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(1===e.length)switch(e[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 r,i=e[0].split("(");if("cubic-bezier"===i[0]&&4===(null===(r=i[1])||void 0===r?void 0:r.split(")")[0].split(",").length)){var o=i[1].split(")")[0].split(",").map(t=>parseFloat(t));return[o[0],o[1],o[2],o[3]]}}return 4===e.length?e:[0,0,1,1]}(...arguments))},fg=t=>{if("string"==typeof t)switch(t){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return dg(t);case"spring":return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{stiff:e=100,damping:n=8,dt:r=17}=t,i=(t,i,o)=>{var a=o+(-(t-i)*e-o*n)*r/1e3,s=o*r/1e3+t;return Math.abs(s-i)<sg&&Math.abs(a)<sg?[i,0]:[s,a]};return i.isStepper=!0,i.dt=r,i}();default:if("cubic-bezier"===t.split("(")[0])return dg(t)}return"function"==typeof t?t:null};class pg{setTimeout(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=performance.now(),r=null,i=o=>{o-n>=e?t(o):"function"==typeof requestAnimationFrame&&(r=requestAnimationFrame(i))};return r=requestAnimationFrame(i),()=>{null!=r&&cancelAnimationFrame(r)}}}function gg(){return t=new pg,e=()=>null,n=!1,r=null,i=o=>{if(!n){if(Array.isArray(o)){if(!o.length)return;var a=o,[s,...c]=a;return"number"==typeof s?void(r=t.setTimeout(i.bind(null,c),s)):(i(s),void(r=t.setTimeout(i.bind(null,c))))}"string"==typeof o&&e(o),"object"==typeof o&&e(o),"function"==typeof o&&o()}},{stop:()=>{n=!0},start:t=>{n=!1,r&&(r(),r=null),i(t)},subscribe:t=>(e=t,()=>{e=()=>null}),getTimeoutController:()=>t};var t,e,n,r,i}var yg=t.createContext(gg);var vg={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},mg={t:0},bg={t:1};function xg(e){var n,r,i,o=Es(e,vg),{isActive:a,canBegin:s,duration:c,easing:l,begin:u,onAnimationEnd:h,onAnimationStart:d,children:f}=o,p="auto"===a?!jp:a,g=(n=o.animationId,r=o.animationManager,i=t.useContext(yg),t.useMemo(()=>null!=r?r:i(n),[n,r,i])),[y,v]=t.useState(p?mg:bg),m=t.useRef(null);return t.useEffect(()=>{p||v(bg)},[p]),t.useEffect(()=>{if(!p||!s)return Ss;var t=ag(mg,bg,fg(l),c,v,g.getTimeoutController());return g.start([d,u,()=>{m.current=t()},c,h]),()=>{g.stop(),m.current&&m.current(),h()}},[p,s,c,l,u,d,h,g]),f(y.t)}var wg=["radius"],_g=["radius"];function Og(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Sg(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Og(Object(n),!0).forEach(function(e){Pg(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Og(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Pg(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Mg(){return Mg=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Mg.apply(null,arguments)}function kg(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var Eg=(t,e,n,r,i)=>{var o,a=Math.min(Math.abs(n)/2,Math.abs(r)/2),s=r>=0?1:-1,c=n>=0?1:-1,l=r>=0&&n>=0||r<0&&n<0?1:0;if(a>0&&i instanceof Array){for(var u=[0,0,0,0],h=0;h<4;h++)u[h]=i[h]>a?a:i[h];o="M".concat(t,",").concat(e+s*u[0]),u[0]>0&&(o+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(l,",").concat(t+c*u[0],",").concat(e)),o+="L ".concat(t+n-c*u[1],",").concat(e),u[1]>0&&(o+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(l,",\n ").concat(t+n,",").concat(e+s*u[1])),o+="L ".concat(t+n,",").concat(e+r-s*u[2]),u[2]>0&&(o+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(l,",\n ").concat(t+n-c*u[2],",").concat(e+r)),o+="L ".concat(t+c*u[3],",").concat(e+r),u[3]>0&&(o+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(l,",\n ").concat(t,",").concat(e+r-s*u[3])),o+="Z"}else if(a>0&&i===+i&&i>0){var d=Math.min(a,i);o="M ".concat(t,",").concat(e+s*d,"\n A ").concat(d,",").concat(d,",0,0,").concat(l,",").concat(t+c*d,",").concat(e,"\n L ").concat(t+n-c*d,",").concat(e,"\n A ").concat(d,",").concat(d,",0,0,").concat(l,",").concat(t+n,",").concat(e+s*d,"\n L ").concat(t+n,",").concat(e+r-s*d,"\n A ").concat(d,",").concat(d,",0,0,").concat(l,",").concat(t+n-c*d,",").concat(e+r,"\n L ").concat(t+c*d,",").concat(e+r,"\n A ").concat(d,",").concat(d,",0,0,").concat(l,",").concat(t,",").concat(e+r-s*d," Z")}else o="M ".concat(t,",").concat(e," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return o},Ag={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Cg=e=>{var n=Es(e,Ag),r=t.useRef(null),[o,a]=t.useState(-1);t.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var t=r.current.getTotalLength();t&&a(t)}catch(e){}},[]);var{x:s,y:c,width:l,height:u,radius:h,className:d}=n,{animationEasing:f,animationDuration:p,animationBegin:g,isAnimationActive:y,isUpdateAnimationActive:v}=n,m=t.useRef(l),b=t.useRef(u),x=t.useRef(s),w=t.useRef(c),_=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"animation-",r=t.useRef(vs(n)),i=t.useRef(e);return i.current!==e&&(r.current=vs(n),i.current=e),r.current}(t.useMemo(()=>({x:s,y:c,width:l,height:u,radius:h}),[s,c,l,u,h]),"rectangle-");if(s!==+s||c!==+c||l!==+l||u!==+u||0===l||0===u)return null;var O=i("recharts-rectangle",d);if(!v){var S=Ra(n),{radius:P}=S,M=kg(S,wg);return t.createElement("path",Mg({},M,{radius:"number"==typeof h?h:void 0,className:O,d:Eg(s,c,l,u,h)}))}var k=m.current,E=b.current,A=x.current,C=w.current,j="0px ".concat(-1===o?1:o,"px"),I="".concat(o,"px 0px"),D=((t,e,n)=>t.map(t=>{return"".concat((r=t,r.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())))," ").concat(e,"ms ").concat(n);var r}).join(","))(["strokeDasharray"],p,"string"==typeof f?f:Ag.animationEasing);return t.createElement(xg,{animationId:_,key:_,canBegin:o>0,duration:p,easing:f,isActive:v,begin:g},e=>{var i,o=xs(k,l,e),a=xs(E,u,e),d=xs(A,s,e),f=xs(C,c,e);r.current&&(m.current=o,b.current=a,x.current=d,w.current=f),i=y?e>0?{transition:D,strokeDasharray:I}:{strokeDasharray:j}:{strokeDasharray:I};var p=Ra(n),{radius:g}=p,v=kg(p,_g);return t.createElement("path",Mg({},v,{radius:"number"==typeof h?h:void 0,className:O,d:Eg(d,f,o,a,h),ref:r,style:Sg(Sg({},i),n.style)}))})};function jg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Ig(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?jg(Object(n),!0).forEach(function(e){Dg(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jg(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Dg(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Tg=Math.PI/180,Rg=t=>180*t/Math.PI,Lg=(t,e,n,r)=>({x:t+Math.cos(-Tg*r)*n,y:e+Math.sin(-Tg*r)*n}),Bg=(t,e)=>{var{x:n,y:r}=t,{cx:i,cy:o}=e,a=((t,e)=>{var{x:n,y:r}=t,{x:i,y:o}=e;return Math.sqrt((n-i)**2+(r-o)**2)})({x:n,y:r},{x:i,y:o});if(a<=0)return{radius:a,angle:0};var s=(n-i)/a,c=Math.acos(s);return r>o&&(c=2*Math.PI-c),{radius:a,angle:Rg(c),angleInRadian:c}},Ng=(t,e)=>{var{startAngle:n,endAngle:r}=e,i=Math.floor(n/360),o=Math.floor(r/360);return t+360*Math.min(i,o)},zg=(t,e)=>{var{chartX:n,chartY:r}=t,{radius:i,angle:o}=Bg({x:n,y:r},e),{innerRadius:a,outerRadius:s}=e;if(i<a||i>s)return null;if(0===i)return null;var c,{startAngle:l,endAngle:u}=(t=>{var{startAngle:e,endAngle:n}=t,r=Math.floor(e/360),i=Math.floor(n/360),o=Math.min(r,i);return{startAngle:e-360*o,endAngle:n-360*o}})(e),h=o;if(l<=u){for(;h>u;)h-=360;for(;h<l;)h+=360;c=h>=l&&h<=u}else{for(;h>l;)h-=360;for(;h<u;)h+=360;c=h>=u&&h<=l}return c?Ig(Ig({},e),{},{radius:i,angle:Ng(h,e)}):null};function Fg(t){var{cx:e,cy:n,radius:r,startAngle:i,endAngle:o}=t;return{points:[Lg(e,n,r,i),Lg(e,n,r,o)],cx:e,cy:n,radius:r,startAngle:i,endAngle:o}}function Vg(){return Vg=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Vg.apply(null,arguments)}var Wg=t=>{var{cx:e,cy:n,radius:r,angle:i,sign:o,isExternal:a,cornerRadius:s,cornerIsExternal:c}=t,l=s*(a?1:-1)+r,u=Math.asin(s/l)/Tg,h=c?i:i+o*u,d=c?i-o*u:i;return{center:Lg(e,n,l,h),circleTangency:Lg(e,n,r,h),lineTangency:Lg(e,n,l*Math.cos(u*Tg),d),theta:u}},Ug=t=>{var{cx:e,cy:n,innerRadius:r,outerRadius:i,startAngle:o,endAngle:a}=t,s=((t,e)=>hs(e-t)*Math.min(Math.abs(e-t),359.999))(o,a),c=o+s,l=Lg(e,n,i,o),u=Lg(e,n,i,c),h="M ".concat(l.x,",").concat(l.y,"\n A ").concat(i,",").concat(i,",0,\n ").concat(+(Math.abs(s)>180),",").concat(+(o>c),",\n ").concat(u.x,",").concat(u.y,"\n ");if(r>0){var d=Lg(e,n,r,o),f=Lg(e,n,r,c);h+="L ".concat(f.x,",").concat(f.y,"\n A ").concat(r,",").concat(r,",0,\n ").concat(+(Math.abs(s)>180),",").concat(+(o<=c),",\n ").concat(d.x,",").concat(d.y," Z")}else h+="L ".concat(e,",").concat(n," Z");return h},Kg={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Hg=e=>{var n=Es(e,Kg),{cx:r,cy:o,innerRadius:a,outerRadius:s,cornerRadius:c,forceCornerRadius:l,cornerIsExternal:u,startAngle:h,endAngle:d,className:f}=n;if(s<a||h===d)return null;var p,g=i("recharts-sector",f),y=s-a,v=ms(c,y,0,!0);return p=v>0&&Math.abs(h-d)<360?(t=>{var{cx:e,cy:n,innerRadius:r,outerRadius:i,cornerRadius:o,forceCornerRadius:a,cornerIsExternal:s,startAngle:c,endAngle:l}=t,u=hs(l-c),{circleTangency:h,lineTangency:d,theta:f}=Wg({cx:e,cy:n,radius:i,angle:c,sign:u,cornerRadius:o,cornerIsExternal:s}),{circleTangency:p,lineTangency:g,theta:y}=Wg({cx:e,cy:n,radius:i,angle:l,sign:-u,cornerRadius:o,cornerIsExternal:s}),v=s?Math.abs(c-l):Math.abs(c-l)-f-y;if(v<0)return a?"M ".concat(d.x,",").concat(d.y,"\n a").concat(o,",").concat(o,",0,0,1,").concat(2*o,",0\n a").concat(o,",").concat(o,",0,0,1,").concat(2*-o,",0\n "):Ug({cx:e,cy:n,innerRadius:r,outerRadius:i,startAngle:c,endAngle:l});var m="M ".concat(d.x,",").concat(d.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(h.x,",").concat(h.y,"\n A").concat(i,",").concat(i,",0,").concat(+(v>180),",").concat(+(u<0),",").concat(p.x,",").concat(p.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(g.x,",").concat(g.y,"\n ");if(r>0){var{circleTangency:b,lineTangency:x,theta:w}=Wg({cx:e,cy:n,radius:r,angle:c,sign:u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),{circleTangency:_,lineTangency:O,theta:S}=Wg({cx:e,cy:n,radius:r,angle:l,sign:-u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),P=s?Math.abs(c-l):Math.abs(c-l)-w-S;if(P<0&&0===o)return"".concat(m,"L").concat(e,",").concat(n,"Z");m+="L".concat(O.x,",").concat(O.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(_.x,",").concat(_.y,"\n A").concat(r,",").concat(r,",0,").concat(+(P>180),",").concat(+(u>0),",").concat(b.x,",").concat(b.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(x.x,",").concat(x.y,"Z")}else m+="L".concat(e,",").concat(n,"Z");return m})({cx:r,cy:o,innerRadius:a,outerRadius:s,cornerRadius:Math.min(v,y/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:h,endAngle:d}):Ug({cx:r,cy:o,innerRadius:a,outerRadius:s,startAngle:h,endAngle:d}),t.createElement("path",Vg({},Ra(n),{className:g,d:p}))};function $g(t,e,n){if("horizontal"===t)return[{x:e.x,y:n.top},{x:e.x,y:n.top+n.height}];if("vertical"===t)return[{x:n.left,y:e.y},{x:n.left+n.width,y:e.y}];if(Ps(e)){if("centric"===t){var{cx:r,cy:i,innerRadius:o,outerRadius:a,angle:s}=e,c=Lg(r,i,o,s),l=Lg(r,i,a,s);return[{x:c.x,y:c.y},{x:l.x,y:l.y}]}return Fg(e)}}var Yg,Xg,qg,Gg,Zg,Qg={},Jg={},ty={};function ey(){return Yg||(Yg=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=_l();t.toNumber=function(t){return e.isSymbol(t)?NaN:Number(t)}}(ty)),ty}function ny(){return Xg||(Xg=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=ey();t.toFinite=function(t){if(!t)return 0===t?t:0;if((t=e.toNumber(t))===1/0||t===-1/0){return(t<0?-1:1)*Number.MAX_VALUE}return t==t?t:0}}(Jg)),Jg}function ry(){return Zg?Gg:(Zg=1,Gg=(qg||(qg=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Dl(),n=ny();t.range=function(t,r,i){i&&"number"!=typeof i&&e.isIterateeCall(t,r,i)&&(r=i=void 0),t=n.toFinite(t),void 0===r?(r=t,t=0):r=n.toFinite(r),i=void 0===i?t<r?1:-1:n.toFinite(i);const o=Math.max(Math.ceil((r-t)/(i||1)),0),a=new Array(o);for(let e=0;e<o;e++)a[e]=t,t+=i;return a}}(Qg)),Qg).range)}const iy=e(ry()),oy=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:E,scaleDiverging:A,scaleDivergingLog:C,scaleDivergingPow:j,scaleDivergingSqrt:I,scaleDivergingSymlog:D,scaleIdentity:T,scaleImplicit:R,scaleLinear:L,scaleLog:B,scaleOrdinal:N,scalePoint:z,scalePow:F,scaleQuantile:V,scaleQuantize:W,scaleRadial:U,scaleSequential:K,scaleSequentialLog:H,scaleSequentialPow:$,scaleSequentialQuantile:Y,scaleSequentialSqrt:X,scaleSequentialSymlog:q,scaleSqrt:G,scaleSymlog:Z,scaleThreshold:Q,scaleTime:J,scaleUtc:tt,tickFormat:et},Symbol.toStringTag,{value:"Module"}));var ay=t=>t.chartData,sy=a([ay],t=>{var e=null!=t.chartData?t.chartData.length-1:0;return{chartData:t.chartData,computedData:t.computedData,dataEndIndex:e,dataStartIndex:0}}),cy=(t,e,n,r)=>r?sy(t):ay(t);function ly(t){if(Array.isArray(t)&&2===t.length){var[e,n]=t;if(nf(e)&&nf(n))return!0}return!1}function uy(t,e,n){return n?t:[Math.min(t[0],e[0]),Math.max(t[1],e[1])]}function hy(t,e){if(e&&"function"!=typeof t&&Array.isArray(t)&&2===t.length){var n,r,[i,o]=t;if(nf(i))n=i;else if("function"==typeof i)return;if(nf(o))r=o;else if("function"==typeof o)return;var a=[n,r];if(ly(a))return a}}var dy,fy=1e9,py=!0,gy="[DecimalError] ",yy=gy+"Invalid argument: ",vy=gy+"Exponent out of range: ",my=Math.floor,by=Math.pow,xy=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,wy=1e7,_y=9007199254740991,Oy=my(1286742750677284.5),Sy={};function Py(t,e){var n,r,i,o,a,s,c,l,u=t.constructor,h=u.precision;if(!t.s||!e.s)return e.s||(e=new u(t)),py?Ry(e,h):e;if(c=t.d,l=e.d,a=t.e,i=e.e,c=c.slice(),o=a-i){for(o<0?(r=c,o=-o,s=l.length):(r=l,i=a,s=c.length),o>(s=(a=Math.ceil(h/7))>s?a+1:s+1)&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for((s=c.length)-(o=l.length)<0&&(o=s,r=l,l=c,c=r),n=0;o;)n=(c[--o]=c[o]+l[o]+n)/wy|0,c[o]%=wy;for(n&&(c.unshift(n),++i),s=c.length;0==c[--s];)c.pop();return e.d=c,e.e=i,py?Ry(e,h):e}function My(t,e,n){if(t!==~~t||t<e||t>n)throw Error(yy+t)}function ky(t){var e,n,r,i=t.length-1,o="",a=t[0];if(i>0){for(o+=a,e=1;e<i;e++)(n=7-(r=t[e]+"").length)&&(o+=Iy(n)),o+=r;(n=7-(r=(a=t[e])+"").length)&&(o+=Iy(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}Sy.absoluteValue=Sy.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t},Sy.comparedTo=Sy.cmp=function(t){var e,n,r,i,o=this;if(t=new o.constructor(t),o.s!==t.s)return o.s||-t.s;if(o.e!==t.e)return o.e>t.e^o.s<0?1:-1;for(e=0,n=(r=o.d.length)<(i=t.d.length)?r:i;e<n;++e)if(o.d[e]!==t.d[e])return o.d[e]>t.d[e]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1},Sy.decimalPlaces=Sy.dp=function(){var t=this,e=t.d.length-1,n=7*(e-t.e);if(e=t.d[e])for(;e%10==0;e/=10)n--;return n<0?0:n},Sy.dividedBy=Sy.div=function(t){return Ey(this,new this.constructor(t))},Sy.dividedToIntegerBy=Sy.idiv=function(t){var e=this.constructor;return Ry(Ey(this,new e(t),0,1),e.precision)},Sy.equals=Sy.eq=function(t){return!this.cmp(t)},Sy.exponent=function(){return Cy(this)},Sy.greaterThan=Sy.gt=function(t){return this.cmp(t)>0},Sy.greaterThanOrEqualTo=Sy.gte=function(t){return this.cmp(t)>=0},Sy.isInteger=Sy.isint=function(){return this.e>this.d.length-2},Sy.isNegative=Sy.isneg=function(){return this.s<0},Sy.isPositive=Sy.ispos=function(){return this.s>0},Sy.isZero=function(){return 0===this.s},Sy.lessThan=Sy.lt=function(t){return this.cmp(t)<0},Sy.lessThanOrEqualTo=Sy.lte=function(t){return this.cmp(t)<1},Sy.logarithm=Sy.log=function(t){var e,n=this,r=n.constructor,i=r.precision,o=i+5;if(void 0===t)t=new r(10);else if((t=new r(t)).s<1||t.eq(dy))throw Error(gy+"NaN");if(n.s<1)throw Error(gy+(n.s?"NaN":"-Infinity"));return n.eq(dy)?new r(0):(py=!1,e=Ey(Dy(n,o),Dy(t,o),o),py=!0,Ry(e,i))},Sy.minus=Sy.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?Ly(e,t):Py(e,(t.s=-t.s,t))},Sy.modulo=Sy.mod=function(t){var e,n=this,r=n.constructor,i=r.precision;if(!(t=new r(t)).s)throw Error(gy+"NaN");return n.s?(py=!1,e=Ey(n,t,0,1).times(t),py=!0,n.minus(e)):Ry(new r(n),i)},Sy.naturalExponential=Sy.exp=function(){return Ay(this)},Sy.naturalLogarithm=Sy.ln=function(){return Dy(this)},Sy.negated=Sy.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t},Sy.plus=Sy.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?Py(e,t):Ly(e,(t.s=-t.s,t))},Sy.precision=Sy.sd=function(t){var e,n,r,i=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(yy+t);if(e=Cy(i)+1,n=7*(r=i.d.length-1)+1,r=i.d[r]){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return t&&e>n?e:n},Sy.squareRoot=Sy.sqrt=function(){var t,e,n,r,i,o,a,s=this,c=s.constructor;if(s.s<1){if(!s.s)return new c(0);throw Error(gy+"NaN")}for(t=Cy(s),py=!1,0==(i=Math.sqrt(+s))||i==1/0?(((e=ky(s.d)).length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=my((t+1)/2)-(t<0||t%2),r=new c(e=i==1/0?"5e"+t:(e=i.toExponential()).slice(0,e.indexOf("e")+1)+t)):r=new c(i.toString()),i=a=(n=c.precision)+3;;)if(r=(o=r).plus(Ey(s,o,a+2)).times(.5),ky(o.d).slice(0,a)===(e=ky(r.d)).slice(0,a)){if(e=e.slice(a-3,a+1),i==a&&"4999"==e){if(Ry(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if("9999"!=e)break;a+=4}return py=!0,Ry(r,n)},Sy.times=Sy.mul=function(t){var e,n,r,i,o,a,s,c,l,u=this,h=u.constructor,d=u.d,f=(t=new h(t)).d;if(!u.s||!t.s)return new h(0);for(t.s*=u.s,n=u.e+t.e,(c=d.length)<(l=f.length)&&(o=d,d=f,f=o,a=c,c=l,l=a),o=[],r=a=c+l;r--;)o.push(0);for(r=l;--r>=0;){for(e=0,i=c+r;i>r;)s=o[i]+f[r]*d[i-r-1]+e,o[i--]=s%wy|0,e=s/wy|0;o[i]=(o[i]+e)%wy|0}for(;!o[--a];)o.pop();return e?++n:o.shift(),t.d=o,t.e=n,py?Ry(t,h.precision):t},Sy.toDecimalPlaces=Sy.todp=function(t,e){var n=this,r=n.constructor;return n=new r(n),void 0===t?n:(My(t,0,fy),void 0===e?e=r.rounding:My(e,0,8),Ry(n,t+Cy(n)+1,e))},Sy.toExponential=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=By(r,!0):(My(t,0,fy),void 0===e?e=i.rounding:My(e,0,8),n=By(r=Ry(new i(r),t+1,e),!0,t+1)),n},Sy.toFixed=function(t,e){var n,r,i=this,o=i.constructor;return void 0===t?By(i):(My(t,0,fy),void 0===e?e=o.rounding:My(e,0,8),n=By((r=Ry(new o(i),t+Cy(i)+1,e)).abs(),!1,t+Cy(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)},Sy.toInteger=Sy.toint=function(){var t=this,e=t.constructor;return Ry(new e(t),Cy(t)+1,e.rounding)},Sy.toNumber=function(){return+this},Sy.toPower=Sy.pow=function(t){var e,n,r,i,o,a,s=this,c=s.constructor,l=+(t=new c(t));if(!t.s)return new c(dy);if(!(s=new c(s)).s){if(t.s<1)throw Error(gy+"Infinity");return s}if(s.eq(dy))return s;if(r=c.precision,t.eq(dy))return Ry(s,r);if(a=(e=t.e)>=(n=t.d.length-1),o=s.s,a){if((n=l<0?-l:l)<=_y){for(i=new c(dy),e=Math.ceil(r/7+4),py=!1;n%2&&Ny((i=i.times(s)).d,e),0!==(n=my(n/2));)Ny((s=s.times(s)).d,e);return py=!0,t.s<0?new c(dy).div(i):Ry(i,r)}}else if(o<0)throw Error(gy+"NaN");return o=o<0&&1&t.d[Math.max(e,n)]?-1:1,s.s=1,py=!1,i=t.times(Dy(s,r+12)),py=!0,(i=Ay(i)).s=o,i},Sy.toPrecision=function(t,e){var n,r,i=this,o=i.constructor;return void 0===t?r=By(i,(n=Cy(i))<=o.toExpNeg||n>=o.toExpPos):(My(t,1,fy),void 0===e?e=o.rounding:My(e,0,8),r=By(i=Ry(new o(i),t,e),t<=(n=Cy(i))||n<=o.toExpNeg,t)),r},Sy.toSignificantDigits=Sy.tosd=function(t,e){var n=this.constructor;return void 0===t?(t=n.precision,e=n.rounding):(My(t,1,fy),void 0===e?e=n.rounding:My(e,0,8)),Ry(new n(this),t,e)},Sy.toString=Sy.valueOf=Sy.val=Sy.toJSON=Sy[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=Cy(t),n=t.constructor;return By(t,e<=n.toExpNeg||e>=n.toExpPos)};var Ey=function(){function t(t,e){var n,r=0,i=t.length;for(t=t.slice();i--;)n=t[i]*e+r,t[i]=n%wy|0,r=n/wy|0;return r&&t.unshift(r),t}function e(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function n(t,e,n){for(var r=0;n--;)t[n]-=r,r=t[n]<e[n]?1:0,t[n]=r*wy+t[n]-e[n];for(;!t[0]&&t.length>1;)t.shift()}return function(r,i,o,a){var s,c,l,u,h,d,f,p,g,y,v,m,b,x,w,_,O,S,P=r.constructor,M=r.s==i.s?1:-1,k=r.d,E=i.d;if(!r.s)return new P(r);if(!i.s)throw Error(gy+"Division by zero");for(c=r.e-i.e,O=E.length,w=k.length,p=(f=new P(M)).d=[],l=0;E[l]==(k[l]||0);)++l;if(E[l]>(k[l]||0)&&--c,(m=null==o?o=P.precision:a?o+(Cy(r)-Cy(i))+1:o)<0)return new P(0);if(m=m/7+2|0,l=0,1==O)for(u=0,E=E[0],m++;(l<w||u)&&m--;l++)b=u*wy+(k[l]||0),p[l]=b/E|0,u=b%E|0;else{for((u=wy/(E[0]+1)|0)>1&&(E=t(E,u),k=t(k,u),O=E.length,w=k.length),x=O,y=(g=k.slice(0,O)).length;y<O;)g[y++]=0;(S=E.slice()).unshift(0),_=E[0],E[1]>=wy/2&&++_;do{u=0,(s=e(E,g,O,y))<0?(v=g[0],O!=y&&(v=v*wy+(g[1]||0)),(u=v/_|0)>1?(u>=wy&&(u=wy-1),1==(s=e(h=t(E,u),g,d=h.length,y=g.length))&&(u--,n(h,O<d?S:E,d))):(0==u&&(s=u=1),h=E.slice()),(d=h.length)<y&&h.unshift(0),n(g,h,y),-1==s&&(s=e(E,g,O,y=g.length))<1&&(u++,n(g,O<y?S:E,y)),y=g.length):0===s&&(u++,g=[0]),p[l++]=u,s&&g[0]?g[y++]=k[x]||0:(g=[k[x]],y=1)}while((x++<w||void 0!==g[0])&&m--)}return p[0]||p.shift(),f.e=c,Ry(f,a?o+Cy(f)+1:o)}}();function Ay(t,e){var n,r,i,o,a,s=0,c=0,l=t.constructor,u=l.precision;if(Cy(t)>16)throw Error(vy+Cy(t));if(!t.s)return new l(dy);for(py=!1,a=u,o=new l(.03125);t.abs().gte(.1);)t=t.times(o),c+=5;for(a+=Math.log(by(2,c))/Math.LN10*2+5|0,n=r=i=new l(dy),l.precision=a;;){if(r=Ry(r.times(t),a),n=n.times(++s),ky((o=i.plus(Ey(r,n,a))).d).slice(0,a)===ky(i.d).slice(0,a)){for(;c--;)i=Ry(i.times(i),a);return l.precision=u,null==e?(py=!0,Ry(i,u)):i}i=o}}function Cy(t){for(var e=7*t.e,n=t.d[0];n>=10;n/=10)e++;return e}function jy(t,e,n){if(e>t.LN10.sd())throw py=!0,n&&(t.precision=n),Error(gy+"LN10 precision limit exceeded");return Ry(new t(t.LN10),e)}function Iy(t){for(var e="";t--;)e+="0";return e}function Dy(t,e){var n,r,i,o,a,s,c,l,u,h=1,d=t,f=d.d,p=d.constructor,g=p.precision;if(d.s<1)throw Error(gy+(d.s?"NaN":"-Infinity"));if(d.eq(dy))return new p(0);if(null==e?(py=!1,l=g):l=e,d.eq(10))return null==e&&(py=!0),jy(p,l);if(l+=10,p.precision=l,r=(n=ky(f)).charAt(0),o=Cy(d),!(Math.abs(o)<15e14))return c=jy(p,l+2,g).times(o+""),d=Dy(new p(r+"."+n.slice(1)),l-10).plus(c),p.precision=g,null==e?(py=!0,Ry(d,g)):d;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=ky((d=d.times(t)).d)).charAt(0),h++;for(o=Cy(d),r>1?(d=new p("0."+n),o++):d=new p(r+"."+n.slice(1)),s=a=d=Ey(d.minus(dy),d.plus(dy),l),u=Ry(d.times(d),l),i=3;;){if(a=Ry(a.times(u),l),ky((c=s.plus(Ey(a,new p(i),l))).d).slice(0,l)===ky(s.d).slice(0,l))return s=s.times(2),0!==o&&(s=s.plus(jy(p,l+2,g).times(o+""))),s=Ey(s,new p(h),l),p.precision=g,null==e?(py=!0,Ry(s,g)):s;s=c,i+=2}}function Ty(t,e){var n,r,i;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;48===e.charCodeAt(r);)++r;for(i=e.length;48===e.charCodeAt(i-1);)--i;if(e=e.slice(r,i)){if(i-=r,n=n-r-1,t.e=my(n/7),t.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&t.d.push(+e.slice(0,r)),i-=7;r<i;)t.d.push(+e.slice(r,r+=7));r=7-(e=e.slice(r)).length}else r-=i;for(;r--;)e+="0";if(t.d.push(+e),py&&(t.e>Oy||t.e<-Oy))throw Error(vy+n)}else t.s=0,t.e=0,t.d=[0];return t}function Ry(t,e,n){var r,i,o,a,s,c,l,u,h=t.d;for(a=1,o=h[0];o>=10;o/=10)a++;if((r=e-a)<0)r+=7,i=e,l=h[u=0];else{if((u=Math.ceil((r+1)/7))>=(o=h.length))return t;for(l=o=h[u],a=1;o>=10;o/=10)a++;i=(r%=7)-7+a}if(void 0!==n&&(s=l/(o=by(10,a-i-1))%10|0,c=e<0||void 0!==h[u+1]||l%o,c=n<4?(s||c)&&(0==n||n==(t.s<0?3:2)):s>5||5==s&&(4==n||c||6==n&&(r>0?i>0?l/by(10,a-i):0:h[u-1])%10&1||n==(t.s<0?8:7))),e<1||!h[0])return c?(o=Cy(t),h.length=1,e=e-o-1,h[0]=by(10,(7-e%7)%7),t.e=my(-e/7)||0):(h.length=1,h[0]=t.e=t.s=0),t;if(0==r?(h.length=u,o=1,u--):(h.length=u+1,o=by(10,7-r),h[u]=i>0?(l/by(10,a-i)%by(10,i)|0)*o:0),c)for(;;){if(0==u){(h[0]+=o)==wy&&(h[0]=1,++t.e);break}if(h[u]+=o,h[u]!=wy)break;h[u--]=0,o=1}for(r=h.length;0===h[--r];)h.pop();if(py&&(t.e>Oy||t.e<-Oy))throw Error(vy+Cy(t));return t}function Ly(t,e){var n,r,i,o,a,s,c,l,u,h,d=t.constructor,f=d.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new d(t),py?Ry(e,f):e;if(c=t.d,h=e.d,r=e.e,l=t.e,c=c.slice(),a=l-r){for((u=a<0)?(n=c,a=-a,s=h.length):(n=h,r=l,s=c.length),a>(i=Math.max(Math.ceil(f/7),s)+2)&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for((u=(i=c.length)<(s=h.length))&&(s=i),i=0;i<s;i++)if(c[i]!=h[i]){u=c[i]<h[i];break}a=0}for(u&&(n=c,c=h,h=n,e.s=-e.s),s=c.length,i=h.length-s;i>0;--i)c[s++]=0;for(i=h.length;i>a;){if(c[--i]<h[i]){for(o=i;o&&0===c[--o];)c[o]=wy-1;--c[o],c[i]+=wy}c[i]-=h[i]}for(;0===c[--s];)c.pop();for(;0===c[0];c.shift())--r;return c[0]?(e.d=c,e.e=r,py?Ry(e,f):e):new d(0)}function By(t,e,n){var r,i=Cy(t),o=ky(t.d),a=o.length;return e?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+Iy(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Iy(-i-1)+o,n&&(r=n-a)>0&&(o+=Iy(r))):i>=a?(o+=Iy(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Iy(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=Iy(r))),t.s<0?"-"+o:o}function Ny(t,e){if(t.length>e)return t.length=e,!0}function zy(t){if(!t||"object"!=typeof t)throw Error(gy+"Object expected");var e,n,r,i=["precision",1,fy,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e<i.length;e+=3)if(void 0!==(r=t[n=i[e]])){if(!(my(r)===r&&r>=i[e+1]&&r<=i[e+2]))throw Error(yy+n+": "+r);this[n]=r}if(void 0!==(r=t[n="LN10"])){if(r!=Math.LN10)throw Error(yy+n+": "+r);this[n]=new this(r)}return this}var Fy=function t(e){var n,r,i;function o(t){var e=this;if(!(e instanceof o))return new o(t);if(e.constructor=o,t instanceof o)return e.s=t.s,e.e=t.e,void(e.d=(t=t.d)?t.slice():t);if("number"==typeof t){if(0*t!=0)throw Error(yy+t);if(t>0)e.s=1;else{if(!(t<0))return e.s=0,e.e=0,void(e.d=[0]);t=-t,e.s=-1}return t===~~t&&t<1e7?(e.e=0,void(e.d=[t])):Ty(e,t.toString())}if("string"!=typeof t)throw Error(yy+t);if(45===t.charCodeAt(0)?(t=t.slice(1),e.s=-1):e.s=1,!xy.test(t))throw Error(yy+t);Ty(e,t)}if(o.prototype=Sy,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=t,o.config=o.set=zy,void 0===e&&(e={}),e)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<i.length;)e.hasOwnProperty(r=i[n++])||(e[r]=this[r]);return o.config(e),o}({precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"});dy=new Fy(1);const Vy=Fy;var Wy,Uy=t=>t,Ky={},Hy=t=>t===Ky,$y=t=>function e(){return 0===arguments.length||1===arguments.length&&Hy(arguments.length<=0?void 0:arguments[0])?e:t(...arguments)},Yy=(t,e)=>1===t?e:$y(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=r.filter(t=>t!==Ky).length;return o>=t?e(...r):Yy(t-o,$y(function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var o=r.map(t=>Hy(t)?n.shift():t);return e(...o,...n)}))}),Xy=(t,e)=>{for(var n=[],r=t;r<e;++r)n[r-t]=r;return n},qy=Yy((Wy=(t,e)=>Array.isArray(e)?e.map(t):Object.keys(e).map(t=>e[t]).map(t)).length,Wy),Gy=t=>Array.isArray(t)?t.reverse():t.split("").reverse().join("");function Zy(t){return 0===t?1:Math.floor(new Vy(t).abs().log(10).toNumber())+1}function Qy(t,e,n){for(var r=new Vy(t),i=0,o=[];r.lt(e)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}var Jy=t=>{var[e,n]=t,[r,i]=[e,n];return e>n&&([r,i]=[n,e]),[r,i]},tv=(t,e,n)=>{if(t.lte(0))return new Vy(0);var r=Zy(t.toNumber()),i=new Vy(10).pow(r),o=t.div(i),a=1!==r?.05:.1,s=new Vy(Math.ceil(o.div(a).toNumber())).add(n).mul(a).mul(i);return new Vy(e?s.toNumber():Math.ceil(s.toNumber()))},ev=(t,e,n)=>{var r=new Vy(1),i=new Vy(t);if(!i.isint()&&n){var o=Math.abs(t);o<1?(r=new Vy(10).pow(Zy(t)-1),i=new Vy(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new Vy(Math.floor(t)))}else 0===t?i=new Vy(Math.floor((e-1)/2)):n||(i=new Vy(Math.floor(t)));var a=Math.floor((e-1)/2);return function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(!e.length)return Uy;var r=e.reverse(),i=r[0],o=r.slice(1);return function(){return o.reduce((t,e)=>e(t),i(...arguments))}}(qy(t=>i.add(new Vy(t-a).mul(r)).toNumber()),Xy)(0,e)},nv=function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((e-t)/(n-1)))return{step:new Vy(0),tickMin:new Vy(0),tickMax:new Vy(0)};var o,a=tv(new Vy(e).sub(t).div(n-1),r,i);o=t<=0&&e>=0?new Vy(0):(o=new Vy(t).add(e).div(2)).sub(new Vy(o).mod(a));var s=Math.ceil(o.sub(t).div(a).toNumber()),c=Math.ceil(new Vy(e).sub(o).div(a).toNumber()),l=s+c+1;return l>n?nv(t,e,n,r,i+1):(l<n&&(c=e>0?c+(n-l):c,s=e>0?s:s+(n-l)),{step:a,tickMin:o.sub(new Vy(s).mul(a)),tickMax:o.add(new Vy(c).mul(a))})},rv=t=>t.rootProps.stackOffset,iv=t=>t.rootProps.reverseStackOrder,ov=t=>t.options.chartName,av=t=>t.rootProps.syncId,sv=t=>t.rootProps.syncMethod,cv=t=>t.options.eventEmitter,lv={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},uv=0,hv="auto",dv=!0,fv=!1,pv=!0,gv=0,yv="auto",vv=!0,mv=5,bv=(t,e)=>{if(t&&e)return null!=t&&t.reversed?[e[1],e[0]]:e},xv={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:uv,includeHidden:!1,name:void 0,reversed:!1,scale:hv,tick:dv,tickCount:void 0,ticks:void 0,type:"category",unit:void 0},wv={allowDataOverflow:fv,allowDecimals:!1,allowDuplicatedCategory:pv,dataKey:void 0,domain:void 0,id:gv,includeHidden:!1,name:void 0,reversed:!1,scale:yv,tick:vv,tickCount:mv,ticks:void 0,type:"number",unit:void 0},_v={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,dataKey:void 0,domain:void 0,id:uv,includeHidden:!1,name:void 0,reversed:!1,scale:hv,tick:dv,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},Ov={allowDataOverflow:fv,allowDecimals:!1,allowDuplicatedCategory:pv,dataKey:void 0,domain:void 0,id:gv,includeHidden:!1,name:void 0,reversed:!1,scale:yv,tick:vv,tickCount:mv,ticks:void 0,type:"category",unit:void 0},Sv=(t,e)=>null!=t.polarAxis.angleAxis[e]?t.polarAxis.angleAxis[e]:"radial"===t.layout.layoutType?_v:xv,Pv=(t,e)=>null!=t.polarAxis.radiusAxis[e]?t.polarAxis.radiusAxis[e]:"radial"===t.layout.layoutType?Ov:wv,Mv=t=>t.polarOptions,kv=a([_d,Od,jd],function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(e-(n.top||0)-(n.bottom||0)))/2}),Ev=a([Mv,kv],(t,e)=>{if(null!=t)return ms(t.innerRadius,e,0)}),Av=a([Mv,kv],(t,e)=>{if(null!=t)return ms(t.outerRadius,e,.8*e)}),Cv=a([Mv],t=>{if(null==t)return[0,0];var{startAngle:e,endAngle:n}=t;return[e,n]});a([Sv,Cv],bv);var jv=a([kv,Ev,Av],(t,e,n)=>{if(null!=t&&null!=e&&null!=n)return[e,n]});a([Pv,jv],bv);var Iv=a([yf,Mv,Ev,Av,_d,Od],(t,e,n,r,i,o)=>{if(("centric"===t||"radial"===t)&&null!=e&&null!=n&&null!=r){var{cx:a,cy:s,startAngle:c,endAngle:l}=e;return{cx:ms(a,i,i/2),cy:ms(s,o,o/2),innerRadius:n,outerRadius:r,startAngle:c,endAngle:l,clockWise:!1}}}),Dv=(t,e)=>e,Tv=(t,e,n)=>n;function Rv(t){return null==t?void 0:t.id}function Lv(t,e,n){var{chartData:r=[]}=e,{allowDuplicatedCategory:i,dataKey:o}=n,a=new Map;return t.forEach(t=>{var e,n=null!==(e=t.data)&&void 0!==e?e:r;if(null!=n&&0!==n.length){var s=Rv(t);n.forEach((e,n)=>{var r,c=null==o||i?n:String(dd(e,o,null)),l=dd(e,t.dataKey,0);r=a.has(c)?a.get(c):{},Object.assign(r,{[s]:l}),a.set(c,r)})}}),Array.from(a.values())}function Bv(t){return null!=t.stackId&&null!=t.dataKey}var Nv=(t,e)=>t===e||null!=t&&null!=e&&(t[0]===e[0]&&t[1]===e[1]);function zv(t,e){return!(!Array.isArray(t)||!Array.isArray(e)||0!==t.length||0!==e.length)||t===e}var Fv=t=>{var e=yf(t);return"horizontal"===e?"xAxis":"vertical"===e?"yAxis":"centric"===e?"angleAxis":"radiusAxis"},Vv=t=>t.tooltip.settings.axisId;function Wv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Uv(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Wv(Object(n),!0).forEach(function(e){Kv(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wv(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Kv(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Hv=[0,"auto"],$v={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},Yv=(t,e)=>{var n=((t,e)=>t.cartesianAxis.xAxis[e])(t,e);return null==n?$v:n},Xv={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Hv,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,width:60},qv=(t,e)=>{var n=((t,e)=>t.cartesianAxis.yAxis[e])(t,e);return null==n?Xv:n},Gv={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:""},Zv=(t,e)=>{var n=t.cartesianAxis.zAxis[e];return null==n?Gv:n},Qv=(t,e,n)=>{switch(e){case"xAxis":return Yv(t,n);case"yAxis":return qv(t,n);case"zAxis":return Zv(t,n);case"angleAxis":return Sv(t,n);case"radiusAxis":return Pv(t,n);default:throw new Error("Unexpected axis type: ".concat(e))}},Jv=(t,e,n)=>{switch(e){case"xAxis":return Yv(t,n);case"yAxis":return qv(t,n);case"angleAxis":return Sv(t,n);case"radiusAxis":return Pv(t,n);default:throw new Error("Unexpected axis type: ".concat(e))}},tm=t=>t.graphicalItems.cartesianItems.some(t=>"bar"===t.type)||t.graphicalItems.polarItems.some(t=>"radialBar"===t.type);function em(t,e){return n=>{switch(t){case"xAxis":return"xAxisId"in n&&n.xAxisId===e;case"yAxis":return"yAxisId"in n&&n.yAxisId===e;case"zAxis":return"zAxisId"in n&&n.zAxisId===e;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===e;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===e;default:return!1}}}var nm=a([Dv,Tv],em),rm=(t,e,n)=>t.filter(n).filter(t=>!0===(null==e?void 0:e.includeHidden)||!t.hide),im=a([t=>t.graphicalItems.cartesianItems,Qv,nm],rm,{memoizeOptions:{resultEqualityCheck:zv}}),om=a([im],t=>t.filter(t=>"area"===t.type||"bar"===t.type).filter(Bv)),am=t=>t.filter(t=>!("stackId"in t)||void 0===t.stackId),sm=a([im],am),cm=t=>t.map(t=>t.data).filter(Boolean).flat(1),lm=a([im],cm,{memoizeOptions:{resultEqualityCheck:zv}}),um=(t,e)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=e;return t.length>0?t:n.slice(r,i+1)},hm=a([lm,cy],um),dm=(t,e,n)=>null!=(null==e?void 0:e.dataKey)?t.map(t=>({value:dd(t,e.dataKey)})):n.length>0?n.map(t=>t.dataKey).flatMap(e=>t.map(t=>({value:dd(t,e)}))):t.map(t=>({value:t})),fm=a([hm,Qv,im],dm);function pm(t,e){switch(t){case"xAxis":return"x"===e.direction;case"yAxis":return"y"===e.direction;default:return!1}}function gm(t){if(gs(t)||t instanceof Date){var e=Number(t);if(nf(e))return e}}function ym(t){if(Array.isArray(t)){var e=[gm(t[0]),gm(t[1])];return ly(e)?e:void 0}var n=gm(t);if(null!=n)return[n,n]}function vm(t){return t.map(gm).filter(Os)}var mm=t=>{var e=Fv(t),n=Vv(t);return Jv(t,e,n)},bm=a([mm],t=>null==t?void 0:t.dataKey),xm=a([om,cy,mm],Lv),wm=(t,e,n,r)=>{var i=e.reduce((t,e)=>(null==e.stackId||(null==t[e.stackId]&&(t[e.stackId]=[]),t[e.stackId].push(e)),t),{});return Object.fromEntries(Object.entries(i).map(e=>{var[i,o]=e,a=r?[...o].reverse():o,s=a.map(Rv);return[i,{stackedData:yd(t,s,n),graphicalItems:a}]}))},_m=a([xm,om,rv,iv],wm),Om=(t,e,n,r)=>{var{dataStartIndex:i,dataEndIndex:o}=e;if(null==r&&"zAxis"!==n){var a=vd(t,i,o);if(null==a||0!==a[0]||0!==a[1])return a}},Sm=a([Qv],t=>t.allowDataOverflow),Pm=t=>{var e;if(null==t||!("domain"in t))return Hv;if(null!=t.domain)return t.domain;if(null!=t.ticks){if("number"===t.type){var n=vm(t.ticks);return[Math.min(...n),Math.max(...n)]}if("category"===t.type)return t.ticks.map(String)}return null!==(e=null==t?void 0:t.domain)&&void 0!==e?e:Hv},Mm=a([Qv],Pm),km=a([Mm,Sm],hy),Em=a([_m,ay,Dv,km],Om,{memoizeOptions:{resultEqualityCheck:Nv}}),Am=t=>t.errorBars,Cm=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e.filter(Boolean);if(0!==r.length){var i=r.flat();return[Math.min(...i),Math.max(...i)]}},jm=(t,e,n,r,i)=>{var o,a;if(n.length>0&&t.forEach(t=>{n.forEach(n=>{var s,c,l=null===(s=r[n.id])||void 0===s?void 0:s.filter(t=>pm(i,t)),u=dd(t,null!==(c=e.dataKey)&&void 0!==c?c:n.dataKey),h=function(t,e,n){return!n||"number"!=typeof e||ds(e)?[]:n.length?vm(n.flatMap(n=>{var r,i,o=dd(t,n.dataKey);if(Array.isArray(o)?[r,i]=o:r=i=o,nf(r)&&nf(i))return[e-r,e+i]})):[]}(t,u,l);if(h.length>=2){var d=Math.min(...h),f=Math.max(...h);(null==o||d<o)&&(o=d),(null==a||f>a)&&(a=f)}var p=ym(u);null!=p&&(o=null==o?p[0]:Math.min(o,p[0]),a=null==a?p[1]:Math.max(a,p[1]))})}),null!=(null==e?void 0:e.dataKey)&&t.forEach(t=>{var n=ym(dd(t,e.dataKey));null!=n&&(o=null==o?n[0]:Math.min(o,n[0]),a=null==a?n[1]:Math.max(a,n[1]))}),nf(o)&&nf(a))return[o,a]},Im=a([hm,Qv,sm,Am,Dv],jm,{memoizeOptions:{resultEqualityCheck:Nv}});function Dm(t){var{value:e}=t;if(gs(e)||e instanceof Date)return e}var Tm=t=>t.referenceElements.dots,Rm=(t,e,n)=>t.filter(t=>"extendDomain"===t.ifOverflow).filter(t=>"xAxis"===e?t.xAxisId===n:t.yAxisId===n),Lm=a([Tm,Dv,Tv],Rm),Bm=t=>t.referenceElements.areas,Nm=a([Bm,Dv,Tv],Rm),zm=t=>t.referenceElements.lines,Fm=a([zm,Dv,Tv],Rm),Vm=(t,e)=>{var n=vm(t.map(t=>"xAxis"===e?t.x:t.y));if(0!==n.length)return[Math.min(...n),Math.max(...n)]},Wm=a(Lm,Dv,Vm),Um=(t,e)=>{var n=vm(t.flatMap(t=>["xAxis"===e?t.x1:t.y1,"xAxis"===e?t.x2:t.y2]));if(0!==n.length)return[Math.min(...n),Math.max(...n)]},Km=a([Nm,Dv],Um);var Hm=(t,e)=>{var n=t.flatMap(t=>"xAxis"===e?function(t){var e;if(null!=t.x)return vm([t.x]);var n=null===(e=t.segment)||void 0===e?void 0:e.map(t=>t.x);return null==n||0===n.length?[]:vm(n)}(t):function(t){var e;if(null!=t.y)return vm([t.y]);var n=null===(e=t.segment)||void 0===e?void 0:e.map(t=>t.y);return null==n||0===n.length?[]:vm(n)}(t));if(0!==n.length)return[Math.min(...n),Math.max(...n)]},$m=a([Fm,Dv],Hm),Ym=a(Wm,$m,Km,(t,e,n)=>Cm(t,n,e)),Xm=(t,e,n,r,i,o,a,s)=>null!=n?n:function(t,e,n){if(n||null!=e){if("function"==typeof t&&null!=e)try{var r=t(e,n);if(ly(r))return uy(r,e,n)}catch(f){}if(Array.isArray(t)&&2===t.length){var i,o,[a,s]=t;if("auto"===a)null!=e&&(i=Math.min(...e));else if(ps(a))i=a;else if("function"==typeof a)try{null!=e&&(i=a(null==e?void 0:e[0]))}catch(p){}else if("string"==typeof a&&md.test(a)){var c=md.exec(a);if(null==c||null==e)i=void 0;else{var l=+c[1];i=e[0]-l}}else i=null==e?void 0:e[0];if("auto"===s)null!=e&&(o=Math.max(...e));else if(ps(s))o=s;else if("function"==typeof s)try{null!=e&&(o=s(null==e?void 0:e[1]))}catch(g){}else if("string"==typeof s&&bd.test(s)){var u=bd.exec(s);if(null==u||null==e)o=void 0;else{var h=+u[1];o=e[1]+h}}else o=null==e?void 0:e[1];var d=[i,o];if(ly(d))return null==e?d:uy(d,e,n)}}}(e,"vertical"===a&&"xAxis"===s||"horizontal"===a&&"yAxis"===s?Cm(r,o,i):Cm(o,i),t.allowDataOverflow),qm=a([Qv,Mm,km,Em,Im,Ym,yf,Dv],Xm,{memoizeOptions:{resultEqualityCheck:Nv}}),Gm=[0,1],Zm=(t,e,n,r,i,o,a)=>{if(null!=t&&null!=n&&0!==n.length||void 0!==a){var s,{dataKey:c,type:l}=t,u=fd(e,o);return u&&null==c?iy(0,null!==(s=null==n?void 0:n.length)&&void 0!==s?s:0):"category"===l?((t,e,n)=>{var r=t.map(Dm).filter(t=>null!=t);return n&&(null==e.dataKey||e.allowDuplicatedCategory&&bs(r))?iy(0,t.length):e.allowDuplicatedCategory?r:Array.from(new Set(r))})(r,t,u):"expand"===i?Gm:a}},Qm=a([Qv,yf,hm,fm,rv,Dv,qm],Zm),Jm=(t,e,n,r,i)=>{if(null!=t){var{scale:o,type:a}=t;if("auto"===o)return"radial"===e&&"radiusAxis"===i?"band":"radial"===e&&"angleAxis"===i?"linear":"category"===a&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?"point":"category"===a?"band":"linear";if("string"==typeof o){var s="scale".concat(_s(o));return s in oy?s:"point"}}},tb=a([Qv,yf,tm,ov,Dv],Jm);function eb(t,e,n,r){if(null!=n&&null!=r){if("function"==typeof t.scale)return t.scale.copy().domain(n).range(r);var i=function(t){if(null!=t){if(t in oy)return oy[t]();var e="scale".concat(_s(t));return e in oy?oy[e]():void 0}}(e);if(null!=i){var o=i.domain(n).range(r);return(t=>{var e=t.domain();if(e&&!(e.length<=2)){var n=e.length,r=t.range(),i=Math.min(r[0],r[1])-pd,o=Math.max(r[0],r[1])+pd,a=t(e[0]),s=t(e[n-1]);(a<i||a>o||s<i||s>o)&&t.domain([e[0],e[n-1]])}})(o),o}}}var nb=(t,e,n)=>{var r=Pm(e);if("auto"===n||"linear"===n)return null!=e&&e.tickCount&&Array.isArray(r)&&("auto"===r[0]||"auto"===r[1])&&ly(t)?function(t){var[e,n]=t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=Math.max(r,2),[a,s]=Jy([e,n]);if(a===-1/0||s===1/0){var c=s===1/0?[a,...Xy(0,r-1).map(()=>1/0)]:[...Xy(0,r-1).map(()=>-1/0),s];return e>n?Gy(c):c}if(a===s)return ev(a,r,i);var{step:l,tickMin:u,tickMax:h}=nv(a,s,o,i,0),d=Qy(u,h.add(new Vy(.1).mul(l)),l);return e>n?Gy(d):d}(t,e.tickCount,e.allowDecimals):null!=e&&e.tickCount&&"number"===e.type&&ly(t)?function(t,e){var[n,r]=t,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],[o,a]=Jy([n,r]);if(o===-1/0||a===1/0)return[n,r];if(o===a)return[o];var s=Math.max(e,2),c=tv(new Vy(a).sub(o).div(s-1),i,0),l=[...Qy(new Vy(o),new Vy(a),c),a];return!1===i&&(l=l.map(t=>Math.round(t))),n>r?Gy(l):l}(t,e.tickCount,e.allowDecimals):void 0},rb=a([Qm,Jv,tb],nb),ib=(t,e,n,r)=>{if("angleAxis"!==r&&"number"===(null==t?void 0:t.type)&&ly(e)&&Array.isArray(n)&&n.length>0){var i=e[0],o=n[0],a=e[1],s=n[n.length-1];return[Math.min(i,o),Math.max(a,s)]}return e},ob=a([Qv,Qm,rb,Dv],ib),ab=a(fm,Qv,(t,e)=>{if(e&&"number"===e.type){var n=1/0,r=Array.from(vm(t.map(t=>t.value))).sort((t,e)=>t-e);if(r.length<2)return 1/0;var i=r[r.length-1]-r[0];if(0===i)return 1/0;for(var o=0;o<r.length-1;o++){var a=r[o+1]-r[o];n=Math.min(n,a)}return n/i}}),sb=a(ab,yf,t=>t.rootProps.barCategoryGap,jd,(t,e,n,r)=>r,(t,e,n,r,i)=>{if(!nf(t))return 0;var o="vertical"===e?r.height:r.width;if("gap"===i)return t*o/2;if("no-gap"===i){var a=ms(n,t*o),s=t*o/2;return s-a-(s-a)/o*a}return 0}),cb=a(Yv,(t,e)=>{var n=Yv(t,e);return null==n||"string"!=typeof n.padding?0:sb(t,"xAxis",e,n.padding)},(t,e)=>{var n,r;if(null==t)return{left:0,right:0};var{padding:i}=t;return"string"==typeof i?{left:e,right:e}:{left:(null!==(n=i.left)&&void 0!==n?n:0)+e,right:(null!==(r=i.right)&&void 0!==r?r:0)+e}}),lb=a(qv,(t,e)=>{var n=qv(t,e);return null==n||"string"!=typeof n.padding?0:sb(t,"yAxis",e,n.padding)},(t,e)=>{var n,r;if(null==t)return{top:0,bottom:0};var{padding:i}=t;return"string"==typeof i?{top:e,bottom:e}:{top:(null!==(n=i.top)&&void 0!==n?n:0)+e,bottom:(null!==(r=i.bottom)&&void 0!==r?r:0)+e}}),ub=a([jd,cb,Vd,Fd,(t,e,n)=>n],(t,e,n,r,i)=>{var{padding:o}=r;return i?[o.left,n.width-o.right]:[t.left+e.left,t.left+t.width-e.right]}),hb=a([jd,yf,lb,Vd,Fd,(t,e,n)=>n],(t,e,n,r,i,o)=>{var{padding:a}=i;return o?[r.height-a.bottom,a.top]:"horizontal"===e?[t.top+t.height-n.bottom,t.top+n.top]:[t.top+n.top,t.top+t.height-n.bottom]}),db=(t,e,n,r)=>{var i;switch(e){case"xAxis":return ub(t,n,r);case"yAxis":return hb(t,n,r);case"zAxis":return null===(i=Zv(t,n))||void 0===i?void 0:i.range;case"angleAxis":return Cv(t);case"radiusAxis":return jv(t,n);default:return}},fb=a([Qv,db],bv),pb=a([Qv,tb,ob,fb],eb);function gb(t,e){return t.id<e.id?-1:t.id>e.id?1:0}a([im,Am,Dv],(t,e,n)=>t.flatMap(t=>e[t.id]).filter(Boolean).filter(t=>pm(n,t)));var yb=(t,e)=>e,vb=(t,e,n)=>n,mb=a(Md,yb,vb,(t,e,n)=>t.filter(t=>t.orientation===e).filter(t=>t.mirror===n).sort(gb)),bb=a(kd,yb,vb,(t,e,n)=>t.filter(t=>t.orientation===e).filter(t=>t.mirror===n).sort(gb)),xb=(t,e)=>({width:t.width,height:e.height});a(jd,Yv,xb);var wb=a(Od,jd,mb,yb,vb,(t,e,n,r,i)=>{var o,a={};return n.forEach(n=>{var s=xb(e,n);null==o&&(o=((t,e,n)=>{switch(e){case"top":return t.top;case"bottom":return n-t.bottom;default:return 0}})(e,r,t));var c="top"===r&&!i||"bottom"===r&&i;a[n.id]=o-Number(c)*s.height,o+=(c?-1:1)*s.height}),a}),_b=a(_d,jd,bb,yb,vb,(t,e,n,r,i)=>{var o,a={};return n.forEach(n=>{var s=((t,e)=>({width:"number"==typeof e.width?e.width:60,height:t.height}))(e,n);null==o&&(o=((t,e,n)=>{switch(e){case"left":return t.left;case"right":return n-t.right;default:return 0}})(e,r,t));var c="left"===r&&!i||"right"===r&&i;a[n.id]=o-Number(c)*s.width,o+=(c?-1:1)*s.width}),a});a([jd,Yv,(t,e)=>{var n=Yv(t,e);if(null!=n)return wb(t,n.orientation,n.mirror)},(t,e)=>e],(t,e,n,r)=>{if(null!=e){var i=null==n?void 0:n[r];return null==i?{x:t.left,y:0}:{x:t.left,y:i}}});a([jd,qv,(t,e)=>{var n=qv(t,e);if(null!=n)return _b(t,n.orientation,n.mirror)},(t,e)=>e],(t,e,n,r)=>{if(null!=e){var i=null==n?void 0:n[r];return null==i?{x:0,y:t.top}:{x:i,y:t.top}}}),a(jd,qv,(t,e)=>({width:"number"==typeof e.width?e.width:60,height:t.height}));var Ob=(t,e,n,r)=>{if(null!=n){var{allowDuplicatedCategory:i,type:o,dataKey:a}=n,s=fd(t,r),c=e.map(t=>t.value);return a&&s&&"category"===o&&i&&bs(c)?c:void 0}},Sb=a([yf,fm,Qv,Dv],Ob),Pb=(t,e,n,r)=>{if(null!=n&&null!=n.dataKey){var{type:i,scale:o}=n;return!fd(t,r)||"number"!==i&&"auto"===o?void 0:e.map(t=>t.value)}},Mb=a([yf,fm,Jv,Dv],Pb);a([yf,(t,e,n)=>{switch(e){case"xAxis":return Yv(t,n);case"yAxis":return qv(t,n);default:throw new Error("Unexpected axis type: ".concat(e))}},tb,pb,Sb,Mb,db,rb,Dv],(t,e,n,r,i,o,a,s,c)=>{if(null!=e){var l=fd(t,c);return{angle:e.angle,interval:e.interval,minTickGap:e.minTickGap,orientation:e.orientation,tick:e.tick,tickCount:e.tickCount,tickFormatter:e.tickFormatter,ticks:e.ticks,type:e.type,unit:e.unit,axisType:c,categoricalDomain:o,duplicateDomain:i,isCategorical:l,niceTicks:s,range:a,realScaleType:n,scale:r}}});a([yf,Jv,tb,pb,rb,db,Sb,Mb,Dv],(t,e,n,r,i,o,a,s,c)=>{if(null!=e&&null!=r){var l=fd(t,c),{type:u,ticks:h,tickCount:d}=e,f="scaleBand"===n&&"function"==typeof r.bandwidth?r.bandwidth()/2:2,p="category"===u&&r.bandwidth?r.bandwidth()/f:0;p="angleAxis"===c&&null!=o&&o.length>=2?2*hs(o[0]-o[1])*p:p;var g=h||i;return g?g.map((t,e)=>{var n=a?a.indexOf(t):t;return{index:e,coordinate:r(n)+p,value:t,offset:p}}).filter(t=>nf(t.coordinate)):l&&s?s.map((t,e)=>({coordinate:r(t)+p,value:t,index:e,offset:p})).filter(t=>nf(t.coordinate)):r.ticks?r.ticks(d).map(t=>({coordinate:r(t)+p,value:t,offset:p})):r.domain().map((t,e)=>({coordinate:r(t)+p,value:a?a[t]:t,index:e,offset:p}))}});a([yf,Jv,pb,db,Sb,Mb,Dv],(t,e,n,r,i,o,a)=>{if(null!=e&&null!=n&&null!=r&&r[0]!==r[1]){var s=fd(t,a),{tickCount:c}=e,l=0;return l="angleAxis"===a&&(null==r?void 0:r.length)>=2?2*hs(r[0]-r[1])*l:l,s&&o?o.map((t,e)=>({coordinate:n(t)+l,value:t,index:e,offset:l})):n.ticks?n.ticks(c).map(t=>({coordinate:n(t)+l,value:t,offset:l})):n.domain().map((t,e)=>({coordinate:n(t)+l,value:i?i[t]:t,index:e,offset:l}))}}),a(Qv,pb,(t,e)=>{if(null!=t&&null!=e)return Uv(Uv({},t),{},{scale:e})});var kb=a([Qv,tb,Qm,fb],eb);a((t,e,n)=>Zv(t,n),kb,(t,e)=>{if(null!=t&&null!=e)return Uv(Uv({},t),{},{scale:e})});var Eb=a([yf,Md,kd],(t,e,n)=>{switch(t){case"horizontal":return e.some(t=>t.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(t=>t.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),Ab=t=>t.options.defaultTooltipEventType,Cb=t=>t.options.validateTooltipEventTypes;function jb(t,e,n){if(null==t)return e;var r=t?"axis":"item";return null==n?e:n.includes(r)?r:e}function Ib(t,e){return jb(e,Ab(t),Cb(t))}var Db=(t,e)=>{var n,r=Number(e);if(!ds(r)&&null!=e)return r>=0?null==t||null===(n=t[r])||void 0===n?void 0:n.value:void 0},Tb={active:!1,index:null,dataKey:void 0,coordinate:void 0},Rb=wh({name:"tooltip",initialState:{itemInteraction:{click:Tb,hover:Tb},axisInteraction:{click:Tb,hover:Tb},keyboardInteraction:Tb,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},reducers:{addTooltipEntrySettings:{reducer(t,e){t.tooltipItemPayloads.push(e.payload)},prepare:hh()},replaceTooltipEntrySettings:{reducer(t,e){var{prev:n,next:r}=e.payload,i=Qu(t).tooltipItemPayloads.indexOf(n);i>-1&&(t.tooltipItemPayloads[i]=r)},prepare:hh()},removeTooltipEntrySettings:{reducer(t,e){var n=Qu(t).tooltipItemPayloads.indexOf(e.payload);n>-1&&t.tooltipItemPayloads.splice(n,1)},prepare:hh()},setTooltipSettingsState(t,e){t.settings=e.payload},setActiveMouseOverItemIndex(t,e){t.syncInteraction.active=!1,t.keyboardInteraction.active=!1,t.itemInteraction.hover.active=!0,t.itemInteraction.hover.index=e.payload.activeIndex,t.itemInteraction.hover.dataKey=e.payload.activeDataKey,t.itemInteraction.hover.coordinate=e.payload.activeCoordinate},mouseLeaveChart(t){t.itemInteraction.hover.active=!1,t.axisInteraction.hover.active=!1},mouseLeaveItem(t){t.itemInteraction.hover.active=!1},setActiveClickItemIndex(t,e){t.syncInteraction.active=!1,t.itemInteraction.click.active=!0,t.keyboardInteraction.active=!1,t.itemInteraction.click.index=e.payload.activeIndex,t.itemInteraction.click.dataKey=e.payload.activeDataKey,t.itemInteraction.click.coordinate=e.payload.activeCoordinate},setMouseOverAxisIndex(t,e){t.syncInteraction.active=!1,t.axisInteraction.hover.active=!0,t.keyboardInteraction.active=!1,t.axisInteraction.hover.index=e.payload.activeIndex,t.axisInteraction.hover.dataKey=e.payload.activeDataKey,t.axisInteraction.hover.coordinate=e.payload.activeCoordinate},setMouseClickAxisIndex(t,e){t.syncInteraction.active=!1,t.keyboardInteraction.active=!1,t.axisInteraction.click.active=!0,t.axisInteraction.click.index=e.payload.activeIndex,t.axisInteraction.click.dataKey=e.payload.activeDataKey,t.axisInteraction.click.coordinate=e.payload.activeCoordinate},setSyncInteraction(t,e){t.syncInteraction=e.payload},setKeyboardInteraction(t,e){t.keyboardInteraction.active=e.payload.active,t.keyboardInteraction.index=e.payload.activeIndex,t.keyboardInteraction.coordinate=e.payload.activeCoordinate,t.keyboardInteraction.dataKey=e.payload.activeDataKey}}}),{addTooltipEntrySettings:Lb,replaceTooltipEntrySettings:Bb,removeTooltipEntrySettings:Nb,setTooltipSettingsState:zb,setActiveMouseOverItemIndex:Fb,mouseLeaveItem:Vb,mouseLeaveChart:Wb,setActiveClickItemIndex:Ub,setMouseOverAxisIndex:Kb,setMouseClickAxisIndex:Hb,setSyncInteraction:$b,setKeyboardInteraction:Yb}=Rb.actions,Xb=Rb.reducer;function qb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Gb(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?qb(Object(n),!0).forEach(function(e){Zb(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qb(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Zb(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Qb=(t,e,n,r)=>{if(null==e)return Tb;var i=function(t,e,n){return"axis"===e?"click"===n?t.axisInteraction.click:t.axisInteraction.hover:"click"===n?t.itemInteraction.click:t.itemInteraction.hover}(t,e,n);if(null==i)return Tb;if(i.active)return i;if(t.keyboardInteraction.active)return t.keyboardInteraction;if(t.syncInteraction.active&&null!=t.syncInteraction.index)return t.syncInteraction;var o=!0===t.settings.active;if(null!=i.index){if(o)return Gb(Gb({},i),{},{active:!0})}else if(null!=r)return{active:!0,coordinate:void 0,dataKey:void 0,index:r};return Gb(Gb({},Tb),{},{coordinate:i.coordinate})};function Jb(t,e){var n=function(t){if("number"==typeof t)return Number.isFinite(t)?t:void 0;if(t instanceof Date){var e=t.valueOf();return Number.isFinite(e)?e:void 0}var n=Number(t);return Number.isFinite(n)?n:void 0}(t),r=e[0],i=e[1];if(void 0===n)return!1;var o=Math.min(r,i),a=Math.max(r,i);return n>=o&&n<=a}var tx=(t,e,n,r)=>{var i=null==t?void 0:t.index;if(null==i)return null;var o=Number(i);if(!nf(o))return i;var a=1/0;e.length>0&&(a=e.length-1);var s=Math.max(0,Math.min(o,a)),c=e[s];return null==c||function(t,e,n){if(null==n||null==e)return!0;var r=dd(t,e);return null==r||!ly(n)||Jb(r,n)}(c,n,r)?String(s):null},ex=(t,e,n,r,i,o,a,s)=>{if(null!=o&&null!=s){var c=a[0],l=null==c?void 0:s(c.positions,o);if(null!=l)return l;var u=null==i?void 0:i[Number(o)];if(u)return"horizontal"===n?{x:u.coordinate,y:(r.top+e)/2}:{x:(r.left+t)/2,y:u.coordinate}}},nx=(t,e,n,r)=>{return"axis"===e?t.tooltipItemPayloads:0===t.tooltipItemPayloads.length?[]:null==(i="hover"===n?t.itemInteraction.hover.dataKey:t.itemInteraction.click.dataKey)&&null!=r?[t.tooltipItemPayloads[0]]:t.tooltipItemPayloads.filter(t=>{var e;return(null===(e=t.settings)||void 0===e?void 0:e.dataKey)===i});var i},rx=t=>t.options.tooltipPayloadSearcher,ix=t=>t.tooltip;function ox(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function ax(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ox(Object(n),!0).forEach(function(e){sx(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ox(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function sx(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var cx=(t,e,n,r,i,o,a)=>{if(null!=e&&null!=o){var{chartData:s,computedData:c,dataStartIndex:l,dataEndIndex:u}=n;return t.reduce((t,n)=>{var h,d,f,{dataDefinedOnItem:p,settings:g}=n,y=function(t,e){return null!=t?t:e}(p,s),v=Array.isArray(y)?cd(y,l,u):y,m=null!==(h=null==g?void 0:g.dataKey)&&void 0!==h?h:r,b=null==g?void 0:g.nameKey;(d=r&&Array.isArray(v)&&!Array.isArray(v[0])&&"axis"===a?function(t,e,n){if(t&&t.length)return t.find(t=>t&&("function"==typeof e?e(t):us(t,e))===n)}(v,r,i):o(v,e,c,b),Array.isArray(d))?d.forEach(e=>{var n=ax(ax({},g),{},{name:e.name,unit:e.unit,color:void 0,fill:void 0});t.push(wd({tooltipEntrySettings:n,dataKey:e.dataKey,payload:e.payload,value:dd(e.payload,e.dataKey),name:e.name}))}):t.push(wd({tooltipEntrySettings:g,dataKey:m,payload:d,value:dd(d,m),name:null!==(f=dd(d,b))&&void 0!==f?f:null==g?void 0:g.name}));return t},[])}},lx=a([mm,yf,tm,ov,Fv],Jm),ux=a([t=>t.graphicalItems.cartesianItems,t=>t.graphicalItems.polarItems],(t,e)=>[...t,...e]),hx=a([Fv,Vv],em),dx=a([ux,mm,hx],rm,{memoizeOptions:{resultEqualityCheck:zv}}),fx=a([dx],t=>t.filter(Bv)),px=a([dx],cm,{memoizeOptions:{resultEqualityCheck:zv}}),gx=a([px,ay],um),yx=a([fx,ay,mm],Lv),vx=a([gx,mm,dx],dm),mx=a([mm],Pm),bx=a([mm],t=>t.allowDataOverflow),xx=a([mx,bx],hy),wx=a([dx],t=>t.filter(Bv)),_x=a([yx,wx,rv,iv],wm),Ox=a([_x,ay,Fv,xx],Om),Sx=a([dx],am),Px=a([gx,mm,Sx,Am,Fv],jm,{memoizeOptions:{resultEqualityCheck:Nv}}),Mx=a([Tm,Fv,Vv],Rm),kx=a([Mx,Fv],Vm),Ex=a([Bm,Fv,Vv],Rm),Ax=a([Ex,Fv],Um),Cx=a([zm,Fv,Vv],Rm),jx=a([Cx,Fv],Hm),Ix=a([kx,jx,Ax],Cm),Dx=a([mm,mx,xx,Ox,Px,Ix,yf,Fv],Xm),Tx=a([mm,yf,gx,vx,rv,Fv,Dx],Zm),Rx=a([Tx,mm,lx],nb),Lx=a([mm,Tx,Rx,Fv],ib),Bx=t=>{var e=Fv(t),n=Vv(t);return db(t,e,n,!1)},Nx=a([mm,Bx],bv),zx=a([mm,lx,Lx,Nx],eb),Fx=a([yf,vx,mm,Fv],Ob),Vx=a([yf,vx,mm,Fv],Pb),Wx=a([yf,mm,lx,zx,Bx,Fx,Vx,Fv],(t,e,n,r,i,o,a,s)=>{if(e){var{type:c}=e,l=fd(t,s);if(r){var u="scaleBand"===n&&r.bandwidth?r.bandwidth()/2:2,h="category"===c&&r.bandwidth?r.bandwidth()/u:0;return h="angleAxis"===s&&null!=i&&(null==i?void 0:i.length)>=2?2*hs(i[0]-i[1])*h:h,l&&a?a.map((t,e)=>({coordinate:r(t)+h,value:t,index:e,offset:h})):r.domain().map((t,e)=>({coordinate:r(t)+h,value:o?o[t]:t,index:e,offset:h}))}}}),Ux=a([Ab,Cb,t=>t.tooltip.settings],(t,e,n)=>jb(n.shared,t,e)),Kx=t=>t.tooltip.settings.trigger,Hx=t=>t.tooltip.settings.defaultIndex,$x=a([ix,Ux,Kx,Hx],Qb),Yx=a([$x,gx,bm,Tx],tx),Xx=a([Wx,Yx],Db),qx=a([$x],t=>{if(t)return t.dataKey}),Gx=a([ix,Ux,Kx,Hx],nx),Zx=a([_d,Od,yf,jd,Wx,Hx,Gx,rx],ex),Qx=a([$x,Zx],(t,e)=>null!=t&&t.coordinate?t.coordinate:e),Jx=a([$x],t=>t.active),tw=a([Gx,Yx,ay,bm,Xx,rx,Ux],cx);function ew(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function nw(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ew(Object(n),!0).forEach(function(e){rw(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ew(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function rw(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}a([tw],t=>{if(null!=t){var e=t.map(t=>t.payload).filter(t=>null!=t);return Array.from(new Set(e))}});var iw=()=>{var t=hl(mm),e=hl(Wx),n=hl(zx);return xd(t&&n?nw(nw({},t),{},{scale:n}):void 0,e)};function ow(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function aw(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ow(Object(n),!0).forEach(function(e){sw(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ow(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function sw(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var cw=(t,e,n,r,i)=>{var o,a=-1,s=null!==(o=null==e?void 0:e.length)&&void 0!==o?o:0;if(s<=1||null==t)return 0;if("angleAxis"===r&&null!=i&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var c=0;c<s;c++){var l=c>0?n[c-1].coordinate:n[s-1].coordinate,u=n[c].coordinate,h=c>=s-1?n[0].coordinate:n[c+1].coordinate,d=void 0;if(hs(u-l)!==hs(h-u)){var f=[];if(hs(h-u)===hs(i[1]-i[0])){d=h;var p=u+i[1]-i[0];f[0]=Math.min(p,(p+l)/2),f[1]=Math.max(p,(p+l)/2)}else{d=l;var g=h+i[1]-i[0];f[0]=Math.min(u,(g+u)/2),f[1]=Math.max(u,(g+u)/2)}var y=[Math.min(u,(d+u)/2),Math.max(u,(d+u)/2)];if(t>y[0]&&t<=y[1]||t>=f[0]&&t<=f[1]){({index:a}=n[c]);break}}else{var v=Math.min(l,h),m=Math.max(l,h);if(t>(v+u)/2&&t<=(m+u)/2){({index:a}=n[c]);break}}}else if(e)for(var b=0;b<s;b++)if(0===b&&t<=(e[b].coordinate+e[b+1].coordinate)/2||b>0&&b<s-1&&t>(e[b].coordinate+e[b-1].coordinate)/2&&t<=(e[b].coordinate+e[b+1].coordinate)/2||b===s-1&&t>(e[b].coordinate+e[b-1].coordinate)/2){({index:a}=e[b]);break}return a},lw=(t,e)=>e,uw=(t,e,n)=>n,hw=(t,e,n,r)=>r,dw=a(Wx,t=>Rl(t,t=>t.coordinate)),fw=a([ix,lw,uw,hw],Qb),pw=a([fw,gx,bm,Tx],tx),gw=a([ix,lw,uw,hw],nx),yw=a([_d,Od,yf,jd,Wx,hw,gw,rx],ex),vw=a([fw,yw],(t,e)=>{var n;return null!==(n=t.coordinate)&&void 0!==n?n:e}),mw=a([Wx,pw],Db),bw=a([gw,pw,ay,bm,mw,rx,lw],cx),xw=a([fw,pw],(t,e)=>({isActive:t.active&&null!=e,activeIndex:e})),ww=(t,e,n,r,i,o,a)=>{if(t&&r&&i&&o&&n){var s=zg(t,n);if(s){var c=((t,e)=>"centric"===e?t.angle:t.radius)(s,e),l=cw(c,a,o,r,i),u=((t,e,n,r)=>{var i=e.find(t=>t&&t.index===n);if(i){if("centric"===t){var o=i.coordinate,{radius:a}=r;return aw(aw(aw({},r),Lg(r.cx,r.cy,a,o)),{},{angle:o,radius:a})}var s=i.coordinate,{angle:c}=r;return aw(aw(aw({},r),Lg(r.cx,r.cy,s,c)),{},{angle:c,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}})(e,o,l,s);return{activeIndex:String(l),activeCoordinate:u}}}},_w=a(t=>t.zIndex.zIndexMap,(t,e)=>e,(t,e,n)=>n,(t,e,n)=>{if(null!=e){var r=t[e];if(null!=r)return n?r.panoramaElementId:r.elementId}});function Ow(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Sw(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ow(Object(n),!0).forEach(function(e){Pw(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ow(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Pw(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}a(t=>t.zIndex.zIndexMap,t=>{var e=Object.keys(t).map(t=>parseInt(t,10)).concat(Object.values(lv));return Array.from(new Set(e)).sort((t,e)=>t-e)},{memoizeOptions:{resultEqualityCheck:function(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}return!1}}});var Mw={zIndexMap:Object.values(lv).reduce((t,e)=>Sw(Sw({},t),{},{[e]:{elementId:void 0,panoramaElementId:void 0,consumers:0}}),{})},kw=new Set(Object.values(lv));var Ew=wh({name:"zIndex",initialState:Mw,reducers:{registerZIndexPortal:{reducer:(t,e)=>{var{zIndex:n}=e.payload;t.zIndexMap[n]?t.zIndexMap[n].consumers+=1:t.zIndexMap[n]={consumers:1,elementId:void 0,panoramaElementId:void 0}},prepare:hh()},unregisterZIndexPortal:{reducer:(t,e)=>{var{zIndex:n}=e.payload;t.zIndexMap[n]&&(t.zIndexMap[n].consumers-=1,t.zIndexMap[n].consumers<=0&&!function(t){return kw.has(t)}(n)&&delete t.zIndexMap[n])},prepare:hh()},registerZIndexPortalId:{reducer:(t,e)=>{var{zIndex:n,elementId:r,isPanorama:i}=e.payload;t.zIndexMap[n]?i?t.zIndexMap[n].panoramaElementId=r:t.zIndexMap[n].elementId=r:t.zIndexMap[n]={consumers:0,elementId:i?void 0:r,panoramaElementId:i?r:void 0}},prepare:hh()},unregisterZIndexPortalId:{reducer:(t,e)=>{var{zIndex:n}=e.payload;t.zIndexMap[n]&&(e.payload.isPanorama?t.zIndexMap[n].panoramaElementId=void 0:t.zIndexMap[n].elementId=void 0)},prepare:hh()}}}),{registerZIndexPortal:Aw,unregisterZIndexPortal:Cw,registerZIndexPortalId:jw,unregisterZIndexPortalId:Iw}=Ew.actions,Dw=Ew.reducer;function Tw(e){var{zIndex:r,children:i}=e,o=void 0!==vf()&&void 0!==r&&0!==r,a=zd(),s=sl();t.useLayoutEffect(()=>o?(s(Aw({zIndex:r})),()=>{s(Cw({zIndex:r}))}):Ss,[s,r,o]);var c=hl(t=>_w(t,r,a));if(!o)return i;if(!c)return null;var l=document.getElementById(c);return l?n.createPortal(i,l):null}function Rw(){return Rw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Rw.apply(null,arguments)}function Lw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Bw(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Lw(Object(n),!0).forEach(function(e){Nw(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lw(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Nw(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zw(e){var{cursor:n,cursorComp:r,cursorProps:i}=e;return t.isValidElement(n)?t.cloneElement(n,i):t.createElement(r,i)}function Fw(e){var n,r,o,a,{coordinate:s,payload:c,index:l,offset:u,tooltipAxisBandSize:h,layout:d,cursor:f,tooltipEventType:p,chartName:g}=e,y=s,v=c,m=l;if(!f||!y||"ScatterChart"!==g&&"axis"!==p)return null;if("ScatterChart"===g)r=y,o=Xp,a=lv.cursorLine;else if("BarChart"===g)r=function(t,e,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===t?e.x-i:n.left+.5,y:"horizontal"===t?n.top+.5:e.y-i,width:"horizontal"===t?r:n.width-1,height:"horizontal"===t?n.height-1:r}}(d,y,u,h),o=Cg,a=lv.cursorRectangle;else if("radial"===d&&Ps(y)){var{cx:b,cy:x,radius:w,startAngle:_,endAngle:O}=Fg(y);r={cx:b,cy:x,startAngle:_,endAngle:O,innerRadius:w,outerRadius:w},o=Hg,a=lv.cursorLine}else r={points:$g(d,y,u)},o=Wp,a=lv.cursorLine;var S="object"==typeof f&&"className"in f?f.className:void 0,P=Bw(Bw(Bw(Bw({stroke:"#ccc",pointerEvents:"none"},u),r),Ta(f)),{},{payload:v,payloadIndex:m,className:i("recharts-tooltip-cursor",S)});return t.createElement(Tw,{zIndex:null!==(n=e.zIndex)&&void 0!==n?n:a},t.createElement(zw,{cursor:f,cursorComp:o,cursorProps:P}))}function Vw(e){var n,r=iw(),i=null!==(n=hl(jd))&&void 0!==n?n:gf,o=vf(),a=hl(ov);return null==r||null==i||null==o||null==a?null:t.createElement(Fw,Rw({},e,{offset:i,layout:o,tooltipAxisBandSize:r,chartName:a}))}var Ww,Uw=t.createContext(null),Kw={exports:{}};var Hw=(Ww||(Ww=1,function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(t,e,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||t,a),c=n?n+e:e;return t._events[c]?t._events[c].fn?t._events[c]=[t._events[c],s]:t._events[c].push(s):(t._events[c]=s,t._eventsCount++),t}function a(t,e){0===--t._eventsCount?t._events=new r:delete t._events[e]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var t,r,i=[];if(0===this._eventsCount)return i;for(r in t=this._events)e.call(t,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},s.prototype.listeners=function(t){var e=n?n+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(t){var e=n?n+t:t,r=this._events[e];return r?r.fn?1:r.length:0},s.prototype.emit=function(t,e,r,i,o,a){var s=n?n+t:t;if(!this._events[s])return!1;var c,l,u=this._events[s],h=arguments.length;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),h){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,r),!0;case 4:return u.fn.call(u.context,e,r,i),!0;case 5:return u.fn.call(u.context,e,r,i,o),!0;case 6:return u.fn.call(u.context,e,r,i,o,a),!0}for(l=1,c=new Array(h-1);l<h;l++)c[l-1]=arguments[l];u.fn.apply(u.context,c)}else{var d,f=u.length;for(l=0;l<f;l++)switch(u[l].once&&this.removeListener(t,u[l].fn,void 0,!0),h){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,e);break;case 3:u[l].fn.call(u[l].context,e,r);break;case 4:u[l].fn.call(u[l].context,e,r,i);break;default:if(!c)for(d=1,c=new Array(h-1);d<h;d++)c[d-1]=arguments[d];u[l].fn.apply(u[l].context,c)}}return!0},s.prototype.on=function(t,e,n){return o(this,t,e,n,!1)},s.prototype.once=function(t,e,n){return o(this,t,e,n,!0)},s.prototype.removeListener=function(t,e,r,i){var o=n?n+t:t;if(!this._events[o])return this;if(!e)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var c=0,l=[],u=s.length;c<u;c++)(s[c].fn!==e||i&&!s[c].once||r&&s[c].context!==r)&&l.push(s[c]);l.length?this._events[o]=1===l.length?l[0]:l:a(this,o)}return this},s.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&a(this,e)):(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,t.exports=s}(Kw)),Kw.exports);var $w=new(e(Hw)),Yw="recharts.syncEvent.tooltip",Xw="recharts.syncEvent.brush",qw=wh({name:"options",initialState:{chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},reducers:{createEventEmitter:t=>{null==t.eventEmitter&&(t.eventEmitter=Symbol("rechartsEventEmitter"))}}}),Gw=qw.reducer,{createEventEmitter:Zw}=qw.actions;function Qw(t){return t.tooltip.syncInteraction}var Jw=wh({name:"chartData",initialState:{chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},reducers:{setChartData(t,e){if(t.chartData=e.payload,null==e.payload)return t.dataStartIndex=0,void(t.dataEndIndex=0);e.payload.length>0&&t.dataEndIndex!==e.payload.length-1&&(t.dataEndIndex=e.payload.length-1)},setComputedData(t,e){t.computedData=e.payload},setDataStartEndIndexes(t,e){var{startIndex:n,endIndex:r}=e.payload;null!=n&&(t.dataStartIndex=n),null!=r&&(t.dataEndIndex=r)}}}),{setChartData:t_,setDataStartEndIndexes:e_,setComputedData:n_}=Jw.actions,r_=Jw.reducer,i_=["x","y"];function o_(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function a_(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o_(Object(n),!0).forEach(function(e){s_(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o_(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function s_(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c_(){var e=hl(av),n=hl(cv),r=sl(),i=hl(sv),o=hl(Wx),a=vf(),s=pf(),c=hl(t=>t.rootProps.className);t.useEffect(()=>{if(null==e)return Ss;var t=(t,c,l)=>{var u;if(n!==l&&e===t)if("index"!==i){if(null!=o){var h;if("function"==typeof i){var d={activeTooltipIndex:null==c.payload.index?void 0:Number(c.payload.index),isTooltipActive:c.payload.active,activeIndex:null==c.payload.index?void 0:Number(c.payload.index),activeLabel:c.payload.label,activeDataKey:c.payload.dataKey,activeCoordinate:c.payload.coordinate},f=i(o,d);h=o[f]}else"value"===i&&(h=o.find(t=>String(t.value)===c.payload.label));var{coordinate:p}=c.payload;if(null!=h&&!1!==c.payload.active&&null!=p&&null!=s){var{x:g,y:y}=p,v=Math.min(g,s.x+s.width),m=Math.min(y,s.y+s.height),b={x:"horizontal"===a?h.coordinate:v,y:"horizontal"===a?m:h.coordinate},x=$b({active:c.payload.active,coordinate:b,dataKey:c.payload.dataKey,index:String(h.index),label:c.payload.label,sourceViewBox:c.payload.sourceViewBox});r(x)}else r($b({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0}))}}else if(s&&null!=c&&null!==(u=c.payload)&&void 0!==u&&u.coordinate&&c.payload.sourceViewBox){var w=c.payload.coordinate,{x:_,y:O}=w,S=function(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(w,i_),{x:P,y:M,width:k,height:E}=c.payload.sourceViewBox,A=a_(a_({},S),{},{x:s.x+(k?(_-P)/k:0)*s.width,y:s.y+(E?(O-M)/E:0)*s.height});r(a_(a_({},c),{},{payload:a_(a_({},c.payload),{},{coordinate:A})}))}else r(c)};return $w.on(Yw,t),()=>{$w.off(Yw,t)}},[c,r,n,e,i,o,a,s])}function l_(){var e=sl();t.useEffect(()=>{e(Zw())},[e]),c_(),function(){var e=hl(av),n=hl(cv),r=sl();t.useEffect(()=>{if(null==e)return Ss;var t=(t,i,o)=>{n!==o&&e===t&&r(e_(i))};return $w.on(Xw,t),()=>{$w.off(Xw,t)}},[r,n,e])}()}function u_(e,n,r,i,o,a){var s=hl(t=>((t,e,n)=>{if(null!=e){var r=ix(t);return"axis"===e?"hover"===n?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:"hover"===n?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}})(t,e,n)),c=hl(cv),l=hl(av),u=hl(sv),h=hl(Qw),d=null==h?void 0:h.active,f=pf();t.useEffect(()=>{if(!d&&null!=l&&null!=c){var t=$b({active:a,coordinate:r,dataKey:s,index:o,label:"number"==typeof i?String(i):i,sourceViewBox:f});$w.emit(Yw,l,t,c)}},[d,r,s,o,i,c,l,u,a,f])}function h_(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function d_(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h_(Object(n),!0).forEach(function(e){f_(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h_(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function f_(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p_(t){return t.dataKey}var g_=[],y_={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!jp,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function v_(e){var r,i,o=Es(e,y_),{active:a,allowEscapeViewBox:s,animationDuration:c,animationEasing:l,content:u,filterNull:h,isAnimationActive:d,offset:f,payloadUniqBy:p,position:g,reverseDirection:y,useTranslate3d:v,wrapperStyle:m,cursor:b,shared:x,trigger:w,defaultIndex:_,portal:O,axisId:S}=o,P=sl(),M="number"==typeof _?String(_):_;t.useEffect(()=>{P(zb({shared:x,trigger:w,axisId:S,active:a,defaultIndex:M}))},[P,x,w,S,a,M]);var k=pf(),E=(()=>{var t;return null===(t=hl(t=>t.rootProps.accessibilityLayer))||void 0===t||t})(),A=function(t){return hl(e=>Ib(e,t))}(x),{activeIndex:C,isActive:j}=null!==(r=hl(t=>xw(t,A,w,M)))&&void 0!==r?r:{},I=hl(t=>bw(t,A,w,M)),D=hl(t=>mw(t,A,w,M)),T=hl(t=>vw(t,A,w,M)),R=I,L=t.useContext(Uw),B=null!==(i=null!=a?a:j)&&void 0!==i&&i,[N,z]=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],[n,r]=t.useState({height:0,left:0,top:0,width:0}),i=t.useCallback(t=>{if(null!=t){var e=t.getBoundingClientRect(),i={height:e.height,left:e.left,top:e.top,width:e.width};(Math.abs(i.height-n.height)>1||Math.abs(i.left-n.left)>1||Math.abs(i.top-n.top)>1||Math.abs(i.width-n.width)>1)&&r({height:i.height,left:i.left,top:i.top,width:i.width})}},[n.width,n.height,n.top,n.left,...e]);return[n,i]}([R,B]),F="axis"===A?D:void 0;u_(A,w,T,F,C,B);var V=null!=O?O:L;if(null==V||null==k||null==A)return null;var W=null!=R?R:g_;B||(W=g_),h&&W.length&&(W=function(t,e,n){return!0===e?il(t,n):"function"==typeof e?il(t,e):t}(W.filter(t=>null!=t.value&&(!0!==t.hide||o.includeHidden)),p,p_));var U=W.length>0,K=t.createElement(Ap,{allowEscapeViewBox:s,animationDuration:c,animationEasing:l,isAnimationActive:d,active:B,coordinate:T,hasPayload:U,offset:f,position:g,reverseDirection:y,useTranslate3d:v,viewBox:k,wrapperStyle:m,lastBoundingBox:N,innerRef:z,hasPortalFromProps:Boolean(O)},function(e,n){return t.isValidElement(e)?t.cloneElement(e,n):"function"==typeof e?t.createElement(e,n):t.createElement(wp,n)}(u,d_(d_({},o),{},{payload:W,label:F,active:B,activeIndex:C,coordinate:T,accessibilityLayer:E})));return t.createElement(t.Fragment,null,n.createPortal(K,V),B&&t.createElement(Vw,{cursor:b,tooltipEventType:A,coordinate:T,payload:W,index:C}))}var m_,b_,x_,w_,__={},O_={};function S_(){return m_||(m_=1,t=O_,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.maxBy=function(t,e){if(0===t.length)return;let n=t[0],r=e(n);for(let i=1;i<t.length;i++){const o=t[i],a=e(o);a>r&&(r=a,n=o)}return n}),O_;var t}function P_(){return w_?x_:(w_=1,x_=(b_||(b_=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=S_(),n=Rs(),r=nl();t.maxBy=function(t,i){if(null!=t)return e.maxBy(Array.from(t),r.iteratee(i??n.identity))}}(__)),__).maxBy)}const M_=e(P_());var k_=wh({name:"polarAxis",initialState:{radiusAxis:{},angleAxis:{}},reducers:{addRadiusAxis(t,e){t.radiusAxis[e.payload.id]=e.payload},removeRadiusAxis(t,e){delete t.radiusAxis[e.payload.id]},addAngleAxis(t,e){t.angleAxis[e.payload.id]=e.payload},removeAngleAxis(t,e){delete t.angleAxis[e.payload.id]}}}),{addRadiusAxis:E_,removeRadiusAxis:A_,addAngleAxis:C_,removeAngleAxis:j_}=k_.actions,I_=k_.reducer;function D_(e){var{tooltipEntrySettings:n}=e,r=sl(),i=zd(),o=t.useRef(null);return t.useLayoutEffect(()=>{i||(null===o.current?r(Lb(n)):o.current!==n&&r(Bb({prev:o.current,next:n})),o.current=n)},[n,r,i]),t.useLayoutEffect(()=>()=>{o.current&&(r(Nb(o.current)),o.current=null)},[r]),null}var T_=wh({name:"graphicalItems",initialState:{cartesianItems:[],polarItems:[]},reducers:{addCartesianGraphicalItem:{reducer(t,e){t.cartesianItems.push(e.payload)},prepare:hh()},replaceCartesianGraphicalItem:{reducer(t,e){var{prev:n,next:r}=e.payload,i=Qu(t).cartesianItems.indexOf(n);i>-1&&(t.cartesianItems[i]=r)},prepare:hh()},removeCartesianGraphicalItem:{reducer(t,e){var n=Qu(t).cartesianItems.indexOf(e.payload);n>-1&&t.cartesianItems.splice(n,1)},prepare:hh()},addPolarGraphicalItem:{reducer(t,e){t.polarItems.push(e.payload)},prepare:hh()},removePolarGraphicalItem:{reducer(t,e){var n=Qu(t).polarItems.indexOf(e.payload);n>-1&&t.polarItems.splice(n,1)},prepare:hh()}}}),{addCartesianGraphicalItem:R_,replaceCartesianGraphicalItem:L_,removeCartesianGraphicalItem:B_,addPolarGraphicalItem:N_,removePolarGraphicalItem:z_}=T_.actions,F_=T_.reducer;function V_(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function W_(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?V_(Object(n),!0).forEach(function(e){U_(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):V_(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function U_(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var K_,H_,$_=wh({name:"cartesianAxis",initialState:{xAxis:{},yAxis:{},zAxis:{}},reducers:{addXAxis:{reducer(t,e){t.xAxis[e.payload.id]=e.payload},prepare:hh()},replaceXAxis:{reducer(t,e){var{prev:n,next:r}=e.payload;void 0!==t.xAxis[n.id]&&(n.id!==r.id&&delete t.xAxis[n.id],t.xAxis[r.id]=r)},prepare:hh()},removeXAxis:{reducer(t,e){delete t.xAxis[e.payload.id]},prepare:hh()},addYAxis:{reducer(t,e){t.yAxis[e.payload.id]=e.payload},prepare:hh()},replaceYAxis:{reducer(t,e){var{prev:n,next:r}=e.payload;void 0!==t.yAxis[n.id]&&(n.id!==r.id&&delete t.yAxis[n.id],t.yAxis[r.id]=r)},prepare:hh()},removeYAxis:{reducer(t,e){delete t.yAxis[e.payload.id]},prepare:hh()},addZAxis:{reducer(t,e){t.zAxis[e.payload.id]=e.payload},prepare:hh()},replaceZAxis:{reducer(t,e){var{prev:n,next:r}=e.payload;void 0!==t.zAxis[n.id]&&(n.id!==r.id&&delete t.zAxis[n.id],t.zAxis[r.id]=r)},prepare:hh()},removeZAxis:{reducer(t,e){delete t.zAxis[e.payload.id]},prepare:hh()},updateYAxisWidth(t,e){var{id:n,width:r}=e.payload,i=t.yAxis[n];if(i){var o=i.widthHistory||[];if(3===o.length&&o[0]===o[2]&&r===o[1]&&r!==i.width&&Math.abs(r-o[0])<=1)return;var a=[...o,r].slice(-3);t.yAxis[n]=W_(W_({},t.yAxis[n]),{},{width:r,widthHistory:a})}}}}),{addXAxis:Y_,replaceXAxis:X_,removeXAxis:q_,addYAxis:G_,replaceYAxis:Z_,removeYAxis:Q_,addZAxis:J_,replaceZAxis:tO,removeZAxis:eO,updateYAxisWidth:nO}=$_.actions,rO=$_.reducer,iO=wh({name:"errorBars",initialState:{},reducers:{addErrorBar:(t,e)=>{var{itemId:n,errorBar:r}=e.payload;t[n]||(t[n]=[]),t[n].push(r)},replaceErrorBar:(t,e)=>{var{itemId:n,prev:r,next:i}=e.payload;t[n]&&(t[n]=t[n].map(t=>t.dataKey===r.dataKey&&t.direction===r.direction?i:t))},removeErrorBar:(t,e)=>{var{itemId:n,errorBar:r}=e.payload;t[n]&&(t[n]=t[n].filter(t=>t.dataKey!==r.dataKey||t.direction!==r.direction))}}}),{addErrorBar:oO,replaceErrorBar:aO,removeErrorBar:sO}=iO.actions,cO=iO.reducer,lO={exports:{}},uO={};H_||(H_=1,lO.exports=function(){if(K_)return uO;K_=1;var t=r(),e="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},n=t.useSyncExternalStore,i=t.useRef,o=t.useEffect,a=t.useMemo,s=t.useDebugValue;return uO.useSyncExternalStoreWithSelector=function(t,r,c,l,u){var h=i(null);if(null===h.current){var d={hasValue:!1,value:null};h.current=d}else d=h.current;h=a(function(){function t(t){if(!o){if(o=!0,n=t,t=l(t),void 0!==u&&d.hasValue){var r=d.value;if(u(r,t))return i=r}return i=t}if(r=i,e(n,t))return r;var a=l(t);return void 0!==u&&u(r,a)?(n=t,r):(n=t,i=a)}var n,i,o=!1,a=void 0===c?null:c;return[function(){return t(r())},null===a?void 0:function(){return t(a())}]},[r,c,l,u]);var f=n(t,h[0],h[1]);return o(function(){d.hasValue=!0,d.value=f},[f]),s(f),f},uO}()),lO.exports;var hO={notify(){},get:()=>[]};var dO=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),fO=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),pO=(()=>dO||fO?t.useLayoutEffect:t.useEffect)(),gO=Symbol.for("react-redux-context"),yO="undefined"!=typeof globalThis?globalThis:{};function vO(){if(!t.createContext)return{};const e=yO[gO]??=new Map;let n=e.get(t.createContext);return n||(n=t.createContext(null),e.set(t.createContext,n)),n}var mO=vO();var bO=function(e){const{children:n,context:r,serverState:i,store:o}=e,a=t.useMemo(()=>{const t=function(t){let e,n=hO,r=0,i=!1;function o(){c.onStateChange&&c.onStateChange()}function a(){r++,e||(e=t.subscribe(o),n=function(){let t=null,e=null;return{clear(){t=null,e=null},notify(){(()=>{let e=t;for(;e;)e.callback(),e=e.next})()},get(){const e=[];let n=t;for(;n;)e.push(n),n=n.next;return e},subscribe(n){let r=!0;const i=e={callback:n,next:null,prev:e};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:e=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}())}function s(){r--,e&&0===r&&(e(),e=void 0,n.clear(),n=hO)}const c={addNestedSub:function(t){a();const e=n.subscribe(t);let r=!1;return()=>{r||(r=!0,e(),s())}},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:o,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,a())},tryUnsubscribe:function(){i&&(i=!1,s())},getListeners:()=>n};return c}(o);return{store:o,subscription:t,getServerState:i?()=>i:void 0}},[o,i]),s=t.useMemo(()=>o.getState(),[o]);pO(()=>{const{subscription:t}=a;return t.onStateChange=t.notifyNestedSubs,t.trySubscribe(),s!==o.getState()&&t.notifyNestedSubs(),()=>{t.tryUnsubscribe(),t.onStateChange=void 0}},[a,s]);const c=r||mO;return t.createElement(c.Provider,{value:a},n)},xO=e=>{var{computedData:n}=e,r=sl();return t.useEffect(()=>(r(n_(n)),()=>{r(t_(void 0))}),[n,r]),null},wO={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},_O=wh({name:"brush",initialState:wO,reducers:{setBrushSettings:(t,e)=>null==e.payload?wO:e.payload}}),{setBrushSettings:OO}=_O.actions,SO=_O.reducer,PO=wh({name:"referenceElements",initialState:{dots:[],areas:[],lines:[]},reducers:{addDot:(t,e)=>{t.dots.push(e.payload)},removeDot:(t,e)=>{var n=Qu(t).dots.findIndex(t=>t===e.payload);-1!==n&&t.dots.splice(n,1)},addArea:(t,e)=>{t.areas.push(e.payload)},removeArea:(t,e)=>{var n=Qu(t).areas.findIndex(t=>t===e.payload);-1!==n&&t.areas.splice(n,1)},addLine:(t,e)=>{t.lines.push(e.payload)},removeLine:(t,e)=>{var n=Qu(t).lines.findIndex(t=>t===e.payload);-1!==n&&t.lines.splice(n,1)}}}),{addDot:MO,removeDot:kO,addArea:EO,removeArea:AO,addLine:CO,removeLine:jO}=PO.actions,IO=PO.reducer,DO=a([(t,e)=>e,yf,Iv,Fv,Nx,Wx,dw,jd],(t,e,n,r,i,o,a,s)=>{if(t&&e&&r&&i&&o)return"horizontal"===e||"vertical"===e?((t,e,n,r,i,o,a)=>{if(t&&n&&r&&i&&function(t,e){var{chartX:n,chartY:r}=t;return n>=e.left&&n<=e.left+e.width&&r>=e.top&&r<=e.top+e.height}(t,a)){var s=((t,e)=>"horizontal"===e?t.chartX:"vertical"===e?t.chartY:void 0)(t,e),c=cw(s,o,i,n,r),l=((t,e,n,r)=>{var i=e.find(t=>t&&t.index===n);if(i){if("horizontal"===t)return{x:i.coordinate,y:r.chartY};if("vertical"===t)return{x:r.chartX,y:i.coordinate}}return{x:0,y:0}})(e,i,c,t);return{activeIndex:String(c),activeCoordinate:l}}})(t,e,r,i,o,a,s):ww(t,e,n,r,i,o,a)}),TO=t=>{var e=t.currentTarget.getBoundingClientRect(),n=e.width/t.currentTarget.offsetWidth,r=e.height/t.currentTarget.offsetHeight;return{chartX:Math.round((t.clientX-e.left)/n),chartY:Math.round((t.clientY-e.top)/r)}},RO=ah("mouseClick"),LO=td();LO.startListening({actionCreator:RO,effect:(t,e)=>{var n=t.payload,r=DO(e.getState(),TO(n));null!=(null==r?void 0:r.activeIndex)&&e.dispatch(Hb({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var BO=ah("mouseMove"),NO=td(),zO=null;NO.startListening({actionCreator:BO,effect:(t,e)=>{var n=t.payload;null!==zO&&cancelAnimationFrame(zO);var r=TO(n);zO=requestAnimationFrame(()=>{var t=e.getState();if("axis"===Ib(t,t.tooltip.settings.shared)){var n=DO(t,r);null!=(null==n?void 0:n.activeIndex)?e.dispatch(Kb({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate})):e.dispatch(Wb())}zO=null})}});var FO={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},VO=wh({name:"rootProps",initialState:FO,reducers:{updateOptions:(t,e)=>{var n;t.accessibilityLayer=e.payload.accessibilityLayer,t.barCategoryGap=e.payload.barCategoryGap,t.barGap=null!==(n=e.payload.barGap)&&void 0!==n?n:FO.barGap,t.barSize=e.payload.barSize,t.maxBarSize=e.payload.maxBarSize,t.stackOffset=e.payload.stackOffset,t.syncId=e.payload.syncId,t.syncMethod=e.payload.syncMethod,t.className=e.payload.className,t.baseValue=e.payload.baseValue,t.reverseStackOrder=e.payload.reverseStackOrder}}}),WO=VO.reducer,{updateOptions:UO}=VO.actions,KO=wh({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(t,e)=>e.payload}}),{updatePolarOptions:HO}=KO.actions,$O=KO.reducer,YO=ah("keyDown"),XO=ah("focus"),qO=td();qO.startListening({actionCreator:YO,effect:(t,e)=>{var n=e.getState();if(!1!==n.rootProps.accessibilityLayer){var{keyboardInteraction:r}=n.tooltip,i=t.payload;if("ArrowRight"===i||"ArrowLeft"===i||"Enter"===i){var o=tx(r,gx(n),bm(n),Tx(n)),a=null==o?-1:Number(o);if(Number.isFinite(a)&&!(a<0)){var s=Wx(n);if("Enter"!==i){var c=a+("ArrowRight"===i?1:-1)*("left-to-right"===Eb(n)?1:-1);if(!(null==s||c>=s.length||c<0)){var l=yw(n,"axis","hover",String(c));e.dispatch(Yb({active:!0,activeIndex:c.toString(),activeDataKey:void 0,activeCoordinate:l}))}}else{var u=yw(n,"axis","hover",String(r.index));e.dispatch(Yb({active:!r.active,activeIndex:r.index,activeDataKey:r.dataKey,activeCoordinate:u}))}}}}}}),qO.startListening({actionCreator:XO,effect:(t,e)=>{var n=e.getState();if(!1!==n.rootProps.accessibilityLayer){var{keyboardInteraction:r}=n.tooltip;if(!r.active&&null==r.index){var i=yw(n,"axis","hover",String("0"));e.dispatch(Yb({activeDataKey:void 0,active:!0,activeIndex:"0",activeCoordinate:i}))}}}});var GO=ah("externalEvent"),ZO=td(),QO=new Map;ZO.startListening({actionCreator:GO,effect:(t,e)=>{var{handler:n,reactEvent:r}=t.payload;if(null!=n){r.persist();var i=r.type,o=QO.get(i);void 0!==o&&cancelAnimationFrame(o);var a=requestAnimationFrame(()=>{try{var t=e.getState(),o={activeCoordinate:Qx(t),activeDataKey:qx(t),activeIndex:Yx(t),activeLabel:Xx(t),activeTooltipIndex:Yx(t),isTooltipActive:Jx(t)};n(o,r)}finally{QO.delete(i)}});QO.set(i,a)}}});var JO=a([ix],t=>t.tooltipItemPayloads),tS=a([JO,rx,(t,e,n)=>e,(t,e,n)=>n],(t,e,n,r)=>{var i=t.find(t=>t.settings.dataKey===r);if(null!=i){var{positions:o}=i;if(null!=o)return e(o,n)}}),eS=ah("touchMove"),nS=td();nS.startListening({actionCreator:eS,effect:(t,e)=>{var n=t.payload;if(null!=n.touches&&0!==n.touches.length){var r=e.getState(),i=Ib(r,r.tooltip.settings.shared);if("axis"===i){var o=DO(r,TO({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY,currentTarget:n.currentTarget}));null!=(null==o?void 0:o.activeIndex)&&e.dispatch(Kb({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if("item"===i){var a,s=n.touches[0];if(null==document.elementFromPoint)return;var c=document.elementFromPoint(s.clientX,s.clientY);if(!c||!c.getAttribute)return;var l=c.getAttribute("data-recharts-item-index"),u=null!==(a=c.getAttribute("data-recharts-item-data-key"))&&void 0!==a?a:void 0,h=tS(e.getState(),l,u);e.dispatch(Fb({activeDataKey:u,activeIndex:l,activeCoordinate:h}))}}}});var rS=Ul({brush:SO,cartesianAxis:rO,chartData:r_,errorBars:cO,graphicalItems:F_,layout:sd,legend:gp,options:Gw,polarAxis:I_,polarOptions:$O,referenceElements:IO,rootProps:WO,tooltip:Xb,zIndex:Dw});function iS(e){var{preloadedState:n,children:r,reduxStoreName:i}=e,o=zd(),a=t.useRef(null);if(o)return r;null==a.current&&(a.current=function(t){return ph({reducer:rS,preloadedState:t,middleware:t=>t({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes("es6")}).concat([LO.middleware,NO.middleware,qO.middleware,ZO.middleware,nS.middleware]),enhancers:t=>{var e=t;return"function"==typeof t&&(e=t()),e.concat(fh({type:"raf"}))},devTools:Cp})}(n));var s=ol;return t.createElement(bO,{context:s,store:a.current},r)}function oS(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function aS(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?oS(Object(n),!0).forEach(function(e){sS(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):oS(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function sS(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function cS(){return cS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},cS.apply(null,arguments)}var lS=()=>(l_(),null);function uS(t){if("number"==typeof t)return t;if("string"==typeof t){var e=parseFloat(t);if(!Number.isNaN(e))return e}return 0}var hS=t.forwardRef((e,n)=>{var r,i,o=t.useRef(null),[a,s]=t.useState({containerWidth:uS(null===(r=e.style)||void 0===r?void 0:r.width),containerHeight:uS(null===(i=e.style)||void 0===i?void 0:i.height)}),c=t.useCallback((t,e)=>{s(n=>{var r=Math.round(t),i=Math.round(e);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]),l=t.useCallback(t=>{if("function"==typeof n&&n(t),null!=t&&"undefined"!=typeof ResizeObserver){var{width:e,height:r}=t.getBoundingClientRect();c(e,r);var i=new ResizeObserver(t=>{var{width:e,height:n}=t[0].contentRect;c(e,n)});i.observe(t),o.current=i}},[n,c]);return t.useEffect(()=>()=>{var t=o.current;null!=t&&t.disconnect()},[c]),t.createElement(t.Fragment,null,t.createElement(mf,{width:a.containerWidth,height:a.containerHeight}),t.createElement("div",cS({ref:l},e)))}),dS=t.forwardRef((e,n)=>{var{width:r,height:i}=e,[o,a]=t.useState({containerWidth:uS(r),containerHeight:uS(i)}),s=t.useCallback((t,e)=>{a(n=>{var r=Math.round(t),i=Math.round(e);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]),c=t.useCallback(t=>{if("function"==typeof n&&n(t),null!=t){var{width:e,height:r}=t.getBoundingClientRect();s(e,r)}},[n,s]);return t.createElement(t.Fragment,null,t.createElement(mf,{width:o.containerWidth,height:o.containerHeight}),t.createElement("div",cS({ref:c},e)))}),fS=t.forwardRef((e,n)=>{var{width:r,height:i}=e;return t.createElement(t.Fragment,null,t.createElement(mf,{width:r,height:i}),t.createElement("div",cS({ref:n},e)))}),pS=t.forwardRef((e,n)=>{var{width:r,height:i}=e;return fs(r)||fs(i)?t.createElement(dS,cS({},e,{ref:n})):t.createElement(fS,cS({},e,{ref:n}))});var gS,yS,vS,mS=t.forwardRef((e,n)=>{var{children:r,className:o,height:a,onClick:s,onContextMenu:c,onDoubleClick:l,onMouseDown:u,onMouseEnter:h,onMouseLeave:d,onMouseMove:f,onMouseUp:p,onTouchEnd:g,onTouchMove:y,onTouchStart:v,style:m,width:b,responsive:x,dispatchTouchEvents:w=!0}=e,_=t.useRef(null),O=sl(),[S,P]=t.useState(null),[M,k]=t.useState(null),E=function(){var e=sl(),[n,r]=t.useState(null),i=hl(Sd);return t.useEffect(()=>{if(null!=n){var t=n.getBoundingClientRect().width/n.offsetWidth;nf(t)&&t!==i&&e(ad(t))}},[n,e,i]),r}(),A=hf(),C=(null==A?void 0:A.width)>0?A.width:b,j=(null==A?void 0:A.height)>0?A.height:a,I=t.useCallback(t=>{E(t),"function"==typeof n&&n(t),P(t),k(t),null!=t&&(_.current=t)},[E,n,P,k]),D=t.useCallback(t=>{O(RO(t)),O(GO({handler:s,reactEvent:t}))},[O,s]),T=t.useCallback(t=>{O(BO(t)),O(GO({handler:h,reactEvent:t}))},[O,h]),R=t.useCallback(t=>{O(Wb()),O(GO({handler:d,reactEvent:t}))},[O,d]),L=t.useCallback(t=>{O(BO(t)),O(GO({handler:f,reactEvent:t}))},[O,f]),B=t.useCallback(()=>{O(XO())},[O]),N=t.useCallback(t=>{O(YO(t.key))},[O]),z=t.useCallback(t=>{O(GO({handler:c,reactEvent:t}))},[O,c]),F=t.useCallback(t=>{O(GO({handler:l,reactEvent:t}))},[O,l]),V=t.useCallback(t=>{O(GO({handler:u,reactEvent:t}))},[O,u]),W=t.useCallback(t=>{O(GO({handler:p,reactEvent:t}))},[O,p]),U=t.useCallback(t=>{O(GO({handler:v,reactEvent:t}))},[O,v]),K=t.useCallback(t=>{w&&O(eS(t)),O(GO({handler:y,reactEvent:t}))},[O,w,y]),H=t.useCallback(t=>{O(GO({handler:g,reactEvent:t}))},[O,g]),$=function(t){return!0===t?hS:pS}(x);return t.createElement(Uw.Provider,{value:S},t.createElement(Ua.Provider,{value:M},t.createElement($,{width:null!=C?C:null==m?void 0:m.width,height:null!=j?j:null==m?void 0:m.height,className:i("recharts-wrapper",o),style:aS({position:"relative",cursor:"default",width:C,height:j},m),onClick:D,onContextMenu:z,onDoubleClick:F,onFocus:B,onKeyDown:N,onMouseDown:V,onMouseEnter:T,onMouseLeave:R,onMouseMove:L,onMouseUp:W,onTouchEnd:H,onTouchMove:K,onTouchStart:U,ref:I},t.createElement(lS,null),r)))}),bS={};function xS(){return vS||(vS=1,yS=(gS||(gS=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=nl();t.sumBy=function(t,n){if(!t||!t.length)return 0;let r;null!=n&&(n=e.iteratee(n));for(let e=0;e<t.length;e++){const i=n?n(t[e]):t[e];void 0!==i&&(void 0===r?r=i:r+=i)}return r}}(bS)),bS).sumBy),yS}const wS=e(xS());var _S=["sourceX","sourceY","sourceControlX","targetX","targetY","targetControlX","linkWidth"],OS=["className","style","children"];function SS(){return SS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},SS.apply(null,arguments)}function PS(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function MS(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function kS(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?MS(Object(n),!0).forEach(function(e){ES(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):MS(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ES(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var AS=t=>t.y+t.dy/2,CS=t=>t&&t.value||0,jS=(t,e)=>e.reduce((e,n)=>e+CS(t[n]),0),IS=(t,e,n)=>n.reduce((n,r)=>{var i=e[r],o=t[i.source];return n+AS(o)*CS(e[r])},0),DS=(t,e,n)=>n.reduce((n,r)=>{var i=e[r],o=t[i.target];return n+AS(o)*CS(e[r])},0),TS=(t,e)=>t.y-e.y,RS=(t,e)=>{for(var{targetNodes:n}=e,r=0,i=n.length;r<i;r++){var o=t[n[r]];o&&(o.depth=Math.max(e.depth+1,o.depth),RS(t,o))}},LS=function(t,e,n){for(var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=0,o=t.length;i<o;i++){var a=t[i],s=a.length;r&&a.sort(TS);for(var c=0,l=0;l<s;l++){var u=a[l],h=c-u.y;h>0&&(u.y+=h),c=u.y+u.dy+n}c=e+n;for(var d=s-1;d>=0;d--){var f=a[d],p=f.y+f.dy+n-c;if(!(p>0))break;f.y-=p,c=f.y}}},BS=(t,e,n,r)=>{for(var i=0,o=e.length;i<o;i++)for(var a=e[i],s=0,c=a.length;s<c;s++){var l=a[s];if(l.sourceLinks.length){var u=jS(n,l.sourceLinks),h=IS(t,n,l.sourceLinks)/u;l.y+=(h-AS(l))*r}}},NS=(t,e,n,r)=>{for(var i=e.length-1;i>=0;i--)for(var o=e[i],a=0,s=o.length;a<s;a++){var c=o[a];if(c.targetLinks.length){var l=jS(n,c.targetLinks),u=DS(t,n,c.targetLinks)/l;c.y+=(u-AS(c))*r}}},zS=t=>{var{data:e,width:n,height:r,iterations:i,nodeWidth:o,nodePadding:a,sort:s,verticalAlign:c,align:l}=t,{links:u}=e,{tree:h}=((t,e,n,r)=>{for(var i,o,{nodes:a,links:s}=t,c=a.map((t,e)=>{var n=((t,e)=>{for(var n=[],r=[],i=[],o=[],a=0,s=t.length;a<s;a++){var c=t[a];c.source===e&&(i.push(c.target),o.push(a)),c.target===e&&(n.push(c.source),r.push(a))}return{sourceNodes:n,sourceLinks:r,targetLinks:o,targetNodes:i}})(s,e);return kS(kS(kS({},t),n),{},{value:Math.max(jS(s,n.sourceLinks),jS(s,n.targetLinks)),depth:0})}),l=0,u=c.length;l<u;l++){var h=c[l];h.sourceNodes.length||RS(c,h)}var d=null!==(i=null===(o=M_(c,t=>t.depth))||void 0===o?void 0:o.depth)&&void 0!==i?i:0;if(d>=1)for(var f=(e-n)/d,p=0,g=c.length;p<g;p++){var y=c[p];y.targetNodes.length||"justify"===r&&(y.depth=d),y.x=y.depth*f,y.dx=n}return{tree:c,maxDepth:d}})(e,n,o,l),d=(t=>{for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];e[i.depth]||(e[i.depth]=[]),e[i.depth].push(i)}return e})(h),f=((t,e,n,r,i)=>{for(var o=Math.min(...t.map(t=>(e-(t.length-1)*n)/wS(t,CS))),a=0,s=t.length;a<s;a++){var c=t[a];if("top"===i)for(var l=0,u=0,h=c.length;u<h;u++){var d=c[u];d.dy=d.value*o,d.y=l,l+=d.dy+n}else for(var f=0,p=c.length;f<p;f++){var g=c[f];g.y=f,g.dy=g.value*o}}return r.map(t=>kS(kS({},t),{},{dy:CS(t)*o}))})(d,r,a,u,c);if(LS(d,r,a,s),"justify"===c)for(var p=1,g=1;g<=i;g++)NS(h,d,f,p*=.99),LS(d,r,a,s),BS(h,d,f,p),LS(d,r,a,s);return((t,e)=>{for(var n=0,r=t.length;n<r;n++){var i=t[n],o=0,a=0;i.targetLinks.sort((n,r)=>t[e[n].target].y-t[e[r].target].y),i.sourceLinks.sort((n,r)=>t[e[n].source].y-t[e[r].source].y);for(var s=0,c=i.targetLinks.length;s<c;s++){var l=e[i.targetLinks[s]];l&&(l.sy=o,o+=l.dy)}for(var u=0,h=i.sourceLinks.length;u<h;u++){var d=e[i.sourceLinks[u]];d&&(d.ty=a,a+=d.dy)}}})(h,f),{nodes:h,links:f}},FS={chartName:"Sankey",defaultTooltipEventType:"item",validateTooltipEventTypes:["item"],tooltipPayloadSearcher:(t,e,n,r)=>{if(null!=e&&"string"==typeof e){var i=e.split("-"),[o,a]=i,s=us(n,"".concat(o,"s[").concat(a,"]"));if(s){var c=((t,e,n)=>{var{payload:r}=t;if("node"===e)return{payload:r,name:dd(r,n,""),value:dd(r,"value")};if("source"in r&&r.source&&r.target){var i=dd(r.source,n,""),o=dd(r.target,n,"");return{payload:r,name:"".concat(i," - ").concat(o),value:dd(r,"value")}}})(s,o,r);return c}}},eventEmitter:void 0},VS=t.memo(e=>{var{dataKey:n,nameKey:r,stroke:i,strokeWidth:o,fill:a,name:s,data:c}=e,l={dataDefinedOnItem:c,positions:void 0,settings:{stroke:i,strokeWidth:o,fill:a,dataKey:n,name:s,nameKey:r,hide:!1,type:void 0,color:a,unit:""}};return t.createElement(D_,{tooltipEntrySettings:l})});function WS(e){var n,{props:r,i:i,linkContent:o,onMouseEnter:a,onMouseLeave:s,onClick:c,dataKey:l}=e,u="sourceX"in(n=r)?{x:(n.sourceX+n.targetX)/2,y:(n.sourceY+n.targetY)/2}:void 0,h="link-".concat(i),d=sl(),f={onMouseEnter:t=>{d(Fb({activeIndex:h,activeDataKey:l,activeCoordinate:u})),a(r,t)},onMouseLeave:t=>{d(Vb()),s(r,t)},onClick:t=>{d(Ub({activeIndex:h,activeDataKey:l,activeCoordinate:u})),c(r,t)}};return t.createElement(Wa,f,function(e,n){if(t.isValidElement(e))return t.cloneElement(e,n);if("function"==typeof e)return e(n);var{sourceX:r,sourceY:i,sourceControlX:o,targetX:a,targetY:s,targetControlX:c,linkWidth:l}=n,u=PS(n,_S);return t.createElement("path",SS({className:"recharts-sankey-link",d:"\n M".concat(r,",").concat(i,"\n C").concat(o,",").concat(i," ").concat(c,",").concat(s," ").concat(a,",").concat(s,"\n "),fill:"none",stroke:"#333",strokeWidth:l,strokeOpacity:"0.2"},Da(u)))}(o,r))}function US(e){var{modifiedLinks:n,links:r,linkContent:i,onMouseEnter:o,onMouseLeave:a,onClick:s,dataKey:c}=e;return t.createElement(Wa,{className:"recharts-sankey-links",key:"recharts-sankey-links"},r.map((e,r)=>{var l=n[r];return t.createElement(WS,{key:"link-".concat(e.source,"-").concat(e.target,"-").concat(e.value),props:l,linkContent:i,i:r,onMouseEnter:o,onMouseLeave:a,onClick:s,dataKey:c})}))}function KS(e){var n,{props:r,nodeContent:i,i:o,onMouseEnter:a,onMouseLeave:s,onClick:c,dataKey:l}=e,u=sl(),h={x:+(n=r).x+ +n.width/2,y:+n.y+ +n.height/2},d="node-".concat(o),f={onMouseEnter:t=>{u(Fb({activeIndex:d,activeDataKey:l,activeCoordinate:h})),a(r,t)},onMouseLeave:t=>{u(Vb()),s(r,t)},onClick:t=>{u(Ub({activeIndex:d,activeDataKey:l,activeCoordinate:h})),c(r,t)}};return t.createElement(Wa,f,function(e,n){return t.isValidElement(e)?t.cloneElement(e,n):"function"==typeof e?e(n):t.createElement(Cg,SS({className:"recharts-sankey-node",fill:"#0088fe",fillOpacity:"0.8"},Da(n)))}(i,r))}function HS(e){var{modifiedNodes:n,nodeContent:r,onMouseEnter:i,onMouseLeave:o,onClick:a,dataKey:s}=e;return t.createElement(Wa,{className:"recharts-sankey-nodes",key:"recharts-sankey-nodes"},n.map((e,n)=>t.createElement(KS,{key:"node-".concat(e.index,"-").concat(e.x,"-").concat(e.y),props:e,nodeContent:r,i:n,onMouseEnter:i,onMouseLeave:o,onClick:a,dataKey:s})))}var $S={nameKey:"name",dataKey:"value",nodePadding:10,nodeWidth:10,linkCurvature:.5,iterations:32,margin:{top:5,right:5,bottom:5,left:5},sort:!0,verticalAlign:"justify",align:"justify"};function YS(e){var{className:n,style:r,children:i}=e,o=PS(e,OS),{link:a,dataKey:s,node:c,onMouseEnter:l,onMouseLeave:u,onClick:h,data:d,iterations:f,nodeWidth:p,nodePadding:g,sort:y,linkCurvature:v,margin:m,verticalAlign:b,align:x}=e,w=Da(o),_=hl(_d),O=hl(Od),{links:S,modifiedLinks:P,modifiedNodes:M}=t.useMemo(()=>{var t,e,n,r;if(!d||!_||!O||_<=0||O<=0)return{nodes:[],links:[],modifiedLinks:[],modifiedNodes:[]};var i=_-(null!==(t=m.left)&&void 0!==t?t:0)-(null!==(e=m.right)&&void 0!==e?e:0),o=O-(null!==(n=m.top)&&void 0!==n?n:0)-(null!==(r=m.bottom)&&void 0!==r?r:0),s=zS({data:d,width:i,height:o,iterations:f,nodeWidth:p,nodePadding:g,sort:y,verticalAlign:b,align:x}),l=m.top||0,u=m.left||0,h=s.links.map((t,e)=>(t=>{var e,n,{link:r,nodes:i,left:o,top:a,i:s,linkContent:c,linkCurvature:l}=t,{sy:u,ty:h,dy:d}=r,f=i[r.source],p=i[r.target],g=f.x+f.dx+o,y=p.x+o,v=(n=y-(e=+g),t=>e+n*t),m=v(l),b=v(1-l);return kS({sourceX:g,targetX:y,sourceY:f.y+u+d/2+a,targetY:p.y+h+d/2+a,sourceControlX:m,targetControlX:b,sourceRelativeY:u,targetRelativeY:h,linkWidth:d,index:s,payload:kS(kS({},r),{},{source:f,target:p})},Ta(c))})({link:t,nodes:s.nodes,i:e,top:l,left:u,linkContent:a,linkCurvature:v})),w=s.nodes.map((t,e)=>(t=>{var{node:e,nodeContent:n,top:r,left:i,i:o}=t,{x:a,y:s,dx:c,dy:l}=e;return kS(kS({},Ta(n)),{},{x:a+i,y:s+r,width:c,height:l,index:o,payload:e})})({node:t,nodeContent:c,i:e,top:l,left:u}));return{nodes:s.nodes,links:s.links,modifiedLinks:h,modifiedNodes:w}},[d,_,O,m,f,p,g,y,a,c,v,x,b]),k=t.useCallback((t,e,n)=>{l&&l(t,e,n)},[l]),E=t.useCallback((t,e,n)=>{u&&u(t,e,n)},[u]),A=t.useCallback((t,e,n)=>{h&&h(t,e,n)},[h]);return rf(_)&&rf(O)&&d&&d.links&&d.nodes?t.createElement(t.Fragment,null,t.createElement(xO,{computedData:{links:P,nodes:M}}),t.createElement(Na,SS({},w,{width:_,height:O}),i,t.createElement(US,{links:S,modifiedLinks:P,linkContent:a,dataKey:s,onMouseEnter:(t,e)=>k(t,"link",e),onMouseLeave:(t,e)=>E(t,"link",e),onClick:(t,e)=>A(t,"link",e)}),t.createElement(HS,{modifiedNodes:M,nodeContent:c,dataKey:s,onMouseEnter:(t,e)=>k(t,"node",e),onMouseLeave:(t,e)=>E(t,"node",e),onClick:(t,e)=>A(t,"node",e)}))):null}function XS(e){var n=Es(e,$S),{width:r,height:i,style:o,className:a}=n,[s,c]=t.useState(null);return t.createElement(iS,{preloadedState:{options:FS},reduxStoreName:null!=a?a:"Sankey"},t.createElement(VS,{dataKey:n.dataKey,nameKey:n.nameKey,stroke:n.stroke,strokeWidth:n.strokeWidth,fill:n.fill,name:n.name,data:n.data}),t.createElement(mf,{width:r,height:i}),t.createElement(bf,{margin:n.margin}),t.createElement(mS,{className:a,style:o,width:r,height:i,responsive:!1,ref:t=>{t&&!s&&c(t)},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},t.createElement(Uw.Provider,{value:s},t.createElement(YS,n))))}XS.displayName="Sankey";export{ft as B,Do as C,ii as L,Ho as P,ff as R,ai as S,v_ as T,ni as a,Oa as b,ka as c,Qo as d,Uo as e,oa as f,XS as g,Wa as h,pt as i,Cg as j,xa as p};
1
+ import{r as t,g as e,c as n,d as r}from"./vendor-react-BuO7LJGJ.js";import{r as i}from"./vendor-mui-core-Boqnpf9f.js";import{w as o,c as a,s,a as c,b as l,d as u,e as h,f as d,g as f,h as p,i as g,j as y,k as v,l as m,m as b,n as x,o as w,p as _,q as O,r as S,t as P,u as M,v as k,x as E,y as A,z as C,A as I,B as j,C as D,D as T,E as R,F as L,G as B,H as N,I as z,J as F,K as V,L as W,M as U,N as K,O as H,P as $,Q as Y,R as X,S as q,T as G,U as Z,V as Q,W as J,X as tt,Y as et}from"./vendor-mui-x-CGSS6QHF.js";for(var nt={},rt={byteLength:function(t){var e=lt(t),n=e[0],r=e[1];return 3*(n+r)/4-r},toByteArray:function(t){var e,n,r=lt(t),i=r[0],o=r[1],a=new at(function(t,e,n){return 3*(e+n)/4-n}(0,i,o)),s=0,c=o>0?i-4:i;for(n=0;n<c;n+=4)e=ot[t.charCodeAt(n)]<<18|ot[t.charCodeAt(n+1)]<<12|ot[t.charCodeAt(n+2)]<<6|ot[t.charCodeAt(n+3)],a[s++]=e>>16&255,a[s++]=e>>8&255,a[s++]=255&e;2===o&&(e=ot[t.charCodeAt(n)]<<2|ot[t.charCodeAt(n+1)]>>4,a[s++]=255&e);1===o&&(e=ot[t.charCodeAt(n)]<<10|ot[t.charCodeAt(n+1)]<<4|ot[t.charCodeAt(n+2)]>>2,a[s++]=e>>8&255,a[s++]=255&e);return a},fromByteArray:function(t){for(var e,n=t.length,r=n%3,i=[],o=16383,a=0,s=n-r;a<s;a+=o)i.push(ht(t,a,a+o>s?s:a+o));1===r?(e=t[n-1],i.push(it[e>>2]+it[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],i.push(it[e>>10]+it[e>>4&63]+it[e<<2&63]+"="));return i.join("")}},it=[],ot=[],at="undefined"!=typeof Uint8Array?Uint8Array:Array,st="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ct=0;ct<64;++ct)it[ct]=st[ct],ot[st.charCodeAt(ct)]=ct;function lt(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function ut(t){return it[t>>18&63]+it[t>>12&63]+it[t>>6&63]+it[63&t]}function ht(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(ut(r));return i.join("")}ot["-".charCodeAt(0)]=62,ot["_".charCodeAt(0)]=63;var dt={read:function(t,e,n,r,i){var o,a,s=8*i-r-1,c=(1<<s)-1,l=c>>1,u=-7,h=n?i-1:0,d=n?-1:1,f=t[e+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=s;u>0;o=256*o+t[e+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+t[e+h],h+=d,u-=8);if(0===o)o=1-l;else{if(o===c)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=l}return(f?-1:1)*a*Math.pow(2,o-r)},write:function(t,e,n,r,i,o){var a,s,c,l=8*o-i-1,u=(1<<l)-1,h=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),(e+=a+h>=1?d/c:d*Math.pow(2,1-h))*c>=2&&(a++,c/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(e*c-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[n+f]=255&s,f+=p,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;t[n+f]=255&a,f+=p,a/=256,l-=8);t[n+f-p]|=128*g}};!function(t){const e=rt,n=dt,r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(t){+t!=t&&(t=0);return l.alloc(+t)},t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i;const{Uint8Array:o,ArrayBuffer:a,SharedArrayBuffer:s}=globalThis;function c(t){if(t>i)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new o(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return d(t)}return u(t,e,n)}function u(t,e,n){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|y(t,e);let r=c(n);const i=r.write(t,e);i!==n&&(r=r.slice(0,i));return r}(t,e);if(a.isView(t))return function(t){if(G(t,o)){const e=new o(t);return p(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(G(t,a)||t&&G(t.buffer,a))return p(t,e,n);if(void 0!==s&&(G(t,s)||t&&G(t.buffer,s)))return p(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return l.from(r,e,n);const i=function(t){if(l.isBuffer(t)){const e=0|g(t.length),n=c(e);return 0===n.length||t.copy(n,0,0,e),n}if(void 0!==t.length)return"number"!=typeof t.length||Z(t.length)?c(0):f(t);if("Buffer"===t.type&&Array.isArray(t.data))return f(t.data)}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function d(t){return h(t),c(t<0?0:0|g(t))}function f(t){const e=t.length<0?0:0|g(t.length),n=c(e);for(let r=0;r<e;r+=1)n[r]=255&t[r];return n}function p(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===e&&void 0===n?new o(t):void 0===n?new o(t,e):new o(t,e,n),Object.setPrototypeOf(r,l.prototype),r}function g(t){if(t>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function y(t,e){if(l.isBuffer(t))return t.length;if(a.isView(t)||G(t,a))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Y(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(t).length;default:if(i)return r?-1:Y(t).length;e=(""+e).toLowerCase(),i=!0}}function v(t,e,n){let r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,n);case"utf8":case"utf-8":return k(this,e,n);case"ascii":return A(this,e,n);case"latin1":case"binary":return C(this,e,n);case"base64":return M(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function b(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Z(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=l.from(e,r)),l.isBuffer(e))return 0===e.length?-1:x(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof o.prototype.indexOf?i?o.prototype.indexOf.call(t,e,n):o.prototype.lastIndexOf.call(t,e,n):x(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function x(t,e,n,r,i){let o,a=1,s=t.length,c=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,c/=2,n/=2}function l(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){let r=-1;for(o=n;o<s;o++)if(l(t,o)===l(e,-1===r?0:o-r)){if(-1===r&&(r=o),o-r+1===c)return r*a}else-1!==r&&(o-=o-r),r=-1}else for(n+c>s&&(n=s-c),o=n;o>=0;o--){let n=!0;for(let r=0;r<c;r++)if(l(t,o+r)!==l(e,r)){n=!1;break}if(n)return o}return-1}function w(t,e,n,r){n=Number(n)||0;const i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;const o=e.length;let a;for(r>o/2&&(r=o/2),a=0;a<r;++a){const r=parseInt(e.substr(2*a,2),16);if(Z(r))return a;t[n+a]=r}return a}function _(t,e,n,r){return q(Y(e,t.length-n),t,n,r)}function O(t,e,n,r){return q(function(t){const e=[];for(let n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function S(t,e,n,r){return q(X(e),t,n,r)}function P(t,e,n,r){return q(function(t,e){let n,r,i;const o=[];for(let a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function M(t,n,r){return 0===n&&r===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(n,r))}function k(t,e,n){n=Math.min(t.length,n);const r=[];let i=e;for(;i<n;){const e=t[i];let o=null,a=e>239?4:e>223?3:e>191?2:1;if(i+a<=n){let n,r,s,c;switch(a){case 1:e<128&&(o=e);break;case 2:n=t[i+1],128==(192&n)&&(c=(31&e)<<6|63&n,c>127&&(o=c));break;case 3:n=t[i+1],r=t[i+2],128==(192&n)&&128==(192&r)&&(c=(15&e)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:n=t[i+1],r=t[i+2],s=t[i+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&e)<<18|(63&n)<<12|(63&r)<<6|63&s,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(t){const e=t.length;if(e<=E)return String.fromCharCode.apply(String,t);let n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=E));return n}(r)}l.TYPED_ARRAY_SUPPORT=function(){try{const t=new o(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,o.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(t,e,n){return u(t,e,n)},Object.setPrototypeOf(l.prototype,o.prototype),Object.setPrototypeOf(l,o),l.alloc=function(t,e,n){return function(t,e,n){return h(t),t<=0?c(t):void 0!==e?"string"==typeof n?c(t).fill(e,n):c(t).fill(e):c(t)}(t,e,n)},l.allocUnsafe=function(t){return d(t)},l.allocUnsafeSlow=function(t){return d(t)},l.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==l.prototype},l.compare=function(t,e){if(G(t,o)&&(t=l.from(t,t.offset,t.byteLength)),G(e,o)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,r=e.length;for(let i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);let n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;const r=l.allocUnsafe(e);let i=0;for(n=0;n<t.length;++n){let e=t[n];if(G(e,o))i+e.length>r.length?(l.isBuffer(e)||(e=l.from(e)),e.copy(r,i)):o.prototype.set.call(r,e,i);else{if(!l.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(r,i)}i+=e.length}return r},l.byteLength=y,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)m(this,e,e+1);return this},l.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},l.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},l.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?k(this,0,t):v.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},r&&(l.prototype[r]=l.prototype.inspect),l.prototype.compare=function(t,e,n,r,i){if(G(t,o)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;let a=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0);const c=Math.min(a,s),u=this.slice(r,i),h=t.slice(e,n);for(let o=0;o<c;++o)if(u[o]!==h[o]){a=u[o],s=h[o];break}return a<s?-1:s<a?1:0},l.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},l.prototype.indexOf=function(t,e,n){return b(this,t,e,n,!0)},l.prototype.lastIndexOf=function(t,e,n){return b(this,t,e,n,!1)},l.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":case"latin1":case"binary":return O(this,t,e,n);case"base64":return S(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const E=4096;function A(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function C(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function I(t,e,n){const r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);let i="";for(let o=e;o<n;++o)i+=Q[t[o]];return i}function j(t,e,n){const r=t.slice(e,n);let i="";for(let o=0;o<r.length-1;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function D(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function T(t,e,n,r,i,o){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function R(t,e,n,r,i){U(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,n}function L(t,e,n,r,i){U(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n+7]=o,o>>=8,t[n+6]=o,o>>=8,t[n+5]=o,o>>=8,t[n+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=a,a>>=8,t[n+2]=a,a>>=8,t[n+1]=a,a>>=8,t[n]=a,n+8}function B(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(t,e,r,i,o){return e=+e,r>>>=0,o||B(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function z(t,e,r,i,o){return e=+e,r>>>=0,o||B(t,0,r,8),n.write(t,e,r,i,52,8),r+8}l.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);const r=this.subarray(t,e);return Object.setPrototypeOf(r,l.prototype),r},l.prototype.readUintLE=l.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||D(t,e,this.length);let r=this[t],i=1,o=0;for(;++o<e&&(i*=256);)r+=this[t+o]*i;return r},l.prototype.readUintBE=l.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||D(t,e,this.length);let r=this[t+--e],i=1;for(;e>0&&(i*=256);)r+=this[t+--e]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t>>>=0,e||D(t,1,this.length),this[t]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||D(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||D(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readBigUInt64LE=J(function(t){K(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))}),l.prototype.readBigUInt64BE=J(function(t){K(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),l.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||D(t,e,this.length);let r=this[t],i=1,o=0;for(;++o<e&&(i*=256);)r+=this[t+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},l.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||D(t,e,this.length);let r=e,i=1,o=this[t+--r];for(;r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},l.prototype.readInt8=function(t,e){return t>>>=0,e||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||D(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(t,e){t>>>=0,e||D(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return t>>>=0,e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readBigInt64LE=J(function(t){K(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)}),l.prototype.readBigInt64BE=J(function(t){K(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(r)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+n)}),l.prototype.readFloatLE=function(t,e){return t>>>=0,e||D(t,4,this.length),n.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||D(t,4,this.length),n.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||D(t,8,this.length),n.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||D(t,8,this.length),n.read(this,t,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e>>>=0,n>>>=0,!r){T(this,t,e,n,Math.pow(2,8*n)-1,0)}let i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(t,e,n,r){if(t=+t,e>>>=0,n>>>=0,!r){T(this,t,e,n,Math.pow(2,8*n)-1,0)}let i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigUInt64LE=J(function(t,e=0){return R(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=J(function(t,e=0){return L(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);T(this,t,e,n,r-1,-r)}let i=0,o=1,a=0;for(this[e]=255&t;++i<n&&(o*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/o|0)-a&255;return e+n},l.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);T(this,t,e,n,r-1,-r)}let i=n-1,o=1,a=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/o|0)-a&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigInt64LE=J(function(t,e=0){return R(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=J(function(t,e=0){return L(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeFloatLE=function(t,e,n){return N(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return N(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return z(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return z(this,t,e,!1,n)},l.prototype.copy=function(t,e,n,r){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);const i=r-n;return this===t&&"function"==typeof o.prototype.copyWithin?this.copyWithin(e,n,r):o.prototype.set.call(t,this.subarray(n,r),e),i},l.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){const e=t.charCodeAt(0);("utf8"===r&&e<128||"latin1"===r)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;let i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{const o=l.isBuffer(t)?t:l.from(t,r),a=o.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<n-e;++i)this[i+e]=o[i%a]}return this};const F={};function V(t,e,n){F[t]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function W(t){let e="",n=t.length;const r="-"===t[0]?1:0;for(;n>=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function U(t,e,n,r,i,o){if(t>n||t<e){const n="bigint"==typeof e?"n":"";let r;throw r=0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`,new F.ERR_OUT_OF_RANGE("value",r,t)}!function(t,e,n){K(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||H(e,t.length-(n+1))}(r,i,o)}function K(t,e){if("number"!=typeof t)throw new F.ERR_INVALID_ARG_TYPE(e,"number",t)}function H(t,e,n){if(Math.floor(t)!==t)throw K(t,n),new F.ERR_OUT_OF_RANGE("offset","an integer",t);if(e<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${e}`,t)}V("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),V("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),V("ERR_OUT_OF_RANGE",function(t,e,n){let r=`The value of "${t}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=W(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=W(i)),i+="n"),r+=` It must be ${e}. Received ${i}`,r},RangeError);const $=/[^+/0-9A-Za-z-_]/g;function Y(t,e){let n;e=e||1/0;const r=t.length;let i=null;const o=[];for(let a=0;a<r;++a){if(n=t.charCodeAt(a),n>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function X(t){return e.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace($,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,n,r){let i;for(i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function G(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Z(t){return t!=t}const Q=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)e[r+i]=t[n]+t[i]}return e}();function J(t){return"undefined"==typeof BigInt?tt:t}function tt(){throw new Error("BigInt not supported")}}(nt);const ft=nt.Buffer;function pt(t,e){if(!t)throw new Error("Invariant failed")}function gt(t){return t+.5|0}const yt=(t,e,n)=>Math.max(Math.min(t,n),e);function vt(t){return yt(gt(2.55*t),0,255)}function mt(t){return yt(gt(255*t),0,255)}function bt(t){return yt(gt(t/2.55)/100,0,1)}function xt(t){return yt(gt(100*t),0,100)}const wt={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},_t=[..."0123456789ABCDEF"],Ot=t=>_t[15&t],St=t=>_t[(240&t)>>4]+_t[15&t],Pt=t=>(240&t)>>4==(15&t);function Mt(t){var e=(t=>Pt(t.r)&&Pt(t.g)&&Pt(t.b)&&Pt(t.a))(t)?Ot:St;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const kt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Et(t,e,n){const r=e*Math.min(n,1-n),i=(e,i=(e+t/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return[i(0),i(8),i(4)]}function At(t,e,n){const r=(r,i=(r+t/60)%6)=>n-n*e*Math.max(Math.min(i,4-i,1),0);return[r(5),r(3),r(1)]}function Ct(t,e,n){const r=Et(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)r[i]*=1-e-n,r[i]+=e;return r}function It(t){const e=t.r/255,n=t.g/255,r=t.b/255,i=Math.max(e,n,r),o=Math.min(e,n,r),a=(i+o)/2;let s,c,l;return i!==o&&(l=i-o,c=a>.5?l/(2-i-o):l/(i+o),s=function(t,e,n,r,i){return t===i?(e-n)/r+(e<n?6:0):e===i?(n-t)/r+2:(t-e)/r+4}(e,n,r,l,i),s=60*s+.5),[0|s,c||0,a]}function jt(t,e,n,r){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,r)).map(mt)}function Dt(t,e,n){return jt(Et,t,e,n)}function Tt(t){return(t%360+360)%360}function Rt(t){const e=kt.exec(t);let n,r=255;if(!e)return;e[5]!==n&&(r=e[6]?vt(+e[5]):mt(+e[5]));const i=Tt(+e[2]),o=+e[3]/100,a=+e[4]/100;return n="hwb"===e[1]?function(t,e,n){return jt(Ct,t,e,n)}(i,o,a):"hsv"===e[1]?function(t,e,n){return jt(At,t,e,n)}(i,o,a):Dt(i,o,a),{r:n[0],g:n[1],b:n[2],a:r}}const Lt={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"},Bt={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"};let Nt;function zt(t){Nt||(Nt=function(){const t={},e=Object.keys(Bt),n=Object.keys(Lt);let r,i,o,a,s;for(r=0;r<e.length;r++){for(a=s=e[r],i=0;i<n.length;i++)o=n[i],s=s.replace(o,Lt[o]);o=parseInt(Bt[a],16),t[s]=[o>>16&255,o>>8&255,255&o]}return t}(),Nt.transparent=[0,0,0,0]);const e=Nt[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const Ft=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Vt=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Wt=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Ut(t,e,n){if(t){let r=It(t);r[e]=Math.max(0,Math.min(r[e]+r[e]*n,0===e?360:1)),r=Dt(r),t.r=r[0],t.g=r[1],t.b=r[2]}}function Kt(t,e){return t?Object.assign(e||{},t):t}function Ht(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=mt(t[3]))):(e=Kt(t,{r:0,g:0,b:0,a:1})).a=mt(e.a),e}function $t(t){return"r"===t.charAt(0)?function(t){const e=Ft.exec(t);let n,r,i,o=255;if(e){if(e[7]!==n){const t=+e[7];o=e[8]?vt(t):yt(255*t,0,255)}return n=+e[1],r=+e[3],i=+e[5],n=255&(e[2]?vt(n):yt(n,0,255)),r=255&(e[4]?vt(r):yt(r,0,255)),i=255&(e[6]?vt(i):yt(i,0,255)),{r:n,g:r,b:i,a:o}}}(t):Rt(t)}class Yt{constructor(t){if(t instanceof Yt)return t;const e=typeof t;let n;"object"===e?n=Ht(t):"string"===e&&(n=function(t){var e,n=t.length;return"#"===t[0]&&(4===n||5===n?e={r:255&17*wt[t[1]],g:255&17*wt[t[2]],b:255&17*wt[t[3]],a:5===n?17*wt[t[4]]:255}:7!==n&&9!==n||(e={r:wt[t[1]]<<4|wt[t[2]],g:wt[t[3]]<<4|wt[t[4]],b:wt[t[5]]<<4|wt[t[6]],a:9===n?wt[t[7]]<<4|wt[t[8]]:255})),e}(t)||zt(t)||$t(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=Kt(this._rgb);return t&&(t.a=bt(t.a)),t}set rgb(t){this._rgb=Ht(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${bt(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?Mt(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=It(t),n=e[0],r=xt(e[1]),i=xt(e[2]);return t.a<255?`hsla(${n}, ${r}%, ${i}%, ${bt(t.a)})`:`hsl(${n}, ${r}%, ${i}%)`}(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,r=t.rgb;let i;const o=e===i?.5:e,a=2*o-1,s=n.a-r.a,c=((a*s===-1?a:(a+s)/(1+a*s))+1)/2;i=1-c,n.r=255&c*n.r+i*r.r+.5,n.g=255&c*n.g+i*r.g+.5,n.b=255&c*n.b+i*r.b+.5,n.a=o*n.a+(1-o)*r.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,n){const r=Wt(bt(t.r)),i=Wt(bt(t.g)),o=Wt(bt(t.b));return{r:mt(Vt(r+n*(Wt(bt(e.r))-r))),g:mt(Vt(i+n*(Wt(bt(e.g))-i))),b:mt(Vt(o+n*(Wt(bt(e.b))-o))),a:t.a+n*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new Yt(this.rgb)}alpha(t){return this._rgb.a=mt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=gt(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.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 Ut(this._rgb,2,t),this}darken(t){return Ut(this._rgb,2,-t),this}saturate(t){return Ut(this._rgb,1,t),this}desaturate(t){return Ut(this._rgb,1,-t),this}rotate(t){return function(t,e){var n=It(t);n[0]=Tt(n[0]+e),n=Dt(n),t.r=n[0],t.g=n[1],t.b=n[2]}(this._rgb,t),this}}function Xt(){}const qt=(()=>{let t=0;return()=>t++})();function Gt(t){return null==t}function Zt(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function Qt(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function Jt(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function te(t,e){return Jt(t)?t:e}function ee(t,e){return void 0===t?e:t}const ne=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function re(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)}function ie(t,e,n,r){let i,o,a;if(Zt(t))for(o=t.length,i=0;i<o;i++)e.call(n,t[i],i);else if(Qt(t))for(a=Object.keys(t),o=a.length,i=0;i<o;i++)e.call(n,t[a[i]],a[i])}function oe(t,e){let n,r,i,o;if(!t||!e||t.length!==e.length)return!1;for(n=0,r=t.length;n<r;++n)if(i=t[n],o=e[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function ae(t){if(Zt(t))return t.map(ae);if(Qt(t)){const e=Object.create(null),n=Object.keys(t),r=n.length;let i=0;for(;i<r;++i)e[n[i]]=ae(t[n[i]]);return e}return t}function se(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function ce(t,e,n,r){if(!se(t))return;const i=e[t],o=n[t];Qt(i)&&Qt(o)?le(i,o,r):e[t]=ae(o)}function le(t,e,n){const r=Zt(e)?e:[e],i=r.length;if(!Qt(t))return t;const o=(n=n||{}).merger||ce;let a;for(let s=0;s<i;++s){if(a=r[s],!Qt(a))continue;const e=Object.keys(a);for(let r=0,i=e.length;r<i;++r)o(e[r],t,a,n)}return t}function ue(t,e){return le(t,e,{merger:he})}function he(t,e,n){if(!se(t))return;const r=e[t],i=n[t];Qt(r)&&Qt(i)?ue(r,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=ae(i))}const de={"":t=>t,x:t=>t.x,y:t=>t.y};function fe(t,e){const n=de[e]||(de[e]=function(t){const e=function(t){const e=t.split("."),n=[];let r="";for(const i of e)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}(t);return t=>{for(const n of e){if(""===n)break;t=t&&t[n]}return t}}(e));return n(t)}function pe(t){return t.charAt(0).toUpperCase()+t.slice(1)}const ge=t=>void 0!==t,ye=t=>"function"==typeof t,ve=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};const me=Math.PI,be=2*me,xe=be+me,we=Number.POSITIVE_INFINITY,_e=me/180,Oe=me/2,Se=me/4,Pe=2*me/3,Me=Math.log10,ke=Math.sign;function Ee(t,e,n){return Math.abs(t-e)<n}function Ae(t){const e=Math.round(t);t=Ee(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(Me(t))),r=t/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function Ce(t){return!function(t){return"symbol"==typeof t||"object"==typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function Ie(t){return t*(me/180)}function je(t){if(!Jt(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function De(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Te(t,e){return(t-e+xe)%be-me}function Re(t){return(t%be+be)%be}function Le(t,e,n,r){const i=Re(t),o=Re(e),a=Re(n),s=Re(o-i),c=Re(a-i),l=Re(i-o),u=Re(i-a);return i===o||i===a||r&&o===a||s>c&&l<u}function Be(t,e,n){return Math.max(e,Math.min(n,t))}function Ne(t,e,n,r=1e-6){return t>=Math.min(e,n)-r&&t<=Math.max(e,n)+r}function ze(t,e,n){n=n||(n=>t[n]<e);let r,i=t.length-1,o=0;for(;i-o>1;)r=o+i>>1,n(r)?o=r:i=r;return{lo:o,hi:i}}const Fe=(t,e,n,r)=>ze(t,n,r?r=>{const i=t[r][e];return i<n||i===n&&t[r+1][e]===n}:r=>t[r][e]<n),Ve=(t,e,n)=>ze(t,n,r=>t[r][e]>=n);const We=["push","pop","shift","splice","unshift"];function Ue(t,e){const n=t._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(e);-1!==i&&r.splice(i,1),r.length>0||(We.forEach(e=>{delete t[e]}),delete t._chartjs)}function Ke(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const He="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function $e(t,e){let n=[],r=!1;return function(...i){n=i,r||(r=!0,He.call(window,()=>{r=!1,t.apply(e,n)}))}}const Ye=(t,e,n)=>"start"===t?e:"end"===t?n:(e+n)/2;function Xe(t,e,n){const r=e.length;let i=0,o=r;if(t._sorted){const{iScale:a,vScale:s,_parsed:c}=t,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,u=a.axis,{min:h,max:d,minDefined:f,maxDefined:p}=a.getUserBounds();if(f){if(i=Math.min(Fe(c,u,h).lo,n?r:Fe(e,u,a.getPixelForValue(h)).lo),l){const t=c.slice(0,i+1).reverse().findIndex(t=>!Gt(t[s.axis]));i-=Math.max(0,t)}i=Be(i,0,r-1)}if(p){let t=Math.max(Fe(c,a.axis,d,!0).hi+1,n?0:Fe(e,u,a.getPixelForValue(d),!0).hi+1);if(l){const e=c.slice(t-1).findIndex(t=>!Gt(t[s.axis]));t+=Math.max(0,e)}o=Be(t,i,r)-i}else o=r-i}return{start:i,count:o}}function qe(t){const{xScale:e,yScale:n,_scaleRanges:r}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!r)return t._scaleRanges=i,!0;const o=r.xmin!==e.min||r.xmax!==e.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const Ge=t=>0===t||1===t,Ze=(t,e,n)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*be/n),Qe=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*be/n)+1,Je={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*Oe),easeOutSine:t=>Math.sin(t*Oe),easeInOutSine:t=>-.5*(Math.cos(me*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>Ge(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Ge(t)?t:Ze(t,.075,.3),easeOutElastic:t=>Ge(t)?t:Qe(t,.075,.3),easeInOutElastic(t){const e=.1125;return Ge(t)?t:t<.5?.5*Ze(2*t,e,.45):.5+.5*Qe(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Je.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},easeInOutBounce:t=>t<.5?.5*Je.easeInBounce(2*t):.5*Je.easeOutBounce(2*t-1)+.5};function tn(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function en(t){return tn(t)?t:new Yt(t)}function nn(t){return tn(t)?t:new Yt(t).saturate(.5).darken(.1).hexString()}const rn=["x","y","borderWidth","radius","tension"],on=["color","borderColor","backgroundColor"];const an=new Map;function sn(t,e,n){return function(t,e){e=e||{};const n=t+JSON.stringify(e);let r=an.get(n);return r||(r=new Intl.NumberFormat(t,e),an.set(n,r)),r}(e,n).format(t)}var cn={formatters:{values:t=>Zt(t)?t:""+t,numeric(t,e,n){if(0===t)return"0";const r=this.chart.options.locale;let i,o=t;if(n.length>1){const e=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(e<1e-4||e>1e15)&&(i="scientific"),o=function(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t));return n}(t,n)}const a=Me(Math.abs(o)),s=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),c={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(c,this.options.ticks.format),sn(t,r,c)}}};const ln=Object.create(null),un=Object.create(null);function hn(t,e){if(!e)return t;const n=e.split(".");for(let r=0,i=n.length;r<i;++r){const e=n[r];t=t[e]||(t[e]=Object.create(null))}return t}function dn(t,e,n){return"string"==typeof e?le(hn(t,e),n):le(hn(t,""),e)}class fn{constructor(t,e){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=t=>t.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=(t,e)=>nn(e.backgroundColor),this.hoverBorderColor=(t,e)=>nn(e.borderColor),this.hoverColor=(t,e)=>nn(e.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(e)}set(t,e){return dn(this,t,e)}get(t){return hn(this,t)}describe(t,e){return dn(un,t,e)}override(t,e){return dn(ln,t,e)}route(t,e,n,r){const i=hn(this,t),o=hn(this,n),a="_"+e;Object.defineProperties(i,{[a]:{value:i[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=o[r];return Qt(t)?Object.assign({},e,t):ee(t,e)},set(t){this[a]=t}}})}apply(t){t.forEach(t=>t(this))}}var pn=new fn({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:on},numbers:{type:"number",properties:rn}}),t.describe("animations",{_fallback:"animation"}),t.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=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.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,e)=>e.lineWidth,tickColor:(t,e)=>e.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:cn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function gn(t,e,n,r,i){let o=e[i];return o||(o=e[i]=t.measureText(i).width,n.push(i)),o>r&&(r=o),r}function yn(t,e,n){const r=t.currentDevicePixelRatio,i=0!==n?Math.max(n/2,.5):0;return Math.round((e-i)*r)/r+i}function vn(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function mn(t,e,n,r){!function(t,e,n,r){let i,o,a,s,c,l,u,h;const d=e.pointStyle,f=e.rotation,p=e.radius;let g=(f||0)*_e;if(d&&"object"==typeof d&&(i=d.toString(),"[object HTMLImageElement]"===i||"[object HTMLCanvasElement]"===i))return t.save(),t.translate(n,r),t.rotate(g),t.drawImage(d,-d.width/2,-d.height/2,d.width,d.height),void t.restore();if(isNaN(p)||p<=0)return;switch(t.beginPath(),d){default:t.arc(n,r,p,0,be),t.closePath();break;case"triangle":l=p,t.moveTo(n+Math.sin(g)*l,r-Math.cos(g)*p),g+=Pe,t.lineTo(n+Math.sin(g)*l,r-Math.cos(g)*p),g+=Pe,t.lineTo(n+Math.sin(g)*l,r-Math.cos(g)*p),t.closePath();break;case"rectRounded":c=.516*p,s=p-c,o=Math.cos(g+Se)*s,u=Math.cos(g+Se)*s,a=Math.sin(g+Se)*s,h=Math.sin(g+Se)*s,t.arc(n-u,r-a,c,g-me,g-Oe),t.arc(n+h,r-o,c,g-Oe,g),t.arc(n+u,r+a,c,g,g+Oe),t.arc(n-h,r+o,c,g+Oe,g+me),t.closePath();break;case"rect":if(!f){s=Math.SQRT1_2*p,l=s,t.rect(n-l,r-s,2*l,2*s);break}g+=Se;case"rectRot":u=Math.cos(g)*p,o=Math.cos(g)*p,a=Math.sin(g)*p,h=Math.sin(g)*p,t.moveTo(n-u,r-a),t.lineTo(n+h,r-o),t.lineTo(n+u,r+a),t.lineTo(n-h,r+o),t.closePath();break;case"crossRot":g+=Se;case"cross":u=Math.cos(g)*p,o=Math.cos(g)*p,a=Math.sin(g)*p,h=Math.sin(g)*p,t.moveTo(n-u,r-a),t.lineTo(n+u,r+a),t.moveTo(n+h,r-o),t.lineTo(n-h,r+o);break;case"star":u=Math.cos(g)*p,o=Math.cos(g)*p,a=Math.sin(g)*p,h=Math.sin(g)*p,t.moveTo(n-u,r-a),t.lineTo(n+u,r+a),t.moveTo(n+h,r-o),t.lineTo(n-h,r+o),g+=Se,u=Math.cos(g)*p,o=Math.cos(g)*p,a=Math.sin(g)*p,h=Math.sin(g)*p,t.moveTo(n-u,r-a),t.lineTo(n+u,r+a),t.moveTo(n+h,r-o),t.lineTo(n-h,r+o);break;case"line":o=Math.cos(g)*p,a=Math.sin(g)*p,t.moveTo(n-o,r-a),t.lineTo(n+o,r+a);break;case"dash":t.moveTo(n,r),t.lineTo(n+Math.cos(g)*p,r+Math.sin(g)*p);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}(t,e,n,r)}function bn(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function xn(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function wn(t){t.restore()}function _n(t,e,n,r,i){if(!e)return t.lineTo(n.x,n.y);if("middle"===i){const r=(e.x+n.x)/2;t.lineTo(r,e.y),t.lineTo(r,n.y)}else"after"===i!=!!r?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function On(t,e,n,r){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(r?e.cp1x:e.cp2x,r?e.cp1y:e.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function Sn(t,e,n,r,i){if(i.strikethrough||i.underline){const o=t.measureText(r),a=e-o.actualBoundingBoxLeft,s=e+o.actualBoundingBoxRight,c=n-o.actualBoundingBoxAscent,l=n+o.actualBoundingBoxDescent,u=i.strikethrough?(c+l)/2:l;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(a,u),t.lineTo(s,u),t.stroke()}}function Pn(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Mn(t,e,n,r,i,o={}){const a=Zt(e)?e:[e],s=o.strokeWidth>0&&""!==o.strokeColor;let c,l;for(t.save(),t.font=i.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Gt(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),c=0;c<a.length;++c)l=a[c],o.backdrop&&Pn(t,o.backdrop),s&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),Gt(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(l,n,r,o.maxWidth)),t.fillText(l,n,r,o.maxWidth),Sn(t,n,r,l,o),r+=Number(i.lineHeight);t.restore()}function kn(t,e){const{x:n,y:r,w:i,h:o,radius:a}=e;t.arc(n+a.topLeft,r+a.topLeft,a.topLeft,1.5*me,me,!0),t.lineTo(n,r+o-a.bottomLeft),t.arc(n+a.bottomLeft,r+o-a.bottomLeft,a.bottomLeft,me,Oe,!0),t.lineTo(n+i-a.bottomRight,r+o),t.arc(n+i-a.bottomRight,r+o-a.bottomRight,a.bottomRight,Oe,0,!0),t.lineTo(n+i,r+a.topRight),t.arc(n+i-a.topRight,r+a.topRight,a.topRight,0,-Oe,!0),t.lineTo(n+a.topLeft,r)}const En=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,An=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Cn(t,e){const n=(""+t).match(En);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t}const In=t=>+t||0;function jn(t,e){const n={},r=Qt(e),i=r?Object.keys(e):e,o=Qt(t)?r?n=>ee(t[n],t[e[n]]):e=>t[e]:()=>t;for(const a of i)n[a]=In(o(a));return n}function Dn(t){return jn(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Tn(t){return jn(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Rn(t){const e=Dn(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ln(t,e){t=t||{},e=e||pn.font;let n=ee(t.size,e.size);"string"==typeof n&&(n=parseInt(n,10));let r=ee(t.style,e.style);r&&!(""+r).match(An)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:ee(t.family,e.family),lineHeight:Cn(ee(t.lineHeight,e.lineHeight),n),size:n,style:r,weight:ee(t.weight,e.weight),string:""};return i.string=function(t){return!t||Gt(t.size)||Gt(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(i),i}function Bn(t,e,n,r){let i,o,a;for(i=0,o=t.length;i<o;++i)if(a=t[i],void 0!==a&&void 0!==a)return a}function Nn(t,e){return Object.assign(Object.create(t),e)}function zn(t,e=[""],n,r,i=()=>t[0]){const o=n||t;void 0===r&&(r=Gn("_fallback",t));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:r,_getTarget:i,override:n=>zn([n,...t],e,o,r)};return new Proxy(a,{deleteProperty:(e,n)=>(delete e[n],delete e._keys,delete t[0][n],!0),get:(n,r)=>Kn(n,r,()=>function(t,e,n,r){let i;for(const o of e)if(i=Gn(Wn(o,t),n),void 0!==i)return Un(t,i)?Xn(n,r,t,i):i}(r,e,t,n)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Zn(t).includes(e),ownKeys:t=>Zn(t),set(t,e,n){const r=t._storage||(t._storage=i());return t[e]=r[e]=n,delete t._keys,!0}})}function Fn(t,e,n,r){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Vn(t,r),setContext:e=>Fn(t,e,n,r),override:i=>Fn(t.override(i),e,n,r)};return new Proxy(i,{deleteProperty:(e,n)=>(delete e[n],delete t[n],!0),get:(t,e,n)=>Kn(t,e,()=>function(t,e,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:a}=t;let s=r[e];ye(s)&&a.isScriptable(e)&&(s=function(t,e,n,r){const{_proxy:i,_context:o,_subProxy:a,_stack:s}=n;if(s.has(t))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+t);s.add(t);let c=e(o,a||r);s.delete(t),Un(t,c)&&(c=Xn(i._scopes,i,t,c));return c}(e,s,t,n));Zt(s)&&s.length&&(s=function(t,e,n,r){const{_proxy:i,_context:o,_subProxy:a,_descriptors:s}=n;if(void 0!==o.index&&r(t))return e[o.index%e.length];if(Qt(e[0])){const n=e,r=i._scopes.filter(t=>t!==n);e=[];for(const c of n){const n=Xn(r,i,t,c);e.push(Fn(n,o,a&&a[t],s))}}return e}(e,s,t,a.isIndexable));Un(e,s)&&(s=Fn(s,i,o&&o[e],a));return s}(t,e,n)),getOwnPropertyDescriptor:(e,n)=>e._descriptors.allKeys?Reflect.has(t,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,n),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,n)=>Reflect.has(t,n),ownKeys:()=>Reflect.ownKeys(t),set:(e,n,r)=>(t[n]=r,delete e[n],!0)})}function Vn(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:r=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:r,isScriptable:ye(n)?n:()=>n,isIndexable:ye(r)?r:()=>r}}const Wn=(t,e)=>t?t+pe(e):e,Un=(t,e)=>Qt(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Kn(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const r=n();return t[e]=r,r}function Hn(t,e,n){return ye(t)?t(e,n):t}const $n=(t,e)=>!0===t?e:"string"==typeof t?fe(e,t):void 0;function Yn(t,e,n,r,i){for(const o of e){const e=$n(n,o);if(e){t.add(e);const o=Hn(e._fallback,n,i);if(void 0!==o&&o!==n&&o!==r)return o}else if(!1===e&&void 0!==r&&n!==r)return null}return!1}function Xn(t,e,n,r){const i=e._rootScopes,o=Hn(e._fallback,n,r),a=[...t,...i],s=new Set;s.add(r);let c=qn(s,a,n,o||n,r);return null!==c&&((void 0===o||o===n||(c=qn(s,a,o,c,r),null!==c))&&zn(Array.from(s),[""],i,o,()=>function(t,e,n){const r=t._getTarget();e in r||(r[e]={});const i=r[e];if(Zt(i)&&Qt(n))return n;return i||{}}(e,n,r)))}function qn(t,e,n,r,i){for(;n;)n=Yn(t,e,n,r,i);return n}function Gn(t,e){for(const n of e){if(!n)continue;const e=n[t];if(void 0!==e)return e}}function Zn(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const n of t)for(const t of Object.keys(n).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}function Qn(t,e,n,r){const{iScale:i}=t,{key:o="r"}=this._parsing,a=new Array(r);let s,c,l,u;for(s=0,c=r;s<c;++s)l=s+n,u=e[l],a[s]={r:i.parse(fe(u,o),l)};return a}const Jn=Number.EPSILON||1e-14,tr=(t,e)=>e<t.length&&!t[e].skip&&t[e],er=t=>"x"===t?"y":"x";function nr(t,e,n,r){const i=t.skip?e:t,o=e,a=n.skip?e:n,s=De(o,i),c=De(a,o);let l=s/(s+c),u=c/(s+c);l=isNaN(l)?0:l,u=isNaN(u)?0:u;const h=r*l,d=r*u;return{previous:{x:o.x-h*(a.x-i.x),y:o.y-h*(a.y-i.y)},next:{x:o.x+d*(a.x-i.x),y:o.y+d*(a.y-i.y)}}}function rr(t,e="x"){const n=er(e),r=t.length,i=Array(r).fill(0),o=Array(r);let a,s,c,l=tr(t,0);for(a=0;a<r;++a)if(s=c,c=l,l=tr(t,a+1),c){if(l){const t=l[e]-c[e];i[a]=0!==t?(l[n]-c[n])/t:0}o[a]=s?l?ke(i[a-1])!==ke(i[a])?0:(i[a-1]+i[a])/2:i[a-1]:i[a]}!function(t,e,n){const r=t.length;let i,o,a,s,c,l=tr(t,0);for(let u=0;u<r-1;++u)c=l,l=tr(t,u+1),c&&l&&(Ee(e[u],0,Jn)?n[u]=n[u+1]=0:(i=n[u]/e[u],o=n[u+1]/e[u],s=Math.pow(i,2)+Math.pow(o,2),s<=9||(a=3/Math.sqrt(s),n[u]=i*a*e[u],n[u+1]=o*a*e[u])))}(t,i,o),function(t,e,n="x"){const r=er(n),i=t.length;let o,a,s,c=tr(t,0);for(let l=0;l<i;++l){if(a=s,s=c,c=tr(t,l+1),!s)continue;const i=s[n],u=s[r];a&&(o=(i-a[n])/3,s[`cp1${n}`]=i-o,s[`cp1${r}`]=u-o*e[l]),c&&(o=(c[n]-i)/3,s[`cp2${n}`]=i+o,s[`cp2${r}`]=u+o*e[l])}}(t,o,e)}function ir(t,e,n){return Math.max(Math.min(t,n),e)}function or(t,e,n,r,i){let o,a,s,c;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)rr(t,i);else{let n=r?t[t.length-1]:t[0];for(o=0,a=t.length;o<a;++o)s=t[o],c=nr(n,s,t[Math.min(o+1,a-(r?0:1))%a],e.tension),s.cp1x=c.previous.x,s.cp1y=c.previous.y,s.cp2x=c.next.x,s.cp2y=c.next.y,n=s}e.capBezierPoints&&function(t,e){let n,r,i,o,a,s=bn(t[0],e);for(n=0,r=t.length;n<r;++n)a=o,o=s,s=n<r-1&&bn(t[n+1],e),o&&(i=t[n],a&&(i.cp1x=ir(i.cp1x,e.left,e.right),i.cp1y=ir(i.cp1y,e.top,e.bottom)),s&&(i.cp2x=ir(i.cp2x,e.left,e.right),i.cp2y=ir(i.cp2y,e.top,e.bottom)))}(t,n)}function ar(){return"undefined"!=typeof window&&"undefined"!=typeof document}function sr(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function cr(t,e,n){let r;return"string"==typeof t?(r=parseInt(t,10),-1!==t.indexOf("%")&&(r=r/100*e.parentNode[n])):r=t,r}const lr=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);const ur=["top","right","bottom","left"];function hr(t,e,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=ur[i];r[o]=parseFloat(t[e+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}function dr(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:r}=e,i=lr(n),o="border-box"===i.boxSizing,a=hr(i,"padding"),s=hr(i,"border","width"),{x:c,y:l,box:u}=function(t,e){const n=t.touches,r=n&&n.length?n[0]:t,{offsetX:i,offsetY:o}=r;let a,s,c=!1;if(((t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot))(i,o,t.target))a=i,s=o;else{const t=e.getBoundingClientRect();a=r.clientX-t.left,s=r.clientY-t.top,c=!0}return{x:a,y:s,box:c}}(t,n),h=a.left+(u&&s.left),d=a.top+(u&&s.top);let{width:f,height:p}=e;return o&&(f-=a.width+s.width,p-=a.height+s.height),{x:Math.round((c-h)/f*n.width/r),y:Math.round((l-d)/p*n.height/r)}}const fr=t=>Math.round(10*t)/10;function pr(t,e,n,r){const i=lr(t),o=hr(i,"margin"),a=cr(i.maxWidth,t,"clientWidth")||we,s=cr(i.maxHeight,t,"clientHeight")||we,c=function(t,e,n){let r,i;if(void 0===e||void 0===n){const o=t&&sr(t);if(o){const t=o.getBoundingClientRect(),a=lr(o),s=hr(a,"border","width"),c=hr(a,"padding");e=t.width-c.width-s.width,n=t.height-c.height-s.height,r=cr(a.maxWidth,o,"clientWidth"),i=cr(a.maxHeight,o,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:r||we,maxHeight:i||we}}(t,e,n);let{width:l,height:u}=c;if("content-box"===i.boxSizing){const t=hr(i,"border","width"),e=hr(i,"padding");l-=e.width+t.width,u-=e.height+t.height}l=Math.max(0,l-o.width),u=Math.max(0,r?l/r:u-o.height),l=fr(Math.min(l,a,c.maxWidth)),u=fr(Math.min(u,s,c.maxHeight)),l&&!u&&(u=fr(l/2));return(void 0!==e||void 0!==n)&&r&&c.height&&u>c.height&&(u=c.height,l=fr(Math.floor(u*r))),{width:l,height:u}}function gr(t,e,n){const r=e||1,i=fr(t.height*r),o=fr(t.width*r);t.height=fr(t.height),t.width=fr(t.width);const a=t.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==r||a.height!==i||a.width!==o)&&(t.currentDevicePixelRatio=r,a.height=i,a.width=o,t.ctx.setTransform(r,0,0,r,0,0),!0)}const yr=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};ar()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(e){}return t}();function vr(t,e){const n=function(t,e){return lr(t).getPropertyValue(e)}(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function mr(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function br(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:"middle"===r?n<.5?t.y:e.y:"after"===r?n<1?t.y:e.y:n>0?e.y:t.y}}function xr(t,e,n,r){const i={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},a=mr(t,i,n),s=mr(i,o,n),c=mr(o,e,n),l=mr(a,s,n),u=mr(s,c,n);return mr(l,u,n)}function wr(t,e,n){return t?function(t,e){return{x:n=>t+t+e-n,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,n):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function _r(t){return"angle"===t?{between:Le,compare:Te,normalize:Re}:{between:Ne,compare:(t,e)=>t-e,normalize:t=>t}}function Or({start:t,end:e,count:n,loop:r,style:i}){return{start:t%n,end:e%n,loop:r&&(e-t+1)%n==0,style:i}}function Sr(t,e,n){if(!n)return[t];const{property:r,start:i,end:o}=n,a=e.length,{compare:s,between:c,normalize:l}=_r(r),{start:u,end:h,loop:d,style:f}=function(t,e,n){const{property:r,start:i,end:o}=n,{between:a,normalize:s}=_r(r),c=e.length;let l,u,{start:h,end:d,loop:f}=t;if(f){for(h+=c,d+=c,l=0,u=c;l<u&&a(s(e[h%c][r]),i,o);++l)h--,d--;h%=c,d%=c}return d<h&&(d+=c),{start:h,end:d,loop:f,style:t.style}}(t,e,n),p=[];let g,y,v,m=!1,b=null;const x=()=>m||c(i,v,g)&&0!==s(i,v),w=()=>!m||0===s(o,g)||c(o,v,g);for(let _=u,O=u;_<=h;++_)y=e[_%a],y.skip||(g=l(y[r]),g!==v&&(m=c(g,i,o),null===b&&x()&&(b=0===s(g,i)?_:O),null!==b&&w()&&(p.push(Or({start:b,end:_,loop:d,count:a,style:f})),b=null),O=_,v=g));return null!==b&&p.push(Or({start:b,end:h,loop:d,count:a,style:f})),p}function Pr(t,e,n,r){return r&&r.setContext&&n?function(t,e,n,r){const i=t._chart.getContext(),o=Mr(t.options),{_datasetIndex:a,options:{spanGaps:s}}=t,c=n.length,l=[];let u=o,h=e[0].start,d=h;function f(t,e,r,i){const o=s?-1:1;if(t!==e){for(t+=c;n[t%c].skip;)t-=o;for(;n[e%c].skip;)e+=o;t%c!==e%c&&(l.push({start:t%c,end:e%c,loop:r,style:i}),u=i,h=e%c)}}for(const p of e){h=s?h:p.start;let t,e=n[h%c];for(d=h+1;d<=p.end;d++){const o=n[d%c];t=Mr(r.setContext(Nn(i,{type:"segment",p0:e,p1:o,p0DataIndex:(d-1)%c,p1DataIndex:d%c,datasetIndex:a}))),kr(t,u)&&f(h,d-1,p.loop,u),e=o,u=t}h<d-1&&f(h,d-1,p.loop,u)}return l}(t,e,n,r):e}function Mr(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function kr(t,e){if(!e)return!1;const n=[],r=function(t,e){return tn(e)?(n.includes(e)||n.push(e),n.indexOf(e)):e};return JSON.stringify(t,r)!==JSON.stringify(e,r)}function Er(t,e,n){return t.options.clip?t[n]:e[n]}function Ar(t,e){const n=e._clip;if(n.disabled)return!1;const r=function(t,e){const{xScale:n,yScale:r}=t;return n&&r?{left:Er(n,e,"left"),right:Er(n,e,"right"),top:Er(r,e,"top"),bottom:Er(r,e,"bottom")}:e}(e,t.chartArea);return{left:!1===n.left?0:r.left-(!0===n.left?0:n.left),right:!1===n.right?t.width:r.right+(!0===n.right?0:n.right),top:!1===n.top?0:r.top-(!0===n.top?0:n.top),bottom:!1===n.bottom?t.height:r.bottom+(!0===n.bottom?0:n.bottom)}}class Cr{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,r){const i=e.listeners[r],o=e.duration;i.forEach(r=>r({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(n-e.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=He.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((n,r)=>{if(!n.running||!n.items.length)return;const i=n.items;let o,a=i.length-1,s=!1;for(;a>=0;--a)o=i[a],o._active?(o._total>n.duration&&(n.duration=o._total),o.tick(t),s=!0):(i[a]=i[i.length-1],i.pop());s&&(r.draw(),this._notify(r,n,t,"progress")),i.length||(n.running=!1,this._notify(r,n,t,"complete"),n.initial=!1),e+=i.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let r=n.length-1;for(;r>=0;--r)n[r].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Ir=new Cr;const jr="transparent",Dr={boolean:(t,e,n)=>n>.5?e:t,color(t,e,n){const r=en(t||jr),i=r.valid&&en(e||jr);return i&&i.valid?i.mix(r,n).hexString():e},number:(t,e,n)=>t+(e-t)*n};class Tr{constructor(t,e,n,r){const i=e[n];r=Bn([t.to,r,i,t.from]);const o=Bn([t.from,i,r]);this._active=!0,this._fn=t.fn||Dr[t.type||typeof o],this._easing=Je[t.easing]||Je.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=o,this._to=r,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const r=this._target[this._prop],i=n-this._start,o=this._duration-i;this._start=n,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=i,this._loop=!!t.loop,this._to=Bn([t.to,e,r,t.from]),this._from=Bn([t.from,r,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,r=this._prop,i=this._from,o=this._loop,a=this._to;let s;if(this._active=i!==a&&(o||e<n),!this._active)return this._target[r]=a,void this._notify(!0);e<0?this._target[r]=i:(s=e/n%2,s=o&&s>1?2-s:s,s=this._easing(Math.min(1,Math.max(0,s))),this._target[r]=this._fn(i,a,s))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,n)=>{t.push({res:e,rej:n})})}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let r=0;r<n.length;r++)n[r][e]()}}class Rr{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!Qt(t))return;const e=Object.keys(pn.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const i=t[r];if(!Qt(i))return;const o={};for(const t of e)o[t]=i[t];(Zt(i.properties)&&i.properties||[r]).forEach(t=>{t!==r&&n.has(t)||n.set(t,o)})})}_animateOptions(t,e){const n=e.options,r=function(t,e){if(!e)return;let n=t.options;if(!n)return void(t.options=e);n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}}));return n}(t,n);if(!r)return[];const i=this._createAnimations(r,n);return n.$shared&&function(t,e){const n=[],r=Object.keys(e);for(let i=0;i<r.length;i++){const e=t[r[i]];e&&e.active()&&n.push(e.wait())}return Promise.all(n)}(t.options.$animations,n).then(()=>{t.options=n},()=>{}),i}_createAnimations(t,e){const n=this._properties,r=[],i=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now();let s;for(s=o.length-1;s>=0;--s){const c=o[s];if("$"===c.charAt(0))continue;if("options"===c){r.push(...this._animateOptions(t,e));continue}const l=e[c];let u=i[c];const h=n.get(c);if(u){if(h&&u.active()){u.update(h,l,a);continue}u.cancel()}h&&h.duration?(i[c]=u=new Tr(h,t,c,l),r.push(u)):t[c]=l}return r}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const n=this._createAnimations(t,e);return n.length?(Ir.add(this._chart,n),!0):void 0}}function Lr(t,e){const n=t&&t.options||{},r=n.reverse,i=void 0===n.min?e:0,o=void 0===n.max?e:0;return{start:r?o:i,end:r?i:o}}function Br(t,e){const n=[],r=t._getSortedDatasetMetas(e);let i,o;for(i=0,o=r.length;i<o;++i)n.push(r[i].index);return n}function Nr(t,e,n,r={}){const i=t.keys,o="single"===r.mode;let a,s,c,l;if(null===e)return;let u=!1;for(a=0,s=i.length;a<s;++a){if(c=+i[a],c===n){if(u=!0,r.all)continue;break}l=t.values[c],Jt(l)&&(o||0===e||ke(e)===ke(l))&&(e+=l)}return u||r.all?e:0}function zr(t,e){const n=t&&t.options.stacked;return n||void 0===n&&void 0!==e.stack}function Fr(t,e,n){const r=t[e]||(t[e]={});return r[n]||(r[n]={})}function Vr(t,e,n,r){for(const i of e.getMatchingVisibleMetas(r).reverse()){const e=t[i.index];if(n&&e>0||!n&&e<0)return i.index}return null}function Wr(t,e){const{chart:n,_cachedMeta:r}=t,i=n._stacks||(n._stacks={}),{iScale:o,vScale:a,index:s}=r,c=o.axis,l=a.axis,u=function(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}(o,a,r),h=e.length;let d;for(let f=0;f<h;++f){const t=e[f],{[c]:n,[l]:o}=t;d=(t._stacks||(t._stacks={}))[l]=Fr(i,u,n),d[s]=o,d._top=Vr(d,a,!0,r.type),d._bottom=Vr(d,a,!1,r.type);(d._visualValues||(d._visualValues={}))[s]=o}}function Ur(t,e){const n=t.scales;return Object.keys(n).filter(t=>n[t].axis===e).shift()}function Kr(t,e){const n=t.controller.index,r=t.vScale&&t.vScale.axis;if(r){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[r]||void 0===e[r][n])return;delete e[r][n],void 0!==e[r]._visualValues&&void 0!==e[r]._visualValues[n]&&delete e[r]._visualValues[n]}}}const Hr=t=>"reset"===t||"none"===t,$r=(t,e)=>e?t:Object.assign({},t);class Yr{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,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=zr(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&&Kr(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),r=(t,e,n,r)=>"x"===t?e:"r"===t?r:n,i=e.xAxisID=ee(n.xAxisID,Ur(t,"x")),o=e.yAxisID=ee(n.yAxisID,Ur(t,"y")),a=e.rAxisID=ee(n.rAxisID,Ur(t,"r")),s=e.indexAxis,c=e.iAxisID=r(s,i,o,a),l=e.vAxisID=r(s,o,i,a);e.xScale=this.getScaleForId(i),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(l)}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 e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Ue(this._data,this),t._stacked&&Kr(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(Qt(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:n,vScale:r}=e,i="x"===n.axis?"x":"y",o="x"===r.axis?"x":"y",a=Object.keys(t),s=new Array(a.length);let c,l,u;for(c=0,l=a.length;c<l;++c)u=a[c],s[c]={[i]:u,[o]:t[u]};return s}(e,t)}else if(n!==e){if(n){Ue(n,this);const t=this._cachedMeta;Kr(t),t._parsed=[]}e&&Object.isExtensible(e)&&(i=this,(r=e)._chartjs?r._chartjs.listeners.push(i):(Object.defineProperty(r,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[i]}}),We.forEach(t=>{const e="_onData"+pe(t),n=r[t];Object.defineProperty(r,t,{configurable:!0,enumerable:!1,value(...t){const i=n.apply(this,t);return r._chartjs.listeners.forEach(n=>{"function"==typeof n[e]&&n[e](...t)}),i}})}))),this._syncList=[],this._data=e}var r,i}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let r=!1;this._dataCheck();const i=e._stacked;e._stacked=zr(e.vScale,e),e.stack!==n.stack&&(r=!0,Kr(e),e.stack=n.stack),this._resyncElements(t),(r||i!==e._stacked)&&(Wr(this,e._parsed),e._stacked=zr(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:r}=this,{iScale:i,_stacked:o}=n,a=i.axis;let s,c,l,u=0===t&&e===r.length||n._sorted,h=t>0&&n._parsed[t-1];if(!1===this._parsing)n._parsed=r,n._sorted=!0,l=r;else{l=Zt(r[t])?this.parseArrayData(n,r,t,e):Qt(r[t])?this.parseObjectData(n,r,t,e):this.parsePrimitiveData(n,r,t,e);const i=()=>null===c[a]||h&&c[a]<h[a];for(s=0;s<e;++s)n._parsed[s+t]=c=l[s],u&&(i()&&(u=!1),h=c);n._sorted=u}o&&Wr(this,l)}parsePrimitiveData(t,e,n,r){const{iScale:i,vScale:o}=t,a=i.axis,s=o.axis,c=i.getLabels(),l=i===o,u=new Array(r);let h,d,f;for(h=0,d=r;h<d;++h)f=h+n,u[h]={[a]:l||i.parse(c[f],f),[s]:o.parse(e[f],f)};return u}parseArrayData(t,e,n,r){const{xScale:i,yScale:o}=t,a=new Array(r);let s,c,l,u;for(s=0,c=r;s<c;++s)l=s+n,u=e[l],a[s]={x:i.parse(u[0],l),y:o.parse(u[1],l)};return a}parseObjectData(t,e,n,r){const{xScale:i,yScale:o}=t,{xAxisKey:a="x",yAxisKey:s="y"}=this._parsing,c=new Array(r);let l,u,h,d;for(l=0,u=r;l<u;++l)h=l+n,d=e[h],c[l]={x:i.parse(fe(d,a),h),y:o.parse(fe(d,s),h)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){const r=this.chart,i=this._cachedMeta,o=e[t.axis];return Nr({keys:Br(r,!0),values:e._stacks[t.axis]._visualValues},o,i.index,{mode:n})}updateRangeFromParsed(t,e,n,r){const i=n[e.axis];let o=null===i?NaN:i;const a=r&&n._stacks[e.axis];r&&a&&(r.values=a,o=Nr(r,i,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const n=this._cachedMeta,r=n._parsed,i=n._sorted&&t===n.iScale,o=r.length,a=this._getOtherScale(t),s=((t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Br(n,!0),values:null})(e,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:l,max:u}=function(t){const{min:e,max:n,minDefined:r,maxDefined:i}=t.getUserBounds();return{min:r?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}(a);let h,d;function f(){d=r[h];const e=d[a.axis];return!Jt(d[t.axis])||l>e||u<e}for(h=0;h<o&&(f()||(this.updateRangeFromParsed(c,t,d,s),!i));++h);if(i)for(h=o-1;h>=0;--h)if(!f()){this.updateRangeFromParsed(c,t,d,s);break}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let r,i,o;for(r=0,i=e.length;r<i;++r)o=e[r][t.axis],Jt(o)&&n.push(o);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,n=e.iScale,r=e.vScale,i=this.getParsed(t);return{label:n?""+n.getLabelForValue(i[n.axis]):"",value:r?""+r.getLabelForValue(i[r.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,n,r,i;return Qt(t)?(e=t.top,n=t.right,r=t.bottom,i=t.left):e=n=r=i=t,{top:e,right:n,bottom:r,left:i,disabled:!1===t}}(ee(this.options.clip,function(t,e,n){if(!1===n)return!1;const r=Lr(t,n),i=Lr(e,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,n=this._cachedMeta,r=n.data||[],i=e.chartArea,o=[],a=this._drawStart||0,s=this._drawCount||r.length-a,c=this.options.drawActiveElementsOnTop;let l;for(n.dataset&&n.dataset.draw(t,i,a,s),l=a;l<a+s;++l){const e=r[l];e.hidden||(e.active&&c?o.push(e):e.draw(t,i))}for(l=0;l<o.length;++l)o[l].draw(t,i)}getStyle(t,e){const n=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){const r=this.getDataset();let i;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];i=e.$context||(e.$context=function(t,e,n){return Nn(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),i.parsed=this.getParsed(t),i.raw=r.data[t],i.index=i.dataIndex=t}else i=this.$context||(this.$context=function(t,e){return Nn(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),i.dataset=r,i.index=i.datasetIndex=this.index;return i.active=!!e,i.mode=n,i}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",n){const r="active"===e,i=this._cachedDataOpts,o=t+"-"+e,a=i[o],s=this.enableOptionSharing&&ge(n);if(a)return $r(a,s);const c=this.chart.config,l=c.datasetElementScopeKeys(this._type,t),u=r?[`${t}Hover`,"hover",t,""]:[t,""],h=c.getOptionScopes(this.getDataset(),l),d=Object.keys(pn.elements[t]),f=c.resolveNamedOptions(h,d,()=>this.getContext(n,r,e),u);return f.$shared&&(f.$shared=s,i[o]=Object.freeze($r(f,s))),f}_resolveAnimations(t,e,n){const r=this.chart,i=this._cachedDataOpts,o=`animation-${e}`,a=i[o];if(a)return a;let s;if(!1!==r.options.animation){const r=this.chart.config,i=r.datasetAnimationScopeKeys(this._type,e),o=r.getOptionScopes(this.getDataset(),i);s=r.createResolver(o,this.getContext(t,n,e))}const c=new Rr(r,s&&s.animations);return s&&s._cacheable&&(i[o]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Hr(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),r=this._sharedOptions,i=this.getSharedOptions(n),o=this.includeOptions(e,i)||i!==r;return this.updateSharedOptions(i,e,n),{sharedOptions:i,includeOptions:o}}updateElement(t,e,n,r){Hr(r)?Object.assign(t,n):this._resolveAnimations(e,r).update(t,n)}updateSharedOptions(t,e,n){t&&!Hr(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,r){t.active=r;const i=this.getStyle(e,r);this._resolveAnimations(e,n,r).update(t,{options:!r&&this.getSharedOptions(i)||i})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"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 e=this._data,n=this._cachedMeta.data;for(const[a,s,c]of this._syncList)this[a](s,c);this._syncList=[];const r=n.length,i=e.length,o=Math.min(i,r);o&&this.parse(0,o),i>r?this._insertElements(r,i-r,t):i<r&&this._removeElements(i,r-i)}_insertElements(t,e,n=!0){const r=this._cachedMeta,i=r.data,o=t+e;let a;const s=t=>{for(t.length+=e,a=t.length-1;a>=o;a--)t[a]=t[a-e]};for(s(i),a=t;a<o;++a)i[a]=new this.dataElementType;this._parsing&&s(r._parsed),this.parse(t,e),n&&this.updateElements(i,t,e,"reset")}updateElements(t,e,n,r){}_removeElements(t,e){const n=this._cachedMeta;if(this._parsing){const r=n._parsed.splice(t,e);n._stacked&&Kr(n,r)}n.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,n,r]=t;this[e](n,r)}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,e){e&&this._sync(["_removeElements",t,e]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Xr(t){const e=t.iScale,n=function(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let r=[];for(let e=0,i=n.length;e<i;e++)r=r.concat(n[e].controller.getAllParsedValues(t));t._cache.$bar=Ke(r.sort((t,e)=>t-e))}return t._cache.$bar}(e,t.type);let r,i,o,a,s=e._length;const c=()=>{32767!==o&&-32768!==o&&(ge(a)&&(s=Math.min(s,Math.abs(o-a)||s)),a=o)};for(r=0,i=n.length;r<i;++r)o=e.getPixelForValue(n[r]),c();for(a=void 0,r=0,i=e.ticks.length;r<i;++r)o=e.getPixelForTick(r),c();return s}function qr(t,e,n,r){return Zt(t)?function(t,e,n,r){const i=n.parse(t[0],r),o=n.parse(t[1],r),a=Math.min(i,o),s=Math.max(i,o);let c=a,l=s;Math.abs(a)>Math.abs(s)&&(c=s,l=a),e[n.axis]=l,e._custom={barStart:c,barEnd:l,start:i,end:o,min:a,max:s}}(t,e,n,r):e[n.axis]=n.parse(t,r),e}function Gr(t,e,n,r){const i=t.iScale,o=t.vScale,a=i.getLabels(),s=i===o,c=[];let l,u,h,d;for(l=n,u=n+r;l<u;++l)d=e[l],h={},h[i.axis]=s||i.parse(a[l],l),c.push(qr(d,h,o,l));return c}function Zr(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function Qr(t,e,n,r){let i=e.borderSkipped;const o={};if(!i)return void(t.borderSkipped=o);if(!0===i)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:a,end:s,reverse:c,top:l,bottom:u}=function(t){let e,n,r,i,o;return t.horizontal?(e=t.base>t.x,n="left",r="right"):(e=t.base<t.y,n="bottom",r="top"),e?(i="end",o="start"):(i="start",o="end"),{start:n,end:r,reverse:e,top:i,bottom:o}}(t);"middle"===i&&n&&(t.enableBorderRadius=!0,(n._top||0)===r?i=l:(n._bottom||0)===r?i=u:(o[Jr(u,a,s,c)]=!0,i=l)),o[Jr(i,a,s,c)]=!0,t.borderSkipped=o}function Jr(t,e,n,r){var i,o,a;return r?(a=n,t=ti(t=(i=t)===(o=e)?a:i===a?o:i,n,e)):t=ti(t,e,n),t}function ti(t,e,n){return"start"===t?e:"end"===t?n:t}function ei(t,{inflateAmount:e},n){t.inflateAmount="auto"===e?1===n?.33:0:e}class ni extends Yr{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,e,n,r){return Gr(t,e,n,r)}parseArrayData(t,e,n,r){return Gr(t,e,n,r)}parseObjectData(t,e,n,r){const{iScale:i,vScale:o}=t,{xAxisKey:a="x",yAxisKey:s="y"}=this._parsing,c="x"===i.axis?a:s,l="x"===o.axis?a:s,u=[];let h,d,f,p;for(h=n,d=n+r;h<d;++h)p=e[h],f={},f[i.axis]=i.parse(fe(p,c),h),u.push(qr(fe(p,l),f,o,h));return u}updateRangeFromParsed(t,e,n,r){super.updateRangeFromParsed(t,e,n,r);const i=n._custom;i&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,i.min),t.max=Math.max(t.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:n,vScale:r}=e,i=this.getParsed(t),o=i._custom,a=Zr(o)?"["+o.start+", "+o.end+"]":""+r.getLabelForValue(i[r.axis]);return{label:""+n.getLabelForValue(i[n.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,n,r){const i="reset"===r,{index:o,_cachedMeta:{vScale:a}}=this,s=a.getBasePixel(),c=a.isHorizontal(),l=this._getRuler(),{sharedOptions:u,includeOptions:h}=this._getSharedOptions(e,r);for(let d=e;d<e+n;d++){const e=this.getParsed(d),n=i||Gt(e[a.axis])?{base:s,head:s}:this._calculateBarValuePixels(d),f=this._calculateBarIndexPixels(d,l),p=(e._stacks||{})[a.axis],g={horizontal:c,base:n.base,enableBorderRadius:!p||Zr(e._custom)||o===p._top||o===p._bottom,x:c?n.head:f.center,y:c?f.center:n.head,height:c?f.size:Math.abs(n.size),width:c?Math.abs(n.size):f.size};h&&(g.options=u||this.resolveDataElementOptions(d,t[d].active?"active":r));const y=g.options||t[d].options;Qr(g,y,p,o),ei(g,y,l.ratio),this.updateElement(t[d],d,g,r)}}_getStacks(t,e){const{iScale:n}=this._cachedMeta,r=n.getMatchingVisibleMetas(this._type).filter(t=>t.controller.options.grouped),i=n.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(e),s=a&&a[n.axis],c=t=>{const e=t._parsed.find(t=>t[n.axis]===s),r=e&&e[t.vScale.axis];if(Gt(r)||isNaN(r))return!0};for(const l of r)if((void 0===e||!c(l))&&((!1===i||-1===o.indexOf(l.stack)||void 0===i&&void 0===l.stack)&&o.push(l.stack),l.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,e=this.chart.options.indexAxis;return Object.keys(t).filter(n=>t[n].axis===e).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const n of this.chart.data.datasets)t[ee("x"===this.chart.options.indexAxis?n.xAxisID:n.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,n){const r=this._getStacks(t,n),i=void 0!==e?r.indexOf(e):-1;return-1===i?r.length-1:i}_getRuler(){const t=this.options,e=this._cachedMeta,n=e.iScale,r=[];let i,o;for(i=0,o=e.data.length;i<o;++i)r.push(n.getPixelForValue(this.getParsed(i)[n.axis],i));const a=t.barThickness;return{min:a||Xr(e),pixels:r,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:n,index:r},options:{base:i,minBarLength:o}}=this,a=i||0,s=this.getParsed(t),c=s._custom,l=Zr(c);let u,h,d=s[e.axis],f=0,p=n?this.applyStack(e,s,n):d;p!==d&&(f=p-d,p=d),l&&(d=c.barStart,p=c.barEnd-c.barStart,0!==d&&ke(d)!==ke(c.barEnd)&&(f=0),f+=d);const g=Gt(i)||l?f:i;let y=e.getPixelForValue(g);if(u=this.chart.getDataVisibility(t)?e.getPixelForValue(f+p):y,h=u-y,Math.abs(h)<o){h=function(t,e,n){return 0!==t?ke(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}(h,e,a)*o,d===a&&(y-=h/2);const t=e.getPixelForDecimal(0),i=e.getPixelForDecimal(1),c=Math.min(t,i),f=Math.max(t,i);y=Math.max(Math.min(y,f),c),u=y+h,n&&!l&&(s._stacks[e.axis]._visualValues[r]=e.getValueForPixel(u)-e.getValueForPixel(y))}if(y===e.getPixelForValue(a)){const t=ke(h)*e.getLineWidthForValue(a)/2;y+=t,h-=t}return{size:h,base:y,head:u,center:u+h/2}}_calculateBarIndexPixels(t,e){const n=e.scale,r=this.options,i=r.skipNull,o=ee(r.maxBarThickness,1/0);let a,s;const c=this._getAxisCount();if(e.grouped){const n=i?this._getStackCount(t):e.stackCount,l="flex"===r.barThickness?function(t,e,n,r){const i=e.pixels,o=i[t];let a=t>0?i[t-1]:null,s=t<i.length-1?i[t+1]:null;const c=n.categoryPercentage;null===a&&(a=o-(null===s?e.end-e.start:s-o)),null===s&&(s=o+o-a);const l=o-(o-Math.min(a,s))/2*c;return{chunk:Math.abs(s-a)/2*c/r,ratio:n.barPercentage,start:l}}(t,e,r,n*c):function(t,e,n,r){const i=n.barThickness;let o,a;return Gt(i)?(o=e.min*n.categoryPercentage,a=n.barPercentage):(o=i*r,a=1),{chunk:o/r,ratio:a,start:e.pixels[t]-o/2}}(t,e,r,n*c),u="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,h=this._getAxis().indexOf(ee(u,this.getFirstScaleIdForIndexAxis())),d=this._getStackIndex(this.index,this._cachedMeta.stack,i?t:void 0)+h;a=l.start+l.chunk*d+l.chunk/2,s=Math.min(o,l.chunk*l.ratio)}else a=n.getPixelForValue(this.getParsed(t)[n.axis],t),s=Math.min(o,e.min*e.ratio);return{base:a-s/2,head:a+s/2,center:a,size:s}}draw(){const t=this._cachedMeta,e=t.vScale,n=t.data,r=n.length;let i=0;for(;i<r;++i)null===this.getParsed(i)[e.axis]||n[i].hidden||n[i].draw(this._ctx)}}class ri extends Yr{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=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data,{labels:{pointStyle:n,textAlign:r,color:i,useBorderRadius:o,borderRadius:a}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map((e,s)=>{const c=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:c.backgroundColor,fontColor:i,hidden:!t.getDataVisibility(s),lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:c.borderWidth,strokeStyle:c.borderColor,textAlign:r,pointStyle:n,borderRadius:o&&(a||c.borderRadius),index:s}}):[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const n=this.getDataset().data,r=this._cachedMeta;if(!1===this._parsing)r._parsed=n;else{let i,o,a=t=>+n[t];if(Qt(n[t])){const{key:t="value"}=this._parsing;a=e=>+fe(n[e],t)}for(i=t,o=t+e;i<o;++i)r._parsed[i]=a(i)}}_getRotation(){return Ie(this.options.rotation-90)}_getCircumference(){return Ie(this.options.circumference)}_getRotationExtents(){let t=be,e=-be;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const r=this.chart.getDatasetMeta(n).controller,i=r._getRotation(),o=r._getCircumference();t=Math.min(t,i),e=Math.max(e,i+o)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:n}=e,r=this._cachedMeta,i=r.data,o=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,a=Math.max((Math.min(n.width,n.height)-o)/2,0),s=Math.min((c=this.options.cutout,l=a,"string"==typeof c&&c.endsWith("%")?parseFloat(c)/100:+c/l),1);var c,l;const u=this._getRingWeight(this.index),{circumference:h,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:g,offsetY:y}=function(t,e,n){let r=1,i=1,o=0,a=0;if(e<be){const s=t,c=s+e,l=Math.cos(s),u=Math.sin(s),h=Math.cos(c),d=Math.sin(c),f=(t,e,r)=>Le(t,s,c,!0)?1:Math.max(e,e*n,r,r*n),p=(t,e,r)=>Le(t,s,c,!0)?-1:Math.min(e,e*n,r,r*n),g=f(0,l,h),y=f(Oe,u,d),v=p(me,l,h),m=p(me+Oe,u,d);r=(g-v)/2,i=(y-m)/2,o=-(g+v)/2,a=-(y+m)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:a}}(d,h,s),v=(n.width-o)/f,m=(n.height-o)/p,b=Math.max(Math.min(v,m)/2,0),x=ne(this.options.radius,b),w=(x-Math.max(x*s,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=y*x,r.total=this.calculateTotal(),this.outerRadius=x-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*u,0),this.updateElements(i,0,i.length,t)}_circumference(t,e){const n=this.options,r=this._cachedMeta,i=this._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===r._parsed[t]||r.data[t].hidden?0:this.calculateCircumference(r._parsed[t]*i/be)}updateElements(t,e,n,r){const i="reset"===r,o=this.chart,a=o.chartArea,s=o.options.animation,c=(a.left+a.right)/2,l=(a.top+a.bottom)/2,u=i&&s.animateScale,h=u?0:this.innerRadius,d=u?0:this.outerRadius,{sharedOptions:f,includeOptions:p}=this._getSharedOptions(e,r);let g,y=this._getRotation();for(g=0;g<e;++g)y+=this._circumference(g,i);for(g=e;g<e+n;++g){const e=this._circumference(g,i),n=t[g],o={x:c+this.offsetX,y:l+this.offsetY,startAngle:y,endAngle:y+e,circumference:e,outerRadius:d,innerRadius:h};p&&(o.options=f||this.resolveDataElementOptions(g,n.active?"active":r)),y+=e,this.updateElement(n,g,o,r)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let n,r=0;for(n=0;n<e.length;n++){const i=t._parsed[n];null===i||isNaN(i)||!this.chart.getDataVisibility(n)||e[n].hidden||(r+=Math.abs(i))}return r}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?be*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=sn(e._parsed[t],n.options.locale);return{label:r[t]||"",value:i}}getMaxBorderWidth(t){let e=0;const n=this.chart;let r,i,o,a,s;if(!t)for(r=0,i=n.data.datasets.length;r<i;++r)if(n.isDatasetVisible(r)){o=n.getDatasetMeta(r),t=o.data,a=o.controller;break}if(!t)return 0;for(r=0,i=t.length;r<i;++r)s=a.resolveDataElementOptions(r),"inner"!==s.borderAlign&&(e=Math.max(e,s.borderWidth||0,s.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let n=0,r=t.length;n<r;++n){const t=this.resolveDataElementOptions(n);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e}_getRingWeight(t){return Math.max(ee(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class ii extends Yr{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 e=this._cachedMeta,{dataset:n,data:r=[],_dataset:i}=e,o=this.chart._animationsDisabled;let{start:a,count:s}=Xe(e,r,o);this._drawStart=a,this._drawCount=s,qe(e)&&(a=0,s=r.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!i._decimated,n.points=r;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(n,void 0,{animated:!o,options:c},t),this.updateElements(r,a,s,t)}updateElements(t,e,n,r){const i="reset"===r,{iScale:o,vScale:a,_stacked:s,_dataset:c}=this._cachedMeta,{sharedOptions:l,includeOptions:u}=this._getSharedOptions(e,r),h=o.axis,d=a.axis,{spanGaps:f,segment:p}=this.options,g=Ce(f)?f:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||i||"none"===r,v=e+n,m=t.length;let b=e>0&&this.getParsed(e-1);for(let x=0;x<m;++x){const n=t[x],f=y?n:{};if(x<e||x>=v){f.skip=!0;continue}const m=this.getParsed(x),w=Gt(m[d]),_=f[h]=o.getPixelForValue(m[h],x),O=f[d]=i||w?a.getBasePixel():a.getPixelForValue(s?this.applyStack(a,m,s):m[d],x);f.skip=isNaN(_)||isNaN(O)||w,f.stop=x>0&&Math.abs(m[h]-b[h])>g,p&&(f.parsed=m,f.raw=c.data[x]),u&&(f.options=l||this.resolveDataElementOptions(x,n.active?"active":r)),y||this.updateElement(n,x,f,r),b=m}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,r=t.data||[];if(!r.length)return n;const i=r[0].size(this.resolveDataElementOptions(0)),o=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(n,i,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}class oi extends Yr{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 e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:r}}=t.legend.options;return e.labels.map((e,i)=>{const o=t.getDatasetMeta(0).controller.getStyle(i);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:r,lineWidth:o.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(i),index:i}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=sn(e._parsed[t].r,n.options.locale);return{label:r[t]||"",value:i}}parseObjectData(t,e,n,r){return Qn.bind(this)(t,e,n,r)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((t,n)=>{const r=this.getParsed(n).r;!isNaN(r)&&this.chart.getDataVisibility(n)&&(r<e.min&&(e.min=r),r>e.max&&(e.max=r))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,n=t.options,r=Math.min(e.right-e.left,e.bottom-e.top),i=Math.max(r/2,0),o=(i-Math.max(n.cutoutPercentage?i/100*n.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=i-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,n,r){const i="reset"===r,o=this.chart,a=o.options.animation,s=this._cachedMeta.rScale,c=s.xCenter,l=s.yCenter,u=s.getIndexAngle(0)-.5*me;let h,d=u;const f=360/this.countVisibleElements();for(h=0;h<e;++h)d+=this._computeAngle(h,r,f);for(h=e;h<e+n;h++){const e=t[h];let n=d,p=d+this._computeAngle(h,r,f),g=o.getDataVisibility(h)?s.getDistanceFromCenterForValue(this.getParsed(h).r):0;d=p,i&&(a.animateScale&&(g=0),a.animateRotate&&(n=p=u));const y={x:c,y:l,innerRadius:0,outerRadius:g,startAngle:n,endAngle:p,options:this.resolveDataElementOptions(h,e.active?"active":r)};this.updateElement(e,h,y,r)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((t,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?Ie(this.resolveDataElementOptions(t,e).angle||n):0}}class ai extends Yr{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 e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:r,yScale:i}=e,o=this.getParsed(t),a=r.getLabelForValue(o.x),s=i.getLabelForValue(o.y);return{label:n[t]||"",value:"("+a+", "+s+")"}}update(t){const e=this._cachedMeta,{data:n=[]}=e,r=this.chart._animationsDisabled;let{start:i,count:o}=Xe(e,n,r);if(this._drawStart=i,this._drawCount=o,qe(e)&&(i=0,o=n.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:i,_dataset:o}=e;i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=n;const a=this.resolveDatasetElementOptions(t);a.segment=this.options.segment,this.updateElement(i,void 0,{animated:!r,options:a},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(n,i,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,n,r){const i="reset"===r,{iScale:o,vScale:a,_stacked:s,_dataset:c}=this._cachedMeta,l=this.resolveDataElementOptions(e,r),u=this.getSharedOptions(l),h=this.includeOptions(r,u),d=o.axis,f=a.axis,{spanGaps:p,segment:g}=this.options,y=Ce(p)?p:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||i||"none"===r;let m=e>0&&this.getParsed(e-1);for(let b=e;b<e+n;++b){const e=t[b],n=this.getParsed(b),l=v?e:{},p=Gt(n[f]),x=l[d]=o.getPixelForValue(n[d],b),w=l[f]=i||p?a.getBasePixel():a.getPixelForValue(s?this.applyStack(a,n,s):n[f],b);l.skip=isNaN(x)||isNaN(w)||p,l.stop=b>0&&Math.abs(n[d]-m[d])>y,g&&(l.parsed=n,l.raw=c.data[b]),h&&(l.options=u||this.resolveDataElementOptions(b,e.active?"active":r)),v||this.updateElement(e,b,l,r),m=n}this.updateSharedOptions(u,r,l)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let n=e.length-1;n>=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}const n=t.dataset,r=n.options&&n.options.borderWidth||0;if(!e.length)return r;const i=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(r,i,o)/2}}function si(t,e,n,r){const{controller:i,data:o,_sorted:a}=t,s=i._cachedMeta.iScale,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(s&&e===s.axis&&"r"!==e&&a&&o.length){const a=s._reversePixels?Ve:Fe;if(!r){const r=a(o,e,n);if(c){const{vScale:e}=i._cachedMeta,{_parsed:n}=t,o=n.slice(0,r.lo+1).reverse().findIndex(t=>!Gt(t[e.axis]));r.lo-=Math.max(0,o);const a=n.slice(r.hi).findIndex(t=>!Gt(t[e.axis]));r.hi+=Math.max(0,a)}return r}if(i._sharedOptions){const t=o[0],r="function"==typeof t.getRange&&t.getRange(e);if(r){const t=a(o,e,n-r),i=a(o,e,n+r);return{lo:t.lo,hi:i.hi}}}}return{lo:0,hi:o.length-1}}function ci(t,e,n,r,i){const o=t.getSortedVisibleDatasetMetas(),a=n[e];for(let s=0,c=o.length;s<c;++s){const{index:t,data:n}=o[s],{lo:c,hi:l}=si(o[s],e,a,i);for(let e=c;e<=l;++e){const i=n[e];i.skip||r(i,t,e)}}}function li(t,e,n,r,i){const o=[];if(!i&&!t.isPointInArea(e))return o;return ci(t,n,e,function(n,a,s){(i||bn(n,t.chartArea,0))&&n.inRange(e.x,e.y,r)&&o.push({element:n,datasetIndex:a,index:s})},!0),o}function ui(t,e,n,r){let i=[];return ci(t,n,e,function(t,n,o){const{startAngle:a,endAngle:s}=t.getProps(["startAngle","endAngle"],r),{angle:c}=function(t,e){const n=e.x-t.x,r=e.y-t.y,i=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o<-.5*me&&(o+=be),{angle:o,distance:i}}(t,{x:e.x,y:e.y});Le(c,a,s)&&i.push({element:t,datasetIndex:n,index:o})}),i}function hi(t,e,n,r,i,o){let a=[];const s=function(t){const e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,r){const i=e?Math.abs(t.x-r.x):0,o=n?Math.abs(t.y-r.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))}}(n);let c=Number.POSITIVE_INFINITY;return ci(t,n,e,function(n,l,u){const h=n.inRange(e.x,e.y,i);if(r&&!h)return;const d=n.getCenterPoint(i);if(!(!!o||t.isPointInArea(d))&&!h)return;const f=s(e,d);f<c?(a=[{element:n,datasetIndex:l,index:u}],c=f):f===c&&a.push({element:n,datasetIndex:l,index:u})}),a}function di(t,e,n,r,i,o){return o||t.isPointInArea(e)?"r"!==n||r?hi(t,e,n,r,i,o):ui(t,e,n,i):[]}function fi(t,e,n,r,i){const o=[],a="x"===n?"inXRange":"inYRange";let s=!1;return ci(t,n,e,(t,r,c)=>{t[a]&&t[a](e[n],i)&&(o.push({element:t,datasetIndex:r,index:c}),s=s||t.inRange(e.x,e.y,i))}),r&&!s?[]:o}var pi={modes:{index(t,e,n,r){const i=dr(e,t),o=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?li(t,i,o,r,a):di(t,i,o,!1,r,a),c=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{const e=s[0].index,n=t.data[e];n&&!n.skip&&c.push({element:n,datasetIndex:t.index,index:e})}),c):[]},dataset(t,e,n,r){const i=dr(e,t),o=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?li(t,i,o,r,a):di(t,i,o,!1,r,a);if(s.length>0){const e=s[0].datasetIndex,n=t.getDatasetMeta(e).data;s=[];for(let t=0;t<n.length;++t)s.push({element:n[t],datasetIndex:e,index:t})}return s},point:(t,e,n,r)=>li(t,dr(e,t),n.axis||"xy",r,n.includeInvisible||!1),nearest(t,e,n,r){const i=dr(e,t),o=n.axis||"xy",a=n.includeInvisible||!1;return di(t,i,o,n.intersect,r,a)},x:(t,e,n,r)=>fi(t,dr(e,t),"x",n.intersect,r),y:(t,e,n,r)=>fi(t,dr(e,t),"y",n.intersect,r)}};const gi=["left","top","right","bottom"];function yi(t,e){return t.filter(t=>t.pos===e)}function vi(t,e){return t.filter(t=>-1===gi.indexOf(t.pos)&&t.box.axis===e)}function mi(t,e){return t.sort((t,n)=>{const r=e?n:t,i=e?t:n;return r.weight===i.weight?r.index-i.index:r.weight-i.weight})}function bi(t,e){const n=function(t){const e={};for(const n of t){const{stack:t,pos:r,stackWeight:i}=n;if(!t||!gi.includes(r))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=i}return e}(t),{vBoxMaxWidth:r,hBoxMaxHeight:i}=e;let o,a,s;for(o=0,a=t.length;o<a;++o){s=t[o];const{fullSize:a}=s.box,c=n[s.stack],l=c&&s.stackWeight/c.weight;s.horizontal?(s.width=l?l*r:a&&e.availableWidth,s.height=i):(s.width=r,s.height=l?l*i:a&&e.availableHeight)}return n}function xi(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function wi(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function _i(t,e,n,r){const{pos:i,box:o}=n,a=t.maxPadding;if(!Qt(i)){n.size&&(t[i]-=n.size);const e=r[n.stack]||{size:0,count:1};e.size=Math.max(e.size,n.horizontal?o.height:o.width),n.size=e.size/e.count,t[i]+=n.size}o.getPadding&&wi(a,o.getPadding());const s=Math.max(0,e.outerWidth-xi(a,t,"left","right")),c=Math.max(0,e.outerHeight-xi(a,t,"top","bottom")),l=s!==t.w,u=c!==t.h;return t.w=s,t.h=c,n.horizontal?{same:l,other:u}:{same:u,other:l}}function Oi(t,e){const n=e.maxPadding;function r(t){const r={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{r[t]=Math.max(e[t],n[t])}),r}return r(t?["left","right"]:["top","bottom"])}function Si(t,e,n,r){const i=[];let o,a,s,c,l,u;for(o=0,a=t.length,l=0;o<a;++o){s=t[o],c=s.box,c.update(s.width||e.w,s.height||e.h,Oi(s.horizontal,e));const{same:a,other:h}=_i(e,n,s,r);l|=a&&i.length,u=u||h,c.fullSize||i.push(s)}return l&&Si(i,e,n,r)||u}function Pi(t,e,n,r,i){t.top=n,t.left=e,t.right=e+r,t.bottom=n+i,t.width=r,t.height=i}function Mi(t,e,n,r){const i=n.padding;let{x:o,y:a}=e;for(const s of t){const t=s.box,c=r[s.stack]||{placed:0,weight:1},l=s.stackWeight/c.weight||1;if(s.horizontal){const r=e.w*l,o=c.size||t.height;ge(c.start)&&(a=c.start),t.fullSize?Pi(t,i.left,a,n.outerWidth-i.right-i.left,o):Pi(t,e.left+c.placed,a,r,o),c.start=a,c.placed+=r,a=t.bottom}else{const r=e.h*l,a=c.size||t.width;ge(c.start)&&(o=c.start),t.fullSize?Pi(t,o,i.top,a,n.outerHeight-i.bottom-i.top):Pi(t,o,e.top+c.placed,a,r),c.start=o,c.placed+=r,o=t.right}}e.x=o,e.y=a}var ki={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,r){if(!t)return;const i=Rn(t.options.layout.padding),o=Math.max(e-i.width,0),a=Math.max(n-i.height,0),s=function(t){const e=function(t){const e=[];let n,r,i,o,a,s;for(n=0,r=(t||[]).length;n<r;++n)i=t[n],({position:o,options:{stack:a,stackWeight:s=1}}=i),e.push({index:n,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&o+a,stackWeight:s});return e}(t),n=mi(e.filter(t=>t.box.fullSize),!0),r=mi(yi(e,"left"),!0),i=mi(yi(e,"right")),o=mi(yi(e,"top"),!0),a=mi(yi(e,"bottom")),s=vi(e,"x"),c=vi(e,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(c).concat(a).concat(s),chartArea:yi(e,"chartArea"),vertical:r.concat(i).concat(c),horizontal:o.concat(a).concat(s)}}(t.boxes),c=s.vertical,l=s.horizontal;ie(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});const u=c.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,h=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/u,hBoxMaxHeight:a/2}),d=Object.assign({},i);wi(d,Rn(r));const f=Object.assign({maxPadding:d,w:o,h:a,x:i.left,y:i.top},i),p=bi(c.concat(l),h);Si(s.fullSize,f,h,p),Si(c,f,h,p),Si(l,f,h,p)&&Si(c,f,h,p),function(t){const e=t.maxPadding;function n(n){const r=Math.max(e[n]-t[n],0);return t[n]+=r,r}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(f),Mi(s.leftAndTop,f,h,p),f.x+=f.w,f.y+=f.h,Mi(s.rightAndBottom,f,h,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},ie(s.chartArea,e=>{const n=e.box;Object.assign(n,t.chartArea),n.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class Ei{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,r){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,r?Math.floor(e/r):n)}}isAttached(t){return!0}updateConfig(t){}}class Ai extends Ei{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Ci="$chartjs",Ii={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ji=t=>null===t||""===t;const Di=!!yr&&{passive:!0};function Ti(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,Di)}function Ri(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Li(t,e,n){const r=t.canvas,i=new MutationObserver(t=>{let e=!1;for(const n of t)e=e||Ri(n.addedNodes,r),e=e&&!Ri(n.removedNodes,r);e&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Bi(t,e,n){const r=t.canvas,i=new MutationObserver(t=>{let e=!1;for(const n of t)e=e||Ri(n.removedNodes,r),e=e&&!Ri(n.addedNodes,r);e&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Ni=new Map;let zi=0;function Fi(){const t=window.devicePixelRatio;t!==zi&&(zi=t,Ni.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Vi(t,e,n){const r=t.canvas,i=r&&sr(r);if(!i)return;const o=$e((t,e)=>{const r=i.clientWidth;n(t,e),r<i.clientWidth&&n()},window),a=new ResizeObserver(t=>{const e=t[0],n=e.contentRect.width,r=e.contentRect.height;0===n&&0===r||o(n,r)});return a.observe(i),function(t,e){Ni.size||window.addEventListener("resize",Fi),Ni.set(t,e)}(t,o),a}function Wi(t,e,n){n&&n.disconnect(),"resize"===e&&function(t){Ni.delete(t),Ni.size||window.removeEventListener("resize",Fi)}(t)}function Ui(t,e,n){const r=t.canvas,i=$e(e=>{null!==t.ctx&&n(function(t,e){const n=Ii[t.type]||t.type,{x:r,y:i}=dr(t,e);return{type:n,chart:e,native:t,x:void 0!==r?r:null,y:void 0!==i?i:null}}(e,t))},t);return function(t,e,n){t&&t.addEventListener(e,n,Di)}(r,e,i),i}class Ki extends Ei{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(function(t,e){const n=t.style,r=t.getAttribute("height"),i=t.getAttribute("width");if(t[Ci]={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",ji(i)){const e=vr(t,"width");void 0!==e&&(t.width=e)}if(ji(r))if(""===t.style.height)t.height=t.width/(e||2);else{const e=vr(t,"height");void 0!==e&&(t.height=e)}}(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[Ci])return!1;const n=e[Ci].initial;["height","width"].forEach(t=>{const r=n[t];Gt(r)?e.removeAttribute(t):e.setAttribute(t,r)});const r=n.style||{};return Object.keys(r).forEach(t=>{e.style[t]=r[t]}),e.width=e.width,delete e[Ci],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const r=t.$proxies||(t.$proxies={}),i={attach:Li,detach:Bi,resize:Vi}[e]||Ui;r[e]=i(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),r=n[e];if(!r)return;({attach:Wi,detach:Wi,resize:Wi}[e]||Ti)(t,e,r),n[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,r){return pr(t,e,n,r)}isAttached(t){const e=t&&sr(t);return!(!e||!e.isConnected)}}class Hi{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return Ce(this.x)&&Ce(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const r={};return t.forEach(t=>{r[t]=n[t]&&n[t].active()?n[t]._to:this[t]}),r}}function $i(t,e){const n=t.options.ticks,r=function(t){const e=t.options.offset,n=t._tickSize(),r=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(r,i))}(t),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?function(t){const e=[];let n,r;for(n=0,r=t.length;n<r;n++)t[n].major&&e.push(n);return e}(e):[],a=o.length,s=o[0],c=o[a-1],l=[];if(a>i)return function(t,e,n,r){let i,o=0,a=n[0];for(r=Math.ceil(r),i=0;i<t.length;i++)i===a&&(e.push(t[i]),o++,a=n[o*r])}(e,l,o,a/i),l;const u=function(t,e,n){const r=function(t){const e=t.length;let n,r;if(e<2)return!1;for(r=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==r)return!1;return r}(t),i=e.length/n;if(!r)return Math.max(i,1);const o=function(t){const e=[],n=Math.sqrt(t);let r;for(r=1;r<n;r++)t%r===0&&(e.push(r),e.push(t/r));return n===(0|n)&&e.push(n),e.sort((t,e)=>t-e).pop(),e}(r);for(let a=0,s=o.length-1;a<s;a++){const t=o[a];if(t>i)return t}return Math.max(i,1)}(o,e,i);if(a>0){let t,n;const r=a>1?Math.round((c-s)/(a-1)):null;for(Yi(e,l,u,Gt(r)?0:s-r,s),t=0,n=a-1;t<n;t++)Yi(e,l,u,o[t],o[t+1]);return Yi(e,l,u,c,Gt(r)?e.length:c+r),l}return Yi(e,l,u),l}function Yi(t,e,n,r,i){const o=ee(r,0),a=Math.min(ee(i,t.length),t.length);let s,c,l,u=0;for(n=Math.ceil(n),i&&(s=i-r,n=s/Math.floor(s/n)),l=o;l<0;)u++,l=Math.round(o+u*n);for(c=Math.max(o,0);c<a;c++)c===l&&(e.push(t[c]),u++,l=Math.round(o+u*n))}const Xi=(t,e,n)=>"top"===e||"left"===e?t[e]+n:t[e]-n,qi=(t,e)=>Math.min(e||t,t);function Gi(t,e){const n=[],r=t.length/e,i=t.length;let o=0;for(;o<i;o+=r)n.push(t[Math.floor(o)]);return n}function Zi(t,e,n){const r=t.ticks.length,i=Math.min(e,r-1),o=t._startPixel,a=t._endPixel,s=1e-6;let c,l=t.getPixelForTick(i);if(!(n&&(c=1===r?Math.max(l-o,a-l):0===e?(t.getPixelForTick(1)-l)/2:(l-t.getPixelForTick(i-1))/2,l+=i<e?c:-c,l<o-s||l>a+s)))return l}function Qi(t){return t.drawTicks?t.tickLength:0}function Ji(t,e){if(!t.display)return 0;const n=Ln(t.font,e),r=Rn(t.padding);return(Zt(t.text)?t.text.length:1)*n.lineHeight+r.height}function to(t,e,n){let r=(t=>"start"===t?"left":"end"===t?"right":"center")(t);return(n&&"right"!==e||!n&&"right"===e)&&(r=(t=>"left"===t?"right":"right"===t?"left":t)(r)),r}class eo extends Hi{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,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:n,_suggestedMax:r}=this;return t=te(t,Number.POSITIVE_INFINITY),e=te(e,Number.NEGATIVE_INFINITY),n=te(n,Number.POSITIVE_INFINITY),r=te(r,Number.NEGATIVE_INFINITY),{min:te(t,n),max:te(e,r),minDefined:Jt(t),maxDefined:Jt(e)}}getMinMax(t){let e,{min:n,max:r,minDefined:i,maxDefined:o}=this.getUserBounds();if(i&&o)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let s=0,c=a.length;s<c;++s)e=a[s].controller.getMinMax(this,t),i||(n=Math.min(n,e.min)),o||(r=Math.max(r,e.max));return n=o&&n>r?r:n,r=i&&n>r?n:r,{min:te(n,te(r,n)),max:te(r,te(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(){re(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:r,grace:i,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,n){const{min:r,max:i}=t,o=ne(e,(i-r)/2),a=(t,e)=>n&&0===t?0:t+e;return{min:a(r,-Math.abs(o)),max:a(i,o)}}(this,i,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const s=a<this.ticks.length;this._convertTicksToLabels(s?Gi(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(this.ticks=$i(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),s&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,n=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,n=!n),this._startPixel=t,this._endPixel=e,this._reversePixels=n,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){re(this.options.afterUpdate,[this])}beforeSetDimensions(){re(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(){re(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),re(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){re(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let n,r,i;for(n=0,r=t.length;n<r;n++)i=t[n],i.label=re(e.callback,[i.value,n,t],this)}afterTickToLabelConversion(){re(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){re(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,n=qi(this.ticks.length,t.ticks.maxTicksLimit),r=e.minRotation||0,i=e.maxRotation;let o,a,s,c=r;if(!this._isVisible()||!e.display||r>=i||n<=1||!this.isHorizontal())return void(this.labelRotation=r);const l=this._getLabelSizes(),u=l.widest.width,h=l.highest.height,d=Be(this.chart.width-u,0,this.maxWidth);o=t.offset?this.maxWidth/n:d/(n-1),u+6>o&&(o=d/(n-(t.offset?.5:1)),a=this.maxHeight-Qi(t.grid)-e.padding-Ji(t.title,this.chart.options.font),s=Math.sqrt(u*u+h*h),c=Math.min(Math.asin(Be((l.highest.height+6)/o,-1,1)),Math.asin(Be(a/s,-1,1))-Math.asin(Be(h/s,-1,1)))*(180/me),c=Math.max(r,Math.min(i,c))),this.labelRotation=c}afterCalculateLabelRotation(){re(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){re(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:r,grid:i}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const o=Ji(r,e.options.font);if(a?(t.width=this.maxWidth,t.height=Qi(i)+o):(t.height=this.maxHeight,t.width=Qi(i)+o),n.display&&this.ticks.length){const{first:e,last:r,widest:i,highest:o}=this._getLabelSizes(),s=2*n.padding,c=Ie(this.labelRotation),l=Math.cos(c),u=Math.sin(c);if(a){const e=n.mirror?0:u*i.width+l*o.height;t.height=Math.min(this.maxHeight,t.height+e+s)}else{const e=n.mirror?0:l*i.width+u*o.height;t.width=Math.min(this.maxWidth,t.width+e+s)}this._calculatePadding(e,r,u,l)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,r){const{ticks:{align:i,padding:o},position:a}=this.options,s=0!==this.labelRotation,c="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,l=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,h=0;s?c?(u=r*t.width,h=n*e.height):(u=n*t.height,h=r*e.width):"start"===i?h=e.width:"end"===i?u=t.width:"inner"!==i&&(u=t.width/2,h=e.width/2),this.paddingLeft=Math.max((u-a+o)*this.width/(this.width-a),0),this.paddingRight=Math.max((h-l+o)*this.width/(this.width-l),0)}else{let n=e.height/2,r=t.height/2;"start"===i?(n=0,r=t.height):"end"===i&&(n=e.height,r=0),this.paddingTop=n+o,this.paddingBottom=r+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(){re(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,n=t.length;e<n;e++)Gt(t[e].label)&&(t.splice(e,1),n--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let n=this.ticks;e<n.length&&(n=Gi(n,e)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,n){const{ctx:r,_longestTextCache:i}=this,o=[],a=[],s=Math.floor(e/qi(e,n));let c,l,u,h,d,f,p,g,y,v,m,b=0,x=0;for(c=0;c<e;c+=s){if(h=t[c].label,d=this._resolveTickFontOptions(c),r.font=f=d.string,p=i[f]=i[f]||{data:{},gc:[]},g=d.lineHeight,y=v=0,Gt(h)||Zt(h)){if(Zt(h))for(l=0,u=h.length;l<u;++l)m=h[l],Gt(m)||Zt(m)||(y=gn(r,p.data,p.gc,y,m),v+=g)}else y=gn(r,p.data,p.gc,y,h),v=g;o.push(y),a.push(v),b=Math.max(y,b),x=Math.max(v,x)}!function(t,e){ie(t,t=>{const n=t.gc,r=n.length/2;let i;if(r>e){for(i=0;i<r;++i)delete t.data[n[i]];n.splice(0,r)}})}(i,e);const w=o.indexOf(b),_=a.indexOf(x),O=t=>({width:o[t]||0,height:a[t]||0});return{first:O(0),last:O(e-1),widest:O(w),highest:O(_),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Be(this._alignToPixels?yn(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const n=e[t];return n.$context||(n.$context=function(t,e,n){return Nn(t,{tick:n,index:e,type:"tick"})}(this.getContext(),t,n))}return this.$context||(this.$context=Nn(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=Ie(this.labelRotation),n=Math.abs(Math.cos(e)),r=Math.abs(Math.sin(e)),i=this._getLabelSizes(),o=t.autoSkipPadding||0,a=i?i.widest.width+o:0,s=i?i.highest.height+o:0;return this.isHorizontal()?s*n>a*r?a/n:s/r:s*r<a*n?s/n:a/r}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,n=this.chart,r=this.options,{grid:i,position:o,border:a}=r,s=i.offset,c=this.isHorizontal(),l=this.ticks.length+(s?1:0),u=Qi(i),h=[],d=a.setContext(this.getContext()),f=d.display?d.width:0,p=f/2,g=function(t){return yn(n,t,f)};let y,v,m,b,x,w,_,O,S,P,M,k;if("top"===o)y=g(this.bottom),w=this.bottom-u,O=y-p,P=g(t.top)+p,k=t.bottom;else if("bottom"===o)y=g(this.top),P=t.top,k=g(t.bottom)-p,w=y+p,O=this.top+u;else if("left"===o)y=g(this.right),x=this.right-u,_=y-p,S=g(t.left)+p,M=t.right;else if("right"===o)y=g(this.left),S=t.left,M=g(t.right)-p,x=y+p,_=this.left+u;else if("x"===e){if("center"===o)y=g((t.top+t.bottom)/2+.5);else if(Qt(o)){const t=Object.keys(o)[0],e=o[t];y=g(this.chart.scales[t].getPixelForValue(e))}P=t.top,k=t.bottom,w=y+p,O=w+u}else if("y"===e){if("center"===o)y=g((t.left+t.right)/2);else if(Qt(o)){const t=Object.keys(o)[0],e=o[t];y=g(this.chart.scales[t].getPixelForValue(e))}x=y-p,_=x-u,S=t.left,M=t.right}const E=ee(r.ticks.maxTicksLimit,l),A=Math.max(1,Math.ceil(l/E));for(v=0;v<l;v+=A){const t=this.getContext(v),e=i.setContext(t),r=a.setContext(t),o=e.lineWidth,l=e.color,u=r.dash||[],d=r.dashOffset,f=e.tickWidth,p=e.tickColor,g=e.tickBorderDash||[],y=e.tickBorderDashOffset;m=Zi(this,v,s),void 0!==m&&(b=yn(n,m,o),c?x=_=S=M=b:w=O=P=k=b,h.push({tx1:x,ty1:w,tx2:_,ty2:O,x1:S,y1:P,x2:M,y2:k,width:o,color:l,borderDash:u,borderDashOffset:d,tickWidth:f,tickColor:p,tickBorderDash:g,tickBorderDashOffset:y}))}return this._ticksLength=l,this._borderValue=y,h}_computeLabelItems(t){const e=this.axis,n=this.options,{position:r,ticks:i}=n,o=this.isHorizontal(),a=this.ticks,{align:s,crossAlign:c,padding:l,mirror:u}=i,h=Qi(n.grid),d=h+l,f=u?-l:d,p=-Ie(this.labelRotation),g=[];let y,v,m,b,x,w,_,O,S,P,M,k,E="middle";if("top"===r)w=this.bottom-f,_=this._getXAxisLabelAlignment();else if("bottom"===r)w=this.top+f,_=this._getXAxisLabelAlignment();else if("left"===r){const t=this._getYAxisLabelAlignment(h);_=t.textAlign,x=t.x}else if("right"===r){const t=this._getYAxisLabelAlignment(h);_=t.textAlign,x=t.x}else if("x"===e){if("center"===r)w=(t.top+t.bottom)/2+d;else if(Qt(r)){const t=Object.keys(r)[0],e=r[t];w=this.chart.scales[t].getPixelForValue(e)+d}_=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===r)x=(t.left+t.right)/2-d;else if(Qt(r)){const t=Object.keys(r)[0],e=r[t];x=this.chart.scales[t].getPixelForValue(e)}_=this._getYAxisLabelAlignment(h).textAlign}"y"===e&&("start"===s?E="top":"end"===s&&(E="bottom"));const A=this._getLabelSizes();for(y=0,v=a.length;y<v;++y){m=a[y],b=m.label;const t=i.setContext(this.getContext(y));O=this.getPixelForTick(y)+i.labelOffset,S=this._resolveTickFontOptions(y),P=S.lineHeight,M=Zt(b)?b.length:1;const e=M/2,n=t.color,s=t.textStrokeColor,l=t.textStrokeWidth;let h,d=_;if(o?(x=O,"inner"===_&&(d=y===v-1?this.options.reverse?"left":"right":0===y?this.options.reverse?"right":"left":"center"),k="top"===r?"near"===c||0!==p?-M*P+P/2:"center"===c?-A.highest.height/2-e*P+P:-A.highest.height+P/2:"near"===c||0!==p?P/2:"center"===c?A.highest.height/2-e*P:A.highest.height-M*P,u&&(k*=-1),0===p||t.showLabelBackdrop||(x+=P/2*Math.sin(p))):(w=O,k=(1-M)*P/2),t.showLabelBackdrop){const e=Rn(t.backdropPadding),n=A.heights[y],r=A.widths[y];let i=k-e.top,o=0-e.left;switch(E){case"middle":i-=n/2;break;case"bottom":i-=n}switch(_){case"center":o-=r/2;break;case"right":o-=r;break;case"inner":y===v-1?o-=r:y>0&&(o-=r/2)}h={left:o,top:i,width:r+e.width,height:n+e.height,color:t.backdropColor}}g.push({label:b,font:S,textOffset:k,options:{rotation:p,color:n,strokeColor:s,strokeWidth:l,textAlign:d,textBaseline:E,translation:[x,w],backdrop:h}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Ie(this.labelRotation))return"top"===t?"left":"right";let n="center";return"start"===e.align?n="left":"end"===e.align?n="right":"inner"===e.align&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:n,mirror:r,padding:i}}=this.options,o=t+i,a=this._getLabelSizes().widest.width;let s,c;return"left"===e?r?(c=this.right+i,"near"===n?s="left":"center"===n?(s="center",c+=a/2):(s="right",c+=a)):(c=this.right-o,"near"===n?s="right":"center"===n?(s="center",c-=a/2):(s="left",c=this.left)):"right"===e?r?(c=this.left+i,"near"===n?s="right":"center"===n?(s="center",c-=a/2):(s="left",c-=a)):(c=this.left+o,"near"===n?s="left":"center"===n?(s="center",c+=a/2):(s="right",c=this.right)):s="right",{textAlign:s,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:n,top:r,width:i,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,r,i,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(e=>e.value===t);if(n>=0){return e.setContext(this.getContext(n)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,n=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let i,o;const a=(t,e,r)=>{r.width&&r.color&&(n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.setLineDash(r.borderDash||[]),n.lineDashOffset=r.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(e.display)for(i=0,o=r.length;i<o;++i){const t=r[i];e.drawOnChartArea&&a({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&a({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:n,grid:r}}=this,i=n.setContext(this.getContext()),o=n.display?i.width:0;if(!o)return;const a=r.setContext(this.getContext(0)).lineWidth,s=this._borderValue;let c,l,u,h;this.isHorizontal()?(c=yn(t,this.left,o)-o/2,l=yn(t,this.right,a)+a/2,u=h=s):(u=yn(t,this.top,o)-o/2,h=yn(t,this.bottom,a)+a/2,c=l=s),e.save(),e.lineWidth=i.width,e.strokeStyle=i.color,e.beginPath(),e.moveTo(c,u),e.lineTo(l,h),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,n=this._computeLabelArea();n&&xn(e,n);const r=this.getLabelItems(t);for(const i of r){const t=i.options,n=i.font;Mn(e,i.label,0,i.textOffset,n,t)}n&&wn(e)}drawTitle(){const{ctx:t,options:{position:e,title:n,reverse:r}}=this;if(!n.display)return;const i=Ln(n.font),o=Rn(n.padding),a=n.align;let s=i.lineHeight/2;"bottom"===e||"center"===e||Qt(e)?(s+=o.bottom,Zt(n.text)&&(s+=i.lineHeight*(n.text.length-1))):s+=o.top;const{titleX:c,titleY:l,maxWidth:u,rotation:h}=function(t,e,n,r){const{top:i,left:o,bottom:a,right:s,chart:c}=t,{chartArea:l,scales:u}=c;let h,d,f,p=0;const g=a-i,y=s-o;if(t.isHorizontal()){if(d=Ye(r,o,s),Qt(n)){const t=Object.keys(n)[0],r=n[t];f=u[t].getPixelForValue(r)+g-e}else f="center"===n?(l.bottom+l.top)/2+g-e:Xi(t,n,e);h=s-o}else{if(Qt(n)){const t=Object.keys(n)[0],r=n[t];d=u[t].getPixelForValue(r)-y+e}else d="center"===n?(l.left+l.right)/2-y+e:Xi(t,n,e);f=Ye(r,a,i),p="left"===n?-Oe:Oe}return{titleX:d,titleY:f,maxWidth:h,rotation:p}}(this,s,e,a);Mn(t,n.text,0,0,i,{color:n.color,maxWidth:u,rotation:h,textAlign:to(a,e,r),textBaseline:"middle",translation:[c,l]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,n=ee(t.grid&&t.grid.z,-1),r=ee(t.border&&t.border.z,0);return this._isVisible()&&this.draw===eo.prototype.draw?[{z:n,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",r=[];let i,o;for(i=0,o=e.length;i<o;++i){const o=e[i];o[n]!==this.id||t&&o.type!==t||r.push(o)}return r}_resolveTickFontOptions(t){return Ln(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class no{constructor(t,e,n){this.type=t,this.scope=e,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let n;(function(t){return"id"in t&&"defaults"in t})(e)&&(n=this.register(e));const r=this.items,i=t.id,o=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+t);return i in r||(r[i]=t,function(t,e,n){const r=le(Object.create(null),[n?pn.get(n):{},pn.get(e),t.defaults]);pn.set(e,r),t.defaultRoutes&&function(t,e){Object.keys(e).forEach(n=>{const r=n.split("."),i=r.pop(),o=[t].concat(r).join("."),a=e[n].split("."),s=a.pop(),c=a.join(".");pn.route(o,i,c,s)})}(e,t.defaultRoutes);t.descriptors&&pn.describe(e,t.descriptors)}(t,o,n),this.override&&pn.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,n=t.id,r=this.scope;n in e&&delete e[n],r&&n in pn[r]&&(delete pn[r][n],this.override&&delete ln[n])}}class ro{constructor(){this.controllers=new no(Yr,"datasets",!0),this.elements=new no(Hi,"elements"),this.plugins=new no(Object,"plugins"),this.scales=new no(eo,"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,e,n){[...e].forEach(e=>{const r=n||this._getRegistryForType(e);n||r.isForType(e)||r===this.plugins&&e.id?this._exec(t,r,e):ie(e,e=>{const r=n||this._getRegistryForType(e);this._exec(t,r,e)})})}_exec(t,e,n){const r=pe(t);re(n["before"+r],[],n),e[t](n),re(n["after"+r],[],n)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}_get(t,e,n){const r=e.get(t);if(void 0===r)throw new Error('"'+t+'" is not a registered '+n+".");return r}}var io=new ro;class oo{constructor(){this._init=void 0}notify(t,e,n,r){if("beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),void 0===this._init)return;const i=r?this._descriptors(t).filter(r):this._descriptors(t),o=this._notify(i,t,e,n);return"afterDestroy"===e&&(this._notify(i,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),o}_notify(t,e,n,r){r=r||{};for(const i of t){const t=i.plugin;if(!1===re(t[n],[e,r,i.options],t)&&r.cancelable)return!1}return!0}invalidate(){Gt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const n=t&&t.config,r=ee(n.options&&n.options.plugins,{}),i=function(t){const e={},n=[],r=Object.keys(io.plugins.items);for(let o=0;o<r.length;o++)n.push(io.getPlugin(r[o]));const i=t.plugins||[];for(let o=0;o<i.length;o++){const t=i[o];-1===n.indexOf(t)&&(n.push(t),e[t.id]=!0)}return{plugins:n,localIds:e}}(n);return!1!==r||e?function(t,{plugins:e,localIds:n},r,i){const o=[],a=t.getContext();for(const s of e){const e=s.id,c=ao(r[e],i);null!==c&&o.push({plugin:s,options:so(t.config,{plugin:s,local:n[e]},c,a)})}return o}(t,i,r,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],n=this._cache,r=(t,e)=>t.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(r(e,n),t,"stop"),this._notify(r(n,e),t,"start")}}function ao(t,e){return e||!1!==t?!0===t?{}:t:null}function so(t,{plugin:e,local:n},r,i){const o=t.pluginScopeKeys(e),a=t.getOptionScopes(r,o);return n&&e.defaults&&a.push(e.defaults),t.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function co(t,e){const n=pn.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function lo(t){if("x"===t||"y"===t||"r"===t)return t}function uo(t){return"top"===t||"bottom"===t?"x":"left"===t||"right"===t?"y":void 0}function ho(t,...e){if(lo(t))return t;for(const n of e){const e=n.axis||uo(n.position)||t.length>1&&lo(t[0].toLowerCase());if(e)return e}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function fo(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function po(t,e){const n=ln[t.type]||{scales:{}},r=e.scales||{},i=co(t.type,e),o=Object.create(null);return Object.keys(r).forEach(e=>{const a=r[e];if(!Qt(a))return console.error(`Invalid scale configuration for scale: ${e}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const s=ho(e,a,function(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(e=>e.xAxisID===t||e.yAxisID===t);if(n.length)return fo(t,"x",n[0])||fo(t,"y",n[0])}return{}}(e,t),pn.scales[a.type]),c=function(t,e){return t===e?"_index_":"_value_"}(s,i),l=n.scales||{};o[e]=ue(Object.create(null),[{axis:s},a,l[s],l[c]])}),t.data.datasets.forEach(n=>{const i=n.type||t.type,a=n.indexAxis||co(i,e),s=(ln[i]||{}).scales||{};Object.keys(s).forEach(t=>{const e=function(t,e){let n=t;return"_index_"===t?n=e:"_value_"===t&&(n="x"===e?"y":"x"),n}(t,a),i=n[e+"AxisID"]||e;o[i]=o[i]||Object.create(null),ue(o[i],[{axis:e},r[i],s[t]])})}),Object.keys(o).forEach(t=>{const e=o[t];ue(e,[pn.scales[e.type],pn.scale])}),o}function go(t){const e=t.options||(t.options={});e.plugins=ee(e.plugins,{}),e.scales=po(t,e)}function yo(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const vo=new Map,mo=new Set;function bo(t,e){let n=vo.get(t);return n||(n=e(),vo.set(t,n),mo.add(n)),n}const xo=(t,e,n)=>{const r=fe(e,n);void 0!==r&&t.add(r)};class wo{constructor(t){this._config=function(t){return(t=t||{}).data=yo(t.data),go(t),t}(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=yo(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(),go(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return bo(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return bo(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return bo(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id;return bo(`${this.type}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const n=this._scopeCache;let r=n.get(t);return r&&!e||(r=new Map,n.set(t,r)),r}getOptionScopes(t,e,n){const{options:r,type:i}=this,o=this._cachedScopes(t,n),a=o.get(e);if(a)return a;const s=new Set;e.forEach(e=>{t&&(s.add(t),e.forEach(e=>xo(s,t,e))),e.forEach(t=>xo(s,r,t)),e.forEach(t=>xo(s,ln[i]||{},t)),e.forEach(t=>xo(s,pn,t)),e.forEach(t=>xo(s,un,t))});const c=Array.from(s);return 0===c.length&&c.push(Object.create(null)),mo.has(e)&&o.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,ln[e]||{},pn.datasets[e]||{},{type:e},pn,un]}resolveNamedOptions(t,e,n,r=[""]){const i={$shared:!0},{resolver:o,subPrefixes:a}=_o(this._resolverCache,t,r);let s=o;if(function(t,e){const{isScriptable:n,isIndexable:r}=Vn(t);for(const i of e){const e=n(i),o=r(i),a=(o||e)&&t[i];if(e&&(ye(a)||Oo(a))||o&&Zt(a))return!0}return!1}(o,e)){i.$shared=!1;s=Fn(o,n=ye(n)?n():n,this.createResolver(t,n,a))}for(const c of e)i[c]=s[c];return i}createResolver(t,e,n=[""],r){const{resolver:i}=_o(this._resolverCache,t,n);return Qt(e)?Fn(i,e,void 0,r):i}}function _o(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));const i=n.join();let o=r.get(i);if(!o){o={resolver:zn(e,n),subPrefixes:n.filter(t=>!t.toLowerCase().includes("hover"))},r.set(i,o)}return o}const Oo=t=>Qt(t)&&Object.getOwnPropertyNames(t).some(e=>ye(t[e]));const So=["top","bottom","left","right","chartArea"];function Po(t,e){return"top"===t||"bottom"===t||-1===So.indexOf(t)&&"x"===e}function Mo(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}function ko(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),re(n&&n.onComplete,[t],e)}function Eo(t){const e=t.chart,n=e.options.animation;re(n&&n.onProgress,[t],e)}function Ao(t){return ar()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Co={},Io=t=>{const e=Ao(t);return Object.values(Co).filter(t=>t.canvas===e).pop()};function jo(t,e,n){const r=Object.keys(t);for(const i of r){const r=+i;if(r>=e){const o=t[i];delete t[i],(n>0||r>e)&&(t[r+n]=o)}}}class Do{static defaults=pn;static instances=Co;static overrides=ln;static registry=io;static version="4.5.1";static getChart=Io;static register(...t){io.add(...t),To()}static unregister(...t){io.remove(...t),To()}constructor(t,e){const n=this.config=new wo(e),r=Ao(t),i=Io(r);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const o=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function(t){return!ar()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Ai:Ki}(r)),this.platform.updateConfig(n);const a=this.platform.acquireContext(r,o.aspectRatio),s=a&&a.canvas,c=s&&s.height,l=s&&s.width;this.id=qt(),this.ctx=a,this.canvas=s,this.width=l,this.height=c,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 oo,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let n;return function(...r){return e?(clearTimeout(n),n=setTimeout(t,e,r)):t.apply(this,r),e}}(t=>this.update(t),o.resizeDelay||0),this._dataChanges=[],Co[this.id]=this,a&&s?(Ir.listen(this,"complete",ko),Ir.listen(this,"progress",Eo),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:r,_aspectRatio:i}=this;return Gt(t)?e&&i?i:r?n/r: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 io}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():gr(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return vn(this.canvas,this.ctx),this}stop(){return Ir.stop(this),this}resize(t,e){Ir.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,r=this.canvas,i=n.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(r,t,e,i),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,gr(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),re(n.onResize,[this,o],this),this.attached&&this._doResize(s)&&this.render())}ensureScalesHaveIDs(){ie(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,r=Object.keys(n).reduce((t,e)=>(t[e]=!1,t),{});let i=[];e&&(i=i.concat(Object.keys(e).map(t=>{const n=e[t],r=ho(t,n),i="r"===r,o="x"===r;return{options:n,dposition:i?"chartArea":o?"bottom":"left",dtype:i?"radialLinear":o?"category":"linear"}}))),ie(i,e=>{const i=e.options,o=i.id,a=ho(o,i),s=ee(i.type,e.dtype);void 0!==i.position&&Po(i.position,a)===Po(e.dposition)||(i.position=e.dposition),r[o]=!0;let c=null;if(o in n&&n[o].type===s)c=n[o];else{c=new(io.getScale(s))({id:o,type:s,ctx:this.ctx,chart:this}),n[c.id]=c}c.init(i,t)}),ie(r,(t,e)=>{t||delete n[e]}),ie(n,t=>{ki.configure(this,t,t.options),ki.addBox(this,t)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort((t,e)=>t.index-e.index),n>e){for(let t=e;t<n;++t)this._destroyDatasetMeta(t);t.splice(e,n-e)}this._sortedMetasets=t.slice(0).sort(Mo("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((t,n)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,r;for(this._removeUnreferencedMetasets(),n=0,r=e.length;n<r;n++){const r=e[n];let i=this.getDatasetMeta(n);const o=r.type||this.config.type;if(i.type&&i.type!==o&&(this._destroyDatasetMeta(n),i=this.getDatasetMeta(n)),i.type=o,i.indexAxis=r.indexAxis||co(o,this.options),i.order=r.order||0,i.index=n,i.label=""+r.label,i.visible=this.isDatasetVisible(n),i.controller)i.controller.updateIndex(n),i.controller.linkScales();else{const e=io.getController(o),{datasetElementType:r,dataElementType:a}=pn.datasets[o];Object.assign(e,{dataElementType:io.getElement(a),datasetElementType:r&&io.getElement(r)}),i.controller=new e(this,n),t.push(i.controller)}}return this._updateMetasets(),t}_resetElements(){ie(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,l=this.data.datasets.length;c<l;c++){const{controller:t}=this.getDatasetMeta(c),e=!r&&-1===i.indexOf(t);t.buildOrUpdateElements(e),o=Math.max(+t.getMaxOverflow(),o)}o=this._minPadding=n.layout.autoPadding?o:0,this._updateLayout(o),r||ie(i,t=>{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Mo("z","_idx"));const{_active:a,_lastEvent:s}=this;s?this._eventHandler(s,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){ie(this.scales,t=>{ki.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);ve(e,n)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:r,count:i}of e){jo(t,r,"_removeElements"===n?-i:i)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),r=n(0);for(let i=1;i<e;i++)if(!ve(r,n(i)))return;return Array.from(r).map(t=>t.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;ki.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],ie(this.boxes,t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,n=this.data.datasets.length;e<n;++e)this._updateDataset(e,ye(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const n=this.getDatasetMeta(t),r={meta:n,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",r)&&(n.controller._update(e),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(Ir.has(this)?this.attached&&!Ir.running(this)&&Ir.start(this):(this.draw(),ko({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,n=[];let r,i;for(r=0,i=e.length;r<i;++r){const i=e[r];t&&!i.visible||n.push(i)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n={meta:t,index:t.index,cancelable:!0},r=Ar(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",n)&&(r&&xn(e,r),t.controller.draw(),r&&wn(e),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return bn(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,r){const i=pi.modes[e];return"function"==typeof i?i(this,t,n,r):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let r=n.filter(t=>t&&t._dataset===e).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||(this.$context=Nn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return"boolean"==typeof n.hidden?!n.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const r=n?"show":"hide",i=this.getDatasetMeta(t),o=i.controller._resolveAnimations(void 0,r);ge(e)?(i.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),o.update(i,{visible:n}),this.update(e=>e.datasetIndex===t?r:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Ir.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),vn(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Co[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,e=this.platform,n=(n,r)=>{e.addEventListener(this,n,r),t[n]=r},r=(t,e,n)=>{t.offsetX=e,t.offsetY=n,this._eventHandler(t)};ie(this.options.events,t=>n(t,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(n,r)=>{e.addEventListener(this,n,r),t[n]=r},r=(n,r)=>{t[n]&&(e.removeEventListener(this,n,r),delete t[n])},i=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const a=()=>{r("attach",a),this.attached=!0,this.resize(),n("resize",i),n("detach",o)};o=()=>{this.attached=!1,r("resize",i),this._stop(),this._resize(0,0),n("attach",a)},e.isAttached(this.canvas)?a():o()}unbindEvents(){ie(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},ie(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const r=n?"set":"remove";let i,o,a,s;for("dataset"===e&&(i=this.getDatasetMeta(t[0].datasetIndex),i.controller["_"+r+"DatasetHoverStyle"]()),a=0,s=t.length;a<s;++a){o=t[a];const e=o&&this.getDatasetMeta(o.datasetIndex).controller;e&&e[r+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],n=t.map(({datasetIndex:t,index:e})=>{const n=this.getDatasetMeta(t);if(!n)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[e],index:e}});!oe(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return 1===this._plugins._cache.filter(e=>e.plugin.id===t).length}_updateHoverStyles(t,e,n){const r=this.options.hover,i=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),o=i(e,t),a=n?t:i(t,e);o.length&&this.updateHoverStyle(o,r.mode,!1),a.length&&r.mode&&this.updateHoverStyle(a,r.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},r=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",n,r))return;const i=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,r),(i||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:r=[],options:i}=this,o=e,a=this._getActiveElements(t,r,n,o),s=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),c=function(t,e,n,r){return n&&"mouseout"!==t.type?r?e:t:null}(t,this._lastEvent,n,s);n&&(this._lastEvent=null,re(i.onHover,[t,a,this],this),s&&re(i.onClick,[t,a,this],this));const l=!oe(a,r);return(l||e)&&(this._active=a,this._updateHoverStyles(a,r,e)),this._lastEvent=c,l}_getActiveElements(t,e,n,r){if("mouseout"===t.type)return[];if(!n)return e;const i=this.options.hover;return this.getElementsAtEventForMode(t,i.mode,i,r)}}function To(){return ie(Do.instances,t=>t._plugins.invalidate())}function Ro(t,e,n=e){t.lineCap=ee(n.borderCapStyle,e.borderCapStyle),t.setLineDash(ee(n.borderDash,e.borderDash)),t.lineDashOffset=ee(n.borderDashOffset,e.borderDashOffset),t.lineJoin=ee(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=ee(n.borderWidth,e.borderWidth),t.strokeStyle=ee(n.borderColor,e.borderColor)}function Lo(t,e,n){t.lineTo(n.x,n.y)}function Bo(t,e,n={}){const r=t.length,{start:i=0,end:o=r-1}=n,{start:a,end:s}=e,c=Math.max(i,a),l=Math.min(o,s),u=i<a&&o<a||i>s&&o>s;return{count:r,start:c,loop:e.loop,ilen:l<c&&!u?r+l-c:l-c}}function No(t,e,n,r){const{points:i,options:o}=e,{count:a,start:s,loop:c,ilen:l}=Bo(i,n,r),u=function(t){return t.stepped?_n:t.tension||"monotone"===t.cubicInterpolationMode?On:Lo}(o);let h,d,f,{move:p=!0,reverse:g}=r||{};for(h=0;h<=l;++h)d=i[(s+(g?l-h:h))%a],d.skip||(p?(t.moveTo(d.x,d.y),p=!1):u(t,f,d,g,o.stepped),f=d);return c&&(d=i[(s+(g?l:0))%a],u(t,f,d,g,o.stepped)),!!c}function zo(t,e,n,r){const i=e.points,{count:o,start:a,ilen:s}=Bo(i,n,r),{move:c=!0,reverse:l}=r||{};let u,h,d,f,p,g,y=0,v=0;const m=t=>(a+(l?s-t:t))%o,b=()=>{f!==p&&(t.lineTo(y,p),t.lineTo(y,f),t.lineTo(y,g))};for(c&&(h=i[m(0)],t.moveTo(h.x,h.y)),u=0;u<=s;++u){if(h=i[m(u)],h.skip)continue;const e=h.x,n=h.y,r=0|e;r===d?(n<f?f=n:n>p&&(p=n),y=(v*y+e)/++v):(b(),t.lineTo(e,n),d=r,v=0,f=p=n),g=n}b()}function Fo(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||n)?zo:No}const Vo="function"==typeof Path2D;function Wo(t,e,n,r){Vo&&!e.options.segment?function(t,e,n,r){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,r)&&i.closePath()),Ro(t,e.options),t.stroke(i)}(t,e,n,r):function(t,e,n,r){const{segments:i,options:o}=e,a=Fo(e);for(const s of i)Ro(t,o,s.style),t.beginPath(),a(t,e,s,{start:n,end:n+r-1})&&t.closePath(),t.stroke()}(t,e,n,r)}class Uo extends Hi{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=>"borderDash"!==t&&"fill"!==t};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,e){const n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const r=n.spanGaps?this._loop:this._fullLoop;or(this._points,n,t,r,e),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=function(t,e){const n=t.points,r=t.options.spanGaps,i=n.length;if(!i)return[];const o=!!t._loop,{start:a,end:s}=function(t,e,n,r){let i=0,o=e-1;if(n&&!r)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(o+=i);o>i&&t[o%e].skip;)o--;return o%=e,{start:i,end:o}}(n,i,o,r);return Pr(t,!0===r?[{start:a,end:s,loop:o}]:function(t,e,n,r){const i=t.length,o=[];let a,s=e,c=t[e];for(a=e+1;a<=n;++a){const n=t[a%i];n.skip||n.stop?c.skip||(r=!1,o.push({start:e%i,end:(a-1)%i,loop:r}),e=s=n.stop?a:null):(s=a,c.skip&&(e=a)),c=n}return null!==s&&o.push({start:e%i,end:s%i,loop:r}),o}(n,a,s<a?s+i:s,!!t._fullLoop&&0===a&&s===i-1),n,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){const n=this.options,r=t[e],i=this.points,o=function(t,e){const n=[],r=t.segments;for(let i=0;i<r.length;i++){const o=Sr(r[i],t.points,e);o.length&&n.push(...o)}return n}(this,{property:e,start:r,end:r});if(!o.length)return;const a=[],s=function(t){return t.stepped?br:t.tension||"monotone"===t.cubicInterpolationMode?xr:mr}(n);let c,l;for(c=0,l=o.length;c<l;++c){const{start:l,end:u}=o[c],h=i[l],d=i[u];if(h===d){a.push(h);continue}const f=s(h,d,Math.abs((r-h[e])/(d[e]-h[e])),n.stepped);f[e]=t[e],a.push(f)}return 1===a.length?a[0]:a}pathSegment(t,e,n){return Fo(this)(t,this,e,n)}path(t,e,n){const r=this.segments,i=Fo(this);let o=this._loop;e=e||0,n=n||this.points.length-e;for(const a of r)o&=i(t,this,a,{start:e,end:e+n-1});return!!o}draw(t,e,n,r){const i=this.options||{};(this.points||[]).length&&i.borderWidth&&(t.save(),Wo(t,this,n,r),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Ko(t,e,n,r){const i=t.options,{[n]:o}=t.getProps([n],r);return Math.abs(e-o)<i.radius+i.hitRadius}class Ho extends Hi{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,e,n){const r=this.options,{x:i,y:o}=this.getProps(["x","y"],n);return Math.pow(t-i,2)+Math.pow(e-o,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(t,e){return Ko(this,t,"x",e)}inYRange(t,e){return Ko(this,t,"y",e)}getCenterPoint(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const n=this.options;this.skip||n.radius<.1||!bn(this,e,this.size(n)/2)||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,mn(t,n,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function $o(t,e){const{x:n,y:r,base:i,width:o,height:a}=t.getProps(["x","y","base","width","height"],e);let s,c,l,u,h;return t.horizontal?(h=a/2,s=Math.min(n,i),c=Math.max(n,i),l=r-h,u=r+h):(h=o/2,s=n-h,c=n+h,l=Math.min(r,i),u=Math.max(r,i)),{left:s,top:l,right:c,bottom:u}}function Yo(t,e,n,r){return t?0:Be(e,n,r)}function Xo(t){const e=$o(t),n=e.right-e.left,r=e.bottom-e.top,i=function(t,e,n){const r=t.options.borderWidth,i=t.borderSkipped,o=Dn(r);return{t:Yo(i.top,o.top,0,n),r:Yo(i.right,o.right,0,e),b:Yo(i.bottom,o.bottom,0,n),l:Yo(i.left,o.left,0,e)}}(t,n/2,r/2),o=function(t,e,n){const{enableBorderRadius:r}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,o=Tn(i),a=Math.min(e,n),s=t.borderSkipped,c=r||Qt(i);return{topLeft:Yo(!c||s.top||s.left,o.topLeft,0,a),topRight:Yo(!c||s.top||s.right,o.topRight,0,a),bottomLeft:Yo(!c||s.bottom||s.left,o.bottomLeft,0,a),bottomRight:Yo(!c||s.bottom||s.right,o.bottomRight,0,a)}}(t,n/2,r/2);return{outer:{x:e.left,y:e.top,w:n,h:r,radius:o},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function qo(t,e,n,r){const i=null===e,o=null===n,a=t&&!(i&&o)&&$o(t,r);return a&&(i||Ne(e,a.left,a.right))&&(o||Ne(n,a.top,a.bottom))}function Go(t,e){t.rect(e.x,e.y,e.w,e.h)}function Zo(t,e,n={}){const r=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,o=(t.x+t.w!==n.x+n.w?e:0)-r,a=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+r,y:t.y+i,w:t.w+o,h:t.h+a,radius:t.radius}}class Qo extends Hi{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:e,options:{borderColor:n,backgroundColor:r}}=this,{inner:i,outer:o}=Xo(this),a=(s=o.radius).topLeft||s.topRight||s.bottomLeft||s.bottomRight?kn:Go;var s;t.save(),o.w===i.w&&o.h===i.h||(t.beginPath(),a(t,Zo(o,e,i)),t.clip(),a(t,Zo(i,-e,o)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),a(t,Zo(i,e)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,e,n){return qo(this,t,e,n)}inXRange(t,e){return qo(this,t,null,e)}inYRange(t,e){return qo(this,null,t,e)}getCenterPoint(t){const{x:e,y:n,base:r,horizontal:i}=this.getProps(["x","y","base","horizontal"],t);return{x:i?(e+r)/2:e,y:i?n:(n+r)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}const Jo=["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)"],ta=Jo.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function ea(t){return Jo[t%Jo.length]}function na(t){return ta[t%ta.length]}function ra(t){let e=0;return(n,r)=>{const i=t.getDatasetMeta(r).controller;i instanceof ri?e=function(t,e){return t.backgroundColor=t.data.map(()=>ea(e++)),e}(n,e):i instanceof oi?e=function(t,e){return t.backgroundColor=t.data.map(()=>na(e++)),e}(n,e):i&&(e=function(t,e){return t.borderColor=ea(e),t.backgroundColor=na(e),++e}(n,e))}}function ia(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var oa={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:r},options:i}=t.config,{elements:o}=i,a=ia(r)||(s=i)&&(s.borderColor||s.backgroundColor)||o&&ia(o)||"rgba(0,0,0,0.1)"!==pn.borderColor||"rgba(0,0,0,0.1)"!==pn.backgroundColor;var s;if(!n.forceOverride&&a)return;const c=ra(t);r.forEach(c)}};const aa={average(t){if(!t.length)return!1;let e,n,r=new Set,i=0,o=0;for(e=0,n=t.length;e<n;++e){const n=t[e].element;if(n&&n.hasValue()){const t=n.tooltipPosition();r.add(t.x),i+=t.y,++o}}if(0===o||0===r.size)return!1;return{x:[...r].reduce((t,e)=>t+e)/r.size,y:i/o}},nearest(t,e){if(!t.length)return!1;let n,r,i,o=e.x,a=e.y,s=Number.POSITIVE_INFINITY;for(n=0,r=t.length;n<r;++n){const r=t[n].element;if(r&&r.hasValue()){const t=De(e,r.getCenterPoint());t<s&&(s=t,i=r)}}if(i){const t=i.tooltipPosition();o=t.x,a=t.y}return{x:o,y:a}}};function sa(t,e){return e&&(Zt(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function ca(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function la(t,e){const{element:n,datasetIndex:r,index:i}=e,o=t.getDatasetMeta(r).controller,{label:a,value:s}=o.getLabelAndValue(i);return{chart:t,label:a,parsed:o.getParsed(i),raw:t.data.datasets[r].data[i],formattedValue:s,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function ua(t,e){const n=t.chart.ctx,{body:r,footer:i,title:o}=t,{boxWidth:a,boxHeight:s}=e,c=Ln(e.bodyFont),l=Ln(e.titleFont),u=Ln(e.footerFont),h=o.length,d=i.length,f=r.length,p=Rn(e.padding);let g=p.height,y=0,v=r.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);if(v+=t.beforeBody.length+t.afterBody.length,h&&(g+=h*l.lineHeight+(h-1)*e.titleSpacing+e.titleMarginBottom),v){g+=f*(e.displayColors?Math.max(s,c.lineHeight):c.lineHeight)+(v-f)*c.lineHeight+(v-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*u.lineHeight+(d-1)*e.footerSpacing);let m=0;const b=function(t){y=Math.max(y,n.measureText(t).width+m)};return n.save(),n.font=l.string,ie(t.title,b),n.font=c.string,ie(t.beforeBody.concat(t.afterBody),b),m=e.displayColors?a+2+e.boxPadding:0,ie(r,t=>{ie(t.before,b),ie(t.lines,b),ie(t.after,b)}),m=0,n.font=u.string,ie(t.footer,b),n.restore(),y+=p.width,{width:y,height:g}}function ha(t,e,n,r){const{x:i,width:o}=n,{width:a,chartArea:{left:s,right:c}}=t;let l="center";return"center"===r?l=i<=(s+c)/2?"left":"right":i<=o/2?l="left":i>=a-o/2&&(l="right"),function(t,e,n,r){const{x:i,width:o}=r,a=n.caretSize+n.caretPadding;return"left"===t&&i+o+a>e.width||"right"===t&&i-o-a<0||void 0}(l,t,e,n)&&(l="center"),l}function da(t,e,n){const r=n.yAlign||e.yAlign||function(t,e){const{y:n,height:r}=e;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}(t,n);return{xAlign:n.xAlign||e.xAlign||ha(t,e,n,r),yAlign:r}}function fa(t,e,n,r){const{caretSize:i,caretPadding:o,cornerRadius:a}=t,{xAlign:s,yAlign:c}=n,l=i+o,{topLeft:u,topRight:h,bottomLeft:d,bottomRight:f}=Tn(a);let p=function(t,e){let{x:n,width:r}=t;return"right"===e?n-=r:"center"===e&&(n-=r/2),n}(e,s);const g=function(t,e,n){let{y:r,height:i}=t;return"top"===e?r+=n:r-="bottom"===e?i+n:i/2,r}(e,c,l);return"center"===c?"left"===s?p+=l:"right"===s&&(p-=l):"left"===s?p-=Math.max(u,d)+i:"right"===s&&(p+=Math.max(h,f)+i),{x:Be(p,0,r.width-e.width),y:Be(g,0,r.height-e.height)}}function pa(t,e,n){const r=Rn(n.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-r.right:t.x+r.left}function ga(t){return sa([],ca(t))}function ya(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const va={beforeTitle:Xt,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return n[e.dataIndex]}return""},afterTitle:Xt,beforeBody:Xt,beforeLabel:Xt,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return Gt(n)||(e+=n),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:Xt,afterBody:Xt,beforeFooter:Xt,footer:Xt,afterFooter:Xt};function ma(t,e,n,r){const i=t[e].call(n,r);return void 0===i?va[e].call(n,r):i}let ba=class extends Hi{static positioners=aa;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 e=this.chart,n=this.options.setContext(this.getContext()),r=n.enabled&&e.options.animation&&n.animations,i=new Rr(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,n=this._tooltipItems,Nn(t,{tooltip:e,tooltipItems:n,type:"tooltip"})));var t,e,n}getTitle(t,e){const{callbacks:n}=e,r=ma(n,"beforeTitle",this,t),i=ma(n,"title",this,t),o=ma(n,"afterTitle",this,t);let a=[];return a=sa(a,ca(r)),a=sa(a,ca(i)),a=sa(a,ca(o)),a}getBeforeBody(t,e){return ga(ma(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:n}=e,r=[];return ie(t,t=>{const e={before:[],lines:[],after:[]},i=ya(n,t);sa(e.before,ca(ma(i,"beforeLabel",this,t))),sa(e.lines,ma(i,"label",this,t)),sa(e.after,ca(ma(i,"afterLabel",this,t))),r.push(e)}),r}getAfterBody(t,e){return ga(ma(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:n}=e,r=ma(n,"beforeFooter",this,t),i=ma(n,"footer",this,t),o=ma(n,"afterFooter",this,t);let a=[];return a=sa(a,ca(r)),a=sa(a,ca(i)),a=sa(a,ca(o)),a}_createItems(t){const e=this._active,n=this.chart.data,r=[],i=[],o=[];let a,s,c=[];for(a=0,s=e.length;a<s;++a)c.push(la(this.chart,e[a]));return t.filter&&(c=c.filter((e,r,i)=>t.filter(e,r,i,n))),t.itemSort&&(c=c.sort((e,r)=>t.itemSort(e,r,n))),ie(c,e=>{const n=ya(t.callbacks,e);r.push(ma(n,"labelColor",this,e)),i.push(ma(n,"labelPointStyle",this,e)),o.push(ma(n,"labelTextColor",this,e))}),this.labelColors=r,this.labelPointStyles=i,this.labelTextColors=o,this.dataPoints=c,c}update(t,e){const n=this.options.setContext(this.getContext()),r=this._active;let i,o=[];if(r.length){const t=aa[n.position].call(this,r,this._eventPosition);o=this._createItems(n),this.title=this.getTitle(o,n),this.beforeBody=this.getBeforeBody(o,n),this.body=this.getBody(o,n),this.afterBody=this.getAfterBody(o,n),this.footer=this.getFooter(o,n);const e=this._size=ua(this,n),a=Object.assign({},t,e),s=da(this.chart,n,a),c=fa(n,a,s,this.chart);this.xAlign=s.xAlign,this.yAlign=s.yAlign,i={opacity:1,x:c.x,y:c.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(i={opacity:0});this._tooltipItems=o,this.$context=void 0,i&&this._resolveAnimations().update(this,i),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,r){const i=this.getCaretPosition(t,n,r);e.lineTo(i.x1,i.y1),e.lineTo(i.x2,i.y2),e.lineTo(i.x3,i.y3)}getCaretPosition(t,e,n){const{xAlign:r,yAlign:i}=this,{caretSize:o,cornerRadius:a}=n,{topLeft:s,topRight:c,bottomLeft:l,bottomRight:u}=Tn(a),{x:h,y:d}=t,{width:f,height:p}=e;let g,y,v,m,b,x;return"center"===i?(b=d+p/2,"left"===r?(g=h,y=g-o,m=b+o,x=b-o):(g=h+f,y=g+o,m=b-o,x=b+o),v=g):(y="left"===r?h+Math.max(s,l)+o:"right"===r?h+f-Math.max(c,u)-o:this.caretX,"top"===i?(m=d,b=m-o,g=y-o,v=y+o):(m=d+p,b=m+o,g=y+o,v=y-o),x=m),{x1:g,x2:y,x3:v,y1:m,y2:b,y3:x}}drawTitle(t,e,n){const r=this.title,i=r.length;let o,a,s;if(i){const c=wr(n.rtl,this.x,this.width);for(t.x=pa(this,n.titleAlign,n),e.textAlign=c.textAlign(n.titleAlign),e.textBaseline="middle",o=Ln(n.titleFont),a=n.titleSpacing,e.fillStyle=n.titleColor,e.font=o.string,s=0;s<i;++s)e.fillText(r[s],c.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a,s+1===i&&(t.y+=n.titleMarginBottom-a)}}_drawColorBox(t,e,n,r,i){const o=this.labelColors[n],a=this.labelPointStyles[n],{boxHeight:s,boxWidth:c}=i,l=Ln(i.bodyFont),u=pa(this,"left",i),h=r.x(u),d=s<l.lineHeight?(l.lineHeight-s)/2:0,f=e.y+d;if(i.usePointStyle){const e={radius:Math.min(c,s)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},n=r.leftForLtr(h,c)+c/2,l=f+s/2;t.strokeStyle=i.multiKeyBackground,t.fillStyle=i.multiKeyBackground,mn(t,e,n,l),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,mn(t,e,n,l)}else{t.lineWidth=Qt(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 e=r.leftForLtr(h,c),n=r.leftForLtr(r.xPlus(h,1),c-2),a=Tn(o.borderRadius);Object.values(a).some(t=>0!==t)?(t.beginPath(),t.fillStyle=i.multiKeyBackground,kn(t,{x:e,y:f,w:c,h:s,radius:a}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),kn(t,{x:n,y:f+1,w:c-2,h:s-2,radius:a}),t.fill()):(t.fillStyle=i.multiKeyBackground,t.fillRect(e,f,c,s),t.strokeRect(e,f,c,s),t.fillStyle=o.backgroundColor,t.fillRect(n,f+1,c-2,s-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:r}=this,{bodySpacing:i,bodyAlign:o,displayColors:a,boxHeight:s,boxWidth:c,boxPadding:l}=n,u=Ln(n.bodyFont);let h=u.lineHeight,d=0;const f=wr(n.rtl,this.x,this.width),p=function(n){e.fillText(n,f.x(t.x+d),t.y+h/2),t.y+=h+i},g=f.textAlign(o);let y,v,m,b,x,w,_;for(e.textAlign=o,e.textBaseline="middle",e.font=u.string,t.x=pa(this,g,n),e.fillStyle=n.bodyColor,ie(this.beforeBody,p),d=a&&"right"!==g?"center"===o?c/2+l:c+2+l:0,b=0,w=r.length;b<w;++b){for(y=r[b],v=this.labelTextColors[b],e.fillStyle=v,ie(y.before,p),m=y.lines,a&&m.length&&(this._drawColorBox(e,t,b,f,n),h=Math.max(u.lineHeight,s)),x=0,_=m.length;x<_;++x)p(m[x]),h=u.lineHeight;ie(y.after,p)}d=0,h=u.lineHeight,ie(this.afterBody,p),t.y-=i}drawFooter(t,e,n){const r=this.footer,i=r.length;let o,a;if(i){const s=wr(n.rtl,this.x,this.width);for(t.x=pa(this,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=s.textAlign(n.footerAlign),e.textBaseline="middle",o=Ln(n.footerFont),e.fillStyle=n.footerColor,e.font=o.string,a=0;a<i;++a)e.fillText(r[a],s.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+n.footerSpacing}}drawBackground(t,e,n,r){const{xAlign:i,yAlign:o}=this,{x:a,y:s}=t,{width:c,height:l}=n,{topLeft:u,topRight:h,bottomLeft:d,bottomRight:f}=Tn(r.cornerRadius);e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.beginPath(),e.moveTo(a+u,s),"top"===o&&this.drawCaret(t,e,n,r),e.lineTo(a+c-h,s),e.quadraticCurveTo(a+c,s,a+c,s+h),"center"===o&&"right"===i&&this.drawCaret(t,e,n,r),e.lineTo(a+c,s+l-f),e.quadraticCurveTo(a+c,s+l,a+c-f,s+l),"bottom"===o&&this.drawCaret(t,e,n,r),e.lineTo(a+d,s+l),e.quadraticCurveTo(a,s+l,a,s+l-d),"center"===o&&"left"===i&&this.drawCaret(t,e,n,r),e.lineTo(a,s+u),e.quadraticCurveTo(a,s,a+u,s),e.closePath(),e.fill(),r.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,r=n&&n.x,i=n&&n.y;if(r||i){const n=aa[t.position].call(this,this._active,this._eventPosition);if(!n)return;const o=this._size=ua(this,t),a=Object.assign({},n,this._size),s=da(e,t,a),c=fa(t,a,s,e);r._to===c.x&&i._to===c.y||(this.xAlign=s.xAlign,this.yAlign=s.yAlign,this.width=o.width,this.height=o.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const r={width:this.width,height:this.height},i={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const o=Rn(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=n,this.drawBackground(i,t,r,e),function(t,e){let n,r;"ltr"!==e&&"rtl"!==e||(n=t.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r)}(t,e.textDirection),i.y+=o.top,this.drawTitle(i,t,e),this.drawBody(i,t,e),this.drawFooter(i,t,e),function(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,r=t.map(({datasetIndex:t,index:e})=>{const n=this.chart.getDatasetMeta(t);if(!n)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}}),i=!oe(n,r),o=this._positionChanged(r,e);(i||o)&&(this._active=r,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,i=this._active||[],o=this._getActiveElements(t,i,e,n),a=this._positionChanged(o,t),s=e||!oe(o,i)||a;return s&&(this._active=o,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),s}_getActiveElements(t,e,n,r){const i=this.options;if("mouseout"===t.type)return[];if(!r)return e.filter(t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index));const o=this.chart.getElementsAtEventForMode(t,i.mode,i,n);return i.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:n,caretY:r,options:i}=this,o=aa[i.position].call(this,t,e);return!1!==o&&(n!==o.x||r!==o.y)}};var xa={id:"tooltip",_element:ba,positioners:aa,afterInit(t,e,n){n&&(t.tooltip=new ba({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.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:va},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function wa(t,e,n,r){const i=t.indexOf(e);if(-1===i)return((t,e,n,r)=>("string"==typeof e?(n=t.push(e)-1,r.unshift({index:n,label:e})):isNaN(e)&&(n=null),n))(t,e,n,r);return i!==t.lastIndexOf(e)?n:i}function _a(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Oa extends eo{static id="category";static defaults={ticks:{callback:_a}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:n,label:r}of e)t[n]===r&&t.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(Gt(t))return null;const n=this.getLabels();return((t,e)=>null===t?null:Be(Math.round(t),0,e))(e=isFinite(e)&&n[e]===t?e:wa(n,t,ee(e,t),this._addedLabels),n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:n,max:r}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(n=0),e||(r=this.getLabels().length-1)),this.min=n,this.max=r}buildTicks(){const t=this.min,e=this.max,n=this.options.offset,r=[];let i=this.getLabels();i=0===t&&e===i.length-1?i:i.slice(t,e+1),this._valueRange=Math.max(i.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let o=t;o<=e;o++)r.push({value:o});return r}getLabelForValue(t){return _a.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Sa(t,e){const n=[],{bounds:r,step:i,min:o,max:a,precision:s,count:c,maxTicks:l,maxDigits:u,includeBounds:h}=t,d=i||1,f=l-1,{min:p,max:g}=e,y=!Gt(o),v=!Gt(a),m=!Gt(c),b=(g-p)/(u+1);let x,w,_,O,S=Ae((g-p)/f/d)*d;if(S<1e-14&&!y&&!v)return[{value:p},{value:g}];O=Math.ceil(g/S)-Math.floor(p/S),O>f&&(S=Ae(O*S/f/d)*d),Gt(s)||(x=Math.pow(10,s),S=Math.ceil(S*x)/x),"ticks"===r?(w=Math.floor(p/S)*S,_=Math.ceil(g/S)*S):(w=p,_=g),y&&v&&i&&function(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}((a-o)/i,S/1e3)?(O=Math.round(Math.min((a-o)/S,l)),S=(a-o)/O,w=o,_=a):m?(w=y?o:w,_=v?a:_,O=c-1,S=(_-w)/O):(O=(_-w)/S,O=Ee(O,Math.round(O),S/1e3)?Math.round(O):Math.ceil(O));const P=Math.max(je(S),je(w));x=Math.pow(10,Gt(s)?P:s),w=Math.round(w*x)/x,_=Math.round(_*x)/x;let M=0;for(y&&(h&&w!==o?(n.push({value:o}),w<o&&M++,Ee(Math.round((w+M*S)*x)/x,o,Pa(o,b,t))&&M++):w<o&&M++);M<O;++M){const t=Math.round((w+M*S)*x)/x;if(v&&t>a)break;n.push({value:t})}return v&&h&&_!==a?n.length&&Ee(n[n.length-1].value,a,Pa(a,b,t))?n[n.length-1].value=a:n.push({value:a}):v&&_!==a||n.push({value:_}),n}function Pa(t,e,{horizontal:n,minRotation:r}){const i=Ie(r),o=(n?Math.sin(i):Math.cos(i))||.001,a=.75*e*(""+t).length;return Math.min(e/o,a)}class Ma extends eo{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,e){return Gt(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this;const o=t=>r=e?r:t,a=t=>i=n?i:t;if(t){const t=ke(r),e=ke(i);t<0&&e<0?a(0):t>0&&e>0&&o(0)}if(r===i){let e=0===i?1:Math.abs(.05*i);a(i+e),t||o(r-e)}this.min=r,this.max=i}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:n,stepSize:r}=t;return r?(e=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),n=n||11),n&&(e=Math.min(n,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const r=Sa({maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&function(t,e,n){let r,i,o;for(r=0,i=t.length;r<i;r++)o=t[r][n],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const r=(n-e)/Math.max(t.length-1,1)/2;e-=r,n+=r}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return sn(t,this.chart.options.locale,this.options.ticks.format)}}class ka extends Ma{static id="linear";static defaults={ticks:{callback:cn.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Jt(t)?t:0,this.max=Jt(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=Ie(this.options.ticks.minRotation),r=(t?Math.sin(n):Math.cos(n))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,i.lineHeight/r))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}var Ea=["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 Aa(t){return"string"==typeof t&&Ea.includes(t)}var Ca=new Set(["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"]);function Ia(t){return"string"==typeof t&&Ca.has(t)}function ja(t){return"string"==typeof t&&t.startsWith("data-")}function Da(t){if("object"!=typeof t||null===t)return{};var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(Ia(n)||ja(n))&&(e[n]=t[n]);return e}function Ta(e){return null==e?null:t.isValidElement(e)&&"object"==typeof e.props&&null!==e.props?Da(e.props):"object"!=typeof e||Array.isArray(e)?null:Da(e)}function Ra(t){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(Ia(n)||ja(n)||Aa(n))&&(e[n]=t[n]);return e}var La=["children","width","height","viewBox","className","style","title","desc"];function Ba(){return Ba=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ba.apply(null,arguments)}var Na=t.forwardRef((e,n)=>{var{children:r,width:o,height:a,viewBox:s,className:c,style:l,title:u,desc:h}=e,d=function(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(e,La),f=s||{width:o,height:a,x:0,y:0},p=i("recharts-surface",c);return t.createElement("svg",Ba({},Ra(d),{className:p,width:o,height:a,style:l,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:n}),t.createElement("title",null,u),t.createElement("desc",null,h),r)}),za=["children","className"];function Fa(){return Fa=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Fa.apply(null,arguments)}var Va,Wa=t.forwardRef((e,n)=>{var{children:r,className:o}=e,a=function(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(e,za),s=i("recharts-layer",o);return t.createElement("g",Fa({className:s},Ra(a),{ref:n}),r)}),Ua=t.createContext(null),Ka={},Ha={};function $a(){return Va||(Va=1,t=Ha,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isUnsafeProperty=function(t){return"__proto__"===t}),Ha;var t}var Ya,Xa={};function qa(){return Ya||(Ya=1,t=Xa,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isDeepKey=function(t){switch(typeof t){case"number":case"symbol":return!1;case"string":return t.includes(".")||t.includes("[")||t.includes("]")}}),Xa;var t}var Ga,Za={};function Qa(){return Ga||(Ga=1,t=Za,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.toKey=function(t){return"string"==typeof t||"symbol"==typeof t?t:Object.is(t?.valueOf?.(),-0)?"-0":String(t)}),Za;var t}var Ja,ts,es,ns,rs,is={},os={};function as(){return Ja||(Ja=1,t=os,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.toString=function t(e){if(null==e)return"";if("string"==typeof e)return e;if(Array.isArray(e))return e.map(t).join(",");const n=String(e);return"0"===n&&Object.is(Number(e),-0)?"-0":n}),os;var t}function ss(){return ts||(ts=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=as(),n=Qa();t.toPath=function(t){if(Array.isArray(t))return t.map(n.toKey);if("symbol"==typeof t)return[t];const r=[],i=(t=e.toString(t)).length;if(0===i)return r;let o=0,a="",s="",c=!1;for(46===t.charCodeAt(0)&&(r.push(""),o++);o<i;){const e=t[o];s?"\\"===e&&o+1<i?(o++,a+=t[o]):e===s?s="":a+=e:c?'"'===e||"'"===e?s=e:"]"===e?(c=!1,r.push(a),a=""):a+=e:"["===e?(c=!0,a&&(r.push(a),a="")):"."===e?a&&(r.push(a),a=""):a+=e,o++}return a&&r.push(a),r}}(is)),is}function cs(){return es||(es=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=$a(),n=qa(),r=Qa(),i=ss();t.get=function t(o,a,s){if(null==o)return s;switch(typeof a){case"string":{if(e.isUnsafeProperty(a))return s;const r=o[a];return void 0===r?n.isDeepKey(a)?t(o,i.toPath(a),s):s:r}case"number":case"symbol":{"number"==typeof a&&(a=r.toKey(a));const t=o[a];return void 0===t?s:t}default:{if(Array.isArray(a))return function(t,n,r){if(0===n.length)return r;let i=t;for(let o=0;o<n.length;o++){if(null==i)return r;if(e.isUnsafeProperty(n[o]))return r;i=i[n[o]]}if(void 0===i)return r;return i}(o,a,s);if(a=Object.is(a?.valueOf(),-0)?"-0":String(a),e.isUnsafeProperty(a))return s;const t=o[a];return void 0===t?s:t}}}}(Ka)),Ka}function ls(){return rs?ns:(rs=1,ns=cs().get)}const us=e(ls());var hs=t=>0===t?0:t>0?1:-1,ds=t=>"number"==typeof t&&t!=+t,fs=t=>"string"==typeof t&&t.indexOf("%")===t.length-1,ps=t=>("number"==typeof t||t instanceof Number)&&!ds(t),gs=t=>ps(t)||"string"==typeof t,ys=0,vs=t=>{var e=++ys;return"".concat(t||"").concat(e)},ms=function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!ps(t)&&"string"!=typeof t)return r;if(fs(t)){if(null==e)return r;var o=t.indexOf("%");n=e*parseFloat(t.slice(0,o))/100}else n=+t;return ds(n)&&(n=r),i&&null!=e&&n>e&&(n=e),n},bs=t=>{if(!Array.isArray(t))return!1;for(var e=t.length,n={},r=0;r<e;r++){if(n[t[r]])return!0;n[t[r]]=!0}return!1};function xs(t,e,n){return ps(t)&&ps(e)?t+n*(e-t):e}var ws=t=>null==t,_s=t=>ws(t)?t:"".concat(t.charAt(0).toUpperCase()).concat(t.slice(1));function Os(t){return null!=t}function Ss(){}var Ps=t=>"radius"in t&&"startAngle"in t&&"endAngle"in t;function Ms(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function ks(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Es(t,e){var n=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ms(Object(n),!0).forEach(function(e){ks(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ms(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t),r=e;return Object.keys(e).reduce((t,e)=>(void 0===t[e]&&void 0!==r[e]&&(t[e]=r[e]),t),n)}var As,Cs={},Is={};function js(){return As||(As=1,t=Is,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.uniqBy=function(t,e){const n=new Map;for(let r=0;r<t.length;r++){const i=t[r],o=e(i);n.has(o)||n.set(o,i)}return Array.from(n.values())}),Is;var t}var Ds,Ts={};function Rs(){return Ds||(Ds=1,t=Ts,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.identity=function(t){return t}),Ts;var t}var Ls,Bs,Ns={},zs={},Fs={};function Vs(){return Ls||(Ls=1,t=Fs,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isLength=function(t){return Number.isSafeInteger(t)&&t>=0}),Fs;var t}function Ws(){return Bs||(Bs=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Vs();t.isArrayLike=function(t){return null!=t&&"function"!=typeof t&&e.isLength(t.length)}}(zs)),zs}var Us,Ks,Hs={};function $s(){return Us||(Us=1,t=Hs,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isObjectLike=function(t){return"object"==typeof t&&null!==t}),Hs;var t}function Ys(){return Ks||(Ks=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Ws(),n=$s();t.isArrayLikeObject=function(t){return n.isObjectLike(t)&&e.isArrayLike(t)}}(Ns)),Ns}var Xs,qs={},Gs={};function Zs(){return Xs||(Xs=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=cs();t.property=function(t){return function(n){return e.get(n,t)}}}(Gs)),Gs}var Qs,Js={},tc={},ec={},nc={};function rc(){return Qs||(Qs=1,t=nc,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isObject=function(t){return null!==t&&("object"==typeof t||"function"==typeof t)}),nc;var t}var ic,oc={};function ac(){return ic||(ic=1,t=oc,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isPrimitive=function(t){return null==t||"object"!=typeof t&&"function"!=typeof t}),oc;var t}var sc,cc,lc,uc={};function hc(){return sc||(sc=1,t=uc,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.eq=function(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}),uc;var t}function dc(){return cc||(cc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=rc(),n=ac(),r=hc();function i(t,s,c,l){if(s===t)return!0;switch(typeof s){case"object":return function(t,e,r,i){if(null==e)return!0;if(Array.isArray(e))return o(t,e,r,i);if(e instanceof Map)return function(t,e,n,r){if(0===e.size)return!0;if(!(t instanceof Map))return!1;for(const[i,o]of e.entries()){if(!1===n(t.get(i),o,i,t,e,r))return!1}return!0}(t,e,r,i);if(e instanceof Set)return a(t,e,r,i);const s=Object.keys(e);if(null==t)return 0===s.length;if(0===s.length)return!0;if(i?.has(e))return i.get(e)===t;i?.set(e,t);try{for(let o=0;o<s.length;o++){const a=s[o];if(!n.isPrimitive(t)&&!(a in t))return!1;if(void 0===e[a]&&void 0!==t[a])return!1;if(null===e[a]&&null!==t[a])return!1;if(!r(t[a],e[a],a,t,e,i))return!1}return!0}finally{i?.delete(e)}}(t,s,c,l);case"function":return Object.keys(s).length>0?i(t,{...s},c,l):r.eq(t,s);default:return e.isObject(t)?"string"!=typeof s||""===s:r.eq(t,s)}}function o(t,e,n,r){if(0===e.length)return!0;if(!Array.isArray(t))return!1;const i=new Set;for(let o=0;o<e.length;o++){const a=e[o];let s=!1;for(let c=0;c<t.length;c++){if(i.has(c))continue;let l=!1;if(n(t[c],a,o,t,e,r)&&(l=!0),l){i.add(c),s=!0;break}}if(!s)return!1}return!0}function a(t,e,n,r){return 0===e.size||t instanceof Set&&o([...t],[...e],n,r)}t.isMatchWith=function t(e,n,r){return"function"!=typeof r?t(e,n,()=>{}):i(e,n,function t(e,n,o,a,s,c){const l=r(e,n,o,a,s,c);return void 0!==l?Boolean(l):i(e,n,t,c)},new Map)},t.isSetMatch=a}(ec)),ec}function fc(){return lc||(lc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=dc();t.isMatch=function(t,n){return e.isMatchWith(t,n,()=>{})}}(tc)),tc}var pc,gc={},yc={},vc={};function mc(){return pc||(pc=1,t=vc,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.getSymbols=function(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}),vc;var t}var bc,xc={};function wc(){return bc||(bc=1,t=xc,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.getTag=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}),xc;var t}var _c,Oc={};function Sc(){return _c||(_c=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});t.argumentsTag="[object Arguments]",t.arrayBufferTag="[object ArrayBuffer]",t.arrayTag="[object Array]",t.bigInt64ArrayTag="[object BigInt64Array]",t.bigUint64ArrayTag="[object BigUint64Array]",t.booleanTag="[object Boolean]",t.dataViewTag="[object DataView]",t.dateTag="[object Date]",t.errorTag="[object Error]",t.float32ArrayTag="[object Float32Array]",t.float64ArrayTag="[object Float64Array]",t.functionTag="[object Function]",t.int16ArrayTag="[object Int16Array]",t.int32ArrayTag="[object Int32Array]",t.int8ArrayTag="[object Int8Array]",t.mapTag="[object Map]",t.numberTag="[object Number]",t.objectTag="[object Object]",t.regexpTag="[object RegExp]",t.setTag="[object Set]",t.stringTag="[object String]",t.symbolTag="[object Symbol]",t.uint16ArrayTag="[object Uint16Array]",t.uint32ArrayTag="[object Uint32Array]",t.uint8ArrayTag="[object Uint8Array]",t.uint8ClampedArrayTag="[object Uint8ClampedArray]"}(Oc)),Oc}var Pc,Mc,kc,Ec,Ac={};function Cc(){return Pc||(Pc=1,t=Ac,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isTypedArray=function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}),Ac;var t}function Ic(){return Mc||(Mc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=mc(),n=wc(),r=Sc(),i=ac(),o=Cc();function a(t,e,c,l=new Map,u=void 0){const h=u?.(t,e,c,l);if(void 0!==h)return h;if(i.isPrimitive(t))return t;if(l.has(t))return l.get(t);if(Array.isArray(t)){const e=new Array(t.length);l.set(t,e);for(let n=0;n<t.length;n++)e[n]=a(t[n],n,c,l,u);return Object.hasOwn(t,"index")&&(e.index=t.index),Object.hasOwn(t,"input")&&(e.input=t.input),e}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}if(t instanceof Map){const e=new Map;l.set(t,e);for(const[n,r]of t)e.set(n,a(r,n,c,l,u));return e}if(t instanceof Set){const e=new Set;l.set(t,e);for(const n of t)e.add(a(n,void 0,c,l,u));return e}if(void 0!==ft&&ft.isBuffer(t))return t.subarray();if(o.isTypedArray(t)){const e=new(Object.getPrototypeOf(t).constructor)(t.length);l.set(t,e);for(let n=0;n<t.length;n++)e[n]=a(t[n],n,c,l,u);return e}if(t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const e=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return l.set(t,e),s(e,t,c,l,u),e}if("undefined"!=typeof File&&t instanceof File){const e=new File([t],t.name,{type:t.type});return l.set(t,e),s(e,t,c,l,u),e}if("undefined"!=typeof Blob&&t instanceof Blob){const e=new Blob([t],{type:t.type});return l.set(t,e),s(e,t,c,l,u),e}if(t instanceof Error){const e=new t.constructor;return l.set(t,e),e.message=t.message,e.name=t.name,e.stack=t.stack,e.cause=t.cause,s(e,t,c,l,u),e}if(t instanceof Boolean){const e=new Boolean(t.valueOf());return l.set(t,e),s(e,t,c,l,u),e}if(t instanceof Number){const e=new Number(t.valueOf());return l.set(t,e),s(e,t,c,l,u),e}if(t instanceof String){const e=new String(t.valueOf());return l.set(t,e),s(e,t,c,l,u),e}if("object"==typeof t&&function(t){switch(n.getTag(t)){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}}(t)){const e=Object.create(Object.getPrototypeOf(t));return l.set(t,e),s(e,t,c,l,u),e}return t}function s(t,n,r=t,i,o){const s=[...Object.keys(n),...e.getSymbols(n)];for(let e=0;e<s.length;e++){const c=s[e],l=Object.getOwnPropertyDescriptor(t,c);(null==l||l.writable)&&(t[c]=a(n[c],c,r,i,o))}}t.cloneDeepWith=function(t,e){return a(t,void 0,t,new Map,e)},t.cloneDeepWithImpl=a,t.copyProperties=s}(yc)),yc}function jc(){return kc||(kc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Ic();t.cloneDeep=function(t){return e.cloneDeepWithImpl(t,void 0,t,new Map,void 0)}}(gc)),gc}function Dc(){return Ec||(Ec=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=fc(),n=jc();t.matches=function(t){return t=n.cloneDeep(t),n=>e.isMatch(n,t)}}(Js)),Js}var Tc,Rc,Lc={},Bc={},Nc={};function zc(){return Tc||(Tc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Ic(),n=Sc();t.cloneDeepWith=function(t,r){return e.cloneDeepWith(t,(i,o,a,s)=>{const c=r?.(i,o,a,s);if(void 0!==c)return c;if("object"==typeof t)switch(Object.prototype.toString.call(t)){case n.numberTag:case n.stringTag:case n.booleanTag:{const n=new t.constructor(t?.valueOf());return e.copyProperties(n,t),n}case n.argumentsTag:{const n={};return e.copyProperties(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}default:return}})}}(Nc)),Nc}function Fc(){return Rc||(Rc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=zc();t.cloneDeep=function(t){return e.cloneDeepWith(t)}}(Bc)),Bc}var Vc,Wc={},Uc={};function Kc(){return Vc||(Vc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=/^(?:0|[1-9]\d*)$/;t.isIndex=function(t,n=Number.MAX_SAFE_INTEGER){switch(typeof t){case"number":return Number.isInteger(t)&&t>=0&&t<n;case"symbol":return!1;case"string":return e.test(t)}}}(Uc)),Uc}var Hc,$c,Yc,Xc,qc,Gc,Zc,Qc={};function Jc(){return Hc||(Hc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=wc();t.isArguments=function(t){return null!==t&&"object"==typeof t&&"[object Arguments]"===e.getTag(t)}}(Qc)),Qc}function tl(){return $c||($c=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=qa(),n=Kc(),r=Jc(),i=ss();t.has=function(t,o){let a;if(a=Array.isArray(o)?o:"string"==typeof o&&e.isDeepKey(o)&&null==t?.[o]?i.toPath(o):[o],0===a.length)return!1;let s=t;for(let e=0;e<a.length;e++){const t=a[e];if(null==s||!Object.hasOwn(s,t)){if(!((Array.isArray(s)||r.isArguments(s))&&n.isIndex(t)&&t<s.length))return!1}s=s[t]}return!0}}(Wc)),Wc}function el(){return Yc||(Yc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=fc(),n=Qa(),r=Fc(),i=cs(),o=tl();t.matchesProperty=function(t,a){switch(typeof t){case"object":Object.is(t?.valueOf(),-0)&&(t="-0");break;case"number":t=n.toKey(t)}return a=r.cloneDeep(a),function(n){const r=i.get(n,t);return void 0===r?o.has(n,t):void 0===a?void 0===r:e.isMatch(r,a)}}}(Lc)),Lc}function nl(){return Xc||(Xc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Rs(),n=Zs(),r=Dc(),i=el();t.iteratee=function(t){if(null==t)return e.identity;switch(typeof t){case"function":return t;case"object":return Array.isArray(t)&&2===t.length?i.matchesProperty(t[0],t[1]):r.matches(t);case"string":case"symbol":case"number":return n.property(t)}}}(qs)),qs}function rl(){return Zc?Gc:(Zc=1,Gc=(qc||(qc=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=js(),n=Rs(),r=Ys(),i=nl();t.uniqBy=function(t,o=n.identity){return r.isArrayLikeObject(t)?e.uniqBy(Array.from(t),i.iteratee(o)):[]}}(Cs)),Cs).uniqBy)}const il=e(rl());var ol=t.createContext(null),al=t=>t,sl=()=>{var e=t.useContext(ol);return e?e.store.dispatch:al},cl=()=>{},ll=()=>cl,ul=(t,e)=>t===e;function hl(e){var n=t.useContext(ol);return o.useSyncExternalStoreWithSelector(n?n.subscription.addNestedSub:ll,n?n.store.getState:cl,n?n.store.getState:cl,n?e:cl,ul)}var dl,fl={},pl={},gl={};function yl(){return dl||(dl=1,function(t){function e(t){return"symbol"==typeof t?1:null===t?2:void 0===t?3:t!=t?4:0}Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});t.compareValues=(t,n,r)=>{if(t!==n){const i=e(t),o=e(n);if(i===o&&0===i){if(t<n)return"desc"===r?1:-1;if(t>n)return"desc"===r?-1:1}return"desc"===r?o-i:i-o}return 0}}(gl)),gl}var vl,ml,bl,xl={},wl={};function _l(){return vl||(vl=1,t=wl,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isSymbol=function(t){return"symbol"==typeof t||t instanceof Symbol}),wl;var t}function Ol(){return ml||(ml=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=_l(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;t.isKey=function(t,i){return!Array.isArray(t)&&(!("number"!=typeof t&&"boolean"!=typeof t&&null!=t&&!e.isSymbol(t))||("string"==typeof t&&(r.test(t)||!n.test(t))||null!=i&&Object.hasOwn(i,t)))}}(xl)),xl}function Sl(){return bl||(bl=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=yl(),n=Ol(),r=ss();t.orderBy=function(t,i,o,a){if(null==t)return[];o=a?void 0:o,Array.isArray(t)||(t=Object.values(t)),Array.isArray(i)||(i=null==i?[null]:[i]),0===i.length&&(i=[null]),Array.isArray(o)||(o=null==o?[]:[o]),o=o.map(t=>String(t));const s=(t,e)=>{let n=t;for(let r=0;r<e.length&&null!=n;++r)n=n[e[r]];return n},c=i.map(t=>(Array.isArray(t)&&1===t.length&&(t=t[0]),null==t||"function"==typeof t||Array.isArray(t)||n.isKey(t)?t:{key:t,path:r.toPath(t)}));return t.map(t=>({original:t,criteria:c.map(e=>((t,e)=>null==e||null==t?e:"object"==typeof t&&"key"in t?Object.hasOwn(e,t.key)?e[t.key]:s(e,t.path):"function"==typeof t?t(e):Array.isArray(t)?s(e,t):"object"==typeof e?e[t]:e)(e,t))})).slice().sort((t,n)=>{for(let r=0;r<c.length;r++){const i=e.compareValues(t.criteria[r],n.criteria[r],o[r]);if(0!==i)return i}return 0}).map(t=>t.original)}}(pl)),pl}var Pl,Ml={};function kl(){return Pl||(Pl=1,t=Ml,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.flatten=function(t,e=1){const n=[],r=Math.floor(e),i=(t,e)=>{for(let o=0;o<t.length;o++){const a=t[o];Array.isArray(a)&&e<r?i(a,e+1):n.push(a)}};return i(t,0),n}),Ml;var t}var El,Al,Cl,Il,jl={};function Dl(){return El||(El=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Kc(),n=Ws(),r=rc(),i=hc();t.isIterateeCall=function(t,o,a){return!!r.isObject(a)&&(!!("number"==typeof o&&n.isArrayLike(a)&&e.isIndex(o)&&o<a.length||"string"==typeof o&&o in a)&&i.eq(a[o],t))}}(jl)),jl}function Tl(){return Il?Cl:(Il=1,Cl=(Al||(Al=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Sl(),n=kl(),r=Dl();t.sortBy=function(t,...i){const o=i.length;return o>1&&r.isIterateeCall(t,i[0],i[1])?i=[]:o>2&&r.isIterateeCall(i[0],i[1],i[2])&&(i=[i[0]]),e.orderBy(t,n.flatten(i),["asc"])}}(fl)),fl).sortBy)}const Rl=e(Tl());var Ll=t=>t.legend.settings;a([t=>t.legend.payload,Ll],(t,e)=>{var{itemSorter:n}=e,r=t.flat(1);return n?Rl(r,n):r});function Bl(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Nl=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),zl=()=>Math.random().toString(36).substring(7).split("").join("."),Fl={INIT:`@@redux/INIT${zl()}`,REPLACE:`@@redux/REPLACE${zl()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${zl()}`};function Vl(t){if("object"!=typeof t||null===t)return!1;let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||null===Object.getPrototypeOf(t)}function Wl(t,e,n){if("function"!=typeof t)throw new Error(Bl(2));if("function"==typeof e&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Bl(0));if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Bl(1));return n(Wl)(t,e)}let r=t,i=e,o=new Map,a=o,s=0,c=!1;function l(){a===o&&(a=new Map,o.forEach((t,e)=>{a.set(e,t)}))}function u(){if(c)throw new Error(Bl(3));return i}function h(t){if("function"!=typeof t)throw new Error(Bl(4));if(c)throw new Error(Bl(5));let e=!0;l();const n=s++;return a.set(n,t),function(){if(e){if(c)throw new Error(Bl(6));e=!1,l(),a.delete(n),o=null}}}function d(t){if(!Vl(t))throw new Error(Bl(7));if(void 0===t.type)throw new Error(Bl(8));if("string"!=typeof t.type)throw new Error(Bl(17));if(c)throw new Error(Bl(9));try{c=!0,i=r(i,t)}finally{c=!1}return(o=a).forEach(t=>{t()}),t}d({type:Fl.INIT});return{dispatch:d,subscribe:h,getState:u,replaceReducer:function(t){if("function"!=typeof t)throw new Error(Bl(10));r=t,d({type:Fl.REPLACE})},[Nl]:function(){const t=h;return{subscribe(e){if("object"!=typeof e||null===e)throw new Error(Bl(11));function n(){const t=e;t.next&&t.next(u())}n();return{unsubscribe:t(n)}},[Nl](){return this}}}}}function Ul(t){const e=Object.keys(t),n={};for(let a=0;a<e.length;a++){const r=e[a];"function"==typeof t[r]&&(n[r]=t[r])}const r=Object.keys(n);let i;try{!function(t){Object.keys(t).forEach(e=>{const n=t[e];if(void 0===n(void 0,{type:Fl.INIT}))throw new Error(Bl(12));if(void 0===n(void 0,{type:Fl.PROBE_UNKNOWN_ACTION()}))throw new Error(Bl(13))})}(n)}catch(o){i=o}return function(t={},e){if(i)throw i;let o=!1;const a={};for(let i=0;i<r.length;i++){const s=r[i],c=n[s],l=t[s],u=c(l,e);if(void 0===u)throw e&&e.type,new Error(Bl(14));a[s]=u,o=o||u!==l}return o=o||r.length!==Object.keys(t).length,o?a:t}}function Kl(...t){return 0===t.length?t=>t:1===t.length?t[0]:t.reduce((t,e)=>(...n)=>t(e(...n)))}function Hl(t){return Vl(t)&&"type"in t&&"string"==typeof t.type}var $l=Symbol.for("immer-nothing"),Yl=Symbol.for("immer-draftable"),Xl=Symbol.for("immer-state");function ql(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Gl=Object,Zl=Gl.getPrototypeOf,Ql="constructor",Jl="prototype",tu="configurable",eu="enumerable",nu="writable",ru="value",iu=t=>!!t&&!!t[Xl];function ou(t){return!!t&&(cu(t)||pu(t)||!!t[Yl]||!!t[Ql]?.[Yl]||gu(t)||yu(t))}var au=Gl[Jl][Ql].toString(),su=new WeakMap;function cu(t){if(!t||!vu(t))return!1;const e=Zl(t);if(null===e||e===Gl[Jl])return!0;const n=Gl.hasOwnProperty.call(e,Ql)&&e[Ql];if(n===Object)return!0;if(!mu(n))return!1;let r=su.get(n);return void 0===r&&(r=Function.toString.call(n),su.set(n,r)),r===au}function lu(t,e,n=!0){if(0===uu(t)){(n?Reflect.ownKeys(t):Gl.keys(t)).forEach(n=>{e(n,t[n],t)})}else t.forEach((n,r)=>e(r,n,t))}function uu(t){const e=t[Xl];return e?e.type_:pu(t)?1:gu(t)?2:yu(t)?3:0}var hu=(t,e,n=uu(t))=>2===n?t.has(e):Gl[Jl].hasOwnProperty.call(t,e),du=(t,e,n=uu(t))=>2===n?t.get(e):t[e],fu=(t,e,n,r=uu(t))=>{2===r?t.set(e,n):3===r?t.add(n):t[e]=n};var pu=Array.isArray,gu=t=>t instanceof Map,yu=t=>t instanceof Set,vu=t=>"object"==typeof t,mu=t=>"function"==typeof t,bu=t=>"boolean"==typeof t,xu=t=>t.copy_||t.base_,wu=t=>t.modified_?t.copy_:t.base_;function _u(t,e){if(gu(t))return new Map(t);if(yu(t))return new Set(t);if(pu(t))return Array[Jl].slice.call(t);const n=cu(t);if(!0===e||"class_only"===e&&!n){const e=Gl.getOwnPropertyDescriptors(t);delete e[Xl];let n=Reflect.ownKeys(e);for(let r=0;r<n.length;r++){const i=n[r],o=e[i];!1===o[nu]&&(o[nu]=!0,o[tu]=!0),(o.get||o.set)&&(e[i]={[tu]:!0,[nu]:!0,[eu]:o[eu],[ru]:t[i]})}return Gl.create(Zl(t),e)}{const e=Zl(t);if(null!==e&&n)return{...t};const r=Gl.create(e);return Gl.assign(r,t)}}function Ou(t,e=!1){return Pu(t)||iu(t)||!ou(t)||(uu(t)>1&&Gl.defineProperties(t,{set:Su,add:Su,clear:Su,delete:Su}),Gl.freeze(t),e&&lu(t,(t,e)=>{Ou(e,!0)},!1)),t}var Su={[ru]:function(){ql(2)}};function Pu(t){return null===t||!vu(t)||Gl.isFrozen(t)}var Mu="MapSet",ku="Patches",Eu={};function Au(t){const e=Eu[t];return e||ql(0),e}var Cu,Iu=()=>Cu;function ju(t,e){e&&(t.patchPlugin_=Au(ku),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Du(t){Tu(t),t.drafts_.forEach(Lu),t.drafts_=null}function Tu(t){t===Cu&&(Cu=t.parent_)}var Ru=t=>{return Cu={drafts_:[],parent_:Cu,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:(e=Mu,Eu[e]?Au(Mu):void 0)};var e};function Lu(t){const e=t[Xl];0===e.type_||1===e.type_?e.revoke_():e.revoked_=!0}function Bu(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];if(void 0!==t&&t!==n){n[Xl].modified_&&(Du(e),ql(4)),ou(t)&&(t=Nu(e,t));const{patchPlugin_:r}=e;r&&r.generateReplacementPatches_(n[Xl].base_,t,e)}else t=Nu(e,n);return function(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Ou(e,n)}(e,t,!0),Du(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==$l?t:void 0}function Nu(t,e){if(Pu(e))return e;const n=e[Xl];if(!n){return Ku(e,t.handledSet_,t)}if(!Fu(n,t))return e;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:e}=n;if(e)for(;e.length>0;){e.pop()(t)}Uu(n,t)}return n.copy_}function zu(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Fu=(t,e)=>t.scope_===e,Vu=[];function Wu(t,e,n,r){const i=xu(t),o=t.type_;if(void 0!==r){if(du(i,r,o)===e)return void fu(i,r,n,o)}if(!t.draftLocations_){const e=t.draftLocations_=new Map;lu(i,(t,n)=>{if(iu(n)){const r=e.get(n)||[];r.push(t),e.set(n,r)}})}const a=t.draftLocations_.get(e)??Vu;for(const s of a)fu(i,s,n,o)}function Uu(t,e){if(t.modified_&&!t.finalized_&&(3===t.type_||(t.assigned_?.size??0)>0)){const{patchPlugin_:n}=e;if(n){const r=n.getPath(t);r&&n.generatePatches_(t,r,e)}zu(t)}}function Ku(t,e,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||iu(t)||e.has(t)||!ou(t)||Pu(t)||(e.add(t),lu(t,(r,i)=>{if(iu(i)){const e=i[Xl];if(Fu(e,n)){const n=wu(e);fu(t,r,n,t.type_),zu(e)}}else ou(i)&&Ku(i,e,n)})),t}var Hu={get(t,e){if(e===Xl)return t;const n=xu(t);if(!hu(n,e,t.type_))return function(t,e,n){const r=Xu(e,n);return r?ru in r?r[ru]:r.get?.call(t.draft_):void 0}(t,n,e);const r=n[e];if(t.finalized_||!ou(r))return r;if(r===Yu(t.base_,e)){Gu(t);const n=1===t.type_?+e:e,i=Zu(t.scope_,r,t,n);return t.copy_[n]=i}return r},has:(t,e)=>e in xu(t),ownKeys:t=>Reflect.ownKeys(xu(t)),set(t,e,n){const r=Xu(xu(t),e);if(r?.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const r=Yu(xu(t),e),a=r?.[Xl];if(a&&a.base_===n)return t.copy_[e]=n,t.assigned_.set(e,!1),!0;if(((i=n)===(o=r)?0!==i||1/i==1/o:i!=i&&o!=o)&&(void 0!==n||hu(t.base_,e,t.type_)))return!0;Gu(t),qu(t)}var i,o;return t.copy_[e]===n&&(void 0!==n||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_.set(e,!0),function(t,e,n){const{scope_:r}=t;if(iu(n)){const i=n[Xl];Fu(i,r)&&i.callbacks_.push(function(){Gu(t);const r=wu(i);Wu(t,n,r,e)})}else ou(n)&&t.callbacks_.push(function(){const i=xu(t);du(i,e,t.type_)===n&&r.drafts_.length>1&&!0===(t.assigned_.get(e)??!1)&&t.copy_&&Ku(du(t.copy_,e,t.type_),r.handledSet_,r)})}(t,e,n)),!0},deleteProperty:(t,e)=>(Gu(t),void 0!==Yu(t.base_,e)||e in t.base_?(t.assigned_.set(e,!1),qu(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0),getOwnPropertyDescriptor(t,e){const n=xu(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{[nu]:!0,[tu]:1!==t.type_||"length"!==e,[eu]:r[eu],[ru]:n[e]}:r},defineProperty(){ql(11)},getPrototypeOf:t=>Zl(t.base_),setPrototypeOf(){ql(12)}},$u={};function Yu(t,e){const n=t[Xl];return(n?xu(n):t)[e]}function Xu(t,e){if(!(e in t))return;let n=Zl(t);for(;n;){const t=Object.getOwnPropertyDescriptor(n,e);if(t)return t;n=Zl(n)}}function qu(t){t.modified_||(t.modified_=!0,t.parent_&&qu(t.parent_))}function Gu(t){t.copy_||(t.assigned_=new Map,t.copy_=_u(t.base_,t.scope_.immer_.useStrictShallowCopy_))}lu(Hu,(t,e)=>{$u[t]=function(){const t=arguments;return t[0]=t[0][0],e.apply(this,t)}}),$u.deleteProperty=function(t,e){return $u.set.call(this,t,e,void 0)},$u.set=function(t,e,n){return Hu.set.call(this,t[0],e,n,t[0])};function Zu(t,e,n,r){const[i,o]=gu(e)?Au(Mu).proxyMap_(e,n):yu(e)?Au(Mu).proxySet_(e,n):function(t,e){const n=pu(t),r={type_:n?1:0,scope_:e?e.scope_:Iu(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,o=Hu;n&&(i=[r],o=$u);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,[s,r]}(e,n);return(n?.scope_??Iu()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&void 0!==r?function(t,e,n){t.callbacks_.push(function(r){const i=e;if(!i||!Fu(i,r))return;r.mapSetPlugin_?.fixSetContents(i);const o=wu(i);Wu(t,i.draft_??i,o,n),Uu(i,r)})}(n,o,r):o.callbacks_.push(function(t){t.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:e}=t;o.modified_&&e&&e.generatePatches_(o,[],t)}),i}function Qu(t){return iu(t)||ql(10),Ju(t)}function Ju(t){if(!ou(t)||Pu(t))return t;const e=t[Xl];let n,r=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=_u(t,e.scope_.immer_.useStrictShallowCopy_),r=e.scope_.immer_.shouldUseStrictIteration()}else n=_u(t,!0);return lu(n,(t,e)=>{fu(n,t,Ju(e))},r),e&&(e.finalized_=!1),n}var th=new class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,e,n)=>{if(mu(t)&&!mu(e)){const n=e;e=t;const r=this;return function(t=n,...i){return r.produce(t,t=>e.call(this,t,...i))}}let r;if(mu(e)||ql(6),void 0===n||mu(n)||ql(7),ou(t)){const i=Ru(this),o=Zu(i,t,void 0);let a=!0;try{r=e(o),a=!1}finally{a?Du(i):Tu(i)}return ju(i,n),Bu(r,i)}if(!t||!vu(t)){if(r=e(t),void 0===r&&(r=t),r===$l&&(r=void 0),this.autoFreeze_&&Ou(r,!0),n){const e=[],i=[];Au(ku).generateReplacementPatches_(t,r,{patches_:e,inversePatches_:i}),n(e,i)}return r}ql(1)},this.produceWithPatches=(t,e)=>{if(mu(t))return(e,...n)=>this.produceWithPatches(e,e=>t(e,...n));let n,r;return[this.produce(t,e,(t,e)=>{n=t,r=e}),n,r]},bu(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),bu(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),bu(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){ou(t)||ql(8),iu(t)&&(t=Qu(t));const e=Ru(this),n=Zu(e,t,void 0);return n[Xl].isManual_=!0,Tu(e),n}finishDraft(t,e){const n=t&&t[Xl];n&&n.isManual_||ql(9);const{scope_:r}=n;return ju(r,e),Bu(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const r=e[n];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}n>-1&&(e=e.slice(n+1));const r=Au(ku).applyPatches_;return iu(t)?r(t,e):this.produce(t,t=>r(t,e))}},eh=th.produce;function nh(t){return({dispatch:e,getState:n})=>r=>i=>"function"==typeof i?i(e,n,t):r(i)}var rh=nh(),ih=nh,oh="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Kl:Kl.apply(null,arguments)};function ah(t,e){function n(...n){if(e){let r=e(...n);if(!r)throw new Error(ed(0));return{type:t,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:t,payload:n[0]}}return n.toString=()=>`${t}`,n.type=t,n.match=e=>Hl(e)&&e.type===t,n}var sh=class t extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,t.prototype)}static get[Symbol.species](){return t}concat(...t){return super.concat.apply(this,t)}prepend(...e){return 1===e.length&&Array.isArray(e[0])?new t(...e[0].concat(this)):new t(...e.concat(this))}};function ch(t){return ou(t)?eh(t,()=>{}):t}function lh(t,e,n){return t.has(e)?t.get(e):t.set(e,n(e)).get(e)}var uh="RTK_autoBatch",hh=()=>t=>({payload:t,meta:{[uh]:!0}}),dh=t=>e=>{setTimeout(e,t)},fh=(t={type:"raf"})=>e=>(...n)=>{const r=e(...n);let i=!0,o=!1,a=!1;const s=new Set,c="tick"===t.type?queueMicrotask:"raf"===t.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:dh(10):"callback"===t.type?t.queueNotification:dh(t.timeout),l=()=>{a=!1,o&&(o=!1,s.forEach(t=>t()))};return Object.assign({},r,{subscribe(t){const e=r.subscribe(()=>i&&t());return s.add(t),()=>{e(),s.delete(t)}},dispatch(t){try{return i=!t?.meta?.[uh],o=!i,o&&(a||(a=!0,c(l))),r.dispatch(t)}finally{i=!0}}})};function ph(t){const e=function(t){const{thunk:e=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=t??{};let o=new sh;return e&&("boolean"==typeof e?o.push(rh):o.push(ih(e.extraArgument))),o},{reducer:n,middleware:r,devTools:i=!0,preloadedState:o,enhancers:a}=t||{};let s,c;if("function"==typeof n)s=n;else{if(!Vl(n))throw new Error(ed(1));s=Ul(n)}c="function"==typeof r?r(e):e();let l=Kl;i&&(l=oh({trace:!1,..."object"==typeof i&&i}));const u=function(...t){return e=>(n,r)=>{const i=e(n,r);let o=()=>{throw new Error(Bl(15))};const a={getState:i.getState,dispatch:(t,...e)=>o(t,...e)},s=t.map(t=>t(a));return o=Kl(...s)(i.dispatch),{...i,dispatch:o}}}(...c),h=(t=>function(e){const{autoBatch:n=!0}=e??{};let r=new sh(t);return n&&r.push(fh("object"==typeof n?n:void 0)),r})(u);return Wl(s,o,l(..."function"==typeof a?a(h):h()))}function gh(t){const e={},n=[];let r;const i={addCase(t,n){const r="string"==typeof t?t:t.type;if(!r)throw new Error(ed(28));if(r in e)throw new Error(ed(29));return e[r]=n,i},addAsyncThunk:(t,r)=>(r.pending&&(e[t.pending.type]=r.pending),r.rejected&&(e[t.rejected.type]=r.rejected),r.fulfilled&&(e[t.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:t.settled,reducer:r.settled}),i),addMatcher:(t,e)=>(n.push({matcher:t,reducer:e}),i),addDefaultCase:t=>(r=t,i)};return t(i),[e,n,r]}var yh=(t=21)=>{let e="",n=t;for(;n--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e},vh=Symbol.for("rtk-slice-createasyncthunk");function mh(t,e){return`${t}/${e}`}function bh({creators:t}={}){const e=t?.asyncThunk?.[vh];return function(t){const{name:n,reducerPath:r=n}=t;if(!n)throw new Error(ed(11));const i=("function"==typeof t.reducers?t.reducers(function(){function t(t,e){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...e}}return t.withTypes=()=>t,{reducer:t=>Object.assign({[t.name]:(...e)=>t(...e)}[t.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(t,e)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:e}),asyncThunk:t}}()):t.reducers)||{},o=Object.keys(i),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(t,e){const n="string"==typeof t?t:t.type;if(!n)throw new Error(ed(12));if(n in a.sliceCaseReducersByType)throw new Error(ed(13));return a.sliceCaseReducersByType[n]=e,s},addMatcher:(t,e)=>(a.sliceMatchers.push({matcher:t,reducer:e}),s),exposeAction:(t,e)=>(a.actionCreators[t]=e,s),exposeCaseReducer:(t,e)=>(a.sliceCaseReducersByName[t]=e,s)};function c(){const[e={},n=[],r]="function"==typeof t.extraReducers?gh(t.extraReducers):[t.extraReducers],i={...e,...a.sliceCaseReducersByType};return function(t,e){let n,[r,i,o]=gh(e);if("function"==typeof t)n=()=>ch(t());else{const e=ch(t);n=()=>e}function a(t=n(),e){let a=[r[e.type],...i.filter(({matcher:t})=>t(e)).map(({reducer:t})=>t)];return 0===a.filter(t=>!!t).length&&(a=[o]),a.reduce((t,n)=>{if(n){if(iu(t)){const r=n(t,e);return void 0===r?t:r}if(ou(t))return eh(t,t=>n(t,e));{const r=n(t,e);if(void 0===r){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return t},t)}return a.getInitialState=n,a}(t.initialState,t=>{for(let e in i)t.addCase(e,i[e]);for(let e of a.sliceMatchers)t.addMatcher(e.matcher,e.reducer);for(let e of n)t.addMatcher(e.matcher,e.reducer);r&&t.addDefaultCase(r)})}o.forEach(r=>{const o=i[r],a={reducerName:r,type:mh(n,r),createNotation:"function"==typeof t.reducers};!function(t){return"asyncThunk"===t._reducerDefinitionType}(o)?function({type:t,reducerName:e,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!function(t){return"reducerWithPrepare"===t._reducerDefinitionType}(r))throw new Error(ed(17));o=r.reducer,a=r.prepare}else o=r;i.addCase(t,o).exposeCaseReducer(e,o).exposeAction(e,a?ah(t,a):ah(t))}(a,o,s):function({type:t,reducerName:e},n,r,i){if(!i)throw new Error(ed(18));const{payloadCreator:o,fulfilled:a,pending:s,rejected:c,settled:l,options:u}=n,h=i(t,o,u);r.exposeAction(e,h),a&&r.addCase(h.fulfilled,a);s&&r.addCase(h.pending,s);c&&r.addCase(h.rejected,c);l&&r.addMatcher(h.settled,l);r.exposeCaseReducer(e,{fulfilled:a||_h,pending:s||_h,rejected:c||_h,settled:l||_h})}(a,o,s,e)});const l=t=>t,u=new Map,h=new WeakMap;let d;function f(t,e){return d||(d=c()),d(t,e)}function p(){return d||(d=c()),d.getInitialState()}function g(e,n=!1){function r(t){let i=t[e];return void 0===i&&n&&(i=lh(h,r,p)),i}function i(e=l){const r=lh(u,n,()=>new WeakMap);return lh(r,e,()=>{const r={};for(const[i,o]of Object.entries(t.selectors??{}))r[i]=xh(o,e,()=>lh(h,e,p),n);return r})}return{reducerPath:e,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}const y={name:n,reducer:f,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:p,...g(r),injectInto(t,{reducerPath:e,...n}={}){const i=e??r;return t.inject({reducerPath:i,reducer:f},n),{...y,...g(i,!0)}}};return y}}function xh(t,e,n,r){function i(i,...o){let a=e(i);return void 0===a&&r&&(a=n()),t(a,...o)}return i.unwrapped=t,i}var wh=bh();function _h(){}var Oh="listener",Sh="completed",Ph="cancelled",Mh=`task-${Ph}`,kh=`task-${Sh}`,Eh=`${Oh}-${Ph}`,Ah=`${Oh}-${Sh}`,Ch=class{constructor(t){this.code=t,this.message=`task ${Ph} (reason: ${t})`}name="TaskAbortError";message},Ih=(t,e)=>{if("function"!=typeof t)throw new TypeError(ed(32))},jh=()=>{},Dh=(t,e=jh)=>(t.catch(e),t),Th=(t,e)=>(t.addEventListener("abort",e,{once:!0}),()=>t.removeEventListener("abort",e)),Rh=(t,e)=>{const n=t.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:e,configurable:!0,writable:!0}),t.abort(e))},Lh=t=>{if(t.aborted){const{reason:e}=t;throw new Ch(e)}};function Bh(t,e){let n=jh;return new Promise((r,i)=>{const o=()=>i(new Ch(t.reason));t.aborted?o():(n=Th(t,o),e.finally(()=>n()).then(r,i))}).finally(()=>{n=jh})}var Nh=t=>e=>Dh(Bh(t,e).then(e=>(Lh(t),e))),zh=t=>{const e=Nh(t);return t=>e(new Promise(e=>setTimeout(e,t)))},{assign:Fh}=Object,Vh={},Wh="listenerMiddleware",Uh=(t,e)=>(n,r)=>{Ih(n);const i=new AbortController;var o;o=i,Th(t,()=>Rh(o,t.reason));const a=(async(t,e)=>{try{return await Promise.resolve(),{status:"ok",value:await t()}}catch(n){return{status:n instanceof Ch?"cancelled":"rejected",error:n}}finally{e?.()}})(async()=>{Lh(t),Lh(i.signal);const e=await n({pause:Nh(i.signal),delay:zh(i.signal),signal:i.signal});return Lh(i.signal),e},()=>Rh(i,kh));return r?.autoJoin&&e.push(a.catch(jh)),{result:Nh(t)(a),cancel(){Rh(i,Mh)}}},Kh=(t,e)=>(n,r)=>Dh((async(n,r)=>{Lh(e);let i=()=>{};const o=[new Promise((e,r)=>{let o=t({predicate:n,effect:(t,n)=>{n.unsubscribe(),e([t,n.getState(),n.getOriginalState()])}});i=()=>{o(),r()}})];null!=r&&o.push(new Promise(t=>setTimeout(t,r,null)));try{const t=await Bh(e,Promise.race(o));return Lh(e),t}finally{i()}})(n,r)),Hh=t=>{let{type:e,actionCreator:n,matcher:r,predicate:i,effect:o}=t;if(e)i=ah(e).match;else if(n)e=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(ed(21));return Ih(o),{predicate:i,type:e,effect:o}},$h=Fh(t=>{const{type:e,predicate:n,effect:r}=Hh(t);return{id:yh(),effect:r,type:e,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(ed(22))}}},{withTypes:()=>$h}),Yh=(t,e)=>{const{type:n,effect:r,predicate:i}=Hh(e);return Array.from(t.values()).find(t=>("string"==typeof n?t.type===n:t.predicate===i)&&t.effect===r)},Xh=t=>{t.pending.forEach(t=>{Rh(t,Eh)})},qh=(t,e,n)=>{try{t(e,n)}catch(r){setTimeout(()=>{throw r},0)}},Gh=Fh(ah(`${Wh}/add`),{withTypes:()=>Gh}),Zh=ah(`${Wh}/removeAll`),Qh=Fh(ah(`${Wh}/remove`),{withTypes:()=>Qh}),Jh=(...t)=>{console.error(`${Wh}/error`,...t)},td=(t={})=>{const e=new Map,n=new Map,{extra:r,onError:i=Jh}=t;Ih(i);const o=t=>(t=>(t.unsubscribe=()=>e.delete(t.id),e.set(t.id,t),e=>{t.unsubscribe(),e?.cancelActive&&Xh(t)}))(Yh(e,t)??$h(t));Fh(o,{withTypes:()=>o});const a=t=>{const n=Yh(e,t);return n&&(n.unsubscribe(),t.cancelActive&&Xh(n)),!!n};Fh(a,{withTypes:()=>a});const s=async(t,a,s,c)=>{const l=new AbortController,u=Kh(o,l.signal),h=[];try{t.pending.add(l),(t=>{const e=n.get(t)??0;n.set(t,e+1)})(t),await Promise.resolve(t.effect(a,Fh({},s,{getOriginalState:c,condition:(t,e)=>u(t,e).then(Boolean),take:u,delay:zh(l.signal),pause:Nh(l.signal),extra:r,signal:l.signal,fork:Uh(l.signal,h),unsubscribe:t.unsubscribe,subscribe:()=>{e.set(t.id,t)},cancelActiveListeners:()=>{t.pending.forEach((t,e,n)=>{t!==l&&(Rh(t,Eh),n.delete(t))})},cancel:()=>{Rh(l,Eh),t.pending.delete(l)},throwIfCancelled:()=>{Lh(l.signal)}})))}catch(d){d instanceof Ch||qh(i,d,{raisedBy:"effect"})}finally{await Promise.all(h),Rh(l,Ah),(t=>{const e=n.get(t)??1;1===e?n.delete(t):n.set(t,e-1)})(t),t.pending.delete(l)}},c=((t,e)=>()=>{for(const t of e.keys())Xh(t);t.clear()})(e,n);return{middleware:t=>n=>r=>{if(!Hl(r))return n(r);if(Gh.match(r))return o(r.payload);if(Zh.match(r))return void c();if(Qh.match(r))return a(r.payload);let l=t.getState();const u=()=>{if(l===Vh)throw new Error(ed(23));return l};let h;try{if(h=n(r),e.size>0){const n=t.getState(),o=Array.from(e.values());for(const e of o){let o=!1;try{o=e.predicate(r,n,l)}catch(d){o=!1,qh(i,d,{raisedBy:"predicate"})}o&&s(e,r,t,u)}}}finally{l=Vh}return h},startListening:o,stopListening:a,clearListeners:c}};function ed(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var nd=wh({name:"chartLayout",initialState:{layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(t,e){t.layoutType=e.payload},setChartSize(t,e){t.width=e.payload.width,t.height=e.payload.height},setMargin(t,e){var n,r,i,o;t.margin.top=null!==(n=e.payload.top)&&void 0!==n?n:0,t.margin.right=null!==(r=e.payload.right)&&void 0!==r?r:0,t.margin.bottom=null!==(i=e.payload.bottom)&&void 0!==i?i:0,t.margin.left=null!==(o=e.payload.left)&&void 0!==o?o:0},setScale(t,e){t.scale=e.payload}}}),{setMargin:rd,setLayout:id,setChartSize:od,setScale:ad}=nd.actions,sd=nd.reducer;function cd(t,e,n){return Array.isArray(t)&&t&&e+n!==0?t.slice(e,n+1):t}function ld(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function ud(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ld(Object(n),!0).forEach(function(e){hd(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ld(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function hd(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function dd(t,e,n){return ws(t)||ws(e)?n:gs(e)?us(t,e,n):"function"==typeof e?e(t):n}var fd=(t,e)=>"horizontal"===t&&"xAxis"===e||"vertical"===t&&"yAxis"===e||"centric"===t&&"angleAxis"===e||"radial"===t&&"radiusAxis"===e,pd=1e-4,gd={sign:t=>{var e=t.length;if(!(e<=0))for(var n=0,r=t[0].length;n<r;++n)for(var i=0,o=0,a=0;a<e;++a){var s=ds(t[a][n][1])?t[a][n][0]:t[a][n][1];s>=0?(t[a][n][0]=i,t[a][n][1]=i+s,i=t[a][n][1]):(t[a][n][0]=o,t[a][n][1]=o+s,o=t[a][n][1])}},expand:d,none:h,silhouette:u,wiggle:l,positive:t=>{var e=t.length;if(!(e<=0))for(var n=0,r=t[0].length;n<r;++n)for(var i=0,o=0;o<e;++o){var a=ds(t[o][n][1])?t[o][n][0]:t[o][n][1];a>=0?(t[o][n][0]=i,t[o][n][1]=i+a,i=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}}},yd=(t,e,n)=>{var r=gd[n];return s().keys(e).value((t,e)=>Number(dd(t,e,0))).order(c).offset(r)(t)},vd=(t,e,n)=>{var r;if(null!=t)return[(r=Object.keys(t).reduce((r,i)=>{var o=t[i],{stackedData:a}=o,s=a.reduce((t,r)=>{var i,o=cd(r,e,n),a=(i=o.flat(2).filter(ps),[Math.min(...i),Math.max(...i)]);return[Math.min(t[0],a[0]),Math.max(t[1],a[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]))[0]===1/0?0:r[0],r[1]===-1/0?0:r[1]]},md=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,bd=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,xd=(t,e,n)=>{if(t&&t.scale&&t.scale.bandwidth)return t.scale.bandwidth();if(t&&e&&e.length>=2){for(var r=Rl(e,t=>t.coordinate),i=1/0,o=1,a=r.length;o<a;o++){var s=r[o],c=r[o-1];i=Math.min((s.coordinate||0)-(c.coordinate||0),i)}return i===1/0?0:i}return n?void 0:0};function wd(t){var{tooltipEntrySettings:e,dataKey:n,payload:r,value:i,name:o}=t;return ud(ud({},e),{},{dataKey:n,payload:r,value:i,name:o})}var _d=t=>t.layout.width,Od=t=>t.layout.height,Sd=t=>t.layout.scale,Pd=t=>t.layout.margin,Md=a(t=>t.cartesianAxis.xAxis,t=>Object.values(t)),kd=a(t=>t.cartesianAxis.yAxis,t=>Object.values(t));function Ed(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Ad(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ed(Object(n),!0).forEach(function(e){Cd(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ed(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Cd(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Id=a([_d,Od,Pd,t=>t.brush.height,function(t){return kd(t).reduce((t,e)=>"left"!==e.orientation||e.mirror||e.hide?t:t+("number"==typeof e.width?e.width:60),0)},function(t){return kd(t).reduce((t,e)=>"right"!==e.orientation||e.mirror||e.hide?t:t+("number"==typeof e.width?e.width:60),0)},function(t){return Md(t).reduce((t,e)=>"top"!==e.orientation||e.mirror||e.hide?t:t+e.height,0)},function(t){return Md(t).reduce((t,e)=>"bottom"!==e.orientation||e.mirror||e.hide?t:t+e.height,0)},Ll,t=>t.legend.size],(t,e,n,r,i,o,a,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+o},h=Ad(Ad({},{top:(n.top||0)+a,bottom:(n.bottom||0)+s}),u),d=h.bottom;h.bottom+=r,h=((t,e,n)=>{if(e&&n){var{width:r,height:i}=n,{align:o,verticalAlign:a,layout:s}=e;if(("vertical"===s||"horizontal"===s&&"middle"===a)&&"center"!==o&&ps(t[o]))return ud(ud({},t),{},{[o]:t[o]+(r||0)});if(("horizontal"===s||"vertical"===s&&"center"===o)&&"middle"!==a&&ps(t[a]))return ud(ud({},t),{},{[a]:t[a]+(i||0)})}return t})(h,c,l);var f=t-h.left-h.right,p=e-h.top-h.bottom;return Ad(Ad({brushBottom:d},h),{},{width:Math.max(f,0),height:Math.max(p,0)})}),jd=a(Id,t=>({x:t.left,y:t.top,width:t.width,height:t.height}));a(_d,Od,(t,e)=>({x:0,y:0,width:t,height:e}));var Dd,Td,Rd,Ld,Bd,Nd=t.createContext(null),zd=()=>null!=t.useContext(Nd),Fd=t=>t.brush,Vd=a([Fd,Id,Pd],(t,e,n)=>({height:t.height,x:ps(t.x)?t.x:e.left,y:ps(t.y)?t.y:e.top+e.height+e.brushBottom-((null==n?void 0:n.bottom)||0),width:ps(t.width)?t.width:e.width})),Wd={},Ud={},Kd={};function Hd(){return Dd||(Dd=1,t=Kd,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.debounce=function(t,e,{signal:n,edges:r}={}){let i,o=null;const a=null!=r&&r.includes("leading"),s=null==r||r.includes("trailing"),c=()=>{null!==o&&(t.apply(i,o),i=void 0,o=null)};let l=null;const u=()=>{null!=l&&clearTimeout(l),l=setTimeout(()=>{l=null,s&&c(),h()},e)},h=()=>{null!==l&&(clearTimeout(l),l=null),i=void 0,o=null},d=function(...t){if(n?.aborted)return;i=this,o=t;const e=null==l;u(),a&&e&&c()};return d.schedule=u,d.cancel=h,d.flush=()=>{c()},n?.addEventListener("abort",h,{once:!0}),d}),Kd;var t}function $d(){return Td||(Td=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Hd();t.debounce=function(t,n=0,r={}){"object"!=typeof r&&(r={});const{leading:i=!1,trailing:o=!0,maxWait:a}=r,s=Array(2);let c;i&&(s[0]="leading"),o&&(s[1]="trailing");let l=null;const u=e.debounce(function(...e){c=t.apply(this,e),l=null},n,{edges:s}),h=function(...e){return null!=a&&(null===l&&(l=Date.now()),Date.now()-l>=a)?(c=t.apply(this,e),l=Date.now(),u.cancel(),u.schedule(),c):(u.apply(this,e),c)};return h.cancel=u.cancel,h.flush=()=>(u.flush(),c),h}}(Ud)),Ud}function Yd(){return Bd?Ld:(Bd=1,Ld=(Rd||(Rd=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=$d();t.throttle=function(t,n=0,r={}){const{leading:i=!0,trailing:o=!0}=r;return e.debounce(t,n,{leading:i,maxWait:n,trailing:o})}}(Wd)),Wd).throttle)}const Xd=e(Yd());var qd=function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if("undefined"!=typeof console&&console.warn&&(void 0===e&&console.warn("LogUtils requires an error message argument"),!t))if(void 0===e)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(e.replace(/%s/g,()=>r[o++]))}},Gd=(t,e,n)=>{var{width:r="100%",height:i="100%",aspect:o,maxHeight:a}=n,s=fs(r)?t:Number(r),c=fs(i)?e:Number(i);return o&&o>0&&(s?c=s/o:c&&(s=c*o),a&&null!=c&&c>a&&(c=a)),{calculatedWidth:s,calculatedHeight:c}},Zd={width:0,height:0,overflow:"visible"},Qd={width:0,overflowX:"visible"},Jd={height:0,overflowY:"visible"},tf={},ef=t=>{var{width:e,height:n}=t,r=fs(e),i=fs(n);return r&&i?Zd:r?Qd:i?Jd:tf};function nf(t){return Number.isFinite(t)}function rf(t){return"number"==typeof t&&t>0&&Number.isFinite(t)}function of(){return of=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},of.apply(null,arguments)}function af(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function sf(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?af(Object(n),!0).forEach(function(e){cf(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):af(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function cf(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var lf=t.createContext({width:-1,height:-1});function uf(e){var{children:n,width:r,height:i}=e,o=t.useMemo(()=>({width:r,height:i}),[r,i]);return function(t){return rf(t.width)&&rf(t.height)}(o)?t.createElement(lf.Provider,{value:o},n):null}var hf=()=>t.useContext(lf),df=t.forwardRef((e,n)=>{var{aspect:r,initialDimension:o={width:-1,height:-1},width:a,height:s,minWidth:c=0,minHeight:l,maxHeight:u,children:h,debounce:d=0,id:f,className:p,onResize:g,style:y={}}=e,v=t.useRef(null),m=t.useRef();m.current=g,t.useImperativeHandle(n,()=>v.current);var[b,x]=t.useState({containerWidth:o.width,containerHeight:o.height}),w=t.useCallback((t,e)=>{x(n=>{var r=Math.round(t),i=Math.round(e);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);t.useEffect(()=>{if(null==v.current||"undefined"==typeof ResizeObserver)return Ss;var t=t=>{var e,{width:n,height:r}=t[0].contentRect;w(n,r),null===(e=m.current)||void 0===e||e.call(m,n,r)};d>0&&(t=Xd(t,d,{trailing:!0,leading:!1}));var e=new ResizeObserver(t),{width:n,height:r}=v.current.getBoundingClientRect();return w(n,r),e.observe(v.current),()=>{e.disconnect()}},[w,d]);var{containerWidth:_,containerHeight:O}=b;qd(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:S,calculatedHeight:P}=Gd(_,O,{width:a,height:s,aspect:r,maxHeight:u});return qd(null!=S&&S>0||null!=P&&P>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",S,P,a,s,c,l,r),t.createElement("div",{id:f?"".concat(f):void 0,className:i("recharts-responsive-container",p),style:sf(sf({},y),{},{width:a,height:s,minWidth:c,minHeight:l,maxHeight:u}),ref:v},t.createElement("div",{style:ef({width:a,height:s})},t.createElement(uf,{width:S,height:P},h)))}),ff=t.forwardRef((e,n)=>{var r=hf();if(rf(r.width)&&rf(r.height))return e.children;var{width:i,height:o}=function(t){var{width:e,height:n,aspect:r}=t,i=e,o=n;return void 0===i&&void 0===o?(i="100%",o="100%"):void 0===i?i=r&&r>0?void 0:"100%":void 0===o&&(o=r&&r>0?void 0:"100%"),{width:i,height:o}}({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:a,calculatedHeight:s}=Gd(void 0,void 0,{width:i,height:o,aspect:e.aspect,maxHeight:e.maxHeight});return ps(a)&&ps(s)?t.createElement(uf,{width:a,height:s},e.children):t.createElement(df,of({},e,{width:i,height:o,ref:n}))}),pf=()=>{var t,e=zd(),n=hl(jd),r=hl(Vd),i=null===(t=hl(Fd))||void 0===t?void 0:t.padding;return e&&r&&i?{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}:n},gf={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},yf=t=>t.layout.layoutType,vf=()=>hl(yf),mf=e=>{var n=sl(),r=zd(),{width:i,height:o}=e,a=hf(),s=i,c=o;return a&&(s=a.width>0?a.width:i,c=a.height>0?a.height:o),t.useEffect(()=>{!r&&rf(s)&&rf(c)&&n(od({width:s,height:c}))},[n,r,s,c]),null},bf=e=>{var{margin:n}=e,r=sl();return t.useEffect(()=>{r(rd(n))},[r,n]),null},xf=Symbol.for("immer-nothing"),wf=Symbol.for("immer-draftable"),_f=Symbol.for("immer-state");function Of(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Sf=Object.getPrototypeOf;function Pf(t){return!!t&&!!t[_f]}function Mf(t){return!!t&&(Af(t)||Array.isArray(t)||!!t[wf]||!!t.constructor?.[wf]||Tf(t)||Rf(t))}var kf=Object.prototype.constructor.toString(),Ef=new WeakMap;function Af(t){if(!t||"object"!=typeof t)return!1;const e=Object.getPrototypeOf(t);if(null===e||e===Object.prototype)return!0;const n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;if(n===Object)return!0;if("function"!=typeof n)return!1;let r=Ef.get(n);return void 0===r&&(r=Function.toString.call(n),Ef.set(n,r)),r===kf}function Cf(t,e,n=!0){if(0===If(t)){(n?Reflect.ownKeys(t):Object.keys(t)).forEach(n=>{e(n,t[n],t)})}else t.forEach((n,r)=>e(r,n,t))}function If(t){const e=t[_f];return e?e.type_:Array.isArray(t)?1:Tf(t)?2:Rf(t)?3:0}function jf(t,e){return 2===If(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Df(t,e,n){const r=If(t);2===r?t.set(e,n):3===r?t.add(n):t[e]=n}function Tf(t){return t instanceof Map}function Rf(t){return t instanceof Set}function Lf(t){return t.copy_||t.base_}function Bf(t,e){if(Tf(t))return new Map(t);if(Rf(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=Af(t);if(!0===e||"class_only"===e&&!n){const e=Object.getOwnPropertyDescriptors(t);delete e[_f];let n=Reflect.ownKeys(e);for(let r=0;r<n.length;r++){const i=n[r],o=e[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Sf(t),e)}{const e=Sf(t);if(null!==e&&n)return{...t};const r=Object.create(e);return Object.assign(r,t)}}function Nf(t,e=!1){return Ff(t)||Pf(t)||!Mf(t)||(If(t)>1&&Object.defineProperties(t,{set:zf,add:zf,clear:zf,delete:zf}),Object.freeze(t),e&&Object.values(t).forEach(t=>Nf(t,!0))),t}var zf={value:function(){Of(2)}};function Ff(t){return null===t||"object"!=typeof t||Object.isFrozen(t)}var Vf,Wf={};function Uf(t){const e=Wf[t];return e||Of(0),e}function Kf(){return Vf}function Hf(t,e){e&&(Uf("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function $f(t){Yf(t),t.drafts_.forEach(qf),t.drafts_=null}function Yf(t){t===Vf&&(Vf=t.parent_)}function Xf(t){return Vf={drafts_:[],parent_:Vf,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function qf(t){const e=t[_f];0===e.type_||1===e.type_?e.revoke_():e.revoked_=!0}function Gf(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return void 0!==t&&t!==n?(n[_f].modified_&&($f(e),Of(4)),Mf(t)&&(t=Zf(e,t),e.parent_||Jf(e,t)),e.patches_&&Uf("Patches").generateReplacementPatches_(n[_f].base_,t,e.patches_,e.inversePatches_)):t=Zf(e,n,[]),$f(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==xf?t:void 0}function Zf(t,e,n){if(Ff(e))return e;const r=t.immer_.shouldUseStrictIteration(),i=e[_f];if(!i)return Cf(e,(r,o)=>Qf(t,i,e,r,o,n),r),e;if(i.scope_!==t)return e;if(!i.modified_)return Jf(t,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const e=i.copy_;let o=e,a=!1;3===i.type_&&(o=new Set(e),e.clear(),a=!0),Cf(o,(r,o)=>Qf(t,i,e,r,o,n,a),r),Jf(t,e,!1),n&&t.patches_&&Uf("Patches").generatePatches_(i,n,t.patches_,t.inversePatches_)}return i.copy_}function Qf(t,e,n,r,i,o,a){if(null==i)return;if("object"!=typeof i&&!a)return;const s=Ff(i);if(!s||a){if(Pf(i)){const a=Zf(t,i,o&&e&&3!==e.type_&&!jf(e.assigned_,r)?o.concat(r):void 0);if(Df(n,r,a),!Pf(a))return;t.canAutoFreeze_=!1}else a&&n.add(i);if(Mf(i)&&!s){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;if(e&&e.base_&&e.base_[r]===i&&s)return;Zf(t,i),e&&e.scope_.parent_||"symbol"==typeof r||!(Tf(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))||Jf(t,i)}}}function Jf(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Nf(e,n)}var tp={get(t,e){if(e===_f)return t;const n=Lf(t);if(!jf(n,e))return function(t,e,n){const r=rp(e,n);return r?"value"in r?r.value:r.get?.call(t.draft_):void 0}(t,n,e);const r=n[e];return t.finalized_||!Mf(r)?r:r===np(t.base_,e)?(op(t),t.copy_[e]=ap(r,t)):r},has:(t,e)=>e in Lf(t),ownKeys:t=>Reflect.ownKeys(Lf(t)),set(t,e,n){const r=rp(Lf(t),e);if(r?.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const r=np(Lf(t),e),a=r?.[_f];if(a&&a.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(((i=n)===(o=r)?0!==i||1/i==1/o:i!=i&&o!=o)&&(void 0!==n||jf(t.base_,e)))return!0;op(t),ip(t)}var i,o;return t.copy_[e]===n&&(void 0!==n||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_[e]=!0),!0},deleteProperty:(t,e)=>(void 0!==np(t.base_,e)||e in t.base_?(t.assigned_[e]=!1,op(t),ip(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0),getOwnPropertyDescriptor(t,e){const n=Lf(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{writable:!0,configurable:1!==t.type_||"length"!==e,enumerable:r.enumerable,value:n[e]}:r},defineProperty(){Of(11)},getPrototypeOf:t=>Sf(t.base_),setPrototypeOf(){Of(12)}},ep={};function np(t,e){const n=t[_f];return(n?Lf(n):t)[e]}function rp(t,e){if(!(e in t))return;let n=Sf(t);for(;n;){const t=Object.getOwnPropertyDescriptor(n,e);if(t)return t;n=Sf(n)}}function ip(t){t.modified_||(t.modified_=!0,t.parent_&&ip(t.parent_))}function op(t){t.copy_||(t.copy_=Bf(t.base_,t.scope_.immer_.useStrictShallowCopy_))}Cf(tp,(t,e)=>{ep[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),ep.deleteProperty=function(t,e){return ep.set.call(this,t,e,void 0)},ep.set=function(t,e,n){return tp.set.call(this,t[0],e,n,t[0])};function ap(t,e){const n=Tf(t)?Uf("MapSet").proxyMap_(t,e):Rf(t)?Uf("MapSet").proxySet_(t,e):function(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:Kf(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=tp;n&&(i=[r],o=ep);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}(t,e);return(e?e.scope_:Kf()).drafts_.push(n),n}function sp(t){if(!Mf(t)||Ff(t))return t;const e=t[_f];let n,r=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=Bf(t,e.scope_.immer_.useStrictShallowCopy_),r=e.scope_.immer_.shouldUseStrictIteration()}else n=Bf(t,!0);return Cf(n,(t,e)=>{Df(n,t,sp(e))},r),e&&(e.finalized_=!1),n}var cp=new class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,e,n)=>{if("function"==typeof t&&"function"!=typeof e){const n=e;e=t;const r=this;return function(t=n,...i){return r.produce(t,t=>e.call(this,t,...i))}}let r;if("function"!=typeof e&&Of(6),void 0!==n&&"function"!=typeof n&&Of(7),Mf(t)){const i=Xf(this),o=ap(t,void 0);let a=!0;try{r=e(o),a=!1}finally{a?$f(i):Yf(i)}return Hf(i,n),Gf(r,i)}if(!t||"object"!=typeof t){if(r=e(t),void 0===r&&(r=t),r===xf&&(r=void 0),this.autoFreeze_&&Nf(r,!0),n){const e=[],i=[];Uf("Patches").generateReplacementPatches_(t,r,e,i),n(e,i)}return r}Of(1)},this.produceWithPatches=(t,e)=>{if("function"==typeof t)return(e,...n)=>this.produceWithPatches(e,e=>t(e,...n));let n,r;return[this.produce(t,e,(t,e)=>{n=t,r=e}),n,r]},"boolean"==typeof t?.autoFreeze&&this.setAutoFreeze(t.autoFreeze),"boolean"==typeof t?.useStrictShallowCopy&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),"boolean"==typeof t?.useStrictIteration&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Mf(t)||Of(8),Pf(t)&&(t=function(t){Pf(t)||Of(10);return sp(t)}(t));const e=Xf(this),n=ap(t,void 0);return n[_f].isManual_=!0,Yf(e),n}finishDraft(t,e){const n=t&&t[_f];n&&n.isManual_||Of(9);const{scope_:r}=n;return Hf(r,e),Gf(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const r=e[n];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}n>-1&&(e=e.slice(n+1));const r=Uf("Patches").applyPatches_;return Pf(t)?r(t,e):this.produce(t,t=>r(t,e))}};cp.produce;var lp=wh({name:"legend",initialState:{settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(t,e){t.size.width=e.payload.width,t.size.height=e.payload.height},setLegendSettings(t,e){t.settings.align=e.payload.align,t.settings.layout=e.payload.layout,t.settings.verticalAlign=e.payload.verticalAlign,t.settings.itemSorter=e.payload.itemSorter},addLegendPayload:{reducer(t,e){t.payload.push(e.payload)},prepare:hh()},replaceLegendPayload:{reducer(t,e){var{prev:n,next:r}=e.payload,i=Qu(t).payload.indexOf(n);i>-1&&(t.payload[i]=r)},prepare:hh()},removeLegendPayload:{reducer(t,e){var n=Qu(t).payload.indexOf(e.payload);n>-1&&t.payload.splice(n,1)},prepare:hh()}}}),{setLegendSize:up,setLegendSettings:hp,addLegendPayload:dp,replaceLegendPayload:fp,removeLegendPayload:pp}=lp.actions,gp=lp.reducer;function yp(){return yp=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},yp.apply(null,arguments)}function vp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function mp(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?vp(Object(n),!0).forEach(function(e){bp(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vp(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function bp(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xp(t){return Array.isArray(t)&&gs(t[0])&&gs(t[1])?t.join(" ~ "):t}var wp=e=>{var{separator:n=" : ",contentStyle:r={},itemStyle:o={},labelStyle:a={},payload:s,formatter:c,itemSorter:l,wrapperClassName:u,labelClassName:h,label:d,labelFormatter:f,accessibilityLayer:p=!1}=e,g=mp({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},r),y=mp({margin:0},a),v=!ws(d),m=v?d:"",b=i("recharts-default-tooltip",u),x=i("recharts-tooltip-label",h);v&&f&&null!=s&&(m=f(d,s));var w=p?{role:"status","aria-live":"assertive"}:{};return t.createElement("div",yp({className:b,style:g},w),t.createElement("p",{className:x,style:y},t.isValidElement(m)?m:"".concat(m)),(()=>{if(s&&s.length){var e=(l?Rl(s,l):s).map((e,r)=>{if("none"===e.type)return null;var i=e.formatter||c||xp,{value:a,name:l}=e,u=a,h=l;if(i){var d=i(a,l,e,r,s);if(Array.isArray(d))[u,h]=d;else{if(null==d)return null;u=d}}var f=mp({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},o);return t.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(r),style:f},gs(h)?t.createElement("span",{className:"recharts-tooltip-item-name"},h):null,gs(h)?t.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,t.createElement("span",{className:"recharts-tooltip-item-value"},u),t.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return t.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null})())},_p="recharts-tooltip-wrapper",Op={visibility:"hidden"};function Sp(t){var{coordinate:e,translateX:n,translateY:r}=t;return i(_p,{["".concat(_p,"-right")]:ps(n)&&e&&ps(e.x)&&n>=e.x,["".concat(_p,"-left")]:ps(n)&&e&&ps(e.x)&&n<e.x,["".concat(_p,"-bottom")]:ps(r)&&e&&ps(e.y)&&r>=e.y,["".concat(_p,"-top")]:ps(r)&&e&&ps(e.y)&&r<e.y})}function Pp(t){var{allowEscapeViewBox:e,coordinate:n,key:r,offsetTopLeft:i,position:o,reverseDirection:a,tooltipDimension:s,viewBox:c,viewBoxDimension:l}=t;if(o&&ps(o[r]))return o[r];var u=n[r]-s-(i>0?i:0),h=n[r]+i;if(e[r])return a[r]?u:h;var d=c[r];return null==d?0:a[r]?u<d?Math.max(h,d):Math.max(u,d):null==l?0:h+s>d+l?Math.max(u,d):Math.max(h,d)}function Mp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function kp(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Mp(Object(n),!0).forEach(function(e){Ep(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mp(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ep(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Ap extends t.PureComponent{constructor(){super(...arguments),Ep(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Ep(this,"handleKeyDown",t=>{var e,n,r,i;"Escape"===t.key&&this.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(e=null===(n=this.props.coordinate)||void 0===n?void 0:n.x)&&void 0!==e?e:0,y:null!==(r=null===(i=this.props.coordinate)||void 0===i?void 0:i.y)&&void 0!==r?r:0}})})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,e;this.state.dismissed&&((null===(t=this.props.coordinate)||void 0===t?void 0:t.x)===this.state.dismissedAtCoordinate.x&&(null===(e=this.props.coordinate)||void 0===e?void 0:e.y)===this.state.dismissedAtCoordinate.y||(this.state.dismissed=!1))}render(){var{active:e,allowEscapeViewBox:n,animationDuration:r,animationEasing:i,children:o,coordinate:a,hasPayload:s,isAnimationActive:c,offset:l,position:u,reverseDirection:h,useTranslate3d:d,viewBox:f,wrapperStyle:p,lastBoundingBox:g,innerRef:y,hasPortalFromProps:v}=this.props,{cssClasses:m,cssProperties:b}=function(t){var e,n,r,{allowEscapeViewBox:i,coordinate:o,offsetTopLeft:a,position:s,reverseDirection:c,tooltipBox:l,useTranslate3d:u,viewBox:h}=t;return e=l.height>0&&l.width>0&&o?function(t){var{translateX:e,translateY:n,useTranslate3d:r}=t;return{transform:r?"translate3d(".concat(e,"px, ").concat(n,"px, 0)"):"translate(".concat(e,"px, ").concat(n,"px)")}}({translateX:n=Pp({allowEscapeViewBox:i,coordinate:o,key:"x",offsetTopLeft:a,position:s,reverseDirection:c,tooltipDimension:l.width,viewBox:h,viewBoxDimension:h.width}),translateY:r=Pp({allowEscapeViewBox:i,coordinate:o,key:"y",offsetTopLeft:a,position:s,reverseDirection:c,tooltipDimension:l.height,viewBox:h,viewBoxDimension:h.height}),useTranslate3d:u}):Op,{cssProperties:e,cssClasses:Sp({translateX:n,translateY:r,coordinate:o})}}({allowEscapeViewBox:n,coordinate:a,offsetTopLeft:l,position:u,reverseDirection:h,tooltipBox:{height:g.height,width:g.width},useTranslate3d:d,viewBox:f}),x=v?{}:kp(kp({transition:c&&e?"transform ".concat(r,"ms ").concat(i):void 0},b),{},{pointerEvents:"none",visibility:!this.state.dismissed&&e&&s?"visible":"hidden",position:"absolute",top:0,left:0}),w=kp(kp({},x),{},{visibility:!this.state.dismissed&&e&&s?"visible":"hidden"},p);return t.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:m,style:w,ref:y},o)}}function Cp(){return Cp=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Cp.apply(null,arguments)}function Ip(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function jp(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ip(Object(n),!0).forEach(function(e){Dp(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ip(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Dp(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Tp={curveBasisClosed:k,curveBasisOpen:M,curveBasis:P,curveBumpX:S,curveBumpY:O,curveLinearClosed:_,curveLinear:w,curveMonotoneX:x,curveMonotoneY:b,curveNatural:m,curveStep:v,curveStepAfter:y,curveStepBefore:g},Rp=t=>nf(t.x)&&nf(t.y),Lp=t=>null!=t.base&&Rp(t.base)&&Rp(t),Bp=t=>t.x,Np=t=>t.y,zp=t=>{var{type:e="linear",points:n=[],baseLine:r,layout:i,connectNulls:o=!1}=t,a=((t,e)=>{if("function"==typeof t)return t;var n="curve".concat(_s(t));return"curveMonotone"!==n&&"curveBump"!==n||!e?Tp[n]||w:Tp["".concat(n).concat("vertical"===e?"Y":"X")]})(e,i),s=o?n.filter(Rp):n;if(Array.isArray(r)){var c=n.map((t,e)=>jp(jp({},t),{},{base:r[e]}));return("vertical"===i?f().y(Np).x1(Bp).x0(t=>t.base.x):f().x(Bp).y1(Np).y0(t=>t.base.y)).defined(Lp).curve(a)(o?c.filter(Lp):c)}return("vertical"===i&&ps(r)?f().y(Np).x1(Bp).x0(r):ps(r)?f().x(Bp).y1(Np).y0(r):p().x(Bp).y(Np)).defined(Rp).curve(a)(s)},Fp=e=>{var{className:n,points:r,path:o,pathRef:a}=e;if(!(r&&r.length||o))return null;var s=r&&r.length?zp(e):o;return t.createElement("path",Cp({},Da(e),(e=>{if(!e||"function"==typeof e||"boolean"==typeof e)return null;var n=e;if(t.isValidElement(e)&&(n=e.props),"object"!=typeof n&&"function"!=typeof n)return null;var r={};return Object.keys(n).forEach(t=>{Aa(t)&&(r[t]=e=>n[t](n,e))}),r})(e),{className:i("recharts-curve",n),d:null===s?void 0:s,ref:a}))},Vp=["x","y","top","left","width","height","className"];function Wp(){return Wp=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Wp.apply(null,arguments)}function Up(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Kp(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Hp=(t,e,n,r,i,o)=>"M".concat(t,",").concat(i,"v").concat(r,"M").concat(o,",").concat(e,"h").concat(n),$p=e=>{var{x:n=0,y:r=0,top:o=0,left:a=0,width:s=0,height:c=0,className:l}=e,u=function(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(e,Vp),h=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Up(Object(n),!0).forEach(function(e){Kp(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Up(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({x:n,y:r,top:o,left:a,width:s,height:c},u);return ps(n)&&ps(r)&&ps(s)&&ps(c)&&ps(o)&&ps(a)?t.createElement("path",Wp({},Ra(h),{className:i("recharts-cross",l),d:Hp(n,r,s,c,o,a)})):null};function Yp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Xp(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Yp(Object(n),!0).forEach(function(e){qp(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yp(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function qp(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Gp=(t,e)=>Object.keys(e).reduce((n,r)=>Xp(Xp({},n),{},{[r]:t(r,e[r])}),{});function Zp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Qp(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Zp(Object(n),!0).forEach(function(e){Jp(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zp(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Jp(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var tg=(t,e,n)=>t+(e-t)*n,eg=t=>{var{from:e,to:n}=t;return e!==n},ng=(t,e,n)=>{var r=Gp((e,n)=>{if(eg(n)){var[r,i]=t(n.from,n.to,n.velocity);return Qp(Qp({},n),{},{from:r,velocity:i})}return n},e);return n<1?Gp((t,e)=>eg(e)?Qp(Qp({},e),{},{velocity:tg(e.velocity,r[t].velocity,n),from:tg(e.from,r[t].from,n)}):e,e):ng(t,r,n-1)};function rg(t,e,n,r,i,o){var a,s=r.reduce((n,r)=>Qp(Qp({},n),{},{[r]:{from:t[r],velocity:0,to:e[r]}}),{}),c=null,l=r=>{a||(a=r);var u=(r-a)/n.dt;s=ng(n,s,u),i(Qp(Qp(Qp({},t),e),Gp((t,e)=>e.from,s))),a=r,Object.values(s).filter(eg).length&&(c=o.setTimeout(l))};return()=>(c=o.setTimeout(l),()=>{var t;null===(t=c)||void 0===t||t()})}const ig=(t,e,n,r,i,o)=>{var a,s,c=(a=t,s=e,[Object.keys(a),Object.keys(s)].reduce((t,e)=>t.filter(t=>e.includes(t))));return null==n?()=>(i(Qp(Qp({},t),e)),()=>{}):!0===n.isStepper?rg(t,e,n,c,i,o):function(t,e,n,r,i,o,a){var s,c=null,l=i.reduce((n,r)=>Qp(Qp({},n),{},{[r]:[t[r],e[r]]}),{}),u=i=>{s||(s=i);var h=(i-s)/r,d=Gp((t,e)=>tg(...e,n(h)),l);if(o(Qp(Qp(Qp({},t),e),d)),h<1)c=a.setTimeout(u);else{var f=Gp((t,e)=>tg(...e,n(1)),l);o(Qp(Qp(Qp({},t),e),f))}};return()=>(c=a.setTimeout(u),()=>{var t;null===(t=c)||void 0===t||t()})}(t,e,n,r,c,i,o)};var og=1e-4,ag=(t,e)=>[0,3*t,3*e-6*t,3*t-3*e+1],sg=(t,e)=>t.map((t,n)=>t*e**n).reduce((t,e)=>t+e),cg=(t,e)=>n=>{var r=ag(t,e);return sg(r,n)},lg=(t,e,n,r)=>{var i,o,a=cg(t,n),s=cg(e,r),c=(i=t,o=n,t=>{var e=[...ag(i,o).map((t,e)=>t*e).slice(1),0];return sg(e,t)}),l=t=>t>1?1:t<0?0:t,u=t=>{for(var e=t>1?1:t,n=e,r=0;r<8;++r){var i=a(n)-e,o=c(n);if(Math.abs(i-e)<og||o<og)return s(n);n=l(n-i/o)}return s(n)};return u.isStepper=!1,u},ug=function(){return lg(...function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(1===e.length)switch(e[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 r,i=e[0].split("(");if("cubic-bezier"===i[0]&&4===(null===(r=i[1])||void 0===r?void 0:r.split(")")[0].split(",").length)){var o=i[1].split(")")[0].split(",").map(t=>parseFloat(t));return[o[0],o[1],o[2],o[3]]}}return 4===e.length?e:[0,0,1,1]}(...arguments))},hg=t=>{if("string"==typeof t)switch(t){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return ug(t);case"spring":return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{stiff:e=100,damping:n=8,dt:r=17}=t,i=(t,i,o)=>{var a=o+(-(t-i)*e-o*n)*r/1e3,s=o*r/1e3+t;return Math.abs(s-i)<og&&Math.abs(a)<og?[i,0]:[s,a]};return i.isStepper=!0,i.dt=r,i}();default:if("cubic-bezier"===t.split("(")[0])return ug(t)}return"function"==typeof t?t:null};class dg{setTimeout(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=performance.now(),r=null,i=o=>{o-n>=e?t(o):"function"==typeof requestAnimationFrame&&(r=requestAnimationFrame(i))};return r=requestAnimationFrame(i),()=>{null!=r&&cancelAnimationFrame(r)}}}function fg(){return t=new dg,e=()=>null,n=!1,r=null,i=o=>{if(!n){if(Array.isArray(o)){if(!o.length)return;var a=o,[s,...c]=a;return"number"==typeof s?void(r=t.setTimeout(i.bind(null,c),s)):(i(s),void(r=t.setTimeout(i.bind(null,c))))}"string"==typeof o&&e(o),"object"==typeof o&&e(o),"function"==typeof o&&o()}},{stop:()=>{n=!0},start:t=>{n=!1,r&&(r(),r=null),i(t)},subscribe:t=>(e=t,()=>{e=()=>null}),getTimeoutController:()=>t};var t,e,n,r,i}var pg=t.createContext(fg);var gg=!1,yg=!("undefined"!=typeof window&&window.document&&Boolean(window.document.createElement)&&window.setTimeout),vg={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},mg={t:0},bg={t:1};function xg(e){var n,r,i,o=Es(e,vg),{isActive:a,canBegin:s,duration:c,easing:l,begin:u,onAnimationEnd:h,onAnimationStart:d,children:f}=o,p="auto"===a?!yg:a,g=(n=o.animationId,r=o.animationManager,i=t.useContext(pg),t.useMemo(()=>null!=r?r:i(n),[n,r,i])),[y,v]=t.useState(p?mg:bg),m=t.useRef(null);return t.useEffect(()=>{p||v(bg)},[p]),t.useEffect(()=>{if(!p||!s)return Ss;var t=ig(mg,bg,hg(l),c,v,g.getTimeoutController());return g.start([d,u,()=>{m.current=t()},c,h]),()=>{g.stop(),m.current&&m.current(),h()}},[p,s,c,l,u,d,h,g]),f(y.t)}var wg=["radius"],_g=["radius"];function Og(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Sg(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Og(Object(n),!0).forEach(function(e){Pg(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Og(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Pg(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Mg(){return Mg=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Mg.apply(null,arguments)}function kg(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var Eg=(t,e,n,r,i)=>{var o,a=Math.min(Math.abs(n)/2,Math.abs(r)/2),s=r>=0?1:-1,c=n>=0?1:-1,l=r>=0&&n>=0||r<0&&n<0?1:0;if(a>0&&i instanceof Array){for(var u=[0,0,0,0],h=0;h<4;h++)u[h]=i[h]>a?a:i[h];o="M".concat(t,",").concat(e+s*u[0]),u[0]>0&&(o+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(l,",").concat(t+c*u[0],",").concat(e)),o+="L ".concat(t+n-c*u[1],",").concat(e),u[1]>0&&(o+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(l,",\n ").concat(t+n,",").concat(e+s*u[1])),o+="L ".concat(t+n,",").concat(e+r-s*u[2]),u[2]>0&&(o+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(l,",\n ").concat(t+n-c*u[2],",").concat(e+r)),o+="L ".concat(t+c*u[3],",").concat(e+r),u[3]>0&&(o+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(l,",\n ").concat(t,",").concat(e+r-s*u[3])),o+="Z"}else if(a>0&&i===+i&&i>0){var d=Math.min(a,i);o="M ".concat(t,",").concat(e+s*d,"\n A ").concat(d,",").concat(d,",0,0,").concat(l,",").concat(t+c*d,",").concat(e,"\n L ").concat(t+n-c*d,",").concat(e,"\n A ").concat(d,",").concat(d,",0,0,").concat(l,",").concat(t+n,",").concat(e+s*d,"\n L ").concat(t+n,",").concat(e+r-s*d,"\n A ").concat(d,",").concat(d,",0,0,").concat(l,",").concat(t+n-c*d,",").concat(e+r,"\n L ").concat(t+c*d,",").concat(e+r,"\n A ").concat(d,",").concat(d,",0,0,").concat(l,",").concat(t,",").concat(e+r-s*d," Z")}else o="M ".concat(t,",").concat(e," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return o},Ag={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Cg=e=>{var n=Es(e,Ag),r=t.useRef(null),[o,a]=t.useState(-1);t.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var t=r.current.getTotalLength();t&&a(t)}catch(e){}},[]);var{x:s,y:c,width:l,height:u,radius:h,className:d}=n,{animationEasing:f,animationDuration:p,animationBegin:g,isAnimationActive:y,isUpdateAnimationActive:v}=n,m=t.useRef(l),b=t.useRef(u),x=t.useRef(s),w=t.useRef(c),_=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"animation-",r=t.useRef(vs(n)),i=t.useRef(e);return i.current!==e&&(r.current=vs(n),i.current=e),r.current}(t.useMemo(()=>({x:s,y:c,width:l,height:u,radius:h}),[s,c,l,u,h]),"rectangle-");if(s!==+s||c!==+c||l!==+l||u!==+u||0===l||0===u)return null;var O=i("recharts-rectangle",d);if(!v){var S=Ra(n),{radius:P}=S,M=kg(S,wg);return t.createElement("path",Mg({},M,{radius:"number"==typeof h?h:void 0,className:O,d:Eg(s,c,l,u,h)}))}var k=m.current,E=b.current,A=x.current,C=w.current,I="0px ".concat(-1===o?1:o,"px"),j="".concat(o,"px 0px"),D=((t,e,n)=>t.map(t=>{return"".concat((r=t,r.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())))," ").concat(e,"ms ").concat(n);var r}).join(","))(["strokeDasharray"],p,"string"==typeof f?f:Ag.animationEasing);return t.createElement(xg,{animationId:_,key:_,canBegin:o>0,duration:p,easing:f,isActive:v,begin:g},e=>{var i,o=xs(k,l,e),a=xs(E,u,e),d=xs(A,s,e),f=xs(C,c,e);r.current&&(m.current=o,b.current=a,x.current=d,w.current=f),i=y?e>0?{transition:D,strokeDasharray:j}:{strokeDasharray:I}:{strokeDasharray:j};var p=Ra(n),{radius:g}=p,v=kg(p,_g);return t.createElement("path",Mg({},v,{radius:"number"==typeof h?h:void 0,className:O,d:Eg(d,f,o,a,h),ref:r,style:Sg(Sg({},i),n.style)}))})};function Ig(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function jg(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ig(Object(n),!0).forEach(function(e){Dg(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ig(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Dg(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Tg=Math.PI/180,Rg=t=>180*t/Math.PI,Lg=(t,e,n,r)=>({x:t+Math.cos(-Tg*r)*n,y:e+Math.sin(-Tg*r)*n}),Bg=(t,e)=>{var{x:n,y:r}=t,{cx:i,cy:o}=e,a=((t,e)=>{var{x:n,y:r}=t,{x:i,y:o}=e;return Math.sqrt((n-i)**2+(r-o)**2)})({x:n,y:r},{x:i,y:o});if(a<=0)return{radius:a,angle:0};var s=(n-i)/a,c=Math.acos(s);return r>o&&(c=2*Math.PI-c),{radius:a,angle:Rg(c),angleInRadian:c}},Ng=(t,e)=>{var{startAngle:n,endAngle:r}=e,i=Math.floor(n/360),o=Math.floor(r/360);return t+360*Math.min(i,o)},zg=(t,e)=>{var{chartX:n,chartY:r}=t,{radius:i,angle:o}=Bg({x:n,y:r},e),{innerRadius:a,outerRadius:s}=e;if(i<a||i>s)return null;if(0===i)return null;var c,{startAngle:l,endAngle:u}=(t=>{var{startAngle:e,endAngle:n}=t,r=Math.floor(e/360),i=Math.floor(n/360),o=Math.min(r,i);return{startAngle:e-360*o,endAngle:n-360*o}})(e),h=o;if(l<=u){for(;h>u;)h-=360;for(;h<l;)h+=360;c=h>=l&&h<=u}else{for(;h>l;)h-=360;for(;h<u;)h+=360;c=h>=u&&h<=l}return c?jg(jg({},e),{},{radius:i,angle:Ng(h,e)}):null};function Fg(t){var{cx:e,cy:n,radius:r,startAngle:i,endAngle:o}=t;return{points:[Lg(e,n,r,i),Lg(e,n,r,o)],cx:e,cy:n,radius:r,startAngle:i,endAngle:o}}function Vg(){return Vg=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Vg.apply(null,arguments)}var Wg=t=>{var{cx:e,cy:n,radius:r,angle:i,sign:o,isExternal:a,cornerRadius:s,cornerIsExternal:c}=t,l=s*(a?1:-1)+r,u=Math.asin(s/l)/Tg,h=c?i:i+o*u,d=c?i-o*u:i;return{center:Lg(e,n,l,h),circleTangency:Lg(e,n,r,h),lineTangency:Lg(e,n,l*Math.cos(u*Tg),d),theta:u}},Ug=t=>{var{cx:e,cy:n,innerRadius:r,outerRadius:i,startAngle:o,endAngle:a}=t,s=((t,e)=>hs(e-t)*Math.min(Math.abs(e-t),359.999))(o,a),c=o+s,l=Lg(e,n,i,o),u=Lg(e,n,i,c),h="M ".concat(l.x,",").concat(l.y,"\n A ").concat(i,",").concat(i,",0,\n ").concat(+(Math.abs(s)>180),",").concat(+(o>c),",\n ").concat(u.x,",").concat(u.y,"\n ");if(r>0){var d=Lg(e,n,r,o),f=Lg(e,n,r,c);h+="L ".concat(f.x,",").concat(f.y,"\n A ").concat(r,",").concat(r,",0,\n ").concat(+(Math.abs(s)>180),",").concat(+(o<=c),",\n ").concat(d.x,",").concat(d.y," Z")}else h+="L ".concat(e,",").concat(n," Z");return h},Kg={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Hg=e=>{var n=Es(e,Kg),{cx:r,cy:o,innerRadius:a,outerRadius:s,cornerRadius:c,forceCornerRadius:l,cornerIsExternal:u,startAngle:h,endAngle:d,className:f}=n;if(s<a||h===d)return null;var p,g=i("recharts-sector",f),y=s-a,v=ms(c,y,0,!0);return p=v>0&&Math.abs(h-d)<360?(t=>{var{cx:e,cy:n,innerRadius:r,outerRadius:i,cornerRadius:o,forceCornerRadius:a,cornerIsExternal:s,startAngle:c,endAngle:l}=t,u=hs(l-c),{circleTangency:h,lineTangency:d,theta:f}=Wg({cx:e,cy:n,radius:i,angle:c,sign:u,cornerRadius:o,cornerIsExternal:s}),{circleTangency:p,lineTangency:g,theta:y}=Wg({cx:e,cy:n,radius:i,angle:l,sign:-u,cornerRadius:o,cornerIsExternal:s}),v=s?Math.abs(c-l):Math.abs(c-l)-f-y;if(v<0)return a?"M ".concat(d.x,",").concat(d.y,"\n a").concat(o,",").concat(o,",0,0,1,").concat(2*o,",0\n a").concat(o,",").concat(o,",0,0,1,").concat(2*-o,",0\n "):Ug({cx:e,cy:n,innerRadius:r,outerRadius:i,startAngle:c,endAngle:l});var m="M ".concat(d.x,",").concat(d.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(h.x,",").concat(h.y,"\n A").concat(i,",").concat(i,",0,").concat(+(v>180),",").concat(+(u<0),",").concat(p.x,",").concat(p.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(g.x,",").concat(g.y,"\n ");if(r>0){var{circleTangency:b,lineTangency:x,theta:w}=Wg({cx:e,cy:n,radius:r,angle:c,sign:u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),{circleTangency:_,lineTangency:O,theta:S}=Wg({cx:e,cy:n,radius:r,angle:l,sign:-u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),P=s?Math.abs(c-l):Math.abs(c-l)-w-S;if(P<0&&0===o)return"".concat(m,"L").concat(e,",").concat(n,"Z");m+="L".concat(O.x,",").concat(O.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(_.x,",").concat(_.y,"\n A").concat(r,",").concat(r,",0,").concat(+(P>180),",").concat(+(u>0),",").concat(b.x,",").concat(b.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(x.x,",").concat(x.y,"Z")}else m+="L".concat(e,",").concat(n,"Z");return m})({cx:r,cy:o,innerRadius:a,outerRadius:s,cornerRadius:Math.min(v,y/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:h,endAngle:d}):Ug({cx:r,cy:o,innerRadius:a,outerRadius:s,startAngle:h,endAngle:d}),t.createElement("path",Vg({},Ra(n),{className:g,d:p}))};function $g(t,e,n){if("horizontal"===t)return[{x:e.x,y:n.top},{x:e.x,y:n.top+n.height}];if("vertical"===t)return[{x:n.left,y:e.y},{x:n.left+n.width,y:e.y}];if(Ps(e)){if("centric"===t){var{cx:r,cy:i,innerRadius:o,outerRadius:a,angle:s}=e,c=Lg(r,i,o,s),l=Lg(r,i,a,s);return[{x:c.x,y:c.y},{x:l.x,y:l.y}]}return Fg(e)}}var Yg,Xg,qg,Gg,Zg,Qg={},Jg={},ty={};function ey(){return Yg||(Yg=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=_l();t.toNumber=function(t){return e.isSymbol(t)?NaN:Number(t)}}(ty)),ty}function ny(){return Xg||(Xg=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=ey();t.toFinite=function(t){if(!t)return 0===t?t:0;if((t=e.toNumber(t))===1/0||t===-1/0){return(t<0?-1:1)*Number.MAX_VALUE}return t==t?t:0}}(Jg)),Jg}function ry(){return Zg?Gg:(Zg=1,Gg=(qg||(qg=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Dl(),n=ny();t.range=function(t,r,i){i&&"number"!=typeof i&&e.isIterateeCall(t,r,i)&&(r=i=void 0),t=n.toFinite(t),void 0===r?(r=t,t=0):r=n.toFinite(r),i=void 0===i?t<r?1:-1:n.toFinite(i);const o=Math.max(Math.ceil((r-t)/(i||1)),0),a=new Array(o);for(let e=0;e<o;e++)a[e]=t,t+=i;return a}}(Qg)),Qg).range)}const iy=e(ry()),oy=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:E,scaleDiverging:A,scaleDivergingLog:C,scaleDivergingPow:I,scaleDivergingSqrt:j,scaleDivergingSymlog:D,scaleIdentity:T,scaleImplicit:R,scaleLinear:L,scaleLog:B,scaleOrdinal:N,scalePoint:z,scalePow:F,scaleQuantile:V,scaleQuantize:W,scaleRadial:U,scaleSequential:K,scaleSequentialLog:H,scaleSequentialPow:$,scaleSequentialQuantile:Y,scaleSequentialSqrt:X,scaleSequentialSymlog:q,scaleSqrt:G,scaleSymlog:Z,scaleThreshold:Q,scaleTime:J,scaleUtc:tt,tickFormat:et},Symbol.toStringTag,{value:"Module"}));var ay=t=>t.chartData,sy=a([ay],t=>{var e=null!=t.chartData?t.chartData.length-1:0;return{chartData:t.chartData,computedData:t.computedData,dataEndIndex:e,dataStartIndex:0}}),cy=(t,e,n,r)=>r?sy(t):ay(t);function ly(t){if(Array.isArray(t)&&2===t.length){var[e,n]=t;if(nf(e)&&nf(n))return!0}return!1}function uy(t,e,n){return n?t:[Math.min(t[0],e[0]),Math.max(t[1],e[1])]}function hy(t,e){if(e&&"function"!=typeof t&&Array.isArray(t)&&2===t.length){var n,r,[i,o]=t;if(nf(i))n=i;else if("function"==typeof i)return;if(nf(o))r=o;else if("function"==typeof o)return;var a=[n,r];if(ly(a))return a}}var dy,fy=1e9,py=!0,gy="[DecimalError] ",yy=gy+"Invalid argument: ",vy=gy+"Exponent out of range: ",my=Math.floor,by=Math.pow,xy=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,wy=1e7,_y=9007199254740991,Oy=my(1286742750677284.5),Sy={};function Py(t,e){var n,r,i,o,a,s,c,l,u=t.constructor,h=u.precision;if(!t.s||!e.s)return e.s||(e=new u(t)),py?Ry(e,h):e;if(c=t.d,l=e.d,a=t.e,i=e.e,c=c.slice(),o=a-i){for(o<0?(r=c,o=-o,s=l.length):(r=l,i=a,s=c.length),o>(s=(a=Math.ceil(h/7))>s?a+1:s+1)&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for((s=c.length)-(o=l.length)<0&&(o=s,r=l,l=c,c=r),n=0;o;)n=(c[--o]=c[o]+l[o]+n)/wy|0,c[o]%=wy;for(n&&(c.unshift(n),++i),s=c.length;0==c[--s];)c.pop();return e.d=c,e.e=i,py?Ry(e,h):e}function My(t,e,n){if(t!==~~t||t<e||t>n)throw Error(yy+t)}function ky(t){var e,n,r,i=t.length-1,o="",a=t[0];if(i>0){for(o+=a,e=1;e<i;e++)(n=7-(r=t[e]+"").length)&&(o+=jy(n)),o+=r;(n=7-(r=(a=t[e])+"").length)&&(o+=jy(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}Sy.absoluteValue=Sy.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t},Sy.comparedTo=Sy.cmp=function(t){var e,n,r,i,o=this;if(t=new o.constructor(t),o.s!==t.s)return o.s||-t.s;if(o.e!==t.e)return o.e>t.e^o.s<0?1:-1;for(e=0,n=(r=o.d.length)<(i=t.d.length)?r:i;e<n;++e)if(o.d[e]!==t.d[e])return o.d[e]>t.d[e]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1},Sy.decimalPlaces=Sy.dp=function(){var t=this,e=t.d.length-1,n=7*(e-t.e);if(e=t.d[e])for(;e%10==0;e/=10)n--;return n<0?0:n},Sy.dividedBy=Sy.div=function(t){return Ey(this,new this.constructor(t))},Sy.dividedToIntegerBy=Sy.idiv=function(t){var e=this.constructor;return Ry(Ey(this,new e(t),0,1),e.precision)},Sy.equals=Sy.eq=function(t){return!this.cmp(t)},Sy.exponent=function(){return Cy(this)},Sy.greaterThan=Sy.gt=function(t){return this.cmp(t)>0},Sy.greaterThanOrEqualTo=Sy.gte=function(t){return this.cmp(t)>=0},Sy.isInteger=Sy.isint=function(){return this.e>this.d.length-2},Sy.isNegative=Sy.isneg=function(){return this.s<0},Sy.isPositive=Sy.ispos=function(){return this.s>0},Sy.isZero=function(){return 0===this.s},Sy.lessThan=Sy.lt=function(t){return this.cmp(t)<0},Sy.lessThanOrEqualTo=Sy.lte=function(t){return this.cmp(t)<1},Sy.logarithm=Sy.log=function(t){var e,n=this,r=n.constructor,i=r.precision,o=i+5;if(void 0===t)t=new r(10);else if((t=new r(t)).s<1||t.eq(dy))throw Error(gy+"NaN");if(n.s<1)throw Error(gy+(n.s?"NaN":"-Infinity"));return n.eq(dy)?new r(0):(py=!1,e=Ey(Dy(n,o),Dy(t,o),o),py=!0,Ry(e,i))},Sy.minus=Sy.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?Ly(e,t):Py(e,(t.s=-t.s,t))},Sy.modulo=Sy.mod=function(t){var e,n=this,r=n.constructor,i=r.precision;if(!(t=new r(t)).s)throw Error(gy+"NaN");return n.s?(py=!1,e=Ey(n,t,0,1).times(t),py=!0,n.minus(e)):Ry(new r(n),i)},Sy.naturalExponential=Sy.exp=function(){return Ay(this)},Sy.naturalLogarithm=Sy.ln=function(){return Dy(this)},Sy.negated=Sy.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t},Sy.plus=Sy.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?Py(e,t):Ly(e,(t.s=-t.s,t))},Sy.precision=Sy.sd=function(t){var e,n,r,i=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(yy+t);if(e=Cy(i)+1,n=7*(r=i.d.length-1)+1,r=i.d[r]){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return t&&e>n?e:n},Sy.squareRoot=Sy.sqrt=function(){var t,e,n,r,i,o,a,s=this,c=s.constructor;if(s.s<1){if(!s.s)return new c(0);throw Error(gy+"NaN")}for(t=Cy(s),py=!1,0==(i=Math.sqrt(+s))||i==1/0?(((e=ky(s.d)).length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=my((t+1)/2)-(t<0||t%2),r=new c(e=i==1/0?"5e"+t:(e=i.toExponential()).slice(0,e.indexOf("e")+1)+t)):r=new c(i.toString()),i=a=(n=c.precision)+3;;)if(r=(o=r).plus(Ey(s,o,a+2)).times(.5),ky(o.d).slice(0,a)===(e=ky(r.d)).slice(0,a)){if(e=e.slice(a-3,a+1),i==a&&"4999"==e){if(Ry(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if("9999"!=e)break;a+=4}return py=!0,Ry(r,n)},Sy.times=Sy.mul=function(t){var e,n,r,i,o,a,s,c,l,u=this,h=u.constructor,d=u.d,f=(t=new h(t)).d;if(!u.s||!t.s)return new h(0);for(t.s*=u.s,n=u.e+t.e,(c=d.length)<(l=f.length)&&(o=d,d=f,f=o,a=c,c=l,l=a),o=[],r=a=c+l;r--;)o.push(0);for(r=l;--r>=0;){for(e=0,i=c+r;i>r;)s=o[i]+f[r]*d[i-r-1]+e,o[i--]=s%wy|0,e=s/wy|0;o[i]=(o[i]+e)%wy|0}for(;!o[--a];)o.pop();return e?++n:o.shift(),t.d=o,t.e=n,py?Ry(t,h.precision):t},Sy.toDecimalPlaces=Sy.todp=function(t,e){var n=this,r=n.constructor;return n=new r(n),void 0===t?n:(My(t,0,fy),void 0===e?e=r.rounding:My(e,0,8),Ry(n,t+Cy(n)+1,e))},Sy.toExponential=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=By(r,!0):(My(t,0,fy),void 0===e?e=i.rounding:My(e,0,8),n=By(r=Ry(new i(r),t+1,e),!0,t+1)),n},Sy.toFixed=function(t,e){var n,r,i=this,o=i.constructor;return void 0===t?By(i):(My(t,0,fy),void 0===e?e=o.rounding:My(e,0,8),n=By((r=Ry(new o(i),t+Cy(i)+1,e)).abs(),!1,t+Cy(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)},Sy.toInteger=Sy.toint=function(){var t=this,e=t.constructor;return Ry(new e(t),Cy(t)+1,e.rounding)},Sy.toNumber=function(){return+this},Sy.toPower=Sy.pow=function(t){var e,n,r,i,o,a,s=this,c=s.constructor,l=+(t=new c(t));if(!t.s)return new c(dy);if(!(s=new c(s)).s){if(t.s<1)throw Error(gy+"Infinity");return s}if(s.eq(dy))return s;if(r=c.precision,t.eq(dy))return Ry(s,r);if(a=(e=t.e)>=(n=t.d.length-1),o=s.s,a){if((n=l<0?-l:l)<=_y){for(i=new c(dy),e=Math.ceil(r/7+4),py=!1;n%2&&Ny((i=i.times(s)).d,e),0!==(n=my(n/2));)Ny((s=s.times(s)).d,e);return py=!0,t.s<0?new c(dy).div(i):Ry(i,r)}}else if(o<0)throw Error(gy+"NaN");return o=o<0&&1&t.d[Math.max(e,n)]?-1:1,s.s=1,py=!1,i=t.times(Dy(s,r+12)),py=!0,(i=Ay(i)).s=o,i},Sy.toPrecision=function(t,e){var n,r,i=this,o=i.constructor;return void 0===t?r=By(i,(n=Cy(i))<=o.toExpNeg||n>=o.toExpPos):(My(t,1,fy),void 0===e?e=o.rounding:My(e,0,8),r=By(i=Ry(new o(i),t,e),t<=(n=Cy(i))||n<=o.toExpNeg,t)),r},Sy.toSignificantDigits=Sy.tosd=function(t,e){var n=this.constructor;return void 0===t?(t=n.precision,e=n.rounding):(My(t,1,fy),void 0===e?e=n.rounding:My(e,0,8)),Ry(new n(this),t,e)},Sy.toString=Sy.valueOf=Sy.val=Sy.toJSON=Sy[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=Cy(t),n=t.constructor;return By(t,e<=n.toExpNeg||e>=n.toExpPos)};var Ey=function(){function t(t,e){var n,r=0,i=t.length;for(t=t.slice();i--;)n=t[i]*e+r,t[i]=n%wy|0,r=n/wy|0;return r&&t.unshift(r),t}function e(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function n(t,e,n){for(var r=0;n--;)t[n]-=r,r=t[n]<e[n]?1:0,t[n]=r*wy+t[n]-e[n];for(;!t[0]&&t.length>1;)t.shift()}return function(r,i,o,a){var s,c,l,u,h,d,f,p,g,y,v,m,b,x,w,_,O,S,P=r.constructor,M=r.s==i.s?1:-1,k=r.d,E=i.d;if(!r.s)return new P(r);if(!i.s)throw Error(gy+"Division by zero");for(c=r.e-i.e,O=E.length,w=k.length,p=(f=new P(M)).d=[],l=0;E[l]==(k[l]||0);)++l;if(E[l]>(k[l]||0)&&--c,(m=null==o?o=P.precision:a?o+(Cy(r)-Cy(i))+1:o)<0)return new P(0);if(m=m/7+2|0,l=0,1==O)for(u=0,E=E[0],m++;(l<w||u)&&m--;l++)b=u*wy+(k[l]||0),p[l]=b/E|0,u=b%E|0;else{for((u=wy/(E[0]+1)|0)>1&&(E=t(E,u),k=t(k,u),O=E.length,w=k.length),x=O,y=(g=k.slice(0,O)).length;y<O;)g[y++]=0;(S=E.slice()).unshift(0),_=E[0],E[1]>=wy/2&&++_;do{u=0,(s=e(E,g,O,y))<0?(v=g[0],O!=y&&(v=v*wy+(g[1]||0)),(u=v/_|0)>1?(u>=wy&&(u=wy-1),1==(s=e(h=t(E,u),g,d=h.length,y=g.length))&&(u--,n(h,O<d?S:E,d))):(0==u&&(s=u=1),h=E.slice()),(d=h.length)<y&&h.unshift(0),n(g,h,y),-1==s&&(s=e(E,g,O,y=g.length))<1&&(u++,n(g,O<y?S:E,y)),y=g.length):0===s&&(u++,g=[0]),p[l++]=u,s&&g[0]?g[y++]=k[x]||0:(g=[k[x]],y=1)}while((x++<w||void 0!==g[0])&&m--)}return p[0]||p.shift(),f.e=c,Ry(f,a?o+Cy(f)+1:o)}}();function Ay(t,e){var n,r,i,o,a,s=0,c=0,l=t.constructor,u=l.precision;if(Cy(t)>16)throw Error(vy+Cy(t));if(!t.s)return new l(dy);for(py=!1,a=u,o=new l(.03125);t.abs().gte(.1);)t=t.times(o),c+=5;for(a+=Math.log(by(2,c))/Math.LN10*2+5|0,n=r=i=new l(dy),l.precision=a;;){if(r=Ry(r.times(t),a),n=n.times(++s),ky((o=i.plus(Ey(r,n,a))).d).slice(0,a)===ky(i.d).slice(0,a)){for(;c--;)i=Ry(i.times(i),a);return l.precision=u,null==e?(py=!0,Ry(i,u)):i}i=o}}function Cy(t){for(var e=7*t.e,n=t.d[0];n>=10;n/=10)e++;return e}function Iy(t,e,n){if(e>t.LN10.sd())throw py=!0,n&&(t.precision=n),Error(gy+"LN10 precision limit exceeded");return Ry(new t(t.LN10),e)}function jy(t){for(var e="";t--;)e+="0";return e}function Dy(t,e){var n,r,i,o,a,s,c,l,u,h=1,d=t,f=d.d,p=d.constructor,g=p.precision;if(d.s<1)throw Error(gy+(d.s?"NaN":"-Infinity"));if(d.eq(dy))return new p(0);if(null==e?(py=!1,l=g):l=e,d.eq(10))return null==e&&(py=!0),Iy(p,l);if(l+=10,p.precision=l,r=(n=ky(f)).charAt(0),o=Cy(d),!(Math.abs(o)<15e14))return c=Iy(p,l+2,g).times(o+""),d=Dy(new p(r+"."+n.slice(1)),l-10).plus(c),p.precision=g,null==e?(py=!0,Ry(d,g)):d;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=ky((d=d.times(t)).d)).charAt(0),h++;for(o=Cy(d),r>1?(d=new p("0."+n),o++):d=new p(r+"."+n.slice(1)),s=a=d=Ey(d.minus(dy),d.plus(dy),l),u=Ry(d.times(d),l),i=3;;){if(a=Ry(a.times(u),l),ky((c=s.plus(Ey(a,new p(i),l))).d).slice(0,l)===ky(s.d).slice(0,l))return s=s.times(2),0!==o&&(s=s.plus(Iy(p,l+2,g).times(o+""))),s=Ey(s,new p(h),l),p.precision=g,null==e?(py=!0,Ry(s,g)):s;s=c,i+=2}}function Ty(t,e){var n,r,i;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;48===e.charCodeAt(r);)++r;for(i=e.length;48===e.charCodeAt(i-1);)--i;if(e=e.slice(r,i)){if(i-=r,n=n-r-1,t.e=my(n/7),t.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&t.d.push(+e.slice(0,r)),i-=7;r<i;)t.d.push(+e.slice(r,r+=7));r=7-(e=e.slice(r)).length}else r-=i;for(;r--;)e+="0";if(t.d.push(+e),py&&(t.e>Oy||t.e<-Oy))throw Error(vy+n)}else t.s=0,t.e=0,t.d=[0];return t}function Ry(t,e,n){var r,i,o,a,s,c,l,u,h=t.d;for(a=1,o=h[0];o>=10;o/=10)a++;if((r=e-a)<0)r+=7,i=e,l=h[u=0];else{if((u=Math.ceil((r+1)/7))>=(o=h.length))return t;for(l=o=h[u],a=1;o>=10;o/=10)a++;i=(r%=7)-7+a}if(void 0!==n&&(s=l/(o=by(10,a-i-1))%10|0,c=e<0||void 0!==h[u+1]||l%o,c=n<4?(s||c)&&(0==n||n==(t.s<0?3:2)):s>5||5==s&&(4==n||c||6==n&&(r>0?i>0?l/by(10,a-i):0:h[u-1])%10&1||n==(t.s<0?8:7))),e<1||!h[0])return c?(o=Cy(t),h.length=1,e=e-o-1,h[0]=by(10,(7-e%7)%7),t.e=my(-e/7)||0):(h.length=1,h[0]=t.e=t.s=0),t;if(0==r?(h.length=u,o=1,u--):(h.length=u+1,o=by(10,7-r),h[u]=i>0?(l/by(10,a-i)%by(10,i)|0)*o:0),c)for(;;){if(0==u){(h[0]+=o)==wy&&(h[0]=1,++t.e);break}if(h[u]+=o,h[u]!=wy)break;h[u--]=0,o=1}for(r=h.length;0===h[--r];)h.pop();if(py&&(t.e>Oy||t.e<-Oy))throw Error(vy+Cy(t));return t}function Ly(t,e){var n,r,i,o,a,s,c,l,u,h,d=t.constructor,f=d.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new d(t),py?Ry(e,f):e;if(c=t.d,h=e.d,r=e.e,l=t.e,c=c.slice(),a=l-r){for((u=a<0)?(n=c,a=-a,s=h.length):(n=h,r=l,s=c.length),a>(i=Math.max(Math.ceil(f/7),s)+2)&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for((u=(i=c.length)<(s=h.length))&&(s=i),i=0;i<s;i++)if(c[i]!=h[i]){u=c[i]<h[i];break}a=0}for(u&&(n=c,c=h,h=n,e.s=-e.s),s=c.length,i=h.length-s;i>0;--i)c[s++]=0;for(i=h.length;i>a;){if(c[--i]<h[i]){for(o=i;o&&0===c[--o];)c[o]=wy-1;--c[o],c[i]+=wy}c[i]-=h[i]}for(;0===c[--s];)c.pop();for(;0===c[0];c.shift())--r;return c[0]?(e.d=c,e.e=r,py?Ry(e,f):e):new d(0)}function By(t,e,n){var r,i=Cy(t),o=ky(t.d),a=o.length;return e?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+jy(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+jy(-i-1)+o,n&&(r=n-a)>0&&(o+=jy(r))):i>=a?(o+=jy(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+jy(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=jy(r))),t.s<0?"-"+o:o}function Ny(t,e){if(t.length>e)return t.length=e,!0}function zy(t){if(!t||"object"!=typeof t)throw Error(gy+"Object expected");var e,n,r,i=["precision",1,fy,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e<i.length;e+=3)if(void 0!==(r=t[n=i[e]])){if(!(my(r)===r&&r>=i[e+1]&&r<=i[e+2]))throw Error(yy+n+": "+r);this[n]=r}if(void 0!==(r=t[n="LN10"])){if(r!=Math.LN10)throw Error(yy+n+": "+r);this[n]=new this(r)}return this}var Fy=function t(e){var n,r,i;function o(t){var e=this;if(!(e instanceof o))return new o(t);if(e.constructor=o,t instanceof o)return e.s=t.s,e.e=t.e,void(e.d=(t=t.d)?t.slice():t);if("number"==typeof t){if(0*t!=0)throw Error(yy+t);if(t>0)e.s=1;else{if(!(t<0))return e.s=0,e.e=0,void(e.d=[0]);t=-t,e.s=-1}return t===~~t&&t<1e7?(e.e=0,void(e.d=[t])):Ty(e,t.toString())}if("string"!=typeof t)throw Error(yy+t);if(45===t.charCodeAt(0)?(t=t.slice(1),e.s=-1):e.s=1,!xy.test(t))throw Error(yy+t);Ty(e,t)}if(o.prototype=Sy,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=t,o.config=o.set=zy,void 0===e&&(e={}),e)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<i.length;)e.hasOwnProperty(r=i[n++])||(e[r]=this[r]);return o.config(e),o}({precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"});dy=new Fy(1);const Vy=Fy;var Wy,Uy=t=>t,Ky={},Hy=t=>t===Ky,$y=t=>function e(){return 0===arguments.length||1===arguments.length&&Hy(arguments.length<=0?void 0:arguments[0])?e:t(...arguments)},Yy=(t,e)=>1===t?e:$y(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=r.filter(t=>t!==Ky).length;return o>=t?e(...r):Yy(t-o,$y(function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var o=r.map(t=>Hy(t)?n.shift():t);return e(...o,...n)}))}),Xy=(t,e)=>{for(var n=[],r=t;r<e;++r)n[r-t]=r;return n},qy=Yy((Wy=(t,e)=>Array.isArray(e)?e.map(t):Object.keys(e).map(t=>e[t]).map(t)).length,Wy),Gy=t=>Array.isArray(t)?t.reverse():t.split("").reverse().join("");function Zy(t){return 0===t?1:Math.floor(new Vy(t).abs().log(10).toNumber())+1}function Qy(t,e,n){for(var r=new Vy(t),i=0,o=[];r.lt(e)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}var Jy=t=>{var[e,n]=t,[r,i]=[e,n];return e>n&&([r,i]=[n,e]),[r,i]},tv=(t,e,n)=>{if(t.lte(0))return new Vy(0);var r=Zy(t.toNumber()),i=new Vy(10).pow(r),o=t.div(i),a=1!==r?.05:.1,s=new Vy(Math.ceil(o.div(a).toNumber())).add(n).mul(a).mul(i);return new Vy(e?s.toNumber():Math.ceil(s.toNumber()))},ev=(t,e,n)=>{var r=new Vy(1),i=new Vy(t);if(!i.isint()&&n){var o=Math.abs(t);o<1?(r=new Vy(10).pow(Zy(t)-1),i=new Vy(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new Vy(Math.floor(t)))}else 0===t?i=new Vy(Math.floor((e-1)/2)):n||(i=new Vy(Math.floor(t)));var a=Math.floor((e-1)/2);return function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(!e.length)return Uy;var r=e.reverse(),i=r[0],o=r.slice(1);return function(){return o.reduce((t,e)=>e(t),i(...arguments))}}(qy(t=>i.add(new Vy(t-a).mul(r)).toNumber()),Xy)(0,e)},nv=function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((e-t)/(n-1)))return{step:new Vy(0),tickMin:new Vy(0),tickMax:new Vy(0)};var o,a=tv(new Vy(e).sub(t).div(n-1),r,i);o=t<=0&&e>=0?new Vy(0):(o=new Vy(t).add(e).div(2)).sub(new Vy(o).mod(a));var s=Math.ceil(o.sub(t).div(a).toNumber()),c=Math.ceil(new Vy(e).sub(o).div(a).toNumber()),l=s+c+1;return l>n?nv(t,e,n,r,i+1):(l<n&&(c=e>0?c+(n-l):c,s=e>0?s:s+(n-l)),{step:a,tickMin:o.sub(new Vy(s).mul(a)),tickMax:o.add(new Vy(c).mul(a))})},rv=t=>t.rootProps.stackOffset,iv=t=>t.rootProps.reverseStackOrder,ov=t=>t.options.chartName,av=t=>t.rootProps.syncId,sv=t=>t.rootProps.syncMethod,cv=t=>t.options.eventEmitter,lv={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},uv=0,hv="auto",dv=!0,fv=!1,pv=!0,gv=0,yv="auto",vv=!0,mv=5,bv=(t,e)=>{if(t&&e)return null!=t&&t.reversed?[e[1],e[0]]:e},xv={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:uv,includeHidden:!1,name:void 0,reversed:!1,scale:hv,tick:dv,tickCount:void 0,ticks:void 0,type:"category",unit:void 0},wv={allowDataOverflow:fv,allowDecimals:!1,allowDuplicatedCategory:pv,dataKey:void 0,domain:void 0,id:gv,includeHidden:!1,name:void 0,reversed:!1,scale:yv,tick:vv,tickCount:mv,ticks:void 0,type:"number",unit:void 0},_v={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,dataKey:void 0,domain:void 0,id:uv,includeHidden:!1,name:void 0,reversed:!1,scale:hv,tick:dv,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},Ov={allowDataOverflow:fv,allowDecimals:!1,allowDuplicatedCategory:pv,dataKey:void 0,domain:void 0,id:gv,includeHidden:!1,name:void 0,reversed:!1,scale:yv,tick:vv,tickCount:mv,ticks:void 0,type:"category",unit:void 0},Sv=(t,e)=>null!=t.polarAxis.angleAxis[e]?t.polarAxis.angleAxis[e]:"radial"===t.layout.layoutType?_v:xv,Pv=(t,e)=>null!=t.polarAxis.radiusAxis[e]?t.polarAxis.radiusAxis[e]:"radial"===t.layout.layoutType?Ov:wv,Mv=t=>t.polarOptions,kv=a([_d,Od,Id],function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(e-(n.top||0)-(n.bottom||0)))/2}),Ev=a([Mv,kv],(t,e)=>{if(null!=t)return ms(t.innerRadius,e,0)}),Av=a([Mv,kv],(t,e)=>{if(null!=t)return ms(t.outerRadius,e,.8*e)}),Cv=a([Mv],t=>{if(null==t)return[0,0];var{startAngle:e,endAngle:n}=t;return[e,n]});a([Sv,Cv],bv);var Iv=a([kv,Ev,Av],(t,e,n)=>{if(null!=t&&null!=e&&null!=n)return[e,n]});a([Pv,Iv],bv);var jv=a([yf,Mv,Ev,Av,_d,Od],(t,e,n,r,i,o)=>{if(("centric"===t||"radial"===t)&&null!=e&&null!=n&&null!=r){var{cx:a,cy:s,startAngle:c,endAngle:l}=e;return{cx:ms(a,i,i/2),cy:ms(s,o,o/2),innerRadius:n,outerRadius:r,startAngle:c,endAngle:l,clockWise:!1}}}),Dv=(t,e)=>e,Tv=(t,e,n)=>n;function Rv(t){return null==t?void 0:t.id}function Lv(t,e,n){var{chartData:r=[]}=e,{allowDuplicatedCategory:i,dataKey:o}=n,a=new Map;return t.forEach(t=>{var e,n=null!==(e=t.data)&&void 0!==e?e:r;if(null!=n&&0!==n.length){var s=Rv(t);n.forEach((e,n)=>{var r,c=null==o||i?n:String(dd(e,o,null)),l=dd(e,t.dataKey,0);r=a.has(c)?a.get(c):{},Object.assign(r,{[s]:l}),a.set(c,r)})}}),Array.from(a.values())}function Bv(t){return null!=t.stackId&&null!=t.dataKey}var Nv=(t,e)=>t===e||null!=t&&null!=e&&(t[0]===e[0]&&t[1]===e[1]);function zv(t,e){return!(!Array.isArray(t)||!Array.isArray(e)||0!==t.length||0!==e.length)||t===e}var Fv=t=>{var e=yf(t);return"horizontal"===e?"xAxis":"vertical"===e?"yAxis":"centric"===e?"angleAxis":"radiusAxis"},Vv=t=>t.tooltip.settings.axisId;function Wv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Uv(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Wv(Object(n),!0).forEach(function(e){Kv(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wv(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Kv(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Hv=[0,"auto"],$v={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},Yv=(t,e)=>{var n=((t,e)=>t.cartesianAxis.xAxis[e])(t,e);return null==n?$v:n},Xv={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Hv,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,width:60},qv=(t,e)=>{var n=((t,e)=>t.cartesianAxis.yAxis[e])(t,e);return null==n?Xv:n},Gv={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:""},Zv=(t,e)=>{var n=t.cartesianAxis.zAxis[e];return null==n?Gv:n},Qv=(t,e,n)=>{switch(e){case"xAxis":return Yv(t,n);case"yAxis":return qv(t,n);case"zAxis":return Zv(t,n);case"angleAxis":return Sv(t,n);case"radiusAxis":return Pv(t,n);default:throw new Error("Unexpected axis type: ".concat(e))}},Jv=(t,e,n)=>{switch(e){case"xAxis":return Yv(t,n);case"yAxis":return qv(t,n);case"angleAxis":return Sv(t,n);case"radiusAxis":return Pv(t,n);default:throw new Error("Unexpected axis type: ".concat(e))}},tm=t=>t.graphicalItems.cartesianItems.some(t=>"bar"===t.type)||t.graphicalItems.polarItems.some(t=>"radialBar"===t.type);function em(t,e){return n=>{switch(t){case"xAxis":return"xAxisId"in n&&n.xAxisId===e;case"yAxis":return"yAxisId"in n&&n.yAxisId===e;case"zAxis":return"zAxisId"in n&&n.zAxisId===e;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===e;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===e;default:return!1}}}var nm=a([Dv,Tv],em),rm=(t,e,n)=>t.filter(n).filter(t=>!0===(null==e?void 0:e.includeHidden)||!t.hide),im=a([t=>t.graphicalItems.cartesianItems,Qv,nm],rm,{memoizeOptions:{resultEqualityCheck:zv}}),om=a([im],t=>t.filter(t=>"area"===t.type||"bar"===t.type).filter(Bv)),am=t=>t.filter(t=>!("stackId"in t)||void 0===t.stackId),sm=a([im],am),cm=t=>t.map(t=>t.data).filter(Boolean).flat(1),lm=a([im],cm,{memoizeOptions:{resultEqualityCheck:zv}}),um=(t,e)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=e;return t.length>0?t:n.slice(r,i+1)},hm=a([lm,cy],um),dm=(t,e,n)=>null!=(null==e?void 0:e.dataKey)?t.map(t=>({value:dd(t,e.dataKey)})):n.length>0?n.map(t=>t.dataKey).flatMap(e=>t.map(t=>({value:dd(t,e)}))):t.map(t=>({value:t})),fm=a([hm,Qv,im],dm);function pm(t,e){switch(t){case"xAxis":return"x"===e.direction;case"yAxis":return"y"===e.direction;default:return!1}}function gm(t){if(gs(t)||t instanceof Date){var e=Number(t);if(nf(e))return e}}function ym(t){if(Array.isArray(t)){var e=[gm(t[0]),gm(t[1])];return ly(e)?e:void 0}var n=gm(t);if(null!=n)return[n,n]}function vm(t){return t.map(gm).filter(Os)}var mm=t=>{var e=Fv(t),n=Vv(t);return Jv(t,e,n)},bm=a([mm],t=>null==t?void 0:t.dataKey),xm=a([om,cy,mm],Lv),wm=(t,e,n,r)=>{var i=e.reduce((t,e)=>(null==e.stackId||(null==t[e.stackId]&&(t[e.stackId]=[]),t[e.stackId].push(e)),t),{});return Object.fromEntries(Object.entries(i).map(e=>{var[i,o]=e,a=r?[...o].reverse():o,s=a.map(Rv);return[i,{stackedData:yd(t,s,n),graphicalItems:a}]}))},_m=a([xm,om,rv,iv],wm),Om=(t,e,n,r)=>{var{dataStartIndex:i,dataEndIndex:o}=e;if(null==r&&"zAxis"!==n){var a=vd(t,i,o);if(null==a||0!==a[0]||0!==a[1])return a}},Sm=a([Qv],t=>t.allowDataOverflow),Pm=t=>{var e;if(null==t||!("domain"in t))return Hv;if(null!=t.domain)return t.domain;if(null!=t.ticks){if("number"===t.type){var n=vm(t.ticks);return[Math.min(...n),Math.max(...n)]}if("category"===t.type)return t.ticks.map(String)}return null!==(e=null==t?void 0:t.domain)&&void 0!==e?e:Hv},Mm=a([Qv],Pm),km=a([Mm,Sm],hy),Em=a([_m,ay,Dv,km],Om,{memoizeOptions:{resultEqualityCheck:Nv}}),Am=t=>t.errorBars,Cm=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e.filter(Boolean);if(0!==r.length){var i=r.flat();return[Math.min(...i),Math.max(...i)]}},Im=(t,e,n,r,i)=>{var o,a;if(n.length>0&&t.forEach(t=>{n.forEach(n=>{var s,c,l=null===(s=r[n.id])||void 0===s?void 0:s.filter(t=>pm(i,t)),u=dd(t,null!==(c=e.dataKey)&&void 0!==c?c:n.dataKey),h=function(t,e,n){return!n||"number"!=typeof e||ds(e)?[]:n.length?vm(n.flatMap(n=>{var r,i,o=dd(t,n.dataKey);if(Array.isArray(o)?[r,i]=o:r=i=o,nf(r)&&nf(i))return[e-r,e+i]})):[]}(t,u,l);if(h.length>=2){var d=Math.min(...h),f=Math.max(...h);(null==o||d<o)&&(o=d),(null==a||f>a)&&(a=f)}var p=ym(u);null!=p&&(o=null==o?p[0]:Math.min(o,p[0]),a=null==a?p[1]:Math.max(a,p[1]))})}),null!=(null==e?void 0:e.dataKey)&&t.forEach(t=>{var n=ym(dd(t,e.dataKey));null!=n&&(o=null==o?n[0]:Math.min(o,n[0]),a=null==a?n[1]:Math.max(a,n[1]))}),nf(o)&&nf(a))return[o,a]},jm=a([hm,Qv,sm,Am,Dv],Im,{memoizeOptions:{resultEqualityCheck:Nv}});function Dm(t){var{value:e}=t;if(gs(e)||e instanceof Date)return e}var Tm=t=>t.referenceElements.dots,Rm=(t,e,n)=>t.filter(t=>"extendDomain"===t.ifOverflow).filter(t=>"xAxis"===e?t.xAxisId===n:t.yAxisId===n),Lm=a([Tm,Dv,Tv],Rm),Bm=t=>t.referenceElements.areas,Nm=a([Bm,Dv,Tv],Rm),zm=t=>t.referenceElements.lines,Fm=a([zm,Dv,Tv],Rm),Vm=(t,e)=>{var n=vm(t.map(t=>"xAxis"===e?t.x:t.y));if(0!==n.length)return[Math.min(...n),Math.max(...n)]},Wm=a(Lm,Dv,Vm),Um=(t,e)=>{var n=vm(t.flatMap(t=>["xAxis"===e?t.x1:t.y1,"xAxis"===e?t.x2:t.y2]));if(0!==n.length)return[Math.min(...n),Math.max(...n)]},Km=a([Nm,Dv],Um);var Hm=(t,e)=>{var n=t.flatMap(t=>"xAxis"===e?function(t){var e;if(null!=t.x)return vm([t.x]);var n=null===(e=t.segment)||void 0===e?void 0:e.map(t=>t.x);return null==n||0===n.length?[]:vm(n)}(t):function(t){var e;if(null!=t.y)return vm([t.y]);var n=null===(e=t.segment)||void 0===e?void 0:e.map(t=>t.y);return null==n||0===n.length?[]:vm(n)}(t));if(0!==n.length)return[Math.min(...n),Math.max(...n)]},$m=a([Fm,Dv],Hm),Ym=a(Wm,$m,Km,(t,e,n)=>Cm(t,n,e)),Xm=(t,e,n,r,i,o,a,s)=>null!=n?n:function(t,e,n){if(n||null!=e){if("function"==typeof t&&null!=e)try{var r=t(e,n);if(ly(r))return uy(r,e,n)}catch(f){}if(Array.isArray(t)&&2===t.length){var i,o,[a,s]=t;if("auto"===a)null!=e&&(i=Math.min(...e));else if(ps(a))i=a;else if("function"==typeof a)try{null!=e&&(i=a(null==e?void 0:e[0]))}catch(p){}else if("string"==typeof a&&md.test(a)){var c=md.exec(a);if(null==c||null==e)i=void 0;else{var l=+c[1];i=e[0]-l}}else i=null==e?void 0:e[0];if("auto"===s)null!=e&&(o=Math.max(...e));else if(ps(s))o=s;else if("function"==typeof s)try{null!=e&&(o=s(null==e?void 0:e[1]))}catch(g){}else if("string"==typeof s&&bd.test(s)){var u=bd.exec(s);if(null==u||null==e)o=void 0;else{var h=+u[1];o=e[1]+h}}else o=null==e?void 0:e[1];var d=[i,o];if(ly(d))return null==e?d:uy(d,e,n)}}}(e,"vertical"===a&&"xAxis"===s||"horizontal"===a&&"yAxis"===s?Cm(r,o,i):Cm(o,i),t.allowDataOverflow),qm=a([Qv,Mm,km,Em,jm,Ym,yf,Dv],Xm,{memoizeOptions:{resultEqualityCheck:Nv}}),Gm=[0,1],Zm=(t,e,n,r,i,o,a)=>{if(null!=t&&null!=n&&0!==n.length||void 0!==a){var s,{dataKey:c,type:l}=t,u=fd(e,o);return u&&null==c?iy(0,null!==(s=null==n?void 0:n.length)&&void 0!==s?s:0):"category"===l?((t,e,n)=>{var r=t.map(Dm).filter(t=>null!=t);return n&&(null==e.dataKey||e.allowDuplicatedCategory&&bs(r))?iy(0,t.length):e.allowDuplicatedCategory?r:Array.from(new Set(r))})(r,t,u):"expand"===i?Gm:a}},Qm=a([Qv,yf,hm,fm,rv,Dv,qm],Zm),Jm=(t,e,n,r,i)=>{if(null!=t){var{scale:o,type:a}=t;if("auto"===o)return"radial"===e&&"radiusAxis"===i?"band":"radial"===e&&"angleAxis"===i?"linear":"category"===a&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?"point":"category"===a?"band":"linear";if("string"==typeof o){var s="scale".concat(_s(o));return s in oy?s:"point"}}},tb=a([Qv,yf,tm,ov,Dv],Jm);function eb(t,e,n,r){if(null!=n&&null!=r){if("function"==typeof t.scale)return t.scale.copy().domain(n).range(r);var i=function(t){if(null!=t){if(t in oy)return oy[t]();var e="scale".concat(_s(t));return e in oy?oy[e]():void 0}}(e);if(null!=i){var o=i.domain(n).range(r);return(t=>{var e=t.domain();if(e&&!(e.length<=2)){var n=e.length,r=t.range(),i=Math.min(r[0],r[1])-pd,o=Math.max(r[0],r[1])+pd,a=t(e[0]),s=t(e[n-1]);(a<i||a>o||s<i||s>o)&&t.domain([e[0],e[n-1]])}})(o),o}}}var nb=(t,e,n)=>{var r=Pm(e);if("auto"===n||"linear"===n)return null!=e&&e.tickCount&&Array.isArray(r)&&("auto"===r[0]||"auto"===r[1])&&ly(t)?function(t){var[e,n]=t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=Math.max(r,2),[a,s]=Jy([e,n]);if(a===-1/0||s===1/0){var c=s===1/0?[a,...Xy(0,r-1).map(()=>1/0)]:[...Xy(0,r-1).map(()=>-1/0),s];return e>n?Gy(c):c}if(a===s)return ev(a,r,i);var{step:l,tickMin:u,tickMax:h}=nv(a,s,o,i,0),d=Qy(u,h.add(new Vy(.1).mul(l)),l);return e>n?Gy(d):d}(t,e.tickCount,e.allowDecimals):null!=e&&e.tickCount&&"number"===e.type&&ly(t)?function(t,e){var[n,r]=t,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],[o,a]=Jy([n,r]);if(o===-1/0||a===1/0)return[n,r];if(o===a)return[o];var s=Math.max(e,2),c=tv(new Vy(a).sub(o).div(s-1),i,0),l=[...Qy(new Vy(o),new Vy(a),c),a];return!1===i&&(l=l.map(t=>Math.round(t))),n>r?Gy(l):l}(t,e.tickCount,e.allowDecimals):void 0},rb=a([Qm,Jv,tb],nb),ib=(t,e,n,r)=>{if("angleAxis"!==r&&"number"===(null==t?void 0:t.type)&&ly(e)&&Array.isArray(n)&&n.length>0){var i=e[0],o=n[0],a=e[1],s=n[n.length-1];return[Math.min(i,o),Math.max(a,s)]}return e},ob=a([Qv,Qm,rb,Dv],ib),ab=a(fm,Qv,(t,e)=>{if(e&&"number"===e.type){var n=1/0,r=Array.from(vm(t.map(t=>t.value))).sort((t,e)=>t-e);if(r.length<2)return 1/0;var i=r[r.length-1]-r[0];if(0===i)return 1/0;for(var o=0;o<r.length-1;o++){var a=r[o+1]-r[o];n=Math.min(n,a)}return n/i}}),sb=a(ab,yf,t=>t.rootProps.barCategoryGap,Id,(t,e,n,r)=>r,(t,e,n,r,i)=>{if(!nf(t))return 0;var o="vertical"===e?r.height:r.width;if("gap"===i)return t*o/2;if("no-gap"===i){var a=ms(n,t*o),s=t*o/2;return s-a-(s-a)/o*a}return 0}),cb=a(Yv,(t,e)=>{var n=Yv(t,e);return null==n||"string"!=typeof n.padding?0:sb(t,"xAxis",e,n.padding)},(t,e)=>{var n,r;if(null==t)return{left:0,right:0};var{padding:i}=t;return"string"==typeof i?{left:e,right:e}:{left:(null!==(n=i.left)&&void 0!==n?n:0)+e,right:(null!==(r=i.right)&&void 0!==r?r:0)+e}}),lb=a(qv,(t,e)=>{var n=qv(t,e);return null==n||"string"!=typeof n.padding?0:sb(t,"yAxis",e,n.padding)},(t,e)=>{var n,r;if(null==t)return{top:0,bottom:0};var{padding:i}=t;return"string"==typeof i?{top:e,bottom:e}:{top:(null!==(n=i.top)&&void 0!==n?n:0)+e,bottom:(null!==(r=i.bottom)&&void 0!==r?r:0)+e}}),ub=a([Id,cb,Vd,Fd,(t,e,n)=>n],(t,e,n,r,i)=>{var{padding:o}=r;return i?[o.left,n.width-o.right]:[t.left+e.left,t.left+t.width-e.right]}),hb=a([Id,yf,lb,Vd,Fd,(t,e,n)=>n],(t,e,n,r,i,o)=>{var{padding:a}=i;return o?[r.height-a.bottom,a.top]:"horizontal"===e?[t.top+t.height-n.bottom,t.top+n.top]:[t.top+n.top,t.top+t.height-n.bottom]}),db=(t,e,n,r)=>{var i;switch(e){case"xAxis":return ub(t,n,r);case"yAxis":return hb(t,n,r);case"zAxis":return null===(i=Zv(t,n))||void 0===i?void 0:i.range;case"angleAxis":return Cv(t);case"radiusAxis":return Iv(t,n);default:return}},fb=a([Qv,db],bv),pb=a([Qv,tb,ob,fb],eb);function gb(t,e){return t.id<e.id?-1:t.id>e.id?1:0}a([im,Am,Dv],(t,e,n)=>t.flatMap(t=>e[t.id]).filter(Boolean).filter(t=>pm(n,t)));var yb=(t,e)=>e,vb=(t,e,n)=>n,mb=a(Md,yb,vb,(t,e,n)=>t.filter(t=>t.orientation===e).filter(t=>t.mirror===n).sort(gb)),bb=a(kd,yb,vb,(t,e,n)=>t.filter(t=>t.orientation===e).filter(t=>t.mirror===n).sort(gb)),xb=(t,e)=>({width:t.width,height:e.height});a(Id,Yv,xb);var wb=a(Od,Id,mb,yb,vb,(t,e,n,r,i)=>{var o,a={};return n.forEach(n=>{var s=xb(e,n);null==o&&(o=((t,e,n)=>{switch(e){case"top":return t.top;case"bottom":return n-t.bottom;default:return 0}})(e,r,t));var c="top"===r&&!i||"bottom"===r&&i;a[n.id]=o-Number(c)*s.height,o+=(c?-1:1)*s.height}),a}),_b=a(_d,Id,bb,yb,vb,(t,e,n,r,i)=>{var o,a={};return n.forEach(n=>{var s=((t,e)=>({width:"number"==typeof e.width?e.width:60,height:t.height}))(e,n);null==o&&(o=((t,e,n)=>{switch(e){case"left":return t.left;case"right":return n-t.right;default:return 0}})(e,r,t));var c="left"===r&&!i||"right"===r&&i;a[n.id]=o-Number(c)*s.width,o+=(c?-1:1)*s.width}),a});a([Id,Yv,(t,e)=>{var n=Yv(t,e);if(null!=n)return wb(t,n.orientation,n.mirror)},(t,e)=>e],(t,e,n,r)=>{if(null!=e){var i=null==n?void 0:n[r];return null==i?{x:t.left,y:0}:{x:t.left,y:i}}});a([Id,qv,(t,e)=>{var n=qv(t,e);if(null!=n)return _b(t,n.orientation,n.mirror)},(t,e)=>e],(t,e,n,r)=>{if(null!=e){var i=null==n?void 0:n[r];return null==i?{x:0,y:t.top}:{x:i,y:t.top}}}),a(Id,qv,(t,e)=>({width:"number"==typeof e.width?e.width:60,height:t.height}));var Ob=(t,e,n,r)=>{if(null!=n){var{allowDuplicatedCategory:i,type:o,dataKey:a}=n,s=fd(t,r),c=e.map(t=>t.value);return a&&s&&"category"===o&&i&&bs(c)?c:void 0}},Sb=a([yf,fm,Qv,Dv],Ob),Pb=(t,e,n,r)=>{if(null!=n&&null!=n.dataKey){var{type:i,scale:o}=n;return!fd(t,r)||"number"!==i&&"auto"===o?void 0:e.map(t=>t.value)}},Mb=a([yf,fm,Jv,Dv],Pb);a([yf,(t,e,n)=>{switch(e){case"xAxis":return Yv(t,n);case"yAxis":return qv(t,n);default:throw new Error("Unexpected axis type: ".concat(e))}},tb,pb,Sb,Mb,db,rb,Dv],(t,e,n,r,i,o,a,s,c)=>{if(null!=e){var l=fd(t,c);return{angle:e.angle,interval:e.interval,minTickGap:e.minTickGap,orientation:e.orientation,tick:e.tick,tickCount:e.tickCount,tickFormatter:e.tickFormatter,ticks:e.ticks,type:e.type,unit:e.unit,axisType:c,categoricalDomain:o,duplicateDomain:i,isCategorical:l,niceTicks:s,range:a,realScaleType:n,scale:r}}});a([yf,Jv,tb,pb,rb,db,Sb,Mb,Dv],(t,e,n,r,i,o,a,s,c)=>{if(null!=e&&null!=r){var l=fd(t,c),{type:u,ticks:h,tickCount:d}=e,f="scaleBand"===n&&"function"==typeof r.bandwidth?r.bandwidth()/2:2,p="category"===u&&r.bandwidth?r.bandwidth()/f:0;p="angleAxis"===c&&null!=o&&o.length>=2?2*hs(o[0]-o[1])*p:p;var g=h||i;return g?g.map((t,e)=>{var n=a?a.indexOf(t):t;return{index:e,coordinate:r(n)+p,value:t,offset:p}}).filter(t=>nf(t.coordinate)):l&&s?s.map((t,e)=>({coordinate:r(t)+p,value:t,index:e,offset:p})).filter(t=>nf(t.coordinate)):r.ticks?r.ticks(d).map(t=>({coordinate:r(t)+p,value:t,offset:p})):r.domain().map((t,e)=>({coordinate:r(t)+p,value:a?a[t]:t,index:e,offset:p}))}});a([yf,Jv,pb,db,Sb,Mb,Dv],(t,e,n,r,i,o,a)=>{if(null!=e&&null!=n&&null!=r&&r[0]!==r[1]){var s=fd(t,a),{tickCount:c}=e,l=0;return l="angleAxis"===a&&(null==r?void 0:r.length)>=2?2*hs(r[0]-r[1])*l:l,s&&o?o.map((t,e)=>({coordinate:n(t)+l,value:t,index:e,offset:l})):n.ticks?n.ticks(c).map(t=>({coordinate:n(t)+l,value:t,offset:l})):n.domain().map((t,e)=>({coordinate:n(t)+l,value:i?i[t]:t,index:e,offset:l}))}}),a(Qv,pb,(t,e)=>{if(null!=t&&null!=e)return Uv(Uv({},t),{},{scale:e})});var kb=a([Qv,tb,Qm,fb],eb);a((t,e,n)=>Zv(t,n),kb,(t,e)=>{if(null!=t&&null!=e)return Uv(Uv({},t),{},{scale:e})});var Eb=a([yf,Md,kd],(t,e,n)=>{switch(t){case"horizontal":return e.some(t=>t.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(t=>t.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),Ab=t=>t.options.defaultTooltipEventType,Cb=t=>t.options.validateTooltipEventTypes;function Ib(t,e,n){if(null==t)return e;var r=t?"axis":"item";return null==n?e:n.includes(r)?r:e}function jb(t,e){return Ib(e,Ab(t),Cb(t))}var Db=(t,e)=>{var n,r=Number(e);if(!ds(r)&&null!=e)return r>=0?null==t||null===(n=t[r])||void 0===n?void 0:n.value:void 0},Tb={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},Rb=wh({name:"tooltip",initialState:{itemInteraction:{click:Tb,hover:Tb},axisInteraction:{click:Tb,hover:Tb},keyboardInteraction:Tb,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}},reducers:{addTooltipEntrySettings:{reducer(t,e){t.tooltipItemPayloads.push(e.payload)},prepare:hh()},replaceTooltipEntrySettings:{reducer(t,e){var{prev:n,next:r}=e.payload,i=Qu(t).tooltipItemPayloads.indexOf(n);i>-1&&(t.tooltipItemPayloads[i]=r)},prepare:hh()},removeTooltipEntrySettings:{reducer(t,e){var n=Qu(t).tooltipItemPayloads.indexOf(e.payload);n>-1&&t.tooltipItemPayloads.splice(n,1)},prepare:hh()},setTooltipSettingsState(t,e){t.settings=e.payload},setActiveMouseOverItemIndex(t,e){t.syncInteraction.active=!1,t.keyboardInteraction.active=!1,t.itemInteraction.hover.active=!0,t.itemInteraction.hover.index=e.payload.activeIndex,t.itemInteraction.hover.dataKey=e.payload.activeDataKey,t.itemInteraction.hover.graphicalItemId=e.payload.activeGraphicalItemId,t.itemInteraction.hover.coordinate=e.payload.activeCoordinate},mouseLeaveChart(t){t.itemInteraction.hover.active=!1,t.axisInteraction.hover.active=!1},mouseLeaveItem(t){t.itemInteraction.hover.active=!1},setActiveClickItemIndex(t,e){t.syncInteraction.active=!1,t.itemInteraction.click.active=!0,t.keyboardInteraction.active=!1,t.itemInteraction.click.index=e.payload.activeIndex,t.itemInteraction.click.dataKey=e.payload.activeDataKey,t.itemInteraction.click.graphicalItemId=e.payload.activeGraphicalItemId,t.itemInteraction.click.coordinate=e.payload.activeCoordinate},setMouseOverAxisIndex(t,e){t.syncInteraction.active=!1,t.axisInteraction.hover.active=!0,t.keyboardInteraction.active=!1,t.axisInteraction.hover.index=e.payload.activeIndex,t.axisInteraction.hover.dataKey=e.payload.activeDataKey,t.axisInteraction.hover.coordinate=e.payload.activeCoordinate},setMouseClickAxisIndex(t,e){t.syncInteraction.active=!1,t.keyboardInteraction.active=!1,t.axisInteraction.click.active=!0,t.axisInteraction.click.index=e.payload.activeIndex,t.axisInteraction.click.dataKey=e.payload.activeDataKey,t.axisInteraction.click.coordinate=e.payload.activeCoordinate},setSyncInteraction(t,e){t.syncInteraction=e.payload},setKeyboardInteraction(t,e){t.keyboardInteraction.active=e.payload.active,t.keyboardInteraction.index=e.payload.activeIndex,t.keyboardInteraction.coordinate=e.payload.activeCoordinate,t.keyboardInteraction.dataKey=e.payload.activeDataKey}}}),{addTooltipEntrySettings:Lb,replaceTooltipEntrySettings:Bb,removeTooltipEntrySettings:Nb,setTooltipSettingsState:zb,setActiveMouseOverItemIndex:Fb,mouseLeaveItem:Vb,mouseLeaveChart:Wb,setActiveClickItemIndex:Ub,setMouseOverAxisIndex:Kb,setMouseClickAxisIndex:Hb,setSyncInteraction:$b,setKeyboardInteraction:Yb}=Rb.actions,Xb=Rb.reducer;function qb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Gb(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?qb(Object(n),!0).forEach(function(e){Zb(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qb(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Zb(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Qb=(t,e,n,r)=>{if(null==e)return Tb;var i=function(t,e,n){return"axis"===e?"click"===n?t.axisInteraction.click:t.axisInteraction.hover:"click"===n?t.itemInteraction.click:t.itemInteraction.hover}(t,e,n);if(null==i)return Tb;if(i.active)return i;if(t.keyboardInteraction.active)return t.keyboardInteraction;if(t.syncInteraction.active&&null!=t.syncInteraction.index)return t.syncInteraction;var o=!0===t.settings.active;if(null!=i.index){if(o)return Gb(Gb({},i),{},{active:!0})}else if(null!=r)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return Gb(Gb({},Tb),{},{coordinate:i.coordinate})};function Jb(t,e){var n=function(t){if("number"==typeof t)return Number.isFinite(t)?t:void 0;if(t instanceof Date){var e=t.valueOf();return Number.isFinite(e)?e:void 0}var n=Number(t);return Number.isFinite(n)?n:void 0}(t),r=e[0],i=e[1];if(void 0===n)return!1;var o=Math.min(r,i),a=Math.max(r,i);return n>=o&&n<=a}var tx=(t,e,n,r)=>{var i=null==t?void 0:t.index;if(null==i)return null;var o=Number(i);if(!nf(o))return i;var a=1/0;e.length>0&&(a=e.length-1);var s=Math.max(0,Math.min(o,a)),c=e[s];return null==c||function(t,e,n){if(null==n||null==e)return!0;var r=dd(t,e);return null==r||!ly(n)||Jb(r,n)}(c,n,r)?String(s):null},ex=(t,e,n,r,i,o,a,s)=>{if(null!=o&&null!=s){var c=a[0],l=null==c?void 0:s(c.positions,o);if(null!=l)return l;var u=null==i?void 0:i[Number(o)];if(u)return"horizontal"===n?{x:u.coordinate,y:(r.top+e)/2}:{x:(r.left+t)/2,y:u.coordinate}}},nx=(t,e,n,r)=>{return"axis"===e?t.tooltipItemPayloads:0===t.tooltipItemPayloads.length?[]:null==(i="hover"===n?t.itemInteraction.hover.dataKey:t.itemInteraction.click.dataKey)&&null!=r?[t.tooltipItemPayloads[0]]:t.tooltipItemPayloads.filter(t=>{var e;return(null===(e=t.settings)||void 0===e?void 0:e.dataKey)===i});var i},rx=t=>t.options.tooltipPayloadSearcher,ix=t=>t.tooltip;function ox(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function ax(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ox(Object(n),!0).forEach(function(e){sx(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ox(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function sx(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var cx=(t,e,n,r,i,o,a)=>{if(null!=e&&null!=o){var{chartData:s,computedData:c,dataStartIndex:l,dataEndIndex:u}=n;return t.reduce((t,n)=>{var h,d,f,{dataDefinedOnItem:p,settings:g}=n,y=function(t,e){return null!=t?t:e}(p,s),v=Array.isArray(y)?cd(y,l,u):y,m=null!==(h=null==g?void 0:g.dataKey)&&void 0!==h?h:r,b=null==g?void 0:g.nameKey;(d=r&&Array.isArray(v)&&!Array.isArray(v[0])&&"axis"===a?function(t,e,n){if(t&&t.length)return t.find(t=>t&&("function"==typeof e?e(t):us(t,e))===n)}(v,r,i):o(v,e,c,b),Array.isArray(d))?d.forEach(e=>{var n=ax(ax({},g),{},{name:e.name,unit:e.unit,color:void 0,fill:void 0});t.push(wd({tooltipEntrySettings:n,dataKey:e.dataKey,payload:e.payload,value:dd(e.payload,e.dataKey),name:e.name}))}):t.push(wd({tooltipEntrySettings:g,dataKey:m,payload:d,value:dd(d,m),name:null!==(f=dd(d,b))&&void 0!==f?f:null==g?void 0:g.name}));return t},[])}},lx=a([mm,yf,tm,ov,Fv],Jm),ux=a([t=>t.graphicalItems.cartesianItems,t=>t.graphicalItems.polarItems],(t,e)=>[...t,...e]),hx=a([Fv,Vv],em),dx=a([ux,mm,hx],rm,{memoizeOptions:{resultEqualityCheck:zv}}),fx=a([dx],t=>t.filter(Bv)),px=a([dx],cm,{memoizeOptions:{resultEqualityCheck:zv}}),gx=a([px,ay],um),yx=a([fx,ay,mm],Lv),vx=a([gx,mm,dx],dm),mx=a([mm],Pm),bx=a([mm],t=>t.allowDataOverflow),xx=a([mx,bx],hy),wx=a([dx],t=>t.filter(Bv)),_x=a([yx,wx,rv,iv],wm),Ox=a([_x,ay,Fv,xx],Om),Sx=a([dx],am),Px=a([gx,mm,Sx,Am,Fv],Im,{memoizeOptions:{resultEqualityCheck:Nv}}),Mx=a([Tm,Fv,Vv],Rm),kx=a([Mx,Fv],Vm),Ex=a([Bm,Fv,Vv],Rm),Ax=a([Ex,Fv],Um),Cx=a([zm,Fv,Vv],Rm),Ix=a([Cx,Fv],Hm),jx=a([kx,Ix,Ax],Cm),Dx=a([mm,mx,xx,Ox,Px,jx,yf,Fv],Xm),Tx=a([mm,yf,gx,vx,rv,Fv,Dx],Zm),Rx=a([Tx,mm,lx],nb),Lx=a([mm,Tx,Rx,Fv],ib),Bx=t=>{var e=Fv(t),n=Vv(t);return db(t,e,n,!1)},Nx=a([mm,Bx],bv),zx=a([mm,lx,Lx,Nx],eb),Fx=a([yf,vx,mm,Fv],Ob),Vx=a([yf,vx,mm,Fv],Pb),Wx=a([yf,mm,lx,zx,Bx,Fx,Vx,Fv],(t,e,n,r,i,o,a,s)=>{if(e){var{type:c}=e,l=fd(t,s);if(r){var u="scaleBand"===n&&r.bandwidth?r.bandwidth()/2:2,h="category"===c&&r.bandwidth?r.bandwidth()/u:0;return h="angleAxis"===s&&null!=i&&(null==i?void 0:i.length)>=2?2*hs(i[0]-i[1])*h:h,l&&a?a.map((t,e)=>({coordinate:r(t)+h,value:t,index:e,offset:h})):r.domain().map((t,e)=>({coordinate:r(t)+h,value:o?o[t]:t,index:e,offset:h}))}}}),Ux=a([Ab,Cb,t=>t.tooltip.settings],(t,e,n)=>Ib(n.shared,t,e)),Kx=t=>t.tooltip.settings.trigger,Hx=t=>t.tooltip.settings.defaultIndex,$x=a([ix,Ux,Kx,Hx],Qb),Yx=a([$x,gx,bm,Tx],tx),Xx=a([Wx,Yx],Db),qx=a([$x],t=>{if(t)return t.dataKey});a([$x],t=>{if(t)return t.graphicalItemId});var Gx=a([ix,Ux,Kx,Hx],nx),Zx=a([_d,Od,yf,Id,Wx,Hx,Gx,rx],ex),Qx=a([$x,Zx],(t,e)=>null!=t&&t.coordinate?t.coordinate:e),Jx=a([$x],t=>t.active),tw=a([Gx,Yx,ay,bm,Xx,rx,Ux],cx);function ew(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function nw(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ew(Object(n),!0).forEach(function(e){rw(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ew(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function rw(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}a([tw],t=>{if(null!=t){var e=t.map(t=>t.payload).filter(t=>null!=t);return Array.from(new Set(e))}});var iw=()=>{var t=hl(mm),e=hl(Wx),n=hl(zx);return xd(t&&n?nw(nw({},t),{},{scale:n}):void 0,e)};function ow(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function aw(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ow(Object(n),!0).forEach(function(e){sw(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ow(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function sw(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var cw=(t,e,n,r,i)=>{var o,a=-1,s=null!==(o=null==e?void 0:e.length)&&void 0!==o?o:0;if(s<=1||null==t)return 0;if("angleAxis"===r&&null!=i&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var c=0;c<s;c++){var l=c>0?n[c-1].coordinate:n[s-1].coordinate,u=n[c].coordinate,h=c>=s-1?n[0].coordinate:n[c+1].coordinate,d=void 0;if(hs(u-l)!==hs(h-u)){var f=[];if(hs(h-u)===hs(i[1]-i[0])){d=h;var p=u+i[1]-i[0];f[0]=Math.min(p,(p+l)/2),f[1]=Math.max(p,(p+l)/2)}else{d=l;var g=h+i[1]-i[0];f[0]=Math.min(u,(g+u)/2),f[1]=Math.max(u,(g+u)/2)}var y=[Math.min(u,(d+u)/2),Math.max(u,(d+u)/2)];if(t>y[0]&&t<=y[1]||t>=f[0]&&t<=f[1]){({index:a}=n[c]);break}}else{var v=Math.min(l,h),m=Math.max(l,h);if(t>(v+u)/2&&t<=(m+u)/2){({index:a}=n[c]);break}}}else if(e)for(var b=0;b<s;b++)if(0===b&&t<=(e[b].coordinate+e[b+1].coordinate)/2||b>0&&b<s-1&&t>(e[b].coordinate+e[b-1].coordinate)/2&&t<=(e[b].coordinate+e[b+1].coordinate)/2||b===s-1&&t>(e[b].coordinate+e[b-1].coordinate)/2){({index:a}=e[b]);break}return a},lw=(t,e)=>e,uw=(t,e,n)=>n,hw=(t,e,n,r)=>r,dw=a(Wx,t=>Rl(t,t=>t.coordinate)),fw=a([ix,lw,uw,hw],Qb),pw=a([fw,gx,bm,Tx],tx),gw=a([ix,lw,uw,hw],nx),yw=a([_d,Od,yf,Id,Wx,hw,gw,rx],ex),vw=a([fw,yw],(t,e)=>{var n;return null!==(n=t.coordinate)&&void 0!==n?n:e}),mw=a([Wx,pw],Db),bw=a([gw,pw,ay,bm,mw,rx,lw],cx),xw=a([fw,pw],(t,e)=>({isActive:t.active&&null!=e,activeIndex:e})),ww=(t,e,n,r,i,o,a)=>{if(t&&r&&i&&o&&n){var s=zg(t,n);if(s){var c=((t,e)=>"centric"===e?t.angle:t.radius)(s,e),l=cw(c,a,o,r,i),u=((t,e,n,r)=>{var i=e.find(t=>t&&t.index===n);if(i){if("centric"===t){var o=i.coordinate,{radius:a}=r;return aw(aw(aw({},r),Lg(r.cx,r.cy,a,o)),{},{angle:o,radius:a})}var s=i.coordinate,{angle:c}=r;return aw(aw(aw({},r),Lg(r.cx,r.cy,s,c)),{},{angle:c,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}})(e,o,l,s);return{activeIndex:String(l),activeCoordinate:u}}}},_w=a(t=>t.zIndex.zIndexMap,(t,e)=>e,(t,e,n)=>n,(t,e,n)=>{if(null!=e){var r=t[e];if(null!=r)return n?r.panoramaElementId:r.elementId}});function Ow(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Sw(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ow(Object(n),!0).forEach(function(e){Pw(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ow(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Pw(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}a(t=>t.zIndex.zIndexMap,t=>{var e=Object.keys(t).map(t=>parseInt(t,10)).concat(Object.values(lv));return Array.from(new Set(e)).sort((t,e)=>t-e)},{memoizeOptions:{resultEqualityCheck:function(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}return!1}}});var Mw={zIndexMap:Object.values(lv).reduce((t,e)=>Sw(Sw({},t),{},{[e]:{elementId:void 0,panoramaElementId:void 0,consumers:0}}),{})},kw=new Set(Object.values(lv));var Ew=wh({name:"zIndex",initialState:Mw,reducers:{registerZIndexPortal:{reducer:(t,e)=>{var{zIndex:n}=e.payload;t.zIndexMap[n]?t.zIndexMap[n].consumers+=1:t.zIndexMap[n]={consumers:1,elementId:void 0,panoramaElementId:void 0}},prepare:hh()},unregisterZIndexPortal:{reducer:(t,e)=>{var{zIndex:n}=e.payload;t.zIndexMap[n]&&(t.zIndexMap[n].consumers-=1,t.zIndexMap[n].consumers<=0&&!function(t){return kw.has(t)}(n)&&delete t.zIndexMap[n])},prepare:hh()},registerZIndexPortalId:{reducer:(t,e)=>{var{zIndex:n,elementId:r,isPanorama:i}=e.payload;t.zIndexMap[n]?i?t.zIndexMap[n].panoramaElementId=r:t.zIndexMap[n].elementId=r:t.zIndexMap[n]={consumers:0,elementId:i?void 0:r,panoramaElementId:i?r:void 0}},prepare:hh()},unregisterZIndexPortalId:{reducer:(t,e)=>{var{zIndex:n}=e.payload;t.zIndexMap[n]&&(e.payload.isPanorama?t.zIndexMap[n].panoramaElementId=void 0:t.zIndexMap[n].elementId=void 0)},prepare:hh()}}}),{registerZIndexPortal:Aw,unregisterZIndexPortal:Cw,registerZIndexPortalId:Iw,unregisterZIndexPortalId:jw}=Ew.actions,Dw=Ew.reducer;function Tw(e){var{zIndex:r,children:i}=e,o=void 0!==vf()&&void 0!==r&&0!==r,a=zd(),s=sl();t.useLayoutEffect(()=>o?(s(Aw({zIndex:r})),()=>{s(Cw({zIndex:r}))}):Ss,[s,r,o]);var c=hl(t=>_w(t,r,a));if(!o)return i;if(!c)return null;var l=document.getElementById(c);return l?n.createPortal(i,l):null}function Rw(){return Rw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Rw.apply(null,arguments)}function Lw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Bw(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Lw(Object(n),!0).forEach(function(e){Nw(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lw(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Nw(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zw(e){var{cursor:n,cursorComp:r,cursorProps:i}=e;return t.isValidElement(n)?t.cloneElement(n,i):t.createElement(r,i)}function Fw(e){var n,r,o,a,{coordinate:s,payload:c,index:l,offset:u,tooltipAxisBandSize:h,layout:d,cursor:f,tooltipEventType:p,chartName:g}=e,y=s,v=c,m=l;if(!f||!y||"ScatterChart"!==g&&"axis"!==p)return null;if("ScatterChart"===g)r=y,o=$p,a=lv.cursorLine;else if("BarChart"===g)r=function(t,e,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===t?e.x-i:n.left+.5,y:"horizontal"===t?n.top+.5:e.y-i,width:"horizontal"===t?r:n.width-1,height:"horizontal"===t?n.height-1:r}}(d,y,u,h),o=Cg,a=lv.cursorRectangle;else if("radial"===d&&Ps(y)){var{cx:b,cy:x,radius:w,startAngle:_,endAngle:O}=Fg(y);r={cx:b,cy:x,startAngle:_,endAngle:O,innerRadius:w,outerRadius:w},o=Hg,a=lv.cursorLine}else r={points:$g(d,y,u)},o=Fp,a=lv.cursorLine;var S="object"==typeof f&&"className"in f?f.className:void 0,P=Bw(Bw(Bw(Bw({stroke:"#ccc",pointerEvents:"none"},u),r),Ta(f)),{},{payload:v,payloadIndex:m,className:i("recharts-tooltip-cursor",S)});return t.createElement(Tw,{zIndex:null!==(n=e.zIndex)&&void 0!==n?n:a},t.createElement(zw,{cursor:f,cursorComp:o,cursorProps:P}))}function Vw(e){var n,r=iw(),i=null!==(n=hl(Id))&&void 0!==n?n:gf,o=vf(),a=hl(ov);return null==r||null==i||null==o||null==a?null:t.createElement(Fw,Rw({},e,{offset:i,layout:o,tooltipAxisBandSize:r,chartName:a}))}var Ww,Uw=t.createContext(null),Kw={exports:{}};var Hw=(Ww||(Ww=1,function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(t,e,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||t,a),c=n?n+e:e;return t._events[c]?t._events[c].fn?t._events[c]=[t._events[c],s]:t._events[c].push(s):(t._events[c]=s,t._eventsCount++),t}function a(t,e){0===--t._eventsCount?t._events=new r:delete t._events[e]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var t,r,i=[];if(0===this._eventsCount)return i;for(r in t=this._events)e.call(t,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},s.prototype.listeners=function(t){var e=n?n+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(t){var e=n?n+t:t,r=this._events[e];return r?r.fn?1:r.length:0},s.prototype.emit=function(t,e,r,i,o,a){var s=n?n+t:t;if(!this._events[s])return!1;var c,l,u=this._events[s],h=arguments.length;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),h){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,r),!0;case 4:return u.fn.call(u.context,e,r,i),!0;case 5:return u.fn.call(u.context,e,r,i,o),!0;case 6:return u.fn.call(u.context,e,r,i,o,a),!0}for(l=1,c=new Array(h-1);l<h;l++)c[l-1]=arguments[l];u.fn.apply(u.context,c)}else{var d,f=u.length;for(l=0;l<f;l++)switch(u[l].once&&this.removeListener(t,u[l].fn,void 0,!0),h){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,e);break;case 3:u[l].fn.call(u[l].context,e,r);break;case 4:u[l].fn.call(u[l].context,e,r,i);break;default:if(!c)for(d=1,c=new Array(h-1);d<h;d++)c[d-1]=arguments[d];u[l].fn.apply(u[l].context,c)}}return!0},s.prototype.on=function(t,e,n){return o(this,t,e,n,!1)},s.prototype.once=function(t,e,n){return o(this,t,e,n,!0)},s.prototype.removeListener=function(t,e,r,i){var o=n?n+t:t;if(!this._events[o])return this;if(!e)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var c=0,l=[],u=s.length;c<u;c++)(s[c].fn!==e||i&&!s[c].once||r&&s[c].context!==r)&&l.push(s[c]);l.length?this._events[o]=1===l.length?l[0]:l:a(this,o)}return this},s.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&a(this,e)):(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,t.exports=s}(Kw)),Kw.exports);var $w=new(e(Hw)),Yw="recharts.syncEvent.tooltip",Xw="recharts.syncEvent.brush",qw=wh({name:"options",initialState:{chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},reducers:{createEventEmitter:t=>{null==t.eventEmitter&&(t.eventEmitter=Symbol("rechartsEventEmitter"))}}}),Gw=qw.reducer,{createEventEmitter:Zw}=qw.actions;function Qw(t){return t.tooltip.syncInteraction}var Jw=wh({name:"chartData",initialState:{chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},reducers:{setChartData(t,e){if(t.chartData=e.payload,null==e.payload)return t.dataStartIndex=0,void(t.dataEndIndex=0);e.payload.length>0&&t.dataEndIndex!==e.payload.length-1&&(t.dataEndIndex=e.payload.length-1)},setComputedData(t,e){t.computedData=e.payload},setDataStartEndIndexes(t,e){var{startIndex:n,endIndex:r}=e.payload;null!=n&&(t.dataStartIndex=n),null!=r&&(t.dataEndIndex=r)}}}),{setChartData:t_,setDataStartEndIndexes:e_,setComputedData:n_}=Jw.actions,r_=Jw.reducer,i_=["x","y"];function o_(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function a_(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o_(Object(n),!0).forEach(function(e){s_(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o_(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function s_(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c_(){var e=hl(av),n=hl(cv),r=sl(),i=hl(sv),o=hl(Wx),a=vf(),s=pf(),c=hl(t=>t.rootProps.className);t.useEffect(()=>{if(null==e)return Ss;var t=(t,c,l)=>{var u;if(n!==l&&e===t)if("index"!==i){if(null!=o){var h;if("function"==typeof i){var d={activeTooltipIndex:null==c.payload.index?void 0:Number(c.payload.index),isTooltipActive:c.payload.active,activeIndex:null==c.payload.index?void 0:Number(c.payload.index),activeLabel:c.payload.label,activeDataKey:c.payload.dataKey,activeCoordinate:c.payload.coordinate},f=i(o,d);h=o[f]}else"value"===i&&(h=o.find(t=>String(t.value)===c.payload.label));var{coordinate:p}=c.payload;if(null!=h&&!1!==c.payload.active&&null!=p&&null!=s){var{x:g,y:y}=p,v=Math.min(g,s.x+s.width),m=Math.min(y,s.y+s.height),b={x:"horizontal"===a?h.coordinate:v,y:"horizontal"===a?m:h.coordinate},x=$b({active:c.payload.active,coordinate:b,dataKey:c.payload.dataKey,index:String(h.index),label:c.payload.label,sourceViewBox:c.payload.sourceViewBox,graphicalItemId:c.payload.graphicalItemId});r(x)}else r($b({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}))}}else if(s&&null!=c&&null!==(u=c.payload)&&void 0!==u&&u.coordinate&&c.payload.sourceViewBox){var w=c.payload.coordinate,{x:_,y:O}=w,S=function(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(w,i_),{x:P,y:M,width:k,height:E}=c.payload.sourceViewBox,A=a_(a_({},S),{},{x:s.x+(k?(_-P)/k:0)*s.width,y:s.y+(E?(O-M)/E:0)*s.height});r(a_(a_({},c),{},{payload:a_(a_({},c.payload),{},{coordinate:A})}))}else r(c)};return $w.on(Yw,t),()=>{$w.off(Yw,t)}},[c,r,n,e,i,o,a,s])}function l_(){var e=sl();t.useEffect(()=>{e(Zw())},[e]),c_(),function(){var e=hl(av),n=hl(cv),r=sl();t.useEffect(()=>{if(null==e)return Ss;var t=(t,i,o)=>{n!==o&&e===t&&r(e_(i))};return $w.on(Xw,t),()=>{$w.off(Xw,t)}},[r,n,e])}()}function u_(e,n,r,i,o,a){var s=hl(t=>((t,e,n)=>{if(null!=e){var r=ix(t);return"axis"===e?"hover"===n?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:"hover"===n?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}})(t,e,n)),c=hl(cv),l=hl(av),u=hl(sv),h=hl(Qw),d=null==h?void 0:h.active,f=pf();t.useEffect(()=>{if(!d&&null!=l&&null!=c){var t=$b({active:a,coordinate:r,dataKey:s,index:o,label:"number"==typeof i?String(i):i,sourceViewBox:f,graphicalItemId:void 0});$w.emit(Yw,l,t,c)}},[d,r,s,o,i,c,l,u,a,f])}function h_(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function d_(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h_(Object(n),!0).forEach(function(e){f_(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h_(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function f_(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p_(t){return t.dataKey}var g_=[],y_={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function v_(e){var r,i,o=Es(e,y_),{active:a,allowEscapeViewBox:s,animationDuration:c,animationEasing:l,content:u,filterNull:h,isAnimationActive:d,offset:f,payloadUniqBy:p,position:g,reverseDirection:y,useTranslate3d:v,wrapperStyle:m,cursor:b,shared:x,trigger:w,defaultIndex:_,portal:O,axisId:S}=o,P=sl(),M="number"==typeof _?String(_):_;t.useEffect(()=>{P(zb({shared:x,trigger:w,axisId:S,active:a,defaultIndex:M}))},[P,x,w,S,a,M]);var k=pf(),E=(()=>{var t;return null===(t=hl(t=>t.rootProps.accessibilityLayer))||void 0===t||t})(),A=function(t){return hl(e=>jb(e,t))}(x),{activeIndex:C,isActive:I}=null!==(r=hl(t=>xw(t,A,w,M)))&&void 0!==r?r:{},j=hl(t=>bw(t,A,w,M)),D=hl(t=>mw(t,A,w,M)),T=hl(t=>vw(t,A,w,M)),R=j,L=t.useContext(Uw),B=null!==(i=null!=a?a:I)&&void 0!==i&&i,[N,z]=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],[n,r]=t.useState({height:0,left:0,top:0,width:0}),i=t.useCallback(t=>{if(null!=t){var e=t.getBoundingClientRect(),i={height:e.height,left:e.left,top:e.top,width:e.width};(Math.abs(i.height-n.height)>1||Math.abs(i.left-n.left)>1||Math.abs(i.top-n.top)>1||Math.abs(i.width-n.width)>1)&&r({height:i.height,left:i.left,top:i.top,width:i.width})}},[n.width,n.height,n.top,n.left,...e]);return[n,i]}([R,B]),F="axis"===A?D:void 0;u_(A,w,T,F,C,B);var V=null!=O?O:L;if(null==V||null==k||null==A)return null;var W=null!=R?R:g_;B||(W=g_),h&&W.length&&(W=function(t,e,n){return!0===e?il(t,n):"function"==typeof e?il(t,e):t}(W.filter(t=>null!=t.value&&(!0!==t.hide||o.includeHidden)),p,p_));var U=W.length>0,K=t.createElement(Ap,{allowEscapeViewBox:s,animationDuration:c,animationEasing:l,isAnimationActive:d,active:B,coordinate:T,hasPayload:U,offset:f,position:g,reverseDirection:y,useTranslate3d:v,viewBox:k,wrapperStyle:m,lastBoundingBox:N,innerRef:z,hasPortalFromProps:Boolean(O)},function(e,n){return t.isValidElement(e)?t.cloneElement(e,n):"function"==typeof e?t.createElement(e,n):t.createElement(wp,n)}(u,d_(d_({},o),{},{payload:W,label:F,active:B,activeIndex:C,coordinate:T,accessibilityLayer:E})));return t.createElement(t.Fragment,null,n.createPortal(K,V),B&&t.createElement(Vw,{cursor:b,tooltipEventType:A,coordinate:T,payload:W,index:C}))}var m_,b_,x_,w_,__={},O_={};function S_(){return m_||(m_=1,t=O_,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.maxBy=function(t,e){if(0===t.length)return;let n=t[0],r=e(n);for(let i=1;i<t.length;i++){const o=t[i],a=e(o);a>r&&(r=a,n=o)}return n}),O_;var t}function P_(){return w_?x_:(w_=1,x_=(b_||(b_=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=S_(),n=Rs(),r=nl();t.maxBy=function(t,i){if(null!=t)return e.maxBy(Array.from(t),r.iteratee(i??n.identity))}}(__)),__).maxBy)}const M_=e(P_());var k_=wh({name:"polarAxis",initialState:{radiusAxis:{},angleAxis:{}},reducers:{addRadiusAxis(t,e){t.radiusAxis[e.payload.id]=e.payload},removeRadiusAxis(t,e){delete t.radiusAxis[e.payload.id]},addAngleAxis(t,e){t.angleAxis[e.payload.id]=e.payload},removeAngleAxis(t,e){delete t.angleAxis[e.payload.id]}}}),{addRadiusAxis:E_,removeRadiusAxis:A_,addAngleAxis:C_,removeAngleAxis:I_}=k_.actions,j_=k_.reducer;function D_(e){var{tooltipEntrySettings:n}=e,r=sl(),i=zd(),o=t.useRef(null);return t.useLayoutEffect(()=>{i||(null===o.current?r(Lb(n)):o.current!==n&&r(Bb({prev:o.current,next:n})),o.current=n)},[n,r,i]),t.useLayoutEffect(()=>()=>{o.current&&(r(Nb(o.current)),o.current=null)},[r]),null}var T_=wh({name:"graphicalItems",initialState:{cartesianItems:[],polarItems:[]},reducers:{addCartesianGraphicalItem:{reducer(t,e){t.cartesianItems.push(e.payload)},prepare:hh()},replaceCartesianGraphicalItem:{reducer(t,e){var{prev:n,next:r}=e.payload,i=Qu(t).cartesianItems.indexOf(n);i>-1&&(t.cartesianItems[i]=r)},prepare:hh()},removeCartesianGraphicalItem:{reducer(t,e){var n=Qu(t).cartesianItems.indexOf(e.payload);n>-1&&t.cartesianItems.splice(n,1)},prepare:hh()},addPolarGraphicalItem:{reducer(t,e){t.polarItems.push(e.payload)},prepare:hh()},removePolarGraphicalItem:{reducer(t,e){var n=Qu(t).polarItems.indexOf(e.payload);n>-1&&t.polarItems.splice(n,1)},prepare:hh()}}}),{addCartesianGraphicalItem:R_,replaceCartesianGraphicalItem:L_,removeCartesianGraphicalItem:B_,addPolarGraphicalItem:N_,removePolarGraphicalItem:z_}=T_.actions,F_=T_.reducer;function V_(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function W_(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?V_(Object(n),!0).forEach(function(e){U_(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):V_(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function U_(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var K_,H_,$_=wh({name:"cartesianAxis",initialState:{xAxis:{},yAxis:{},zAxis:{}},reducers:{addXAxis:{reducer(t,e){t.xAxis[e.payload.id]=e.payload},prepare:hh()},replaceXAxis:{reducer(t,e){var{prev:n,next:r}=e.payload;void 0!==t.xAxis[n.id]&&(n.id!==r.id&&delete t.xAxis[n.id],t.xAxis[r.id]=r)},prepare:hh()},removeXAxis:{reducer(t,e){delete t.xAxis[e.payload.id]},prepare:hh()},addYAxis:{reducer(t,e){t.yAxis[e.payload.id]=e.payload},prepare:hh()},replaceYAxis:{reducer(t,e){var{prev:n,next:r}=e.payload;void 0!==t.yAxis[n.id]&&(n.id!==r.id&&delete t.yAxis[n.id],t.yAxis[r.id]=r)},prepare:hh()},removeYAxis:{reducer(t,e){delete t.yAxis[e.payload.id]},prepare:hh()},addZAxis:{reducer(t,e){t.zAxis[e.payload.id]=e.payload},prepare:hh()},replaceZAxis:{reducer(t,e){var{prev:n,next:r}=e.payload;void 0!==t.zAxis[n.id]&&(n.id!==r.id&&delete t.zAxis[n.id],t.zAxis[r.id]=r)},prepare:hh()},removeZAxis:{reducer(t,e){delete t.zAxis[e.payload.id]},prepare:hh()},updateYAxisWidth(t,e){var{id:n,width:r}=e.payload,i=t.yAxis[n];if(i){var o=i.widthHistory||[];if(3===o.length&&o[0]===o[2]&&r===o[1]&&r!==i.width&&Math.abs(r-o[0])<=1)return;var a=[...o,r].slice(-3);t.yAxis[n]=W_(W_({},t.yAxis[n]),{},{width:r,widthHistory:a})}}}}),{addXAxis:Y_,replaceXAxis:X_,removeXAxis:q_,addYAxis:G_,replaceYAxis:Z_,removeYAxis:Q_,addZAxis:J_,replaceZAxis:tO,removeZAxis:eO,updateYAxisWidth:nO}=$_.actions,rO=$_.reducer,iO=wh({name:"errorBars",initialState:{},reducers:{addErrorBar:(t,e)=>{var{itemId:n,errorBar:r}=e.payload;t[n]||(t[n]=[]),t[n].push(r)},replaceErrorBar:(t,e)=>{var{itemId:n,prev:r,next:i}=e.payload;t[n]&&(t[n]=t[n].map(t=>t.dataKey===r.dataKey&&t.direction===r.direction?i:t))},removeErrorBar:(t,e)=>{var{itemId:n,errorBar:r}=e.payload;t[n]&&(t[n]=t[n].filter(t=>t.dataKey!==r.dataKey||t.direction!==r.direction))}}}),{addErrorBar:oO,replaceErrorBar:aO,removeErrorBar:sO}=iO.actions,cO=iO.reducer,lO={exports:{}},uO={};H_||(H_=1,lO.exports=function(){if(K_)return uO;K_=1;var t=r(),e="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},n=t.useSyncExternalStore,i=t.useRef,o=t.useEffect,a=t.useMemo,s=t.useDebugValue;return uO.useSyncExternalStoreWithSelector=function(t,r,c,l,u){var h=i(null);if(null===h.current){var d={hasValue:!1,value:null};h.current=d}else d=h.current;h=a(function(){function t(t){if(!o){if(o=!0,n=t,t=l(t),void 0!==u&&d.hasValue){var r=d.value;if(u(r,t))return i=r}return i=t}if(r=i,e(n,t))return r;var a=l(t);return void 0!==u&&u(r,a)?(n=t,r):(n=t,i=a)}var n,i,o=!1,a=void 0===c?null:c;return[function(){return t(r())},null===a?void 0:function(){return t(a())}]},[r,c,l,u]);var f=n(t,h[0],h[1]);return o(function(){d.hasValue=!0,d.value=f},[f]),s(f),f},uO}()),lO.exports;var hO={notify(){},get:()=>[]};var dO=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),fO=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),pO=(()=>dO||fO?t.useLayoutEffect:t.useEffect)(),gO=Symbol.for("react-redux-context"),yO="undefined"!=typeof globalThis?globalThis:{};function vO(){if(!t.createContext)return{};const e=yO[gO]??=new Map;let n=e.get(t.createContext);return n||(n=t.createContext(null),e.set(t.createContext,n)),n}var mO=vO();var bO=function(e){const{children:n,context:r,serverState:i,store:o}=e,a=t.useMemo(()=>{const t=function(t){let e,n=hO,r=0,i=!1;function o(){c.onStateChange&&c.onStateChange()}function a(){r++,e||(e=t.subscribe(o),n=function(){let t=null,e=null;return{clear(){t=null,e=null},notify(){(()=>{let e=t;for(;e;)e.callback(),e=e.next})()},get(){const e=[];let n=t;for(;n;)e.push(n),n=n.next;return e},subscribe(n){let r=!0;const i=e={callback:n,next:null,prev:e};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:e=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}())}function s(){r--,e&&0===r&&(e(),e=void 0,n.clear(),n=hO)}const c={addNestedSub:function(t){a();const e=n.subscribe(t);let r=!1;return()=>{r||(r=!0,e(),s())}},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:o,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,a())},tryUnsubscribe:function(){i&&(i=!1,s())},getListeners:()=>n};return c}(o);return{store:o,subscription:t,getServerState:i?()=>i:void 0}},[o,i]),s=t.useMemo(()=>o.getState(),[o]);pO(()=>{const{subscription:t}=a;return t.onStateChange=t.notifyNestedSubs,t.trySubscribe(),s!==o.getState()&&t.notifyNestedSubs(),()=>{t.tryUnsubscribe(),t.onStateChange=void 0}},[a,s]);const c=r||mO;return t.createElement(c.Provider,{value:a},n)},xO=e=>{var{computedData:n}=e,r=sl();return t.useEffect(()=>(r(n_(n)),()=>{r(t_(void 0))}),[n,r]),null},wO={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},_O=wh({name:"brush",initialState:wO,reducers:{setBrushSettings:(t,e)=>null==e.payload?wO:e.payload}}),{setBrushSettings:OO}=_O.actions,SO=_O.reducer,PO=wh({name:"referenceElements",initialState:{dots:[],areas:[],lines:[]},reducers:{addDot:(t,e)=>{t.dots.push(e.payload)},removeDot:(t,e)=>{var n=Qu(t).dots.findIndex(t=>t===e.payload);-1!==n&&t.dots.splice(n,1)},addArea:(t,e)=>{t.areas.push(e.payload)},removeArea:(t,e)=>{var n=Qu(t).areas.findIndex(t=>t===e.payload);-1!==n&&t.areas.splice(n,1)},addLine:(t,e)=>{t.lines.push(e.payload)},removeLine:(t,e)=>{var n=Qu(t).lines.findIndex(t=>t===e.payload);-1!==n&&t.lines.splice(n,1)}}}),{addDot:MO,removeDot:kO,addArea:EO,removeArea:AO,addLine:CO,removeLine:IO}=PO.actions,jO=PO.reducer,DO=a([(t,e)=>e,yf,jv,Fv,Nx,Wx,dw,Id],(t,e,n,r,i,o,a,s)=>{if(t&&e&&r&&i&&o)return"horizontal"===e||"vertical"===e?((t,e,n,r,i,o,a)=>{if(t&&n&&r&&i&&function(t,e){var{chartX:n,chartY:r}=t;return n>=e.left&&n<=e.left+e.width&&r>=e.top&&r<=e.top+e.height}(t,a)){var s=((t,e)=>"horizontal"===e?t.chartX:"vertical"===e?t.chartY:void 0)(t,e),c=cw(s,o,i,n,r),l=((t,e,n,r)=>{var i=e.find(t=>t&&t.index===n);if(i){if("horizontal"===t)return{x:i.coordinate,y:r.chartY};if("vertical"===t)return{x:r.chartX,y:i.coordinate}}return{x:0,y:0}})(e,i,c,t);return{activeIndex:String(c),activeCoordinate:l}}})(t,e,r,i,o,a,s):ww(t,e,n,r,i,o,a)}),TO=t=>{var e=t.currentTarget.getBoundingClientRect(),n=e.width/t.currentTarget.offsetWidth,r=e.height/t.currentTarget.offsetHeight;return{chartX:Math.round((t.clientX-e.left)/n),chartY:Math.round((t.clientY-e.top)/r)}},RO=ah("mouseClick"),LO=td();LO.startListening({actionCreator:RO,effect:(t,e)=>{var n=t.payload,r=DO(e.getState(),TO(n));null!=(null==r?void 0:r.activeIndex)&&e.dispatch(Hb({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var BO=ah("mouseMove"),NO=td(),zO=null;NO.startListening({actionCreator:BO,effect:(t,e)=>{var n=t.payload;null!==zO&&cancelAnimationFrame(zO);var r=TO(n);zO=requestAnimationFrame(()=>{var t=e.getState();if("axis"===jb(t,t.tooltip.settings.shared)){var n=DO(t,r);null!=(null==n?void 0:n.activeIndex)?e.dispatch(Kb({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate})):e.dispatch(Wb())}zO=null})}});var FO={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},VO=wh({name:"rootProps",initialState:FO,reducers:{updateOptions:(t,e)=>{var n;t.accessibilityLayer=e.payload.accessibilityLayer,t.barCategoryGap=e.payload.barCategoryGap,t.barGap=null!==(n=e.payload.barGap)&&void 0!==n?n:FO.barGap,t.barSize=e.payload.barSize,t.maxBarSize=e.payload.maxBarSize,t.stackOffset=e.payload.stackOffset,t.syncId=e.payload.syncId,t.syncMethod=e.payload.syncMethod,t.className=e.payload.className,t.baseValue=e.payload.baseValue,t.reverseStackOrder=e.payload.reverseStackOrder}}}),WO=VO.reducer,{updateOptions:UO}=VO.actions,KO=wh({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(t,e)=>e.payload}}),{updatePolarOptions:HO}=KO.actions,$O=KO.reducer,YO=ah("keyDown"),XO=ah("focus"),qO=td();qO.startListening({actionCreator:YO,effect:(t,e)=>{var n=e.getState();if(!1!==n.rootProps.accessibilityLayer){var{keyboardInteraction:r}=n.tooltip,i=t.payload;if("ArrowRight"===i||"ArrowLeft"===i||"Enter"===i){var o=tx(r,gx(n),bm(n),Tx(n)),a=null==o?-1:Number(o);if(Number.isFinite(a)&&!(a<0)){var s=Wx(n);if("Enter"!==i){var c=a+("ArrowRight"===i?1:-1)*("left-to-right"===Eb(n)?1:-1);if(!(null==s||c>=s.length||c<0)){var l=yw(n,"axis","hover",String(c));e.dispatch(Yb({active:!0,activeIndex:c.toString(),activeDataKey:void 0,activeCoordinate:l}))}}else{var u=yw(n,"axis","hover",String(r.index));e.dispatch(Yb({active:!r.active,activeIndex:r.index,activeDataKey:r.dataKey,activeCoordinate:u}))}}}}}}),qO.startListening({actionCreator:XO,effect:(t,e)=>{var n=e.getState();if(!1!==n.rootProps.accessibilityLayer){var{keyboardInteraction:r}=n.tooltip;if(!r.active&&null==r.index){var i=yw(n,"axis","hover",String("0"));e.dispatch(Yb({activeDataKey:void 0,active:!0,activeIndex:"0",activeCoordinate:i}))}}}});var GO=ah("externalEvent"),ZO=td(),QO=new Map;ZO.startListening({actionCreator:GO,effect:(t,e)=>{var{handler:n,reactEvent:r}=t.payload;if(null!=n){r.persist();var i=r.type,o=QO.get(i);void 0!==o&&cancelAnimationFrame(o);var a=requestAnimationFrame(()=>{try{var t=e.getState(),o={activeCoordinate:Qx(t),activeDataKey:qx(t),activeIndex:Yx(t),activeLabel:Xx(t),activeTooltipIndex:Yx(t),isTooltipActive:Jx(t)};n(o,r)}finally{QO.delete(i)}});QO.set(i,a)}}});var JO=a([ix],t=>t.tooltipItemPayloads),tS=a([JO,rx,(t,e,n)=>e,(t,e,n)=>n],(t,e,n,r)=>{var i=t.find(t=>t.settings.dataKey===r);if(null!=i){var{positions:o}=i;if(null!=o)return e(o,n)}}),eS=ah("touchMove"),nS=td();nS.startListening({actionCreator:eS,effect:(t,e)=>{var n=t.payload;if(null!=n.touches&&0!==n.touches.length){var r=e.getState(),i=jb(r,r.tooltip.settings.shared);if("axis"===i){var o=DO(r,TO({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY,currentTarget:n.currentTarget}));null!=(null==o?void 0:o.activeIndex)&&e.dispatch(Kb({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if("item"===i){var a,s=n.touches[0];if(null==document.elementFromPoint)return;var c=document.elementFromPoint(s.clientX,s.clientY);if(!c||!c.getAttribute)return;var l=c.getAttribute("data-recharts-item-index"),u=null!==(a=c.getAttribute("data-recharts-item-data-key"))&&void 0!==a?a:void 0,h=tS(e.getState(),l,u);e.dispatch(Fb({activeDataKey:u,activeIndex:l,activeCoordinate:h}))}}}});var rS=Ul({brush:SO,cartesianAxis:rO,chartData:r_,errorBars:cO,graphicalItems:F_,layout:sd,legend:gp,options:Gw,polarAxis:j_,polarOptions:$O,referenceElements:jO,rootProps:WO,tooltip:Xb,zIndex:Dw});function iS(e){var{preloadedState:n,children:r,reduxStoreName:i}=e,o=zd(),a=t.useRef(null);if(o)return r;null==a.current&&(a.current=function(t){return ph({reducer:rS,preloadedState:t,middleware:t=>t({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes("es6")}).concat([LO.middleware,NO.middleware,qO.middleware,ZO.middleware,nS.middleware]),enhancers:t=>{var e=t;return"function"==typeof t&&(e=t()),e.concat(fh({type:"raf"}))},devTools:gg})}(n));var s=ol;return t.createElement(bO,{context:s,store:a.current},r)}function oS(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function aS(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?oS(Object(n),!0).forEach(function(e){sS(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):oS(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function sS(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function cS(){return cS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},cS.apply(null,arguments)}var lS=()=>(l_(),null);function uS(t){if("number"==typeof t)return t;if("string"==typeof t){var e=parseFloat(t);if(!Number.isNaN(e))return e}return 0}var hS=t.forwardRef((e,n)=>{var r,i,o=t.useRef(null),[a,s]=t.useState({containerWidth:uS(null===(r=e.style)||void 0===r?void 0:r.width),containerHeight:uS(null===(i=e.style)||void 0===i?void 0:i.height)}),c=t.useCallback((t,e)=>{s(n=>{var r=Math.round(t),i=Math.round(e);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]),l=t.useCallback(t=>{if("function"==typeof n&&n(t),null!=t&&"undefined"!=typeof ResizeObserver){var{width:e,height:r}=t.getBoundingClientRect();c(e,r);var i=new ResizeObserver(t=>{var{width:e,height:n}=t[0].contentRect;c(e,n)});i.observe(t),o.current=i}},[n,c]);return t.useEffect(()=>()=>{var t=o.current;null!=t&&t.disconnect()},[c]),t.createElement(t.Fragment,null,t.createElement(mf,{width:a.containerWidth,height:a.containerHeight}),t.createElement("div",cS({ref:l},e)))}),dS=t.forwardRef((e,n)=>{var{width:r,height:i}=e,[o,a]=t.useState({containerWidth:uS(r),containerHeight:uS(i)}),s=t.useCallback((t,e)=>{a(n=>{var r=Math.round(t),i=Math.round(e);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]),c=t.useCallback(t=>{if("function"==typeof n&&n(t),null!=t){var{width:e,height:r}=t.getBoundingClientRect();s(e,r)}},[n,s]);return t.createElement(t.Fragment,null,t.createElement(mf,{width:o.containerWidth,height:o.containerHeight}),t.createElement("div",cS({ref:c},e)))}),fS=t.forwardRef((e,n)=>{var{width:r,height:i}=e;return t.createElement(t.Fragment,null,t.createElement(mf,{width:r,height:i}),t.createElement("div",cS({ref:n},e)))}),pS=t.forwardRef((e,n)=>{var{width:r,height:i}=e;return fs(r)||fs(i)?t.createElement(dS,cS({},e,{ref:n})):t.createElement(fS,cS({},e,{ref:n}))});var gS,yS,vS,mS=t.forwardRef((e,n)=>{var{children:r,className:o,height:a,onClick:s,onContextMenu:c,onDoubleClick:l,onMouseDown:u,onMouseEnter:h,onMouseLeave:d,onMouseMove:f,onMouseUp:p,onTouchEnd:g,onTouchMove:y,onTouchStart:v,style:m,width:b,responsive:x,dispatchTouchEvents:w=!0}=e,_=t.useRef(null),O=sl(),[S,P]=t.useState(null),[M,k]=t.useState(null),E=function(){var e=sl(),[n,r]=t.useState(null),i=hl(Sd);return t.useEffect(()=>{if(null!=n){var t=n.getBoundingClientRect().width/n.offsetWidth;nf(t)&&t!==i&&e(ad(t))}},[n,e,i]),r}(),A=hf(),C=(null==A?void 0:A.width)>0?A.width:b,I=(null==A?void 0:A.height)>0?A.height:a,j=t.useCallback(t=>{E(t),"function"==typeof n&&n(t),P(t),k(t),null!=t&&(_.current=t)},[E,n,P,k]),D=t.useCallback(t=>{O(RO(t)),O(GO({handler:s,reactEvent:t}))},[O,s]),T=t.useCallback(t=>{O(BO(t)),O(GO({handler:h,reactEvent:t}))},[O,h]),R=t.useCallback(t=>{O(Wb()),O(GO({handler:d,reactEvent:t}))},[O,d]),L=t.useCallback(t=>{O(BO(t)),O(GO({handler:f,reactEvent:t}))},[O,f]),B=t.useCallback(()=>{O(XO())},[O]),N=t.useCallback(t=>{O(YO(t.key))},[O]),z=t.useCallback(t=>{O(GO({handler:c,reactEvent:t}))},[O,c]),F=t.useCallback(t=>{O(GO({handler:l,reactEvent:t}))},[O,l]),V=t.useCallback(t=>{O(GO({handler:u,reactEvent:t}))},[O,u]),W=t.useCallback(t=>{O(GO({handler:p,reactEvent:t}))},[O,p]),U=t.useCallback(t=>{O(GO({handler:v,reactEvent:t}))},[O,v]),K=t.useCallback(t=>{w&&O(eS(t)),O(GO({handler:y,reactEvent:t}))},[O,w,y]),H=t.useCallback(t=>{O(GO({handler:g,reactEvent:t}))},[O,g]),$=function(t){return!0===t?hS:pS}(x);return t.createElement(Uw.Provider,{value:S},t.createElement(Ua.Provider,{value:M},t.createElement($,{width:null!=C?C:null==m?void 0:m.width,height:null!=I?I:null==m?void 0:m.height,className:i("recharts-wrapper",o),style:aS({position:"relative",cursor:"default",width:C,height:I},m),onClick:D,onContextMenu:z,onDoubleClick:F,onFocus:B,onKeyDown:N,onMouseDown:V,onMouseEnter:T,onMouseLeave:R,onMouseMove:L,onMouseUp:W,onTouchEnd:H,onTouchMove:K,onTouchStart:U,ref:j},t.createElement(lS,null),r)))}),bS={};function xS(){return vS||(vS=1,yS=(gS||(gS=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=nl();t.sumBy=function(t,n){if(!t||!t.length)return 0;let r;null!=n&&(n=e.iteratee(n));for(let e=0;e<t.length;e++){const i=n?n(t[e]):t[e];void 0!==i&&(void 0===r?r=i:r+=i)}return r}}(bS)),bS).sumBy),yS}const wS=e(xS());var _S=["sourceX","sourceY","sourceControlX","targetX","targetY","targetControlX","linkWidth"],OS=["className","style","children"];function SS(){return SS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},SS.apply(null,arguments)}function PS(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function MS(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function kS(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?MS(Object(n),!0).forEach(function(e){ES(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):MS(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ES(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var AS=t=>t.y+t.dy/2,CS=t=>t&&t.value||0,IS=(t,e)=>e.reduce((e,n)=>e+CS(t[n]),0),jS=(t,e,n)=>n.reduce((n,r)=>{var i=e[r],o=t[i.source];return n+AS(o)*CS(e[r])},0),DS=(t,e,n)=>n.reduce((n,r)=>{var i=e[r],o=t[i.target];return n+AS(o)*CS(e[r])},0),TS=(t,e)=>t.y-e.y,RS=(t,e)=>{for(var{targetNodes:n}=e,r=0,i=n.length;r<i;r++){var o=t[n[r]];o&&(o.depth=Math.max(e.depth+1,o.depth),RS(t,o))}},LS=function(t,e,n){for(var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=0,o=t.length;i<o;i++){var a=t[i],s=a.length;r&&a.sort(TS);for(var c=0,l=0;l<s;l++){var u=a[l],h=c-u.y;h>0&&(u.y+=h),c=u.y+u.dy+n}c=e+n;for(var d=s-1;d>=0;d--){var f=a[d],p=f.y+f.dy+n-c;if(!(p>0))break;f.y-=p,c=f.y}}},BS=(t,e,n,r)=>{for(var i=0,o=e.length;i<o;i++)for(var a=e[i],s=0,c=a.length;s<c;s++){var l=a[s];if(l.sourceLinks.length){var u=IS(n,l.sourceLinks),h=jS(t,n,l.sourceLinks)/u;l.y+=(h-AS(l))*r}}},NS=(t,e,n,r)=>{for(var i=e.length-1;i>=0;i--)for(var o=e[i],a=0,s=o.length;a<s;a++){var c=o[a];if(c.targetLinks.length){var l=IS(n,c.targetLinks),u=DS(t,n,c.targetLinks)/l;c.y+=(u-AS(c))*r}}},zS=t=>{var{data:e,width:n,height:r,iterations:i,nodeWidth:o,nodePadding:a,sort:s,verticalAlign:c,align:l}=t,{links:u}=e,{tree:h}=((t,e,n,r)=>{for(var i,o,{nodes:a,links:s}=t,c=a.map((t,e)=>{var n=((t,e)=>{for(var n=[],r=[],i=[],o=[],a=0,s=t.length;a<s;a++){var c=t[a];c.source===e&&(i.push(c.target),o.push(a)),c.target===e&&(n.push(c.source),r.push(a))}return{sourceNodes:n,sourceLinks:r,targetLinks:o,targetNodes:i}})(s,e);return kS(kS(kS({},t),n),{},{value:Math.max(IS(s,n.sourceLinks),IS(s,n.targetLinks)),depth:0})}),l=0,u=c.length;l<u;l++){var h=c[l];h.sourceNodes.length||RS(c,h)}var d=null!==(i=null===(o=M_(c,t=>t.depth))||void 0===o?void 0:o.depth)&&void 0!==i?i:0;if(d>=1)for(var f=(e-n)/d,p=0,g=c.length;p<g;p++){var y=c[p];y.targetNodes.length||"justify"===r&&(y.depth=d),y.x=y.depth*f,y.dx=n}return{tree:c,maxDepth:d}})(e,n,o,l),d=(t=>{for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];e[i.depth]||(e[i.depth]=[]),e[i.depth].push(i)}return e})(h),f=((t,e,n,r,i)=>{for(var o=Math.min(...t.map(t=>(e-(t.length-1)*n)/wS(t,CS))),a=0,s=t.length;a<s;a++){var c=t[a];if("top"===i)for(var l=0,u=0,h=c.length;u<h;u++){var d=c[u];d.dy=d.value*o,d.y=l,l+=d.dy+n}else for(var f=0,p=c.length;f<p;f++){var g=c[f];g.y=f,g.dy=g.value*o}}return r.map(t=>kS(kS({},t),{},{dy:CS(t)*o}))})(d,r,a,u,c);if(LS(d,r,a,s),"justify"===c)for(var p=1,g=1;g<=i;g++)NS(h,d,f,p*=.99),LS(d,r,a,s),BS(h,d,f,p),LS(d,r,a,s);return((t,e)=>{for(var n=0,r=t.length;n<r;n++){var i=t[n],o=0,a=0;i.targetLinks.sort((n,r)=>t[e[n].target].y-t[e[r].target].y),i.sourceLinks.sort((n,r)=>t[e[n].source].y-t[e[r].source].y);for(var s=0,c=i.targetLinks.length;s<c;s++){var l=e[i.targetLinks[s]];l&&(l.sy=o,o+=l.dy)}for(var u=0,h=i.sourceLinks.length;u<h;u++){var d=e[i.sourceLinks[u]];d&&(d.ty=a,a+=d.dy)}}})(h,f),{nodes:h,links:f}},FS={chartName:"Sankey",defaultTooltipEventType:"item",validateTooltipEventTypes:["item"],tooltipPayloadSearcher:(t,e,n,r)=>{if(null!=e&&"string"==typeof e){var i=e.split("-"),[o,a]=i,s=us(n,"".concat(o,"s[").concat(a,"]"));if(s){var c=((t,e,n)=>{var{payload:r}=t;if("node"===e)return{payload:r,name:dd(r,n,""),value:dd(r,"value")};if("source"in r&&r.source&&r.target){var i=dd(r.source,n,""),o=dd(r.target,n,"");return{payload:r,name:"".concat(i," - ").concat(o),value:dd(r,"value")}}})(s,o,r);return c}}},eventEmitter:void 0},VS=t.memo(e=>{var{dataKey:n,nameKey:r,stroke:i,strokeWidth:o,fill:a,name:s,data:c}=e,l={dataDefinedOnItem:c,positions:void 0,settings:{stroke:i,strokeWidth:o,fill:a,dataKey:n,name:s,nameKey:r,hide:!1,type:void 0,color:a,unit:""}};return t.createElement(D_,{tooltipEntrySettings:l})});function WS(e){var n,{props:r,i:i,linkContent:o,onMouseEnter:a,onMouseLeave:s,onClick:c,dataKey:l}=e,u="sourceX"in(n=r)?{x:(n.sourceX+n.targetX)/2,y:(n.sourceY+n.targetY)/2}:void 0,h="link-".concat(i),d=sl(),f={onMouseEnter:t=>{d(Fb({activeIndex:h,activeDataKey:l,activeCoordinate:u})),a(r,t)},onMouseLeave:t=>{d(Vb()),s(r,t)},onClick:t=>{d(Ub({activeIndex:h,activeDataKey:l,activeCoordinate:u})),c(r,t)}};return t.createElement(Wa,f,function(e,n){if(t.isValidElement(e))return t.cloneElement(e,n);if("function"==typeof e)return e(n);var{sourceX:r,sourceY:i,sourceControlX:o,targetX:a,targetY:s,targetControlX:c,linkWidth:l}=n,u=PS(n,_S);return t.createElement("path",SS({className:"recharts-sankey-link",d:"\n M".concat(r,",").concat(i,"\n C").concat(o,",").concat(i," ").concat(c,",").concat(s," ").concat(a,",").concat(s,"\n "),fill:"none",stroke:"#333",strokeWidth:l,strokeOpacity:"0.2"},Da(u)))}(o,r))}function US(e){var{modifiedLinks:n,links:r,linkContent:i,onMouseEnter:o,onMouseLeave:a,onClick:s,dataKey:c}=e;return t.createElement(Wa,{className:"recharts-sankey-links",key:"recharts-sankey-links"},r.map((e,r)=>{var l=n[r];return t.createElement(WS,{key:"link-".concat(e.source,"-").concat(e.target,"-").concat(e.value),props:l,linkContent:i,i:r,onMouseEnter:o,onMouseLeave:a,onClick:s,dataKey:c})}))}function KS(e){var n,{props:r,nodeContent:i,i:o,onMouseEnter:a,onMouseLeave:s,onClick:c,dataKey:l}=e,u=sl(),h={x:+(n=r).x+ +n.width/2,y:+n.y+ +n.height/2},d="node-".concat(o),f={onMouseEnter:t=>{u(Fb({activeIndex:d,activeDataKey:l,activeCoordinate:h})),a(r,t)},onMouseLeave:t=>{u(Vb()),s(r,t)},onClick:t=>{u(Ub({activeIndex:d,activeDataKey:l,activeCoordinate:h})),c(r,t)}};return t.createElement(Wa,f,function(e,n){return t.isValidElement(e)?t.cloneElement(e,n):"function"==typeof e?e(n):t.createElement(Cg,SS({className:"recharts-sankey-node",fill:"#0088fe",fillOpacity:"0.8"},Da(n)))}(i,r))}function HS(e){var{modifiedNodes:n,nodeContent:r,onMouseEnter:i,onMouseLeave:o,onClick:a,dataKey:s}=e;return t.createElement(Wa,{className:"recharts-sankey-nodes",key:"recharts-sankey-nodes"},n.map((e,n)=>t.createElement(KS,{key:"node-".concat(e.index,"-").concat(e.x,"-").concat(e.y),props:e,nodeContent:r,i:n,onMouseEnter:i,onMouseLeave:o,onClick:a,dataKey:s})))}var $S={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"};function YS(e){var{className:n,style:r,children:i}=e,o=PS(e,OS),{link:a,dataKey:s,node:c,onMouseEnter:l,onMouseLeave:u,onClick:h,data:d,iterations:f,nodeWidth:p,nodePadding:g,sort:y,linkCurvature:v,margin:m,verticalAlign:b,align:x}=e,w=Da(o),_=hl(_d),O=hl(Od),{links:S,modifiedLinks:P,modifiedNodes:M}=t.useMemo(()=>{var t,e,n,r;if(!d||!_||!O||_<=0||O<=0)return{nodes:[],links:[],modifiedLinks:[],modifiedNodes:[]};var i=_-(null!==(t=m.left)&&void 0!==t?t:0)-(null!==(e=m.right)&&void 0!==e?e:0),o=O-(null!==(n=m.top)&&void 0!==n?n:0)-(null!==(r=m.bottom)&&void 0!==r?r:0),s=zS({data:d,width:i,height:o,iterations:f,nodeWidth:p,nodePadding:g,sort:y,verticalAlign:b,align:x}),l=m.top||0,u=m.left||0,h=s.links.map((t,e)=>(t=>{var e,n,{link:r,nodes:i,left:o,top:a,i:s,linkContent:c,linkCurvature:l}=t,{sy:u,ty:h,dy:d}=r,f=i[r.source],p=i[r.target],g=f.x+f.dx+o,y=p.x+o,v=(n=y-(e=+g),t=>e+n*t),m=v(l),b=v(1-l);return kS({sourceX:g,targetX:y,sourceY:f.y+u+d/2+a,targetY:p.y+h+d/2+a,sourceControlX:m,targetControlX:b,sourceRelativeY:u,targetRelativeY:h,linkWidth:d,index:s,payload:kS(kS({},r),{},{source:f,target:p})},Ta(c))})({link:t,nodes:s.nodes,i:e,top:l,left:u,linkContent:a,linkCurvature:v})),w=s.nodes.map((t,e)=>(t=>{var{node:e,nodeContent:n,top:r,left:i,i:o}=t,{x:a,y:s,dx:c,dy:l}=e;return kS(kS({},Ta(n)),{},{x:a+i,y:s+r,width:c,height:l,index:o,payload:e})})({node:t,nodeContent:c,i:e,top:l,left:u}));return{nodes:s.nodes,links:s.links,modifiedLinks:h,modifiedNodes:w}},[d,_,O,m,f,p,g,y,a,c,v,x,b]),k=t.useCallback((t,e,n)=>{l&&l(t,e,n)},[l]),E=t.useCallback((t,e,n)=>{u&&u(t,e,n)},[u]),A=t.useCallback((t,e,n)=>{h&&h(t,e,n)},[h]);return rf(_)&&rf(O)&&d&&d.links&&d.nodes?t.createElement(t.Fragment,null,t.createElement(xO,{computedData:{links:P,nodes:M}}),t.createElement(Na,SS({},w,{width:_,height:O}),i,t.createElement(US,{links:S,modifiedLinks:P,linkContent:a,dataKey:s,onMouseEnter:(t,e)=>k(t,"link",e),onMouseLeave:(t,e)=>E(t,"link",e),onClick:(t,e)=>A(t,"link",e)}),t.createElement(HS,{modifiedNodes:M,nodeContent:c,dataKey:s,onMouseEnter:(t,e)=>k(t,"node",e),onMouseLeave:(t,e)=>E(t,"node",e),onClick:(t,e)=>A(t,"node",e)}))):null}function XS(e){var n=Es(e,$S),{width:r,height:i,style:o,className:a}=n,[s,c]=t.useState(null);return t.createElement(iS,{preloadedState:{options:FS},reduxStoreName:null!=a?a:"Sankey"},t.createElement(VS,{dataKey:n.dataKey,nameKey:n.nameKey,stroke:n.stroke,strokeWidth:n.strokeWidth,fill:n.fill,name:n.name,data:n.data}),t.createElement(mf,{width:r,height:i}),t.createElement(bf,{margin:n.margin}),t.createElement(mS,{className:a,style:o,width:r,height:i,responsive:!1,ref:t=>{t&&!s&&c(t)},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},t.createElement(Uw.Provider,{value:s},t.createElement(YS,n))))}XS.displayName="Sankey";export{ft as B,Do as C,ii as L,Ho as P,ff as R,ai as S,v_ as T,ni as a,Oa as b,ka as c,Qo as d,Uo as e,oa as f,XS as g,Wa as h,pt as i,Cg as j,xa as p};