/*! For license information please see tool.js.LICENSE.txt */
(()=>{"use strict";var t,e={358:(t,e,i)=>{const n=Vue;var o={class:"nova-logs"},s={class:"w-1/3"},r={class:"flex flex-wrap mb-4"},a={class:"px-6 py-4"},l={class:"font-bold text-xl mb-2"},h={class:"text-grey-darker text-base"},c={class:"progress mt-3"};function d(){}const u=function(){let t=0;return function(){return t++}}();function f(t){return null==t}function p(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function g(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const m=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function b(t,e){return m(t)?t:e}function x(t,e){return void 0===t?e:t}const y=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function v(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function _(t,e,i,n){let o,s,r;if(p(t))if(s=t.length,n)for(o=s-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;o<s;o++)e.call(i,t[o],o);else if(g(t))for(r=Object.keys(t),s=r.length,o=0;o<s;o++)e.call(i,t[r[o]],r[o])}function w(t,e){let i,n,o,s;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(o=t[i],s=e[i],o.datasetIndex!==s.datasetIndex||o.index!==s.index)return!1;return!0}function k(t){if(p(t))return t.map(k);if(g(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let o=0;for(;o<n;++o)e[i[o]]=k(t[i[o]]);return e}return t}function M(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function S(t,e,i,n){if(!M(t))return;const o=e[t],s=i[t];g(o)&&g(s)?E(o,s,n):e[t]=k(s)}function E(t,e,i){const n=p(e)?e:[e],o=n.length;if(!g(t))return t;const s=(i=i||{}).merger||S;for(let r=0;r<o;++r){if(!g(e=n[r]))continue;const o=Object.keys(e);for(let n=0,r=o.length;n<r;++n)s(o[n],t,e,i)}return t}function C(t,e){return E(t,e,{merger:O})}function O(t,e,i){if(!M(t))return;const n=e[t],o=i[t];g(n)&&g(o)?C(n,o):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=k(o))}const L={"":t=>t,x:t=>t.x,y:t=>t.y};function D(t,e){const i=L[e]||(L[e]=function(t){const e=function(t){const e=t.split("."),i=[];let n="";for(const t of e)n+=t,n.endsWith("\\")?n=n.slice(0,-1)+".":(i.push(n),n="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function P(t){return t.charAt(0).toUpperCase()+t.slice(1)}const A=t=>void 0!==t,T=t=>"function"==typeof t,N=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};const R=Math.PI,V=2*R,I=V+R,F=Number.POSITIVE_INFINITY,z=R/180,B=R/2,j=R/4,W=2*R/3,H=Math.log10,$=Math.sign;function U(t){const e=Math.round(t);t=X(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(H(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function Y(t){return!isNaN(parseFloat(t))&&isFinite(t)}function X(t,e,i){return Math.abs(t-e)<i}function G(t,e,i){let n,o,s;for(n=0,o=t.length;n<o;n++)s=t[n][i],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function q(t){return t*(R/180)}function K(t){return t*(180/R)}function Z(t){if(!m(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function J(t,e){const i=e.x-t.x,n=e.y-t.y,o=Math.sqrt(i*i+n*n);let s=Math.atan2(n,i);return s<-.5*R&&(s+=V),{angle:s,distance:o}}function Q(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function tt(t,e){return(t-e+I)%V-R}function et(t){return(t%V+V)%V}function it(t,e,i,n){const o=et(t),s=et(e),r=et(i),a=et(s-o),l=et(r-o),h=et(o-s),c=et(o-r);return o===s||o===r||n&&s===r||a>l&&h<c}function nt(t,e,i){return Math.max(e,Math.min(i,t))}function ot(t,e,i,n=1e-6){return t>=Math.min(e,i)-n&&t<=Math.max(e,i)+n}function st(t,e,i){i=i||(i=>t[i]<e);let n,o=t.length-1,s=0;for(;o-s>1;)n=s+o>>1,i(n)?s=n:o=n;return{lo:s,hi:o}}const rt=(t,e,i,n)=>st(t,i,n?n=>t[n][e]<=i:n=>t[n][e]<i),at=(t,e,i)=>st(t,i,(n=>t[n][e]>=i));const lt=["push","pop","shift","splice","unshift"];function ht(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,o=n.indexOf(e);-1!==o&&n.splice(o,1),n.length>0||(lt.forEach((e=>{delete t[e]})),delete t._chartjs)}function ct(t){const e=new Set;let i,n;for(i=0,n=t.length;i<n;++i)e.add(t[i]);return e.size===n?t:Array.from(e)}const dt="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function ut(t,e,i){const n=i||(t=>Array.prototype.slice.call(t));let o=!1,s=[];return function(...i){s=n(i),o||(o=!0,dt.call(window,(()=>{o=!1,t.apply(e,s)})))}}const ft=t=>"start"===t?"left":"end"===t?"right":"center",pt=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function gt(t,e,i){const n=e.length;let o=0,s=n;if(t._sorted){const{iScale:r,_parsed:a}=t,l=r.axis,{min:h,max:c,minDefined:d,maxDefined:u}=r.getUserBounds();d&&(o=nt(Math.min(rt(a,r.axis,h).lo,i?n:rt(e,l,r.getPixelForValue(h)).lo),0,n-1)),s=u?nt(Math.max(rt(a,r.axis,c,!0).hi+1,i?0:rt(e,l,r.getPixelForValue(c),!0).hi+1),o,n)-o:n-o}return{start:o,count:s}}function mt(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,o={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=o,!0;const s=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,o),s}const bt=t=>0===t||1===t,xt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*V/i),yt=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*V/i)+1,vt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*B),easeOutSine:t=>Math.sin(t*B),easeInOutSine:t=>-.5*(Math.cos(R*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>bt(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>bt(t)?t:xt(t,.075,.3),easeOutElastic:t=>bt(t)?t:yt(t,.075,.3),easeInOutElastic(t){const e=.1125;return bt(t)?t:t<.5?.5*xt(2*t,e,.45):.5+.5*yt(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-vt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*vt.easeInBounce(2*t):.5*vt.easeOutBounce(2*t-1)+.5};function _t(t){return t+.5|0}const wt=(t,e,i)=>Math.max(Math.min(t,i),e);function kt(t){return wt(_t(2.55*t),0,255)}function Mt(t){return wt(_t(255*t),0,255)}function St(t){return wt(_t(t/2.55)/100,0,1)}function Et(t){return wt(_t(100*t),0,100)}const Ct={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},Ot=[..."0123456789ABCDEF"],Lt=t=>Ot[15&t],Dt=t=>Ot[(240&t)>>4]+Ot[15&t],Pt=t=>(240&t)>>4==(15&t);function At(t){var e=(t=>Pt(t.r)&&Pt(t.g)&&Pt(t.b)&&Pt(t.a))(t)?Lt:Dt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const Tt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Nt(t,e,i){const n=e*Math.min(i,1-i),o=(e,o=(e+t/30)%12)=>i-n*Math.max(Math.min(o-3,9-o,1),-1);return[o(0),o(8),o(4)]}function Rt(t,e,i){const n=(n,o=(n+t/60)%6)=>i-i*e*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function Vt(t,e,i){const n=Nt(t,1,.5);let o;for(e+i>1&&(o=1/(e+i),e*=o,i*=o),o=0;o<3;o++)n[o]*=1-e-i,n[o]+=e;return n}function It(t){const e=t.r/255,i=t.g/255,n=t.b/255,o=Math.max(e,i,n),s=Math.min(e,i,n),r=(o+s)/2;let a,l,h;return o!==s&&(h=o-s,l=r>.5?h/(2-o-s):h/(o+s),a=function(t,e,i,n,o){return t===o?(e-i)/n+(e<i?6:0):e===o?(i-t)/n+2:(t-e)/n+4}(e,i,n,h,o),a=60*a+.5),[0|a,l||0,r]}function Ft(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(Mt)}function zt(t,e,i){return Ft(Nt,t,e,i)}function Bt(t){return(t%360+360)%360}function jt(t){const e=Tt.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?kt(+e[5]):Mt(+e[5]));const o=Bt(+e[2]),s=+e[3]/100,r=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return Ft(Vt,t,e,i)}(o,s,r):"hsv"===e[1]?function(t,e,i){return Ft(Rt,t,e,i)}(o,s,r):zt(o,s,r),{r:i[0],g:i[1],b:i[2],a:n}}const Wt={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"},Ht={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let $t;function Ut(t){$t||($t=function(){const t={},e=Object.keys(Ht),i=Object.keys(Wt);let n,o,s,r,a;for(n=0;n<e.length;n++){for(r=a=e[n],o=0;o<i.length;o++)s=i[o],a=a.replace(s,Wt[s]);s=parseInt(Ht[r],16),t[a]=[s>>16&255,s>>8&255,255&s]}return t}(),$t.transparent=[0,0,0,0]);const e=$t[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const Yt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Xt=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Gt=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function qt(t,e,i){if(t){let n=It(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=zt(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Kt(t,e){return t?Object.assign(e||{},t):t}function Zt(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Mt(t[3]))):(e=Kt(t,{r:0,g:0,b:0,a:1})).a=Mt(e.a),e}function Jt(t){return"r"===t.charAt(0)?function(t){const e=Yt.exec(t);let i,n,o,s=255;if(e){if(e[7]!==i){const t=+e[7];s=e[8]?kt(t):wt(255*t,0,255)}return i=+e[1],n=+e[3],o=+e[5],i=255&(e[2]?kt(i):wt(i,0,255)),n=255&(e[4]?kt(n):wt(n,0,255)),o=255&(e[6]?kt(o):wt(o,0,255)),{r:i,g:n,b:o,a:s}}}(t):jt(t)}class Qt{constructor(t){if(t instanceof Qt)return t;const e=typeof t;let i;var n,o,s;"object"===e?i=Zt(t):"string"===e&&(s=(n=t).length,"#"===n[0]&&(4===s||5===s?o={r:255&17*Ct[n[1]],g:255&17*Ct[n[2]],b:255&17*Ct[n[3]],a:5===s?17*Ct[n[4]]:255}:7!==s&&9!==s||(o={r:Ct[n[1]]<<4|Ct[n[2]],g:Ct[n[3]]<<4|Ct[n[4]],b:Ct[n[5]]<<4|Ct[n[6]],a:9===s?Ct[n[7]]<<4|Ct[n[8]]:255})),i=o||Ut(t)||Jt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Kt(this._rgb);return t&&(t.a=St(t.a)),t}set rgb(t){this._rgb=Zt(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${St(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?At(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=It(t),i=e[0],n=Et(e[1]),o=Et(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${o}%, ${St(t.a)})`:`hsl(${i}, ${n}%, ${o}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let o;const s=e===o?.5:e,r=2*s-1,a=i.a-n.a,l=((r*a==-1?r:(r+a)/(1+r*a))+1)/2;o=1-l,i.r=255&l*i.r+o*n.r+.5,i.g=255&l*i.g+o*n.g+.5,i.b=255&l*i.b+o*n.b+.5,i.a=s*i.a+(1-s)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const n=Gt(St(t.r)),o=Gt(St(t.g)),s=Gt(St(t.b));return{r:Mt(Xt(n+i*(Gt(St(e.r))-n))),g:Mt(Xt(o+i*(Gt(St(e.g))-o))),b:Mt(Xt(s+i*(Gt(St(e.b))-s))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new Qt(this.rgb)}alpha(t){return this._rgb.a=Mt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=_t(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return qt(this._rgb,2,t),this}darken(t){return qt(this._rgb,2,-t),this}saturate(t){return qt(this._rgb,1,t),this}desaturate(t){return qt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=It(t);i[0]=Bt(i[0]+e),i=zt(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function te(t){return new Qt(t)}function ee(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function ie(t){return ee(t)?t:te(t)}function ne(t){return ee(t)?t:te(t).saturate(.5).darken(.1).hexString()}const oe=Object.create(null),se=Object.create(null);function re(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;e<n;++e){const n=i[e];t=t[n]||(t[n]=Object.create(null))}return t}function ae(t,e,i){return"string"==typeof e?E(re(t,e),i):E(re(t,""),e)}var le=new class{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=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)=>ne(e.backgroundColor),this.hoverBorderColor=(t,e)=>ne(e.borderColor),this.hoverColor=(t,e)=>ne(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return ae(this,t,e)}get(t){return re(this,t)}describe(t,e){return ae(se,t,e)}override(t,e){return ae(oe,t,e)}route(t,e,i,n){const o=re(this,t),s=re(this,i),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[r],e=s[n];return g(t)?Object.assign({},e,t):x(t,e)},set(t){this[r]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function he(t,e,i,n,o){let s=e[o];return s||(s=e[o]=t.measureText(o).width,i.push(o)),s>n&&(n=s),n}function ce(t,e,i,n){let o=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(o=n.data={},s=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let r=0;const a=i.length;let l,h,c,d,u;for(l=0;l<a;l++)if(d=i[l],null!=d&&!0!==p(d))r=he(t,o,s,r,d);else if(p(d))for(h=0,c=d.length;h<c;h++)u=d[h],null==u||p(u)||(r=he(t,o,s,r,u));t.restore();const f=s.length/2;if(f>i.length){for(l=0;l<f;l++)delete o[s[l]];s.splice(0,f)}return r}function de(t,e,i){const n=t.currentDevicePixelRatio,o=0!==i?Math.max(i/2,.5):0;return Math.round((e-o)*n)/n+o}function ue(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function fe(t,e,i,n){pe(t,e,i,n,null)}function pe(t,e,i,n,o){let s,r,a,l,h,c;const d=e.pointStyle,u=e.rotation,f=e.radius;let p=(u||0)*z;if(d&&"object"==typeof d&&(s=d.toString(),"[object HTMLImageElement]"===s||"[object HTMLCanvasElement]"===s))return t.save(),t.translate(i,n),t.rotate(p),t.drawImage(d,-d.width/2,-d.height/2,d.width,d.height),void t.restore();if(!(isNaN(f)||f<=0)){switch(t.beginPath(),d){default:o?t.ellipse(i,n,o/2,f,0,0,V):t.arc(i,n,f,0,V),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(p)*f,n-Math.cos(p)*f),p+=W,t.lineTo(i+Math.sin(p)*f,n-Math.cos(p)*f),p+=W,t.lineTo(i+Math.sin(p)*f,n-Math.cos(p)*f),t.closePath();break;case"rectRounded":h=.516*f,l=f-h,r=Math.cos(p+j)*l,a=Math.sin(p+j)*l,t.arc(i-r,n-a,h,p-R,p-B),t.arc(i+a,n-r,h,p-B,p),t.arc(i+r,n+a,h,p,p+B),t.arc(i-a,n+r,h,p+B,p+R),t.closePath();break;case"rect":if(!u){l=Math.SQRT1_2*f,c=o?o/2:l,t.rect(i-c,n-l,2*c,2*l);break}p+=j;case"rectRot":r=Math.cos(p)*f,a=Math.sin(p)*f,t.moveTo(i-r,n-a),t.lineTo(i+a,n-r),t.lineTo(i+r,n+a),t.lineTo(i-a,n+r),t.closePath();break;case"crossRot":p+=j;case"cross":r=Math.cos(p)*f,a=Math.sin(p)*f,t.moveTo(i-r,n-a),t.lineTo(i+r,n+a),t.moveTo(i+a,n-r),t.lineTo(i-a,n+r);break;case"star":r=Math.cos(p)*f,a=Math.sin(p)*f,t.moveTo(i-r,n-a),t.lineTo(i+r,n+a),t.moveTo(i+a,n-r),t.lineTo(i-a,n+r),p+=j,r=Math.cos(p)*f,a=Math.sin(p)*f,t.moveTo(i-r,n-a),t.lineTo(i+r,n+a),t.moveTo(i+a,n-r),t.lineTo(i-a,n+r);break;case"line":r=o?o/2:Math.cos(p)*f,a=Math.sin(p)*f,t.moveTo(i-r,n-a),t.lineTo(i+r,n+a);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(p)*f,n+Math.sin(p)*f)}t.fill(),e.borderWidth>0&&t.stroke()}}function ge(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 me(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function be(t){t.restore()}function xe(t,e,i,n,o){if(!e)return t.lineTo(i.x,i.y);if("middle"===o){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===o!=!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function ye(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function ve(t,e,i,n,o,s={}){const r=p(e)?e:[e],a=s.strokeWidth>0&&""!==s.strokeColor;let l,h;for(t.save(),t.font=o.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);f(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,s),l=0;l<r.length;++l)h=r[l],a&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),f(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(h,i,n,s.maxWidth)),t.fillText(h,i,n,s.maxWidth),_e(t,i,n,h,s),n+=o.lineHeight;t.restore()}function _e(t,e,i,n,o){if(o.strikethrough||o.underline){const s=t.measureText(n),r=e-s.actualBoundingBoxLeft,a=e+s.actualBoundingBoxRight,l=i-s.actualBoundingBoxAscent,h=i+s.actualBoundingBoxDescent,c=o.strikethrough?(l+h)/2:h;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=o.decorationWidth||2,t.moveTo(r,c),t.lineTo(a,c),t.stroke()}}function we(t,e){const{x:i,y:n,w:o,h:s,radius:r}=e;t.arc(i+r.topLeft,n+r.topLeft,r.topLeft,-B,R,!0),t.lineTo(i,n+s-r.bottomLeft),t.arc(i+r.bottomLeft,n+s-r.bottomLeft,r.bottomLeft,R,B,!0),t.lineTo(i+o-r.bottomRight,n+s),t.arc(i+o-r.bottomRight,n+s-r.bottomRight,r.bottomRight,B,0,!0),t.lineTo(i+o,n+r.topRight),t.arc(i+o-r.topRight,n+r.topRight,r.topRight,0,-B,!0),t.lineTo(i+r.topLeft,n)}const ke=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),Me=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Se(t,e){const i=(""+t).match(ke);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}function Ee(t,e){const i={},n=g(e),o=n?Object.keys(e):e,s=g(t)?n?i=>x(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of o)i[t]=+s(t)||0;return i}function Ce(t){return Ee(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Oe(t){return Ee(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Le(t){const e=Ce(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function De(t,e){t=t||{},e=e||le.font;let i=x(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=x(t.style,e.style);n&&!(""+n).match(Me)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const o={family:x(t.family,e.family),lineHeight:Se(x(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:x(t.weight,e.weight),string:""};return o.string=function(t){return!t||f(t.size)||f(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(o),o}function Pe(t,e,i,n){let o,s,r,a=!0;for(o=0,s=t.length;o<s;++o)if(r=t[o],void 0!==r&&(void 0!==e&&"function"==typeof r&&(r=r(e),a=!1),void 0!==i&&p(r)&&(r=r[i%r.length],a=!1),void 0!==r))return n&&!a&&(n.cacheable=!1),r}function Ae(t,e){return Object.assign(Object.create(t),e)}function Te(t,e=[""],i=t,n,o=(()=>t[0])){A(n)||(n=$e("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:o,override:o=>Te([o,...t],e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Fe(i,n,(()=>function(t,e,i,n){let o;for(const s of e)if(o=$e(Ve(s,t),i),A(o))return Ie(t,o)?We(i,n,t,o):o}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ue(t).includes(e),ownKeys:t=>Ue(t),set(t,e,i){const n=t._storage||(t._storage=o());return t[e]=n[e]=i,delete t._keys,!0}})}function Ne(t,e,i,n){const o={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Re(t,n),setContext:e=>Ne(t,e,i,n),override:o=>Ne(t.override(o),e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Fe(t,e,(()=>function(t,e,i){const{_proxy:n,_context:o,_subProxy:s,_descriptors:r}=t;let a=n[e];T(a)&&r.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:r,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t),e=e(s,r||n),a.delete(t),Ie(t,e)&&(e=We(o._scopes,o,t,e));return e}(e,a,t,i));p(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:r,_descriptors:a}=i;if(A(s.index)&&n(t))e=e[s.index%e.length];else if(g(e[0])){const i=e,n=o._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=We(n,o,t,l);e.push(Ne(i,s,r&&r[t],a))}}return e}(e,a,t,r.isIndexable));Ie(e,a)&&(a=Ne(a,o,s&&s[e],r));return a}(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,n)=>(t[i]=n,delete e[i],!0)})}function Re(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:i,indexable:n,isScriptable:T(i)?i:()=>i,isIndexable:T(n)?n:()=>n}}const Ve=(t,e)=>t?t+P(e):e,Ie=(t,e)=>g(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Fe(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function ze(t,e,i){return T(t)?t(e,i):t}const Be=(t,e)=>!0===t?e:"string"==typeof t?D(e,t):void 0;function je(t,e,i,n,o){for(const s of e){const e=Be(i,s);if(e){t.add(e);const s=ze(e._fallback,i,o);if(A(s)&&s!==i&&s!==n)return s}else if(!1===e&&A(n)&&i!==n)return null}return!1}function We(t,e,i,n){const o=e._rootScopes,s=ze(e._fallback,i,n),r=[...t,...o],a=new Set;a.add(n);let l=He(a,r,i,s||i,n);return null!==l&&((!A(s)||s===i||(l=He(a,r,s,l,n),null!==l))&&Te(Array.from(a),[""],o,s,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const o=n[e];if(p(o)&&g(i))return i;return o}(e,i,n))))}function He(t,e,i,n,o){for(;i;)i=je(t,e,i,n,o);return i}function $e(t,e){for(const i of e){if(!i)continue;const e=i[t];if(A(e))return e}}function Ue(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function Ye(t,e,i,n){const{iScale:o}=t,{key:s="r"}=this._parsing,r=new Array(n);let a,l,h,c;for(a=0,l=n;a<l;++a)h=a+i,c=e[h],r[a]={r:o.parse(D(c,s),h)};return r}const Xe=Number.EPSILON||1e-14,Ge=(t,e)=>e<t.length&&!t[e].skip&&t[e],qe=t=>"x"===t?"y":"x";function Ke(t,e,i,n){const o=t.skip?e:t,s=e,r=i.skip?e:i,a=Q(s,o),l=Q(r,s);let h=a/(a+l),c=l/(a+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;const d=n*h,u=n*c;return{previous:{x:s.x-d*(r.x-o.x),y:s.y-d*(r.y-o.y)},next:{x:s.x+u*(r.x-o.x),y:s.y+u*(r.y-o.y)}}}function Ze(t,e="x"){const i=qe(e),n=t.length,o=Array(n).fill(0),s=Array(n);let r,a,l,h=Ge(t,0);for(r=0;r<n;++r)if(a=l,l=h,h=Ge(t,r+1),l){if(h){const t=h[e]-l[e];o[r]=0!==t?(h[i]-l[i])/t:0}s[r]=a?h?$(o[r-1])!==$(o[r])?0:(o[r-1]+o[r])/2:o[r-1]:o[r]}!function(t,e,i){const n=t.length;let o,s,r,a,l,h=Ge(t,0);for(let c=0;c<n-1;++c)l=h,h=Ge(t,c+1),l&&h&&(X(e[c],0,Xe)?i[c]=i[c+1]=0:(o=i[c]/e[c],s=i[c+1]/e[c],a=Math.pow(o,2)+Math.pow(s,2),a<=9||(r=3/Math.sqrt(a),i[c]=o*r*e[c],i[c+1]=s*r*e[c])))}(t,o,s),function(t,e,i="x"){const n=qe(i),o=t.length;let s,r,a,l=Ge(t,0);for(let h=0;h<o;++h){if(r=a,a=l,l=Ge(t,h+1),!a)continue;const o=a[i],c=a[n];r&&(s=(o-r[i])/3,a[`cp1${i}`]=o-s,a[`cp1${n}`]=c-s*e[h]),l&&(s=(l[i]-o)/3,a[`cp2${i}`]=o+s,a[`cp2${n}`]=c+s*e[h])}}(t,s,e)}function Je(t,e,i){return Math.max(Math.min(t,i),e)}function Qe(t,e,i,n,o){let s,r,a,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)Ze(t,o);else{let i=n?t[t.length-1]:t[0];for(s=0,r=t.length;s<r;++s)a=t[s],l=Ke(i,a,t[Math.min(s+1,r-(n?0:1))%r],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,i=a}e.capBezierPoints&&function(t,e){let i,n,o,s,r,a=ge(t[0],e);for(i=0,n=t.length;i<n;++i)r=s,s=a,a=i<n-1&&ge(t[i+1],e),s&&(o=t[i],r&&(o.cp1x=Je(o.cp1x,e.left,e.right),o.cp1y=Je(o.cp1y,e.top,e.bottom)),a&&(o.cp2x=Je(o.cp2x,e.left,e.right),o.cp2y=Je(o.cp2y,e.top,e.bottom)))}(t,i)}function ti(){return"undefined"!=typeof window&&"undefined"!=typeof document}function ei(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function ii(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const ni=t=>window.getComputedStyle(t,null);const oi=["top","right","bottom","left"];function si(t,e,i){const n={};i=i?"-"+i:"";for(let o=0;o<4;o++){const s=oi[o];n[s]=parseFloat(t[e+"-"+s+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function ri(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:n}=e,o=ni(i),s="border-box"===o.boxSizing,r=si(o,"padding"),a=si(o,"border","width"),{x:l,y:h,box:c}=function(t,e){const i=t.touches,n=i&&i.length?i[0]:t,{offsetX:o,offsetY:s}=n;let r,a,l=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(o,s,t.target))r=o,a=s;else{const t=e.getBoundingClientRect();r=n.clientX-t.left,a=n.clientY-t.top,l=!0}return{x:r,y:a,box:l}}(t,i),d=r.left+(c&&a.left),u=r.top+(c&&a.top);let{width:f,height:p}=e;return s&&(f-=r.width+a.width,p-=r.height+a.height),{x:Math.round((l-d)/f*i.width/n),y:Math.round((h-u)/p*i.height/n)}}const ai=t=>Math.round(10*t)/10;function li(t,e,i,n){const o=ni(t),s=si(o,"margin"),r=ii(o.maxWidth,t,"clientWidth")||F,a=ii(o.maxHeight,t,"clientHeight")||F,l=function(t,e,i){let n,o;if(void 0===e||void 0===i){const s=ei(t);if(s){const t=s.getBoundingClientRect(),r=ni(s),a=si(r,"border","width"),l=si(r,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=ii(r.maxWidth,s,"clientWidth"),o=ii(r.maxHeight,s,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||F,maxHeight:o||F}}(t,e,i);let{width:h,height:c}=l;if("content-box"===o.boxSizing){const t=si(o,"border","width"),e=si(o,"padding");h-=e.width+t.width,c-=e.height+t.height}return h=Math.max(0,h-s.width),c=Math.max(0,n?Math.floor(h/n):c-s.height),h=ai(Math.min(h,r,l.maxWidth)),c=ai(Math.min(c,a,l.maxHeight)),h&&!c&&(c=ai(h/2)),{width:h,height:c}}function hi(t,e,i){const n=e||1,o=Math.floor(t.height*n),s=Math.floor(t.width*n);t.height=o/n,t.width=s/n;const r=t.canvas;return r.style&&(i||!r.style.height&&!r.style.width)&&(r.style.height=`${t.height}px`,r.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||r.height!==o||r.width!==s)&&(t.currentDevicePixelRatio=n,r.height=o,r.width=s,t.ctx.setTransform(n,0,0,n,0,0),!0)}const ci=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function di(t,e){const i=function(t,e){return ni(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function ui(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function fi(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function pi(t,e,i,n){const o={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},r=ui(t,o,i),a=ui(o,s,i),l=ui(s,e,i),h=ui(r,a,i),c=ui(a,l,i);return ui(h,c,i)}const gi=new Map;function mi(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=gi.get(i);return n||(n=new Intl.NumberFormat(t,e),gi.set(i,n)),n}(e,i).format(t)}function bi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function xi(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function yi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function vi(t){return"angle"===t?{between:it,compare:tt,normalize:et}:{between:ot,compare:(t,e)=>t-e,normalize:t=>t}}function _i({start:t,end:e,count:i,loop:n,style:o}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:o}}function wi(t,e,i){if(!i)return[t];const{property:n,start:o,end:s}=i,r=e.length,{compare:a,between:l,normalize:h}=vi(n),{start:c,end:d,loop:u,style:f}=function(t,e,i){const{property:n,start:o,end:s}=i,{between:r,normalize:a}=vi(n),l=e.length;let h,c,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,h=0,c=l;h<c&&r(a(e[d%l][n]),o,s);++h)d--,u--;d%=l,u%=l}return u<d&&(u+=l),{start:d,end:u,loop:f,style:t.style}}(t,e,i),p=[];let g,m,b,x=!1,y=null;const v=()=>x||l(o,b,g)&&0!==a(o,b),_=()=>!x||0===a(s,g)||l(s,b,g);for(let t=c,i=c;t<=d;++t)m=e[t%r],m.skip||(g=h(m[n]),g!==b&&(x=l(g,o,s),null===y&&v()&&(y=0===a(g,o)?t:i),null!==y&&_()&&(p.push(_i({start:y,end:t,loop:u,count:r,style:f})),y=null),i=t,b=g));return null!==y&&p.push(_i({start:y,end:d,loop:u,count:r,style:f})),p}function ki(t,e){const i=[],n=t.segments;for(let o=0;o<n.length;o++){const s=wi(n[o],t.points,e);s.length&&i.push(...s)}return i}function Mi(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const o=t._chart.getContext(),s=Si(t.options),{_datasetIndex:r,options:{spanGaps:a}}=t,l=i.length,h=[];let c=s,d=e[0].start,u=d;function f(t,e,n,o){const s=a?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=s;for(;i[e%l].skip;)e+=s;t%l!=e%l&&(h.push({start:t%l,end:e%l,loop:n,style:o}),c=o,d=e%l)}}for(const t of e){d=a?d:t.start;let e,s=i[d%l];for(u=d+1;u<=t.end;u++){const a=i[u%l];e=Si(n.setContext(Ae(o,{type:"segment",p0:s,p1:a,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:r}))),Ei(e,c)&&f(d,u-1,t.loop,c),s=a,c=e}d<u-1&&f(d,u-1,t.loop,c)}return h}(t,e,i,n):e}function Si(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Ei(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}var Ci=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const o=e.listeners[n],s=e.duration;o.forEach((n=>n({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)})))}_refresh(){this._request||(this._running=!0,this._request=dt.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const o=i.items;let s,r=o.length-1,a=!1;for(;r>=0;--r)s=o[r],s._active?(s._total>i.duration&&(i.duration=s._total),s.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),o.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=o.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return 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){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const Oi="transparent",Li={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=ie(t||Oi),o=n.valid&&ie(e||Oi);return o&&o.valid?o.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Di{constructor(t,e,i,n){const o=e[i];n=Pe([t.to,n,o,t.from]);const s=Pe([t.from,o,n]);this._active=!0,this._fn=t.fn||Li[t.type||typeof s],this._easing=vt[t.easing]||vt.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=s,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],o=i-this._start,s=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Pe([t.to,e,n,t.from]),this._from=Pe([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,o=this._from,s=this._loop,r=this._to;let a;if(this._active=o!==r&&(s||e<i),!this._active)return this._target[n]=r,void this._notify(!0);e<0?this._target[n]=o:(a=e/i%2,a=s&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(o,r,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}le.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const Pi=Object.keys(le.animation);le.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),le.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),le.describe("animations",{_fallback:"animation"}),le.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}}}});class Ai{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!g(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!g(n))return;const o={};for(const t of Pi)o[t]=n[t];(p(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,o)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const o=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e<n.length;e++){const o=t[n[e]];o&&o.active()&&i.push(o.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),o}_createAnimations(t,e){const i=this._properties,n=[],o=t.$animations||(t.$animations={}),s=Object.keys(e),r=Date.now();let a;for(a=s.length-1;a>=0;--a){const l=s[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const h=e[l];let c=o[l];const d=i.get(l);if(c){if(d&&c.active()){c.update(d,h,r);continue}c.cancel()}d&&d.duration?(o[l]=c=new Di(d,t,l,h),n.push(c)):t[l]=h}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(Ci.add(this._chart,i),!0):void 0}}function Ti(t,e){const i=t&&t.options||{},n=i.reverse,o=void 0===i.min?e:0,s=void 0===i.max?e:0;return{start:n?s:o,end:n?o:s}}function Ni(t,e){const i=[],n=t._getSortedDatasetMetas(e);let o,s;for(o=0,s=n.length;o<s;++o)i.push(n[o].index);return i}function Ri(t,e,i,n={}){const o=t.keys,s="single"===n.mode;let r,a,l,h;if(null!==e){for(r=0,a=o.length;r<a;++r){if(l=+o[r],l===i){if(n.all)continue;break}h=t.values[l],m(h)&&(s||0===e||$(e)===$(h))&&(e+=h)}return e}}function Vi(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function Ii(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function Fi(t,e,i,n){for(const o of e.getMatchingVisibleMetas(n).reverse()){const e=t[o.index];if(i&&e>0||!i&&e<0)return o.index}return null}function zi(t,e){const{chart:i,_cachedMeta:n}=t,o=i._stacks||(i._stacks={}),{iScale:s,vScale:r,index:a}=n,l=s.axis,h=r.axis,c=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(s,r,n),d=e.length;let u;for(let t=0;t<d;++t){const i=e[t],{[l]:s,[h]:d}=i;u=(i._stacks||(i._stacks={}))[h]=Ii(o,c,s),u[a]=d,u._top=Fi(u,r,!0,n.type),u._bottom=Fi(u,r,!1,n.type)}}function Bi(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function ji(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const Wi=t=>"reset"===t||"none"===t,Hi=(t,e)=>e?t:Object.assign({},t);class $i{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.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Vi(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&ji(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,o=e.xAxisID=x(i.xAxisID,Bi(t,"x")),s=e.yAxisID=x(i.yAxisID,Bi(t,"y")),r=e.rAxisID=x(i.rAxisID,Bi(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,o,s,r),h=e.vAxisID=n(a,s,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(r),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){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&ht(this._data,this),t._stacked&&ji(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(g(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,o,s;for(n=0,o=e.length;n<o;++n)s=e[n],i[n]={x:s,y:t[s]};return i}(e);else if(i!==e){if(i){ht(i,this);const t=this._cachedMeta;ji(t),t._parsed=[]}e&&Object.isExtensible(e)&&(o=this,(n=e)._chartjs?n._chartjs.listeners.push(o):(Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[o]}}),lt.forEach((t=>{const e="_onData"+P(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const o=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),o}})})))),this._syncList=[],this._data=e}var n,o}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=Vi(e.vScale,e),e.stack!==i.stack&&(n=!0,ji(e),e.stack=i.stack),this._resyncElements(t),(n||o!==e._stacked)&&zi(this,e._parsed)}configure(){const 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){const{_cachedMeta:i,_data:n}=this,{iScale:o,_stacked:s}=i,r=o.axis;let a,l,h,c=0===t&&e===n.length||i._sorted,d=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,h=n;else{h=p(n[t])?this.parseArrayData(i,n,t,e):g(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const o=()=>null===l[r]||d&&l[r]<d[r];for(a=0;a<e;++a)i._parsed[a+t]=l=h[a],c&&(o()&&(c=!1),d=l);i._sorted=c}s&&zi(this,h)}parsePrimitiveData(t,e,i,n){const{iScale:o,vScale:s}=t,r=o.axis,a=s.axis,l=o.getLabels(),h=o===s,c=new Array(n);let d,u,f;for(d=0,u=n;d<u;++d)f=d+i,c[d]={[r]:h||o.parse(l[f],f),[a]:s.parse(e[f],f)};return c}parseArrayData(t,e,i,n){const{xScale:o,yScale:s}=t,r=new Array(n);let a,l,h,c;for(a=0,l=n;a<l;++a)h=a+i,c=e[h],r[a]={x:o.parse(c[0],h),y:s.parse(c[1],h)};return r}parseObjectData(t,e,i,n){const{xScale:o,yScale:s}=t,{xAxisKey:r="x",yAxisKey:a="y"}=this._parsing,l=new Array(n);let h,c,d,u;for(h=0,c=n;h<c;++h)d=h+i,u=e[d],l[h]={x:o.parse(D(u,r),d),y:s.parse(D(u,a),d)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,o=this._cachedMeta,s=e[t.axis];return Ri({keys:Ni(n,!0),values:e._stacks[t.axis]},s,o.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const o=i[e.axis];let s=null===o?NaN:o;const r=n&&i._stacks[e.axis];n&&r&&(n.values=r,s=Ri(n,o,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const i=this._cachedMeta,n=i._parsed,o=i._sorted&&t===i.iScale,s=n.length,r=this._getOtherScale(t),a=((t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:Ni(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:c}=function(t){const{min:e,max:i,minDefined:n,maxDefined:o}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:o?i:Number.POSITIVE_INFINITY}}(r);let d,u;function f(){u=n[d];const e=u[r.axis];return!m(u[t.axis])||h>e||c<e}for(d=0;d<s&&(f()||(this.updateRangeFromParsed(l,t,u,a),!o));++d);if(o)for(d=s-1;d>=0;--d)if(!f()){this.updateRangeFromParsed(l,t,u,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,o,s;for(n=0,o=e.length;n<o;++n)s=e[n][t.axis],m(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,i,n,o;return g(t)?(e=t.top,i=t.right,n=t.bottom,o=t.left):e=i=n=o=t,{top:e,right:i,bottom:n,left:o,disabled:!1===t}}(x(this.options.clip,function(t,e,i){if(!1===i)return!1;const n=Ti(t,i),o=Ti(e,i);return{top:o.end,right:n.end,bottom:o.start,left:n.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,n=i.data||[],o=e.chartArea,s=[],r=this._drawStart||0,a=this._drawCount||n.length-r,l=this.options.drawActiveElementsOnTop;let h;for(i.dataset&&i.dataset.draw(t,o,r,a),h=r;h<r+a;++h){const e=n[h];e.hidden||(e.active&&l?s.push(e):e.draw(t,o))}for(h=0;h<s.length;++h)s[h].draw(t,o)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];o=e.$context||(e.$context=function(t,e,i){return Ae(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),o.parsed=this.getParsed(t),o.raw=n.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=function(t,e){return Ae(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),o.dataset=n,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=i,o}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){const n="active"===e,o=this._cachedDataOpts,s=t+"-"+e,r=o[s],a=this.enableOptionSharing&&A(i);if(r)return Hi(r,a);const l=this.chart.config,h=l.datasetElementScopeKeys(this._type,t),c=n?[`${t}Hover`,"hover",t,""]:[t,""],d=l.getOptionScopes(this.getDataset(),h),u=Object.keys(le.elements[t]),f=l.resolveNamedOptions(d,u,(()=>this.getContext(i,n)),c);return f.$shared&&(f.$shared=a,o[s]=Object.freeze(Hi(f,a))),f}_resolveAnimations(t,e,i){const n=this.chart,o=this._cachedDataOpts,s=`animation-${e}`,r=o[s];if(r)return r;let a;if(!1!==n.options.animation){const n=this.chart.config,o=n.datasetAnimationScopeKeys(this._type,e),s=n.getOptionScopes(this.getDataset(),o);a=n.createResolver(s,this.getContext(t,i,e))}const l=new Ai(n,a&&a.animations);return a&&a._cacheable&&(o[s]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Wi(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(i),s=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,i),{sharedOptions:o,includeOptions:s}}updateElement(t,e,i,n){Wi(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Wi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,o=e.length,s=Math.min(o,n);s&&this.parse(0,s),o>n?this._insertElements(n,o-n,t):o<n&&this._removeElements(o,n-o)}_insertElements(t,e,i=!0){const n=this._cachedMeta,o=n.data,s=t+e;let r;const a=t=>{for(t.length+=e,r=t.length-1;r>=s;r--)t[r]=t[r-e]};for(a(o),r=t;r<s;++r)o[r]=new this.dataElementType;this._parsing&&a(n._parsed),this.parse(t,e),i&&this.updateElements(o,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&ji(i,n)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,n]=t;this[e](i,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Ui(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let n=[];for(let e=0,o=i.length;e<o;e++)n=n.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=ct(n.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let n,o,s,r,a=e._length;const l=()=>{32767!==s&&-32768!==s&&(A(r)&&(a=Math.min(a,Math.abs(s-r)||a)),r=s)};for(n=0,o=i.length;n<o;++n)s=e.getPixelForValue(i[n]),l();for(r=void 0,n=0,o=e.ticks.length;n<o;++n)s=e.getPixelForTick(n),l();return a}function Yi(t,e,i,n){return p(t)?function(t,e,i,n){const o=i.parse(t[0],n),s=i.parse(t[1],n),r=Math.min(o,s),a=Math.max(o,s);let l=r,h=a;Math.abs(r)>Math.abs(a)&&(l=a,h=r),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:o,end:s,min:r,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Xi(t,e,i,n){const o=t.iScale,s=t.vScale,r=o.getLabels(),a=o===s,l=[];let h,c,d,u;for(h=i,c=i+n;h<c;++h)u=e[h],d={},d[o.axis]=a||o.parse(r[h],h),l.push(Yi(u,d,s,h));return l}function Gi(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function qi(t,e,i,n){let o=e.borderSkipped;const s={};if(!o)return void(t.borderSkipped=s);if(!0===o)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:r,end:a,reverse:l,top:h,bottom:c}=function(t){let e,i,n,o,s;return t.horizontal?(e=t.base>t.x,i="left",n="right"):(e=t.base<t.y,i="bottom",n="top"),e?(o="end",s="start"):(o="start",s="end"),{start:i,end:n,reverse:e,top:o,bottom:s}}(t);"middle"===o&&i&&(t.enableBorderRadius=!0,(i._top||0)===n?o=h:(i._bottom||0)===n?o=c:(s[Ki(c,r,a,l)]=!0,o=h)),s[Ki(o,r,a,l)]=!0,t.borderSkipped=s}function Ki(t,e,i,n){var o,s,r;return n?(r=i,t=Zi(t=(o=t)===(s=e)?r:o===r?s:o,i,e)):t=Zi(t,e,i),t}function Zi(t,e,i){return"start"===t?e:"end"===t?i:t}function Ji(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?1===i?.33:0:e}$i.defaults={},$i.prototype.datasetElementType=null,$i.prototype.dataElementType=null;class Qi extends $i{parsePrimitiveData(t,e,i,n){return Xi(t,e,i,n)}parseArrayData(t,e,i,n){return Xi(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:o,vScale:s}=t,{xAxisKey:r="x",yAxisKey:a="y"}=this._parsing,l="x"===o.axis?r:a,h="x"===s.axis?r:a,c=[];let d,u,f,p;for(d=i,u=i+n;d<u;++d)p=e[d],f={},f[o.axis]=o.parse(D(p,l),d),c.push(Yi(D(p,h),f,s,d));return c}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const o=i._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:n}=e,o=this.getParsed(t),s=o._custom,r=Gi(s)?"["+s.start+", "+s.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,n){const o="reset"===n,{index:s,_cachedMeta:{vScale:r}}=this,a=r.getBasePixel(),l=r.isHorizontal(),h=this._getRuler(),{sharedOptions:c,includeOptions:d}=this._getSharedOptions(e,n);for(let u=e;u<e+i;u++){const e=this.getParsed(u),i=o||f(e[r.axis])?{base:a,head:a}:this._calculateBarValuePixels(u),p=this._calculateBarIndexPixels(u,h),g=(e._stacks||{})[r.axis],m={horizontal:l,base:i.base,enableBorderRadius:!g||Gi(e._custom)||s===g._top||s===g._bottom,x:l?i.head:p.center,y:l?p.center:i.head,height:l?p.size:Math.abs(i.size),width:l?Math.abs(i.size):p.size};d&&(m.options=c||this.resolveDataElementOptions(u,t[u].active?"active":n));const b=m.options||t[u].options;qi(m,b,g,s),Ji(m,b,h.ratio),this.updateElement(t[u],u,m,n)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,n=i.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped)),o=i.options.stacked,s=[],r=t=>{const i=t.controller.getParsed(e),n=i&&i[t.vScale.axis];if(f(n)||isNaN(n))return!0};for(const i of n)if((void 0===e||!r(i))&&((!1===o||-1===s.indexOf(i.stack)||void 0===o&&void 0===i.stack)&&s.push(i.stack),i.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const n=this._getStacks(t,i),o=void 0!==e?n.indexOf(e):-1;return-1===o?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let o,s;for(o=0,s=e.data.length;o<s;++o)n.push(i.getPixelForValue(this.getParsed(o)[i.axis],o));const r=t.barThickness;return{min:r||Ui(e),pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i},options:{base:n,minBarLength:o}}=this,s=n||0,r=this.getParsed(t),a=r._custom,l=Gi(a);let h,c,d=r[e.axis],u=0,p=i?this.applyStack(e,r,i):d;p!==d&&(u=p-d,p=d),l&&(d=a.barStart,p=a.barEnd-a.barStart,0!==d&&$(d)!==$(a.barEnd)&&(u=0),u+=d);const g=f(n)||l?u:n;let m=e.getPixelForValue(g);if(h=this.chart.getDataVisibility(t)?e.getPixelForValue(u+p):m,c=h-m,Math.abs(c)<o){c=function(t,e,i){return 0!==t?$(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(c,e,s)*o,d===s&&(m-=c/2);const t=e.getPixelForDecimal(0),i=e.getPixelForDecimal(1),n=Math.min(t,i),r=Math.max(t,i);m=Math.max(Math.min(m,r),n),h=m+c}if(m===e.getPixelForValue(s)){const t=$(c)*e.getLineWidthForValue(s)/2;m+=t,c-=t}return{size:c,base:m,head:h,center:h+c/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,o=n.skipNull,s=x(n.maxBarThickness,1/0);let r,a;if(e.grouped){const i=o?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const o=e.pixels,s=o[t];let r=t>0?o[t-1]:null,a=t<o.length-1?o[t+1]:null;const l=i.categoryPercentage;null===r&&(r=s-(null===a?e.end-e.start:a-s)),null===a&&(a=s+s-r);const h=s-(s-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/n,ratio:i.barPercentage,start:h}}(t,e,n,i):function(t,e,i,n){const o=i.barThickness;let s,r;return f(o)?(s=e.min*i.categoryPercentage,r=i.barPercentage):(s=o*n,r=1),{chunk:s/n,ratio:r,start:e.pixels[t]-s/2}}(t,e,n,i),h=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);r=l.start+l.chunk*h+l.chunk/2,a=Math.min(s,l.chunk*l.ratio)}else r=i.getPixelForValue(this.getParsed(t)[i.axis],t),a=Math.min(s,e.min*e.ratio);return{base:r-a/2,head:r+a/2,center:r,size:a}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,n=i.length;let o=0;for(;o<n;++o)null!==this.getParsed(o)[e.axis]&&i[o].draw(this._ctx)}}Qi.id="bar",Qi.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},Qi.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class tn extends $i{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,n){const o=super.parsePrimitiveData(t,e,i,n);for(let t=0;t<o.length;t++)o[t]._custom=this.resolveDataElementOptions(t+i).radius;return o}parseArrayData(t,e,i,n){const o=super.parseArrayData(t,e,i,n);for(let t=0;t<o.length;t++){const n=e[i+t];o[t]._custom=x(n[2],this.resolveDataElementOptions(t+i).radius)}return o}parseObjectData(t,e,i,n){const o=super.parseObjectData(t,e,i,n);for(let t=0;t<o.length;t++){const n=e[i+t];o[t]._custom=x(n&&n.r&&+n.r,this.resolveDataElementOptions(t+i).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let 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){const e=this._cachedMeta,{xScale:i,yScale:n}=e,o=this.getParsed(t),s=i.getLabelForValue(o.x),r=n.getLabelForValue(o.y),a=o._custom;return{label:e.label,value:"("+s+", "+r+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const o="reset"===n,{iScale:s,vScale:r}=this._cachedMeta,{sharedOptions:a,includeOptions:l}=this._getSharedOptions(e,n),h=s.axis,c=r.axis;for(let d=e;d<e+i;d++){const e=t[d],i=!o&&this.getParsed(d),u={},f=u[h]=o?s.getPixelForDecimal(.5):s.getPixelForValue(i[h]),p=u[c]=o?r.getBasePixel():r.getPixelForValue(i[c]);u.skip=isNaN(f)||isNaN(p),l&&(u.options=a||this.resolveDataElementOptions(d,e.active?"active":n),o&&(u.options.radius=0)),this.updateElement(e,d,u,n)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const o=n.radius;return"active"!==e&&(n.radius=0),n.radius+=x(i&&i._custom,o),n}}tn.id="bubble",tn.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},tn.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class en extends $i{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let o,s,r=t=>+i[t];if(g(i[t])){const{key:t="value"}=this._parsing;r=e=>+D(i[e],t)}for(o=t,s=t+e;o<s;++o)n._parsed[o]=r(o)}}_getRotation(){return q(this.options.rotation-90)}_getCircumference(){return q(this.options.circumference)}_getRotationExtents(){let t=V,e=-V;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)){const n=this.chart.getDatasetMeta(i).controller,o=n._getRotation(),s=n._getCircumference();t=Math.min(t,o),e=Math.max(e,o+s)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,n=this._cachedMeta,o=n.data,s=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,r=Math.max((Math.min(i.width,i.height)-s)/2,0),a=Math.min((l=this.options.cutout,h=r,"string"==typeof l&&l.endsWith("%")?parseFloat(l)/100:l/h),1);var l,h;const c=this._getRingWeight(this.index),{circumference:d,rotation:u}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:g,offsetY:m}=function(t,e,i){let n=1,o=1,s=0,r=0;if(e<V){const a=t,l=a+e,h=Math.cos(a),c=Math.sin(a),d=Math.cos(l),u=Math.sin(l),f=(t,e,n)=>it(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),p=(t,e,n)=>it(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),g=f(0,h,d),m=f(B,c,u),b=p(R,h,d),x=p(R+B,c,u);n=(g-b)/2,o=(m-x)/2,s=-(g+b)/2,r=-(m+x)/2}return{ratioX:n,ratioY:o,offsetX:s,offsetY:r}}(u,d,a),b=(i.width-s)/f,x=(i.height-s)/p,v=Math.max(Math.min(b,x)/2,0),_=y(this.options.radius,v),w=(_-Math.max(_*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*_,this.offsetY=m*_,n.total=this.calculateTotal(),this.outerRadius=_-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,o=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*o/V)}updateElements(t,e,i,n){const o="reset"===n,s=this.chart,r=s.chartArea,a=s.options.animation,l=(r.left+r.right)/2,h=(r.top+r.bottom)/2,c=o&&a.animateScale,d=c?0:this.innerRadius,u=c?0:this.outerRadius,{sharedOptions:f,includeOptions:p}=this._getSharedOptions(e,n);let g,m=this._getRotation();for(g=0;g<e;++g)m+=this._circumference(g,o);for(g=e;g<e+i;++g){const e=this._circumference(g,o),i=t[g],s={x:l+this.offsetX,y:h+this.offsetY,startAngle:m,endAngle:m+e,circumference:e,outerRadius:u,innerRadius:d};p&&(s.options=f||this.resolveDataElementOptions(g,i.active?"active":n)),m+=e,this.updateElement(i,g,s,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,n=0;for(i=0;i<e.length;i++){const o=t._parsed[i];null===o||isNaN(o)||!this.chart.getDataVisibility(i)||e[i].hidden||(n+=Math.abs(o))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?V*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=mi(e._parsed[t],i.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,o,s,r,a;if(!t)for(n=0,o=i.data.datasets.length;n<o;++n)if(i.isDatasetVisible(n)){s=i.getDatasetMeta(n),t=s.data,r=s.controller;break}if(!t)return 0;for(n=0,o=t.length;n<o;++n)a=r.resolveDataElementOptions(n),"inner"!==a.borderAlign&&(e=Math.max(e,a.borderWidth||0,a.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const 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(x(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}en.id="doughnut",en.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"},en.descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t},en.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return p(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class nn extends $i{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:o}=e,s=this.chart._animationsDisabled;let{start:r,count:a}=gt(e,n,s);this._drawStart=r,this._drawCount=a,mt(e)&&(r=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!s,options:l},t),this.updateElements(n,r,a,t)}updateElements(t,e,i,n){const o="reset"===n,{iScale:s,vScale:r,_stacked:a,_dataset:l}=this._cachedMeta,{sharedOptions:h,includeOptions:c}=this._getSharedOptions(e,n),d=s.axis,u=r.axis,{spanGaps:p,segment:g}=this.options,m=Y(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||"none"===n;let x=e>0&&this.getParsed(e-1);for(let p=e;p<e+i;++p){const e=t[p],i=this.getParsed(p),y=b?e:{},v=f(i[u]),_=y[d]=s.getPixelForValue(i[d],p),w=y[u]=o||v?r.getBasePixel():r.getPixelForValue(a?this.applyStack(r,i,a):i[u],p);y.skip=isNaN(_)||isNaN(w)||v,y.stop=p>0&&Math.abs(i[d]-x[d])>m,g&&(y.parsed=i,y.raw=l.data[p]),c&&(y.options=h||this.resolveDataElementOptions(p,e.active?"active":n)),b||this.updateElement(e,p,y,n),x=i}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}nn.id="line",nn.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},nn.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class on extends $i{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=mi(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:o}}parseObjectData(t,e,i,n){return Ye.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const n=this.getParsed(i).r;!isNaN(n)&&this.chart.getDataVisibility(i)&&(n<e.min&&(e.min=n),n>e.max&&(e.max=n))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(n/2,0),s=(o-Math.max(i.cutoutPercentage?o/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=o-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,e,i,n){const o="reset"===n,s=this.chart,r=s.options.animation,a=this._cachedMeta.rScale,l=a.xCenter,h=a.yCenter,c=a.getIndexAngle(0)-.5*R;let d,u=c;const f=360/this.countVisibleElements();for(d=0;d<e;++d)u+=this._computeAngle(d,n,f);for(d=e;d<e+i;d++){const e=t[d];let i=u,p=u+this._computeAngle(d,n,f),g=s.getDataVisibility(d)?a.getDistanceFromCenterForValue(this.getParsed(d).r):0;u=p,o&&(r.animateScale&&(g=0),r.animateRotate&&(i=p=c));const m={x:l,y:h,innerRadius:0,outerRadius:g,startAngle:i,endAngle:p,options:this.resolveDataElementOptions(d,e.active?"active":n)};this.updateElement(e,d,m,n)}}countVisibleElements(){const t=this._cachedMeta;let 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)?q(this.resolveDataElementOptions(t,e).angle||i):0}}on.id="polarArea",on.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},on.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class sn extends en{}sn.id="pie",sn.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class rn extends $i{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,n){return Ye.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],o=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const s={_loop:!0,_fullLoop:o.length===n.length,options:e};this.updateElement(i,void 0,s,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const o=this._cachedMeta.rScale,s="reset"===n;for(let r=e;r<e+i;r++){const e=t[r],i=this.resolveDataElementOptions(r,e.active?"active":n),a=o.getPointPositionForValue(r,this.getParsed(r).r),l=s?o.xCenter:a.x,h=s?o.yCenter:a.y,c={x:l,y:h,angle:a.angle,skip:isNaN(l)||isNaN(h),options:i};this.updateElement(e,r,c,n)}}}rn.id="radar",rn.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},rn.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class an{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return Y(this.x)&&Y(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}an.defaults={},an.defaultRoutes=void 0;const ln={values:t=>p(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let o,s=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(o="scientific"),s=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const r=H(Math.abs(s)),a=Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:o,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),mi(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(H(t)));return 1===n||2===n||5===n?ln.numeric.call(this,t,e,i):""}};var hn={formatters:ln};function cn(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),o=t._maxLength/i;return Math.floor(Math.min(n,o))}(t),o=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;i<n;i++)t[i].major&&e.push(i);return e}(e):[],s=o.length,r=o[0],a=o[s-1],l=[];if(s>n)return function(t,e,i,n){let o,s=0,r=i[0];for(n=Math.ceil(n),o=0;o<t.length;o++)o===r&&(e.push(t[o]),s++,r=i[s*n])}(e,l,o,s/n),l;const h=function(t,e,i){const n=function(t){const e=t.length;let i,n;if(e<2)return!1;for(n=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==n)return!1;return n}(t),o=e.length/i;if(!n)return Math.max(o,1);const s=function(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n==0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}(n);for(let t=0,e=s.length-1;t<e;t++){const e=s[t];if(e>o)return e}return Math.max(o,1)}(o,e,n);if(s>0){let t,i;const n=s>1?Math.round((a-r)/(s-1)):null;for(dn(e,l,h,f(n)?0:r-n,r),t=0,i=s-1;t<i;t++)dn(e,l,h,o[t],o[t+1]);return dn(e,l,h,a,f(n)?e.length:a+n),l}return dn(e,l,h),l}function dn(t,e,i,n,o){const s=x(n,0),r=Math.min(x(o,t.length),t.length);let a,l,h,c=0;for(i=Math.ceil(i),o&&(a=o-n,i=a/Math.floor(a/i)),h=s;h<0;)c++,h=Math.round(s+c*i);for(l=Math.max(s,0);l<r;l++)l===h&&(e.push(t[l]),c++,h=Math.round(s+c*i))}le.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth: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:hn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),le.route("scale.ticks","color","","color"),le.route("scale.grid","color","","borderColor"),le.route("scale.grid","borderColor","","borderColor"),le.route("scale.title","color","","color"),le.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),le.describe("scales",{_fallback:"scale"}),le.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const un=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function fn(t,e){const i=[],n=t.length/e,o=t.length;let s=0;for(;s<o;s+=n)i.push(t[Math.floor(s)]);return i}function pn(t,e,i){const n=t.ticks.length,o=Math.min(e,n-1),s=t._startPixel,r=t._endPixel,a=1e-6;let l,h=t.getPixelForTick(o);if(!(i&&(l=1===n?Math.max(h-s,r-h):0===e?(t.getPixelForTick(1)-h)/2:(h-t.getPixelForTick(o-1))/2,h+=o<e?l:-l,h<s-a||h>r+a)))return h}function gn(t){return t.drawTicks?t.tickLength:0}function mn(t,e){if(!t.display)return 0;const i=De(t.font,e),n=Le(t.padding);return(p(t.text)?t.text.length:1)*i.lineHeight+n.height}function bn(t,e,i){let n=ft(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class xn extends an{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:n}=this;return t=b(t,Number.POSITIVE_INFINITY),e=b(e,Number.NEGATIVE_INFINITY),i=b(i,Number.POSITIVE_INFINITY),n=b(n,Number.NEGATIVE_INFINITY),{min:b(t,i),max:b(e,n),minDefined:m(t),maxDefined:m(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:o,maxDefined:s}=this.getUserBounds();if(o&&s)return{min:i,max:n};const r=this.getMatchingVisibleMetas();for(let a=0,l=r.length;a<l;++a)e=r[a].controller.getMinMax(this,t),o||(i=Math.min(i,e.min)),s||(n=Math.max(n,e.max));return i=s&&i>n?n:i,n=o&&i>n?i:n,{min:b(i,b(n,i)),max:b(n,b(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){v(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:o,ticks:s}=this.options,r=s.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){const{min:n,max:o}=t,s=y(e,(o-n)/2),r=(t,e)=>i&&0===t?0:t+e;return{min:r(n,-Math.abs(s)),max:r(o,s)}}(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=r<this.ticks.length;this._convertTicksToLabels(a?fn(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||"auto"===s.source)&&(this.ticks=cn(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),a&&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(){v(this.options.afterUpdate,[this])}beforeSetDimensions(){v(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(){v(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),v(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){v(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,n,o;for(i=0,n=t.length;i<n;i++)o=t[i],o.label=v(e.callback,[o.value,i,t],this)}afterTickToLabelConversion(){v(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){v(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=this.ticks.length,n=e.minRotation||0,o=e.maxRotation;let s,r,a,l=n;if(!this._isVisible()||!e.display||n>=o||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const h=this._getLabelSizes(),c=h.widest.width,d=h.highest.height,u=nt(this.chart.width-c,0,this.maxWidth);s=t.offset?this.maxWidth/i:u/(i-1),c+6>s&&(s=u/(i-(t.offset?.5:1)),r=this.maxHeight-gn(t.grid)-e.padding-mn(t.title,this.chart.options.font),a=Math.sqrt(c*c+d*d),l=K(Math.min(Math.asin(nt((h.highest.height+6)/s,-1,1)),Math.asin(nt(r/a,-1,1))-Math.asin(nt(d/a,-1,1)))),l=Math.max(n,Math.min(o,l))),this.labelRotation=l}afterCalculateLabelRotation(){v(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){v(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:o}}=this,s=this._isVisible(),r=this.isHorizontal();if(s){const s=mn(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=gn(o)+s):(t.height=this.maxHeight,t.width=gn(o)+s),i.display&&this.ticks.length){const{first:e,last:n,widest:o,highest:s}=this._getLabelSizes(),a=2*i.padding,l=q(this.labelRotation),h=Math.cos(l),c=Math.sin(l);if(r){const e=i.mirror?0:c*o.width+h*s.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:h*o.width+c*s.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,c,h)}}this._handleMargins(),r?(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,n){const{ticks:{align:o,padding:s},position:r}=this.options,a=0!==this.labelRotation,l="top"!==r&&"x"===this.axis;if(this.isHorizontal()){const r=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,d=0;a?l?(c=n*t.width,d=i*e.height):(c=i*t.height,d=n*e.width):"start"===o?d=e.width:"end"===o?c=t.width:"inner"!==o&&(c=t.width/2,d=e.width/2),this.paddingLeft=Math.max((c-r+s)*this.width/(this.width-r),0),this.paddingRight=Math.max((d-h+s)*this.width/(this.width-h),0)}else{let i=e.height/2,n=t.height/2;"start"===o?(i=0,n=t.height):"end"===o&&(i=e.height,n=0),this.paddingTop=i+s,this.paddingBottom=n+s}}_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(){v(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)f(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=fn(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length)}return t}_computeLabelSizes(t,e){const{ctx:i,_longestTextCache:n}=this,o=[],s=[];let r,a,l,h,c,d,u,g,m,b,x,y=0,v=0;for(r=0;r<e;++r){if(h=t[r].label,c=this._resolveTickFontOptions(r),i.font=d=c.string,u=n[d]=n[d]||{data:{},gc:[]},g=c.lineHeight,m=b=0,f(h)||p(h)){if(p(h))for(a=0,l=h.length;a<l;++a)x=h[a],f(x)||p(x)||(m=he(i,u.data,u.gc,m,x),b+=g)}else m=he(i,u.data,u.gc,m,h),b=g;o.push(m),s.push(b),y=Math.max(m,y),v=Math.max(b,v)}!function(t,e){_(t,(t=>{const i=t.gc,n=i.length/2;let o;if(n>e){for(o=0;o<n;++o)delete t.data[i[o]];i.splice(0,n)}}))}(n,e);const w=o.indexOf(y),k=s.indexOf(v),M=t=>({width:o[t]||0,height:s[t]||0});return{first:M(0),last:M(e-1),widest:M(w),highest:M(k),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return nt(this._alignToPixels?de(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=function(t,e,i){return Ae(t,{tick:i,index:e,type:"tick"})}(this.getContext(),t,i))}return this.$context||(this.$context=Ae(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=q(this.labelRotation),i=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),o=this._getLabelSizes(),s=t.autoSkipPadding||0,r=o?o.widest.width+s:0,a=o?o.highest.height+s:0;return this.isHorizontal()?a*i>r*n?r/i:a/n:a*n<r*i?a/i:r/n}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:o,position:s}=n,r=o.offset,a=this.isHorizontal(),l=this.ticks.length+(r?1:0),h=gn(o),c=[],d=o.setContext(this.getContext()),u=d.drawBorder?d.borderWidth:0,f=u/2,p=function(t){return de(i,t,u)};let m,b,y,v,_,w,k,M,S,E,C,O;if("top"===s)m=p(this.bottom),w=this.bottom-h,M=m-f,E=p(t.top)+f,O=t.bottom;else if("bottom"===s)m=p(this.top),E=t.top,O=p(t.bottom)-f,w=m+f,M=this.top+h;else if("left"===s)m=p(this.right),_=this.right-h,k=m-f,S=p(t.left)+f,C=t.right;else if("right"===s)m=p(this.left),S=t.left,C=p(t.right)-f,_=m+f,k=this.left+h;else if("x"===e){if("center"===s)m=p((t.top+t.bottom)/2+.5);else if(g(s)){const t=Object.keys(s)[0],e=s[t];m=p(this.chart.scales[t].getPixelForValue(e))}E=t.top,O=t.bottom,w=m+f,M=w+h}else if("y"===e){if("center"===s)m=p((t.left+t.right)/2);else if(g(s)){const t=Object.keys(s)[0],e=s[t];m=p(this.chart.scales[t].getPixelForValue(e))}_=m-f,k=_-h,S=t.left,C=t.right}const L=x(n.ticks.maxTicksLimit,l),D=Math.max(1,Math.ceil(l/L));for(b=0;b<l;b+=D){const t=o.setContext(this.getContext(b)),e=t.lineWidth,n=t.color,s=t.borderDash||[],l=t.borderDashOffset,h=t.tickWidth,d=t.tickColor,u=t.tickBorderDash||[],f=t.tickBorderDashOffset;y=pn(this,b,r),void 0!==y&&(v=de(i,y,e),a?_=k=S=C=v:w=M=E=O=v,c.push({tx1:_,ty1:w,tx2:k,ty2:M,x1:S,y1:E,x2:C,y2:O,width:e,color:n,borderDash:s,borderDashOffset:l,tickWidth:h,tickColor:d,tickBorderDash:u,tickBorderDashOffset:f}))}return this._ticksLength=l,this._borderValue=m,c}_computeLabelItems(t){const e=this.axis,i=this.options,{position:n,ticks:o}=i,s=this.isHorizontal(),r=this.ticks,{align:a,crossAlign:l,padding:h,mirror:c}=o,d=gn(i.grid),u=d+h,f=c?-h:u,m=-q(this.labelRotation),b=[];let x,y,v,_,w,k,M,S,E,C,O,L,D="middle";if("top"===n)k=this.bottom-f,M=this._getXAxisLabelAlignment();else if("bottom"===n)k=this.top+f,M=this._getXAxisLabelAlignment();else if("left"===n){const t=this._getYAxisLabelAlignment(d);M=t.textAlign,w=t.x}else if("right"===n){const t=this._getYAxisLabelAlignment(d);M=t.textAlign,w=t.x}else if("x"===e){if("center"===n)k=(t.top+t.bottom)/2+u;else if(g(n)){const t=Object.keys(n)[0],e=n[t];k=this.chart.scales[t].getPixelForValue(e)+u}M=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===n)w=(t.left+t.right)/2-u;else if(g(n)){const t=Object.keys(n)[0],e=n[t];w=this.chart.scales[t].getPixelForValue(e)}M=this._getYAxisLabelAlignment(d).textAlign}"y"===e&&("start"===a?D="top":"end"===a&&(D="bottom"));const P=this._getLabelSizes();for(x=0,y=r.length;x<y;++x){v=r[x],_=v.label;const t=o.setContext(this.getContext(x));S=this.getPixelForTick(x)+o.labelOffset,E=this._resolveTickFontOptions(x),C=E.lineHeight,O=p(_)?_.length:1;const e=O/2,i=t.color,a=t.textStrokeColor,h=t.textStrokeWidth;let d,u=M;if(s?(w=S,"inner"===M&&(u=x===y-1?this.options.reverse?"left":"right":0===x?this.options.reverse?"right":"left":"center"),L="top"===n?"near"===l||0!==m?-O*C+C/2:"center"===l?-P.highest.height/2-e*C+C:-P.highest.height+C/2:"near"===l||0!==m?C/2:"center"===l?P.highest.height/2-e*C:P.highest.height-O*C,c&&(L*=-1)):(k=S,L=(1-O)*C/2),t.showLabelBackdrop){const e=Le(t.backdropPadding),i=P.heights[x],n=P.widths[x];let o=k+L-e.top,s=w-e.left;switch(D){case"middle":o-=i/2;break;case"bottom":o-=i}switch(M){case"center":s-=n/2;break;case"right":s-=n}d={left:s,top:o,width:n+e.width,height:i+e.height,color:t.backdropColor}}b.push({rotation:m,label:_,font:E,color:i,strokeColor:a,strokeWidth:h,textOffset:L,textAlign:u,textBaseline:D,translation:[w,k],backdrop:d})}return b}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-q(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){const{position:e,ticks:{crossAlign:i,mirror:n,padding:o}}=this.options,s=t+o,r=this._getLabelSizes().widest.width;let a,l;return"left"===e?n?(l=this.right+o,"near"===i?a="left":"center"===i?(a="center",l+=r/2):(a="right",l+=r)):(l=this.right-s,"near"===i?a="right":"center"===i?(a="center",l-=r/2):(a="left",l=this.left)):"right"===e?n?(l=this.left+o,"near"===i?a="right":"center"===i?(a="center",l-=r/2):(a="left",l-=r)):(l=this.left+s,"near"===i?a="left":"center"===i?(a="center",l+=r/2):(a="right",l=this.right)):a="right",{textAlign:a,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:o,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,o,s),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,s;const r=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(o=0,s=n.length;o<s;++o){const t=n[o];e.drawOnChartArea&&r({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&r({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{grid:i}}=this,n=i.setContext(this.getContext()),o=i.drawBorder?n.borderWidth:0;if(!o)return;const s=i.setContext(this.getContext(0)).lineWidth,r=this._borderValue;let a,l,h,c;this.isHorizontal()?(a=de(t,this.left,o)-o/2,l=de(t,this.right,s)+s/2,h=c=r):(h=de(t,this.top,o)-o/2,c=de(t,this.bottom,s)+s/2,a=l=r),e.save(),e.lineWidth=n.borderWidth,e.strokeStyle=n.borderColor,e.beginPath(),e.moveTo(a,h),e.lineTo(l,c),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&me(e,i);const n=this._labelItems||(this._labelItems=this._computeLabelItems(t));let o,s;for(o=0,s=n.length;o<s;++o){const t=n[o],i=t.font,s=t.label;t.backdrop&&(e.fillStyle=t.backdrop.color,e.fillRect(t.backdrop.left,t.backdrop.top,t.backdrop.width,t.backdrop.height)),ve(e,s,0,t.textOffset,i,t)}i&&be(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const o=De(i.font),s=Le(i.padding),r=i.align;let a=o.lineHeight/2;"bottom"===e||"center"===e||g(e)?(a+=s.bottom,p(i.text)&&(a+=o.lineHeight*(i.text.length-1))):a+=s.top;const{titleX:l,titleY:h,maxWidth:c,rotation:d}=function(t,e,i,n){const{top:o,left:s,bottom:r,right:a,chart:l}=t,{chartArea:h,scales:c}=l;let d,u,f,p=0;const m=r-o,b=a-s;if(t.isHorizontal()){if(u=pt(n,s,a),g(i)){const t=Object.keys(i)[0],n=i[t];f=c[t].getPixelForValue(n)+m-e}else f="center"===i?(h.bottom+h.top)/2+m-e:un(t,i,e);d=a-s}else{if(g(i)){const t=Object.keys(i)[0],n=i[t];u=c[t].getPixelForValue(n)-b+e}else u="center"===i?(h.left+h.right)/2-b+e:un(t,i,e);f=pt(n,r,o),p="left"===i?-B:B}return{titleX:u,titleY:f,maxWidth:d,rotation:p}}(this,a,e,r);ve(t,i.text,0,0,o,{color:i.color,maxWidth:c,rotation:d,textAlign:bn(r,e,n),textBaseline:"middle",translation:[l,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=x(t.grid&&t.grid.z,-1);return this._isVisible()&&this.draw===xn.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let o,s;for(o=0,s=e.length;o<s;++o){const s=e[o];s[i]!==this.id||t&&s.type!==t||n.push(s)}return n}_resolveTickFontOptions(t){return De(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class yn{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){const e=Object.getPrototypeOf(t);let i;(function(t){return"id"in t&&"defaults"in t})(e)&&(i=this.register(e));const n=this.items,o=t.id,s=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in n||(n[o]=t,function(t,e,i){const n=E(Object.create(null),[i?le.get(i):{},le.get(e),t.defaults]);le.set(e,n),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const n=i.split("."),o=n.pop(),s=[t].concat(n).join("."),r=e[i].split("."),a=r.pop(),l=r.join(".");le.route(s,o,l,a)}))}(e,t.defaultRoutes);t.descriptors&&le.describe(e,t.descriptors)}(t,s,i),this.override&&le.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in le[n]&&(delete le[n][i],this.override&&delete oe[i])}}var vn=new class{constructor(){this.controllers=new yn($i,"datasets",!0),this.elements=new yn(an,"elements"),this.plugins=new yn(Object,"plugins"),this.scales=new yn(xn,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):_(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=P(t);v(i["before"+n],[],i),e[t](i),v(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n}};class _n extends $i{update(t){const e=this._cachedMeta,{data:i=[]}=e,n=this.chart._animationsDisabled;let{start:o,count:s}=gt(e,i,n);if(this._drawStart=o,this._drawCount=s,mt(e)&&(o=0,s=i.length),this.options.showLine){const{dataset:o,_dataset:s}=e;o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!s._decimated,o.points=i;const r=this.resolveDatasetElementOptions(t);r.segment=this.options.segment,this.updateElement(o,void 0,{animated:!n,options:r},t)}this.updateElements(i,o,s,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=vn.getElement("line")),super.addElements()}updateElements(t,e,i,n){const o="reset"===n,{iScale:s,vScale:r,_stacked:a,_dataset:l}=this._cachedMeta,h=this.resolveDataElementOptions(e,n),c=this.getSharedOptions(h),d=this.includeOptions(n,c),u=s.axis,p=r.axis,{spanGaps:g,segment:m}=this.options,b=Y(g)?g:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||o||"none"===n;let y=e>0&&this.getParsed(e-1);for(let h=e;h<e+i;++h){const e=t[h],i=this.getParsed(h),g=x?e:{},v=f(i[p]),_=g[u]=s.getPixelForValue(i[u],h),w=g[p]=o||v?r.getBasePixel():r.getPixelForValue(a?this.applyStack(r,i,a):i[p],h);g.skip=isNaN(_)||isNaN(w)||v,g.stop=h>0&&Math.abs(i[u]-y[u])>b,m&&(g.parsed=i,g.raw=l.data[h]),d&&(g.options=c||this.resolveDataElementOptions(h,e.active?"active":n)),x||this.updateElement(e,h,g,n),y=i}this.updateSharedOptions(c,n,h)}getMaxOverflow(){const 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}const i=t.dataset,n=i.options&&i.options.borderWidth||0;if(!e.length)return n;const o=e[0].size(this.resolveDataElementOptions(0)),s=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,o,s)/2}}_n.id="scatter",_n.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},_n.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function wn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class kn{constructor(t){this.options=t||{}}init(t){}formats(){return wn()}parse(t,e){return wn()}format(t,e){return wn()}add(t,e,i){return wn()}diff(t,e,i){return wn()}startOf(t,e,i){return wn()}endOf(t,e){return wn()}}kn.override=function(t){Object.assign(kn.prototype,t)};var Mn={_date:kn};function Sn(t,e,i,n){const{controller:o,data:s,_sorted:r}=t,a=o._cachedMeta.iScale;if(a&&e===a.axis&&"r"!==e&&r&&s.length){const t=a._reversePixels?at:rt;if(!n)return t(s,e,i);if(o._sharedOptions){const n=s[0],o="function"==typeof n.getRange&&n.getRange(e);if(o){const n=t(s,e,i-o),r=t(s,e,i+o);return{lo:n.lo,hi:r.hi}}}}return{lo:0,hi:s.length-1}}function En(t,e,i,n,o){const s=t.getSortedVisibleDatasetMetas(),r=i[e];for(let t=0,i=s.length;t<i;++t){const{index:i,data:a}=s[t],{lo:l,hi:h}=Sn(s[t],e,r,o);for(let t=l;t<=h;++t){const e=a[t];e.skip||n(e,i,t)}}}function Cn(t,e,i,n,o){const s=[];if(!o&&!t.isPointInArea(e))return s;return En(t,i,e,(function(i,r,a){(o||ge(i,t.chartArea,0))&&i.inRange(e.x,e.y,n)&&s.push({element:i,datasetIndex:r,index:a})}),!0),s}function On(t,e,i,n,o,s){let r=[];const a=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const o=e?Math.abs(t.x-n.x):0,s=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}(i);let l=Number.POSITIVE_INFINITY;return En(t,i,e,(function(i,h,c){const d=i.inRange(e.x,e.y,o);if(n&&!d)return;const u=i.getCenterPoint(o);if(!(!!s||t.isPointInArea(u))&&!d)return;const f=a(e,u);f<l?(r=[{element:i,datasetIndex:h,index:c}],l=f):f===l&&r.push({element:i,datasetIndex:h,index:c})})),r}function Ln(t,e,i,n,o,s){return s||t.isPointInArea(e)?"r"!==i||n?On(t,e,i,n,o,s):function(t,e,i,n){let o=[];return En(t,i,e,(function(t,i,s){const{startAngle:r,endAngle:a}=t.getProps(["startAngle","endAngle"],n),{angle:l}=J(t,{x:e.x,y:e.y});it(l,r,a)&&o.push({element:t,datasetIndex:i,index:s})})),o}(t,e,i,o):[]}function Dn(t,e,i,n,o){const s=[],r="x"===i?"inXRange":"inYRange";let a=!1;return En(t,i,e,((t,n,l)=>{t[r](e[i],o)&&(s.push({element:t,datasetIndex:n,index:l}),a=a||t.inRange(e.x,e.y,o))})),n&&!a?[]:s}var Pn={evaluateInteractionItems:En,modes:{index(t,e,i,n){const o=ri(e,t),s=i.axis||"x",r=i.includeInvisible||!1,a=i.intersect?Cn(t,o,s,n,r):Ln(t,o,s,!1,n,r),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=a[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,i,n){const o=ri(e,t),s=i.axis||"xy",r=i.includeInvisible||!1;let a=i.intersect?Cn(t,o,s,n,r):Ln(t,o,s,!1,n,r);if(a.length>0){const e=a[0].datasetIndex,i=t.getDatasetMeta(e).data;a=[];for(let t=0;t<i.length;++t)a.push({element:i[t],datasetIndex:e,index:t})}return a},point:(t,e,i,n)=>Cn(t,ri(e,t),i.axis||"xy",n,i.includeInvisible||!1),nearest(t,e,i,n){const o=ri(e,t),s=i.axis||"xy",r=i.includeInvisible||!1;return Ln(t,o,s,i.intersect,n,r)},x:(t,e,i,n)=>Dn(t,ri(e,t),"x",i.intersect,n),y:(t,e,i,n)=>Dn(t,ri(e,t),"y",i.intersect,n)}};const An=["left","top","right","bottom"];function Tn(t,e){return t.filter((t=>t.pos===e))}function Nn(t,e){return t.filter((t=>-1===An.indexOf(t.pos)&&t.box.axis===e))}function Rn(t,e){return t.sort(((t,i)=>{const n=e?i:t,o=e?t:i;return n.weight===o.weight?n.index-o.index:n.weight-o.weight}))}function Vn(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:o}=i;if(!t||!An.includes(n))continue;const s=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=o}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:o}=e;let s,r,a;for(s=0,r=t.length;s<r;++s){a=t[s];const{fullSize:r}=a.box,l=i[a.stack],h=l&&a.stackWeight/l.weight;a.horizontal?(a.width=h?h*n:r&&e.availableWidth,a.height=o):(a.width=n,a.height=h?h*o:r&&e.availableHeight)}return i}function In(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function Fn(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 zn(t,e,i,n){const{pos:o,box:s}=i,r=t.maxPadding;if(!g(o)){i.size&&(t[o]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?s.height:s.width),i.size=e.size/e.count,t[o]+=i.size}s.getPadding&&Fn(r,s.getPadding());const a=Math.max(0,e.outerWidth-In(r,t,"left","right")),l=Math.max(0,e.outerHeight-In(r,t,"top","bottom")),h=a!==t.w,c=l!==t.h;return t.w=a,t.h=l,i.horizontal?{same:h,other:c}:{same:c,other:h}}function Bn(t,e){const i=e.maxPadding;function n(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function jn(t,e,i,n){const o=[];let s,r,a,l,h,c;for(s=0,r=t.length,h=0;s<r;++s){a=t[s],l=a.box,l.update(a.width||e.w,a.height||e.h,Bn(a.horizontal,e));const{same:r,other:d}=zn(e,i,a,n);h|=r&&o.length,c=c||d,l.fullSize||o.push(a)}return h&&jn(o,e,i,n)||c}function Wn(t,e,i,n,o){t.top=i,t.left=e,t.right=e+n,t.bottom=i+o,t.width=n,t.height=o}function Hn(t,e,i,n){const o=i.padding;let{x:s,y:r}=e;for(const a of t){const t=a.box,l=n[a.stack]||{count:1,placed:0,weight:1},h=a.stackWeight/l.weight||1;if(a.horizontal){const n=e.w*h,s=l.size||t.height;A(l.start)&&(r=l.start),t.fullSize?Wn(t,o.left,r,i.outerWidth-o.right-o.left,s):Wn(t,e.left+l.placed,r,n,s),l.start=r,l.placed+=n,r=t.bottom}else{const n=e.h*h,r=l.size||t.width;A(l.start)&&(s=l.start),t.fullSize?Wn(t,s,o.top,r,i.outerHeight-o.bottom-o.top):Wn(t,s,e.top+l.placed,r,n),l.start=s,l.placed+=n,s=t.right}}e.x=s,e.y=r}le.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var $n={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const 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,n){if(!t)return;const o=Le(t.options.layout.padding),s=Math.max(e-o.width,0),r=Math.max(i-o.height,0),a=function(t){const e=function(t){const e=[];let i,n,o,s,r,a;for(i=0,n=(t||[]).length;i<n;++i)o=t[i],({position:s,options:{stack:r,stackWeight:a=1}}=o),e.push({index:i,box:o,pos:s,horizontal:o.isHorizontal(),weight:o.weight,stack:r&&s+r,stackWeight:a});return e}(t),i=Rn(e.filter((t=>t.box.fullSize)),!0),n=Rn(Tn(e,"left"),!0),o=Rn(Tn(e,"right")),s=Rn(Tn(e,"top"),!0),r=Rn(Tn(e,"bottom")),a=Nn(e,"x"),l=Nn(e,"y");return{fullSize:i,leftAndTop:n.concat(s),rightAndBottom:o.concat(l).concat(r).concat(a),chartArea:Tn(e,"chartArea"),vertical:n.concat(o).concat(l),horizontal:s.concat(r).concat(a)}}(t.boxes),l=a.vertical,h=a.horizontal;_(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const c=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:o,availableWidth:s,availableHeight:r,vBoxMaxWidth:s/2/c,hBoxMaxHeight:r/2}),u=Object.assign({},o);Fn(u,Le(n));const f=Object.assign({maxPadding:u,w:s,h:r,x:o.left,y:o.top},o),p=Vn(l.concat(h),d);jn(a.fullSize,f,d,p),jn(l,f,d,p),jn(h,f,d,p)&&jn(l,f,d,p),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),Hn(a.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,Hn(a.rightAndBottom,f,d,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},_(a.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})}))}};class Un{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Yn extends Un{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Xn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Gn=t=>null===t||""===t;const qn=!!ci&&{passive:!0};function Kn(t,e,i){t.canvas.removeEventListener(e,i,qn)}function Zn(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function Jn(t,e,i){const n=t.canvas,o=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Zn(i.addedNodes,n),e=e&&!Zn(i.removedNodes,n);e&&i()}));return o.observe(document,{childList:!0,subtree:!0}),o}function Qn(t,e,i){const n=t.canvas,o=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Zn(i.removedNodes,n),e=e&&!Zn(i.addedNodes,n);e&&i()}));return o.observe(document,{childList:!0,subtree:!0}),o}const to=new Map;let eo=0;function io(){const t=window.devicePixelRatio;t!==eo&&(eo=t,to.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function no(t,e,i){const n=t.canvas,o=n&&ei(n);if(!o)return;const s=ut(((t,e)=>{const n=o.clientWidth;i(t,e),n<o.clientWidth&&i()}),window),r=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||s(i,n)}));return r.observe(o),function(t,e){to.size||window.addEventListener("resize",io),to.set(t,e)}(t,s),r}function oo(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){to.delete(t),to.size||window.removeEventListener("resize",io)}(t)}function so(t,e,i){const n=t.canvas,o=ut((e=>{null!==t.ctx&&i(function(t,e){const i=Xn[t.type]||t.type,{x:n,y:o}=ri(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==o?o:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,qn)}(n,e,o),o}class ro extends Un{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),o=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Gn(o)){const e=di(t,"width");void 0!==e&&(t.width=e)}if(Gn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=di(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];f(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),o={attach:Jn,detach:Qn,resize:no}[e]||so;n[e]=o(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:oo,detach:oo,resize:oo}[e]||Kn)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return li(t,e,i,n)}isAttached(t){const e=ei(t);return!(!e||!e.isConnected)}}class ao{constructor(){this._init=[]}notify(t,e,i,n){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=n?this._descriptors(t).filter(n):this._descriptors(t),s=this._notify(o,t,e,i);return"afterDestroy"===e&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,e,i,n){n=n||{};for(const o of t){const t=o.plugin;if(!1===v(t[i],[e,n,o.options],t)&&n.cancelable)return!1}return!0}invalidate(){f(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,n=x(i.options&&i.options.plugins,{}),o=function(t){const e={},i=[],n=Object.keys(vn.plugins.items);for(let t=0;t<n.length;t++)i.push(vn.getPlugin(n[t]));const o=t.plugins||[];for(let t=0;t<o.length;t++){const n=o[t];-1===i.indexOf(n)&&(i.push(n),e[n.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==n||e?function(t,{plugins:e,localIds:i},n,o){const s=[],r=t.getContext();for(const a of e){const e=a.id,l=lo(n[e],o);null!==l&&s.push({plugin:a,options:ho(t.config,{plugin:a,local:i[e]},l,r)})}return s}(t,o,n,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function lo(t,e){return e||!1!==t?!0===t?{}:t:null}function ho(t,{plugin:e,local:i},n,o){const s=t.pluginScopeKeys(e),r=t.getOptionScopes(n,s);return i&&e.defaults&&r.push(e.defaults),t.createResolver(r,o,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function co(t,e){const i=le.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function uo(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function fo(t){const e=t.options||(t.options={});e.plugins=x(e.plugins,{}),e.scales=function(t,e){const i=oe[t.type]||{scales:{}},n=e.scales||{},o=co(t.type,e),s=Object.create(null),r=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!g(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=uo(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,o),h=i.scales||{};s[a]=s[a]||t,r[t]=C(Object.create(null),[{axis:a},e,h[a],h[l]])})),t.data.datasets.forEach((i=>{const o=i.type||t.type,a=i.indexAxis||co(o,e),l=(oe[o]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),o=i[e+"AxisID"]||s[e]||e;r[o]=r[o]||Object.create(null),C(r[o],[{axis:e},n[o],l[t]])}))})),Object.keys(r).forEach((t=>{const e=r[t];C(e,[le.scales[e.type],le.scale])})),r}(t,e)}function po(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const go=new Map,mo=new Set;function bo(t,e){let i=go.get(t);return i||(i=e(),go.set(t,i),mo.add(i)),i}const xo=(t,e,i)=>{const n=D(e,i);void 0!==n&&t.add(n)};class yo{constructor(t){this._config=function(t){return(t=t||{}).data=po(t.data),fo(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=po(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),fo(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return bo(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return bo(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return bo(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return bo(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:o}=this,s=this._cachedScopes(t,i),r=s.get(e);if(r)return r;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>xo(a,t,e)))),e.forEach((t=>xo(a,n,t))),e.forEach((t=>xo(a,oe[o]||{},t))),e.forEach((t=>xo(a,le,t))),e.forEach((t=>xo(a,se,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),mo.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,oe[e]||{},le.datasets[e]||{},{type:e},le,se]}resolveNamedOptions(t,e,i,n=[""]){const o={$shared:!0},{resolver:s,subPrefixes:r}=vo(this._resolverCache,t,n);let a=s;if(function(t,e){const{isScriptable:i,isIndexable:n}=Re(t);for(const o of e){const e=i(o),s=n(o),r=(s||e)&&t[o];if(e&&(T(r)||_o(r))||s&&p(r))return!0}return!1}(s,e)){o.$shared=!1;a=Ne(s,i=T(i)?i():i,this.createResolver(t,i,r))}for(const t of e)o[t]=a[t];return o}createResolver(t,e,i=[""],n){const{resolver:o}=vo(this._resolverCache,t,i);return g(e)?Ne(o,e,void 0,n):o}}function vo(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const o=i.join();let s=n.get(o);if(!s){s={resolver:Te(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(o,s)}return s}const _o=t=>g(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||T(t[i])),!1);const wo=["top","bottom","left","right","chartArea"];function ko(t,e){return"top"===t||"bottom"===t||-1===wo.indexOf(t)&&"x"===e}function Mo(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function So(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),v(i&&i.onComplete,[t],e)}function Eo(t){const e=t.chart,i=e.options.animation;v(i&&i.onProgress,[t],e)}function Co(t){return ti()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Oo={},Lo=t=>{const e=Co(t);return Object.values(Oo).filter((t=>t.canvas===e)).pop()};function Do(t,e,i){const n=Object.keys(t);for(const o of n){const n=+o;if(n>=e){const s=t[o];delete t[o],(i>0||n>e)&&(t[n+i]=s)}}}class Po{constructor(t,e){const i=this.config=new yo(e),n=Co(t),o=Lo(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const s=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!ti()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Yn:ro}(n)),this.platform.updateConfig(i);const r=this.platform.acquireContext(n,s.aspectRatio),a=r&&r.canvas,l=a&&a.height,h=a&&a.width;this.id=u(),this.ctx=r,this.canvas=a,this.width=h,this.height=l,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new ao,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),s.resizeDelay||0),this._dataChanges=[],Oo[this.id]=this,r&&a?(Ci.listen(this,"complete",So),Ci.listen(this,"progress",Eo),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:o}=this;return f(t)?e&&o?o:n?i/n: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}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():hi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ue(this.canvas,this.ctx),this}stop(){return Ci.stop(this),this}resize(t,e){Ci.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(n,t,e,o),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,hi(this,r,!0)&&(this.notifyPlugins("resize",{size:s}),v(i.onResize,[this,s],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){_(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let o=[];e&&(o=o.concat(Object.keys(e).map((t=>{const i=e[t],n=uo(t,i),o="r"===n,s="x"===n;return{options:i,dposition:o?"chartArea":s?"bottom":"left",dtype:o?"radialLinear":s?"category":"linear"}})))),_(o,(e=>{const o=e.options,s=o.id,r=uo(s,o),a=x(o.type,e.dtype);void 0!==o.position&&ko(o.position,r)===ko(e.dposition)||(o.position=e.dposition),n[s]=!0;let l=null;if(s in i&&i[s].type===a)l=i[s];else{l=new(vn.getScale(a))({id:s,type:a,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(o,t)})),_(n,((t,e)=>{t||delete i[e]})),_(i,(t=>{$n.configure(this,t,t.options),$n.addBox(this,t)}))}_updateMetasets(){const 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(Mo("order","index"))}_removeUnreferencedMetasets(){const{_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(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i<n;i++){const n=e[i];let o=this.getDatasetMeta(i);const s=n.type||this.config.type;if(o.type&&o.type!==s&&(this._destroyDatasetMeta(i),o=this.getDatasetMeta(i)),o.type=s,o.indexAxis=n.indexAxis||co(s,this.options),o.order=n.order||0,o.index=i,o.label=""+n.label,o.visible=this.isDatasetVisible(i),o.controller)o.controller.updateIndex(i),o.controller.linkScales();else{const e=vn.getController(s),{datasetElementType:n,dataElementType:r}=le.datasets[s];Object.assign(e.prototype,{dataElementType:vn.getElement(r),datasetElementType:n&&vn.getElement(n)}),o.controller=new e(this,i),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){_(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),i=!n&&-1===o.indexOf(e);e.buildOrUpdateElements(i),s=Math.max(+e.getMaxOverflow(),s)}s=this._minPadding=i.layout.autoPadding?s:0,this._updateLayout(s),n||_(o,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Mo("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){_(this.scales,(t=>{$n.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);N(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:o}of e){Do(t,n,"_removeElements"===i?-o:o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),n=i(0);for(let t=1;t<e;t++)if(!N(n,i(t)))return;return Array.from(n).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;$n.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],_(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,T(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),n={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",n)&&(i.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(Ci.has(this)?this.attached&&!Ci.running(this)&&Ci.start(this):(this.draw(),So({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resize(t,e),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let n,o;for(n=0,o=e.length;n<o;++n){const o=e[n];t&&!o.visible||i.push(o)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,o=this.chartArea,s={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",s)&&(n&&me(e,{left:!1===i.left?0:o.left-i.left,right:!1===i.right?this.width:o.right+i.right,top:!1===i.top?0:o.top-i.top,bottom:!1===i.bottom?this.height:o.bottom+i.bottom}),t.controller.draw(),n&&be(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return ge(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const o=Pn.modes[e];return"function"==typeof o?o(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={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(n)),n}getContext(){return this.$context||(this.$context=Ae(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const 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){const n=i?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,n);A(e)?(o.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),s.update(o,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Ci.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ue(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete Oo[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};_(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},o=(t,e)=>{this.canvas&&this.resize(t,e)};let s;const r=()=>{n("attach",r),this.attached=!0,this.resize(),i("resize",o),i("detach",s)};s=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),i("attach",r)},e.isAttached(this.canvas)?r():s()}unbindEvents(){_(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},_(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let o,s,r,a;for("dataset"===e&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),r=0,a=t.length;r<a;++r){s=t[r];const e=s&&this.getDatasetMeta(s.datasetIndex).controller;e&&e[n+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map((({datasetIndex:t,index:e})=>{const i=this.getDatasetMeta(t);if(!i)throw new 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)}_updateHoverStyles(t,e,i){const n=this.options.hover,o=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),s=o(e,t),r=i?t:o(t,e);s.length&&this.updateHoverStyle(s,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const o=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(o||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:o}=this,s=e,r=this._getActiveElements(t,n,i,s),a=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}(t,this._lastEvent,i,a);i&&(this._lastEvent=null,v(o.onHover,[t,r,this],this),a&&v(o.onClick,[t,r,this],this));const h=!w(r,n);return(h||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}}const Ao=()=>_(Po.instances,(t=>t._plugins.invalidate())),To=!0;function No(t,e,i){const{startAngle:n,pixelMargin:o,x:s,y:r,outerRadius:a,innerRadius:l}=e;let h=o/a;t.beginPath(),t.arc(s,r,a,n-h,i+h),l>o?(h=o/l,t.arc(s,r,l,i+h,n-h,!0)):t.arc(s,r,o,i+B,n-B),t.closePath(),t.clip()}function Ro(t,e,i,n){const o=Ee(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const s=(i-e)/2,r=Math.min(s,n*e/2),a=t=>{const e=(i-Math.min(s,t))*n/2;return nt(t,0,Math.min(s,e))};return{outerStart:a(o.outerStart),outerEnd:a(o.outerEnd),innerStart:nt(o.innerStart,0,r),innerEnd:nt(o.innerEnd,0,r)}}function Vo(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function Io(t,e,i,n,o,s){const{x:r,y:a,startAngle:l,pixelMargin:h,innerRadius:c}=e,d=Math.max(e.outerRadius+n+i-h,0),u=c>0?c+n+i+h:0;let f=0;const p=o-l;if(n){const t=((c>0?c-n:0)+(d>0?d-n:0))/2;f=(p-(0!==t?p*t/(t+n):p))/2}const g=(p-Math.max(.001,p*d-i/R)/d)/2,m=l+g+f,b=o-g-f,{outerStart:x,outerEnd:y,innerStart:v,innerEnd:_}=Ro(e,u,d,b-m),w=d-x,k=d-y,M=m+x/w,S=b-y/k,E=u+v,C=u+_,O=m+v/E,L=b-_/C;if(t.beginPath(),s){if(t.arc(r,a,d,M,S),y>0){const e=Vo(k,S,r,a);t.arc(e.x,e.y,y,S,b+B)}const e=Vo(C,b,r,a);if(t.lineTo(e.x,e.y),_>0){const e=Vo(C,L,r,a);t.arc(e.x,e.y,_,b+B,L+Math.PI)}if(t.arc(r,a,u,b-_/u,m+v/u,!0),v>0){const e=Vo(E,O,r,a);t.arc(e.x,e.y,v,O+Math.PI,m-B)}const i=Vo(w,m,r,a);if(t.lineTo(i.x,i.y),x>0){const e=Vo(w,M,r,a);t.arc(e.x,e.y,x,m-B,M)}}else{t.moveTo(r,a);const e=Math.cos(M)*d+r,i=Math.sin(M)*d+a;t.lineTo(e,i);const n=Math.cos(S)*d+r,o=Math.sin(S)*d+a;t.lineTo(n,o)}t.closePath()}function Fo(t,e,i,n,o,s){const{options:r}=e,{borderWidth:a,borderJoinStyle:l}=r,h="inner"===r.borderAlign;a&&(h?(t.lineWidth=2*a,t.lineJoin=l||"round"):(t.lineWidth=a,t.lineJoin=l||"bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:o,startAngle:s,pixelMargin:r,fullCircles:a}=e,l=Math.max(e.outerRadius-r,0),h=e.innerRadius+r;let c;for(i&&No(t,e,s+V),t.beginPath(),t.arc(n,o,h,s+V,s,!0),c=0;c<a;++c)t.stroke();for(t.beginPath(),t.arc(n,o,l,s,s+V),c=0;c<a;++c)t.stroke()}(t,e,h),h&&No(t,e,o),Io(t,e,i,n,o,s),t.stroke())}Object.defineProperties(Po,{defaults:{enumerable:To,value:le},instances:{enumerable:To,value:Oo},overrides:{enumerable:To,value:oe},registry:{enumerable:To,value:vn},version:{enumerable:To,value:"3.9.1"},getChart:{enumerable:To,value:Lo},register:{enumerable:To,value:(...t)=>{vn.add(...t),Ao()}},unregister:{enumerable:To,value:(...t)=>{vn.remove(...t),Ao()}}});class zo extends an{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:o,distance:s}=J(n,{x:t,y:e}),{startAngle:r,endAngle:a,innerRadius:l,outerRadius:h,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=this.options.spacing/2,u=x(c,a-r)>=V||it(o,r,a),f=ot(s,l+d,h+d);return u&&f}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:o,innerRadius:s,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,h=(n+o)/2,c=(s+r+l+a)/2;return{x:e+Math.cos(h)*c,y:i+Math.sin(h)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,o=(e.spacing||0)/2,s=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>V?Math.floor(i/V):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let r=0;if(n){r=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*r,Math.sin(e)*r),this.circumference>=R&&(r=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const a=function(t,e,i,n,o){const{fullCircles:s,startAngle:r,circumference:a}=e;let l=e.endAngle;if(s){Io(t,e,i,n,r+V,o);for(let e=0;e<s;++e)t.fill();isNaN(a)||(l=r+a%V,a%V==0&&(l+=V))}return Io(t,e,i,n,l,o),t.fill(),l}(t,this,r,o,s);Fo(t,this,r,o,a,s),t.restore()}}function Bo(t,e,i=e){t.lineCap=x(i.borderCapStyle,e.borderCapStyle),t.setLineDash(x(i.borderDash,e.borderDash)),t.lineDashOffset=x(i.borderDashOffset,e.borderDashOffset),t.lineJoin=x(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=x(i.borderWidth,e.borderWidth),t.strokeStyle=x(i.borderColor,e.borderColor)}function jo(t,e,i){t.lineTo(i.x,i.y)}function Wo(t,e,i={}){const n=t.length,{start:o=0,end:s=n-1}=i,{start:r,end:a}=e,l=Math.max(o,r),h=Math.min(s,a),c=o<r&&s<r||o>a&&s>a;return{count:n,start:l,loop:e.loop,ilen:h<l&&!c?n+h-l:h-l}}function Ho(t,e,i,n){const{points:o,options:s}=e,{count:r,start:a,loop:l,ilen:h}=Wo(o,i,n),c=function(t){return t.stepped?xe:t.tension||"monotone"===t.cubicInterpolationMode?ye:jo}(s);let d,u,f,{move:p=!0,reverse:g}=n||{};for(d=0;d<=h;++d)u=o[(a+(g?h-d:d))%r],u.skip||(p?(t.moveTo(u.x,u.y),p=!1):c(t,f,u,g,s.stepped),f=u);return l&&(u=o[(a+(g?h:0))%r],c(t,f,u,g,s.stepped)),!!l}function $o(t,e,i,n){const o=e.points,{count:s,start:r,ilen:a}=Wo(o,i,n),{move:l=!0,reverse:h}=n||{};let c,d,u,f,p,g,m=0,b=0;const x=t=>(r+(h?a-t:t))%s,y=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(l&&(d=o[x(0)],t.moveTo(d.x,d.y)),c=0;c<=a;++c){if(d=o[x(c)],d.skip)continue;const e=d.x,i=d.y,n=0|e;n===u?(i<f?f=i:i>p&&(p=i),m=(b*m+e)/++b):(y(),t.lineTo(e,i),u=n,b=0,f=p=i),g=i}y()}function Uo(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?$o:Ho}zo.id="arc",zo.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},zo.defaultRoutes={backgroundColor:"backgroundColor"};const Yo="function"==typeof Path2D;function Xo(t,e,i,n){Yo&&!e.options.segment?function(t,e,i,n){let o=e._path;o||(o=e._path=new Path2D,e.path(o,i,n)&&o.closePath()),Bo(t,e.options),t.stroke(o)}(t,e,i,n):function(t,e,i,n){const{segments:o,options:s}=e,r=Uo(e);for(const a of o)Bo(t,s,a.style),t.beginPath(),r(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class Go extends an{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Qe(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,o=i.length;if(!o)return[];const s=!!t._loop,{start:r,end:a}=function(t,e,i,n){let o=0,s=e-1;if(i&&!n)for(;o<e&&!t[o].skip;)o++;for(;o<e&&t[o].skip;)o++;for(o%=e,i&&(s+=o);s>o&&t[s%e].skip;)s--;return s%=e,{start:o,end:s}}(i,o,s,n);return Mi(t,!0===n?[{start:r,end:a,loop:s}]:function(t,e,i,n){const o=t.length,s=[];let r,a=e,l=t[e];for(r=e+1;r<=i;++r){const i=t[r%o];i.skip||i.stop?l.skip||(n=!1,s.push({start:e%o,end:(r-1)%o,loop:n}),e=a=i.stop?r:null):(a=r,l.skip&&(e=r)),l=i}return null!==a&&s.push({start:e%o,end:a%o,loop:n}),s}(i,r,a<r?a+o:a,!!t._fullLoop&&0===r&&a===o-1),i,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,n=t[e],o=this.points,s=ki(this,{property:e,start:n,end:n});if(!s.length)return;const r=[],a=function(t){return t.stepped?fi:t.tension||"monotone"===t.cubicInterpolationMode?pi:ui}(i);let l,h;for(l=0,h=s.length;l<h;++l){const{start:h,end:c}=s[l],d=o[h],u=o[c];if(d===u){r.push(d);continue}const f=a(d,u,Math.abs((n-d[e])/(u[e]-d[e])),i.stepped);f[e]=t[e],r.push(f)}return 1===r.length?r[0]:r}pathSegment(t,e,i){return Uo(this)(t,this,e,i)}path(t,e,i){const n=this.segments,o=Uo(this);let s=this._loop;e=e||0,i=i||this.points.length-e;for(const r of n)s&=o(t,this,r,{start:e,end:e+i-1});return!!s}draw(t,e,i,n){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),Xo(t,this,i,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function qo(t,e,i,n){const o=t.options,{[i]:s}=t.getProps([i],n);return Math.abs(e-s)<o.radius+o.hitRadius}Go.id="line",Go.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},Go.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},Go.descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};class Ko extends an{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){const n=this.options,{x:o,y:s}=this.getProps(["x","y"],i);return Math.pow(t-o,2)+Math.pow(e-s,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return qo(this,t,"x",e)}inYRange(t,e){return qo(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this.options;this.skip||i.radius<.1||!ge(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,fe(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Zo(t,e){const{x:i,y:n,base:o,width:s,height:r}=t.getProps(["x","y","base","width","height"],e);let a,l,h,c,d;return t.horizontal?(d=r/2,a=Math.min(i,o),l=Math.max(i,o),h=n-d,c=n+d):(d=s/2,a=i-d,l=i+d,h=Math.min(n,o),c=Math.max(n,o)),{left:a,top:h,right:l,bottom:c}}function Jo(t,e,i,n){return t?0:nt(e,i,n)}function Qo(t){const e=Zo(t),i=e.right-e.left,n=e.bottom-e.top,o=function(t,e,i){const n=t.options.borderWidth,o=t.borderSkipped,s=Ce(n);return{t:Jo(o.top,s.top,0,i),r:Jo(o.right,s.right,0,e),b:Jo(o.bottom,s.bottom,0,i),l:Jo(o.left,s.left,0,e)}}(t,i/2,n/2),s=function(t,e,i){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),o=t.options.borderRadius,s=Oe(o),r=Math.min(e,i),a=t.borderSkipped,l=n||g(o);return{topLeft:Jo(!l||a.top||a.left,s.topLeft,0,r),topRight:Jo(!l||a.top||a.right,s.topRight,0,r),bottomLeft:Jo(!l||a.bottom||a.left,s.bottomLeft,0,r),bottomRight:Jo(!l||a.bottom||a.right,s.bottomRight,0,r)}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n,radius:s},inner:{x:e.left+o.l,y:e.top+o.t,w:i-o.l-o.r,h:n-o.t-o.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,s.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(o.b,o.r))}}}}function ts(t,e,i,n){const o=null===e,s=null===i,r=t&&!(o&&s)&&Zo(t,n);return r&&(o||ot(e,r.left,r.right))&&(s||ot(i,r.top,r.bottom))}function es(t,e){t.rect(e.x,e.y,e.w,e.h)}function is(t,e,i={}){const n=t.x!==i.x?-e:0,o=t.y!==i.y?-e:0,s=(t.x+t.w!==i.x+i.w?e:0)-n,r=(t.y+t.h!==i.y+i.h?e:0)-o;return{x:t.x+n,y:t.y+o,w:t.w+s,h:t.h+r,radius:t.radius}}Ko.id="point",Ko.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},Ko.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class ns extends an{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:o,outer:s}=Qo(this),r=(a=s.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?we:es;var a;t.save(),s.w===o.w&&s.h===o.h||(t.beginPath(),r(t,is(s,e,o)),t.clip(),r(t,is(o,-e,s)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),r(t,is(o,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return ts(this,t,e,i)}inXRange(t,e){return ts(this,t,null,e)}inYRange(t,e){return ts(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}ns.id="bar",ns.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},ns.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};const os=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class ss extends an{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=v(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=De(i.font),o=n.size,s=this._computeTitleHeight(),{boxWidth:r,itemHeight:a}=os(i,o);let l,h;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,h=this._fitRows(s,o,r,a)+10):(h=this.maxHeight,l=this._fitCols(s,o,r,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:o,maxWidth:s,options:{labels:{padding:r}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],h=n+r;let c=t;o.textAlign="left",o.textBaseline="middle";let d=-1,u=-h;return this.legendItems.forEach(((t,f)=>{const p=i+e/2+o.measureText(t.text).width;(0===f||l[l.length-1]+p+2*r>s)&&(c+=h,l[l.length-(f>0?0:1)]=0,u+=h,d++),a[f]={left:0,top:u,row:d,width:p,height:n},l[l.length-1]+=p+r})),c}_fitCols(t,e,i,n){const{ctx:o,maxHeight:s,options:{labels:{padding:r}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],h=s-t;let c=r,d=0,u=0,f=0,p=0;return this.legendItems.forEach(((t,s)=>{const g=i+e/2+o.measureText(t.text).width;s>0&&u+n+2*r>h&&(c+=d+r,l.push({width:d,height:u}),f+=d+r,p++,d=u=0),a[s]={left:f,top:u,col:p,width:g,height:n},d=Math.max(d,g),u+=n+r})),c+=d,l.push({width:d,height:u}),c}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:o}}=this,s=bi(o,this.left,this.width);if(this.isHorizontal()){let o=0,r=pt(i,this.left+n,this.right-this.lineWidths[o]);for(const a of e)o!==a.row&&(o=a.row,r=pt(i,this.left+n,this.right-this.lineWidths[o])),a.top+=this.top+t+n,a.left=s.leftForLtr(s.x(r),a.width),r+=a.width+n}else{let o=0,r=pt(i,this.top+t+n,this.bottom-this.columnSizes[o].height);for(const a of e)a.col!==o&&(o=a.col,r=pt(i,this.top+t+n,this.bottom-this.columnSizes[o].height)),a.top=r,a.left+=this.left+n,a.left=s.leftForLtr(s.x(a.left),a.width),r+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;me(t,this),this._draw(),be(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:o,labels:s}=t,r=le.color,a=bi(t.rtl,this.left,this.width),l=De(s.font),{color:h,padding:c}=s,d=l.size,u=d/2;let f;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=os(s,d),b=this.isHorizontal(),y=this._computeTitleHeight();f=b?{x:pt(o,this.left+c,this.right-i[0]),y:this.top+c+y,line:0}:{x:this.left+c,y:pt(o,this.top+y+c,this.bottom-e[0].height),line:0},xi(this.ctx,t.textDirection);const v=m+c;this.legendItems.forEach(((_,w)=>{n.strokeStyle=_.fontColor||h,n.fillStyle=_.fontColor||h;const k=n.measureText(_.text).width,M=a.textAlign(_.textAlign||(_.textAlign=s.textAlign)),S=p+u+k;let E=f.x,C=f.y;a.setWidth(this.width),b?w>0&&E+S+c>this.right&&(C=f.y+=v,f.line++,E=f.x=pt(o,this.left+c,this.right-i[f.line])):w>0&&C+v>this.bottom&&(E=f.x=E+e[f.line].width+c,f.line++,C=f.y=pt(o,this.top+y+c,this.bottom-e[f.line].height));!function(t,e,i){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();const o=x(i.lineWidth,1);if(n.fillStyle=x(i.fillStyle,r),n.lineCap=x(i.lineCap,"butt"),n.lineDashOffset=x(i.lineDashOffset,0),n.lineJoin=x(i.lineJoin,"miter"),n.lineWidth=o,n.strokeStyle=x(i.strokeStyle,r),n.setLineDash(x(i.lineDash,[])),s.usePointStyle){const r={radius:g*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:o},l=a.xPlus(t,p/2);pe(n,r,l,e+u,s.pointStyleWidth&&p)}else{const s=e+Math.max((d-g)/2,0),r=a.leftForLtr(t,p),l=Oe(i.borderRadius);n.beginPath(),Object.values(l).some((t=>0!==t))?we(n,{x:r,y:s,w:p,h:g,radius:l}):n.rect(r,s,p,g),n.fill(),0!==o&&n.stroke()}n.restore()}(a.x(E),C,_),E=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(M,E+p+u,b?E+S:this.right,t.rtl),function(t,e,i){ve(n,i.text,t,e+m/2,l,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(E),C,_),b?f.x+=S+c:f.y+=v})),yi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=De(e.font),n=Le(e.padding);if(!e.display)return;const o=bi(t.rtl,this.left,this.width),s=this.ctx,r=e.position,a=i.size/2,l=n.top+a;let h,c=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+l,c=pt(t.align,c,this.right-d);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);h=l+pt(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const u=pt(r,c,c+d);s.textAlign=o.textAlign(ft(r)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=i.string,ve(s,e.text,u,h,i)}_computeTitleHeight(){const t=this.options.title,e=De(t.font),i=Le(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,o;if(ot(t,this.left,this.right)&&ot(e,this.top,this.bottom))for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(n=o[i],ot(t,n.left,n.left+n.width)&&ot(e,n.top,n.top+n.height))return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if(("mousemove"===t||"mouseout"===t)&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const s=this._hoveredItem,r=(o=i,null!==(n=s)&&null!==o&&n.datasetIndex===o.datasetIndex&&n.index===o.index);s&&!r&&v(e.onLeave,[t,s,this],this),this._hoveredItem=i,i&&!r&&v(e.onHover,[t,i,this],this)}else i&&v(e.onClick,[t,i,this],this);var n,o}}var rs={id:"legend",_element:ss,start(t,e,i){const n=t.legend=new ss({ctx:t.ctx,options:i,chart:t});$n.configure(t,n,i),$n.addBox(t,n)},stop(t){$n.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;$n.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,o=i.chart;o.isDatasetVisible(n)?(o.hide(n),e.hidden=!0):(o.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:o,color:s}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const r=t.controller.getStyle(i?0:void 0),a=Le(r.borderWidth);return{text:e[t.index].label,fillStyle:r.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:r.borderCapStyle,lineDash:r.borderDash,lineDashOffset:r.borderDashOffset,lineJoin:r.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:r.borderColor,pointStyle:n||r.pointStyle,rotation:r.rotation,textAlign:o||r.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};new WeakMap;const as={average(t){if(!t.length)return!1;let e,i,n=0,o=0,s=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();n+=t.x,o+=t.y,++s}}return{x:n/s,y:o/s}},nearest(t,e){if(!t.length)return!1;let i,n,o,s=e.x,r=e.y,a=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){const n=t[i].element;if(n&&n.hasValue()){const t=Q(e,n.getCenterPoint());t<a&&(a=t,o=n)}}if(o){const t=o.tooltipPosition();s=t.x,r=t.y}return{x:s,y:r}}};function ls(t,e){return e&&(p(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function hs(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function cs(t,e){const{element:i,datasetIndex:n,index:o}=e,s=t.getDatasetMeta(n).controller,{label:r,value:a}=s.getLabelAndValue(o);return{chart:t,label:r,parsed:s.getParsed(o),raw:t.data.datasets[n].data[o],formattedValue:a,dataset:s.getDataset(),dataIndex:o,datasetIndex:n,element:i}}function ds(t,e){const i=t.chart.ctx,{body:n,footer:o,title:s}=t,{boxWidth:r,boxHeight:a}=e,l=De(e.bodyFont),h=De(e.titleFont),c=De(e.footerFont),d=s.length,u=o.length,f=n.length,p=Le(e.padding);let g=p.height,m=0,b=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,d&&(g+=d*h.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),b){g+=f*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing}u&&(g+=e.footerMarginTop+u*c.lineHeight+(u-1)*e.footerSpacing);let x=0;const y=function(t){m=Math.max(m,i.measureText(t).width+x)};return i.save(),i.font=h.string,_(t.title,y),i.font=l.string,_(t.beforeBody.concat(t.afterBody),y),x=e.displayColors?r+2+e.boxPadding:0,_(n,(t=>{_(t.before,y),_(t.lines,y),_(t.after,y)})),x=0,i.font=c.string,_(t.footer,y),i.restore(),m+=p.width,{width:m,height:g}}function us(t,e,i,n){const{x:o,width:s}=i,{width:r,chartArea:{left:a,right:l}}=t;let h="center";return"center"===n?h=o<=(a+l)/2?"left":"right":o<=s/2?h="left":o>=r-s/2&&(h="right"),function(t,e,i,n){const{x:o,width:s}=n,r=i.caretSize+i.caretPadding;return"left"===t&&o+s+r>e.width||"right"===t&&o-s-r<0||void 0}(h,t,e,i)&&(h="center"),h}function fs(t,e,i){const n=i.yAlign||e.yAlign||function(t,e){const{y:i,height:n}=e;return i<n/2?"top":i>t.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||us(t,e,i,n),yAlign:n}}function ps(t,e,i,n){const{caretSize:o,caretPadding:s,cornerRadius:r}=t,{xAlign:a,yAlign:l}=i,h=o+s,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:f}=Oe(r);let p=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const g=function(t,e,i){let{y:n,height:o}=t;return"top"===e?n+=i:n-="bottom"===e?o+i:o/2,n}(e,l,h);return"center"===l?"left"===a?p+=h:"right"===a&&(p-=h):"left"===a?p-=Math.max(c,u)+o:"right"===a&&(p+=Math.max(d,f)+o),{x:nt(p,0,n.width-e.width),y:nt(g,0,n.height-e.height)}}function gs(t,e,i){const n=Le(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function ms(t){return ls([],hs(t))}function bs(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class xs extends an{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||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,o=new Ai(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,i=this._tooltipItems,Ae(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),o=i.title.apply(this,[t]),s=i.afterTitle.apply(this,[t]);let r=[];return r=ls(r,hs(n)),r=ls(r,hs(o)),r=ls(r,hs(s)),r}getBeforeBody(t,e){return ms(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return _(t,(t=>{const e={before:[],lines:[],after:[]},o=bs(i,t);ls(e.before,hs(o.beforeLabel.call(this,t))),ls(e.lines,o.label.call(this,t)),ls(e.after,hs(o.afterLabel.call(this,t))),n.push(e)})),n}getAfterBody(t,e){return ms(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),o=i.footer.apply(this,[t]),s=i.afterFooter.apply(this,[t]);let r=[];return r=ls(r,hs(n)),r=ls(r,hs(o)),r=ls(r,hs(s)),r}_createItems(t){const e=this._active,i=this.chart.data,n=[],o=[],s=[];let r,a,l=[];for(r=0,a=e.length;r<a;++r)l.push(cs(this.chart,e[r]));return t.filter&&(l=l.filter(((e,n,o)=>t.filter(e,n,o,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),_(l,(e=>{const i=bs(t.callbacks,e);n.push(i.labelColor.call(this,e)),o.push(i.labelPointStyle.call(this,e)),s.push(i.labelTextColor.call(this,e))})),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let o,s=[];if(n.length){const t=as[i.position].call(this,n,this._eventPosition);s=this._createItems(i),this.title=this.getTitle(s,i),this.beforeBody=this.getBeforeBody(s,i),this.body=this.getBody(s,i),this.afterBody=this.getAfterBody(s,i),this.footer=this.getFooter(s,i);const e=this._size=ds(this,i),r=Object.assign({},t,e),a=fs(this.chart,i,r),l=ps(i,r,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,o={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(o={opacity:0});this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const o=this.getCaretPosition(t,i,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:o}=this,{caretSize:s,cornerRadius:r}=i,{topLeft:a,topRight:l,bottomLeft:h,bottomRight:c}=Oe(r),{x:d,y:u}=t,{width:f,height:p}=e;let g,m,b,x,y,v;return"center"===o?(y=u+p/2,"left"===n?(g=d,m=g-s,x=y+s,v=y-s):(g=d+f,m=g+s,x=y-s,v=y+s),b=g):(m="left"===n?d+Math.max(a,h)+s:"right"===n?d+f-Math.max(l,c)-s:this.caretX,"top"===o?(x=u,y=x-s,g=m-s,b=m+s):(x=u+p,y=x+s,g=m+s,b=m-s),v=x),{x1:g,x2:m,x3:b,y1:x,y2:y,y3:v}}drawTitle(t,e,i){const n=this.title,o=n.length;let s,r,a;if(o){const l=bi(i.rtl,this.x,this.width);for(t.x=gs(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",s=De(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=s.string,a=0;a<o;++a)e.fillText(n[a],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+r,a+1===o&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,n,o){const s=this.labelColors[i],r=this.labelPointStyles[i],{boxHeight:a,boxWidth:l,boxPadding:h}=o,c=De(o.bodyFont),d=gs(this,"left",o),u=n.x(d),f=a<c.lineHeight?(c.lineHeight-a)/2:0,p=e.y+f;if(o.usePointStyle){const e={radius:Math.min(l,a)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},i=n.leftForLtr(u,l)+l/2,h=p+a/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,fe(t,e,i,h),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,fe(t,e,i,h)}else{t.lineWidth=g(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const e=n.leftForLtr(u,l-h),i=n.leftForLtr(n.xPlus(u,1),l-h-2),r=Oe(s.borderRadius);Object.values(r).some((t=>0!==t))?(t.beginPath(),t.fillStyle=o.multiKeyBackground,we(t,{x:e,y:p,w:l,h:a,radius:r}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),we(t,{x:i,y:p+1,w:l-2,h:a-2,radius:r}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(e,p,l,a),t.strokeRect(e,p,l,a),t.fillStyle=s.backgroundColor,t.fillRect(i,p+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:o,bodyAlign:s,displayColors:r,boxHeight:a,boxWidth:l,boxPadding:h}=i,c=De(i.bodyFont);let d=c.lineHeight,u=0;const f=bi(i.rtl,this.x,this.width),p=function(i){e.fillText(i,f.x(t.x+u),t.y+d/2),t.y+=d+o},g=f.textAlign(s);let m,b,x,y,v,w,k;for(e.textAlign=s,e.textBaseline="middle",e.font=c.string,t.x=gs(this,g,i),e.fillStyle=i.bodyColor,_(this.beforeBody,p),u=r&&"right"!==g?"center"===s?l/2+h:l+2+h:0,y=0,w=n.length;y<w;++y){for(m=n[y],b=this.labelTextColors[y],e.fillStyle=b,_(m.before,p),x=m.lines,r&&x.length&&(this._drawColorBox(e,t,y,f,i),d=Math.max(c.lineHeight,a)),v=0,k=x.length;v<k;++v)p(x[v]),d=c.lineHeight;_(m.after,p)}u=0,d=c.lineHeight,_(this.afterBody,p),t.y-=o}drawFooter(t,e,i){const n=this.footer,o=n.length;let s,r;if(o){const a=bi(i.rtl,this.x,this.width);for(t.x=gs(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=a.textAlign(i.footerAlign),e.textBaseline="middle",s=De(i.footerFont),e.fillStyle=i.footerColor,e.font=s.string,r=0;r<o;++r)e.fillText(n[r],a.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:o,yAlign:s}=this,{x:r,y:a}=t,{width:l,height:h}=i,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:f}=Oe(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(r+c,a),"top"===s&&this.drawCaret(t,e,i,n),e.lineTo(r+l-d,a),e.quadraticCurveTo(r+l,a,r+l,a+d),"center"===s&&"right"===o&&this.drawCaret(t,e,i,n),e.lineTo(r+l,a+h-f),e.quadraticCurveTo(r+l,a+h,r+l-f,a+h),"bottom"===s&&this.drawCaret(t,e,i,n),e.lineTo(r+u,a+h),e.quadraticCurveTo(r,a+h,r,a+h-u),"center"===s&&"left"===o&&this.drawCaret(t,e,i,n),e.lineTo(r,a+c),e.quadraticCurveTo(r,a,r+c,a),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,o=i&&i.y;if(n||o){const i=as[t.position].call(this,this._active,this._eventPosition);if(!i)return;const s=this._size=ds(this,t),r=Object.assign({},i,this._size),a=fs(e,t,r),l=ps(t,r,a,e);n._to===l.x&&o._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=s.width,this.height=s.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=Le(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,n,e),xi(t,e.textDirection),o.y+=s.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),yi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),o=!w(i,n),s=this._positionChanged(n,e);(o||s)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,o=this._active||[],s=this._getActiveElements(t,o,e,i),r=this._positionChanged(s,t),a=e||!w(s,o)||r;return a&&(this._active=s,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),a}_getActiveElements(t,e,i,n){const o=this.options;if("mouseout"===t.type)return[];if(!n)return e;const s=this.chart.getElementsAtEventForMode(t,o.mode,o,i);return o.reverse&&s.reverse(),s}_positionChanged(t,e){const{caretX:i,caretY:n,options:o}=this,s=as[o.position].call(this,t,e);return!1!==s&&(i!==s.x||n!==s.y)}}xs.positioners=as;var ys={id:"tooltip",_element:xs,positioners:as,afterInit(t,e,i){i&&(t.tooltip=new xs({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){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",i))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const 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)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:d,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return i[e.dataIndex]}return""},afterTitle:d,beforeBody:d,beforeLabel:d,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return f(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:d,afterBody:d,beforeFooter:d,footer:d,afterFooter:d}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function vs(t,e,i,n){const o=t.indexOf(e);if(-1===o)return((t,e,i,n)=>("string"==typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,n);return o!==t.lastIndexOf(e)?i:o}class _s extends xn{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:n}of e)t[i]===n&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(f(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:nt(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:vs(i,t,x(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let o=this.getLabels();o=0===t&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function ws(t,e){const i=[],{bounds:n,step:o,min:s,max:r,precision:a,count:l,maxTicks:h,maxDigits:c,includeBounds:d}=t,u=o||1,p=h-1,{min:g,max:m}=e,b=!f(s),x=!f(r),y=!f(l),v=(m-g)/(c+1);let _,w,k,M,S=U((m-g)/p/u)*u;if(S<1e-14&&!b&&!x)return[{value:g},{value:m}];M=Math.ceil(m/S)-Math.floor(g/S),M>p&&(S=U(M*S/p/u)*u),f(a)||(_=Math.pow(10,a),S=Math.ceil(S*_)/_),"ticks"===n?(w=Math.floor(g/S)*S,k=Math.ceil(m/S)*S):(w=g,k=m),b&&x&&o&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((r-s)/o,S/1e3)?(M=Math.round(Math.min((r-s)/S,h)),S=(r-s)/M,w=s,k=r):y?(w=b?s:w,k=x?r:k,M=l-1,S=(k-w)/M):(M=(k-w)/S,M=X(M,Math.round(M),S/1e3)?Math.round(M):Math.ceil(M));const E=Math.max(Z(S),Z(w));_=Math.pow(10,f(a)?E:a),w=Math.round(w*_)/_,k=Math.round(k*_)/_;let C=0;for(b&&(d&&w!==s?(i.push({value:s}),w<s&&C++,X(Math.round((w+C*S)*_)/_,s,ks(s,v,t))&&C++):w<s&&C++);C<M;++C)i.push({value:Math.round((w+C*S)*_)/_});return x&&d&&k!==r?i.length&&X(i[i.length-1].value,r,ks(r,v,t))?i[i.length-1].value=r:i.push({value:r}):x&&k!==r||i.push({value:k}),i}function ks(t,e,{horizontal:i,minRotation:n}){const o=q(n),s=(i?Math.sin(o):Math.cos(o))||.001,r=.75*e*(""+t).length;return Math.min(e/s,r)}_s.id="category",_s.defaults={ticks:{callback:_s.prototype.getLabelForValue}};class Ms extends xn{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 f(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:o}=this;const s=t=>n=e?n:t,r=t=>o=i?o:t;if(t){const t=$(n),e=$(o);t<0&&e<0?r(0):t>0&&e>0&&s(0)}if(n===o){let e=1;(o>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*o)),r(o+e),t||s(n-e)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=ws({maxTicks: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);return"ticks"===t.bounds&&G(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return mi(t,this.chart.options.locale,this.options.ticks.format)}}class Ss extends Ms{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=m(t)?t:0,this.max=m(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=q(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Es(t){return 1===t/Math.pow(10,Math.floor(H(t)))}Ss.id="linear",Ss.defaults={ticks:{callback:hn.formatters.numeric}};class Cs extends xn{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Ms.prototype.parse.apply(this,[t,e]);if(0!==i)return m(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=m(t)?Math.max(0,t):null,this.max=m(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const o=e=>i=t?i:e,s=t=>n=e?n:t,r=(t,e)=>Math.pow(10,Math.floor(H(t))+e);i===n&&(i<=0?(o(1),s(10)):(o(r(i,-1)),s(r(n,1)))),i<=0&&o(r(n,-1)),n<=0&&s(r(i,1)),this._zero&&this.min!==this._suggestedMin&&i===r(this.min,0)&&o(r(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(H(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),o=[];let s=b(t.min,Math.pow(10,Math.floor(H(e.min)))),r=Math.floor(H(s)),a=Math.floor(s/Math.pow(10,r)),l=r<0?Math.pow(10,Math.abs(r)):1;do{o.push({value:s,major:Es(s)}),++a,10===a&&(a=1,++r,l=r>=0?1:l),s=Math.round(a*Math.pow(10,r)*l)/l}while(r<i||r===i&&a<n);const h=b(t.max,s);return o.push({value:h,major:Es(s)}),o}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&G(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":mi(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=H(t),this._valueRange=H(this.max)-H(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(H(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function Os(t){const e=t.ticks;if(e.display&&t.display){const t=Le(e.backdropPadding);return x(e.font&&e.font.size,le.font.size)+t.height}return 0}function Ls(t,e,i,n,o){return t===n||t===o?{start:e-i/2,end:e+i/2}:t<n||t>o?{start:e-i,end:e}:{start:e,end:e+i}}function Ds(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),n=[],o=[],s=t._pointLabels.length,r=t.options.pointLabels,a=r.centerPointLabels?R/s:0;for(let d=0;d<s;d++){const s=r.setContext(t.getPointLabelContext(d));o[d]=s.padding;const u=t.getPointPosition(d,t.drawingArea+o[d],a),f=De(s.font),g=(l=t.ctx,h=f,c=p(c=t._pointLabels[d])?c:[c],{w:ce(l,h.string,c),h:c.length*h.lineHeight});n[d]=g;const m=et(t.getIndexAngle(d)+a),b=Math.round(K(m));Ps(i,e,m,Ls(b,u.x,g.w,0,180),Ls(b,u.y,g.h,90,270))}var l,h,c;t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){const n=[],o=t._pointLabels.length,s=t.options,r=Os(s)/2,a=t.drawingArea,l=s.pointLabels.centerPointLabels?R/o:0;for(let s=0;s<o;s++){const o=t.getPointPosition(s,a+r+i[s],l),h=Math.round(K(et(o.angle+B))),c=e[s],d=Ns(o.y,c.h,h),u=As(h),f=Ts(o.x,c.w,u);n.push({x:o.x,y:d,textAlign:u,left:f,top:d,right:f+c.w,bottom:d+c.h})}return n}(t,n,o)}function Ps(t,e,i,n,o){const s=Math.abs(Math.sin(i)),r=Math.abs(Math.cos(i));let a=0,l=0;n.start<e.l?(a=(e.l-n.start)/s,t.l=Math.min(t.l,e.l-a)):n.end>e.r&&(a=(n.end-e.r)/s,t.r=Math.max(t.r,e.r+a)),o.start<e.t?(l=(e.t-o.start)/r,t.t=Math.min(t.t,e.t-l)):o.end>e.b&&(l=(o.end-e.b)/r,t.b=Math.max(t.b,e.b+l))}function As(t){return 0===t||180===t?"center":t<180?"left":"right"}function Ts(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Ns(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function Rs(t,e,i,n){const{ctx:o}=t;if(i)o.arc(t.xCenter,t.yCenter,e,0,V);else{let i=t.getPointPosition(0,e);o.moveTo(i.x,i.y);for(let s=1;s<n;s++)i=t.getPointPosition(s,e),o.lineTo(i.x,i.y)}}Cs.id="logarithmic",Cs.defaults={ticks:{callback:hn.formatters.logarithmic,major:{enabled:!0}}};class Vs extends Ms{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Le(Os(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=m(t)&&!isNaN(t)?t:0,this.max=m(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Os(this.options))}generateTickLabels(t){Ms.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const i=v(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?Ds(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,n))}getIndexAngle(t){return et(t*(V/(this._pointLabels.length||1))+q(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(f(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(f(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return function(t,e,i){return Ae(t,{label:i,index:e,type:"pointLabel"})}(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const n=this.getIndexAngle(t)-B+i;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter,angle:n}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:n,bottom:o}=this._pointLabelItems[t];return{left:e,top:i,right:n,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),Rs(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:n}=e,o=this._pointLabels.length;let s,r,a;if(e.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:n}}=t;for(let o=e-1;o>=0;o--){const e=n.setContext(t.getPointLabelContext(o)),s=De(e.font),{x:r,y:a,textAlign:l,left:h,top:c,right:d,bottom:u}=t._pointLabelItems[o],{backdropColor:p}=e;if(!f(p)){const t=Oe(e.borderRadius),n=Le(e.backdropPadding);i.fillStyle=p;const o=h-n.left,s=c-n.top,r=d-h+n.width,a=u-c+n.height;Object.values(t).some((t=>0!==t))?(i.beginPath(),we(i,{x:o,y:s,w:r,h:a,radius:t}),i.fill()):i.fillRect(o,s,r,a)}ve(i,t._pointLabels[o],r,a+s.lineHeight/2,s,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,o),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e){r=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,n){const o=t.ctx,s=e.circular,{color:r,lineWidth:a}=e;!s&&!n||!r||!a||i<0||(o.save(),o.strokeStyle=r,o.lineWidth=a,o.setLineDash(e.borderDash),o.lineDashOffset=e.borderDashOffset,o.beginPath(),Rs(t,i,s,n),o.closePath(),o.stroke(),o.restore())}(this,n.setContext(this.getContext(e-1)),r,o)}})),i.display){for(t.save(),s=o-1;s>=0;s--){const n=i.setContext(this.getPointLabelContext(s)),{color:o,lineWidth:l}=n;l&&o&&(t.lineWidth=l,t.strokeStyle=o,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,r=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(s,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let o,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,r)=>{if(0===r&&!e.reverse)return;const a=i.setContext(this.getContext(r)),l=De(a.font);if(o=this.getDistanceFromCenterForValue(this.ticks[r].value),a.showLabelBackdrop){t.font=l.string,s=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=Le(a.backdropPadding);t.fillRect(-s/2-e.left,-o-l.size/2-e.top,s+e.width,l.size+e.height)}ve(t,n.label,0,-o,l,{color:a.color})})),t.restore()}drawTitle(){}}Vs.id="radialLinear",Vs.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:hn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}},Vs.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},Vs.descriptors={angleLines:{_fallback:"grid"}};const Is={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}},Fs=Object.keys(Is);function zs(t,e){return t-e}function Bs(t,e){if(f(e))return null;const i=t._adapter,{parser:n,round:o,isoWeekday:s}=t._parseOpts;let r=e;return"function"==typeof n&&(r=n(r)),m(r)||(r="string"==typeof n?i.parse(r,n):i.parse(r)),null===r?null:(o&&(r="week"!==o||!Y(s)&&!0!==s?i.startOf(r,o):i.startOf(r,"isoWeek",s)),+r)}function js(t,e,i,n){const o=Fs.length;for(let s=Fs.indexOf(t);s<o-1;++s){const t=Is[Fs[s]],o=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(o*t.size))<=n)return Fs[s]}return Fs[o-1]}function Ws(t,e,i){if(i){if(i.length){const{lo:n,hi:o}=st(i,e);t[i[n]>=e?i[n]:i[o]]=!0}}else t[e]=!0}function Hs(t,e,i){const n=[],o={},s=e.length;let r,a;for(r=0;r<s;++r)a=e[r],o[a]=r,n.push({value:a,major:!1});return 0!==s&&i?function(t,e,i,n){const o=t._adapter,s=+o.startOf(e[0].value,n),r=e[e.length-1].value;let a,l;for(a=s;a<=r;a=+o.add(a,1,n))l=i[a],l>=0&&(e[l].major=!0);return e}(t,n,o,i):n}class $s extends xn{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){const i=t.time||(t.time={}),n=this._adapter=new Mn._date(t.adapters.date);n.init(e),C(i.displayFormats,n.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:Bs(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:o,minDefined:s,maxDefined:r}=this.getUserBounds();function a(t){s||isNaN(t.min)||(n=Math.min(n,t.min)),r||isNaN(t.max)||(o=Math.max(o,t.max))}s&&r||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=m(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),o=m(o)&&!isNaN(o)?o:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,o-1),this.max=Math.max(n+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const o=this.min,s=function(t,e,i){let n=0,o=t.length;for(;n<o&&t[n]<e;)n++;for(;o>n&&t[o-1]>i;)o--;return n>0||o<t.length?t.slice(n,o):t}(n,o,this.max);return this._unit=e.unit||(i.autoSkip?js(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):function(t,e,i,n,o){for(let s=Fs.length-1;s>=Fs.indexOf(i);s--){const i=Fs[s];if(Is[i].common&&t._adapter.diff(o,n,i)>=e-1)return i}return Fs[i?Fs.indexOf(i):0]}(this,s.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=Fs.indexOf(t)+1,i=Fs.length;e<i;++e)if(Is[Fs[e]].common)return Fs[e]}(this._unit):void 0,this.initOffsets(n),t.reverse&&s.reverse(),Hs(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((t=>+t.value)))}initOffsets(t){let e,i,n=0,o=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),n=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),o=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=nt(n,0,s),o=nt(o,0,s),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const t=this._adapter,e=this.min,i=this.max,n=this.options,o=n.time,s=o.unit||js(o.minUnit,e,i,this._getLabelCapacity(e)),r=x(o.stepSize,1),a="week"===s&&o.isoWeekday,l=Y(a)||!0===a,h={};let c,d,u=e;if(l&&(u=+t.startOf(u,"isoWeek",a)),u=+t.startOf(u,l?"day":s),t.diff(i,e,s)>1e5*r)throw new Error(e+" and "+i+" are too far apart with stepSize of "+r+" "+s);const f="data"===n.ticks.source&&this.getDataTimestamps();for(c=u,d=0;c<i;c=+t.add(c,r,s),d++)Ws(h,c,f);return c!==i&&"ticks"!==n.bounds&&1!==d||Ws(h,c,f),Object.keys(h).sort(((t,e)=>t-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const o=this.options,s=o.time.displayFormats,r=this._unit,a=this._majorUnit,l=r&&s[r],h=a&&s[a],c=i[e],d=a&&h&&c&&c.major,u=this._adapter.format(t,n||(d?h:l)),f=o.ticks.callback;return f?v(f,[u,e,i],this):u}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e<i;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,n=q(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(n),s=Math.sin(n),r=this._resolveTickFontOptions(0).size;return{w:i*o+r*s,h:i*s+r*o}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,n=i[e.unit]||i.millisecond,o=this._tickFormatFunction(t,0,Hs(this,[t],this._majorUnit),n),s=this._getLabelSize(o),r=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return r>0?r:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t<e;++t)i=i.concat(n[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const n=this.getLabels();for(e=0,i=n.length;e<i;++e)t.push(Bs(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return ct(t.sort(zs))}}function Us(t,e,i){let n,o,s,r,a=0,l=t.length-1;i?(e>=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=rt(t,"pos",e)),({pos:n,time:s}=t[a]),({pos:o,time:r}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=rt(t,"time",e)),({time:n,pos:s}=t[a]),({time:o,pos:r}=t[l]));const h=o-n;return h?s+(r-s)*(e-n)/h:s}$s.id="time",$s.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class Ys extends $s{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Us(e,this.min),this._tableRange=Us(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],o=[];let s,r,a,l,h;for(s=0,r=t.length;s<r;++s)l=t[s],l>=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(s=0,r=n.length;s<r;++s)h=n[s+1],a=n[s-1],l=n[s],Math.round((h+a)/2)!==l&&o.push({time:l,pos:s/(r-1)});return o}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Us(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Us(this._table,i*this._tableRange+this._minPos,!0)}}Ys.id="timeseries",Ys.defaults=$s.defaults;var Xs;function Gs(t,e,i,n){t(e,i),void 0!==n&&n.emit(Xs.ChartRendered)}function qs(t,e){t.destroy(),void 0!==e&&e.emit(Xs.ChartDestroyed)}function Ks(t,e,i){const n=[];t.datasets=e.datasets.map((e=>{const o=t.datasets.find((t=>t[i]===e[i]));return o&&e.data&&!n.includes(o)?(n.push(o),Object.assign(o,e),o):{...e}}))}!function(t){t.ChartRendered="chart:rendered",t.ChartUpdated="chart:updated",t.ChartDestroyed="chart:destroyed",t.LabelsUpdated="labels:updated"}(Xs||(Xs={}));const Zs=(t,e,i)=>(0,n.defineComponent)({props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,default:()=>{}},datasetIdKey:{type:String,default:"label"},chartId:{type:String,default:t},width:{type:Number,default:400},height:{type:Number,default:400},cssClasses:{type:String,default:""},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]}},setup(t,o){Po.register(i);const s=(0,n.shallowRef)(null),r=(0,n.ref)(null);function a(i,a){if(null!==s.value&&qs((0,n.toRaw)(s.value),o),null===r.value)throw new Error("Please remove the <template></template> tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components");{const o=function(t,e){const i={labels:void 0===t.labels?[]:[...t.labels],datasets:[]};return Ks(i,{...t},e),i}(i,t.datasetIdKey),l=r.value.getContext("2d");null!==l&&(s.value=new Po(l,{type:e,data:(0,n.isProxy)(i)?new Proxy(o,{}):o,options:a,plugins:t.plugins}))}}function l(e,i){const r=(0,n.isProxy)(e)?(0,n.toRaw)(e):{...e},l=(0,n.isProxy)(i)?(0,n.toRaw)(i):{...i};if(Object.keys(l).length>0){const e=(0,n.toRaw)(s.value),i=function(t,e){const i=t.datasets.map((t=>t.label)),n=e.datasets.map((t=>t.label));return e.datasets.length===t.datasets.length&&i.every(((t,e)=>t===n[e]))}(r,l);i&&null!==e?(Ks(null==e?void 0:e.data,r,t.datasetIdKey),void 0!==r.labels&&function(t,e,i){t.data.labels=e,void 0!==i&&i.emit(Xs.LabelsUpdated)}(e,r.labels,o),h()):(null!==e&&qs(e,o),Gs(a,t.chartData,t.chartOptions,o))}else null!==s.value&&qs((0,n.toRaw)(s.value),o),Gs(a,t.chartData,t.chartOptions,o)}function h(){const t=(0,n.toRaw)(s.value);null!==t?function(t,e){t.update(),void 0!==e&&e.emit(Xs.ChartUpdated)}(t,o):console.error("Update ERROR: chart instance not found")}return(0,n.watch)((()=>t.chartData),((t,e)=>l(t,e)),{deep:!0}),(0,n.watch)((()=>t.chartOptions),(e=>function(e){const i=(0,n.toRaw)(s.value);null!==i?(function(t,e){t.options={...e}}(i,e),h()):Gs(a,t.chartData,t.chartOptions,o)}(e)),{deep:!0}),(0,n.onMounted)((()=>{"datasets"in t.chartData&&t.chartData.datasets.length>0&&Gs(a,t.chartData,t.chartOptions,o)})),(0,n.onBeforeUnmount)((()=>{null!==s.value&&qs((0,n.toRaw)(s.value),o)})),o.expose({chart:s,updateChart:h}),()=>(0,n.h)("div",{style:t.styles,class:t.cssClasses},[(0,n.h)("canvas",{id:t.chartId,width:t.width,height:t.height,ref:r})])}}),Js=Zs("doughnut-chart","doughnut",en),Qs=function(t){new MutationObserver((function(e,i){e.forEach((function(e){"attributes"===e.type&&"class"===e.attributeName&&t(e.target.classList.contains("dark"))}))})).observe(document.documentElement,{attributes:!0}),t(document.documentElement.classList.contains("dark"))};function tr(t){return tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tr(t)}function er(){er=function(){return t};var t={},e=Object.prototype,i=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",s=n.asyncIterator||"@@asyncIterator",r=n.toStringTag||"@@toStringTag";function a(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,i){return t[e]=i}}function l(t,e,i,n){var o=e&&e.prototype instanceof d?e:d,s=Object.create(o.prototype),r=new k(n||[]);return s._invoke=function(t,e,i){var n="suspendedStart";return function(o,s){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw s;return S()}for(i.method=o,i.arg=s;;){var r=i.delegate;if(r){var a=v(r,i);if(a){if(a===c)continue;return a}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n="executing";var l=h(t,e,i);if("normal"===l.type){if(n=i.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n="completed",i.method="throw",i.arg=l.arg)}}}(t,i,r),s}function h(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var c={};function d(){}function u(){}function f(){}var p={};a(p,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(M([])));m&&m!==e&&i.call(m,o)&&(p=m);var b=f.prototype=d.prototype=Object.create(p);function x(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function y(t,e){function n(o,s,r,a){var l=h(t[o],t,s);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==tr(d)&&i.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,r,a)}),(function(t){n("throw",t,r,a)})):e.resolve(d).then((function(t){c.value=t,r(c)}),(function(t){return n("throw",t,r,a)}))}a(l.arg)}var o;this._invoke=function(t,i){function s(){return new e((function(e,o){n(t,i,e,o)}))}return o=o?o.then(s,s):s()}}function v(t,e){var i=t.iterator[e.method];if(void 0===i){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,v(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var n=h(i,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,c;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function M(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,s=function e(){for(;++n<t.length;)if(i.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return s.next=s}}return{next:S}}function S(){return{value:void 0,done:!0}}return u.prototype=f,a(b,"constructor",f),a(f,"constructor",u),u.displayName=a(f,r,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===u||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,a(t,r,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},x(y.prototype),a(y.prototype,s,(function(){return this})),t.AsyncIterator=y,t.async=function(e,i,n,o,s){void 0===s&&(s=Promise);var r=new y(l(e,i,n,o),s);return t.isGeneratorFunction(i)?r:r.next().then((function(t){return t.done?t.value:r.next()}))},x(b),a(b,r,"Generator"),a(b,o,(function(){return this})),a(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var i in t)e.push(i);return e.reverse(),function i(){for(;e.length;){var n=e.pop();if(n in t)return i.value=n,i.done=!1,i}return i.done=!0,i}},t.values=M,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(i,n){return r.type="throw",r.arg=t,e.next=i,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],r=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var a=i.call(s,"catchLoc"),l=i.call(s,"finallyLoc");if(a&&l){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(a){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var s=o;break}}s&&("break"===t||"continue"===t)&&s.tryLoc<=e&&e<=s.finallyLoc&&(s=null);var r=s?s.completion:{};return r.type=t,r.arg=e,s?(this.method="next",this.next=s.finallyLoc,c):this.complete(r)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),w(i),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var o=n.arg;w(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,i){return this.delegate={iterator:M(t),resultName:e,nextLoc:i},"next"===this.method&&(this.arg=void 0),c}},t}function ir(t,e,i,n,o,s,r){try{var a=t[s](r),l=a.value}catch(t){return void i(t)}a.done?e(l):Promise.resolve(l).then(n,o)}Po.register(ys,rs,zo);const nr={components:{Doughnut:Js},data:function(){return{loaded:!1,dataCollection:{},percents:{},isDark:!1}},mounted:function(){var t,e=this;return(t=er().mark((function t(){var i,n;return er().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.loaded=!1,Qs((function(t){return e.isDark=t})),t.prev=2,t.next=5,Nova.request().get("/nova-vendor/php-junior/nova-log-viewer/get_chart_data");case 5:i=t.sent,n=i.data,e.dataCollection=n.chartData,e.percents=n.percents,console.log(n),e.loaded=!0,t.next=16;break;case 13:t.prev=13,t.t0=t.catch(2),console.error(t.t0);case 16:case"end":return t.stop()}}),t,null,[[2,13]])})),function(){var e=this,i=arguments;return new Promise((function(n,o){var s=t.apply(e,i);function r(t){ir(s,n,o,r,a,"next",t)}function a(t){ir(s,n,o,r,a,"throw",t)}r(void 0)}))})()}};var or=i(379),sr=i.n(or),rr=i(430),ar={insert:"head",singleton:!1};sr()(rr.Z,ar);rr.Z.locals;var lr=i(744);const hr=(0,lr.Z)(nr,[["render",function(t,e,i,d,u,f){var p=(0,n.resolveComponent)("heading"),g=(0,n.resolveComponent)("Doughnut");return(0,n.openBlock)(),(0,n.createElementBlock)("div",o,[(0,n.createVNode)(p,{class:"mb-6"},{default:(0,n.withCtx)((function(){return[(0,n.createTextVNode)("Nova Log Viewer")]})),_:1}),(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)(["flex mb-4",{dark:u.isDark}])},[(0,n.createElementVNode)("div",s,[u.loaded?((0,n.openBlock)(),(0,n.createBlock)(g,{key:0,"chart-data":u.dataCollection,options:{responsive:!0,maintainAspectRatio:!0},height:400},null,8,["chart-data"])):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",null,[(0,n.createElementVNode)("div",r,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(u.percents,(function(t,e){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{class:"w-1/3 p-4",key:e},[(0,n.createElementVNode)("div",{class:"max-w-sm rounded overflow-hidden shadow-lg dark:shadow-gray-600",style:(0,n.normalizeStyle)(0!==t.count?"color: #FFF;background-color :"+t.backgroundColor:"")},[(0,n.createElementVNode)("div",a,[(0,n.createElementVNode)("div",l,(0,n.toDisplayString)(t.name),1),(0,n.createElementVNode)("p",h,(0,n.toDisplayString)(t.count)+" entries - "+(0,n.toDisplayString)(t.percent)+"% ",1),(0,n.createElementVNode)("div",c,[(0,n.createElementVNode)("div",{class:"bar",style:(0,n.normalizeStyle)({width:t.percent+"%"})},null,4)])])],4)])})),128))])])],2)])}]]);var cr={class:"nova-logs"},dr={class:"w-full"},ur={class:"bg-gray-50 dark:bg-gray-800"},fr=(0,n.createElementVNode)("th",null,null,-1),pr={class:"inline-flex"},gr={class:"text-80 leading-normal"};var mr={class:"group"};var br=Nova.appConfig.viewer;const xr=function(t){return br[t]},yr={name:"LogsToolRow",props:{date:{required:!0},log:{required:!0},baseUrl:{required:!0}},computed:{downloadUrl:function(){return"/nova-vendor/php-junior/nova-log-viewer/download/"},rowClasses:function(){return"td-fit border-t border-gray-100 dark:border-gray-700 px-2 py-2 pl-5 pr-5 dark:bg-gray-800 group-hover:bg-gray-50 dark:group-hover:bg-gray-900 text-center"}},methods:{getColor:function(t){return xr(t)},level:function(t){return"date"===t?"all":t}}};function vr(t){return vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vr(t)}function _r(){_r=function(){return t};var t={},e=Object.prototype,i=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",s=n.asyncIterator||"@@asyncIterator",r=n.toStringTag||"@@toStringTag";function a(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,i){return t[e]=i}}function l(t,e,i,n){var o=e&&e.prototype instanceof d?e:d,s=Object.create(o.prototype),r=new k(n||[]);return s._invoke=function(t,e,i){var n="suspendedStart";return function(o,s){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw s;return S()}for(i.method=o,i.arg=s;;){var r=i.delegate;if(r){var a=v(r,i);if(a){if(a===c)continue;return a}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n="executing";var l=h(t,e,i);if("normal"===l.type){if(n=i.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n="completed",i.method="throw",i.arg=l.arg)}}}(t,i,r),s}function h(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var c={};function d(){}function u(){}function f(){}var p={};a(p,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(M([])));m&&m!==e&&i.call(m,o)&&(p=m);var b=f.prototype=d.prototype=Object.create(p);function x(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function y(t,e){function n(o,s,r,a){var l=h(t[o],t,s);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==vr(d)&&i.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,r,a)}),(function(t){n("throw",t,r,a)})):e.resolve(d).then((function(t){c.value=t,r(c)}),(function(t){return n("throw",t,r,a)}))}a(l.arg)}var o;this._invoke=function(t,i){function s(){return new e((function(e,o){n(t,i,e,o)}))}return o=o?o.then(s,s):s()}}function v(t,e){var i=t.iterator[e.method];if(void 0===i){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,v(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var n=h(i,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,c;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function M(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,s=function e(){for(;++n<t.length;)if(i.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return s.next=s}}return{next:S}}function S(){return{value:void 0,done:!0}}return u.prototype=f,a(b,"constructor",f),a(f,"constructor",u),u.displayName=a(f,r,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===u||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,a(t,r,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},x(y.prototype),a(y.prototype,s,(function(){return this})),t.AsyncIterator=y,t.async=function(e,i,n,o,s){void 0===s&&(s=Promise);var r=new y(l(e,i,n,o),s);return t.isGeneratorFunction(i)?r:r.next().then((function(t){return t.done?t.value:r.next()}))},x(b),a(b,r,"Generator"),a(b,o,(function(){return this})),a(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var i in t)e.push(i);return e.reverse(),function i(){for(;e.length;){var n=e.pop();if(n in t)return i.value=n,i.done=!1,i}return i.done=!0,i}},t.values=M,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(i,n){return r.type="throw",r.arg=t,e.next=i,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],r=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var a=i.call(s,"catchLoc"),l=i.call(s,"finallyLoc");if(a&&l){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(a){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var s=o;break}}s&&("break"===t||"continue"===t)&&s.tryLoc<=e&&e<=s.finallyLoc&&(s=null);var r=s?s.completion:{};return r.type=t,r.arg=e,s?(this.method="next",this.next=s.finallyLoc,c):this.complete(r)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),w(i),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var o=n.arg;w(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,i){return this.delegate={iterator:M(t),resultName:e,nextLoc:i},"next"===this.method&&(this.arg=void 0),c}},t}function wr(t,e,i,n,o,s,r){try{var a=t[s](r),l=a.value}catch(t){return void i(t)}a.done?e(l):Promise.resolve(l).then(n,o)}function kr(t){return function(){var e=this,i=arguments;return new Promise((function(n,o){var s=t.apply(e,i);function r(t){wr(s,n,o,r,a,"next",t)}function a(t){wr(s,n,o,r,a,"throw",t)}r(void 0)}))}}const Mr={props:["baseUrl"],data:function(){return{headers:null,rows:null,logs:null,deleteModalOpen:!1,deleting:null,next:null,prev:null,isDark:!1}},components:{LogsToolRow:(0,lr.Z)(yr,[["render",function(t,e,i,o,s,r){var a=(0,n.resolveComponent)("Link"),l=(0,n.resolveComponent)("icon");return(0,n.openBlock)(),(0,n.createElementBlock)("tr",mr,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(i.log,(function(t,e){return(0,n.openBlock)(),(0,n.createElementBlock)("td",{class:(0,n.normalizeClass)(r.rowClasses),key:e},[(0,n.createVNode)(a,{disabled:0===t,type:"button",href:"".concat(i.baseUrl,"/list/").concat(i.date,"/").concat(r.level(e)),style:(0,n.normalizeStyle)({"background-color":"date"!==e?r.getColor(0===t?"empty":e):"#1976D2"}),class:"inline-block p-1 text-sm font-semibold text-white mr-2"},{default:(0,n.withCtx)((function(){return[(0,n.createTextVNode)((0,n.toDisplayString)(t),1)]})),_:2},1032,["disabled","href","style"])],2)})),128)),(0,n.createElementVNode)("td",{class:(0,n.normalizeClass)(r.rowClasses)},[(0,n.createVNode)(a,{href:"".concat(i.baseUrl,"/list/").concat(i.date,"/all"),class:"appearance-none mr-3 text-70 hover:text-info"},{default:(0,n.withCtx)((function(){return[(0,n.createVNode)(l,{class:"text-gray-500 dark:text-gray-400",type:"eye"})]})),_:1},8,["href"]),(0,n.createVNode)(a,{href:r.downloadUrl+i.date,target:"_blank",rel:"noopener nofollow",title:"Download",class:"appearance-none cursor-pointer text-70 hover:text-primary mr-3"},{default:(0,n.withCtx)((function(){return[(0,n.createVNode)(l,{class:"text-gray-500 dark:text-gray-400",type:"download"})]})),_:1},8,["href"]),(0,n.createElementVNode)("button",{title:"Delete",class:"appearance-none mr-3 text-70 hover:text-danger",onClick:e[0]||(e[0]=(0,n.withModifiers)((function(e){return t.$emit("delete")}),["prevent"]))},[(0,n.createVNode)(l,{class:"text-gray-500 dark:text-gray-400",type:"trash"})])],2)])}]])},mounted:function(){var t=this;this.getListLogs(),Qs((function(e){return t.isDark=e}))},methods:{getColor:function(t){return xr(t)},getListLogs:function(t){var e=this;return kr(_r().mark((function i(){var n,o;return _r().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=t||"/nova-vendor/php-junior/nova-log-viewer/get_list_logs",i.next=3,Nova.request().get(t);case 3:n=i.sent,o=n.data,e.headers=o.headers,e.rows=o.rows,e.logs=o.rows.data,e.prev=o.rows.prev_page_url,e.next=o.rows.next_page_url;case 10:case"end":return i.stop()}}),i)})))()},openDeleteModal:function(t){console.log("opening..."),this.deleteModalOpen=!0,this.deleting=t},closeDeleteModal:function(){this.deleteModalOpen=!1,this.deleting=null},confirmDelete:function(){var t=this;return kr(_r().mark((function e(){return _r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Nova.request().delete("/nova-vendor/php-junior/nova-log-viewer/delete",{data:{date:t.deleting.date}});case 2:t.deleteModalOpen=!1,delete t.logs[t.deleting.date];case 4:case"end":return e.stop()}}),e)})))()}}},Sr=(0,lr.Z)(Mr,[["render",function(t,e,i,o,s,r){var a=(0,n.resolveComponent)("heading"),l=(0,n.resolveComponent)("LogsToolRow"),h=(0,n.resolveComponent)("card"),c=(0,n.resolveComponent)("ModalHeader"),d=(0,n.resolveComponent)("ModalContent"),u=(0,n.resolveComponent)("DeleteResourceModal");return(0,n.openBlock)(),(0,n.createElementBlock)("div",cr,[(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)({dark:s.isDark})},[(0,n.createVNode)(a,{class:"mb-6"},{default:(0,n.withCtx)((function(){return[(0,n.createTextVNode)("Nova Log Viewer")]})),_:1}),(0,n.createVNode)(h,{class:"flex flex-col items-center justify-center"},{default:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("table",dr,[(0,n.createElementVNode)("thead",ur,[(0,n.createElementVNode)("tr",null,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(s.headers,(function(t,e){return(0,n.openBlock)(),(0,n.createElementBlock)("th",{key:e,class:"td-fit uppercase text-xxs text-gray-500 tracking-wide pl-5 pr-2 py-2"},[(0,n.createElementVNode)("span",{style:(0,n.normalizeStyle)({"background-color":"date"!==e?r.getColor(e):"#1976D2"}),class:"inline-block p-1 text-sm text-white"},(0,n.toDisplayString)(t),5)])})),128)),fr])]),(0,n.createElementVNode)("tbody",null,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(s.logs,(function(t,e){return(0,n.openBlock)(),(0,n.createBlock)(l,{log:t,baseUrl:i.baseUrl,date:e,key:e,onDelete:function(e){return r.openDeleteModal(t)}},null,8,["log","baseUrl","date","onDelete"])})),128))])])]})),_:1}),null!=s.prev||null!=s.next?((0,n.openBlock)(),(0,n.createBlock)(h,{key:0,class:"flex mt-6 justify-end"},{default:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",pr,[null!=s.prev?((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:0,onClick:e[0]||(e[0]=function(t){return r.getListLogs(s.prev)}),class:"bg-grey-light hover:bg-grey text-grey-darkest font-bold py-2 px-4 rounded-l"}," Prev ")):(0,n.createCommentVNode)("",!0),null!=s.next?((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:1,onClick:e[1]||(e[1]=function(t){return r.getListLogs(s.next)}),class:"bg-grey-light hover:bg-grey text-grey-darkest font-bold py-2 px-4 rounded-r"}," Next ")):(0,n.createCommentVNode)("",!0)])]})),_:1})):(0,n.createCommentVNode)("",!0),(0,n.createVNode)(u,{show:s.deleteModalOpen,mode:"delete",onClose:r.closeDeleteModal,onConfirm:r.confirmDelete},{default:(0,n.withCtx)((function(){return[(0,n.createVNode)(c,null,{default:(0,n.withCtx)((function(){return[(0,n.createTextVNode)("Delete Log File")]})),_:1}),(0,n.createVNode)(d,null,{default:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("p",gr," Are you sure you want to delete this log file "+(0,n.toDisplayString)(s.deleting.date)+"? ",1)]})),_:1})]})),_:1},8,["show","onClose","onConfirm"])],2)])}]]);var Er=function(t){return(0,n.pushScopeId)("data-v-16aeccec"),t=t(),(0,n.popScopeId)(),t},Cr={class:"nova-logs"},Or={class:"flex mb-4"},Lr={class:"w-1/6"},Dr={class:"w-full p-4"},Pr=Er((function(){return(0,n.createElementVNode)("div",null,[(0,n.createElementVNode)("div",null,[(0,n.createElementVNode)("div",{class:"font-bold text-xl mb-2"},"Levels")])],-1)})),Ar={class:"list-reset"},Tr=["disabled","onClick"],Nr={key:1,class:"w-4 mr-2"},Rr={class:"flex rounded-full uppercase px-2 py-1 text-xs font-bold mr-3"},Vr={class:"w-5/6"},Ir={class:"w-full p-4"},Fr=Er((function(){return(0,n.createElementVNode)("div",{class:"float-left"},[(0,n.createElementVNode)("div",{class:"font-bold text-xl mb-2"},"Log info")],-1)})),zr={class:"float-right"},Br={class:"inline-flex"},jr=["href"],Wr={class:"w-full"},Hr={class:"align-baseline"},$r=Er((function(){return(0,n.createElementVNode)("td",{style:{width:"23%"},class:"text-sm pl-0 p-2"},"File Path :",-1)})),Ur=Er((function(){return(0,n.createElementVNode)("td",{style:{width:"23%"},class:"text-sm pl-0 p-2"},"Log Entries :",-1)})),Yr=Er((function(){return(0,n.createElementVNode)("td",{style:{width:"23%"},class:"text-sm pl-0 p-2"},"Size :",-1)})),Xr=Er((function(){return(0,n.createElementVNode)("td",{style:{width:"23%"},class:"text-sm pl-0 p-2"},"Created At :",-1)})),Gr=Er((function(){return(0,n.createElementVNode)("td",{style:{width:"23%"},class:"text-sm pl-0 p-2"},"Updated At :",-1)})),qr={class:"table w-full border-0"},Kr=Er((function(){return(0,n.createElementVNode)("thead",{class:"bg-gray-50 dark:bg-gray-800"},[(0,n.createElementVNode)("tr",null,[(0,n.createElementVNode)("th",{class:"uppercase text-xxs text-gray-500 tracking-wide pl-5 pr-2 py-2"},"Logs"),(0,n.createElementVNode)("th",{class:"uppercase text-xxs text-gray-500 tracking-wide pl-5 pr-2 py-2"}," Actions")])],-1)})),Zr={class:"inline-flex"},Jr={class:"text-80 leading-normal"},Qr={class:"bg-white dark:bg-gray-800 relative"},ta={class:"max-h-[calc(100vh-3rem)] overflow-auto"},ea={class:"p-4 stack-content"};var ia={class:"group"},na={class:"border-t border-gray-100 dark:border-gray-700 px-2 py-2 pl-5 pr-5 dark:bg-gray-800 group-hover:bg-gray-50 dark:group-hover:bg-gray-900"},oa={class:"mt-2"},sa={class:"border-t border-gray-100 dark:border-gray-700 px-2 py-2 pl-5 pr-5 dark:bg-gray-800 group-hover:bg-gray-50 dark:group-hover:bg-gray-900"};const ra={name:"ShowLogsRow",props:["entry"],methods:{getColor:function(t){return xr(t)}}};function aa(t){return aa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},aa(t)}function la(){la=function(){return t};var t={},e=Object.prototype,i=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",s=n.asyncIterator||"@@asyncIterator",r=n.toStringTag||"@@toStringTag";function a(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,i){return t[e]=i}}function l(t,e,i,n){var o=e&&e.prototype instanceof d?e:d,s=Object.create(o.prototype),r=new k(n||[]);return s._invoke=function(t,e,i){var n="suspendedStart";return function(o,s){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw s;return S()}for(i.method=o,i.arg=s;;){var r=i.delegate;if(r){var a=v(r,i);if(a){if(a===c)continue;return a}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n="executing";var l=h(t,e,i);if("normal"===l.type){if(n=i.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n="completed",i.method="throw",i.arg=l.arg)}}}(t,i,r),s}function h(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var c={};function d(){}function u(){}function f(){}var p={};a(p,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(M([])));m&&m!==e&&i.call(m,o)&&(p=m);var b=f.prototype=d.prototype=Object.create(p);function x(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function y(t,e){function n(o,s,r,a){var l=h(t[o],t,s);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==aa(d)&&i.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,r,a)}),(function(t){n("throw",t,r,a)})):e.resolve(d).then((function(t){c.value=t,r(c)}),(function(t){return n("throw",t,r,a)}))}a(l.arg)}var o;this._invoke=function(t,i){function s(){return new e((function(e,o){n(t,i,e,o)}))}return o=o?o.then(s,s):s()}}function v(t,e){var i=t.iterator[e.method];if(void 0===i){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,v(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var n=h(i,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,c;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function M(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,s=function e(){for(;++n<t.length;)if(i.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return s.next=s}}return{next:S}}function S(){return{value:void 0,done:!0}}return u.prototype=f,a(b,"constructor",f),a(f,"constructor",u),u.displayName=a(f,r,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===u||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,a(t,r,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},x(y.prototype),a(y.prototype,s,(function(){return this})),t.AsyncIterator=y,t.async=function(e,i,n,o,s){void 0===s&&(s=Promise);var r=new y(l(e,i,n,o),s);return t.isGeneratorFunction(i)?r:r.next().then((function(t){return t.done?t.value:r.next()}))},x(b),a(b,r,"Generator"),a(b,o,(function(){return this})),a(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var i in t)e.push(i);return e.reverse(),function i(){for(;e.length;){var n=e.pop();if(n in t)return i.value=n,i.done=!1,i}return i.done=!0,i}},t.values=M,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(i,n){return r.type="throw",r.arg=t,e.next=i,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],r=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var a=i.call(s,"catchLoc"),l=i.call(s,"finallyLoc");if(a&&l){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(a){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var s=o;break}}s&&("break"===t||"continue"===t)&&s.tryLoc<=e&&e<=s.finallyLoc&&(s=null);var r=s?s.completion:{};return r.type=t,r.arg=e,s?(this.method="next",this.next=s.finallyLoc,c):this.complete(r)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),w(i),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var o=n.arg;w(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,i){return this.delegate={iterator:M(t),resultName:e,nextLoc:i},"next"===this.method&&(this.arg=void 0),c}},t}function ha(t,e,i,n,o,s,r){try{var a=t[s](r),l=a.value}catch(t){return void i(t)}a.done?e(l):Promise.resolve(l).then(n,o)}function ca(t){return function(){var e=this,i=arguments;return new Promise((function(n,o){var s=t.apply(e,i);function r(t){ha(s,n,o,r,a,"next",t)}function a(t){ha(s,n,o,r,a,"throw",t)}r(void 0)}))}}function da(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ua(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?da(Object(i),!0).forEach((function(e){fa(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):da(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function fa(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}const pa={name:"ShowLogs",components:{ShowLogsRow:(0,lr.Z)(ra,[["render",function(t,e,i,o,s,r){return(0,n.openBlock)(),(0,n.createElementBlock)("tr",ia,[(0,n.createElementVNode)("td",na,[(0,n.createElementVNode)("p",null,[(0,n.createElementVNode)("span",{style:(0,n.normalizeStyle)({"background-color":r.getColor(i.entry.level)}),class:"inline-block px-3 py-1 text-sm text-white font-semibold mr-3"},(0,n.toDisplayString)(i.entry.level.toUpperCase()),5),(0,n.createTextVNode)(" Time : "+(0,n.toDisplayString)(i.entry.datetime),1)]),(0,n.createElementVNode)("p",oa,(0,n.toDisplayString)(i.entry.header),1)]),(0,n.createElementVNode)("td",sa,[i.entry.stack.length>2?((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:0,class:"bg-transparent hover:bg-primary text-primary border-primary font-semibold hover:text-white py-2 px-4 border hover:border-transparent rounded",onClick:e[0]||(e[0]=(0,n.withModifiers)((function(e){return t.$emit("stack")}),["prevent"]))}," Stack ")):(0,n.createCommentVNode)("",!0)])])}]])},props:["date","level","baseUrl"],data:function(){return{info:null,log:null,currentLevel:null,levels:null,entries:null,menus:null,deleteModalOpen:!1,deleting:null,next:null,prev:null,isDark:!1,stackModalOpen:!1,stack:null,colors:Nova.appConfig.viewer}},computed:{downloadUrl:function(){return"/nova-vendor/php-junior/nova-log-viewer/download/"}},mounted:function(){var t=this;this.getLogByLevel(this.level),Qs((function(e){t.isDark=e,t.colors.empty=e?"#3e3e3e":Nova.appConfig.viewer.empty}))},methods:{visitLogByLevel:function(t){var e=ua(ua({},window.history.state),{},{url:i});e.props.level=t;var i="".concat(this.baseUrl,"/list/").concat(this.date,"/").concat(t);history.replaceState(e,"",i),this.getLogByLevel(t)},getLogByLevel:function(t){this.getLog("/nova-vendor/php-junior/nova-log-viewer/get/".concat(this.date,"/").concat(t))},getLog:function(t){var e=this;return ca(la().mark((function i(){var n,o;return la().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=t||"/nova-vendor/php-junior/nova-log-viewer/get/".concat(e.date,"/all"),i.next=3,Nova.request().get(t);case 3:n=i.sent,o=n.data,e.log=o.log,e.levels=o.levels,e.currentLevel=o.level,e.entries=o.entries.data,e.menus=o.menus,e.prev=o.entries.prev_page_url,e.next=o.entries.next_page_url,e.info=o.info;case 13:case"end":return i.stop()}}),i)})))()},openDeleteModal:function(t){this.deleteModalOpen=!0,this.deleting=t},closeDeleteModal:function(){this.deleteModalOpen=!1,this.deleting=null},openStackModal:function(t){this.stackModalOpen=!0,this.stack=t.stack},closeStackModal:function(){this.stackModalOpen=!1,this.stack=null},confirmDelete:function(){var t=this;return ca(la().mark((function e(){return la().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Nova.request().delete("/nova-vendor/php-junior/nova-log-viewer/delete",{data:{date:t.deleting.date}});case 2:t.deleteModalOpen=!1,t.$inertia.visit("".concat(t.baseUrl,"/list"));case 4:case"end":return e.stop()}}),e)})))()}}};var ga=i(145),ma={insert:"head",singleton:!1};sr()(ga.Z,ma);ga.Z.locals;const ba=(0,lr.Z)(pa,[["render",function(t,e,i,o,s,r){var a=(0,n.resolveComponent)("heading"),l=(0,n.resolveComponent)("icon"),h=(0,n.resolveComponent)("card"),c=(0,n.resolveComponent)("ShowLogsRow"),d=(0,n.resolveComponent)("ModalHeader"),u=(0,n.resolveComponent)("ModalContent"),f=(0,n.resolveComponent)("DeleteResourceModal"),p=(0,n.resolveComponent)("Modal");return(0,n.openBlock)(),(0,n.createElementBlock)("div",Cr,[(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)({dark:s.isDark})},[(0,n.createVNode)(a,{class:"mb-6"},{default:(0,n.withCtx)((function(){return[(0,n.createTextVNode)("Log [ "+(0,n.toDisplayString)(i.date)+" ]",1)]})),_:1}),(0,n.createElementVNode)("div",Or,[(0,n.createElementVNode)("div",Lr,[(0,n.createVNode)(h,{class:"flex mr-1 rounded-none"},{default:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",Dr,[Pr,(0,n.createElementVNode)("ul",Ar,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(s.menus,(function(t,e){return(0,n.openBlock)(),(0,n.createElementBlock)("li",{class:"leading-wide text-sm",key:e},[(0,n.createElementVNode)("button",{disabled:0===t.count,style:(0,n.normalizeStyle)({"background-color":"date"!==e?s.colors[0===t.count?"empty":e]:"#1976D2"}),class:"w-full font-bold py-2 px-4 inline-flex items-center text-white",onClick:function(t){return r.visitLogByLevel(e)}},[e===s.currentLevel?((0,n.openBlock)(),(0,n.createBlock)(l,{key:0,type:"check",class:"h-4 w-4 mr-2"})):((0,n.openBlock)(),(0,n.createElementBlock)("span",Nr)),(0,n.createElementVNode)("span",null,(0,n.toDisplayString)(t.name),1),(0,n.createElementVNode)("span",Rr,(0,n.toDisplayString)(t.count),1)],12,Tr)])})),128))])])]})),_:1})]),(0,n.createElementVNode)("div",Vr,[null!=s.info?((0,n.openBlock)(),(0,n.createBlock)(h,{key:0,class:"flex rounded-none"},{default:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",Ir,[(0,n.createElementVNode)("div",null,[Fr,(0,n.createElementVNode)("div",zr,[(0,n.createElementVNode)("div",Br,[(0,n.createElementVNode)("a",{href:r.downloadUrl+s.log.date,target:"_blank",class:"bg-green-100 text-green-600 dark:bg-green-500 dark:text-green-900 font-bold py-2 px-4 rounded-l inline-flex items-center"},[(0,n.createVNode)(l,{class:"w-4 h-4",type:"download"})],8,jr),(0,n.createElementVNode)("button",{onClick:e[0]||(e[0]=function(t){return r.openDeleteModal(s.log)}),class:"bg-red-100 text-red-600 dark:bg-red-400 dark:text-red-900 font-bold py-2 px-4 rounded-r inline-flex items-center"},[(0,n.createVNode)(l,{class:"w-4 h-4",type:"trash"})])])])]),(0,n.createElementVNode)("table",Wr,[(0,n.createElementVNode)("tbody",Hr,[(0,n.createElementVNode)("tr",null,[$r,(0,n.createElementVNode)("td",null,(0,n.toDisplayString)(s.info.path),1)]),(0,n.createElementVNode)("tr",null,[Ur,(0,n.createElementVNode)("td",null,(0,n.toDisplayString)(s.info.entries),1)]),(0,n.createElementVNode)("tr",null,[Yr,(0,n.createElementVNode)("td",null,(0,n.toDisplayString)(s.info.size),1)]),(0,n.createElementVNode)("tr",null,[Xr,(0,n.createElementVNode)("td",null,(0,n.toDisplayString)(s.info.created_at),1)]),(0,n.createElementVNode)("tr",null,[Gr,(0,n.createElementVNode)("td",null,(0,n.toDisplayString)(s.info.updated_at),1)])])])])]})),_:1})):(0,n.createCommentVNode)("",!0),(0,n.createVNode)(h,{class:"flex rounded-none mt-1 p-2"},{default:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("table",qr,[Kr,(0,n.createElementVNode)("tbody",null,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(s.entries,(function(t,e){return(0,n.openBlock)(),(0,n.createBlock)(c,{entry:t,key:e,onStack:function(e){return r.openStackModal(t)}},null,8,["entry","onStack"])})),128))])])]})),_:1}),null!=s.prev||null!=s.next?((0,n.openBlock)(),(0,n.createBlock)(h,{key:1,class:"flex rounded-none justify-end"},{default:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",Zr,[null!=s.prev?((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:0,onClick:e[1]||(e[1]=function(t){return r.getLog(s.prev)}),class:"bg-grey-light hover:bg-grey text-grey-darkest font-bold py-2 px-4 rounded-l"}," Prev ")):(0,n.createCommentVNode)("",!0),null!=s.next?((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:1,onClick:e[2]||(e[2]=function(t){return r.getLog(s.next)}),class:"bg-grey-light hover:bg-grey text-grey-darkest font-bold py-2 px-4 rounded-r"}," Next ")):(0,n.createCommentVNode)("",!0)])]})),_:1})):(0,n.createCommentVNode)("",!0)])]),(0,n.createVNode)(f,{show:s.deleteModalOpen,mode:"delete",onClose:r.closeDeleteModal,onConfirm:r.confirmDelete},{default:(0,n.withCtx)((function(){return[(0,n.createVNode)(d,null,{default:(0,n.withCtx)((function(){return[(0,n.createTextVNode)("Delete Log File")]})),_:1}),(0,n.createVNode)(u,null,{default:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("p",Jr," Are you sure you want to delete this log file "+(0,n.toDisplayString)(s.deleting.date)+"? ",1)]})),_:1})]})),_:1},8,["show","onClose","onConfirm"]),(0,n.createVNode)(p,{show:s.stackModalOpen,onClose:r.closeDeleteModal,onConfirm:r.confirmDelete,class:"nova-logs","modal-style":"window",size:"7xl"},{default:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)({dark:s.isDark})},[(0,n.createElementVNode)("div",Qr,[(0,n.createElementVNode)("button",{type:"button",onClick:e[3]||(e[3]=function(){return r.closeStackModal&&r.closeStackModal.apply(r,arguments)}),class:"bg-red-100 text-red-600 dark:bg-red-400 dark:text-red-900 rounded-lg p-2 absolute top-4 right-6"},[(0,n.createVNode)(l,{class:"w-4 h-4",type:"x"})]),(0,n.createElementVNode)("div",ta,[(0,n.createElementVNode)("div",ea,(0,n.toDisplayString)(s.stack),1)])])],2)]})),_:1},8,["show","onClose","onConfirm"])],2)])}],["__scopeId","data-v-16aeccec"]]);Nova.booting((function(t,e){Nova.inertia("NovaLogs",hr),Nova.inertia("LogsTool",Sr),Nova.inertia("ShowLogs",ba)}))},430:(t,e,i)=>{i.d(e,{Z:()=>s});var n=i(645),o=i.n(n)()((function(t){return t[1]}));o.push([t.id,".progress{background-color:#000;width:100%}.bar{background-color:#fff;height:5px}",""]);const s=o},145:(t,e,i)=>{i.d(e,{Z:()=>s});var n=i(645),o=i.n(n)()((function(t){return t[1]}));o.push([t.id,".stack-content[data-v-16aeccec]{color:#ae0e0e;font-family:consolas,Menlo,Courier,monospace;font-size:12px;font-weight:400;white-space:pre-line;width:100%}.dark .stack-content[data-v-16aeccec]{color:#df9797}",""]);const s=o},645:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=t(e);return e[2]?"@media ".concat(e[2]," {").concat(i,"}"):i})).join("")},e.i=function(t,i,n){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(n)for(var s=0;s<this.length;s++){var r=this[s][0];null!=r&&(o[r]=!0)}for(var a=0;a<t.length;a++){var l=[].concat(t[a]);n&&o[l[0]]||(i&&(l[2]?l[2]="".concat(i," and ").concat(l[2]):l[2]=i),e.push(l))}},e}},762:()=>{},379:(t,e,i)=>{var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},s=function(){var t={};return function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}t[e]=i}return t[e]}}(),r=[];function a(t){for(var e=-1,i=0;i<r.length;i++)if(r[i].identifier===t){e=i;break}return e}function l(t,e){for(var i={},n=[],o=0;o<t.length;o++){var s=t[o],l=e.base?s[0]+e.base:s[0],h=i[l]||0,c="".concat(l," ").concat(h);i[l]=h+1;var d=a(c),u={css:s[1],media:s[2],sourceMap:s[3]};-1!==d?(r[d].references++,r[d].updater(u)):r.push({identifier:c,updater:m(u,e),references:1}),n.push(c)}return n}function h(t){var e=document.createElement("style"),n=t.attributes||{};if(void 0===n.nonce){var o=i.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(t){e.setAttribute(t,n[t])})),"function"==typeof t.insert)t.insert(e);else{var r=s(t.insert||"head");if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(e)}return e}var c,d=(c=[],function(t,e){return c[t]=e,c.filter(Boolean).join("\n")});function u(t,e,i,n){var o=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(t.styleSheet)t.styleSheet.cssText=d(e,o);else{var s=document.createTextNode(o),r=t.childNodes;r[e]&&t.removeChild(r[e]),r.length?t.insertBefore(s,r[e]):t.appendChild(s)}}function f(t,e,i){var n=i.css,o=i.media,s=i.sourceMap;if(o?t.setAttribute("media",o):t.removeAttribute("media"),s&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var p=null,g=0;function m(t,e){var i,n,o;if(e.singleton){var s=g++;i=p||(p=h(e)),n=u.bind(null,i,s,!1),o=u.bind(null,i,s,!0)}else i=h(e),n=f.bind(null,i,e),o=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(i)};return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else o()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=o());var i=l(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var n=0;n<i.length;n++){var o=a(i[n]);r[o].references--}for(var s=l(t,e),h=0;h<i.length;h++){var c=a(i[h]);0===r[c].references&&(r[c].updater(),r.splice(c,1))}i=s}}}},744:(t,e)=>{e.Z=(t,e)=>{const i=t.__vccOpts||t;for(const[t,n]of e)i[t]=n;return i}}},i={};function n(t){var o=i[t];if(void 0!==o)return o.exports;var s=i[t]={id:t,exports:{}};return e[t](s,s.exports,n),s.exports}n.m=e,t=[],n.O=(e,i,o,s)=>{if(!i){var r=1/0;for(c=0;c<t.length;c++){for(var[i,o,s]=t[c],a=!0,l=0;l<i.length;l++)(!1&s||r>=s)&&Object.keys(n.O).every((t=>n.O[t](i[l])))?i.splice(l--,1):(a=!1,s<r&&(r=s));if(a){t.splice(c--,1);var h=o();void 0!==h&&(e=h)}}return e}s=s||0;for(var c=t.length;c>0&&t[c-1][2]>s;c--)t[c]=t[c-1];t[c]=[i,o,s]},n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t={103:0,990:0};n.O.j=e=>0===t[e];var e=(e,i)=>{var o,s,[r,a,l]=i,h=0;if(r.some((e=>0!==t[e]))){for(o in a)n.o(a,o)&&(n.m[o]=a[o]);if(l)var c=l(n)}for(e&&e(i);h<r.length;h++)s=r[h],n.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return n.O(c)},i=self.webpackChunkphp_junior_nova_logs=self.webpackChunkphp_junior_nova_logs||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})(),n.nc=void 0,n.O(void 0,[990],(()=>n(358)));var o=n.O(void 0,[990],(()=>n(762)));o=n.O(o)})();
|