1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2196],{23148:function(t,e,i){i.d(e,{De:function(){return ea},Dx:function(){return en},Gu:function(){return t9},ZL:function(){return tJ},f$:function(){return eS},jn:function(){return tN},kL:function(){return tI},od:function(){return tY},u:function(){return e_},uw:function(){return ew}});var s=i(9676),a=new /*! 2 * Chart.js v4.4.2 3 * https://www.chartjs.org 4 * (c) 2024 Chart.js Contributors 5 * Released under the MIT License 6 */ class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,s){let a=e.listeners[s],o=e.duration;a.forEach(s=>s({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=s.r.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,s)=>{let a;if(!i.running||!i.items.length)return;let o=i.items,n=o.length-1,r=!1;for(;n>=0;--n)(a=o[n])._active?(a._total>i.duration&&(i.duration=a._total),a.tick(t),r=!0):(o[n]=o[o.length-1],o.pop());r&&(s.draw(),this._notify(s,i,t,"progress")),o.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=o.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){let e=this._charts,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){let e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;let e=this._charts.get(t);return!!e&&!!e.running&&!!e.items.length}stop(t){let e=this._charts.get(t);if(!e||!e.items.length)return;let i=e.items,s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};let o="transparent",n={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){let a=(0,s.c)(t||o),n=a.valid&&(0,s.c)(e||o);
6return n&&n.valid?n.mix(a,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class r{constructor(t,e,i,a){let o=e[i];a=(0,s.a)([t.to,a,o,t.from]);let r=(0,s.a)([t.from,o,a]);this._active=!0,this._fn=t.fn||n[t.type||typeof r],this._easing=s.e[t.easing]||s.e.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=r,this._to=a,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);let a=this._target[this._prop],o=i-this._start,n=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(n,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=(0,s.a)([t.to,e,a,t.from]),this._from=(0,s.a)([t.from,a,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let e;let i=t-this._start,s=this._duration,a=this._prop,o=this._from,n=this._loop,r=this._to;if(this._active=o!==r&&(n||i<s),!this._active){this._target[a]=r,this._notify(!0);return}if(i<0){this._target[a]=o;return}e=i/s%2,e=n&&e>1?2-e:e,e=this._easing(Math.min(1,Math.max(0,e))),this._target[a]=this._fn(o,r,e)}wait(){let t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){let e=t?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][e]()}}class l{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!(0,s.i)(t))return;let e=Object.keys(s.d.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(a=>{let o=t[a];if(!(0,s.i)(o))return;let n={};for(let r of e)n[r]=o[r];((0,s.b)(o.properties)&&o.properties||[a]).forEach(t=>{t!==a&&i.has(t)||i.set(t,n)})})}_animateOptions(t,e){let i=e.options,s=function(t,e){if(!e)return;let i=t.options;if(!i){t.options=e;return}return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i}(t,i);if(!s)return[];let a=this._createAnimations(s,i);return i.$shared&&(function(t,e){let i=[],s=Object.keys(e);for(let a=0;a<s.length;a++){let o=t[s[a]];o&&o.active()&&i.push(o.wait())}return Promise.all(i)})(t.options.$animations,i).then(()=>{t.options=i},()=>{}),a}_createAnimations(t,e){let i;let s=this._properties,a=[],o=t.$animations||(t.$animations={}),n=Object.keys(e),l=Date.now();for(i=n.length-1;i>=0;--i){let h=n[i];if("$"===h.charAt(0))continue;if("options"===h){a.push(...this._animateOptions(t,e));continue}let d=e[h],c=o[h],u=s.get(h);if(c){if(u&&c.active()){c.update(u,d,l);continue}c.cancel()}if(!u||!u.duration){t[h]=d;continue}o[h]=c=new r(u,t,h,d),a.push(c)}return a}update(t,e){if(0===this._properties.size){Object.assign(t,e);return}let i=this._createAnimations(t,e);if(i.length)return a.add(this._chart,i),!0}}function h(t,e){let i=t&&t.options||{},s=i.reverse,a=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:s?o:a,end:s?a:o}}function d(t,e){let i,s;let a=[],o=t._getSortedDatasetMetas(e);for(i=0,s=o.length;i<s;++i)a.push(o[i].index);return a}function c(t,e,i,a={}){let o,n,r,l;let h=t.keys,d="single"===a.mode;if(null!==e){for(o=0,n=h.length;o<n;++o){if((r=+h[o])===i){if(a.all)continue;break}l=t.values[r],(0,s.g)(l)&&(d||0===e||(0,s.s)(e)===(0,s.s)(l))&&(e+=l)}return e}}function u(t,e){let i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function g(t,e,i,s){for(let a of e.getMatchingVisibleMetas(s).reverse()){let o=t[a.index];if(i&&o>0||!i&&o<0)return a.index}return null}function f(t,e){let i;let{chart:s,_cachedMeta:a}=t,o=s._stacks||(s._stacks={}),{iScale:n,vScale:r,index:l}=a,h=n.axis,d=r.axis,c=`${n.id}.${r.id}.${a.stack||a.type}`,u=e.length;for(let f=0;f<u;++f){let p=e[f],{[h]:m,[d]:x}=p,_=p._stacks||(p._stacks={});(i=_[d]=function(t,e,i){let s=t[e]||(t[e]={});return s[i]||(s[i]={})}(o,c,m))[l]=x,i._top=g(i,r,!0,a.type),i._bottom=g(i,r,!1,a.type);let b=i._visualValues||(i._visualValues={});b[l]=x}}function p(t,e){let i=t.scales;return Object.keys(i).filter(t=>i[t].axis===e).shift()}function m(t,e){let i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s)for(let a of e=e||t._parsed){let o=a._stacks;if(!o||void 0===o[s]||void 0===o[s][i])return;delete o[s][i],void 0!==o[s]._visualValues&&void 0!==o[s]._visualValues[i]&&delete o[s]._visualValues[i]}}let x=t=>"reset"===t||"none"===t,_=(t,e)=>e?t:Object.assign({},t),b=(t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:d(i,!0),values:null};class v{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=u(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&m(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,i=this.getDataset(),a=(t,e,i,s)=>"x"===t?e:"r"===t?s:i,o=e.xAxisID=(0,s.v)(i.xAxisID,p(t,"x")),n=e.yAxisID=(0,s.v)(i.yAxisID,p(t,"y")),r=e.rAxisID=(0,s.v)(i.rAxisID,p(t,"r")),l=e.indexAxis,h=e.iAxisID=a(l,o,n,r),d=e.vAxisID=a(l,n,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(n),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(h),e.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&(0,s.u)(this._data,this),t._stacked&&m(t)}
6_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if((0,s.i)(e))this._data=function(t){let e,i,s;let a=Object.keys(t),o=Array(a.length);for(e=0,i=a.length;e<i;++e)s=a[e],o[e]={x:s,y:t[s]};return o}(e);else if(i!==e){if(i){(0,s.u)(i,this);let a=this._cachedMeta;m(a),a._parsed=[]}e&&Object.isExtensible(e)&&(0,s.l)(e,this),this._syncList=[],this._data=e}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let e=this._cachedMeta,i=this.getDataset(),s=!1;this._dataCheck();let a=e._stacked;e._stacked=u(e.vScale,e),e.stack!==i.stack&&(s=!0,m(e),e.stack=i.stack),this._resyncElements(t),(s||a!==e._stacked)&&f(this,e._parsed)}configure(){let t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){let i,a,o;let{_cachedMeta:n,_data:r}=this,{iScale:l,_stacked:h}=n,d=l.axis,c=0===t&&e===r.length||n._sorted,u=t>0&&n._parsed[t-1];if(!1===this._parsing)n._parsed=r,n._sorted=!0,o=r;else{o=(0,s.b)(r[t])?this.parseArrayData(n,r,t,e):(0,s.i)(r[t])?this.parseObjectData(n,r,t,e):this.parsePrimitiveData(n,r,t,e);let g=()=>null===a[d]||u&&a[d]<u[d];for(i=0;i<e;++i)n._parsed[i+t]=a=o[i],c&&(g()&&(c=!1),u=a);n._sorted=c}h&&f(this,o)}parsePrimitiveData(t,e,i,s){let a,o;let{iScale:n,vScale:r}=t,l=n.axis,h=r.axis,d=n.getLabels(),c=n===r,u=Array(s);for(a=0;a<s;++a)o=a+i,u[a]={[l]:c||n.parse(d[o],o),[h]:r.parse(e[o],o)};return u}parseArrayData(t,e,i,s){let a,o,n;let{xScale:r,yScale:l}=t,h=Array(s);for(a=0;a<s;++a)n=e[o=a+i],h[a]={x:r.parse(n[0],o),y:l.parse(n[1],o)};return h}parseObjectData(t,e,i,a){let o,n,r;let{xScale:l,yScale:h}=t,{xAxisKey:d="x",yAxisKey:c="y"}=this._parsing,u=Array(a);for(o=0;o<a;++o)r=e[n=o+i],u[o]={x:l.parse((0,s.f)(r,d),n),y:h.parse((0,s.f)(r,c),n)};return u}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){let s=this.chart,a=this._cachedMeta,o=e[t.axis],n={keys:d(s,!0),values:e._stacks[t.axis]._visualValues};return c(n,o,a.index,{mode:i})}updateRangeFromParsed(t,e,i,s){let a=i[e.axis],o=null===a?NaN:a,n=s&&i._stacks[e.axis];s&&n&&(s.values=n,o=c(s,a,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){let i,a;let o=this._cachedMeta,n=o._parsed,r=o._sorted&&t===o.iScale,l=n.length,h=this._getOtherScale(t),d=b(e,o,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:g}=function(t){let{min:e,max:i,minDefined:s,maxDefined:a}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:a?i:Number.POSITIVE_INFINITY}}(h);function f(){a=n[i];let e=a[h.axis];return!(0,s.g)(a[t.axis])||u>e||g<e}for(i=0;i<l&&(f()||(this.updateRangeFromParsed(c,t,a,d),!r));++i);if(r){for(i=l-1;i>=0;--i)if(!f()){this.updateRangeFromParsed(c,t,a,d);break}}return c}getAllParsedValues(t){let e,i,a;let o=this._cachedMeta._parsed,n=[];for(e=0,i=o.length;e<i;++e)a=o[e][t.axis],(0,s.g)(a)&&n.push(a);return n}getMaxOverflow(){return!1}getLabelAndValue(t){let e=this._cachedMeta,i=e.iScale,s=e.vScale,a=this.getParsed(t);return{label:i?""+i.getLabelForValue(a[i.axis]):"",value:s?""+s.getLabelForValue(a[s.axis]):""}}_update(t){var e;let i,a,o,n;let r=this._cachedMeta;this.update(t||"default"),r._clip=(e=(0,s.v)(this.options.clip,function(t,e,i){if(!1===i)return!1;let s=h(t,i),a=h(e,i);return{top:a.end,right:s.end,bottom:a.start,left:s.start}}(r.xScale,r.yScale,this.getMaxOverflow())),(0,s.i)(e)?(i=e.top,a=e.right,o=e.bottom,n=e.left):i=a=o=n=e,{top:i,right:a,bottom:o,left:n,disabled:!1===e})}update(t){}draw(){let t;let e=this._ctx,i=this.chart,s=this._cachedMeta,a=s.data||[],o=i.chartArea,n=[],r=this._drawStart||0,l=this._drawCount||a.length-r,h=this.options.drawActiveElementsOnTop;for(s.dataset&&s.dataset.draw(e,o,r,l),t=r;t<r+l;++t){let d=a[t];d.hidden||(d.active&&h?n.push(d):d.draw(e,o))}for(t=0;t<n.length;++t)n[t].draw(e,o)}getStyle(t,e){let i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){var a,o,n;let r;let l=this.getDataset();if(t>=0&&t<this._cachedMeta.data.length){let h=this._cachedMeta.data[t];(r=h.$context||(h.$context=(a=this.getContext(),(0,s.j)(a,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:h,index:t,mode:"default",type:"data"})))).parsed=this.getParsed(t),r.raw=l.data[t],r.index=r.dataIndex=t}else(r=this.$context||(this.$context=(o=this.chart.getContext(),n=this.index,(0,s.j)(o,{active:!1,dataset:void 0,datasetIndex:n,index:n,mode:"default",type:"dataset"})))).dataset=l,r.index=r.datasetIndex=this.index;return r.active=!!e,r.mode=i,r}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){let a="active"===e,o=this._cachedDataOpts,n=t+"-"+e,r=o[n],l=this.enableOptionSharing&&(0,s.h)(i);if(r)return _(r,l);let h=this.chart.config,d=h.datasetElementScopeKeys(this._type,t),c=a?[`${t}Hover`,"hover",t,""]:[t,""],u=h.getOptionScopes(this.getDataset(),d),g=Object.keys(s.d.elements[t]),f=()=>this.getContext(i,a,e),p=h.resolveNamedOptions(u,g,f,c);return p.$shared&&(p.$shared=l,o[n]=Object.freeze(_(p,l))),p}_resolveAnimations(t,e,i){let s;let a=this.chart,o=this._cachedDataOpts,n=`animation-${e}
6`,r=o[n];if(r)return r;if(!1!==a.options.animation){let h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),c=h.getOptionScopes(this.getDataset(),d);s=h.createResolver(c,this.getContext(t,i,e))}let u=new l(a,s&&s.animations);return s&&s._cacheable&&(o[n]=Object.freeze(u)),u}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||x(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,a=this.getSharedOptions(i),o=this.includeOptions(e,a)||a!==s;return this.updateSharedOptions(a,e,i),{sharedOptions:a,includeOptions:o}}updateElement(t,e,i,s){x(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!x(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;let a=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,i=this._cachedMeta.data;for(let[s,a,o]of this._syncList)this[s](a,o);this._syncList=[];let n=i.length,r=e.length,l=Math.min(r,n);l&&this.parse(0,l),r>n?this._insertElements(n,r-n,t):r<n&&this._removeElements(r,n-r)}_insertElements(t,e,i=!0){let s;let a=this._cachedMeta,o=a.data,n=t+e,r=t=>{for(t.length+=e,s=t.length-1;s>=n;s--)t[s]=t[s-e]};for(r(o),s=t;s<n;++s)o[s]=new this.dataElementType;this._parsing&&r(a._parsed),this.parse(t,e),i&&this.updateElements(o,t,e,"reset")}updateElements(t,e,i,s){}_removeElements(t,e){let i=this._cachedMeta;if(this._parsing){let s=i._parsed.splice(t,e);i._stacked&&m(i,s)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{let[e,i,s]=t;this[e](i,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){let t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);let i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function y(){throw Error("This method is not implemented: Check that a complete date adapter is provided.")}class w{static override(t){Object.assign(w.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return y()}parse(){return y()}format(){return y()}add(){return y()}diff(){return y()}startOf(){return y()}endOf(){return y()}}function k(t,e,i,a,o){let n=t.getSortedVisibleDatasetMetas(),r=i[e];for(let l=0,h=n.length;l<h;++l){let{index:d,data:c}=n[l],{lo:u,hi:g}=function(t,e,i,a){let{controller:o,data:n,_sorted:r}=t,l=o._cachedMeta.iScale;if(l&&e===l.axis&&"r"!==e&&r&&n.length){let h=l._reversePixels?s.A:s.B;if(!a)return h(n,e,i);if(o._sharedOptions){let d=n[0],c="function"==typeof d.getRange&&d.getRange(e);if(c){let u=h(n,e,i-c),g=h(n,e,i+c);return{lo:u.lo,hi:g.hi}}}}return{lo:0,hi:n.length-1}}(n[l],e,r,o);for(let f=u;f<=g;++f){let p=c[f];p.skip||a(p,d,f)}}}function M(t,e,i,a,o){let n=[];return(o||t.isPointInArea(e))&&k(t,i,e,function(i,r,l){(o||(0,s.C)(i,t.chartArea,0))&&i.inRange(e.x,e.y,a)&&n.push({element:i,datasetIndex:r,index:l})},!0),n}function S(t,e,i,a,o,n){let r;return n||t.isPointInArea(e)?"r"!==i||a?function(t,e,i,s,a,o){let n=[],r=function(t){let e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,s){let a=e?Math.abs(t.x-s.x):0,o=i?Math.abs(t.y-s.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(o,2))}}(i),l=Number.POSITIVE_INFINITY;return k(t,i,e,function(i,h,d){let c=i.inRange(e.x,e.y,a);if(s&&!c)return;let u=i.getCenterPoint(a),g=!!o||t.isPointInArea(u);if(!g&&!c)return;let f=r(e,u);f<l?(n=[{element:i,datasetIndex:h,index:d}],l=f):f===l&&n.push({element:i,datasetIndex:h,index:d})}),n}(t,e,i,a,o,n):(r=[],k(t,i,e,function(t,i,a){let{startAngle:n,endAngle:l}=t.getProps(["startAngle","endAngle"],o),{angle:h}=(0,s.D)(t,{x:e.x,y:e.y});(0,s.p)(h,n,l)&&r.push({element:t,datasetIndex:i,index:a})}),r):[]}function D(t,e,i,s,a){let o=[],n="x"===i?"inXRange":"inYRange",r=!1;return(k(t,i,e,(t,s,l)=>{t[n](e[i],a)&&(o.push({element:t,datasetIndex:s,index:l}),r=r||t.inRange(e.x,e.y,a))}),s&&!r)?[]:o}var C={evaluateInteractionItems:k,modes:{index(t,e,i,a){let o=(0,s.z)(e,t),n=i.axis||"x",r=i.includeInvisible||!1,l=i.intersect?M(t,o,n,a,r):S(t,o,n,!1,a,r),h=[];
6return l.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{let e=l[0].index,i=t.data[e];i&&!i.skip&&h.push({element:i,datasetIndex:t.index,index:e})}),h):[]},dataset(t,e,i,a){let o=(0,s.z)(e,t),n=i.axis||"xy",r=i.includeInvisible||!1,l=i.intersect?M(t,o,n,a,r):S(t,o,n,!1,a,r);if(l.length>0){let h=l[0].datasetIndex,d=t.getDatasetMeta(h).data;l=[];for(let c=0;c<d.length;++c)l.push({element:d[c],datasetIndex:h,index:c})}return l},point(t,e,i,a){let o=(0,s.z)(e,t),n=i.axis||"xy",r=i.includeInvisible||!1;return M(t,o,n,a,r)},nearest(t,e,i,a){let o=(0,s.z)(e,t),n=i.axis||"xy",r=i.includeInvisible||!1;return S(t,o,n,i.intersect,a,r)},x(t,e,i,a){let o=(0,s.z)(e,t);return D(t,o,"x",i.intersect,a)},y(t,e,i,a){let o=(0,s.z)(e,t);return D(t,o,"y",i.intersect,a)}}};let P=["left","top","right","bottom"];function A(t,e){return t.filter(t=>t.pos===e)}function L(t,e){return t.filter(t=>-1===P.indexOf(t.pos)&&t.box.axis===e)}function T(t,e){return t.sort((t,i)=>{let s=e?i:t,a=e?t:i;return s.weight===a.weight?s.index-a.index:s.weight-a.weight})}function z(t,e,i,s){return Math.max(t[i],e[i])+Math.max(t[s],e[s])}function O(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 E(t,e,i,a){let o,n,r,l,h,d;let c=[];for(o=0,n=t.length,h=0;o<n;++o){(l=(r=t[o]).box).update(r.width||e.w,r.height||e.h,function(t,e){let i=e.maxPadding;return function(t){let s={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{s[t]=Math.max(e[t],i[t])}),s}(t?["left","right"]:["top","bottom"])}(r.horizontal,e));let{same:u,other:g}=function(t,e,i,a){let{pos:o,box:n}=i,r=t.maxPadding;if(!(0,s.i)(o)){i.size&&(t[o]-=i.size);let l=a[i.stack]||{size:0,count:1};l.size=Math.max(l.size,i.horizontal?n.height:n.width),i.size=l.size/l.count,t[o]+=i.size}n.getPadding&&O(r,n.getPadding());let h=Math.max(0,e.outerWidth-z(r,t,"left","right")),d=Math.max(0,e.outerHeight-z(r,t,"top","bottom")),c=h!==t.w,u=d!==t.h;return t.w=h,t.h=d,i.horizontal?{same:c,other:u}:{same:u,other:c}}(e,i,r,a);h|=u&&c.length,d=d||g,l.fullSize||c.push(r)}return h&&E(c,e,i,a)||d}function I(t,e,i,s,a){t.top=i,t.left=e,t.right=e+s,t.bottom=i+a,t.width=s,t.height=a}function F(t,e,i,a){let o=i.padding,{x:n,y:r}=e;for(let l of t){let h=l.box,d=a[l.stack]||{count:1,placed:0,weight:1},c=l.stackWeight/d.weight||1;if(l.horizontal){let u=e.w*c,g=d.size||h.height;(0,s.h)(d.start)&&(r=d.start),h.fullSize?I(h,o.left,r,i.outerWidth-o.right-o.left,g):I(h,e.left+d.placed,r,u,g),d.start=r,d.placed+=u,r=h.bottom}else{let f=e.h*c,p=d.size||h.width;(0,s.h)(d.start)&&(n=d.start),h.fullSize?I(h,n,o.top,p,i.outerHeight-o.bottom-o.top):I(h,n,e.top+d.placed,p,f),d.start=n,d.placed+=f,n=h.right}}e.x=n,e.y=r}var R={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){let i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,a){if(!t)return;let o=(0,s.E)(t.options.layout.padding),n=Math.max(e-o.width,0),r=Math.max(i-o.height,0),l=function(t){let e=function(t){let e,i,s,a,o,n;let r=[];for(e=0,i=(t||[]).length;e<i;++e)s=t[e],({position:a,options:{stack:o,stackWeight:n=1}}=s),r.push({index:e,box:s,pos:a,horizontal:s.isHorizontal(),weight:s.weight,stack:o&&a+o,stackWeight:n});return r}(t),i=T(e.filter(t=>t.box.fullSize),!0),s=T(A(e,"left"),!0),a=T(A(e,"right")),o=T(A(e,"top"),!0),n=T(A(e,"bottom")),r=L(e,"x"),l=L(e,"y");return{fullSize:i,leftAndTop:s.concat(o),rightAndBottom:a.concat(l).concat(n).concat(r),chartArea:A(e,"chartArea"),vertical:s.concat(a).concat(l),horizontal:o.concat(n).concat(r)}}(t.boxes),h=l.vertical,d=l.horizontal;(0,s.F)(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});let c=h.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:o,availableWidth:n,availableHeight:r,vBoxMaxWidth:n/2/c,hBoxMaxHeight:r/2}),g=Object.assign({},o);O(g,(0,s.E)(a));let f=Object.assign({maxPadding:g,w:n,h:r,x:o.left,y:o.top},o),p=function(t,e){let i,s,a;let o=function(t){let e={};for(let i of t){let{stack:s,pos:a,stackWeight:o}=i;if(!s||!P.includes(a))continue;let n=e[s]||(e[s]={count:0,placed:0,weight:0,size:0});n.count++,n.weight+=o}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e;for(i=0,s=t.length;i<s;++i){a=t[i];let{fullSize:l}=a.box,h=o[a.stack],d=h&&a.stackWeight/h.weight;a.horizontal?(a.width=d?d*n:l&&e.availableWidth,a.height=r):(a.width=n,a.height=d?d*r:l&&e.availableHeight)}return o}(h.concat(d),u);E(l.fullSize,f,u,p),E(h,f,u,p),E(d,f,u,p)&&E(h,f,u,p),function(t){let e=t.maxPadding;function i(i){let s=Math.max(e[i]-t[i],0);return t[i]+=s,s}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),F(l.leftAndTop,f,u,p),f.x+=f.w,f.y+=f.h,F(l.rightAndBottom,f,u,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},(0,s.F)(l.chartArea,e=>{let i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class H{acquireContext(t,e){}releaseContext(t){return!1}
6addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class B extends H{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}let V="$chartjs",j={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},$=t=>null===t||""===t,W=!!s.K&&{passive:!0};function N(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,W)}function U(t,e){for(let i of t)if(i===e||i.contains(e))return!0}function Y(t,e,i){let s=t.canvas,a=new MutationObserver(t=>{let e=!1;for(let a of t)e=(e=e||U(a.addedNodes,s))&&!U(a.removedNodes,s);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}function Q(t,e,i){let s=t.canvas,a=new MutationObserver(t=>{let e=!1;for(let a of t)e=(e=e||U(a.removedNodes,s))&&!U(a.addedNodes,s);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}let X=new Map,q=0;function K(){let t=window.devicePixelRatio;
6t!==q&&(q=t,X.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function G(t,e,i){let a=t.canvas,o=a&&(0,s.I)(a);if(!o)return;let n=(0,s.L)((t,e)=>{let s=o.clientWidth;i(t,e),s<o.clientWidth&&i()},window),r=new ResizeObserver(t=>{let e=t[0],i=e.contentRect.width,s=e.contentRect.height;(0!==i||0!==s)&&n(i,s)});return r.observe(o),X.size||window.addEventListener("resize",K),X.set(t,n),r}function J(t,e,i){i&&i.disconnect(),"resize"===e&&(X.delete(t),X.size||window.removeEventListener("resize",K))}function Z(t,e,i){let a=t.canvas,o=(0,s.L)(e=>{null!==t.ctx&&i(function(t,e){let i=j[t.type]||t.type,{x:a,y:o}=(0,s.z)(t,e);return{type:i,chart:e,native:t,x:void 0!==a?a:null,y:void 0!==o?o:null}}(e,t))},t);return a&&a.addEventListener(e,o,W),o}class tt extends H{acquireContext(t,e){let i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(!function(t,e){let i=t.style,a=t.getAttribute("height"),o=t.getAttribute("width");if(t[V]={initial:{height:a,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",$(o)){let n=(0,s.J)(t,"width");void 0!==n&&(t.width=n)}if($(a)){if(""===t.style.height)t.height=t.width/(e||2);else{let r=(0,s.J)(t,"height");void 0!==r&&(t.height=r)}}}(t,e),i):null}releaseContext(t){let e=t.canvas;if(!e[V])return!1;let i=e[V].initial;["height","width"].forEach(t=>{let a=i[t];(0,s.k)(a)?e.removeAttribute(t):e.setAttribute(t,a)});let a=i.style||{};return Object.keys(a).forEach(t=>{e.style[t]=a[t]}),e.width=e.width,delete e[V],!0}addEventListener(t,e,i){this.removeEventListener(t,e);let s=t.$proxies||(t.$proxies={});s[e]=(({attach:Y,detach:Q,resize:G})[e]||Z)(t,e,i)}removeEventListener(t,e){let i=t.$proxies||(t.$proxies={}),s=i[e];s&&((({attach:J,detach:J,resize:J})[e]||N)(t,e,s),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,a){return(0,s.G)(t,e,i,a)}isAttached(t){let e=(0,s.I)(t);return!!(e&&e.isConnected)}}class te{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){let{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return(0,s.x)(this.x)&&(0,s.x)(this.y)}getProps(t,e){let i=this.$animations;if(!e||!i)return this;let s={};return t.forEach(t=>{s[t]=i[t]&&i[t].active()?i[t]._to:this[t]}),s}}function ti(t,e,i,a,o){let n,r,l;let h=(0,s.v)(a,0),d=Math.min((0,s.v)(o,t.length),t.length),c=0;for(i=Math.ceil(i),o&&(i=(n=o-a)/Math.floor(n/i)),l=h;l<0;)l=Math.round(h+ ++c*i);for(r=Math.max(h,0);r<d;r++)r===l&&(e.push(t[r]),l=Math.round(h+ ++c*i))}let ts=t=>"left"===t?"right":"right"===t?"left":t,ta=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,to=(t,e)=>Math.min(e||t,t);function tn(t,e){let i=[],s=t.length/e,a=t.length,o=0;for(;o<a;o+=s)i.push(t[Math.floor(o)]);return i}function tr(t){return t.drawTicks?t.tickLength:0}function tl(t,e){if(!t.display)return 0;let i=(0,s.a0)(t.font,e),a=(0,s.E)(t.padding),o=(0,s.b)(t.text)?t.text.length:1;return o*i.lineHeight+a.height}class th extends te{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:a}=this;return t=(0,s.O)(t,Number.POSITIVE_INFINITY),e=(0,s.O)(e,Number.NEGATIVE_INFINITY),i=(0,s.O)(i,Number.POSITIVE_INFINITY),a=(0,s.O)(a,Number.NEGATIVE_INFINITY),{min:(0,s.O)(t,i),max:(0,s.O)(e,a),minDefined:(0,s.g)(t),maxDefined:(0,s.g)(e)}}getMinMax(t){let e,{min:i,max:a,minDefined:o,maxDefined:n}=this.getUserBounds();if(o&&n)return{min:i,max:a};let r=this.getMatchingVisibleMetas();for(let l=0,h=r.length;l<h;++l)e=r[l].controller.getMinMax(this,t),o||(i=Math.min(i,e.min)),n||(a=Math.max(a,e.max));return i=n&&i>a?a:i,a=o&&i>a?i:a,{min:(0,s.O)(i,(0,s.O)(a,i)),max:(0,s.O)(a,(0,s.O)(i,a))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}
6getLabelItems(t=this.chart.chartArea){let e=this._labelItems||(this._labelItems=this._computeLabelItems(t));return e}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){(0,s.Q)(this.options.beforeUpdate,[this])}update(t,e,i){let{beginAtZero:a,grace:o,ticks:n}=this.options,r=n.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=(0,s.R)(this,o,a),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=r<this.ticks.length;this._convertTicksToLabels(l?tn(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),n.display&&(n.autoSkip||"auto"===n.source)&&(this.ticks=function(t,e){let i=t.options.ticks,a=function(t){let e=t.options.offset,i=t._tickSize(),s=t._length/i+(e?0:1),a=t._maxLength/i;return Math.floor(Math.min(s,a))}(t),o=Math.min(i.maxTicksLimit||a,a),n=i.major.enabled?function(t){let e,i;let s=[];for(e=0,i=t.length;e<i;e++)t[e].major&&s.push(e);return s}(e):[],r=n.length,l=n[0],h=n[r-1],d=[];if(r>o)return function(t,e,i,s){let a,o=0,n=i[0];for(a=0,s=Math.ceil(s);a<t.length;a++)a===n&&(e.push(t[a]),n=i[++o*s])}(e,d,n,r/o),d;let c=function(t,e,i){let a=function(t){let e,i;let s=t.length;if(s<2)return!1;for(i=t[0],e=1;e<s;++e)if(t[e]-t[e-1]!==i)return!1;return i}(t),o=e.length/i;if(!a)return Math.max(o,1);let n=(0,s.N)(a);for(let r=0,l=n.length-1;r<l;r++){let h=n[r];if(h>o)return h}return Math.max(o,1)}(n,e,o);if(r>0){let u,g;let f=r>1?Math.round((h-l)/(r-1)):null;for(ti(e,d,c,(0,s.k)(f)?0:l-f,l),u=0,g=r-1;u<g;u++)ti(e,d,c,n[u],n[u+1]);return ti(e,d,c,h,(0,s.k)(f)?e.length:h+f),d}return ti(e,d,c),d}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&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(){(0,s.Q)(this.options.afterUpdate,[this])}beforeSetDimensions(){(0,s.Q)(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(){(0,s.Q)(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),(0,s.Q)(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){(0,s.Q)(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){let e,i,a;let o=this.options.ticks;for(e=0,i=t.length;e<i;e++)(a=t[e]).label=(0,s.Q)(o.callback,[a.value,e,t],this)}afterTickToLabelConversion(){(0,s.Q)(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){(0,s.Q)(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let t,e,i;let a=this.options,o=a.ticks,n=to(this.ticks.length,a.ticks.maxTicksLimit),r=o.minRotation||0,l=o.maxRotation,h=r;if(!this._isVisible()||!o.display||r>=l||n<=1||!this.isHorizontal()){this.labelRotation=r;return}let d=this._getLabelSizes(),c=d.widest.width,u=d.highest.height,g=(0,s.S)(this.chart.width-c,0,this.maxWidth);c+6>(t=a.offset?this.maxWidth/n:g/(n-1))&&(t=g/(n-(a.offset?.5:1)),e=this.maxHeight-tr(a.grid)-o.padding-tl(a.title,this.chart.options.font),i=Math.sqrt(c*c+u*u),h=Math.max(r,Math.min(l,h=(0,s.U)(Math.min(Math.asin((0,s.S)((d.highest.height+6)/t,-1,1)),Math.asin((0,s.S)(e/i,-1,1))-Math.asin((0,s.S)(u/i,-1,1))))))),this.labelRotation=h}afterCalculateLabelRotation(){(0,s.Q)(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){(0,s.Q)(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:e,options:{ticks:i,title:a,grid:o}}=this,n=this._isVisible(),r=this.isHorizontal();if(n){let l=tl(a,e.options.font);if(r?(t.width=this.maxWidth,t.height=tr(o)+l):(t.height=this.maxHeight,t.width=tr(o)+l),i.display&&this.ticks.length){let{first:h,last:d,widest:c,highest:u}
6=this._getLabelSizes(),g=2*i.padding,f=(0,s.t)(this.labelRotation),p=Math.cos(f),m=Math.sin(f);if(r){let x=i.mirror?0:m*c.width+p*u.height;t.height=Math.min(this.maxHeight,t.height+x+g)}else{let _=i.mirror?0:p*c.width+m*u.height;t.width=Math.min(this.maxWidth,t.width+_+g)}this._calculatePadding(h,d,m,p)}}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,s){let{ticks:{align:a,padding:o},position:n}=this.options,r=0!==this.labelRotation,l="top"!==n&&"x"===this.axis;if(this.isHorizontal()){let h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1),c=0,u=0;r?l?(c=s*t.width,u=i*e.height):(c=i*t.height,u=s*e.width):"start"===a?u=e.width:"end"===a?c=t.width:"inner"!==a&&(c=t.width/2,u=e.width/2),this.paddingLeft=Math.max((c-h+o)*this.width/(this.width-h),0),this.paddingRight=Math.max((u-d+o)*this.width/(this.width-d),0)}else{let g=e.height/2,f=t.height/2;"start"===a?(g=0,f=t.height):"end"===a&&(g=e.height,f=0),this.paddingTop=g+o,this.paddingBottom=f+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){(0,s.Q)(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)(0,s.k)(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){let e=this.options.ticks.sampleSize,i=this.ticks;e<i.length&&(i=tn(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){let a,o,n,r,l,h,d,c,u,g,f;let{ctx:p,_longestTextCache:m}=this,x=[],_=[],b=Math.floor(e/to(e,i)),v=0,y=0;for(a=0;a<e;a+=b){if(r=t[a].label,l=this._resolveTickFontOptions(a),p.font=h=l.string,d=m[h]=m[h]||{data:{},gc:[]},c=l.lineHeight,u=g=0,(0,s.k)(r)||(0,s.b)(r)){if((0,s.b)(r))for(o=0,n=r.length;o<n;++o)f=r[o],(0,s.k)(f)||(0,s.b)(f)||(u=(0,s.V)(p,d.data,d.gc,u,f),g+=c)}else u=(0,s.V)(p,d.data,d.gc,u,r),g=c;x.push(u),_.push(g),v=Math.max(u,v),y=Math.max(g,y)}(0,s.F)(m,t=>{let i;let s=t.gc,a=s.length/2;if(a>e){for(i=0;i<a;++i)delete t.data[s[i]];s.splice(0,a)}});let w=x.indexOf(v),k=_.indexOf(y),M=t=>({width:x[t]||0,height:_[t]||0});return{first:M(0),last:M(e-1),widest:M(w),highest:M(k),widths:x,heights:_}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let e=this._startPixel+t*this._length;return(0,s.W)(this._alignToPixels?(0,s.X)(this.chart,e,0):e)}getDecimalForPixel(t){let e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){var e,i;let a=this.ticks||[];if(t>=0&&t<a.length){let o=a[t];return o.$context||(o.$context=(e=this.getContext(),(0,s.j)(e,{tick:o,index:t,type:"tick"})))}return this.$context||(this.$context=(i=this.chart.getContext(),(0,s.j)(i,{scale:this,type:"scale"})))}_tickSize(){let t=this.options.ticks,e=(0,s.t)(this.labelRotation),i=Math.abs(Math.cos(e)),a=Math.abs(Math.sin(e)),o=this._getLabelSizes(),n=t.autoSkipPadding||0,r=o?o.widest.width+n:0,l=o?o.highest.height+n:0;return this.isHorizontal()?l*i>r*a?r/i:l/a:l*a<r*i?l/i:r/a}_isVisible(){let t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){let e,i,a,o,n,r,l,h,d,c,u,g;let f=this.axis,p=this.chart,m=this.options,{grid:x,position:_,border:b}=m,v=x.offset,y=this.isHorizontal(),w=this.ticks,k=w.length+(v?1:0),M=tr(x),S=[],D=b.setContext(this.getContext()),C=D.display?D.width:0,P=C/2,A=function(t){return(0,s.X)(p,t,C)};if("top"===_)e=A(this.bottom),r=this.bottom-M,h=e-P,c=A(t.top)+P,g=t.bottom;else if("bottom"===_)e=A(this.top),c=t.top,g=A(t.bottom)-P,r=e+P,h=this.top+M;else if("left"===_)e=A(this.right),n=this.right-M,l=e-P,d=A(t.left)+P,u=t.right;else if("right"===_)e=A(this.left),d=t.left,u=A(t.right)-P,n=e+P,l=this.left+M;
6else if("x"===f){if("center"===_)e=A((t.top+t.bottom)/2+.5);else if((0,s.i)(_)){let L=Object.keys(_)[0],T=_[L];e=A(this.chart.scales[L].getPixelForValue(T))}c=t.top,g=t.bottom,h=(r=e+P)+M}else if("y"===f){if("center"===_)e=A((t.left+t.right)/2);else if((0,s.i)(_)){let z=Object.keys(_)[0],O=_[z];e=A(this.chart.scales[z].getPixelForValue(O))}l=(n=e-P)-M,d=t.left,u=t.right}let E=(0,s.v)(m.ticks.maxTicksLimit,k),I=Math.max(1,Math.ceil(k/E));for(i=0;i<k;i+=I){let F=this.getContext(i),R=x.setContext(F),H=b.setContext(F),B=R.lineWidth,V=R.color,j=H.dash||[],$=H.dashOffset,W=R.tickWidth,N=R.tickColor,U=R.tickBorderDash||[],Y=R.tickBorderDashOffset;void 0!==(a=function(t,e,i){let s;let a=t.ticks.length,o=Math.min(e,a-1),n=t._startPixel,r=t._endPixel,l=t.getPixelForTick(o);if(!i||(s=1===a?Math.max(l-n,r-l):0===e?(t.getPixelForTick(1)-l)/2:(l-t.getPixelForTick(o-1))/2,!((l+=o<e?s:-s)<n-1e-6)&&!(l>r+1e-6)))return l}(this,i,v))&&(o=(0,s.X)(p,a,B),y?n=l=d=u=o:r=h=c=g=o,S.push({tx1:n,ty1:r,tx2:l,ty2:h,x1:d,y1:c,x2:u,y2:g,width:B,color:V,borderDash:j,borderDashOffset:$,tickWidth:W,tickColor:N,tickBorderDash:U,tickBorderDashOffset:Y}))}return this._ticksLength=k,this._borderValue=e,S}_computeLabelItems(t){let e,i,a,o,n,r,l,h,d,c,u;let g=this.axis,f=this.options,{position:p,ticks:m}=f,x=this.isHorizontal(),_=this.ticks,{align:b,crossAlign:v,padding:y,mirror:w}=m,k=tr(f.grid),M=k+y,S=w?-y:M,D=-(0,s.t)(this.labelRotation),C=[],P="middle";if("top"===p)n=this.bottom-S,r=this._getXAxisLabelAlignment();else if("bottom"===p)n=this.top+S,r=this._getXAxisLabelAlignment();else if("left"===p){let A=this._getYAxisLabelAlignment(k);r=A.textAlign,o=A.x}else if("right"===p){let L=this._getYAxisLabelAlignment(k);r=L.textAlign,o=L.x}else if("x"===g){if("center"===p)n=(t.top+t.bottom)/2+M;else if((0,s.i)(p)){let T=Object.keys(p)[0],z=p[T];n=this.chart.scales[T].getPixelForValue(z)+M}r=this._getXAxisLabelAlignment()}else if("y"===g){if("center"===p)o=(t.left+t.right)/2-M;else if((0,s.i)(p)){let O=Object.keys(p)[0],E=p[O];o=this.chart.scales[O].getPixelForValue(E)}r=this._getYAxisLabelAlignment(k).textAlign}"y"===g&&("start"===b?P="top":"end"===b&&(P="bottom"));let I=this._getLabelSizes();for(e=0,i=_.length;e<i;++e){let F;a=_[e].label;let R=m.setContext(this.getContext(e));l=this.getPixelForTick(e)+m.labelOffset,d=(h=this._resolveTickFontOptions(e)).lineHeight,c=(0,s.b)(a)?a.length:1;let H=c/2,B=R.color,V=R.textStrokeColor,j=R.textStrokeWidth,$=r;if(x?(o=l,"inner"===r&&($=e===i-1?this.options.reverse?"left":"right":0===e?this.options.reverse?"right":"left":"center"),u="top"===p?"near"===v||0!==D?-c*d+d/2:"center"===v?-I.highest.height/2-H*d+d:-I.highest.height+d/2:"near"===v||0!==D?d/2:"center"===v?I.highest.height/2-H*d:I.highest.height-c*d,w&&(u*=-1),0===D||R.showLabelBackdrop||(o+=d/2*Math.sin(D))):(n=l,u=(1-c)*d/2),R.showLabelBackdrop){let W=(0,s.E)(R.backdropPadding),N=I.heights[e],U=I.widths[e],Y=u-W.top,Q=0-W.left;switch(P){case"middle":Y-=N/2;break;case"bottom":Y-=N}switch(r){case"center":Q-=U/2;break;case"right":Q-=U;break;case"inner":e===i-1?Q-=U:e>0&&(Q-=U/2)}F={left:Q,top:Y,width:U+W.width,height:N+W.height,color:R.backdropColor}}C.push({label:a,font:h,textOffset:u,options:{rotation:D,color:B,strokeColor:V,strokeWidth:j,textAlign:$,textBaseline:P,translation:[o,n],backdrop:F}})}return C}_getXAxisLabelAlignment(){let{position:t,ticks:e}=this.options,i=-(0,s.t)(this.labelRotation);if(i)return"top"===t?"left":"right";let a="center";return"start"===e.align?a="left":"end"===e.align?a="right":"inner"===e.align&&(a="inner"),a}_getYAxisLabelAlignment(t){let e,i;let{position:s,ticks:{crossAlign:a,mirror:o,padding:n}}=this.options,r=this._getLabelSizes(),l=t+n,h=r.widest.width;return"left"===s?o?(i=this.right+n,"near"===a?e="left":"center"===a?(e="center",i+=h/2):(e="right",i+=h)):(i=this.right-l,"near"===a?e="right":"center"===a?(e="center",i-=h/2):(e="left",i=this.left)):"right"===s?o?(i=this.left+n,"near"===a?e="right":"center"===a?(e="center",i-=h/2):(e="left",i-=h)):(i=this.left+l,"near"===a?e="left":"center"===a?(e="center",i+=h/2):(e="right",i=this.right)):e="right",{textAlign:e,x:i}}_computeLabelArea(){if(this.options.ticks.mirror)return;let t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}
6:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){let{ctx:t,options:{backgroundColor:e},left:i,top:s,width:a,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,a,o),t.restore())}getLineWidthForValue(t){let e=this.options.grid;if(!this._isVisible()||!e.display)return 0;let i=this.ticks,s=i.findIndex(e=>e.value===t);if(s>=0){let a=e.setContext(this.getContext(s));return a.lineWidth}return 0}drawGrid(t){let e,i;let s=this.options.grid,a=this.ctx,o=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),n=(t,e,i)=>{i.width&&i.color&&(a.save(),a.lineWidth=i.width,a.strokeStyle=i.color,a.setLineDash(i.borderDash||[]),a.lineDashOffset=i.borderDashOffset,a.beginPath(),a.moveTo(t.x,t.y),a.lineTo(e.x,e.y),a.stroke(),a.restore())};if(s.display)for(e=0,i=o.length;e<i;++e){let r=o[e];s.drawOnChartArea&&n({x:r.x1,y:r.y1},{x:r.x2,y:r.y2},r),s.drawTicks&&n({x:r.tx1,y:r.ty1},{x:r.tx2,y:r.ty2},{color:r.tickColor,width:r.tickWidth,borderDash:r.tickBorderDash,borderDashOffset:r.tickBorderDashOffset})}}drawBorder(){let t,e,i,a;let{chart:o,ctx:n,options:{border:r,grid:l}}=this,h=r.setContext(this.getContext()),d=r.display?h.width:0;if(!d)return;let c=l.setContext(this.getContext(0)).lineWidth,u=this._borderValue;this.isHorizontal()?(t=(0,s.X)(o,this.left,d)-d/2,e=(0,s.X)(o,this.right,c)+c/2,i=a=u):(i=(0,s.X)(o,this.top,d)-d/2,a=(0,s.X)(o,this.bottom,c)+c/2,t=e=u),n.save(),n.lineWidth=h.width,n.strokeStyle=h.color,n.beginPath(),n.moveTo(t,i),n.lineTo(e,a),n.stroke(),n.restore()}drawLabels(t){let e=this.options.ticks;if(!e.display)return;let i=this.ctx,a=this._computeLabelArea();a&&(0,s.Y)(i,a);let o=this.getLabelItems(t);for(let n of o){let r=n.options,l=n.font,h=n.label,d=n.textOffset;(0,s.Z)(i,h,0,d,l,r)}a&&(0,s.$)(i)}drawTitle(){let t;let{ctx:e,options:{position:i,title:a,reverse:o}}=this;if(!a.display)return;let n=(0,s.a0)(a.font),r=(0,s.E)(a.padding),l=a.align,h=n.lineHeight/2;"bottom"===i||"center"===i||(0,s.i)(i)?(h+=r.bottom,(0,s.b)(a.text)&&(h+=n.lineHeight*(a.text.length-1))):h+=r.top;let{titleX:d,titleY:c,maxWidth:u,rotation:g}=function(t,e,i,a){let o,n,r;let{top:l,left:h,bottom:d,right:c,chart:u}=t,{chartArea:g,scales:f}=u,p=0,m=d-l,x=c-h;if(t.isHorizontal()){if(n=(0,s.a2)(a,h,c),(0,s.i)(i)){let _=Object.keys(i)[0],b=i[_];r=f[_].getPixelForValue(b)+m-e}else r="center"===i?(g.bottom+g.top)/2+m-e:ta(t,i,e);o=c-h}else{if((0,s.i)(i)){let v=Object.keys(i)[0],y=i[v];n=f[v].getPixelForValue(y)-x+e}else n="center"===i?(g.left+g.right)/2-x+e:ta(t,i,e);r=(0,s.a2)(a,d,l),p="left"===i?-s.H:s.H}return{titleX:n,titleY:r,maxWidth:o,rotation:p}}(this,h,i,l);(0,s.Z)(e,a.text,0,0,n,{color:a.color,maxWidth:u,rotation:g,textAlign:(t=(0,s.a1)(l),(o&&"right"!==i||!o&&"right"===i)&&(t=ts(t)),t),textBaseline:"middle",translation:[d,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){let t=this.options,e=t.ticks&&t.ticks.z||0,i=(0,s.v)(t.grid&&t.grid.z,-1),a=(0,s.v)(t.border&&t.border.z,0);return this._isVisible()&&this.draw===th.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:a,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){let e,i;let s=this.chart.getSortedVisibleDatasetMetas(),a=this.axis+"AxisID",o=[];for(e=0,i=s.length;e<i;++e){let n=s[e];n[a]!==this.id||t&&n.type!==t||o.push(n)}return o}_resolveTickFontOptions(t){let e=this.options.ticks.setContext(this.getContext(t));return(0,s.a0)(e.font)}_maxDigits(){let t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class td{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){let e;let i=Object.getPrototypeOf(t);"id"in i&&"defaults"in i&&(e=this.register(i));let a=this.items,o=t.id,n=this.scope+"."+o;if(!o)throw Error("class does not have id: "+t);
6return o in a||(a[o]=t,function(t,e,i){let a=(0,s.a4)(Object.create(null),[i?s.d.get(i):{},s.d.get(e),t.defaults]);s.d.set(e,a),t.defaultRoutes&&function(t,e){Object.keys(e).forEach(i=>{let a=i.split("."),o=a.pop(),n=[t].concat(a).join("."),r=e[i].split("."),l=r.pop(),h=r.join(".");s.d.route(n,o,h,l)})}(e,t.defaultRoutes),t.descriptors&&s.d.describe(e,t.descriptors)}(t,n,e),this.override&&s.d.override(t.id,t.overrides)),n}get(t){return this.items[t]}unregister(t){let e=this.items,i=t.id,a=this.scope;i in e&&delete e[i],a&&i in s.d[a]&&(delete s.d[a][i],this.override&&delete s.a3[i])}}var tc=new class{constructor(){this.controllers=new td(v,"datasets",!0),this.elements=new td(te,"elements"),this.plugins=new td(Object,"plugins"),this.scales=new td(th,"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=>{let a=i||this._getRegistryForType(e);i||a.isForType(e)||a===this.plugins&&e.id?this._exec(t,a,e):(0,s.F)(e,e=>{let s=i||this._getRegistryForType(e);this._exec(t,s,e)})})}_exec(t,e,i){let a=(0,s.a5)(t);(0,s.Q)(i["before"+a],[],i),e[t](i),(0,s.Q)(i["after"+a],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){let i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){let s=e.get(t);if(void 0===s)throw Error('"'+t+'" is not a registered '+i+".");return s}};class tu{constructor(){this._init=[]}notify(t,e,i,s){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));let a=s?this._descriptors(t).filter(s):this._descriptors(t),o=this._notify(a,t,e,i);return"afterDestroy"===e&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,e,i,a){for(let o of(a=a||{},t)){let n=o.plugin,r=n[i],l=[e,a,o.options];if(!1===(0,s.Q)(r,l,n)&&a.cancelable)return!1}return!0}invalidate(){(0,s.k)(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;let e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){let i=t&&t.config,a=(0,s.v)(i.options&&i.options.plugins,{}),o=function(t){let e={},i=[],s=Object.keys(tc.plugins.items);for(let a=0;a<s.length;a++)i.push(tc.getPlugin(s[a]));let o=t.plugins||[];for(let n=0;n<o.length;n++){let r=o[n];-1===i.indexOf(r)&&(i.push(r),e[r.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==a||e?function(t,{plugins:e,localIds:i},s,a){let o=[],n=t.getContext();for(let r of e){var l;let h=r.id,d=(l=s[h],a||!1!==l?!0===l?{}:l:null);null!==d&&o.push({plugin:r,options:function(t,{plugin:e,local:i},s,a){let o=t.pluginScopeKeys(e),n=t.getOptionScopes(s,o);return i&&e.defaults&&n.push(e.defaults),t.createResolver(n,a,[""],{scriptable:!1,indexable:!1,allKeys:!0})}(t.config,{plugin:r,local:i[h]},d,n)})}return o}(t,o,a,e):[]}_notifyStateChanges(t){let e=this._oldCache||[],i=this._cache,s=(t,e)=>t.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function tg(t,e){let i=s.d.datasets[t]||{},a=(e.datasets||{})[t]||{};return a.indexAxis||e.indexAxis||i.indexAxis||"x"}function tf(t){if("x"===t||"y"===t||"r"===t)return t}function tp(t,...e){if(tf(t))return t;for(let i of e){var s;
6let a=i.axis||("top"===(s=i.position)||"bottom"===s?"x":"left"===s||"right"===s?"y":void 0)||t.length>1&&tf(t[0].toLowerCase());if(a)return a}throw Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function tm(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function tx(t){let e=t.options||(t.options={});e.plugins=(0,s.v)(e.plugins,{}),e.scales=function(t,e){let i=s.a3[t.type]||{scales:{}},a=e.scales||{},o=tg(t.type,e),n=Object.create(null);return Object.keys(a).forEach(e=>{let r=a[e];if(!(0,s.i)(r))return console.error(`Invalid scale configuration for scale: ${e}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);let l=tp(e,r,function(t,e){if(e.data&&e.data.datasets){let i=e.data.datasets.filter(e=>e.xAxisID===t||e.yAxisID===t);if(i.length)return tm(t,"x",i[0])||tm(t,"y",i[0])}return{}}(e,t),s.d.scales[r.type]),h=i.scales||{};n[e]=(0,s.ab)(Object.create(null),[{axis:l},r,h[l],h[l===o?"_index_":"_value_"]])}),t.data.datasets.forEach(i=>{let o=i.type||t.type,r=i.indexAxis||tg(o,e),l=s.a3[o]||{},h=l.scales||{};Object.keys(h).forEach(t=>{let e;let o=(e=t,"_index_"===t?e=r:"_value_"===t&&(e="x"===r?"y":"x"),e),l=i[o+"AxisID"]||o;n[l]=n[l]||Object.create(null),(0,s.ab)(n[l],[{axis:o},a[l],h[t]])})}),Object.keys(n).forEach(t=>{let e=n[t];(0,s.ab)(e,[s.d.scales[e.type],s.d.scale])}),n}(t,e)}function t_(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}let tb=new Map,tv=new Set;function ty(t,e){let i=tb.get(t);return i||(i=e(),tb.set(t,i),tv.add(i)),i}let tw=(t,e,i)=>{let a=(0,s.f)(e,i);void 0!==a&&t.add(a)};class tk{constructor(t){var e;this._config=((e=(e=t)||{}).data=t_(e.data),tx(e),e),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=t_(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),tx(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ty(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return ty(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return ty(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,i=this.type;return ty(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){let i=this._scopeCache,s=i.get(t);return(!s||e)&&(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){let{options:a,type:o}=this,n=this._cachedScopes(t,i),r=n.get(e);if(r)return r;let l=new Set;e.forEach(e=>{t&&(l.add(t),e.forEach(e=>tw(l,t,e))),e.forEach(t=>tw(l,a,t)),e.forEach(t=>tw(l,s.a3[o]||{},t)),e.forEach(t=>tw(l,s.d,t)),e.forEach(t=>tw(l,s.a6,t))});let h=Array.from(l);return 0===h.length&&h.push(Object.create(null)),tv.has(e)&&n.set(e,h),h}chartOptionScopes(){let{options:t,type:e}=this;return[t,s.a3[e]||{},s.d.datasets[e]||{},{type:e},s.d,s.a6]}resolveNamedOptions(t,e,i,a=[""]){let o={$shared:!0},{resolver:n,subPrefixes:r}=tM(this._resolverCache,t,a),l=n;if(function(t,e){let{isScriptable:i,isIndexable:a}=(0,s.aa)(t);for(let o of e){let n=i(o),r=a(o),l=(r||n)&&t[o];if(n&&((0,s.a7)(l)||tS(l))||r&&(0,s.b)(l))return!0}return!1}(n,e)){o.$shared=!1,i=(0,s.a7)(i)?i():i;let h=this.createResolver(t,i,r);l=(0,s.a8)(n,i,h)}for(let d of e)o[d]=l[d];return o}createResolver(t,e,i=[""],a){let{resolver:o}=tM(this._resolverCache,t,i);return(0,s.i)(e)?(0,s.a8)(o,e,void 0,a):o}}function tM(t,e,i){let a=t.get(e);a||(a=new Map,t.set(e,a));let o=i.join(),n=a.get(o);if(!n){let r=(0,s.a9)(e,i);n={resolver:r,subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},a.set(o,n)}return n}let tS=t=>(0,s.i)(t)&&Object.getOwnPropertyNames(t).some(e=>(0,s.a7)(t[e])),tD=["top","bottom","left","right","chartArea"];function tC(t,e){return"top"===t||"bottom"===t||-1===tD.indexOf(t)&&"x"===e}function tP(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function tA(t){let e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),(0,s.Q)(i&&i.onComplete,[t],e)}function tL(t){let e=t.chart,i=e.options.animation;(0,s.Q)(i&&i.onProgress,[t],e)}function tT(t){return(0,s.M)()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}let tz={},tO=t=>{let e=tT(t);return Object.values(tz).filter(t=>t.canvas===e).pop()};function tE(t,e,i){return t.options.clip?t[i]:e[i]}class tI{static defaults=s.d;static instances=tz;static overrides=s.a3;static registry=tc;static version="4.4.2";static getChart=tO;static register(...t){tc.add(...t),tF()}static unregister(...t){tc.remove(...t),tF()}constructor(t,e){let i=this.config=new tk(e),o=tT(t),n=tO(o);if(n)throw Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas with ID '"+n.canvas.id+"' can be reused.");let r=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||(!(0,s.M)()||"undefined"!=typeof OffscreenCanvas&&o instanceof OffscreenCanvas?B:tt)),this.platform.updateConfig(i);let l=this.platform.acquireContext(o,r.aspectRatio),h=l&&l.canvas,d=h&&h.height,c=h&&h.width;if(this.id=(0,s.ac)(),this.ctx=l,this.canvas=h,this.width=c,this.height=d,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new tu,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(0,s.ad)(t=>this.update(t),r.resizeDelay||0),this._dataChanges=[],tz[this.id]=this,!l||!h){console.error("Failed to create chart: can't acquire context from the given item");return}a.listen(this,"complete",tA),a.listen(this,"progress",tL),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:a,_aspectRatio:o}=this;return(0,s.k)(t)?e&&o?o:a?i/a:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return tc}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():(0,s.ae)(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return(0,s.af)(this.canvas,this.ctx),this}stop(){return a.stop(this),this}resize(t,e){a.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let i=this.options,a=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,n=this.platform.getMaximumSize(a,t,e,o),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=n.width,this.height=n.height,this._aspectRatio=this.aspectRatio,(0,s.ae)(this,r,!0)&&(this.notifyPlugins("resize",{size:n}),(0,s.Q)(i.onResize,[this,n],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){let t=this.options,e=t.scales||{};(0,s.F)(e,(t,e)=>{t.id=e})}buildOrUpdateScales(){let t=this.options,e=t.scales,i=this.scales,a=Object.keys(i).reduce((t,e)=>(t[e]=!1,t),{}),o=[];e&&(o=o.concat(Object.keys(e).map(t=>{let i=e[t],s=tp(t,i),a="r"===s,o="x"===s;return{options:i,dposition:a?"chartArea":o?"bottom":"left",dtype:a?"radialLinear":o?"category":"linear"}}))),(0,s.F)(o,e=>{let o=e.options,n=o.id,r=tp(n,o),l=(0,s.v)(o.type,e.dtype);(void 0===o.position||tC(o.position,r)!==tC(e.dposition))&&(o.position=e.dposition),a[n]=!0;let h=null;if(n in i&&i[n].type===l)h=i[n];else{let d=tc.getScale(l);
6i[(h=new d({id:n,type:l,ctx:this.ctx,chart:this})).id]=h}h.init(o,t)}),(0,s.F)(a,(t,e)=>{t||delete i[e]}),(0,s.F)(i,t=>{R.configure(this,t,t.options),R.addBox(this,t)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((t,e)=>t.index-e.index),i>e){for(let s=e;s<i;++s)this._destroyDatasetMeta(s);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(tP("order","index"))}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((t,i)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){let t,e;let i=[],a=this.data.datasets;for(this._removeUnreferencedMetasets(),t=0,e=a.length;t<e;t++){let o=a[t],n=this.getDatasetMeta(t),r=o.type||this.config.type;if(n.type&&n.type!==r&&(this._destroyDatasetMeta(t),n=this.getDatasetMeta(t)),n.type=r,n.indexAxis=o.indexAxis||tg(r,this.options),n.order=o.order||0,n.index=t,n.label=""+o.label,n.visible=this.isDatasetVisible(t),n.controller)n.controller.updateIndex(t),n.controller.linkScales();else{let l=tc.getController(r),{datasetElementType:h,dataElementType:d}=s.d.datasets[r];Object.assign(l,{dataElementType:tc.getElement(d),datasetElementType:h&&tc.getElement(h)}),n.controller=new l(this,t),i.push(n.controller)}}return this._updateMetasets(),i}_resetElements(){(0,s.F)(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),a=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;let o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let n=0;for(let r=0,l=this.data.datasets.length;r<l;r++){let{controller:h}=this.getDatasetMeta(r),d=!a&&-1===o.indexOf(h);h.buildOrUpdateElements(d),n=Math.max(+h.getMaxOverflow(),n)}n=this._minPadding=i.layout.autoPadding?n:0,this._updateLayout(n),a||(0,s.F)(o,t=>{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(tP("z","_idx"));let{_active:c,_lastEvent:u}=this;u?this._eventHandler(u,!0):c.length&&this._updateHoverStyles(c,c,!0),this.render()}_updateScales(){(0,s.F)(this.scales,t=>{R.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(0,s.ag)(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(let{method:i,start:s,count:a}of e){let o="_removeElements"===i?-a:a;!function(t,e,i){let s=Object.keys(t);for(let a of s){let o=+a;if(o>=e){let n=t[a];delete t[a],(i>0||o>e)&&(t[o+i]=n)}}}(t,s,o)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,i=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),a=i(0);for(let o=1;o<e;o++)if(!(0,s.ag)(a,i(o)))return;return Array.from(a).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;R.update(this,this.width,this.height,t);let e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],(0,s.F)(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 e=0,i=this.data.datasets.length;e<i;++e)this.getDatasetMeta(e).controller.configure();for(let a=0,o=this.data.datasets.length;a<o;++a)this._updateDataset(a,(0,s.a7)(t)?t({datasetIndex:a}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){let i=this.getDatasetMeta(t),s={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",s)&&(i.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(a.has(this)?this.attached&&!a.running(this)&&a.start(this):(this.draw(),tA({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){let{width:e,height:i}=this._resizeBeforeDraw;this._resize(e,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;let s=this._layers;for(t=0;t<s.length&&s[t].z<=0;++t)s[t].draw(this.chartArea);for(this._drawDatasets();t<s.length;++t)s[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){let e,i;let s=this._sortedMetasets,a=[];for(e=0,i=s.length;e<i;++e){let o=s[e];(!t||o.visible)&&a.push(o)}return a}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;let t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,i=t._clip,a=!i.disabled,o=function(t,e){let{xScale:i,yScale:s}=t;
6return i&&s?{left:tE(i,e,"left"),right:tE(i,e,"right"),top:tE(s,e,"top"),bottom:tE(s,e,"bottom")}:e}(t,this.chartArea),n={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",n)&&(a&&(0,s.Y)(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(),a&&(0,s.$)(e),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return(0,s.C)(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){let a=C.modes[e];return"function"==typeof a?a(this,t,i,s):[]}getDatasetMeta(t){let e=this.data.datasets[t],i=this._metasets,s=i.filter(t=>t&&t._dataset===e).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=(0,s.j)(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){let i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){let a=i?"show":"hide",o=this.getDatasetMeta(t),n=o.controller._resolveAnimations(void 0,a);(0,s.h)(e)?(o.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),n.update(o,{visible:i}),this.update(e=>e.datasetIndex===t?a:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),a.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),(0,s.af)(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete tz[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let t=this._listeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},a=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};(0,s.F)(this.options.events,t=>i(t,a))}bindResponsiveEvents(){let t;this._responsiveListeners||(this._responsiveListeners={});let e=this._responsiveListeners,i=this.platform,s=(t,s)=>{i.addEventListener(this,t,s),e[t]=s},a=(t,s)=>{e[t]&&(i.removeEventListener(this,t,s),delete e[t])},o=(t,e)=>{this.canvas&&this.resize(t,e)},n=()=>{a("attach",n),this.attached=!0,this.resize(),s("resize",o),s("detach",t)};t=()=>{this.attached=!1,a("resize",o),this._stop(),this._resize(0,0),s("attach",n)},i.isAttached(this.canvas)?n():t()}unbindEvents(){(0,s.F)(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},(0,s.F)(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){let s,a,o;let n=i?"set":"remove";for("dataset"===e&&this.getDatasetMeta(t[0].datasetIndex).controller["_"+n+"DatasetHoverStyle"](),a=0,o=t.length;a<o;++a){s=t[a];let r=s&&this.getDatasetMeta(s.datasetIndex).controller;r&&r[n+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){let e=this._active||[],i=t.map(({datasetIndex:t,index:e})=>{let i=this.getDatasetMeta(t);if(!i)throw Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),a=!(0,s.ah)(i,e);a&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter(e=>e.plugin.id===t).length}_updateHoverStyles(t,e,i){let s=this.options.hover,a=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),o=a(e,t),n=i?t:a(t,e);o.length&&this.updateHoverStyle(o,s.mode,!1),n.length&&s.mode&&this.updateHoverStyle(n,s.mode,!0)}_eventHandler(t,e){let i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,s))return;let a=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(a||i.changed)&&this.render(),this}_handleEvent(t,e,i){var a;let{_active:o=[],options:n}=this,r=this._getActiveElements(t,o,i,e),l=(0,s.ai)(t),h=(a=this._lastEvent,i&&"mouseout"!==t.type?l?a:t:null);i&&(this._lastEvent=null,(0,s.Q)(n.onHover,[t,r,this],this),l&&(0,s.Q)(n.onClick,[t,r,this],this));let d=!(0,s.ah)(r,o);return(d||e)&&(this._active=r,this._updateHoverStyles(r,o,e)),this._lastEvent=h,d}_getActiveElements(t,e,i,s){if("mouseout"===t.type)return[];if(!i)return e;let a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,s)}}function tF(){return(0,s.F)(tI.instances,t=>t._plugins.invalidate())}function tR(t,e,i=e){t.lineCap=(0,s.v)(i.borderCapStyle,e.borderCapStyle),t.setLineDash((0,s.v)(i.borderDash,e.borderDash)),t.lineDashOffset=(0,s.v)(i.borderDashOffset,e.borderDashOffset),t.lineJoin=(0,s.v)(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=(0,s.v)(i.borderWidth,e.borderWidth),t.strokeStyle=(0,s.v)(i.borderColor,e.borderColor)}
6function tH(t,e,i){t.lineTo(i.x,i.y)}function tB(t,e,i={}){let s=t.length,{start:a=0,end:o=s-1}=i,{start:n,end:r}=e,l=Math.max(a,n),h=Math.min(o,r);return{count:s,start:l,loop:e.loop,ilen:h<l&&!(a<n&&o<n||a>r&&o>r)?s+h-l:h-l}}function tV(t,e,i,a){let o,n,r;let{points:l,options:h}=e,{count:d,start:c,loop:u,ilen:g}=tB(l,i,a),f=h.stepped?s.ar:h.tension||"monotone"===h.cubicInterpolationMode?s.as:tH,{move:p=!0,reverse:m}=a||{};for(o=0;o<=g;++o)(n=l[(c+(m?g-o:o))%d]).skip||(p?(t.moveTo(n.x,n.y),p=!1):f(t,r,n,m,h.stepped),r=n);return u&&f(t,r,n=l[(c+(m?g:0))%d],m,h.stepped),!!u}function tj(t,e,i,s){let a,o,n,r,l,h;let d=e.points,{count:c,start:u,ilen:g}=tB(d,i,s),{move:f=!0,reverse:p}=s||{},m=0,x=0,_=t=>(u+(p?g-t:t))%c,b=()=>{r!==l&&(t.lineTo(m,l),t.lineTo(m,r),t.lineTo(m,h))};for(f&&(o=d[_(0)],t.moveTo(o.x,o.y)),a=0;a<=g;++a){if((o=d[_(a)]).skip)continue;let v=o.x,y=o.y,w=0|v;w===n?(y<r?r=y:y>l&&(l=y),m=(x*m+v)/++x):(b(),t.lineTo(v,y),n=w,x=0,r=l=y),h=y}b()}function t$(t){let e=t.options,i=e.borderDash&&e.borderDash.length,s=!t._decimated&&!t._loop&&!e.tension&&"monotone"!==e.cubicInterpolationMode&&!e.stepped&&!i;return s?tj:tV}let tW="function"==typeof Path2D;class tN extends te{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){let i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){let a=i.spanGaps?this._loop:this._fullLoop;(0,s.al)(this._points,i,t,a,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=(0,s.am)(this,this.options.segment))}first(){let t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){let t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){let i,a;let o=this.options,n=t[e],r=this.points,l=(0,s.an)(this,{property:e,start:n,end:n});if(!l.length)return;let h=[],d=o.stepped?s.ao:o.tension||"monotone"===o.cubicInterpolationMode?s.ap:s.aq;for(i=0,a=l.length;i<a;++i){let{start:c,end:u}=l[i],g=r[c],f=r[u];if(g===f){h.push(g);continue}let p=Math.abs((n-g[e])/(f[e]-g[e])),m=d(g,f,p,o.stepped);m[e]=t[e],h.push(m)}return 1===h.length?h[0]:h}pathSegment(t,e,i){let s=t$(this);return s(t,this,e,i)}path(t,e,i){let s=this.segments,a=t$(this),o=this._loop;for(let n of(e=e||0,i=i||this.points.length-e,s))o&=a(t,this,n,{start:e,end:e+i-1});return!!o}draw(t,e,i,s){let a=this.options||{},o=this.points||[];o.length&&a.borderWidth&&(t.save(),function(t,e,i,s){if(tW&&!e.options.segment){var a;let o;(o=(a=e)._path)||(o=a._path=new Path2D,a.path(o,i,s)&&o.closePath()),tR(t,a.options),t.stroke(o)}else!function(t,e,i,s){let{segments:a,options:o}=e,n=t$(e);for(let r of a)tR(t,o,r.style),t.beginPath(),n(t,e,r,{start:i,end:i+s-1})&&t.closePath(),t.stroke()}(t,e,i,s)}(t,this,i,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function tU(t,e,i,s){let a=t.options,{[i]:o}=t.getProps([i],s);return Math.abs(e-o)<a.radius+a.hitRadius}class tY extends te{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){let s=this.options,{x:a,y:o}=this.getProps(["x","y"],i);return Math.pow(t-a,2)+Math.pow(e-o,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(t,e){return tU(this,t,"x",e)}inYRange(t,e){return tU(this,t,"y",e)}getCenterPoint(t){let{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);let i=e&&t.borderWidth||0;return(e+i)*2}draw(t,e){let i=this.options;!this.skip&&!(i.radius<.1)&&(0,s.C)(this,e,this.size(i)/2)&&(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,(0,s.at)(t,i,this.x,this.y))}getRange(){let t=this.options||{};return t.radius+t.hitRadius}}function tQ(t,e){let i,s,a,o,n;let{x:r,y:l,base:h,width:d,height:c}=t.getProps(["x","y","base","width","height"],e);return t.horizontal?(n=c/2,i=Math.min(r,h),s=Math.max(r,h),a=l-n,o=l+n):(i=r-(n=d/2),s=r+n,a=Math.min(l,h),o=Math.max(l,h)),{left:i,top:a,right:s,bottom:o}}function tX(t,e,i,a){return t?0:(0,s.S)(e,i,a)}function tq(t,e,i,a){let o=null===e,n=null===i,r=t&&!(o&&n)&&tQ(t,a);return r&&(o||(0,s.aj)(e,r.left,r.right))&&(n||(0,s.aj)(i,r.top,r.bottom))}function tK(t,e){t.rect(e.x,e.y,e.w,e.h)}function tG(t,e,i={}){let s=t.x!==i.x?-e:0,a=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-s,n=(t.y+t.h!==i.y+i.h?e:0)-a;
6return{x:t.x+s,y:t.y+a,w:t.w+o,h:t.h+n,radius:t.radius}}class tJ extends te{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){var e;let{inflateAmount:i,options:{borderColor:a,backgroundColor:o}}=this,{inner:n,outer:r}=function(t){let e=tQ(t),i=e.right-e.left,a=e.bottom-e.top,o=function(t,e,i){let a=t.options.borderWidth,o=t.borderSkipped,n=(0,s.av)(a);return{t:tX(o.top,n.top,0,i),r:tX(o.right,n.right,0,e),b:tX(o.bottom,n.bottom,0,i),l:tX(o.left,n.left,0,e)}}(t,i/2,a/2),n=function(t,e,i){let{enableBorderRadius:a}=t.getProps(["enableBorderRadius"]),o=t.options.borderRadius,n=(0,s.aw)(o),r=Math.min(e,i),l=t.borderSkipped,h=a||(0,s.i)(o);return{topLeft:tX(!h||l.top||l.left,n.topLeft,0,r),topRight:tX(!h||l.top||l.right,n.topRight,0,r),bottomLeft:tX(!h||l.bottom||l.left,n.bottomLeft,0,r),bottomRight:tX(!h||l.bottom||l.right,n.bottomRight,0,r)}}(t,i/2,a/2);return{outer:{x:e.left,y:e.top,w:i,h:a,radius:n},inner:{x:e.left+o.l,y:e.top+o.t,w:i-o.l-o.r,h:a-o.t-o.b,radius:{topLeft:Math.max(0,n.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,n.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,n.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,n.bottomRight-Math.max(o.b,o.r))}}}}(this),l=(e=r.radius).topLeft||e.topRight||e.bottomLeft||e.bottomRight?s.au:tK;t.save(),(r.w!==n.w||r.h!==n.h)&&(t.beginPath(),l(t,tG(r,i,n)),t.clip(),l(t,tG(n,-i,r)),t.fillStyle=a,t.fill("evenodd")),t.beginPath(),l(t,tG(n,i)),t.fillStyle=o,t.fill(),t.restore()}inRange(t,e,i){return tq(this,t,e,i)}inXRange(t,e){return tq(this,t,null,e)}inYRange(t,e){return tq(this,null,t,e)}getCenterPoint(t){let{x:e,y:i,base:s,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(e+s)/2:e,y:a?i:(i+s)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}function tZ(t,e,i,a){if(a)return;let o=e[t],n=i[t];return"angle"===t&&(o=(0,s.ay)(o),n=(0,s.ay)(n)),{property:t,start:o,end:n}}function t0(t,e,i){for(;e>t;e--){let s=i[e];if(!isNaN(s.x)&&!isNaN(s.y))break}return e}function t1(t,e,i,s){return t&&e?s(t[i],e[i]):t?t[i]:e?e[i]:0}function t2(t,e){let i=[],a=!1;return(0,s.b)(t)?(a=!0,i=t):i=function(t,e){let{x:i=null,y:s=null}=t||{},a=e.points,o=[];return e.segments.forEach(({start:t,end:e})=>{e=t0(t,e,a);let n=a[t],r=a[e];null!==s?(o.push({x:n.x,y:s}),o.push({x:r.x,y:s})):null!==i&&(o.push({x:i,y:n.y}),o.push({x:i,y:r.y}))}),o}(t,e),i.length?new tN({points:i,options:{tension:0},_loop:a,_fullLoop:a}):null}function t5(t){return t&&!1!==t.fill}["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"].map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));class t3{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){let{x:a,y:o,radius:n}=this;return e=e||{start:0,end:s.T},t.arc(a,o,n,e.end,e.start,!0),!i.bounds}interpolate(t){let{x:e,y:i,radius:s}=this,a=t.angle;return{x:e+Math.cos(a)*s,y:i+Math.sin(a)*s,angle:a}}}function t6(t,e,i){let a=function(t){let{chart:e,fill:i,line:a}=t;if((0,s.g)(i))return function(t,e){let i=t.getDatasetMeta(e),s=i&&t.isDatasetVisible(e);return s?i.dataset:null}(e,i);if("stack"===i)return function(t){let{scale:e,index:i,line:a}=t,o=[],n=a.segments,r=a.points,l=function(t,e){let i=[],s=t.getMatchingVisibleMetas("line");for(let a=0;a<s.length;a++){let o=s[a];if(o.index===e)break;o.hidden||i.unshift(o.dataset)}return i}(e,i);l.push(t2({x:null,y:e.bottom},a));for(let h=0;h<n.length;h++){let d=n[h];for(let c=d.start;c<=d.end;c++)!function(t,e,i){let a=[];for(let o=0;o<i.length;o++){let n=i[o],{first:r,last:l,point:h}=function(t,e,i){let a=t.interpolate(e,i);if(!a)return{};let o=a[i],n=t.segments,r=t.points,l=!1,h=!1;for(let d=0;d<n.length;d++){let c=n[d],u=r[c.start][i],g=r[c.end][i];if((0,s.aj)(o,u,g)){l=o===u,h=o===g;break}}return{first:l,last:h,point:a}}(n,e,"x");if(h&&(!r||!l)){if(r)a.unshift(h);else if(t.push(h),!l)break}}t.push(...a)}(o,r[c],l)}return new tN({points:o,options:{}})}(t);if("shape"===i)return!0;let o=function(t){let e=t.scale||{};return e.getPointPositionForValue?function(t){let{scale:e,fill:i}=t,a=e.options,o=e.getLabels().length,n=a.reverse?e.max:e.min,r="start"===i?n:"end"===i?e.options.reverse?e.min:e.max:(0,s.i)(i)?i.value:e.getBaseValue(),l=[];
6if(a.grid.circular){let h=e.getPointPositionForValue(0,n);return new t3({x:h.x,y:h.y,radius:e.getDistanceFromCenterForValue(r)})}for(let d=0;d<o;++d)l.push(e.getPointPositionForValue(d,r));return l}(t):function(t){let e;let{scale:i={},fill:a}=t,o=(e=null,"start"===a?e=i.bottom:"end"===a?e=i.top:(0,s.i)(a)?e=i.getPixelForValue(a.value):i.getBasePixel&&(e=i.getBasePixel()),e);if((0,s.g)(o)){let n=i.isHorizontal();return{x:n?o:null,y:n?null:o}}return null}(t)}(t);return o instanceof t3?o:t2(o,a)}(e),{line:o,scale:n,axis:r}=e,l=o.options,h=l.fill,d=l.backgroundColor,{above:c=d,below:u=d}=h||{};a&&o.points.length&&((0,s.Y)(t,i),function(t,e){let{line:i,target:s,above:a,below:o,area:n,scale:r}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&o!==a&&(t4(t,s,n.top),t7(t,{line:i,target:s,color:a,scale:r,property:l}),t.restore(),t.save(),t4(t,s,n.bottom)),t7(t,{line:i,target:s,color:o,scale:r,property:l}),t.restore()}(t,{line:o,target:a,above:c,below:u,area:i,scale:n,axis:r}),(0,s.$)(t))}function t4(t,e,i){let{segments:s,points:a}=e,o=!0,n=!1;for(let r of(t.beginPath(),s)){let{start:l,end:h}=r,d=a[l],c=a[t0(l,h,a)];o?(t.moveTo(d.x,d.y),o=!1):(t.lineTo(d.x,i),t.lineTo(d.x,d.y)),(n=!!e.pathSegment(t,r,{move:n}))?t.closePath():t.lineTo(c.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function t7(t,e){let{line:i,target:a,property:o,color:n,scale:r}=e,l=function(t,e,i){let a=t.segments,o=t.points,n=e.points,r=[];for(let l of a){let{start:h,end:d}=l;d=t0(h,d,o);let c=tZ(i,o[h],o[d],l.loop);if(!e.segments){r.push({source:l,target:c,start:o[h],end:o[d]});continue}let u=(0,s.an)(e,c);for(let g of u){let f=tZ(i,n[g.start],n[g.end],g.loop),p=(0,s.ax)(l,o,f);for(let m of p)r.push({source:m,target:g,start:{[i]:t1(c,f,"start",Math.max)},end:{[i]:t1(c,f,"end",Math.min)}})}}return r}(i,a,o);for(let{source:h,target:d,start:c,end:u}of l){let g;let{style:{backgroundColor:f=n}={}}=h,p=!0!==a;t.save(),t.fillStyle=f,function(t,e,i){let{top:s,bottom:a}=e.chart.chartArea,{property:o,start:n,end:r}=i||{};"x"===o&&(t.beginPath(),t.rect(n,s,r-n,a-s),t.clip())}(t,r,p&&tZ(o,c,u)),t.beginPath();let m=!!i.pathSegment(t,h);if(p){m?t.closePath():t8(t,a,u,o);let x=!!a.pathSegment(t,d,{move:m,reverse:!0});(g=m&&x)||t8(t,a,c,o)}t.closePath(),t.fill(g?"evenodd":"nonzero"),t.restore()}}function t8(t,e,i,s){let a=e.interpolate(i,s);a&&t.lineTo(a.x,a.y)}var t9={id:"filler",afterDatasetsUpdate(t,e,i){let a,o,n,r;let l=(t.data.datasets||[]).length,h=[];for(o=0;o<l;++o)n=(a=t.getDatasetMeta(o)).dataset,r=null,n&&n.options&&n instanceof tN&&(r={visible:t.isDatasetVisible(o),index:o,fill:function(t,e,i){var a,o;let n=function(t){let e=t.options,i=e.fill,a=(0,s.v)(i&&i.target,i);return void 0===a&&(a=!!e.backgroundColor),!1!==a&&null!==a&&(!0===a?"origin":a)}(t);if((0,s.i)(n))return!isNaN(n.value)&&n;let r=parseFloat(n);return(0,s.g)(r)&&Math.floor(r)===r?(a=n[0],o=r,("-"===a||"+"===a)&&(o=e+o),o!==e&&!(o<0)&&!(o>=i)&&o):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}(n,o,l),chart:t,axis:a.controller.options.indexAxis,scale:a.vScale,line:n}),a.$filler=r,h.push(r);for(o=0;o<l;++o)(r=h[o])&&!1!==r.fill&&(r.fill=function(t,e,i){let a;let o=t[e],n=o.fill,r=[e];if(!i)return n;for(;!1!==n&&-1===r.indexOf(n);){if(!(0,s.g)(n))return n;if(!(a=t[n]))break;if(a.visible)return n;r.push(n),n=a.fill}return!1}(h,o,i.propagate))},beforeDraw(t,e,i){let s="beforeDraw"===i.drawTime,a=t.getSortedVisibleDatasetMetas(),o=t.chartArea;for(let n=a.length-1;n>=0;--n){let r=a[n].$filler;r&&(r.line.updateControlPoints(o,r.axis),s&&r.fill&&t6(t.ctx,r,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;let s=t.getSortedVisibleDatasetMetas();for(let a=s.length-1;a>=0;--a){let o=s[a].$filler;t5(o)&&t6(t.ctx,o,t.chartArea)}},beforeDatasetDraw(t,e,i){let s=e.meta.$filler;t5(s)&&"beforeDatasetDraw"===i.drawTime&&t6(t.ctx,s,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};let et=(t,e)=>{let{boxHeight:i=e,boxWidth:s=e}=t;return t.usePointStyle&&(i=Math.min(i,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:i,itemHeight:Math.max(e,i)}},ee=(t,e)=>null!==t&&null!==e&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class ei extends te{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(){let t=this.options.labels||{},e=(0,s.Q)(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(){let t,e;let{options:i,ctx:a}=this;if(!i.display){this.width=this.height=0;return}let o=i.labels,n=(0,s.a0)(o.font),r=n.size,l=this._computeTitleHeight(),{boxWidth:h,itemHeight:d}=et(o,r);a.font=n.string,this.isHorizontal()?(t=this.maxWidth,e=this._fitRows(l,r,h,d)+10):(e=this.maxHeight,t=this._fitCols(l,n,h,d)+10),this.width=Math.min(t,i.maxWidth||this.maxWidth),this.height=Math.min(e,i.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){let{ctx:a,maxWidth:o,options:{labels:{padding:n}}}=this,r=this.legendHitBoxes=[],l=this.lineWidths=[0],h=s+n,d=t;a.textAlign="left",a.textBaseline="middle";let c=-1,u=-h;
6return this.legendItems.forEach((t,g)=>{let f=i+e/2+a.measureText(t.text).width;(0===g||l[l.length-1]+f+2*n>o)&&(d+=h,l[l.length-(g>0?0:1)]=0,u+=h,c++),r[g]={left:0,top:u,row:c,width:f,height:s},l[l.length-1]+=f+n}),d}_fitCols(t,e,i,s){let{ctx:a,maxHeight:o,options:{labels:{padding:n}}}=this,r=this.legendHitBoxes=[],l=this.columnSizes=[],h=o-t,d=n,c=0,u=0,g=0,f=0;return this.legendItems.forEach((t,o)=>{let{itemWidth:p,itemHeight:m}=function(t,e,i,s,a){var o;let n,r;let l=((n=s.text)&&"string"!=typeof n&&(n=n.reduce((t,e)=>t.length>e.length?t:e)),t+e.size/2+i.measureText(n).width),h=(o=e.lineHeight,r=a,"string"!=typeof s.text&&(r=es(s,o)),r);return{itemWidth:l,itemHeight:h}}(i,e,a,t,s);o>0&&u+m+2*n>h&&(d+=c+n,l.push({width:c,height:u}),g+=c+n,f++,c=u=0),r[o]={left:g,top:u,col:f,width:p,height:m},c=Math.max(c,p),u+=m+n}),d+=c,l.push({width:c,height:u}),d}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:a},rtl:o}}=this,n=(0,s.az)(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=(0,s.a2)(i,this.left+a,this.right-this.lineWidths[r]);for(let h of e)r!==h.row&&(r=h.row,l=(0,s.a2)(i,this.left+a,this.right-this.lineWidths[r])),h.top+=this.top+t+a,h.left=n.leftForLtr(n.x(l),h.width),l+=h.width+a}else{let d=0,c=(0,s.a2)(i,this.top+t+a,this.bottom-this.columnSizes[d].height);for(let u of e)u.col!==d&&(d=u.col,c=(0,s.a2)(i,this.top+t+a,this.bottom-this.columnSizes[d].height)),u.top=c,u.left+=this.left+a,u.left=n.leftForLtr(n.x(u.left),u.width),c+=u.height+a}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){let t=this.ctx;(0,s.Y)(t,this),this._draw(),(0,s.$)(t)}}_draw(){let t;let{options:e,columnSizes:i,lineWidths:a,ctx:o}=this,{align:n,labels:r}=e,l=s.d.color,h=(0,s.az)(e.rtl,this.left,this.width),d=(0,s.a0)(r.font),{padding:c}=r,u=d.size,g=u/2;this.drawTitle(),o.textAlign=h.textAlign("left"),o.textBaseline="middle",o.lineWidth=.5,o.font=d.string;let{boxWidth:f,boxHeight:p,itemHeight:m}=et(r,u),x=function(t,e,i){if(isNaN(f)||f<=0||isNaN(p)||p<0)return;o.save();let a=(0,s.v)(i.lineWidth,1);if(o.fillStyle=(0,s.v)(i.fillStyle,l),o.lineCap=(0,s.v)(i.lineCap,"butt"),o.lineDashOffset=(0,s.v)(i.lineDashOffset,0),o.lineJoin=(0,s.v)(i.lineJoin,"miter"),o.lineWidth=a,o.strokeStyle=(0,s.v)(i.strokeStyle,l),o.setLineDash((0,s.v)(i.lineDash,[])),r.usePointStyle){let n={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:a},d=h.xPlus(t,f/2);(0,s.aD)(o,n,d,e+g,r.pointStyleWidth&&f)}else{let c=e+Math.max((u-p)/2,0),m=h.leftForLtr(t,f),x=(0,s.aw)(i.borderRadius);o.beginPath(),Object.values(x).some(t=>0!==t)?(0,s.au)(o,{x:m,y:c,w:f,h:p,radius:x}):o.rect(m,c,f,p),o.fill(),0!==a&&o.stroke()}o.restore()},_=function(t,e,i){(0,s.Z)(o,i.text,t,e+m/2,d,{strikethrough:i.hidden,textAlign:h.textAlign(i.textAlign)})},b=this.isHorizontal(),v=this._computeTitleHeight();t=b?{x:(0,s.a2)(n,this.left+c,this.right-a[0]),y:this.top+c+v,line:0}:{x:this.left+c,y:(0,s.a2)(n,this.top+v+c,this.bottom-i[0].height),line:0},(0,s.aA)(this.ctx,e.textDirection);let y=m+c;this.legendItems.forEach((l,u)=>{o.strokeStyle=l.fontColor,o.fillStyle=l.fontColor;let p=o.measureText(l.text).width,m=h.textAlign(l.textAlign||(l.textAlign=r.textAlign)),w=f+g+p,k=t.x,M=t.y;h.setWidth(this.width),b?u>0&&k+w+c>this.right&&(M=t.y+=y,t.line++,k=t.x=(0,s.a2)(n,this.left+c,this.right-a[t.line])):u>0&&M+y>this.bottom&&(k=t.x=k+i[t.line].width+c,t.line++,M=t.y=(0,s.a2)(n,this.top+v+c,this.bottom-i[t.line].height));let S=h.x(k);if(x(S,M,l),k=(0,s.aB)(m,k+f+g,b?k+w:this.right,e.rtl),_(h.x(k),M,l),b)t.x+=w+c;else if("string"!=typeof l.text){let D=d.lineHeight;t.y+=es(l,D)+c}else t.y+=y}),(0,s.aC)(this.ctx,e.textDirection)}drawTitle(){let t;let e=this.options,i=e.title,a=(0,s.a0)(i.font),o=(0,s.E)(i.padding);if(!i.display)return;let n=(0,s.az)(e.rtl,this.left,this.width),r=this.ctx,l=i.position,h=a.size/2,d=o.top+h,c=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),t=this.top+d,c=(0,s.a2)(e.align,c,this.right-u);else{let g=this.columnSizes.reduce((t,e)=>Math.max(t,e.height),0);t=d+(0,s.a2)(e.align,this.top,this.bottom-g-e.labels.padding-this._computeTitleHeight())}let f=(0,s.a2)(l,c,c+u);r.textAlign=n.textAlign((0,s.a1)(l)),r.textBaseline="middle",r.strokeStyle=i.color,r.fillStyle=i.color,r.font=a.string,(0,s.Z)(r,i.text,f,t,a)}_computeTitleHeight(){let t=this.options.title,e=(0,s.a0)(t.font),i=(0,s.E)(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,a,o;if((0,s.aj)(t,this.left,this.right)&&(0,s.aj)(e,this.top,this.bottom)){for(i=0,o=this.legendHitBoxes;i<o.length;++i)if(a=o[i],(0,s.aj)(t,a.left,a.left+a.width)&&(0,s.aj)(e,a.top,a.top+a.height))return this.legendItems[i]}return null}handleEvent(t){var e;let i=this.options;if(("mousemove"!==(e=t.type)&&"mouseout"!==e||!i.onHover&&!i.onLeave)&&(!i.onClick||"click"!==e&&"mouseup"!==e))return;let a=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){let o=this._hoveredItem,n=ee(o,a);o&&!n&&(0,s.Q)(i.onLeave,[t,o,this],this),this._hoveredItem=a,a&&!n&&(0,s.Q)(i.onHover,[t,a,this],this)}else a&&(0,s.Q)(i.onClick,[t,a,this],this)}}function es(t,e){let i=t.text?t.text.length:0;return e*i}var ea={id:"legend",_element:ei,start(t,e,i){let s=t.legend=new ei({ctx:t.ctx,options:i,chart:t});R.configure(t,s,i),R.addBox(t,s)},stop(t){R.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){let s=t.legend;R.configure(t,s,i),s.options=i},afterUpdate(t){let e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)}
6,defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){let s=e.datasetIndex,a=i.chart;a.isDatasetVisible(s)?(a.hide(s),e.hidden=!0):(a.show(s),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){let e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:a,textAlign:o,color:n,useBorderRadius:r,borderRadius:l}}=t.legend.options;return t._getSortedDatasetMetas().map(t=>{let h=t.controller.getStyle(i?0:void 0),d=(0,s.E)(h.borderWidth);return{text:e[t.index].label,fillStyle:h.backgroundColor,fontColor:n,hidden:!t.visible,lineCap:h.borderCapStyle,lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:h.borderColor,pointStyle:a||h.pointStyle,rotation:h.rotation,textAlign:o||h.textAlign,borderRadius:r&&(l||h.borderRadius),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)}}};class eo extends te{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){let i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;let a=(0,s.b)(i.text)?i.text.length:1;this._padding=(0,s.E)(i.padding);let o=a*(0,s.a0)(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){let t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){let e,i,a;let{top:o,left:n,bottom:r,right:l,options:h}=this,d=h.align,c=0;return this.isHorizontal()?(i=(0,s.a2)(d,n,l),a=o+t,e=l-n):("left"===h.position?(i=n+t,a=(0,s.a2)(d,r,o),c=-.5*s.P):(i=l-t,a=(0,s.a2)(d,o,r),c=.5*s.P),e=r-o),{titleX:i,titleY:a,maxWidth:e,rotation:c}}draw(){let t=this.ctx,e=this.options;if(!e.display)return;let i=(0,s.a0)(e.font),a=i.lineHeight,o=a/2+this._padding.top,{titleX:n,titleY:r,maxWidth:l,rotation:h}=this._drawArgs(o);(0,s.Z)(t,e.text,0,0,i,{color:e.color,maxWidth:l,rotation:h,textAlign:(0,s.a1)(e.align),textBaseline:"middle",translation:[n,r]})}}var en={id:"title",_element:eo,start(t,e,i){!function(t,e){let i=new eo({ctx:t.ctx,options:e,chart:t});R.configure(t,i,e),R.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){let e=t.titleBlock;R.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){let s=t.titleBlock;R.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};new WeakMap;let er={average(t){let e,i;if(!t.length)return!1;let s=new Set,a=0,o=0;for(e=0,i=t.length;e<i;++e){let n=t[e].element;if(n&&n.hasValue()){let r=n.tooltipPosition();s.add(r.x),a+=r.y,++o}}let l=[...s].reduce((t,e)=>t+e)/s.size;return{x:l,y:a/o}},nearest(t,e){let i,a,o;if(!t.length)return!1;let n=e.x,r=e.y,l=Number.POSITIVE_INFINITY;for(i=0,a=t.length;i<a;++i){let h=t[i].element;if(h&&h.hasValue()){let d=h.getCenterPoint(),c=(0,s.aE)(e,d);c<l&&(l=c,o=h)}}if(o){let u=o.tooltipPosition();n=u.x,r=u.y}return{x:n,y:r}}};function el(t,e){return e&&((0,s.b)(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function eh(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function ed(t,e){let i=t.chart.ctx,{body:a,footer:o,title:n}=t,{boxWidth:r,boxHeight:l}=e,h=(0,s.a0)(e.bodyFont),d=(0,s.a0)(e.titleFont),c=(0,s.a0)(e.footerFont),u=n.length,g=o.length,f=a.length,p=(0,s.E)(e.padding),m=p.height,x=0,_=a.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);if(_+=t.beforeBody.length+t.afterBody.length,u&&(m+=u*d.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),_){let b=e.displayColors?Math.max(l,h.lineHeight):h.lineHeight;m+=f*b+(_-f)*h.lineHeight+(_-1)*e.bodySpacing}g&&(m+=e.footerMarginTop+g*c.lineHeight+(g-1)*e.footerSpacing);let v=0,y=function(t){x=Math.max(x,i.measureText(t).width+v)};return i.save(),i.font=d.string,(0,s.F)(t.title,y),i.font=h.string,(0,s.F)(t.beforeBody.concat(t.afterBody),y),v=e.displayColors?r+2+e.boxPadding:0,(0,s.F)(a,t=>{(0,s.F)(t.before,y),(0,s.F)(t.lines,y),(0,s.F)(t.after,y)}
6),v=0,i.font=c.string,(0,s.F)(t.footer,y),i.restore(),x+=p.width,{width:x,height:m}}function ec(t,e,i){let s=i.yAlign||e.yAlign||function(t,e){let{y:i,height:s}=e;return i<s/2?"top":i>t.height-s/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||function(t,e,i,s){let{x:a,width:o}=i,{width:n,chartArea:{left:r,right:l}}=t,h="center";return"center"===s?h=a<=(r+l)/2?"left":"right":a<=o/2?h="left":a>=n-o/2&&(h="right"),function(t,e,i,s){let{x:a,width:o}=s,n=i.caretSize+i.caretPadding;if("left"===t&&a+o+n>e.width||"right"===t&&a-o-n<0)return!0}(h,t,e,i)&&(h="center"),h}(t,e,i,s),yAlign:s}}function eu(t,e,i,a){let{caretSize:o,caretPadding:n,cornerRadius:r}=t,{xAlign:l,yAlign:h}=i,d=o+n,{topLeft:c,topRight:u,bottomLeft:g,bottomRight:f}=(0,s.aw)(r),p=function(t,e){let{x:i,width:s}=t;return"right"===e?i-=s:"center"===e&&(i-=s/2),i}(e,l),m=function(t,e,i){let{y:s,height:a}=t;return"top"===e?s+=i:"bottom"===e?s-=a+i:s-=a/2,s}(e,h,d);return"center"===h?"left"===l?p+=d:"right"===l&&(p-=d):"left"===l?p-=Math.max(c,g)+o:"right"===l&&(p+=Math.max(u,f)+o),{x:(0,s.S)(p,0,a.width-e.width),y:(0,s.S)(m,0,a.height-e.height)}}function eg(t,e,i){let a=(0,s.E)(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-a.right:t.x+a.left}function ef(t,e){let i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}let ep={beforeTitle:s.aF,title(t){if(t.length>0){let e=t[0],i=e.chart.data.labels,s=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex<s)return i[e.dataIndex]}return""},afterTitle:s.aF,beforeBody:s.aF,beforeLabel:s.aF,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");let i=t.formattedValue;return(0,s.k)(i)||(e+=i),e},labelColor(t){let e=t.chart.getDatasetMeta(t.datasetIndex),i=e.controller.getStyle(t.dataIndex);return{borderColor:i.borderColor,backgroundColor:i.backgroundColor,borderWidth:i.borderWidth,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){let e=t.chart.getDatasetMeta(t.datasetIndex),i=e.controller.getStyle(t.dataIndex);return{pointStyle:i.pointStyle,rotation:i.rotation}},afterLabel:s.aF,afterBody:s.aF,beforeFooter:s.aF,footer:s.aF,afterFooter:s.aF};function em(t,e,i,s){let a=t[e].call(i,s);return void 0===a?ep[e].call(i,s):a}class ex extends te{static positioners=er;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let e=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&e.options.animation&&i.animations,a=new l(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){var t,e;return this.$context||(this.$context=(t=this.chart.getContext(),e=this._tooltipItems,(0,s.j)(t,{tooltip:this,tooltipItems:e,type:"tooltip"})))}getTitle(t,e){let{callbacks:i}=e,s=em(i,"beforeTitle",this,t),a=em(i,"title",this,t),o=em(i,"afterTitle",this,t),n=[];return n=el(n,eh(s)),n=el(n,eh(a)),n=el(n,eh(o))}getBeforeBody(t,e){return el([],eh(em(e.callbacks,"beforeBody",this,t)))}getBody(t,e){let{callbacks:i}=e,a=[];return(0,s.F)(t,t=>{let e={before:[],lines:[],after:[]},s=ef(i,t);el(e.before,eh(em(s,"beforeLabel",this,t))),el(e.lines,em(s,"label",this,t)),el(e.after,eh(em(s,"afterLabel",this,t))),a.push(e)}),a}getAfterBody(t,e){return el([],eh(em(e.callbacks,"afterBody",this,t)))}getFooter(t,e){let{callbacks:i}=e,s=em(i,"beforeFooter",this,t),a=em(i,"footer",this,t),o=em(i,"afterFooter",this,t),n=[];return n=el(n,eh(s)),n=el(n,eh(a)),n=el(n,eh(o))}_createItems(t){let e,i;let a=this._active,o=this.chart.data,n=[],r=[],l=[],h=[];for(e=0,i=a.length;e<i;++e)h.push(function(t,e){let{element:i,datasetIndex:s,index:a}=e,o=t.getDatasetMeta(s).controller,{label:n,value:r}=o.getLabelAndValue(a);return{chart:t,label:n,parsed:o.getParsed(a),raw:t.data.datasets[s].data[a],formattedValue:r,dataset:o.getDataset(),dataIndex:a,datasetIndex:s,element:i}}(this.chart,a[e]));return t.filter&&(h=h.filter((e,i,s)=>t.filter(e,i,s,o))),t.itemSort&&(h=h.sort((e,i)=>t.itemSort(e,i,o))),(0,s.F)(h,e=>{let i=ef(t.callbacks,e);n.push(em(i,"labelColor",this,e)),r.push(em(i,"labelPointStyle",this,e)),l.push(em(i,"labelTextColor",this,e))}),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=l,this.dataPoints=h,h}update(t,e){let i;let s=this.options.setContext(this.getContext()),a=this._active,o=[];if(a.length){let n=er[s.position].call(this,a,this._eventPosition);o=this._createItems(s),this.title=this.getTitle(o,s),this.beforeBody=this.getBeforeBody(o,s),this.body=this.getBody(o,s),this.afterBody=this.getAfterBody(o,s),this.footer=this.getFooter(o,s);let r=this._size=ed(this,s),l=Object.assign({},n,r),h=ec(this.chart,s,l),d=eu(s,l,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,i={opacity:1,x:d.x,y:d.y,width:r.width,height:r.height,caretX:n.x,
6caretY:n.y}}else 0!==this.opacity&&(i={opacity:0});this._tooltipItems=o,this.$context=void 0,i&&this._resolveAnimations().update(this,i),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){let a=this.getCaretPosition(t,i,s);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,i){let a,o,n,r,l,h;let{xAlign:d,yAlign:c}=this,{caretSize:u,cornerRadius:g}=i,{topLeft:f,topRight:p,bottomLeft:m,bottomRight:x}=(0,s.aw)(g),{x:_,y:b}=t,{width:v,height:y}=e;return"center"===c?(l=b+y/2,"left"===d?(o=(a=_)-u,r=l+u,h=l-u):(o=(a=_+v)+u,r=l-u,h=l+u),n=a):(o="left"===d?_+Math.max(f,m)+u:"right"===d?_+v-Math.max(p,x)-u:this.caretX,"top"===c?(l=(r=b)-u,a=o-u,n=o+u):(l=(r=b+y)+u,a=o+u,n=o-u),h=r),{x1:a,x2:o,x3:n,y1:r,y2:l,y3:h}}drawTitle(t,e,i){let a,o,n;let r=this.title,l=r.length;if(l){let h=(0,s.az)(i.rtl,this.x,this.width);for(n=0,t.x=eg(this,i.titleAlign,i),e.textAlign=h.textAlign(i.titleAlign),e.textBaseline="middle",a=(0,s.a0)(i.titleFont),o=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string;n<l;++n)e.fillText(r[n],h.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+o,n+1===l&&(t.y+=i.titleMarginBottom-o)}}_drawColorBox(t,e,i,a,o){let n=this.labelColors[i],r=this.labelPointStyles[i],{boxHeight:l,boxWidth:h}=o,d=(0,s.a0)(o.bodyFont),c=eg(this,"left",o),u=a.x(c),g=l<d.lineHeight?(d.lineHeight-l)/2:0,f=e.y+g;if(o.usePointStyle){let p={radius:Math.min(h,l)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},m=a.leftForLtr(u,h)+h/2,x=f+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,(0,s.at)(t,p,m,x),t.strokeStyle=n.borderColor,t.fillStyle=n.backgroundColor,(0,s.at)(t,p,m,x)}else{t.lineWidth=(0,s.i)(n.borderWidth)?Math.max(...Object.values(n.borderWidth)):n.borderWidth||1,t.strokeStyle=n.borderColor,t.setLineDash(n.borderDash||[]),t.lineDashOffset=n.borderDashOffset||0;let _=a.leftForLtr(u,h),b=a.leftForLtr(a.xPlus(u,1),h-2),v=(0,s.aw)(n.borderRadius);Object.values(v).some(t=>0!==t)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,(0,s.au)(t,{x:_,y:f,w:h,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=n.backgroundColor,t.beginPath(),(0,s.au)(t,{x:b,y:f+1,w:h-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(_,f,h,l),t.strokeRect(_,f,h,l),t.fillStyle=n.backgroundColor,t.fillRect(b,f+1,h-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){let a,o,n,r,l,h,d;let{body:c}=this,{bodySpacing:u,bodyAlign:g,displayColors:f,boxHeight:p,boxWidth:m,boxPadding:x}=i,_=(0,s.a0)(i.bodyFont),b=_.lineHeight,v=0,y=(0,s.az)(i.rtl,this.x,this.width),w=function(i){e.fillText(i,y.x(t.x+v),t.y+b/2),t.y+=b+u},k=y.textAlign(g);for(e.textAlign=g,e.textBaseline="middle",e.font=_.string,t.x=eg(this,k,i),e.fillStyle=i.bodyColor,(0,s.F)(this.beforeBody,w),v=f&&"right"!==k?"center"===g?m/2+x:m+2+x:0,r=0,h=c.length;r<h;++r){for(a=c[r],o=this.labelTextColors[r],e.fillStyle=o,(0,s.F)(a.before,w),n=a.lines,f&&n.length&&(this._drawColorBox(e,t,r,y,i),b=Math.max(_.lineHeight,p)),l=0,d=n.length;l<d;++l)w(n[l]),b=_.lineHeight;(0,s.F)(a.after,w)}v=0,b=_.lineHeight,(0,s.F)(this.afterBody,w),t.y-=u}drawFooter(t,e,i){let a,o;let n=this.footer,r=n.length;if(r){let l=(0,s.az)(i.rtl,this.x,this.width);for(t.x=eg(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",a=(0,s.a0)(i.footerFont),e.fillStyle=i.footerColor,e.font=a.string,o=0;o<r;++o)e.fillText(n[o],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,e,i,a){let{xAlign:o,yAlign:n}=this,{x:r,y:l}=t,{width:h,height:d}=i,{topLeft:c,topRight:u,bottomLeft:g,bottomRight:f}=(0,s.aw)(a.cornerRadius);e.fillStyle=a.backgroundColor,e.strokeStyle=a.borderColor,e.lineWidth=a.borderWidth,e.beginPath(),e.moveTo(r+c,l),"top"===n&&this.drawCaret(t,e,i,a),e.lineTo(r+h-u,l),e.quadraticCurveTo(r+h,l,r+h,l+u),"center"===n&&"right"===o&&this.drawCaret(t,e,i,a),e.lineTo(r+h,l+d-f),e.quadraticCurveTo(r+h,l+d,r+h-f,l+d),"bottom"===n&&this.drawCaret(t,e,i,a),e.lineTo(r+g,l+d),e.quadraticCurveTo(r,l+d,r,l+d-g),"center"===n&&"left"===o&&this.drawCaret(t,e,i,a),e.lineTo(r,l+c),e.quadraticCurveTo(r,l,r+c,l),e.closePath(),e.fill(),a.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,i=this.$animations,s=i&&i.x,a=i&&i.y;if(s||a){let o=er[t.position].call(this,this._active,this._eventPosition);if(!o)return;let n=this._size=ed(this,t),r=Object.assign({},o,this._size),l=ec(e,t,r),h=eu(t,r,l,e);(s._to!==h.x||a._to!==h.y)&&(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=n.width,this.height=n.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),i=this.opacity;if(!i)return;this._updateAnimationTarget(e);let a={width:this.width,height:this.height},o={x:this.x,y:this.y};i=.001>Math.abs(i)?0:i;let n=(0,s.E)(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;
6e.enabled&&r&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,a,e),(0,s.aA)(t,e.textDirection),o.y+=n.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),(0,s.aC)(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let i=this._active,a=t.map(({datasetIndex:t,index:e})=>{let i=this.chart.getDatasetMeta(t);if(!i)throw Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),o=!(0,s.ah)(i,a),n=this._positionChanged(a,e);(o||n)&&(this._active=a,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let a=this.options,o=this._active||[],n=this._getActiveElements(t,o,e,i),r=this._positionChanged(n,t),l=e||!(0,s.ah)(n,o)||r;return l&&(this._active=n,(a.enabled||a.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,i,s){let a=this.options;if("mouseout"===t.type)return[];if(!s)return e.filter(t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index));let o=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&o.reverse(),o}_positionChanged(t,e){let{caretX:i,caretY:s,options:a}=this,o=er[a.position].call(this,t,e);return!1!==o&&(i!==o.x||s!==o.y)}}var e_={id:"tooltip",_element:ex,positioners:er,afterInit(t,e,i){i&&(t.tooltip=new ex({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){let e=t.tooltip;if(e&&e._willRender()){let i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){let i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>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:ep},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"]};let eb=(t,e,i,s)=>
6("string"==typeof e?(i=t.push(e)-1,s.unshift({index:i,label:e})):isNaN(e)&&(i=null),i),ev=(t,e)=>null===t?null:(0,s.S)(Math.round(t),0,e);function ey(t){let e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class ew extends th{static id="category";static defaults={ticks:{callback:ey}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let e=this._addedLabels;if(e.length){let i=this.getLabels();for(let{index:s,label:a}of e)i[s]===a&&i.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,e){if((0,s.k)(t))return null;let i=this.getLabels();return ev(e=isFinite(e)&&i[e]===t?e:function(t,e,i,s){let a=t.indexOf(e);if(-1===a)return eb(t,e,i,s);let o=t.lastIndexOf(e);return a!==o?i:a}(i,t,(0,s.v)(e,t),this._addedLabels),i.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:i,max:s}=this.getMinMax(!0);"ticks"!==this.options.bounds||(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){let t=this.min,e=this.max,i=this.options.offset,s=[],a=this.getLabels();a=0===t&&e===a.length-1?a:a.slice(t,e+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=t;o<=e;o++)s.push({value:o});return s}getLabelForValue(t){return ey.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function ek(t,e,{horizontal:i,minRotation:a}){let o=(0,s.t)(a),n=.75*e*(""+t).length;return Math.min(e/((i?Math.sin(o):Math.cos(o))||.001),n)}class eM extends th{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(0,s.k)(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){let{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds(),{min:a,max:o}=this,n=t=>a=e?a:t,r=t=>o=i?o:t;if(t){let l=(0,s.s)(a),h=(0,s.s)(o);l<0&&h<0?r(0):l>0&&h>0&&n(0)}if(a===o){let d=0===o?1:Math.abs(.05*o);r(o+d),t||n(a-d)}this.min=a,this.max=o}getTickLimit(){let t;let e=this.options.ticks,{maxTicksLimit:i,stepSize:s}=e;return s?(t=Math.ceil(this.max/s)-Math.floor(this.min/s)+1)>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3):(t=this.computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,e=t.ticks,i=this.getTickLimit();i=Math.max(2,i);let a={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},o=this._range||this,n=function(t,e){let i,a,o,n;let r=[],{bounds:l,step:h,min:d,max:c,precision:u,count:g,maxTicks:f,maxDigits:p,includeBounds:m}=t,x=h||1,_=f-1,{min:b,max:v}=e,y=!(0,s.k)(d),w=!(0,s.k)(c),k=!(0,s.k)(g),M=(v-b)/(p+1),S=(0,s.aH)((v-b)/_/x)*x;if(S<1e-14&&!y&&!w)return[{value:b},{value:v}];(n=Math.ceil(v/S)-Math.floor(b/S))>_&&(S=(0,s.aH)(n*S/_/x)*x),(0,s.k)(u)||(S=Math.ceil(S*(i=Math.pow(10,u)))/i),"ticks"===l?(a=Math.floor(b/S)*S,o=Math.ceil(v/S)*S):(a=b,o=v),y&&w&&h&&(0,s.aI)((c-d)/h,S/1e3)?(n=Math.round(Math.min((c-d)/S,f)),S=(c-d)/n,a=d,o=c):k?(a=y?d:a,S=((o=w?c:o)-a)/(n=g-1)):(n=(o-a)/S,n=(0,s.aJ)(n,Math.round(n),S/1e3)?Math.round(n):Math.ceil(n));let D=Math.max((0,s.aK)(S),(0,s.aK)(a));i=Math.pow(10,(0,s.k)(u)?D:u),a=Math.round(a*i)/i,o=Math.round(o*i)/i;let C=0;for(y&&(m&&a!==d?(r.push({value:d}),a<d&&C++,(0,s.aJ)(Math.round((a+C*S)*i)/i,d,ek(d,M,t))&&C++):a<d&&C++);C<n;++C){let P=Math.round((a+C*S)*i)/i;if(w&&P>c)break;r.push({value:P})}return w&&m&&o!==c?r.length&&(0,s.aJ)(r[r.length-1].value,c,ek(c,M,t))?r[r.length-1].value=c:r.push({value:c}):w&&o!==c||r.push({value:o}),r}(a,o);return"ticks"===t.bounds&&(0,s.aG)(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(){let t=this.ticks,e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){let s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return(0,s.o)(t,this.chart.options.locale,this.options.ticks.format)}}class eS extends eM{static id="linear";static defaults={ticks:{callback:s.aL.formatters.numeric}};determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=(0,s.g)(t)?t:0,this.max=(0,s.g)(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),e=t?this.width:this.height,i=(0,s.t)(this.options.ticks.minRotation),a=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,a.lineHeight/((t?Math.sin(i):Math.cos(i))||.001)))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}s.aL.formatters.logarithmic,s.aL.formatters.numeric;let eD={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}},eC=Object.keys(eD)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.