1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[894],{87363:(t,e,i)=>{i.d(e,{$L:()=>e6,Bs:()=>t1,E8:()=>eo,FN:()=>ee,NT:()=>s.d,t1:()=>tG});var s=i(32758);class a{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,s){let a=e.listeners[s],r=e.duration;a.forEach(s=>s({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(i-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=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 r=i.items,n=r.length-1,o=!1;for(;n>=0;--n)(a=r[n])._active?(a._total>i.duration&&(i.duration=a._total),a.tick(t),o=!0):(r[n]=r[r.length-1],r.pop());o&&(s.draw(),this._notify(s,i,t,"progress")),r.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=r.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){let e=this._charts,i=e.get(t);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)}}var r=new a;let n="transparent",o={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){let a=(0,s.c)(t||n),r=a.valid&&(0,s.c)(e||n);return r&&r.valid?r.mix(a,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class l{constructor(t,e,i,a){let r=e[i];a=(0,s.a)([t.to,a,r,t.from]);let n=(0,s.a)([t.from,r,a]);this._active=!0,this._fn=t.fn||o[t.type||typeof n],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=n,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],r=i-this._start,n=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(n,t.duration)),this._total+=r,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,i=t-this._start,s=this._duration,a=this._prop,r=this._from,n=this._loop,o=this._to;if(this._active=r!==o&&(n||i<s),!this._active){this._target[a]=o,this._notify(!0);return}if(i<0){this._target[a]=r;return}e=i/s%2,e=n&&e>1?2-e:e,e=this._easing(Math.min(1,Math.max(0,e))),this._target[a]=this._fn(r,o,e)}wait(){let t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){let e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}s.d.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});let h=Object.keys(s.d.animation);s.d.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),s.d.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),s.d.describe("animations",{_fallback:"animation"}),s.d.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class d{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!(0,s.i)(t))return;let e=this._properties;Object.getOwnPropertyNames(t).forEach(i=>
1{let a=t[i];if(!(0,s.i)(a))return;let r={};for(let t of h)r[t]=a[t];((0,s.b)(a.properties)&&a.properties||[i]).forEach(t=>{t!==i&&e.has(t)||e.set(t,r)})})}_animateOptions(t,e){let i=e.options,s=function(t,e){if(!e)return;let i=t.options;if(!i){t.options=e;return}return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i}(t,i);if(!s)return[];let a=this._createAnimations(s,i);return i.$shared&&(function(t,e){let i=[],s=Object.keys(e);for(let e=0;e<s.length;e++){let a=t[s[e]];a&&a.active()&&i.push(a.wait())}return Promise.all(i)})(t.options.$animations,i).then(()=>{t.options=i},()=>{}),a}_createAnimations(t,e){let i,s=this._properties,a=[],r=t.$animations||(t.$animations={}),n=Object.keys(e),o=Date.now();for(i=n.length-1;i>=0;--i){let h=n[i];if("$"===h.charAt(0))continue;if("options"===h){a.push(...this._animateOptions(t,e));continue}let d=e[h],c=r[h],u=s.get(h);if(c)if(u&&c.active()){c.update(u,d,o);continue}else c.cancel();if(!u||!u.duration){t[h]=d;continue}r[h]=c=new l(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 r.add(this._chart,i),!0}}function c(t,e){let i=t&&t.options||{},s=i.reverse,a=void 0===i.min?e:0,r=void 0===i.max?e:0;return{start:s?r:a,end:s?a:r}}function u(t,e){let i,s,a=[],r=t._getSortedDatasetMetas(e);for(i=0,s=r.length;i<s;++i)a.push(r[i].index);return a}function g(t,e,i,a={}){let r,n,o,l,h=t.keys,d="single"===a.mode;if(null!==e){for(r=0,n=h.length;r<n;++r){if((o=+h[r])===i){if(a.all)continue;break}l=t.values[o],(0,s.g)(l)&&(d||0===e||(0,s.s)(e)===(0,s.s)(l))&&(e+=l)}return e}}function p(t,e){let i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function f(t,e,i,s){for(let a of e.getMatchingVisibleMetas(s).reverse()){let e=t[a.index];if(i&&e>0||!i&&e<0)return a.index}return null}function m(t,e){let i,{chart:s,_cachedMeta:a}=t,r=s._stacks||(s._stacks={}),{iScale:n,vScale:o,index:l}=a,h=n.axis,d=o.axis,c=`${n.id}.${o.id}.${a.stack||a.type}`,u=e.length;for(let t=0;t<u;++t){let s=e[t],{[h]:n,[d]:u}=s;(i=(s._stacks||(s._stacks={}))[d]=function(t,e,i){let s=t[e]||(t[e]={});return s[i]||(s[i]={})}(r,c,n))[l]=u,i._top=f(i,o,!0,a.type),i._bottom=f(i,o,!1,a.type)}}function b(t,e){let i=t.scales;return Object.keys(i).filter(t=>i[t].axis===e).shift()}function x(t,e){let i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s)for(let a of e=e||t._parsed){let t=a._stacks;if(!t||void 0===t[s]||void 0===t[s][i])return;delete t[s][i]}}let _=t=>"reset"===t||"none"===t,v=(t,e)=>e?t:Object.assign({},t),y=(t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:u(i,!0),values:null};class M{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=p(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&x(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,r=e.xAxisID=(0,s.v)(i.xAxisID,b(t,"x")),n=e.yAxisID=(0,s.v)(i.yAxisID,b(t,"y")),o=e.rAxisID=(0,s.v)(i.rAxisID,b(t,"r")),l=e.indexAxis,h=e.iAxisID=a(l,r,n,o),d=e.vAxisID=a(l,n,r,o);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(n),e.rScale=this.getScaleForId(o),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&&x(t)}_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,a=Object.keys(t),r=Array(a.length);for(e=0,i=a.length;e<i;++e)s=a[e],r[e]={x:s,y:t[s]};return r}(e);else if(i!==e){if(i){(0,s.u)(i,this);let t=this._cachedMeta;x(t),t._parsed=[]}
1e&&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=p(e.vScale,e),e.stack!==i.stack&&(s=!0,x(e),e.stack=i.stack),this._resyncElements(t),(s||a!==e._stacked)&&m(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,r,{_cachedMeta:n,_data:o}=this,{iScale:l,_stacked:h}=n,d=l.axis,c=0===t&&e===o.length||n._sorted,u=t>0&&n._parsed[t-1];if(!1===this._parsing)n._parsed=o,n._sorted=!0,r=o;else{r=(0,s.b)(o[t])?this.parseArrayData(n,o,t,e):(0,s.i)(o[t])?this.parseObjectData(n,o,t,e):this.parsePrimitiveData(n,o,t,e);let l=()=>null===a[d]||u&&a[d]<u[d];for(i=0;i<e;++i)n._parsed[i+t]=a=r[i],c&&(l()&&(c=!1),u=a);n._sorted=c}h&&m(this,r)}parsePrimitiveData(t,e,i,s){let a,r,{iScale:n,vScale:o}=t,l=n.axis,h=o.axis,d=n.getLabels(),c=n===o,u=Array(s);for(a=0;a<s;++a)r=a+i,u[a]={[l]:c||n.parse(d[r],r),[h]:o.parse(e[r],r)};return u}parseArrayData(t,e,i,s){let a,r,n,{xScale:o,yScale:l}=t,h=Array(s);for(a=0;a<s;++a)n=e[r=a+i],h[a]={x:o.parse(n[0],r),y:l.parse(n[1],r)};return h}parseObjectData(t,e,i,a){let r,n,o,{xScale:l,yScale:h}=t,{xAxisKey:d="x",yAxisKey:c="y"}=this._parsing,u=Array(a);for(r=0;r<a;++r)o=e[n=r+i],u[r]={x:l.parse((0,s.f)(o,d),n),y:h.parse((0,s.f)(o,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,r=e[t.axis];return g({keys:u(s,!0),values:e._stacks[t.axis]},r,a.index,{mode:i})}updateRangeFromParsed(t,e,i,s){let a=i[e.axis],r=null===a?NaN:a,n=s&&i._stacks[e.axis];s&&n&&(s.values=n,r=g(s,a,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,e){let i,a,r=this._cachedMeta,n=r._parsed,o=r._sorted&&t===r.iScale,l=n.length,h=this._getOtherScale(t),d=y(e,r,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 p(){let e=(a=n[i])[h.axis];return!(0,s.g)(a[t.axis])||u>e||g<e}for(i=0;i<l&&(p()||(this.updateRangeFromParsed(c,t,a,d),!o));++i);if(o){for(i=l-1;i>=0;--i)if(!p()){this.updateRangeFromParsed(c,t,a,d);break}}return c}getAllParsedValues(t){let e,i,a,r=this._cachedMeta._parsed,n=[];for(e=0,i=r.length;e<i;++e)a=r[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,r,n,o=this._cachedMeta;this.update(t||"default"),e=(0,s.v)(this.options.clip,function(t,e,i){if(!1===i)return!1;let s=c(t,i),a=c(e,i);return{top:a.end,right:s.end,bottom:a.start,left:s.start}}(o.xScale,o.yScale,this.getMaxOverflow())),(0,s.i)(e)?(i=e.top,a=e.right,r=e.bottom,n=e.left):i=a=r=n=e,o._clip={top:i,right:a,bottom:r,left:n,disabled:!1===e}}update(t){}draw(){let t,e=this._ctx,i=this.chart,s=this._cachedMeta,a=s.data||[],r=i.chartArea,n=[],o=this._drawStart||0,l=this._drawCount||a.length-o,h=this.options.drawActiveElementsOnTop;for(s.dataset&&s.dataset.draw(e,r,o,l),t=o;t<o+l;++t){let i=a[t];i.hidden||(i.active&&h?n.push(i):i.draw(e,r))}for(t=0;t<n.length;++t)n[t].draw(e,r)}getStyle(t,e){let i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){var a,r,n;let o,l=this.getDataset();if(t>=0&&t<this._cachedMeta.data.length){let e=this._cachedMeta.data[t];(o=e.$context||(a=this.getContext(),e.$context=(0,s.h)(a,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"}))).parsed=this.getParsed(t),o.raw=l.data[t],o.index=o.dataIndex=t}else(o=this.$context||(this.$context=(r=this.chart.getContext(),n=this.index,(0,s.h)(r,{active:!1,dataset:void 0,datasetIndex:n,index:n,mode:"default",type:"dataset"})))).dataset=l,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=i,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){let a="active"===e,r=this._cachedDataOpts,n=t+"-"+e,o=r[n],l=this.enableOptionSharing&&(0,s.j)(i);if(o)return v(o,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]),p=h.resolveNamedOptions(u,g,()=>this.getContext(i,a),c);return p.$shared&&(p.$shared=l,r[n]=Object.freeze(v(p,l))),p}_resolveAnimations(t,e,i){let s,a=this.chart,r=this._cachedDataOpts,n=`animation-${e}`,o=r[n];if(o)return o;if(!1!==a.options.animation){let a=this.chart.config,r=a.datasetAnimationScopeKeys(this._type,e),n=a.getOptionScopes(this.getDataset(),r);s=a.createResolver(n,this.getContext(t,i,e))}let l=new d(a,s&&s.animations);return s&&s._cacheable&&(r[n]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||_(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,a=this.getSharedOptions(i),r=this.includeOptions(e,a)||a!==s;return this.updateSharedOptions(a,e,i),{sharedOptions:a,includeOptions:r}}updateElement(t,e,i,s){_(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!_(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;let a=this.getStyle(e,s);
1this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,i=this._cachedMeta.data;for(let[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];let s=i.length,a=e.length,r=Math.min(a,s);r&&this.parse(0,r),a>s?this._insertElements(s,a-s,t):a<s&&this._removeElements(a,s-a)}_insertElements(t,e,i=!0){let s,a=this._cachedMeta,r=a.data,n=t+e,o=t=>{for(t.length+=e,s=t.length-1;s>=n;s--)t[s]=t[s-e]};for(o(r),s=t;s<n;++s)r[s]=new this.dataElementType;this._parsing&&o(a._parsed),this.parse(t,e),i&&this.updateElements(r,t,e,"reset")}updateElements(t,e,i,s){}_removeElements(t,e){let i=this._cachedMeta;if(this._parsing){let s=i._parsed.splice(t,e);i._stacked&&x(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 k(t,e,i,a){return(0,s.b)(t)?function(t,e,i,s){let a=i.parse(t[0],s),r=i.parse(t[1],s),n=Math.min(a,r),o=Math.max(a,r),l=n,h=o;Math.abs(n)>Math.abs(o)&&(l=o,h=n),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:a,end:r,min:n,max:o}}(t,e,i,a):e[i.axis]=i.parse(t,a),e}function w(t,e,i,s){let a,r,n,o,l=t.iScale,h=t.vScale,d=l.getLabels(),c=l===h,u=[];for(a=i,r=i+s;a<r;++a)o=e[a],(n={})[l.axis]=c||l.parse(d[a],a),u.push(k(o,n,h,a));return u}function S(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function P(t,e,i,s){var a,r,n;return t=s?D((a=t,r=e,n=i,t=a===r?n:a===n?r:a),i,e):D(t,e,i)}function D(t,e,i){return"start"===t?e:"end"===t?i:t}M.defaults={},M.prototype.datasetElementType=null,M.prototype.dataElementType=null;class C extends M{parsePrimitiveData(t,e,i,s){return w(t,e,i,s)}parseArrayData(t,e,i,s){return w(t,e,i,s)}parseObjectData(t,e,i,a){let r,n,o,l,{iScale:h,vScale:d}=t,{xAxisKey:c="x",yAxisKey:u="y"}=this._parsing,g="x"===h.axis?c:u,p="x"===d.axis?c:u,f=[];for(r=i,n=i+a;r<n;++r)l=e[r],(o={})[h.axis]=h.parse((0,s.f)(l,g),r),f.push(k((0,s.f)(l,p),o,d,r));return f}updateRangeFromParsed(t,e,i,s){super.updateRangeFromParsed(t,e,i,s);let a=i._custom;a&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){let{iScale:e,vScale:i}=this._cachedMeta,s=this.getParsed(t),a=s._custom,r=S(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+e.getLabelForValue(s[e.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){let e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,a){let r="reset"===a,{index:n,_cachedMeta:{vScale:o}}=this,l=o.getBasePixel(),h=o.isHorizontal(),d=this._getRuler(),{sharedOptions:c,includeOptions:u}=this._getSharedOptions(e,a);for(let g=e;g<e+i;g++){let e=this.getParsed(g),i=r||(0,s.k)(e[o.axis])?{base:l,head:l}:this._calculateBarValuePixels(g),p=this._calculateBarIndexPixels(g,d),f=(e._stacks||{})[o.axis],m={horizontal:h,base:i.base,enableBorderRadius:!f||S(e._custom)||n===f._top||n===f._bottom,x:h?i.head:p.center,y:h?p.center:i.head,height:h?p.size:Math.abs(i.size),width:h?Math.abs(i.size):p.size};u&&(m.options=c||this.resolveDataElementOptions(g,t[g].active?"active":a));let b=m.options||t[g].options;!function(t,e,i,s){let a,r,n,o,l,h=e.borderSkipped,d={};if(!h){t.borderSkipped=d;return}if(!0===h){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:c,end:u,reverse:g,top:p,bottom:f}=(t.horizontal?(a=t.base>t.x,r="left",n="right"):(a=t.base<t.y,r="bottom",n="top"),a?(o="end",l="start"):(o="start",l="end"),{start:r,end:n,reverse:a,top:o,bottom:l});"middle"===h&&i&&(t.enableBorderRadius=!0,(i._top||0)===s?h=p:(i._bottom||0)===s?h=f:(d[P(f,c,u,g)]=!0,h=p)),d[P(h,c,u,g)]=!0,t.borderSkipped=d}
1(m,b,f,n),function(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?.33*(1===i):e}(m,b,d.ratio),this.updateElement(t[g],g,m,a)}}_getStacks(t,e){let{iScale:i}=this._cachedMeta,a=i.getMatchingVisibleMetas(this._type).filter(t=>t.controller.options.grouped),r=i.options.stacked,n=[],o=t=>{let i=t.controller.getParsed(e),a=i&&i[t.vScale.axis];if((0,s.k)(a)||isNaN(a))return!0};for(let i of a)if(!(void 0!==e&&o(i))&&((!1===r||-1===n.indexOf(i.stack)||void 0===r&&void 0===i.stack)&&n.push(i.stack),i.index===t))break;return n.length||n.push(void 0),n}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){let s=this._getStacks(t,i),a=void 0!==e?s.indexOf(e):-1;return -1===a?s.length-1:a}_getRuler(){let t,e,i=this.options,a=this._cachedMeta,r=a.iScale,n=[];for(t=0,e=a.data.length;t<e;++t)n.push(r.getPixelForValue(this.getParsed(t)[r.axis],t));let o=i.barThickness;return{min:o||function(t){let e,i,a,r,n=t.iScale,o=function(t,e){if(!t._cache.$bar){let i=t.getMatchingVisibleMetas(e),a=[];for(let e=0,s=i.length;e<s;e++)a=a.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=(0,s._)(a.sort((t,e)=>t-e))}return t._cache.$bar}(n,t.type),l=n._length,h=()=>{32767!==a&&-32768!==a&&((0,s.j)(r)&&(l=Math.min(l,Math.abs(a-r)||l)),r=a)};for(e=0,i=o.length;e<i;++e)a=n.getPixelForValue(o[e]),h();for(e=0,r=void 0,i=n.ticks.length;e<i;++e)a=n.getPixelForTick(e),h();return l}(a),pixels:n,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:i.grouped,ratio:o?1:i.categoryPercentage*i.barPercentage}}_calculateBarValuePixels(t){let e,i,{_cachedMeta:{vScale:a,_stacked:r},options:{base:n,minBarLength:o}}=this,l=n||0,h=this.getParsed(t),d=h._custom,c=S(d),u=h[a.axis],g=0,p=r?this.applyStack(a,h,r):u;p!==u&&(g=p-u,p=u),c&&(u=d.barStart,p=d.barEnd-d.barStart,0!==u&&(0,s.s)(u)!==(0,s.s)(d.barEnd)&&(g=0),g+=u);let f=(0,s.k)(n)||c?g:n,m=a.getPixelForValue(f);if(Math.abs(i=(e=this.chart.getDataVisibility(t)?a.getPixelForValue(g+p):m)-m)<o){var b;i=(0!==(b=i)?(0,s.s)(b):(a.isHorizontal()?1:-1)*(a.min>=l?1:-1))*o,u===l&&(m-=i/2);let t=a.getPixelForDecimal(0),r=a.getPixelForDecimal(1),n=Math.min(t,r);e=(m=Math.max(Math.min(m,Math.max(t,r)),n))+i}if(m===a.getPixelForValue(l)){let t=(0,s.s)(i)*a.getLineWidthForValue(l)/2;m+=t,i-=t}return{size:i,base:m,head:e,center:e+i/2}}_calculateBarIndexPixels(t,e){let i,a,r=e.scale,n=this.options,o=n.skipNull,l=(0,s.v)(n.maxBarThickness,1/0);if(e.grouped){let r=o?this._getStackCount(t):e.stackCount,h="flex"===n.barThickness?function(t,e,i,s){let a=e.pixels,r=a[t],n=t>0?a[t-1]:null,o=t<a.length-1?a[t+1]:null,l=i.categoryPercentage;null===n&&(n=r-(null===o?e.end-e.start:o-r)),null===o&&(o=r+r-n);let h=r-(r-Math.min(n,o))/2*l;return{chunk:Math.abs(o-n)/2*l/s,ratio:i.barPercentage,start:h}}(t,e,n,r):function(t,e,i,a){let r,n,o=i.barThickness;return(0,s.k)(o)?(r=e.min*i.categoryPercentage,n=i.barPercentage):(r=o*a,n=1),{chunk:r/a,ratio:n,start:e.pixels[t]-r/2}}(t,e,n,r),d=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);i=h.start+h.chunk*d+h.chunk/2,a=Math.min(l,h.chunk*h.ratio)}else i=r.getPixelForValue(this.getParsed(t)[r.axis],t),a=Math.min(l,e.min*e.ratio);return{base:i-a/2,head:i+a/2,center:i,size:a}}draw(){let t=this._cachedMeta,e=t.vScale,i=t.data,s=i.length,a=0;for(;a<s;++a)null!==this.getParsed(a)[e.axis]&&i[a].draw(this._ctx)}}C.id="bar",C.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},C.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class O extends M{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,s){let a=super.parsePrimitiveData(t,e,i,s);for(let t=0;t<a.length;t++)a[t]._custom=this.resolveDataElementOptions(t+i).radius;return a}parseArrayData(t,e,i,a){let r=super.parseArrayData(t,e,i,a);for(let t=0;t<r.length;t++){let a=e[i+t];r[t]._custom=(0,s.v)(a[2],this.resolveDataElementOptions(t+i).radius)}return r}
1parseObjectData(t,e,i,a){let r=super.parseObjectData(t,e,i,a);for(let t=0;t<r.length;t++){let a=e[i+t];r[t]._custom=(0,s.v)(a&&a.r&&+a.r,this.resolveDataElementOptions(t+i).radius)}return r}getMaxOverflow(){let t=this._cachedMeta.data,e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){let e=this._cachedMeta,{xScale:i,yScale:s}=e,a=this.getParsed(t),r=i.getLabelForValue(a.x),n=s.getLabelForValue(a.y),o=a._custom;return{label:e.label,value:"("+r+", "+n+(o?", "+o:"")+")"}}update(t){let e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){let a="reset"===s,{iScale:r,vScale:n}=this._cachedMeta,{sharedOptions:o,includeOptions:l}=this._getSharedOptions(e,s),h=r.axis,d=n.axis;for(let c=e;c<e+i;c++){let e=t[c],i=!a&&this.getParsed(c),u={},g=u[h]=a?r.getPixelForDecimal(.5):r.getPixelForValue(i[h]),p=u[d]=a?n.getBasePixel():n.getPixelForValue(i[d]);u.skip=isNaN(g)||isNaN(p),l&&(u.options=o||this.resolveDataElementOptions(c,e.active?"active":s),a&&(u.options.radius=0)),this.updateElement(e,c,u,s)}}resolveDataElementOptions(t,e){let i=this.getParsed(t),a=super.resolveDataElementOptions(t,e);a.$shared&&(a=Object.assign({},a,{$shared:!1}));let r=a.radius;return"active"!==e&&(a.radius=0),a.radius+=(0,s.v)(i&&i._custom,r),a}}O.id="bubble",O.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},O.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class L extends M{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){let i=this.getDataset().data,a=this._cachedMeta;if(!1===this._parsing)a._parsed=i;else{let r,n,o=t=>+i[t];if((0,s.i)(i[t])){let{key:t="value"}=this._parsing;o=e=>+(0,s.f)(i[e],t)}for(r=t,n=t+e;r<n;++r)a._parsed[r]=o(r)}}_getRotation(){return(0,s.t)(this.options.rotation-90)}_getCircumference(){return(0,s.t)(this.options.circumference)}_getRotationExtents(){let t=s.T,e=-s.T;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)){let s=this.chart.getDatasetMeta(i).controller,a=s._getRotation(),r=s._getCircumference();t=Math.min(t,a),e=Math.max(e,a+r)}return{rotation:t,circumference:e-t}}update(t){let{chartArea:e}=this.chart,i=this._cachedMeta,a=i.data,r=this.getMaxBorderWidth()+this.getMaxOffset(a
1)+this.options.spacing,n=Math.max((Math.min(e.width,e.height)-r)/2,0),o=Math.min((0,s.m)(this.options.cutout,n),1),l=this._getRingWeight(this.index),{circumference:h,rotation:d}=this._getRotationExtents(),{ratioX:c,ratioY:u,offsetX:g,offsetY:p}=function(t,e,i){let a=1,r=1,n=0,o=0;if(e<s.T){let l=t+e,h=Math.cos(t),d=Math.sin(t),c=Math.cos(l),u=Math.sin(l),g=(e,a,r)=>(0,s.p)(e,t,l,!0)?1:Math.max(a,a*i,r,r*i),p=(e,a,r)=>(0,s.p)(e,t,l,!0)?-1:Math.min(a,a*i,r,r*i),f=g(0,h,c),m=g(s.H,d,u),b=p(s.P,h,c),x=p(s.P+s.H,d,u);a=(f-b)/2,r=(m-x)/2,n=-(f+b)/2,o=-(m+x)/2}return{ratioX:a,ratioY:r,offsetX:n,offsetY:o}}(d,h,o),f=Math.max(Math.min((e.width-r)/c,(e.height-r)/u)/2,0),m=(0,s.n)(this.options.radius,f),b=Math.max(m*o,0),x=(m-b)/this._getVisibleDatasetWeightTotal();this.offsetX=g*m,this.offsetY=p*m,i.total=this.calculateTotal(),this.outerRadius=m-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*l,0),this.updateElements(a,0,a.length,t)}_circumference(t,e){let i=this.options,a=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===a._parsed[t]||a.data[t].hidden?0:this.calculateCircumference(a._parsed[t]*r/s.T)}updateElements(t,e,i,s){let a,r="reset"===s,n=this.chart,o=n.chartArea,l=n.options.animation,h=(o.left+o.right)/2,d=(o.top+o.bottom)/2,c=r&&l.animateScale,u=c?0:this.innerRadius,g=c?0:this.outerRadius,{sharedOptions:p,includeOptions:f}=this._getSharedOptions(e,s),m=this._getRotation();for(a=0;a<e;++a)m+=this._circumference(a,r);for(a=e;a<e+i;++a){let e=this._circumference(a,r),i=t[a],n={x:h+this.offsetX,y:d+this.offsetY,startAngle:m,endAngle:m+e,circumference:e,outerRadius:g,innerRadius:u};f&&(n.options=p||this.resolveDataElementOptions(a,i.active?"active":s)),m+=e,this.updateElement(i,a,n,s)}}calculateTotal(){let t,e=this._cachedMeta,i=e.data,s=0;for(t=0;t<i.length;t++){let a=e._parsed[t];null!==a&&!isNaN(a)&&this.chart.getDataVisibility(t)&&!i[t].hidden&&(s+=Math.abs(a))}return s}calculateCircumference(t){let e=this._cachedMeta.total;return e>0&&!isNaN(t)?s.T*(Math.abs(t)/e):0}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart,a=i.data.labels||[],r=(0,s.o)(e._parsed[t],i.options.locale);return{label:a[t]||"",value:r}}getMaxBorderWidth(t){let e,i,s,a,r,n=0,o=this.chart;if(!t){for(e=0,i=o.data.datasets.length;e<i;++e)if(o.isDatasetVisible(e)){t=(s=o.getDatasetMeta(e)).data,a=s.controller;break}}if(!t)return 0;for(e=0,i=t.length;e<i;++e)"inner"!==(r=a.resolveDataElementOptions(e)).borderAlign&&(n=Math.max(n,r.borderWidth||0,r.hoverBorderWidth||0));return n}getMaxOffset(t){let e=0;for(let i=0,s=t.length;i<s;++i){let t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max((0,s.v)(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}L.id="doughnut",L.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"},L.descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t},L.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:i}}=t.legend.options;return e.labels.map((e,s)=>{let a=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label,i=": "+t.formattedValue;return(0,s.b)(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class E extends M{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let e=this._cachedMeta,{dataset:i,data:a=[],_dataset:r}=e,n=this.chart._animationsDisabled,{start:o,count:l}=(0,s.q)(e,a,n);this._drawStart=o,this._drawCount=l,(0,s.w)(e)&&(o=0,l=a.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=a;let h=this.resolveDatasetElementOptions(t);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(i,void 0,{animated:!n,options:h},t),this.updateElements(a,o,l,t)}updateElements(t,e,i,a){let r="reset"===a,{iScale:n,vScale:o,_stacked:l,_dataset:h}=this._cachedMeta,{sharedOptions:d,includeOptions:c}=this._getSharedOptions(e,a),u=n.axis,g=o.axis,{spanGaps:p,segment:f}
1=this.options,m=(0,s.x)(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===a,x=e>0&&this.getParsed(e-1);for(let p=e;p<e+i;++p){let e=t[p],i=this.getParsed(p),_=b?e:{},v=(0,s.k)(i[g]),y=_[u]=n.getPixelForValue(i[u],p),M=_[g]=r||v?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,i,l):i[g],p);_.skip=isNaN(y)||isNaN(M)||v,_.stop=p>0&&Math.abs(i[u]-x[u])>m,f&&(_.parsed=i,_.raw=h.data[p]),c&&(_.options=d||this.resolveDataElementOptions(p,e.active?"active":a)),b||this.updateElement(e,p,_,a),x=i}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];return s.length?Math.max(i,s[0].size(this.resolveDataElementOptions(0)),s[s.length-1].size(this.resolveDataElementOptions(s.length-1)))/2:i}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}E.id="line",E.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},E.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class A extends M{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart,a=i.data.labels||[],r=(0,s.o)(e._parsed[t].r,i.options.locale);return{label:a[t]||"",value:r}}parseObjectData(t,e,i,a){return s.y.bind(this)(t,e,i,a)}update(t){let e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((t,i)=>{let s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(s<e.min&&(e.min=s),s>e.max&&(e.max=s))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,i=t.options,s=Math.max(Math.min(e.right-e.left,e.bottom-e.top)/2,0),a=Math.max(i.cutoutPercentage?s/100*i.cutoutPercentage:1,0),r=(s-a)/t.getVisibleDatasetCount();this.outerRadius=s-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,i,a){let r,n="reset"===a,o=this.chart,l=o.options.animation,h=this._cachedMeta.rScale,d=h.xCenter,c=h.yCenter,u=h.getIndexAngle(0)-.5*s.P,g=u,p=360/this.countVisibleElements();for(r=0;r<e;++r)g+=this._computeAngle(r,a,p);for(r=e;r<e+i;r++){let e=t[r],i=g,s=g+this._computeAngle(r,a,p),f=o.getDataVisibility(r)?h.getDistanceFromCenterForValue(this.getParsed(r).r):0;g=s,n&&(l.animateScale&&(f=0),l.animateRotate&&(i=s=u));let m={x:d,y:c,innerRadius:0,outerRadius:f,startAngle:i,endAngle:s,options:this.resolveDataElementOptions(r,e.active?"active":a)};this.updateElement(e,r,m,a)}}countVisibleElements(){let t=this._cachedMeta,e=0;return t.data.forEach((t,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?(0,s.t)(this.resolveDataElementOptions(t,e).angle||i):0}}A.id="polarArea",A.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},A.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:i}}=t.legend.options;return e.labels.map((e,s)=>{let a=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class T extends L{}T.id="pie",T.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class z extends M{getLabelAndValue(t){let e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,a){return s.y.bind(this)(t,e,i,a)}update(t){let e=this._cachedMeta,i=e.dataset,s=e.data||[],a=e.iScale.getLabels();if(i.points=s,"resize"!==t){let e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);let r={_loop:!0,_fullLoop:a.length===s.length,options:e};this.updateElement(i,void 0,r,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){let a=this._cachedMeta.rScale,r="reset"===s;for(let n=e;n<e+i;n++){let e=t[n],i=this.resolveDataElementOptions(n,e.active?"active":s),o=a.getPointPositionForValue(n,this.getParsed(n).r),l=r?a.xCenter:o.x,h=r?a.yCenter:o.y,d={x:l,y:h,angle:o.angle,skip:isNaN(l)||isNaN(h),options:i};this.updateElement(e,n,d,s)}}}z.id="radar",z.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},z.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class R{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}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}}R.defaults={},R.defaultRoutes=void 0;let F={values:t=>(0,s.b)(t)?t:""+t,numeric(t,e,i){let a;if(0===t)return"0";let r=this.chart.options.locale,n=t;if(i.length>1){var o,l;let e,s=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(s<1e-4||s>1e15)&&(a="scientific"),o=t,Math.abs(e=(l=i).length>3?l[2].value-l[1].value:l[1].value-l[0].value)>
1=1&&o!==Math.floor(o)&&(e=o-Math.floor(o)),n=e}let h=Math.max(Math.min(-1*Math.floor((0,s.z)(Math.abs(n))),20),0),d={notation:a,minimumFractionDigits:h,maximumFractionDigits:h};return Object.assign(d,this.options.ticks.format),(0,s.o)(t,r,d)},logarithmic(t,e,i){if(0===t)return"0";let a=t/Math.pow(10,Math.floor((0,s.z)(t)));return 1===a||2===a||5===a?F.numeric.call(this,t,e,i):""}};var I={formatters:F};function V(t,e,i,a,r){let n,o,l,h=(0,s.v)(a,0),d=Math.min((0,s.v)(r,t.length),t.length),c=0;for(i=Math.ceil(i),r&&(i=(n=r-a)/Math.floor(n/i)),l=h;l<0;)l=Math.round(h+ ++c*i);for(o=Math.max(h,0);o<d;o++)o===l&&(e.push(t[o]),l=Math.round(h+ ++c*i))}s.d.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:I.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),s.d.route("scale.ticks","color","","color"),s.d.route("scale.grid","color","","borderColor"),s.d.route("scale.grid","borderColor","","borderColor"),s.d.route("scale.title","color","","color"),s.d.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),s.d.describe("scales",{_fallback:"scale"}),s.d.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});let B=t=>"left"===t?"right":"right"===t?"left":t,N=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function H(t,e){let i=[],s=t.length/e,a=t.length,r=0;for(;r<a;r+=s)i.push(t[Math.floor(r)]);return i}function W(t){return t.drawTicks?t.tickLength:0}function j(t,e){if(!t.display)return 0;let i=(0,s.O)(t.font,e),a=(0,s.K)(t.padding);return((0,s.b)(t.text)?t.text.length:1)*i.lineHeight+a.height}class $ extends R{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.B)(t,Number.POSITIVE_INFINITY),e=(0,s.B)(e,Number.NEGATIVE_INFINITY),i=(0,s.B)(i,Number.POSITIVE_INFINITY),a=(0,s.B)(a,Number.NEGATIVE_INFINITY),{min:(0,s.B)(t,i),max:(0,s.B)(e,a),minDefined:(0,s.g)(t),maxDefined:(0,s.g)(e)}}getMinMax(t){let e,{min:i,max:a,minDefined:r,maxDefined:n}=this.getUserBounds();if(r&&n)return{min:i,max:a};let o=this.getMatchingVisibleMetas();for(let s=0,l=o.length;s<l;++s)e=o[s].controller.getMinMax(this,t),r||(i=Math.min(i,e.min)),n||(a=Math.max(a,e.max));return i=n&&i>a?a:i,a=r&&i>a?i:a,{min:(0,s.B)(i,(0,s.B)(a,i)),max:(0,s.B)(a,(0,s.B)(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||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){(0,s.C)(this.options.beforeUpdate,[this])}update(t,e,i){let{beginAtZero:a,grace:r,ticks:n}=this.options,o=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.D)(this,r,a),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=o<this.ticks.length;this._convertTicksToLabels(l?H(this.ticks,o):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=i.maxTicksLimit||function(t){let e=t.options.offset,i=t._tickSize();return Math.floor(Math.min(t._length/i+ +!e,t._maxLength/i))}(t),r=i.major.enabled?function(t){let e,i,s=[];for(e=0,i=t.length;e<i;e++)t[e].major&&s.push(e);return s}(e):[],n=r.length,o=r[0],l=r[n-1],h=[];if(n>
1a)return function(t,e,i,s){let a,r=0,n=i[0];for(a=0,s=Math.ceil(s);a<t.length;a++)a===n&&(e.push(t[a]),n=i[++r*s])}(e,h,r,n/a),h;let d=function(t,e,i){let a=function(t){let e,i,s=t.length;if(s<2)return!1;for(i=t[0],e=1;e<s;++e)if(t[e]-t[e-1]!==i)return!1;return i}(t),r=e.length/i;if(!a)return Math.max(r,1);let n=(0,s.A)(a);for(let t=0,e=n.length-1;t<e;t++){let e=n[t];if(e>r)return e}return Math.max(r,1)}(r,e,a);if(n>0){let t,i,a=n>1?Math.round((l-o)/(n-1)):null;for(V(e,h,d,(0,s.k)(a)?0:o-a,o),t=0,i=n-1;t<i;t++)V(e,h,d,r[t],r[t+1]);return V(e,h,d,l,(0,s.k)(a)?e.length:l+a),h}return V(e,h,d),h}(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.C)(this.options.afterUpdate,[this])}beforeSetDimensions(){(0,s.C)(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.C)(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),(0,s.C)(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.C)(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){let e,i,a,r=this.options.ticks;for(e=0,i=t.length;e<i;e++)(a=t[e]).label=(0,s.C)(r.callback,[a.value,e,t],this)}afterTickToLabelConversion(){(0,s.C)(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){(0,s.C)(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let t,e,i,a=this.options,r=a.ticks,n=this.ticks.length,o=r.minRotation||0,l=r.maxRotation,h=o;if(!this._isVisible()||!r.display||o>=l||n<=1||!this.isHorizontal()){this.labelRotation=o;return}let d=this._getLabelSizes(),c=d.widest.width,u=d.highest.height,g=(0,s.E)(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-W(a.grid)-r.padding-j(a.title,this.chart.options.font),i=Math.sqrt(c*c+u*u),h=Math.max(o,Math.min(l,h=(0,s.F)(Math.min(Math.asin((0,s.E)((d.highest.height+6)/t,-1,1)),Math.asin((0,s.E)(e/i,-1,1))-Math.asin((0,s.E)(u/i,-1,1))))))),this.labelRotation=h}afterCalculateLabelRotation(){(0,s.C)(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){(0,s.C)(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:e,options:{ticks:i,title:a,grid:r}}=this,n=this._isVisible(),o=this.isHorizontal();if(n){let n=j(a,e.options.font);if(o?(t.width=this.maxWidth,t.height=W(r)+n):(t.height=this.maxHeight,t.width=W(r)+n),i.display&&this.ticks.length){let{first:e,last:a,widest:r,highest:n}=this._getLabelSizes(),l=2*i.padding,h=(0,s.t)(this.labelRotation),d=Math.cos(h),c=Math.sin(h);if(o){let e=i.mirror?0:c*r.width+d*n.height;t.height=Math.min(this.maxHeight,t.height+e+l)}else{let e=i.mirror?0:d*r.width+c*n.height;t.width=Math.min(this.maxWidth,t.width+e+l)}this._calculatePadding(e,a,c,d)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){let{ticks:{align:a,padding:r},position:n}=this.options,o=0!==this.labelRotation,l="top"!==n&&"x"===this.axis;if(this.isHorizontal()){let n=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1),d=0,c=0;o?l?(d=s*t.width,c=i*e.height):(d=i*t.height,c=s*e.width):"start"===a?c=e.width:"end"===a?d=t.width:"inner"!==a&&(d=t.width/2,c=e.width/2),this.paddingLeft=Math.max((d-n+r)*this.width/(this.width-n),0),this.paddingRight=Math.max((c-h+r)*this.width/(this.width-h),0)}
1else{let i=e.height/2,s=t.height/2;"start"===a?(i=0,s=t.height):"end"===a&&(i=e.height,s=0),this.paddingTop=i+r,this.paddingBottom=s+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){(0,s.C)(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=H(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length)}return t}_computeLabelSizes(t,e){let i,a,r,n,o,l,h,d,c,u,g,{ctx:p,_longestTextCache:f}=this,m=[],b=[],x=0,_=0;for(i=0;i<e;++i){if(n=t[i].label,p.font=l=(o=this._resolveTickFontOptions(i)).string,h=f[l]=f[l]||{data:{},gc:[]},d=o.lineHeight,c=u=0,(0,s.k)(n)||(0,s.b)(n)){if((0,s.b)(n))for(a=0,r=n.length;a<r;++a)g=n[a],(0,s.k)(g)||(0,s.b)(g)||(c=(0,s.G)(p,h.data,h.gc,c,g),u+=d)}else c=(0,s.G)(p,h.data,h.gc,c,n),u=d;m.push(c),b.push(u),x=Math.max(c,x),_=Math.max(u,_)}(0,s.Q)(f,t=>{let i,s=t.gc,a=s.length/2;if(a>e){for(i=0;i<a;++i)delete t.data[s[i]];s.splice(0,a)}});let v=m.indexOf(x),y=b.indexOf(_),M=t=>({width:m[t]||0,height:b[t]||0});return{first:M(0),last:M(e-1),widest:M(v),highest:M(y),widths:m,heights:b}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let e=this._startPixel+t*this._length;return(0,s.I)(this._alignToPixels?(0,s.J)(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 i=a[t];return i.$context||(e=this.getContext(),i.$context=(0,s.h)(e,{tick:i,index:t,type:"tick"}))}return this.$context||(this.$context=(i=this.chart.getContext(),(0,s.h)(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)),r=this._getLabelSizes(),n=t.autoSkipPadding||0,o=r?r.widest.width+n:0,l=r?r.highest.height+n:0;return this.isHorizontal()?l*i>o*a?o/i:l/a:l*a<o*i?l/i:o/a}_isVisible(){let t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){let e,i,a,r,n,o,l,h,d,c,u,g,p=this.axis,f=this.chart,m=this.options,{grid:b,position:x}=m,_=b.offset,v=this.isHorizontal(),y=this.ticks.length+ +!!_,M=W(b),k=[],w=b.setContext(this.getContext()),S=w.drawBorder?w.borderWidth:0,P=S/2,D=function(t){return(0,s.J)(f,t,S)};if("top"===x)e=D(this.bottom),o=this.bottom-M,h=e-P,c=D(t.top)+P,g=t.bottom;else if("bottom"===x)e=D(this.top),c=t.top,g=D(t.bottom)-P,o=e+P,h=this.top+M;else if("left"===x)e=D(this.right),n=this.right-M,l=e-P,d=D(t.left)+P,u=t.right;else if("right"===x)e=D(this.left),d=t.left,u=D(t.right)-P,n=e+P,l=this.left+M;else if("x"===p){if("center"===x)e=D((t.top+t.bottom)/2+.5);else if((0,s.i)(x)){let t=Object.keys(x)[0],i=x[t];e=D(this.chart.scales[t].getPixelForValue(i))}c=t.top,g=t.bottom,h=(o=e+P)+M}else if("y"===p){if("center"===x)e=D((t.left+t.right)/2);else if((0,s.i)(x)){let t=Object.keys(x)[0],i=x[t];e=D(this.chart.scales[t].getPixelForValue(i))}l=(n=e-P)-M,d=t.left,u=t.right}let C=(0,s.v)(m.ticks.maxTicksLimit,y),O=Math.max(1,Math.ceil(y/C));for(i=0;i<y;i+=O){let t=b.setContext(this.getContext(i)),e=t.lineWidth,p=t.color,m=t.borderDash||[],x=t.borderDashOffset,y=t.tickWidth,M=t.tickColor,w=t.tickBorderDash||[],S=t.tickBorderDashOffset;
1void 0!==(a=function(t,e,i){let s,a=t.ticks.length,r=Math.min(e,a-1),n=t._startPixel,o=t._endPixel,l=t.getPixelForTick(r);if(!i||(s=1===a?Math.max(l-n,o-l):0===e?(t.getPixelForTick(1)-l)/2:(l-t.getPixelForTick(r-1))/2,!((l+=r<e?s:-s)<n-1e-6)&&!(l>o+1e-6)))return l}(this,i,_))&&(r=(0,s.J)(f,a,e),v?n=l=d=u=r:o=h=c=g=r,k.push({tx1:n,ty1:o,tx2:l,ty2:h,x1:d,y1:c,x2:u,y2:g,width:e,color:p,borderDash:m,borderDashOffset:x,tickWidth:y,tickColor:M,tickBorderDash:w,tickBorderDashOffset:S}))}return this._ticksLength=y,this._borderValue=e,k}_computeLabelItems(t){let e,i,a,r,n,o,l,h,d,c,u,g=this.axis,p=this.options,{position:f,ticks:m}=p,b=this.isHorizontal(),x=this.ticks,{align:_,crossAlign:v,padding:y,mirror:M}=m,k=W(p.grid),w=k+y,S=M?-y:w,P=-(0,s.t)(this.labelRotation),D=[],C="middle";if("top"===f)n=this.bottom-S,o=this._getXAxisLabelAlignment();else if("bottom"===f)n=this.top+S,o=this._getXAxisLabelAlignment();else if("left"===f){let t=this._getYAxisLabelAlignment(k);o=t.textAlign,r=t.x}else if("right"===f){let t=this._getYAxisLabelAlignment(k);o=t.textAlign,r=t.x}else if("x"===g){if("center"===f)n=(t.top+t.bottom)/2+w;else if((0,s.i)(f)){let t=Object.keys(f)[0],e=f[t];n=this.chart.scales[t].getPixelForValue(e)+w}o=this._getXAxisLabelAlignment()}else if("y"===g){if("center"===f)r=(t.left+t.right)/2-w;else if((0,s.i)(f)){let t=Object.keys(f)[0],e=f[t];r=this.chart.scales[t].getPixelForValue(e)}o=this._getYAxisLabelAlignment(k).textAlign}"y"===g&&("start"===_?C="top":"end"===_&&(C="bottom"));let O=this._getLabelSizes();for(e=0,i=x.length;e<i;++e){let t;a=x[e].label;let g=m.setContext(this.getContext(e));l=this.getPixelForTick(e)+m.labelOffset,d=(h=this._resolveTickFontOptions(e)).lineHeight;let p=(c=(0,s.b)(a)?a.length:1)/2,_=g.color,y=g.textStrokeColor,k=g.textStrokeWidth,w=o;if(b?(r=l,"inner"===o&&(w=e===i-1?this.options.reverse?"left":"right":0===e?this.options.reverse?"right":"left":"center"),u="top"===f?"near"===v||0!==P?-c*d+d/2:"center"===v?-O.highest.height/2-p*d+d:-O.highest.height+d/2:"near"===v||0!==P?d/2:"center"===v?O.highest.height/2-p*d:O.highest.height-c*d,M&&(u*=-1)):(n=l,u=(1-c)*d/2),g.showLabelBackdrop){let i=(0,s.K)(g.backdropPadding),a=O.heights[e],l=O.widths[e],h=n+u-i.top,d=r-i.left;switch(C){case"middle":h-=a/2;break;case"bottom":h-=a}switch(o){case"center":d-=l/2;break;case"right":d-=l}t={left:d,top:h,width:l+i.width,height:a+i.height,color:g.backdropColor}}D.push({rotation:P,label:a,font:h,color:_,strokeColor:y,strokeWidth:k,textOffset:u,textAlign:w,textBaseline:C,translation:[r,n],backdrop:t})}return D}_getXAxisLabelAlignment(){let{position:t,ticks:e}=this.options;if(-(0,s.t)(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){let e,i,{position:s,ticks:{crossAlign:a,mirror:r,padding:n}}=this.options,o=this._getLabelSizes(),l=t+n,h=o.widest.width;return"left"===s?r?(i=this.right+n,"near"===a?e="left":"center"===a?(e="center",i+=h/2):(e="right",i+=h)):(i=this.right-l,"near"===a?e="right":"center"===a?(e="center",i-=h/2):(e="left",i=this.left)):"right"===s?r?(i=this.left+n,"near"===a?e="right":"center"===a?(e="center",i-=h/2):(e="left",i-=h)):(i=this.left+l,"near"===a?e="left":"center"===a?(e="center",i+=h/2):(e="right",i=this.right)):e="right",{textAlign:e,x:i}}_computeLabelArea(){if(this.options.ticks.mirror)return;let t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}
1:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){let{ctx:t,options:{backgroundColor:e},left:i,top:s,width:a,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,a,r),t.restore())}getLineWidthForValue(t){let e=this.options.grid;if(!this._isVisible()||!e.display)return 0;let i=this.ticks.findIndex(e=>e.value===t);return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){let e,i,s=this.options.grid,a=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),n=(t,e,i)=>{i.width&&i.color&&(a.save(),a.lineWidth=i.width,a.strokeStyle=i.color,a.setLineDash(i.borderDash||[]),a.lineDashOffset=i.borderDashOffset,a.beginPath(),a.moveTo(t.x,t.y),a.lineTo(e.x,e.y),a.stroke(),a.restore())};if(s.display)for(e=0,i=r.length;e<i;++e){let t=r[e];s.drawOnChartArea&&n({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),s.drawTicks&&n({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){let t,e,i,a,{chart:r,ctx:n,options:{grid:o}}=this,l=o.setContext(this.getContext()),h=o.drawBorder?l.borderWidth:0;if(!h)return;let d=o.setContext(this.getContext(0)).lineWidth,c=this._borderValue;this.isHorizontal()?(t=(0,s.J)(r,this.left,h)-h/2,e=(0,s.J)(r,this.right,d)+d/2,i=a=c):(i=(0,s.J)(r,this.top,h)-h/2,a=(0,s.J)(r,this.bottom,d)+d/2,t=e=c),n.save(),n.lineWidth=l.borderWidth,n.strokeStyle=l.borderColor,n.beginPath(),n.moveTo(t,i),n.lineTo(e,a),n.stroke(),n.restore()}drawLabels(t){let e,i;if(!this.options.ticks.display)return;let a=this.ctx,r=this._computeLabelArea();r&&(0,s.L)(a,r);let n=this._labelItems||(this._labelItems=this._computeLabelItems(t));for(e=0,i=n.length;e<i;++e){let t=n[e],i=t.font,r=t.label;t.backdrop&&(a.fillStyle=t.backdrop.color,a.fillRect(t.backdrop.left,t.backdrop.top,t.backdrop.width,t.backdrop.height));let o=t.textOffset;(0,s.M)(a,r,0,o,i,t)}r&&(0,s.N)(a)}drawTitle(){let t,{ctx:e,options:{position:i,title:a,reverse:r}}=this;if(!a.display)return;let n=(0,s.O)(a.font),o=(0,s.K)(a.padding),l=a.align,h=n.lineHeight/2;"bottom"===i||"center"===i||(0,s.i)(i)?(h+=o.bottom,(0,s.b)(a.text)&&(h+=n.lineHeight*(a.text.length-1))):h+=o.top;let{titleX:d,titleY:c,maxWidth:u,rotation:g}=function(t,e,i,a){let r,n,o,{top:l,left:h,bottom:d,right:c,chart:u}=t,{chartArea:g,scales:p}=u,f=0,m=d-l,b=c-h;if(t.isHorizontal()){if(n=(0,s.S)(a,h,c),(0,s.i)(i)){let t=Object.keys(i)[0],s=i[t];o=p[t].getPixelForValue(s)+m-e}else o="center"===i?(g.bottom+g.top)/2+m-e:N(t,i,e);r=c-h}else{if((0,s.i)(i)){let t=Object.keys(i)[0],s=i[t];n=p[t].getPixelForValue(s)-b+e}else n="center"===i?(g.left+g.right)/2-b+e:N(t,i,e);o=(0,s.S)(a,d,l),f="left"===i?-s.H:s.H}return{titleX:n,titleY:o,maxWidth:r,rotation:f}}(this,h,i,l);(0,s.M)(e,a.text,0,0,n,{color:a.color,maxWidth:u,rotation:g,textAlign:(t=(0,s.R)(l),(r&&"right"!==i||!r&&"right"===i)&&(t=B(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);return this._isVisible()&&this.draw===$.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){let e,i,s=this.chart.getSortedVisibleDatasetMetas(),a=this.axis+"AxisID",r=[];for(e=0,i=s.length;e<i;++e){let i=s[e];i[a]!==this.id||t&&i.type!==t||r.push(i)}return r}_resolveTickFontOptions(t){let e=this.options.ticks.setContext(this.getContext(t));return(0,s.O)(e.font)}_maxDigits(){let t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class U{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){var e;let i,a=Object.getPrototypeOf(t);"id"in(e=a)&&"defaults"in e&&(i=this.register(a));let r=this.items,n=t.id,o=this.scope+"."+n;if(!n)throw Error("class does not have id: "+t);
1return n in r||(r[n]=t,function(t,e,i){let a=(0,s.V)(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("."),r=a.pop(),n=[t].concat(a).join("."),o=e[i].split("."),l=o.pop(),h=o.join(".");s.d.route(n,r,h,l)})}(e,t.defaultRoutes),t.descriptors&&s.d.describe(e,t.descriptors)}(t,o,i),this.override&&s.d.override(t.id,t.overrides)),o}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.U[i])}}class Y{constructor(){this.controllers=new U(M,"datasets",!0),this.elements=new U(R,"elements"),this.plugins=new U(Object,"plugins"),this.scales=new U($,"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.Q)(e,e=>{let s=i||this._getRegistryForType(e);this._exec(t,s,e)})})}_exec(t,e,i){let a=(0,s.W)(t);(0,s.C)(i["before"+a],[],i),e[t](i),(0,s.C)(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}}var K=new Y;class Q extends M{update(t){let e=this._cachedMeta,{data:i=[]}=e,a=this.chart._animationsDisabled,{start:r,count:n}=(0,s.q)(e,i,a);if(this._drawStart=r,this._drawCount=n,(0,s.w)(e)&&(r=0,n=i.length),this.options.showLine){let{dataset:s,_dataset:r}=e;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!r._decimated,s.points=i;let n=this.resolveDatasetElementOptions(t);n.segment=this.options.segment,this.updateElement(s,void 0,{animated:!a,options:n},t)}this.updateElements(i,r,n,t)}addElements(){let{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=K.getElement("line")),super.addElements()}updateElements(t,e,i,a){let r="reset"===a,{iScale:n,vScale:o,_stacked:l,_dataset:h}=this._cachedMeta,d=this.resolveDataElementOptions(e,a),c=this.getSharedOptions(d),u=this.includeOptions(a,c),g=n.axis,p=o.axis,{spanGaps:f,segment:m}=this.options,b=(0,s.x)(f)?f:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||r||"none"===a,_=e>0&&this.getParsed(e-1);for(let d=e;d<e+i;++d){let e=t[d],i=this.getParsed(d),f=x?e:{},v=(0,s.k)(i[p]),y=f[g]=n.getPixelForValue(i[g],d),M=f[p]=r||v?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,i,l):i[p],d);f.skip=isNaN(y)||isNaN(M)||v,f.stop=d>0&&Math.abs(i[g]-_[g])>b,m&&(f.parsed=i,f.raw=h.data[d]),u&&(f.options=c||this.resolveDataElementOptions(d,e.active?"active":a)),x||this.updateElement(e,d,f,a),_=i}this.updateSharedOptions(c,a,d)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}let i=t.dataset,s=i.options&&i.options.borderWidth||0;return e.length?Math.max(s,e[0].size(this.resolveDataElementOptions(0)),e[e.length-1].size(this.resolveDataElementOptions(e.length-1)))/2:s}}Q.id="scatter",Q.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},Q.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var X=Object.freeze({__proto__:null,BarController:C,BubbleController:O,DoughnutController:L,LineController:E,PolarAreaController:A,PieController:T,RadarController:z,ScatterController:Q});function G(){throw Error("This method is not implemented: Check that a complete date adapter is provided.")}class q{constructor(t){this.options=t||{}}init(t){}formats(){return G()}parse(t,e){return G()}format(t,e){return G()}add(t,e,i){return G()}diff(t,e,i){return G()}startOf(t,e,i){return G()}endOf(t,e){return G()}}q.override=function(t){Object.assign(q.prototype,t)};var J={_date:q};
1function Z(t,e,i,a,r){let n=t.getSortedVisibleDatasetMetas(),o=i[e];for(let t=0,i=n.length;t<i;++t){let{index:i,data:l}=n[t],{lo:h,hi:d}=function(t,e,i,a){let{controller:r,data:n,_sorted:o}=t,l=r._cachedMeta.iScale;if(l&&e===l.axis&&"r"!==e&&o&&n.length){let t=l._reversePixels?s.Y:s.Z;if(!a)return t(n,e,i);if(r._sharedOptions){let s=n[0],a="function"==typeof s.getRange&&s.getRange(e);if(a){let s=t(n,e,i-a),r=t(n,e,i+a);return{lo:s.lo,hi:r.hi}}}}return{lo:0,hi:n.length-1}}(n[t],e,o,r);for(let t=h;t<=d;++t){let e=l[t];e.skip||a(e,i,t)}}}function tt(t,e,i,a,r){let n=[];return(r||t.isPointInArea(e))&&Z(t,i,e,function(i,o,l){(r||(0,s.$)(i,t.chartArea,0))&&i.inRange(e.x,e.y,a)&&n.push({element:i,datasetIndex:o,index:l})},!0),n}function te(t,e,i,a,r,n){let o;return n||t.isPointInArea(e)?"r"!==i||a?function(t,e,i,s,a,r){let n=[],o=function(t){let e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,s){return Math.sqrt(Math.pow(e?Math.abs(t.x-s.x):0,2)+Math.pow(i?Math.abs(t.y-s.y):0,2))}}(i),l=Number.POSITIVE_INFINITY;return Z(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);if(!(r||t.isPointInArea(u))&&!c)return;let g=o(e,u);g<l?(n=[{element:i,datasetIndex:h,index:d}],l=g):g===l&&n.push({element:i,datasetIndex:h,index:d})}),n}(t,e,i,a,r,n):(o=[],Z(t,i,e,function(t,i,a){let{startAngle:n,endAngle:l}=t.getProps(["startAngle","endAngle"],r),{angle:h}=(0,s.a0)(t,{x:e.x,y:e.y});(0,s.p)(h,n,l)&&o.push({element:t,datasetIndex:i,index:a})}),o):[]}function ti(t,e,i,s,a){let r=[],n="x"===i?"inXRange":"inYRange",o=!1;return(Z(t,i,e,(t,s,l)=>{t[n](e[i],a)&&(r.push({element:t,datasetIndex:s,index:l}),o=o||t.inRange(e.x,e.y,a))}),s&&!o)?[]:r}var ts={modes:{index(t,e,i,a){let r=(0,s.X)(e,t),n=i.axis||"x",o=i.includeInvisible||!1,l=i.intersect?tt(t,r,n,a,o):te(t,r,n,!1,a,o),h=[];return 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 r=(0,s.X)(e,t),n=i.axis||"xy",o=i.includeInvisible||!1,l=i.intersect?tt(t,r,n,a,o):te(t,r,n,!1,a,o);if(l.length>0){let e=l[0].datasetIndex,i=t.getDatasetMeta(e).data;l=[];for(let t=0;t<i.length;++t)l.push({element:i[t],datasetIndex:e,index:t})}return l},point(t,e,i,a){let r=(0,s.X)(e,t);return tt(t,r,i.axis||"xy",a,i.includeInvisible||!1)},nearest(t,e,i,a){let r=(0,s.X)(e,t),n=i.axis||"xy",o=i.includeInvisible||!1;return te(t,r,n,i.intersect,a,o)},x(t,e,i,a){let r=(0,s.X)(e,t);return ti(t,r,"x",i.intersect,a)},y(t,e,i,a){let r=(0,s.X)(e,t);return ti(t,r,"y",i.intersect,a)}}};let ta=["left","top","right","bottom"];function tr(t,e){return t.filter(t=>t.pos===e)}function tn(t,e){return t.filter(t=>-1===ta.indexOf(t.pos)&&t.box.axis===e)}function to(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 tl(t,e,i,s){return Math.max(t[i],e[i])+Math.max(t[s],e[s])}function th(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 td(t,e,i,a){let r,n,o,l,h,d,c=[];for(r=0,n=t.length,h=0;r<n;++r){(l=(o=t[r]).box).update(o.width||e.w,o.height||e.h,function(t,e){let i=e.maxPadding;var s=t?["left","right"]:["top","bottom"];let a={left:0,top:0,right:0,bottom:0};return s.forEach(t=>{a[t]=Math.max(e[t],i[t])}),a}(o.horizontal,e));let{same:n,other:u}=function(t,e,i,a){let{pos:r,box:n}=i,o=t.maxPadding;if(!(0,s.i)(r)){i.size&&(t[r]-=i.size);let e=a[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?n.height:n.width),i.size=e.size/e.count,t[r]+=i.size}n.getPadding&&th(o,n.getPadding());let l=Math.max(0,e.outerWidth-tl(o,t,"left","right")),h=Math.max(0,e.outerHeight-tl(o,t,"top","bottom")),d=l!==t.w,c=h!==t.h;return t.w=l,t.h=h,i.horizontal?{same:d,other:c}:{same:c,other:d}}(e,i,o,a);h|=n&&c.length,d=d||u,l.fullSize||c.push(o)}return h&&td(c,e,i,a)||d}function tc(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 tu(t,e,i,a){let r=i.padding,{x:n,y:o}=e;for(let l of t){let t=l.box,h=a[l.stack]||{count:1,placed:0,weight:1},d=l.stackWeight/h.weight||1;if(l.horizontal){let a=e.w*d,n=h.size||t.height;(0,s.j)(h.start)&&(o=h.start),t.fullSize?tc(t,r.left,o,i.outerWidth-r.right-r.left,n):tc(t,e.left+h.placed,o,a,n),h.start=o,h.placed+=a,o=t.bottom}else{let a=e.h*d,o=h.size||t.width;(0,s.j)(h.start)&&(n=h.start),t.fullSize?tc(t,n,r.top,o,i.outerHeight-r.bottom-r.top):tc(t,n,e.top+h.placed,o,a),h.start=n,h.placed+=a,n=t.right}}e.x=n,e.y=o}s.d.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});
1var tg={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 r=(0,s.K)(t.options.layout.padding),n=Math.max(e-r.width,0),o=Math.max(i-r.height,0),l=function(t){let e=function(t){let e,i,s,a,r,n,o=[];for(e=0,i=(t||[]).length;e<i;++e)s=t[e],({position:a,options:{stack:r,stackWeight:n=1}}=s),o.push({index:e,box:s,pos:a,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&a+r,stackWeight:n});return o}(t),i=to(e.filter(t=>t.box.fullSize),!0),s=to(tr(e,"left"),!0),a=to(tr(e,"right")),r=to(tr(e,"top"),!0),n=to(tr(e,"bottom")),o=tn(e,"x"),l=tn(e,"y");return{fullSize:i,leftAndTop:s.concat(r),rightAndBottom:a.concat(l).concat(n).concat(o),chartArea:tr(e,"chartArea"),vertical:s.concat(a).concat(l),horizontal:r.concat(n).concat(o)}}(t.boxes),h=l.vertical,d=l.horizontal;(0,s.Q)(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});let c=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:n,availableHeight:o,vBoxMaxWidth:n/2/(h.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1),hBoxMaxHeight:o/2}),u=Object.assign({},r);th(u,(0,s.K)(a));let g=Object.assign({maxPadding:u,w:n,h:o,x:r.left,y:r.top},r),p=function(t,e){let i,s,a,r=function(t){let e={};for(let i of t){let{stack:t,pos:s,stackWeight:a}=i;if(!t||!ta.includes(s))continue;let r=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=a}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:o}=e;for(i=0,s=t.length;i<s;++i){let{fullSize:s}=(a=t[i]).box,l=r[a.stack],h=l&&a.stackWeight/l.weight;a.horizontal?(a.width=h?h*n:s&&e.availableWidth,a.height=o):(a.width=n,a.height=h?h*o:s&&e.availableHeight)}return r}(h.concat(d),c);td(l.fullSize,g,c,p),td(h,g,c,p),td(d,g,c,p)&&td(h,g,c,p);let f=g.maxPadding;function m(t){let e=Math.max(f[t]-g[t],0);return g[t]+=e,e}g.y+=m("top"),g.x+=m("left"),m("right"),m("bottom"),tu(l.leftAndTop,g,c,p),g.x+=g.w,g.y+=g.h,tu(l.rightAndBottom,g,c,p),t.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},(0,s.Q)(l.chartArea,e=>{let i=e.box;Object.assign(i,t.chartArea),i.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})})}};class tp{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(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 tf extends tp{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}let tm="$chartjs",tb={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},tx=t=>null===t||""===t,t_=!!s.a5&&{passive:!0};function tv(t,e){for(let i of t)if(i===e||i.contains(e))return!0}function ty(t,e,i){let s=t.canvas,a=new MutationObserver(t=>{let e=!1;for(let i of t)e=(e=e||tv(i.addedNodes,s))&&!tv(i.removedNodes,s);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}function tM(t,e,i){let s=t.canvas,a=new MutationObserver(t=>{let e=!1;for(let i of t)e=(e=e||tv(i.removedNodes,s))&&!tv(i.addedNodes,s);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}let tk=new Map,tw=0;function tS(){let t=window.devicePixelRatio;t!==tw&&(tw=t,tk.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function tP(t,e,i){let a=t.canvas,r=a&&(0,s.a2)(a);if(!r)return;let n=(0,s.a4)((t,e)=>{let s=r.clientWidth;i(t,e),s<r.clientWidth&&i()},window),o=new ResizeObserver(t=>{let e=t[0],i=e.contentRect.width,s=e.contentRect.height;(0!==i||0!==s)&&n(i,s)});return o.observe(r),tk.size||window.addEventListener("resize",tS),tk.set(t,n),o}function tD(t,e,i){if(i&&i.disconnect(),"resize"===e)tk.delete(t),tk.size||window.removeEventListener("resize",tS)}function tC(t,e,i){let a=t.canvas,r=(0,s.a4)(e=>{null!==t.ctx&&i(function(t,e){let i=tb[t.type]||t.type,{x:a,y:r}=(0,s.X)(t,e);return{type:i,chart:e,native:t,x:void 0!==a?a:null,y:void 0!==r?r:null}}(e,t))},t,t=>{let e=t[0];return[e,e.offsetX,e.offsetY]});
1return!function(t,e,i){t.addEventListener(e,i,t_)}(a,e,r),r}class tO extends tp{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"),r=t.getAttribute("width");if(t[tm]={initial:{height:a,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",tx(r)){let e=(0,s.a3)(t,"width");void 0!==e&&(t.width=e)}if(tx(a))if(""===t.style.height)t.height=t.width/(e||2);else{let e=(0,s.a3)(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){let e=t.canvas;if(!e[tm])return!1;let i=e[tm].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[tm],!0}addEventListener(t,e,i){this.removeEventListener(t,e);let s=t.$proxies||(t.$proxies={}),a={attach:ty,detach:tM,resize:tP}[e]||tC;s[e]=a(t,e,i)}removeEventListener(t,e){let i=t.$proxies||(t.$proxies={}),s=i[e];s&&((({attach:tD,detach:tD,resize:tD})[e]||function(t,e,i){t.canvas.removeEventListener(e,i,t_)})(t,e,s),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,a){return(0,s.a1)(t,e,i,a)}isAttached(t){let e=(0,s.a2)(t);return!!(e&&e.isConnected)}}class tL{constructor(){this._init=[]}notify(t,e,i,s){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));let a=s?this._descriptors(t).filter(s):this._descriptors(t),r=this._notify(a,t,e,i);return"afterDestroy"===e&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,e,i,a){for(let r of(a=a||{},t)){let t=r.plugin,n=t[i],o=[e,a,r.options];if(!1===(0,s.C)(n,o,t)&&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,{}),r=function(t){let e={},i=[],s=Object.keys(K.plugins.items);for(let t=0;t<s.length;t++)i.push(K.getPlugin(s[t]));let a=t.plugins||[];for(let t=0;t<a.length;t++){let s=a[t];-1===i.indexOf(s)&&(i.push(s),e[s.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==a||e?function(t,{plugins:e,localIds:i},s,a){let r=[],n=t.getContext();for(let l of e){var o;let e=l.id,h=(o=s[e],a||!1!==o?!0===o?{}:o:null);null!==h&&r.push({plugin:l,options:function(t,{plugin:e,local:i},s,a){let r=t.pluginScopeKeys(e),n=t.getOptionScopes(s,r);return i&&e.defaults&&n.push(e.defaults),t.createResolver(n,a,[""],{scriptable:!1,indexable:!1,allKeys:!0})}(t.config,{plugin:l,local:i[e]},h,n)})}return r}(t,r,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 tE(t,e){let i=s.d.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function tA(t,e){var i;return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase()}function tT(t){let e=t.options||(t.options={});e.plugins=(0,s.v)(e.plugins,{}),e.scales=function(t,e){let i=s.U[t.type]||{scales:{}},a=e.scales||{},r=tE(t.type,e),n=Object.create(null),o=Object.create(null);return Object.keys(a).forEach(t=>{let e=a[t];
1if(!(0,s.i)(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);let l=tA(t,e),h=l===r?"_index_":"_value_",d=i.scales||{};n[l]=n[l]||t,o[t]=(0,s.ac)(Object.create(null),[{axis:l},e,d[l],d[h]])}),t.data.datasets.forEach(i=>{let r=i.type||t.type,l=i.indexAxis||tE(r,e),h=(s.U[r]||{}).scales||{};Object.keys(h).forEach(t=>{let e,r=(e=t,"_index_"===t?e=l:"_value_"===t&&(e="x"===l?"y":"x"),e),d=i[r+"AxisID"]||n[r]||r;o[d]=o[d]||Object.create(null),(0,s.ac)(o[d],[{axis:r},a[d],h[t]])})}),Object.keys(o).forEach(t=>{let e=o[t];(0,s.ac)(e,[s.d.scales[e.type],s.d.scale])}),o}(t,e)}function tz(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}let tR=new Map,tF=new Set;function tI(t,e){let i=tR.get(t);return i||(i=e(),tR.set(t,i),tF.add(i)),i}let tV=(t,e,i)=>{let a=(0,s.f)(e,i);void 0!==a&&t.add(a)};class tB{constructor(t){this._config=function(t){return(t=t||{}).data=tz(t.data),tT(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=tz(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(),tT(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return tI(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return tI(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return tI(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,i=this.type;return tI(`${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:r}=this,n=this._cachedScopes(t,i),o=n.get(e);if(o)return o;let l=new Set;e.forEach(e=>{t&&(l.add(t),e.forEach(e=>tV(l,t,e))),e.forEach(t=>tV(l,a,t)),e.forEach(t=>tV(l,s.U[r]||{},t)),e.forEach(t=>tV(l,s.d,t)),e.forEach(t=>tV(l,s.a7,t))});let h=Array.from(l);return 0===h.length&&h.push(Object.create(null)),tF.has(e)&&n.set(e,h),h}chartOptionScopes(){let{options:t,type:e}=this;return[t,s.U[e]||{},s.d.datasets[e]||{},{type:e},s.d,s.a7]}resolveNamedOptions(t,e,i,a=[""]){let r={$shared:!0},{resolver:n,subPrefixes:o}=tN(this._resolverCache,t,a),l=n;if(function(t,e){let{isScriptable:i,isIndexable:a}=(0,s.ab)(t);for(let r of e){let e=i(r),n=a(r),o=(n||e)&&t[r];if(e&&((0,s.a8)(o)||tH(o))||n&&(0,s.b)(o))return!0}return!1}(n,e)){r.$shared=!1,i=(0,s.a8)(i)?i():i;let e=this.createResolver(t,i,o);l=(0,s.a9)(n,i,e)}for(let t of e)r[t]=l[t];return r}createResolver(t,e,i=[""],a){let{resolver:r}=tN(this._resolverCache,t,i);return(0,s.i)(e)?(0,s.a9)(r,e,void 0,a):r}}function tN(t,e,i){let a=t.get(e);a||(a=new Map,t.set(e,a));let r=i.join(),n=a.get(r);return n||(n={resolver:(0,s.aa)(e,i),subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},a.set(r,n)),n}let tH=t=>(0,s.i)(t)&&Object.getOwnPropertyNames(t).reduce((e,i)=>e||(0,s.a8)(t[i]),!1),tW=["top","bottom","left","right","chartArea"];function tj(t,e){return"top"===t||"bottom"===t||-1===tW.indexOf(t)&&"x"===e}function t$(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function tU(t){let e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),(0,s.C)(i&&i.onComplete,[t],e)}function tY(t){let e=t.chart,i=e.options.animation;(0,s.C)(i&&i.onProgress,[t],e)}function tK(t){return(0,s.a6)()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}let tQ={},tX=t=>{let e=tK(t);return Object.values(tQ).filter(t=>t.canvas===e).pop()};class tG{constructor(t,e){let i=this.config=new tB(e),a=tK(t),n=tX(a);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 o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||(!(0,s.a6)()||"undefined"!=typeof OffscreenCanvas&&a instanceof OffscreenCanvas?tf:tO)),this.platform.updateConfig(i);let l=this.platform.acquireContext(a,o.aspectRatio),h=l&&l.canvas,d=h&&h.height,c=h&&h.width;if(this.id=(0,s.ad)(),this.ctx=l,this.canvas=h,this.width=c,this.height=d,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new tL,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(0,s.ae)(t=>this.update(t),o.resizeDelay||0),this._dataChanges=[],tQ[this.id]=this,!l||!h){console.error("Failed to create chart: can't acquire context from the given item");return}r.listen(this,"complete",tU),r.listen(this,"progress",tY),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:a,_aspectRatio:r}=this;return(0,s.k)(t)?e&&r?r: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}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():(0,s.af)(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return(0,s.ag)(this.canvas,this.ctx),this}stop(){return r.stop(this),this}resize(t,e){r.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let i=this.options,a=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,n=this.platform.getMaximumSize(a,t,e,r),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=n.width,this.height=n.height,this._aspectRatio=this.aspectRatio,(0,s.af)(this,o,!0)&&(this.notifyPlugins("resize",{size:n}),(0,s.C)(i.onResize,[this,n],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){let t=this.options.scales||{};(0,s.Q)(t,(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),{}),r=[];e&&(r=r.concat(Object.keys(e).map(t=>{let i=e[t],s=tA(t,i),a="r"===s,r="x"===s;return{options:i,dposition:a?"chartArea":r?"bottom":"left",dtype:a?"radialLinear":r?"category":"linear"}}))),(0,s.Q)(r,e=>{let r=e.options,n=r.id,o=tA(n,r),l=(0,s.v)(r.type,e.dtype);(void 0===r.position||tj(r.position,o)!==tj(e.dposition))&&(r.position=e.dposition),a[n]=!0;let h=null;n in i&&i[n].type===l?h=i[n]:i[(h=new(K.getScale(l))({id:n,type:l,ctx:this.ctx,
1chart:this})).id]=h,h.init(r,t)}),(0,s.Q)(a,(t,e)=>{t||delete i[e]}),(0,s.Q)(i,t=>{tg.configure(this,t,t.options),tg.addBox(this,t)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((t,e)=>t.index-e.index),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(t$("order","index"))}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((t,i)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){let t,e,i=[],a=this.data.datasets;for(this._removeUnreferencedMetasets(),t=0,e=a.length;t<e;t++){let e=a[t],r=this.getDatasetMeta(t),n=e.type||this.config.type;if(r.type&&r.type!==n&&(this._destroyDatasetMeta(t),r=this.getDatasetMeta(t)),r.type=n,r.indexAxis=e.indexAxis||tE(n,this.options),r.order=e.order||0,r.index=t,r.label=""+e.label,r.visible=this.isDatasetVisible(t),r.controller)r.controller.updateIndex(t),r.controller.linkScales();else{let e=K.getController(n),{datasetElementType:a,dataElementType:o}=s.d.datasets[n];Object.assign(e.prototype,{dataElementType:K.getElement(o),datasetElementType:a&&K.getElement(a)}),r.controller=new e(this,t),i.push(r.controller)}}return this._updateMetasets(),i}_resetElements(){(0,s.Q)(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 r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let n=0;for(let t=0,e=this.data.datasets.length;t<e;t++){let{controller:e}=this.getDatasetMeta(t),i=!a&&-1===r.indexOf(e);e.buildOrUpdateElements(i),n=Math.max(+e.getMaxOverflow(),n)}n=this._minPadding=i.layout.autoPadding?n:0,this._updateLayout(n),a||(0,s.Q)(r,t=>{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(t$("z","_idx"));let{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){(0,s.Q)(this.scales,t=>{tg.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.ah)(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this;for(let{method:i,start:s,count:a}of this._getUniformDataChanges()||[]){var e="_removeElements"===i?-a:a;for(let i of Object.keys(t)){let a=+i;if(a>=s){let r=t[i];delete t[i],(e>0||a>s)&&(t[a+e]=r)}}}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,i=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),a=i(0);for(let t=1;t<e;t++)if(!(0,s.ah)(a,i(t)))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;tg.update(this,this.width,this.height,t);let e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],(0,s.Q)(this.boxes,t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,(0,s.a8)(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){let i=this.getDatasetMeta(t),s={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",s)&&(i.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(r.has(this)?this.attached&&!r.running(this)&&r.start(this):(this.draw(),tU({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){let{width:t,height:e}=this._resizeBeforeDraw;this._resize(t,e),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;let e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){let e,i,s=this._sortedMetasets,a=[];for(e=0,i=s.length;e<i;++e){let i=s[e];(!t||i.visible)&&a.push(i)}return a}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;let t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,i=t._clip,a=!i.disabled,r=this.chartArea,n={meta:t,index:t.index,cancelable:!0};
1!1!==this.notifyPlugins("beforeDatasetDraw",n)&&(a&&(0,s.L)(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),a&&(0,s.N)(e),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return(0,s.$)(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){let a=ts.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.h)(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){let a=i?"show":"hide",r=this.getDatasetMeta(t),n=r.controller._resolveAnimations(void 0,a);(0,s.j)(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),n.update(r,{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(),r.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.ag)(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete tQ[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.Q)(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])},r=(t,e)=>{this.canvas&&this.resize(t,e)},n=()=>{a("attach",n),this.attached=!0,this.resize(),s("resize",r),s("detach",t)};t=()=>{this.attached=!1,a("resize",r),this._stop(),this._resize(0,0),s("attach",n)},i.isAttached(this.canvas)?n():t()}unbindEvents(){(0,s.Q)(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},(0,s.Q)(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){let s,a,r,n=i?"set":"remove";for("dataset"===e&&this.getDatasetMeta(t[0].datasetIndex).controller["_"+n+"DatasetHoverStyle"](),a=0,r=t.length;a<r;++a){let e=(s=t[a])&&this.getDatasetMeta(s.datasetIndex).controller;e&&e[n+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){let e=this._active||[],i=t.map(({datasetIndex:t,index:e})=>{let i=this.getDatasetMeta(t);if(!i)throw Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}});(0,s.ai)(i,e)||(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){let s=this.options.hover,a=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),r=a(e,t),n=i?t:a(t,e);r.length&&this.updateHoverStyle(r,s.mode,!1),n.length&&s.mode&&this.updateHoverStyle(n,s.mode,!0)}_eventHandler(t,e){let i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,s))return;let a=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(a||i.changed)&&this.render(),this}_handleEvent(t,e,i){var a;let{_active:r=[],options:n}=this,o=this._getActiveElements(t,r,i,e),l=(0,s.aj)(t),h=(a=this._lastEvent,i&&"mouseout"!==t.type?l?a:t:null);i&&(this._lastEvent=null,(0,s.C)(n.onHover,[t,o,this],this),l&&(0,s.C)(n.onClick,[t,o,this],this));let d=!(0,s.ai)(o,r);return(d||e)&&(this._active=o,this._updateHoverStyles(o,r,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)}}let tq=()=>(0,s.Q)(tG.instances,t=>t._plugins.invalidate());function tJ(t,e,i){let{startAngle:a,pixelMargin:r,x:n,y:o,outerRadius:l,innerRadius:h}=e,d=r/l;t.beginPath(),t.arc(n,o,l,a-d,i+d),h>r?(d=r/h,t.arc(n,o,h,i+d,a-d,!0)):t.arc(n,o,r,i+s.H,a-s.H),t.closePath(),t.clip()}
1function tZ(t,e,i,s){return{x:i+t*Math.cos(e),y:s+t*Math.sin(e)}}function t0(t,e,i,a,r,n){let{x:o,y:l,startAngle:h,pixelMargin:d,innerRadius:c}=e,u=Math.max(e.outerRadius+a+i-d,0),g=c>0?c+a+i+d:0,p=0,f=r-h;if(a){let t=u>0?u-a:0,e=((c>0?c-a:0)+t)/2;p=(f-(0!==e?f*e/(e+a):f))/2}let m=Math.max(.001,f*u-i/s.P)/u,b=(f-m)/2,x=h+b+p,_=r-b-p,{outerStart:v,outerEnd:y,innerStart:M,innerEnd:k}=function(t,e,i,a){var r;let n=(r=t.options.borderRadius,(0,s.al)(r,["outerStart","outerEnd","innerStart","innerEnd"])),o=(i-e)/2,l=Math.min(o,a*e/2),h=t=>{let e=(i-Math.min(o,t))*a/2;return(0,s.E)(t,0,Math.min(o,e))};return{outerStart:h(n.outerStart),outerEnd:h(n.outerEnd),innerStart:(0,s.E)(n.innerStart,0,l),innerEnd:(0,s.E)(n.innerEnd,0,l)}}(e,g,u,_-x),w=u-v,S=u-y,P=x+v/w,D=_-y/S,C=g+M,O=g+k,L=x+M/C,E=_-k/O;if(t.beginPath(),n){if(t.arc(o,l,u,P,D),y>0){let e=tZ(S,D,o,l);t.arc(e.x,e.y,y,D,_+s.H)}let e=tZ(O,_,o,l);if(t.lineTo(e.x,e.y),k>0){let e=tZ(O,E,o,l);t.arc(e.x,e.y,k,_+s.H,E+Math.PI)}if(t.arc(o,l,g,_-k/g,x+M/g,!0),M>0){let e=tZ(C,L,o,l);t.arc(e.x,e.y,M,L+Math.PI,x-s.H)}let i=tZ(w,x,o,l);if(t.lineTo(i.x,i.y),v>0){let e=tZ(w,P,o,l);t.arc(e.x,e.y,v,x-s.H,P)}}else{t.moveTo(o,l);let e=Math.cos(P)*u+o,i=Math.sin(P)*u+l;t.lineTo(e,i);let s=Math.cos(D)*u+o,a=Math.sin(D)*u+l;t.lineTo(s,a)}t.closePath()}Object.defineProperties(tG,{defaults:{enumerable:!0,value:s.d},instances:{enumerable:!0,value:tQ},overrides:{enumerable:!0,value:s.U},registry:{enumerable:!0,value:K},version:{enumerable:!0,value:"3.9.1"},getChart:{enumerable:!0,value:tX},register:{enumerable:!0,value:(...t)=>{K.add(...t),tq()}},unregister:{enumerable:!0,value:(...t)=>{K.remove(...t),tq()}}});class t1 extends R{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){let a=this.getProps(["x","y"],i),{angle:r,distance:n}=(0,s.a0)(a,{x:t,y:e}),{startAngle:o,endAngle:l,innerRadius:h,outerRadius:d,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2,g=(0,s.v)(c,l-o)>=s.T||(0,s.p)(r,o,l),p=(0,s.ak)(n,h+u,d+u);return g&&p}getCenterPoint(t){let{x:e,y:i,startAngle:s,endAngle:a,innerRadius:r,outerRadius:n}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:o,spacing:l}=this.options,h=(s+a)/2,d=(r+n+l+o)/2;return{x:e+Math.cos(h)*d,y:i+Math.sin(h)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){let{options:e,circumference:i}=this,a=(e.offset||0)/2,r=(e.spacing||0)/2,n=e.circular;if(this.pixelMargin=.33*("inner"===e.borderAlign),this.fullCircles=i>s.T?Math.floor(i/s.T):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=0;if(a){o=a/2;let e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*o,Math.sin(e)*o),this.circumference>=s.P&&(o=a)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;let l=function(t,e,i,a,r){let{fullCircles:n,startAngle:o,circumference:l}=e,h=e.endAngle;if(n){t0(t,e,i,a,o+s.T,r);for(let e=0;e<n;++e)t.fill();isNaN(l)||(h=o+l%s.T,l%s.T!=0||(h+=s.T))}return t0(t,e,i,a,h,r),t.fill(),h}(t,this,o,r,n);!function(t,e,i,a,r,n){let{options:o}=e,{borderWidth:l,borderJoinStyle:h}=o,d="inner"===o.borderAlign;if(l){if(d?(t.lineWidth=2*l,t.lineJoin=h||"round"):(t.lineWidth=l,t.lineJoin=h||"bevel"),e.fullCircles){let i,{x:a,y:r,startAngle:n,pixelMargin:o,fullCircles:l}=e,h=Math.max(e.outerRadius-o,0),c=e.innerRadius+o;for(d&&tJ(t,e,n+s.T),t.beginPath(),t.arc(a,r,c,n+s.T,n,!0),i=0;i<l;++i)t.stroke();for(t.beginPath(),t.arc(a,r,h,n,n+s.T),i=0;i<l;++i)t.stroke()}d&&tJ(t,e,r),t0(t,e,i,a,r,n),t.stroke()}}(t,this,o,r,l,n),t.restore()}}function t2(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)}function t3(t,e,i){t.lineTo(i.x,i.y)}function t5(t,e,i={}){let s=t.length,{start:a=0,end:r=s-1}=i,{start:n,end:o}=e,l=Math.max(a,n),h=Math.min(r,o);return{count:s,start:l,loop:e.loop,ilen:h<l&&!(a<n&&r<n||a>o&&r>o)?s+h-l:h-l}}function t6(t,e,i,a){let r,n,o,{points:l,options:h}=e,{count:d,start:c,loop:u,ilen:g}=t5(l,i,a),p=h.stepped?s.as:h.tension||"monotone"===h.cubicInterpolationMode?s.at:t3,{move:f=!0,reverse:m}=a||{};for(r=0;r<=g;++r)!(n=l[(c+(m?g-r:r))%d]).skip&&(f?(t.moveTo(n.x,n.y),f=!1):p(t,o,n,m,h.stepped),o=n);return u&&p(t,o,n=l[(c+(m?g:0))%d],m,h.stepped),!!u}function t4(t,e,i,s){let a,r,n,o,l,h,d=e.points,{count:c,start:u,ilen:g}=t5(d,i,s),{move:p=!0,reverse:f}=s||{},m=0,b=0,x=t=>(u+(f?g-t:t))%c,_=()=>{o!==l&&(t.lineTo(m,l),t.lineTo(m,o),t.lineTo(m,h))};for(p&&(r=d[x(0)],t.moveTo(r.x,r.y)),a=0;a<=g;++a){if((r=d[x(a)]).skip)continue;let e=r.x,i=r.y,s=0|e;s===n?(i<o?o=i:i>l&&(l=i),m=(b*m+e)/++b):(_(),t.lineTo(e,i),n=s,b=0,o=l=i),h=i}_()}function t8(t){let e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?t6:t4}t1.id="arc",t1.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},t1.defaultRoutes={backgroundColor:"backgroundColor"};let t7="function"==typeof Path2D;class t9 extends R{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.am)(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.an)(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,r=this.options,n=t[e],o=this.points,l=(0,s.ao)(this,{property:e,start:n,end:n});if(!l.length)return;let h=[],d=r.stepped?s.ap:r.tension||"monotone"===r.cubicInterpolationMode?s.aq:s.ar;for(i=0,a=l.length;i<a;++i){let{start:s,end:a}=l[i],c=o[s],u=o[a];if(c===u){h.push(c);continue}let g=Math.abs((n-c[e])/(u[e]-c[e])),p=d(c,u,g,r.stepped);p[e]=t[e],h.push(p)}return 1===h.length?h[0]:h}pathSegment(t,e,i){return t8(this)(t,this,e,i)}path(t,e,i){let s=this.segments,a=t8(this),r=this._loop;for(let n of(e=e||0,i=i||this.points.length-e,s))r&=a(t,this,n,{start:e,end:e+i-1});return!!r}draw(t,e,i,s){let a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),function(t,e,
1i,s){if(t7&&!e.options.segment){let a;(a=e._path)||(a=e._path=new Path2D,e.path(a,i,s)&&a.closePath()),t2(t,e.options),t.stroke(a)}else{let{segments:a,options:r}=e,n=t8(e);for(let o of a)t2(t,r,o.style),t.beginPath(),n(t,e,o,{start:i,end:i+s-1})&&t.closePath(),t.stroke()}}(t,this,i,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function et(t,e,i,s){let a=t.options,{[i]:r}=t.getProps([i],s);return Math.abs(e-r)<a.radius+a.hitRadius}t9.id="line",t9.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},t9.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},t9.descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};class ee extends R{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){let s=this.options,{x:a,y:r}=this.getProps(["x","y"],i);return Math.pow(t-a,2)+Math.pow(e-r,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(t,e){return et(this,t,"x",e)}inYRange(t,e){return et(this,t,"y",e)}getCenterPoint(t){let{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0,i=(e=Math.max(e,e&&t.hoverRadius||0))&&t.borderWidth||0;return(e+i)*2}draw(t,e){let i=this.options;!this.skip&&!(i.radius<.1)&&(0,s.$)(this,e,this.size(i)/2)&&(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,(0,s.au)(t,i,this.x,this.y))}getRange(){let t=this.options||{};return t.radius+t.hitRadius}}function ei(t,e){let i,s,a,r,n,{x:o,y:l,base:h,width:d,height:c}=t.getProps(["x","y","base","width","height"],e);return t.horizontal?(n=c/2,i=Math.min(o,h),s=Math.max(o,h),a=l-n,r=l+n):(i=o-(n=d/2),s=o+n,a=Math.min(l,h),r=Math.max(l,h)),{left:i,top:a,right:s,bottom:r}}function es(t,e,i,a){return t?0:(0,s.E)(e,i,a)}function ea(t,e,i,a){let r=null===e,n=null===i,o=t&&!(r&&n)&&ei(t,a);return o&&(r||(0,s.ak)(e,o.left,o.right))&&(n||(0,s.ak)(i,o.top,o.bottom))}function er(t,e){t.rect(e.x,e.y,e.w,e.h)}function en(t,e,i={}){let s=t.x!==i.x?-e:0,a=t.y!==i.y?-e:0,r=(t.x+t.w!==i.x+i.w?e:0)-s,n=(t.y+t.h!==i.y+i.h?e:0)-a;return{x:t.x+s,y:t.y+a,w:t.w+r,h:t.h+n,radius:t.radius}}ee.id="point",ee.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},ee.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class eo extends R{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:r}}=this,{inner:n,outer:o}=function(t){let e=ei(t),i=e.right-e.left,a=e.bottom-e.top,r=function(t,e,i){let a=t.options.borderWidth,r=t.borderSkipped,n=(0,s.aw)(a);return{t:es(r.top,n.top,0,i),r:es(r.right,n.right,0,e),b:es(r.bottom,n.bottom,0,i),l:es(r.left,n.left,0,e)}}(t,i/2,a/2),n=function(t,e,i){let{enableBorderRadius:a}=t.getProps(["enableBorderRadius"]),r=t.options.borderRadius,n=(0,s.ax)(r),o=Math.min(e,i),l=t.borderSkipped,h=a||(0,s.i)(r);return{topLeft:es(!h||l.top||l.left,n.topLeft,0,o),topRight:es(!h||l.top||l.right,n.topRight,0,o),bottomLeft:es(!h||l.bottom||l.left,n.bottomLeft,0,o),bottomRight:es(!h||l.bottom||l.right,n.bottomRight,0,o)}}(t,i/2,a/2);return{outer:{x:e.left,y:e.top,w:i,h:a,radius:n},inner:{x:e.left+r.l,y:e.top+r.t,w:i-r.l-r.r,h:a-r.t-r.b,radius:{topLeft:Math.max(0,n.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,n.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,n.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,n.bottomRight-Math.max(r.b,r.r))}}}}(this),l=(e=o.radius).topLeft||e.topRight||e.bottomLeft||e.bottomRight?s.av:er;t.save(),(o.w!==n.w||o.h!==n.h)&&(t.beginPath(),l(t,en(o,i,n)),t.clip(),l(t,en(n,-i,o)),t.fillStyle=a,t.fill("evenodd")),t.beginPath(),l(t,en(n,i)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,e,i){return ea(this,t,e,i)}inXRange(t,e){return ea(this,t,null,e)}inYRange(t,e){return ea(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}}eo.id="bar",eo.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmou
1nt:"auto",pointStyle:void 0},eo.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var el=Object.freeze({__proto__:null,ArcElement:t1,LineElement:t9,PointElement:ee,BarElement:eo});function eh(t){if(t._decimated){let e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function ed(t){t.data.datasets.forEach(t=>{eh(t)})}function ec(t,e,i,a){if(a)return;let r=e[t],n=i[t];return"angle"===t&&(r=(0,s.az)(r),n=(0,s.az)(n)),{property:t,start:r,end:n}}function eu(t,e,i){for(;e>t;e--){let t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function eg(t,e,i,s){return t&&e?s(t[i],e[i]):t?t[i]:e?e[i]:0}function ep(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,r=[];return e.segments.forEach(({start:t,end:e})=>{e=eu(t,e,a);let n=a[t],o=a[e];null!==s?(r.push({x:n.x,y:s}),r.push({x:o.x,y:s})):null!==i&&(r.push({x:i,y:n.y}),r.push({x:i,y:o.y}))}),r}(t,e),i.length?new t9({points:i,options:{tension:0},_loop:a,_fullLoop:a}):null}function ef(t){return t&&!1!==t.fill}class em{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){let{x:a,y:r,radius:n}=this;return e=e||{start:0,end:s.T},t.arc(a,r,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 eb(t,e,i){let a=function(t){let{chart:e,fill:i,line:a}=t;if((0,s.g)(i)){var r,n=e,o=i;let t=n.getDatasetMeta(o);return t&&n.isDatasetVisible(o)?t.dataset:null}if("stack"===i)return function(t){let{scale:e,index:i,line:a}=t,r=[],n=a.segments,o=a.points,l=function(t,e){let i=[],s=t.getMatchingVisibleMetas("line");for(let t=0;t<s.length;t++){let a=s[t];if(a.index===e)break;a.hidden||i.unshift(a.dataset)}return i}(e,i);l.push(ep({x:null,y:e.bottom},a));for(let t=0;t<n.length;t++){let e=n[t];for(let t=e.start;t<=e.end;t++)!function(t,e,i){let a=[];for(let r=0;r<i.length;r++){let{first:n,last:o,point:l}=function(t,e,i){let a=t.interpolate(e,"x");if(!a)return{};let r=a[i],n=t.segments,o=t.points,l=!1,h=!1;for(let t=0;t<n.length;t++){let e=n[t],a=o[e.start][i],d=o[e.end][i];if((0,s.ak)(r,a,d)){l=r===a,h=r===d;break}}return{first:l,last:h,point:a}}(i[r],e,"x");if(l&&(!n||!o)){if(n)a.unshift(l);else if(t.push(l),!o)break}}t.push(...a)}(r,o[t],l)}return new t9({points:r,options:{}})}(t);if("shape"===i)return!0;let l=((r=t).scale||{}).getPointPositionForValue?function(t){let e,{scale:i,fill:a}=t,r=i.options,n=i.getLabels().length,o=r.reverse?i.max:i.min,l="start"===a?o:"end"===a?i.options.reverse?i.min:i.max:(0,s.i)(a)?a.value:i.getBaseValue(),h=[];if(r.grid.circular){let t=i.getPointPositionForValue(0,o);return new em({x:t.x,y:t.y,radius:i.getDistanceFromCenterForValue(l)})}for(let t=0;t<n;++t)h.push(i.getPointPositionForValue(t,l));return h}(r):function(t){let e,{scale:i={},fill:a}=t,r=(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)(r)){let t=i.isHorizontal();return{x:t?r:null,y:t?null:r}}return null}(r);return l instanceof em?l:ep(l,a)}(e),{line:r,scale:n,axis:o}=e,l=r.options,h=l.fill,d=l.backgroundColor,{above:c=d,below:u=d}=h||{};a&&r.points.length&&((0,s.L)(t,i),function(t,e){let{line:i,target:s,above:a,below:r,area:n,scale:o}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&r!==a&&(ex(t,s,n.top),e_(t,{line:i,target:s,color:a,scale:o,property:l}),t.restore(),t.save(),ex(t,s,n.bottom)),e_(t,{line:i,target:s,color:r,scale:o,property:l}),t.restore()}(t,{line:r,target:a,above:c,below:u,area:i,scale:n,axis:o}),(0,s.N)(t))}function ex(t,e,i){let{segments:s,points:a}=e,r=!0,n=!1;for(let o of(t.beginPath(),s)){let{start:s,end:l}=o,h=a[s],d=a[eu(s,l,a)];r?(t.moveTo(h.x,h.y),r=!1):(t.lineTo(h.x,i),t.lineTo(h.x,h.y)),(n=!!e.pathSegment(t,o,{move:n}))?t.closePath():t.lineTo(d.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function e_(t,e){let{line:i,target:a,property:r,color:n,scale:o}=e;for(let{source:e,target:l,start:h,end:d}of function(t,e,i){let a=t.segments,r=t.points,n=e.points,o=[];for(let t of a){let{start:a,end:l}=t;l=eu(a,l,r);let h=ec(i,r[a],r[l],t.loop);
1if(!e.segments){o.push({source:t,target:h,start:r[a],end:r[l]});continue}for(let a of(0,s.ao)(e,h)){let e=ec(i,n[a.start],n[a.end],a.loop);for(let n of(0,s.ay)(t,r,e))o.push({source:n,target:a,start:{[i]:eg(h,e,"start",Math.max)},end:{[i]:eg(h,e,"end",Math.min)}})}}return o}(i,a,r)){let s,{style:{backgroundColor:c=n}={}}=e,u=!0!==a;t.save(),t.fillStyle=c,function(t,e,i){let{top:s,bottom:a}=e.chart.chartArea,{property:r,start:n,end:o}=i||{};"x"===r&&(t.beginPath(),t.rect(n,s,o-n,a-s),t.clip())}(t,o,u&&ec(r,h,d)),t.beginPath();let g=!!i.pathSegment(t,e);if(u){g?t.closePath():ev(t,a,d,r);let e=!!a.pathSegment(t,l,{move:g,reverse:!0});(s=g&&e)||ev(t,a,h,r)}t.closePath(),t.fill(s?"evenodd":"nonzero"),t.restore()}}function ev(t,e,i,s){let a=e.interpolate(i,s);a&&t.lineTo(a.x,a.y)}let ey=(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)}},eM=(t,e)=>null!==t&&null!==e&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class ek extends R{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.C)(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,{options:i,ctx:a}=this;if(!i.display){this.width=this.height=0;return}let r=i.labels,n=(0,s.O)(r.font),o=n.size,l=this._computeTitleHeight(),{boxWidth:h,itemHeight:d}=ey(r,o);a.font=n.string,this.isHorizontal()?(t=this.maxWidth,e=this._fitRows(l,o,h,d)+10):(e=this.maxHeight,t=this._fitCols(l,o,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:r,options:{labels:{padding:n}}}=this,o=this.legendHitBoxes=[],l=this.lineWidths=[0],h=s+n,d=t;a.textAlign="left",a.textBaseline="middle";let c=-1,u=-h;return this.legendItems.forEach((t,g)=>{let p=i+e/2+a.measureText(t.text).width;(0===g||l[l.length-1]+p+2*n>r)&&(d+=h,l[l.length-(g>0?0:1)]=0,u+=h,c++),o[g]={left:0,top:u,row:c,width:p,height:s},l[l.length-1]+=p+n}),d}_fitCols(t,e,i,s){let{ctx:a,maxHeight:r,options:{labels:{padding:n}}}=this,o=this.legendHitBoxes=[],l=this.columnSizes=[],h=r-t,d=n,c=0,u=0,g=0,p=0;return this.legendItems.forEach((t,r)=>{let f=i+e/2+a.measureText(t.text).width;r>0&&u+s+2*n>h&&(d+=c+n,l.push({width:c,height:u}),g+=c+n,p++,c=u=0),o[r]={left:g,top:u,col:p,width:f,height:s},c=Math.max(c,f),u+=s+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:r}}=this,n=(0,s.aA)(r,this.left,this.width);if(this.isHorizontal()){let r=0,o=(0,s.S)(i,this.left+a,this.right-this.lineWidths[r]);for(let l of e)r!==l.row&&(r=l.row,o=(0,s.S)(i,this.left+a,this.right-this.lineWidths[r])),l.top+=this.top+t+a,l.left=n.leftForLtr(n.x(o),l.width),o+=l.width+a}else{let r=0,o=(0,s.S)(i,this.top+t+a,this.bottom-this.columnSizes[r].height);for(let l of e)l.col!==r&&(r=l.col,o=(0,s.S)(i,this.top+t+a,this.bottom-this.columnSizes[r].height)),l.top=o,l.left+=this.left+a,l.left=n.leftForLtr(n.x(l.left),l.width),o+=l.height+a}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){let t=this.ctx;(0,s.L)(t,this),this._draw(),(0,s.N)(t)}}_draw(){let t,{options:e,columnSizes:i,lineWidths:a,ctx:r}=this,{align:n,labels:o}=e,l=s.d.color,h=(0,s.aA)(e.rtl,this.left,this.width),d=(0,s.O)(o.font),{color:c,padding:u}=o,g=d.size,p=g/2;this.drawTitle(),r.textAlign=h.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=d.string;let{boxWidth:f,boxHeight:m,itemHeight:b}
1=ey(o,g),x=function(t,e,i){if(isNaN(f)||f<=0||isNaN(m)||m<0)return;r.save();let a=(0,s.v)(i.lineWidth,1);if(r.fillStyle=(0,s.v)(i.fillStyle,l),r.lineCap=(0,s.v)(i.lineCap,"butt"),r.lineDashOffset=(0,s.v)(i.lineDashOffset,0),r.lineJoin=(0,s.v)(i.lineJoin,"miter"),r.lineWidth=a,r.strokeStyle=(0,s.v)(i.strokeStyle,l),r.setLineDash((0,s.v)(i.lineDash,[])),o.usePointStyle){let n={radius:m*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:a},l=h.xPlus(t,f/2);(0,s.aE)(r,n,l,e+p,o.pointStyleWidth&&f)}else{let n=e+Math.max((g-m)/2,0),o=h.leftForLtr(t,f),l=(0,s.ax)(i.borderRadius);r.beginPath(),Object.values(l).some(t=>0!==t)?(0,s.av)(r,{x:o,y:n,w:f,h:m,radius:l}):r.rect(o,n,f,m),r.fill(),0!==a&&r.stroke()}r.restore()},_=function(t,e,i){(0,s.M)(r,i.text,t,e+b/2,d,{strikethrough:i.hidden,textAlign:h.textAlign(i.textAlign)})},v=this.isHorizontal(),y=this._computeTitleHeight();t=v?{x:(0,s.S)(n,this.left+u,this.right-a[0]),y:this.top+u+y,line:0}:{x:this.left+u,y:(0,s.S)(n,this.top+y+u,this.bottom-i[0].height),line:0},(0,s.aB)(this.ctx,e.textDirection);let M=b+u;this.legendItems.forEach((l,d)=>{r.strokeStyle=l.fontColor||c,r.fillStyle=l.fontColor||c;let g=r.measureText(l.text).width,m=h.textAlign(l.textAlign||(l.textAlign=o.textAlign)),b=f+p+g,k=t.x,w=t.y;h.setWidth(this.width),v?d>0&&k+b+u>this.right&&(w=t.y+=M,t.line++,k=t.x=(0,s.S)(n,this.left+u,this.right-a[t.line])):d>0&&w+M>this.bottom&&(k=t.x=k+i[t.line].width+u,t.line++,w=t.y=(0,s.S)(n,this.top+y+u,this.bottom-i[t.line].height)),x(h.x(k),w,l),k=(0,s.aC)(m,k+f+p,v?k+b:this.right,e.rtl),_(h.x(k),w,l),v?t.x+=b+u:t.y+=M}),(0,s.aD)(this.ctx,e.textDirection)}drawTitle(){let t,e=this.options,i=e.title,a=(0,s.O)(i.font),r=(0,s.K)(i.padding);if(!i.display)return;let n=(0,s.aA)(e.rtl,this.left,this.width),o=this.ctx,l=i.position,h=a.size/2,d=r.top+h,c=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),t=this.top+d,c=(0,s.S)(e.align,c,this.right-u);else{let i=this.columnSizes.reduce((t,e)=>Math.max(t,e.height),0);t=d+(0,s.S)(e.align,this.top,this.bottom-i-e.labels.padding-this._computeTitleHeight())}let g=(0,s.S)(l,c,c+u);o.textAlign=n.textAlign((0,s.R)(l)),o.textBaseline="middle",o.strokeStyle=i.color,o.fillStyle=i.color,o.font=a.string,(0,s.M)(o,i.text,g,t,a)}_computeTitleHeight(){let t=this.options.title,e=(0,s.O)(t.font),i=(0,s.K)(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,a,r;if((0,s.ak)(t,this.left,this.right)&&(0,s.ak)(e,this.top,this.bottom)){for(i=0,r=this.legendHitBoxes;i<r.length;++i)if(a=r[i],(0,s.ak)(t,a.left,a.left+a.width)&&(0,s.ak)(e,a.top,a.top+a.height))return this.legendItems[i]}return null}handleEvent(t){var e,i;let a=this.options;if(e=t.type,i=a,("mousemove"!==e&&"mouseout"!==e||!i.onHover&&!i.onLeave)&&(!i.onClick||"click"!==e&&"mouseup"!==e))return;let r=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){let e=this._hoveredItem,i=eM(e,r);e&&!i&&(0,s.C)(a.onLeave,[t,e,this],this),this._hoveredItem=r,r&&!i&&(0,s.C)(a.onHover,[t,r,this],this)}else r&&(0,s.C)(a.onClick,[t,r,this],this)}}class ew extends R{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.K)(i.padding);let r=a*(0,s.O)(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){let t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){let e,i,a,{top:r,left:n,bottom:o,right:l,options:h}=this,d=h.align,c=0;return this.isHorizontal()?(i=(0,s.S)(d,n,l),a=r+t,e=l-n):("left"===h.position?(i=n+t,a=(0,s.S)(d,o,r),c=-(.5*s.P)):(i=l-t,a=(0,s.S)(d,r,o),c=.5*s.P),e=o-r),{titleX:i,titleY:a,maxWidth:e,rotation:c}}draw(){let t=this.ctx,e=this.options;if(!e.display)return;let i=(0,s.O)(e.font),a=i.lineHeight/2+this._padding.top,{titleX:r,titleY:n,maxWidth:o,rotation:l}=this._drawArgs(a);(0,s.M)(t,e.text,0,0,i,{color:e.color,maxWidth:o,rotation:l,textAlign:(0,s.R)(e.align),textBaseline:"middle",translation:[r,n]})}}let eS=new WeakMap,eP={average(t){let e,i;if(!t.length)return!1;let s=0,a=0,r=0;for(e=0,i=t.length;e<i;++e){let i=t[e].element;if(i&&i.hasValue()){let t=i.tooltipPosition();s+=t.x,a+=t.y,++r}}return{x:s/r,y:a/r}},nearest(t,e){let i,a,r;if(!t.length)return!1;let n=e.x,o=e.y,l=Number.POSITIVE_INFINITY;for(i=0,a=t.length;i<a;++i){let a=t[i].element;if(a&&a.hasValue()){let t=a.getCenterPoint(),i=(0,s.aG)(e,t);i<l&&(l=i,r=a)}}if(r){let t=r.tooltipPosition();n=t.x,o=t.y}return{x:n,y:o}}};function eD(t,e){return e&&((0,s.b)(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function eC(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function eO(t,e){let i=t.chart.ctx,{body:a,footer:r,title:n}=t,{boxWidth:o,boxHeight:l}=e,h=(0,s.O)(e.bodyFont),d=(0,s.O)(e.titleFont),c=(0,s.O)(e.footerFont),u=n.length,g=r.length,p=a.length,f=(0,s.K)(e.padding),m=f.height,b=0,x=a.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);x+=t.beforeBody.length+t.afterBody.length,u&&(m+=u*d.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),x&&(m+=p*(e.displayColors?Math.max(l,h.lineHeight):h.lineHeight)+(x-p
1)*h.lineHeight+(x-1)*e.bodySpacing),g&&(m+=e.footerMarginTop+g*c.lineHeight+(g-1)*e.footerSpacing);let _=0,v=function(t){b=Math.max(b,i.measureText(t).width+_)};return i.save(),i.font=d.string,(0,s.Q)(t.title,v),i.font=h.string,(0,s.Q)(t.beforeBody.concat(t.afterBody),v),_=e.displayColors?o+2+e.boxPadding:0,(0,s.Q)(a,t=>{(0,s.Q)(t.before,v),(0,s.Q)(t.lines,v),(0,s.Q)(t.after,v)}),_=0,i.font=c.string,(0,s.Q)(t.footer,v),i.restore(),{width:b+=f.width,height:m}}function eL(t,e,i){let s=i.yAlign||e.yAlign||function(t,e){let{y:i,height:s}=e;return i<s/2?"top":i>t.height-s/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||function(t,e,i,s){let{x:a,width:r}=i,{width:n,chartArea:{left:o,right:l}}=t,h="center";return"center"===s?h=a<=(o+l)/2?"left":"right":a<=r/2?h="left":a>=n-r/2&&(h="right"),function(t,e,i,s){let{x:a,width:r}=s,n=i.caretSize+i.caretPadding;if("left"===t&&a+r+n>e.width||"right"===t&&a-r-n<0)return!0}(h,t,e,i)&&(h="center"),h}(t,e,i,s),yAlign:s}}function eE(t,e,i,a){let{caretSize:r,caretPadding:n,cornerRadius:o}=t,{xAlign:l,yAlign:h}=i,d=r+n,{topLeft:c,topRight:u,bottomLeft:g,bottomRight:p}=(0,s.ax)(o),f=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?f+=d:"right"===l&&(f-=d):"left"===l?f-=Math.max(c,g)+r:"right"===l&&(f+=Math.max(u,p)+r),{x:(0,s.E)(f,0,a.width-e.width),y:(0,s.E)(m,0,a.height-e.height)}}function eA(t,e,i){let a=(0,s.K)(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-a.right:t.x+a.left}function eT(t,e){let i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class ez extends R{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){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 d(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.h)(t,{tooltip:this,tooltipItems:e,type:"tooltip"})))}getTitle(t,e){let{callbacks:i}=e,s=i.beforeTitle.apply(this,[t]),a=i.title.apply(this,[t]),r=i.afterTitle.apply(this,[t]),n=[];return n=eD(n,eC(s)),n=eD(n,eC(a)),n=eD(n,eC(r))}getBeforeBody(t,e){return eD([],eC(e.callbacks.beforeBody.apply(this,[t])))}getBody(t,e){let{callbacks:i}=e,a=[];return(0,s.Q)(t,t=>{let e={before:[],lines:[],after:[]},s=eT(i,t);eD(e.before,eC(s.beforeLabel.call(this,t))),eD(e.lines,s.label.call(this,t)),eD(e.after,eC(s.afterLabel.call(this,t))),a.push(e)}),a}getAfterBody(t,e){return eD([],eC(e.callbacks.afterBody.apply(this,[t])))}getFooter(t,e){let{callbacks:i}=e,s=i.beforeFooter.apply(this,[t]),a=i.footer.apply(this,[t]),r=i.afterFooter.apply(this,[t]),n=[];return n=eD(n,eC(s)),n=eD(n,eC(a)),n=eD(n,eC(r))}_createItems(t){let e,i,a=this._active,r=this.chart.data,n=[],o=[],l=[],h=[];for(e=0,i=a.length;e<i;++e)h.push(function(t,e){let{element:i,datasetIndex:s,index:a}=e,r=t.getDatasetMeta(s).controller,{label:n,value:o}=r.getLabelAndValue(a);return{chart:t,label:n,parsed:r.getParsed(a),raw:t.data.datasets[s].data[a],formattedValue:o,dataset:r.getDataset(),dataIndex:a,datasetIndex:s,element:i}}(this.chart,a[e]));return t.filter&&(h=h.filter((e,i,s)=>t.filter(e,i,s,r))),t.itemSort&&(h=h.sort((e,i)=>t.itemSort(e,i,r))),(0,s.Q)(h,e=>{let i=eT(t.callbacks,e);n.push(i.labelColor.call(this,e)),o.push(i.labelPointStyle.call(this,e)),l.push(i.labelTextColor.call(this,e))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=l,this.dataPoints=h,h}update(t,e){let i,s=this.options.setContext(this.getContext()),a=this._active,r=[];if(a.length){let t=eP[s.position].call(this,a,this._eventPosition);r=this._createItems(s),this.title=this.getTitle(r,s),this.beforeBody=this.getBeforeBody(r,s),this.body=this.getBody(r,s),this.afterBody=this.getAfterBody(r,s),this.footer=this.getFooter(r,s);let e=this._size=eO(this,s),n=Object.assign({},t,e),o=eL(this.chart,s,n),l=eE(s,n,o,this.chart);this.xAlign=o.xAlign,this.yAlign=o.yAlign,i={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(i={opacity:0}
1);this._tooltipItems=r,this.$context=void 0,i&&this._resolveAnimations().update(this,i),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){let a=this.getCaretPosition(t,i,s);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,i){let a,r,n,o,l,h,{xAlign:d,yAlign:c}=this,{caretSize:u,cornerRadius:g}=i,{topLeft:p,topRight:f,bottomLeft:m,bottomRight:b}=(0,s.ax)(g),{x:x,y:_}=t,{width:v,height:y}=e;return"center"===c?(l=_+y/2,"left"===d?(r=(a=x)-u,o=l+u,h=l-u):(r=(a=x+v)+u,o=l-u,h=l+u),n=a):(r="left"===d?x+Math.max(p,m)+u:"right"===d?x+v-Math.max(f,b)-u:this.caretX,"top"===c?(l=(o=_)-u,a=r-u,n=r+u):(l=(o=_+y)+u,a=r+u,n=r-u),h=o),{x1:a,x2:r,x3:n,y1:o,y2:l,y3:h}}drawTitle(t,e,i){let a,r,n,o=this.title,l=o.length;if(l){let h=(0,s.aA)(i.rtl,this.x,this.width);for(n=0,t.x=eA(this,i.titleAlign,i),e.textAlign=h.textAlign(i.titleAlign),e.textBaseline="middle",a=(0,s.O)(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string;n<l;++n)e.fillText(o[n],h.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,n+1===l&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,a,r){let n=this.labelColors[i],o=this.labelPointStyles[i],{boxHeight:l,boxWidth:h,boxPadding:d}=r,c=(0,s.O)(r.bodyFont),u=eA(this,"left",r),g=a.x(u),p=l<c.lineHeight?(c.lineHeight-l)/2:0,f=e.y+p;if(r.usePointStyle){let e={radius:Math.min(h,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},i=a.leftForLtr(g,h)+h/2,d=f+l/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,(0,s.au)(t,e,i,d),t.strokeStyle=n.borderColor,t.fillStyle=n.backgroundColor,(0,s.au)(t,e,i,d)}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 e=a.leftForLtr(g,h-d),i=a.leftForLtr(a.xPlus(g,1),h-d-2),o=(0,s.ax)(n.borderRadius);Object.values(o).some(t=>0!==t)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,(0,s.av)(t,{x:e,y:f,w:h,h:l,radius:o}),t.fill(),t.stroke(),t.fillStyle=n.backgroundColor,t.beginPath(),(0,s.av)(t,{x:i,y:f+1,w:h-2,h:l-2,radius:o}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,f,h,l),t.strokeRect(e,f,h,l),t.fillStyle=n.backgroundColor,t.fillRect(i,f+1,h-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){let a,r,n,o,l,h,{body:d}=this,{bodySpacing:c,bodyAlign:u,displayColors:g,boxHeight:p,boxWidth:f,boxPadding:m}=i,b=(0,s.O)(i.bodyFont),x=b.lineHeight,_=0,v=(0,s.aA)(i.rtl,this.x,this.width),y=function(i){e.fillText(i,v.x(t.x+_),t.y+x/2),t.y+=x+c},M=v.textAlign(u);for(e.textAlign=u,e.textBaseline="middle",e.font=b.string,t.x=eA(this,M,i),e.fillStyle=i.bodyColor,(0,s.Q)(this.beforeBody,y),_=g&&"right"!==M?"center"===u?f/2+m:f+2+m:0,n=0,l=d.length;n<l;++n){for(a=d[n],e.fillStyle=this.labelTextColors[n],(0,s.Q)(a.before,y),r=a.lines,g&&r.length&&(this._drawColorBox(e,t,n,v,i),x=Math.max(b.lineHeight,p)),o=0,h=r.length;o<h;++o)y(r[o]),x=b.lineHeight;(0,s.Q)(a.after,y)}_=0,x=b.lineHeight,(0,s.Q)(this.afterBody,y),t.y-=c}drawFooter(t,e,i){let a,r,n=this.footer,o=n.length;if(o){let l=(0,s.aA)(i.rtl,this.x,this.width);for(t.x=eA(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",a=(0,s.O)(i.footerFont),e.fillStyle=i.footerColor,e.font=a.string,r=0;r<o;++r)e.fillText(n[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,e,i,a){let{xAlign:r,yAlign:n}=this,{x:o,y:l}=t,{width:h,height:d}=i,{topLeft:c,topRight:u,bottomLeft:g,bottomRight:p}=(0,s.ax)(a.cornerRadius);e.fillStyle=a.backgroundColor,e.strokeStyle=a.borderColor,e.lineWidth=a.borderWidth,e.beginPath(),e.moveTo(o+c,l),"top"===n&&this.drawCaret(t,e,i,a),e.lineTo(o+h-u,l),e.quadraticCurveTo(o+h,l,o+h,l+u),"center"===n&&"right"===r&&this.drawCaret(t,e,i,a),e.lineTo(o+h,l+d-p),e.quadraticCurveTo(o+h,l+d,o+h-p,l+d),"bottom"===n&&this.drawCaret(t,e,i,a),e.lineTo(o+g,l+d),e.quadraticCurveTo(o,l+d,o,l+d-g),"center"===n&&"left"===r&&this.drawCaret(t,e,i,a),e.lineTo(o,l+c),e.quadraticCurveTo(o,l,o+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 i=eP[t.position].call(this,this._active,this._eventPosition);if(!i)return;let r=this._size=eO(this,t),n=Object.assign({},i,this._size),o=eL(e,t,n),l=eE(t,n,o,e);
1(s._to!==l.x||a._to!==l.y)&&(this.xAlign=o.xAlign,this.yAlign=o.yAlign,this.width=r.width,this.height=r.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),i=this.opacity;if(!i)return;this._updateAnimationTarget(e);let a={width:this.width,height:this.height},r={x:this.x,y:this.y};i=.001>Math.abs(i)?0:i;let n=(0,s.K)(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,a,e),(0,s.aB)(t,e.textDirection),r.y+=n.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),(0,s.aD)(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}}),r=!(0,s.ai)(i,a),n=this._positionChanged(a,e);(r||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,r=this._active||[],n=this._getActiveElements(t,r,e,i),o=this._positionChanged(n,t),l=e||!(0,s.ai)(n,r)||o;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;let r=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&r.reverse(),r}_positionChanged(t,e){let{caretX:i,caretY:s,options:a}=this,r=eP[a.position].call(this,t,e);return!1!==r&&(i!==r.x||s!==r.y)}}ez.positioners=eP;var eR={id:"tooltip",_element:ez,positioners:eP,afterInit(t,e,i){i&&(t.tooltip=new ez({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))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:{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).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){let e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:s.aF,afterBody:s.aF,beforeFooter:s.aF,footer:s.aF,afterFooter:s.aF}},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"]},eF=Object.freeze({__proto__:null,Decimation:{id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled){ed(t);return}let a=t.width;
1t.data.datasets.forEach((e,r)=>{let n,{_data:o,indexAxis:l}=e,h=t.getDatasetMeta(r),d=o||e.data;if("y"===(0,s.a)([l,t.options.indexAxis])||!h.controller.supportsDecimation)return;let c=t.scales[h.xAxisID];if("linear"!==c.type&&"time"!==c.type||t.options.parsing)return;let{start:u,count:g}=function(t,e){let i,a=e.length,r=0,{iScale:n}=t,{min:o,max:l,minDefined:h,maxDefined:d}=n.getUserBounds();return h&&(r=(0,s.E)((0,s.Z)(e,n.axis,o).lo,0,a-1)),i=d?(0,s.E)((0,s.Z)(e,n.axis,l).hi+1,r,a)-r:a-r,{start:r,count:i}}(h,d);if(g<=(i.threshold||4*a)){eh(e);return}switch((0,s.k)(o)&&(e._data=d,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":n=function(t,e,i,s,a){let r,n,o,l,h,d=a.samples||s;if(d>=i)return t.slice(e,e+i);let c=[],u=(i-2)/(d-2),g=0,p=e+i-1,f=e;for(r=0,c[g++]=t[f];r<d-2;r++){let s,a=0,d=0,p=Math.floor((r+1)*u)+1+e,m=Math.min(Math.floor((r+2)*u)+1,i)+e,b=m-p;for(s=p;s<m;s++)a+=t[s].x,d+=t[s].y;a/=b,d/=b;let x=Math.floor(r*u)+1+e,_=Math.min(Math.floor((r+1)*u)+1,i)+e,{x:v,y:y}=t[f];for(o=l=-1,s=x;s<_;s++)(l=.5*Math.abs((v-a)*(t[s].y-y)-(v-t[s].x)*(d-y)))>o&&(o=l,n=t[s],h=s);c[g++]=n,f=h}return c[g++]=t[p],c}(d,u,g,a,i);break;case"min-max":n=function(t,e,i,a){let r,n,o,l,h,d,c,u,g,p,f=0,m=0,b=[],x=t[e].x,_=t[e+i-1].x-x;for(r=e;r<e+i;++r){o=((n=t[r]).x-x)/_*a,l=n.y;let e=0|o;if(e===h)l<g?(g=l,d=r):l>p&&(p=l,c=r),f=(m*f+n.x)/++m;else{let i=r-1;if(!(0,s.k)(d)&&!(0,s.k)(c)){let e=Math.min(d,c),s=Math.max(d,c);e!==u&&e!==i&&b.push({...t[e],x:f}),s!==u&&s!==i&&b.push({...t[s],x:f})}r>0&&i!==u&&b.push(t[i]),b.push(n),h=e,m=0,g=p=l,d=c=u=r}}return b}(d,u,g,a);break;default:throw Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=n})},destroy(t){ed(t)}},Filler:{id:"filler",afterDatasetsUpdate(t,e,i){let a,r,n,o,l=(t.data.datasets||[]).length,h=[];for(r=0;r<l;++r)n=(a=t.getDatasetMeta(r)).dataset,o=null,n&&n.options&&n instanceof t9&&(o={visible:t.isDatasetVisible(r),index:r,fill:function(t,e,i){var a,r,n,o;let l=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)(l))return!isNaN(l.value)&&l;let h=parseFloat(l);return(0,s.g)(h)&&Math.floor(h)===h?(a=l[0],r=e,n=h,o=i,("-"===a||"+"===a)&&(n=r+n),n!==r&&!(n<0)&&!(n>=o)&&n):["origin","start","end","stack","shape"].indexOf(l)>=0&&l}(n,r,l),chart:t,axis:a.controller.options.indexAxis,scale:a.vScale,line:n}),a.$filler=o,h.push(o);for(r=0;r<l;++r)(o=h[r])&&!1!==o.fill&&(o.fill=function(t,e,i){let a,r=t[e].fill,n=[e];if(!i)return r;for(;!1!==r&&-1===n.indexOf(r);){if(!(0,s.g)(r))return r;if(!(a=t[r]))break;if(a.visible)return r;n.push(r),r=a.fill}return!1}(h,r,i.propagate))},beforeDraw(t,e,i){let s="beforeDraw"===i.drawTime,a=t.getSortedVisibleDatasetMetas(),r=t.chartArea;for(let e=a.length-1;e>=0;--e){let i=a[e].$filler;i&&(i.line.updateControlPoints(r,i.axis),s&&i.fill&&eb(t.ctx,i,r))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;let s=t.getSortedVisibleDatasetMetas();for(let e=s.length-1;e>=0;--e){let i=s[e].$filler;ef(i)&&eb(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){let s=e.meta.$filler;ef(s)&&"beforeDatasetDraw"===i.drawTime&&eb(t.ctx,s,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},Legend:{id:"legend",_element:ek,start(t,e,i){let s=t.legend=new ek({ctx:t.ctx,options:i,chart:t});tg.configure(t,s,i),tg.addBox(t,s)},stop(t){tg.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){let s=t.legend;tg.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)},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:r,color:n}}=t.legend.options;
1return t._getSortedDatasetMetas().map(t=>{let o=t.controller.getStyle(i?0:void 0),l=(0,s.K)(o.borderWidth);return{text:e[t.index].label,fillStyle:o.backgroundColor,fontColor:n,hidden:!t.visible,lineCap:o.borderCapStyle,lineDash:o.borderDash,lineDashOffset:o.borderDashOffset,lineJoin:o.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:o.borderColor,pointStyle:a||o.pointStyle,rotation:o.rotation,textAlign:r||o.textAlign,borderRadius:0,datasetIndex:t.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}},SubTitle:{id:"subtitle",start(t,e,i){let s=new ew({ctx:t.ctx,options:i,chart:t});tg.configure(t,s,i),tg.addBox(t,s),eS.set(t,s)},stop(t){tg.removeBox(t,eS.get(t)),eS.delete(t)},beforeUpdate(t,e,i){let s=eS.get(t);tg.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Title:{id:"title",_element:ew,start(t,e,i){let s=new ew({ctx:t.ctx,options:i,chart:t});tg.configure(t,s,i),tg.addBox(t,s),t.titleBlock=s},stop(t){let e=t.titleBlock;tg.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){let s=t.titleBlock;tg.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Tooltip:eR});let eI=(t,e,i,s)=>
1("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.E)(Math.round(t),0,e);class eB extends ${constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let e=this._addedLabels;if(e.length){let t=this.getLabels();for(let{index:i,label:s}of e)t[i]===s&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){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);return -1===a?eI(t,e,i,s):a!==t.lastIndexOf(e)?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,1),this._startValue=this.min-.5*!!i;for(let i=t;i<=e;i++)s.push({value:i});return s}getLabelForValue(t){let e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){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 eN(t,e,{horizontal:i,minRotation:a}){let r=(0,s.t)(a),n=(i?Math.sin(r):Math.cos(r))||.001,o=.75*e*(""+t).length;return Math.min(e/n,o)}eB.id="category",eB.defaults={ticks:{callback:eB.prototype.getLabelForValue}};class eH extends ${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:r}=this,n=t=>a=e?a:t,o=t=>r=i?r:t;if(t){let t=(0,s.s)(a),e=(0,s.s)(r);t<0&&e<0?o(0):t>0&&e>0&&n(0)}if(a===r){let e=1;(r>=Number.MAX_SAFE_INTEGER||a<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*r)),o(r+e),t||n(a-e)}this.min=a,this.max=r}getTickLimit(){let t,{maxTicksLimit:e,stepSize:i}=this.options.ticks;return i?(t=Math.ceil(this.max/i)-Math.floor(this.min/i)+1)>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3):(t=this.computeTickLimit(),e=e||11),e&&(t=Math.min(e,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,e=t.ticks,i=this.getTickLimit(),a=function(t,e){let i,a,r,n,o=[],{bounds:l,step:h,min:d,max:c,precision:u,count:g,maxTicks:p,maxDigits:f,includeBounds:m}=t,b=h||1,x=p-1,{min:_,max:v}=e,y=!(0,s.k)(d),M=!(0,s.k)(c),k=!(0,s.k)(g),w=(v-_)/(f+1),S=(0,s.aI)((v-_)/x/b)*b;if(S<1e-14&&!y&&!M)return[{value:_},{value:v}];(n=Math.ceil(v/S)-Math.floor(_/S))>x&&(S=(0,s.aI)(n*S/x/b)*b),(0,s.k)(u)||(S=Math.ceil(S*(i=Math.pow(10,u)))/i),"ticks"===l?(a=Math.floor(_/S)*S,r=Math.ceil(v/S)*S):(a=_,r=v),y&&M&&h&&(0,s.aJ)((c-d)/h,S/1e3)?(n=Math.round(Math.min((c-d)/S,p)),S=(c-d)/n,a=d,r=c):k?(a=y?d:a,S=((r=M?c:r)-a)/(n=g-1)):(n=(r-a)/S,n=(0,s.aK)(n,Math.round(n),S/1e3)?Math.round(n):Math.ceil(n));let P=Math.max((0,s.aL)(S),(0,s.aL)(a));a=Math.round(a*(i=Math.pow(10,(0,s.k)(u)?P:u)))/i,r=Math.round(r*i)/i;let D=0;for(y&&(m&&a!==d?(o.push({value:d}),a<d&&D++,(0,s.aK)(Math.round((a+D*S)*i)/i,d,eN(d,w,t))&&D++):a<d&&D++);D<n;++D)o.push({value:Math.round((a+D*S)*i)/i});return M&&m&&r!==c?o.length&&(0,s.aK)(o[o.length-1].value,c,eN(c,w,t))?o[o.length-1].value=c:o.push({value:c}):M&&r!==c||o.push({value:r}),o}({maxTicks:i=Math.max(2,i),bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&(0,s.aH)(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}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 eW extends eH{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=(t?Math.sin(i):Math.cos(i))||.001;return Math.ceil(e/Math.min(40,this._resolveTickFontOptions(0).lineHeight/a))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function ej(t){return 1==t/Math.pow(10,Math.floor((0,s.z)(t)))}eW.id="linear",eW.defaults={ticks:{callback:I.formatters.numeric}};class e$ extends ${constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){let i=eH.prototype.parse.apply(this,[t,e]);if(0===i){this._zero=!0;return}return(0,s.g)(i)&&i>0?i:null}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=(0,s.g)(t)?Math.max(0,t):null,this.max=(0,s.g)(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),i=this.min,a=this.max,r=e=>i=t?i:e,n=t=>a=e?a:t,o=(t,e)=>Math.pow(10,Math.floor((0,s.z)(t))+e);i===a&&(i<=0?(r(1),n(10)):(r(o(i,-1)),n(o(a,1)))),i<=0&&r(o(a,-1)),a<=0&&n(o(i,1)),this._zero&&this.min!==this._suggestedMin&&i===o(this.min,0)&&r(o(i,-1)),this.min=i,this.max=a}buildTicks(){let t=this.options,e=function(t,e){let i=Math.floor((0,s.z)(e.max)),a=Math.ceil(e.max/Math.pow(10,i)),r=[],n=(0,s.B)(t.min,Math.pow(10,Math.floor((0,s.z)(e.min)))),o=Math.floor((0,s.z)(n)),l=Math.floor(n/Math.pow(10,o)),h=o<0?Math.pow(10,Math.abs(o)):1;do r.push({value:n,major:ej(n)}),10==++l&&(l=1,h=++o>=0?1:h),n=Math.round(l*Math.pow(10,o)*h)/h;while(o<i||o===i&&l<a);return r.push({value:(0,s.B)(t.max,n),major:ej(n)}),r}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&(0,s.aH)(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":(0,s.o)(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=(0,s.z)(t),this._valueRange=(0,s.z)(this.max)-(0,s.z)(t)}getPixelForValue(t){return((void 0===t||0===t)&&(t=this.min),null===t||isNaN(t))?NaN:this.getPixelForDecimal(t===this.min?0:((0,s.z)(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function eU(t){let e=t.ticks;if(e.display&&t.display){let t=(0,s.K)(e.backdropPadding);return(0,s.v)(e.font&&e.font.size,s.d.font.size)+t.height}return 0}function eY(t,e,i,s,a){return t===s||t===a?{start:e-i/2,end:e+i/2}:t<s||t>a?{start:e-i,end:e}:{start:e,end:e+i}}function eK(t,e,i,a){let{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,s.T);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let s=1;s<a;s++)i=t.getPointPosition(s,e),r.lineTo(i.x,i.y)}}e$.id="logarithmic",e$.defaults={ticks:{callback:I.formatters.logarithmic,major:{enabled:!0}}};class eQ extends eH{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let t=this._padding=(0,s.K)(eU(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!1);this.min=(0,s.g)(t)&&!isNaN(t)?t:0,this.max=(0,s.g)(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/eU(this.options))}generateTickLabels(t){eH.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((t,e)=>{let i=(0,s.C)(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){let t=this.options;t.display&&t.pointLabels.display?function(t){let e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),a=[],r=[],n=t._pointLabels.length,o=t.options.pointLabels,l=o.centerPointLabels?s.P/n:0;for(let c=0;c<n;c++){var h,d;let n=o.setContext(t.getPointLabelContext(c));r[c]=n.padding;let u=t.getPointPosition(c,t.drawingArea+r[c],l),g=(0,s.O)(n.font),p=(h=t.ctx,d=t._pointLabels[c],d=(0,s.b)(d)?d:[d],{w:(0,s.aM)(h,g.string,d),h:d.length*g.lineHeight});a[c]=p;let f=(0,s.az)(t.getIndexAngle(c)+l),m=Math.round((0,s.F)(f));
1!function(t,e,i,s,a){let r=Math.abs(Math.sin(i)),n=Math.abs(Math.cos(i)),o=0,l=0;s.start<e.l?(o=(e.l-s.start)/r,t.l=Math.min(t.l,e.l-o)):s.end>e.r&&(o=(s.end-e.r)/r,t.r=Math.max(t.r,e.r+o)),a.start<e.t?(l=(e.t-a.start)/n,t.t=Math.min(t.t,e.t-l)):a.end>e.b&&(l=(a.end-e.b)/n,t.b=Math.max(t.b,e.b+l))}(i,e,f,eY(m,u.x,p.w,0,180),eY(m,u.y,p.h,90,270))}t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){let a=[],r=t._pointLabels.length,n=t.options,o=eU(n)/2,l=t.drawingArea,h=n.pointLabels.centerPointLabels?s.P/r:0;for(let n=0;n<r;n++){var d,c,u,g,p,f,m;let r=t.getPointPosition(n,l+o+i[n],h),b=Math.round((0,s.F)((0,s.az)(r.angle+s.H))),x=e[n],_=(d=r.y,c=x.h,90===(u=b)||270===u?d-=c/2:(u>270||u<90)&&(d-=c),d),v=0===(g=b)||180===g?"center":g<180?"left":"right",y=(p=r.x,f=x.w,"right"===(m=v)?p-=f:"center"===m&&(p-=f/2),p);a.push({x:r.x,y:_,textAlign:v,left:y,top:_,right:y+x.w,bottom:_+x.h})}return a}(t,a,r)}(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){let e=s.T/(this._pointLabels.length||1),i=this.options.startAngle||0;return(0,s.az)(t*e+(0,s.t)(i))}getDistanceFromCenterForValue(t){if((0,s.k)(t))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if((0,s.k)(t))return NaN;let e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){let e=this._pointLabels||[];if(t>=0&&t<e.length){var i;let a=e[t];return i=this.getContext(),(0,s.h)(i,{label:a,index:t,type:"pointLabel"})}}getPointPosition(t,e,i=0){let a=this.getIndexAngle(t)-s.H+i;return{x:Math.cos(a)*e+this.xCenter,y:Math.sin(a)*e+this.yCenter,angle:a}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){let{left:e,top:i,right:s,bottom:a}=this._pointLabelItems[t];return{left:e,top:i,right:s,bottom:a}}drawBackground(){let{backgroundColor:t,grid:{circular:e}}=this.options;if(t){let i=this.ctx;i.save(),i.beginPath(),eK(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){let t,e,i,a=this.ctx,r=this.options,{angleLines:n,grid:o}=r,l=this._pointLabels.length;if(r.pointLabels.display&&function(t,e){let{ctx:i,options:{pointLabels:a}}=t;for(let r=e-1;r>=0;r--){let e=a.setContext(t.getPointLabelContext(r)),n=(0,s.O)(e.font),{x:o,y:l,textAlign:h,left:d,top:c,right:u,bottom:g}=t._pointLabelItems[r],{backdropColor:p}=e;if(!(0,s.k)(p)){let t=(0,s.ax)(e.borderRadius),a=(0,s.K)(e.backdropPadding);i.fillStyle=p;let r=d-a.left,n=c-a.top,o=u-d+a.width,l=g-c+a.height;Object.values(t).some(t=>0!==t)?(i.beginPath(),(0,s.av)(i,{x:r,y:n,w:o,h:l,radius:t}),i.fill()):i.fillRect(r,n,o,l)}(0,s.M)(i,t._pointLabels[r],o,l+n.lineHeight/2,n,{color:e.color,textAlign:h,textBaseline:"middle"})}}(this,l),o.display&&this.ticks.forEach((t,i)=>{0!==i&&(e=this.getDistanceFromCenterForValue(t.value),function(t,e,i,s){let a=t.ctx,r=e.circular,{color:n,lineWidth:o}=e;(r||s)&&n&&o&&!(i<0)&&(a.save(),a.strokeStyle=n,a.lineWidth=o,a.setLineDash(e.borderDash),a.lineDashOffset=e.borderDashOffset,a.beginPath(),eK(t,i,r,s),a.closePath(),a.stroke(),a.restore())}(this,o.setContext(this.getContext(i-1)),e,l))}),n.display){for(a.save(),t=l-1;t>=0;t--){let s=n.setContext(this.getPointLabelContext(t)),{color:o,lineWidth:l}=s;l&&o&&(a.lineWidth=l,a.strokeStyle=o,a.setLineDash(s.borderDash),a.lineDashOffset=s.borderDashOffset,e=this.getDistanceFromCenterForValue(r.ticks.reverse?this.min:this.max),i=this.getPointPosition(t,e),a.beginPath(),a.moveTo(this.xCenter,this.yCenter),a.lineTo(i.x,i.y),a.stroke())}a.restore()}}drawBorder(){}drawLabels(){let t,e,i=this.ctx,a=this.options,r=a.ticks;if(!r.display)return;let n=this.getIndexAngle(0);i.save(),i.translate(this.xCenter,this.yCenter),i.rotate(n),i.textAlign="center",i.textBaseline="middle",this.ticks.forEach((n,o)=>
1{if(0===o&&!a.reverse)return;let l=r.setContext(this.getContext(o)),h=(0,s.O)(l.font);if(t=this.getDistanceFromCenterForValue(this.ticks[o].value),l.showLabelBackdrop){i.font=h.string,e=i.measureText(n.label).width,i.fillStyle=l.backdropColor;let a=(0,s.K)(l.backdropPadding);i.fillRect(-e/2-a.left,-t-h.size/2-a.top,e+a.width,h.size+a.height)}(0,s.M)(i,n.label,0,-t,h,{color:l.color})}),i.restore()}drawTitle(){}}eQ.id="radialLinear",eQ.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:I.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}},eQ.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},eQ.descriptors={angleLines:{_fallback:"grid"}};let eX={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}},eG=Object.keys(eX);function eq(t,e){return t-e}function eJ(t,e){if((0,s.k)(e))return null;let i=t._adapter,{parser:a,round:r,isoWeekday:n}=t._parseOpts,o=e;return("function"==typeof a&&(o=a(o)),(0,s.g)(o)||(o="string"==typeof a?i.parse(o,a):i.parse(o)),null===o)?null:(r&&(o="week"===r&&((0,s.x)(n)||!0===n)?i.startOf(o,"isoWeek",n):i.startOf(o,r)),+o)}function eZ(t,e,i,s){let a=eG.length;for(let r=eG.indexOf(t);r<a-1;++r){let t=eX[eG[r]],a=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(a*t.size))<=s)return eG[r]}return eG[a-1]}function e0(t,e,i){if(i){if(i.length){let{lo:a,hi:r}=(0,s.aO)(i,e);t[i[a]>=e?i[a]:i[r]]=!0}}else t[e]=!0}function e1(t,e,i){let s,a,r=[],n={},o=e.length;for(s=0;s<o;++s)n[a=e[s]]=s,r.push({value:a,major:!1});return 0!==o&&i?function(t,e,i,s){let a,r,n=t._adapter,o=+n.startOf(e[0].value,s),l=e[e.length-1].value;for(a=o;a<=l;a=+n.add(a,1,s))(r=i[a])>=0&&(e[r].major=!0);return e}(t,r,n,i):r}class e2 extends ${constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){let i=t.time||(t.time={}),a=this._adapter=new J._date(t.adapters.date);a.init(e),(0,s.ac)(i.displayFormats,a.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:eJ(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,e=this._adapter,i=t.time.unit||"day",{min:a,max:r,minDefined:n,maxDefined:o}=this.getUserBounds();function l(t){n||isNaN(t.min)||(a=Math.min(a,t.min)),o||isNaN(t.max)||(r=Math.max(r,t.max))}n&&o||(l(this._getLabelBounds()),("ticks"!==t.bounds||"labels"!==t.ticks.source)&&l(this.getMinMax(!1))),a=(0,s.g)(a)&&!isNaN(a)?a:+e.startOf(Date.now(),i),r=(0,s.g)(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(a,r-1),this.max=Math.max(a+1,r)}_getLabelBounds(){let t=this.getLabelTimestamps(),e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){let t=this.options,e=t.time,i=t.ticks,a="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&a.length&&(this.min=this._userMin||a[0],this.max=this._userMax||a[a.length-1]);let r=this.min,n=this.max,o=(0,s.aN)(a,r,n);return this._unit=e.unit||(i.autoSkip?eZ(e.minUnit,this.min,this.max,this._getLabelCapacity(r)):function(t,e,i,s,a){for(let r=eG.length-1;r>=eG.indexOf(i);r--){let i=eG[r];if(eX[i].common&&t._adapter.diff(a,s,i)>=e-1)return i}return eG[i?eG.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=eG.indexOf(t)+1,i=eG.length;e<i;++e)if(eX[eG[e]].common)return eG[e]}(this._unit):void 0,this.initOffsets(a),t.reverse&&o.reverse(),e1(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t){let e,i,a=0,r=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),a=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),r=1===t.length?
1i:(i-this.getDecimalForValue(t[t.length-2]))/2);let n=t.length<3?.5:.25;a=(0,s.E)(a,0,n),r=(0,s.E)(r,0,n),this._offsets={start:a,end:r,factor:1/(a+1+r)}}_generate(){let t,e,i=this._adapter,a=this.min,r=this.max,n=this.options,o=n.time,l=o.unit||eZ(o.minUnit,a,r,this._getLabelCapacity(a)),h=(0,s.v)(o.stepSize,1),d="week"===l&&o.isoWeekday,c=(0,s.x)(d)||!0===d,u={},g=a;if(c&&(g=+i.startOf(g,"isoWeek",d)),g=+i.startOf(g,c?"day":l),i.diff(r,a,l)>1e5*h)throw Error(a+" and "+r+" are too far apart with stepSize of "+h+" "+l);let p="data"===n.ticks.source&&this.getDataTimestamps();for(t=g,e=0;t<r;t=+i.add(t,h,l),e++)e0(u,t,p);return(t===r||"ticks"===n.bounds||1===e)&&e0(u,t,p),Object.keys(u).sort((t,e)=>t-e).map(t=>+t)}getLabelForValue(t){let e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,a){let r=this.options,n=r.time.displayFormats,o=this._unit,l=this._majorUnit,h=o&&n[o],d=l&&n[l],c=i[e],u=l&&d&&c&&c.major,g=this._adapter.format(t,a||(u?d:h)),p=r.ticks.callback;return p?(0,s.C)(p,[g,e,i],this):g}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e<i;++e)(s=t[e]).label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){let e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){let e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){let e=this.options.ticks,i=this.ctx.measureText(t).width,a=(0,s.t)(this.isHorizontal()?e.maxRotation:e.minRotation),r=Math.cos(a),n=Math.sin(a),o=this._resolveTickFontOptions(0).size;return{w:i*r+o*n,h:i*n+o*r}}_getLabelCapacity(t){let e=this.options.time,i=e.displayFormats,s=i[e.unit]||i.millisecond,a=this._tickFormatFunction(t,0,e1(this,[t],this._majorUnit),s),r=this._getLabelSize(a),n=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return n>0?n:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;let s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,e=s.length;t<e;++t)i=i.concat(s[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){let t,e,i=this._cache.labels||[];if(i.length)return i;let s=this.getLabels();for(t=0,e=s.length;t<e;++t)i.push(eJ(this,s[t]));return this._cache.labels=this._normalized?i:this.normalize(i)}normalize(t){return(0,s._)(t.sort(eq))}}function e3(t,e,i){let a,r,n,o,l=0,h=t.length-1;i?(e>=t[l].pos&&e<=t[h].pos&&({lo:l,hi:h}=(0,s.Z)(t,"pos",e)),{pos:a,time:n}=t[l],{pos:r,time:o}
1=t[h]):(e>=t[l].time&&e<=t[h].time&&({lo:l,hi:h}=(0,s.Z)(t,"time",e)),{time:a,pos:n}=t[l],{time:r,pos:o}=t[h]);let d=r-a;return d?n+(o-n)*(e-a)/d:n}e2.id="time",e2.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class e5 extends e2{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=e3(e,this.min),this._tableRange=e3(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let e,i,s,{min:a,max:r}=this,n=[],o=[];for(e=0,i=t.length;e<i;++e)(s=t[e])>=a&&s<=r&&n.push(s);if(n.length<2)return[{time:a,pos:0},{time:r,pos:1}];for(e=0,i=n.length;e<i;++e)Math.round((n[e+1]+n[e-1])/2)!==(s=n[e])&&o.push({time:s,pos:e/(i-1)});return o}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;let e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t}getDecimalForValue(t){return(e3(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){let e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return e3(this._table,i*this._tableRange+this._minPos,!0)}}e5.id="timeseries",e5.defaults=e2.defaults;let e6=[X,el,eF,Object.freeze({__proto__:null,CategoryScale:eB,LinearScale:eW,LogarithmicScale:e$,RadialLinearScale:eQ,TimeScale:e2,TimeSeriesScale:e5})]}}]);
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.