PageSourceSearch

https://www.ehitusuudised.ee/_next/static/chunks/135vsxxjnwnfj.js?dpl=06c0976789f7d9e593a2d5dee94be2bf2258b72e

js ehitusuudised.ee collected 2026-09-24 21:44:59 UTC 179,417 bytes, 4 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="1f2c3ea0-149f-af6a-cded-8219f1a991d3")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,586389,t=>{"use strict";var e,i,s=((e={}).Dotted="Dotted",e.Line="Line",e),a=((i={}).Stack="Stack",i.Line="Line",i.Bar="Bar",i);t.s(["ChartLineStyle",()=>s,"ChartType",()=>a])},582326,t=>{"use strict";var e=t.i(843476),i=t.i(500932),s=t.i(271645),a=t.i(529530),r=t.i(81097),n=t.i(649713),o=t.i(166340),l=t.i(503236),h=t.i(510256),d=t.i(586389);a.Chart.register(a.CategoryScale,a.LinearScale,a.PointElement,a.LineElement,a.BarElement,a.Title,a.Tooltip,a.Filler);let c="#000fff";function u(t){return"number"==typeof t&&Number.isFinite(t)}function f(t){return u(t)?t:null}t.s(["default",0,t=>{let a,g,p,m,b,x,_,y,v,M,w,k,S,D,P,C,O,T,E,A,L,R,F,z,V,B,I,j,W,H,$,N,U,Y,X,q,K,Z,G,Q,J=(0,i.c)(137),{type:tt,labels:te,datasets:ti,unit:ts,options:ta,height:tr,compact:tn,isLoading:to}=t,tl=void 0===tt?d.ChartType.Line:tt;J[0]!==ta?(a=void 0===ta?{}:ta,J[0]=ta,J[1]=a):a=J[1];let th=a,td=void 0!==to&&to,tc=s.useRef(null);J[2]===Symbol.for("react.memo_cache_sentinel")?(g={primaryColor:c,textColor:"#000",fontFamily:"inherit",fontSize:12},J[2]=g):g=J[2];let[tu,tf]=s.useState(g);J[3]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{let t=getComputedStyle(document.documentElement),e=tc.current?getComputedStyle(tc.current):t,i=t.getPropertyValue("--color-primary").trim(),s=Number.parseFloat(e.fontSize);tf({primaryColor:i||c,textColor:e.color||"#000",fontFamily:e.fontFamily||"inherit",fontSize:Number.isFinite(s)?s:12})},m=[],J[3]=p,J[4]=m):(p=J[3],m=J[4]),s.useEffect(p,m);let{lineStyle:tg,labelsLimit:tp,maintainAspectRatio:tm,aspectRatio:tb,currencyDisplay:tx,maximumFractionDigits:t_,yAxisPadding:ty,xTickFormatter:tv,tooltipTitleFormatter:tM}=th,tw=void 0===tg?d.ChartLineStyle.Dotted:tg,tk=void 0===tm||tm,tS=void 0===tb?2:tb,tD=tl===d.ChartType.Bar,tP=ti.length>1,tC=tw===d.ChartLineStyle.Dotted,tO=!0===tn;J[5]===Symbol.for("react.memo_cache_sentinel")?(b=(0,l.defaultLocale)()||"et-EE",J[5]=b):b=J[5];let tT=b;J[6]!==ti?(x=function(t){let e=1/0,i=-1/0;for(let s of t)for(let t of s.values)u(t)&&(e=Math.min(e,t),i=Math.max(i,t));return Number.isFinite(e)&&Number.isFinite(i)?{min:e,max:i,hasValues:!0}:{min:0,max:0,hasValues:!1}}(ti),J[6]=ti,J[7]=x):x=J[7];let tE=x;J[8]!==tE.max||J[9]!==tE.min?(_=t=>{let e=Math.max(Math.abs(tE.min),Math.abs(tE.max))>=10?2:4;return new Intl.NumberFormat(tT,{minimumFractionDigits:e,maximumFractionDigits:e}).format(t)},J[8]=tE.max,J[9]=tE.min,J[10]=_):_=J[10];let tA=_;J[11]!==te?(y=t=>{let e=Number(t);return Number.isInteger(e)&&void 0!==te[e]?te[e]:String(t)},J[11]=te,J[12]=y):y=J[12];let tL=y;if(J[13]!==ti||J[14]!==tO||J[15]!==tC||J[16]!==tu.primaryColor){let t;J[18]!==tO||J[19]!==tC||J[20]!==tu.primaryColor?(t=t=>{let e=t.color||tu.primaryColor;return{label:t.label,data:t.values.map(f),fill:!0,borderColor:e,backgroundColor:t=>{var i,s;let a,{chart:r}=t;return r.chartArea?(i=r.ctx,s=r.chartArea,(a=i.createLinearGradient(0,s.bottom,0,s.top)).addColorStop(1,(0,n.hexToRGBA)(e,.3)),a.addColorStop(0,(0,n.hexToRGBA)(e,0)),a):(0,n.hexToRGBA)(e,.12)}
2,pointBackgroundColor:e,pointHoverBackgroundColor:e,pointHoverBorderColor:e,borderWidth:tO?1:2,pointHoverBorderWidth:tO?1:3,pointHitRadius:12,pointHoverRadius:tC?4:tO?1:4,pointRadius:4*!!tC,tension:0}},J[18]=tO,J[19]=tC,J[20]=tu.primaryColor,J[21]=t):t=J[21],v=ti.map(t),J[13]=ti,J[14]=tO,J[15]=tC,J[16]=tu.primaryColor,J[17]=v}else v=J[17];J[22]!==te||J[23]!==v?(M={labels:te,datasets:v},J[22]=te,J[23]=v,J[24]=M):M=J[24];let tR=M;if(J[25]!==ti||J[26]!==tu.primaryColor){let t;J[28]!==tu.primaryColor?(t=t=>{let e=t.color||tu.primaryColor;return{label:t.label,data:t.values.map(f),borderColor:e,backgroundColor:e,borderRadius:2}},J[28]=tu.primaryColor,J[29]=t):t=J[29],w=ti.map(t),J[25]=ti,J[26]=tu.primaryColor,J[27]=w}else w=J[27];J[30]!==te||J[31]!==w?(k={labels:te,datasets:w},J[30]=te,J[31]=w,J[32]=k):k=J[32];let tF=k,tz=void 0===tn||tn;J[33]!==tp?(S=tp?{autoSkip:!0,maxTicksLimit:tp,maxRotation:0,minRotation:0}:{},J[33]=tp,J[34]=S):S=J[34];let tV=S;J[35]!==tE.hasValues||J[36]!==tE.max||J[37]!==tE.min||J[38]!==tO||J[39]!==ty?(D=(()=>{if(!tE.hasValues)return{beginAtZero:!0};if(tO){if(tE.min===tE.max){var t;let e;return e=Math.max(.1*Math.abs(t=tE.min),1),{min:t-e,max:t+e}}return{min:tE.min,max:tE.max}}if("number"==typeof ty&&tE.min!==tE.max){let t=tE.max-tE.min;return{suggestedMin:tE.min-t*ty,suggestedMax:tE.max+t*ty}}return{beginAtZero:tE.min>=0}})(),J[35]=tE.hasValues,J[36]=tE.max,J[37]=tE.min,J[38]=tO,J[39]=ty,J[40]=D):D=J[40];let tB=D;J[41]!==tO?(P=tO?{animation:!1}:{animations:{tension:{duration:0,easing:"easeInOutQuad",from:1,to:0,loop:!0}}},J[41]=tO,J[42]=P):P=J[42],J[43]===Symbol.for("react.memo_cache_sentinel")?(C={autoPadding:!1,padding:0},J[43]=C):C=J[43],J[44]!==tC?(O=tC?{}:{mode:"index",intersect:!1},J[44]=tC,J[45]=O):O=J[45];let tI=+!tO,tj=8*!tO;J[46]!==tz||J[47]!==tI||J[48]!==tj?(T={display:tz,lineWidth:tI,drawTicks:tz,tickLength:tj},J[46]=tz,J[47]=tI,J[48]=tj,J[49]=T):T=J[49];let tW=!tO;J[50]!==tu.fontFamily||J[51]!==tu.fontSize?(E={family:tu.fontFamily,size:tu.fontSize},J[50]=tu.fontFamily,J[51]=tu.fontSize,J[52]=E):E=J[52],J[53]!==tL||J[54]!==tv?(A=tv?{callback:(t,e,i)=>{let s=tv(tL(t));return e>0&&s===tv(tL(i[e-1]?.value))?null:s}}:{},J[53]=tL,J[54]=tv,J[55]=A):A=J[55],J[56]!==tV||J[57]!==tW||J[58]!==E||J[59]!==A||J[60]!==tu.textColor?(L={display:tW,padding:8,color:tu.textColor,font:E,...tV,...A},J[56]=tV,J[57]=tW,J[58]=E,J[59]=A,J[60]=tu.textColor,J[61]=L):L=J[61];let tH=!tO;J[62]!==tH?(R={display:tH},J[62]=tH,J[63]=R):R=J[63],J[64]!==T||J[65]!==L||J[66]!==R?(F={grid:T,ticks:L,border:R},J[64]=T,J[65]=L,J[66]=R,J[67]=F):F=J[67];let t$=+!tO,tN=8*!tO;J[68]!==tz||J[69]!==t$||J[70]!==tN?(z={display:tz,lineWidth:t$,drawTicks:tz,tickLength:tN},J[68]=tz,J[69]=t$,J[70]=tN,J[71]=z):z=J[71];let tU=!tO;J[72]!==tu.fontFamily||J[73]!==tu.fontSize?(V={family:tu.fontFamily,size:tu.fontSize},J[72]=tu.fontFamily,J[73]=tu.fontSize,J[74]=V):V=J[74],J[75]!==ty?(B="number"==typeof ty?{}:{precision:0},J[75]=ty,J[76]=B):B=J[76],J[77]!==tA||J[78]!==t_||J[79]!==ty?(I=t=>"string"==typeof t?t:"number"==typeof ty?tA(t):(0,h.formatNumber)(t,{compact:!0,maximumFractionDigits:t_}),J[77]=tA,J[78]=t_,J[79]=ty,J[80]=I):I=J[80],J[81]!==tU||J[82]!==V||J[83]!==B||J[84]!==I||J[85]!==tu.textColor?(j={display:tU,padding:8,color:tu.textColor,font:V,...B,callback:I},J[81]=tU,J[82]=V,J[83]=B,J[84]=I,J[85]=tu.textColor,J[86]=j):j=J[86];let tY=!tO;J[87]!==tY?(W={display:tY},J[87]=tY,J[88]=W):W=J[88],J[89]!==z||J[90]!==j||J[91]!==W||J[92]!==tB?(H={offset:!1,grid:z,ticks:j,border:W,...tB},J[89]=z,J[90]=j,J[91]=W,J[92]=tB,J[93]=H):H=J[93],J[94]!==F||J[95]!==H?($={x:F,y:H},J[94]=F,J[95]=H,J[96]=$):$=J[96];let tX=!tO;J[97]!==te||J[98]!==tM||J[99]!==tv?(N=t=>{let e=t[0];if(!e)return"";let i=te[e.dataIndex]??"",s=tM??tv;return s?s(i):i},J[97]=te,J[98]=tM,J[99]=tv,J[100]=N):N=J[100],J[101]!==tx||J[102]!==tA||J[103]!==tP||J[104]!==t_||J[105]!==ts||J[106]!==ty?(U=t=>{let e=t.dataset.label??"",i=tP?` ${e}: `:"";if(!u(t.raw))return`${i}-`;let s="number"==typeof ty?tA(t.raw):(0,h.formatNumber)(t.raw,{unit:ts,currencyDisplay:tx||"name",maximumFractionDigits:t_});return`${i}${s}`},J[101]=tx,J[102]=tA,J[103]=tP,J[104]=t_,J[105]=ts,J[106]=ty,J[107]=U):U=J[107],J[108]!==N||J[109]!==U?(Y={title:N,label:U},J[108]=N,J[109]=U,J[110]=Y):Y=J[110],J[111]!==tP||J[112]!==tX||J[113]!==Y?(X={tooltip:{enabled:tX,cornerRadius:4,displayColors:tP,intersect:!1,mode:"index",padding:16,boxPadding:8,boxWidth:8,boxHeight:8,usePointStyle:!0,caretSize:0,caretPadding:16,callbacks:Y}},J[111]=tP,J[112]=tX,J[113]=Y,J[114]=X):X=J[114],J[115]!==tS||J[116]!==tk||J[117]!==P||J[118]!==O||J[119]!==$||J[120]!==X?(q={responsive:!0,aspectRatio:tS,maintainAspectRatio:tk,...P,layout:C,hover:O,scales:$,plugins:X},J[115]=tS,J[116]=tk,J[117]=P,J[118]=O,J[119]=$,J[120]=X,J[121]=q):q=J[121];let tq=q,tK=tk?tS:void 0,tZ=tk?void 0:void 0===tr?250:tr;J[122]!==tK||J[123]!==tZ?(K={aspectRatio:tK,height:tZ},J[122]=tK,J[123]=tZ,J[124]=K):K=J[124];let tG=K;
2return td||0!==ti.length?(J[125]!==td?(Z=td&&(0,e.jsx)(o.default,{layout:"absolute"}),J[125]=td,J[126]=Z):Z=J[126],J[127]!==tF||J[128]!==tq||J[129]!==tD||J[130]!==td||J[131]!==tR?(G=!td&&(tD?(0,e.jsx)(r.Bar,{data:tF,options:tq}):(0,e.jsx)(r.Line,{data:tR,options:tq})),J[127]=tF,J[128]=tq,J[129]=tD,J[130]=td,J[131]=tR,J[132]=G):G=J[132],J[133]!==tG||J[134]!==Z||J[135]!==G?(Q=(0,e.jsxs)("div",{ref:tc,className:"chart-block",style:tG,children:[Z,G]}),J[133]=tG,J[134]=Z,J[135]=G,J[136]=Q):Q=J[136],Q):null}])},529530,81097,649713,t=>{"use strict";let e,i;function s(t){return t+.5|0}let a=(t,e,i)=>Math.max(Math.min(t,i),e);function r(t){return a(s(2.55*t),0,255)}function n(t){return a(s(255*t),0,255)}function o(t){return a(s(t/2.55)/100,0,1)}function l(t){return a(s(100*t),0,100)}let h={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},d=[..."0123456789ABCDEF"],c=t=>d[15&t],u=t=>d[(240&t)>>4]+d[15&t],f=t=>(240&t)>>4==(15&t),g=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function p(t,e,i){let s=e*Math.min(i,1-i),a=(e,a=(e+t/30)%12)=>i-s*Math.max(Math.min(a-3,9-a,1),-1);return[a(0),a(8),a(4)]}function m(t,e,i){let s=(s,a=(s+t/60)%6)=>i-i*e*Math.max(Math.min(a,4-a,1),0);return[s(5),s(3),s(1)]}function b(t,e,i){let s,a=p(t,1,.5);for(e+i>1&&(s=1/(e+i),e*=s,i*=s),s=0;s<3;s++)a[s]*=1-e-i,a[s]+=e;return a}function x(t){let e,i,s,a=t.r/255,r=t.g/255,n=t.b/255,o=Math.max(a,r,n),l=Math.min(a,r,n),h=(o+l)/2;o!==l&&(s=o-l,i=h>.5?s/(2-o-l):s/(o+l),e=60*(e=a===o?(r-n)/s+6*(r<n):r===o?(n-a)/s+2:(a-r)/s+4)+.5);return[0|e,i||0,h]}function _(t,e,i,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,s)).map(n)}function y(t){return(t%360+360)%360}let v={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"},M={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"},w=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,k=t=>
2t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,S=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function D(t,e,i){if(t){let s=x(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*i,0===e?360:1)),t.r=(s=_(p,s,void 0,void 0))[0],t.g=s[1],t.b=s[2]}}function P(t,e){return t?Object.assign(e||{},t):t}function C(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=n(t[3]))):(e=P(t,{r:0,g:0,b:0,a:1})).a=n(e.a),e}class O{constructor(t){let i;if(t instanceof O)return t;const s=typeof t;"object"===s?i=C(t):"string"===s&&(i=function(t){var e,i=t.length;return"#"===t[0]&&(4===i||5===i?e={r:255&17*h[t[1]],g:255&17*h[t[2]],b:255&17*h[t[3]],a:5===i?17*h[t[4]]:255}:(7===i||9===i)&&(e={r:h[t[1]]<<4|h[t[2]],g:h[t[3]]<<4|h[t[4]],b:h[t[5]]<<4|h[t[6]],a:9===i?h[t[7]]<<4|h[t[8]]:255})),e}(t)||function(t){e||((e=function(){let t,e,i,s,a,r={},n=Object.keys(M),o=Object.keys(v);for(t=0;t<n.length;t++){for(s=a=n[t],e=0;e<o.length;e++)i=o[e],a=a.replace(i,v[i]);i=parseInt(M[s],16),r[a]=[i>>16&255,i>>8&255,255&i]}return r}()).transparent=[0,0,0,0]);let i=e[t.toLowerCase()];return i&&{r:i[0],g:i[1],b:i[2],a:4===i.length?i[3]:255}}(t)||function(t){return"r"===t.charAt(0)?function(t){let e,i,s,n=w.exec(t),o=255;if(n){if(n[7]!==e){let t=+n[7];o=n[8]?r(t):a(255*t,0,255)}return e=+n[1],i=+n[3],s=+n[5],e=255&(n[2]?r(e):a(e,0,255)),{r:e,g:i=255&(n[4]?r(i):a(i,0,255)),b:s=255&(n[6]?r(s):a(s,0,255)),a:o}}}(t):function(t){let e,i=g.exec(t),s=255;if(!i)return;i[5]!==e&&(s=i[6]?r(+i[5]):n(+i[5]));let a=y(+i[2]),o=i[3]/100,l=i[4]/100;return{r:(e="hwb"===i[1]?_(b,a,o,l):"hsv"===i[1]?_(m,a,o,l):_(p,a,o,l))[0],g:e[1],b:e[2],a:s}}(t)}(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=P(this._rgb);return t&&(t.a=o(t.a)),t}set rgb(t){this._rgb=C(t)}rgbString(){var t;return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${o(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0}hexString(){var t,e;let i,s;return this._valid?(e=f((i=t=this._rgb).r)&&f(i.g)&&f(i.b)&&f(i.a)?c:u,t?"#"+e(t.r)+e(t.g)+e(t.b)+(s=t.a,s<255?e(s):""):void 0):void 0}hslString(){return this._valid?function(t){if(!t)return;let e=x(t),i=e[0],s=l(e[1]),a=l(e[2]);return t.a<255?`hsla(${i}, ${s}%, ${a}%, ${o(t.a)})`:`hsl(${i}, ${s}%, ${a}%)`}(this._rgb):void 0}mix(t,e){if(t){let i,s=this.rgb,a=t.rgb,r=e===i?.5:e,n=2*r-1,o=s.a-a.a,l=((n*o==-1?n:(n+o)/(1+n*o))+1)/2;i=1-l,s.r=255&l*s.r+i*a.r+.5,s.g=255&l*s.g+i*a.g+.5,s.b=255&l*s.b+i*a.b+.5,s.a=r*s.a+(1-r)*a.a,this.rgb=s}return this}interpolate(t,e){var i,s;let a,r,l;return t&&(this._rgb=(i=this._rgb,s=t._rgb,a=S(o(i.r)),r=S(o(i.g)),l=S(o(i.b)),{r:n(k(a+e*(S(o(s.r))-a))),g:n(k(r+e*(S(o(s.g))-r))),b:n(k(l+e*(S(o(s.b))-l))),a:i.a+e*(s.a-i.a)})),this}clone(){return new O(this.rgb)}alpha(t){return this._rgb.a=n(t),this}clearer(t){let e=this._rgb;return e.a*=1-t,this}greyscale(){let t=this._rgb,e=s(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){let e=this._rgb;return e.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return D(this._rgb,2,t),this}darken(t){return D(this._rgb,2,-t),this}saturate(t){return D(this._rgb,1,t),this}desaturate(t){return D(this._rgb,1,-t),this}rotate(t){var e=this._rgb,i=x(e);return i[0]=y(i[0]+t),e.r=(i=_(p,i,void 0,void 0))[0],e.g=i[1],e.b=i[2],this}}function T(){}let E=(i=0,()=>i++);function A(t){return null==t}function L(t){if(Array.isArray&&Array.isArray(t))return!0;let e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function R(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function F(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function z(t,e){return F(t)?t:e}function V(t,e){return void 0===t?e:t}let B=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function I(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function j(t,e,i,s){let a,r,n;if(L(t))if(r=t.length,s)for(a=r-1;a>=0;a--)e.call(i,t[a],a);else for(a=0;a<r;a++)e.call(i,t[a],a);else if(R(t))for(r=(n=Object.keys(t)).length,a=0;a<r;a++)e.call(i,t[n[a]],n[a])}function W(t,e){let i,s,a,r;if(!t||!e||t.length!==e.length)return!1;for(i=0,s=t.length;i<s;++i)if(a=t[i],r=e[i],a.datasetIndex!==r.datasetIndex||a.index!==r.index)return!1;return!0}function H(t){if(L(t))return t.map(H);if(R(t)){let e=Object.create(null),i=Object.keys(t),s=i.length,a=0;for(;a<s;++a)e[i[a]]=H(t[i[a]]);return e}return t}function $(t){return -1===["__proto__","prototype","constructor"].indexOf(t)}function N(t,e,i,s){if(!$(t))return;let a=e[t],r=i[t];R(a)&&R(r)?U(a,r,s):e[t]=H(r)}function U(t,e,i){let s,a=L(e)?e:[e],r=a.length;if(!R(t))return t;let n=(i=i||{}).merger||N;for(let e=0;e<r;++e){if(!R(s=a[e]))continue;let r=Object.keys(s);for(let e=0,a=r.length;e<a;++e)n(r[e],t,s,i)}return t}function Y(t,e){return U(t,e,{merger:X})}function X(t,e,i){if(!$(t))return;let s=e[t],a=i[t];R(s)&&R(a)?Y(s,a):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=H(a))}let q={"":t=>t,x:t=>t.x,y:t=>t.y};function K(t,e){let i;return(q[e]||(q[e]=(i=function(t){let e=t.split("."),i=[],s="";for(let t of e)(s+=t).endsWith("\\")?s=s.slice(0,-1)+".":(i.push(s),s="");return i}(e),t=>{for(let e of i){if(""===e)break;t=t&&t[e]}return t})))(t)}function Z(t){return t.charAt(0).toUpperCase()+t.slice(1)}let G=t=>void 0!==t,Q=t=>"function"==typeof t,J=(t,e)=>{if(t.size!==e.size)return!1;for(let i of t)if(!e.has(i))return!1;return!0},tt=Math.PI,te=2*tt,ti=te+tt,ts=1/0,ta=tt/180,tr=tt/2,tn=tt/4,to=2*tt/3,tl=Math.log10,th=Math.sign;function td(t,e,i){return Math.abs(t-e)<i}function tc(t){let e=Math.round(t),i=Math.pow(10,Math.floor(tl(t=td(t,e,t/1e3)?e:t))),s=t/i;return(s<=1?1:s<=2?2:s<=5?5:10)*i}function tu(t){return!isNaN(parseFloat(t))&&isFinite(t)}
2function tf(t){return tt/180*t}function tg(t){if(!F(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function tp(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function tm(t,e){return(t-e+ti)%te-tt}function tb(t){return(t%te+te)%te}function tx(t,e,i,s){let a=tb(t),r=tb(e),n=tb(i),o=tb(r-a),l=tb(n-a),h=tb(a-r),d=tb(a-n);return a===r||a===n||s&&r===n||o>l&&h<d}function t_(t,e,i){return Math.max(e,Math.min(i,t))}function ty(t,e,i,s=1e-6){return t>=Math.min(e,i)-s&&t<=Math.max(e,i)+s}function tv(t,e,i){let s;i=i||(i=>t[i]<e);let a=t.length-1,r=0;for(;a-r>1;)i(s=r+a>>1)?r=s:a=s;return{lo:r,hi:a}}let tM=(t,e,i,s)=>tv(t,i,s?s=>{let a=t[s][e];return a<i||a===i&&t[s+1][e]===i}:s=>t[s][e]<i),tw=(t,e,i)=>tv(t,i,s=>t[s][e]>=i),tk=["push","pop","shift","splice","unshift"];function tS(t,e){let i=t._chartjs;if(!i)return;let s=i.listeners,a=s.indexOf(e);-1!==a&&s.splice(a,1),s.length>0||(tk.forEach(e=>{delete t[e]}),delete t._chartjs)}function tD(t){let e=new Set(t);return e.size===t.length?t:Array.from(e)}let tP="u"<typeof window?function(t){return t()}:window.requestAnimationFrame;function tC(t,e){let i=[],s=!1;return function(...a){i=a,s||(s=!0,tP.call(window,()=>{s=!1,t.apply(e,i)}))}}let tO=t=>"start"===t?"left":"end"===t?"right":"center",tT=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function tE(t,e,i){let s=e.length,a=0,r=s;if(t._sorted){let{iScale:n,_parsed:o}=t,l=n.axis,{min:h,max:d,minDefined:c,maxDefined:u}=n.getUserBounds();c&&(a=t_(Math.min(tM(o,l,h).lo,i?s:tM(e,l,n.getPixelForValue(h)).lo),0,s-1)),r=u?t_(Math.max(tM(o,n.axis,d,!0).hi+1,i?0:tM(e,l,n.getPixelForValue(d),!0).hi+1),a,s)-a:s-a}return{start:a,count:r}}function tA(t){let{xScale:e,yScale:i,_scaleRanges:s}=t,a={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!s)return t._scaleRanges=a,!0;let r=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==i.min||s.ymax!==i.max;return Object.assign(s,a),r}let tL=t=>0===t||1===t,tR=(t,e,i)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*te/i)),tF=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*te/i)+1,tz={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*tr)+1,easeOutSine:t=>Math.sin(t*tr),easeInOutSine:t=>-.5*(Math.cos(tt*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>tL(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(-Math.pow(2,-10*(2*t-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>tL(t)?t:tR(t,.075,.3),easeOutElastic:t=>tL(t)?t:tF(t,.075,.3),easeInOutElastic:t=>tL(t)?t:t<.5?.5*tR(2*t,.1125,.45):.5+.5*tF(2*t-1,.1125,.45),easeInBack:t=>t*t*(2.70158*t-1.70158),easeOutBack:t=>(t-=1)*t*(2.70158*t+1.70158)+1,easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-tz.easeOutBounce(1-t),easeOutBounce:t=>t<.36363636363636365?7.5625*t*t:t<.7272727272727273?7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?7.5625*(t-=.8181818181818182)*t+.9375:7.5625*(t-=.9545454545454546)*t+.984375,easeInOutBounce:t=>t<.5?.5*tz.easeInBounce(2*t):.5*tz.easeOutBounce(2*t-1)+.5};function tV(t){if(t&&"object"==typeof t){let e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function tB(t){return tV(t)?t:new O(t)}function tI(t){return tV(t)?t:new O(t).saturate(.5).darken(.1).hexString()}let tj=["x","y","borderWidth","radius","tension"],tW=["color","borderColor","backgroundColor"],tH=new Map;function t$(t,e,i){var s;let a,r;return(a=e+JSON.stringify(s=(s=i)||{}),!(r=tH.get(a))&&(r=new Intl.NumberFormat(e,s),tH.set(a,r)),r).format(t)}let tN={values:t=>L(t)?t:""+t,numeric(t,e,i){let s;if(0===t)return"0";let a=this.chart.options.locale,r=t;if(i.length>1){var n,o;let e,a=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(a<1e-4||a>1e15)&&(s="scientific"),n=t,Math.abs(e=(o=i).length>3?o[2].value-o[1].value:o[1].value-o[0].value)>
2=1&&n!==Math.floor(n)&&(e=n-Math.floor(n)),r=e}let l=tl(Math.abs(r)),h=isNaN(l)?1:Math.max(Math.min(-1*Math.floor(l),20),0),d={notation:s,minimumFractionDigits:h,maximumFractionDigits:h};return Object.assign(d,this.options.ticks.format),t$(t,a,d)},logarithmic(t,e,i){return 0===t?"0":[1,2,3,5,10,15].includes(i[e].significand||t/Math.pow(10,Math.floor(tl(t))))||e>.8*i.length?tN.numeric.call(this,t,e,i):""}},tU=Object.create(null),tY=Object.create(null);function tX(t,e){if(!e)return t;let i=e.split(".");for(let e=0,s=i.length;e<s;++e){let s=i[e];t=t[s]||(t[s]=Object.create(null))}return t}function tq(t,e,i){return"string"==typeof e?U(tX(t,e),i):U(tX(t,""),e)}var tK=new class{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>tI(e.backgroundColor),this.hoverBorderColor=(t,e)=>tI(e.borderColor),this.hoverColor=(t,e)=>tI(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={}
vendor: 4,971 bytes, line 2
2,this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return tq(this,t,e)}get(t){return tX(this,t)}describe(t,e){return tq(tY,t,e)}override(t,e){return tq(tU,t,e)}route(t,e,i,s){let a=tX(this,t),r=tX(this,i),n="_"+e;Object.defineProperties(a,{[n]:{value:a[e],writable:!0},[e]:{enumerable:!0,get(){let t=this[n],e=r[s];return R(t)?Object.assign({},e,t):V(t,e)},set(t){this[n]=t}}})}apply(t){t.forEach(t=>t(this))}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:tW},numbers:{type:"number",properties:tj}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:tN.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function tZ(t,e,i,s,a){let r=e[a];return r||(r=e[a]=t.measureText(a).width,i.push(a)),r>s&&(s=r),s}function tG(t,e,i){let s=t.currentDevicePixelRatio,a=0!==i?Math.max(i/2,.5):0;return Math.round((e-a)*s)/s+a}function tQ(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function tJ(t,e,i,s){t0(t,e,i,s,null)}function t0(t,e,i,s,a){let r,n,o,l,h,d,c,u,f=e.pointStyle,g=e.rotation,p=e.radius,m=(g||0)*ta;if(f&&"object"==typeof f&&("[object HTMLImageElement]"===(r=f.toString())||"[object HTMLCanvasElement]"===r)){t.save(),t.translate(i,s),t.rotate(m),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),t.restore();return}if(!isNaN(p)&&!(p<=0)){switch(t.beginPath(),f){default:a?t.ellipse(i,s,a/2,p,0,0,te):t.arc(i,s,p,0,te),t.closePath();break;case"triangle":d=a?a/2:p,t.moveTo(i+Math.sin(m)*d,s-Math.cos(m)*p),m+=to,t.lineTo(i+Math.sin(m)*d,s-Math.cos(m)*p),m+=to,t.lineTo(i+Math.sin(m)*d,s-Math.cos(m)*p),t.closePath();break;case"rectRounded":h=.516*p,n=Math.cos(m+tn)*(l=p-h),c=Math.cos(m+tn)*(a?a/2-h:l),o=Math.sin(m+tn)*l,u=Math.sin(m+tn)*(a?a/2-h:l),t.arc(i-c,s-o,h,m-tt,m-tr),t.arc(i+u,s-n,h,m-tr,m),t.arc(i+c,s+o,h,m,m+tr),t.arc(i-u,s+n,h,m+tr,m+tt),t.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*p,d=a?a/2:l,t.rect(i-d,s-l,2*d,2*l);break}m+=tn;case"rectRot":c=Math.cos(m)*(a?a/2:p),n=Math.cos(m)*p,o=Math.sin(m)*p,u=Math.sin(m)*(a?a/2:p),t.moveTo(i-c,s-o),t.lineTo(i+u,s-n),t.lineTo(i+c,s+o),t.lineTo(i-u,s+n),t.closePath();break;case"crossRot":m+=tn;case"cross":c=Math.cos(m)*(a?a/2:p),n=Math.cos(m)*p,o=Math.sin(m)*p,u=Math.sin(m)*(a?a/2:p),t.moveTo(i-c,s-o),t.lineTo(i+c,s+o),t.moveTo(i+u,s-n),t.lineTo(i-u,s+n);break;case"star":c=Math.cos(m)*(a?a/2:p),n=Math.cos(m)*p,o=Math.sin(m)*p,u=Math.sin(m)*(a?a/2:p),t.moveTo(i-c,s-o),t.lineTo(i+c,s+o),t.moveTo(i+u,s-n),t.lineTo(i-u,s+n),m+=tn,c=Math.cos(m)*(a?a/2:p),n=Math.cos(m)*p,o=Math.sin(m)*p,u=Math.sin(m)*(a?a/2:p),t.moveTo(i-c,s-o),t.lineTo(i+c,s+o),t.moveTo(i+u,s-n),t.lineTo(i-u,s+n);break;case"line":n=a?a/2:Math.cos(m)*p,o=Math.sin(m)*p,t.moveTo(i-n,s-o),t.lineTo(i+n,s+o);break;case"dash":t.moveTo(i,s),t.lineTo(i+Math.cos(m)*(a?a/2:p),s+Math.sin(m)*p);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function t1(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function t2(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}
2function t5(t){t.restore()}function t3(t,e,i,s,a){if(!e)return t.lineTo(i.x,i.y);if("middle"===a){let s=(e.x+i.x)/2;t.lineTo(s,e.y),t.lineTo(s,i.y)}else"after"===a!=!!s?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function t8(t,e,i,s){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(s?e.cp1x:e.cp2x,s?e.cp1y:e.cp2y,s?i.cp2x:i.cp1x,s?i.cp2y:i.cp1y,i.x,i.y)}function t4(t,e,i,s,a,r={}){let n,o,l=L(e)?e:[e],h=r.strokeWidth>0&&""!==r.strokeColor;for(t.save(),t.font=a.string,r.translation&&t.translate(r.translation[0],r.translation[1]),A(r.rotation)||t.rotate(r.rotation),r.color&&(t.fillStyle=r.color),r.textAlign&&(t.textAlign=r.textAlign),r.textBaseline&&(t.textBaseline=r.textBaseline),n=0;n<l.length;++n)o=l[n],r.backdrop&&function(t,e){let i=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=i}(t,r.backdrop),h&&(r.strokeColor&&(t.strokeStyle=r.strokeColor),A(r.strokeWidth)||(t.lineWidth=r.strokeWidth),t.strokeText(o,i,s,r.maxWidth)),t.fillText(o,i,s,r.maxWidth),function(t,e,i,s,a){if(a.strikethrough||a.underline){let r=t.measureText(s),n=e-r.actualBoundingBoxLeft,o=e+r.actualBoundingBoxRight,l=i-r.actualBoundingBoxAscent,h=i+r.actualBoundingBoxDescent,d=a.strikethrough?(l+h)/2:h;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=a.decorationWidth||2,t.moveTo(n,d),t.lineTo(o,d),t.stroke()}}(t,i,s,o,r),s+=Number(a.lineHeight);t.restore()}function t6(t,e){let{x:i,y:s,w:a,h:r,radius:n}=e;t.arc(i+n.topLeft,s+n.topLeft,n.topLeft,1.5*tt,tt,!0),t.lineTo(i,s+r-n.bottomLeft),t.arc(i+n.bottomLeft,s+r-n.bottomLeft,n.bottomLeft,tt,tr,!0),t.lineTo(i+a-n.bottomRight,s+r),t.arc(i+a-n.bottomRight,s+r-n.bottomRight,n.bottomRight,tr,0,!0),t.lineTo(i+a,s+n.topRight),t.arc(i+a-n.topRight,s+n.topRight,n.topRight,0,-tr,!0),t.lineTo(i+n.topLeft,s)}let t7=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,t9=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/,et=t=>+t||0;function ee(t,e){let i={},s=R(e),a=s?Object.keys(e):e,r=R(t)?s?i=>V(t[i],t[e[i]]):e=>t[e]:()=>t;for(let t of a)i[t]=et(r(t));return i}function ei(t){return ee(t,{top:"y",right:"x",bottom:"y",left:"x"})}function es(t){return ee(t,["topLeft","topRight","bottomLeft","bottomRight"])}function ea(t){let e=ei(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function er(t,e){t=t||{},e=e||tK.font;let i=V(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let s=V(t.style,e.style);s&&!(""+s).match(t9)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);let a={family:V(t.family,e.family),lineHeight:function(t,e){let i=(""+t).match(t7);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}(V(t.lineHeight,e.lineHeight),i),size:i,style:s,weight:V(t.weight,e.weight),string:""};return a.string=!a||A(a.size)||A(a.family)?null:(a.style?a.style+" ":"")+(a.weight?a.weight+" ":"")+a.size+"px "+a.family,a}function en(t,e,i,s){let a,r,n,o=!0;for(a=0,r=t.length;a<r;++a)if(void 0!==(n=t[a])&&(void 0!==e&&"function"==typeof n&&(n=n(e),o=!1),void 0!==i&&L(n)&&(n=n[i%n.length],o=!1),void 0!==n))return s&&!o&&(s.cacheable=!1),n}function eo(t,e){return Object.assign(Object.create(t),e)}function el(t,e=[""],i,s,a=()=>t[0]){let r=i||t;return void 0===s&&(s=eb("_fallback",t)),new Proxy({[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:r,_fallback:s,_getTarget:a,override:i=>el([i,...t],e,r,s)},{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,s)=>ef(i,s,()=>(function(t,e,i,s){let a;for(let r of e)if(void 0!==(a=eb(ec(r,t),i)))return eu(t,a)?ep(i,s,t,a):a})(s,e,t,i)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>ex(t).includes(e),ownKeys:t=>ex(t),set(t,e,i){let s=t._storage||(t._storage=a());return t[e]=s[e]=i,delete t._keys,!0}})}function eh(t,e,i,s){return new Proxy({_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:ed(t,s),setContext:e=>eh(t,e,i,s),override:a=>eh(t.override(a),e,i,s)},{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>ef(t,e,()=>
2(function(t,e,i){let{_proxy:s,_context:a,_subProxy:r,_descriptors:n}=t,o=s[e];return Q(o)&&n.isScriptable(e)&&(o=function(t,e,i,s){let{_proxy:a,_context:r,_subProxy:n,_stack:o}=i;if(o.has(t))throw Error("Recursion detected: "+Array.from(o).join("->")+"->"+t);o.add(t);let l=e(r,n||s);return o.delete(t),eu(t,l)&&(l=ep(a._scopes,a,t,l)),l}(e,o,t,i)),L(o)&&o.length&&(o=function(t,e,i,s){let{_proxy:a,_context:r,_subProxy:n,_descriptors:o}=i;if(void 0!==r.index&&s(t))return e[r.index%e.length];if(R(e[0])){let i=e,s=a._scopes.filter(t=>t!==i);for(let l of(e=[],i)){let i=ep(s,a,t,l);e.push(eh(i,r,n&&n[t],o))}}return e}(e,o,t,n.isIndexable)),eu(e,o)&&(o=eh(o,a,r&&r[e],n)),o})(t,e,i)),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,s)=>(t[i]=s,delete e[i],!0)})}function ed(t,e={scriptable:!0,indexable:!0}){let{_scriptable:i=e.scriptable,_indexable:s=e.indexable,_allKeys:a=e.allKeys}=t;return{allKeys:a,scriptable:i,indexable:s,isScriptable:Q(i)?i:()=>i,isIndexable:Q(s)?s:()=>s}}let ec=(t,e)=>t?t+Z(e):e,eu=(t,e)=>R(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function ef(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];let s=i();return t[e]=s,s}let eg=(t,e)=>!0===t?e:"string"==typeof t?K(e,t):void 0;function ep(t,e,i,s){var a;let r=e._rootScopes,n=(a=e._fallback,Q(a)?a(i,s):a),o=[...t,...r],l=new Set;l.add(s);let h=em(l,o,i,n||i,s);return null!==h&&(void 0===n||n===i||null!==(h=em(l,o,n,h,s)))&&el(Array.from(l),[""],r,n,()=>{var t,a,r;let n,o;return t=e,a=i,r=s,a in(n=t._getTarget())||(n[a]={}),L(o=n[a])&&R(r)?r:o||{}})}function em(t,e,i,s,a){for(;i;)i=function(t,e,i,s,a){for(let n of e){let e=eg(i,n);if(e){var r;t.add(e);let n=(r=e._fallback,Q(r)?r(i,a):r);if(void 0!==n&&n!==i&&n!==s)return n}else if(!1===e&&void 0!==s&&i!==s)return null}return!1}(t,e,i,s,a);return i}function eb(t,e){for(let i of e){if(!i)continue;let e=i[t];if(void 0!==e)return e}}function ex(t){let e=t._keys;return e||(e=t._keys=function(t){let e=new Set;for(let i of t)for(let t of Object.keys(i).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}function e_(t,e,i,s){let a,r,n,{iScale:o}=t,{key:l="r"}=this._parsing,h=Array(s);for(a=0;a<s;++a)n=e[r=a+i],h[a]={r:o.parse(K(n,l),r)};return h}let ey=Number.EPSILON||1e-14,ev=(t,e)=>e<t.length&&!t[e].skip&&t[e],eM=t=>"x"===t?"y":"x";function ew(t,e,i){return Math.max(Math.min(t,i),e)}function ek(){return"u">typeof window&&"u">typeof document}function eS(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function eD(t,e,i){let s;return"string"==typeof t?(s=parseInt(t,10),-1!==t.indexOf("%")&&(s=s/100*e.parentNode[i])):s=t,s}let eP=t=>t.ownerDocument.defaultView.getComputedStyle(t,null),eC=["top","right","bottom","left"];function eO(t,e,i){let s={};i=i?"-"+i:"";for(let a=0;a<4;a++){let r=eC[a];s[r]=parseFloat(t[e+"-"+r+i])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}function eT(t,e){if("native"in t)return t;let{canvas:i,currentDevicePixelRatio:s}=e,a=eP(i),r="border-box"===a.boxSizing,n=eO(a,"padding"),o=eO(a,"border","width"),{x:l,y:h,box:d}=function(t,e){let i,s,a,r=t.touches,n=r&&r.length?r[0]:t,{offsetX:o,offsetY:l}=n,h=!1;if(a=t.target,(o>0||l>0)&&(!a||!a.shadowRoot))i=o,s=l;else{let t=e.getBoundingClientRect();i=n.clientX-t.left,s=n.clientY-t.top,h=!0}return{x:i,y:s,box:h}}(t,i),c=n.left+(d&&o.left),u=n.top+(d&&o.top),{width:f,height:g}=e;return r&&(f-=n.width+o.width,g-=n.height+o.height),{x:Math.round((l-c)/f*i.width/s),y:Math.round((h-u)/g*i.height/s)}}let eE=t=>Math.round(10*t)/10;function eA(t,e,i){let s=e||1,a=Math.floor(t.height*s),r=Math.floor(t.width*s);t.height=Math.floor(t.height),t.width=Math.floor(t.width);let n=t.canvas;return n.style&&(i||!n.style.height&&!n.style.width)&&(n.style.height=`${t.height}px`,n.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==s||n.height!==a||n.width!==r)&&(t.currentDevicePixelRatio=s,n.height=a,n.width=r,t.ctx.setTransform(s,
20,0,s,0,0),!0)}let eL=function(){let t=!1;try{let e={get passive(){return t=!0,!1}};ek()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function eR(t,e){let i=eP(t).getPropertyValue(e),s=i&&i.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function eF(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ez(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:"middle"===s?i<.5?t.y:e.y:"after"===s?i<1?t.y:e.y:i>0?e.y:t.y}}function eV(t,e,i,s){let a={x:t.cp2x,y:t.cp2y},r={x:e.cp1x,y:e.cp1y},n=eF(t,a,i),o=eF(a,r,i),l=eF(r,e,i),h=eF(n,o,i),d=eF(o,l,i);return eF(h,d,i)}function eB(t,e,i){var s;return t?(s=i,{x:t=>e+e+s-t,setWidth(t){s=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function eI(t,e){let i,s;("ltr"===e||"rtl"===e)&&(s=[(i=t.canvas.style).getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=s)}function ej(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function eW(t){return"angle"===t?{between:tx,compare:tm,normalize:tb}:{between:ty,compare:(t,e)=>t-e,normalize:t=>t}}function eH({start:t,end:e,count:i,loop:s,style:a}){return{start:t%i,end:e%i,loop:s&&(e-t+1)%i==0,style:a}}function e$(t,e,i){let s,a,r;if(!i)return[t];let{property:n,start:o,end:l}=i,h=e.length,{compare:d,between:c,normalize:u}=eW(n),{start:f,end:g,loop:p,style:m}=function(t,e,i){let s,{property:a,start:r,end:n}=i,{between:o,normalize:l}=eW(a),h=e.length,{start:d,end:c,loop:u}=t;if(u){for(d+=h,c+=h,s=0;s<h&&o(l(e[d%h][a]),r,n);++s)d--,c--;d%=h,c%=h}return c<d&&(c+=h),{start:d,end:c,loop:u,style:t.style}}(t,e,i),b=[],x=!1,_=null,y=()=>x||c(o,r,s)&&0!==d(o,r),v=()=>!x||0===d(l,s)||c(l,r,s);for(let t=f,i=f;t<=g;++t)(a=e[t%h]).skip||(s=u(a[n]))!==r&&(x=c(s,o,l),null===_&&y()&&(_=0===d(s,o)?t:i),null!==_&&v()&&(b.push(eH({start:_,end:t,loop:p,count:h,style:m})),_=null),i=t,r=s);return null!==_&&b.push(eH({start:_,end:g,loop:p,count:h,style:m})),b}function eN(t,e){let i=[],s=t.segments;for(let a=0;a<s.length;a++){let r=e$(s[a],t.points,e);r.length&&i.push(...r)}return i}function eU(t,e,i,s){return s&&s.setContext&&i?function(t,e,i,s){let a=t._chart.getContext(),r=eY(t.options),{_datasetIndex:n,options:{spanGaps:o}}=t,l=i.length,h=[],d=r,c=e[0].start,u=c;function f(t,e,s,a){let r=o?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=r;for(;i[e%l].skip;)e+=r;t%l!=e%l&&(h.push({start:t%l,end:e%l,loop:s,style:a}),d=a,c=e%l)}}for(let t of e){let e,r=i[(c=o?c:t.start)%l];for(u=c+1;u<=t.end;u++){let o=i[u%l];(function(t,e){if(!e)return!1;let i=[],s=function(t,e){return tV(e)?(i.includes(e)||i.push(e),i.indexOf(e)):e};return JSON.stringify(t,s)!==JSON.stringify(e,s)})(e=eY(s.setContext(eo(a,{type:"segment",p0:r,p1:o,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:n}))),d)&&f(c,u-1,t.loop,d),r=o,d=e}c<u-1&&f(c,u-1,t.loop,d)}return h}(t,e,i,s):e}function eY(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}var eX=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,s){let a=e.listeners[s],r=e.duration;a.forEach(s=>s({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(i-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=tP.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,s)=>{let a;if(!i.running||!i.items.length)return;let r=i.items,n=r.length-1,o=!1;for(;n>=0;--n)(a=r[n])._active?(a._total>i.duration&&(i.duration=a._total),a.tick(t),o=!0):(r[n]=r[r.length-1],r.pop());o&&(s.draw(),this._notify(s,i,t,"progress")),r.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=r.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){let e=this._charts,i=e.get(t);
2return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){let e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;let e=this._charts.get(t);return!!e&&!!e.running&&!!e.items.length}stop(t){let e=this._charts.get(t);if(!e||!e.items.length)return;let i=e.items,s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};let eq="transparent",eK={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){let s=tB(t||eq),a=s.valid&&tB(e||eq);return a&&a.valid?a.mix(s,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class eZ{constructor(t,e,i,s){const a=e[i];s=en([t.to,s,a,t.from]);const r=en([t.from,a,s]);this._active=!0,this._fn=t.fn||eK[t.type||typeof r],this._easing=tz[t.easing]||tz.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);let s=this._target[this._prop],a=i-this._start,r=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=en([t.to,e,s,t.from]),this._from=en([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let e,i=t-this._start,s=this._duration,a=this._prop,r=this._from,n=this._loop,o=this._to;if(this._active=r!==o&&(n||i<s),!this._active){this._target[a]=o,this._notify(!0);return}if(i<0){this._target[a]=r;return}e=i/s%2,e=n&&e>1?2-e:e,e=this._easing(Math.min(1,Math.max(0,e))),this._target[a]=this._fn(r,o,e)}wait(){let t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){let e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}class eG{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!R(t))return;let e=Object.keys(tK.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{let a=t[s];if(!R(a))return;let r={};for(let t of e)r[t]=a[t];(L(a.properties)&&a.properties||[s]).forEach(t=>{t!==s&&i.has(t)||i.set(t,r)})})}_animateOptions(t,e){let i=e.options,s=function(t,e){if(!e)return;let i=t.options;if(!i){t.options=e;return}return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i}(t,i);if(!s)return[];let a=this._createAnimations(s,i);return i.$shared&&(function(t,e){let i=[],s=Object.keys(e);for(let e=0;e<s.length;e++){let a=t[s[e]];a&&a.active()&&i.push(a.wait())}return Promise.all(i)})(t.options.$animations,i).then(()=>{t.options=i},()=>{}),a}_createAnimations(t,e){let i,s=this._properties,a=[],r=t.$animations||(t.$animations={}),n=Object.keys(e),o=Date.now();for(i=n.length-1;i>=0;--i){let l=n[i];if("$"===l.charAt(0))continue;if("options"===l){a.push(...this._animateOptions(t,e));continue}let h=e[l],d=r[l],c=s.get(l);if(d)if(c&&d.active()){d.update(c,h,o);continue}else d.cancel();if(!c||!c.duration){t[l]=h;continue}r[l]=d=new eZ(c,t,l,h),a.push(d)}return a}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);let i=this._createAnimations(t,e);if(i.length)return eX.add(this._chart,i),!0}}function eQ(t,e){let i=t&&t.options||{},s=i.reverse,a=void 0===i.min?e:0,r=void 0===i.max?e:0;return{start:s?r:a,end:s?a:r}}function eJ(t,e){let i,s,a=[],r=t._getSortedDatasetMetas(e);for(i=0,s=r.length;i<s;++i)a.push(r[i].index);return a}function e0(t,e,i,s={}){let a,r,n,o,l=t.keys,h="single"===s.mode;if(null!==e){for(a=0,r=l.length;a<r;++a){if((n=+l[a])===i){if(s.all)continue;break}F(o=t.values[n])&&(h||0===e||th(e)===th(o))&&(e+=o)}return e}}function e1(t,e){let i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function e2(t,e,i,s){for(let a of e.getMatchingVisibleMetas(s).reverse()){let e=t[a.index];if(i&&e>0||!i&&e<0)return a.index}return null}function e5(t,e){let i,{chart:s,_cachedMeta:a}=t,r=s._stacks||(s._stacks={}),{iScale:n,vScale:o,index:l}=a,h=n.axis,d=o.axis,c=`${n.id}.${o.id}.${a.stack||a.type}`,u=e.length;for(let t=0;t<u;++t){let s=e[t],{[h]:n,[d]:u}=s;(i=(s._stacks||(s._stacks={}
2))[d]=function(t,e,i){let s=t[e]||(t[e]={});return s[i]||(s[i]={})}(r,c,n))[l]=u,i._top=e2(i,o,!0,a.type),i._bottom=e2(i,o,!1,a.type),(i._visualValues||(i._visualValues={}))[l]=u}}function e3(t,e){let i=t.scales;return Object.keys(i).filter(t=>i[t].axis===e).shift()}function e8(t,e){let i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s)for(let a of e=e||t._parsed){let t=a._stacks;if(!t||void 0===t[s]||void 0===t[s][i])return;delete t[s][i],void 0!==t[s]._visualValues&&void 0!==t[s]._visualValues[i]&&delete t[s]._visualValues[i]}}let e4=t=>"reset"===t||"none"===t,e6=(t,e)=>e?t:Object.assign({},t);class e7{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=e1(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&e8(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(t,e,i,s)=>"x"===t?e:"r"===t?s:i,a=e.xAxisID=V(i.xAxisID,e3(t,"x")),r=e.yAxisID=V(i.yAxisID,e3(t,"y")),n=e.rAxisID=V(i.rAxisID,e3(t,"r")),o=e.indexAxis,l=e.iAxisID=s(o,a,r,n),h=e.vAxisID=s(o,r,a,n);e.xScale=this.getScaleForId(a),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(n),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&tS(this._data,this),t._stacked&&e8(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(R(e))this._data=function(t){let e,i,s,a=Object.keys(t),r=Array(a.length);for(e=0,i=a.length;e<i;++e)s=a[e],r[e]={x:s,y:t[s]};return r}(e);else if(i!==e){if(i){tS(i,this);let t=this._cachedMeta;e8(t),t._parsed=[]}e&&Object.isExtensible(e)&&(e._chartjs?e._chartjs.listeners.push(this):(Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[this]}}),tk.forEach(t=>{let i="_onData"+Z(t),s=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...t){let a=s.apply(this,t);return e._chartjs.listeners.forEach(e=>{"function"==typeof e[i]&&e[i](...t)}),a}})}))),this._syncList=[],this._data=e}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let e=this._cachedMeta,i=this.getDataset(),s=!1;this._dataCheck();let a=e._stacked;e._stacked=e1(e.vScale,e),e.stack!==i.stack&&(s=!0,e8(e),e.stack=i.stack),this._resyncElements(t),(s||a!==e._stacked)&&e5(this,e._parsed)}configure(){let t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){let i,s,a,{_cachedMeta:r,_data:n}=this,{iScale:o,_stacked:l}=r,h=o.axis,d=0===t&&e===n.length||r._sorted,c=t>0&&r._parsed[t-1];if(!1===this._parsing)r._parsed=n,r._sorted=!0,a=n;else{a=L(n[t])?this.parseArrayData(r,n,t,e):R(n[t])?this.parseObjectData(r,n,t,e):this.parsePrimitiveData(r,n,t,e);let o=()=>null===s[h]||c&&s[h]<c[h];for(i=0;i<e;++i)r._parsed[i+t]=s=a[i],d&&(o()&&(d=!1),c=s);r._sorted=d}l&&e5(this,a)}
2parsePrimitiveData(t,e,i,s){let a,r,{iScale:n,vScale:o}=t,l=n.axis,h=o.axis,d=n.getLabels(),c=n===o,u=Array(s);for(a=0;a<s;++a)r=a+i,u[a]={[l]:c||n.parse(d[r],r),[h]:o.parse(e[r],r)};return u}parseArrayData(t,e,i,s){let a,r,n,{xScale:o,yScale:l}=t,h=Array(s);for(a=0;a<s;++a)n=e[r=a+i],h[a]={x:o.parse(n[0],r),y:l.parse(n[1],r)};return h}parseObjectData(t,e,i,s){let a,r,n,{xScale:o,yScale:l}=t,{xAxisKey:h="x",yAxisKey:d="y"}=this._parsing,c=Array(s);for(a=0;a<s;++a)n=e[r=a+i],c[a]={x:o.parse(K(n,h),r),y:l.parse(K(n,d),r)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){let s=this.chart,a=this._cachedMeta,r=e[t.axis];return e0({keys:eJ(s,!0),values:e._stacks[t.axis]._visualValues},r,a.index,{mode:i})}updateRangeFromParsed(t,e,i,s){let a=i[e.axis],r=null===a?NaN:a,n=s&&i._stacks[e.axis];s&&n&&(s.values=n,r=e0(s,a,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,e){let i,s,a,r=this._cachedMeta,n=r._parsed,o=r._sorted&&t===r.iScale,l=n.length,h=this._getOtherScale(t),d=(a=this.chart,e&&!r.hidden&&r._stacked&&{keys:eJ(a,!0),values:null}),c={min:1/0,max:-1/0},{min:u,max:f}=function(t){let{min:e,max:i,minDefined:s,maxDefined:a}=t.getUserBounds();return{min:s?e:-1/0,max:a?i:1/0}}(h);function g(){let e=(s=n[i])[h.axis];return!F(s[t.axis])||u>e||f<e}for(i=0;i<l&&(g()||(this.updateRangeFromParsed(c,t,s,d),!o));++i);if(o){for(i=l-1;i>=0;--i)if(!g()){this.updateRangeFromParsed(c,t,s,d);break}}return c}getAllParsedValues(t){let e,i,s,a=this._cachedMeta._parsed,r=[];for(e=0,i=a.length;e<i;++e)F(s=a[e][t.axis])&&r.push(s);return r}getMaxOverflow(){return!1}getLabelAndValue(t){let e=this._cachedMeta,i=e.iScale,s=e.vScale,a=this.getParsed(t);return{label:i?""+i.getLabelForValue(a[i.axis]):"",value:s?""+s.getLabelForValue(a[s.axis]):""}}_update(t){var e;let i,s,a,r,n=this._cachedMeta;this.update(t||"default"),R(e=V(this.options.clip,function(t,e,i){if(!1===i)return!1;let s=eQ(t,i),a=eQ(e,i);return{top:a.end,right:s.end,bottom:a.start,left:s.start}}(n.xScale,n.yScale,this.getMaxOverflow())))?(i=e.top,s=e.right,a=e.bottom,r=e.left):i=s=a=r=e,n._clip={top:i,right:s,bottom:a,left:r,disabled:!1===e}}update(t){}draw(){let t,e=this._ctx,i=this.chart,s=this._cachedMeta,a=s.data||[],r=i.chartArea,n=[],o=this._drawStart||0,l=this._drawCount||a.length-o,h=this.options.drawActiveElementsOnTop;for(s.dataset&&s.dataset.draw(e,r,o,l),t=o;t<o+l;++t){let i=a[t];i.hidden||(i.active&&h?n.push(i):i.draw(e,r))}for(t=0;t<n.length;++t)n[t].draw(e,r)}getStyle(t,e){let i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){var s,a;let r,n=this.getDataset();if(t>=0&&t<this._cachedMeta.data.length){let e=this._cachedMeta.data[t];(r=e.$context||(s=this.getContext(),e.$context=eo(s,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"}))).parsed=this.getParsed(t),r.raw=n.data[t],r.index=r.dataIndex=t}else(r=this.$context||(this.$context=eo(this.chart.getContext(),{active:!1,dataset:void 0,datasetIndex:a=this.index,index:a,mode:"default",type:"dataset"}))).dataset=n,r.index=r.datasetIndex=this.index;return r.active=!!e,r.mode=i,r}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){let s="active"===e,a=this._cachedDataOpts,r=t+"-"+e,n=a[r],o=this.enableOptionSharing&&G(i);if(n)return e6(n,o);let l=this.chart.config,h=l.datasetElementScopeKeys(this._type,t),d=s?[`${t}Hover`,"hover",t,""]:[t,""],c=l.getOptionScopes(this.getDataset(),h),u=Object.keys(tK.elements[t]),f=()=>this.getContext(i,s,e),g=l.resolveNamedOptions(c,u,f,d);return g.$shared&&(g.$shared=o,a[r]=Object.freeze(e6(g,o))),g}_resolveAnimations(t,e,i){let s,a=this.chart,r=this._cachedDataOpts,n=`animation-${e}`,o=r[n];if(o)return o;if(!1!==a.options.animation){let a=this.chart.config,r=a.datasetAnimationScopeKeys(this._type,e),n=a.getOptionScopes(this.getDataset(),r);s=a.createResolver(n,this.getContext(t,i,e))}let l=new eG(a,s&&s.animations);return s&&s._cacheable&&(r[n]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||e4(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,a=this.getSharedOptions(i),r=this.includeOptions(e,a)||a!==s;return this.updateSharedOptions(a,e,i),{sharedOptions:a,includeOptions:r}}updateElement(t,e,i,s){e4(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!e4(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;let a=this.getStyle(e,s);
2this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,i=this._cachedMeta.data;for(let[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];let s=i.length,a=e.length,r=Math.min(a,s);r&&this.parse(0,r),a>s?this._insertElements(s,a-s,t):a<s&&this._removeElements(a,s-a)}_insertElements(t,e,i=!0){let s,a=this._cachedMeta,r=a.data,n=t+e,o=t=>{for(t.length+=e,s=t.length-1;s>=n;s--)t[s]=t[s-e]};for(o(r),s=t;s<n;++s)r[s]=new this.dataElementType;this._parsing&&o(a._parsed),this.parse(t,e),i&&this.updateElements(r,t,e,"reset")}updateElements(t,e,i,s){}_removeElements(t,e){let i=this._cachedMeta;if(this._parsing){let s=i._parsed.splice(t,e);i._stacked&&e8(i,s)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{let[e,i,s]=t;this[e](i,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){let t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);let i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function e9(t,e,i,s){if(L(t)){let a,r,n,o,l,h;a=i.parse(t[0],s),n=Math.min(a,r=i.parse(t[1],s)),o=Math.max(a,r),l=n,h=o,Math.abs(n)>Math.abs(o)&&(l=o,h=n),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:a,end:r,min:n,max:o}}else e[i.axis]=i.parse(t,s);return e}function it(t,e,i,s){let a,r,n,o,l=t.iScale,h=t.vScale,d=l.getLabels(),c=l===h,u=[];for(a=i,r=i+s;a<r;++a)o=e[a],(n={})[l.axis]=c||l.parse(d[a],a),u.push(e9(o,n,h,a));return u}function ie(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function ii(t,e,i,s){var a,r,n;return s?is((a=t,r=e,n=i,t=a===r?n:a===n?r:a),i,e):is(t,e,i)}function is(t,e,i){return"start"===t?e:"end"===t?i:t}class ia extends e7{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,i,s){return it(t,e,i,s)}parseArrayData(t,e,i,s){return it(t,e,i,s)}parseObjectData(t,e,i,s){let a,r,n,o,{iScale:l,vScale:h}=t,{xAxisKey:d="x",yAxisKey:c="y"}=this._parsing,u="x"===l.axis?d:c,f="x"===h.axis?d:c,g=[];for(a=i,r=i+s;a<r;++a)o=e[a],(n={})[l.axis]=l.parse(K(o,u),a),g.push(e9(K(o,f),n,h,a));return g}updateRangeFromParsed(t,e,i,s){super.updateRangeFromParsed(t,e,i,s);let a=i._custom;a&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){let{iScale:e,vScale:i}=this._cachedMeta,s=this.getParsed(t),a=s._custom,r=ie(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+e.getLabelForValue(s[e.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){let e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,s){let a="reset"===s,{index:r,_cachedMeta:{vScale:n}}=this,o=n.getBasePixel(),l=n.isHorizontal(),h=this._getRuler(),{sharedOptions:d,includeOptions:c}=this._getSharedOptions(e,s);for(let u=e;u<e+i;u++){let e=this.getParsed(u),i=a||A(e[n.axis])?{base:o,head:o}:this._calculateBarValuePixels(u),f=this._calculateBarIndexPixels(u,h),g=(e._stacks||{})[n.axis],p={horizontal:l,base:i.base,enableBorderRadius:!g||ie(e._custom)||r===g._top||r===g._bottom,x:l?i.head:f.center,y:l?f.center:i.head,height:l?f.size:Math.abs(i.size),width:l?Math.abs(i.size):f.size};c&&(p.options=d||this.resolveDataElementOptions(u,t[u].active?"active":s));let m=p.options||t[u].options;
2!function(t,e,i,s){let a,r,n,o,l,h=e.borderSkipped,d={};if(!h){t.borderSkipped=d;return}if(!0===h){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:c,end:u,reverse:f,top:g,bottom:p}=(t.horizontal?(a=t.base>t.x,r="left",n="right"):(a=t.base<t.y,r="bottom",n="top"),a?(o="end",l="start"):(o="start",l="end"),{start:r,end:n,reverse:a,top:o,bottom:l});"middle"===h&&i&&(t.enableBorderRadius=!0,(i._top||0)===s?h=g:(i._bottom||0)===s?h=p:(d[ii(p,c,u,f)]=!0,h=g)),d[ii(h,c,u,f)]=!0,t.borderSkipped=d}(p,m,g,r),function(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?.33*(1===i):e}(p,m,h.ratio),this.updateElement(t[u],u,p,s)}}_getStacks(t,e){let{iScale:i}=this._cachedMeta,s=i.getMatchingVisibleMetas(this._type).filter(t=>t.controller.options.grouped),a=i.options.stacked,r=[],n=t=>{let i=t.controller.getParsed(e),s=i&&i[t.vScale.axis];if(A(s)||isNaN(s))return!0};for(let i of s)if(!(void 0!==e&&n(i))&&((!1===a||-1===r.indexOf(i.stack)||void 0===a&&void 0===i.stack)&&r.push(i.stack),i.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){let s=this._getStacks(t,i),a=void 0!==e?s.indexOf(e):-1;return -1===a?s.length-1:a}_getRuler(){let t,e,i=this.options,s=this._cachedMeta,a=s.iScale,r=[];for(t=0,e=s.data.length;t<e;++t)r.push(a.getPixelForValue(this.getParsed(t)[a.axis],t));let n=i.barThickness;return{min:n||function(t){let e,i,s,a,r=t.iScale,n=function(t,e){if(!t._cache.$bar){let i=t.getMatchingVisibleMetas(e),s=[];for(let e=0,a=i.length;e<a;e++)s=s.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=tD(s.sort((t,e)=>t-e))}return t._cache.$bar}(r,t.type),o=r._length,l=()=>{32767!==s&&-32768!==s&&(G(a)&&(o=Math.min(o,Math.abs(s-a)||o)),a=s)};for(e=0,i=n.length;e<i;++e)s=r.getPixelForValue(n[e]),l();for(e=0,a=void 0,i=r.ticks.length;e<i;++e)s=r.getPixelForTick(e),l();return o}(s),pixels:r,start:a._startPixel,end:a._endPixel,stackCount:this._getStackCount(),scale:a,grouped:i.grouped,ratio:n?1:i.categoryPercentage*i.barPercentage}}_calculateBarValuePixels(t){let e,i,{_cachedMeta:{vScale:s,_stacked:a,index:r},options:{base:n,minBarLength:o}}=this,l=n||0,h=this.getParsed(t),d=h._custom,c=ie(d),u=h[s.axis],f=0,g=a?this.applyStack(s,h,a):u;g!==u&&(f=g-u,g=u),c&&(u=d.barStart,g=d.barEnd-d.barStart,0!==u&&th(u)!==th(d.barEnd)&&(f=0),f+=u);let p=A(n)||c?f:n,m=s.getPixelForValue(p);if(Math.abs(i=(e=this.chart.getDataVisibility(t)?s.getPixelForValue(f+g):m)-m)<o){var b;i=(0!==(b=i)?th(b):(s.isHorizontal()?1:-1)*(s.min>=l?1:-1))*o,u===l&&(m-=i/2);let t=s.getPixelForDecimal(0),n=s.getPixelForDecimal(1),d=Math.min(t,n);e=(m=Math.max(Math.min(m,Math.max(t,n)),d))+i,a&&!c&&(h._stacks[s.axis]._visualValues[r]=s.getValueForPixel(e)-s.getValueForPixel(m))}if(m===s.getPixelForValue(l)){let t=th(i)*s.getLineWidthForValue(l)/2;m+=t,i-=t}return{size:i,base:m,head:e,center:e+i/2}}_calculateBarIndexPixels(t,e){let i,s,a=e.scale,r=this.options,n=r.skipNull,o=V(r.maxBarThickness,1/0);if(e.grouped){let a,l,h,d,c,u,f,g,p,m=n?this._getStackCount(t):e.stackCount,b="flex"===r.barThickness?(l=(a=e.pixels)[t],h=t>0?a[t-1]:null,d=t<a.length-1?a[t+1]:null,c=r.categoryPercentage,null===h&&(h=l-(null===d?e.end-e.start:d-l)),null===d&&(d=l+l-h),u=l-(l-Math.min(h,d))/2*c,{chunk:Math.abs(d-h)/2*c/m,ratio:r.barPercentage,start:u}):(A(p=r.barThickness)?(f=e.min*r.categoryPercentage,g=r.barPercentage):(f=p*m,g=1),{chunk:f/m,ratio:g,start:e.pixels[t]-f/2}),x=this._getStackIndex(this.index,this._cachedMeta.stack,n?t:void 0);i=b.start+b.chunk*x+b.chunk/2,s=Math.min(o,b.chunk*b.ratio)}else i=a.getPixelForValue(this.getParsed(t)[a.axis],t),s=Math.min(o,e.min*e.ratio);return{base:i-s/2,head:i+s/2,center:i,size:s}}draw(){let t=this._cachedMeta,e=t.vScale,i=t.data,s=i.length,a=0;for(;a<s;++a)null!==this.getParsed(a)[e.axis]&&i[a].draw(this._ctx)}}class ir extends e7{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"]}}
2,cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map((e,a)=>{let r=t.getDatasetMeta(0).controller.getStyle(a);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:s,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){let i=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=i;else{let a,r,n=t=>+i[t];if(R(i[t])){let{key:t="value"}=this._parsing;n=e=>+K(i[e],t)}for(a=t,r=t+e;a<r;++a)s._parsed[a]=n(a)}}_getRotation(){return tf(this.options.rotation-90)}_getCircumference(){return tf(this.options.circumference)}_getRotationExtents(){let t=te,e=-te;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){let s=this.chart.getDatasetMeta(i).controller,a=s._getRotation(),r=s._getCircumference();t=Math.min(t,a),e=Math.max(e,a+r)}return{rotation:t,circumference:e-t}}update(t){let e,{chartArea:i}=this.chart,s=this._cachedMeta,a=s.data,r=this.getMaxBorderWidth()+this.getMaxOffset(a
2)+this.options.spacing,n=Math.max((Math.min(i.width,i.height)-r)/2,0),o=Math.min((e=this.options.cutout,"string"==typeof e&&e.endsWith("%")?parseFloat(e)/100:e/n),1),l=this._getRingWeight(this.index),{circumference:h,rotation:d}=this._getRotationExtents(),{ratioX:c,ratioY:u,offsetX:f,offsetY:g}=function(t,e,i){let s=1,a=1,r=0,n=0;if(e<te){let o=t+e,l=Math.cos(t),h=Math.sin(t),d=Math.cos(o),c=Math.sin(o),u=(e,s,a)=>tx(e,t,o,!0)?1:Math.max(s,s*i,a,a*i),f=(e,s,a)=>tx(e,t,o,!0)?-1:Math.min(s,s*i,a,a*i),g=u(0,l,d),p=u(tr,h,c),m=f(tt,l,d),b=f(tt+tr,h,c);s=(g-m)/2,a=(p-b)/2,r=-(g+m)/2,n=-(p+b)/2}return{ratioX:s,ratioY:a,offsetX:r,offsetY:n}}(d,h,o),p=Math.max(Math.min((i.width-r)/c,(i.height-r)/u)/2,0),m=B(this.options.radius,p),b=Math.max(m*o,0),x=(m-b)/this._getVisibleDatasetWeightTotal();this.offsetX=f*m,this.offsetY=g*m,s.total=this.calculateTotal(),this.outerRadius=m-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*l,0),this.updateElements(a,0,a.length,t)}_circumference(t,e){let i=this.options,s=this._cachedMeta,a=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*a/te)}updateElements(t,e,i,s){let a,r="reset"===s,n=this.chart,o=n.chartArea,l=n.options.animation,h=(o.left+o.right)/2,d=(o.top+o.bottom)/2,c=r&&l.animateScale,u=c?0:this.innerRadius,f=c?0:this.outerRadius,{sharedOptions:g,includeOptions:p}=this._getSharedOptions(e,s),m=this._getRotation();for(a=0;a<e;++a)m+=this._circumference(a,r);for(a=e;a<e+i;++a){let e=this._circumference(a,r),i=t[a],n={x:h+this.offsetX,y:d+this.offsetY,startAngle:m,endAngle:m+e,circumference:e,outerRadius:f,innerRadius:u};p&&(n.options=g||this.resolveDataElementOptions(a,i.active?"active":s)),m+=e,this.updateElement(i,a,n,s)}}calculateTotal(){let t,e=this._cachedMeta,i=e.data,s=0;for(t=0;t<i.length;t++){let a=e._parsed[t];null!==a&&!isNaN(a)&&this.chart.getDataVisibility(t)&&!i[t].hidden&&(s+=Math.abs(a))}return s}calculateCircumference(t){let e=this._cachedMeta.total;return e>0&&!isNaN(t)?Math.abs(t)/e*te:0}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart,s=i.data.labels||[],a=t$(e._parsed[t],i.options.locale);return{label:s[t]||"",value:a}}getMaxBorderWidth(t){let e,i,s,a,r,n=0,o=this.chart;if(!t){for(e=0,i=o.data.datasets.length;e<i;++e)if(o.isDatasetVisible(e)){t=(s=o.getDatasetMeta(e)).data,a=s.controller;break}}if(!t)return 0;for(e=0,i=t.length;e<i;++e)"inner"!==(r=a.resolveDataElementOptions(e)).borderAlign&&(n=Math.max(n,r.borderWidth||0,r.hoverBorderWidth||0));return n}getMaxOffset(t){let e=0;for(let i=0,s=t.length;i<s;++i){let t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(V(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class io extends e7{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let e=this._cachedMeta,{dataset:i,data:s=[],_dataset:a}=e,r=this.chart._animationsDisabled,{start:n,count:o}=tE(e,s,r);this._drawStart=n,this._drawCount=o,tA(e)&&(n=0,o=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!a._decimated,i.points=s;let l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!r,options:l},t),this.updateElements(s,n,o,t)}updateElements(t,e,i,s){let a="reset"===s,{iScale:r,vScale:n,_stacked:o,_dataset:l}=this._cachedMeta,{sharedOptions:h,includeOptions:d}=this._getSharedOptions(e,s),c=r.axis,u=n.axis,{spanGaps:f,segment:g}=this.options,p=tu(f)?f:1/0,m=this.chart._animationsDisabled||a||"none"===s,b=e+i,x=t.length,_=e>0&&this.getParsed(e-1);for(let i=0;i<x;++i){let f=t[i],x=m?f:{};if(i<e||i>=b){x.skip=!0;continue}let y=this.getParsed(i),v=A(y[u]),M=x[c]=r.getPixelForValue(y[c],i),w=x[u]=a||v?n.getBasePixel():n.getPixelForValue(o?this.applyStack(n,y,o):y[u],i);x.skip=isNaN(M)||isNaN(w)||v,x.stop=i>0&&Math.abs(y[c]-_[c])>p,g&&(x.parsed=y,x.raw=l.data[i]),d&&(x.options=h||this.resolveDataElementOptions(i,f.active?"active":s)),m||this.updateElement(f,i,x,s),_=y}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];return s.length?Math.max(i,s[0].size(this.resolveDataElementOptions(0)),s[s.length-1].size(this.resolveDataElementOptions(s.length-1)))/2:i}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function il(){throw Error("This method is not implemented: Check that a complete date adapter is provided.")}var ih=class t{static override(e){Object.assign(t.prototype,e)}options;constructor(t){this.options=t||{}}init(){}formats(){return il()}parse(){return il()}format(){return il()}add(){return il()}diff(){return il()}startOf(){return il()}endOf(){return il()}};function id(t,e,i,s,a){let r=t.getSortedVisibleDatasetMetas(),n=i[e];for(let t=0,i=r.length;t<i;++t){let{index:i,data:o}=r[t],{lo:l,hi:h}
2=function(t,e,i,s){let{controller:a,data:r,_sorted:n}=t,o=a._cachedMeta.iScale;if(o&&e===o.axis&&"r"!==e&&n&&r.length){let t=o._reversePixels?tw:tM;if(!s)return t(r,e,i);if(a._sharedOptions){let s=r[0],a="function"==typeof s.getRange&&s.getRange(e);if(a){let s=t(r,e,i-a),n=t(r,e,i+a);return{lo:s.lo,hi:n.hi}}}}return{lo:0,hi:r.length-1}}(r[t],e,n,a);for(let t=l;t<=h;++t){let e=o[t];e.skip||s(e,i,t)}}}function ic(t,e,i,s,a){let r=[];return(a||t.isPointInArea(e))&&id(t,i,e,function(i,n,o){(a||t1(i,t.chartArea,0))&&i.inRange(e.x,e.y,s)&&r.push({element:i,datasetIndex:n,index:o})},!0),r}function iu(t,e,i,s,a,r){let n,o,l,h,d,c;return r||t.isPointInArea(e)?"r"!==i||s?(n=[],o=-1!==i.indexOf("x"),l=-1!==i.indexOf("y"),h=function(t,e){return Math.sqrt(Math.pow(o?Math.abs(t.x-e.x):0,2)+Math.pow(l?Math.abs(t.y-e.y):0,2))},d=1/0,id(t,i,e,function(i,o,l){let c=i.inRange(e.x,e.y,a);if(s&&!c)return;let u=i.getCenterPoint(a);if(!(r||t.isPointInArea(u))&&!c)return;let f=h(e,u);f<d?(n=[{element:i,datasetIndex:o,index:l}],d=f):f===d&&n.push({element:i,datasetIndex:o,index:l})}),n):(c=[],id(t,i,e,function(t,i,s){var r,n;let o,l,h,d,{startAngle:u,endAngle:f}=t.getProps(["startAngle","endAngle"],a),{angle:g}=(r=t,o=(n={x:e.x,y:e.y}).x-r.x,h=Math.sqrt(o*o+(l=n.y-r.y)*l),(d=Math.atan2(l,o))<-.5*tt&&(d+=te),{angle:d,distance:h});tx(g,u,f)&&c.push({element:t,datasetIndex:i,index:s})}),c):[]}function ig(t,e,i,s,a){let r=[],n="x"===i?"inXRange":"inYRange",o=!1;return(id(t,i,e,(t,s,l)=>{t[n](e[i],a)&&(r.push({element:t,datasetIndex:s,index:l}),o=o||t.inRange(e.x,e.y,a))}),s&&!o)?[]:r}var ip={modes:{index(t,e,i,s){let a=eT(e,t),r=i.axis||"x",n=i.includeInvisible||!1,o=i.intersect?ic(t,a,r,s,n):iu(t,a,r,!1,s,n),l=[];return o.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{let e=o[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})}),l):[]},dataset(t,e,i,s){let a=eT(e,t),r=i.axis||"xy",n=i.includeInvisible||!1,o=i.intersect?ic(t,a,r,s,n):iu(t,a,r,!1,s,n);if(o.length>0){let e=o[0].datasetIndex,i=t.getDatasetMeta(e).data;o=[];for(let t=0;t<i.length;++t)o.push({element:i[t],datasetIndex:e,index:t})}return o},point(t,e,i,s){let a=eT(e,t);return ic(t,a,i.axis||"xy",s,i.includeInvisible||!1)},nearest(t,e,i,s){let a=eT(e,t),r=i.axis||"xy",n=i.includeInvisible||!1;return iu(t,a,r,i.intersect,s,n)}
2,x(t,e,i,s){let a=eT(e,t);return ig(t,a,"x",i.intersect,s)},y(t,e,i,s){let a=eT(e,t);return ig(t,a,"y",i.intersect,s)}}};let im=["left","top","right","bottom"];function ib(t,e){return t.filter(t=>t.pos===e)}function ix(t,e){return t.filter(t=>-1===im.indexOf(t.pos)&&t.box.axis===e)}function i_(t,e){return t.sort((t,i)=>{let s=e?i:t,a=e?t:i;return s.weight===a.weight?s.index-a.index:s.weight-a.weight})}function iy(t,e,i,s){return Math.max(t[i],e[i])+Math.max(t[s],e[s])}function iv(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function iM(t,e,i,s){let a,r,n,o,l,h,d=[];for(a=0,r=t.length,l=0;a<r;++a){(o=(n=t[a]).box).update(n.width||e.w,n.height||e.h,function(t,e){let i=e.maxPadding;return function(t){let s={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{s[t]=Math.max(e[t],i[t])}),s}(t?["left","right"]:["top","bottom"])}(n.horizontal,e));let{same:r,other:c}=function(t,e,i,s){let{pos:a,box:r}=i,n=t.maxPadding;if(!R(a)){i.size&&(t[a]-=i.size);let e=s[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?r.height:r.width),i.size=e.size/e.count,t[a]+=i.size}r.getPadding&&iv(n,r.getPadding());let o=Math.max(0,e.outerWidth-iy(n,t,"left","right")),l=Math.max(0,e.outerHeight-iy(n,t,"top","bottom")),h=o!==t.w,d=l!==t.h;return t.w=o,t.h=l,i.horizontal?{same:h,other:d}:{same:d,other:h}}(e,i,n,s);l|=r&&d.length,h=h||c,o.fullSize||d.push(n)}return l&&iM(d,e,i,s)||h}function iw(t,e,i,s,a){t.top=i,t.left=e,t.right=e+s,t.bottom=i+a,t.width=s,t.height=a}function ik(t,e,i,s){let a=i.padding,{x:r,y:n}=e;for(let o of t){let t=o.box,l=s[o.stack]||{count:1,placed:0,weight:1},h=o.stackWeight/l.weight||1;if(o.horizontal){let s=e.w*h,r=l.size||t.height;G(l.start)&&(n=l.start),t.fullSize?iw(t,a.left,n,i.outerWidth-a.right-a.left,r):iw(t,e.left+l.placed,n,s,r),l.start=n,l.placed+=s,n=t.bottom}else{let s=e.h*h,n=l.size||t.width;G(l.start)&&(r=l.start),t.fullSize?iw(t,r,a.top,n,i.outerHeight-a.bottom-a.top):iw(t,r,e.top+l.placed,n,s),l.start=r,l.placed+=s,r=t.right}}e.x=r,e.y=n}var iS={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){let i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,s){let a,r,n,o,l,h,d,c;if(!t)return;let u=ea(t.options.layout.padding),f=Math.max(e-u.width,0),g=Math.max(i-u.height,0),p=(r=i_((a=function(t){let e,i,s,a,r,n,o=[];for(e=0,i=(t||[]).length;e<i;++e)s=t[e],({position:a,options:{stack:r,stackWeight:n=1}}=s),o.push({index:e,box:s,pos:a,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&a+r,stackWeight:n});return o}(t.boxes)).filter(t=>t.box.fullSize),!0),n=i_(ib(a,"left"),!0),o=i_(ib(a,"right")),l=i_(ib(a,"top"),!0),h=i_(ib(a,"bottom")),d=ix(a,"x"),c=ix(a,"y"),{fullSize:r,leftAndTop:n.concat(l),rightAndBottom:o.concat(c).concat(h).concat(d),chartArea:ib(a,"chartArea"),vertical:n.concat(o).concat(c),horizontal:l.concat(h).concat(d)}),m=p.vertical,b=p.horizontal;j(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});let x=Object.freeze({outerWidth:e,outerHeight:i,padding:u,availableWidth:f,availableHeight:g,vBoxMaxWidth:f/2/(m.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1),hBoxMaxHeight:g/2}),_=Object.assign({},u);iv(_,ea(s));let y=Object.assign({maxPadding:_,w:f,h:g,x:u.left,y:u.top},u),v=function(t,e){let i,s,a,r=function(t){let e={};for(let i of t){let{stack:t,pos:s,stackWeight:a}=i;if(!t||!im.includes(s))continue;let r=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=a}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:o}=e;for(i=0,s=t.length;i<s;++i){let{fullSize:s}=(a=t[i]).box,l=r[a.stack],h=l&&a.stackWeight/l.weight;a.horizontal?(a.width=h?h*n:s&&e.availableWidth,a.height=o):(a.width=n,a.height=h?h*o:s&&e.availableHeight)}return r}(m.concat(b),x);iM(p.fullSize,y,x,v),iM(m,y,x,v),iM(b,y,x,v)&&iM(m,y,x,v);let M=y.maxPadding;function w(t){let e=Math.max(M[t]-y[t],0);return y[t]+=e,e}y.y+=w("top"),y.x+=w("left"),w("right"),w("bottom"),ik(p.leftAndTop,y,x,v),y.x+=y.w,y.y+=y.h,ik(p.rightAndBottom,y,x,v),t.chartArea={left:y.left,top:y.top,right:y.left+y.w,bottom:y.top+y.h,height:y.h,width:y.w},j(p.chartArea,e=>{let i=e.box;Object.assign(i,t.chartArea),i.update(y.w,y.h,{left:0,top:0,right:0,bottom:0})})}};class iD{acquireContext(t,e){}releaseContext(t){return!1}
2addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class iP extends iD{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}let iC="$chartjs",iO={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},iT=t=>null===t||""===t,iE=!!eL&&{passive:!0};function iA(t,e){for(let i of t)if(i===e||i.contains(e))return!0}function iL(t,e,i){let s=t.canvas,a=new MutationObserver(t=>{let e=!1;for(let i of t)e=(e=e||iA(i.addedNodes,s))&&!iA(i.removedNodes,s);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}function iR(t,e,i){let s=t.canvas,a=new MutationObserver(t=>{let e=!1;for(let i of t)e=(e=e||iA(i.removedNodes,s))&&!iA(i.addedNodes,s);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}let iF=new Map,iz=0;function iV(){let t=window.devicePixelRatio;t!==iz&&(iz=t,iF.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function iB(t,e,i){let s=t.canvas,a=s&&eS(s);if(!a)return;let r=tC((t,e)=>{let s=a.clientWidth;i(t,e),s<a.clientWidth&&i()},window),n=new ResizeObserver(t=>{let e=t[0],i=e.contentRect.width,s=e.contentRect.height;(0!==i||0!==s)&&r(i,s)});return n.observe(a),iF.size||window.addEventListener("resize",iV),iF.set(t,r),n}function iI(t,e,i){i&&i.disconnect(),"resize"===e&&(iF.delete(t),iF.size||window.removeEventListener("resize",iV))}function ij(t,e,i){let s=t.canvas,a=tC(e=>{null!==t.ctx&&i(function(t,e){let i=iO[t.type]||t.type,{x:s,y:a}=eT(t,e);return{type:i,chart:e,native:t,x:void 0!==s?s:null,y:void 0!==a?a:null}}(e,t))},t);return s.addEventListener(e,a,iE),a}class iW extends iD{acquireContext(t,e){let i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(!function(t,e){let i=t.style,s=t.getAttribute("height"),a=t.getAttribute("width");if(t[iC]={initial:{height:s,width:a,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",iT(a)){let e=eR(t,"width");void 0!==e&&(t.width=e)}if(iT(s))if(""===t.style.height)t.height=t.width/(e||2);else{let e=eR(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){let e=t.canvas;if(!e[iC])return!1;let i=e[iC].initial;["height","width"].forEach(t=>{let s=i[t];A(s)?e.removeAttribute(t):e.setAttribute(t,s)});let s=i.style||{};return Object.keys(s).forEach(t=>{e.style[t]=s[t]}),e.width=e.width,delete e[iC],!0}addEventListener(t,e,i){this.removeEventListener(t,e);let s=t.$proxies||(t.$proxies={}),a={attach:iL,detach:iR,resize:iB}[e]||ij;s[e]=a(t,e,i)}removeEventListener(t,e){let i=t.$proxies||(t.$proxies={}),s=i[e];s&&((({attach:iI,detach:iI,resize:iI})[e]||function(t,e,i){t.canvas.removeEventListener(e,i,iE)})(t,e,s),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return function(t,e,i,s){let a=eP(t),r=eO(a,"margin"),n=eD(a.maxWidth,t,"clientWidth")||ts,o=eD(a.maxHeight,t,"clientHeight")||ts,l=function(t,e,i){let s,a;if(void 0===e||void 0===i){let r=eS(t);if(r){let t=r.getBoundingClientRect(),n=eP(r),o=eO(n,"border","width"),l=eO(n,"padding");e=t.width-l.width-o.width,i=t.height-l.height-o.height,s=eD(n.maxWidth,r,"clientWidth"),a=eD(n.maxHeight,r,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:s||ts,maxHeight:a||ts}}(t,e,i),{width:h,height:d}=l;if("content-box"===a.boxSizing){let t=eO(a,"border","width"),e=eO(a,"padding");h-=e.width+t.width,d-=e.height+t.height}return h=Math.max(0,h-r.width),d=Math.max(0,s?h/s:d-r.height),h=eE(Math.min(h,n,l.maxWidth)),d=eE(Math.min(d,o,l.maxHeight)),h&&!d&&(d=eE(h/2)),(void 0!==e||void 0!==i)&&s&&l.height&&d>l.height&&(h=eE(Math.floor((d=l.height)*s))),{width:h,height:d}}(t,e,i,s)}isAttached(t){let e=eS(t);return!!(e&&e.isConnected)}}class iH{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){let{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return tu(this.x)&&tu(this.y)}getProps(t,e){let i=this.$animations;if(!e||!i)return this;let s={};return t.forEach(t=>{s[t]=i[t]&&i[t].active()?i[t]._to:this[t]}),s}}function i$(t,e,i,s,a){let r,n,o,l=V(s,0),h=Math.min(V(a,t.length),t.length),d=0;for(i=Math.ceil(i),a&&(i=(r=a-s)/Math.floor(r/i)),o=l;o<0;)o=Math.round(l+ ++d*i);for(n=Math.max(l,0);n<h;n++)n===o&&(e.push(t[n]),o=Math.round(l+ ++d*i))}let iN=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,iU=(t,e)=>Math.min(e||t,t);function iY(t,e){let i=[],s=t.length/e,a=t.length,r=0;for(;r<a;r+=s)i.push(t[Math.floor(r)]);return i}function iX(t){return t.drawTicks?t.tickLength:0}function iq(t,e){if(!t.display)return 0;let i=er(t.font,e),s=ea(t.padding);return(L(t.text)?t.text.length:1)*i.lineHeight+s.height}class iK extends iH{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:s}=this;return t=z(t,1/0),e=z(e,-1/0),i=z(i,1/0),s=z(s,-1/0),{min:z(t,i),max:z(e,s),minDefined:F(t),maxDefined:F(e)}}getMinMax(t){let e,{min:i,max:s,minDefined:a,maxDefined:r}=this.getUserBounds();if(a&&r)return{min:i,max:s};let n=this.getMatchingVisibleMetas();for(let o=0,l=n.length;o<l;++o)e=n[o].controller.getMinMax(this,t),a||(i=Math.min(i,e.min)),r||(s=Math.max(s,e.max));return i=r&&i>s?s:i,s=a&&i>s?i:s,{min:z(i,z(s,i)),max:z(s,z(i,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}
2getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){I(this.options.beforeUpdate,[this])}update(t,e,i){let{beginAtZero:s,grace:a,ticks:r}=this.options,n=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){let{min:s,max:a}=t,r=B(e,(a-s)/2),n=(t,e)=>i&&0===t?0:t+e;return{min:n(s,-Math.abs(r)),max:n(a,r)}}(this,a,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let o=n<this.ticks.length;this._convertTicksToLabels(o?iY(this.ticks,n):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||"auto"===r.source)&&(this.ticks=function(t,e){var i;let s,a,r=t.options.ticks,n=(s=(i=t).options.offset,a=i._tickSize(),Math.floor(Math.min(i._length/a+ +!s,i._maxLength/a))),o=Math.min(r.maxTicksLimit||n,n),l=r.major.enabled?function(t){let e,i,s=[];for(e=0,i=t.length;e<i;e++)t[e].major&&s.push(e);return s}(e):[],h=l.length,d=l[0],c=l[h-1],u=[];if(h>o)return function(t,e,i,s){let a,r=0,n=i[0];for(s=Math.ceil(s),a=0;a<t.length;a++)a===n&&(e.push(t[a]),n=i[++r*s])}(e,u,l,h/o),u;let f=function(t,e,i){let s=function(t){let e,i,s=t.length;if(s<2)return!1;for(i=t[0],e=1;e<s;++e)if(t[e]-t[e-1]!==i)return!1;return i}(t),a=e.length/i;if(!s)return Math.max(a,1);let r=function(t){let e,i=[],s=Math.sqrt(t);for(e=1;e<s;e++)t%e==0&&(i.push(e),i.push(t/e));return s===(0|s)&&i.push(s),i.sort((t,e)=>t-e).pop(),i}(s);for(let t=0,e=r.length-1;t<e;t++){let e=r[t];if(e>a)return e}return Math.max(a,1)}(l,e,o);if(h>0){let t,i,s=h>1?Math.round((c-d)/(h-1)):null;for(i$(e,u,f,A(s)?0:d-s,d),t=0,i=h-1;t<i;t++)i$(e,u,f,l[t],l[t+1]);return i$(e,u,f,c,A(s)?e.length:c+s),u}return i$(e,u,f),u}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),o&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){I(this.options.afterUpdate,[this])}beforeSetDimensions(){I(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(){I(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),I(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){I(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){let e,i,s,a=this.options.ticks;for(e=0,i=t.length;e<i;e++)(s=t[e]).label=I(a.callback,[s.value,e,t],this)}afterTickToLabelConversion(){I(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){I(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let t,e,i,s=this.options,a=s.ticks,r=iU(this.ticks.length,s.ticks.maxTicksLimit),n=a.minRotation||0,o=a.maxRotation,l=n;if(!this._isVisible()||!a.display||n>=o||r<=1||!this.isHorizontal()){this.labelRotation=n;return}
2let h=this._getLabelSizes(),d=h.widest.width,c=h.highest.height,u=t_(this.chart.width-d,0,this.maxWidth);d+6>(t=s.offset?this.maxWidth/r:u/(r-1))&&(t=u/(r-(s.offset?.5:1)),e=this.maxHeight-iX(s.grid)-a.padding-iq(s.title,this.chart.options.font),i=Math.sqrt(d*d+c*c),l=Math.max(n,Math.min(o,l=180/tt*Math.min(Math.asin(t_((h.highest.height+6)/t,-1,1)),Math.asin(t_(e/i,-1,1))-Math.asin(t_(c/i,-1,1)))))),this.labelRotation=l}afterCalculateLabelRotation(){I(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){I(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:a}}=this,r=this._isVisible(),n=this.isHorizontal();if(r){let r=iq(s,e.options.font);if(n?(t.width=this.maxWidth,t.height=iX(a)+r):(t.height=this.maxHeight,t.width=iX(a)+r),i.display&&this.ticks.length){let{first:e,last:s,widest:a,highest:r}=this._getLabelSizes(),o=2*i.padding,l=tf(this.labelRotation),h=Math.cos(l),d=Math.sin(l);if(n){let e=i.mirror?0:d*a.width+h*r.height;t.height=Math.min(this.maxHeight,t.height+e+o)}else{let e=i.mirror?0:h*a.width+d*r.height;t.width=Math.min(this.maxWidth,t.width+e+o)}this._calculatePadding(e,s,d,h)}}this._handleMargins(),n?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){let{ticks:{align:a,padding:r},position:n}=this.options,o=0!==this.labelRotation,l="top"!==n&&"x"===this.axis;if(this.isHorizontal()){let n=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1),d=0,c=0;o?l?(d=s*t.width,c=i*e.height):(d=i*t.height,c=s*e.width):"start"===a?c=e.width:"end"===a?d=t.width:"inner"!==a&&(d=t.width/2,c=e.width/2),this.paddingLeft=Math.max((d-n+r)*this.width/(this.width-n),0),this.paddingRight=Math.max((c-h+r)*this.width/(this.width-h),0)}else{let i=e.height/2,s=t.height/2;"start"===a?(i=0,s=t.height):"end"===a&&(i=e.height,s=0),this.paddingTop=i+r,this.paddingBottom=s+r}}_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(){I(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)A(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){let e=this.options.ticks.sampleSize,i=this.ticks;e<i.length&&(i=iY(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){let s,a,r,n,o,l,h,d,c,u,f,{ctx:g,_longestTextCache:p}=this,m=[],b=[],x=Math.floor(e/iU(e,i)),_=0,y=0;for(s=0;s<e;s+=x){if(n=t[s].label,g.font=l=(o=this._resolveTickFontOptions(s)).string,h=p[l]=p[l]||{data:{},gc:[]},d=o.lineHeight,c=u=0,A(n)||L(n)){if(L(n))for(a=0,r=n.length;a<r;++a)A(f=n[a])||L(f)||(c=tZ(g,h.data,h.gc,c,f),u+=d)}else c=tZ(g,h.data,h.gc,c,n),u=d;m.push(c),b.push(u),_=Math.max(c,_),y=Math.max(u,y)}j(p,t=>{let i,s=t.gc,a=s.length/2;if(a>e){for(i=0;i<a;++i)delete t.data[s[i]];s.splice(0,a)}});let v=m.indexOf(_),M=b.indexOf(y),w=t=>({width:m[t]||0,height:b[t]||0});return{first:w(0),last:w(e-1),widest:w(v),highest:w(M),widths:m,heights:b}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let e=this._startPixel+t*this._length;return t_(this._alignToPixels?tG(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){let e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){var e,i;let s=this.ticks||[];if(t>=0&&t<s.length){let i=s[t];return i.$context||(e=this.getContext(),i.$context=eo(e,{tick:i,index:t,type:"tick"}))}return this.$context||(this.$context=(i=this.chart.getContext(),eo(i,{scale:this,type:"scale"})))}_tickSize(){let t=this.options.ticks,e=tf(this.labelRotation),i=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),a=this._getLabelSizes(),r=t.autoSkipPadding||0,n=a?a.widest.width+r:0,o=a?a.highest.height+r:0;return this.isHorizontal()?o*i>n*s?n/i:o/s:o*s<n*i?o/i:n/s}_isVisible(){let t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){let e,i,s,a,r,n,o,l,h,d,c,u,f=this.axis,g=this.chart,p=this.options,{grid:m,position:b,border:x}=p,_=m.offset,y=this.isHorizontal(),v=this.ticks.length+ +!!_,M=iX(m),w=[],k=x.setContext(this.getContext()),S=k.display?k.width:0,D=S/2,P=function(t){return tG(g,t,S)};if("top"===b)e=P(this.bottom),n=this.bottom-M,l=e-D,d=P(t.top)+D,u=t.bottom;else if("bottom"===b)e=P(this.top),d=t.top,u=P(t.bottom)-D,n=e+D,l=this.top+M;else if("left"===b)e=P(this.right),r=this.right-M,o=e-D,h=P(t.left)+D,c=t.right;else if("right"===b)e=P(this.left),h=t.left,c=P(t.right)-D,r=e+D,o=this.left+M;else if("x"===f){if("center"===b)e=P((t.top+t.bottom)/2+.5);else if(R(b)){let t=Object.keys(b)[0],i=b[t];e=P(this.chart.scales[t].getPixelForValue(i))}d=t.top,u=t.bottom,l=(n=e+D)+M}else if("y"===f){if("center"===b)e=P((t.left+t.right)/2);else if(R(b)){let t=Object.keys(b)[0],i=b[t];e=P(this.chart.scales[t].getPixelForValue(i))}o=(r=e-D)-M,h=t.left,c=t.right}let C=V(p.ticks.maxTicksLimit,v),O=Math.max(1,Math.ceil(v/C));for(i=0;i<v;i+=O){let t=this.getContext(i),e=m.setContext(t),f=x.setContext(t),p=e.lineWidth,b=e.color,v=f.dash||[],M=f.dashOffset,k=e.tickWidth,S=e.tickColor,D=e.tickBorderDash||[],P=e.tickBorderDashOffset;
2void 0!==(s=function(t,e,i){let s,a=t.ticks.length,r=Math.min(e,a-1),n=t._startPixel,o=t._endPixel,l=t.getPixelForTick(r);if(!i||(s=1===a?Math.max(l-n,o-l):0===e?(t.getPixelForTick(1)-l)/2:(l-t.getPixelForTick(r-1))/2,!((l+=r<e?s:-s)<n-1e-6)&&!(l>o+1e-6)))return l}(this,i,_))&&(a=tG(g,s,p),y?r=o=h=c=a:n=l=d=u=a,w.push({tx1:r,ty1:n,tx2:o,ty2:l,x1:h,y1:d,x2:c,y2:u,width:p,color:b,borderDash:v,borderDashOffset:M,tickWidth:k,tickColor:S,tickBorderDash:D,tickBorderDashOffset:P}))}return this._ticksLength=v,this._borderValue=e,w}_computeLabelItems(t){let e,i,s,a,r,n,o,l,h,d,c,u=this.axis,f=this.options,{position:g,ticks:p}=f,m=this.isHorizontal(),b=this.ticks,{align:x,crossAlign:_,padding:y,mirror:v}=p,M=iX(f.grid),w=M+y,k=v?-y:w,S=-tf(this.labelRotation),D=[],P="middle";if("top"===g)r=this.bottom-k,n=this._getXAxisLabelAlignment();else if("bottom"===g)r=this.top+k,n=this._getXAxisLabelAlignment();else if("left"===g){let t=this._getYAxisLabelAlignment(M);n=t.textAlign,a=t.x}else if("right"===g){let t=this._getYAxisLabelAlignment(M);n=t.textAlign,a=t.x}
2else if("x"===u){if("center"===g)r=(t.top+t.bottom)/2+w;else if(R(g)){let t=Object.keys(g)[0],e=g[t];r=this.chart.scales[t].getPixelForValue(e)+w}n=this._getXAxisLabelAlignment()}else if("y"===u){if("center"===g)a=(t.left+t.right)/2-w;else if(R(g)){let t=Object.keys(g)[0],e=g[t];a=this.chart.scales[t].getPixelForValue(e)}n=this._getYAxisLabelAlignment(M).textAlign}"y"===u&&("start"===x?P="top":"end"===x&&(P="bottom"));let C=this._getLabelSizes();for(e=0,i=b.length;e<i;++e){let t;s=b[e].label;let u=p.setContext(this.getContext(e));o=this.getPixelForTick(e)+p.labelOffset,h=(l=this._resolveTickFontOptions(e)).lineHeight;let f=(d=L(s)?s.length:1)/2,x=u.color,y=u.textStrokeColor,M=u.textStrokeWidth,w=n;if(m?(a=o,"inner"===n&&(w=e===i-1?this.options.reverse?"left":"right":0===e?this.options.reverse?"right":"left":"center"),c="top"===g?"near"===_||0!==S?-d*h+h/2:"center"===_?-C.highest.height/2-f*h+h:-C.highest.height+h/2:"near"===_||0!==S?h/2:"center"===_?C.highest.height/2-f*h:C.highest.height-d*h,v&&(c*=-1),0===S||u.showLabelBackdrop||(a+=h/2*Math.sin(S))):(r=o,c=(1-d)*h/2),u.showLabelBackdrop){let s=ea(u.backdropPadding),a=C.heights[e],r=C.widths[e],o=c-s.top,l=0-s.left;switch(P){case"middle":o-=a/2;break;case"bottom":o-=a}switch(n){case"center":l-=r/2;break;case"right":l-=r;break;case"inner":e===i-1?l-=r:e>0&&(l-=r/2)}t={left:l,top:o,width:r+s.width,height:a+s.height,color:u.backdropColor}}D.push({label:s,font:l,textOffset:c,options:{rotation:S,color:x,strokeColor:y,strokeWidth:M,textAlign:w,textBaseline:P,translation:[a,r],backdrop:t}})}return D}_getXAxisLabelAlignment(){let{position:t,ticks:e}=this.options;if(-tf(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){let e,i,{position:s,ticks:{crossAlign:a,mirror:r,padding:n}}=this.options,o=this._getLabelSizes(),l=t+n,h=o.widest.width;return"left"===s?r?(i=this.right+n,"near"===a?e="left":"center"===a?(e="center",i+=h/2):(e="right",i+=h)):(i=this.right-l,"near"===a?e="right":"center"===a?(e="center",i-=h/2):(e="left",i=this.left)):"right"===s?r?(i=this.left+n,"near"===a?e="right":"center"===a?(e="center",i-=h/2):(e="left",i-=h)):(i=this.left+l,"near"===a?e="left":"center"===a?(e="center",i+=h/2):(e="right",i=this.right)):e="right",{textAlign:e,x:i}}_computeLabelArea(){if(this.options.ticks.mirror)return;let t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}
2:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){let{ctx:t,options:{backgroundColor:e},left:i,top:s,width:a,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,a,r),t.restore())}getLineWidthForValue(t){let e=this.options.grid;if(!this._isVisible()||!e.display)return 0;let i=this.ticks.findIndex(e=>e.value===t);return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){let e,i,s=this.options.grid,a=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),n=(t,e,i)=>{i.width&&i.color&&(a.save(),a.lineWidth=i.width,a.strokeStyle=i.color,a.setLineDash(i.borderDash||[]),a.lineDashOffset=i.borderDashOffset,a.beginPath(),a.moveTo(t.x,t.y),a.lineTo(e.x,e.y),a.stroke(),a.restore())};if(s.display)for(e=0,i=r.length;e<i;++e){let t=r[e];s.drawOnChartArea&&n({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),s.drawTicks&&n({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){let t,e,i,s,{chart:a,ctx:r,options:{border:n,grid:o}}=this,l=n.setContext(this.getContext()),h=n.display?l.width:0;
2if(!h)return;let d=o.setContext(this.getContext(0)).lineWidth,c=this._borderValue;this.isHorizontal()?(t=tG(a,this.left,h)-h/2,e=tG(a,this.right,d)+d/2,i=s=c):(i=tG(a,this.top,h)-h/2,s=tG(a,this.bottom,d)+d/2,t=e=c),r.save(),r.lineWidth=l.width,r.strokeStyle=l.color,r.beginPath(),r.moveTo(t,i),r.lineTo(e,s),r.stroke(),r.restore()}drawLabels(t){if(!this.options.ticks.display)return;let e=this.ctx,i=this._computeLabelArea();for(let s of(i&&t2(e,i),this.getLabelItems(t))){let t=s.options,i=s.font;t4(e,s.label,0,s.textOffset,i,t)}i&&t5(e)}drawTitle(){let t,e,{ctx:i,options:{position:s,title:a,reverse:r}}=this;if(!a.display)return;let n=er(a.font),o=ea(a.padding),l=a.align,h=n.lineHeight/2;"bottom"===s||"center"===s||R(s)?(h+=o.bottom,L(a.text)&&(h+=n.lineHeight*(a.text.length-1))):h+=o.top;let{titleX:d,titleY:c,maxWidth:u,rotation:f}=function(t,e,i,s){let a,r,n,{top:o,left:l,bottom:h,right:d,chart:c}=t,{chartArea:u,scales:f}=c,g=0,p=h-o,m=d-l;if(t.isHorizontal()){if(r=tT(s,l,d),R(i)){let t=Object.keys(i)[0],s=i[t];n=f[t].getPixelForValue(s)+p-e}else n="center"===i?(u.bottom+u.top)/2+p-e:iN(t,i,e);a=d-l}else{if(R(i)){let t=Object.keys(i)[0],s=i[t];r=f[t].getPixelForValue(s)-m+e}else r="center"===i?(u.left+u.right)/2-m+e:iN(t,i,e);n=tT(s,h,o),g="left"===i?-tr:tr}return{titleX:r,titleY:n,maxWidth:a,rotation:g}}(this,h,s,l);t4(i,a.text,0,0,n,{color:a.color,maxWidth:u,rotation:f,textAlign:(t=tO(l),(r&&"right"!==s||!r&&"right"===s)&&(t="left"===(e=t)?"right":"right"===e?"left":e),t),textBaseline:"middle",translation:[d,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){let t=this.options,e=t.ticks&&t.ticks.z||0,i=V(t.grid&&t.grid.z,-1),s=V(t.border&&t.border.z,0);return this._isVisible()&&this.draw===iK.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){let e,i,s=this.chart.getSortedVisibleDatasetMetas(),a=this.axis+"AxisID",r=[];for(e=0,i=s.length;e<i;++e){let i=s[e];i[a]!==this.id||t&&i.type!==t||r.push(i)}return r}_resolveTickFontOptions(t){return er(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){let t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class iZ{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){var e,i,s,a,r,n;let o,l,h=Object.getPrototypeOf(t);"id"in(e=h)&&"defaults"in e&&(l=this.register(h));let d=this.items,c=t.id,u=this.scope+"."+c;if(!c)throw Error("class does not have id: "+t);return c in d||(d[c]=t,i=t,s=u,a=l,o=U(Object.create(null),[a?tK.get(a):{},tK.get(s),i.defaults]),tK.set(s,o),i.defaultRoutes&&(r=s,Object.keys(n=i.defaultRoutes).forEach(t=>{let e=t.split("."),i=e.pop(),s=[r].concat(e).join("."),a=n[t].split("."),o=a.pop(),l=a.join(".");tK.route(s,i,l,o)})),i.descriptors&&tK.describe(s,i.descriptors),this.override&&tK.override(t.id,t.overrides)),u}get(t){return this.items[t]}unregister(t){let e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in tK[s]&&(delete tK[s][i],this.override&&delete tU[i])}}var iG=new class{constructor(){this.controllers=new iZ(e7,"datasets",!0),this.elements=new iZ(iH,"elements"),this.plugins=new iZ(Object,"plugins"),this.scales=new iZ(iK,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}
2removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(e=>{let s=i||this._getRegistryForType(e);i||s.isForType(e)||s===this.plugins&&e.id?this._exec(t,s,e):j(e,e=>{let s=i||this._getRegistryForType(e);this._exec(t,s,e)})})}_exec(t,e,i){let s=Z(t);I(i["before"+s],[],i),e[t](i),I(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){let i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){let s=e.get(t);if(void 0===s)throw Error('"'+t+'" is not a registered '+i+".");return s}};class iQ{constructor(){this._init=[]}notify(t,e,i,s){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));let a=s?this._descriptors(t).filter(s):this._descriptors(t),r=this._notify(a,t,e,i);return"afterDestroy"===e&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,e,i,s){for(let a of(s=s||{},t)){let t=a.plugin;if(!1===I(t[i],[e,s,a.options],t)&&s.cancelable)return!1}return!0}invalidate(){A(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;let e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){let i=t&&t.config,s=V(i.options&&i.options.plugins,{}),a=function(t){let e={},i=[],s=Object.keys(iG.plugins.items);for(let t=0;t<s.length;t++)i.push(iG.getPlugin(s[t]));let a=t.plugins||[];for(let t=0;t<a.length;t++){let s=a[t];-1===i.indexOf(s)&&(i.push(s),e[s.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==s||e?function(t,{plugins:e,localIds:i},s,a){let r=[],n=t.getContext();for(let l of e){var o;let e=l.id,h=(o=s[e],a||!1!==o?!0===o?{}:o:null);null!==h&&r.push({plugin:l,options:function(t,{plugin:e,local:i},s,a){let r=t.pluginScopeKeys(e),n=t.getOptionScopes(s,r);return i&&e.defaults&&n.push(e.defaults),t.createResolver(n,a,[""],{scriptable:!1,indexable:!1,allKeys:!0})}(t.config,{plugin:l,local:i[e]},h,n)})}return r}(t,a,s,e):[]}_notifyStateChanges(t){let e=this._oldCache||[],i=this._cache,s=(t,e)=>t.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function iJ(t,e){let i=tK.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function i0(t){if("x"===t||"y"===t||"r"===t)return t}function i1(t,...e){if(i0(t))return t;for(let s of e){var i;let e=s.axis||("top"===(i=s.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.length>1&&i0(t[0].toLowerCase());if(e)return e}throw Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function i2(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function i5(t){let e,i,s,a,r=t.options||(t.options={});r.plugins=V(r.plugins,{}),e=tU[t.type]||{scales:{}},i=r.scales||{}
2,s=iJ(t.type,r),a=Object.create(null),Object.keys(i).forEach(r=>{let n=i[r];if(!R(n))return console.error(`Invalid scale configuration for scale: ${r}`);if(n._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);let o=i1(r,n,function(t,e){if(e.data&&e.data.datasets){let i=e.data.datasets.filter(e=>e.xAxisID===t||e.yAxisID===t);if(i.length)return i2(t,"x",i[0])||i2(t,"y",i[0])}return{}}(r,t),tK.scales[n.type]),l=o===s?"_index_":"_value_",h=e.scales||{};a[r]=Y(Object.create(null),[{axis:o},n,h[o],h[l]])}),t.data.datasets.forEach(e=>{let s=e.type||t.type,n=e.indexAxis||iJ(s,r),o=(tU[s]||{}).scales||{};Object.keys(o).forEach(t=>{let s,r=(s=t,"_index_"===t?s=n:"_value_"===t&&(s="x"===n?"y":"x"),s),l=e[r+"AxisID"]||r;a[l]=a[l]||Object.create(null),Y(a[l],[{axis:r},i[l],o[t]])})}),Object.keys(a).forEach(t=>{let e=a[t];Y(e,[tK.scales[e.type],tK.scale])}),r.scales=a}function i3(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}let i8=new Map,i4=new Set;function i6(t,e){let i=i8.get(t);return i||(i=e(),i8.set(t,i),i4.add(i)),i}let i7=(t,e,i)=>{let s=K(e,i);void 0!==s&&t.add(s)};class i9{constructor(t){this._config=function(t){return(t=t||{}).data=i3(t.data),i5(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=i3(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),i5(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return i6(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return i6(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return i6(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,i=this.type;return i6(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){let i=this._scopeCache,s=i.get(t);return(!s||e)&&(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){let{options:s,type:a}=this,r=this._cachedScopes(t,i),n=r.get(e);if(n)return n;let o=new Set;e.forEach(e=>
2{t&&(o.add(t),e.forEach(e=>i7(o,t,e))),e.forEach(t=>i7(o,s,t)),e.forEach(t=>i7(o,tU[a]||{},t)),e.forEach(t=>i7(o,tK,t)),e.forEach(t=>i7(o,tY,t))});let l=Array.from(o);return 0===l.length&&l.push(Object.create(null)),i4.has(e)&&r.set(e,l),l}chartOptionScopes(){let{options:t,type:e}=this;return[t,tU[e]||{},tK.datasets[e]||{},{type:e},tK,tY]}resolveNamedOptions(t,e,i,s=[""]){let a={$shared:!0},{resolver:r,subPrefixes:n}=st(this._resolverCache,t,s),o=r;if(function(t,e){let{isScriptable:i,isIndexable:s}=ed(t);for(let a of e){let e=i(a),r=s(a),n=(r||e)&&t[a];if(e&&(Q(n)||se(n))||r&&L(n))return!0}return!1}(r,e)){a.$shared=!1,i=Q(i)?i():i;let e=this.createResolver(t,i,n);o=eh(r,i,e)}for(let t of e)a[t]=o[t];return a}createResolver(t,e,i=[""],s){let{resolver:a}=st(this._resolverCache,t,i);return R(e)?eh(a,e,void 0,s):a}}function st(t,e,i){let s=t.get(e);s||(s=new Map,t.set(e,s));let a=i.join(),r=s.get(a);return r||(r={resolver:el(e,i),subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},s.set(a,r)),r}let se=t=>R(t)&&Object.getOwnPropertyNames(t).some(e=>Q(t[e])),si=["top","bottom","left","right","chartArea"];function ss(t,e){return"top"===t||"bottom"===t||-1===si.indexOf(t)&&"x"===e}function sa(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function sr(t){let e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),I(i&&i.onComplete,[t],e)}function sn(t){let e=t.chart,i=e.options.animation;I(i&&i.onProgress,[t],e)}function so(t){return ek()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}let sl={},sh=t=>{let e=so(t);return Object.values(sl).filter(t=>t.canvas===e).pop()};function sd(t,e,i){return t.options.clip?t[i]:e[i]}class sc{static defaults=tK;static instances=sl;static overrides=tU;static registry=iG;static version="4.4.1";static getChart=sh;static register(...t){iG.add(...t),su()}static unregister(...t){iG.remove(...t),su()}constructor(t,e){const i=this.config=new i9(e),s=so(t),a=sh(s);if(a)throw Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const r=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!ek()||"u">typeof OffscreenCanvas&&t instanceof OffscreenCanvas?iP:iW}(s)),this.platform.updateConfig(i);const n=this.platform.acquireContext(s,r.aspectRatio),o=n&&n.canvas,l=o&&o.height,h=o&&o.width;if(this.id=E(),this.ctx=n,this.canvas=o,this.width=h,this.height=l,this._options=r,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 iQ,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...s){return e?(clearTimeout(i),i=setTimeout(t,e,s)):t.apply(this,s),e}}(t=>this.update(t),r.resizeDelay||0),this._dataChanges=[],sl[this.id]=this,!n||!o)return void console.error("Failed to create chart: can't acquire context from the given item");eX.listen(this,"complete",sr),eX.listen(this,"progress",sn),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:s,_aspectRatio:a}=this;return A(t)?e&&a?a:s?i/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return iG}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():eA(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return tQ(this.canvas,this.ctx),this}stop(){return eX.stop(this),this}resize(t,e){eX.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let i=this.options,s=this.canvas,a=i.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(s,t,e,a),n=i.devicePixelRatio||this.platform.getDevicePixelRatio(),o=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,eA(this,n,!0)&&(this.notifyPlugins("resize",{size:r}),I(i.onResize,[this,r],this),this.attached&&this._doResize(o)&&this.render())}ensureScalesHaveIDs(){j(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){let t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce((t,e)=>(t[e]=!1,t),{}),a=[];e&&(a=a.concat(Object.keys(e).map(t=>{let i=e[t],s=i1(t,i),a="r"===s,r="x"===s;return{options:i,dposition:a?"chartArea":r?"bottom":"left",dtype:a?"radialLinear":r?"category":"linear"}}))),j(a,e=>{let a=e.options,r=a.id,n=i1(r,a),o=V(a.type,e.dtype);(void 0===a.position||ss(a.position,n)!==ss(e.dposition))&&(a.position=e.dposition),s[r]=!0;let l=null;r in i&&i[r].type===o?l=i[r]:i[(l=new(iG.getScale(o))({id:r,type:o,ctx:this.ctx,
2chart:this})).id]=l,l.init(a,t)}),j(s,(t,e)=>{t||delete i[e]}),j(i,t=>{iS.configure(this,t,t.options),iS.addBox(this,t)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((t,e)=>t.index-e.index),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(sa("order","index"))}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((t,i)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){let t,e,i=[],s=this.data.datasets;for(this._removeUnreferencedMetasets(),t=0,e=s.length;t<e;t++){let e=s[t],a=this.getDatasetMeta(t),r=e.type||this.config.type;if(a.type&&a.type!==r&&(this._destroyDatasetMeta(t),a=this.getDatasetMeta(t)),a.type=r,a.indexAxis=e.indexAxis||iJ(r,this.options),a.order=e.order||0,a.index=t,a.label=""+e.label,a.visible=this.isDatasetVisible(t),a.controller)a.controller.updateIndex(t),a.controller.linkScales();else{let e=iG.getController(r),{datasetElementType:s,dataElementType:n}=tK.datasets[r];Object.assign(e,{dataElementType:iG.getElement(n),datasetElementType:s&&iG.getElement(s)}),a.controller=new e(this,t),i.push(a.controller)}}return this._updateMetasets(),i}_resetElements(){j(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;let a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let t=0,e=this.data.datasets.length;t<e;t++){let{controller:e}=this.getDatasetMeta(t),i=!s&&-1===a.indexOf(e);e.buildOrUpdateElements(i),r=Math.max(+e.getMaxOverflow(),r)}r=this._minPadding=i.layout.autoPadding?r:0,this._updateLayout(r),s||j(a,t=>{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(sa("z","_idx"));let{_active:n,_lastEvent:o}=this;o?this._eventHandler(o,!0):n.length&&this._updateHoverStyles(n,n,!0),this.render()}_updateScales(){j(this.scales,t=>{iS.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options;J(new Set(Object.keys(this._listeners)),new Set(t.events))&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this;for(let{method:i,start:s,count:a}of this._getUniformDataChanges()||[]){var e="_removeElements"===i?-a:a;for(let i of Object.keys(t)){let a=+i;if(a>=s){let r=t[i];delete t[i],(e>0||a>s)&&(t[a+e]=r)}}}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,i=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),s=i(0);for(let t=1;t<e;t++)if(!J(s,i(t)))return;return Array.from(s).map(t=>t.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;iS.update(this,this.width,this.height,t);let e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],j(this.boxes,t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,Q(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){let i=this.getDatasetMeta(t),s={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",s)&&(i.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(eX.has(this)?this.attached&&!eX.running(this)&&eX.start(this):(this.draw(),sr({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){let{width:t,height:e}=this._resizeBeforeDraw;this._resize(t,e),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;let e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){let e,i,s=this._sortedMetasets,a=[];for(e=0,i=s.length;e<i;++e){let i=s[e];(!t||i.visible)&&a.push(i)}return a}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;let t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,i=t._clip,s=!i.disabled,a=function(t,e){let{xScale:i,yScale:s}=t;
2return i&&s?{left:sd(i,e,"left"),right:sd(i,e,"right"),top:sd(s,e,"top"),bottom:sd(s,e,"bottom")}:e}(t,this.chartArea),r={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",r)&&(s&&t2(e,{left:!1===i.left?0:a.left-i.left,right:!1===i.right?this.width:a.right+i.right,top:!1===i.top?0:a.top-i.top,bottom:!1===i.bottom?this.height:a.bottom+i.bottom}),t.controller.draw(),s&&t5(e),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return t1(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){let a=ip.modes[e];return"function"==typeof a?a(this,t,i,s):[]}getDatasetMeta(t){let e=this.data.datasets[t],i=this._metasets,s=i.filter(t=>t&&t._dataset===e).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=eo(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){let s=i?"show":"hide",a=this.getDatasetMeta(t),r=a.controller._resolveAnimations(void 0,s);G(e)?(a.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),r.update(a,{visible:i}),this.update(e=>e.datasetIndex===t?s:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),eX.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),tQ(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete sl[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let t=this._listeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};j(this.options.events,t=>i(t,s))}bindResponsiveEvents(){let t;this._responsiveListeners||(this._responsiveListeners={});let e=this._responsiveListeners,i=this.platform,s=(t,s)=>{i.addEventListener(this,t,s),e[t]=s},a=(t,s)=>{e[t]&&(i.removeEventListener(this,t,s),delete e[t])},r=(t,e)=>{this.canvas&&this.resize(t,e)},n=()=>{a("attach",n),this.attached=!0,this.resize(),s("resize",r),s("detach",t)};t=()=>{this.attached=!1,a("resize",r),this._stop(),this._resize(0,0),s("attach",n)},i.isAttached(this.canvas)?n():t()}unbindEvents(){j(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},j(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){let s,a,r,n=i?"set":"remove";for("dataset"===e&&this.getDatasetMeta(t[0].datasetIndex).controller["_"+n+"DatasetHoverStyle"](),a=0,r=t.length;a<r;++a){let e=(s=t[a])&&this.getDatasetMeta(s.datasetIndex).controller;e&&e[n+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){let e=this._active||[],i=t.map(({datasetIndex:t,index:e})=>{let i=this.getDatasetMeta(t);if(!i)throw Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}});W(i,e)||(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter(e=>e.plugin.id===t).length}_updateHoverStyles(t,e,i){let s=this.options.hover,a=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),r=a(e,t),n=i?t:a(t,e);r.length&&this.updateHoverStyle(r,s.mode,!1),n.length&&s.mode&&this.updateHoverStyle(n,s.mode,!0)}_eventHandler(t,e){let i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,s))return;let a=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(a||i.changed)&&this.render(),this}_handleEvent(t,e,i){var s;let{_active:a=[],options:r}=this,n=this._getActiveElements(t,a,i,e),o="mouseup"===t.type||"click"===t.type||"contextmenu"===t.type,l=(s=this._lastEvent,i&&"mouseout"!==t.type?o?s:t:null);i&&(this._lastEvent=null,I(r.onHover,[t,n,this],this),o&&I(r.onClick,[t,n,this],this));let h=!W(n,a);
2return(h||e)&&(this._active=n,this._updateHoverStyles(n,a,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,s){if("mouseout"===t.type)return[];if(!i)return e;let a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,s)}}function su(){return j(sc.instances,t=>t._plugins.invalidate())}function sf(t,e,i=e){t.lineCap=V(i.borderCapStyle,e.borderCapStyle),t.setLineDash(V(i.borderDash,e.borderDash)),t.lineDashOffset=V(i.borderDashOffset,e.borderDashOffset),t.lineJoin=V(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=V(i.borderWidth,e.borderWidth),t.strokeStyle=V(i.borderColor,e.borderColor)}function sg(t,e,i){t.lineTo(i.x,i.y)}function sp(t,e,i={}){let s=t.length,{start:a=0,end:r=s-1}=i,{start:n,end:o}=e,l=Math.max(a,n),h=Math.min(r,o);return{count:s,start:l,loop:e.loop,ilen:h<l&&!(a<n&&r<n||a>o&&r>o)?s+h-l:h-l}}function sm(t,e,i,s){let a,r,n,{points:o,options:l}=e,{count:h,start:d,loop:c,ilen:u}=sp(o,i,s),f=l.stepped?t3:l.tension||"monotone"===l.cubicInterpolationMode?t8:sg,{move:g=!0,reverse:p}=s||{};for(a=0;a<=u;++a)(r=o[(d+(p?u-a:a))%h]).skip||(g?(t.moveTo(r.x,r.y),g=!1):f(t,n,r,p,l.stepped),n=r);return c&&f(t,n,r=o[(d+(p?u:0))%h],p,l.stepped),!!c}function sb(t,e,i,s){let a,r,n,o,l,h,d=e.points,{count:c,start:u,ilen:f}=sp(d,i,s),{move:g=!0,reverse:p}=s||{},m=0,b=0,x=t=>(u+(p?f-t:t))%c,_=()=>{o!==l&&(t.lineTo(m,l),t.lineTo(m,o),t.lineTo(m,h))};for(g&&(r=d[x(0)],t.moveTo(r.x,r.y)),a=0;a<=f;++a){if((r=d[x(a)]).skip)continue;let e=r.x,i=r.y,s=0|e;s===n?(i<o?o=i:i>l&&(l=i),m=(b*m+e)/++b):(_(),t.lineTo(e,i),n=s,b=0,o=l=i),h=i}_()}function sx(t){let e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?sm:sb}let s_="function"==typeof Path2D;class sy extends iH{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){let i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){let s=i.spanGaps?this._loop:this._fullLoop;!function(t,e,i,s,a){let r,n,o,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){let i,s,a,r=eM(e),n=t.length,o=Array(n).fill(0),l=Array(n),h=ev(t,0);for(i=0;i<n;++i)if(s=a,a=h,h=ev(t,i+1),a){if(h){let t=h[e]-a[e];o[i]=0!==t?(h[r]-a[r])/t:0}l[i]=s?h?th(o[i-1])!==th(o[i])?0:(o[i-1]+o[i])/2:o[i-1]:o[i]}!function(t,e,i){let s,a,r,n,o,l=t.length,h=ev(t,0);for(let d=0;d<l-1;++d)if(o=h,h=ev(t,d+1),o&&h){if(td(e[d],0,ey)){i[d]=i[d+1]=0;continue}(n=Math.pow(s=i[d]/e[d],2)+Math.pow(a=i[d+1]/e[d],2))<=9||(r=3/Math.sqrt(n),i[d]=s*r*e[d],i[d+1]=a*r*e[d])}}(t,o,l),function(t,e,i="x"){let s,a,r,n=eM(i),o=t.length,l=ev(t,0);for(let h=0;h<o;++h){if(a=r,r=l,l=ev(t,h+1),!r)continue;let o=r[i],d=r[n];a&&(s=(o-a[i])/3,r[`cp1${i}`]=o-s,r[`cp1${n}`]=d-s*e[h]),l&&(s=(l[i]-o)/3,r[`cp2${i}`]=o+s,r[`cp2${n}`]=d+s*e[h])}}(t,l,e)}(t,a);else{let i=s?t[t.length-1]:t[0];for(r=0,n=t.length;r<n;++r)l=function(t,e,i,s){let a=t.skip?e:t,r=i.skip?e:i,n=tp(e,a),o=tp(r,e),l=n/(n+o),h=o/(n+o);l=isNaN(l)?0:l,h=isNaN(h)?0:h;let d=s*l,c=s*h;return{previous:{x:e.x-d*(r.x-a.x),y:e.y-d*(r.y-a.y)},next:{x:e.x+c*(r.x-a.x),y:e.y+c*(r.y-a.y)}}}(i,o=t[r],t[Math.min(r+1,n-!s)%n],e.tension),o.cp1x=l.previous.x,o.cp1y=l.previous.y,o.cp2x=l.next.x,o.cp2y=l.next.y,i=o}e.capBezierPoints&&function(t,e){let i,s,a,r,n,o=t1(t[0],e);for(i=0,s=t.length;i<s;++i)n=r,r=o,o=i<s-1&&t1(t[i+1],e),r&&(a=t[i],n&&(a.cp1x=ew(a.cp1x,e.left,e.right),a.cp1y=ew(a.cp1y,e.top,e.bottom)),o&&(a.cp2x=ew(a.cp2x,e.left,e.right),a.cp2y=ew(a.cp2y,e.top,e.bottom)))}(t,i)}(this._points,i,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){let i=t.points,s=t.o
2ptions.spanGaps,a=i.length;if(!a)return[];let r=!!t._loop,{start:n,end:o}=function(t,e,i,s){let a=0,r=e-1;if(i&&!s)for(;a<e&&!t[a].skip;)a++;for(;a<e&&t[a].skip;)a++;for(a%=e,i&&(r+=a);r>a&&t[r%e].skip;)r--;return{start:a,end:r%=e}}(i,a,r,s);if(!0===s)return eU(t,[{start:n,end:o,loop:r}],i,e);let l=o<n?o+a:o,h=!!t._fullLoop&&0===n&&o===a-1;return eU(t,function(t,e,i,s){let a,r=t.length,n=[],o=e,l=t[e];for(a=e+1;a<=i;++a){let i=t[a%r];i.skip||i.stop?l.skip||(s=!1,n.push({start:e%r,end:(a-1)%r,loop:s}),e=o=i.stop?a:null):(o=a,l.skip&&(e=a)),l=i}return null!==o&&n.push({start:e%r,end:o%r,loop:s}),n}(i,n,l,h),i,e)}(this,this.options.segment))}first(){let t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){let t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){let i,s,a=this.options,r=t[e],n=this.points,o=eN(this,{property:e,start:r,end:r});if(!o.length)return;let l=[],h=a.stepped?ez:a.tension||"monotone"===a.cubicInterpolationMode?eV:eF;for(i=0,s=o.length;i<s;++i){let{start:s,end:d}=o[i],c=n[s],u=n[d];if(c===u){l.push(c);continue}let f=Math.abs((r-c[e])/(u[e]-c[e])),g=h(c,u,f,a.stepped);g[e]=t[e],l.push(g)}return 1===l.length?l[0]:l}pathSegment(t,e,i){return sx(this)(t,this,e,i)}path(t,e,i){let s=this.segments,a=sx(this),r=this._loop;for(let n of(e=e||0,i=i||this.points.length-e,s))r&=a(t,this,n,{start:e,end:e+i-1});return!!r}draw(t,e,i,s){let a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),function(t,e,i,s){if(s_&&!e.options.segment){let a;(a=e._path)||(a=e._path=new Path2D,e.path(a,i,s)&&a.closePath()),sf(t,e.options),t.stroke(a)}else!function(t,e,i,s){let{segments:a,options:r}=e,n=sx(e);for(let o of a)sf(t,r,o.style),t.beginPath(),n(t,e,o,{start:i,end:i+s-1})&&t.closePath(),t.stroke()}(t,e,i,s)}(t,this,i,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function sv(t,e,i,s){let a=t.options,{[i]:r}=t.getProps([i],s);return Math.abs(e-r)<a.radius+a.hitRadius}function sM(t,e){let i,s,a,r,n,{x:o,y:l,base:h,width:d,height:c}=t.getProps(["x","y","base","width","height"],e);return t.horizontal?(n=c/2,i=Math.min(o,h),s=Math.max(o,h),a=l-n,r=l+n):(i=o-(n=d/2),s=o+n,a=Math.min(l,h),r=Math.max(l,h)),{left:i,top:a,right:s,bottom:r}}function sw(t,e,i,s){return t?0:t_(e,i,s)}function sk(t,e,i,s){let a=null===e,r=null===i,n=t&&!(a&&r)&&sM(t,s);return n&&(a||ty(e,n.left,n.right))&&(r||ty(i,n.top,n.bottom))}function sS(t,e){t.rect(e.x,e.y,e.w,e.h)}function sD(t,e,i={}){let s=t.x!==i.x?-e:0,a=t.y!==i.y?-e:0,r=(t.x+t.w!==i.x+i.w?e:0)-s,n=(t.y+t.h!==i.y+i.h?e:0)-a;return{x:t.x+s,y:t.y+a,w:t.w+r,h:t.h+n,radius:t.radius}}let sP=["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)"],sC=sP.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function sO(t,e,i,s){if(s)return;let a=e[t],r=i[t];return"angle"===t&&(a=tb(a),r=tb(r)),{property:t,start:a,end:r}}function sT(t,e,i){for(;e>t;e--){let t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function sE(t,e,i,s){return t&&e?s(t[i],e[i]):t?t[i]:e?e[i]:0}function sA(t,e){let i=[],s=!1;return L(t)?(s=!0,i=t):i=function(t,e){let{x:i=null,y:s=null}=t||{},a=e.points,r=[];return e.segments.forEach(({start:t,end:e})=>{e=sT(t,e,a);let n=a[t],o=a[e];null!==s?(r.push({x:n.x,y:s}),r.push({x:o.x,y:s})):null!==i&&(r.push({x:i,y:n.y}),r.push({x:i,y:o.y}))}),r}(t,e),i.length?new sy({points:i,options:{tension:0},_loop:s,_fullLoop:s}):null}function sL(t){return t&&!1!==t.fill}class sR{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){let{x:s,y:a,radius:r}=this;return e=e||{start:0,end:te},t.arc(s,a,r,e.end,e.start,!0),!i.bounds}interpolate(t){let{x:e,y:i,radius:s}=this,a=t.angle;return{x:e+Math.cos(a)*s,y:i+Math.sin(a)*s,angle:a}}}function sF(t,e,i){let s=function(t){var e,i,s;let{chart:a,fill:r,line:n}=t;if(F(r)){let t;return e=a,i=r,(t=e.getDatasetMeta(i))&&e.isDatasetVisible(i)?t.dataset:null}if("stack"===r)return function(t){let{scale:e,index:i,line:s}=t,a=[],r=s.segments,n=s.points,o=function(t,e){let i=[],s=t.getMatchingVisibleMetas("line");for(let t=0;t<s.length;t++){let a=s[t];if(a.index===e)break;a.hidden||i.unshift(a.dataset)}return i}(e,i);o.push(sA({x:null,y:e.bottom},s));for(let t=0;t<r.length;t++){let e=r[t];for(let t=e.start;t<=e.end;
2t++)!function(t,e,i){let s=[];for(let a=0;a<i.length;a++){let{first:r,last:n,point:o}=function(t,e){let i=t.interpolate(e,"x");if(!i)return{};let s=i.x,a=t.segments,r=t.points,n=!1,o=!1;for(let t=0;t<a.length;t++){let e=a[t],i=r[e.start].x,l=r[e.end].x;if(ty(s,i,l)){n=s===i,o=s===l;break}}return{first:n,last:o,point:i}}(i[a],e);if(o&&(!r||!n)){if(r)s.unshift(o);else if(t.push(o),!n)break}}t.push(...s)}(a,n[t],o)}return new sy({points:a,options:{}})}(t);if("shape"===r)return!0;let o=((s=t).scale||{}).getPointPositionForValue?function(t){let{scale:e,fill:i}=t,s=e.options,a=e.getLabels().length,r=s.reverse?e.max:e.min,n="start"===i?r:"end"===i?e.options.reverse?e.min:e.max:R(i)?i.value:e.getBaseValue(),o=[];if(s.grid.circular){let t=e.getPointPositionForValue(0,r);return new sR({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(n)})}for(let t=0;t<a;++t)o.push(e.getPointPositionForValue(t,n));return o}(s):function(t){let e,{scale:i={},fill:s}=t,a=(e=null,"start"===s?e=i.bottom:"end"===s?e=i.top:R(s)?e=i.getPixelForValue(s.value):i.getBasePixel&&(e=i.getBasePixel()),e);if(F(a)){let t=i.isHorizontal();return{x:t?a:null,y:t?null:a}}return null}(s);return o instanceof sR?o:sA(o,n)}(e),{line:a,scale:r,axis:n}=e,o=a.options,l=o.fill,h=o.backgroundColor,{above:d=h,below:c=h}=l||{};s&&a.points.length&&(t2(t,i),function(t,e){let{line:i,target:s,above:a,below:r,area:n,scale:o}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&r!==a&&(sz(t,s,n.top),sV(t,{line:i,target:s,color:a,scale:o,property:l}),t.restore(),t.save(),sz(t,s,n.bottom)),sV(t,{line:i,target:s,color:r,scale:o,property:l}),t.restore()}(t,{line:a,target:s,above:d,below:c,area:i,scale:r,axis:n}),t5(t))}function sz(t,e,i){let{segments:s,points:a}=e,r=!0,n=!1;for(let o of(t.beginPath(),s)){let{start:s,end:l}=o,h=a[s],d=a[sT(s,l,a)];r?(t.moveTo(h.x,h.y),r=!1):(t.lineTo(h.x,i),t.lineTo(h.x,h.y)),(n=!!e.pathSegment(t,o,{move:n}))?t.closePath():t.lineTo(d.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function sV(t,e){let{line:i,target:s,property:a,color:r,scale:n}=e;for(let{source:e,target:o,start:l,end:h}of function(t,e,i){let s=t.segments,a=t.points,r=e.points,n=[];for(let t of s){let{start:s,end:o}=t;o=sT(s,o,a);let l=sO(i,a[s],a[o],t.loop);if(!e.segments){n.push({source:t,target:l,start:a[s],end:a[o]});continue}for(let s of eN(e,l)){let e=sO(i,r[s.start],r[s.end],s.loop);for(let r of e$(t,a,e))n.push({source:r,target:s,start:{[i]:sE(l,e,"start",Math.max)},end:{[i]:sE(l,e,"end",Math.min)}})}}return n}(i,s,a)){let d,{style:{backgroundColor:c=r}={}}=e,u=!0!==s;t.save(),t.fillStyle=c,function(t,e,i){let{top:s,bottom:a}=e.chart.chartArea,{property:r,start:n,end:o}=i||{};"x"===r&&(t.beginPath(),t.rect(n,s,o-n,a-s),t.clip())}(t,n,u&&sO(a,l,h)),t.beginPath();let f=!!i.pathSegment(t,e);if(u){f?t.closePath():sB(t,s,h,a);let e=!!s.pathSegment(t,o,{move:f,reverse:!0});(d=f&&e)||sB(t,s,l,a)}t.closePath(),t.fill(d?"evenodd":"nonzero"),t.restore()}}function sB(t,e,i,s){let a=e.interpolate(i,s);a&&t.lineTo(a.x,a.y)}class sI extends iH{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.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(t,e){let i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;let s=L(i.text)?i.text.length:1;this._padding=ea(i.padding);let a=s*er(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){let t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){let e,i,s,{top:a,left:r,bottom:n,right:o,options:l}=this,h=l.align,d=0;return this.isHorizontal()?(i=tT(h,r,o),s=a+t,e=o-r):("left"===l.position?(i=r+t,s=tT(h,n,a),d=-.5*tt):(i=o-t,s=tT(h,a,n),d=.5*tt),e=n-a),{titleX:i,titleY:s,maxWidth:e,rotation:d}}draw(){let t=this.ctx,e=this.options;if(!e.display)return;let i=er(e.font),s=i.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:n,rotation:o}=this._drawArgs(s);t4(t,e.text,0,0,i,{color:e.color,maxWidth:n,rotation:o,textAlign:tO(e.align),textBaseline:"middle",translation:[a,r]})}}new WeakMap;let sj={average(t){let e,i;if(!t.length)return!1;let s=0,a=0,r=0;for(e=0,i=t.length;e<i;++e){let i=t[e].element;if(i&&i.hasValue()){let t=i.tooltipPosition();s+=t.x,a+=t.y,++r}}return{x:s/r,y:a/r}},nearest(t,e){let i,s,a;if(!t.length)return!1;let r=e.x,n=e.y,o=1/0;for(i=0,s=t.length;i<s;++i){let s=t[i].element;if(s&&s.hasValue()){let t=tp(e,s.getCenterPoint());t<o&&(o=t,a=s)}}if(a){let t=a.tooltipPosition();r=t.x,n=t.y}return{x:r,y:n}}};function sW(t,e){return e&&(L(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function sH(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function s$(t,e){let i=t.chart.ctx,{body:s,footer:a,title:r}=t,{boxWidth:n,boxHeight:o}=e,l=er(e.bodyFont),h=er(e.titleFont),d=er(e.footerFont),c=r.length,u=a.length,f=s.length,g=ea(e.padding),p=g.height,m=0,b=s.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);b+=t.beforeBody.length+t.afterBody.length,c&&(p+=c*h.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),b&&(p+=f*(e.displayColors?Math.max(o,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing),u&&(p+=e.footerMarginTop+u*d.lineHeight+(u-1)*e.footerSpacing);let x=0,_=function(t){m=Math.max(m,i.measureText(t).width+x)};return i.save(),i.font=h.string,j(t.title,_),i.font=l.string,j(t.beforeBody.concat(t.afterBody),_),x=e.displayColors?n+2+e.boxPadding:0,j(s,t=>{j(t.before,_),j(t.lines,_),j(t.after,_)}
2),x=0,i.font=d.string,j(t.footer,_),i.restore(),{width:m+=g.width,height:p}}function sN(t,e,i){let s=i.yAlign||e.yAlign||function(t,e){let{y:i,height:s}=e;return i<s/2?"top":i>t.height-s/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||function(t,e,i,s){let{x:a,width:r}=i,{width:n,chartArea:{left:o,right:l}}=t,h="center";return"center"===s?h=a<=(o+l)/2?"left":"right":a<=r/2?h="left":a>=n-r/2&&(h="right"),function(t,e,i,s){let{x:a,width:r}=s,n=i.caretSize+i.caretPadding;if("left"===t&&a+r+n>e.width||"right"===t&&a-r-n<0)return!0}(h,t,e,i)&&(h="center"),h}(t,e,i,s),yAlign:s}}function sU(t,e,i,s){let{caretSize:a,caretPadding:r,cornerRadius:n}=t,{xAlign:o,yAlign:l}=i,h=a+r,{topLeft:d,topRight:c,bottomLeft:u,bottomRight:f}=es(n),g=function(t,e){let{x:i,width:s}=t;return"right"===e?i-=s:"center"===e&&(i-=s/2),i}(e,o),p=function(t,e,i){let{y:s,height:a}=t;return"top"===e?s+=i:"bottom"===e?s-=a+i:s-=a/2,s}(e,l,h);return"center"===l?"left"===o?g+=h:"right"===o&&(g-=h):"left"===o?g-=Math.max(d,u)+a:"right"===o&&(g+=Math.max(c,f)+a),{x:t_(g,0,s.width-e.width),y:t_(p,0,s.height-e.height)}}function sY(t,e,i){let s=ea(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-s.right:t.x+s.left}function sX(t,e){let i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}let sq={beforeTitle:T,title(t){if(t.length>0){let e=t[0],i=e.chart.data.labels,s=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex<s)return i[e.dataIndex]}return""},afterTitle:T,beforeBody:T,beforeLabel:T,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");let i=t.formattedValue;return A(i)||(e+=i),e},labelColor(t){let e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){let e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:T,afterBody:T,beforeFooter:T,footer:T,afterFooter:T};function sK(t,e,i,s){let a=t[e].call(i,s);return void 0===a?sq[e].call(i,s):a}class sZ extends iH{static positioners=sj;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let e=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&e.options.animation&&i.animations,a=new eG(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){var t;return this.$context||(this.$context=(t=this.chart.getContext(),eo(t,{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"})))}getTitle(t,e){let{callbacks:i}=e,s=sK(i,"beforeTitle",this,t),a=sK(i,"title",this,t),r=sK(i,"afterTitle",this,t),n=[];return n=sW(n,sH(s)),n=sW(n,sH(a)),n=sW(n,sH(r))}getBeforeBody(t,e){return sW([],sH(sK(e.callbacks,"beforeBody",this,t)))}getBody(t,e){let{callbacks:i}=e,s=[];return j(t,t=>{let e={before:[],lines:[],after:[]},a=sX(i,t);sW(e.before,sH(sK(a,"beforeLabel",this,t))),sW(e.lines,sK(a,"label",this,t)),sW(e.after,sH(sK(a,"afterLabel",this,t))),s.push(e)}),s}getAfterBody(t,e){return sW([],sH(sK(e.callbacks,"afterBody",this,t)))}getFooter(t,e){let{callbacks:i}=e,s=sK(i,"beforeFooter",this,t),a=sK(i,"footer",this,t),r=sK(i,"afterFooter",this,t),n=[];return n=sW(n,sH(s)),n=sW(n,sH(a)),n=sW(n,sH(r))}_createItems(t){let e,i,s=this._active,a=this.chart.data,r=[],n=[],o=[],l=[];for(e=0,i=s.length;e<i;++e)l.push(function(t,e){let{element:i,datasetIndex:s,index:a}=e,r=t.getDatasetMeta(s).controller,{label:n,value:o}=r.getLabelAndValue(a);return{chart:t,label:n,parsed:r.getParsed(a),raw:t.data.datasets[s].data[a],formattedValue:o,dataset:r.getDataset(),dataIndex:a,datasetIndex:s,element:i}}(this.chart,s[e]));return t.filter&&(l=l.filter((e,i,s)=>t.filter(e,i,s,a))),t.itemSort&&(l=l.sort((e,i)=>t.itemSort(e,i,a))),j(l,e=>{let i=sX(t.callbacks,e);r.push(sK(i,"labelColor",this,e)),n.push(sK(i,"labelPointStyle",this,e)),o.push(sK(i,"labelTextColor",this,e))}),this.labelColors=r,this.labelPointStyles=n,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){let i,s=this.options.setContext(this.getContext()),a=this._active,r=[];if(a.length){let t=sj[s.position].call(this,a,this._eventPosition);r=this._createItems(s),this.title=this.getTitle(r,s),this.beforeBody=this.getBeforeBody(r,s),this.body=this.getBody(r,s),this.afterBody=this.getAfterBody(r,s),this.footer=this.getFooter(r,s);let e=this._size=s$(this,s),n=Object.assign({},t,e),o=sN(this.chart,s,n),l=sU(s,n,o,this.chart);this.xAlign=o.xAlign,this.yAlign=o.yAlign,i={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(i={opacity:0}
2);this._tooltipItems=r,this.$context=void 0,i&&this._resolveAnimations().update(this,i),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){let a=this.getCaretPosition(t,i,s);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,i){let s,a,r,n,o,l,{xAlign:h,yAlign:d}=this,{caretSize:c,cornerRadius:u}=i,{topLeft:f,topRight:g,bottomLeft:p,bottomRight:m}=es(u),{x:b,y:x}=t,{width:_,height:y}=e;return"center"===d?(o=x+y/2,"left"===h?(a=(s=b)-c,n=o+c,l=o-c):(a=(s=b+_)+c,n=o-c,l=o+c),r=s):(a="left"===h?b+Math.max(f,p)+c:"right"===h?b+_-Math.max(g,m)-c:this.caretX,"top"===d?(o=(n=x)-c,s=a-c,r=a+c):(o=(n=x+y)+c,s=a+c,r=a-c),l=n),{x1:s,x2:a,x3:r,y1:n,y2:o,y3:l}}drawTitle(t,e,i){let s,a,r,n=this.title,o=n.length;if(o){let l=eB(i.rtl,this.x,this.width);for(t.x=sY(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",s=er(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=s.string,r=0;r<o;++r)e.fillText(n[r],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+a,r+1===o&&(t.y+=i.titleMarginBottom-a)}}_drawColorBox(t,e,i,s,a){let r=this.labelColors[i],n=this.labelPointStyles[i],{boxHeight:o,boxWidth:l}=a,h=er(a.bodyFont),d=sY(this,"left",a),c=s.x(d),u=o<h.lineHeight?(h.lineHeight-o)/2:0,f=e.y+u;if(a.usePointStyle){let e={radius:Math.min(l,o)/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:1},i=s.leftForLtr(c,l)+l/2,h=f+o/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,tJ(t,e,i,h),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,tJ(t,e,i,h)}else{t.lineWidth=R(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;let e=s.leftForLtr(c,l),i=s.leftForLtr(s.xPlus(c,1),l-2),n=es(r.borderRadius);Object.values(n).some(t=>0!==t)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,t6(t,{x:e,y:f,w:l,h:o,radius:n}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),t6(t,{x:i,y:f+1,w:l-2,h:o-2,radius:n}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(e,f,l,o),t.strokeRect(e,f,l,o),t.fillStyle=r.backgroundColor,t.fillRect(i,f+1,l-2,o-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){let s,a,r,n,o,l,{body:h}=this,{bodySpacing:d,bodyAlign:c,displayColors:u,boxHeight:f,boxWidth:g,boxPadding:p}=i,m=er(i.bodyFont),b=m.lineHeight,x=0,_=eB(i.rtl,this.x,this.width),y=function(i){e.fillText(i,_.x(t.x+x),t.y+b/2),t.y+=b+d},v=_.textAlign(c);for(e.textAlign=c,e.textBaseline="middle",e.font=m.string,t.x=sY(this,v,i),e.fillStyle=i.bodyColor,j(this.beforeBody,y),x=u&&"right"!==v?"center"===c?g/2+p:g+2+p:0,r=0,o=h.length;r<o;++r){for(s=h[r],e.fillStyle=this.labelTextColors[r],j(s.before,y),a=s.lines,u&&a.length&&(this._drawColorBox(e,t,r,_,i),b=Math.max(m.lineHeight,f)),n=0,l=a.length;n<l;++n)y(a[n]),b=m.lineHeight;j(s.after,y)}x=0,b=m.lineHeight,j(this.afterBody,y),t.y-=d}drawFooter(t,e,i){let s,a,r=this.footer,n=r.length;if(n){let o=eB(i.rtl,this.x,this.width);for(t.x=sY(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=o.textAlign(i.footerAlign),e.textBaseline="middle",s=er(i.footerFont),e.fillStyle=i.footerColor,e.font=s.string,a=0;a<n;++a)e.fillText(r[a],o.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+i.footerSpacing}}drawBackground(t,e,i,s){let{xAlign:a,yAlign:r}=this,{x:n,y:o}=t,{width:l,height:h}=i,{topLeft:d,topRight:c,bottomLeft:u,bottomRight:f}=es(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(n+d,o),"top"===r&&this.drawCaret(t,e,i,s),e.lineTo(n+l-c,o),e.quadraticCurveTo(n+l,o,n+l,o+c),"center"===r&&"right"===a&&this.drawCaret(t,e,i,s),e.lineTo(n+l,o+h-f),e.quadraticCurveTo(n+l,o+h,n+l-f,o+h),"bottom"===r&&this.drawCaret(t,e,i,s),e.lineTo(n+u,o+h),e.quadraticCurveTo(n,o+h,n,o+h-u),"center"===r&&"left"===a&&this.drawCaret(t,e,i,s),e.lineTo(n,o+d),e.quadraticCurveTo(n,o,n+d,o),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,i=this.$animations,s=i&&i.x,a=i&&i.y;if(s||a){let i=sj[t.position].call(this,this._active,this._eventPosition);if(!i)return;let r=this._size=s$(this,t),n=Object.assign({},i,this._size),o=sN(e,t,n),l=sU(t,n,o,e);
2(s._to!==l.x||a._to!==l.y)&&(this.xAlign=o.xAlign,this.yAlign=o.yAlign,this.width=r.width,this.height=r.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),i=this.opacity;if(!i)return;this._updateAnimationTarget(e);let s={width:this.width,height:this.height},a={x:this.x,y:this.y};i=.001>Math.abs(i)?0:i;let r=ea(e.padding),n=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&n&&(t.save(),t.globalAlpha=i,this.drawBackground(a,t,s,e),eI(t,e.textDirection),a.y+=r.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),ej(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let i=this._active,s=t.map(({datasetIndex:t,index:e})=>{let i=this.chart.getDatasetMeta(t);if(!i)throw Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),a=!W(i,s),r=this._positionChanged(s,e);(a||r)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let s=this.options,a=this._active||[],r=this._getActiveElements(t,a,e,i),n=this._positionChanged(r,t),o=e||!W(r,a)||n;return o&&(this._active=r,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),o}_getActiveElements(t,e,i,s){let a=this.options;if("mouseout"===t.type)return[];if(!s)return e.filter(t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index));let r=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&r.reverse(),r}_positionChanged(t,e){let{caretX:i,caretY:s,options:a}=this,r=sj[a.position].call(this,t,e);return!1!==r&&(i!==r.x||s!==r.y)}}function sG(t){let e=this.getLabels();return t>=0&&t<e.length?e[t]:t}function sQ(t,e,{horizontal:i,minRotation:s}){let a=tf(s),r=(i?Math.sin(a):Math.cos(a))||.001,n=.75*e*(""+t).length;return Math.min(e/r,n)}class sJ extends iK{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return A(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){let{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds(),{min:s,max:a}=this,r=t=>s=e?s:t,n=t=>a=i?a:t;if(t){let t=th(s),e=th(a);t<0&&e<0?n(0):t>0&&e>0&&r(0)}if(s===a){let e=0===a?1:Math.abs(.05*a);n(a+e),t||r(s-e)}this.min=s,this.max=a}getTickLimit(){let t,{maxTicksLimit:e,stepSize:i}=this.options.ticks;return i?(t=Math.ceil(this.max/i)-Math.floor(this.min/i)+1)>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3):(t=this.computeTickLimit(),e=e||11),e&&(t=Math.min(e,t)),t}computeTickLimit(){return 1/0}buildTicks(){let t=this.options,e=t.ticks,i=this.getTickLimit(),s=function(t,e){var i,s;let a,r,n,o,l,h=[],{bounds:d,step:c,min:u,max:f,precision:g,count:p,maxTicks:m,maxDigits:b,includeBounds:x}=t,_=c||1,y=m-1,{min:v,max:M}=e,w=!A(u),k=!A(f),S=!A(p),D=(M-v)/(b+1),P=tc((M-v)/y/_)*_;if(P<1e-14&&!w&&!k)return[{value:v},{value:M}];(o=Math.ceil(M/P)-Math.floor(v/P))>y&&(P=tc(o*P/y/_)*_),A(g)||(P=Math.ceil(P*(a=Math.pow(10,g)))/a),"ticks"===d?(r=Math.floor(v/P)*P,n=Math.ceil(M/P)*P):(r=v,n=M),w&&k&&c&&(i=(f-u)/c,s=P/1e3,(l=Math.round(i))-s<=i&&l+s>=i)?(o=Math.round(Math.min((f-u)/P,m)),P=(f-u)/o,r=u,n=f):S?(r=w?u:r,P=((n=k?f:n)-r)/(o=p-1)):o=td(o=(n-r)/P,Math.round(o),P/1e3)?Math.round(o):Math.ceil(o);let C=Math.max(tg(P),tg(r));r=Math.round(r*(a=Math.pow(10,A(g)?C:g)))/a,n=Math.round(n*a)/a;let O=0;for(w&&(x&&r!==u?(h.push({value:u}),r<u&&O++,td(Math.round((r+O*P)*a)/a,u,sQ(u,D,t))&&O++):r<u&&O++);O<o;++O){let t=Math.round((r+O*P)*a)/a;if(k&&t>f)break;h.push({value:t})}return k&&x&&n!==f?h.length&&td(h[h.length-1].value,f,sQ(f,D,t))?h[h.length-1].value=f:h.push({value:f}):k&&n!==f||h.push({value:n}),h}({maxTicks:i=Math.max(2,i),bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);
2return"ticks"===t.bounds&&function(t,e,i){let s,a,r;for(s=0,a=t.length;s<a;s++)isNaN(r=t[s][i])||(e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))}(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){let t=this.ticks,e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){let s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return t$(t,this.chart.options.locale,this.options.ticks.format)}}class s0 extends sJ{static id="linear";static defaults={ticks:{callback:tN.numeric}};determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=F(t)?t:0,this.max=F(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),e=t?this.width:this.height,i=tf(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001;return Math.ceil(e/Math.min(40,this._resolveTickFontOptions(0).lineHeight/s))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}tN.logarithmic;tN.numeric;let s1={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}},s2=Object.keys(s1);function s5(t,e){return t-e}function s3(t,e){if(A(e))return null;let i=t._adapter,{parser:s,round:a,isoWeekday:r}=t._parseOpts,n=e;return("function"==typeof s&&(n=s(n)),F(n)||(n="string"==typeof s?i.parse(n,s):i.parse(n)),null===n)?null:(a&&(n="week"===a&&(tu(r)||!0===r)?i.startOf(n,"isoWeek",r):i.startOf(n,a)),+n)}function s8(t,e,i,s){let a=s2.length;for(let r=s2.indexOf(t);r<a-1;++r){let t=s1[s2[r]],a=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(a*t.size))<=s)return s2[r]}return s2[a-1]}function s4(t,e,i){if(i){if(i.length){let{lo:s,hi:a}=tv(i,e);t[i[s]>=e?i[s]:i[a]]=!0}}else t[e]=!0}function s6(t,e,i){let s,a,r=[],n={},o=e.length;for(s=0;s<o;++s)n[a=e[s]]=s,r.push({value:a,major:!1});return 0!==o&&i?function(t,e,i,s){let a,r,n=t._adapter,o=+n.startOf(e[0].value,s),l=e[e.length-1].value;for(a=o;a<=l;a=+n.add(a,1,s))(r=i[a])>=0&&(e[r].major=!0);return e}(t,r,n,i):r}(class t extends iK{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){let i=t.time||(t.time={}),s=this._adapter=new ih(t.adapters.date);s.init(e),Y(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:s3(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,e=this._adapter,i=t.time.unit||"day",{min:s,max:a,minDefined:r,maxDefined:n}=this.getUserBounds();function o(t){r||isNaN(t.min)||(s=Math.min(s,t.min)),n||isNaN(t.max)||(a=Math.max(a,t.max))}r&&n||(o(this._getLabelBounds()),("ticks"!==t.bounds||"labels"!==t.ticks.source)&&o(this.getMinMax(!1))),s=F(s)&&!isNaN(s)?s:+e.startOf(Date.now(),i),a=F(a)&&!isNaN(a)?a:+e.endOf(Date.now(),i)+1,this.min=Math.min(s,a-1),this.max=Math.max(s+1,a)}_getLabelBounds(){let t=this.getLabelTimestamps(),e=1/0,i=-1/0;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){let t=this.options,e=t.time,i=t.ticks,s="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);let a=this.min,r=function(t,e,i){let s=0,a=t.length;for(;s<a&&t[s]<e;)s++;for(;a>s&&t[a-1]>i;)a--;return s>0||a<t.length?t.slice(s,a):t}(s,a,this.max);return this._unit=e.unit||(i.autoSkip?s8(e.minUnit,this.min,this.max,this._getLabelCapacity(a)):function(t,e,
2i,s,a){for(let r=s2.length-1;r>=s2.indexOf(i);r--){let i=s2[r];if(s1[i].common&&t._adapter.diff(a,s,i)>=e-1)return i}return s2[i?s2.indexOf(i):0]}(this,r.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=s2.indexOf(t)+1,i=s2.length;e<i;++e)if(s1[s2[e]].common)return s2[e]}(this._unit):void 0,this.initOffsets(s),t.reverse&&r.reverse(),s6(this,r,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e,i,s=0,a=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),s=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),a=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);let r=t.length<3?.5:.25;s=t_(s,0,r),a=t_(a,0,r),this._offsets={start:s,end:a,factor:1/(s+1+a)}}_generate(){let t,e,i=this._adapter,s=this.min,a=this.max,r=this.options,n=r.time,o=n.unit||s8(n.minUnit,s,a,this._getLabelCapacity(s)),l=V(r.ticks.stepSize,1),h="week"===o&&n.isoWeekday,d=tu(h)||!0===h,c={},u=s;if(d&&(u=+i.startOf(u,"isoWeek",h)),u=+i.startOf(u,d?"day":o),i.diff(a,s,o)>1e5*l)throw Error(s+" and "+a+" are too far apart with stepSize of "+l+" "+o);let f="data"===r.ticks.source&&this.getDataTimestamps();for(t=u,e=0;t<a;t=+i.add(t,l,o),e++)s4(c,t,f);return(t===a||"ticks"===r.bounds||1===e)&&s4(c,t,f),Object.keys(c).sort(s5).map(t=>+t)}getLabelForValue(t){let e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){let i=this.options.time.displayFormats,s=this._unit,a=e||i[s];return this._adapter.format(t,a)}_tickFormatFunction(t,e,i,s){let a=this.options,r=a.ticks.callback;if(r)return I(r,[t,e,i],this);let n=a.time.displayFormats,o=this._unit,l=this._majorUnit,h=o&&n[o],d=l&&n[l],c=i[e],u=l&&d&&c&&c.major;return this._adapter.format(t,s||(u?d:h))}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e<i;++e)(s=t[e]).label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){let e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){let e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){let e=this.options.ticks,i=this.ctx.measureText(t).width,s=tf(this.isHorizontal()?e.maxRotation:e.minRotation),a=Math.cos(s),r=Math.sin(s),n=this._resolveTickFontOptions(0).size;return{w:i*a+n*r,h:i*r+n*a}}_getLabelCapacity(t){let e=this.options.time,i=e.displayFormats,s=i[e.unit]||i.millisecond,a=this._tickFormatFunction(t,0,s6(this,[t],this._majorUnit),s),r=this._getLabelSize(a),n=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return n>0?n:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;let s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,e=s.length;t<e;++t)i=i.concat(s[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){let t,e,i=this._cache.labels||[];if(i.length)return i;let s=this.getLabels();for(t=0,e=s.length;t<e;++t)i.push(s3(this,s[t]));return this._cache.labels=this._normalized?i:this.normalize(i)}normalize(t){return tD(t.sort(s5))}}).defaults,t.s(["BarController",0,ia,"BarElement",0,class extends iH{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){var e,i,s;let a,r,n,o,l,h,d,c,{inflateAmount:u,options:{borderColor:f,backgroundColor:g}}=this,{inner:p,outer:m}=(r=(a=sM(this)).right-a.left,n=a.bottom-a.top,e=r/2,i=n/2,o=this.options.borderWidth,l=this.borderSkipped,h=ei(o),d={t:sw(l.top,h.top,0,i),r:sw(l.right,h.right,0,e),b:sw(l.bottom,h.bottom,0,i),l:sw(l.left,h.left,0,e)}
2,c=function(t,e,i){let{enableBorderRadius:s}=t.getProps(["enableBorderRadius"]),a=t.options.borderRadius,r=es(a),n=Math.min(e,i),o=t.borderSkipped,l=s||R(a);return{topLeft:sw(!l||o.top||o.left,r.topLeft,0,n),topRight:sw(!l||o.top||o.right,r.topRight,0,n),bottomLeft:sw(!l||o.bottom||o.left,r.bottomLeft,0,n),bottomRight:sw(!l||o.bottom||o.right,r.bottomRight,0,n)}}(this,r/2,n/2),{outer:{x:a.left,y:a.top,w:r,h:n,radius:c},inner:{x:a.left+d.l,y:a.top+d.t,w:r-d.l-d.r,h:n-d.t-d.b,radius:{topLeft:Math.max(0,c.topLeft-Math.max(d.t,d.l)),topRight:Math.max(0,c.topRight-Math.max(d.t,d.r)),bottomLeft:Math.max(0,c.bottomLeft-Math.max(d.b,d.l)),bottomRight:Math.max(0,c.bottomRight-Math.max(d.b,d.r))}}}),b=(s=m.radius).topLeft||s.topRight||s.bottomLeft||s.bottomRight?t6:sS;t.save(),(m.w!==p.w||m.h!==p.h)&&(t.beginPath(),b(t,sD(m,u,p)),t.clip(),b(t,sD(p,-u,m)),t.fillStyle=f,t.fill("evenodd")),t.beginPath(),b(t,sD(p,u)),t.fillStyle=g,t.fill(),t.restore()}inRange(t,e,i){return sk(this,t,e,i)}inXRange(t,e){return sk(this,t,null,e)}inYRange(t,e){return sk(this,null,t,e)}getCenterPoint(t){let{x:e,y:i,base:s,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(e+s)/2:e,y:a?i:(i+s)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}},"BubbleController",0,class extends e7{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(t,e,i,s){let a=super.parsePrimitiveData(t,e,i,s);for(let t=0;t<a.length;t++)a[t]._custom=this.resolveDataElementOptions(t+i).radius;return a}parseArrayData(t,e,i,s){let a=super.parseArrayData(t,e,i,s);for(let t=0;t<a.length;t++){let s=e[i+t];a[t]._custom=V(s[2],this.resolveDataElementOptions(t+i).radius)}return a}parseObjectData(t,e,i,s){let a=super.parseObjectData(t,e,i,s);for(let t=0;t<a.length;t++){let s=e[i+t];a[t]._custom=V(s&&s.r&&+s.r,this.resolveDataElementOptions(t+i).radius)}return a}getMaxOverflow(){let t=this._cachedMeta.data,e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:a}=e,r=this.getParsed(t),n=s.getLabelForValue(r.x),o=a.getLabelForValue(r.y),l=r._custom;return{label:i[t]||"",value:"("+n+", "+o+(l?", "+l:"")+")"}}update(t){let e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){let a="reset"===s,{iScale:r,vScale:n}=this._cachedMeta,{sharedOptions:o,includeOptions:l}=this._getSharedOptions(e,s),h=r.axis,d=n.axis;for(let c=e;c<e+i;c++){let e=t[c],i=!a&&this.getParsed(c),u={},f=u[h]=a?r.getPixelForDecimal(.5):r.getPixelForValue(i[h]),g=u[d]=a?n.getBasePixel():n.getPixelForValue(i[d]);u.skip=isNaN(f)||isNaN(g),l&&(u.options=o||this.resolveDataElementOptions(c,e.active?"active":s),a&&(u.options.radius=0)),this.updateElement(e,c,u,s)}}resolveDataElementOptions(t,e){let i=this.getParsed(t),s=super.resolveDataElementOptions(t,e);s.$shared&&(s=Object.assign({},s,{$shared:!1}));let a=s.radius;return"active"!==e&&(s.radius=0),s.radius+=V(i&&i._custom,a),s}},"CategoryScale",0,class extends iK{static id="category";static defaults={ticks:{callback:sG}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let e=this._addedLabels;if(e.length){let t=this.getLabels();for(let{index:i,label:s}of e)t[i]===s&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){let i,s;if(A(t))return null;let a=this.getLabels();return i=e=isFinite(e)&&a[e]===t?e:function(t,e,i,s){let a=t.indexOf(e);if(-1===a){var r;return r=i,"string"==typeof e?(r=t.push(e)-1,s.unshift({index:r,label:e})):isNaN(e)&&(r=null),r}return a!==t.lastIndexOf(e)?i:a}(a,t,V(e,t),this._addedLabels),s=a.length-1,null===i?null:t_(Math.round(i),0,s)}determineDataLimits(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:i,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){let t=this.min,e=this.max,i=this.options.offset,s=[],a=this.getLabels();a=0===t&&e===a.length-1?a:a.slice(t,e+1),this._valueRange=Math.max(a.length-!i,1),this._startValue=this.min-.5*!!i;for(let i=t;i<=e;i++)s.push({value:i});return s}getLabelForValue(t){return sG.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}},"Chart",0,sc,"DoughnutController",0,ir,"Filler",0,{id:"filler",afterDatasetsUpdate(t,e,i){let s,a,r,n,o=(t.data.datasets||[]).length,l=[];for(a=0;a<o;++a)r=(s=t.getDatasetMeta(a)).dataset,n=null,r&&r.options&&r instanceof sy&&(n={visible:t.isDatasetVisible(a),index:a,fill:function(t,e,
2i){var s,a,r,n;let o=function(t){let e=t.options,i=e.fill,s=V(i&&i.target,i);return void 0===s&&(s=!!e.backgroundColor),!1!==s&&null!==s&&(!0===s?"origin":s)}(t);if(R(o))return!isNaN(o.value)&&o;let l=parseFloat(o);return F(l)&&Math.floor(l)===l?(s=o[0],a=e,r=l,n=i,("-"===s||"+"===s)&&(r=a+r),r!==a&&!(r<0)&&!(r>=n)&&r):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}(r,a,o),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:r}),s.$filler=n,l.push(n);for(a=0;a<o;++a)(n=l[a])&&!1!==n.fill&&(n.fill=function(t,e,i){let s,a=t[e].fill,r=[e];if(!i)return a;for(;!1!==a&&-1===r.indexOf(a);){if(!F(a))return a;if(!(s=t[a]))break;if(s.visible)return a;r.push(a),a=s.fill}return!1}(l,a,i.propagate))},beforeDraw(t,e,i){let s="beforeDraw"===i.drawTime,a=t.getSortedVisibleDatasetMetas(),r=t.chartArea;for(let e=a.length-1;e>=0;--e){let i=a[e].$filler;i&&(i.line.updateControlPoints(r,i.axis),s&&i.fill&&sF(t.ctx,i,r))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;let s=t.getSortedVisibleDatasetMetas();for(let e=s.length-1;e>=0;--e){let i=s[e].$filler;sL(i)&&sF(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){let s=e.meta.$filler;sL(s)&&"beforeDatasetDraw"===i.drawTime&&sF(t.ctx,s,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},"LineController",0,io,"LineElement",0,sy,"LinearScale",0,s0,"PieController",0,class extends ir{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}},"PointElement",0,class extends iH{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){let s=this.options,{x:a,y:r}=this.getProps(["x","y"],i);return Math.pow(t-a,2)+Math.pow(e-r,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(t,e){return sv(this,t,"x",e)}inYRange(t,e){return sv(this,t,"y",e)}getCenterPoint(t){let{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0,i=(e=Math.max(e,e&&t.hoverRadius||0))&&t.borderWidth||0;return(e+i)*2}draw(t,e){let i=this.options;!this.skip&&!(i.radius<.1)&&t1(this,e,this.size(i)/2)&&(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,tJ(t,i,this.x,this.y))}getRange(){let t=this.options||{};return t.radius+t.hitRadius}},"PolarAreaController",0,class t extends e7{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map((e,a)=>{let r=t.getDatasetMeta(0).controller.getStyle(a);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:s,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart,s=i.data.labels||[],a=t$(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:a}}parseObjectData(t,e,i,s){return e_.bind(this)(t,e,i,s)}update(t){let e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,e={min:1/0,max:-1/0};return t.data.forEach((t,i)=>{let s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(s<e.min&&(e.min=s),s>e.max&&(e.max=s))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,i=t.options,s=Math.max(Math.min(e.right-e.left,e.bottom-e.top)/2,0),a=Math.max(i.cutoutPercentage?s/100*i.cutoutPercentage:1,0),r=(s-a)/t.getVisibleDatasetCount();this.outerRadius=s-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,i,s){let a,r="reset"===s,n=this.chart,o=n.options.animation,l=this._cachedMeta.rScale,h=l.xCenter,d=l.yCenter,c=l.getIndexAngle(0)-.5*tt,u=c,f=360/this.countVisibleElements();for(a=0;a<e;++a)u+=this._computeAngle(a,s,f);for(a=e;a<e+i;a++){let e=t[a],i=u,g=u+this._computeAngle(a,s,f),p=n.getDataVisibility(a)?l.getDistanceFromCenterForValue(this.getParsed(a).r):0;u=g,r&&(o.animateScale&&(p=0),o.animateRotate&&(i=g=c));let m={x:h,y:d,innerRadius:0,outerRadius:p,startAngle:i,endAngle:g,options:this.resolveDataElementOptions(a,e.active?"active":s)};this.updateElement(e,a,m,s)}}countVisibleElements(){let t=this._cachedMeta,e=0;return t.data.forEach((t,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?tf(this.resolveDataElementOptions(t,e).angle||i):0}},"RadarController",0,class extends e7{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(t){let e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}
2parseObjectData(t,e,i,s){return e_.bind(this)(t,e,i,s)}update(t){let e=this._cachedMeta,i=e.dataset,s=e.data||[],a=e.iScale.getLabels();if(i.points=s,"resize"!==t){let e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);let r={_loop:!0,_fullLoop:a.length===s.length,options:e};this.updateElement(i,void 0,r,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){let a=this._cachedMeta.rScale,r="reset"===s;for(let n=e;n<e+i;n++){let e=t[n],i=this.resolveDataElementOptions(n,e.active?"active":s),o=a.getPointPositionForValue(n,this.getParsed(n).r),l=r?a.xCenter:o.x,h=r?a.yCenter:o.y,d={x:l,y:h,angle:o.angle,skip:isNaN(l)||isNaN(h),options:i};this.updateElement(e,n,d,s)}}},"ScatterController",0,class extends e7{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){let e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:a}=e,r=this.getParsed(t),n=s.getLabelForValue(r.x),o=a.getLabelForValue(r.y);return{label:i[t]||"",value:"("+n+", "+o+")"}}update(t){let e=this._cachedMeta,{data:i=[]}=e,s=this.chart._animationsDisabled,{start:a,count:r}=tE(e,i,s);if(this._drawStart=a,this._drawCount=r,tA(e)&&(a=0,r=i.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:a,_dataset:r}=e;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!r._decimated,a.points=i;let n=this.resolveDatasetElementOptions(t);n.segment=this.options.segment,this.updateElement(a,void 0,{animated:!s,options:n},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,a,r,t)}addElements(){let{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,s){let a="reset"===s,{iScale:r,vScale:n,_stacked:o,_dataset:l}=this._cachedMeta,h=this.resolveDataElementOptions(e,s),d=this.getSharedOptions(h),c=this.includeOptions(s,d),u=r.axis,f=n.axis,{spanGaps:g,segment:p}=this.options,m=tu(g)?g:1/0,b=this.chart._animationsDisabled||a||"none"===s,x=e>0&&this.getParsed(e-1);for(let h=e;h<e+i;++h){let e=t[h],i=this.getParsed(h),g=b?e:{},_=A(i[f]),y=g[u]=r.getPixelForValue(i[u],h),v=g[f]=a||_?n.getBasePixel():n.getPixelForValue(o?this.applyStack(n,i,o):i[f],h);g.skip=isNaN(y)||isNaN(v)||_,g.stop=h>0&&Math.abs(i[u]-x[u])>m,p&&(g.parsed=i,g.raw=l.data[h]),c&&(g.options=d||this.resolveDataElementOptions(h,e.active?"active":s)),b||this.updateElement(e,h,g,s),x=i}this.updateSharedOptions(d,s,h)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}let i=t.dataset,s=i.options&&i.options.borderWidth||0;return e.length?Math.max(s,e[0].size(this.resolveDataElementOptions(0)),e[e.length-1].size(this.resolveDataElementOptions(e.length-1)))/2:s}},"Title",0,{id:"title",_element:sI,start(t,e,i){let s;s=new sI({ctx:t.ctx,options:i,chart:t}),iS.configure(t,s,i),iS.addBox(t,s),t.titleBlock=s},stop(t){let e=t.titleBlock;iS.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){let s=t.titleBlock;iS.configure(t,s,i),s.options=i},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}},"Tooltip",0,{id:"tooltip",_element:sZ,positioners:sj,afterInit(t,e,i){i&&(t.tooltip=new sZ({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){let e=t.tooltip;if(e&&e._willRender()){let i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){let i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>
2e.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:sq},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]}],529530);var s7=t.i(843476),s9=t.i(271645);let at="label";function ae(t,e){"function"==typeof t?t(e):t&&(t.current=e)}function ai(t,e,i=at){let s=[];t.datasets=e.map(e=>{let a=t.datasets.find(t=>t[i]===e[i]);return!a||!e.data||s.includes(a)?{...e}:(s.push(a),Object.assign(a,e),a)})}let as=(0,s9.forwardRef)(function(t,e){let{height:i=150,width:s=300,redraw:a=!1,datasetIdKey:r,type:n,data:o,options:l,plugins:h=[],fallbackContent:d,updateMode:c,...u}=t,f=(0,s9.useRef)(null),g=(0,s9.useRef)(null),p=()=>{f.current&&(g.current=new sc(f.current,{type:n,data:function(t,e=at){let i={labels:[],datasets:[]};return i.labels=t.labels,ai(i,t.datasets,e),i}(o,r),options:l&&{...l},plugins:h}),ae(e,g.current))},m=()=>{ae(e,null),g.current&&(g.current.destroy(),g.current=null)};return(0,s9.useEffect)(()=>{var t;let e;!a&&g.current&&l&&(t=g.current,(e=t.options)&&l&&Object.assign(e,l))},[a,l]),(0,s9.useEffect)(()=>{!a&&g.current&&(g.current.config.data.labels=o.labels)},[a,o.labels]),(0,s9.useEffect)(()=>{!a&&g.current&&o.datasets&&ai(g.current.config.data,o.datasets,r)},[a,o.datasets]),(0,s9.useEffect)(()=>{g.current&&(a?(m(),setTimeout(p)):g.current.update(c))},[a,l,o.labels,o.datasets,c]),(0,s9.useEffect)(()=>{g.current&&(m(),setTimeout(p))},[n]),(0,s9.useEffect)(()=>(p(),()=>m()),[]),(0,s7.jsx)("canvas",{ref:f,role:"img",height:i,width:s,...u,children:d})});function aa(t,e){return sc.register(e),(0,s9.forwardRef)((e,i)=>(0,s7.jsx)(as,{...e,ref:i,type:t}))}
2let ar=aa("line",io),an=aa("bar",ia);t.s(["Bar",0,an,"Line",0,ar],81097);let ao=t=>parseInt(t.repeat(2/t.length),16);t.s(["hexToRGBA",0,(t,e)=>{let i,s="rgba(0, 0, 0 ,1)";if(!/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(t))return s;let a=Math.floor((t.length-1)/3),r=(i=t.slice(1),i.match(RegExp(`.{${a}}`,"g")));if(!r)return s;let[n,o,l,h]=r.map(ao);return`rgba(${n}, ${o}, ${l}, ${void 0!==h?h/255:"number"!=typeof e||e<0||e>1?1:e})`}],649713)}]);
3
4//# debugId=1f2c3ea0-149f-af6a-cded-8219f1a991d3

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.