@oliasoft-open-source/charts-library 5.2.1 → 5.2.2-beta-2
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.
- package/dist/assets/Color-AVL7NMMY-GhbeA4MZ.js +1 -0
- package/dist/assets/DocsRenderer-PQXLIZUC-BOHw7vjA.js +2 -0
- package/dist/assets/bar-chart.stories-D30rS-ps.js +145 -0
- package/dist/assets/client-ZEQrpak8.js +1 -0
- package/dist/assets/components-BcVrFCfa.js +1 -0
- package/dist/assets/get-draggableData-CBeUXd9j.js +2 -0
- package/dist/assets/iframe-C1ZBWVv6.js +2349 -0
- package/dist/assets/{legend-ChMeFKa6.js → legend-CpVdQ0g7.js} +64 -59
- package/dist/assets/legend-context-Gxel1MnE.js +47 -0
- package/dist/assets/line-chart-V5Wlf2uJ.js +1 -0
- package/dist/assets/line-chart.stories-CJzFw0Ya.js +1166 -0
- package/dist/assets/{line-chart.test-case.stories-Ccs20N5x.js → line-chart.test-case.stories-B7WlCHsW.js} +1 -1
- package/dist/assets/noto-sans-cyrillic-400-italic-CMQj_TQM.woff2 +0 -0
- package/dist/assets/noto-sans-cyrillic-400-italic-Dm4hr-Ag.woff +0 -0
- package/dist/assets/noto-sans-cyrillic-400-normal-BDYvNhAR.woff +0 -0
- package/dist/assets/noto-sans-cyrillic-400-normal-CHP_ranX.woff2 +0 -0
- package/dist/assets/noto-sans-cyrillic-700-italic-DWLFq66Q.woff2 +0 -0
- package/dist/assets/noto-sans-cyrillic-700-italic-DaJcJxmx.woff +0 -0
- package/dist/assets/noto-sans-cyrillic-700-normal-CgNbF-DS.woff +0 -0
- package/dist/assets/noto-sans-cyrillic-700-normal-Y97T0Ual.woff2 +0 -0
- package/dist/assets/noto-sans-cyrillic-ext-400-italic-C9NI8UaU.woff2 +0 -0
- package/dist/assets/noto-sans-cyrillic-ext-400-italic-DqW_YkPk.woff +0 -0
- package/dist/assets/noto-sans-cyrillic-ext-400-normal-BjDhGU6t.woff2 +0 -0
- package/dist/assets/noto-sans-cyrillic-ext-400-normal-d9FrwbiD.woff +0 -0
- package/dist/assets/noto-sans-cyrillic-ext-700-italic-CJ2zNwEf.woff2 +0 -0
- package/dist/assets/noto-sans-cyrillic-ext-700-italic-wfn8l9BI.woff +0 -0
- package/dist/assets/noto-sans-cyrillic-ext-700-normal-Cpjpjy5f.woff2 +0 -0
- package/dist/assets/noto-sans-cyrillic-ext-700-normal-DKaOP4w1.woff +0 -0
- package/dist/assets/noto-sans-devanagari-400-italic-BpEXw0fu.woff +0 -0
- package/dist/assets/noto-sans-devanagari-400-italic-aza5nvbj.woff2 +0 -0
- package/dist/assets/noto-sans-devanagari-400-normal-C3FccbrF.woff2 +0 -0
- package/dist/assets/noto-sans-devanagari-400-normal-g9fsM2jL.woff +0 -0
- package/dist/assets/noto-sans-devanagari-700-italic-BWxeZW2N.woff2 +0 -0
- package/dist/assets/noto-sans-devanagari-700-italic-DlNZooX8.woff +0 -0
- package/dist/assets/noto-sans-devanagari-700-normal-BeKZv04D.woff2 +0 -0
- package/dist/assets/noto-sans-devanagari-700-normal-DQ20I1k4.woff +0 -0
- package/dist/assets/noto-sans-greek-400-italic-Cw158ua2.woff2 +0 -0
- package/dist/assets/noto-sans-greek-400-italic-Ds3lC5jm.woff +0 -0
- package/dist/assets/noto-sans-greek-400-normal-Be2BcUUc.woff +0 -0
- package/dist/assets/noto-sans-greek-400-normal-DCESwnT1.woff2 +0 -0
- package/dist/assets/noto-sans-greek-700-italic-BXqStIRT.woff +0 -0
- package/dist/assets/noto-sans-greek-700-italic-K6HhztJz.woff2 +0 -0
- package/dist/assets/noto-sans-greek-700-normal-C_NBFngB.woff2 +0 -0
- package/dist/assets/noto-sans-greek-700-normal-DspBLmJZ.woff +0 -0
- package/dist/assets/noto-sans-greek-ext-400-italic-D9i0Od8_.woff +0 -0
- package/dist/assets/noto-sans-greek-ext-400-italic-DlxXzGt2.woff2 +0 -0
- package/dist/assets/noto-sans-greek-ext-400-normal-L11LEhi4.woff +0 -0
- package/dist/assets/noto-sans-greek-ext-400-normal-i2oSBwXz.woff2 +0 -0
- package/dist/assets/noto-sans-greek-ext-700-italic-BVb6BEPG.woff +0 -0
- package/dist/assets/noto-sans-greek-ext-700-italic-DrlV2HeE.woff2 +0 -0
- package/dist/assets/noto-sans-greek-ext-700-normal-BvxaxZ-t.woff +0 -0
- package/dist/assets/noto-sans-greek-ext-700-normal-CqXHsD66.woff2 +0 -0
- package/dist/assets/noto-sans-latin-400-italic-B5_wyGmT.woff2 +0 -0
- package/dist/assets/noto-sans-latin-400-italic-DfHMVQD-.woff +0 -0
- package/dist/assets/noto-sans-latin-400-normal-DBaOTIGl.woff2 +0 -0
- package/dist/assets/noto-sans-latin-400-normal-DKQcY9Xy.woff +0 -0
- package/dist/assets/noto-sans-latin-700-italic-BcjsTJqQ.woff2 +0 -0
- package/dist/assets/noto-sans-latin-700-italic-Cy-hKh7h.woff +0 -0
- package/dist/assets/noto-sans-latin-700-normal-CG28WTf7.woff2 +0 -0
- package/dist/assets/noto-sans-latin-700-normal-DVIsH__v.woff +0 -0
- package/dist/assets/noto-sans-latin-ext-400-italic-BXXaecLH.woff2 +0 -0
- package/dist/assets/noto-sans-latin-ext-400-italic-C3uzHanu.woff +0 -0
- package/dist/assets/noto-sans-latin-ext-400-normal-CNh9dRW_.woff +0 -0
- package/dist/assets/noto-sans-latin-ext-400-normal-CVf-LbaS.woff2 +0 -0
- package/dist/assets/noto-sans-latin-ext-700-italic-S9i1fPgy.woff2 +0 -0
- package/dist/assets/noto-sans-latin-ext-700-italic-dYKfCWXj.woff +0 -0
- package/dist/assets/noto-sans-latin-ext-700-normal-CDZvJj8X.woff +0 -0
- package/dist/assets/noto-sans-latin-ext-700-normal-CnRwbtty.woff2 +0 -0
- package/dist/assets/noto-sans-vietnamese-400-italic-Dotu2pZp.woff2 +0 -0
- package/dist/assets/noto-sans-vietnamese-400-italic-da8J1rYs.woff +0 -0
- package/dist/assets/noto-sans-vietnamese-400-normal-C3Al4sv4.woff +0 -0
- package/dist/assets/noto-sans-vietnamese-400-normal-D2wP-Vm-.woff2 +0 -0
- package/dist/assets/noto-sans-vietnamese-700-italic-DTbX1pks.woff +0 -0
- package/dist/assets/noto-sans-vietnamese-700-italic-DgcmztT9.woff2 +0 -0
- package/dist/assets/noto-sans-vietnamese-700-normal-BpIrMy6S.woff +0 -0
- package/dist/assets/noto-sans-vietnamese-700-normal-Cg_u0UBD.woff2 +0 -0
- package/dist/assets/pie-chart.stories-Bdsxnd3m.js +45 -0
- package/dist/assets/preload-helper-Dr7BywEQ.js +1 -0
- package/dist/assets/react-18-BDLD60Lb.js +1 -0
- package/dist/assets/react-CGaMAEPW.js +1 -0
- package/dist/assets/scatter-chart.stories-DzlCS7dT.js +41 -0
- package/dist/common/common.interface.d.ts +1 -0
- package/dist/common/helpers/add-transparency/add-transparency.d.ts +1 -0
- package/dist/common/helpers/get-chart-annotation.d.ts +1 -0
- package/dist/favicon-wrapper.svg +46 -0
- package/dist/favicon.svg +1 -1
- package/dist/iframe.html +30 -9
- package/dist/index.html +19 -16
- package/dist/index.js +15 -4
- package/dist/index.json +1 -1
- package/dist/project.json +1 -1
- package/dist/sb-addons/docs-2/manager-bundle.js +149 -240
- package/dist/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +971 -0
- package/dist/sb-addons/themes-1/manager-bundle.js +3 -0
- package/dist/sb-common-assets/favicon-wrapper.svg +46 -0
- package/dist/sb-common-assets/favicon.svg +1 -1
- package/dist/sb-manager/globals-module-info.js +280 -532
- package/dist/sb-manager/globals-runtime.js +54450 -26250
- package/dist/sb-manager/globals.js +11 -25
- package/dist/sb-manager/runtime.js +6262 -5112
- package/dist/src/components/common/common.interface.d.ts +1 -0
- package/dist/src/components/common/helpers/add-transparency/add-transparency.d.ts +1 -0
- package/dist/src/components/common/helpers/get-chart-annotation.d.ts +1 -0
- package/dist/vite-inject-mocker-entry.js +8 -0
- package/package.json +2 -1
- package/dist/assets/Color-YHDXOIA2-_rJfMMp0.js +0 -1
- package/dist/assets/DocsRenderer-CFRXHY34-BpHeeG43.js +0 -1
- package/dist/assets/bar-chart.stories-B2hnXIDm.js +0 -145
- package/dist/assets/chunk-2PTXLE6R-Dj3Lydxc.js +0 -1
- package/dist/assets/chunk-H6MOWX77-Ds8Hqw1O.js +0 -1
- package/dist/assets/chunk-NUUEMKO5-w5N4r9dW.js +0 -56
- package/dist/assets/chunk-PRSJUHPQ-B1J-18Q5.js +0 -2
- package/dist/assets/chunk-XP5HYGXS-DyEAuB1b.js +0 -1
- package/dist/assets/client-BvIKjR7y.js +0 -1
- package/dist/assets/components-B8oW7xs1.js +0 -1
- package/dist/assets/components-CqwGF0Y6.js +0 -534
- package/dist/assets/docs-tools-CnZ6t1zZ.js +0 -8
- package/dist/assets/entry-preview-CO5fIUlY.js +0 -2
- package/dist/assets/entry-preview-docs-BVt62RwF.js +0 -48
- package/dist/assets/fast-deep-equal-Cl3Z6ltL.js +0 -1
- package/dist/assets/get-draggableData-6LoYbWyK.js +0 -2
- package/dist/assets/iframe-BjAYWlbk.js +0 -226
- package/dist/assets/jsx-runtime-qP9Zu-3U.js +0 -1
- package/dist/assets/legend-context-BtHYPzro.js +0 -47
- package/dist/assets/line-chart-BY2E9pFt.js +0 -6
- package/dist/assets/line-chart.stories-BaapO9ba.js +0 -1162
- package/dist/assets/pie-chart.stories-D5ALwqBw.js +0 -45
- package/dist/assets/preview-Ba4CwQIJ.js +0 -1
- package/dist/assets/preview-CYPcIR3-.js +0 -1
- package/dist/assets/preview-D_SbBdlL.js +0 -3
- package/dist/assets/react-18-COcty78B.js +0 -1
- package/dist/assets/react-B_00WdD4.js +0 -1
- package/dist/assets/react-Blf7liVR.js +0 -1
- package/dist/assets/react-Vdx8ObgF.js +0 -1
- package/dist/assets/react-dom-CbTiFsso.js +0 -8
- package/dist/assets/scatter-chart.stories-o6B12CBB.js +0 -41
- package/dist/assets/test-utils-D7be-ahs.js +0 -1
- package/dist/sb-addons/actions-1/manager-bundle.js +0 -3
- package/dist/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +0 -3
- package/dist/sb-addons/storybook-dark-mode-esm-preset-3/manager-bundle.js +0 -5
- /package/dist/assets/{bar-chart-const-DT-Qreyz.js → bar-chart-const-D_44J3Hs.js} +0 -0
- /package/dist/assets/{get-custom-legend-plugin-example-DlEN0LEe.js → get-custom-legend-plugin-example-CGyRL0oI.js} +0 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import{_t as e,at as t,dt as n,ft as r}from"./iframe-C1ZBWVv6.js";import{t as i}from"./get-custom-legend-plugin-example-CGyRL0oI.js";import{At as a,B as o,C as s,Ct as c,Dt as l,F as u,G as d,J as f,L as p,M as m,Mt as h,N as g,Nt as _,Ot as v,P as y,Pt as b,R as x,St as S,T as C,X as w,Z as T,_ as E,b as D,d as O,et as k,g as A,gt as j,h as M,ht as ee,it as te,j as ne,jt as N,kt as P,l as re,mt as ie,n as ae,p as oe,q as se,rt as ce,u as le,w as ue,wt as de,x as F,y as fe}from"./legend-context-Gxel1MnE.js";import{J as pe,K as me,Y as he,d as ge,f as _e,i as I,p as ve,q as ye,t as be,w as xe}from"./legend-CpVdQ0g7.js";import{c as Se,i as Ce,n as we,r as Te,t as Ee}from"./get-draggableData-CBeUXd9j.js";import{n as De,t as Oe}from"./bar-chart-const-D_44J3Hs.js";var ke=r(((e,t)=>{
|
|
2
|
+
/*!
|
|
3
|
+
* @kurkle/color v0.3.4
|
|
4
|
+
* https://github.com/kurkle/color#readme
|
|
5
|
+
* (c) 2024 Jukka Kurkela
|
|
6
|
+
* Released under the MIT License
|
|
7
|
+
*/
|
|
8
|
+
(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self,n[`@kurkle/color`]=r())})(e,(function(){function e(e){return e+.5|0}let t=(e,t,n)=>Math.max(Math.min(e,n),t);function n(n){return t(e(n*2.55),0,255)}function r(n){return t(e(n/2.55),0,100)}function i(n){return t(e(n*255),0,255)}function a(n){return t(e(n/2.55)/100,0,1)}function o(n){return t(e(n*100),0,100)}let s={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},c=[...`0123456789ABCDEF`],l=e=>c[e&15],u=e=>c[(e&240)>>4]+c[e&15],d=e=>(e&240)>>4==(e&15),f=e=>d(e.r)&&d(e.g)&&d(e.b)&&d(e.a);function p(e){var t=e.length,n;return e[0]===`#`&&(t===4||t===5?n={r:255&s[e[1]]*17,g:255&s[e[2]]*17,b:255&s[e[3]]*17,a:t===5?s[e[4]]*17:255}:(t===7||t===9)&&(n={r:s[e[1]]<<4|s[e[2]],g:s[e[3]]<<4|s[e[4]],b:s[e[5]]<<4|s[e[6]],a:t===9?s[e[7]]<<4|s[e[8]]:255})),n}let m=(e,t)=>e<255?t(e):``;function h(e){var t=f(e)?l:u;return e?`#`+t(e.r)+t(e.g)+t(e.b)+m(e.a,t):void 0}let g=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function _(e,t,n){let r=t*Math.min(n,1-n),i=(t,i=(t+e/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return[i(0),i(8),i(4)]}function v(e,t,n){let r=(r,i=(r+e/60)%6)=>n-n*t*Math.max(Math.min(i,4-i,1),0);return[r(5),r(3),r(1)]}function y(e,t,n){let r=_(e,1,.5),i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function b(e,t,n,r,i){return e===i?(t-n)/r+(t<n?6:0):t===i?(n-e)/r+2:(e-t)/r+4}function x(e){let t=e.r/255,n=e.g/255,r=e.b/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2,s,c,l;return i!==a&&(l=i-a,c=o>.5?l/(2-i-a):l/(i+a),s=b(t,n,r,l,i),s=s*60+.5),[s|0,c||0,o]}function S(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(i)}function C(e,t,n){return S(_,e,t,n)}function w(e,t,n){return S(y,e,t,n)}function T(e,t,n){return S(v,e,t,n)}function E(e){return(e%360+360)%360}function D(e){let t=g.exec(e),r=255,a;if(!t)return;t[5]!==a&&(r=t[6]?n(+t[5]):i(+t[5]));let o=E(+t[2]),s=t[3]/100,c=t[4]/100;return a=t[1]===`hwb`?w(o,s,c):t[1]===`hsv`?T(o,s,c):C(o,s,c),{r:a[0],g:a[1],b:a[2],a:r}}function O(e,t){var n=x(e);n[0]=E(n[0]+t),n=C(n),e.r=n[0],e.g=n[1],e.b=n[2]}function k(e){if(!e)return;let t=x(e),n=t[0],r=o(t[1]),i=o(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${a(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}let A={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`},j={OiceXe:`f0f8ff`,antiquewEte:`faebd7`,aqua:`ffff`,aquamarRe:`7fffd4`,azuY:`f0ffff`,beige:`f5f5dc`,bisque:`ffe4c4`,black:`0`,blanKedOmond:`ffebcd`,Xe:`ff`,XeviTet:`8a2be2`,bPwn:`a52a2a`,burlywood:`deb887`,caMtXe:`5f9ea0`,KartYuse:`7fff00`,KocTate:`d2691e`,cSO:`ff7f50`,cSnflowerXe:`6495ed`,cSnsilk:`fff8dc`,crimson:`dc143c`,cyan:`ffff`,xXe:`8b`,xcyan:`8b8b`,xgTMnPd:`b8860b`,xWay:`a9a9a9`,xgYF:`6400`,xgYy:`a9a9a9`,xkhaki:`bdb76b`,xmagFta:`8b008b`,xTivegYF:`556b2f`,xSange:`ff8c00`,xScEd:`9932cc`,xYd:`8b0000`,xsOmon:`e9967a`,xsHgYF:`8fbc8f`,xUXe:`483d8b`,xUWay:`2f4f4f`,xUgYy:`2f4f4f`,xQe:`ced1`,xviTet:`9400d3`,dAppRk:`ff1493`,dApskyXe:`bfff`,dimWay:`696969`,dimgYy:`696969`,dodgerXe:`1e90ff`,fiYbrick:`b22222`,flSOwEte:`fffaf0`,foYstWAn:`228b22`,fuKsia:`ff00ff`,gaRsbSo:`dcdcdc`,ghostwEte:`f8f8ff`,gTd:`ffd700`,gTMnPd:`daa520`,Way:`808080`,gYF:`8000`,gYFLw:`adff2f`,gYy:`808080`,honeyMw:`f0fff0`,hotpRk:`ff69b4`,RdianYd:`cd5c5c`,Rdigo:`4b0082`,ivSy:`fffff0`,khaki:`f0e68c`,lavFMr:`e6e6fa`,lavFMrXsh:`fff0f5`,lawngYF:`7cfc00`,NmoncEffon:`fffacd`,ZXe:`add8e6`,ZcSO:`f08080`,Zcyan:`e0ffff`,ZgTMnPdLw:`fafad2`,ZWay:`d3d3d3`,ZgYF:`90ee90`,ZgYy:`d3d3d3`,ZpRk:`ffb6c1`,ZsOmon:`ffa07a`,ZsHgYF:`20b2aa`,ZskyXe:`87cefa`,ZUWay:`778899`,ZUgYy:`778899`,ZstAlXe:`b0c4de`,ZLw:`ffffe0`,lime:`ff00`,limegYF:`32cd32`,lRF:`faf0e6`,magFta:`ff00ff`,maPon:`800000`,VaquamarRe:`66cdaa`,VXe:`cd`,VScEd:`ba55d3`,VpurpN:`9370db`,VsHgYF:`3cb371`,VUXe:`7b68ee`,VsprRggYF:`fa9a`,VQe:`48d1cc`,VviTetYd:`c71585`,midnightXe:`191970`,mRtcYam:`f5fffa`,mistyPse:`ffe4e1`,moccasR:`ffe4b5`,navajowEte:`ffdead`,navy:`80`,Tdlace:`fdf5e6`,Tive:`808000`,TivedBb:`6b8e23`,Sange:`ffa500`,SangeYd:`ff4500`,ScEd:`da70d6`,pOegTMnPd:`eee8aa`,pOegYF:`98fb98`,pOeQe:`afeeee`,pOeviTetYd:`db7093`,papayawEp:`ffefd5`,pHKpuff:`ffdab9`,peru:`cd853f`,pRk:`ffc0cb`,plum:`dda0dd`,powMrXe:`b0e0e6`,purpN:`800080`,YbeccapurpN:`663399`,Yd:`ff0000`,Psybrown:`bc8f8f`,PyOXe:`4169e1`,saddNbPwn:`8b4513`,sOmon:`fa8072`,sandybPwn:`f4a460`,sHgYF:`2e8b57`,sHshell:`fff5ee`,siFna:`a0522d`,silver:`c0c0c0`,skyXe:`87ceeb`,UXe:`6a5acd`,UWay:`708090`,UgYy:`708090`,snow:`fffafa`,sprRggYF:`ff7f`,stAlXe:`4682b4`,tan:`d2b48c`,teO:`8080`,tEstN:`d8bfd8`,tomato:`ff6347`,Qe:`40e0d0`,viTet:`ee82ee`,JHt:`f5deb3`,wEte:`ffffff`,wEtesmoke:`f5f5f5`,Lw:`ffff00`,LwgYF:`9acd32`};function M(){let e={},t=Object.keys(j),n=Object.keys(A),r,i,a,o,s;for(r=0;r<t.length;r++){for(o=s=t[r],i=0;i<n.length;i++)a=n[i],s=s.replace(a,A[a]);a=parseInt(j[o],16),e[s]=[a>>16&255,a>>8&255,a&255]}return e}let ee;function te(e){ee||(ee=M(),ee.transparent=[0,0,0,0]);let t=ee[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}let ne=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function N(e){let r=ne.exec(e),i=255,a,o,s;if(r){if(r[7]!==a){let e=+r[7];i=r[8]?n(e):t(e*255,0,255)}return a=+r[1],o=+r[3],s=+r[5],a=255&(r[2]?n(a):t(a,0,255)),o=255&(r[4]?n(o):t(o,0,255)),s=255&(r[6]?n(s):t(s,0,255)),{r:a,g:o,b:s,a:i}}}function P(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${a(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}let re=e=>e<=.0031308?e*12.92:e**(1/2.4)*1.055-.055,ie=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function ae(e,t,n){let r=ie(a(e.r)),o=ie(a(e.g)),s=ie(a(e.b));return{r:i(re(r+n*(ie(a(t.r))-r))),g:i(re(o+n*(ie(a(t.g))-o))),b:i(re(s+n*(ie(a(t.b))-s))),a:e.a+n*(t.a-e.a)}}function oe(e,t,n){if(e){let r=x(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=C(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function se(e,t){return e&&Object.assign(t||{},e)}function ce(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=i(e[3]))):(t=se(e,{r:0,g:0,b:0,a:1}),t.a=i(t.a)),t}function le(e){return e.charAt(0)===`r`?N(e):D(e)}class ue{constructor(e){if(e instanceof ue)return e;let t=typeof e,n;t===`object`?n=ce(e):t===`string`&&(n=p(e)||te(e)||le(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=se(this._rgb);return e&&(e.a=a(e.a)),e}set rgb(e){this._rgb=ce(e)}rgbString(){return this._valid?P(this._rgb):void 0}hexString(){return this._valid?h(this._rgb):void 0}hslString(){return this._valid?k(this._rgb):void 0}mix(e,t){if(e){let n=this.rgb,r=e.rgb,i,a=t===i?.5:t,o=2*a-1,s=n.a-r.a,c=((o*s===-1?o:(o+s)/(1+o*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=a*n.a+(1-a)*r.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=ae(this._rgb,e._rgb,t)),this}clone(){return new ue(this.rgb)}alpha(e){return this._rgb.a=i(e),this}clearer(e){let t=this._rgb;return t.a*=1-e,this}greyscale(){let t=this._rgb;return t.r=t.g=t.b=e(t.r*.3+t.g*.59+t.b*.11),this}opaquer(e){let t=this._rgb;return t.a*=1+e,this}negate(){let e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return oe(this._rgb,2,e),this}darken(e){return oe(this._rgb,2,-e),this}saturate(e){return oe(this._rgb,1,e),this}desaturate(e){return oe(this._rgb,1,-e),this}rotate(e){return O(this._rgb,e),this}}function de(e){return new ue(e)}var F=Object.freeze({__proto__:null,Color:ue,b2n:a,b2p:r,default:de,hexParse:p,hexString:h,hsl2rgb:C,hslString:k,hsv2rgb:T,hueParse:D,hwb2rgb:w,lim:t,n2b:i,n2p:o,nameParse:te,p2b:n,rgb2hsl:x,rgbParse:N,rgbString:P,rotate:O,round:e});return Object.assign(de,F)}))})),Ae=r((e=>{var t=ke();function n(){}var r=(()=>{let e=0;return()=>e++})();function i(e){return e==null}function a(e){if(Array.isArray&&Array.isArray(e))return!0;let t=Object.prototype.toString.call(e);return t.slice(0,7)===`[object`&&t.slice(-6)===`Array]`}function o(e){return e!==null&&Object.prototype.toString.call(e)===`[object Object]`}function s(e){return(typeof e==`number`||e instanceof Number)&&isFinite(+e)}function c(e,t){return s(e)?e:t}function l(e,t){return e===void 0?t:e}var u=(e,t)=>typeof e==`string`&&e.endsWith(`%`)?parseFloat(e)/100:+e/t,d=(e,t)=>typeof e==`string`&&e.endsWith(`%`)?parseFloat(e)/100*t:+e;function f(e,t,n){if(e&&typeof e.call==`function`)return e.apply(n,t)}function p(e,t,n,r){let i,s,c;if(a(e))if(s=e.length,r)for(i=s-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;i<s;i++)t.call(n,e[i],i);else if(o(e))for(c=Object.keys(e),s=c.length,i=0;i<s;i++)t.call(n,e[c[i]],c[i])}function m(e,t){let n,r,i,a;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],a=t[n],i.datasetIndex!==a.datasetIndex||i.index!==a.index)return!1;return!0}function h(e){if(a(e))return e.map(h);if(o(e)){let t=Object.create(null),n=Object.keys(e),r=n.length,i=0;for(;i<r;++i)t[n[i]]=h(e[n[i]]);return t}return e}function g(e){return[`__proto__`,`prototype`,`constructor`].indexOf(e)===-1}function _(e,t,n,r){if(!g(e))return;let i=t[e],a=n[e];o(i)&&o(a)?v(i,a,r):t[e]=h(a)}function v(e,t,n){let r=a(t)?t:[t],i=r.length;if(!o(e))return e;n||={};let s=n.merger||_,c;for(let t=0;t<i;++t){if(c=r[t],!o(c))continue;let i=Object.keys(c);for(let t=0,r=i.length;t<r;++t)s(i[t],e,c,n)}return e}function y(e,t){return v(e,t,{merger:b})}function b(e,t,n){if(!g(e))return;let r=t[e],i=n[e];o(r)&&o(i)?y(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=h(i))}function x(e,t,n,r){t!==void 0&&console.warn(e+`: "`+n+`" is deprecated. Please use "`+r+`" instead`)}var S={"":e=>e,x:e=>e.x,y:e=>e.y};function C(e){let t=e.split(`.`),n=[],r=``;for(let e of t)r+=e,r.endsWith(`\\`)?r=r.slice(0,-1)+`.`:(n.push(r),r=``);return n}function w(e){let t=C(e);return e=>{for(let n of t){if(n===``)break;e&&=e[n]}return e}}function T(e,t){return(S[t]||(S[t]=w(t)))(e)}function E(e){return e.charAt(0).toUpperCase()+e.slice(1)}var D=e=>e!==void 0,O=e=>typeof e==`function`,k=(e,t)=>{if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0};function A(e){return e.type===`mouseup`||e.type===`click`||e.type===`contextmenu`}var j=Math.PI,M=2*j,ee=M+j,te=1/0,ne=j/180,N=j/2,P=j/4,re=j*2/3,ie=Math.log10,ae=Math.sign;function oe(e,t,n){return Math.abs(e-t)<n}function se(e){let t=Math.round(e);e=oe(e,t,e/1e3)?t:e;let n=10**Math.floor(ie(e)),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function ce(e){let t=[],n=Math.sqrt(e),r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((e,t)=>e-t).pop(),t}function le(e){return typeof e==`symbol`||typeof e==`object`&&!!e&&!(Symbol.toPrimitive in e||`toString`in e||`valueOf`in e)}function ue(e){return!le(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function de(e,t){let n=Math.round(e);return n-t<=e&&n+t>=e}function F(e,t,n){let r,i,a;for(r=0,i=e.length;r<i;r++)a=e[r][n],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function fe(e){return e*(j/180)}function pe(e){return e*(180/j)}function me(e){if(!s(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function he(e,t){let n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r),a=Math.atan2(r,n);return a<-.5*j&&(a+=M),{angle:a,distance:i}}function ge(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function _e(e,t){return(e-t+ee)%M-j}function I(e){return(e%M+M)%M}function ve(e,t,n,r){let i=I(e),a=I(t),o=I(n),s=I(a-i),c=I(o-i),l=I(i-a),u=I(i-o);return i===a||i===o||r&&a===o||s>c&&l<u}function ye(e,t,n){return Math.max(t,Math.min(n,e))}function be(e){return ye(e,-32768,32767)}function xe(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Se(e,t,n){n||=(n=>e[n]<t);let r=e.length-1,i=0,a;for(;r-i>1;)a=i+r>>1,n(a)?i=a:r=a;return{lo:i,hi:r}}var Ce=(e,t,n,r)=>Se(e,n,r?r=>{let i=e[r][t];return i<n||i===n&&e[r+1][t]===n}:r=>e[r][t]<n),we=(e,t,n)=>Se(e,n,r=>e[r][t]>=n);function Te(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}var Ee=[`push`,`pop`,`shift`,`splice`,`unshift`];function De(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,`_chartjs`,{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Ee.forEach(t=>{let n=`_onData`+E(t),r=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...t){let i=r.apply(this,t);return e._chartjs.listeners.forEach(e=>{typeof e[n]==`function`&&e[n](...t)}),i}})})}function Oe(e,t){let n=e._chartjs;if(!n)return;let r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(Ee.forEach(t=>{delete e[t]}),delete e._chartjs)}function Ae(e){let t=new Set(e);return t.size===e.length?e:Array.from(t)}function je(e,t,n){return t+` `+e+`px `+n}var Me=function(){return typeof window>`u`?function(e){return e()}:window.requestAnimationFrame}();function Ne(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,Me.call(window,()=>{r=!1,e.apply(t,n)}))}}function L(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}var Pe=e=>e===`start`?`left`:e===`end`?`right`:`center`,Fe=(e,t,n)=>e===`start`?t:e===`end`?n:(t+n)/2,Ie=(e,t,n,r)=>e===(r?`left`:`right`)?n:e===`center`?(t+n)/2:t;function Le(e,t,n){let r=t.length,a=0,o=r;if(e._sorted){let{iScale:s,vScale:c,_parsed:l}=e,u=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,d=s.axis,{min:f,max:p,minDefined:m,maxDefined:h}=s.getUserBounds();if(m){if(a=Math.min(Ce(l,d,f).lo,n?r:Ce(t,d,s.getPixelForValue(f)).lo),u){let e=l.slice(0,a+1).reverse().findIndex(e=>!i(e[c.axis]));a-=Math.max(0,e)}a=ye(a,0,r-1)}if(h){let e=Math.max(Ce(l,s.axis,p,!0).hi+1,n?0:Ce(t,d,s.getPixelForValue(p),!0).hi+1);if(u){let t=l.slice(e-1).findIndex(e=>!i(e[c.axis]));e+=Math.max(0,t)}o=ye(e,a,r)-a}else o=r-a}return{start:a,count:o}}function Re(e){let{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;let a=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),a}var ze=e=>e===0||e===1,Be=(e,t,n)=>-(2**(10*--e)*Math.sin((e-t)*M/n)),Ve=(e,t,n)=>2**(-10*e)*Math.sin((e-t)*M/n)+1,He={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>--e*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-(--e*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>--e*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*N)+1,easeOutSine:e=>Math.sin(e*N),easeInOutSine:e=>-.5*(Math.cos(j*e)-1),easeInExpo:e=>e===0?0:2**(10*(e-1)),easeOutExpo:e=>e===1?1:-(2**(-10*e))+1,easeInOutExpo:e=>ze(e)?e:e<.5?.5*2**(10*(e*2-1)):.5*(-(2**(-10*(e*2-1)))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1- --e*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>ze(e)?e:Be(e,.075,.3),easeOutElastic:e=>ze(e)?e:Ve(e,.075,.3),easeInOutElastic(e){let t=.1125,n=.45;return ze(e)?e:e<.5?.5*Be(e*2,t,n):.5+.5*Ve(e*2-1,t,n)},easeInBack(e){let t=1.70158;return e*e*((t+1)*e-t)},easeOutBack(e){let t=1.70158;return--e*e*((t+1)*e+t)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-He.easeOutBounce(1-e),easeOutBounce(e){let t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},easeInOutBounce:e=>e<.5?He.easeInBounce(e*2)*.5:He.easeOutBounce(e*2-1)*.5+.5};function Ue(e){if(e&&typeof e==`object`){let t=e.toString();return t===`[object CanvasPattern]`||t===`[object CanvasGradient]`}return!1}function We(e){return Ue(e)?e:new t.Color(e)}function R(e){return Ue(e)?e:new t.Color(e).saturate(.5).darken(.1).hexString()}var Ge=[`x`,`y`,`borderWidth`,`radius`,`tension`],z=[`color`,`borderColor`,`backgroundColor`];function B(e){e.set(`animation`,{delay:void 0,duration:1e3,easing:`easeOutQuart`,fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe(`animation`,{_fallback:!1,_indexable:!1,_scriptable:e=>e!==`onProgress`&&e!==`onComplete`&&e!==`fn`}),e.set(`animations`,{colors:{type:`color`,properties:z},numbers:{type:`number`,properties:Ge}}),e.describe(`animations`,{_fallback:`animation`}),e.set(`transitions`,{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:`transparent`},visible:{type:`boolean`,duration:0}}},hide:{animations:{colors:{to:`transparent`},visible:{type:`boolean`,easing:`linear`,fn:e=>e|0}}}})}function Ke(e){e.set(`layout`,{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var V=new Map;function qe(e,t){t||={};let n=e+JSON.stringify(t),r=V.get(n);return r||(r=new Intl.NumberFormat(e,t),V.set(n,r)),r}function Je(e,t,n){return qe(t,n).format(e)}var Ye={values(e){return a(e)?e:``+e},numeric(e,t,n){if(e===0)return`0`;let r=this.chart.options.locale,i,a=e;if(n.length>1){let t=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(t<1e-4||t>0x38d7ea4c68000)&&(i=`scientific`),a=H(e,n)}let o=ie(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),c={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(c,this.options.ticks.format),Je(e,r,c)},logarithmic(e,t,n){if(e===0)return`0`;let r=n[t].significand||e/10**Math.floor(ie(e));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?Ye.numeric.call(this,e,t,n):``}};function H(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Xe={formatters:Ye};function U(e){e.set(`scale`,{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:`ticks`,clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.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:Xe.formatters.values,minor:{},major:{},align:`center`,crossAlign:`near`,showLabelBackdrop:!1,backdropColor:`rgba(255, 255, 255, 0.75)`,backdropPadding:2}}),e.route(`scale.ticks`,`color`,``,`color`),e.route(`scale.grid`,`color`,``,`borderColor`),e.route(`scale.border`,`color`,``,`borderColor`),e.route(`scale.title`,`color`,``,`color`),e.describe(`scale`,{_fallback:!1,_scriptable:e=>!e.startsWith(`before`)&&!e.startsWith(`after`)&&e!==`callback`&&e!==`parser`,_indexable:e=>e!==`borderDash`&&e!==`tickBorderDash`&&e!==`dash`}),e.describe(`scales`,{_fallback:`scale`}),e.describe(`scale.ticks`,{_scriptable:e=>e!==`backdropPadding`&&e!==`callback`,_indexable:e=>e!==`backdropPadding`})}var W=Object.create(null),G=Object.create(null);function K(e,t){if(!t)return e;let n=t.split(`.`);for(let t=0,r=n.length;t<r;++t){let r=n[t];e=e[r]||(e[r]=Object.create(null))}return e}function Ze(e,t,n){return typeof t==`string`?v(K(e,t),n):v(K(e,``),t)}var Qe=new class{constructor(e,t){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=e=>e.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=(e,t)=>R(t.backgroundColor),this.hoverBorderColor=(e,t)=>R(t.borderColor),this.hoverColor=(e,t)=>R(t.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(e),this.apply(t)}set(e,t){return Ze(this,e,t)}get(e){return K(this,e)}describe(e,t){return Ze(G,e,t)}override(e,t){return Ze(W,e,t)}route(e,t,n,r){let i=K(this,e),a=K(this,n),s=`_`+t;Object.defineProperties(i,{[s]:{value:i[t],writable:!0},[t]:{enumerable:!0,get(){let e=this[s],t=a[r];return o(e)?Object.assign({},t,e):l(e,t)},set(e){this[s]=e}}})}apply(e){e.forEach(e=>e(this))}}({_scriptable:e=>!e.startsWith(`on`),_indexable:e=>e!==`events`,hover:{_fallback:`interaction`},interaction:{_scriptable:!1,_indexable:!1}},[B,Ke,U]);function $e(e){return!e||i(e.size)||i(e.family)?null:(e.style?e.style+` `:``)+(e.weight?e.weight+` `:``)+e.size+`px `+e.family}function et(e,t,n,r,i){let a=t[i];return a||(a=t[i]=e.measureText(i).width,n.push(i)),a>r&&(r=a),r}function tt(e,t,n,r){r||={};let i=r.data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},o=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let s=0,c=n.length,l,u,d,f,p;for(l=0;l<c;l++)if(f=n[l],f!=null&&!a(f))s=et(e,i,o,s,f);else if(a(f))for(u=0,d=f.length;u<d;u++)p=f[u],p!=null&&!a(p)&&(s=et(e,i,o,s,p));e.restore();let m=o.length/2;if(m>n.length){for(l=0;l<m;l++)delete i[o[l]];o.splice(0,m)}return s}function nt(e,t,n){let r=e.currentDevicePixelRatio,i=n===0?0:Math.max(n/2,.5);return Math.round((t-i)*r)/r+i}function rt(e,t){!t&&!e||(t||=e.getContext(`2d`),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function it(e,t,n,r){at(e,t,n,r,null)}function at(e,t,n,r,i){let a,o,s,c,l,u,d,f,p=t.pointStyle,m=t.rotation,h=t.radius,g=(m||0)*ne;if(p&&typeof p==`object`&&(a=p.toString(),a===`[object HTMLImageElement]`||a===`[object HTMLCanvasElement]`)){e.save(),e.translate(n,r),e.rotate(g),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),e.restore();return}if(!(isNaN(h)||h<=0)){switch(e.beginPath(),p){default:i?e.ellipse(n,r,i/2,h,0,0,M):e.arc(n,r,h,0,M),e.closePath();break;case`triangle`:u=i?i/2:h,e.moveTo(n+Math.sin(g)*u,r-Math.cos(g)*h),g+=re,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*h),g+=re,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*h),e.closePath();break;case`rectRounded`:l=h*.516,c=h-l,o=Math.cos(g+P)*c,d=Math.cos(g+P)*(i?i/2-l:c),s=Math.sin(g+P)*c,f=Math.sin(g+P)*(i?i/2-l:c),e.arc(n-d,r-s,l,g-j,g-N),e.arc(n+f,r-o,l,g-N,g),e.arc(n+d,r+s,l,g,g+N),e.arc(n-f,r+o,l,g+N,g+j),e.closePath();break;case`rect`:if(!m){c=Math.SQRT1_2*h,u=i?i/2:c,e.rect(n-u,r-c,2*u,2*c);break}g+=P;case`rectRot`:d=Math.cos(g)*(i?i/2:h),o=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+f,r-o),e.lineTo(n+d,r+s),e.lineTo(n-f,r+o),e.closePath();break;case`crossRot`:g+=P;case`cross`:d=Math.cos(g)*(i?i/2:h),o=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case`star`:d=Math.cos(g)*(i?i/2:h),o=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o),g+=P,d=Math.cos(g)*(i?i/2:h),o=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case`line`:o=i?i/2:Math.cos(g)*h,s=Math.sin(g)*h,e.moveTo(n-o,r-s),e.lineTo(n+o,r+s);break;case`dash`:e.moveTo(n,r),e.lineTo(n+Math.cos(g)*(i?i/2:h),r+Math.sin(g)*h);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function q(e,t,n){return n||=.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function ot(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function st(e){e.restore()}function ct(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i===`middle`){let r=(t.x+n.x)/2;e.lineTo(r,t.y),e.lineTo(r,n.y)}else i===`after`==!!r?e.lineTo(n.x,t.y):e.lineTo(t.x,n.y);e.lineTo(n.x,n.y)}function lt(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function ut(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),i(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function dt(e,t,n,r,i){if(i.strikethrough||i.underline){let a=e.measureText(r),o=t-a.actualBoundingBoxLeft,s=t+a.actualBoundingBoxRight,c=n-a.actualBoundingBoxAscent,l=n+a.actualBoundingBoxDescent,u=i.strikethrough?(c+l)/2:l;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(o,u),e.lineTo(s,u),e.stroke()}}function ft(e,t){let n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function pt(e,t,n,r,o,s={}){let c=a(t)?t:[t],l=s.strokeWidth>0&&s.strokeColor!==``,u,d;for(e.save(),e.font=o.string,ut(e,s),u=0;u<c.length;++u)d=c[u],s.backdrop&&ft(e,s.backdrop),l&&(s.strokeColor&&(e.strokeStyle=s.strokeColor),i(s.strokeWidth)||(e.lineWidth=s.strokeWidth),e.strokeText(d,n,r,s.maxWidth)),e.fillText(d,n,r,s.maxWidth),dt(e,n,r,d,s),r+=Number(o.lineHeight);e.restore()}function mt(e,t){let{x:n,y:r,w:i,h:a,radius:o}=t;e.arc(n+o.topLeft,r+o.topLeft,o.topLeft,1.5*j,j,!0),e.lineTo(n,r+a-o.bottomLeft),e.arc(n+o.bottomLeft,r+a-o.bottomLeft,o.bottomLeft,j,N,!0),e.lineTo(n+i-o.bottomRight,r+a),e.arc(n+i-o.bottomRight,r+a-o.bottomRight,o.bottomRight,N,0,!0),e.lineTo(n+i,r+o.topRight),e.arc(n+i-o.topRight,r+o.topRight,o.topRight,0,-N,!0),e.lineTo(n+o.topLeft,r)}var ht=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,gt=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function _t(e,t){let n=(``+e).match(ht);if(!n||n[1]===`normal`)return t*1.2;switch(e=+n[2],n[3]){case`px`:return e;case`%`:e/=100;break}return t*e}var vt=e=>+e||0;function yt(e,t){let n={},r=o(t),i=r?Object.keys(t):t,a=o(e)?r?n=>l(e[n],e[t[n]]):t=>e[t]:()=>e;for(let e of i)n[e]=vt(a(e));return n}function bt(e){return yt(e,{top:`y`,right:`x`,bottom:`y`,left:`x`})}function xt(e){return yt(e,[`topLeft`,`topRight`,`bottomLeft`,`bottomRight`])}function St(e){let t=bt(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Ct(e,t){e||={},t||=Qe.font;let n=l(e.size,t.size);typeof n==`string`&&(n=parseInt(n,10));let r=l(e.style,t.style);r&&!(``+r).match(gt)&&(console.warn(`Invalid font style specified: "`+r+`"`),r=void 0);let i={family:l(e.family,t.family),lineHeight:_t(l(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:l(e.weight,t.weight),string:``};return i.string=$e(i),i}function wt(e,t,n,r){let i=!0,o,s,c;for(o=0,s=e.length;o<s;++o)if(c=e[o],c!==void 0&&(t!==void 0&&typeof c==`function`&&(c=c(t),i=!1),n!==void 0&&a(c)&&(c=c[n%c.length],i=!1),c!==void 0))return r&&!i&&(r.cacheable=!1),c}function Tt(e,t,n){let{min:r,max:i}=e,a=d(t,(i-r)/2),o=(e,t)=>n&&e===0?0:e+t;return{min:o(r,-Math.abs(a)),max:o(i,a)}}function Et(e,t){return Object.assign(Object.create(e),t)}function Dt(e,t=[``],n,r,i=()=>e[0]){let a=n||e;r===void 0&&(r=Vt(`_fallback`,e));let o={[Symbol.toStringTag]:`Object`,_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:r,_getTarget:i,override:n=>Dt([n,...e],t,a,r)};return new Proxy(o,{deleteProperty(t,n){return delete t[n],delete t._keys,delete e[0][n],!0},get(n,r){return jt(n,r,()=>Bt(r,t,e,n))},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e._scopes[0],t)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(e,t){return Ht(e).includes(t)},ownKeys(e){return Ht(e)},set(e,t,n){let r=e._storage||=i();return e[t]=r[t]=n,delete e._keys,!0}})}function Ot(e,t,n,r){let i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:kt(e,r),setContext:t=>Ot(e,t,n,r),override:i=>Ot(e.override(i),t,n,r)};return new Proxy(i,{deleteProperty(t,n){return delete t[n],delete e[n],!0},get(e,t,n){return jt(e,t,()=>Mt(e,t,n))},getOwnPropertyDescriptor(t,n){return t._descriptors.allKeys?Reflect.has(e,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,n)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(t,n){return Reflect.has(e,n)},ownKeys(){return Reflect.ownKeys(e)},set(t,n,r){return e[n]=r,delete t[n],!0}})}function kt(e,t={scriptable:!0,indexable:!0}){let{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:O(n)?n:()=>n,isIndexable:O(r)?r:()=>r}}var J=(e,t)=>e?e+E(t):t,At=(e,t)=>o(t)&&e!==`adapters`&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function jt(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t===`constructor`)return e[t];let r=n();return e[t]=r,r}function Mt(e,t,n){let{_proxy:r,_context:i,_subProxy:o,_descriptors:s}=e,c=r[t];return O(c)&&s.isScriptable(t)&&(c=Nt(t,c,e,n)),a(c)&&c.length&&(c=Pt(t,c,e,s.isIndexable)),At(t,c)&&(c=Ot(c,i,o&&o[t],s)),c}function Nt(e,t,n,r){let{_proxy:i,_context:a,_subProxy:o,_stack:s}=n;if(s.has(e))throw Error(`Recursion detected: `+Array.from(s).join(`->`)+`->`+e);s.add(e);let c=t(a,o||r);return s.delete(e),At(e,c)&&(c=Lt(i._scopes,i,e,c)),c}function Pt(e,t,n,r){let{_proxy:i,_context:a,_subProxy:s,_descriptors:c}=n;if(a.index!==void 0&&r(e))return t[a.index%t.length];if(o(t[0])){let n=t,r=i._scopes.filter(e=>e!==n);t=[];for(let o of n){let n=Lt(r,i,e,o);t.push(Ot(n,a,s&&s[e],c))}}return t}function Ft(e,t,n){return O(e)?e(t,n):e}var Y=(e,t)=>e===!0?t:typeof e==`string`?T(t,e):void 0;function It(e,t,n,r,i){for(let a of t){let t=Y(n,a);if(t){e.add(t);let a=Ft(t._fallback,n,i);if(a!==void 0&&a!==n&&a!==r)return a}else if(t===!1&&r!==void 0&&n!==r)return null}return!1}function Lt(e,t,n,r){let i=t._rootScopes,a=Ft(t._fallback,n,r),o=[...e,...i],s=new Set;s.add(r);let c=Rt(s,o,n,a||n,r);return c===null||a!==void 0&&a!==n&&(c=Rt(s,o,a,c,r),c===null)?!1:Dt(Array.from(s),[``],i,a,()=>zt(t,n,r))}function Rt(e,t,n,r,i){for(;n;)n=It(e,t,n,r,i);return n}function zt(e,t,n){let r=e._getTarget();t in r||(r[t]={});let i=r[t];return a(i)&&o(n)?n:i||{}}function Bt(e,t,n,r){let i;for(let a of t)if(i=Vt(J(a,e),n),i!==void 0)return At(e,i)?Lt(n,r,e,i):i}function Vt(e,t){for(let n of t){if(!n)continue;let t=n[e];if(t!==void 0)return t}}function Ht(e){let t=e._keys;return t||=e._keys=Ut(e._scopes),t}function Ut(e){let t=new Set;for(let n of e)for(let e of Object.keys(n).filter(e=>!e.startsWith(`_`)))t.add(e);return Array.from(t)}function Wt(e,t,n,r){let{iScale:i}=e,{key:a=`r`}=this._parsing,o=Array(r),s,c,l,u;for(s=0,c=r;s<c;++s)l=s+n,u=t[l],o[s]={r:i.parse(T(u,a),l)};return o}var Gt=2**-52||1e-14,X=(e,t)=>t<e.length&&!e[t].skip&&e[t],Kt=e=>e===`x`?`y`:`x`;function qt(e,t,n,r){let i=e.skip?t:e,a=t,o=n.skip?t:n,s=ge(a,i),c=ge(o,a),l=s/(s+c),u=c/(s+c);l=isNaN(l)?0:l,u=isNaN(u)?0:u;let d=r*l,f=r*u;return{previous:{x:a.x-d*(o.x-i.x),y:a.y-d*(o.y-i.y)},next:{x:a.x+f*(o.x-i.x),y:a.y+f*(o.y-i.y)}}}function Jt(e,t,n){let r=e.length,i,a,o,s,c,l=X(e,0);for(let u=0;u<r-1;++u)if(c=l,l=X(e,u+1),!(!c||!l)){if(oe(t[u],0,Gt)){n[u]=n[u+1]=0;continue}i=n[u]/t[u],a=n[u+1]/t[u],s=i**2+a**2,!(s<=9)&&(o=3/Math.sqrt(s),n[u]=i*o*t[u],n[u+1]=a*o*t[u])}}function Yt(e,t,n=`x`){let r=Kt(n),i=e.length,a,o,s,c=X(e,0);for(let l=0;l<i;++l){if(o=s,s=c,c=X(e,l+1),!s)continue;let i=s[n],u=s[r];o&&(a=(i-o[n])/3,s[`cp1${n}`]=i-a,s[`cp1${r}`]=u-a*t[l]),c&&(a=(c[n]-i)/3,s[`cp2${n}`]=i+a,s[`cp2${r}`]=u+a*t[l])}}function Xt(e,t=`x`){let n=Kt(t),r=e.length,i=Array(r).fill(0),a=Array(r),o,s,c,l=X(e,0);for(o=0;o<r;++o)if(s=c,c=l,l=X(e,o+1),c){if(l){let e=l[t]-c[t];i[o]=e===0?0:(l[n]-c[n])/e}a[o]=s?l?ae(i[o-1])===ae(i[o])?(i[o-1]+i[o])/2:0:i[o-1]:i[o]}Jt(e,i,a),Yt(e,a,t)}function Zt(e,t,n){return Math.max(Math.min(e,n),t)}function Qt(e,t){let n,r,i,a,o,s=q(e[0],t);for(n=0,r=e.length;n<r;++n)o=a,a=s,s=n<r-1&&q(e[n+1],t),a&&(i=e[n],o&&(i.cp1x=Zt(i.cp1x,t.left,t.right),i.cp1y=Zt(i.cp1y,t.top,t.bottom)),s&&(i.cp2x=Zt(i.cp2x,t.left,t.right),i.cp2y=Zt(i.cp2y,t.top,t.bottom)))}function $t(e,t,n,r,i){let a,o,s,c;if(t.spanGaps&&(e=e.filter(e=>!e.skip)),t.cubicInterpolationMode===`monotone`)Xt(e,i);else{let n=r?e[e.length-1]:e[0];for(a=0,o=e.length;a<o;++a)s=e[a],c=qt(n,s,e[Math.min(a+1,o-(r?0:1))%o],t.tension),s.cp1x=c.previous.x,s.cp1y=c.previous.y,s.cp2x=c.next.x,s.cp2y=c.next.y,n=s}t.capBezierPoints&&Qt(e,n)}function en(){return typeof window<`u`&&typeof document<`u`}function tn(e){let t=e.parentNode;return t&&t.toString()===`[object ShadowRoot]`&&(t=t.host),t}function nn(e,t,n){let r;return typeof e==`string`?(r=parseInt(e,10),e.indexOf(`%`)!==-1&&(r=r/100*t.parentNode[n])):r=e,r}var rn=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function an(e,t){return rn(e).getPropertyValue(t)}var on=[`top`,`right`,`bottom`,`left`];function Z(e,t,n){let r={};n=n?`-`+n:``;for(let i=0;i<4;i++){let a=on[i];r[a]=parseFloat(e[t+`-`+a+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}var sn=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function cn(e,t){let n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:a}=r,o=!1,s,c;if(sn(i,a,e.target))s=i,c=a;else{let e=t.getBoundingClientRect();s=r.clientX-e.left,c=r.clientY-e.top,o=!0}return{x:s,y:c,box:o}}function ln(e,t){if(`native`in e)return e;let{canvas:n,currentDevicePixelRatio:r}=t,i=rn(n),a=i.boxSizing===`border-box`,o=Z(i,`padding`),s=Z(i,`border`,`width`),{x:c,y:l,box:u}=cn(e,n),d=o.left+(u&&s.left),f=o.top+(u&&s.top),{width:p,height:m}=t;return a&&(p-=o.width+s.width,m-=o.height+s.height),{x:Math.round((c-d)/p*n.width/r),y:Math.round((l-f)/m*n.height/r)}}function un(e,t,n){let r,i;if(t===void 0||n===void 0){let a=e&&tn(e);if(!a)t=e.clientWidth,n=e.clientHeight;else{let e=a.getBoundingClientRect(),o=rn(a),s=Z(o,`border`,`width`),c=Z(o,`padding`);t=e.width-c.width-s.width,n=e.height-c.height-s.height,r=nn(o.maxWidth,a,`clientWidth`),i=nn(o.maxHeight,a,`clientHeight`)}}return{width:t,height:n,maxWidth:r||te,maxHeight:i||te}}var dn=e=>Math.round(e*10)/10;function fn(e,t,n,r){let i=rn(e),a=Z(i,`margin`),o=nn(i.maxWidth,e,`clientWidth`)||te,s=nn(i.maxHeight,e,`clientHeight`)||te,c=un(e,t,n),{width:l,height:u}=c;if(i.boxSizing===`content-box`){let e=Z(i,`border`,`width`),t=Z(i,`padding`);l-=t.width+e.width,u-=t.height+e.height}return l=Math.max(0,l-a.width),u=Math.max(0,r?l/r:u-a.height),l=dn(Math.min(l,o,c.maxWidth)),u=dn(Math.min(u,s,c.maxHeight)),l&&!u&&(u=dn(l/2)),(t!==void 0||n!==void 0)&&r&&c.height&&u>c.height&&(u=c.height,l=dn(Math.floor(u*r))),{width:l,height:u}}function pn(e,t,n){let r=t||1,i=Math.floor(e.height*r),a=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);let o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==i||o.width!==a?(e.currentDevicePixelRatio=r,o.height=i,o.width=a,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}var mn=function(){let e=!1;try{let t={get passive(){return e=!0,!1}};en()&&(window.addEventListener(`test`,null,t),window.removeEventListener(`test`,null,t))}catch{}return e}();function hn(e,t){let n=an(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function gn(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function _n(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r===`middle`?n<.5?e.y:t.y:r===`after`?n<1?e.y:t.y:n>0?t.y:e.y}}function vn(e,t,n,r){let i={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},o=gn(e,i,n),s=gn(i,a,n),c=gn(a,t,n);return gn(gn(o,s,n),gn(s,c,n),n)}var yn=function(e,t){return{x(n){return e+e+t-n},setWidth(e){t=e},textAlign(e){return e===`center`?e:e===`right`?`left`:`right`},xPlus(e,t){return e-t},leftForLtr(e,t){return e-t}}},bn=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function xn(e,t,n){return e?yn(t,n):bn()}function Sn(e,t){let n,r;(t===`ltr`||t===`rtl`)&&(n=e.canvas.style,r=[n.getPropertyValue(`direction`),n.getPropertyPriority(`direction`)],n.setProperty(`direction`,t,`important`),e.prevTextDirection=r)}function Cn(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty(`direction`,t[0],t[1]))}function wn(e){return e===`angle`?{between:ve,compare:_e,normalize:I}:{between:xe,compare:(e,t)=>e-t,normalize:e=>e}}function Tn({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function En(e,t,n){let{property:r,start:i,end:a}=n,{between:o,normalize:s}=wn(r),c=t.length,{start:l,end:u,loop:d}=e,f,p;if(d){for(l+=c,u+=c,f=0,p=c;f<p&&o(s(t[l%c][r]),i,a);++f)l--,u--;l%=c,u%=c}return u<l&&(u+=c),{start:l,end:u,loop:d,style:e.style}}function Dn(e,t,n){if(!n)return[e];let{property:r,start:i,end:a}=n,o=t.length,{compare:s,between:c,normalize:l}=wn(r),{start:u,end:d,loop:f,style:p}=En(e,t,n),m=[],h=!1,g=null,_,v,y,b=()=>c(i,y,_)&&s(i,y)!==0,x=()=>s(a,_)===0||c(a,y,_),S=()=>h||b(),C=()=>!h||x();for(let e=u,n=u;e<=d;++e)v=t[e%o],!v.skip&&(_=l(v[r]),_!==y&&(h=c(_,i,a),g===null&&S()&&(g=s(_,i)===0?e:n),g!==null&&C()&&(m.push(Tn({start:g,end:e,loop:f,count:o,style:p})),g=null),n=e,y=_));return g!==null&&m.push(Tn({start:g,end:d,loop:f,count:o,style:p})),m}function On(e,t){let n=[],r=e.segments;for(let i=0;i<r.length;i++){let a=Dn(r[i],e.points,t);a.length&&n.push(...a)}return n}function kn(e,t,n,r){let i=0,a=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(a+=i);a>i&&e[a%t].skip;)a--;return a%=t,{start:i,end:a}}function An(e,t,n,r){let i=e.length,a=[],o=t,s=e[t],c;for(c=t+1;c<=n;++c){let n=e[c%i];n.skip||n.stop?s.skip||(r=!1,a.push({start:t%i,end:(c-1)%i,loop:r}),t=o=n.stop?c:null):(o=c,s.skip&&(t=c)),s=n}return o!==null&&a.push({start:t%i,end:o%i,loop:r}),a}function jn(e,t){let n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];let a=!!e._loop,{start:o,end:s}=kn(n,i,a,r);return r===!0?Mn(e,[{start:o,end:s,loop:a}],n,t):Mn(e,An(n,o,s<o?s+i:s,!!e._fullLoop&&o===0&&s===i-1),n,t)}function Mn(e,t,n,r){return!r||!r.setContext||!n?t:Nn(e,t,n,r)}function Nn(e,t,n,r){let i=e._chart.getContext(),a=Pn(e.options),{_datasetIndex:o,options:{spanGaps:s}}=e,c=n.length,l=[],u=a,d=t[0].start,f=d;function p(e,t,r,i){let a=s?-1:1;if(e!==t){for(e+=c;n[e%c].skip;)e-=a;for(;n[t%c].skip;)t+=a;e%c!==t%c&&(l.push({start:e%c,end:t%c,loop:r,style:i}),u=i,d=t%c)}}for(let e of t){d=s?d:e.start;let t=n[d%c],a;for(f=d+1;f<=e.end;f++){let s=n[f%c];a=Pn(r.setContext(Et(i,{type:`segment`,p0:t,p1:s,p0DataIndex:(f-1)%c,p1DataIndex:f%c,datasetIndex:o}))),Fn(a,u)&&p(d,f-1,e.loop,u),t=s,u=a}d<f-1&&p(d,f-1,e.loop,u)}return l}function Pn(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Fn(e,t){if(!t)return!1;let n=[],r=function(e,t){return Ue(t)?(n.includes(t)||n.push(t),n.indexOf(t)):t};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function In(e,t,n){return e.options.clip?e[n]:t[n]}function Ln(e,t){let{xScale:n,yScale:r}=e;return n&&r?{left:In(n,t,`left`),right:In(n,t,`right`),top:In(r,t,`top`),bottom:In(r,t,`bottom`)}:t}function Rn(e,t){let n=t._clip;if(n.disabled)return!1;let r=Ln(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}e.HALF_PI=N,e.INFINITY=te,e.PI=j,e.PITAU=ee,e.QUARTER_PI=P,e.RAD_PER_DEG=ne,e.TAU=M,e.TWO_THIRDS_PI=re,e.Ticks=Xe,e._addGrace=Tt,e._alignPixel=nt,e._alignStartEnd=Fe,e._angleBetween=ve,e._angleDiff=_e,e._arrayUnique=Ae,e._attachContext=Ot,e._bezierCurveTo=lt,e._bezierInterpolation=vn,e._boundSegment=Dn,e._boundSegments=On,e._capitalize=E,e._computeSegments=jn,e._createResolver=Dt,e._decimalPlaces=me,e._deprecated=x,e._descriptors=kt,e._elementsEqual=m,e._factorize=ce,e._filterBetween=Te,e._getParentNode=tn,e._getStartAndCountOfVisiblePoints=Le,e._int16Range=be,e._isBetween=xe,e._isClickEvent=A,e._isDomSupported=en,e._isPointInArea=q,e._limitValue=ye,e._longestText=tt,e._lookup=Se,e._lookupByKey=Ce,e._measureText=et,e._merger=_,e._mergerIf=b,e._normalizeAngle=I,e._parseObjectDataRadialScale=Wt,e._pointInLine=gn,e._readValueToProps=yt,e._rlookupByKey=we,e._scaleRangesChanged=Re,e._setMinAndMaxByKey=F,e._splitKey=C,e._steppedInterpolation=_n,e._steppedLineTo=ct,e._textX=Ie,e._toLeftRightCenter=Pe,e._updateBezierControlPoints=$t,e.addRoundedRectPath=mt,e.almostEquals=oe,e.almostWhole=de,e.callback=f,e.clearCanvas=rt,e.clipArea=ot,e.clone=h,e.color=We,e.createContext=Et,e.debounce=L,e.defaults=Qe,e.defined=D,e.descriptors=G,e.distanceBetweenPoints=ge,e.drawPoint=it,e.drawPointLegend=at,e.each=p,e.effects=He,e.finiteOrDefault=c,e.fontString=je,e.formatNumber=Je,e.getAngleFromPoint=he,e.getDatasetClipArea=Rn,e.getHoverColor=R,e.getMaximumSize=fn,e.getRelativePosition=ln,e.getRtlAdapter=xn,e.getStyle=an,e.isArray=a,e.isFunction=O,e.isNullOrUndef=i,e.isNumber=ue,e.isNumberFinite=s,e.isObject=o,e.isPatternOrGradient=Ue,e.listenArrayEvents=De,e.log10=ie,e.merge=v,e.mergeIf=y,e.niceNum=se,e.noop=n,e.overrideTextDirection=Sn,e.overrides=W,e.readUsedSize=hn,e.renderText=pt,e.requestAnimFrame=Me,e.resolve=wt,e.resolveObjectKey=T,e.restoreTextDirection=Cn,e.retinaScale=pn,e.setsEqual=k,e.sign=ae,e.splineCurve=qt,e.splineCurveMonotone=Xt,e.supportsEventListenerOptions=mn,e.throttled=Ne,e.toDegrees=pe,e.toDimension=d,e.toFont=Ct,e.toFontString=$e,e.toLineHeight=_t,e.toPadding=St,e.toPercentage=u,e.toRadians=fe,e.toTRBL=bt,e.toTRBLCorners=xt,e.uid=r,e.unclipArea=st,e.unlistenArrayEvents=Oe,e.valueOrDefault=l})),je=r((e=>{var t=Ae();ke();var n=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,n,r){let i=t.listeners[r],a=t.duration;i.forEach(r=>r({chart:e,initial:t.initial,numSteps:a,currentStep:Math.min(n-t.start,a)}))}_refresh(){this._request||=(this._running=!0,t.requestAnimFrame.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((n,r)=>{if(!n.running||!n.items.length)return;let i=n.items,a=i.length-1,o=!1,s;for(;a>=0;--a)s=i[a],s._active?(s._total>n.duration&&(n.duration=s._total),s.tick(e),o=!0):(i[a]=i[i.length-1],i.pop());o&&(r.draw(),this._notify(r,n,e,`progress`)),i.length||(n.running=!1,this._notify(r,n,e,`complete`),n.initial=!1),t+=i.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){let t=this._charts,n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){let t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((e,t)=>Math.max(e,t._duration),0),this._refresh())}running(e){if(!this._running)return!1;let t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){let t=this._charts.get(e);if(!t||!t.items.length)return;let n=t.items,r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),`complete`)}remove(e){return this._charts.delete(e)}},r=`transparent`,i={boolean(e,t,n){return n>.5?t:e},color(e,n,i){let a=t.color(e||r),o=a.valid&&t.color(n||r);return o&&o.valid?o.mix(a,i).hexString():n},number(e,t,n){return e+(t-e)*n}},a=class{constructor(e,n,r,a){let o=n[r];a=t.resolve([e.to,a,o,e.from]);let s=t.resolve([e.from,o,a]);this._active=!0,this._fn=e.fn||i[e.type||typeof s],this._easing=t.effects[e.easing]||t.effects.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=r,this._from=s,this._to=a,this._promises=void 0}active(){return this._active}update(e,n,r){if(this._active){this._notify(!1);let i=this._target[this._prop],a=r-this._start,o=this._duration-a;this._start=r,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=a,this._loop=!!e.loop,this._to=t.resolve([e.to,n,i,e.from]),this._from=t.resolve([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){let t=e-this._start,n=this._duration,r=this._prop,i=this._from,a=this._loop,o=this._to,s;if(this._active=i!==o&&(a||t<n),!this._active){this._target[r]=o,this._notify(!0);return}if(t<0){this._target[r]=i;return}s=t/n%2,s=a&&s>1?2-s:s,s=this._easing(Math.min(1,Math.max(0,s))),this._target[r]=this._fn(i,o,s)}wait(){let e=this._promises||=[];return new Promise((t,n)=>{e.push({res:t,rej:n})})}_notify(e){let t=e?`res`:`rej`,n=this._promises||[];for(let e=0;e<n.length;e++)n[e][t]()}},o=class{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!t.isObject(e))return;let n=Object.keys(t.defaults.animation),r=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{let a=e[i];if(!t.isObject(a))return;let o={};for(let e of n)o[e]=a[e];(t.isArray(a.properties)&&a.properties||[i]).forEach(e=>{(e===i||!r.has(e))&&r.set(e,o)})})}_animateOptions(e,t){let n=t.options,r=c(e,n);if(!r)return[];let i=this._createAnimations(r,n);return n.$shared&&s(e.options.$animations,n).then(()=>{e.options=n},()=>{}),i}_createAnimations(e,t){let n=this._properties,r=[],i=e.$animations||={},o=Object.keys(t),s=Date.now(),c;for(c=o.length-1;c>=0;--c){let l=o[c];if(l.charAt(0)===`$`)continue;if(l===`options`){r.push(...this._animateOptions(e,t));continue}let u=t[l],d=i[l],f=n.get(l);if(d)if(f&&d.active()){d.update(f,u,s);continue}else d.cancel();if(!f||!f.duration){e[l]=u;continue}i[l]=d=new a(f,e,l,u),r.push(d)}return r}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}let r=this._createAnimations(e,t);if(r.length)return n.add(this._chart,r),!0}};function s(e,t){let n=[],r=Object.keys(t);for(let t=0;t<r.length;t++){let i=e[r[t]];i&&i.active()&&n.push(i.wait())}return Promise.all(n)}function c(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function l(e,t){let n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,a=n.max===void 0?t:0;return{start:r?a:i,end:r?i:a}}function u(e,t,n){if(n===!1)return!1;let r=l(e,n),i=l(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function d(e){let n,r,i,a;return t.isObject(e)?(n=e.top,r=e.right,i=e.bottom,a=e.left):n=r=i=a=e,{top:n,right:r,bottom:i,left:a,disabled:e===!1}}function f(e,t){let n=[],r=e._getSortedDatasetMetas(t),i,a;for(i=0,a=r.length;i<a;++i)n.push(r[i].index);return n}function p(e,n,r,i={}){let a=e.keys,o=i.mode===`single`,s,c,l,u;if(n===null)return;let d=!1;for(s=0,c=a.length;s<c;++s){if(l=+a[s],l===r){if(d=!0,i.all)continue;break}u=e.values[l],t.isNumberFinite(u)&&(o||n===0||t.sign(n)===t.sign(u))&&(n+=u)}return!d&&!i.all?0:n}function m(e,t){let{iScale:n,vScale:r}=t,i=n.axis===`x`?`x`:`y`,a=r.axis===`x`?`x`:`y`,o=Object.keys(e),s=Array(o.length),c,l,u;for(c=0,l=o.length;c<l;++c)u=o[c],s[c]={[i]:u,[a]:e[u]};return s}function h(e,t){let n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function g(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function _(e){let{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:-1/0,max:i?n:1/0}}function v(e,t,n){let r=e[t]||(e[t]={});return r[n]||(r[n]={})}function y(e,t,n,r){for(let i of t.getMatchingVisibleMetas(r).reverse()){let t=e[i.index];if(n&&t>0||!n&&t<0)return i.index}return null}function b(e,t){let{chart:n,_cachedMeta:r}=e,i=n._stacks||={},{iScale:a,vScale:o,index:s}=r,c=a.axis,l=o.axis,u=g(a,o,r),d=t.length,f;for(let e=0;e<d;++e){let n=t[e],{[c]:a,[l]:d}=n,p=n._stacks||={};f=p[l]=v(i,u,a),f[s]=d,f._top=y(f,o,!0,r.type),f._bottom=y(f,o,!1,r.type);let m=f._visualValues||={};m[s]=d}}function x(e,t){let n=e.scales;return Object.keys(n).filter(e=>n[e].axis===t).shift()}function S(e,n){return t.createContext(e,{active:!1,dataset:void 0,datasetIndex:n,index:n,mode:`default`,type:`dataset`})}function C(e,n,r){return t.createContext(e,{active:!1,dataIndex:n,parsed:void 0,raw:void 0,element:r,index:n,mode:`default`,type:`data`})}function w(e,t){let n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t||=e._parsed;for(let e of t){let t=e._stacks;if(!t||t[r]===void 0||t[r][n]===void 0)return;delete t[r][n],t[r]._visualValues!==void 0&&t[r]._visualValues[n]!==void 0&&delete t[r]._visualValues[n]}}}var T=e=>e===`reset`||e===`none`,E=(e,t)=>t?e:Object.assign({},e),D=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:f(n,!0),values:null},O=class{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,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(){let e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=h(e.vScale,e),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(e){this.index!==e&&w(this._cachedMeta),this.index=e}linkScales(){let e=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(e,t,n,r)=>e===`x`?t:e===`r`?r:n,a=n.xAxisID=t.valueOrDefault(r.xAxisID,x(e,`x`)),o=n.yAxisID=t.valueOrDefault(r.yAxisID,x(e,`y`)),s=n.rAxisID=t.valueOrDefault(r.rAxisID,x(e,`r`)),c=n.indexAxis,l=n.iAxisID=i(c,a,o,s),u=n.vAxisID=i(c,o,a,s);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(s),n.iScale=this.getScaleForId(l),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){let t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update(`reset`)}_destroy(){let e=this._cachedMeta;this._data&&t.unlistenArrayEvents(this._data,this),e._stacked&&w(e)}_dataCheck(){let e=this.getDataset(),n=e.data||=[],r=this._data;if(t.isObject(n)){let e=this._cachedMeta;this._data=m(n,e)}else if(r!==n){if(r){t.unlistenArrayEvents(r,this);let e=this._cachedMeta;w(e),e._parsed=[]}n&&Object.isExtensible(n)&&t.listenArrayEvents(n,this),this._syncList=[],this._data=n}}addElements(){let e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){let t=this._cachedMeta,n=this.getDataset(),r=!1;this._dataCheck();let i=t._stacked;t._stacked=h(t.vScale,t),t.stack!==n.stack&&(r=!0,w(t),t.stack=n.stack),this._resyncElements(e),(r||i!==t._stacked)&&(b(this,t._parsed),t._stacked=h(t.vScale,t))}configure(){let e=this.chart.config,t=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){let{_cachedMeta:r,_data:i}=this,{iScale:a,_stacked:o}=r,s=a.axis,c=e===0&&n===i.length?!0:r._sorted,l=e>0&&r._parsed[e-1],u,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{f=t.isArray(i[e])?this.parseArrayData(r,i,e,n):t.isObject(i[e])?this.parseObjectData(r,i,e,n):this.parsePrimitiveData(r,i,e,n);let a=()=>d[s]===null||l&&d[s]<l[s];for(u=0;u<n;++u)r._parsed[u+e]=d=f[u],c&&(a()&&(c=!1),l=d);r._sorted=c}o&&b(this,f)}parsePrimitiveData(e,t,n,r){let{iScale:i,vScale:a}=e,o=i.axis,s=a.axis,c=i.getLabels(),l=i===a,u=Array(r),d,f,p;for(d=0,f=r;d<f;++d)p=d+n,u[d]={[o]:l||i.parse(c[p],p),[s]:a.parse(t[p],p)};return u}parseArrayData(e,t,n,r){let{xScale:i,yScale:a}=e,o=Array(r),s,c,l,u;for(s=0,c=r;s<c;++s)l=s+n,u=t[l],o[s]={x:i.parse(u[0],l),y:a.parse(u[1],l)};return o}parseObjectData(e,n,r,i){let{xScale:a,yScale:o}=e,{xAxisKey:s=`x`,yAxisKey:c=`y`}=this._parsing,l=Array(i),u,d,f,p;for(u=0,d=i;u<d;++u)f=u+r,p=n[f],l[u]={x:a.parse(t.resolveObjectKey(p,s),f),y:o.parse(t.resolveObjectKey(p,c),f)};return l}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,n){let r=this.chart,i=this._cachedMeta,a=t[e.axis];return p({keys:f(r,!0),values:t._stacks[e.axis]._visualValues},a,i.index,{mode:n})}updateRangeFromParsed(e,t,n,r){let i=n[t.axis],a=i===null?NaN:i,o=r&&n._stacks[t.axis];r&&o&&(r.values=o,a=p(r,i,this._cachedMeta.index)),e.min=Math.min(e.min,a),e.max=Math.max(e.max,a)}getMinMax(e,n){let r=this._cachedMeta,i=r._parsed,a=r._sorted&&e===r.iScale,o=i.length,s=this._getOtherScale(e),c=D(n,r,this.chart),l={min:1/0,max:-1/0},{min:u,max:d}=_(s),f,p;function m(){p=i[f];let n=p[s.axis];return!t.isNumberFinite(p[e.axis])||u>n||d<n}for(f=0;f<o&&!(!m()&&(this.updateRangeFromParsed(l,e,p,c),a));++f);if(a){for(f=o-1;f>=0;--f)if(!m()){this.updateRangeFromParsed(l,e,p,c);break}}return l}getAllParsedValues(e){let n=this._cachedMeta._parsed,r=[],i,a,o;for(i=0,a=n.length;i<a;++i)o=n[i][e.axis],t.isNumberFinite(o)&&r.push(o);return r}getMaxOverflow(){return!1}getLabelAndValue(e){let t=this._cachedMeta,n=t.iScale,r=t.vScale,i=this.getParsed(e);return{label:n?``+n.getLabelForValue(i[n.axis]):``,value:r?``+r.getLabelForValue(i[r.axis]):``}}_update(e){let n=this._cachedMeta;this.update(e||`default`),n._clip=d(t.valueOrDefault(this.options.clip,u(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){let e=this._ctx,t=this.chart,n=this._cachedMeta,r=n.data||[],i=t.chartArea,a=[],o=this._drawStart||0,s=this._drawCount||r.length-o,c=this.options.drawActiveElementsOnTop,l;for(n.dataset&&n.dataset.draw(e,i,o,s),l=o;l<o+s;++l){let t=r[l];t.hidden||(t.active&&c?a.push(t):t.draw(e,i))}for(l=0;l<a.length;++l)a[l].draw(e,i)}getStyle(e,t){let n=t?`active`:`default`;return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(e||0,n)}getContext(e,t,n){let r=this.getDataset(),i;if(e>=0&&e<this._cachedMeta.data.length){let t=this._cachedMeta.data[e];i=t.$context||=C(this.getContext(),e,t),i.parsed=this.getParsed(e),i.raw=r.data[e],i.index=i.dataIndex=e}else i=this.$context||=S(this.chart.getContext(),this.index),i.dataset=r,i.index=i.datasetIndex=this.index;return i.active=!!t,i.mode=n,i}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,n=`default`,r){let i=n===`active`,a=this._cachedDataOpts,o=e+`-`+n,s=a[o],c=this.enableOptionSharing&&t.defined(r);if(s)return E(s,c);let l=this.chart.config,u=l.datasetElementScopeKeys(this._type,e),d=i?[`${e}Hover`,`hover`,e,``]:[e,``],f=l.getOptionScopes(this.getDataset(),u),p=Object.keys(t.defaults.elements[e]),m=l.resolveNamedOptions(f,p,()=>this.getContext(r,i,n),d);return m.$shared&&(m.$shared=c,a[o]=Object.freeze(E(m,c))),m}_resolveAnimations(e,t,n){let r=this.chart,i=this._cachedDataOpts,a=`animation-${t}`,s=i[a];if(s)return s;let c;if(r.options.animation!==!1){let r=this.chart.config,i=r.datasetAnimationScopeKeys(this._type,t),a=r.getOptionScopes(this.getDataset(),i);c=r.createResolver(a,this.getContext(e,n,t))}let l=new o(r,c&&c.animations);return c&&c._cacheable&&(i[a]=Object.freeze(l)),l}getSharedOptions(e){if(e.$shared)return this._sharedOptions||=Object.assign({},e)}includeOptions(e,t){return!t||T(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){let n=this.resolveDataElementOptions(e,t),r=this._sharedOptions,i=this.getSharedOptions(n),a=this.includeOptions(t,i)||i!==r;return this.updateSharedOptions(i,t,n),{sharedOptions:i,includeOptions:a}}updateElement(e,t,n,r){T(r)?Object.assign(e,n):this._resolveAnimations(t,r).update(e,n)}updateSharedOptions(e,t,n){e&&!T(t)&&this._resolveAnimations(void 0,t).update(e,n)}_setStyle(e,t,n,r){e.active=r;let i=this.getStyle(t,r);this._resolveAnimations(t,n,r).update(e,{options:!r&&this.getSharedOptions(i)||i})}removeHoverStyle(e,t,n){this._setStyle(e,n,`active`,!1)}setHoverStyle(e,t,n){this._setStyle(e,n,`active`,!0)}_removeDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,`active`,!1)}_setDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,`active`,!0)}_resyncElements(e){let t=this._data,n=this._cachedMeta.data;for(let[e,t,n]of this._syncList)this[e](t,n);this._syncList=[];let r=n.length,i=t.length,a=Math.min(i,r);a&&this.parse(0,a),i>r?this._insertElements(r,i-r,e):i<r&&this._removeElements(i,r-i)}_insertElements(e,t,n=!0){let r=this._cachedMeta,i=r.data,a=e+t,o,s=e=>{for(e.length+=t,o=e.length-1;o>=a;o--)e[o]=e[o-t]};for(s(i),o=e;o<a;++o)i[o]=new this.dataElementType;this._parsing&&s(r._parsed),this.parse(e,t),n&&this.updateElements(i,e,t,`reset`)}updateElements(e,t,n,r){}_removeElements(e,t){let n=this._cachedMeta;if(this._parsing){let r=n._parsed.splice(e,t);n._stacked&&w(n,r)}n.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{let[t,n,r]=e;this[t](n,r)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){let e=arguments.length;this._sync([`_insertElements`,this.getDataset().data.length-e,e])}_onDataPop(){this._sync([`_removeElements`,this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync([`_removeElements`,0,1])}_onDataSplice(e,t){t&&this._sync([`_removeElements`,e,t]);let n=arguments.length-2;n&&this._sync([`_insertElements`,e,n])}_onDataUnshift(){this._sync([`_insertElements`,0,arguments.length])}};function k(e,n){if(!e._cache.$bar){let r=e.getMatchingVisibleMetas(n),i=[];for(let t=0,n=r.length;t<n;t++)i=i.concat(r[t].controller.getAllParsedValues(e));e._cache.$bar=t._arrayUnique(i.sort((e,t)=>e-t))}return e._cache.$bar}function A(e){let n=e.iScale,r=k(n,e.type),i=n._length,a,o,s,c,l=()=>{s===32767||s===-32768||(t.defined(c)&&(i=Math.min(i,Math.abs(s-c)||i)),c=s)};for(a=0,o=r.length;a<o;++a)s=n.getPixelForValue(r[a]),l();for(c=void 0,a=0,o=n.ticks.length;a<o;++a)s=n.getPixelForTick(a),l();return i}function j(e,n,r,i){let a=r.barThickness,o,s;return t.isNullOrUndef(a)?(o=n.min*r.categoryPercentage,s=r.barPercentage):(o=a*i,s=1),{chunk:o/i,ratio:s,start:n.pixels[e]-o/2}}function M(e,t,n,r){let i=t.pixels,a=i[e],o=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null,c=n.categoryPercentage;o===null&&(o=a-(s===null?t.end-t.start:s-a)),s===null&&(s=a+a-o);let l=a-(a-Math.min(o,s))/2*c;return{chunk:Math.abs(s-o)/2*c/r,ratio:n.barPercentage,start:l}}function ee(e,t,n,r){let i=n.parse(e[0],r),a=n.parse(e[1],r),o=Math.min(i,a),s=Math.max(i,a),c=o,l=s;Math.abs(o)>Math.abs(s)&&(c=s,l=o),t[n.axis]=l,t._custom={barStart:c,barEnd:l,start:i,end:a,min:o,max:s}}function te(e,n,r,i){return t.isArray(e)?ee(e,n,r,i):n[r.axis]=r.parse(e,i),n}function ne(e,t,n,r){let i=e.iScale,a=e.vScale,o=i.getLabels(),s=i===a,c=[],l,u,d,f;for(l=n,u=n+r;l<u;++l)f=t[l],d={},d[i.axis]=s||i.parse(o[l],l),c.push(te(f,d,a,l));return c}function N(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function P(e,n,r){return e===0?(n.isHorizontal()?1:-1)*(n.min>=r?1:-1):t.sign(e)}function re(e){let t,n,r,i,a;return e.horizontal?(t=e.base>e.x,n=`left`,r=`right`):(t=e.base<e.y,n=`bottom`,r=`top`),t?(i=`end`,a=`start`):(i=`start`,a=`end`),{start:n,end:r,reverse:t,top:i,bottom:a}}function ie(e,t,n,r){let i=t.borderSkipped,a={};if(!i){e.borderSkipped=a;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:o,end:s,reverse:c,top:l,bottom:u}=re(e);i===`middle`&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=l:(n._bottom||0)===r?i=u:(a[ae(u,o,s,c)]=!0,i=l)),a[ae(i,o,s,c)]=!0,e.borderSkipped=a}function ae(e,t,n,r){return r?(e=oe(e,t,n),e=se(e,n,t)):e=se(e,t,n),e}function oe(e,t,n){return e===t?n:e===n?t:e}function se(e,t,n){return e===`start`?t:e===`end`?n:e}function ce(e,{inflateAmount:t},n){e.inflateAmount=t===`auto`?n===1?.33:0:t}var le=class extends O{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(e,t,n,r){return ne(e,t,n,r)}parseArrayData(e,t,n,r){return ne(e,t,n,r)}parseObjectData(e,n,r,i){let{iScale:a,vScale:o}=e,{xAxisKey:s=`x`,yAxisKey:c=`y`}=this._parsing,l=a.axis===`x`?s:c,u=o.axis===`x`?s:c,d=[],f,p,m,h;for(f=r,p=r+i;f<p;++f)h=n[f],m={},m[a.axis]=a.parse(t.resolveObjectKey(h,l),f),d.push(te(t.resolveObjectKey(h,u),m,o,f));return d}updateRangeFromParsed(e,t,n,r){super.updateRangeFromParsed(e,t,n,r);let i=n._custom;i&&t===this._cachedMeta.vScale&&(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(e){let{iScale:t,vScale:n}=this._cachedMeta,r=this.getParsed(e),i=r._custom,a=N(i)?`[`+i.start+`, `+i.end+`]`:``+n.getLabelForValue(r[n.axis]);return{label:``+t.getLabelForValue(r[t.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();let e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){let t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,e)}updateElements(e,n,r,i){let a=i===`reset`,{index:o,_cachedMeta:{vScale:s}}=this,c=s.getBasePixel(),l=s.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,i);for(let p=n;p<n+r;p++){let n=this.getParsed(p),r=a||t.isNullOrUndef(n[s.axis])?{base:c,head:c}:this._calculateBarValuePixels(p),m=this._calculateBarIndexPixels(p,u),h=(n._stacks||{})[s.axis],g={horizontal:l,base:r.base,enableBorderRadius:!h||N(n._custom)||o===h._top||o===h._bottom,x:l?r.head:m.center,y:l?m.center:r.head,height:l?m.size:Math.abs(r.size),width:l?Math.abs(r.size):m.size};f&&(g.options=d||this.resolveDataElementOptions(p,e[p].active?`active`:i));let _=g.options||e[p].options;ie(g,_,h,o),ce(g,_,u.ratio),this.updateElement(e[p],p,g,i)}}_getStacks(e,n){let{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(e=>e.controller.options.grouped),a=r.options.stacked,o=[],s=this._cachedMeta.controller.getParsed(n),c=s&&s[r.axis],l=e=>{let n=e._parsed.find(e=>e[r.axis]===c),i=n&&n[e.vScale.axis];if(t.isNullOrUndef(i)||isNaN(i))return!0};for(let t of i)if(!(n!==void 0&&l(t))&&((a===!1||o.indexOf(t.stack)===-1||a===void 0&&t.stack===void 0)&&o.push(t.stack),t.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,t,n){let r=this._getStacks(e,n),i=t===void 0?-1:r.indexOf(t);return i===-1?r.length-1:i}_getRuler(){let e=this.options,t=this._cachedMeta,n=t.iScale,r=[],i,a;for(i=0,a=t.data.length;i<a;++i)r.push(n.getPixelForValue(this.getParsed(i)[n.axis],i));let o=e.barThickness;return{min:o||A(t),pixels:r,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:e.grouped,ratio:o?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){let{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:a,minBarLength:o}}=this,s=a||0,c=this.getParsed(e),l=c._custom,u=N(l),d=c[n.axis],f=0,p=r?this.applyStack(n,c,r):d,m,h;p!==d&&(f=p-d,p=d),u&&(d=l.barStart,p=l.barEnd-l.barStart,d!==0&&t.sign(d)!==t.sign(l.barEnd)&&(f=0),f+=d);let g=!t.isNullOrUndef(a)&&!u?a:f,_=n.getPixelForValue(g);if(m=this.chart.getDataVisibility(e)?n.getPixelForValue(f+p):_,h=m-_,Math.abs(h)<o){h=P(h,n,s)*o,d===s&&(_-=h/2);let e=n.getPixelForDecimal(0),t=n.getPixelForDecimal(1),a=Math.min(e,t),l=Math.max(e,t);_=Math.max(Math.min(_,l),a),m=_+h,r&&!u&&(c._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(_))}if(_===n.getPixelForValue(s)){let e=t.sign(h)*n.getLineWidthForValue(s)/2;_+=e,h-=e}return{size:h,base:_,head:m,center:m+h/2}}_calculateBarIndexPixels(e,n){let r=n.scale,i=this.options,a=i.skipNull,o=t.valueOrDefault(i.maxBarThickness,1/0),s,c;if(n.grouped){let t=a?this._getStackCount(e):n.stackCount,r=i.barThickness===`flex`?M(e,n,i,t):j(e,n,i,t),l=this._getStackIndex(this.index,this._cachedMeta.stack,a?e:void 0);s=r.start+r.chunk*l+r.chunk/2,c=Math.min(o,r.chunk*r.ratio)}else s=r.getPixelForValue(this.getParsed(e)[r.axis],e),c=Math.min(o,n.min*n.ratio);return{base:s-c/2,head:s+c/2,center:s,size:c}}draw(){let e=this._cachedMeta,t=e.vScale,n=e.data,r=n.length,i=0;for(;i<r;++i)this.getParsed(i)[t.axis]!==null&&!n[i].hidden&&n[i].draw(this._ctx)}},ue=class extends O{static id=`bubble`;static defaults={datasetElementType:!1,dataElementType:`point`,animations:{numbers:{type:`number`,properties:[`x`,`y`,`borderWidth`,`radius`]}}};static overrides={scales:{x:{type:`linear`},y:{type:`linear`}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,t,n,r){let i=super.parsePrimitiveData(e,t,n,r);for(let e=0;e<i.length;e++)i[e]._custom=this.resolveDataElementOptions(e+n).radius;return i}parseArrayData(e,n,r,i){let a=super.parseArrayData(e,n,r,i);for(let e=0;e<a.length;e++){let i=n[r+e];a[e]._custom=t.valueOrDefault(i[2],this.resolveDataElementOptions(e+r).radius)}return a}parseObjectData(e,n,r,i){let a=super.parseObjectData(e,n,r,i);for(let e=0;e<a.length;e++){let i=n[r+e];a[e]._custom=t.valueOrDefault(i&&i.r&&+i.r,this.resolveDataElementOptions(e+r).radius)}return a}getMaxOverflow(){let e=this._cachedMeta.data,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}getLabelAndValue(e){let t=this._cachedMeta,n=this.chart.data.labels||[],{xScale:r,yScale:i}=t,a=this.getParsed(e),o=r.getLabelForValue(a.x),s=i.getLabelForValue(a.y),c=a._custom;return{label:n[e]||``,value:`(`+o+`, `+s+(c?`, `+c:``)+`)`}}update(e){let t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,n,r){let i=r===`reset`,{iScale:a,vScale:o}=this._cachedMeta,{sharedOptions:s,includeOptions:c}=this._getSharedOptions(t,r),l=a.axis,u=o.axis;for(let d=t;d<t+n;d++){let t=e[d],n=!i&&this.getParsed(d),f={},p=f[l]=i?a.getPixelForDecimal(.5):a.getPixelForValue(n[l]),m=f[u]=i?o.getBasePixel():o.getPixelForValue(n[u]);f.skip=isNaN(p)||isNaN(m),c&&(f.options=s||this.resolveDataElementOptions(d,t.active?`active`:r),i&&(f.options.radius=0)),this.updateElement(t,d,f,r)}}resolveDataElementOptions(e,n){let r=this.getParsed(e),i=super.resolveDataElementOptions(e,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));let a=i.radius;return n!==`active`&&(i.radius=0),i.radius+=t.valueOrDefault(r&&r._custom,a),i}};function de(e,n,r){let i=1,a=1,o=0,s=0;if(n<t.TAU){let c=e,l=c+n,u=Math.cos(c),d=Math.sin(c),f=Math.cos(l),p=Math.sin(l),m=(e,n,i)=>t._angleBetween(e,c,l,!0)?1:Math.max(n,n*r,i,i*r),h=(e,n,i)=>t._angleBetween(e,c,l,!0)?-1:Math.min(n,n*r,i,i*r),g=m(0,u,f),_=m(t.HALF_PI,d,p),v=h(t.PI,u,f),y=h(t.PI+t.HALF_PI,d,p);i=(g-v)/2,a=(_-y)/2,o=-(g+v)/2,s=-(_+y)/2}return{ratioX:i,ratioY:a,offsetX:o,offsetY:s}}var F=class extends O{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:e=>e!==`spacing`,_indexable:e=>e!==`spacing`&&!e.startsWith(`borderDash`)&&!e.startsWith(`hoverBorderDash`)};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let t=e.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map((t,i)=>{let a=e.getDatasetMeta(0).controller.getStyle(i);return{text:t,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:r,lineWidth:a.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(i),index:i}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}}};constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){let r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let a=e=>+r[e];if(t.isObject(r[e])){let{key:e=`value`}=this._parsing;a=n=>+t.resolveObjectKey(r[n],e)}let o,s;for(o=e,s=e+n;o<s;++o)i._parsed[o]=a(o)}}_getRotation(){return t.toRadians(this.options.rotation-90)}_getCircumference(){return t.toRadians(this.options.circumference)}_getRotationExtents(){let e=t.TAU,n=-t.TAU;for(let t=0;t<this.chart.data.datasets.length;++t)if(this.chart.isDatasetVisible(t)&&this.chart.getDatasetMeta(t).type===this._type){let r=this.chart.getDatasetMeta(t).controller,i=r._getRotation(),a=r._getCircumference();e=Math.min(e,i),n=Math.max(n,i+a)}return{rotation:e,circumference:n-e}}update(e){let{chartArea:n}=this.chart,r=this._cachedMeta,i=r.data,a=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,o=Math.max((Math.min(n.width,n.height)-a)/2,0),s=Math.min(t.toPercentage(this.options.cutout,o),1),c=this._getRingWeight(this.index),{circumference:l,rotation:u}=this._getRotationExtents(),{ratioX:d,ratioY:f,offsetX:p,offsetY:m}=de(u,l,s),h=(n.width-a)/d,g=(n.height-a)/f,_=Math.max(Math.min(h,g)/2,0),v=t.toDimension(this.options.radius,_),y=(v-Math.max(v*s,0))/this._getVisibleDatasetWeightTotal();this.offsetX=p*v,this.offsetY=m*v,r.total=this.calculateTotal(),this.outerRadius=v-y*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-y*c,0),this.updateElements(i,0,i.length,e)}_circumference(e,n){let r=this.options,i=this._cachedMeta,a=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*a/t.TAU)}updateElements(e,t,n,r){let i=r===`reset`,a=this.chart,o=a.chartArea,s=a.options.animation,c=(o.left+o.right)/2,l=(o.top+o.bottom)/2,u=i&&s.animateScale,d=u?0:this.innerRadius,f=u?0:this.outerRadius,{sharedOptions:p,includeOptions:m}=this._getSharedOptions(t,r),h=this._getRotation(),g;for(g=0;g<t;++g)h+=this._circumference(g,i);for(g=t;g<t+n;++g){let t=this._circumference(g,i),n=e[g],a={x:c+this.offsetX,y:l+this.offsetY,startAngle:h,endAngle:h+t,circumference:t,outerRadius:f,innerRadius:d};m&&(a.options=p||this.resolveDataElementOptions(g,n.active?`active`:r)),h+=t,this.updateElement(n,g,a,r)}}calculateTotal(){let e=this._cachedMeta,t=e.data,n=0,r;for(r=0;r<t.length;r++){let i=e._parsed[r];i!==null&&!isNaN(i)&&this.chart.getDataVisibility(r)&&!t[r].hidden&&(n+=Math.abs(i))}return n}calculateCircumference(e){let n=this._cachedMeta.total;return n>0&&!isNaN(e)?t.TAU*(Math.abs(e)/n):0}getLabelAndValue(e){let n=this._cachedMeta,r=this.chart,i=r.data.labels||[],a=t.formatNumber(n._parsed[e],r.options.locale);return{label:i[e]||``,value:a}}getMaxBorderWidth(e){let t=0,n=this.chart,r,i,a,o,s;if(!e){for(r=0,i=n.data.datasets.length;r<i;++r)if(n.isDatasetVisible(r)){a=n.getDatasetMeta(r),e=a.data,o=a.controller;break}}if(!e)return 0;for(r=0,i=e.length;r<i;++r)s=o.resolveDataElementOptions(r),s.borderAlign!==`inner`&&(t=Math.max(t,s.borderWidth||0,s.hoverBorderWidth||0));return t}getMaxOffset(e){let t=0;for(let n=0,r=e.length;n<r;++n){let e=this.resolveDataElementOptions(n);t=Math.max(t,e.offset||0,e.hoverOffset||0)}return t}_getRingWeightOffset(e){let t=0;for(let n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(t+=this._getRingWeight(n));return t}_getRingWeight(e){return Math.max(t.valueOrDefault(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}},fe=class extends O{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(e){let n=this._cachedMeta,{dataset:r,data:i=[],_dataset:a}=n,o=this.chart._animationsDisabled,{start:s,count:c}=t._getStartAndCountOfVisiblePoints(n,i,o);this._drawStart=s,this._drawCount=c,t._scaleRangesChanged(n)&&(s=0,c=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!a._decimated,r.points=i;let l=this.resolveDatasetElementOptions(e);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(r,void 0,{animated:!o,options:l},e),this.updateElements(i,s,c,e)}updateElements(e,n,r,i){let a=i===`reset`,{iScale:o,vScale:s,_stacked:c,_dataset:l}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,i),f=o.axis,p=s.axis,{spanGaps:m,segment:h}=this.options,g=t.isNumber(m)?m:1/0,_=this.chart._animationsDisabled||a||i===`none`,v=n+r,y=e.length,b=n>0&&this.getParsed(n-1);for(let r=0;r<y;++r){let m=e[r],y=_?m:{};if(r<n||r>=v){y.skip=!0;continue}let x=this.getParsed(r),S=t.isNullOrUndef(x[p]),C=y[f]=o.getPixelForValue(x[f],r),w=y[p]=a||S?s.getBasePixel():s.getPixelForValue(c?this.applyStack(s,x,c):x[p],r);y.skip=isNaN(C)||isNaN(w)||S,y.stop=r>0&&Math.abs(x[f]-b[f])>g,h&&(y.parsed=x,y.raw=l.data[r]),d&&(y.options=u||this.resolveDataElementOptions(r,m.active?`active`:i)),_||this.updateElement(m,r,y,i),b=x}}getMaxOverflow(){let e=this._cachedMeta,t=e.dataset,n=t.options&&t.options.borderWidth||0,r=e.data||[];if(!r.length)return n;let i=r[0].size(this.resolveDataElementOptions(0)),a=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(n,i,a)/2}draw(){let e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}},pe=class extends O{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(e){let t=e.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map((t,i)=>{let a=e.getDatasetMeta(0).controller.getStyle(i);return{text:t,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:r,lineWidth:a.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(i),index:i}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}},scales:{r:{type:`radialLinear`,angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){let n=this._cachedMeta,r=this.chart,i=r.data.labels||[],a=t.formatNumber(n._parsed[e].r,r.options.locale);return{label:i[e]||``,value:a}}parseObjectData(e,n,r,i){return t._parseObjectDataRadialScale.bind(this)(e,n,r,i)}update(e){let t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){let e=this._cachedMeta,t={min:1/0,max:-1/0};return e.data.forEach((e,n)=>{let r=this.getParsed(n).r;!isNaN(r)&&this.chart.getDataVisibility(n)&&(r<t.min&&(t.min=r),r>t.max&&(t.max=r))}),t}_updateRadius(){let e=this.chart,t=e.chartArea,n=e.options,r=Math.min(t.right-t.left,t.bottom-t.top),i=Math.max(r/2,0),a=(i-Math.max(n.cutoutPercentage?i/100*n.cutoutPercentage:1,0))/e.getVisibleDatasetCount();this.outerRadius=i-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(e,n,r,i){let a=i===`reset`,o=this.chart,s=o.options.animation,c=this._cachedMeta.rScale,l=c.xCenter,u=c.yCenter,d=c.getIndexAngle(0)-.5*t.PI,f=d,p,m=360/this.countVisibleElements();for(p=0;p<n;++p)f+=this._computeAngle(p,i,m);for(p=n;p<n+r;p++){let t=e[p],n=f,r=f+this._computeAngle(p,i,m),h=o.getDataVisibility(p)?c.getDistanceFromCenterForValue(this.getParsed(p).r):0;f=r,a&&(s.animateScale&&(h=0),s.animateRotate&&(n=r=d));let g={x:l,y:u,innerRadius:0,outerRadius:h,startAngle:n,endAngle:r,options:this.resolveDataElementOptions(p,t.active?`active`:i)};this.updateElement(t,p,g,i)}}countVisibleElements(){let e=this._cachedMeta,t=0;return e.data.forEach((e,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&t++}),t}_computeAngle(e,n,r){return this.chart.getDataVisibility(e)?t.toRadians(this.resolveDataElementOptions(e,n).angle||r):0}},me=class extends F{static id=`pie`;static defaults={cutout:0,rotation:0,circumference:360,radius:`100%`}},he=class extends O{static id=`radar`;static defaults={datasetElementType:`line`,dataElementType:`point`,indexAxis:`r`,showLine:!0,elements:{line:{fill:`start`}}};static overrides={aspectRatio:1,scales:{r:{type:`radialLinear`}}};getLabelAndValue(e){let t=this._cachedMeta.vScale,n=this.getParsed(e);return{label:t.getLabels()[e],value:``+t.getLabelForValue(n[t.axis])}}parseObjectData(e,n,r,i){return t._parseObjectDataRadialScale.bind(this)(e,n,r,i)}update(e){let t=this._cachedMeta,n=t.dataset,r=t.data||[],i=t.iScale.getLabels();if(n.points=r,e!==`resize`){let t=this.resolveDatasetElementOptions(e);this.options.showLine||(t.borderWidth=0);let a={_loop:!0,_fullLoop:i.length===r.length,options:t};this.updateElement(n,void 0,a,e)}this.updateElements(r,0,r.length,e)}updateElements(e,t,n,r){let i=this._cachedMeta.rScale,a=r===`reset`;for(let o=t;o<t+n;o++){let t=e[o],n=this.resolveDataElementOptions(o,t.active?`active`:r),s=i.getPointPositionForValue(o,this.getParsed(o).r),c=a?i.xCenter:s.x,l=a?i.yCenter:s.y,u={x:c,y:l,angle:s.angle,skip:isNaN(c)||isNaN(l),options:n};this.updateElement(t,o,u,r)}}},ge=class extends O{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(e){let t=this._cachedMeta,n=this.chart.data.labels||[],{xScale:r,yScale:i}=t,a=this.getParsed(e),o=r.getLabelForValue(a.x),s=i.getLabelForValue(a.y);return{label:n[e]||``,value:`(`+o+`, `+s+`)`}}update(e){let n=this._cachedMeta,{data:r=[]}=n,i=this.chart._animationsDisabled,{start:a,count:o}=t._getStartAndCountOfVisiblePoints(n,r,i);if(this._drawStart=a,this._drawCount=o,t._scaleRangesChanged(n)&&(a=0,o=r.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:t,_dataset:a}=n;t._chart=this.chart,t._datasetIndex=this.index,t._decimated=!!a._decimated,t.points=r;let o=this.resolveDatasetElementOptions(e);o.segment=this.options.segment,this.updateElement(t,void 0,{animated:!i,options:o},e)}else this.datasetElementType&&=(delete n.dataset,!1);this.updateElements(r,a,o,e)}addElements(){let{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement(`line`)),super.addElements()}updateElements(e,n,r,i){let a=i===`reset`,{iScale:o,vScale:s,_stacked:c,_dataset:l}=this._cachedMeta,u=this.resolveDataElementOptions(n,i),d=this.getSharedOptions(u),f=this.includeOptions(i,d),p=o.axis,m=s.axis,{spanGaps:h,segment:g}=this.options,_=t.isNumber(h)?h:1/0,v=this.chart._animationsDisabled||a||i===`none`,y=n>0&&this.getParsed(n-1);for(let u=n;u<n+r;++u){let n=e[u],r=this.getParsed(u),h=v?n:{},b=t.isNullOrUndef(r[m]),x=h[p]=o.getPixelForValue(r[p],u),S=h[m]=a||b?s.getBasePixel():s.getPixelForValue(c?this.applyStack(s,r,c):r[m],u);h.skip=isNaN(x)||isNaN(S)||b,h.stop=u>0&&Math.abs(r[p]-y[p])>_,g&&(h.parsed=r,h.raw=l.data[u]),f&&(h.options=d||this.resolveDataElementOptions(u,n.active?`active`:i)),v||this.updateElement(n,u,h,i),y=r}this.updateSharedOptions(d,i,u)}getMaxOverflow(){let e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}let n=e.dataset,r=n.options&&n.options.borderWidth||0;if(!t.length)return r;let i=t[0].size(this.resolveDataElementOptions(0)),a=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(r,i,a)/2}},_e=Object.freeze({__proto__:null,BarController:le,BubbleController:ue,DoughnutController:F,LineController:fe,PieController:me,PolarAreaController:pe,RadarController:he,ScatterController:ge});function I(){throw Error(`This method is not implemented: Check that a complete date adapter is provided.`)}var ve={_date:class e{static override(t){Object.assign(e.prototype,t)}options;constructor(e){this.options=e||{}}init(){}formats(){return I()}parse(){return I()}format(){return I()}add(){return I()}diff(){return I()}startOf(){return I()}endOf(){return I()}}};function ye(e,n,r,i){let{controller:a,data:o,_sorted:s}=e,c=a._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(c&&n===c.axis&&n!==`r`&&s&&o.length){let s=c._reversePixels?t._rlookupByKey:t._lookupByKey;if(i){if(a._sharedOptions){let e=o[0],t=typeof e.getRange==`function`&&e.getRange(n);if(t){let e=s(o,n,r-t),i=s(o,n,r+t);return{lo:e.lo,hi:i.hi}}}}else{let i=s(o,n,r);if(l){let{vScale:n}=a._cachedMeta,{_parsed:r}=e,o=r.slice(0,i.lo+1).reverse().findIndex(e=>!t.isNullOrUndef(e[n.axis]));i.lo-=Math.max(0,o);let s=r.slice(i.hi).findIndex(e=>!t.isNullOrUndef(e[n.axis]));i.hi+=Math.max(0,s)}return i}}return{lo:0,hi:o.length-1}}function be(e,t,n,r,i){let a=e.getSortedVisibleDatasetMetas(),o=n[t];for(let e=0,n=a.length;e<n;++e){let{index:n,data:s}=a[e],{lo:c,hi:l}=ye(a[e],t,o,i);for(let e=c;e<=l;++e){let t=s[e];t.skip||r(t,n,e)}}}function xe(e){let t=e.indexOf(`x`)!==-1,n=e.indexOf(`y`)!==-1;return function(e,r){let i=t?Math.abs(e.x-r.x):0,a=n?Math.abs(e.y-r.y):0;return Math.sqrt(i**2+a**2)}}function Se(e,n,r,i,a){let o=[];return!a&&!e.isPointInArea(n)||be(e,r,n,function(r,s,c){!a&&!t._isPointInArea(r,e.chartArea,0)||r.inRange(n.x,n.y,i)&&o.push({element:r,datasetIndex:s,index:c})},!0),o}function Ce(e,n,r,i){let a=[];function o(e,r,o){let{startAngle:s,endAngle:c}=e.getProps([`startAngle`,`endAngle`],i),{angle:l}=t.getAngleFromPoint(e,{x:n.x,y:n.y});t._angleBetween(l,s,c)&&a.push({element:e,datasetIndex:r,index:o})}return be(e,r,n,o),a}function we(e,t,n,r,i,a){let o=[],s=xe(n),c=1/0;function l(n,l,u){let d=n.inRange(t.x,t.y,i);if(r&&!d)return;let f=n.getCenterPoint(i);if(!(a||e.isPointInArea(f))&&!d)return;let p=s(t,f);p<c?(o=[{element:n,datasetIndex:l,index:u}],c=p):p===c&&o.push({element:n,datasetIndex:l,index:u})}return be(e,n,t,l),o}function Te(e,t,n,r,i,a){return!a&&!e.isPointInArea(t)?[]:n===`r`&&!r?Ce(e,t,n,i):we(e,t,n,r,i,a)}function Ee(e,t,n,r,i){let a=[],o=n===`x`?`inXRange`:`inYRange`,s=!1;return be(e,n,t,(e,r,c)=>{e[o]&&e[o](t[n],i)&&(a.push({element:e,datasetIndex:r,index:c}),s||=e.inRange(t.x,t.y,i))}),r&&!s?[]:a}var De={evaluateInteractionItems:be,modes:{index(e,n,r,i){let a=t.getRelativePosition(n,e),o=r.axis||`x`,s=r.includeInvisible||!1,c=r.intersect?Se(e,a,o,i,s):Te(e,a,o,!1,i,s),l=[];return c.length?(e.getSortedVisibleDatasetMetas().forEach(e=>{let t=c[0].index,n=e.data[t];n&&!n.skip&&l.push({element:n,datasetIndex:e.index,index:t})}),l):[]},dataset(e,n,r,i){let a=t.getRelativePosition(n,e),o=r.axis||`xy`,s=r.includeInvisible||!1,c=r.intersect?Se(e,a,o,i,s):Te(e,a,o,!1,i,s);if(c.length>0){let t=c[0].datasetIndex,n=e.getDatasetMeta(t).data;c=[];for(let e=0;e<n.length;++e)c.push({element:n[e],datasetIndex:t,index:e})}return c},point(e,n,r,i){return Se(e,t.getRelativePosition(n,e),r.axis||`xy`,i,r.includeInvisible||!1)},nearest(e,n,r,i){let a=t.getRelativePosition(n,e),o=r.axis||`xy`,s=r.includeInvisible||!1;return Te(e,a,o,r.intersect,i,s)},x(e,n,r,i){return Ee(e,t.getRelativePosition(n,e),`x`,r.intersect,i)},y(e,n,r,i){return Ee(e,t.getRelativePosition(n,e),`y`,r.intersect,i)}}},Oe=[`left`,`top`,`right`,`bottom`];function je(e,t){return e.filter(e=>e.pos===t)}function Me(e,t){return e.filter(e=>Oe.indexOf(e.pos)===-1&&e.box.axis===t)}function Ne(e,t){return e.sort((e,n)=>{let r=t?n:e,i=t?e:n;return r.weight===i.weight?r.index-i.index:r.weight-i.weight})}function L(e){let t=[],n,r,i,a,o,s;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:a,options:{stack:o,stackWeight:s=1}}=i,t.push({index:n,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&a+o,stackWeight:s});return t}function Pe(e){let t={};for(let n of e){let{stack:e,pos:r,stackWeight:i}=n;if(!e||!Oe.includes(r))continue;let a=t[e]||(t[e]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=i}return t}function Fe(e,t){let n=Pe(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t,a,o,s;for(a=0,o=e.length;a<o;++a){s=e[a];let{fullSize:o}=s.box,c=n[s.stack],l=c&&s.stackWeight/c.weight;s.horizontal?(s.width=l?l*r:o&&t.availableWidth,s.height=i):(s.width=r,s.height=l?l*i:o&&t.availableHeight)}return n}function Ie(e){let t=L(e),n=Ne(t.filter(e=>e.box.fullSize),!0),r=Ne(je(t,`left`),!0),i=Ne(je(t,`right`)),a=Ne(je(t,`top`),!0),o=Ne(je(t,`bottom`)),s=Me(t,`x`),c=Me(t,`y`);return{fullSize:n,leftAndTop:r.concat(a),rightAndBottom:i.concat(c).concat(o).concat(s),chartArea:je(t,`chartArea`),vertical:r.concat(i).concat(c),horizontal:a.concat(o).concat(s)}}function Le(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function Re(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function ze(e,n,r,i){let{pos:a,box:o}=r,s=e.maxPadding;if(!t.isObject(a)){r.size&&(e[a]-=r.size);let t=i[r.stack]||{size:0,count:1};t.size=Math.max(t.size,r.horizontal?o.height:o.width),r.size=t.size/t.count,e[a]+=r.size}o.getPadding&&Re(s,o.getPadding());let c=Math.max(0,n.outerWidth-Le(s,e,`left`,`right`)),l=Math.max(0,n.outerHeight-Le(s,e,`top`,`bottom`)),u=c!==e.w,d=l!==e.h;return e.w=c,e.h=l,r.horizontal?{same:u,other:d}:{same:d,other:u}}function Be(e){let t=e.maxPadding;function n(n){let r=Math.max(t[n]-e[n],0);return e[n]+=r,r}e.y+=n(`top`),e.x+=n(`left`),n(`right`),n(`bottom`)}function Ve(e,t){let n=t.maxPadding;function r(e){let r={left:0,top:0,right:0,bottom:0};return e.forEach(e=>{r[e]=Math.max(t[e],n[e])}),r}return r(e?[`left`,`right`]:[`top`,`bottom`])}function He(e,t,n,r){let i=[],a,o,s,c,l,u;for(a=0,o=e.length,l=0;a<o;++a){s=e[a],c=s.box,c.update(s.width||t.w,s.height||t.h,Ve(s.horizontal,t));let{same:o,other:d}=ze(t,n,s,r);l|=o&&i.length,u||=d,c.fullSize||i.push(s)}return l&&He(i,t,n,r)||u}function Ue(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function We(e,n,r,i){let a=r.padding,{x:o,y:s}=n;for(let c of e){let e=c.box,l=i[c.stack]||{count:1,placed:0,weight:1},u=c.stackWeight/l.weight||1;if(c.horizontal){let i=n.w*u,o=l.size||e.height;t.defined(l.start)&&(s=l.start),e.fullSize?Ue(e,a.left,s,r.outerWidth-a.right-a.left,o):Ue(e,n.left+l.placed,s,i,o),l.start=s,l.placed+=i,s=e.bottom}else{let i=n.h*u,s=l.size||e.width;t.defined(l.start)&&(o=l.start),e.fullSize?Ue(e,o,a.top,s,r.outerHeight-a.bottom-a.top):Ue(e,o,n.top+l.placed,s,i),l.start=o,l.placed+=i,o=e.right}}n.x=o,n.y=s}var R={addBox(e,t){e.boxes||=[],t.fullSize=t.fullSize||!1,t.position=t.position||`top`,t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},e.boxes.push(t)},removeBox(e,t){let n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,n,r,i){if(!e)return;let a=t.toPadding(e.options.layout.padding),o=Math.max(n-a.width,0),s=Math.max(r-a.height,0),c=Ie(e.boxes),l=c.vertical,u=c.horizontal;t.each(e.boxes,e=>{typeof e.beforeLayout==`function`&&e.beforeLayout()});let d=l.reduce((e,t)=>t.box.options&&t.box.options.display===!1?e:e+1,0)||1,f=Object.freeze({outerWidth:n,outerHeight:r,padding:a,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/d,hBoxMaxHeight:s/2}),p=Object.assign({},a);Re(p,t.toPadding(i));let m=Object.assign({maxPadding:p,w:o,h:s,x:a.left,y:a.top},a),h=Fe(l.concat(u),f);He(c.fullSize,m,f,h),He(l,m,f,h),He(u,m,f,h)&&He(l,m,f,h),Be(m),We(c.leftAndTop,m,f,h),m.x+=m.w,m.y+=m.h,We(c.rightAndBottom,m,f,h),e.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},t.each(c.chartArea,t=>{let n=t.box;Object.assign(n,e.chartArea),n.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}},Ge=class{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,r){return t=Math.max(0,t||e.width),n||=e.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}isAttached(e){return!0}updateConfig(e){}},z=class extends Ge{acquireContext(e){return e&&e.getContext&&e.getContext(`2d`)||null}updateConfig(e){e.options.animation=!1}},B=`$chartjs`,Ke={touchstart:`mousedown`,touchmove:`mousemove`,touchend:`mouseup`,pointerenter:`mouseenter`,pointerdown:`mousedown`,pointermove:`mousemove`,pointerup:`mouseup`,pointerleave:`mouseout`,pointerout:`mouseout`},V=e=>e===null||e===``;function qe(e,n){let r=e.style,i=e.getAttribute(`height`),a=e.getAttribute(`width`);if(e[B]={initial:{height:i,width:a,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||`block`,r.boxSizing=r.boxSizing||`border-box`,V(a)){let n=t.readUsedSize(e,`width`);n!==void 0&&(e.width=n)}if(V(i))if(e.style.height===``)e.height=e.width/(n||2);else{let n=t.readUsedSize(e,`height`);n!==void 0&&(e.height=n)}return e}var Je=t.supportsEventListenerOptions?{passive:!0}:!1;function Ye(e,t,n){e&&e.addEventListener(t,n,Je)}function H(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,Je)}function Xe(e,n){let r=Ke[e.type]||e.type,{x:i,y:a}=t.getRelativePosition(e,n);return{type:r,chart:n,native:e,x:i===void 0?null:i,y:a===void 0?null:a}}function U(e,t){for(let n of e)if(n===t||n.contains(t))return!0}function W(e,t,n){let r=e.canvas,i=new MutationObserver(e=>{let t=!1;for(let n of e)t||=U(n.addedNodes,r),t&&=!U(n.removedNodes,r);t&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function G(e,t,n){let r=e.canvas,i=new MutationObserver(e=>{let t=!1;for(let n of e)t||=U(n.removedNodes,r),t&&=!U(n.addedNodes,r);t&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}var K=new Map,Ze=0;function Qe(){let e=window.devicePixelRatio;e!==Ze&&(Ze=e,K.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function $e(e,t){K.size||window.addEventListener(`resize`,Qe),K.set(e,t)}function et(e){K.delete(e),K.size||window.removeEventListener(`resize`,Qe)}function tt(e,n,r){let i=e.canvas,a=i&&t._getParentNode(i);if(!a)return;let o=t.throttled((e,t)=>{let n=a.clientWidth;r(e,t),n<a.clientWidth&&r()},window),s=new ResizeObserver(e=>{let t=e[0],n=t.contentRect.width,r=t.contentRect.height;n===0&&r===0||o(n,r)});return s.observe(a),$e(e,o),s}function nt(e,t,n){n&&n.disconnect(),t===`resize`&&et(e)}function rt(e,n,r){let i=e.canvas,a=t.throttled(t=>{e.ctx!==null&&r(Xe(t,e))},e);return Ye(i,n,a),a}var it=class extends Ge{acquireContext(e,t){let n=e&&e.getContext&&e.getContext(`2d`);return n&&n.canvas===e?(qe(e,t),n):null}releaseContext(e){let n=e.canvas;if(!n[B])return!1;let r=n[B].initial;[`height`,`width`].forEach(e=>{let i=r[e];t.isNullOrUndef(i)?n.removeAttribute(e):n.setAttribute(e,i)});let i=r.style||{};return Object.keys(i).forEach(e=>{n.style[e]=i[e]}),n.width=n.width,delete n[B],!0}addEventListener(e,t,n){this.removeEventListener(e,t);let r=e.$proxies||={};r[t]=({attach:W,detach:G,resize:tt}[t]||rt)(e,t,n)}removeEventListener(e,t){let n=e.$proxies||={},r=n[t];r&&(({attach:nt,detach:nt,resize:nt}[t]||H)(e,t,r),n[t]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,r,i){return t.getMaximumSize(e,n,r,i)}isAttached(e){let n=e&&t._getParentNode(e);return!!(n&&n.isConnected)}};function at(e){return!t._isDomSupported()||typeof OffscreenCanvas<`u`&&e instanceof OffscreenCanvas?z:it}var q=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){let{x:t,y:n}=this.getProps([`x`,`y`],e);return{x:t,y:n}}hasValue(){return t.isNumber(this.x)&&t.isNumber(this.y)}getProps(e,t){let n=this.$animations;if(!t||!n)return this;let r={};return e.forEach(e=>{r[e]=n[e]&&n[e].active()?n[e]._to:this[e]}),r}};function ot(e,n){let r=e.options.ticks,i=st(e),a=Math.min(r.maxTicksLimit||i,i),o=r.major.enabled?lt(n):[],s=o.length,c=o[0],l=o[s-1],u=[];if(s>a)return ut(n,u,o,s/a),u;let d=ct(o,n,a);if(s>0){let e,r,i=s>1?Math.round((l-c)/(s-1)):null;for(dt(n,u,d,t.isNullOrUndef(i)?0:c-i,c),e=0,r=s-1;e<r;e++)dt(n,u,d,o[e],o[e+1]);return dt(n,u,d,l,t.isNullOrUndef(i)?n.length:l+i),u}return dt(n,u,d),u}function st(e){let t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function ct(e,n,r){let i=ft(e),a=n.length/r;if(!i)return Math.max(a,1);let o=t._factorize(i);for(let e=0,t=o.length-1;e<t;e++){let t=o[e];if(t>a)return t}return Math.max(a,1)}function lt(e){let t=[],n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function ut(e,t,n,r){let i=0,a=n[0],o;for(r=Math.ceil(r),o=0;o<e.length;o++)o===a&&(t.push(e[o]),i++,a=n[i*r])}function dt(e,n,r,i,a){let o=t.valueOrDefault(i,0),s=Math.min(t.valueOrDefault(a,e.length),e.length),c=0,l,u,d;for(r=Math.ceil(r),a&&(l=a-i,r=l/Math.floor(l/r)),d=o;d<0;)c++,d=Math.round(o+c*r);for(u=Math.max(o,0);u<s;u++)u===d&&(n.push(e[u]),c++,d=Math.round(o+c*r))}function ft(e){let t=e.length,n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}var pt=e=>e===`left`?`right`:e===`right`?`left`:e,mt=(e,t,n)=>t===`top`||t===`left`?e[t]+n:e[t]-n,ht=(e,t)=>Math.min(t||e,e);function gt(e,t){let n=[],r=e.length/t,i=e.length,a=0;for(;a<i;a+=r)n.push(e[Math.floor(a)]);return n}function _t(e,t,n){let r=e.ticks.length,i=Math.min(t,r-1),a=e._startPixel,o=e._endPixel,s=1e-6,c=e.getPixelForTick(i),l;if(!(n&&(l=r===1?Math.max(c-a,o-c):t===0?(e.getPixelForTick(1)-c)/2:(c-e.getPixelForTick(i-1))/2,c+=i<t?l:-l,c<a-s||c>o+s)))return c}function vt(e,n){t.each(e,e=>{let t=e.gc,r=t.length/2,i;if(r>n){for(i=0;i<r;++i)delete e.data[t[i]];t.splice(0,r)}})}function yt(e){return e.drawTicks?e.tickLength:0}function bt(e,n){if(!e.display)return 0;let r=t.toFont(e.font,n),i=t.toPadding(e.padding);return(t.isArray(e.text)?e.text.length:1)*r.lineHeight+i.height}function xt(e,n){return t.createContext(e,{scale:n,type:`scale`})}function St(e,n,r){return t.createContext(e,{tick:r,index:n,type:`tick`})}function Ct(e,n,r){let i=t._toLeftRightCenter(e);return(r&&n!==`right`||!r&&n===`right`)&&(i=pt(i)),i}function wt(e,n,r,i){let{top:a,left:o,bottom:s,right:c,chart:l}=e,{chartArea:u,scales:d}=l,f=0,p,m,h,g=s-a,_=c-o;if(e.isHorizontal()){if(m=t._alignStartEnd(i,o,c),t.isObject(r)){let e=Object.keys(r)[0],t=r[e];h=d[e].getPixelForValue(t)+g-n}else h=r===`center`?(u.bottom+u.top)/2+g-n:mt(e,r,n);p=c-o}else{if(t.isObject(r)){let e=Object.keys(r)[0],t=r[e];m=d[e].getPixelForValue(t)-_+n}else m=r===`center`?(u.left+u.right)/2-_+n:mt(e,r,n);h=t._alignStartEnd(i,s,a),f=r===`left`?-t.HALF_PI:t.HALF_PI}return{titleX:m,titleY:h,maxWidth:p,rotation:f}}var Tt=class e extends q{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.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(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return e=t.finiteOrDefault(e,1/0),n=t.finiteOrDefault(n,-1/0),r=t.finiteOrDefault(r,1/0),i=t.finiteOrDefault(i,-1/0),{min:t.finiteOrDefault(e,r),max:t.finiteOrDefault(n,i),minDefined:t.isNumberFinite(e),maxDefined:t.isNumberFinite(n)}}getMinMax(e){let{min:n,max:r,minDefined:i,maxDefined:a}=this.getUserBounds(),o;if(i&&a)return{min:n,max:r};let s=this.getMatchingVisibleMetas();for(let t=0,c=s.length;t<c;++t)o=s[t].controller.getMinMax(this,e),i||(n=Math.min(n,o.min)),a||(r=Math.max(r,o.max));return n=a&&n>r?r:n,r=i&&n>r?n:r,{min:t.finiteOrDefault(n,t.finiteOrDefault(r,n)),max:t.finiteOrDefault(r,t.finiteOrDefault(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(){let e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||=this._computeLabelItems(e)}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){t.callback(this.options.beforeUpdate,[this])}update(e,n,r){let{beginAtZero:i,grace:a,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||=(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=t._addGrace(this,a,i),!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let c=s<this.ticks.length;this._convertTicksToLabels(c?gt(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source===`auto`)&&(this.ticks=ot(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,t,n;this.isHorizontal()?(t=this.left,n=this.right):(t=this.top,n=this.bottom,e=!e),this._startPixel=t,this._endPixel=n,this._reversePixels=e,this._length=n-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){t.callback(this.options.afterUpdate,[this])}beforeSetDimensions(){t.callback(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(){t.callback(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),t.callback(this.options[e],[this])}beforeDataLimits(){this._callHooks(`beforeDataLimits`)}determineDataLimits(){}afterDataLimits(){this._callHooks(`afterDataLimits`)}beforeBuildTicks(){this._callHooks(`beforeBuildTicks`)}buildTicks(){return[]}afterBuildTicks(){this._callHooks(`afterBuildTicks`)}beforeTickToLabelConversion(){t.callback(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){let n=this.options.ticks,r,i,a;for(r=0,i=e.length;r<i;r++)a=e[r],a.label=t.callback(n.callback,[a.value,r,e],this)}afterTickToLabelConversion(){t.callback(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){t.callback(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let e=this.options,n=e.ticks,r=ht(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,a=n.maxRotation,o=i,s,c,l;if(!this._isVisible()||!n.display||i>=a||r<=1||!this.isHorizontal()){this.labelRotation=i;return}let u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,p=t._limitValue(this.chart.width-d,0,this.maxWidth);s=e.offset?this.maxWidth/r:p/(r-1),d+6>s&&(s=p/(r-(e.offset?.5:1)),c=this.maxHeight-yt(e.grid)-n.padding-bt(e.title,this.chart.options.font),l=Math.sqrt(d*d+f*f),o=t.toDegrees(Math.min(Math.asin(t._limitValue((u.highest.height+6)/s,-1,1)),Math.asin(t._limitValue(c/l,-1,1))-Math.asin(t._limitValue(f/l,-1,1)))),o=Math.max(i,Math.min(a,o))),this.labelRotation=o}afterCalculateLabelRotation(){t.callback(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){t.callback(this.options.beforeFit,[this])}fit(){let e={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:a}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){let o=bt(i,n.options.font);if(s?(e.width=this.maxWidth,e.height=yt(a)+o):(e.height=this.maxHeight,e.width=yt(a)+o),r.display&&this.ticks.length){let{first:n,last:i,widest:a,highest:o}=this._getLabelSizes(),c=r.padding*2,l=t.toRadians(this.labelRotation),u=Math.cos(l),d=Math.sin(l);if(s){let t=r.mirror?0:d*a.width+u*o.height;e.height=Math.min(this.maxHeight,e.height+t+c)}else{let t=r.mirror?0:u*a.width+d*o.height;e.width=Math.min(this.maxWidth,e.width+t+c)}this._calculatePadding(n,i,d,u)}}this._handleMargins(),s?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,n,r){let{ticks:{align:i,padding:a},position:o}=this.options,s=this.labelRotation!==0,c=o!==`top`&&this.axis===`x`;if(this.isHorizontal()){let o=this.getPixelForTick(0)-this.left,l=this.right-this.getPixelForTick(this.ticks.length-1),u=0,d=0;s?c?(u=r*e.width,d=n*t.height):(u=n*e.height,d=r*t.width):i===`start`?d=t.width:i===`end`?u=e.width:i!==`inner`&&(u=e.width/2,d=t.width/2),this.paddingLeft=Math.max((u-o+a)*this.width/(this.width-o),0),this.paddingRight=Math.max((d-l+a)*this.width/(this.width-l),0)}else{let n=t.height/2,r=e.height/2;i===`start`?(n=0,r=e.height):i===`end`&&(n=t.height,r=0),this.paddingTop=n+a,this.paddingBottom=r+a}}_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(){t.callback(this.options.afterFit,[this])}isHorizontal(){let{axis:e,position:t}=this.options;return t===`top`||t===`bottom`||e===`x`}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,r;for(n=0,r=e.length;n<r;n++)t.isNullOrUndef(e[n].label)&&(e.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){let t=this.options.ticks.sampleSize,n=this.ticks;t<n.length&&(n=gt(n,t)),this._labelSizes=e=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,r){let{ctx:i,_longestTextCache:a}=this,o=[],s=[],c=Math.floor(n/ht(n,r)),l=0,u=0,d,f,p,m,h,g,_,v,y,b,x;for(d=0;d<n;d+=c){if(m=e[d].label,h=this._resolveTickFontOptions(d),i.font=g=h.string,_=a[g]=a[g]||{data:{},gc:[]},v=h.lineHeight,y=b=0,!t.isNullOrUndef(m)&&!t.isArray(m))y=t._measureText(i,_.data,_.gc,y,m),b=v;else if(t.isArray(m))for(f=0,p=m.length;f<p;++f)x=m[f],!t.isNullOrUndef(x)&&!t.isArray(x)&&(y=t._measureText(i,_.data,_.gc,y,x),b+=v);o.push(y),s.push(b),l=Math.max(y,l),u=Math.max(b,u)}vt(a,n);let S=o.indexOf(l),C=s.indexOf(u),w=e=>({width:o[e]||0,height:s[e]||0});return{first:w(0),last:w(n-1),widest:w(S),highest:w(C),widths:o,heights:s}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){let t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);let n=this._startPixel+e*this._length;return t._int16Range(this._alignToPixels?t._alignPixel(this.chart,n,0):n)}getDecimalForPixel(e){let t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){let t=this.ticks||[];if(e>=0&&e<t.length){let n=t[e];return n.$context||=St(this.getContext(),e,n)}return this.$context||=xt(this.chart.getContext(),this)}_tickSize(){let e=this.options.ticks,n=t.toRadians(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),a=this._getLabelSizes(),o=e.autoSkipPadding||0,s=a?a.widest.width+o:0,c=a?a.highest.height+o:0;return this.isHorizontal()?c*r>s*i?s/r:c/i:c*i<s*r?c/r:s/i}_isVisible(){let e=this.options.display;return e===`auto`?this.getMatchingVisibleMetas().length>0:!!e}_computeGridLineItems(e){let n=this.axis,r=this.chart,i=this.options,{grid:a,position:o,border:s}=i,c=a.offset,l=this.isHorizontal(),u=this.ticks.length+(c?1:0),d=yt(a),f=[],p=s.setContext(this.getContext()),m=p.display?p.width:0,h=m/2,g=function(e){return t._alignPixel(r,e,m)},_,v,y,b,x,S,C,w,T,E,D,O;if(o===`top`)_=g(this.bottom),S=this.bottom-d,w=_-h,E=g(e.top)+h,O=e.bottom;else if(o===`bottom`)_=g(this.top),E=e.top,O=g(e.bottom)-h,S=_+h,w=this.top+d;else if(o===`left`)_=g(this.right),x=this.right-d,C=_-h,T=g(e.left)+h,D=e.right;else if(o===`right`)_=g(this.left),T=e.left,D=g(e.right)-h,x=_+h,C=this.left+d;else if(n===`x`){if(o===`center`)_=g((e.top+e.bottom)/2+.5);else if(t.isObject(o)){let e=Object.keys(o)[0],t=o[e];_=g(this.chart.scales[e].getPixelForValue(t))}E=e.top,O=e.bottom,S=_+h,w=S+d}else if(n===`y`){if(o===`center`)_=g((e.left+e.right)/2);else if(t.isObject(o)){let e=Object.keys(o)[0],t=o[e];_=g(this.chart.scales[e].getPixelForValue(t))}x=_-h,C=x-d,T=e.left,D=e.right}let k=t.valueOrDefault(i.ticks.maxTicksLimit,u),A=Math.max(1,Math.ceil(u/k));for(v=0;v<u;v+=A){let e=this.getContext(v),n=a.setContext(e),i=s.setContext(e),o=n.lineWidth,u=n.color,d=i.dash||[],p=i.dashOffset,m=n.tickWidth,h=n.tickColor,g=n.tickBorderDash||[],_=n.tickBorderDashOffset;y=_t(this,v,c),y!==void 0&&(b=t._alignPixel(r,y,o),l?x=C=T=D=b:S=w=E=O=b,f.push({tx1:x,ty1:S,tx2:C,ty2:w,x1:T,y1:E,x2:D,y2:O,width:o,color:u,borderDash:d,borderDashOffset:p,tickWidth:m,tickColor:h,tickBorderDash:g,tickBorderDashOffset:_}))}return this._ticksLength=u,this._borderValue=_,f}_computeLabelItems(e){let n=this.axis,r=this.options,{position:i,ticks:a}=r,o=this.isHorizontal(),s=this.ticks,{align:c,crossAlign:l,padding:u,mirror:d}=a,f=yt(r.grid),p=f+u,m=d?-u:p,h=-t.toRadians(this.labelRotation),g=[],_,v,y,b,x,S,C,w,T,E,D,O,k=`middle`;if(i===`top`)S=this.bottom-m,C=this._getXAxisLabelAlignment();else if(i===`bottom`)S=this.top+m,C=this._getXAxisLabelAlignment();else if(i===`left`){let e=this._getYAxisLabelAlignment(f);C=e.textAlign,x=e.x}else if(i===`right`){let e=this._getYAxisLabelAlignment(f);C=e.textAlign,x=e.x}else if(n===`x`){if(i===`center`)S=(e.top+e.bottom)/2+p;else if(t.isObject(i)){let e=Object.keys(i)[0],t=i[e];S=this.chart.scales[e].getPixelForValue(t)+p}C=this._getXAxisLabelAlignment()}else if(n===`y`){if(i===`center`)x=(e.left+e.right)/2-p;else if(t.isObject(i)){let e=Object.keys(i)[0],t=i[e];x=this.chart.scales[e].getPixelForValue(t)}C=this._getYAxisLabelAlignment(f).textAlign}n===`y`&&(c===`start`?k=`top`:c===`end`&&(k=`bottom`));let A=this._getLabelSizes();for(_=0,v=s.length;_<v;++_){y=s[_],b=y.label;let e=a.setContext(this.getContext(_));w=this.getPixelForTick(_)+a.labelOffset,T=this._resolveTickFontOptions(_),E=T.lineHeight,D=t.isArray(b)?b.length:1;let n=D/2,r=e.color,c=e.textStrokeColor,u=e.textStrokeWidth,f=C;o?(x=w,C===`inner`&&(f=_===v-1?this.options.reverse?`left`:`right`:_===0?this.options.reverse?`right`:`left`:`center`),O=i===`top`?l===`near`||h!==0?-D*E+E/2:l===`center`?-A.highest.height/2-n*E+E:-A.highest.height+E/2:l===`near`||h!==0?E/2:l===`center`?A.highest.height/2-n*E:A.highest.height-D*E,d&&(O*=-1),h!==0&&!e.showLabelBackdrop&&(x+=E/2*Math.sin(h))):(S=w,O=(1-D)*E/2);let p;if(e.showLabelBackdrop){let n=t.toPadding(e.backdropPadding),r=A.heights[_],i=A.widths[_],a=O-n.top,o=0-n.left;switch(k){case`middle`:a-=r/2;break;case`bottom`:a-=r;break}switch(C){case`center`:o-=i/2;break;case`right`:o-=i;break;case`inner`:_===v-1?o-=i:_>0&&(o-=i/2);break}p={left:o,top:a,width:i+n.width,height:r+n.height,color:e.backdropColor}}g.push({label:b,font:T,textOffset:O,options:{rotation:h,color:r,strokeColor:c,strokeWidth:u,textAlign:f,textBaseline:k,translation:[x,S],backdrop:p}})}return g}_getXAxisLabelAlignment(){let{position:e,ticks:n}=this.options;if(-t.toRadians(this.labelRotation))return e===`top`?`left`:`right`;let r=`center`;return n.align===`start`?r=`left`:n.align===`end`?r=`right`:n.align===`inner`&&(r=`inner`),r}_getYAxisLabelAlignment(e){let{position:t,ticks:{crossAlign:n,mirror:r,padding:i}}=this.options,a=this._getLabelSizes(),o=e+i,s=a.widest.width,c,l;return t===`left`?r?(l=this.right+i,n===`near`?c=`left`:n===`center`?(c=`center`,l+=s/2):(c=`right`,l+=s)):(l=this.right-o,n===`near`?c=`right`:n===`center`?(c=`center`,l-=s/2):(c=`left`,l=this.left)):t===`right`?r?(l=this.left+i,n===`near`?c=`right`:n===`center`?(c=`center`,l-=s/2):(c=`left`,l-=s)):(l=this.left+o,n===`near`?c=`left`:n===`center`?(c=`center`,l+=s/2):(c=`right`,l=this.right)):c=`right`,{textAlign:c,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;let e=this.chart,t=this.options.position;if(t===`left`||t===`right`)return{top:0,left:this.left,bottom:e.height,right:this.right};if(t===`top`||t===`bottom`)return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){let{ctx:e,options:{backgroundColor:t},left:n,top:r,width:i,height:a}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(n,r,i,a),e.restore())}getLineWidthForValue(e){let t=this.options.grid;if(!this._isVisible()||!t.display)return 0;let n=this.ticks.findIndex(t=>t.value===e);return n>=0?t.setContext(this.getContext(n)).lineWidth:0}drawGrid(e){let t=this.options.grid,n=this.ctx,r=this._gridLineItems||=this._computeGridLineItems(e),i,a,o=(e,t,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(e.x,e.y),n.lineTo(t.x,t.y),n.stroke(),n.restore())};if(t.display)for(i=0,a=r.length;i<a;++i){let e=r[i];t.drawOnChartArea&&o({x:e.x1,y:e.y1},{x:e.x2,y:e.y2},e),t.drawTicks&&o({x:e.tx1,y:e.ty1},{x:e.tx2,y:e.ty2},{color:e.tickColor,width:e.tickWidth,borderDash:e.tickBorderDash,borderDashOffset:e.tickBorderDashOffset})}}drawBorder(){let{chart:e,ctx:n,options:{border:r,grid:i}}=this,a=r.setContext(this.getContext()),o=r.display?a.width:0;if(!o)return;let s=i.setContext(this.getContext(0)).lineWidth,c=this._borderValue,l,u,d,f;this.isHorizontal()?(l=t._alignPixel(e,this.left,o)-o/2,u=t._alignPixel(e,this.right,s)+s/2,d=f=c):(d=t._alignPixel(e,this.top,o)-o/2,f=t._alignPixel(e,this.bottom,s)+s/2,l=u=c),n.save(),n.lineWidth=a.width,n.strokeStyle=a.color,n.beginPath(),n.moveTo(l,d),n.lineTo(u,f),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;let n=this.ctx,r=this._computeLabelArea();r&&t.clipArea(n,r);let i=this.getLabelItems(e);for(let e of i){let r=e.options,i=e.font,a=e.label,o=e.textOffset;t.renderText(n,a,0,o,i,r)}r&&t.unclipArea(n)}drawTitle(){let{ctx:e,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;let a=t.toFont(r.font),o=t.toPadding(r.padding),s=r.align,c=a.lineHeight/2;n===`bottom`||n===`center`||t.isObject(n)?(c+=o.bottom,t.isArray(r.text)&&(c+=a.lineHeight*(r.text.length-1))):c+=o.top;let{titleX:l,titleY:u,maxWidth:d,rotation:f}=wt(this,c,n,s);t.renderText(e,r.text,0,0,a,{color:r.color,maxWidth:d,rotation:f,textAlign:Ct(s,n,i),textBaseline:`middle`,translation:[l,u]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){let n=this.options,r=n.ticks&&n.ticks.z||0,i=t.valueOrDefault(n.grid&&n.grid.z,-1),a=t.valueOrDefault(n.border&&n.border.z,0);return!this._isVisible()||this.draw!==e.prototype.draw?[{z:r,draw:e=>{this.draw(e)}}]:[{z:i,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:a,draw:()=>{this.drawBorder()}},{z:r,draw:e=>{this.drawLabels(e)}}]}getMatchingVisibleMetas(e){let t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+`AxisID`,r=[],i,a;for(i=0,a=t.length;i<a;++i){let a=t[i];a[n]===this.id&&(!e||a.type===e)&&r.push(a)}return r}_resolveTickFontOptions(e){let n=this.options.ticks.setContext(this.getContext(e));return t.toFont(n.font)}_maxDigits(){let e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}},Et=class{constructor(e,t,n){this.type=e,this.scope=t,this.override=n,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){let n=Object.getPrototypeOf(e),r;kt(n)&&(r=this.register(n));let i=this.items,a=e.id,o=this.scope+`.`+a;if(!a)throw Error(`class does not have id: `+e);return a in i?o:(i[a]=e,Dt(e,o,r),this.override&&t.defaults.override(e.id,e.overrides),o)}get(e){return this.items[e]}unregister(e){let n=this.items,r=e.id,i=this.scope;r in n&&delete n[r],i&&r in t.defaults[i]&&(delete t.defaults[i][r],this.override&&delete t.overrides[r])}};function Dt(e,n,r){let i=t.merge(Object.create(null),[r?t.defaults.get(r):{},t.defaults.get(n),e.defaults]);t.defaults.set(n,i),e.defaultRoutes&&Ot(n,e.defaultRoutes),e.descriptors&&t.defaults.describe(n,e.descriptors)}function Ot(e,n){Object.keys(n).forEach(r=>{let i=r.split(`.`),a=i.pop(),o=[e].concat(i).join(`.`),s=n[r].split(`.`),c=s.pop(),l=s.join(`.`);t.defaults.route(o,a,l,c)})}function kt(e){return`id`in e&&`defaults`in e}var J=new class{constructor(){this.controllers=new Et(O,`datasets`,!0),this.elements=new Et(q,`elements`),this.plugins=new Et(Object,`plugins`),this.scales=new Et(Tt,`scales`),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each(`register`,e)}remove(...e){this._each(`unregister`,e)}addControllers(...e){this._each(`register`,e,this.controllers)}addElements(...e){this._each(`register`,e,this.elements)}addPlugins(...e){this._each(`register`,e,this.plugins)}addScales(...e){this._each(`register`,e,this.scales)}getController(e){return this._get(e,this.controllers,`controller`)}getElement(e){return this._get(e,this.elements,`element`)}getPlugin(e){return this._get(e,this.plugins,`plugin`)}getScale(e){return this._get(e,this.scales,`scale`)}removeControllers(...e){this._each(`unregister`,e,this.controllers)}removeElements(...e){this._each(`unregister`,e,this.elements)}removePlugins(...e){this._each(`unregister`,e,this.plugins)}removeScales(...e){this._each(`unregister`,e,this.scales)}_each(e,n,r){[...n].forEach(n=>{let i=r||this._getRegistryForType(n);r||i.isForType(n)||i===this.plugins&&n.id?this._exec(e,i,n):t.each(n,t=>{let n=r||this._getRegistryForType(t);this._exec(e,n,t)})})}_exec(e,n,r){let i=t._capitalize(e);t.callback(r[`before`+i],[],r),n[e](r),t.callback(r[`after`+i],[],r)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){let n=this._typedRegistries[t];if(n.isForType(e))return n}return this.plugins}_get(e,t,n){let r=t.get(e);if(r===void 0)throw Error(`"`+e+`" is not a registered `+n+`.`);return r}},At=class{constructor(){this._init=[]}notify(e,t,n,r){t===`beforeInit`&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,`install`));let i=r?this._descriptors(e).filter(r):this._descriptors(e),a=this._notify(i,e,t,n);return t===`afterDestroy`&&(this._notify(i,e,`stop`),this._notify(this._init,e,`uninstall`)),a}_notify(e,n,r,i){i||={};for(let a of e){let e=a.plugin,o=e[r],s=[n,i,a.options];if(t.callback(o,s,e)===!1&&i.cancelable)return!1}return!0}invalidate(){t.isNullOrUndef(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;let t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,n){let r=e&&e.config,i=t.valueOrDefault(r.options&&r.options.plugins,{}),a=jt(r);return i===!1&&!n?[]:Nt(e,a,i,n)}_notifyStateChanges(e){let t=this._oldCache||[],n=this._cache,r=(e,t)=>e.filter(e=>!t.some(t=>e.plugin.id===t.plugin.id));this._notify(r(t,n),e,`stop`),this._notify(r(n,t),e,`start`)}};function jt(e){let t={},n=[],r=Object.keys(J.plugins.items);for(let e=0;e<r.length;e++)n.push(J.getPlugin(r[e]));let i=e.plugins||[];for(let e=0;e<i.length;e++){let r=i[e];n.indexOf(r)===-1&&(n.push(r),t[r.id]=!0)}return{plugins:n,localIds:t}}function Mt(e,t){return!t&&e===!1?null:e===!0?{}:e}function Nt(e,{plugins:t,localIds:n},r,i){let a=[],o=e.getContext();for(let s of t){let t=s.id,c=Mt(r[t],i);c!==null&&a.push({plugin:s,options:Pt(e.config,{plugin:s,local:n[t]},c,o)})}return a}function Pt(e,{plugin:t,local:n},r,i){let a=e.pluginScopeKeys(t),o=e.getOptionScopes(r,a);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,i,[``],{scriptable:!1,indexable:!1,allKeys:!0})}function Ft(e,n){let r=t.defaults.datasets[e]||{};return((n.datasets||{})[e]||{}).indexAxis||n.indexAxis||r.indexAxis||`x`}function Y(e,t){let n=e;return e===`_index_`?n=t:e===`_value_`&&(n=t===`x`?`y`:`x`),n}function It(e,t){return e===t?`_index_`:`_value_`}function Lt(e){if(e===`x`||e===`y`||e===`r`)return e}function Rt(e){if(e===`top`||e===`bottom`)return`x`;if(e===`left`||e===`right`)return`y`}function zt(e,...t){if(Lt(e))return e;for(let n of t){let t=n.axis||Rt(n.position)||e.length>1&&Lt(e[0].toLowerCase());if(t)return t}throw Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Bt(e,t,n){if(n[t+`AxisID`]===e)return{axis:t}}function Vt(e,t){if(t.data&&t.data.datasets){let n=t.data.datasets.filter(t=>t.xAxisID===e||t.yAxisID===e);if(n.length)return Bt(e,`x`,n[0])||Bt(e,`y`,n[0])}return{}}function Ht(e,n){let r=t.overrides[e.type]||{scales:{}},i=n.scales||{},a=Ft(e.type,n),o=Object.create(null);return Object.keys(i).forEach(n=>{let s=i[n];if(!t.isObject(s))return console.error(`Invalid scale configuration for scale: ${n}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${n}`);let c=zt(n,s,Vt(n,e),t.defaults.scales[s.type]),l=It(c,a),u=r.scales||{};o[n]=t.mergeIf(Object.create(null),[{axis:c},s,u[c],u[l]])}),e.data.datasets.forEach(r=>{let a=r.type||e.type,s=r.indexAxis||Ft(a,n),c=(t.overrides[a]||{}).scales||{};Object.keys(c).forEach(e=>{let n=Y(e,s),a=r[n+`AxisID`]||n;o[a]=o[a]||Object.create(null),t.mergeIf(o[a],[{axis:n},i[a],c[e]])})}),Object.keys(o).forEach(e=>{let n=o[e];t.mergeIf(n,[t.defaults.scales[n.type],t.defaults.scale])}),o}function Ut(e){let n=e.options||={};n.plugins=t.valueOrDefault(n.plugins,{}),n.scales=Ht(e,n)}function Wt(e){return e||={},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Gt(e){return e||={},e.data=Wt(e.data),Ut(e),e}var X=new Map,Kt=new Set;function qt(e,t){let n=X.get(e);return n||(n=t(),X.set(e,n),Kt.add(n)),n}var Jt=(e,n,r)=>{let i=t.resolveObjectKey(n,r);i!==void 0&&e.add(i)},Yt=class{constructor(e){this._config=Gt(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Wt(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){let e=this._config;this.clearCache(),Ut(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return qt(e,()=>[[`datasets.${e}`,``]])}datasetAnimationScopeKeys(e,t){return qt(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,``]])}datasetElementScopeKeys(e,t){return qt(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,``]])}pluginScopeKeys(e){let t=e.id,n=this.type;return qt(`${n}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){let n=this._scopeCache,r=n.get(e);return(!r||t)&&(r=new Map,n.set(e,r)),r}getOptionScopes(e,n,r){let{options:i,type:a}=this,o=this._cachedScopes(e,r),s=o.get(n);if(s)return s;let c=new Set;n.forEach(n=>{e&&(c.add(e),n.forEach(t=>Jt(c,e,t))),n.forEach(e=>Jt(c,i,e)),n.forEach(e=>Jt(c,t.overrides[a]||{},e)),n.forEach(e=>Jt(c,t.defaults,e)),n.forEach(e=>Jt(c,t.descriptors,e))});let l=Array.from(c);return l.length===0&&l.push(Object.create(null)),Kt.has(n)&&o.set(n,l),l}chartOptionScopes(){let{options:e,type:n}=this;return[e,t.overrides[n]||{},t.defaults.datasets[n]||{},{type:n},t.defaults,t.descriptors]}resolveNamedOptions(e,n,r,i=[``]){let a={$shared:!0},{resolver:o,subPrefixes:s}=Xt(this._resolverCache,e,i),c=o;if(Qt(o,n)){a.$shared=!1,r=t.isFunction(r)?r():r;let n=this.createResolver(e,r,s);c=t._attachContext(o,r,n)}for(let e of n)a[e]=c[e];return a}createResolver(e,n,r=[``],i){let{resolver:a}=Xt(this._resolverCache,e,r);return t.isObject(n)?t._attachContext(a,n,void 0,i):a}};function Xt(e,n,r){let i=e.get(n);i||(i=new Map,e.set(n,i));let a=r.join(),o=i.get(a);return o||(o={resolver:t._createResolver(n,r),subPrefixes:r.filter(e=>!e.toLowerCase().includes(`hover`))},i.set(a,o)),o}var Zt=e=>t.isObject(e)&&Object.getOwnPropertyNames(e).some(n=>t.isFunction(e[n]));function Qt(e,n){let{isScriptable:r,isIndexable:i}=t._descriptors(e);for(let a of n){let n=r(a),o=i(a),s=(o||n)&&e[a];if(n&&(t.isFunction(s)||Zt(s))||o&&t.isArray(s))return!0}return!1}var $t=`4.4.9`,en=[`top`,`bottom`,`left`,`right`,`chartArea`];function tn(e,t){return e===`top`||e===`bottom`||en.indexOf(e)===-1&&t===`x`}function nn(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function rn(e){let n=e.chart,r=n.options.animation;n.notifyPlugins(`afterRender`),t.callback(r&&r.onComplete,[e],n)}function an(e){let n=e.chart,r=n.options.animation;t.callback(r&&r.onProgress,[e],n)}function on(e){return t._isDomSupported()&&typeof e==`string`?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}var Z={},sn=e=>{let t=on(e);return Object.values(Z).filter(e=>e.canvas===t).pop()};function cn(e,t,n){let r=Object.keys(e);for(let i of r){let r=+i;if(r>=t){let a=e[i];delete e[i],(n>0||r>t)&&(e[r+n]=a)}}}function ln(e,t,n,r){return!n||e.type===`mouseout`?null:r?t:e}var un=class{static defaults=t.defaults;static instances=Z;static overrides=t.overrides;static registry=J;static version=$t;static getChart=sn;static register(...e){J.add(...e),dn()}static unregister(...e){J.remove(...e),dn()}constructor(e,r){let i=this.config=new Yt(r),a=on(e),o=sn(a);if(o)throw Error(`Canvas is already in use. Chart with ID '`+o.id+`' must be destroyed before the canvas with ID '`+o.canvas.id+`' can be reused.`);let s=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||(at(a))),this.platform.updateConfig(i);let c=this.platform.acquireContext(a,s.aspectRatio),l=c&&c.canvas,u=l&&l.height,d=l&&l.width;if(this.id=t.uid(),this.ctx=c,this.canvas=l,this.width=d,this.height=u,this._options=s,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 At,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=t.debounce(e=>this.update(e),s.resizeDelay||0),this._dataChanges=[],Z[this.id]=this,!c||!l){console.error(`Failed to create chart: can't acquire context from the given item`);return}n.listen(this,`complete`,rn),n.listen(this,`progress`,an),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:e,maintainAspectRatio:n},width:r,height:i,_aspectRatio:a}=this;return t.isNullOrUndef(e)?n&&a?a:i?r/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return J}_initialize(){return this.notifyPlugins(`beforeInit`),this.options.responsive?this.resize():t.retinaScale(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins(`afterInit`),this}clear(){return t.clearCanvas(this.canvas,this.ctx),this}stop(){return n.stop(this),this}resize(e,t){n.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,n){let r=this.options,i=this.canvas,a=r.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,e,n,a),s=r.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?`resize`:`attach`;this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,t.retinaScale(this,s,!0)&&(this.notifyPlugins(`resize`,{size:o}),t.callback(r.onResize,[this,o],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){let e=this.options.scales||{};t.each(e,(e,t)=>{e.id=t})}buildOrUpdateScales(){let e=this.options,n=e.scales,r=this.scales,i=Object.keys(r).reduce((e,t)=>(e[t]=!1,e),{}),a=[];n&&(a=a.concat(Object.keys(n).map(e=>{let t=n[e],r=zt(e,t),i=r===`r`,a=r===`x`;return{options:t,dposition:i?`chartArea`:a?`bottom`:`left`,dtype:i?`radialLinear`:a?`category`:`linear`}}))),t.each(a,n=>{let a=n.options,o=a.id,s=zt(o,a),c=t.valueOrDefault(a.type,n.dtype);(a.position===void 0||tn(a.position,s)!==tn(n.dposition))&&(a.position=n.dposition),i[o]=!0;let l=null;o in r&&r[o].type===c?l=r[o]:(l=new(J.getScale(c))({id:o,type:c,ctx:this.ctx,chart:this}),r[l.id]=l),l.init(a,e)}),t.each(i,(e,t)=>{e||delete r[t]}),t.each(r,e=>{R.configure(this,e,e.options),R.addBox(this,e)})}_updateMetasets(){let e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort((e,t)=>e.index-t.index),n>t){for(let e=t;e<n;++e)this._destroyDatasetMeta(e);e.splice(t,n-t)}this._sortedMetasets=e.slice(0).sort(nn(`order`,`index`))}_removeUnreferencedMetasets(){let{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach((e,n)=>{t.filter(t=>t===e._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){let e=[],n=this.data.datasets,r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){let i=n[r],a=this.getDatasetMeta(r),o=i.type||this.config.type;if(a.type&&a.type!==o&&(this._destroyDatasetMeta(r),a=this.getDatasetMeta(r)),a.type=o,a.indexAxis=i.indexAxis||Ft(o,this.options),a.order=i.order||0,a.index=r,a.label=``+i.label,a.visible=this.isDatasetVisible(r),a.controller)a.controller.updateIndex(r),a.controller.linkScales();else{let n=J.getController(o),{datasetElementType:i,dataElementType:s}=t.defaults.datasets[o];Object.assign(n,{dataElementType:J.getElement(s),datasetElementType:i&&J.getElement(i)}),a.controller=new n(this,r),e.push(a.controller)}}return this._updateMetasets(),e}_resetElements(){t.each(this.data.datasets,(e,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins(`reset`)}update(e){let n=this.config;n.update();let r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins(`beforeUpdate`,{mode:e,cancelable:!0})===!1)return;let a=this.buildOrUpdateControllers();this.notifyPlugins(`beforeElementsUpdate`);let o=0;for(let e=0,t=this.data.datasets.length;e<t;e++){let{controller:t}=this.getDatasetMeta(e),n=!i&&a.indexOf(t)===-1;t.buildOrUpdateElements(n),o=Math.max(+t.getMaxOverflow(),o)}o=this._minPadding=r.layout.autoPadding?o:0,this._updateLayout(o),i||t.each(a,e=>{e.reset()}),this._updateDatasets(e),this.notifyPlugins(`afterUpdate`,{mode:e}),this._layers.sort(nn(`z`,`_idx`));let{_active:s,_lastEvent:c}=this;c?this._eventHandler(c,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){t.each(this.scales,e=>{R.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let e=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(e.events);(!t.setsEqual(n,r)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(let{method:n,start:r,count:i}of t)cn(e,r,n===`_removeElements`?-i:i)}_getUniformDataChanges(){let e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];let n=this.data.datasets.length,r=t=>new Set(e.filter(e=>e[0]===t).map((e,t)=>t+`,`+e.splice(1).join(`,`))),i=r(0);for(let e=1;e<n;e++)if(!t.setsEqual(i,r(e)))return;return Array.from(i).map(e=>e.split(`,`)).map(e=>({method:e[1],start:+e[2],count:+e[3]}))}_updateLayout(e){if(this.notifyPlugins(`beforeLayout`,{cancelable:!0})===!1)return;R.update(this,this.width,this.height,e);let n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],t.each(this.boxes,e=>{r&&e.position===`chartArea`||(e.configure&&e.configure(),this._layers.push(...e._layers()))},this),this._layers.forEach((e,t)=>{e._idx=t}),this.notifyPlugins(`afterLayout`)}_updateDatasets(e){if(this.notifyPlugins(`beforeDatasetsUpdate`,{mode:e,cancelable:!0})!==!1){for(let e=0,t=this.data.datasets.length;e<t;++e)this.getDatasetMeta(e).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,t.isFunction(e)?e({datasetIndex:n}):e);this.notifyPlugins(`afterDatasetsUpdate`,{mode:e})}}_updateDataset(e,t){let n=this.getDatasetMeta(e),r={meta:n,index:e,mode:t,cancelable:!0};this.notifyPlugins(`beforeDatasetUpdate`,r)!==!1&&(n.controller._update(t),r.cancelable=!1,this.notifyPlugins(`afterDatasetUpdate`,r))}render(){this.notifyPlugins(`beforeRender`,{cancelable:!0})!==!1&&(n.has(this)?this.attached&&!n.running(this)&&n.start(this):(this.draw(),rn({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){let{width:e,height:t}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(e,t)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins(`beforeDraw`,{cancelable:!0})===!1)return;let t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins(`afterDraw`)}_getSortedDatasetMetas(e){let t=this._sortedMetasets,n=[],r,i;for(r=0,i=t.length;r<i;++r){let i=t[r];(!e||i.visible)&&n.push(i)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins(`beforeDatasetsDraw`,{cancelable:!0})===!1)return;let e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins(`afterDatasetsDraw`)}_drawDataset(e){let n=this.ctx,r={meta:e,index:e.index,cancelable:!0},i=t.getDatasetClipArea(this,e);this.notifyPlugins(`beforeDatasetDraw`,r)!==!1&&(i&&t.clipArea(n,i),e.controller.draw(),i&&t.unclipArea(n),r.cancelable=!1,this.notifyPlugins(`afterDatasetDraw`,r))}isPointInArea(e){return t._isPointInArea(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,n,r){let i=De.modes[t];return typeof i==`function`?i(this,e,n,r):[]}getDatasetMeta(e){let t=this.data.datasets[e],n=this._metasets,r=n.filter(e=>e&&e._dataset===t).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||=t.createContext(null,{chart:this,type:`chart`})}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){let t=this.data.datasets[e];if(!t)return!1;let n=this.getDatasetMeta(e);return typeof n.hidden==`boolean`?!n.hidden:!t.hidden}setDatasetVisibility(e,t){let n=this.getDatasetMeta(e);n.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,r){let i=r?`show`:`hide`,a=this.getDatasetMeta(e),o=a.controller._resolveAnimations(void 0,i);t.defined(n)?(a.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(e,r),o.update(a,{visible:r}),this.update(t=>t.datasetIndex===e?i:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){let t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),n.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins(`beforeDestroy`);let{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),t.clearCanvas(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Z[this.id],this.notifyPlugins(`afterDestroy`)}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let e=this._listeners,n=this.platform,r=(t,r)=>{n.addEventListener(this,t,r),e[t]=r},i=(e,t,n)=>{e.offsetX=t,e.offsetY=n,this._eventHandler(e)};t.each(this.options.events,e=>r(e,i))}bindResponsiveEvents(){this._responsiveListeners||={};let e=this._responsiveListeners,t=this.platform,n=(n,r)=>{t.addEventListener(this,n,r),e[n]=r},r=(n,r)=>{e[n]&&(t.removeEventListener(this,n,r),delete e[n])},i=(e,t)=>{this.canvas&&this.resize(e,t)},a,o=()=>{r(`attach`,o),this.attached=!0,this.resize(),n(`resize`,i),n(`detach`,a)};a=()=>{this.attached=!1,r(`resize`,i),this._stop(),this._resize(0,0),n(`attach`,o)},t.isAttached(this.canvas)?o():a()}unbindEvents(){t.each(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},t.each(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){let r=n?`set`:`remove`,i,a,o,s;for(t===`dataset`&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller[`_`+r+`DatasetHoverStyle`]()),o=0,s=e.length;o<s;++o){a=e[o];let t=a&&this.getDatasetMeta(a.datasetIndex).controller;t&&t[r+`HoverStyle`](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){let n=this._active||[],r=e.map(({datasetIndex:e,index:t})=>{let n=this.getDatasetMeta(e);if(!n)throw Error(`No dataset found at index `+e);return{datasetIndex:e,element:n.data[t],index:t}});t._elementsEqual(r,n)||(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}isPluginEnabled(e){return this._plugins._cache.filter(t=>t.plugin.id===e).length===1}_updateHoverStyles(e,t,n){let r=this.options.hover,i=(e,t)=>e.filter(e=>!t.some(t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)),a=i(t,e),o=n?e:i(e,t);a.length&&this.updateHoverStyle(a,r.mode,!1),o.length&&r.mode&&this.updateHoverStyle(o,r.mode,!0)}_eventHandler(e,t){let n={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},r=t=>(t.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins(`beforeEvent`,n,r)===!1)return;let i=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins(`afterEvent`,n,r),(i||n.changed)&&this.render(),this}_handleEvent(e,n,r){let{_active:i=[],options:a}=this,o=n,s=this._getActiveElements(e,i,r,o),c=t._isClickEvent(e),l=ln(e,this._lastEvent,r,c);r&&(this._lastEvent=null,t.callback(a.onHover,[e,s,this],this),c&&t.callback(a.onClick,[e,s,this],this));let u=!t._elementsEqual(s,i);return(u||n)&&(this._active=s,this._updateHoverStyles(s,i,n)),this._lastEvent=l,u}_getActiveElements(e,t,n,r){if(e.type===`mouseout`)return[];if(!n)return t;let i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,r)}};function dn(){return t.each(un.instances,e=>e._plugins.invalidate())}function fn(e,n,r){let{startAngle:i,pixelMargin:a,x:o,y:s,outerRadius:c,innerRadius:l}=n,u=a/c;e.beginPath(),e.arc(o,s,c,i-u,r+u),l>a?(u=a/l,e.arc(o,s,l,r+u,i-u,!0)):e.arc(o,s,a,r+t.HALF_PI,i-t.HALF_PI),e.closePath(),e.clip()}function pn(e){return t._readValueToProps(e,[`outerStart`,`outerEnd`,`innerStart`,`innerEnd`])}function mn(e,n,r,i){let a=pn(e.options.borderRadius),o=(r-n)/2,s=Math.min(o,i*n/2),c=e=>{let n=(r-Math.min(o,e))*i/2;return t._limitValue(e,0,Math.min(o,n))};return{outerStart:c(a.outerStart),outerEnd:c(a.outerEnd),innerStart:t._limitValue(a.innerStart,0,s),innerEnd:t._limitValue(a.innerEnd,0,s)}}function hn(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function gn(e,n,r,i,a,o){let{x:s,y:c,startAngle:l,pixelMargin:u,innerRadius:d}=n,f=Math.max(n.outerRadius+i+r-u,0),p=d>0?d+i+r+u:0,m=0,h=a-l;if(i){let e=((d>0?d-i:0)+(f>0?f-i:0))/2;m=(h-(e===0?h:h*e/(e+i)))/2}let g=(h-Math.max(.001,h*f-r/t.PI)/f)/2,_=l+g+m,v=a-g-m,{outerStart:y,outerEnd:b,innerStart:x,innerEnd:S}=mn(n,p,f,v-_),C=f-y,w=f-b,T=_+y/C,E=v-b/w,D=p+x,O=p+S,k=_+x/D,A=v-S/O;if(e.beginPath(),o){let n=(T+E)/2;if(e.arc(s,c,f,T,n),e.arc(s,c,f,n,E),b>0){let n=hn(w,E,s,c);e.arc(n.x,n.y,b,E,v+t.HALF_PI)}let r=hn(O,v,s,c);if(e.lineTo(r.x,r.y),S>0){let n=hn(O,A,s,c);e.arc(n.x,n.y,S,v+t.HALF_PI,A+Math.PI)}let i=(v-S/p+(_+x/p))/2;if(e.arc(s,c,p,v-S/p,i,!0),e.arc(s,c,p,i,_+x/p,!0),x>0){let n=hn(D,k,s,c);e.arc(n.x,n.y,x,k+Math.PI,_-t.HALF_PI)}let a=hn(C,_,s,c);if(e.lineTo(a.x,a.y),y>0){let n=hn(C,T,s,c);e.arc(n.x,n.y,y,_-t.HALF_PI,T)}}else{e.moveTo(s,c);let t=Math.cos(T)*f+s,n=Math.sin(T)*f+c;e.lineTo(t,n);let r=Math.cos(E)*f+s,i=Math.sin(E)*f+c;e.lineTo(r,i)}e.closePath()}function _n(e,n,r,i,a){let{fullCircles:o,startAngle:s,circumference:c}=n,l=n.endAngle;if(o){gn(e,n,r,i,l,a);for(let t=0;t<o;++t)e.fill();isNaN(c)||(l=s+(c%t.TAU||t.TAU))}return gn(e,n,r,i,l,a),e.fill(),l}function vn(e,n,r,i,a){let{fullCircles:o,startAngle:s,circumference:c,options:l}=n,{borderWidth:u,borderJoinStyle:d,borderDash:f,borderDashOffset:p}=l,m=l.borderAlign===`inner`;if(!u)return;e.setLineDash(f||[]),e.lineDashOffset=p,m?(e.lineWidth=u*2,e.lineJoin=d||`round`):(e.lineWidth=u,e.lineJoin=d||`bevel`);let h=n.endAngle;if(o){gn(e,n,r,i,h,a);for(let t=0;t<o;++t)e.stroke();isNaN(c)||(h=s+(c%t.TAU||t.TAU))}m&&fn(e,n,h),o||(gn(e,n,r,i,h,a),e.stroke())}var yn=class extends q{static id=`arc`;static defaults={borderAlign:`center`,borderColor:`#fff`,borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};static defaultRoutes={backgroundColor:`backgroundColor`};static descriptors={_scriptable:!0,_indexable:e=>e!==`borderDash`};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,n,r){let i=this.getProps([`x`,`y`],r),{angle:a,distance:o}=t.getAngleFromPoint(i,{x:e,y:n}),{startAngle:s,endAngle:c,innerRadius:l,outerRadius:u,circumference:d}=this.getProps([`startAngle`,`endAngle`,`innerRadius`,`outerRadius`,`circumference`],r),f=(this.options.spacing+this.options.borderWidth)/2,p=t.valueOrDefault(d,c-s),m=t._angleBetween(a,s,c)&&s!==c,h=p>=t.TAU||m,g=t._isBetween(o,l+f,u+f);return h&&g}getCenterPoint(e){let{x:t,y:n,startAngle:r,endAngle:i,innerRadius:a,outerRadius:o}=this.getProps([`x`,`y`,`startAngle`,`endAngle`,`innerRadius`,`outerRadius`],e),{offset:s,spacing:c}=this.options,l=(r+i)/2,u=(a+o+c+s)/2;return{x:t+Math.cos(l)*u,y:n+Math.sin(l)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:n,circumference:r}=this,i=(n.offset||0)/4,a=(n.spacing||0)/2,o=n.circular;if(this.pixelMargin=n.borderAlign===`inner`?.33:0,this.fullCircles=r>t.TAU?Math.floor(r/t.TAU):0,r===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let s=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(s)*i,Math.sin(s)*i);let c=i*(1-Math.sin(Math.min(t.PI,r||0)));e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,_n(e,this,c,a,o),vn(e,this,c,a,o),e.restore()}};function bn(e,n,r=n){e.lineCap=t.valueOrDefault(r.borderCapStyle,n.borderCapStyle),e.setLineDash(t.valueOrDefault(r.borderDash,n.borderDash)),e.lineDashOffset=t.valueOrDefault(r.borderDashOffset,n.borderDashOffset),e.lineJoin=t.valueOrDefault(r.borderJoinStyle,n.borderJoinStyle),e.lineWidth=t.valueOrDefault(r.borderWidth,n.borderWidth),e.strokeStyle=t.valueOrDefault(r.borderColor,n.borderColor)}function xn(e,t,n){e.lineTo(n.x,n.y)}function Sn(e){return e.stepped?t._steppedLineTo:e.tension||e.cubicInterpolationMode===`monotone`?t._bezierCurveTo:xn}function Cn(e,t,n={}){let r=e.length,{start:i=0,end:a=r-1}=n,{start:o,end:s}=t,c=Math.max(i,o),l=Math.min(a,s),u=i<o&&a<o||i>s&&a>s;return{count:r,start:c,loop:t.loop,ilen:l<c&&!u?r+l-c:l-c}}function wn(e,t,n,r){let{points:i,options:a}=t,{count:o,start:s,loop:c,ilen:l}=Cn(i,n,r),u=Sn(a),{move:d=!0,reverse:f}=r||{},p,m,h;for(p=0;p<=l;++p)m=i[(s+(f?l-p:p))%o],!m.skip&&(d?(e.moveTo(m.x,m.y),d=!1):u(e,h,m,f,a.stepped),h=m);return c&&(m=i[(s+(f?l:0))%o],u(e,h,m,f,a.stepped)),!!c}function Tn(e,t,n,r){let i=t.points,{count:a,start:o,ilen:s}=Cn(i,n,r),{move:c=!0,reverse:l}=r||{},u=0,d=0,f,p,m,h,g,_,v=e=>(o+(l?s-e:e))%a,y=()=>{h!==g&&(e.lineTo(u,g),e.lineTo(u,h),e.lineTo(u,_))};for(c&&(p=i[v(0)],e.moveTo(p.x,p.y)),f=0;f<=s;++f){if(p=i[v(f)],p.skip)continue;let t=p.x,n=p.y,r=t|0;r===m?(n<h?h=n:n>g&&(g=n),u=(d*u+t)/++d):(y(),e.lineTo(t,n),m=r,d=0,h=g=n),_=n}y()}function En(e){let t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!==`monotone`&&!t.stepped&&!n?Tn:wn}function Dn(e){return e.stepped?t._steppedInterpolation:e.tension||e.cubicInterpolationMode===`monotone`?t._bezierInterpolation:t._pointInLine}function On(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),bn(e,t.options),e.stroke(i)}function kn(e,t,n,r){let{segments:i,options:a}=t,o=En(t);for(let s of i)bn(e,a,s.style),e.beginPath(),o(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}var An=typeof Path2D==`function`;function jn(e,t,n,r){An&&!t.options.segment?On(e,t,n,r):kn(e,t,n,r)}var Mn=class extends q{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:e=>e!==`borderDash`&&e!==`fill`};constructor(e){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,e&&Object.assign(this,e)}updateControlPoints(e,n){let r=this.options;if((r.tension||r.cubicInterpolationMode===`monotone`)&&!r.stepped&&!this._pointsUpdated){let i=r.spanGaps?this._loop:this._fullLoop;t._updateBezierControlPoints(this._points,r,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||=t._computeSegments(this,this.options.segment)}first(){let e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){let e=this.segments,t=this.points,n=e.length;return n&&t[e[n-1].end]}interpolate(e,n){let r=this.options,i=e[n],a=this.points,o=t._boundSegments(this,{property:n,start:i,end:i});if(!o.length)return;let s=[],c=Dn(r),l,u;for(l=0,u=o.length;l<u;++l){let{start:t,end:u}=o[l],d=a[t],f=a[u];if(d===f){s.push(d);continue}let p=c(d,f,Math.abs((i-d[n])/(f[n]-d[n])),r.stepped);p[n]=e[n],s.push(p)}return s.length===1?s[0]:s}pathSegment(e,t,n){return En(this)(e,this,t,n)}path(e,t,n){let r=this.segments,i=En(this),a=this._loop;t||=0,n||=this.points.length-t;for(let o of r)a&=i(e,this,o,{start:t,end:t+n-1});return!!a}draw(e,t,n,r){let i=this.options||{};(this.points||[]).length&&i.borderWidth&&(e.save(),jn(e,this,n,r),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}};function Nn(e,t,n,r){let i=e.options,{[n]:a}=e.getProps([n],r);return Math.abs(t-a)<i.radius+i.hitRadius}var Pn=class extends q{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(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,t,n){let r=this.options,{x:i,y:a}=this.getProps([`x`,`y`],n);return(e-i)**2+(t-a)**2<(r.hitRadius+r.radius)**2}inXRange(e,t){return Nn(this,e,`x`,t)}inYRange(e,t){return Nn(this,e,`y`,t)}getCenterPoint(e){let{x:t,y:n}=this.getProps([`x`,`y`],e);return{x:t,y:n}}size(e){e=e||this.options||{};let t=e.radius||0;t=Math.max(t,t&&e.hoverRadius||0);let n=t&&e.borderWidth||0;return(t+n)*2}draw(e,n){let r=this.options;this.skip||r.radius<.1||!t._isPointInArea(this,n,this.size(r)/2)||(e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.fillStyle=r.backgroundColor,t.drawPoint(e,r,this.x,this.y))}getRange(){let e=this.options||{};return e.radius+e.hitRadius}};function Fn(e,t){let{x:n,y:r,base:i,width:a,height:o}=e.getProps([`x`,`y`,`base`,`width`,`height`],t),s,c,l,u,d;return e.horizontal?(d=o/2,s=Math.min(n,i),c=Math.max(n,i),l=r-d,u=r+d):(d=a/2,s=n-d,c=n+d,l=Math.min(r,i),u=Math.max(r,i)),{left:s,top:l,right:c,bottom:u}}function In(e,n,r,i){return e?0:t._limitValue(n,r,i)}function Ln(e,n,r){let i=e.options.borderWidth,a=e.borderSkipped,o=t.toTRBL(i);return{t:In(a.top,o.top,0,r),r:In(a.right,o.right,0,n),b:In(a.bottom,o.bottom,0,r),l:In(a.left,o.left,0,n)}}function Rn(e,n,r){let{enableBorderRadius:i}=e.getProps([`enableBorderRadius`]),a=e.options.borderRadius,o=t.toTRBLCorners(a),s=Math.min(n,r),c=e.borderSkipped,l=i||t.isObject(a);return{topLeft:In(!l||c.top||c.left,o.topLeft,0,s),topRight:In(!l||c.top||c.right,o.topRight,0,s),bottomLeft:In(!l||c.bottom||c.left,o.bottomLeft,0,s),bottomRight:In(!l||c.bottom||c.right,o.bottomRight,0,s)}}function zn(e){let t=Fn(e),n=t.right-t.left,r=t.bottom-t.top,i=Ln(e,n/2,r/2),a=Rn(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:a},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,a.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(i.b,i.r))}}}}function Bn(e,n,r,i){let a=n===null,o=r===null,s=e&&!(a&&o)&&Fn(e,i);return s&&(a||t._isBetween(n,s.left,s.right))&&(o||t._isBetween(r,s.top,s.bottom))}function Vn(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Hn(e,t){e.rect(t.x,t.y,t.w,t.h)}function Un(e,t,n={}){let r=e.x===n.x?0:-t,i=e.y===n.y?0:-t,a=(e.x+e.w===n.x+n.w?0:t)-r,o=(e.y+e.h===n.y+n.h?0:t)-i;return{x:e.x+r,y:e.y+i,w:e.w+a,h:e.h+o,radius:e.radius}}var Wn=class extends q{static id=`bar`;static defaults={borderSkipped:`start`,borderWidth:0,borderRadius:0,inflateAmount:`auto`,pointStyle:void 0};static defaultRoutes={backgroundColor:`backgroundColor`,borderColor:`borderColor`};constructor(e){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,e&&Object.assign(this,e)}draw(e){let{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:a,outer:o}=zn(this),s=Vn(o.radius)?t.addRoundedRectPath:Hn;e.save(),(o.w!==a.w||o.h!==a.h)&&(e.beginPath(),s(e,Un(o,n,a)),e.clip(),s(e,Un(a,-n,o)),e.fillStyle=r,e.fill(`evenodd`)),e.beginPath(),s(e,Un(a,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,t,n){return Bn(this,e,t,n)}inXRange(e,t){return Bn(this,e,null,t)}inYRange(e,t){return Bn(this,null,e,t)}getCenterPoint(e){let{x:t,y:n,base:r,horizontal:i}=this.getProps([`x`,`y`,`base`,`horizontal`],e);return{x:i?(t+r)/2:t,y:i?n:(n+r)/2}}getRange(e){return e===`x`?this.width/2:this.height/2}},Gn=Object.freeze({__proto__:null,ArcElement:yn,BarElement:Wn,LineElement:Mn,PointElement:Pn}),Kn=[`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)`],qn=Kn.map(e=>e.replace(`rgb(`,`rgba(`).replace(`)`,`, 0.5)`));function Jn(e){return Kn[e%Kn.length]}function Yn(e){return qn[e%qn.length]}function Xn(e,t){return e.borderColor=Jn(t),e.backgroundColor=Yn(t),++t}function Zn(e,t){return e.backgroundColor=e.data.map(()=>Jn(t++)),t}function Qn(e,t){return e.backgroundColor=e.data.map(()=>Yn(t++)),t}function $n(e){let t=0;return(n,r)=>{let i=e.getDatasetMeta(r).controller;i instanceof F?t=Zn(n,t):i instanceof pe?t=Qn(n,t):i&&(t=Xn(n,t))}}function er(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function tr(e){return e&&(e.borderColor||e.backgroundColor)}function nr(){return t.defaults.borderColor!==`rgba(0,0,0,0.1)`||t.defaults.backgroundColor!==`rgba(0,0,0,0.1)`}var rr={id:`colors`,defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;let{data:{datasets:r},options:i}=e.config,{elements:a}=i,o=er(r)||tr(i)||a&&er(a)||nr();if(!n.forceOverride&&o)return;let s=$n(e);r.forEach(s)}};function ir(e,t,n,r,i){let a=i.samples||r;if(a>=n)return e.slice(t,t+n);let o=[],s=(n-2)/(a-2),c=0,l=t+n-1,u=t,d,f,p,m,h;for(o[c++]=e[u],d=0;d<a-2;d++){let r=0,i=0,a,l=Math.floor((d+1)*s)+1+t,g=Math.min(Math.floor((d+2)*s)+1,n)+t,_=g-l;for(a=l;a<g;a++)r+=e[a].x,i+=e[a].y;r/=_,i/=_;let v=Math.floor(d*s)+1+t,y=Math.min(Math.floor((d+1)*s)+1,n)+t,{x:b,y:x}=e[u];for(p=m=-1,a=v;a<y;a++)m=.5*Math.abs((b-r)*(e[a].y-x)-(b-e[a].x)*(i-x)),m>p&&(p=m,f=e[a],h=a);o[c++]=f,u=h}return o[c++]=e[l],o}function ar(e,n,r,i){let a=0,o=0,s,c,l,u,d,f,p,m,h,g,_=[],v=n+r-1,y=e[n].x,b=e[v].x-y;for(s=n;s<n+r;++s){c=e[s],l=(c.x-y)/b*i,u=c.y;let n=l|0;if(n===d)u<h?(h=u,f=s):u>g&&(g=u,p=s),a=(o*a+c.x)/++o;else{let r=s-1;if(!t.isNullOrUndef(f)&&!t.isNullOrUndef(p)){let t=Math.min(f,p),n=Math.max(f,p);t!==m&&t!==r&&_.push({...e[t],x:a}),n!==m&&n!==r&&_.push({...e[n],x:a})}s>0&&r!==m&&_.push(e[r]),_.push(c),d=n,o=0,h=g=u,f=p=m=s}}return _}function or(e){if(e._decimated){let t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,`data`,{configurable:!0,enumerable:!0,writable:!0,value:t})}}function sr(e){e.data.datasets.forEach(e=>{or(e)})}function cr(e,n){let r=n.length,i=0,a,{iScale:o}=e,{min:s,max:c,minDefined:l,maxDefined:u}=o.getUserBounds();return l&&(i=t._limitValue(t._lookupByKey(n,o.axis,s).lo,0,r-1)),a=u?t._limitValue(t._lookupByKey(n,o.axis,c).hi+1,i,r)-i:r-i,{start:i,count:a}}var lr={id:`decimation`,defaults:{algorithm:`min-max`,enabled:!1},beforeElementsUpdate:(e,n,r)=>{if(!r.enabled){sr(e);return}let i=e.width;e.data.datasets.forEach((n,a)=>{let{_data:o,indexAxis:s}=n,c=e.getDatasetMeta(a),l=o||n.data;if(t.resolve([s,e.options.indexAxis])===`y`||!c.controller.supportsDecimation)return;let u=e.scales[c.xAxisID];if(u.type!==`linear`&&u.type!==`time`||e.options.parsing)return;let{start:d,count:f}=cr(c,l);if(f<=(r.threshold||4*i)){or(n);return}t.isNullOrUndef(o)&&(n._data=l,delete n.data,Object.defineProperty(n,`data`,{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(e){this._data=e}}));let p;switch(r.algorithm){case`lttb`:p=ir(l,d,f,i,r);break;case`min-max`:p=ar(l,d,f,i);break;default:throw Error(`Unsupported decimation algorithm '${r.algorithm}'`)}n._decimated=p})},destroy(e){sr(e)}};function ur(e,n,r){let i=e.segments,a=e.points,o=n.points,s=[];for(let e of i){let{start:i,end:c}=e;c=pr(i,c,a);let l=dr(r,a[i],a[c],e.loop);if(!n.segments){s.push({source:e,target:l,start:a[i],end:a[c]});continue}let u=t._boundSegments(n,l);for(let n of u){let i=dr(r,o[n.start],o[n.end],n.loop),c=t._boundSegment(e,a,i);for(let e of c)s.push({source:e,target:n,start:{[r]:mr(l,i,`start`,Math.max)},end:{[r]:mr(l,i,`end`,Math.min)}})}}return s}function dr(e,n,r,i){if(i)return;let a=n[e],o=r[e];return e===`angle`&&(a=t._normalizeAngle(a),o=t._normalizeAngle(o)),{property:e,start:a,end:o}}function fr(e,t){let{x:n=null,y:r=null}=e||{},i=t.points,a=[];return t.segments.forEach(({start:e,end:t})=>{t=pr(e,t,i);let o=i[e],s=i[t];r===null?n!==null&&(a.push({x:n,y:o.y}),a.push({x:n,y:s.y})):(a.push({x:o.x,y:r}),a.push({x:s.x,y:r}))}),a}function pr(e,t,n){for(;t>e;t--){let e=n[t];if(!isNaN(e.x)&&!isNaN(e.y))break}return t}function mr(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function hr(e,n){let r=[],i=!1;return t.isArray(e)?(i=!0,r=e):r=fr(e,n),r.length?new Mn({points:r,options:{tension:0},_loop:i,_fullLoop:i}):null}function gr(e){return e&&e.fill!==!1}function _r(e,n,r){let i=e[n].fill,a=[n],o;if(!r)return i;for(;i!==!1&&a.indexOf(i)===-1;){if(!t.isNumberFinite(i))return i;if(o=e[i],!o)return!1;if(o.visible)return i;a.push(i),i=o.fill}return!1}function vr(e,n,r){let i=Sr(e);if(t.isObject(i))return isNaN(i.value)?!1:i;let a=parseFloat(i);return t.isNumberFinite(a)&&Math.floor(a)===a?yr(i[0],n,a,r):[`origin`,`start`,`end`,`stack`,`shape`].indexOf(i)>=0&&i}function yr(e,t,n,r){return(e===`-`||e===`+`)&&(n=t+n),n===t||n<0||n>=r?!1:n}function br(e,n){let r=null;return e===`start`?r=n.bottom:e===`end`?r=n.top:t.isObject(e)?r=n.getPixelForValue(e.value):n.getBasePixel&&(r=n.getBasePixel()),r}function xr(e,n,r){let i;return i=e===`start`?r:e===`end`?n.options.reverse?n.min:n.max:t.isObject(e)?e.value:n.getBaseValue(),i}function Sr(e){let n=e.options,r=n.fill,i=t.valueOrDefault(r&&r.target,r);return i===void 0&&(i=!!n.backgroundColor),i===!1||i===null?!1:i===!0?`origin`:i}function Cr(e){let{scale:t,index:n,line:r}=e,i=[],a=r.segments,o=r.points,s=wr(t,n);s.push(hr({x:null,y:t.bottom},r));for(let e=0;e<a.length;e++){let t=a[e];for(let e=t.start;e<=t.end;e++)Tr(i,o[e],s)}return new Mn({points:i,options:{}})}function wr(e,t){let n=[],r=e.getMatchingVisibleMetas(`line`);for(let e=0;e<r.length;e++){let i=r[e];if(i.index===t)break;i.hidden||n.unshift(i.dataset)}return n}function Tr(e,t,n){let r=[];for(let i=0;i<n.length;i++){let a=n[i],{first:o,last:s,point:c}=Er(a,t,`x`);if(!(!c||o&&s)){if(o)r.unshift(c);else if(e.push(c),!s)break}}e.push(...r)}function Er(e,n,r){let i=e.interpolate(n,r);if(!i)return{};let a=i[r],o=e.segments,s=e.points,c=!1,l=!1;for(let e=0;e<o.length;e++){let n=o[e],i=s[n.start][r],u=s[n.end][r];if(t._isBetween(a,i,u)){c=a===i,l=a===u;break}}return{first:c,last:l,point:i}}var Dr=class{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,r){let{x:i,y:a,radius:o}=this;return n||={start:0,end:t.TAU},e.arc(i,a,o,n.end,n.start,!0),!r.bounds}interpolate(e){let{x:t,y:n,radius:r}=this,i=e.angle;return{x:t+Math.cos(i)*r,y:n+Math.sin(i)*r,angle:i}}};function Or(e){let{chart:n,fill:r,line:i}=e;if(t.isNumberFinite(r))return kr(n,r);if(r===`stack`)return Cr(e);if(r===`shape`)return!0;let a=Ar(e);return a instanceof Dr?a:hr(a,i)}function kr(e,t){let n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function Ar(e){return(e.scale||{}).getPointPositionForValue?Mr(e):jr(e)}function jr(e){let{scale:n={},fill:r}=e,i=br(r,n);if(t.isNumberFinite(i)){let e=n.isHorizontal();return{x:e?i:null,y:e?null:i}}return null}function Mr(e){let{scale:t,fill:n}=e,r=t.options,i=t.getLabels().length,a=r.reverse?t.max:t.min,o=xr(n,t,a),s=[];if(r.grid.circular){let e=t.getPointPositionForValue(0,a);return new Dr({x:e.x,y:e.y,radius:t.getDistanceFromCenterForValue(o)})}for(let e=0;e<i;++e)s.push(t.getPointPositionForValue(e,o));return s}function Nr(e,n,r){let i=Or(n),{chart:a,index:o,line:s,scale:c,axis:l}=n,u=s.options,d=u.fill,f=u.backgroundColor,{above:p=f,below:m=f}=d||{},h=a.getDatasetMeta(o),g=t.getDatasetClipArea(a,h);i&&s.points.length&&(t.clipArea(e,r),Pr(e,{line:s,target:i,above:p,below:m,area:r,scale:c,axis:l,clip:g}),t.unclipArea(e))}function Pr(e,t){let{line:n,target:r,above:i,below:a,area:o,scale:s,clip:c}=t,l=n._loop?`angle`:t.axis;e.save(),l===`x`&&a!==i&&(Fr(e,r,o.top),Ir(e,{line:n,target:r,color:i,scale:s,property:l,clip:c}),e.restore(),e.save(),Fr(e,r,o.bottom)),Ir(e,{line:n,target:r,color:a,scale:s,property:l,clip:c}),e.restore()}function Fr(e,t,n){let{segments:r,points:i}=t,a=!0,o=!1;e.beginPath();for(let s of r){let{start:r,end:c}=s,l=i[r],u=i[pr(r,c,i)];a?(e.moveTo(l.x,l.y),a=!1):(e.lineTo(l.x,n),e.lineTo(l.x,l.y)),o=!!t.pathSegment(e,s,{move:o}),o?e.closePath():e.lineTo(u.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function Ir(e,t){let{line:n,target:r,property:i,color:a,scale:o,clip:s}=t,c=ur(n,r,i);for(let{source:t,target:l,start:u,end:d}of c){let{style:{backgroundColor:c=a}={}}=t,f=r!==!0;e.save(),e.fillStyle=c,Lr(e,o,s,f&&dr(i,u,d)),e.beginPath();let p=!!n.pathSegment(e,t),m;if(f){p?e.closePath():Rr(e,r,d,i);let t=!!r.pathSegment(e,l,{move:p,reverse:!0});m=p&&t,m||Rr(e,r,u,i)}e.closePath(),e.fill(m?`evenodd`:`nonzero`),e.restore()}}function Lr(e,t,n,r){let i=t.chart.chartArea,{property:a,start:o,end:s}=r||{};if(a===`x`||a===`y`){let t,r,c,l;a===`x`?(t=o,r=i.top,c=s,l=i.bottom):(t=i.left,r=o,c=i.right,l=s),e.beginPath(),n&&(t=Math.max(t,n.left),c=Math.min(c,n.right),r=Math.max(r,n.top),l=Math.min(l,n.bottom)),e.rect(t,r,c-t,l-r),e.clip()}}function Rr(e,t,n,r){let i=t.interpolate(n,r);i&&e.lineTo(i.x,i.y)}var zr={id:`filler`,afterDatasetsUpdate(e,t,n){let r=(e.data.datasets||[]).length,i=[],a,o,s,c;for(o=0;o<r;++o)a=e.getDatasetMeta(o),s=a.dataset,c=null,s&&s.options&&s instanceof Mn&&(c={visible:e.isDatasetVisible(o),index:o,fill:vr(s,o,r),chart:e,axis:a.controller.options.indexAxis,scale:a.vScale,line:s}),a.$filler=c,i.push(c);for(o=0;o<r;++o)c=i[o],!(!c||c.fill===!1)&&(c.fill=_r(i,o,n.propagate))},beforeDraw(e,t,n){let r=n.drawTime===`beforeDraw`,i=e.getSortedVisibleDatasetMetas(),a=e.chartArea;for(let t=i.length-1;t>=0;--t){let n=i[t].$filler;n&&(n.line.updateControlPoints(a,n.axis),r&&n.fill&&Nr(e.ctx,n,a))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!==`beforeDatasetsDraw`)return;let r=e.getSortedVisibleDatasetMetas();for(let t=r.length-1;t>=0;--t){let n=r[t].$filler;gr(n)&&Nr(e.ctx,n,e.chartArea)}},beforeDatasetDraw(e,t,n){let r=t.meta.$filler;!gr(r)||n.drawTime!==`beforeDatasetDraw`||Nr(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:`beforeDatasetDraw`}},Br=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},Vr=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index,Hr=class extends q{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,n){this.maxWidth=e,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let e=this.options.labels||{},n=t.callback(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(t=>e.filter(t,this.chart.data))),e.sort&&(n=n.sort((t,n)=>e.sort(t,n,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){let{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}let r=e.labels,i=t.toFont(r.font),a=i.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:c}=Br(r,a),l,u;n.font=i.string,this.isHorizontal()?(l=this.maxWidth,u=this._fitRows(o,a,s,c)+10):(u=this.maxHeight,l=this._fitCols(o,i,s,c)+10),this.width=Math.min(l,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,t,n,r){let{ctx:i,maxWidth:a,options:{labels:{padding:o}}}=this,s=this.legendHitBoxes=[],c=this.lineWidths=[0],l=r+o,u=e;i.textAlign=`left`,i.textBaseline=`middle`;let d=-1,f=-l;return this.legendItems.forEach((e,p)=>{let m=n+t/2+i.measureText(e.text).width;(p===0||c[c.length-1]+m+2*o>a)&&(u+=l,c[c.length-(p>0?0:1)]=0,f+=l,d++),s[p]={left:0,top:f,row:d,width:m,height:r},c[c.length-1]+=m+o}),u}_fitCols(e,t,n,r){let{ctx:i,maxHeight:a,options:{labels:{padding:o}}}=this,s=this.legendHitBoxes=[],c=this.columnSizes=[],l=a-e,u=o,d=0,f=0,p=0,m=0;return this.legendItems.forEach((e,a)=>{let{itemWidth:h,itemHeight:g}=Ur(n,t,i,e,r);a>0&&f+g+2*o>l&&(u+=d+o,c.push({width:d,height:f}),p+=d+o,m++,d=f=0),s[a]={left:p,top:f,col:m,width:h,height:g},d=Math.max(d,h),f+=g+o}),u+=d,c.push({width:d,height:f}),u}adjustHitBoxes(){if(!this.options.display)return;let e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:a}}=this,o=t.getRtlAdapter(a,this.left,this.width);if(this.isHorizontal()){let a=0,s=t._alignStartEnd(r,this.left+i,this.right-this.lineWidths[a]);for(let c of n)a!==c.row&&(a=c.row,s=t._alignStartEnd(r,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+e+i,c.left=o.leftForLtr(o.x(s),c.width),s+=c.width+i}else{let a=0,s=t._alignStartEnd(r,this.top+e+i,this.bottom-this.columnSizes[a].height);for(let c of n)c.col!==a&&(a=c.col,s=t._alignStartEnd(r,this.top+e+i,this.bottom-this.columnSizes[a].height)),c.top=s,c.left+=this.left+i,c.left=o.leftForLtr(o.x(c.left),c.width),s+=c.height+i}}isHorizontal(){return this.options.position===`top`||this.options.position===`bottom`}draw(){if(this.options.display){let e=this.ctx;t.clipArea(e,this),this._draw(),t.unclipArea(e)}}_draw(){let{options:e,columnSizes:n,lineWidths:r,ctx:i}=this,{align:a,labels:o}=e,s=t.defaults.color,c=t.getRtlAdapter(e.rtl,this.left,this.width),l=t.toFont(o.font),{padding:u}=o,d=l.size,f=d/2,p;this.drawTitle(),i.textAlign=c.textAlign(`left`),i.textBaseline=`middle`,i.lineWidth=.5,i.font=l.string;let{boxWidth:m,boxHeight:h,itemHeight:g}=Br(o,d),_=function(e,n,r){if(isNaN(m)||m<=0||isNaN(h)||h<0)return;i.save();let a=t.valueOrDefault(r.lineWidth,1);if(i.fillStyle=t.valueOrDefault(r.fillStyle,s),i.lineCap=t.valueOrDefault(r.lineCap,`butt`),i.lineDashOffset=t.valueOrDefault(r.lineDashOffset,0),i.lineJoin=t.valueOrDefault(r.lineJoin,`miter`),i.lineWidth=a,i.strokeStyle=t.valueOrDefault(r.strokeStyle,s),i.setLineDash(t.valueOrDefault(r.lineDash,[])),o.usePointStyle){let s={radius:h*Math.SQRT2/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:a},l=c.xPlus(e,m/2),u=n+f;t.drawPointLegend(i,s,l,u,o.pointStyleWidth&&m)}else{let o=n+Math.max((d-h)/2,0),s=c.leftForLtr(e,m),l=t.toTRBLCorners(r.borderRadius);i.beginPath(),Object.values(l).some(e=>e!==0)?t.addRoundedRectPath(i,{x:s,y:o,w:m,h,radius:l}):i.rect(s,o,m,h),i.fill(),a!==0&&i.stroke()}i.restore()},v=function(e,n,r){t.renderText(i,r.text,e,n+g/2,l,{strikethrough:r.hidden,textAlign:c.textAlign(r.textAlign)})},y=this.isHorizontal(),b=this._computeTitleHeight();p=y?{x:t._alignStartEnd(a,this.left+u,this.right-r[0]),y:this.top+u+b,line:0}:{x:this.left+u,y:t._alignStartEnd(a,this.top+b+u,this.bottom-n[0].height),line:0},t.overrideTextDirection(this.ctx,e.textDirection);let x=g+u;this.legendItems.forEach((s,d)=>{i.strokeStyle=s.fontColor,i.fillStyle=s.fontColor;let h=i.measureText(s.text).width,g=c.textAlign(s.textAlign||=o.textAlign),S=m+f+h,C=p.x,w=p.y;if(c.setWidth(this.width),y?d>0&&C+S+u>this.right&&(w=p.y+=x,p.line++,C=p.x=t._alignStartEnd(a,this.left+u,this.right-r[p.line])):d>0&&w+x>this.bottom&&(C=p.x=C+n[p.line].width+u,p.line++,w=p.y=t._alignStartEnd(a,this.top+b+u,this.bottom-n[p.line].height)),_(c.x(C),w,s),C=t._textX(g,C+m+f,y?C+S:this.right,e.rtl),v(c.x(C),w,s),y)p.x+=S+u;else if(typeof s.text!=`string`){let e=l.lineHeight;p.y+=Kr(s,e)+u}else p.y+=x}),t.restoreTextDirection(this.ctx,e.textDirection)}drawTitle(){let e=this.options,n=e.title,r=t.toFont(n.font),i=t.toPadding(n.padding);if(!n.display)return;let a=t.getRtlAdapter(e.rtl,this.left,this.width),o=this.ctx,s=n.position,c=r.size/2,l=i.top+c,u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+l,d=t._alignStartEnd(e.align,d,this.right-f);else{let n=this.columnSizes.reduce((e,t)=>Math.max(e,t.height),0);u=l+t._alignStartEnd(e.align,this.top,this.bottom-n-e.labels.padding-this._computeTitleHeight())}let p=t._alignStartEnd(s,d,d+f);o.textAlign=a.textAlign(t._toLeftRightCenter(s)),o.textBaseline=`middle`,o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,t.renderText(o,n.text,p,u,r)}_computeTitleHeight(){let e=this.options.title,n=t.toFont(e.font),r=t.toPadding(e.padding);return e.display?n.lineHeight+r.height:0}_getLegendItemAt(e,n){let r,i,a;if(t._isBetween(e,this.left,this.right)&&t._isBetween(n,this.top,this.bottom)){for(a=this.legendHitBoxes,r=0;r<a.length;++r)if(i=a[r],t._isBetween(e,i.left,i.left+i.width)&&t._isBetween(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(e){let n=this.options;if(!qr(e.type,n))return;let r=this._getLegendItemAt(e.x,e.y);if(e.type===`mousemove`||e.type===`mouseout`){let i=this._hoveredItem,a=Vr(i,r);i&&!a&&t.callback(n.onLeave,[e,i,this],this),this._hoveredItem=r,r&&!a&&t.callback(n.onHover,[e,r,this],this)}else r&&t.callback(n.onClick,[e,r,this],this)}};function Ur(e,t,n,r,i){return{itemWidth:Wr(r,e,t,n),itemHeight:Gr(i,r,t.lineHeight)}}function Wr(e,t,n,r){let i=e.text;return i&&typeof i!=`string`&&(i=i.reduce((e,t)=>e.length>t.length?e:t)),t+n.size/2+r.measureText(i).width}function Gr(e,t,n){let r=e;return typeof t.text!=`string`&&(r=Kr(t,n)),r}function Kr(e,t){return t*(e.text?e.text.length:0)}function qr(e,t){return!!((e===`mousemove`||e===`mouseout`)&&(t.onHover||t.onLeave)||t.onClick&&(e===`click`||e===`mouseup`))}var Jr={id:`legend`,_element:Hr,start(e,t,n){let r=e.legend=new Hr({ctx:e.ctx,options:n,chart:e});R.configure(e,r,n),R.addBox(e,r)},stop(e){R.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){let r=e.legend;R.configure(e,r,n),r.options=n},afterUpdate(e){let t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:`top`,align:`center`,fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){let r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){let n=e.data.datasets,{labels:{usePointStyle:r,pointStyle:i,textAlign:a,color:o,useBorderRadius:s,borderRadius:c}}=e.legend.options;return e._getSortedDatasetMetas().map(e=>{let l=e.controller.getStyle(r?0:void 0),u=t.toPadding(l.borderWidth);return{text:n[e.index].label,fillStyle:l.backgroundColor,fontColor:o,hidden:!e.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:l.borderColor,pointStyle:i||l.pointStyle,rotation:l.rotation,textAlign:a||l.textAlign,borderRadius:s&&(c||l.borderRadius),datasetIndex:e.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:`center`,text:``}},descriptors:{_scriptable:e=>!e.startsWith(`on`),labels:{_scriptable:e=>![`generateLabels`,`filter`,`sort`].includes(e)}}},Yr=class extends q{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,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.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){let r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;let i=t.isArray(r.text)?r.text.length:1;this._padding=t.toPadding(r.padding);let a=i*t.toFont(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){let e=this.options.position;return e===`top`||e===`bottom`}_drawArgs(e){let{top:n,left:r,bottom:i,right:a,options:o}=this,s=o.align,c=0,l,u,d;return this.isHorizontal()?(u=t._alignStartEnd(s,r,a),d=n+e,l=a-r):(o.position===`left`?(u=r+e,d=t._alignStartEnd(s,i,n),c=t.PI*-.5):(u=a-e,d=t._alignStartEnd(s,n,i),c=t.PI*.5),l=i-n),{titleX:u,titleY:d,maxWidth:l,rotation:c}}draw(){let e=this.ctx,n=this.options;if(!n.display)return;let r=t.toFont(n.font),i=r.lineHeight/2+this._padding.top,{titleX:a,titleY:o,maxWidth:s,rotation:c}=this._drawArgs(i);t.renderText(e,n.text,0,0,r,{color:n.color,maxWidth:s,rotation:c,textAlign:t._toLeftRightCenter(n.align),textBaseline:`middle`,translation:[a,o]})}};function Xr(e,t){let n=new Yr({ctx:e.ctx,options:t,chart:e});R.configure(e,n,t),R.addBox(e,n),e.titleBlock=n}var Zr={id:`title`,_element:Yr,start(e,t,n){Xr(e,n)},stop(e){let t=e.titleBlock;R.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){let r=e.titleBlock;R.configure(e,r,n),r.options=n},defaults:{align:`center`,display:!1,font:{weight:`bold`},fullSize:!0,padding:10,position:`top`,text:``,weight:2e3},defaultRoutes:{color:`color`},descriptors:{_scriptable:!0,_indexable:!1}},Qr=new WeakMap,$r={id:`subtitle`,start(e,t,n){let r=new Yr({ctx:e.ctx,options:n,chart:e});R.configure(e,r,n),R.addBox(e,r),Qr.set(e,r)},stop(e){R.removeBox(e,Qr.get(e)),Qr.delete(e)},beforeUpdate(e,t,n){let r=Qr.get(e);R.configure(e,r,n),r.options=n},defaults:{align:`center`,display:!1,font:{weight:`normal`},fullSize:!0,padding:0,position:`top`,text:``,weight:1500},defaultRoutes:{color:`color`},descriptors:{_scriptable:!0,_indexable:!1}},ei={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,a=0;for(t=0,n=e.length;t<n;++t){let n=e[t].element;if(n&&n.hasValue()){let e=n.tooltipPosition();r.add(e.x),i+=e.y,++a}}return a===0||r.size===0?!1:{x:[...r].reduce((e,t)=>e+t)/r.size,y:i/a}},nearest(e,n){if(!e.length)return!1;let r=n.x,i=n.y,a=1/0,o,s,c;for(o=0,s=e.length;o<s;++o){let r=e[o].element;if(r&&r.hasValue()){let e=r.getCenterPoint(),i=t.distanceBetweenPoints(n,e);i<a&&(a=i,c=r)}}if(c){let e=c.tooltipPosition();r=e.x,i=e.y}return{x:r,y:i}}};function ti(e,n){return n&&(t.isArray(n)?Array.prototype.push.apply(e,n):e.push(n)),e}function ni(e){return(typeof e==`string`||e instanceof String)&&e.indexOf(`
|
|
9
|
+
`)>-1?e.split(`
|
|
10
|
+
`):e}function ri(e,t){let{element:n,datasetIndex:r,index:i}=t,a=e.getDatasetMeta(r).controller,{label:o,value:s}=a.getLabelAndValue(i);return{chart:e,label:o,parsed:a.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:a.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function ii(e,n){let r=e.chart.ctx,{body:i,footer:a,title:o}=e,{boxWidth:s,boxHeight:c}=n,l=t.toFont(n.bodyFont),u=t.toFont(n.titleFont),d=t.toFont(n.footerFont),f=o.length,p=a.length,m=i.length,h=t.toPadding(n.padding),g=h.height,_=0,v=i.reduce((e,t)=>e+t.before.length+t.lines.length+t.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,f&&(g+=f*u.lineHeight+(f-1)*n.titleSpacing+n.titleMarginBottom),v){let e=n.displayColors?Math.max(c,l.lineHeight):l.lineHeight;g+=m*e+(v-m)*l.lineHeight+(v-1)*n.bodySpacing}p&&(g+=n.footerMarginTop+p*d.lineHeight+(p-1)*n.footerSpacing);let y=0,b=function(e){_=Math.max(_,r.measureText(e).width+y)};return r.save(),r.font=u.string,t.each(e.title,b),r.font=l.string,t.each(e.beforeBody.concat(e.afterBody),b),y=n.displayColors?s+2+n.boxPadding:0,t.each(i,e=>{t.each(e.before,b),t.each(e.lines,b),t.each(e.after,b)}),y=0,r.font=d.string,t.each(e.footer,b),r.restore(),_+=h.width,{width:_,height:g}}function ai(e,t){let{y:n,height:r}=t;return n<r/2?`top`:n>e.height-r/2?`bottom`:`center`}function oi(e,t,n,r){let{x:i,width:a}=r,o=n.caretSize+n.caretPadding;if(e===`left`&&i+a+o>t.width||e===`right`&&i-a-o<0)return!0}function si(e,t,n,r){let{x:i,width:a}=n,{width:o,chartArea:{left:s,right:c}}=e,l=`center`;return r===`center`?l=i<=(s+c)/2?`left`:`right`:i<=a/2?l=`left`:i>=o-a/2&&(l=`right`),oi(l,e,t,n)&&(l=`center`),l}function ci(e,t,n){let r=n.yAlign||t.yAlign||ai(e,n);return{xAlign:n.xAlign||t.xAlign||si(e,t,n,r),yAlign:r}}function li(e,t){let{x:n,width:r}=e;return t===`right`?n-=r:t===`center`&&(n-=r/2),n}function ui(e,t,n){let{y:r,height:i}=e;return t===`top`?r+=n:t===`bottom`?r-=i+n:r-=i/2,r}function di(e,n,r,i){let{caretSize:a,caretPadding:o,cornerRadius:s}=e,{xAlign:c,yAlign:l}=r,u=a+o,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:m}=t.toTRBLCorners(s),h=li(n,c),g=ui(n,l,u);return l===`center`?c===`left`?h+=u:c===`right`&&(h-=u):c===`left`?h-=Math.max(d,p)+a:c===`right`&&(h+=Math.max(f,m)+a),{x:t._limitValue(h,0,i.width-n.width),y:t._limitValue(g,0,i.height-n.height)}}function fi(e,n,r){let i=t.toPadding(r.padding);return n===`center`?e.x+e.width/2:n===`right`?e.x+e.width-i.right:e.x+i.left}function pi(e){return ti([],ni(e))}function mi(e,n,r){return t.createContext(e,{tooltip:n,tooltipItems:r,type:`tooltip`})}function hi(e,t){let n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}var gi={beforeTitle:t.noop,title(e){if(e.length>0){let t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode===`dataset`)return t.dataset.label||``;if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return``},afterTitle:t.noop,beforeBody:t.noop,beforeLabel:t.noop,label(e){if(this&&this.options&&this.options.mode===`dataset`)return e.label+`: `+e.formattedValue||e.formattedValue;let n=e.dataset.label||``;n&&(n+=`: `);let r=e.formattedValue;return t.isNullOrUndef(r)||(n+=r),n},labelColor(e){let t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){let t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:t.noop,afterBody:t.noop,beforeFooter:t.noop,footer:t.noop,afterFooter:t.noop};function Q(e,t,n,r){let i=e[t].call(n,r);return i===void 0?gi[t].call(n,r):i}var _i=class extends q{static positioners=ei;constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let e=this._cachedAnimations;if(e)return e;let t=this.chart,n=this.options.setContext(this.getContext()),r=n.enabled&&t.options.animation&&n.animations,i=new o(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||=mi(this.chart.getContext(),this,this._tooltipItems)}getTitle(e,t){let{callbacks:n}=t,r=Q(n,`beforeTitle`,this,e),i=Q(n,`title`,this,e),a=Q(n,`afterTitle`,this,e),o=[];return o=ti(o,ni(r)),o=ti(o,ni(i)),o=ti(o,ni(a)),o}getBeforeBody(e,t){return pi(Q(t.callbacks,`beforeBody`,this,e))}getBody(e,n){let{callbacks:r}=n,i=[];return t.each(e,e=>{let t={before:[],lines:[],after:[]},n=hi(r,e);ti(t.before,ni(Q(n,`beforeLabel`,this,e))),ti(t.lines,Q(n,`label`,this,e)),ti(t.after,ni(Q(n,`afterLabel`,this,e))),i.push(t)}),i}getAfterBody(e,t){return pi(Q(t.callbacks,`afterBody`,this,e))}getFooter(e,t){let{callbacks:n}=t,r=Q(n,`beforeFooter`,this,e),i=Q(n,`footer`,this,e),a=Q(n,`afterFooter`,this,e),o=[];return o=ti(o,ni(r)),o=ti(o,ni(i)),o=ti(o,ni(a)),o}_createItems(e){let n=this._active,r=this.chart.data,i=[],a=[],o=[],s=[],c,l;for(c=0,l=n.length;c<l;++c)s.push(ri(this.chart,n[c]));return e.filter&&(s=s.filter((t,n,i)=>e.filter(t,n,i,r))),e.itemSort&&(s=s.sort((t,n)=>e.itemSort(t,n,r))),t.each(s,t=>{let n=hi(e.callbacks,t);i.push(Q(n,`labelColor`,this,t)),a.push(Q(n,`labelPointStyle`,this,t)),o.push(Q(n,`labelTextColor`,this,t))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=o,this.dataPoints=s,s}update(e,t){let n=this.options.setContext(this.getContext()),r=this._active,i,a=[];if(!r.length)this.opacity!==0&&(i={opacity:0});else{let e=ei[n.position].call(this,r,this._eventPosition);a=this._createItems(n),this.title=this.getTitle(a,n),this.beforeBody=this.getBeforeBody(a,n),this.body=this.getBody(a,n),this.afterBody=this.getAfterBody(a,n),this.footer=this.getFooter(a,n);let t=this._size=ii(this,n),o=Object.assign({},e,t),s=ci(this.chart,n,o),c=di(n,o,s,this.chart);this.xAlign=s.xAlign,this.yAlign=s.yAlign,i={opacity:1,x:c.x,y:c.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}this._tooltipItems=a,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,n,r){let i=this.getCaretPosition(e,n,r);t.lineTo(i.x1,i.y1),t.lineTo(i.x2,i.y2),t.lineTo(i.x3,i.y3)}getCaretPosition(e,n,r){let{xAlign:i,yAlign:a}=this,{caretSize:o,cornerRadius:s}=r,{topLeft:c,topRight:l,bottomLeft:u,bottomRight:d}=t.toTRBLCorners(s),{x:f,y:p}=e,{width:m,height:h}=n,g,_,v,y,b,x;return a===`center`?(b=p+h/2,i===`left`?(g=f,_=g-o,y=b+o,x=b-o):(g=f+m,_=g+o,y=b-o,x=b+o),v=g):(_=i===`left`?f+Math.max(c,u)+o:i===`right`?f+m-Math.max(l,d)-o:this.caretX,a===`top`?(y=p,b=y-o,g=_-o,v=_+o):(y=p+h,b=y+o,g=_+o,v=_-o),x=y),{x1:g,x2:_,x3:v,y1:y,y2:b,y3:x}}drawTitle(e,n,r){let i=this.title,a=i.length,o,s,c;if(a){let l=t.getRtlAdapter(r.rtl,this.x,this.width);for(e.x=fi(this,r.titleAlign,r),n.textAlign=l.textAlign(r.titleAlign),n.textBaseline=`middle`,o=t.toFont(r.titleFont),s=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,c=0;c<a;++c)n.fillText(i[c],l.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+s,c+1===a&&(e.y+=r.titleMarginBottom-s)}}_drawColorBox(e,n,r,i,a){let o=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:c,boxWidth:l}=a,u=t.toFont(a.bodyFont),d=fi(this,`left`,a),f=i.x(d),p=c<u.lineHeight?(u.lineHeight-c)/2:0,m=n.y+p;if(a.usePointStyle){let n={radius:Math.min(l,c)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},r=i.leftForLtr(f,l)+l/2,u=m+c/2;e.strokeStyle=a.multiKeyBackground,e.fillStyle=a.multiKeyBackground,t.drawPoint(e,n,r,u),e.strokeStyle=o.borderColor,e.fillStyle=o.backgroundColor,t.drawPoint(e,n,r,u)}else{e.lineWidth=t.isObject(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,e.strokeStyle=o.borderColor,e.setLineDash(o.borderDash||[]),e.lineDashOffset=o.borderDashOffset||0;let n=i.leftForLtr(f,l),r=i.leftForLtr(i.xPlus(f,1),l-2),s=t.toTRBLCorners(o.borderRadius);Object.values(s).some(e=>e!==0)?(e.beginPath(),e.fillStyle=a.multiKeyBackground,t.addRoundedRectPath(e,{x:n,y:m,w:l,h:c,radius:s}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),t.addRoundedRectPath(e,{x:r,y:m+1,w:l-2,h:c-2,radius:s}),e.fill()):(e.fillStyle=a.multiKeyBackground,e.fillRect(n,m,l,c),e.strokeRect(n,m,l,c),e.fillStyle=o.backgroundColor,e.fillRect(r,m+1,l-2,c-2))}e.fillStyle=this.labelTextColors[r]}drawBody(e,n,r){let{body:i}=this,{bodySpacing:a,bodyAlign:o,displayColors:s,boxHeight:c,boxWidth:l,boxPadding:u}=r,d=t.toFont(r.bodyFont),f=d.lineHeight,p=0,m=t.getRtlAdapter(r.rtl,this.x,this.width),h=function(t){n.fillText(t,m.x(e.x+p),e.y+f/2),e.y+=f+a},g=m.textAlign(o),_,v,y,b,x,S,C;for(n.textAlign=o,n.textBaseline=`middle`,n.font=d.string,e.x=fi(this,g,r),n.fillStyle=r.bodyColor,t.each(this.beforeBody,h),p=s&&g!==`right`?o===`center`?l/2+u:l+2+u:0,b=0,S=i.length;b<S;++b){for(_=i[b],v=this.labelTextColors[b],n.fillStyle=v,t.each(_.before,h),y=_.lines,s&&y.length&&(this._drawColorBox(n,e,b,m,r),f=Math.max(d.lineHeight,c)),x=0,C=y.length;x<C;++x)h(y[x]),f=d.lineHeight;t.each(_.after,h)}p=0,f=d.lineHeight,t.each(this.afterBody,h),e.y-=a}drawFooter(e,n,r){let i=this.footer,a=i.length,o,s;if(a){let c=t.getRtlAdapter(r.rtl,this.x,this.width);for(e.x=fi(this,r.footerAlign,r),e.y+=r.footerMarginTop,n.textAlign=c.textAlign(r.footerAlign),n.textBaseline=`middle`,o=t.toFont(r.footerFont),n.fillStyle=r.footerColor,n.font=o.string,s=0;s<a;++s)n.fillText(i[s],c.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+r.footerSpacing}}drawBackground(e,n,r,i){let{xAlign:a,yAlign:o}=this,{x:s,y:c}=e,{width:l,height:u}=r,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:m}=t.toTRBLCorners(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(s+d,c),o===`top`&&this.drawCaret(e,n,r,i),n.lineTo(s+l-f,c),n.quadraticCurveTo(s+l,c,s+l,c+f),o===`center`&&a===`right`&&this.drawCaret(e,n,r,i),n.lineTo(s+l,c+u-m),n.quadraticCurveTo(s+l,c+u,s+l-m,c+u),o===`bottom`&&this.drawCaret(e,n,r,i),n.lineTo(s+p,c+u),n.quadraticCurveTo(s,c+u,s,c+u-p),o===`center`&&a===`left`&&this.drawCaret(e,n,r,i),n.lineTo(s,c+d),n.quadraticCurveTo(s,c,s+d,c),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){let t=this.chart,n=this.$animations,r=n&&n.x,i=n&&n.y;if(r||i){let n=ei[e.position].call(this,this._active,this._eventPosition);if(!n)return;let a=this._size=ii(this,e),o=Object.assign({},n,this._size),s=ci(t,e,o),c=di(e,o,s,t);(r._to!==c.x||i._to!==c.y)&&(this.xAlign=s.xAlign,this.yAlign=s.yAlign,this.width=a.width,this.height=a.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(e){let n=this.options.setContext(this.getContext()),r=this.opacity;if(!r)return;this._updateAnimationTarget(n);let i={width:this.width,height:this.height},a={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;let o=t.toPadding(n.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&s&&(e.save(),e.globalAlpha=r,this.drawBackground(a,e,i,n),t.overrideTextDirection(e,n.textDirection),a.y+=o.top,this.drawTitle(a,e,n),this.drawBody(a,e,n),this.drawFooter(a,e,n),t.restoreTextDirection(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){let r=this._active,i=e.map(({datasetIndex:e,index:t})=>{let n=this.chart.getDatasetMeta(e);if(!n)throw Error(`Cannot find a dataset at index `+e);return{datasetIndex:e,element:n.data[t],index:t}}),a=!t._elementsEqual(r,i),o=this._positionChanged(i,n);(a||o)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let i=this.options,a=this._active||[],o=this._getActiveElements(e,a,n,r),s=this._positionChanged(o,e),c=n||!t._elementsEqual(o,a)||s;return c&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),c}_getActiveElements(e,t,n,r){let i=this.options;if(e.type===`mouseout`)return[];if(!r)return t.filter(e=>this.chart.data.datasets[e.datasetIndex]&&this.chart.getDatasetMeta(e.datasetIndex).controller.getParsed(e.index)!==void 0);let a=this.chart.getElementsAtEventForMode(e,i.mode,i,n);return i.reverse&&a.reverse(),a}_positionChanged(e,t){let{caretX:n,caretY:r,options:i}=this,a=ei[i.position].call(this,e,t);return a!==!1&&(n!==a.x||r!==a.y)}},vi={id:`tooltip`,_element:_i,positioners:ei,afterInit(e,t,n){n&&(e.tooltip=new _i({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){let t=e.tooltip;if(t&&t._willRender()){let n={tooltip:t};if(e.notifyPlugins(`beforeTooltipDraw`,{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins(`afterTooltipDraw`,n)}},afterEvent(e,t){if(e.tooltip){let n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:`average`,backgroundColor:`rgba(0,0,0,0.8)`,titleColor:`#fff`,titleFont:{weight:`bold`},titleSpacing:2,titleMarginBottom:6,titleAlign:`left`,bodyColor:`#fff`,bodySpacing:2,bodyFont:{},bodyAlign:`left`,footerColor:`#fff`,footerSpacing:2,footerMarginTop:6,footerFont:{weight:`bold`},footerAlign:`left`,padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:`#fff`,displayColors:!0,boxPadding:0,borderColor:`rgba(0,0,0,0)`,borderWidth:0,animation:{duration:400,easing:`easeOutQuart`},animations:{numbers:{type:`number`,properties:[`x`,`y`,`width`,`height`,`caretX`,`caretY`]},opacity:{easing:`linear`,duration:200}},callbacks:gi},defaultRoutes:{bodyFont:`font`,footerFont:`font`,titleFont:`font`},descriptors:{_scriptable:e=>e!==`filter`&&e!==`itemSort`&&e!==`external`,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:`animation`}},additionalOptionScopes:[`interaction`]},yi=Object.freeze({__proto__:null,Colors:rr,Decimation:lr,Filler:zr,Legend:Jr,SubTitle:$r,Title:Zr,Tooltip:vi}),bi=(e,t,n,r)=>(typeof t==`string`?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function xi(e,t,n,r){let i=e.indexOf(t);return i===-1?bi(e,t,n,r):i===e.lastIndexOf(t)?i:n}var Si=(e,n)=>e===null?null:t._limitValue(Math.round(e),0,n);function Ci(e){let t=this.getLabels();return e>=0&&e<t.length?t[e]:e}var wi=class extends Tt{static id=`category`;static defaults={ticks:{callback:Ci}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){let t=this._addedLabels;if(t.length){let e=this.getLabels();for(let{index:n,label:r}of t)e[n]===r&&e.splice(n,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(t.isNullOrUndef(e))return null;let r=this.getLabels();return n=isFinite(n)&&r[n]===e?n:xi(r,e,t.valueOrDefault(n,e),this._addedLabels),Si(n,r.length-1)}determineDataLimits(){let{minDefined:e,maxDefined:t}=this.getUserBounds(),{min:n,max:r}=this.getMinMax(!0);this.options.bounds===`ticks`&&(e||(n=0),t||(r=this.getLabels().length-1)),this.min=n,this.max=r}buildTicks(){let e=this.min,t=this.max,n=this.options.offset,r=[],i=this.getLabels();i=e===0&&t===i.length-1?i:i.slice(e,t+1),this._valueRange=Math.max(i.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let n=e;n<=t;n++)r.push({value:n});return r}getLabelForValue(e){return Ci.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!=`number`&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){let t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}};function Ti(e,n){let r=[],{bounds:i,step:a,min:o,max:s,precision:c,count:l,maxTicks:u,maxDigits:d,includeBounds:f}=e,p=a||1,m=u-1,{min:h,max:g}=n,_=!t.isNullOrUndef(o),v=!t.isNullOrUndef(s),y=!t.isNullOrUndef(l),b=(g-h)/(d+1),x=t.niceNum((g-h)/m/p)*p,S,C,w,T;if(x<1e-14&&!_&&!v)return[{value:h},{value:g}];T=Math.ceil(g/x)-Math.floor(h/x),T>m&&(x=t.niceNum(T*x/m/p)*p),t.isNullOrUndef(c)||(S=10**c,x=Math.ceil(x*S)/S),i===`ticks`?(C=Math.floor(h/x)*x,w=Math.ceil(g/x)*x):(C=h,w=g),_&&v&&a&&t.almostWhole((s-o)/a,x/1e3)?(T=Math.round(Math.min((s-o)/x,u)),x=(s-o)/T,C=o,w=s):y?(C=_?o:C,w=v?s:w,T=l-1,x=(w-C)/T):(T=(w-C)/x,T=t.almostEquals(T,Math.round(T),x/1e3)?Math.round(T):Math.ceil(T));let E=Math.max(t._decimalPlaces(x),t._decimalPlaces(C));S=10**(t.isNullOrUndef(c)?E:c),C=Math.round(C*S)/S,w=Math.round(w*S)/S;let D=0;for(_&&(f&&C!==o?(r.push({value:o}),C<o&&D++,t.almostEquals(Math.round((C+D*x)*S)/S,o,Ei(o,b,e))&&D++):C<o&&D++);D<T;++D){let e=Math.round((C+D*x)*S)/S;if(v&&e>s)break;r.push({value:e})}return v&&f&&w!==s?r.length&&t.almostEquals(r[r.length-1].value,s,Ei(s,b,e))?r[r.length-1].value=s:r.push({value:s}):(!v||w===s)&&r.push({value:w}),r}function Ei(e,n,{horizontal:r,minRotation:i}){let a=t.toRadians(i),o=(r?Math.sin(a):Math.cos(a))||.001,s=.75*n*(``+e).length;return Math.min(n/o,s)}var Di=class extends Tt{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return t.isNullOrUndef(e)||(typeof e==`number`||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){let{beginAtZero:e}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds(),{min:i,max:a}=this,o=e=>i=n?i:e,s=e=>a=r?a:e;if(e){let e=t.sign(i),n=t.sign(a);e<0&&n<0?s(0):e>0&&n>0&&o(0)}if(i===a){let t=a===0?1:Math.abs(a*.05);s(a+t),e||o(i-t)}this.min=i,this.max=a}getTickLimit(){let{maxTicksLimit:e,stepSize:t}=this.options.ticks,n;return t?(n=Math.ceil(this.max/t)-Math.floor(this.min/t)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${t} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e||=11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return 1/0}buildTicks(){let e=this.options,n=e.ticks,r=this.getTickLimit();r=Math.max(2,r);let i=Ti({maxTicks:r,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},this._range||this);return e.bounds===`ticks`&&t._setMinAndMaxByKey(i,this,`value`),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){let e=this.ticks,t=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){let r=(n-t)/Math.max(e.length-1,1)/2;t-=r,n+=r}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(e){return t.formatNumber(e,this.chart.options.locale,this.options.ticks.format)}},Oi=class extends Di{static id=`linear`;static defaults={ticks:{callback:t.Ticks.formatters.numeric}};determineDataLimits(){let{min:e,max:n}=this.getMinMax(!0);this.min=t.isNumberFinite(e)?e:0,this.max=t.isNumberFinite(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){let e=this.isHorizontal(),n=e?this.width:this.height,r=t.toRadians(this.options.ticks.minRotation),i=(e?Math.sin(r):Math.cos(r))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}},ki=e=>Math.floor(t.log10(e)),Ai=(e,t)=>10**(ki(e)+t);function ji(e){return e/10**ki(e)==1}function Mi(e,t,n){let r=10**n,i=Math.floor(e/r);return Math.ceil(t/r)-i}function Ni(e,t){let n=ki(t-e);for(;Mi(e,t,n)>10;)n++;for(;Mi(e,t,n)<10;)n--;return Math.min(n,ki(e))}function Pi(e,{min:n,max:r}){n=t.finiteOrDefault(e.min,n);let i=[],a=ki(n),o=Ni(n,r),s=o<0?10**Math.abs(o):1,c=10**o,l=a>o?10**a:0,u=Math.round((n-l)*s)/s,d=Math.floor((n-l)/c/10)*c*10,f=Math.floor((u-d)/10**o),p=t.finiteOrDefault(e.min,Math.round((l+d+f*10**o)*s)/s);for(;p<r;)i.push({value:p,major:ji(p),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(o++,f=2,s=o>=0?1:s),p=Math.round((l+d+f*10**o)*s)/s;let m=t.finiteOrDefault(e.max,p);return i.push({value:m,major:ji(m),significand:f}),i}var Fi=class extends Tt{static id=`logarithmic`;static defaults={ticks:{callback:t.Ticks.formatters.logarithmic,major:{enabled:!0}}};constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){let r=Di.prototype.parse.apply(this,[e,n]);if(r===0){this._zero=!0;return}return t.isNumberFinite(r)&&r>0?r:null}determineDataLimits(){let{min:e,max:n}=this.getMinMax(!0);this.min=t.isNumberFinite(e)?Math.max(0,e):null,this.max=t.isNumberFinite(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!t.isNumberFinite(this._userMin)&&(this.min=e===Ai(this.min,0)?Ai(this.min,-1):Ai(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:e,maxDefined:t}=this.getUserBounds(),n=this.min,r=this.max,i=t=>n=e?n:t,a=e=>r=t?r:e;n===r&&(n<=0?(i(1),a(10)):(i(Ai(n,-1)),a(Ai(r,1)))),n<=0&&i(Ai(r,-1)),r<=0&&a(Ai(n,1)),this.min=n,this.max=r}buildTicks(){let e=this.options,n=Pi({min:this._userMin,max:this._userMax},this);return e.bounds===`ticks`&&t._setMinAndMaxByKey(n,this,`value`),e.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(e){return e===void 0?`0`:t.formatNumber(e,this.chart.options.locale,this.options.ticks.format)}configure(){let e=this.min;super.configure(),this._startValue=t.log10(e),this._valueRange=t.log10(this.max)-t.log10(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(t.log10(e)-this._startValue)/this._valueRange)}getValueForPixel(e){let t=this.getDecimalForPixel(e);return 10**(this._startValue+t*this._valueRange)}};function Ii(e){let n=e.ticks;if(n.display&&e.display){let e=t.toPadding(n.backdropPadding);return t.valueOrDefault(n.font&&n.font.size,t.defaults.font.size)+e.height}return 0}function Li(e,n,r){return r=t.isArray(r)?r:[r],{w:t._longestText(e,n.string,r),h:r.length*n.lineHeight}}function Ri(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:e<r||e>i?{start:t-n,end:t}:{start:t,end:t+n}}function zi(e){let n={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},r=Object.assign({},n),i=[],a=[],o=e._pointLabels.length,s=e.options.pointLabels,c=s.centerPointLabels?t.PI/o:0;for(let l=0;l<o;l++){let o=s.setContext(e.getPointLabelContext(l));a[l]=o.padding;let u=e.getPointPosition(l,e.drawingArea+a[l],c),d=t.toFont(o.font),f=Li(e.ctx,d,e._pointLabels[l]);i[l]=f;let p=t._normalizeAngle(e.getIndexAngle(l)+c),m=Math.round(t.toDegrees(p));Bi(r,n,p,Ri(m,u.x,f.w,0,180),Ri(m,u.y,f.h,90,270))}e.setCenterPoint(n.l-r.l,r.r-n.r,n.t-r.t,r.b-n.b),e._pointLabelItems=Ui(e,i,a)}function Bi(e,t,n,r,i){let a=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n)),s=0,c=0;r.start<t.l?(s=(t.l-r.start)/a,e.l=Math.min(e.l,t.l-s)):r.end>t.r&&(s=(r.end-t.r)/a,e.r=Math.max(e.r,t.r+s)),i.start<t.t?(c=(t.t-i.start)/o,e.t=Math.min(e.t,t.t-c)):i.end>t.b&&(c=(i.end-t.b)/o,e.b=Math.max(e.b,t.b+c))}function Vi(e,n,r){let i=e.drawingArea,{extra:a,additionalAngle:o,padding:s,size:c}=r,l=e.getPointPosition(n,i+a+s,o),u=Math.round(t.toDegrees(t._normalizeAngle(l.angle+t.HALF_PI))),d=Ki(l.y,c.h,u),f=Wi(u),p=Gi(l.x,c.w,f);return{visible:!0,x:l.x,y:d,textAlign:f,left:p,top:d,right:p+c.w,bottom:d+c.h}}function Hi(e,n){if(!n)return!0;let{left:r,top:i,right:a,bottom:o}=e;return!(t._isPointInArea({x:r,y:i},n)||t._isPointInArea({x:r,y:o},n)||t._isPointInArea({x:a,y:i},n)||t._isPointInArea({x:a,y:o},n))}function Ui(e,n,r){let i=[],a=e._pointLabels.length,o=e.options,{centerPointLabels:s,display:c}=o.pointLabels,l={extra:Ii(o)/2,additionalAngle:s?t.PI/a:0},u;for(let t=0;t<a;t++){l.padding=r[t],l.size=n[t];let a=Vi(e,t,l);i.push(a),c===`auto`&&(a.visible=Hi(a,u),a.visible&&(u=a))}return i}function Wi(e){return e===0||e===180?`center`:e<180?`left`:`right`}function Gi(e,t,n){return n===`right`?e-=t:n===`center`&&(e-=t/2),e}function Ki(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function qi(e,n,r){let{left:i,top:a,right:o,bottom:s}=r,{backdropColor:c}=n;if(!t.isNullOrUndef(c)){let r=t.toTRBLCorners(n.borderRadius),l=t.toPadding(n.backdropPadding);e.fillStyle=c;let u=i-l.left,d=a-l.top,f=o-i+l.width,p=s-a+l.height;Object.values(r).some(e=>e!==0)?(e.beginPath(),t.addRoundedRectPath(e,{x:u,y:d,w:f,h:p,radius:r}),e.fill()):e.fillRect(u,d,f,p)}}function Ji(e,n){let{ctx:r,options:{pointLabels:i}}=e;for(let a=n-1;a>=0;a--){let n=e._pointLabelItems[a];if(!n.visible)continue;let o=i.setContext(e.getPointLabelContext(a));qi(r,o,n);let s=t.toFont(o.font),{x:c,y:l,textAlign:u}=n;t.renderText(r,e._pointLabels[a],c,l+s.lineHeight/2,s,{color:o.color,textAlign:u,textBaseline:`middle`})}}function Yi(e,n,r,i){let{ctx:a}=e;if(r)a.arc(e.xCenter,e.yCenter,n,0,t.TAU);else{let t=e.getPointPosition(0,n);a.moveTo(t.x,t.y);for(let r=1;r<i;r++)t=e.getPointPosition(r,n),a.lineTo(t.x,t.y)}}function Xi(e,t,n,r,i){let a=e.ctx,o=t.circular,{color:s,lineWidth:c}=t;!o&&!r||!s||!c||n<0||(a.save(),a.strokeStyle=s,a.lineWidth=c,a.setLineDash(i.dash||[]),a.lineDashOffset=i.dashOffset,a.beginPath(),Yi(e,n,o,r),a.closePath(),a.stroke(),a.restore())}function Zi(e,n,r){return t.createContext(e,{label:r,index:n,type:`pointLabel`})}var Qi=class extends Di{static id=`radialLinear`;static defaults={display:!0,animate:!0,position:`chartArea`,angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:t.Ticks.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":`borderColor`,"pointLabels.color":`color`,"ticks.color":`color`};static descriptors={angleLines:{_fallback:`grid`}};constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let e=this._padding=t.toPadding(Ii(this.options)/2),n=this.width=this.maxWidth-e.width,r=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+r/2+e.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){let{min:e,max:n}=this.getMinMax(!1);this.min=t.isNumberFinite(e)&&!isNaN(e)?e:0,this.max=t.isNumberFinite(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ii(this.options))}generateTickLabels(e){Di.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((e,n)=>{let r=t.callback(this.options.pointLabels.callback,[e,n],this);return r||r===0?r:``}).filter((e,t)=>this.chart.getDataVisibility(t))}fit(){let e=this.options;e.display&&e.pointLabels.display?zi(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,n,r){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((n-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,n,r))}getIndexAngle(e){let n=t.TAU/(this._pointLabels.length||1),r=this.options.startAngle||0;return t._normalizeAngle(e*n+t.toRadians(r))}getDistanceFromCenterForValue(e){if(t.isNullOrUndef(e))return NaN;let n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(t.isNullOrUndef(e))return NaN;let n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){let t=this._pointLabels||[];if(e>=0&&e<t.length){let n=t[e];return Zi(this.getContext(),e,n)}}getPointPosition(e,n,r=0){let i=this.getIndexAngle(e)-t.HALF_PI+r;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){let{left:t,top:n,right:r,bottom:i}=this._pointLabelItems[e];return{left:t,top:n,right:r,bottom:i}}drawBackground(){let{backgroundColor:e,grid:{circular:t}}=this.options;if(e){let n=this.ctx;n.save(),n.beginPath(),Yi(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}drawGrid(){let e=this.ctx,t=this.options,{angleLines:n,grid:r,border:i}=t,a=this._pointLabels.length,o,s,c;if(t.pointLabels.display&&Ji(this,a),r.display&&this.ticks.forEach((e,t)=>{if(t!==0||t===0&&this.min<0){s=this.getDistanceFromCenterForValue(e.value);let n=this.getContext(t),o=r.setContext(n),c=i.setContext(n);Xi(this,o,s,a,c)}}),n.display){for(e.save(),o=a-1;o>=0;o--){let r=n.setContext(this.getPointLabelContext(o)),{color:i,lineWidth:a}=r;!a||!i||(e.lineWidth=a,e.strokeStyle=i,e.setLineDash(r.borderDash),e.lineDashOffset=r.borderDashOffset,s=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),c=this.getPointPosition(o,s),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){let e=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;let i=this.getIndexAngle(0),a,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign=`center`,e.textBaseline=`middle`,this.ticks.forEach((i,s)=>{if(s===0&&this.min>=0&&!n.reverse)return;let c=r.setContext(this.getContext(s)),l=t.toFont(c.font);if(a=this.getDistanceFromCenterForValue(this.ticks[s].value),c.showLabelBackdrop){e.font=l.string,o=e.measureText(i.label).width,e.fillStyle=c.backdropColor;let n=t.toPadding(c.backdropPadding);e.fillRect(-o/2-n.left,-a-l.size/2-n.top,o+n.width,l.size+n.height)}t.renderText(e,i.label,0,-a,l,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),e.restore()}drawTitle(){}},$i={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},$=Object.keys($i);function ea(e,t){return e-t}function ta(e,n){if(t.isNullOrUndef(n))return null;let r=e._adapter,{parser:i,round:a,isoWeekday:o}=e._parseOpts,s=n;return typeof i==`function`&&(s=i(s)),t.isNumberFinite(s)||(s=typeof i==`string`?r.parse(s,i):r.parse(s)),s===null?null:(a&&(s=a===`week`&&(t.isNumber(o)||o===!0)?r.startOf(s,`isoWeek`,o):r.startOf(s,a)),+s)}function na(e,t,n,r){let i=$.length;for(let a=$.indexOf(e);a<i-1;++a){let e=$i[$[a]],i=e.steps?e.steps:2**53-1;if(e.common&&Math.ceil((n-t)/(i*e.size))<=r)return $[a]}return $[i-1]}function ra(e,t,n,r,i){for(let a=$.length-1;a>=$.indexOf(n);a--){let n=$[a];if($i[n].common&&e._adapter.diff(i,r,n)>=t-1)return n}return $[n?$.indexOf(n):0]}function ia(e){for(let t=$.indexOf(e)+1,n=$.length;t<n;++t)if($i[$[t]].common)return $[t]}function aa(e,n,r){if(!r)e[n]=!0;else if(r.length){let{lo:i,hi:a}=t._lookup(r,n),o=r[i]>=n?r[i]:r[a];e[o]=!0}}function oa(e,t,n,r){let i=e._adapter,a=+i.startOf(t[0].value,r),o=t[t.length-1].value,s,c;for(s=a;s<=o;s=+i.add(s,1,r))c=n[s],c>=0&&(t[c].major=!0);return t}function sa(e,t,n){let r=[],i={},a=t.length,o,s;for(o=0;o<a;++o)s=t[o],i[s]=o,r.push({value:s,major:!1});return a===0||!n?r:oa(e,r,i,n)}var ca=class extends Tt{static id=`time`;static defaults={bounds:`data`,adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:`millisecond`,displayFormats:{}},ticks:{source:`auto`,callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit=`day`,this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){let r=e.time||={},i=this._adapter=new ve._date(e.adapters.date);i.init(n),t.mergeIf(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,t){return e===void 0?null:ta(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let e=this.options,n=this._adapter,r=e.time.unit||`day`,{min:i,max:a,minDefined:o,maxDefined:s}=this.getUserBounds();function c(e){!o&&!isNaN(e.min)&&(i=Math.min(i,e.min)),!s&&!isNaN(e.max)&&(a=Math.max(a,e.max))}(!o||!s)&&(c(this._getLabelBounds()),(e.bounds!==`ticks`||e.ticks.source!==`labels`)&&c(this.getMinMax(!1))),i=t.isNumberFinite(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),a=t.isNumberFinite(a)&&!isNaN(a)?a:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){let e=this.getLabelTimestamps(),t=1/0,n=-1/0;return e.length&&(t=e[0],n=e[e.length-1]),{min:t,max:n}}buildTicks(){let e=this.options,n=e.time,r=e.ticks,i=r.source===`labels`?this.getLabelTimestamps():this._generate();e.bounds===`ticks`&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);let a=this.min,o=this.max,s=t._filterBetween(i,a,o);return this._unit=n.unit||(r.autoSkip?na(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):ra(this,s.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit===`year`?void 0:ia(this._unit),this.initOffsets(i),e.reverse&&s.reverse(),sa(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,r=0,i,a;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),n=e.length===1?1-i:(this.getDecimalForValue(e[1])-i)/2,a=this.getDecimalForValue(e[e.length-1]),r=e.length===1?a:(a-this.getDecimalForValue(e[e.length-2]))/2);let o=e.length<3?.5:.25;n=t._limitValue(n,0,o),r=t._limitValue(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){let e=this._adapter,n=this.min,r=this.max,i=this.options,a=i.time,o=a.unit||na(a.minUnit,n,r,this._getLabelCapacity(n)),s=t.valueOrDefault(i.ticks.stepSize,1),c=o===`week`?a.isoWeekday:!1,l=t.isNumber(c)||c===!0,u={},d=n,f,p;if(l&&(d=+e.startOf(d,`isoWeek`,c)),d=+e.startOf(d,l?`day`:o),e.diff(r,n,o)>1e5*s)throw Error(n+` and `+r+` are too far apart with stepSize of `+s+` `+o);let m=i.ticks.source===`data`&&this.getDataTimestamps();for(f=d,p=0;f<r;f=+e.add(f,s,o),p++)aa(u,f,m);return(f===r||i.bounds===`ticks`||p===1)&&aa(u,f,m),Object.keys(u).sort(ea).map(e=>+e)}getLabelForValue(e){let t=this._adapter,n=this.options.time;return n.tooltipFormat?t.format(e,n.tooltipFormat):t.format(e,n.displayFormats.datetime)}format(e,t){let n=this.options.time.displayFormats,r=this._unit,i=t||n[r];return this._adapter.format(e,i)}_tickFormatFunction(e,n,r,i){let a=this.options,o=a.ticks.callback;if(o)return t.callback(o,[e,n,r],this);let s=a.time.displayFormats,c=this._unit,l=this._majorUnit,u=c&&s[c],d=l&&s[l],f=r[n],p=l&&d&&f&&f.major;return this._adapter.format(e,i||(p?d:u))}generateTickLabels(e){let t,n,r;for(t=0,n=e.length;t<n;++t)r=e[t],r.label=this._tickFormatFunction(r.value,t,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){let t=this._offsets,n=this.getDecimalForValue(e);return this.getPixelForDecimal((t.start+n)*t.factor)}getValueForPixel(e){let t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return this.min+n*(this.max-this.min)}_getLabelSize(e){let n=this.options.ticks,r=this.ctx.measureText(e).width,i=t.toRadians(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(i),o=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:r*a+s*o,h:r*o+s*a}}_getLabelCapacity(e){let t=this.options.time,n=t.displayFormats,r=n[t.unit]||n.millisecond,i=this._tickFormatFunction(e,0,sa(this,[e],this._majorUnit),r),a=this._getLabelSize(i),o=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return o>0?o:1}getDataTimestamps(){let e=this._cache.data||[],t,n;if(e.length)return e;let r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(t=0,n=r.length;t<n;++t)e=e.concat(r[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){let e=this._cache.labels||[],t,n;if(e.length)return e;let r=this.getLabels();for(t=0,n=r.length;t<n;++t)e.push(ta(this,r[t]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return t._arrayUnique(e.sort(ea))}};function la(e,n,r){let i=0,a=e.length-1,o,s,c,l;r?(n>=e[i].pos&&n<=e[a].pos&&({lo:i,hi:a}=t._lookupByKey(e,`pos`,n)),{pos:o,time:c}=e[i],{pos:s,time:l}=e[a]):(n>=e[i].time&&n<=e[a].time&&({lo:i,hi:a}=t._lookupByKey(e,`time`,n)),{time:o,pos:c}=e[i],{time:s,pos:l}=e[a]);let u=s-o;return u?c+(l-c)*(n-o)/u:c}var ua=class extends ca{static id=`timeseries`;static defaults=ca.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=la(t,this.min),this._tableRange=la(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){let{min:t,max:n}=this,r=[],i=[],a,o,s,c,l;for(a=0,o=e.length;a<o;++a)c=e[a],c>=t&&c<=n&&r.push(c);if(r.length<2)return[{time:t,pos:0},{time:n,pos:1}];for(a=0,o=r.length;a<o;++a)l=r[a+1],s=r[a-1],c=r[a],Math.round((l+s)/2)!==c&&i.push({time:c,pos:a/(o-1)});return i}_generate(){let e=this.min,t=this.max,n=super.getDataTimestamps();return(!n.includes(e)||!n.length)&&n.splice(0,0,e),(!n.includes(t)||n.length===1)&&n.push(t),n.sort((e,t)=>e-t)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;let t=this.getDataTimestamps(),n=this.getLabelTimestamps();return e=t.length&&n.length?this.normalize(t.concat(n)):t.length?t:n,e=this._cache.all=e,e}getDecimalForValue(e){return(la(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){let t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return la(this._table,n*this._tableRange+this._minPos,!0)}},da=Object.freeze({__proto__:null,CategoryScale:wi,LinearScale:Oi,LogarithmicScale:Fi,RadialLinearScale:Qi,TimeScale:ca,TimeSeriesScale:ua}),fa=[_e,Gn,yi,da];e.Ticks=t.Ticks,e.defaults=t.defaults,e.Animation=a,e.Animations=o,e.ArcElement=yn,e.BarController=le,e.BarElement=Wn,e.BasePlatform=Ge,e.BasicPlatform=z,e.BubbleController=ue,e.CategoryScale=wi,e.Chart=un,e.Colors=rr,e.DatasetController=O,e.Decimation=lr,e.DomPlatform=it,e.DoughnutController=F,e.Element=q,e.Filler=zr,e.Interaction=De,e.Legend=Jr,e.LineController=fe,e.LineElement=Mn,e.LinearScale=Oi,e.LogarithmicScale=Fi,e.PieController=me,e.PointElement=Pn,e.PolarAreaController=pe,e.RadarController=he,e.RadialLinearScale=Qi,e.Scale=Tt,e.ScatterController=ge,e.SubTitle=$r,e.TimeScale=ca,e.TimeSeriesScale=ua,e.Title=Zr,e.Tooltip=vi,e._adapters=ve,e._detectPlatform=at,e.animator=n,e.controllers=_e,e.elements=Gn,e.layouts=R,e.plugins=yi,e.registerables=fa,e.registry=J,e.scales=da})),Me=e(r(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(je()):typeof define==`function`&&define.amd?define([`chart.js`],r):(n=typeof globalThis<`u`?globalThis:n||self).index=r(n.Chart)})(e,(function(e){var t={value:()=>{}};function n(){for(var e,t=0,n=arguments.length,i={};t<n;++t){if(!(e=arguments[t]+``)||e in i||/[\s.]/.test(e))throw Error(`illegal type: `+e);i[e]=[]}return new r(i)}function r(e){this._=e}function i(e,t){return e.trim().split(/^|\s+/).map((function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}}))}function a(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function o(e,n,r){for(var i=0,a=e.length;i<a;++i)if(e[i].name===n){e[i]=t,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:n,value:r}),e}r.prototype=n.prototype={constructor:r,on:function(e,t){var n,r=this._,s=i(e+``,r),c=-1,l=s.length;if(!(arguments.length<2)){if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++c<l;)if(n=(e=s[c]).type)r[n]=o(r[n],e.name,t);else if(t==null)for(n in r)r[n]=o(r[n],e.name,null);return this}for(;++c<l;)if((n=(e=s[c]).type)&&(n=a(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new r(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=0,n=(r=this._[e]).length;a<n;++a)r[a].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};var s=`http://www.w3.org/1999/xhtml`,c={svg:`http://www.w3.org/2000/svg`,xhtml:s,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function l(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),c.hasOwnProperty(t)?{space:c[t],local:e}:e}function u(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===s&&t.documentElement.namespaceURI===s?t.createElement(e):t.createElementNS(n,e)}}function d(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function f(e){var t=l(e);return(t.local?d:u)(t)}function p(){}function m(e){return e==null?p:function(){return this.querySelector(e)}}function h(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function g(){return[]}function _(e){return function(t){return t.matches(e)}}var v=Array.prototype.find;function y(){return this.firstElementChild}var b=Array.prototype.filter;function x(){return Array.from(this.children)}function S(e){return Array(e.length)}function C(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function w(e){return function(){return e}}function T(e,t,n,r,i,a){for(var o,s=0,c=t.length,l=a.length;s<l;++s)(o=t[s])?(o.__data__=a[s],r[s]=o):n[s]=new C(e,a[s]);for(;s<c;++s)(o=t[s])&&(i[s]=o)}function E(e,t,n,r,i,a,o){var s,c,l,u=new Map,d=t.length,f=a.length,p=Array(d);for(s=0;s<d;++s)(c=t[s])&&(p[s]=l=o.call(c,c.__data__,s,t)+``,u.has(l)?i[s]=c:u.set(l,c));for(s=0;s<f;++s)l=o.call(e,a[s],s,a)+``,(c=u.get(l))?(r[s]=c,c.__data__=a[s],u.delete(l)):n[s]=new C(e,a[s]);for(s=0;s<d;++s)(c=t[s])&&u.get(p[s])===c&&(i[s]=c)}function D(e){return e.__data__}function O(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function k(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function A(e){return function(){this.removeAttribute(e)}}function j(e){return function(){this.removeAttributeNS(e.space,e.local)}}function M(e,t){return function(){this.setAttribute(e,t)}}function ee(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function te(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function ne(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function N(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function P(e){return function(){this.style.removeProperty(e)}}function re(e,t,n){return function(){this.style.setProperty(e,t,n)}}function ie(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function ae(e,t){return e.style.getPropertyValue(t)||N(e).getComputedStyle(e,null).getPropertyValue(t)}function oe(e){return function(){delete this[e]}}function se(e,t){return function(){this[e]=t}}function ce(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function le(e){return e.trim().split(/^|\s+/)}function ue(e){return e.classList||new de(e)}function de(e){this._node=e,this._names=le(e.getAttribute(`class`)||``)}function F(e,t){for(var n=ue(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function fe(e,t){for(var n=ue(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function pe(e){return function(){F(this,e)}}function me(e){return function(){fe(this,e)}}function he(e,t){return function(){(t.apply(this,arguments)?F:fe)(this,e)}}function ge(){this.textContent=``}function _e(e){return function(){this.textContent=e}}function I(e){return function(){this.textContent=e.apply(this,arguments)??``}}function ve(){this.innerHTML=``}function ye(e){return function(){this.innerHTML=e}}function be(e){return function(){this.innerHTML=e.apply(this,arguments)??``}}function xe(){this.nextSibling&&this.parentNode.appendChild(this)}function Se(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ce(){return null}function we(){var e=this.parentNode;e&&e.removeChild(this)}function Te(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ee(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function De(e){return e.trim().split(/^|\s+/).map((function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}function Oe(e){return function(){var t=this.__on;if(t){for(var n,r=0,i=-1,a=t.length;r<a;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?t.length=i:delete this.__on}}}function ke(e,t,n){return function(){var r,i=this.__on,a=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(i){for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=t)}this.addEventListener(e.type,a,n),r={type:e.type,name:e.name,value:t,listener:a,options:n},i?i.push(r):this.__on=[r]}}function Ae(e,t,n){var r=N(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function je(e,t){return function(){return Ae(this,e,t)}}function Me(e,t){return function(){return Ae(this,e,t.apply(this,arguments))}}C.prototype={constructor:C,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},de.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};var Ne=[null];function L(e,t){this._groups=e,this._parents=t}function Pe(e){return typeof e==`string`?new L([[document.querySelector(e)]],[document.documentElement]):new L([[e]],Ne)}function Fe(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}L.prototype={constructor:L,select:function(e){typeof e!=`function`&&(e=m(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a,o,s=t[i],c=s.length,l=r[i]=Array(c),u=0;u<c;++u)(a=s[u])&&(o=e.call(a,a.__data__,u,s))&&(`__data__`in a&&(o.__data__=a.__data__),l[u]=o);return new L(r,this._parents)},selectAll:function(e){e=typeof e==`function`?function(e){return function(){return h(e.apply(this,arguments))}}(e):function(e){return e==null?g:function(){return this.querySelectorAll(e)}}(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o,s=t[a],c=s.length,l=0;l<c;++l)(o=s[l])&&(r.push(e.call(o,o.__data__,l,s)),i.push(o));return new L(r,i)},selectChild:function(e){return this.select(e==null?y:function(e){return function(){return v.call(this.children,e)}}(typeof e==`function`?e:_(e)))},selectChildren:function(e){return this.selectAll(e==null?x:function(e){return function(){return b.call(this.children,e)}}(typeof e==`function`?e:_(e)))},filter:function(e){typeof e!=`function`&&(e=function(e){return function(){return this.matches(e)}}(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a,o=t[i],s=o.length,c=r[i]=[],l=0;l<s;++l)(a=o[l])&&e.call(a,a.__data__,l,o)&&c.push(a);return new L(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,D);var n=t?E:T,r=this._parents,i=this._groups;typeof e!=`function`&&(e=w(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=O(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _,v,y=0,b=0;y<m;++y)if(_=h[y]){for(y>=b&&(b=y+1);!(v=g[b])&&++b<m;);_._next=v||null}}return(o=new L(o,r))._enter=s,o._exit=c,o},enter:function(){return new L(this._enter||this._groups.map(S),this._parents)},exit:function(){return new L(this._exit||this._groups.map(S),this._parents)},join:function(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r))&&(r=r.selection()):r=r.append(e+``),t!=null&&(i=t(i))&&(i=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l,u=n[c],d=r[c],f=u.length,p=s[c]=Array(f),m=0;m<f;++m)(l=u[m]||d[m])&&(p[m]=l);for(;c<i;++c)s[c]=n[c];return new L(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,i=e[t],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||=k;for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,l=i[a]=Array(c),u=0;u<c;++u)(o=s[u])&&(l[u]=o);l.sort(t)}return new L(i,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){let e=0;for(let t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i,a=t[n],o=0,s=a.length;o<s;++o)(i=a[o])&&e.call(i,i.__data__,o,a);return this},attr:function(e,t){var n=l(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?j:A:typeof t==`function`?n.local?ne:te:n.local?ee:M)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((t==null?P:typeof t==`function`?ie:re)(e,t,n??``)):ae(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((t==null?oe:typeof t==`function`?ce:se)(e,t)):this.node()[e]},classed:function(e,t){var n=le(e+``);if(arguments.length<2){for(var r=ue(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?he:t?pe:me)(n,t))},text:function(e){return arguments.length?this.each(e==null?ge:(typeof e==`function`?I:_e)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(e==null?ve:(typeof e==`function`?be:ye)(e)):this.node().innerHTML},raise:function(){return this.each(xe)},lower:function(){return this.each(Se)},append:function(e){var t=typeof e==`function`?e:f(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n=typeof e==`function`?e:f(e),r=t==null?Ce:typeof t==`function`?t:m(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(we)},clone:function(e){return this.select(e?Ee:Te)},datum:function(e){return arguments.length?this.property(`__data__`,e):this.node().__data__},on:function(e,t,n){var r,i,a=De(e+``),o=a.length;if(!(arguments.length<2)){for(s=t?ke:Oe,r=0;r<o;++r)this.each(s(a[r],t,n));return this}var s=this.node().__on;if(s){for(var c,l=0,u=s.length;l<u;++l)for(r=0,c=s[l];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value}},dispatch:function(e,t){return this.each((typeof t==`function`?Me:je)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,i=e[t],a=0,o=i.length;a<o;++a)(r=i[a])&&(yield r)}};let Ie={passive:!1},Le={capture:!0,passive:!1};function Re(e){e.stopImmediatePropagation()}function ze(e){e.preventDefault(),e.stopImmediatePropagation()}var Be=e=>()=>e;function Ve(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:c,dy:l,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:u}})}function He(e){return!e.ctrlKey&&!e.button}function Ue(){return this.parentNode}function We(e,t){return t??{x:e.x,y:e.y}}function R(){return navigator.maxTouchPoints||`ontouchstart`in this}function Ge(){var e,t,r,i,a=He,o=Ue,s=We,c=R,l={},u=n(`start`,`drag`,`end`),d=0,f=0;function p(e){e.on(`mousedown.drag`,m).filter(c).on(`touchstart.drag`,_).on(`touchmove.drag`,v,Ie).on(`touchend.drag touchcancel.drag`,y).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function m(n,s){if(!i&&a.call(this,n,s)){var c=b(this,o.call(this,n,s),n,s,`mouse`);c&&(Pe(n.view).on(`mousemove.drag`,h,Le).on(`mouseup.drag`,g,Le),function(e){var t=e.document.documentElement,n=Pe(e).on(`dragstart.drag`,ze,Le);`onselectstart`in t?n.on(`selectstart.drag`,ze,Le):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=`none`)}(n.view),Re(n),r=!1,e=n.clientX,t=n.clientY,c(`start`,n))}}function h(n){if(ze(n),!r){var i=n.clientX-e,a=n.clientY-t;r=i*i+a*a>f}l.mouse(`drag`,n)}function g(e){Pe(e.view).on(`mousemove.drag mouseup.drag`,null),function(e,t){var n=e.document.documentElement,r=Pe(e).on(`dragstart.drag`,null);t&&(r.on(`click.drag`,ze,Le),setTimeout((function(){r.on(`click.drag`,null)}),0)),`onselectstart`in n?r.on(`selectstart.drag`,null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(e.view,r),ze(e),l.mouse(`end`,e)}function _(e,t){if(a.call(this,e,t)){var n,r,i=e.changedTouches,s=o.call(this,e,t),c=i.length;for(n=0;n<c;++n)(r=b(this,s,e,t,i[n].identifier,i[n]))&&(Re(e),r(`start`,e,i[n]))}}function v(e){var t,n,r=e.changedTouches,i=r.length;for(t=0;t<i;++t)(n=l[r[t].identifier])&&(ze(e),n(`drag`,e,r[t]))}function y(e){var t,n,r=e.changedTouches,a=r.length;for(i&&clearTimeout(i),i=setTimeout((function(){i=null}),500),t=0;t<a;++t)(n=l[r[t].identifier])&&(Re(e),n(`end`,e,r[t]))}function b(e,t,n,r,i,a){var o,c,f,m=u.copy(),h=Fe(a||n,t);if((f=s.call(e,new Ve(`beforestart`,{sourceEvent:n,target:p,identifier:i,active:d,x:h[0],y:h[1],dx:0,dy:0,dispatch:m}),r))!=null)return o=f.x-h[0]||0,c=f.y-h[1]||0,function n(a,s,u){var g,_=h;switch(a){case`start`:l[i]=n,g=d++;break;case`end`:delete l[i],--d;case`drag`:h=Fe(u||s,t),g=d}m.call(a,e,new Ve(a,{sourceEvent:s,subject:f,target:p,identifier:i,active:g,x:h[0]+o,y:h[1]+c,dx:h[0]-_[0],dy:h[1]-_[1],dispatch:m}),r)}}return p.filter=function(e){return arguments.length?(a=typeof e==`function`?e:Be(!!e),p):a},p.container=function(e){return arguments.length?(o=typeof e==`function`?e:Be(e),p):o},p.subject=function(e){return arguments.length?(s=typeof e==`function`?e:Be(e),p):s},p.touchable=function(e){return arguments.length?(c=typeof e==`function`?e:Be(!!e),p):c},p.on=function(){var e=u.on.apply(u,arguments);return e===u?p:e},p.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,p):Math.sqrt(f)},p}let z,B,Ke,V,qe,Je,Ye,H,Xe,U,W;Ve.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};let G=!1;function K(e,t){return isNaN(t)?e:Math.round(e*10**t)/10**t}function Ze(e,t,n,r,i){let a,o,s=t.data.datasets[n].data[r];if(e.touches?(a=t.scales[Ke].getValueForPixel(e.touches[0].clientX-t.canvas.getBoundingClientRect().left),o=t.scales[B].getValueForPixel(e.touches[0].clientY-t.canvas.getBoundingClientRect().top)):(a=t.scales[Ke].getValueForPixel(e.clientX-t.canvas.getBoundingClientRect().left),o=t.scales[B].getValueForPixel(e.clientY-t.canvas.getBoundingClientRect().top)),a=K(a,t.config.options.plugins.dragData.round),o=K(o,t.config.options.plugins.dragData.round),a=a>t.scales[Ke].max?t.scales[Ke].max:a,a=a<t.scales[Ke].min?t.scales[Ke].min:a,o=o>t.scales[B].max?t.scales[B].max:o,o=o<t.scales[B].min?t.scales[B].min:o,Ye){let e;return e=t.config.options.indexAxis===`y`?a:o,Math.abs(e-s[0])<=Math.abs(e-s[1])?[e,s[1]]:[s[0],e]}return s.x!==void 0&&t.config.options.plugins.dragData.dragX&&(s.x=a),s.y===void 0?t.config.options.indexAxis===`y`?a:o:(!1!==t.config.options.plugins.dragData.dragY&&(s.y=o),s)}let Qe=(e,t,n,r)=>{if(z){Xe=z.datasetIndex,U=z.index,G=!0;let i=t.data.datasets[Xe].data[U];i=qe===`radar`||qe===`polarArea`?function(e,t){let n,r,i;e.touches?(n=e.touches[0].clientX-t.canvas.getBoundingClientRect().left,r=e.touches[0].clientY-t.canvas.getBoundingClientRect().top):(n=e.clientX-t.canvas.getBoundingClientRect().left,r=e.clientY-t.canvas.getBoundingClientRect().top);let a=t.scales[V],o=Math.sqrt((n-a.xCenter)**2+(r-a.yCenter)**2),s=a.drawingArea/(a.max-a.min);return i=a.options.ticks.reverse?a.max-o/s:a.min+o/s,i=K(i,t.config.options.plugins.dragData.round),i=i>t.scales[V].max?t.scales[V].max:i,i=i<t.scales[V].min?t.scales[V].min:i,i}(e,t):Je?K(Ze(e,t,Xe,U)-H,n.round):Ze(e,t,Xe,U),(!r||typeof r==`function`&&!1!==r(e,Xe,U,i))&&(t.data.datasets[Xe].data[U]=i,t.update(`none`))}},$e={id:`dragdata`,afterInit:function(e){if(e.config.options.plugins&&e.config.options.plugins.dragData){let t=e.config.options.plugins.dragData;Pe(e.canvas).call(Ge().container(e.canvas).on(`start`,(n=>((e,t,n)=>{if(z=t.getElementsAtEventForMode(e,`nearest`,{intersect:!0},!1)[0],qe=t.config.type,z){let r=z.datasetIndex,i=z.index;W=function(e){try{return e()}catch{return``}}((()=>t.config.options.plugins.tooltip.animation));let a=t.data.datasets[r],o=t.getDatasetMeta(r),s=a.data[i];if(Ke=o.xAxisID,B=o.yAxisID,V=o.rAxisID,!1===a.dragData||t.config.options.scales[Ke]&&!1===t.config.options.scales[Ke].dragData||t.config.options.scales[B]&&!1===t.config.options.scales[B].dragData||t.config.options.scales[V]&&!1===t.config.options.scales[V].rAxisID||!1===a.data[z.index].dragData)return void(z=null);if(qe===`bar`){Je=t.config.options.scales[Ke].stacked;let n=t.data.datasets[0].data[0];Ye=n!==null&&Array.isArray(n)&&n.length==2,H=Ze(e,t,r,i)-s}(t.config.options.plugins.dragData.showTooltip===void 0||t.config.options.plugins.dragData.showTooltip)&&(t.config.options.plugins.tooltip||(t.config.options.plugins.tooltip={}),t.config.options.plugins.tooltip.animation=!1),typeof n==`function`&&z&&!1===n(e,r,i,s)&&(z=null)}})(n.sourceEvent,e,t.onDragStart))).on(`drag`,(n=>Qe(n.sourceEvent,e,t,t.onDrag))).on(`end`,(n=>((e,t,n)=>{if(U=void 0,G=!1,t.config.options.plugins.tooltip&&(t.config.options.plugins.tooltip.animation=W,t.update(`none`)),typeof n==`function`&&z){let r=z.datasetIndex,i=z.index;return n(e,r,i,function(e,t,n){let r=e.config.options.plugins.dragData;if(!r.magnet)return e.data.datasets[t].data[n];{let i=r.magnet;if(i.to&&typeof i.to==`function`){let r=e.data.datasets[t].data[n];return r=i.to(r),e.data.datasets[t].data[n]=r,e.update(`none`),r}}}(t,r,i))}})(n.sourceEvent,e,t.onDragEnd))))}},beforeEvent:function(e){if(G)return e.tooltip&&e.tooltip.update(),!1}};return e.Chart.register($e),$e}))}))(),1),Ne=e(n(),1);const L=(e,t)=>{let{options:n}=t??{},{interactions:r}=n??{},[i,a]=(0,Ne.useState)(!1),s=(({datasets:e,options:t})=>{let{annotations:{controlAnnotation:n,showAnnotations:r,annotationsData:i}={}}=t,a=n&&r&&i?.length?i.map((e,t)=>({isAnnotation:!0,label:e?.label,annotationIndex:t,backgroundColor:e?.color||o[t],borderColor:e?.color||o[t],data:[],type:C.Bar})):[],s=[...e,...a];return s?.map((t,n)=>{let r=o,i=t?.data?.map(t=>{let i=e?.length>1?n:0;return r?.[i]||le(o)}),a=t?.backgroundColor||i?.map(e=>e+`99`),c=`borderWidth`in s?{borderWidth:parseFloat(String(s?.borderWidth))??1}:{};return{...t,...c,borderColor:t?.borderColor||i?.[n],backgroundColor:a}})||[]})({datasets:t?.data?.datasets,options:n}),c=(e,t,n)=>{n.resetZoom()},l=(e,t)=>{if(i&&!t?.length&&(a(!1),r?.onUnhover&&r?.onUnhover(e)),!i&&t?.length&&(a(!0),r.onHover)){let{index:n,datasetIndex:i}=t?.[0]??{},a=s;r?.onHover(e,i,n,a)}};return(0,Ne.useMemo)(()=>({generatedDatasets:s,onClick:c,onHover:l}),[e,t])};var Pe=(e,{stacked:t,stackedX:n,stackedY:r})=>e===s.X?n??t:e===s.Y?r??t:t,Fe=({chart:e,axisType:t=s.X,currentScale:n,i:r})=>{let{data:i,options:a}=e??{},o=fe(a.direction),c=n||a?.axes?.[t]?.[0],l=o&&t===s.Y||!o&&t===s.X,u=c?.gridLines||{};return{type:(()=>{let e=i.labels?m.Category:m.Linear;return t===(o?s.X:s.Y)?e:a?.additionalAxesOptions?.chartScaleType})(),position:c?.position,beginAtZero:a?.additionalAxesOptions?.beginAtZero,reverse:(()=>t===(o?s.Y:s.X)?a?.additionalAxesOptions?.reverse:!1)(),suggestedMax:a?.additionalAxesOptions?.suggestedMax,suggestedMin:a?.additionalAxesOptions?.suggestedMin,min:l?a?.additionalAxesOptions?.min:void 0,max:l?a?.additionalAxesOptions?.max:void 0,title:{display:c?.label?.length||c?.unit?.length,text:c?.label||c?.unit,padding:0},ticks:(()=>{let e=a?.additionalAxesOptions,n=a?.scales?.[`${r===0?t:t+r}`]?.ticks,i=l&&e?.chartScaleType===m.Logarithmic,o=(e,t,n)=>i?f.includes(Number(e))?we(e,n):``:we(e,n),u={...i?{}:{stepSize:c.stepSize??(t===s.Y?e?.stepSize:null)},includeBounds:!1,...n,font:{size:12}};return e?.chartScaleType===m.Logarithmic&&(u.callback=o),u})(),grid:{...u},stacked:Pe(t,a?.additionalAxesOptions)}},Ie=(e,t)=>(e?.options?.axes?.[t]||[]).reduce((n,r,i)=>{let a=r;a.color=r.color||o[i]||le(o),a.position=r.position||O(t,i);let s=Fe({chart:e,axisType:t,currentScale:a}),c=i===0?t:`${t}${i+1}`;return{...n,[c]:s}},{}),Le=e=>{let t=e.options.axes.x?.length>1,n=e.options.axes.y?.length>1,r=t?Ie(e,s.X):{x:Fe({chart:e,axisType:s.X})},i=n?Ie(e,s.Y):{y:Fe({chart:e,axisType:s.Y})};return{...r,...i}},Re=e=>{let{beginAtZero:t,reverse:n}=e?.additionalAxesOptions||{},r=(e,t)=>{let{datasetIndex:n,dataIndex:r}=t,i=t.chart.data.datasets[n].data[r],a=``;if(typeof i==`number`&&(a=Number.isInteger(i)?i:i.toFixed(2)),Array.isArray(i))if(i.length===2){let e=i[1]-i[0];a=e<0?ce(e,2):`+${ce(e,2)}`}else a=i.reduce((e,t,n)=>n===0?`${e} ${t}`:`${e}, ${t}`,``);return a},i=n?F.End:F.Start,a=n?F.Start:F.End;return e?.graph?.showDataLabels?{display:p,align:t?F.Center:i,anchor:t?F.Center:a,formatter:r}:{display:!1}},ze=e=>{let t=t=>{let n=fe(e.direction),r=Array.isArray(e.axes?.x)?e.axes.x:[],i=Array.isArray(e.axes?.y)?e.axes.y:[],a=e=>{if(!e)return 0;let t=e.match(/\d+$/);return t?parseInt(t[0],10)-1:0},o=a(t?.xAxisID),s=a(t?.yAxisID),c=n?r[o]:i[s],l=n?i[s]:r[o];return{titleAxisLabel:c?.label||``,valueAxisLabel:l?.label||``,titleLabel:g.X,valueLabel:g.Y,titleUnit:c?.unit||``,valueUnit:l?.unit||``}},n=(e,n)=>{let r=e?.[0]?.label||``,{titleAxisLabel:i,titleUnit:a}=t(e?.[0]?.dataset);return(!i&&!a?``:`${i||a}: `)+r},r=t=>{let n={};return e?.tooltip?.scientificNotation?(Math.abs(t)<1e-4||Math.abs(t)>1e7)&&(n={roundScientificCoefficient:3}):n={scientific:!1},k(te(t),n)};return{enabled:e?.tooltip?.tooltips,mode:ue.Nearest,intersect:!0,padding:8,boxWidth:12,boxHeight:12,boxPadding:4,callbacks:{title:n,label:n=>{let{showLabelsInTooltips:i=!1}=e?.tooltip||{},a=n.dataset?.label||``,{valueUnit:o,valueAxisLabel:s}=t(n.dataset),c=()=>{let e=n?.raw,t=typeof e==`number`?r(e):``,i=``;return typeof n.raw==`number`&&(i=t),Array.isArray(n.raw)?i=n.raw.reduce((e,t,n)=>n===0?`${e} ${t}`:`${e}, ${t}`,``):typeof n.raw==`object`&&(i=t),i},l=a===s||s.includes(a);return`${a}: ${c()} ${o?`[${o}] `:``}${l?``:s}${E(n,i)}`},afterLabel:re}}};const Be=({chart:e,chartRef:t})=>{let{options:n}=e,{chartStyling:r,dragData:i}=n,{state:a}=ve(),{annotation:o}=a,{onClick:c,onHover:l}=L(t,e),{legend:d,customLegendPlugin:f}=_e({chartRef:t,options:n});return{onClick:c,onHover:l,indexAxis:fe(n.direction)?s.X:s.Y,maintainAspectRatio:r.maintainAspectRatio,animation:r.performanceMode&&{duration:u.FAST},hover:{mode:ue.Nearest,intersect:!0},scales:Le(e),plugins:{title:A(n),datalabels:Re(n),annotation:ge(o),tooltip:ze(n),legend:{...d,display:!1,events:[]},customLegendPlugin:f,chartAreaBorder:{borderColor:x},dragData:i?.enableDragData&&Ee(n)}}};var Ve={chart:`_chart_x1sru_1`,canvas:`_canvas_x1sru_10`,fixedHeight:`_fixedHeight_x1sru_19`,stretchHeight:`_stretchHeight_x1sru_25`,zoomForm:`_zoomForm_x1sru_38`,zoomReset:`_zoomReset_x1sru_46`,help:`_help_x1sru_49`,autoWeight:`_autoWeight_x1sru_53`,actions:`_actions_x1sru_57`},He=e=>({x:e?.x||[{}],y:e?.y||[{}]}),Ue=e=>({chartScaleType:e?.chartScaleType||`linear`,reverse:e?.reverse||!1,stacked:e?.stacked||!1,beginAtZero:e?.beginAtZero??!0,stepSize:e?.stepSize,suggestedMin:e?.suggestedMin,suggestedMax:e?.suggestedMax,min:e?.min,max:e?.max,stackedX:e?.stackedX,stackedY:e?.stackedY}),We=e=>({width:e?.width,height:e?.height,maintainAspectRatio:e?.maintainAspectRatio||!1,staticChartHeight:e?.staticChartHeight||!1,performanceMode:e?.performanceMode??!0}),R=e=>({tooltips:e?.tooltips??!0,showLabelsInTooltips:e?.showLabelsInTooltips||!1,scientificNotation:e?.scientificNotation??!0}),Ge=e=>({showDataLabels:e?.showDataLabels||!1,showMinorGridlines:e?.showMinorGridlines||!1}),z=e=>e?e.map(e=>({...e,display:e?.display??!0})):[],B=e=>({showAnnotations:e?.showAnnotations??!0,controlAnnotation:e?.controlAnnotation||!1,annotationsData:z(e?.annotationsData)}),Ke=e=>({display:e?.display??!0,position:e?.position||ne.TopLeft,align:e?.align||F.Center,customLegend:e?.customLegend||{customLegendPlugin:null,customLegendContainerID:``}}),V=e=>({enableZoom:e?.enableZoom||!1,enablePan:e?.enablePan||!1}),qe=e=>({onLegendClick:e?.onLegendClick,onHover:e?.onHover,onUnhover:e?.onUnhover}),Je=e=>({enableDragData:e?.enableDragData??!1,showTooltip:e?.showTooltip??!0,roundPoints:e?.roundPoints??!0,dragX:e?.dragX??!0,dragY:e?.dragY??!0,onDragStart:e?.onDragStart,onDrag:e?.onDrag,onDragEnd:e?.onDragEnd});const Ye=e=>{let t=e?.chart||{},n=t?.options||{};return{testId:t?.testId??``,controlsPortalId:t?.controlsPortalId??``,data:t?.data,options:{title:n?.title||``,direction:n?.direction||`vertical`,axes:He(n?.axes),additionalAxesOptions:Ue(n?.additionalAxesOptions),chartStyling:We(n?.chartStyling),tooltip:R(n?.tooltip),graph:Ge(n?.graph),annotations:B(n?.annotations),legend:Ke(n?.legend),chartOptions:V(n?.chartOptions),interactions:qe(n?.interactions),dragData:Je(n?.dragData)}}};var H=e(t(),1);de.register(v,a,l,c,P,S,h,b,_,N,ee,ie,he,Me.default);var Xe=e=>{D();let t=(0,Ne.useRef)(null),n=Ye(e),{translations:r,languageKey:i}=Ce(),{options:a,testId:o,controlsPortalId:s}=n,{chartStyling:c,graph:l}=a,{generatedDatasets:u}=L(t,n),d=Be({chart:n,chartRef:t}),f=!a?.legend?.customLegend?.customLegendContainerID;return(0,H.jsxs)(`div`,{className:oe(c,Ve),style:{width:c.width||`auto`,height:c.height||`auto`},"data-testid":o,children:[(0,H.jsx)(Se,{controlsPortalId:s,children:(0,H.jsx)(`div`,{className:Ve.actions,children:(0,H.jsx)(me,{text:r.downloadAsPNG,placement:`bottom-end`,children:(0,H.jsx)(xe,{small:!0,basic:!0,colored:`muted`,round:!0,icon:`download`,onClick:()=>Te(t)})})})}),(0,H.jsx)(ye,{backend:pe,context:window,children:(0,H.jsxs)(`div`,{className:Ve.canvas,id:`canvas`,children:[(0,H.jsx)(j,{ref:t,data:{labels:n?.data?.labels?.length?n.data.labels:[``],datasets:u},options:d,plugins:M(l,a.legend)}),f&&!!u.length&&(0,H.jsx)(be,{chartRef:t,legendConfig:{options:a,generatedDatasets:u,chartType:I.BAR}})]})})]},i)},U=e=>{let{options:t}=Ye(e);return(0,H.jsx)(ae,{options:t,children:(0,H.jsx)(Xe,{...e})})};U.__docgenInfo={description:``,methods:[],displayName:`BarChartWithLegend`,props:{chart:{required:!0,tsType:{name:`IBarChartData`},description:``}}};var W=[`United Kingdom`,`Norway`,`France`],G={label:`Cats`,data:[3.12,8,7]},K={label:`Dogs`,data:[1,2,3]},Ze={label:`Parrots`,data:[5,0,4]},Qe={label:`Cats`,data:[3,8,7],yAxisID:`y`},$e={label:`Dogs`,data:[1,2,3],yAxisID:`y2`},et={label:`Parrots`,data:[5,0,4],yAxisID:`y2`},tt={label:`Cats`,data:[3,8,7],stack:1},nt={label:`Dogs`,data:[1,2,3],stack:1},rt={label:`Parrots`,data:[5,0,4],stack:2},it={label:`Cats`,data:[1e3,2e3,3e3],stack:1},at={label:`Dogs`,data:[4e3,5e3,6e3],stack:1},q={label:`Cats`,data:[42,57,64]},ot={label:`Cats`,data:[210,333,248]},st={label:`Income`,data:[100,[100,120],[120,130],[130,80],80],backgroundColor:[`lightGray`,`lightGreen`,`lightGreen`,`pink`,`lightGray`]},ct={data:{labels:W,datasets:[G]}},lt={data:{labels:W,datasets:[{...G,label:`Men`,backgroundColor:`lightblue`},{...K,label:`Women`,backgroundColor:`pink`}]}},ut={data:{labels:W,datasets:[{...G,backgroundColor:[`gray`,`red`,`gray`]}]}},dt={data:{labels:W,datasets:[G,K,Ze]}},ft={data:{labels:W,datasets:[G,K,Ze]},options:{title:`Stacked`,additionalAxesOptions:{stacked:!0}}},pt={data:{labels:W,datasets:[Qe,$e,et]},options:{title:`Multiple y axes`,axes:{y:[{},{gridLines:{drawOnChartArea:!1}}]}}},mt={data:{labels:W,datasets:[tt,nt,rt]},options:{title:`Grouped stacked`,additionalAxesOptions:{stacked:!0}}},ht={data:{labels:W,datasets:[G]},options:{title:`reversed vertical`,additionalAxesOptions:{reverse:!0}}},gt={data:{labels:W,datasets:[G]},options:{title:`horizontal`,direction:`horizontal`}},_t={data:{labels:W,datasets:[G]},options:{title:`reversed horizontal`,direction:`horizontal`,additionalAxesOptions:{reverse:!0}}},vt={data:{labels:W,datasets:[G]},options:{title:`With axes labels`,axes:{x:[{label:`Country`}],y:[{label:`Number of pets`}]}}},yt={data:{labels:W,datasets:[G]},options:{title:[`x axis on top`,`y axis on right`],axes:{x:[{position:`top`}],y:[{position:`right`}]}}},bt={data:{labels:W,datasets:[G]},options:{title:`Not beginning at zero`,additionalAxesOptions:{beginAtZero:!1}}},xt={data:{labels:W,datasets:[G]},options:{title:`With step size of 2`,additionalAxesOptions:{stepSize:2}}},St={data:{labels:W,datasets:[G]},options:{title:`With suggested range`,additionalAxesOptions:{beginAtZero:!1,suggestedMin:2,suggestedMax:12}}},Ct={data:{labels:W,datasets:[G]},options:{title:`With logarithmic scale`,additionalAxesOptions:{chartScaleType:`logarithmic`}}},wt={data:{labels:W,datasets:[ot]},options:{title:`With value as datalabels`,graph:{showDataLabels:!0}}},Tt={data:{labels:W,datasets:[{...G,backgroundColor:`rgba(255, 99, 132, 0.2)`,borderColor:`black`,borderWidth:1}]}},Et={data:{labels:W,datasets:[q]},options:{title:`Annotation Y Axis`,annotations:{showAnnotations:!0,annotationsData:[{annotationAxis:`y`,label:`Horizontal Annotation`,value:53,color:`rgba(96, 32, 196, 0.5)`}]}}},Dt={data:{labels:W,datasets:[q]},options:{title:`Annotation X Axis`,annotations:{showAnnotations:!0,annotationsData:[{annotationAxis:`x`,label:`Vertical Annotation`,value:.5,color:`green`}]}}},Ot={data:{labels:W,datasets:[q]},options:{title:`Diagonal Annotation`,annotations:{showAnnotations:!0,annotationsData:[{annotationAxis:`y`,label:`Diagonal Annotation`,value:40,endValue:67,color:`rgba(123, 16, 32, 0.8)`}]}}},kt={data:{labels:W,datasets:[q]},options:{title:`Control annotations in legend`,annotations:{showAnnotations:!0,controlAnnotation:!0,annotationsData:[{annotationAxis:`y`,label:`Diagonal Annotation`,value:40,endValue:67,color:`rgba(123, 16, 32, 0.8)`},{annotationAxis:`y`,label:`Horizontal Annotation`,value:53,color:`rgba(96, 32, 196, 0.5)`}]}}},J={data:{labels:W,datasets:[G]},options:{title:`Legend to the right`,legend:{position:`right`}}},At={data:{labels:W,datasets:[G]},options:{chartStyling:{performanceMode:!1}}},jt={data:{labels:W,datasets:[G]},options:{dragData:{enableDragData:!0,showTooltip:!0,roundPoints:!0,onDragStart:(e,t)=>{},onDrag:(e,t,n,r)=>{},onDragEnd:(e,t,n,r)=>{}}}},Mt={data:{labels:W,datasets:[it,it,at]}},Nt={data:{labels:[`Week 1`,`Week 2`,`Week 3`,`Week 4`,`Week 5`,`Week 6`],datasets:[{label:`Budget Sales`,data:[200,1e3,800,700,900,1600],backgroundColor:`rgba(128, 128, 128, 0.5)`,borderColor:`rgba(128, 128, 128, 1)`,barThickness:40},{label:`Actual Sales`,data:[300,600,400,500,700,1200],backgroundColor:`rgba(64, 64, 64, 0.5)`,borderColor:`rgba(64, 64, 64, 1)`,barThickness:60},{label:`Units`,data:[20,40,30,50,70,90],type:`line`,backgroundColor:`rgba(255, 165, 0, 0.5)`,borderColor:`rgba(255, 165, 0, 1)`,yAxisID:`y-axis-units`}]},options:{title:`Specific axis stacked`,additionalAxesOptions:{stackedX:!0,stackedY:!1}}},Pt={data:{labels:[`original`,`change 1`,`change 2`,`change 3`,`result`],datasets:[st]},options:{title:`Waterfall chart`,graph:{showDataLabels:!0}}},Ft={title:`BarChart`,component:U,args:{chart:ct}},Y=e=>(0,H.jsx)(U,{...e}),It=`custom-legend-container`,Lt=e=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(U,{...e}),(0,H.jsx)(`div`,{id:It})]});const Rt=Y.bind({}),zt=Y.bind({});zt.args={chart:lt};const Bt=Y.bind({});Bt.args={chart:ut};const Vt=Y.bind({});Vt.args={chart:dt};const Ht=Y.bind({});Ht.args={chart:ft};const Ut=Y.bind({});Ut.args={chart:mt};const Wt=Y.bind({});Wt.args={chart:pt};const Gt=Y.bind({});Gt.args={chart:gt};const X=Y.bind({});X.args={chart:ht};const Kt=Y.bind({});Kt.args={chart:_t};const qt=Y.bind({});qt.args={chart:vt};const Jt=Y.bind({});Jt.args={chart:yt};const Yt=Y.bind({});Yt.args={chart:bt};const Xt=Y.bind({});Xt.args={chart:St};const Zt=Y.bind({});Zt.args={chart:xt};const Qt=Y.bind({});Qt.args={chart:Ct};const $t=Y.bind({});$t.args={chart:wt};const en=Y.bind({});en.args={chart:J};const tn=Y.bind({});tn.args={chart:Tt};const nn=Y.bind({});nn.args={chart:Et};const rn=Y.bind({});rn.args={chart:Dt};const an=Y.bind({});an.args={chart:Ot};const on=Y.bind({});on.args={chart:kt};const Z=Y.bind({});Z.args={chart:At};const sn=Lt.bind({});sn.args={chart:{...ct,options:{title:`Custom HTML legend`,legend:{customLegend:{customLegendPlugin:i(It),customLegendContainerID:It}}}}};const cn=Y.bind({});cn.args={chart:jt};const ln=Y.bind({});ln.args={chart:Mt};const un=Y.bind({});un.args={chart:Nt};const dn=Y.bind({});dn.args={chart:Pt};const fn=()=>{let e=`controls-portal-container`;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{style:{padding:20,border:`1px solid red`},children:[`This div is outside the BarChart component`,(0,H.jsx)(`div`,{id:e})]}),(0,H.jsx)(U,{chart:{...ct,controlsPortalId:e}})]})};fn.__docgenInfo={description:``,methods:[],displayName:`ControlsPortal`},Rt.parameters={...Rt.parameters,docs:{...Rt.parameters?.docs,source:{originalSource:`args => {
|
|
11
|
+
return <BarChart
|
|
12
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
13
|
+
{...args} />;
|
|
14
|
+
}`,...Rt.parameters?.docs?.source}}},zt.parameters={...zt.parameters,docs:{...zt.parameters?.docs,source:{originalSource:`args => {
|
|
15
|
+
return <BarChart
|
|
16
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
17
|
+
{...args} />;
|
|
18
|
+
}`,...zt.parameters?.docs?.source}}},Bt.parameters={...Bt.parameters,docs:{...Bt.parameters?.docs,source:{originalSource:`args => {
|
|
19
|
+
return <BarChart
|
|
20
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
21
|
+
{...args} />;
|
|
22
|
+
}`,...Bt.parameters?.docs?.source}}},Vt.parameters={...Vt.parameters,docs:{...Vt.parameters?.docs,source:{originalSource:`args => {
|
|
23
|
+
return <BarChart
|
|
24
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
25
|
+
{...args} />;
|
|
26
|
+
}`,...Vt.parameters?.docs?.source}}},Ht.parameters={...Ht.parameters,docs:{...Ht.parameters?.docs,source:{originalSource:`args => {
|
|
27
|
+
return <BarChart
|
|
28
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
29
|
+
{...args} />;
|
|
30
|
+
}`,...Ht.parameters?.docs?.source}}},Ut.parameters={...Ut.parameters,docs:{...Ut.parameters?.docs,source:{originalSource:`args => {
|
|
31
|
+
return <BarChart
|
|
32
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
33
|
+
{...args} />;
|
|
34
|
+
}`,...Ut.parameters?.docs?.source}}},Wt.parameters={...Wt.parameters,docs:{...Wt.parameters?.docs,source:{originalSource:`args => {
|
|
35
|
+
return <BarChart
|
|
36
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
37
|
+
{...args} />;
|
|
38
|
+
}`,...Wt.parameters?.docs?.source}}},Gt.parameters={...Gt.parameters,docs:{...Gt.parameters?.docs,source:{originalSource:`args => {
|
|
39
|
+
return <BarChart
|
|
40
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
41
|
+
{...args} />;
|
|
42
|
+
}`,...Gt.parameters?.docs?.source}}},X.parameters={...X.parameters,docs:{...X.parameters?.docs,source:{originalSource:`args => {
|
|
43
|
+
return <BarChart
|
|
44
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
45
|
+
{...args} />;
|
|
46
|
+
}`,...X.parameters?.docs?.source}}},Kt.parameters={...Kt.parameters,docs:{...Kt.parameters?.docs,source:{originalSource:`args => {
|
|
47
|
+
return <BarChart
|
|
48
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
49
|
+
{...args} />;
|
|
50
|
+
}`,...Kt.parameters?.docs?.source}}},qt.parameters={...qt.parameters,docs:{...qt.parameters?.docs,source:{originalSource:`args => {
|
|
51
|
+
return <BarChart
|
|
52
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
53
|
+
{...args} />;
|
|
54
|
+
}`,...qt.parameters?.docs?.source}}},Jt.parameters={...Jt.parameters,docs:{...Jt.parameters?.docs,source:{originalSource:`args => {
|
|
55
|
+
return <BarChart
|
|
56
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
57
|
+
{...args} />;
|
|
58
|
+
}`,...Jt.parameters?.docs?.source}}},Yt.parameters={...Yt.parameters,docs:{...Yt.parameters?.docs,source:{originalSource:`args => {
|
|
59
|
+
return <BarChart
|
|
60
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
61
|
+
{...args} />;
|
|
62
|
+
}`,...Yt.parameters?.docs?.source}}},Xt.parameters={...Xt.parameters,docs:{...Xt.parameters?.docs,source:{originalSource:`args => {
|
|
63
|
+
return <BarChart
|
|
64
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
65
|
+
{...args} />;
|
|
66
|
+
}`,...Xt.parameters?.docs?.source}}},Zt.parameters={...Zt.parameters,docs:{...Zt.parameters?.docs,source:{originalSource:`args => {
|
|
67
|
+
return <BarChart
|
|
68
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
69
|
+
{...args} />;
|
|
70
|
+
}`,...Zt.parameters?.docs?.source}}},Qt.parameters={...Qt.parameters,docs:{...Qt.parameters?.docs,source:{originalSource:`args => {
|
|
71
|
+
return <BarChart
|
|
72
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
73
|
+
{...args} />;
|
|
74
|
+
}`,...Qt.parameters?.docs?.source}}},$t.parameters={...$t.parameters,docs:{...$t.parameters?.docs,source:{originalSource:`args => {
|
|
75
|
+
return <BarChart
|
|
76
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
77
|
+
{...args} />;
|
|
78
|
+
}`,...$t.parameters?.docs?.source}}},en.parameters={...en.parameters,docs:{...en.parameters?.docs,source:{originalSource:`args => {
|
|
79
|
+
return <BarChart
|
|
80
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
81
|
+
{...args} />;
|
|
82
|
+
}`,...en.parameters?.docs?.source}}},tn.parameters={...tn.parameters,docs:{...tn.parameters?.docs,source:{originalSource:`args => {
|
|
83
|
+
return <BarChart
|
|
84
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
85
|
+
{...args} />;
|
|
86
|
+
}`,...tn.parameters?.docs?.source}}},nn.parameters={...nn.parameters,docs:{...nn.parameters?.docs,source:{originalSource:`args => {
|
|
87
|
+
return <BarChart
|
|
88
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
89
|
+
{...args} />;
|
|
90
|
+
}`,...nn.parameters?.docs?.source}}},rn.parameters={...rn.parameters,docs:{...rn.parameters?.docs,source:{originalSource:`args => {
|
|
91
|
+
return <BarChart
|
|
92
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
93
|
+
{...args} />;
|
|
94
|
+
}`,...rn.parameters?.docs?.source}}},an.parameters={...an.parameters,docs:{...an.parameters?.docs,source:{originalSource:`args => {
|
|
95
|
+
return <BarChart
|
|
96
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
97
|
+
{...args} />;
|
|
98
|
+
}`,...an.parameters?.docs?.source}}},on.parameters={...on.parameters,docs:{...on.parameters?.docs,source:{originalSource:`args => {
|
|
99
|
+
return <BarChart
|
|
100
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
101
|
+
{...args} />;
|
|
102
|
+
}`,...on.parameters?.docs?.source}}},Z.parameters={...Z.parameters,docs:{...Z.parameters?.docs,source:{originalSource:`args => {
|
|
103
|
+
return <BarChart
|
|
104
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
105
|
+
{...args} />;
|
|
106
|
+
}`,...Z.parameters?.docs?.source}}},sn.parameters={...sn.parameters,docs:{...sn.parameters?.docs,source:{originalSource:`args => {
|
|
107
|
+
return <>
|
|
108
|
+
<BarChart
|
|
109
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
110
|
+
{...args} />
|
|
111
|
+
<div id={customLegendContainerID}></div>
|
|
112
|
+
</>;
|
|
113
|
+
}`,...sn.parameters?.docs?.source}}},cn.parameters={...cn.parameters,docs:{...cn.parameters?.docs,source:{originalSource:`args => {
|
|
114
|
+
return <BarChart
|
|
115
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
116
|
+
{...args} />;
|
|
117
|
+
}`,...cn.parameters?.docs?.source}}},ln.parameters={...ln.parameters,docs:{...ln.parameters?.docs,source:{originalSource:`args => {
|
|
118
|
+
return <BarChart
|
|
119
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
120
|
+
{...args} />;
|
|
121
|
+
}`,...ln.parameters?.docs?.source}}},un.parameters={...un.parameters,docs:{...un.parameters?.docs,source:{originalSource:`args => {
|
|
122
|
+
return <BarChart
|
|
123
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
124
|
+
{...args} />;
|
|
125
|
+
}`,...un.parameters?.docs?.source}}},dn.parameters={...dn.parameters,docs:{...dn.parameters?.docs,source:{originalSource:`args => {
|
|
126
|
+
return <BarChart
|
|
127
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
128
|
+
{...args} />;
|
|
129
|
+
}`,...dn.parameters?.docs?.source}}},fn.parameters={...fn.parameters,docs:{...fn.parameters?.docs,source:{originalSource:`() => {
|
|
130
|
+
const controlsPortalId = 'controls-portal-container';
|
|
131
|
+
return <>
|
|
132
|
+
<div style={{
|
|
133
|
+
padding: 20,
|
|
134
|
+
border: '1px solid red'
|
|
135
|
+
}}>
|
|
136
|
+
This div is outside the BarChart component
|
|
137
|
+
<div id={controlsPortalId} />
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
<BarChart chart={{
|
|
141
|
+
...singleChart,
|
|
142
|
+
controlsPortalId
|
|
143
|
+
}} />
|
|
144
|
+
</>;
|
|
145
|
+
}`,...fn.parameters?.docs?.source}}};const pn=`Default.CustomColors.CustomColorsArray.MultipleSets.Stacked.StackedGrouped.MultipleYAxes.Horizontal.Reversed.HorizontalReversed.AxesLabels.AxesPositions.NonZeroStart.CustomRange.CustomStepSize.LogarithmicScale.Datalabels.LegendOnRight.Border.AnnotationYAxis.AnnotationXAxis.AnnotationDiagonal.AnnotationsInLegend.Animated.CustomLegend.DragDataChart.PrettyLabelsTooltips.StackedSelectedAxis.WaterfallChart.ControlsPortal`.split(`.`);export{Z as Animated,an as AnnotationDiagonal,rn as AnnotationXAxis,nn as AnnotationYAxis,on as AnnotationsInLegend,qt as AxesLabels,Jt as AxesPositions,tn as Border,fn as ControlsPortal,zt as CustomColors,Bt as CustomColorsArray,sn as CustomLegend,Xt as CustomRange,Zt as CustomStepSize,$t as Datalabels,Rt as Default,cn as DragDataChart,Gt as Horizontal,Kt as HorizontalReversed,en as LegendOnRight,Qt as LogarithmicScale,Vt as MultipleSets,Wt as MultipleYAxes,Yt as NonZeroStart,ln as PrettyLabelsTooltips,X as Reversed,Ht as Stacked,Ut as StackedGrouped,un as StackedSelectedAxis,dn as WaterfallChart,pn as __namedExportsOrder,Ft as default};
|