PageSourceSearch

https://www.dhanalakshmijewellery.in/_next/static/chunks/ee8b1517-3b80b480dcdff580.js

js dhanalakshmijewellery.in collected 2026-10-02 01:56:40 UTC 164,319 bytes, 6 lines download raw bytes

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

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.