PageSourceSearch

https://miaenergia.repower.com/chunk-BmRUSppb.js

js repower.com collected 2026-10-02 02:39:28 UTC 167,005 bytes, 3 lines download raw bytes

vendor: 15,702 bytes, line 1
1import{l as z,t as A}from"./chunk-CKVc5S_5.js";import{$ as Ua$1,$t as nl,An as ya$1,At as fr$1,C as Hs$1,Cn as vc,D as Je,Dn as xc,Dt as ec,E as Jc,En as xa$1,Et as dt,F as Ma$1,Ft as gt,Gt as la$1,H as Pe$1,Ht as ja$1,It as ha$1,J as Rt,Jt as ma$1,K as Qs$1,Kt as lc,L as Na$1,Lt as he,Mt as gc,N as La$1,Nn as zc,On as xi$1,Ot as fa$1,P as Lt,Qt as nc,R as Oa$1,Rt as hn$1,Sn as va$1,St as de,T as Ja$1,Tn as wi$1,Tt as dr$1,U as Q,Ut as ka$1,V as Pa$1,W as Qa$1,X as Ta$1,Yt as mc,Z as Te,Zt as mn$1,_ as Ge,_n as tr$1,_t,a as Ai$1,an as pr$1,at as Wc,b as Gs$1,bn as uc,bt as ca$1,c as Ca$1,d as Ea$1,dn as rr$1,en as nr$1,et as Uc,f as Et,fn as sc,g as Ga$1,gt as _a$1,h as Ft$1,hn as tc,ht as _,i as Aa$1,it as Wa$1,j as Ks$1,jn as ye$1,jt as ga$1,k as Kc,kt as fn$1,l as Da$1,ln as rc,lt as Xs$1,m as Fc,mn as sr$1,n as $c,nn as pa$1,nt as Ut,on as qa$1,p as Fa$1,pn as se$1,pt as Zc,q as Ra$1,qt as ln$1,rn as pc,rt as V,s as Bc,sn as qc,st as Xa$1,t as $a$1,tn as on$1,tt as Us$1,vt as ba$1,w as Ia$1,wn as wa$1,wt as dn$1,x as Hc,xn as un$1,xt as cn$1,yn as ua$1,yt as bc,z as Oc,zt as ic}from"./chunk-Q-6PeHT4.js";var fi=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(i,t,e,s){let o=t.listeners[s],a=t.duration;o.forEach(r=>r({chart:i,initial:t.initial,numSteps:a,currentStep:Math.min(e-t.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=Gs$1.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(i=Date.now()){let t=0;this._charts.forEach((e,s)=>{if(!e.running||!e.items.length)return;let o=e.items,a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>e.duration&&(e.duration=l._total),l.tick(i),r=!0):(o[a]=o[o.length-1],o.pop());r&&(s.draw(),this._notify(s,e,i,`progress`)),o.length||(e.running=!1,this._notify(s,e,i,`complete`),e.initial=!1),t+=o.length}),this._lastDate=i,t===0&&(this._running=!1)}_getAnims(i){let t=this._charts,e=t.get(i);return e||(e={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(i,e)),e}listen(i,t,e){this._getAnims(i).listeners[t].push(e)}add(i,t){!t||!t.length||this._getAnims(i).items.push(...t)}has(i){return this._getAnims(i).items.length>0}start(i){let t=this._charts.get(i);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((e,s)=>Math.max(e,s._duration),0),this._refresh())}running(i){if(!this._running)return!1;let t=this._charts.get(i);return!(!t||!t.running||!t.items.length)}stop(i){let t=this._charts.get(i);if(!t||!t.items.length)return;let e=t.items,s=e.length-1;for(;s>=0;--s)e[s].cancel();t.items=[],this._notify(i,t,Date.now(),`complete`)}remove(i){return this._charts.delete(i)}};var lt=new fi;var hs=`transparent`;var On={boolean(n,i,t){return t>.5?i:n},color(n,i,t){let e=Wa$1(n||hs),s=e.valid&&Wa$1(i||hs);return s&&s.valid?s.mix(e,t).hexString():i},number(n,i,t){return n+(i-n)*t}};var gi=class{constructor(i,t,e,s){let o=t[e];s=vc([i.to,s,o,i.from]);let a=vc([i.from,o,s]);this._active=!0,this._fn=i.fn||On[i.type||typeof a],this._easing=wi$1[i.easing]||wi$1.linear,this._start=Math.floor(Date.now()+(i.delay||0)),this._duration=this._total=Math.floor(i.duration),this._loop=!!i.loop,this._target=t,this._prop=e,this._from=a,this._to=s,this._promises=void 0}active(){return this._active}update(i,t,e){if(this._active){this._notify(!1);let s=this._target[this._prop],o=e-this._start,a=this._duration-o;this._start=e,this._duration=Math.floor(Math.max(a,i.duration)),this._total+=o,this._loop=!!i.loop,this._to=vc([i.to,t,s,i.from]),this._from=vc([i.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(i){let t=i-this._start,e=this._duration,s=this._prop,o=this._from,a=this._loop,r=this._to,l;if(this._active=o!==r&&(a||t<e),!this._active){this._target[s]=r,this._notify(!0);return}if(t<0){this._target[s]=o;return}l=t/e%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,r,l)}wait(){let i=this._promises||(this._promises=[]);return new Promise((t,e)=>{i.push({res:t,rej:e})})}_notify(i){let t=i?`res`:`rej`,e=this._promises||[];for(let s=0;s<e.length;s++)e[s][t]()}};var Me=class{constructor(i,t){this._chart=i,this._properties=new Map,this.configure(t)}configure(i){if(!Q(i))return;let t=Object.keys(Ga$1.animation),e=this._properties;Object.getOwnPropertyNames(i).forEach(s=>{let o=i[s];if(!Q(o))return;let a={};for(let r of t)a[r]=o[r];(he(o.properties)&&o.properties||[s]).forEach(r=>{(r===s||!e.has(r))&&e.set(r,a)})})}_animateOptions(i,t){let e=t.options,s=En(i,e);if(!s)return[];let o=this._createAnimations(s,e);return e.$shared&&Tn(i.options.$animations,e).then(()=>{i.options=e},()=>{}),o}_createAnimations(i,t){let e=this._properties,s=[],o=i.$animations||(i.$animations={}),a=Object.keys(t),r=Date.now(),l;for(l=a.length-1;l>=0;--l){let c=a[l];if(c.charAt(0)===`$`)continue;if(c===`options`){s.push(...this._animateOptions(i,t));continue}let h=t[c],d=o[c],u=e.get(c);if(d)if(u&&d.active()){d.update(u,h,r);continue}else d.cancel();if(!u||!u.duration){i[c]=h;continue}o[c]=d=new gi(u,i,c,h),s.push(d)}return s}update(i,t){if(this._properties.size===0){Object.assign(i,t);return}let e=this._createAnimations(i,t);if(e.length)return lt.add(this._chart,e),!0}};function Tn(n,i){let t=[],e=Object.keys(i);for(let s=0;s<e.length;s++){let o=n[e[s]];o&&o.active()&&t.push(o.wait())}return Promise.all(t)}function En(n,i){if(!i)return;let t=n.options;if(!t){n.options=i;return}return t.$shared&&(n.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t}function ds(n,i){let t=n&&n.options||{},e=t.reverse,s=t.min===void 0?i:0,o=t.max===void 0?i:0;return{start:e?o:s,end:e?s:o}}function Rn(n,i,t){if(t===!1)return!1;let e=ds(n,t),s=ds(i,t);return{top:s.end,right:e.end,bottom:s.start,left:e.start}}function In(n){let i,t,e,s;return Q(n)?(i=n.top,t=n.right,e=n.bottom,s=n.left):i=t=e=s=n,{top:i,right:t,bottom:e,left:s,disabled:n===!1}}function dn(n,i){let t=[],e=n._getSortedDatasetMetas(i),s,o;for(s=0,o=e.length;s<o;++s)t.push(e[s].index);return t}function us(n,i,t,e={}){let s=n.keys,o=e.mode===`single`,a,r,l,c;if(i===null)return;let h=!1;for(a=0,r=s.length;a<r;++a){if(l=+s[a],l===t){if(h=!0,e.all)continue;break}c=n.values[l],ln$1(c)&&(o||i===0||dt(i)===dt(c))&&(i+=c)}return!h&&!e.all?0:i}function zn(n,i){let{iScale:t,vScale:e}=i,s=t.axis===`x`?`x`:`y`,o=e.axis===`x`?`x`:`y`,a=Object.keys(n),r=new Array(a.length),l,c,h;for(l=0,c=a.length;l<c;++l)h=a[l],r[l]={[s]:h,[o]:n[h]};return r}function ii(n,i){let t=n&&n.options.stacked;return t||t===void 0&&i.stack!==void 0}function Fn(n,i,t){return`${n.id}.${i.id}.${t.stack||t.type}`}function Bn(n){let{min:i,max:t,minDefined:e,maxDefined:s}=n.getUserBounds();return{min:e?i:Number.NEGATIVE_INFINITY,max:s?t:Number.POSITIVE_INFINITY}}function Vn(n,i,t){let e=n[i]||(n[i]={});return e[t]||(e[t]={})}function fs(n,i,t,e){for(let s of i.getMatchingVisibleMetas(e).reverse()){let o=n[s.index];if(t&&o>0||!t&&o<0)return s.index}return null}function gs(n,i){let{chart:t,_cachedMeta:e}=n,s=t._stacks||(t._stacks={}),{iScale:o,vScale:a,index:r}=e,l=o.axis,c=a.axis,h=Fn(o,a,e),d=i.length,u;for(let f=0;f<d;++f){let g=i[f],{[l]:p,[c]:m}=g,x=g._stacks||(g._stacks={});u=x[c]=Vn(s,h,p),u[r]=m,u._top=fs(u,a,!0,e.type),u._bottom=fs(u,a,!1,e.type);let b=u._visualValues||(u._visualValues={});b[r]=m}}function si(n,i){let t=n.scales;return Object.keys(t).filter(e=>t[e].axis===i).shift()}function Nn(n,i){return sr$1(n,{active:!1,dataset:void 0,datasetIndex:i,index:i,mode:`default`,type:`dataset`})}function Wn(n,i,t){return sr$1(n,{active:!1,dataIndex:i,parsed:void 0,raw:void 0,element:t,index:i,mode:`default`,type:`data`})}function Kt(n,i){let t=n.controller.index,e=n.vScale&&n.vScale.axis;if(e){i=i||n._parsed;for(let s of i){let o=s._stacks;if(!o||o[e]===void 0||o[e][t]===void 0)return;delete o[e][t],o[e]._visualValues!==void 0&&o[e]._visualValues[t]!==void 0&&delete o[e]._visualValues[t]}}}var ni=n=>n===`reset`||n===`none`;var ps=(n,i)=>i?n:Object.assign({},n);var Hn=(n,i,t)=>n&&!i.hidden&&i._stacked&&{keys:dn(t,!0),values:null};var xt=(()=>{class n{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=ii(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&&Kt(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,s=this.getDataset(),o=(u,f,g,p)=>u===`x`?f:u===`r`?p:g,a=e.xAxisID=se$1(s.xAxisID,si(t,`x`)),r=e.yAxisID=se$1(s.yAxisID,si(t,`y`)),l=e.rAxisID=se$1(s.rAxisID,si(t,`r`)),c=e.indexAxis,h=e.iAxisID=o(c,a,r,l),d=e.vAxisID=o(c,r,a,l);e.xScale=this.getScaleForId(a),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(l),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&&Ea$1(this._data,this),t._stacked&&Kt(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(Q(e)){let o=this._cachedMeta;this._data=zn(e,o)}else if(s!==e){if(s){Ea$1(s,this);let o=this._cachedMeta;Kt(o),o._parsed=[]}e&&Object.isExtensible(e)&&Ma$1(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,s=this.getDataset(),o=!1;this._dataCheck();let a=e._stacked;e._stacked=ii(e.vScale,e),e.stack!==s.stack&&(o=!0,Kt(e),e.stack=s.stack),this._resyncElements(t),(o||a!==e._stacked)&&(gs(this,e._parsed),e._stacked=ii(e.vScale,e))}configure(){let t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){let{_cachedMeta:s,_data:o}=this,{iScale:a,_stacked:r}=s,l=a.axis,c=t===0&&e===o.length?!0:s._sorted,h=t>0&&s._parsed[t-1],d,u,f;if(this._parsing===!1)s._parsed=o,s._sorted=!0,f=o;else{he(o[t])?f=this.parseArrayData(s,o,t,e):Q(o[t])?f=this.parseObjectData(s,o,t,e):f=this.parsePrimitiveData(s,o,t,e);let g=()=>u[l]===null||h&&u[l]<h[l];for(d=0;d<e;++d)s._parsed[d+t]=u=f[d],c&&(g()&&(c=!1),h=u);s._sorted=c}r&&gs(this,f)}parsePrimitiveData(t,e,s,o){let{iScale:a,vScale:r}=t,l=a.axis,c=r.axis,h=a.getLabels(),d=a===r,u=new Array(o),f,g,p;for(f=0,g=o;f<g;++f)p=f+s,u[f]={[l]:d||a.parse(h[p],p),[c]:r.parse(e[p],p)};return u}parseArrayData(t,e,s,o){let{xScale:a,yScale:r}=t,l=new Array(o),c,h,d,u;for(c=0,h=o;c<h;++c)d=c+s,u=e[d],l[c]={x:a.parse(u[0],d),y:r.parse(u[1],d)};return l}parseObjectData(t,e,s,o){let{xScale:a,yScale:r}=t,{xAxisKey:l=`x`,yAxisKey:c=`y`}=this._parsing,h=new Array(o),d,u,f,g;for(d=0,u=o;d<u;++d)f=d+s,g=e[f],h[d]={x:a.parse(un$1(g,l),f),y:r.parse(un$1(g,c),f)};return h}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,s){let o=this.chart,a=this._cachedMeta,r=e[t.axis];return us({keys:dn(o,!0),values:e._stacks[t.axis]._visualValues},r,a.index,{mode:s})}updateRangeFromParsed(t,e,s,o){let a=s[e.axis],r=a===null?NaN:a,l=o&&s._stacks[e.axis];o&&l&&(o.values=l,r=us(o,a,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,e){let s=this._cachedMeta,o=s._parsed,a=s._sorted&&t===s.iScale,r=o.length,l=this._getOtherScale(t),c=Hn(e,s,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:u}=Bn(l),f,g;function p(){g=o[f];let m=g[l.axis];return!ln$1(g[t.axis])||d>m||u<m}for(f=0;f<r&&!(!p()&&(this.updateRangeFromParsed(h,t,g,c),a));++f);if(a){for(f=r-1;f>=0;--f)if(!p()){this.updateRangeFromParsed(h,t,g,c);break}}return h}getAllParsedValues(t){let e=this._cachedMeta._parsed,s=[],o,a,r;for(o=0,a=e.length;o<a;++o)r=e[o][t.axis],ln$1(r)&&s.push(r);return s}getMaxOverflow(){return!1}getLabelAndValue(t){let e=this._cachedMeta,s=e.iScale,o=e.vScale,a=this.getParsed(t);return{label:s?``+s.getLabelForValue(a[s.axis]):``,value:o?``+o.getLabelForValue(a[o.axis]):``}}_update(t){let e=this._cachedMeta;this.update(t||`default`),e._clip=In(se$1(this.options.clip,Rn(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){let t=this._ctx,e=this.chart,s=this._cachedMeta,o=s.data||[],a=e.chartArea,r=[],l=this._drawStart||0,c=this._drawCount||o.length-l,h=this.options.drawActiveElementsOnTop,d;for(s.dataset&&s.dataset.draw(t,a,l,c),d=l;d<l+c;++d){let u=o[d];u.hidden||(u.active&&h?r.push(u):u.draw(t,a))}for(d=0;d<r.length;++d)r[d].draw(t,a)}getStyle(t,e){let s=e?`active`:`default`;return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,e,s){let o=this.getDataset(),a;if(t>=0&&t<this._cachedMeta.data.length){let r=this._cachedMeta.data[t];a=r.$context||(r.$context=Wn(this.getContext(),t,r)),a.parsed=this.getParsed(t),a.raw=o.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=Nn(this.chart.getContext(),this.index)),a.dataset=o,a.index=a.datasetIndex=this.index;return a.active=!!e,a.mode=s,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e=`default`,s){let o=e===`active`,a=this._cachedDataOpts,r=t+`-`+e,l=a[r],c=this.enableOptionSharing&&ma$1(s);if(l)return ps(l,c);let h=this.chart.config,d=h.datasetElementScopeKeys(this._type,t),u=o?[`${t}Hover`,`hover`,t,``]:[t,``],f=h.getOptionScopes(this.getDataset(),d),g=Object.keys(Ga$1.elements[t]),p=()=>this.getContext(s,o,e),m=h.resolveNamedOptions(f,g,p,u);return m.$shared&&(m.$shared=c,a[r]=Object.freeze(ps(m,c))),m}_resolveAnimations(t,e,s){let o=this.chart,a=this._cachedDataOpts,r=`animation-${e}`,l=a[r];if(l)return l;let c;if(o.options.animation!==!1){let d=this.chart.config,u=d.datasetAnimationScopeKeys(this._type,e),f=d.getOptionScopes(this.getDataset(),u);c=d.createResolver(f,this.getContext(t,s,e))}let h=new Me(o,c&&c.animations);return c&&c._cacheable&&(a[r]=Object.freeze(h)),h}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ni(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let s=this.resolveDataElementOptions(t,e),o=this._sharedOptions,a=this.getSharedOptions(s),r=this.includeOptions(e,a)||a!==o;return this.updateSharedOptions(a,e,s),{sharedOptions:a,includeOptions:r}}updateElement(t,e,s,o){ni(o)?Object.assign(t,s):this._resolveAnimations(e,o).update(t,s)}updateSharedOptions(t,e,s){t&&!ni(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,o){t.active=o;let a=this.getStyle(e,o);
vendor: 4,523 bytes, line 1
1this._resolveAnimations(e,s,o).update(t,{options:!o&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,s){this._setStyle(t,s,`active`,!1)}setHoverStyle(t,e,s){this._setStyle(t,s,`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,s=this._cachedMeta.data;for(let[l,c,h]of this._syncList)this[l](c,h);this._syncList=[];let o=s.length,a=e.length,r=Math.min(a,o);r&&this.parse(0,r),a>o?this._insertElements(o,a-o,t):a<o&&this._removeElements(a,o-a)}_insertElements(t,e,s=!0){let o=this._cachedMeta,a=o.data,r=t+e,l,c=h=>{for(h.length+=e,l=h.length-1;l>=r;l--)h[l]=h[l-e]};for(c(a),l=t;l<r;++l)a[l]=new this.dataElementType;this._parsing&&c(o._parsed),this.parse(t,e),s&&this.updateElements(a,t,e,`reset`)}updateElements(t,e,s,o){}_removeElements(t,e){let s=this._cachedMeta;if(this._parsing){let o=s._parsed.splice(t,e);s._stacked&&Kt(s,o)}s.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{let[e,s,o]=t;this[e](s,o)}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 s=arguments.length-2;s&&this._sync([`_insertElements`,t,s])}_onDataUnshift(){this._sync([`_insertElements`,0,arguments.length])}}return n})();function jn(n,i){if(!n._cache.$bar){let t=n.getMatchingVisibleMetas(i),e=[];for(let s=0,o=t.length;s<o;s++)e=e.concat(t[s].controller.getAllParsedValues(n));n._cache.$bar=Na$1(e.sort((s,o)=>s-o))}return n._cache.$bar}function $n(n){let i=n.iScale,t=jn(i,n.type),e=i._length,s,o,a,r,l=()=>{a===32767||a===-32768||(ma$1(r)&&(e=Math.min(e,Math.abs(a-r)||e)),r=a)};for(s=0,o=t.length;s<o;++s)a=i.getPixelForValue(t[s]),l();for(r=void 0,s=0,o=i.ticks.length;s<o;++s)a=i.getPixelForTick(s),l();return e}function Yn(n,i,t,e){let s=t.barThickness,o,a;return Je(s)?(o=i.min*t.categoryPercentage,a=t.barPercentage):(o=s*e,a=1),{chunk:o/e,ratio:a,start:i.pixels[n]-o/2}}function Un(n,i,t,e){let s=i.pixels,o=s[n],a=n>0?s[n-1]:null,r=n<s.length-1?s[n+1]:null,l=t.categoryPercentage;a===null&&(a=o-(r===null?i.end-i.start:r-o)),r===null&&(r=o+o-a);let c=o-(o-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/e,ratio:t.barPercentage,start:c}}function Xn(n,i,t,e){let s=t.parse(n[0],e),o=t.parse(n[1],e),a=Math.min(s,o),r=Math.max(s,o),l=a,c=r;Math.abs(a)>Math.abs(r)&&(l=r,c=a),i[t.axis]=c,i._custom={barStart:l,barEnd:c,start:s,end:o,min:a,max:r}}function un(n,i,t,e){return he(n)?Xn(n,i,t,e):i[t.axis]=t.parse(n,e),i}function ms(n,i,t,e){let s=n.iScale,o=n.vScale,a=s.getLabels(),r=s===o,l=[],c,h,d,u;for(c=t,h=t+e;c<h;++c)u=i[c],d={},d[s.axis]=r||s.parse(a[c],c),l.push(un(u,d,o,c));return l}function oi(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function Kn(n,i,t){return n!==0?dt(n):(i.isHorizontal()?1:-1)*(i.min>=t?1:-1)}function Gn(n){let i,t,e,s,o;return n.horizontal?(i=n.base>n.x,t=`left`,e=`right`):(i=n.base<n.y,t=`bottom`,e=`top`),i?(s=`end`,o=`start`):(s=`start`,o=`end`),{start:t,end:e,reverse:i,top:s,bottom:o}}function qn(n,i,t,e){let s=i.borderSkipped,o={};if(!s){n.borderSkipped=o;return}if(s===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:a,end:r,reverse:l,top:c,bottom:h}=Gn(n);s===`middle`&&t&&(n.enableBorderRadius=!0,(t._top||0)===e?s=c:(t._bottom||0)===e?s=h:(o[bs(h,a,r,l)]=!0,s=c)),o[bs(s,a,r,l)]=!0,n.borderSkipped=o}function bs(n,i,t,e){return e?(n=Jn(n,i,t),n=xs(n,t,i)):n=xs(n,i,t),n}function Jn(n,i,t){return n===i?t:n===t?i:n}function xs(n,i,t){return n===`start`?i:n===`end`?t:n}function Zn(n,{inflateAmount:i},t){n.inflateAmount=i===`auto`?t===1?.33:0:i}var Qn=(()=>{class n extends xt{static id=`bar`;static defaults={datasetElementType:!1,dataElementType:`bar`,categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:`number`,properties:[`x`,`y`,`base`,`width`,`height`]}}};static overrides={scales:{_index_:{type:`category`,offset:!0,grid:{offset:!0}},_value_:{type:`linear`,beginAtZero:!0}}};parsePrimitiveData(t,e,s,o){return ms(t,e,s,o)}parseArrayData(t,e,s,o){return ms(t,e,s,o)}parseObjectData(t,e,s,o){let{iScale:a,vScale:r}=t,{xAxisKey:l=`x`,yAxisKey:c=`y`}=this._parsing,h=a.axis===`x`?l:c,d=r.axis===`x`?l:c,u=[],f,g,p,m;
1for(f=s,g=s+o;f<g;++f)m=e[f],p={},p[a.axis]=a.parse(un$1(m,h),f),u.push(un(un$1(m,d),p,r,f));return u}updateRangeFromParsed(t,e,s,o){super.updateRangeFromParsed(t,e,s,o);let a=s._custom;a&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){let{iScale:s,vScale:o}=this._cachedMeta,a=this.getParsed(t),r=a._custom,l=oi(r)?`[`+r.start+`, `+r.end+`]`:``+o.getLabelForValue(a[o.axis]);return{label:``+s.getLabelForValue(a[s.axis]),value:l}}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,s,o){let a=o===`reset`,{index:r,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),h=l.isHorizontal(),d=this._getRuler(),{sharedOptions:u,includeOptions:f}=this._getSharedOptions(e,o);for(let g=e;g<e+s;g++){let p=this.getParsed(g),m=a||Je(p[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(g),x=this._calculateBarIndexPixels(g,d),b=(p._stacks||{})[l.axis],y={horizontal:h,base:m.base,enableBorderRadius:!b||oi(p._custom)||r===b._top||r===b._bottom,x:h?m.head:x.center,y:h?x.center:m.head,height:h?x.size:Math.abs(m.size),width:h?Math.abs(m.size):x.size};f&&(y.options=u||this.resolveDataElementOptions(g,t[g].active?`active`:o));let M=y.options||t[g].options;qn(y,M,b,r),Zn(y,M,d.ratio),this.updateElement(t[g],g,y,o)}}_getStacks(t,e){let{iScale:s}=this._cachedMeta,o=s.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),a=s.options.stacked,r=[],l=this._cachedMeta.controller.getParsed(e),c=l&&l[s.axis],h=d=>{let u=d._parsed.find(g=>g[s.axis]===c),f=u&&u[d.vScale.axis];if(Je(f)||isNaN(f))return!0};for(let d of o)if(!(e!==void 0&&h(d))&&((a===!1||r.indexOf(d.stack)===-1||a===void 0&&d.stack===void 0)&&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}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(s=>t[s].axis===e).shift()}_getAxis(){let t={},e=this.getFirstScaleIdForIndexAxis();for(let s of this.chart.data.datasets)t[se$1(this.chart.options.indexAxis===`x`?s.xAxisID:s.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,s){let o=this._getStacks(t,s),a=e!==void 0?o.indexOf(e):-1;return a===-1?o.length-1:a}_getRuler(){let t=this.options,e=this._cachedMeta,s=e.iScale,o=[],a,r;for(a=0,r=e.data.length;a<r;++a)o.push(s.getPixelForValue(this.getParsed(a)[s.axis],a));let l=t.barThickness;return{min:l||$n(e),pixels:o,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:t.grouped,ratio:l?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){let{_cachedMeta:{vScale:e,_stacked:s,index:o},options:{base:a,minBarLength:r}}=this,l=a||0,c=this.getParsed(t),h=c._custom,d=oi(h),u=c[e.axis],f=0,g=s?this.applyStack(e,c,s):u,p,m;g!==u&&(f=g-u,g=u),d&&(u=h.barStart,g=h.barEnd-h.barStart,u!==0&&dt(u)!==dt(h.barEnd)&&(f=0),f+=u);let x=!Je(a)&&!d?a:f,b=e.getPixelForValue(x);if(this.chart.getDataVisibility(t)?p=e.getPixelForValue(f+g):p=b,m=p-b,Math.abs(m)<r){m=Kn(m,e,l)*r,u===l&&(b-=m/2);let y=e.getPixelForDecimal(0),M=e.getPixelForDecimal(1);b=Math.max(Math.min(b,Math.max(y,M)),Math.min(y,M)),p=b+m,s&&!d&&(c._stacks[e.axis]._visualValues[o]=e.getValueForPixel(p)-e.getValueForPixel(b))}if(b===e.getPixelForValue(l)){let y=dt(m)*e.getLineWidthForValue(l)/2;b+=y,m-=y}return{size:m,base:b,head:p,center:p+m/2}}_calculateBarIndexPixels(t,e){let s=e.scale,o=this.options,a=o.skipNull,r=se$1(o.maxBarThickness,Infinity),l,c,h=this._getAxisCount();if(e.grouped){let d=a?this._getStackCount(t):e.stackCount,u=o.barThickness===`flex`?Un(t,e,o,d*h):Yn(t,e,o,d*h),f=this.chart.options.indexAxis===`x`?this.getDataset().xAxisID:this.getDataset().yAxisID,g=this._getAxis().indexOf(se$1(f,this.getFirstScaleIdForIndexAxis())),p=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0)+g;l=u.start+u.chunk*p+u.chunk/2,c=Math.min(r,u.chunk*u.ratio)}else l=s.getPixelForValue(this.getParsed(t)[s.axis],t),c=Math.min(r,e.min*e.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){let t=this._cachedMeta,e=t.vScale,s=t.data,o=s.length,a=0;for(;a<o;++a)this.getParsed(a)[e.axis]!==null&&!s[a].hidden&&s[a].draw(this._ctx)}}return n})();var to=(()=>{class n extends xt{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,s,o){let a=super.parsePrimitiveData(t,e,s,o);for(let r=0;r<a.length;r++)a[r]._custom=this.resolveDataElementOptions(r+s).radius;return a}parseArrayData(t,e,s,o){let a=super.parseArrayData(t,e,s,o);for(let r=0;r<a.length;r++){let l=e[s+r];a[r]._custom=se$1(l[2],this.resolveDataElementOptions(r+s).radius)}return a}parseObjectData(t,e,s,o){let a=super.parseObjectData(t,e,s,o);for(let r=0;r<a.length;r++){let l=e[s+r];a[r]._custom=se$1(l&&l.r&&+l.r,this.resolveDataElementOptions(r+s).radius)}return a}getMaxOverflow(){let t=this._cachedMeta.data,e=0;for(let s=t.length-1;s>=0;--s)e=Math.max(e,t[s].size(this.resolveDataElementOptions(s))/2);return e>0&&e}getLabelAndValue(t){let e=this._cachedMeta,s=this.chart.data.labels||[],{xScale:o,yScale:a}=e,r=this.getParsed(t),l=o.getLabelForValue(r.x),c=a.getLabelForValue(r.y),h=r._custom;return{label:s[t]||``,value:`(`+l+`, `+c+(h?`, `+h:``)+`)`}}update(t){let e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,s,o){let a=o===`reset`,{iScale:r,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:h}=this._getSharedOptions(e,o),d=r.axis,u=l.axis;for(let f=e;f<e+s;f++){let g=t[f],p=!a&&this.getParsed(f),m={},x=m[d]=a?r.getPixelForDecimal(.5):r.getPixelForValue(p[d]),b=m[u]=a?l.getBasePixel():l.getPixelForValue(p[u]);m.skip=isNaN(x)||isNaN(b),h&&(m.options=c||this.resolveDataElementOptions(f,g.active?`active`:o),a&&(m.options.radius=0)),this.updateElement(g,f,m,o)}}resolveDataElementOptions(t,e){let s=this.getParsed(t),o=super.resolveDataElementOptions(t,e);o.$shared&&(o=Object.assign({},o,{$shared:!1}));let a=o.radius;return e!==`active`&&(o.radius=0),o.radius+=se$1(s&&s._custom,a),o}}return n})();function eo(n,i,t){let e=1,s=1,o=0,a=0;if(i<de){let r=n,l=r+i,c=Math.cos(r),h=Math.sin(r),d=Math.cos(l),u=Math.sin(l),f=(y,M,_)=>Ks$1(y,r,l,!0)?1:Math.max(M,M*t,_,_*t),g=(y,M,_)=>Ks$1(y,r,l,!0)?-1:Math.min(M,M*t,_,_*t),p=f(0,c,d),m=f(ye$1,h,u),x=g(V,c,d),b=g(V+ye$1,h,u);e=(p-x)/2,s=(m-b)/2,o=-(p+x)/2,a=-(m+b)/2}return{ratioX:e,ratioY:s,offsetX:o,offsetY:a}}var ee=class extends xt{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`]}}
vendor: 5,337 bytes, line 1
1,cutout:`50%`,rotation:0,circumference:360,radius:`100%`,spacing:0,indexAxis:`r`};static descriptors={_scriptable:i=>i!==`spacing`,_indexable:i=>i!==`spacing`&&!i.startsWith(`borderDash`)&&!i.startsWith(`hoverBorderDash`)};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(i){let t=i.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:e,color:s}}=i.legend.options;return t.labels.map((o,a)=>{let l=i.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:e,hidden:!i.getDataVisibility(a),index:a}})}return[]}},onClick(i,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}}}};constructor(i,t){super(i,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(i,t){let e=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=e;else{let o=l=>+e[l];if(Q(e[i])){let{key:l=`value`}=this._parsing;o=c=>+un$1(e[c],l)}let a,r;for(a=i,r=i+t;a<r;++a)s._parsed[a]=o(a)}}_getRotation(){return Ca$1(this.options.rotation-90)}_getCircumference(){return Ca$1(this.options.circumference)}_getRotationExtents(){let i=de,t=-de;for(let e=0;e<this.chart.data.datasets.length;++e)if(this.chart.isDatasetVisible(e)&&this.chart.getDatasetMeta(e).type===this._type){let s=this.chart.getDatasetMeta(e).controller,o=s._getRotation(),a=s._getCircumference();i=Math.min(i,o),t=Math.max(t,o+a)}return{rotation:i,circumference:t-i}}update(i){let{chartArea:e}=this.chart,s=this._cachedMeta,o=s.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,r=Math.max((Math.min(e.width,e.height)-a)/2,0),l=Math.min(ha$1(this.options.cutout,r),1),c=this._getRingWeight(this.index),{circumference:h,rotation:d}=this._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:g,offsetY:p}=eo(d,h,l),m=(e.width-a)/u,x=(e.height-a)/f,b=Math.max(Math.min(m,x)/2,0),y=Us$1(this.options.radius,b),_=(y-Math.max(y*l,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*y,this.offsetY=p*y,s.total=this.calculateTotal(),this.outerRadius=y-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*c,0),this.updateElements(o,0,o.length,i)}_circumference(i,t){let e=this.options,s=this._cachedMeta,o=this._getCircumference();return t&&e.animation.animateRotate||!this.chart.getDataVisibility(i)||s._parsed[i]===null||s.data[i].hidden?0:this.calculateCircumference(s._parsed[i]*o/de)}updateElements(i,t,e,s){let o=s===`reset`,a=this.chart,r=a.chartArea,c=a.options.animation,h=(r.left+r.right)/2,d=(r.top+r.bottom)/2,u=o&&c.animateScale,f=u?0:this.innerRadius,g=u?0:this.outerRadius,{sharedOptions:p,includeOptions:m}=this._getSharedOptions(t,s),x=this._getRotation(),b;for(b=0;b<t;++b)x+=this._circumference(b,o);for(b=t;b<t+e;++b){let y=this._circumference(b,o),M=i[b],_={x:h+this.offsetX,y:d+this.offsetY,startAngle:x,endAngle:x+y,circumference:y,outerRadius:g,innerRadius:f};m&&(_.options=p||this.resolveDataElementOptions(b,M.active?`active`:s)),x+=y,this.updateElement(M,b,_,s)}}calculateTotal(){let i=this._cachedMeta,t=i.data,e=0,s;for(s=0;s<t.length;s++){let o=i._parsed[s];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(s)&&!t[s].hidden&&(e+=Math.abs(o))}return e}calculateCircumference(i){let t=this._cachedMeta.total;return t>0&&!isNaN(i)?de*(Math.abs(i)/t):0}getLabelAndValue(i){let t=this._cachedMeta,e=this.chart,s=e.data.labels||[],o=Qs$1(t._parsed[i],e.options.locale);return{label:s[i]||``,value:o}}getMaxBorderWidth(i){let t=0,e=this.chart,s,o,a,r,l;if(!i){for(s=0,o=e.data.datasets.length;s<o;++s)if(e.isDatasetVisible(s)){a=e.getDatasetMeta(s),i=a.data,r=a.controller;break}}if(!i)return 0;for(s=0,o=i.length;s<o;++s)l=r.resolveDataElementOptions(s),l.borderAlign!==`inner`&&(t=Math.max(t,l.borderWidth||0,l.hoverBorderWidth||0));return t}getMaxOffset(i){let t=0;for(let e=0,s=i.length;e<s;++e){let o=this.resolveDataElementOptions(e);t=Math.max(t,o.offset||0,o.hoverOffset||0)}return t}_getRingWeightOffset(i){let t=0;for(let e=0;e<i;++e)this.chart.isDatasetVisible(e)&&(t+=this._getRingWeight(e));return t}_getRingWeight(i){return Math.max(se$1(this.chart.data.datasets[i].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}};var io=(()=>{class n extends xt{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:s,data:o=[],_dataset:a}=e,r=this.chart._animationsDisabled,{start:l,count:c}=Fa$1(e,o,r);this._drawStart=l,this._drawCount=c,Ua$1(e)&&(l=0,c=o.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!a._decimated,s.points=o;let h=this.resolveDatasetElementOptions(t);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(s,void 0,{animated:!r,options:h},t),this.updateElements(o,l,c,t)}updateElements(t,e,s,o){let a=o===`reset`,{iScale:r,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,{sharedOptions:d,includeOptions:u}=this._getSharedOptions(e,o),f=r.axis,g=l.axis,{spanGaps:p,segment:m}
1=this.options,x=ya$1(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||a||o===`none`,y=e+s,M=t.length,_=e>0&&this.getParsed(e-1);for(let v=0;v<M;++v){let S=t[v],k=b?S:{};if(v<e||v>=y){k.skip=!0;continue}let w=this.getParsed(v),P=Je(w[g]),D=k[f]=r.getPixelForValue(w[f],v),A=k[g]=a||P?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,w,c):w[g],v);k.skip=isNaN(D)||isNaN(A)||P,k.stop=v>0&&Math.abs(w[f]-_[f])>x,m&&(k.parsed=w,k.raw=h.data[v]),u&&(k.options=d||this.resolveDataElementOptions(v,S.active?`active`:o)),b||this.updateElement(S,v,k,o),_=w}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,o=t.data||[];if(!o.length)return s;let a=o[0].size(this.resolveDataElementOptions(0)),r=o[o.length-1].size(this.resolveDataElementOptions(o.length-1));return Math.max(s,a,r)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}return n})();var ke=class extends xt{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(i){let t=i.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:e,color:s}}=i.legend.options;return t.labels.map((o,a)=>{let l=i.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:e,hidden:!i.getDataVisibility(a),index:a}})}return[]}},onClick(i,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}}},scales:{r:{type:`radialLinear`,angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(i,t){super(i,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(i){let t=this._cachedMeta,e=this.chart,s=e.data.labels||[],o=Qs$1(t._parsed[i].r,e.options.locale);return{label:s[i]||``,value:o}}parseObjectData(i,t,e,s){return xc.bind(this)(i,t,e,s)}update(i){let t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,i)}getMinMax(){let i=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return i.data.forEach((e,s)=>{let o=this.getParsed(s).r;!isNaN(o)&&this.chart.getDataVisibility(s)&&(o<t.min&&(t.min=o),o>t.max&&(t.max=o))}),t}_updateRadius(){let i=this.chart,t=i.chartArea,e=i.options,s=Math.min(t.right-t.left,t.bottom-t.top),o=Math.max(s/2,0),r=(o-Math.max(e.cutoutPercentage?o/100*e.cutoutPercentage:1,0))/i.getVisibleDatasetCount();this.outerRadius=o-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(i,t,e,s){let o=s===`reset`,a=this.chart,l=a.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*V,f=u,g,p=360/this.countVisibleElements();for(g=0;g<t;++g)f+=this._computeAngle(g,s,p);for(g=t;g<t+e;g++){let m=i[g],x=f,b=f+this._computeAngle(g,s,p),y=a.getDataVisibility(g)?c.getDistanceFromCenterForValue(this.getParsed(g).r):0;f=b,o&&(l.animateScale&&(y=0),l.animateRotate&&(x=b=u));let M={x:h,y:d,innerRadius:0,outerRadius:y,startAngle:x,endAngle:b,options:this.resolveDataElementOptions(g,m.active?`active`:s)};this.updateElement(m,g,M,s)}}countVisibleElements(){let i=this._cachedMeta,t=0;return i.data.forEach((e,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(i,t,e){return this.chart.getDataVisibility(i)?Ca$1(this.resolveDataElementOptions(i,t).angle||e):0}};var ao=Object.freeze({__proto__:null,BarController:Qn,BubbleController:to,DoughnutController:ee,LineController:io,PieController:(()=>{class n extends ee{static id=`pie`;static defaults={cutout:0,rotation:0,circumference:360,radius:`100%`}}return n})(),PolarAreaController:ke,RadarController:(()=>{class n extends xt{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,s=this.getParsed(t);return{label:e.getLabels()[t],value:``+e.getLabelForValue(s[e.axis])}}parseObjectData(t,e,s,o){return xc.bind(this)(t,e,s,o)}update(t){let e=this._cachedMeta,s=e.dataset,o=e.data||[],a=e.iScale.getLabels();if(s.points=o,t!==`resize`){let r=this.resolveDatasetElementOptions(t);this.options.showLine||(r.borderWidth=0);let l={_loop:!0,_fullLoop:a.length===o.length,options:r};this.updateElement(s,void 0,l,t)}this.updateElements(o,0,o.length,t)}updateElements(t,e,s,o){let a=this._cachedMeta.rScale,r=o===`reset`;for(let l=e;l<e+s;l++){let c=t[l],h=this.resolveDataElementOptions(l,c.active?`active`:o),d=a.getPointPositionForValue(l,this.getParsed(l).r),u=r?a.xCenter:d.x,f=r?a.yCenter:d.y,g={x:u,y:f,angle:d.angle,skip:isNaN(u)||isNaN(f),options:h};this.updateElement(c,l,g,o)}}}return n})(),ScatterController:(()=>{class n extends xt{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,s=this.chart.data.labels||[],{xScale:o,yScale:a}=e,r=this.getParsed(t),l=o.getLabelForValue(r.x),c=a.getLabelForValue(r.y);return{label:s[t]||``,value:`(`+l+`, `+c+`)`}}update(t){let e=this._cachedMeta,{data:s=[]}=e,o=this.chart._animationsDisabled,{start:a,count:r}=Fa$1(e,s,o);if(this._drawStart=a,this._drawCount=r,Ua$1(e)&&(a=0,r=s.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:l,_dataset:c}=e;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!c._decimated,l.points=s;let h=this.resolveDatasetElementOptions(t);h.segment=this.options.segment,this.updateElement(l,void 0,{animated:!o,options:h},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(s,a,r,t)}addElements(){let{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement(`line`)),super.addElements()}updateElements(t,e,s,o){let a=o===`reset`,{iScale:r,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,d=this.resolveDataElementOptions(e,o),u=this.getSharedOptions(d),f=this.includeOptions(o,u),g=r.axis,p=l.axis,{spanGaps:m,segment:x}=this.options,b=ya$1(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||a||o===`none`,M=e>0&&this.getParsed(e-1);for(let _=e;_<e+s;++_){let v=t[_],S=this.getParsed(_),k=y?v:{},w=Je(S[p]),P=k[g]=r.getPixelForValue(S[g],_),D=k[p]=a||w?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,S,c):S[p],_);k.skip=isNaN(P)||isNaN(D)||w,k.stop=_>0&&Math.abs(S[g]-M[g])>b,x&&(k.parsed=S,k.raw=h.data[_]),f&&(k.options=u||this.resolveDataElementOptions(_,v.active?`active`:o)),y||this.updateElement(v,_,k,o),M=S}this.updateSharedOptions(u,o,d)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let l=0;for(let c=e.length-1;c>=0;--c)l=Math.max(l,e[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l}let s=t.dataset,o=s.options&&s.options.borderWidth||0;if(!e.length)return o;let a=e[0].size(this.resolveDataElementOptions(0)),r=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(o,a,r)/2}}return n})()});function wt(){throw new Error(`This method is not implemented: Check that a complete date adapter is provided.`)}var ro={_date:class n{static override(i){Object.assign(n.prototype,i
vendor: 36,470 bytes, line 1
1)}options;constructor(i){this.options=i||{}}init(){}formats(){return wt()}parse(){return wt()}format(){return wt()}add(){return wt()}diff(){return wt()}startOf(){return wt()}endOf(){return wt()}}};function lo(n,i,t,e){let{controller:s,data:o,_sorted:a}=n,r=s._cachedMeta.iScale,l=n.dataset&&n.dataset.options?n.dataset.options.spanGaps:null;if(r&&i===r.axis&&i!==`r`&&a&&o.length){let c=r._reversePixels?xa$1:Et;if(e){if(s._sharedOptions){let h=o[0],d=typeof h.getRange==`function`&&h.getRange(i);if(d){let u=c(o,i,t-d),f=c(o,i,t+d);return{lo:u.lo,hi:f.hi}}}}else{let h=c(o,i,t);if(l){let{vScale:d}=s._cachedMeta,{_parsed:u}=n,f=u.slice(0,h.lo+1).reverse().findIndex(p=>!Je(p[d.axis]));h.lo-=Math.max(0,f);let g=u.slice(h.hi).findIndex(p=>!Je(p[d.axis]));h.hi+=Math.max(0,g)}return h}}return{lo:0,hi:o.length-1}}function oe(n,i,t,e,s){let o=n.getSortedVisibleDatasetMetas(),a=t[i];for(let r=0,l=o.length;r<l;++r){let{index:c,data:h}=o[r],{lo:d,hi:u}=lo(o[r],i,a,s);for(let f=d;f<=u;++f){let g=h[f];g.skip||e(g,c,f)}}}function co(n){let i=n.indexOf(`x`)!==-1,t=n.indexOf(`y`)!==-1;return function(e,s){let o=i?Math.abs(e.x-s.x):0,a=t?Math.abs(e.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function ai(n,i,t,e,s){let o=[];return!s&&!n.isPointInArea(i)||oe(n,t,i,function(r,l,c){!s&&!Rt(r,n.chartArea,0)||r.inRange(i.x,i.y,e)&&o.push({element:r,datasetIndex:l,index:c})},!0),o}function ho(n,i,t,e){let s=[];function o(a,r,l){let{startAngle:c,endAngle:h}=a.getProps([`startAngle`,`endAngle`],e),{angle:d}=Da$1(a,{x:i.x,y:i.y});Ks$1(d,c,h)&&s.push({element:a,datasetIndex:r,index:l})}return oe(n,t,i,o),s}function uo(n,i,t,e,s,o){let a=[],r=co(t),l=Number.POSITIVE_INFINITY;function c(h,d,u){let f=h.inRange(i.x,i.y,s);if(e&&!f)return;let g=h.getCenterPoint(s);if(!(!!o||n.isPointInArea(g))&&!f)return;let m=r(i,g);m<l?(a=[{element:h,datasetIndex:d,index:u}],l=m):m===l&&a.push({element:h,datasetIndex:d,index:u})}return oe(n,t,i,c),a}function ri(n,i,t,e,s,o){return!o&&!n.isPointInArea(i)?[]:t===`r`&&!e?ho(n,i,t,s):uo(n,i,t,e,s,o)}function _s(n,i,t,e,s){let o=[],a=t===`x`?`inXRange`:`inYRange`,r=!1;return oe(n,t,i,(l,c,h)=>{l[a]&&l[a](i[t],s)&&(o.push({element:l,datasetIndex:c,index:h}),r=r||l.inRange(i.x,i.y,s))}),e&&!r?[]:o}var fo={evaluateInteractionItems:oe,modes:{index(n,i,t,e){let s=Ut(i,n),o=t.axis||`x`,a=t.includeInvisible||!1,r=t.intersect?ai(n,s,o,e,a):ri(n,s,o,!1,e,a),l=[];return r.length?(n.getSortedVisibleDatasetMetas().forEach(c=>{let h=r[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(n,i,t,e){let s=Ut(i,n),o=t.axis||`xy`,a=t.includeInvisible||!1,r=t.intersect?ai(n,s,o,e,a):ri(n,s,o,!1,e,a);if(r.length>0){let l=r[0].datasetIndex,c=n.getDatasetMeta(l).data;r=[];for(let h=0;h<c.length;++h)r.push({element:c[h],datasetIndex:l,index:h})}return r},point(n,i,t,e){return ai(n,Ut(i,n),t.axis||`xy`,e,t.includeInvisible||!1)},nearest(n,i,t,e){let s=Ut(i,n),o=t.axis||`xy`,a=t.includeInvisible||!1;return ri(n,s,o,t.intersect,e,a)},x(n,i,t,e){return _s(n,Ut(i,n),`x`,t.intersect,e)},y(n,i,t,e){return _s(n,Ut(i,n),`y`,t.intersect,e)}}};var fn=[`left`,`top`,`right`,`bottom`];function Gt(n,i){return n.filter(t=>t.pos===i)}function ys(n,i){return n.filter(t=>fn.indexOf(t.pos)===-1&&t.box.axis===i)}function qt(n,i){return n.sort((t,e)=>{let s=i?e:t,o=i?t:e;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function go(n){let i=[],t,e,s,o,a,r;for(t=0,e=(n||[]).length;t<e;++t)s=n[t],{position:o,options:{stack:a,stackWeight:r=1}}=s,i.push({index:t,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:a&&o+a,stackWeight:r});return i}function po(n){let i={};for(let t of n){let{stack:e,pos:s,stackWeight:o}=t;if(!e||!fn.includes(s))continue;let a=i[e]||(i[e]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return i}function mo(n,i){let t=po(n),{vBoxMaxWidth:e,hBoxMaxHeight:s}=i,o,a,r;for(o=0,a=n.length;o<a;++o){r=n[o];let{fullSize:l}=r.box,c=t[r.stack],h=c&&r.stackWeight/c.weight;r.horizontal?(r.width=h?h*e:l&&i.availableWidth,r.height=s):(r.width=e,r.height=h?h*s:l&&i.availableHeight)}return t}function bo(n){let i=go(n),t=qt(i.filter(c=>c.box.fullSize),!0),e=qt(Gt(i,`left`),!0),s=qt(Gt(i,`right`)),o=qt(Gt(i,`top`),!0),a=qt(Gt(i,`bottom`)),r=ys(i,`x`),l=ys(i,`y`);return{fullSize:t,leftAndTop:e.concat(o),rightAndBottom:s.concat(l).concat(a).concat(r),chartArea:Gt(i,`chartArea`),vertical:e.concat(s).concat(l),horizontal:o.concat(a).concat(r)}}function vs(n,i,t,e){return Math.max(n[t],i[t])+Math.max(n[e],i[e])}function gn(n,i){n.top=Math.max(n.top,i.top),n.left=Math.max(n.left,i.left),n.bottom=Math.max(n.bottom,i.bottom),n.right=Math.max(n.right,i.right)}function xo(n,i,t,e){let{pos:s,box:o}=t,a=n.maxPadding;if(!Q(s)){t.size&&(n[s]-=t.size);let d=e[t.stack]||{size:0,count:1};d.size=Math.max(d.size,t.horizontal?o.height:o.width),t.size=d.size/d.count,n[s]+=t.size}o.getPadding&&gn(a,o.getPadding());let r=Math.max(0,i.outerWidth-vs(a,n,`left`,`right`)),l=Math.max(0,i.outerHeight-vs(a,n,`top`,`bottom`)),c=r!==n.w,h=l!==n.h;return n.w=r,n.h=l,t.horizontal?{same:c,other:h}:{same:h,other:c}}function _o(n){let i=n.maxPadding;function t(e){let s=Math.max(i[e]-n[e],0);return n[e]+=s,s}n.y+=t(`top`),n.x+=t(`left`),t(`right`),t(`bottom`)}function yo(n,i){let t=i.maxPadding;function e(s){let o={left:0,top:0,right:0,bottom:0};return s.forEach(a=>{o[a]=Math.max(i[a],t[a])}),o}return e(n?[`left`,`right`]:[`top`,`bottom`])}function Qt(n,i,t,e){let s=[],o,a,r,l,c,h;for(o=0,a=n.length,c=0;o<a;++o){r=n[o],l=r.box,l.update(r.width||i.w,r.height||i.h,yo(r.horizontal,i));let{same:d,other:u}=xo(i,t,r,e);c|=d&&s.length,h=h||u,l.fullSize||s.push(r)}return c&&Qt(s,i,t,e)||h}function ge(n,i,t,e,s){n.top=t,n.left=i,n.right=i+e,n.bottom=t+s,n.width=e,n.height=s}function Ms(n,i,t,e){let s=t.padding,{x:o,y:a}=i;for(let r of n){let l=r.box,c=e[r.stack]||{count:1,placed:0,weight:1},h=r.stackWeight/c.weight||1;if(r.horizontal){let d=i.w*h,u=c.size||l.height;ma$1(c.start)&&(a=c.start),l.fullSize?ge(l,s.left,a,t.outerWidth-s.right-s.left,u):ge(l,i.left+c.placed,a,d,u),c.start=a,c.placed+=d,a=l.bottom}else{let d=i.h*h,u=c.size||l.width;ma$1(c.start)&&(o=c.start),l.fullSize?ge(l,o,s.top,u,t.outerHeight-s.bottom-s.top):ge(l,o,i.top+c.placed,u,d),c.start=o,c.placed+=d,o=l.right}}i.x=o,i.y=a}var X={addBox(n,i){n.boxes||(n.boxes=[]),i.fullSize=i.fullSize||!1,i.position=i.position||`top`,i.weight=i.weight||0,i._layers=i._layers||function(){return[{z:0,draw(t){i.draw(t)}}]},n.boxes.push(i)},removeBox(n,i){let t=n.boxes?n.boxes.indexOf(i):-1;t!==-1&&n.boxes.splice(t,1)},configure(n,i,t){i.fullSize=t.fullSize,i.position=t.position,i.weight=t.weight},update(n,i,t,e){if(!n)return;let s=gc(n.options.layout.padding),o=Math.max(i-s.width,0),a=Math.max(t-s.height,0),r=bo(n.boxes),l=r.vertical,c=r.horizontal;Te(n.boxes,p=>{typeof p.beforeLayout==`function`&&p.beforeLayout()});let h=l.reduce((p,m)=>m.box.options&&m.box.options.display===!1?p:p+1,0)||1,d=Object.freeze({outerWidth:i,outerHeight:t,padding:s,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},s);gn(u,gc(e));let f=Object.assign({maxPadding:u,w:o,h:a,x:s.left,y:s.top},s),g=mo(l.concat(c),d);Qt(r.fullSize,f,d,g),Qt(l,f,d,g),Qt(c,f,d,g)&&Qt(l,f,d,g),_o(f),Ms(r.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,Ms(r.rightAndBottom,f,d,g),n.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},Te(r.chartArea,p=>{let m=p.box;Object.assign(m,n.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};var Se=class{acquireContext(i,t){}releaseContext(i){return!1}addEventListener(i,t,e){}removeEventListener(i,t,e){}getDevicePixelRatio(){return 1}getMaximumSize(i,t,e,s){return t=Math.max(0,t||i.width),e=e||i.height,{width:t,height:Math.max(0,s?Math.floor(t/s):e)}}isAttached(i){return!0}updateConfig(i){}};var mi=class extends Se{acquireContext(i){return i&&i.getContext&&i.getContext(`2d`)||null}updateConfig(i){i.options.animation=!1}};var ye=`$chartjs`;var vo={touchstart:`mousedown`,touchmove:`mousemove`,touchend:`mouseup`,pointerenter:`mouseenter`,pointerdown:`mousedown`,pointermove:`mousemove`,pointerup:`mouseup`,pointerleave:`mouseout`,pointerout:`mouseout`};var ks=n=>n===null||n===``;function Mo(n,i){let t=n.style,e=n.getAttribute(`height`),s=n.getAttribute(`width`);if(n[ye]={initial:{height:e,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||`block`,t.boxSizing=t.boxSizing||`border-box`,ks(s)){let o=Bc(n,`width`);o!==void 0&&(n.width=o)}if(ks(e))if(n.style.height===``)n.height=n.width/(i||2);else{let o=Bc(n,`height`);o!==void 0&&(n.height=o)}return n}var pn=Wc?{passive:!0}:!1;function ko(n,i,t){n&&n.addEventListener(i,t,pn)}function So(n,i,t){n&&n.canvas&&n.canvas.removeEventListener(i,t,pn)}function wo(n,i){let t=vo[n.type]||n.type,{x:e,y:s}=Ut(n,i);return{type:t,chart:i,native:n,x:e!==void 0?e:null,y:s!==void 0?s:null}}function we(n,i){for(let t of n)if(t===i||t.contains(i))return!0}function Do(n,i,t){let e=n.canvas,s=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||we(r.addedNodes,e),a=a&&!we(r.removedNodes,e);a&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function Po(n,i,t){let e=n.canvas,s=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||we(r.removedNodes,e),a=a&&!we(r.addedNodes,e);a&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}var ie=new Map;var Ss=0;function mn(){let n=window.devicePixelRatio;n!==Ss&&(Ss=n,ie.forEach((i,t)=>{t.currentDevicePixelRatio!==n&&i()}))}function Co(n,i){ie.size||window.addEventListener(`resize`,mn),ie.set(n,i)}function Ao(n){ie.delete(n),ie.size||window.removeEventListener(`resize`,mn)}function Lo(n,i,t){let e=n.canvas,s=e&&dr$1(e);if(!s)return;let o=Oa$1((r,l)=>{let c=s.clientWidth;t(r,l),c<s.clientWidth&&t()},window),a=new ResizeObserver(r=>{let l=r[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return a.observe(s),Co(n,o),a}function li(n,i,t){t&&t.disconnect(),i===`resize`&&Ao(n)}function Oo(n,i,t){let e=n.canvas,s=Oa$1(o=>{n.ctx!==null&&t(wo(o,n))},n);return ko(e,i,s),s}var bi=class extends Se{acquireContext(i,t){let e=i&&i.getContext&&i.getContext(`2d`);return e&&e.canvas===i?(Mo(i,t),e):null}releaseContext(i){let t=i.canvas;if(!t[ye])return!1;let e=t[ye].initial;[`height`,`width`].forEach(o=>{let a=e[o];Je(a)?t.removeAttribute(o):t.setAttribute(o,a)});let s=e.style||{};return Object.keys(s).forEach(o=>{t.style[o]=s[o]}),t.width=t.width,delete t[ye],!0}addEventListener(i,t,e){this.removeEventListener(i,t);let s=i.$proxies||(i.$proxies={});s[t]=({attach:Do,detach:Po,resize:Lo}[t]||Oo)(i,t,e)}removeEventListener(i,t){let e=i.$proxies||(i.$proxies={}),s=e[t];if(!s)return;({attach:li,detach:li,resize:li}[t]||So)(i,t,s),e[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(i,t,e,s){return Fc(i,t,e,s)}isAttached(i){let t=i&&dr$1(i);return!!(t&&t.isConnected)}};function To(n){return!fr$1()||typeof OffscreenCanvas<`u`&&n instanceof OffscreenCanvas?mi:bi}var ht=(()=>{class n{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){let{x:e,y:s}=this.getProps([`x`,`y`],t);return{x:e,y:s}}hasValue(){return ya$1(this.x)&&ya$1(this.y)}getProps(t,e){let s=this.$animations;if(!e||!s)return this;let o={};return t.forEach(a=>{o[a]=s[a]&&s[a].active()?s[a]._to:this[a]}),o}}return n})();function Eo(n,i){let t=n.options.ticks,e=Ro(n),s=Math.min(t.maxTicksLimit||e,e),o=t.major.enabled?zo(i):[],a=o.length,r=o[0],l=o[a-1],c=[];if(a>s)return Fo(i,c,o,a/s),c;let h=Io(o,i,s);if(a>0){let d,u,f=a>1?Math.round((l-r)/(a-1)):null;for(pe(i,c,h,Je(f)?0:r-f,r),d=0,u=a-1;d<u;d++)pe(i,c,h,o[d],o[d+1]);return pe(i,c,h,l,Je(f)?i.length:l+f),c}return pe(i,c,h),c}function Ro(n){let i=n.options.offset,t=n._tickSize(),e=n._length/t+(i?0:1),s=n._maxLength/t;return Math.floor(Math.min(e,s))}function Io(n,i,t){let e=Bo(n),s=i.length/t;if(!e)return Math.max(s,1);let o=ba$1(e);for(let a=0,r=o.length-1;a<r;a++){let l=o[a];if(l>s)return l}return Math.max(s,1)}function zo(n){let i=[],t,e;for(t=0,e=n.length;t<e;t++)n[t].major&&i.push(t);return i}function Fo(n,i,t,e){let s=0,o=t[0],a;for(e=Math.ceil(e),a=0;a<n.length;a++)a===o&&(i.push(n[a]),s++,o=t[s*e])}function pe(n,i,t,e,s){let o=se$1(e,0),a=Math.min(se$1(s,n.length),n.length),r=0,l,c,h;for(t=Math.ceil(t),s&&(l=s-e,t=l/Math.floor(l/t)),h=o;h<0;)r++,h=Math.round(o+r*t);for(c=Math.max(o,0);c<a;c++)c===h&&(i.push(n[c]),r++,h=Math.round(o+r*t))}function Bo(n){let i=n.length,t,e;if(i<2)return!1;for(e=n[0],t=1;t<i;++t)if(n[t]-n[t-1]!==e)return!1;return e}var Vo=n=>n===`left`?`right`:n===`right`?`left`:n;var ws=(n,i,t)=>i===`top`||i===`left`?n[i]+t:n[i]-t;var Ds=(n,i)=>Math.min(i||n,n);function Ps(n,i){let t=[],e=n.length/i,s=n.length,o=0;for(;o<s;o+=e)t.push(n[Math.floor(o)]);return t}function No(n,i,t){let e=n.ticks.length,s=Math.min(i,e-1),o=n._startPixel,a=n._endPixel,r=1e-6,l=n.getPixelForTick(s),c;if(!(t&&(e===1?c=Math.max(l-o,a-l):i===0?c=(n.getPixelForTick(1)-l)/2:c=(l-n.getPixelForTick(s-1))/2,l+=s<i?c:-c,l<o-r||l>a+r)))return l}function Wo(n,i){Te(n,t=>{let e=t.gc,s=e.length/2,o;if(s>i){for(o=0;o<s;++o)delete t.data[e[o]];e.splice(0,s)}})}function Jt(n){return n.drawTicks?n.tickLength:0}function Cs(n,i){if(!n.display)return 0;let t=pc(n.font,i),e=gc(n.padding);return(he(n.text)?n.text.length:1)*t.lineHeight+e.height}function Ho(n,i){return sr$1(n,{scale:i,type:`scale`})}function jo(n,i,t){return sr$1(n,{tick:t,index:i,type:`tick`})}function $o(n,i,t){let e=La$1(n);return(t&&i!==`right`||!t&&i===`right`)&&(e=Vo(e)),e}function Yo(n,i,t,e){let{top:s,left:o,bottom:a,right:r,chart:l}=n,{chartArea:c,scales:h}=l,d=0,u,f,g,p=a-s,m=r-o;if(n.isHorizontal()){if(f=ja$1(e,o,r),Q(t)){let x=Object.keys(t)[0],b=t[x];g=h[x].getPixelForValue(b)+p-i}else t===`center`?g=(c.bottom+c.top)/2+p-i:g=ws(n,t,i);u=r-o}else{if(Q(t)){let x=Object.keys(t)[0],b=t[x];f=h[x].getPixelForValue(b)-m+i}else t===`center`?f=(c.left+c.right)/2-m+i:f=ws(n,t,i);g=ja$1(e,a,s),d=t===`left`?-ye$1:ye$1}return{titleX:f,titleY:g,maxWidth:u,rotation:d}}var Pt=class n extends ht{constructor(i){super(),this.id=i.id,this.type=i.type,this.options=void 0,this.ctx=i.ctx,this.chart=i.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(i){this.options=i.setContext(this.getContext()),this.axis=i.axis,this._userMin=this.parse(i.min),this._userMax=this.parse(i.max),this._suggestedMin=this.parse(i.suggestedMin),this._suggestedMax=this.parse(i.suggestedMax)}parse(i,t){return i}getUserBounds(){let{_userMin:i,_userMax:t,_suggestedMin:e,_suggestedMax:s}=this;return i=ua$1(i,Number.POSITIVE_INFINITY),t=ua$1(t,Number.NEGATIVE_INFINITY),e=ua$1(e,Number.POSITIVE_INFINITY),s=ua$1(s,Number.NEGATIVE_INFINITY),{min:ua$1(i,e),max:ua$1(t,s),minDefined:ln$1(i),maxDefined:ln$1(t)}}getMinMax(i){let{min:t,max:e,minDefined:s,maxDefined:o}=this.getUserBounds(),a;if(s&&o)return{min:t,max:e};let r=this.getMatchingVisibleMetas();for(let l=0,c=r.length;l<c;++l)a=r[l].controller.getMinMax(this,i),s||(t=Math.min(t,a.min)),o||(e=Math.max(e,a.max));return t=o&&t>e?e:t,e=s&&t>e?t:e,{min:ua$1(t,ua$1(e,t)),max:ua$1(e,ua$1(t,e))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let i=this.chart.data;return this.options.labels||(this.isHorizontal()?i.xLabels:i.yLabels)||i.labels||[]}getLabelItems(i=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(i))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){_(this.options.beforeUpdate,[this])}update(i,t,e){let{beginAtZero:s,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=i,this.maxHeight=t,this._margins=e=Object.assign({left:0,right:0,top:0,bottom:0},e),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+e.left+e.right:this.height+e.top+e.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=bc(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=r<this.ticks.length;this._convertTicksToLabels(l?Ps(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source===`auto`)&&(this.ticks=Eo(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let i=this.options.reverse,t,e;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(){_(this.options.afterUpdate,[this])}beforeSetDimensions(){_(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(){_(this.options.afterSetDimensions,[this])}_callHooks(i){this.chart.notifyPlugins(i,this.getContext()),_(this.options[i],[this])}beforeDataLimits(){this._callHooks(`beforeDataLimits`)}determineDataLimits(){}afterDataLimits(){this._callHooks(`afterDataLimits`)}beforeBuildTicks(){this._callHooks(`beforeBuildTicks`)}buildTicks(){return[]}afterBuildTicks(){this._callHooks(`afterBuildTicks`)}beforeTickToLabelConversion(){_(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(i){let t=this.options.ticks,e,s,o;for(e=0,s=i.length;e<s;e++)o=i[e],o.label=_(t.callback,[o.value,e,i],this)}afterTickToLabelConversion(){_(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){_(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let i=this.options,t=i.ticks,e=Ds(this.ticks.length,i.ticks.maxTicksLimit),s=t.minRotation||0,o=t.maxRotation,a=s,r,l,c;if(!this._isVisible()||!t.display||s>=o||e<=1||!this.isHorizontal()){this.labelRotation=s;return}let h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=xi$1(this.chart.width-d,0,this.maxWidth);r=i.offset?this.maxWidth/e:f/(e-1),d+6>r&&(r=f/(e-(i.offset?.5:1)),l=this.maxHeight-Jt(i.grid)-t.padding-Cs(i.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),a=Ia$1(Math.min(Math.asin(xi$1((h.highest.height+6)/r,-1,1)),Math.asin(xi$1(l/c,-1,1))-Math.asin(xi$1(u/c,-1,1)))),a=Math.max(s,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){_(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){_(this.options.beforeFit,[this])}fit(){let i={width:0,height:0},{chart:t,options:{ticks:e,title:s,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){let l=Cs(s,t.options.font);if(r?(i.width=this.maxWidth,i.height=Jt(o)+l):(i.height=this.maxHeight,i.width=Jt(o)+l),e.display&&this.ticks.length){let{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=e.padding*2,g=Ca$1(this.labelRotation),p=Math.cos(g),m=Math.sin(g);if(r){let x=e.mirror?0:m*d.width+p*u.height;i.height=Math.min(this.maxHeight,i.height+x+f)}else{let x=e.mirror?0:p*d.width+m*u.height;i.width=Math.min(this.maxWidth,i.width+x+f)}this._calculatePadding(c,h,m,p)}}this._handleMargins(),r?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=i.height):(this.width=i.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(i,t,e,s){let{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,c=r!==`top`&&this.axis===`x`;if(this.isHorizontal()){let h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1),u=0,f=0;l?c?(u=s*i.width,f=e*t.height):(u=e*i.height,f=s*t.width):o===`start`?f=t.width:o===`end`?u=i.width:o!==`inner`&&(u=i.width/2,f=t.width/2),this.paddingLeft=Math.max((u-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+a)*this.width/(this.width-d),0)}else{let h=t.height/2,d=i.height/2;o===`start`?(h=0,d=i.height):o===`end`&&(h=t.height,d=0),this.paddingTop=h+a,this.paddingBottom=d+a}}_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(){_(this.options.afterFit,[this])}isHorizontal(){let{axis:i,position:t}=this.options;return t===`top`||t===`bottom`||i===`x`}isFullSize(){return this.options.fullSize}_convertTicksToLabels(i){this.beforeTickToLabelConversion(),this.generateTickLabels(i);let t,e;for(t=0,e=i.length;t<e;t++)Je(i[t].label)&&(i.splice(t,1),e--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let i=this._labelSizes;if(!i){let t=this.options.ticks.sampleSize,e=this.ticks;t<e.length&&(e=Ps(e,t)),this._labelSizes=i=this._computeLabelSizes(e,e.length,this.options.ticks.maxTicksLimit)}return i}_computeLabelSizes(i,t,e){let{ctx:s,_longestTextCache:o}=this,a=[],r=[],l=Math.floor(t/Ds(t,e)),c=0,h=0,d,u,f,g,p,m,x,b,y,M,_;for(d=0;d<t;d+=l){if(g=i[d].label,p=this._resolveTickFontOptions(d),s.font=m=p.string,x=o[m]=o[m]||{data:{},gc:[]},b=p.lineHeight,y=M=0,!Je(g)&&!he(g))y=cn$1(s,x.data,x.gc,y,g),M=b;else if(he(g))for(u=0,f=g.length;u<f;++u)_=g[u],!Je(_)&&!he(_)&&(y=cn$1(s,x.data,x.gc,y,_),M+=b);a.push(y),r.push(M),c=Math.max(y,c),h=Math.max(M,h)}Wo(o,t);let v=a.indexOf(c),S=r.indexOf(h),k=w=>({width:a[w]||0,height:r[w]||0});return{first:k(0),last:k(t-1),widest:k(v),highest:k(S),widths:a,heights:r}}getLabelForValue(i){return i}getPixelForValue(i,t){return NaN}getValueForPixel(i){}getPixelForTick(i){let t=this.ticks;return i<0||i>t.length-1?null:this.getPixelForValue(t[i].value)}getPixelForDecimal(i){this._reversePixels&&(i=1-i);let t=this._startPixel+i*this._length;return Aa$1(this._alignToPixels?Ja$1(this.chart,t,0):t)}getDecimalForPixel(i){let t=(i-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:i,max:t}=this;return i<0&&t<0?t:i>0&&t>0?i:0}getContext(i){let t=this.ticks||[];if(i>=0&&i<t.length){let e=t[i];return e.$context||(e.$context=jo(this.getContext(),i,e))}return this.$context||(this.$context=Ho(this.chart.getContext(),this))}_tickSize(){let i=this.options.ticks,t=Ca$1(this.labelRotation),e=Math.abs(Math.cos(t)),s=Math.abs(Math.sin(t)),o=this._getLabelSizes(),a=i.autoSkipPadding||0,r=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*e>r*s?r/e:l/s:l*s<r*e?l/e:r/s}_isVisible(){let i=this.options.display;return i!==`auto`?!!i:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(i){let t=this.axis,e=this.chart,s=this.options,{grid:o,position:a,border:r}=s,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=Jt(o),f=[],g=r.setContext(this.getContext()),p=g.display?g.width:0,m=p/2,x=function(R){return Ja$1(e,R,p)},b,y,M,_,v,S,k,w,P,D,A,N;if(a===`top`)b=x(this.bottom),S=this.bottom-u,w=b-m,D=x(i.top)+m,N=i.bottom;else if(a===`bottom`)b=x(this.top),D=i.top,N=x(i.bottom)-m,S=b+m,w=this.top+u;else if(a===`left`)b=x(this.right),v=this.right-u,k=b-m,P=x(i.left)+m,A=i.right;else if(a===`right`)b=x(this.left),P=i.left,A=x(i.right)-m,v=b+m,k=this.left+u;else if(t===`x`){if(a===`center`)b=x((i.top+i.bottom)/2+.5);else if(Q(a)){let R=Object.keys(a)[0],F=a[R];b=x(this.chart.scales[R].getPixelForValue(F))}D=i.top,N=i.bottom,S=b+m,w=S+u}else if(t===`y`){if(a===`center`)b=x((i.left+i.right)/2);else if(Q(a)){let R=Object.keys(a)[0],F=a[R];b=x(this.chart.scales[R].getPixelForValue(F))}v=b-m,k=v-u,P=i.left,A=i.right}let Z=se$1(s.ticks.maxTicksLimit,d),T=Math.max(1,Math.ceil(d/Z));for(y=0;y<d;y+=T){let R=this.getContext(y),F=o.setContext(R),et=r.setContext(R),$=F.lineWidth,Ct=F.color,ae=et.dash||[],At=et.dashOffset,Vt=F.tickWidth,_t=F.tickColor,Nt=F.tickBorderDash||[],yt=F.tickBorderDashOffset;M=No(this,y,l),M!==void 0&&(_=Ja$1(e,M,$),c?v=k=P=A=_:S=w=D=N=_,f.push({tx1:v,ty1:S,tx2:k,ty2:w,x1:P,y1:D,x2:A,y2:N,width:$,color:Ct,borderDash:ae,borderDashOffset:At,tickWidth:Vt,tickColor:_t,tickBorderDash:Nt,tickBorderDashOffset:yt}))}return this._ticksLength=d,this._borderValue=b,f}_computeLabelItems(i){let t=this.axis,e=this.options,{position:s,ticks:o}=e,a=this.isHorizontal(),r=this.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=o,u=Jt(e.grid),f=u+h,g=d?-h:f,p=-Ca$1(this.labelRotation),m=[],x,b,y,M,_,v,S,k,w,P,D,A,N=`middle`;if(s===`top`)v=this.bottom-g,S=this._getXAxisLabelAlignment();else if(s===`bottom`)v=this.top+g,S=this._getXAxisLabelAlignment();else if(s===`left`){let T=this._getYAxisLabelAlignment(u);S=T.textAlign,_=T.x}else if(s===`right`){let T=this._getYAxisLabelAlignment(u);S=T.textAlign,_=T.x}else if(t===`x`){if(s===`center`)v=(i.top+i.bottom)/2+f;else if(Q(s)){let T=Object.keys(s)[0],R=s[T];v=this.chart.scales[T].getPixelForValue(R)+f}S=this._getXAxisLabelAlignment()}else if(t===`y`){if(s===`center`)_=(i.left+i.right)/2-f;else if(Q(s)){let T=Object.keys(s)[0],R=s[T];_=this.chart.scales[T].getPixelForValue(R)}S=this._getYAxisLabelAlignment(u).textAlign}t===`y`&&(l===`start`?N=`top`:l===`end`&&(N=`bottom`));let Z=this._getLabelSizes();for(x=0,b=r.length;x<b;++x){y=r[x],M=y.label;let T=o.setContext(this.getContext(x));k=this.getPixelForTick(x)+o.labelOffset,w=this._resolveTickFontOptions(x),P=w.lineHeight,D=he(M)?M.length:1;let R=D/2,F=T.color,et=T.textStrokeColor,$=T.textStrokeWidth,Ct=S;a?(_=k,S===`inner`&&(x===b-1?Ct=this.options.reverse?`left`:`right`:x===0?Ct=this.options.reverse?`right`:`left`:Ct=`center`),s===`top`?c===`near`||p!==0?A=-D*P+P/2:c===`center`?A=-Z.highest.height/2-R*P+P:A=-Z.highest.height+P/2:c===`near`||p!==0?A=P/2:c===`center`?A=Z.highest.height/2-R*P:A=Z.highest.height-D*P,d&&(A*=-1),p!==0&&!T.showLabelBackdrop&&(_+=P/2*Math.sin(p))):(v=k,A=(1-D)*P/2);let ae;if(T.showLabelBackdrop){let At=gc(T.backdropPadding),Vt=Z.heights[x],_t=Z.widths[x],Nt=A-At.top,yt=0-At.left;switch(N){case`middle`:Nt-=Vt/2;break;case`bottom`:Nt-=Vt;break}switch(S){case`center`:yt-=_t/2;break;case`right`:yt-=_t;break;case`inner`:x===b-1?yt-=_t:x>0&&(yt-=_t/2);break}ae={left:yt,top:Nt,width:_t+At.width,height:Vt+At.height,color:T.backdropColor}}m.push({label:M,font:w,textOffset:A,options:{rotation:p,color:F,strokeColor:et,strokeWidth:$,textAlign:Ct,textBaseline:N,translation:[_,v],backdrop:ae}})}return m}_getXAxisLabelAlignment(){let{position:i,ticks:t}=this.options;if(-Ca$1(this.labelRotation))return i===`top`?`left`:`right`;let s=`center`;return t.align===`start`?s=`left`:t.align===`end`?s=`right`:t.align===`inner`&&(s=`inner`),s}_getYAxisLabelAlignment(i){let{position:t,ticks:{crossAlign:e,mirror:s,padding:o}}=this.options,a=this._getLabelSizes(),r=i+o,l=a.widest.width,c,h;return t===`left`?s?(h=this.right+o,e===`near`?c=`left`:e===`center`?(c=`center`,h+=l/2):(c=`right`,h+=l)):(h=this.right-r,e===`near`?c=`right`:e===`center`?(c=`center`,h-=l/2):(c=`left`,h=this.left)):t===`right`?s?(h=this.left+o,e===`near`?c=`right`:e===`center`?(c=`center`,h-=l/2):(c=`left`,h-=l)):(h=this.left+r,e===`near`?c=`left`:e===`center`?(c=`center`,h+=l/2):(c=`right`,h=this.right)):c=`right`,{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;let i=this.chart,t=this.options.position;if(t===`left`||t===`right`)return{top:0,left:this.left,bottom:i.height,right:this.right};if(t===`top`||t===`bottom`)return{top:this.top,left:0,bottom:this.bottom,right:i.width}}drawBackground(){let{ctx:i,options:{backgroundColor:t},left:e,top:s,width:o,height:a}=this;t&&(i.save(),i.fillStyle=t,i.fillRect(e,s,o,a),i.restore())}getLineWidthForValue(i){let t=this.options.grid;if(!this._isVisible()||!t.display)return 0;let s=this.ticks.findIndex(o=>o.value===i);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(i){let t=this.options.grid,e=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(i)),o,a,r=(l,c,h)=>{!h.width||!h.color||(e.save(),e.lineWidth=h.width,e.strokeStyle=h.color,e.setLineDash(h.borderDash||[]),e.lineDashOffset=h.borderDashOffset,e.beginPath(),e.moveTo(l.x,l.y),e.lineTo(c.x,c.y),e.stroke(),e.restore())};if(t.display)for(o=0,a=s.length;o<a;++o){let l=s[o];t.drawOnChartArea&&r({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),t.drawTicks&&r({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){let{chart:i,ctx:t,options:{border:e,grid:s}}=this,o=e.setContext(this.getContext()),a=e.display?o.width:0;if(!a)return;let r=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue,c,h,d,u;this.isHorizontal()?(c=Ja$1(i,this.left,a)-a/2,h=Ja$1(i,this.right,r)+r/2,d=u=l):(d=Ja$1(i,this.top,a)-a/2,u=Ja$1(i,this.bottom,r)+r/2,c=h=l),t.save(),t.lineWidth=o.width,t.strokeStyle=o.color,t.beginPath(),t.moveTo(c,d),t.lineTo(h,u),t.stroke(),t.restore()}drawLabels(i){if(!this.options.ticks.display)return;let e=this.ctx,s=this._computeLabelArea();s&&ic(e,s);let o=this.getLabelItems(i);for(let a of o){let r=a.options,l=a.font,c=a.label,h=a.textOffset;lc(e,c,0,h,l,r)}s&&nc(e)}drawTitle(){let{ctx:i,options:{position:t,title:e,reverse:s}}=this;if(!e.display)return;let o=pc(e.font),a=gc(e.padding),r=e.align,l=o.lineHeight/2;t===`bottom`||t===`center`||Q(t)?(l+=a.bottom,he(e.text)&&(l+=o.lineHeight*(e.text.length-1))):l+=a.top;let{titleX:c,titleY:h,maxWidth:d,rotation:u}=Yo(this,l,t,r);lc(i,e.text,0,0,o,{color:e.color,maxWidth:d,rotation:u,textAlign:$o(r,t,s),textBaseline:`middle`,translation:[c,h]})}draw(i){this._isVisible()&&(this.drawBackground(),this.drawGrid(i),this.drawBorder(),this.drawTitle(),this.drawLabels(i))}_layers(){let i=this.options,t=i.ticks&&i.ticks.z||0,e=se$1(i.grid&&i.grid.z,-1),s=se$1(i.border&&i.border.z,0);return!this._isVisible()||this.draw!==n.prototype.draw?[{z:t,draw:o=>{this.draw(o)}}]:[{z:e,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:t,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(i){let t=this.chart.getSortedVisibleDatasetMetas(),e=this.axis+`AxisID`,s=[],o,a;for(o=0,a=t.length;o<a;++o){let r=t[o];r[e]===this.id&&(!i||r.type===i)&&s.push(r)}return s}_resolveTickFontOptions(i){return pc(this.options.ticks.setContext(this.getContext(i)).font)}_maxDigits(){let i=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/i}};var zt=class{constructor(i,t,e){this.type=i,this.scope=t,this.override=e,this.items=Object.create(null)}isForType(i){return Object.prototype.isPrototypeOf.call(this.type.prototype,i.prototype)}register(i){let t=Object.getPrototypeOf(i),e;Ko(t)&&(e=this.register(t));let s=this.items,o=i.id,a=this.scope+`.`+o;if(!o)throw new Error(`class does not have id: `+i);return o in s||(s[o]=i,Uo(i,a,e),this.override&&Ga$1.override(i.id,i.overrides)),a}get(i){return this.items[i]}unregister(i){let t=this.items,e=i.id,s=this.scope;e in t&&delete t[e],s&&e in Ga$1[s]&&(delete Ga$1[s][e],this.override&&delete Xa$1[e])}};function Uo(n,i,t){let e=_t(Object.create(null),[t?Ga$1.get(t):{},Ga$1.get(i),n.defaults]);Ga$1.set(i,e),n.defaultRoutes&&Xo(i,n.defaultRoutes),n.descriptors&&Ga$1.describe(i,n.descriptors)}function Xo(n,i){Object.keys(i).forEach(t=>{let e=t.split(`.`),s=e.pop(),o=[n].concat(e).join(`.`),a=i[t].split(`.`),r=a.pop(),l=a.join(`.`);Ga$1.route(o,s,l,r)})}function Ko(n){return`id`in n&&`defaults`in n}var xi=class{constructor(){this.controllers=new zt(xt,`datasets`,!0),this.elements=new zt(ht,`elements`),this.plugins=new zt(Object,`plugins`),this.scales=new zt(Pt,`scales`),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...i){this._each(`register`,i)}remove(...i){this._each(`unregister`,i)}addControllers(...i){this._each(`register`,i,this.controllers)}addElements(...i){this._each(`register`,i,this.elements)}addPlugins(...i){this._each(`register`,i,this.plugins)}addScales(...i){this._each(`register`,i,this.scales)}getController(i){return this._get(i,this.controllers,`controller`)}getElement(i){return this._get(i,this.elements,`element`)}getPlugin(i){return this._get(i,this.plugins,`plugin`)}getScale(i){return this._get(i,this.scales,`scale`)}removeControllers(...i){this._each(`unregister`,i,this.controllers)}removeElements(...i){this._each(`unregister`,i,this.elements)}removePlugins(...i){this._each(`unregister`,i,this.plugins)}removeScales(...i){this._each(`unregister`,i,this.scales)}_each(i,t,e){[...t].forEach(s=>{let o=e||this._getRegistryForType(s);e||o.isForType(s)||o===this.plugins&&s.id?this._exec(i,o,s):Te(s,a=>{let r=e||this._getRegistryForType(a);this._exec(i,r,a)})})}_exec(i,t,e){let s=hn$1(i);_(e[`before`+s],[],e),t[i](e),_(e[`after`+s],[],e)}_getRegistryForType(i){for(let t=0;t<this._typedRegistries.length;t++){let e=this._typedRegistries[t];if(e.isForType(i))return e}return this.plugins}_get(i,t,e){let s=t.get(i);if(s===void 0)throw new Error(`"`+i+`" is not a registered `+e+`.`);return s}};var nt=new xi;var _i=class{constructor(){this._init=[]}notify(i,t,e,s){t===`beforeInit`&&(this._init=this._createDescriptors(i,!0),this._notify(this._init,i,`install`));let o=s?this._descriptors(i).filter(s):this._descriptors(i),a=this._notify(o,i,t,e);return t===`afterDestroy`&&(this._notify(o,i,`stop`),this._notify(this._init,i,`uninstall`)),a}_notify(i,t,e,s){s=s||{};for(let o of i){let a=o.plugin,r=a[e];if(_(r,[t,s,o.options],a)===!1&&s.cancelable)return!1}return!0}invalidate(){Je(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(i){if(this._cache)return this._cache;let t=this._cache=this._createDescriptors(i);return this._notifyStateChanges(i),t}_createDescriptors(i,t){let e=i&&i.config,s=se$1(e.options&&e.options.plugins,{}),o=Go(e);return s===!1&&!t?[]:Jo(i,o,s,t)}_notifyStateChanges(i){let t=this._oldCache||[],e=this._cache,s=(o,a)=>o.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(s(t,e),i,`stop`),this._notify(s(e,t),i,`start`)}};function Go(n){let i={},t=[],e=Object.keys(nt.plugins.items);for(let o=0;o<e.length;o++)t.push(nt.getPlugin(e[o]));let s=n.plugins||[];for(let o=0;o<s.length;o++){let a=s[o];t.indexOf(a)===-1&&(t.push(a),i[a.id]=!0)}return{plugins:t,localIds:i}}function qo(n,i){return!i&&n===!1?null:n===!0?{}:n}function Jo(n,{plugins:i,localIds:t},e,s){let o=[],a=n.getContext();for(let r of i){let l=r.id,c=qo(e[l],s);c!==null&&o.push({plugin:r,options:Zo(n.config,{plugin:r,local:t[l]},c,a)})}return o}function Zo(n,{plugin:i,local:t},e,s){let o=n.pluginScopeKeys(i),a=n.getOptionScopes(e,o);return t&&i.defaults&&a.push(i.defaults),n.createResolver(a,s,[``],{scriptable:!1,indexable:!1,allKeys:!0})}function yi(n,i){let t=Ga$1.datasets[n]||{};return((i.datasets||{})[n]||{}).indexAxis||i.indexAxis||t.indexAxis||`x`}function Qo(n,i){let t=n;return n===`_index_`?t=i:n===`_value_`&&(t=i===`x`?`y`:`x`),t}function ta(n,i){return n===i?`_index_`:`_value_`}function As(n){if(n===`x`||n===`y`||n===`r`)return n}function ea(n){if(n===`top`||n===`bottom`)return`x`;if(n===`left`||n===`right`)return`y`}function vi(n,...i){if(As(n))return n;for(let t of i){let e=t.axis||ea(t.position)||n.length>1&&As(n[0].toLowerCase());if(e)return e}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function Ls(n,i,t){if(t[i+`AxisID`]===n)return{axis:i}}
vendor: 13,444 bytes, line 1
1function ia(n,i){if(i.data&&i.data.datasets){let t=i.data.datasets.filter(e=>e.xAxisID===n||e.yAxisID===n);if(t.length)return Ls(n,`x`,t[0])||Ls(n,`y`,t[0])}return{}}function sa(n,i){let t=Xa$1[n.type]||{scales:{}},e=i.scales||{},s=yi(n.type,i),o=Object.create(null);return Object.keys(e).forEach(a=>{let r=e[a];if(!Q(r))return console.error(`Invalid scale configuration for scale: ${a}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);let l=vi(a,r,ia(a,n),Ga$1.scales[r.type]),c=ta(l,s),h=t.scales||{};o[a]=Hs$1(Object.create(null),[{axis:l},r,h[l],h[c]])}),n.data.datasets.forEach(a=>{let r=a.type||n.type,l=a.indexAxis||yi(r,i),h=(Xa$1[r]||{}).scales||{};Object.keys(h).forEach(d=>{let u=Qo(d,l),f=a[u+`AxisID`]||u;o[f]=o[f]||Object.create(null),Hs$1(o[f],[{axis:u},e[f],h[d]])})}),Object.keys(o).forEach(a=>{let r=o[a];Hs$1(r,[Ga$1.scales[r.type],Ga$1.scale])}),o}function bn(n){let i=n.options||(n.options={});i.plugins=se$1(i.plugins,{}),i.scales=sa(n,i)}function xn(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function na(n){return n=n||{},n.data=xn(n.data),bn(n),n}var Os=new Map;var _n=new Set;function me(n,i){let t=Os.get(n);return t||(t=i(),Os.set(n,t),_n.add(t)),t}var Zt=(n,i,t)=>{let e=un$1(i,t);e!==void 0&&n.add(e)};var Mi=class{constructor(i){this._config=na(i),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(i){this._config.type=i}get data(){return this._config.data}set data(i){this._config.data=xn(i)}get options(){return this._config.options}set options(i){this._config.options=i}get plugins(){return this._config.plugins}update(){let i=this._config;this.clearCache(),bn(i)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(i){return me(i,()=>[[`datasets.${i}`,``]])}datasetAnimationScopeKeys(i,t){return me(`${i}.transition.${t}`,()=>[[`datasets.${i}.transitions.${t}`,`transitions.${t}`],[`datasets.${i}`,``]])}datasetElementScopeKeys(i,t){return me(`${i}-${t}`,()=>[[`datasets.${i}.elements.${t}`,`datasets.${i}`,`elements.${t}`,``]])}pluginScopeKeys(i){let t=i.id,e=this.type;return me(`${e}-plugin-${t}`,()=>[[`plugins.${t}`,...i.additionalOptionScopes||[]]])}_cachedScopes(i,t){let e=this._scopeCache,s=e.get(i);return(!s||t)&&(s=new Map,e.set(i,s)),s}getOptionScopes(i,t,e){let{options:s,type:o}=this,a=this._cachedScopes(i,e),r=a.get(t);if(r)return r;let l=new Set;t.forEach(h=>{i&&(l.add(i),h.forEach(d=>Zt(l,i,d))),h.forEach(d=>Zt(l,s,d)),h.forEach(d=>Zt(l,Xa$1[o]||{},d)),h.forEach(d=>Zt(l,Ga$1,d)),h.forEach(d=>Zt(l,qa$1,d))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),_n.has(t)&&a.set(t,c),c}chartOptionScopes(){let{options:i,type:t}=this;return[i,Xa$1[t]||{},Ga$1.datasets[t]||{},{type:t},Ga$1,qa$1]}resolveNamedOptions(i,t,e,s=[``]){let o={$shared:!0},{resolver:a,subPrefixes:r}=Ts(this._resolverCache,i,s),l=a;if(aa(a,t)){o.$shared=!1,e=Lt(e)?e():e;let c=this.createResolver(i,e,r);l=Ft$1(a,e,c)}for(let c of t)o[c]=l[c];return o}createResolver(i,t,e=[``],s){let{resolver:o}=Ts(this._resolverCache,i,e);return Q(t)?Ft$1(o,t,void 0,s):o}};function Ts(n,i,t){let e=n.get(i);e||(e=new Map,n.set(i,e));let s=t.join(),o=e.get(s);return o||(o={resolver:mn$1(i,t),subPrefixes:t.filter(r=>!r.toLowerCase().includes(`hover`))},e.set(s,o)),o}var oa=n=>Q(n)&&Object.getOwnPropertyNames(n).some(i=>Lt(n[i]));function aa(n,i){let{isScriptable:t,isIndexable:e}=rr$1(n);for(let s of i){let o=t(s),a=e(s),r=(a||o)&&n[s];if(o&&(Lt(r)||oa(r))||a&&he(r))return!0}return!1}var ra=`4.5.0`;var la=[`top`,`bottom`,`left`,`right`,`chartArea`];function Es(n,i){return n===`top`||n===`bottom`||la.indexOf(n)===-1&&i===`x`}function Rs(n,i){return function(t,e){return t[n]===e[n]?t[i]-e[i]:t[n]-e[n]}}function Is(n){let i=n.chart,t=i.options.animation;i.notifyPlugins(`afterRender`),_(t&&t.onComplete,[n],i)}function ca(n){let i=n.chart,t=i.options.animation;_(t&&t.onProgress,[n],i)}function yn(n){return fr$1()&&typeof n==`string`?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}var ve={};var zs=n=>{let i=yn(n);return Object.values(ve).filter(t=>t.canvas===i).pop()};function ha(n,i,t){let e=Object.keys(n);for(let s of e){let o=+s;if(o>=i){let a=n[s];delete n[s],(t>0||o>i)&&(n[o+t]=a)}}}function da(n,i,t,e){return!t||n.type===`mouseout`?null:e?i:n}var ua=(()=>{class n{static defaults=Ga$1;static instances=ve;static overrides=Xa$1;static registry=nt;static version=ra;static getChart=zs;static register(...t){nt.add(...t),Fs()}static unregister(...t){nt.remove(...t),Fs()}constructor(t,e){let s=this.config=new Mi(e),o=yn(t),a=zs(o);if(a)throw new Error(`Canvas is already in use. Chart with ID '`+a.id+`' must be destroyed before the canvas with ID '`+a.canvas.id+`' can be reused.`);let r=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||(To(o))),this.platform.updateConfig(s);let l=this.platform.acquireContext(o,r.aspectRatio),c=l&&l.canvas,h=c&&c.height,d=c&&c.width;if(this.id=la$1(),this.ctx=l,this.canvas=c,this.width=d,this.height=h,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new _i,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=_a$1(u=>this.update(u),r.resizeDelay||0),this._dataChanges=[],ve[this.id]=this,!l||!c){console.error(`Failed to create chart: can't acquire context from the given item`);return}lt.listen(this,`complete`,Is),lt.listen(this,`progress`,ca),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:o,_aspectRatio:a}=this;return Je(t)?e&&a?a:o?s/o: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 nt}_initialize(){return this.notifyPlugins(`beforeInit`),this.options.responsive?this.resize():Uc(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins(`afterInit`),this}clear(){return ec(this.canvas,this.ctx),this}stop(){return lt.stop(this),this}resize(t,e){lt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let s=this.options,o=this.canvas,a=s.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(o,t,e,a),l=s.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?`resize`:`attach`;this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,Uc(this,l,!0)&&(this.notifyPlugins(`resize`,{size:r}),_(s.onResize,[this,r],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){Te(this.options.scales||{},(s,o)=>{s.id=o})}buildOrUpdateScales(){let t=this.options,e=t.scales,s=this.scales,o=Object.keys(s).reduce((r,l)=>(r[l]=!1,r),{}),a=[];e&&(a=a.concat(Object.keys(e).map(r=>{let l=e[r],c=vi(r,l),h=c===`r`,d=c===`x`;return{options:l,dposition:h?`chartArea`:d?`bottom`:`left`,dtype:h?`radialLinear`:d?`category`:`linear`}}))),Te(a,r=>{let l=r.options,c=l.id,h=vi(c,l),d=se$1(l.type,r.dtype);(l.position===void 0||Es(l.position,h)!==Es(r.dposition))&&(l.position=r.dposition),o[c]=!0;let u=null;if(c in s&&s[c].type===d)u=s[c];else u=new(nt.getScale(d))({id:c,type:d,ctx:this.ctx,chart:this}),s[u.id]=u;u.init(l,t)}),Te(o,(r,l)=>{r||delete s[l]}),Te(s,r=>{X.configure(this,r,r.options),X.addBox(this,r)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((o,a)=>o.index-a.index),s>e){for(let o=e;o<s;++o)this._destroyDatasetMeta(o);t.splice(e,s-e)}this._sortedMetasets=t.slice(0).sort(Rs(`order`,`index`))}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((s,o)=>{e.filter(a=>a===s._dataset).length===0&&this._destroyDatasetMeta(o)})}buildOrUpdateControllers(){let t=[],e=this.data.datasets,s,o;for(this._removeUnreferencedMetasets(),s=0,o=e.length;s<o;s++){let a=e[s],r=this.getDatasetMeta(s),l=a.type||this.config.type;if(r.type&&r.type!==l&&(this._destroyDatasetMeta(s),r=this.getDatasetMeta(s)),r.type=l,r.indexAxis=a.indexAxis||yi(l,this.options),r.order=a.order||0,r.index=s,r.label=``+a.label,r.visible=this.isDatasetVisible(s),r.controller)r.controller.updateIndex(s),r.controller.linkScales();else{let c=nt.getController(l),{datasetElementType:h,dataElementType:d}=Ga$1.datasets[l];Object.assign(c,{dataElementType:nt.getElement(d),datasetElementType:h&&nt.getElement(h)}),r.controller=new c(this,s),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){Te(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 s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins(`beforeUpdate`,{mode:t,cancelable:!0})===!1)return;let a=this.buildOrUpdateControllers();this.notifyPlugins(`beforeElementsUpdate`);let r=0;for(let h=0,d=this.data.datasets.length;h<d;h++){let{controller:u}=this.getDatasetMeta(h),f=!o&&a.indexOf(u)===-1;u.buildOrUpdateElements(f),r=Math.max(+u.getMaxOverflow(),r)}r=this._minPadding=s.layout.autoPadding?r:0,this._updateLayout(r),o||Te(a,h=>{h.reset()}),this._updateDatasets(t),this.notifyPlugins(`afterUpdate`,{mode:t}),this._layers.sort(Rs(`z`,`_idx`));let{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){Te(this.scales,t=>{X.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options;(!ga$1(new Set(Object.keys(this._listeners)),new Set(t.events))||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(let{method:s,start:o,count:a}of e)ha(t,o,s===`_removeElements`?-a:a)}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,s=a=>new Set(t.filter(r=>r[0]===a).map((r,l)=>l+`,`+r.splice(1).join(`,`))),o=s(0);for(let a=1;a<e;a++)if(!ga$1(o,s(a)))return;return Array.from(o).map(a=>a.split(`,`)).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins(`beforeLayout`,{cancelable:!0})===!1)return;X.update(this,this.width,this.height,t);let e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],Te(this.boxes,o=>{s&&o.position===`chartArea`||(o.configure&&o.configure(),this._layers.push(...o._layers()))},this),this._layers.forEach((o,a)=>{o._idx=a}),this.notifyPlugins(`afterLayout`)}_updateDatasets(t){if(this.notifyPlugins(`beforeDatasetsUpdate`,{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e<s;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,s=this.data.datasets.length;e<s;++e)this._updateDataset(e,Lt(t)?t({datasetIndex:e}):t);this.notifyPlugins(`afterDatasetsUpdate`,{mode:t})}}_updateDataset(t,e){let s=this.getDatasetMeta(t),o={meta:s,index:t,mode:e,cancelable:!0};this.notifyPlugins(`beforeDatasetUpdate`,o)!==!1&&(s.controller._update(e),o.cancelable=!1,this.notifyPlugins(`afterDatasetUpdate`,o))}render(){this.notifyPlugins(`beforeRender`,{cancelable:!0})!==!1&&(lt.has(this)?this.attached&&!lt.running(this)&&lt.start(this):(this.draw(),Is({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){let{width:s,height:o}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(s,o)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins(`beforeDraw`,{cancelable:!0})===!1)return;let e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins(`afterDraw`)}_getSortedDatasetMetas(t){let e=this._sortedMetasets,s=[],o,a;for(o=0,a=e.length;o<a;++o){let r=e[o];(!t||r.visible)&&s.push(r)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins(`beforeDatasetsDraw`,{cancelable:!0})===!1)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,s={meta:t,index:t.index,cancelable:!0},o=nl(this,t);this.notifyPlugins(`beforeDatasetDraw`,s)!==!1&&(o&&ic(e,o),t.controller.draw(),o&&nc(e),s.cancelable=!1,this.notifyPlugins(`afterDatasetDraw`,s))}isPointInArea(t){return Rt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,o){let a=fo.modes[e];return typeof a==`function`?a(this,t,s,o):[]}getDatasetMeta(t){let e=this.data.datasets[t],s=this._metasets,o=s.filter(a=>a&&a._dataset===e).pop();return o||(o={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},s.push(o)),o}getContext(){return this.$context||(this.$context=sr$1(null,{chart:this,type:`chart`}))}
vendor: 4,651 bytes, line 1
1getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let s=this.getDatasetMeta(t);return typeof s.hidden==`boolean`?!s.hidden:!e.hidden}setDatasetVisibility(t,e){let s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){let o=s?`show`:`hide`,a=this.getDatasetMeta(t),r=a.controller._resolveAnimations(void 0,o);ma$1(e)?(a.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),r.update(a,{visible:s}),this.update(l=>l.datasetIndex===t?o: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(),lt.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(),ec(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete ve[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,s=(a,r)=>{e.addEventListener(this,a,r),t[a]=r},o=(a,r,l)=>{a.offsetX=r,a.offsetY=l,this._eventHandler(a)};Te(this.options.events,a=>s(a,o))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,e=this.platform,s=(c,h)=>{e.addEventListener(this,c,h),t[c]=h},o=(c,h)=>{t[c]&&(e.removeEventListener(this,c,h),delete t[c])},a=(c,h)=>{this.canvas&&this.resize(c,h)},r,l=()=>{o(`attach`,l),this.attached=!0,this.resize(),s(`resize`,a),s(`detach`,r)};r=()=>{this.attached=!1,o(`resize`,a),this._stop(),this._resize(0,0),s(`attach`,l)},e.isAttached(this.canvas)?l():r()}unbindEvents(){Te(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},Te(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){let o=s?`set`:`remove`,a,r,l,c;for(e===`dataset`&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller[`_`+o+`DatasetHoverStyle`]()),l=0,c=t.length;l<c;++l){r=t[l];let h=r&&this.getDatasetMeta(r.datasetIndex).controller;h&&h[o+`HoverStyle`](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){let e=this._active||[],s=t.map(({datasetIndex:a,index:r})=>{let l=this.getDatasetMeta(a);if(!l)throw new Error(`No dataset found at index `+a);return{datasetIndex:a,element:l.data[r],index:r}});!fa$1(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,s){let o=this.options.hover,a=(c,h)=>c.filter(d=>!h.some(u=>d.datasetIndex===u.datasetIndex&&d.index===u.index)),r=a(e,t),l=s?t:a(t,e);r.length&&this.updateHoverStyle(r,o.mode,!1),l.length&&o.mode&&this.updateHoverStyle(l,o.mode,!0)}_eventHandler(t,e){let s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},o=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins(`beforeEvent`,s,o)===!1)return;let a=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins(`afterEvent`,s,o),(a||s.changed)&&this.render(),this}_handleEvent(t,e,s){let{_active:o=[],options:a}=this,r=e,l=this._getActiveElements(t,o,s,r),c=pa$1(t),h=da(t,this._lastEvent,s,c);s&&(this._lastEvent=null,_(a.onHover,[t,l,this],this),c&&_(a.onClick,[t,l,this],this));let d=!fa$1(l,o);return(d||e)&&(this._active=l,this._updateHoverStyles(l,o,e)),this._lastEvent=h,d}_getActiveElements(t,e,s,o){if(t.type===`mouseout`)return[];if(!s)return e;let a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,o)}}return n})();function Fs(){return Te(ua.instances,n=>n._plugins.invalidate())}function fa(n,i,t){let{startAngle:e,x:s,y:o,outerRadius:a,innerRadius:r,options:l}=i,{borderWidth:c,borderJoinStyle:h}=l,d=Math.min(c/a,Pe$1(e-t));if(n.beginPath(),n.arc(s,o,a-c/2,e+d/2,t-d/2),r>0){let u=Math.min(c/r,Pe$1(e-t));n.arc(s,o,r+c/2,t-u/2,e+u/2,!0)}else{let u=Math.min(c/2,a*Pe$1(e-t));if(h===`round`)n.arc(s,o,u,t-V/2,e+V/2,!0);else if(h===`bevel`){let f=2*u*u,g=-f*Math.cos(t+V/2)+s,p=-f*Math.sin(t
vendor: 4,301 bytes, line 1
1+V/2)+o,m=f*Math.cos(e+V/2)+s,x=f*Math.sin(e+V/2)+o;n.lineTo(g,p),n.lineTo(m,x)}}n.closePath(),n.moveTo(0,0),n.rect(0,0,n.canvas.width,n.canvas.height),n.clip(`evenodd`)}function ga(n,i,t){let{startAngle:e,pixelMargin:s,x:o,y:a,outerRadius:r,innerRadius:l}=i,c=s/r;n.beginPath(),n.arc(o,a,r,e-c,t+c),l>s?(c=s/l,n.arc(o,a,l,t+c,e-c,!0)):n.arc(o,a,s,t+ye$1,e-ye$1),n.closePath(),n.clip()}function pa(n){return dn$1(n,[`outerStart`,`outerEnd`,`innerStart`,`innerEnd`])}function ma(n,i,t,e){let s=pa(n.options.borderRadius),o=(t-i)/2,a=Math.min(o,e*i/2),r=l=>{let c=(t-Math.min(o,l))*e/2;return xi$1(l,0,Math.min(o,c))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:xi$1(s.innerStart,0,a),innerEnd:xi$1(s.innerEnd,0,a)}}function It(n,i,t,e){return{x:t+n*Math.cos(i),y:e+n*Math.sin(i)}}function De(n,i,t,e,s,o){let{x:a,y:r,startAngle:l,pixelMargin:c,innerRadius:h}=i,d=Math.max(i.outerRadius+e+t-c,0),u=h>0?h+e+t+c:0,f=0,g=s-l;if(e){let F=((h>0?h-e:0)+(d>0?d-e:0))/2;f=(g-(F!==0?g*F/(F+e):g))/2}let m=(g-Math.max(.001,g*d-t/V)/d)/2,x=l+m+f,b=s-m-f,{outerStart:y,outerEnd:M,innerStart:_,innerEnd:v}=ma(i,u,d,b-x),S=d-y,k=d-M,w=x+y/S,P=b-M/k,D=u+_,A=u+v,N=x+_/D,Z=b-v/A;if(n.beginPath(),o){let T=(w+P)/2;if(n.arc(a,r,d,w,T),n.arc(a,r,d,T,P),M>0){let $=It(k,P,a,r);n.arc($.x,$.y,M,P,b+ye$1)}let R=It(A,b,a,r);if(n.lineTo(R.x,R.y),v>0){let $=It(A,Z,a,r);n.arc($.x,$.y,v,b+ye$1,Z+Math.PI)}let F=(b-v/u+(x+_/u))/2;if(n.arc(a,r,u,b-v/u,F,!0),n.arc(a,r,u,F,x+_/u,!0),_>0){let $=It(D,N,a,r);n.arc($.x,$.y,_,N+Math.PI,x-ye$1)}let et=It(S,x,a,r);if(n.lineTo(et.x,et.y),y>0){let $=It(S,w,a,r);n.arc($.x,$.y,y,x-ye$1,w)}}else{n.moveTo(a,r);let T=Math.cos(w)*d+a,R=Math.sin(w)*d+r;n.lineTo(T,R);let F=Math.cos(P)*d+a,et=Math.sin(P)*d+r;n.lineTo(F,et)}n.closePath()}function ba(n,i,t,e,s){let{fullCircles:o,startAngle:a,circumference:r}=i,l=i.endAngle;if(o){De(n,i,t,e,l,s);for(let c=0;c<o;++c)n.fill();isNaN(r)||(l=a+(r%de||de))}return De(n,i,t,e,l,s),n.fill(),l}function xa(n,i,t,e,s){let{fullCircles:o,startAngle:a,circumference:r,options:l}=i,{borderWidth:c,borderJoinStyle:h,borderDash:d,borderDashOffset:u,borderRadius:f}=l,g=l.borderAlign===`inner`;if(!c)return;n.setLineDash(d||[]),n.lineDashOffset=u,g?(n.lineWidth=c*2,n.lineJoin=h||`round`):(n.lineWidth=c,n.lineJoin=h||`bevel`);let p=i.endAngle;if(o){De(n,i,t,e,p,s);for(let m=0;m<o;++m)n.stroke();isNaN(r)||(p=a+(r%de||de))}g&&ga(n,i,p),l.selfJoin&&p-a>=V&&f===0&&h!==`miter`&&fa(n,i,p),o||(De(n,i,t,e,p,s),n.stroke())}var ki=class extends ht{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,selfJoin:!1};static defaultRoutes={backgroundColor:`backgroundColor`};static descriptors={_scriptable:!0,_indexable:i=>i!==`borderDash`};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(i){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,i&&Object.assign(this,i)}inRange(i,t,e){let{angle:o,distance:a}=Da$1(this.getProps([`x`,`y`],e),{x:i,y:t}),{startAngle:r,endAngle:l,innerRadius:c,outerRadius:h,circumference:d}=this.getProps([`startAngle`,`endAngle`,`innerRadius`,`outerRadius`,`circumference`],e),u=(this.options.spacing+this.options.borderWidth)/2,f=se$1(d,l-r),g=Ks$1(o,r,l)&&r!==l,p=f>=de||g,m=Xs$1(a,c+u,h+u);return p&&m}getCenterPoint(i){let{x:t,y:e,startAngle:s,endAngle:o,innerRadius:a,outerRadius:r}=this.getProps([`x`,`y`,`startAngle`,`endAngle`,`innerRadius`,`outerRadius`],i),{offset:l,spacing:c}=this.options,h=(s+o)/2,d=(a+r+c+l)/2;return{x:t+Math.cos(h)*d,y:e+Math.sin(h)*d}}tooltipPosition(i){return this.getCenterPoint(i)}draw(i){let{options:t,circumference:e}=this,s=(t.offset||0)/4,o=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin=t.borderAlign===`inner`?.33:0,this.fullCircles=e>de?Math.floor(e/de):0,e===0||this.innerRadius<0||this.outerRadius<0)return;i.save();let r=(this.startAngle+this.endAngle)/2;i.translate(Math.cos(r)*s,Math.sin(r)*s);let c=s*(1-Math.sin(Math.min(V,e||0)));i.fillStyle=t.backgroundColor,i.strokeStyle=t.borderColor,ba(i,this,c,o,a),xa(i,this,c,o,a),i.restore(
vendor: 5,278 bytes, line 1
1)}};function vn(n,i,t=i){n.lineCap=se$1(t.borderCapStyle,i.borderCapStyle),n.setLineDash(se$1(t.borderDash,i.borderDash)),n.lineDashOffset=se$1(t.borderDashOffset,i.borderDashOffset),n.lineJoin=se$1(t.borderJoinStyle,i.borderJoinStyle),n.lineWidth=se$1(t.borderWidth,i.borderWidth),n.strokeStyle=se$1(t.borderColor,i.borderColor)}function _a(n,i,t){n.lineTo(t.x,t.y)}function ya(n){return n.stepped?sc:n.tension||n.cubicInterpolationMode===`monotone`?rc:_a}function Mn(n,i,t={}){let e=n.length,{start:s=0,end:o=e-1}=t,{start:a,end:r}=i,l=Math.max(s,a),c=Math.min(o,r),h=s<a&&o<a||s>r&&o>r;return{count:e,start:l,loop:i.loop,ilen:c<l&&!h?e+c-l:c-l}}function va(n,i,t,e){let{points:s,options:o}=i,{count:a,start:r,loop:l,ilen:c}=Mn(s,t,e),h=ya(o),{move:d=!0,reverse:u}=e||{},f,g,p;for(f=0;f<=c;++f)g=s[(r+(u?c-f:f))%a],!g.skip&&(d?(n.moveTo(g.x,g.y),d=!1):h(n,p,g,u,o.stepped),p=g);return l&&(g=s[(r+(u?c:0))%a],h(n,p,g,u,o.stepped)),!!l}function Ma(n,i,t,e){let s=i.points,{count:o,start:a,ilen:r}=Mn(s,t,e),{move:l=!0,reverse:c}=e||{},h=0,d=0,u,f,g,p,m,x,b=M=>(a+(c?r-M:M))%o,y=()=>{p!==m&&(n.lineTo(h,m),n.lineTo(h,p),n.lineTo(h,x))};for(l&&(f=s[b(0)],n.moveTo(f.x,f.y)),u=0;u<=r;++u){if(f=s[b(u)],f.skip)continue;let M=f.x,_=f.y,v=M|0;v===g?(_<p?p=_:_>m&&(m=_),h=(d*h+M)/++d):(y(),n.lineTo(M,_),g=v,d=0,p=m=_),x=_}y()}function Si(n){let i=n.options,t=i.borderDash&&i.borderDash.length;return!n._decimated&&!n._loop&&!i.tension&&i.cubicInterpolationMode!==`monotone`&&!i.stepped&&!t?Ma:va}function ka(n){return n.stepped?Hc:n.tension||n.cubicInterpolationMode===`monotone`?zc:Ge}function Sa(n,i,t,e){let s=i._path;s||(s=i._path=new Path2D,i.path(s,t,e)&&s.closePath()),vn(n,i.options),n.stroke(s)}function wa(n,i,t,e){let{segments:s,options:o}=i,a=Si(i);for(let r of s)vn(n,o,r.style),n.beginPath(),a(n,i,r,{start:t,end:t+e-1})&&n.closePath(),n.stroke()}var Da=typeof Path2D==`function`;function Pa(n,i,t,e){Da&&!i.options.segment?Sa(n,i,t,e):wa(n,i,t,e)}var Ft=class extends ht{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:i=>i!==`borderDash`&&i!==`fill`};constructor(i){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,i&&Object.assign(this,i)}updateControlPoints(i,t){let e=this.options;if((e.tension||e.cubicInterpolationMode===`monotone`)&&!e.stepped&&!this._pointsUpdated){let s=e.spanGaps?this._loop:this._fullLoop;Oc(this._points,e,i,s,t),this._pointsUpdated=!0}}set points(i){this._points=i,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Jc(this,this.options.segment))}first(){let i=this.segments,t=this.points;return i.length&&t[i[0].start]}last(){let i=this.segments,t=this.points,e=i.length;return e&&t[i[e-1].end]}interpolate(i,t){let e=this.options,s=i[t],o=this.points,a=qc(this,{property:t,start:s,end:s});if(!a.length)return;let r=[],l=ka(e),c,h;for(c=0,h=a.length;c<h;++c){let{start:d,end:u}=a[c],f=o[d],g=o[u];if(f===g){r.push(f);continue}let m=l(f,g,Math.abs((s-f[t])/(g[t]-f[t])),e.stepped);m[t]=i[t],r.push(m)}return r.length===1?r[0]:r}pathSegment(i,t,e){return Si(this)(i,this,t,e)}path(i,t,e){let s=this.segments,o=Si(this),a=this._loop;t=t||0,e=e||this.points.length-t;for(let r of s)a&=o(i,this,r,{start:t,end:t+e-1});return!!a}draw(i,t,e,s){let o=this.options||{};(this.points||[]).length&&o.borderWidth&&(i.save(),Pa(i,this,e,s),i.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}};function Bs(n,i,t,e){let s=n.options,{[t]:o}=n.getProps([t],e);return Math.abs(i-o)<s.radius+s.hitRadius}var Ca=(()=>{class n extends ht{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,s){let o=this.options,{x:a,y:r}=this.getProps([`x`,`y`],s);return Math.pow(t-a,2)+Math.pow(e-r,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(t,e){return Bs(this,t,`x`,e)}inYRange(t,e){return Bs(this,t,`y`,e)}getCenterPoint(t){let{x:e,y:s}=this.getProps([`x`,`y`],t);return{x:e,y:s}}size(t){t=t||this.options||{};let e=t.radius||0;e=Math.max(e,e&&t.hoverRadius||0);let s=e&&t.borderWidth||0;return(e+s)*2}draw(t,e){let s=this.options;this.skip||s.radius<.1||!Rt(this,e,this.size(s)/2)||(t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.fillStyle=s.backgroundColor,tc(t,s,this.x,this.y))}getRange(){let t=this.options||{};return t.radius+t.hitRadius}}return n})();function kn(n,i){let{x:t,y:e,base:s,width:o,height:a}=n.getProps([`x`,`y`,`base`,`width`,`height`],i),r,l,c,h,d;return n.horizontal?(d=a/2,r=Math.min(t,s),l=Math.max(t,s),c=e-d,h=e+d
1):(d=o/2,r=t-d,l=t+d,c=Math.min(e,s),h=Math.max(e,s)),{left:r,top:c,right:l,bottom:h}}function bt(n,i,t,e){return n?0:xi$1(i,t,e)}function Aa(n,i,t){let e=n.options.borderWidth,s=n.borderSkipped,o=nr$1(e);return{t:bt(s.top,o.top,0,t),r:bt(s.right,o.right,0,i),b:bt(s.bottom,o.bottom,0,t),l:bt(s.left,o.left,0,i)}}function La(n,i,t){let{enableBorderRadius:e}=n.getProps([`enableBorderRadius`]),s=n.options.borderRadius,o=mc(s),a=Math.min(i,t),r=n.borderSkipped,l=e||Q(s);return{topLeft:bt(!l||r.top||r.left,o.topLeft,0,a),topRight:bt(!l||r.top||r.right,o.topRight,0,a),bottomLeft:bt(!l||r.bottom||r.left,o.bottomLeft,0,a),bottomRight:bt(!l||r.bottom||r.right,o.bottomRight,0,a)}}function Oa(n){let i=kn(n),t=i.right-i.left,e=i.bottom-i.top,s=Aa(n,t/2,e/2),o=La(n,t/2,e/2);return{outer:{x:i.left,y:i.top,w:t,h:e,radius:o},inner:{x:i.left+s.l,y:i.top+s.t,w:t-s.l-s.r,h:e-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function ci(n,i,t,e){let s=i===null,o=t===null,r=n&&!(s&&o)&&kn(n,e);return r&&(s||Xs$1(i,r.left,r.right))&&(o||Xs$1(t,r.top,r.bottom))}function Ta(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function Ea(n,i){n.rect(i.x,i.y,i.w,i.h)}function hi(n,i,t={}){let e=n.x!==t.x?-i:0,s=n.y!==t.y?-i:0,o=(n.x+n.w!==t.x+t.w?i:0)-e,a=(n.y+n.h!==t.y+t.h?i:0)-s;return{x:n.x+e,y:n.y+s,w:n.w+o,h:n.h+a,radius:n.radius}}var Ra=(()=>{class n extends ht{static id=`bar`;static defaults={borderSkipped:`start`,borderWidth:0,borderRadius:0,inflateAmount:`auto`,pointStyle:void 0};static defaultRoutes={backgroundColor:`backgroundColor`,borderColor:`borderColor`};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){let{inflateAmount:e,options:{borderColor:s,backgroundColor:o}}=this,{inner:a,outer:r}=Oa(this),l=Ta(r.radius)?uc:Ea;t.save(),(r.w!==a.w||r.h!==a.h)&&(t.beginPath(),l(t,hi(r,e,a)),t.clip(),l(t,hi(a,-e,r)),t.fillStyle=s,t.fill(`evenodd`)),t.beginPath(),l(t,hi(a,e)),t.fillStyle=o,t.fill(),t.restore()}inRange(t,e,s){return ci(this,t,e,s)}inXRange(t,e){return ci(this,t,null,e)}inYRange(t,e){return ci(this,null,t,e)}getCenterPoint(t){let{x:e,y:s,base:o,horizontal:a}=this.getProps([`x`,`y`,`base`,`horizontal`],t);return{x:a?(e+o)/2:e,y:a?s:(s+o)/2}}getRange(t){return t===`x`?this.width/2:this.height/2}}return n})();var Ia=Object.freeze({__proto__:null,ArcElement:ki,BarElement:Ra,LineElement:Ft,PointElement:Ca});var wi=[`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)`];var Vs=wi.map(n=>n.replace(`rgb(`,`rgba(`).replace(`)`,`, 0.5)`));function Sn(n){return wi[n%wi.length]}function wn(n){return Vs[n%Vs.length]}function za(n,i){return n.borderColor=Sn(i),n.backgroundColor=wn(i),++i}function Fa(n,i){return n.backgroundColor=n.data.map(()=>Sn(i++)),i}function Ba(n,i){return n.backgroundColor=n.data.map(()=>wn(i++)),i}function Va(n){let i=0;return(t,e)=>{let s=n.getDatasetMeta(e).controller;s instanceof ee?i=Fa(t,i):s instanceof ke?i=Ba(t,i):s&&(i=za(t,i))}}function Ns(n){let i;for(i in n)if(n[i].borderColor||n[i].backgroundColor)return!0;return!1}function Na(n){return n&&(n.borderColor||n.backgroundColor)}function Wa(){return Ga$1.borderColor!==`rgba(0,0,0,0.1)`||Ga$1.backgroundColor!==`rgba(0,0,0,0.1)`}var Ha={id:`colors`,defaults:{enabled:!0,forceOverride:!1},beforeLayout(n,i,t){if(!t.enabled)return;let{data:{datasets:e},options:s}=n.config,{elements:o}=s,a=Ns(e)||Na(s)||o&&Ns(o)||Wa();if(!t.forceOverride&&a)return;let r=Va(n);e.forEach(r)}};function ja(n,i,t,e,s){let o=s.samples||e;if(o>=t)return n.slice(i,i+t);let a=[],r=(t-2)/(o-2),l=0,c=i+t-1,h=i,d,u,f,g,p;for(a[l++]=n[h],d=0;d<o-2;d++){let m=0,x=0,b,y=Math.floor((d+1)*r)+1+i,M=Math.min(Math.floor((d+2)*r)+1,t)+i,_=M-y;for(b=y;b<M;b++)m+=n[b].x,x+=n[b].y;m/=_,x/=_;let v=Math.floor(d*r)+1+i,S=Math.min(Math.floor((d+1)*r)+1,t)+i,{x:k,y:w}=n[h];for(f=g=-1,b=v;b<S;b++)g=.5*Math.abs((k-m)*(n[b].y-w)-(k-n[b].x)*(x-w)),g>f&&(f=g,u=n[b],p=b);a[l++]=u,h=p}return a[l++]=n[c],a}function $a(n,i,t,e){let s=0,o=0,a,r,l,c,h,d,u,f,g,p,m=[],x=i+t-1,b=n[i].x,M=n[x].x-b;for(a=i;a<i+t;++a){r=n[a],l=(r.x-b)/M*e,c=r.y;let _=l|0;if(_===h)c<g?(g=c,d=a):c>
1p&&(p=c,u=a),s=(o*s+r.x)/++o;else{let v=a-1;if(!Je(d)&&!Je(u)){let S=Math.min(d,u),k=Math.max(d,u);S!==f&&S!==v&&m.push(A(z({},n[S]),{x:s})),k!==f&&k!==v&&m.push(A(z({},n[k]),{x:s}))}a>0&&v!==f&&m.push(n[v]),m.push(r),h=_,o=0,g=p=c,d=u=f=a}}return m}function Dn(n){if(n._decimated){let i=n._data;delete n._decimated,delete n._data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,writable:!0,value:i})}}function Ws(n){n.data.datasets.forEach(i=>{Dn(i)})}function Ya(n,i){let t=i.length,e=0,s,{iScale:o}=n,{min:a,max:r,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(e=xi$1(Et(i,o.axis,a).lo,0,t-1)),c?s=xi$1(Et(i,o.axis,r).hi+1,e,t)-e:s=t-e,{start:e,count:s}}var Ua={id:`decimation`,defaults:{algorithm:`min-max`,enabled:!1},beforeElementsUpdate:(n,i,t)=>{if(!t.enabled){Ws(n);return}let e=n.width;n.data.datasets.forEach((s,o)=>{let{_data:a,indexAxis:r}=s,l=n.getDatasetMeta(o),c=a||s.data;if(vc([r,n.options.indexAxis])===`y`||!l.controller.supportsDecimation)return;let h=n.scales[l.xAxisID];if(h.type!==`linear`&&h.type!==`time`||n.options.parsing)return;let{start:d,count:u}=Ya(l,c);if(u<=(t.threshold||4*e)){Dn(s);return}Je(a)&&(s._data=c,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}}));let g;switch(t.algorithm){case`lttb`:g=ja(c,d,u,e,t);break;case`min-max`:g=$a(c,d,u,e);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}s._decimated=g})},destroy(n){Ws(n)}};function Xa(n,i,t){let e=n.segments,s=n.points,o=i.points,a=[];for(let r of e){let{start:l,end:c}=r;c=Ae(l,c,s);let h=Di(t,s[l],s[c],r.loop);if(!i.segments){a.push({source:r,target:h,start:s[l],end:s[c]});continue}let d=qc(i,h);for(let u of d){let f=Di(t,o[u.start],o[u.end],u.loop),g=pr$1(r,s,f);for(let p of g)a.push({source:p,target:u,start:{[t]:Hs(h,f,`start`,Math.max)},end:{[t]:Hs(h,f,`end`,Math.min)}})}}return a}function Di(n,i,t,e){if(e)return;let s=i[n],o=t[n];return n===`angle`&&(s=Pe$1(s),o=Pe$1(o)),{property:n,start:s,end:o}}function Ka(n,i){let{x:t=null,y:e=null}=n||{},s=i.points,o=[];return i.segments.forEach(({start:a,end:r})=>{r=Ae(a,r,s);let l=s[a],c=s[r];e!==null?(o.push({x:l.x,y:e}),o.push({x:c.x,y:e})):t!==null&&(o.push({x:t,y:l.y}),o.push({x:t,y:c.y}))}),o}function Ae(n,i,t){for(;i>n;i--){let e=t[i];if(!isNaN(e.x)&&!isNaN(e.y))break}return i}function Hs(n,i,t,e){return n&&i?e(n[t],i[t]):n?n[t]:i?i[t]:0}function Pn(n,i){let t=[],e=!1;return he(n)?(e=!0,t=n):t=Ka(n,i),t.length?new Ft({points:t,options:{tension:0},_loop:e,_fullLoop:e}):null}function js(n){return n&&n.fill!==!1}function Ga(n,i,t){let s=n[i].fill,o=[i],a;if(!t)return s;for(;s!==!1&&o.indexOf(s)===-1;){if(!ln$1(s))return s;if(a=n[s],!a)return!1;if(a.visible)return s;o.push(s),s=a.fill}return!1}function qa(n,i,t){let e=tr(n);if(Q(e))return isNaN(e.value)?!1:e;let s=parseFloat(e);return ln$1(s)&&Math.floor(s)===s?Ja(e[0],i,s,t):[`origin`,`start`,`end`,`stack`,`shape`].indexOf(e)>=0&&e}function Ja(n,i,t,e){return(n===`-`||n===`+`)&&(t=i+t),t===i||t<0||t>=e?!1:t}function Za(n,i){let t=null;return n===`start`?t=i.bottom:n===`end`?t=i.top:Q(n)?t=i.getPixelForValue(n.value):i.getBasePixel&&(t=i.getBasePixel()),t}function Qa(n,i,t){let e;return n===`start`?e=t:n===`end`?e=i.options.reverse?i.min:i.max:Q(n)?e=n.value:e=i.getBaseValue(),e}function tr(n){let i=n.options,t=i.fill,e=se$1(t&&t.target,t);return e===void 0&&(e=!!i.backgroundColor),e===!1||e===null?!1:e===!0?`origin`:e}function er(n){let{scale:i,index:t,line:e}=n,s=[],o=e.segments,a=e.points,r=ir(i,t);r.push(Pn({x:null,y:i.bottom},e));for(let l=0;l<o.length;l++){let c=o[l];for(let h=c.start;h<=c.end;h++)sr(s,a[h],r)}return new Ft({points:s,options:{}})}function ir(n,i){let t=[],e=n.getMatchingVisibleMetas(`line`);for(let s=0;s<e.length;s++){let o=e[s];if(o.index===i)break;o.hidden||t.unshift(o.dataset)}return t}function sr(n,i,t){let e=[];for(let s=0;s<t.length;s++){let o=t[s],{first:a,last:r,point:l}=nr(o,i,`x`);if(!(!l||a&&r)){if(a)e.unshift(l);else if(n.push(l),!r)break}}n.push(...e)}function nr(n,i,t){let e=n.interpolate(i,t);if(!e)return{};let s=e[t],o=n.segments,a=n.points,r=!1,l=!1;for(let c=0;c<o.length;c++){let h=o[c],d=a[h.start][t],u=a[h.end][t];if(Xs$1(s,d,u)){r=s===d,l=s===u;break}}return{first:r,last:l,point:e}}var Pe=class{constructor(i){this.x=i.x,this.y=i.y,this.radius=i.radius}pathSegment(i,t,e){let{x:s,y:o,radius:a}=this;return t=t||{start:0,end:de}
vendor: 5,937 bytes, line 1
1,i.arc(s,o,a,t.end,t.start,!0),!e.bounds}interpolate(i){let{x:t,y:e,radius:s}=this,o=i.angle;return{x:t+Math.cos(o)*s,y:e+Math.sin(o)*s,angle:o}}};function or(n){let{chart:i,fill:t,line:e}=n;if(ln$1(t))return ar(i,t);if(t===`stack`)return er(n);if(t===`shape`)return!0;let s=rr(n);return s instanceof Pe?s:Pn(s,e)}function ar(n,i){let t=n.getDatasetMeta(i);return t&&n.isDatasetVisible(i)?t.dataset:null}function rr(n){return(n.scale||{}).getPointPositionForValue?cr(n):lr(n)}function lr(n){let{scale:i={},fill:t}=n,e=Za(t,i);if(ln$1(e)){let s=i.isHorizontal();return{x:s?e:null,y:s?null:e}}return null}function cr(n){let{scale:i,fill:t}=n,e=i.options,s=i.getLabels().length,o=e.reverse?i.max:i.min,a=Qa(t,i,o),r=[];if(e.grid.circular){let l=i.getPointPositionForValue(0,o);return new Pe({x:l.x,y:l.y,radius:i.getDistanceFromCenterForValue(a)})}for(let l=0;l<s;++l)r.push(i.getPointPositionForValue(l,a));return r}function di(n,i,t){let e=or(i),{chart:s,index:o,line:a,scale:r,axis:l}=i,c=a.options,h=c.fill,d=c.backgroundColor,{above:u=d,below:f=d}=h||{},p=nl(s,s.getDatasetMeta(o));e&&a.points.length&&(ic(n,t),hr(n,{line:a,target:e,above:u,below:f,area:t,scale:r,axis:l,clip:p}),nc(n))}function hr(n,i){let{line:t,target:e,above:s,below:o,area:a,scale:r,clip:l}=i,c=t._loop?`angle`:i.axis;n.save();let h=o;o!==s&&(c===`x`?($s(n,e,a.top),ui(n,{line:t,target:e,color:s,scale:r,property:c,clip:l}),n.restore(),n.save(),$s(n,e,a.bottom)):c===`y`&&(Ys(n,e,a.left),ui(n,{line:t,target:e,color:o,scale:r,property:c,clip:l}),n.restore(),n.save(),Ys(n,e,a.right),h=s)),ui(n,{line:t,target:e,color:h,scale:r,property:c,clip:l}),n.restore()}function $s(n,i,t){let{segments:e,points:s}=i,o=!0,a=!1;n.beginPath();for(let r of e){let{start:l,end:c}=r,h=s[l],d=s[Ae(l,c,s)];o?(n.moveTo(h.x,h.y),o=!1):(n.lineTo(h.x,t),n.lineTo(h.x,h.y)),a=!!i.pathSegment(n,r,{move:a}),a?n.closePath():n.lineTo(d.x,t)}n.lineTo(i.first().x,t),n.closePath(),n.clip()}function Ys(n,i,t){let{segments:e,points:s}=i,o=!0,a=!1;n.beginPath();for(let r of e){let{start:l,end:c}=r,h=s[l],d=s[Ae(l,c,s)];o?(n.moveTo(h.x,h.y),o=!1):(n.lineTo(t,h.y),n.lineTo(h.x,h.y)),a=!!i.pathSegment(n,r,{move:a}),a?n.closePath():n.lineTo(t,d.y)}n.lineTo(t,i.first().y),n.closePath(),n.clip()}function ui(n,i){let{line:t,target:e,property:s,color:o,scale:a,clip:r}=i,l=Xa(t,e,s);for(let{source:c,target:h,start:d,end:u}of l){let{style:{backgroundColor:f=o}={}}=c,g=e!==!0;n.save(),n.fillStyle=f,dr(n,a,r,g&&Di(s,d,u)),n.beginPath();let p=!!t.pathSegment(n,c),m;if(g){p?n.closePath():Us(n,e,u,s);let x=!!e.pathSegment(n,h,{move:p,reverse:!0});m=p&&x,m||Us(n,e,d,s)}n.closePath(),n.fill(m?`evenodd`:`nonzero`),n.restore()}}function dr(n,i,t,e){let s=i.chart.chartArea,{property:o,start:a,end:r}=e||{};if(o===`x`||o===`y`){let l,c,h,d;o===`x`?(l=a,c=s.top,h=r,d=s.bottom):(l=s.left,c=a,h=s.right,d=r),n.beginPath(),t&&(l=Math.max(l,t.left),h=Math.min(h,t.right),c=Math.max(c,t.top),d=Math.min(d,t.bottom)),n.rect(l,c,h-l,d-c),n.clip()}}function Us(n,i,t,e){let s=i.interpolate(t,e);s&&n.lineTo(s.x,s.y)}var ur={id:`filler`,afterDatasetsUpdate(n,i,t){let e=(n.data.datasets||[]).length,s=[],o,a,r,l;for(a=0;a<e;++a)o=n.getDatasetMeta(a),r=o.dataset,l=null,r&&r.options&&r instanceof Ft&&(l={visible:n.isDatasetVisible(a),index:a,fill:qa(r,a,e),chart:n,axis:o.controller.options.indexAxis,scale:o.vScale,line:r}),o.$filler=l,s.push(l);for(a=0;a<e;++a)l=s[a],!(!l||l.fill===!1)&&(l.fill=Ga(s,a,t.propagate))},beforeDraw(n,i,t){let e=t.drawTime===`beforeDraw`,s=n.getSortedVisibleDatasetMetas(),o=n.chartArea;for(let a=s.length-1;a>=0;--a){let r=s[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),e&&r.fill&&di(n.ctx,r,o))}},beforeDatasetsDraw(n,i,t){if(t.drawTime!==`beforeDatasetsDraw`)return;let e=n.getSortedVisibleDatasetMetas();for(let s=e.length-1;s>=0;--s){let o=e[s].$filler;js(o)&&di(n.ctx,o,n.chartArea)}},beforeDatasetDraw(n,i,t){let e=i.meta.$filler;!js(e)||t.drawTime!==`beforeDatasetDraw`||di(n.ctx,e,n.chartArea)},defaults:{propagate:!0,drawTime:`beforeDatasetDraw`}};var Xs=(n,i)=>{let{boxHeight:t=i,boxWidth:e=i}=n;return n.usePointStyle&&(t=Math.min(t,i),e=n.pointStyleWidth||Math.min(e,i)),{boxWidth:e,boxHeight:t,itemHeight:Math.max(i,t)}};var fr=(n,i)=>n!==null&&i!==null&&n.datasetIndex===i.datasetIndex&&n.index===i.index;var Ce=class extends ht{constructor(i){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=i.chart,this.options=i.options,this.ctx=i.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(i,t,e){this.maxWidth=i,this.maxHeight=t,this._margins=e,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 i=this.options.labels||{},t=_(i.generateLabels,[this.chart],this)||[];i.filter&&(t=t.filter(e=>i.filter(e,this.chart.data))),i.sort&&(t=t.sort((e,s)=>i.sort(e,s,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){let{options:i,ctx:t}=this;if(!i.display){this.width=this.height=0;return}let e=i.labels,s=pc(e.font),o=s.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=Xs(e,o),c,h;t.font=s.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(a,o,r,l)+10):(h=this.maxHeight,c=this._fitCols(a,s,r,l)+10),this.width=Math.min(c,i.maxWidth||this.maxWidth),this.height=Math.min(h,i.maxHeight||this.maxHeight)}_fitRows(i,t,e,s){let{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=s+r,d=i;o.textAlign=`left`,o.textBaseline=`middle`;let u=-1,f=-h;
vendor: 5,123 bytes, line 1
1return this.legendItems.forEach((g,p)=>{let m=e+t/2+o.measureText(g.text).width;(p===0||c[c.length-1]+m+2*r>a)&&(d+=h,c[c.length-(p>0?0:1)]=0,f+=h,u++),l[p]={left:0,top:f,row:u,width:m,height:s},c[c.length-1]+=m+r}),d}_fitCols(i,t,e,s){let{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=a-i,d=r,u=0,f=0,g=0,p=0;return this.legendItems.forEach((m,x)=>{let{itemWidth:b,itemHeight:y}=gr(e,t,o,m,s);x>0&&f+y+2*r>h&&(d+=u+r,c.push({width:u,height:f}),g+=u+r,p++,u=f=0),l[x]={left:g,top:f,col:p,width:b,height:y},u=Math.max(u,b),f+=y+r}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;let i=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:e,labels:{padding:s},rtl:o}}=this,a=Zc(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=ja$1(e,this.left+s,this.right-this.lineWidths[r]);for(let c of t)r!==c.row&&(r=c.row,l=ja$1(e,this.left+s,this.right-this.lineWidths[r])),c.top+=this.top+i+s,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+s}else{let r=0,l=ja$1(e,this.top+i+s,this.bottom-this.columnSizes[r].height);for(let c of t)c.col!==r&&(r=c.col,l=ja$1(e,this.top+i+s,this.bottom-this.columnSizes[r].height)),c.top=l,c.left+=this.left+s,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position===`top`||this.options.position===`bottom`}draw(){if(this.options.display){let i=this.ctx;ic(i,this),this._draw(),nc(i)}}_draw(){let{options:i,columnSizes:t,lineWidths:e,ctx:s}=this,{align:o,labels:a}=i,r=Ga$1.color,l=Zc(i.rtl,this.left,this.width),c=pc(a.font),{padding:h}=a,d=c.size,u=d/2,f;this.drawTitle(),s.textAlign=l.textAlign(`left`),s.textBaseline=`middle`,s.lineWidth=.5,s.font=c.string;let{boxWidth:g,boxHeight:p,itemHeight:m}=Xs(a,d),x=function(v,S,k){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;s.save();let w=se$1(k.lineWidth,1);if(s.fillStyle=se$1(k.fillStyle,r),s.lineCap=se$1(k.lineCap,`butt`),s.lineDashOffset=se$1(k.lineDashOffset,0),s.lineJoin=se$1(k.lineJoin,`miter`),s.lineWidth=w,s.strokeStyle=se$1(k.strokeStyle,r),s.setLineDash(se$1(k.lineDash,[])),a.usePointStyle){let P={radius:p*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:w},D=l.xPlus(v,g/2),A=S+u;tr$1(s,P,D,A,a.pointStyleWidth&&g)}else{let P=S+Math.max((d-p)/2,0),D=l.leftForLtr(v,g),A=mc(k.borderRadius);s.beginPath(),Object.values(A).some(N=>N!==0)?uc(s,{x:D,y:P,w:g,h:p,radius:A}):s.rect(D,P,g,p),s.fill(),w!==0&&s.stroke()}s.restore()},b=function(v,S,k){lc(s,k.text,v,S+m/2,c,{strikethrough:k.hidden,textAlign:l.textAlign(k.textAlign)})},y=this.isHorizontal(),M=this._computeTitleHeight();y?f={x:ja$1(o,this.left+h,this.right-e[0]),y:this.top+h+M,line:0}:f={x:this.left+h,y:ja$1(o,this.top+M+h,this.bottom-t[0].height),line:0},$c(this.ctx,i.textDirection);let _=m+h;this.legendItems.forEach((v,S)=>{s.strokeStyle=v.fontColor,s.fillStyle=v.fontColor;let k=s.measureText(v.text).width,w=l.textAlign(v.textAlign||(v.textAlign=a.textAlign)),P=g+u+k,D=f.x,A=f.y;l.setWidth(this.width),y?S>0&&D+P+h>this.right&&(A=f.y+=_,f.line++,D=f.x=ja$1(o,this.left+h,this.right-e[f.line])):S>0&&A+_>this.bottom&&(D=f.x=D+t[f.line].width+h,f.line++,A=f.y=ja$1(o,this.top+M+h,this.bottom-t[f.line].height));let N=l.x(D);if(x(N,A,v),D=Ra$1(w,D+g+u,y?D+P:this.right,i.rtl),b(l.x(D),A,v),y)f.x+=P+h;else if(typeof v.text!=`string`){let Z=c.lineHeight;f.y+=Cn(v,Z)+h}else f.y+=_}),Kc(this.ctx,i.textDirection)}drawTitle(){let i=this.options,t=i.title,e=pc(t.font),s=gc(t.padding);if(!t.display)return;let o=Zc(i.rtl,this.left,this.width),a=this.ctx,r=t.position,l=e.size/2,c=s.top+l,h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=ja$1(i.align,d,this.right-u);else{let g=this.columnSizes.reduce((p,m)=>Math.max(p,m.height),0);h=c+ja$1(i.align,this.top,this.bottom-g-i.labels.padding-this._computeTitleHeight())}let f=ja$1(r,d,d+u);a.textAlign=o.textAlign(La$1(r)),a.textBaseline=`middle`,a.strokeStyle=t.color,a.fillStyle=t.color,a.font=e.string,lc(a,t.text,f,h,e)}_computeTitleHeight(){let i=this.options.title,t=pc(i.font),e=gc(i.padding);return i.display?t.lineHeight+e.height:0}_getLegendItemAt(i,t){let e,s,o;if(Xs$1(i,this.left,this.right)&&Xs$1(t,this.top,this.bottom)){for(o=this.legendHitBoxes,e=0;e<o.length;++e)if(s=o[e],Xs$1(i,s.left,s.left+s.width)&&Xs$1(t,s.top,s.top+s.height))return this.legendItems[e]}return null}handleEvent(i){let t=this.options;if(!br(i.type,t))return;let e=this._getLegendItemAt(i.x,i.y);if(i.type===`mousemove`||i.type===`mouseout`){let s=this._hoveredItem,o=fr(s,e);s&&!o&&_(t.onLeave,[i,s,this],this),this._hoveredItem=e,e&&!o&&_(t.onHover,[i,e,this],this)}else e&&_(t.onClick,[i,e,this],this)}};function gr(n,i,t,e,s){return{itemWidth:pr(e,n,i,t),itemHeight:mr(s,e,i.lineHeight)}}function pr(n,i,t,e){let s=n.text;return s&&typeof s!=`string`&&(s=s.reduce((o,a)=>o.length>a.length?o:a)),i+t.size/2+e.measureText(s).width}function mr(n,i,t){let e=n;return typeof i.text!=`string`&&(e=Cn(i,t)),e}function Cn(n,i){return i*(n.text?n.text.length:0)}function br(n,i){return!!((n===`mousemove`||n===`mouseout`)&&(i.on
vendor: 5,547 bytes, lines 1-3
1Hover||i.onLeave)||i.onClick&&(n===`click`||n===`mouseup`))}var xr={id:`legend`,_element:Ce,start(n,i,t){let e=n.legend=new Ce({ctx:n.ctx,options:t,chart:n});X.configure(n,e,t),X.addBox(n,e)},stop(n){X.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,i,t){let e=n.legend;X.configure(n,e,t),e.options=t},afterUpdate(n){let i=n.legend;i.buildLabels(),i.adjustHitBoxes()},afterEvent(n,i){i.replay||n.legend.handleEvent(i.event)},defaults:{display:!0,position:`top`,align:`center`,fullSize:!0,reverse:!1,weight:1e3,onClick(n,i,t){let e=i.datasetIndex,s=t.chart;s.isDatasetVisible(e)?(s.hide(e),i.hidden=!0):(s.show(e),i.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){let i=n.data.datasets,{labels:{usePointStyle:t,pointStyle:e,textAlign:s,color:o,useBorderRadius:a,borderRadius:r}}=n.legend.options;return n._getSortedDatasetMetas().map(l=>{let c=l.controller.getStyle(t?0:void 0),h=gc(c.borderWidth);return{text:i[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:e||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:a&&(r||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:n=>n.chart.options.color,display:!1,position:`center`,text:``}},descriptors:{_scriptable:n=>!n.startsWith(`on`),labels:{_scriptable:n=>![`generateLabels`,`filter`,`sort`].includes(n)}}};var se=class extends ht{constructor(i){super(),this.chart=i.chart,this.options=i.options,this.ctx=i.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(i,t){let e=this.options;if(this.left=0,this.top=0,!e.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=i,this.height=this.bottom=t;let s=he(e.text)?e.text.length:1;this._padding=gc(e.padding);let o=s*pc(e.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){let i=this.options.position;return i===`top`||i===`bottom`}_drawArgs(i){let{top:t,left:e,bottom:s,right:o,options:a}=this,r=a.align,l=0,c,h,d;return this.isHorizontal()?(h=ja$1(r,e,o),d=t+i,c=o-e):(a.position===`left`?(h=e+i,d=ja$1(r,s,t),l=V*-.5):(h=o-i,d=ja$1(r,t,s),l=V*.5),c=s-t),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){let i=this.ctx,t=this.options;if(!t.display)return;let e=pc(t.font),o=e.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=this._drawArgs(o);lc(i,t.text,0,0,e,{color:t.color,maxWidth:l,rotation:c,textAlign:La$1(t.align),textBaseline:`middle`,translation:[a,r]})}};function _r(n,i){let t=new se({ctx:n.ctx,options:i,chart:n});X.configure(n,t,i),X.addBox(n,t),n.titleBlock=t}var yr={id:`title`,_element:se,start(n,i,t){_r(n,t)},stop(n){let i=n.titleBlock;X.removeBox(n,i),delete n.titleBlock},beforeUpdate(n,i,t){let e=n.titleBlock;X.configure(n,e,t),e.options=t},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}};var be=new WeakMap;var vr={id:`subtitle`,start(n,i,t){let e=new se({ctx:n.ctx,options:t,chart:n});X.configure(n,e,t),X.addBox(n,e),be.set(n,e)},stop(n){X.removeBox(n,be.get(n)),be.delete(n)},beforeUpdate(n,i,t){let e=be.get(n);X.configure(n,e,t),e.options=t},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}};var te={average(n){if(!n.length)return!1;let i,t,e=new Set,s=0,o=0;for(i=0,t=n.length;i<t;++i){let r=n[i].element;if(r&&r.hasValue()){let l=r.tooltipPosition();e.add(l.x),s+=l.y,++o}}return o===0||e.size===0?!1:{x:[...e].reduce((r,l)=>r+l)/e.size,y:s/o}},nearest(n,i){if(!n.length)return!1;let t=i.x,e=i.y,s=Number.POSITIVE_INFINITY,o,a,r;for(o=0,a=n.length;o<a;++o){let l=n[o].element;if(l&&l.hasValue()){let h=on$1(i,l.getCenterPoint());h<s&&(s=h,r=l)}}if(r){let l=r.tooltipPosition();t=l.x,e=l.y}return{x:t,y:e}}};function st(n,i){return i&&(he(i)?Array.prototype.push.apply(n,i):n.push(i)),n}function ct(n){return(typeof n==`string`||n instanceof String)&&n.indexOf(`
2`)>-1?n.split(`
3`):n}function Mr(n,i){let{element:t,datasetIndex:e,index:s}=i,o=n.getDatasetMeta(e).controller,{label:a,value:r}=o.getLabelAndValue(s);return{chart:n,label:a,parsed:o.getParsed(s),raw:n.data.datasets[e].data[s],formattedValue:r,dataset:o.getDataset(),dataIndex:s,datasetIndex:e,element:t}}function Ks(n,i){let t=n.chart.ctx,{body:e,footer:s,title:o}=n,{boxWidth:a,boxHeight:r}=i,l=pc(i.bodyFont),c=pc(i.titleFont),h=pc(i.footerFont),d=o.length,u=s.length,f=e.length,g=gc(i.padding),p=g.height,m=0,x=e.reduce((M,_)=>M+_.before.length+_.lines.length+_.after.length,0);if(x+=n.beforeBody.length+n.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*i.titleSpacing+i.titleMarginBottom),x){let M=i.displayColors?Math.max(r,l.lineHeight):l.lineHeight;p+=f*M+(x-f)*l.lineHeight+(x-1)*i.bodySpacing}u&&(p+=i.footerMarginTop+u*h.lineHeight+(u-1)*i.footerSpacing);let b=0,y=function(M){m=Math.max(m,t.measureText(M).width+b)};return t.save(),t.font=c.string,Te(n.title,y),t.font=l.string,Te(n.beforeBody.concat(n.afterBody),y),b=i.displayColors?a+2+i.boxPadding:0,Te(e,M=>{Te(M.before,y),Te(M.lines,y),Te(M.after,y)}
vendor: 11,732 bytes, line 3
3),b=0,t.font=h.string,Te(n.footer,y),t.restore(),m+=g.width,{width:m,height:p}}function kr(n,i){let{y:t,height:e}=i;return t<e/2?`top`:t>n.height-e/2?`bottom`:`center`}function Sr(n,i,t,e){let{x:s,width:o}=e,a=t.caretSize+t.caretPadding;if(n===`left`&&s+o+a>i.width||n===`right`&&s-o-a<0)return!0}function wr(n,i,t,e){let{x:s,width:o}=t,{width:a,chartArea:{left:r,right:l}}=n,c=`center`;return e===`center`?c=s<=(r+l)/2?`left`:`right`:s<=o/2?c=`left`:s>=a-o/2&&(c=`right`),Sr(c,n,i,t)&&(c=`center`),c}function Gs(n,i,t){let e=t.yAlign||i.yAlign||kr(n,t);return{xAlign:t.xAlign||i.xAlign||wr(n,i,t,e),yAlign:e}}function Dr(n,i){let{x:t,width:e}=n;return i===`right`?t-=e:i===`center`&&(t-=e/2),t}function Pr(n,i,t){let{y:e,height:s}=n;return i===`top`?e+=t:i===`bottom`?e-=s+t:e-=s/2,e}function qs(n,i,t,e){let{caretSize:s,caretPadding:o,cornerRadius:a}=n,{xAlign:r,yAlign:l}=t,c=s+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=mc(a),g=Dr(i,r),p=Pr(i,l,c);return l===`center`?r===`left`?g+=c:r===`right`&&(g-=c):r===`left`?g-=Math.max(h,u)+s:r===`right`&&(g+=Math.max(d,f)+s),{x:xi$1(g,0,e.width-i.width),y:xi$1(p,0,e.height-i.height)}}function xe(n,i,t){let e=gc(t.padding);return i===`center`?n.x+n.width/2:i===`right`?n.x+n.width-e.right:n.x+e.left}function Js(n){return st([],ct(n))}function Cr(n,i,t){return sr$1(n,{tooltip:i,tooltipItems:t,type:`tooltip`})}function Zs(n,i){let t=i&&i.dataset&&i.dataset.tooltip&&i.dataset.tooltip.callbacks;return t?n.override(t):n}var An={beforeTitle:ca$1,title(n){if(n.length>0){let i=n[0],t=i.chart.data.labels,e=t?t.length:0;if(this&&this.options&&this.options.mode===`dataset`)return i.dataset.label||``;if(i.label)return i.label;if(e>0&&i.dataIndex<e)return t[i.dataIndex]}return``},afterTitle:ca$1,beforeBody:ca$1,beforeLabel:ca$1,label(n){if(this&&this.options&&this.options.mode===`dataset`)return n.label+`: `+n.formattedValue||n.formattedValue;let i=n.dataset.label||``;i&&(i+=`: `);let t=n.formattedValue;return Je(t)||(i+=t),i},labelColor(n){let t=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){let t=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:ca$1,afterBody:ca$1,beforeFooter:ca$1,footer:ca$1,afterFooter:ca$1};function q(n,i,t,e){let s=n[i].call(t,e);return typeof s>`u`?An[i].call(t,e):s}var Qs=(()=>{class n extends ht{static positioners=te;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,s=this.options.setContext(this.getContext()),o=s.enabled&&e.options.animation&&s.animations,a=new Me(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=Cr(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){let{callbacks:s}=e,o=q(s,`beforeTitle`,this,t),a=q(s,`title`,this,t),r=q(s,`afterTitle`,this,t),l=[];return l=st(l,ct(o)),l=st(l,ct(a)),l=st(l,ct(r)),l}getBeforeBody(t,e){return Js(q(e.callbacks,`beforeBody`,this,t))}getBody(t,e){let{callbacks:s}=e,o=[];return Te(t,a=>{let r={before:[],lines:[],after:[]},l=Zs(s,a);st(r.before,ct(q(l,`beforeLabel`,this,a))),st(r.lines,q(l,`label`,this,a)),st(r.after,ct(q(l,`afterLabel`,this,a))),o.push(r)}),o}getAfterBody(t,e){return Js(q(e.callbacks,`afterBody`,this,t))}getFooter(t,e){let{callbacks:s}=e,o=q(s,`beforeFooter`,this,t),a=q(s,`footer`,this,t),r=q(s,`afterFooter`,this,t),l=[];return l=st(l,ct(o)),l=st(l,ct(a)),l=st(l,ct(r)),l}_createItems(t){let e=this._active,s=this.chart.data,o=[],a=[],r=[],l=[],c,h;for(c=0,h=e.length;c<h;++c)l.push(Mr(this.chart,e[c]));return t.filter&&(l=l.filter((d,u,f)=>t.filter(d,u,f,s))),t.itemSort&&(l=l.sort((d,u)=>t.itemSort(d,u,s))),Te(l,d=>{let u=Zs(t.callbacks,d);o.push(q(u,`labelColor`,this,d)),a.push(q(u,`labelPointStyle`,this,d)),r.push(q(u,`labelTextColor`,this,d))}),this.labelColors=o,this.labelPointStyles=a,this.labelTextColors=r,this.dataPoints=l,l}update(t,e){let s=this.options.setContext(this.getContext()),o=this._active,a,r=[];if(!o.length)this.opacity!==0&&(a={opacity:0});else{let l=te[s.position].call(this,o,this._eventPosition);r=this._createItems(s),this.title=this.getTitle(r,s),this.beforeBody=this.getBeforeBody(r,s),this.body=this.getBody(r,s),this.afterBody=this.getAfterBody(r,s),this.footer=this.getFooter(r,s);let c=this._size=Ks(this,s),h=Object.assign({},l,c),d=Gs(this.chart,s,h),u=qs(s,h,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,a={opacity:1,x:u.x,y:u.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=r,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,o){let a=this.getCaretPosition(t,s,o);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,s){let{xAlign:o,yAlign:a}=this,{caretSize:r,cornerRadius:l}=s,{topLeft:c,topRight:h,bottomLeft:d,bottomRight:u}=mc(l),{x:f,y:g}=t,{width:p,height:m}=e,x,b,y,M,_,v;return a===`center`?(_=g+m/2,o===`left`?(x=f,b=x-r,M=_+r,v=_-r):(x=f+p,b=x+r,M=_-r,v=_+r),y=x):(o===`left`?b=f+Math.max(c,d)+r:o===`right`?b=f+p-Math.max(h,u)-r:b=this.caretX,a===`top`?(M=g,_=M-r,x=b-r,y=b+r):(M=g+m,_=M+r,x=b+r,y=b-r),v=M),{x1:x,x2:b,x3:y,y1:M,y2:_,y3:v}}drawTitle(t,e,s){let o=this.title,a=o.length,r,l,c;if(a){let h=Zc(s.rtl,this.x,this.width);for(t.x=xe(this,s.titleAlign,s),e.textAlign=h.textAlign(s.titleAlign),e.textBaseline=`middle`,r=pc(s.titleFont),l=s.titleSpacing,e.fillStyle=s.titleColor,e.font=r.string,c=0;c<a;++c)e.fillText(o[c],h.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+l,c+1===a&&(t.y+=s.titleMarginBottom-l)}}_drawColorBox(t,e,s,o,a){let r=this.labelColors[s],l=this.labelPointStyles[s],{boxHeight:c,boxWidth:h}=a,d=pc(a.bodyFont),u=xe(this,`left`,a),f=o.x(u),g=c<d.lineHeight?(d.lineHeight-c)/2:0,p=e.y+g;if(a.usePointStyle){let m={radius:Math.min(h,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},x=o.leftForLtr(f,h)+h/2,b=p+c/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,tc(t,m,x,b),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,tc(t,m,x,b)}else{t.lineWidth=Q(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 m=o.leftForLtr(f,h),x=o.leftForLtr(o.xPlus(f,1),h-2),b=mc(r.borderRadius);Object.values(b).some(y=>y!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,uc(t,{x:m,y:p,w:h,h:c,radius:b}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),uc(t,{x,y:p+1,w:h-2,h:c-2,radius:b}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(m,p,h,c),t.strokeRect(m,p,h,c),t.fillStyle=r.backgroundColor,t.fillRect(x,p+1,h-2,c-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){let{body:o}=this,{bodySpacing:a,bodyAlign:r,displayColors:l,boxHeight:c,boxWidth:h,boxPadding:d}=s,u=pc(s.bodyFont),f=u.lineHeight,g=0,p=Zc(s.rtl,this.x,this.width),m=function(w){e.fillText(w,p.x(t.x+g),t.y+f/2),t.y+=f+a},x=p.textAlign(r),b,y,M,_,v,S,k;for(e.textAlign=r,e.textBaseline=`middle`,e.font=u.string,t.x=xe(this,x,s),e.fillStyle=s.bodyColor,Te(this.beforeBody,m),g=l&&x!==`right`?r===`center`?h/2+d:h+2+d:0,_=0,S=o.length;_<S;++_){for(b=o[_],y=this.labelTextColors[_],e.fillStyle=y,Te(b.before,m),M=b.lines,l&&M.length&&(this._drawColorBox(e,t,_,p,s),f=Math.max(u.lineHeight,c)),v=0,k=M.length;v<k;++v)m(M[v]),f=u.lineHeight;Te(b.after,m)}g=0,f=u.lineHeight,Te(this.afterBody,m),t.y-=a}drawFooter(t,e,s){let o=this.footer,a=o.length,r,l;if(a){let c=Zc(s.rtl,this.x,this.width);for(t.x=xe(this,s.footerAlign,s),t.y+=s.footerMarginTop,e.textAlign=c.textAlign(s.footerAlign),e.textBaseline=`middle`,r=pc(s.footerFont),e.fillStyle=s.footerColor,e.font=r.string,l=0;l<a;++l)e.fillText(o[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+s.footerSpacing}}drawBackground(t,e,s,o){let{xAlign:a,yAlign:r}=this,{x:l,y:c}=t,{width:h,height:d}=s,{topLeft:u,topRight:f,bottomLeft:g,bottomRight:p}=mc(o.cornerRadius);e.fillStyle=o.backgroundColor,e.strokeStyle=o.borderColor,e.lineWidth=o.borderWidth,e.beginPath(),e.moveTo(l+u,c),r===`top`&&this.drawCaret(t,e,s,o),e.lineTo(l+h-f,c),e.quadraticCurveTo(l+h,c,l+h,c+f),r===`center`&&a===`right`&&this.drawCaret(t,e,s,o),e.lineTo(l+h,c+d-p),e.quadraticCurveTo(l+h,c+d,l+h-p,c+d),r===`bottom`&&this.drawCaret(t,e,s,o),e.lineTo(l+g,c+d),e.quadraticCurveTo(l,c+d,l,c+d-g),r===`center`&&a===`left`&&this.drawCaret(t,e,s,o),e.lineTo(l,c+u),e.quadraticCurveTo(l,c,l+u,c),e.closePath(),e.fill(),o.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,s=this.$animations,o=s&&s.x,a=s&&s.y;if(o||a){let r=te[t.position].call(this,this._active,this._eventPosition);if(!r)return;let l=this._size=Ks(this,t),c=Object.assign({},r,this._size),h=Gs(e,t,c),d=qs(t,c,h,e);(o._to!==d.x||a._to!==d.y)&&(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=l.width,this.height=l.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),s=this.opacity;if(!s)return;this._updateAnimationTarget(e);let o={width:this.width,height:this.height},a={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;let r=gc(e.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&l&&(t.save(),t.globalAlpha=s,this.drawBackground(a,t,o,e),$c(t,e.textDirection),a.y+=r.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),Kc(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let s=this._active,o=t.map(({datasetIndex:l,index:c})=>{let h=this.chart.getDatasetMeta(l);if(!h)throw new Error(`Cannot find a dataset at index `+l);return{datasetIndex:l,element:h.data[c],index:c}}),a=!fa$1(s,o),r=this._positionChanged(o,e);(a||r)&&(this._active=o,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let o=this.options,a=this._active||[],r=this._getActiveElements(t,a,e,s),l=this._positionChanged(r,t),c=e||!fa$1(r,a)||l;return c&&(this._active=r,(o.enabled||o.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),c}_getActiveElements(t,e,s,o){let a=this.options;if(t.type===`mouseout`)return[];if(!o)return e.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);let r=this.chart.getElementsAtEventForMode(t,a.mode,a,s);return a.reverse&&r.reverse(),r}_positionChanged(t,e){let{caretX:s,caretY:o,options:a}=this,r=te[a.position].call(this,t,e);return r!==!1&&(s!==r.x||o!==r.y)}}return n})();var Lr=Object.freeze({__proto__:null,Colors:Ha,Decimation:Ua,Filler
vendor: 11,535 bytes, line 3
3:ur,Legend:xr,SubTitle:vr,Title:yr,Tooltip:{id:`tooltip`,_element:Qs,positioners:te,afterInit(n,i,t){t&&(n.tooltip=new Qs({chart:n,options:t}))},beforeUpdate(n,i,t){n.tooltip&&n.tooltip.initialize(t)},reset(n,i,t){n.tooltip&&n.tooltip.initialize(t)},afterDraw(n){let i=n.tooltip;if(i&&i._willRender()){let t={tooltip:i};if(n.notifyPlugins(`beforeTooltipDraw`,A(z({},t),{cancelable:!0}))===!1)return;i.draw(n.ctx),n.notifyPlugins(`afterTooltipDraw`,t)}},afterEvent(n,i){if(n.tooltip){let t=i.replay;n.tooltip.handleEvent(i.event,t,i.inChartArea)&&(i.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:(n,i)=>i.bodyFont.size,boxWidth:(n,i)=>i.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:An},defaultRoutes:{bodyFont:`font`,footerFont:`font`,titleFont:`font`},descriptors:{_scriptable:n=>n!==`filter`&&n!==`itemSort`&&n!==`external`,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:`animation`}},additionalOptionScopes:[`interaction`]}});var Or=(n,i,t,e)=>(typeof i==`string`?(t=n.push(i)-1,e.unshift({index:t,label:i})):isNaN(i)&&(t=null),t);function Tr(n,i,t,e){let s=n.indexOf(i);if(s===-1)return Or(n,i,t,e);return s!==n.lastIndexOf(i)?t:s}var Er=(n,i)=>n===null?null:xi$1(Math.round(n),0,i);function tn(n){let i=this.getLabels();return n>=0&&n<i.length?i[n]:n}var Rr=(()=>{class n extends Pt{static id=`category`;static defaults={ticks:{callback:tn}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let e=this._addedLabels;if(e.length){let s=this.getLabels();for(let{index:o,label:a}of e)s[o]===a&&s.splice(o,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(Je(t))return null;let s=this.getLabels();return e=isFinite(e)&&s[e]===t?e:Tr(s,t,se$1(e,t),this._addedLabels),Er(e,s.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:s,max:o}=this.getMinMax(!0);this.options.bounds===`ticks`&&(t||(s=0),e||(o=this.getLabels().length-1)),this.min=s,this.max=o}buildTicks(){let t=this.min,e=this.max,s=this.options.offset,o=[],a=this.getLabels();a=t===0&&e===a.length-1?a:a.slice(t,e+1),this._valueRange=Math.max(a.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let r=t;r<=e;r++)o.push({value:r});return o}getLabelForValue(t){return tn.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!=`number`&&(t=this.parse(t)),t===null?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}}return n})();function Ir(n,i){let t=[],{bounds:s,step:o,min:a,max:r,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=n,f=o||1,g=h-1,{min:p,max:m}=i,x=!Je(a),b=!Je(r),y=!Je(c),M=(m-p)/(d+1),_=va$1((m-p)/g/f)*f,v,S,k,w;if(_<1e-14&&!x&&!b)return[{value:p},{value:m}];w=Math.ceil(m/_)-Math.floor(p/_),w>g&&(_=va$1(w*_/g/f)*f),Je(l)||(v=Math.pow(10,l),_=Math.ceil(_*v)/v),s===`ticks`?(S=Math.floor(p/_)*_,k=Math.ceil(m/_)*_):(S=p,k=m),x&&b&&o&&Ta$1((r-a)/o,_/1e3)?(w=Math.round(Math.min((r-a)/_,h)),_=(r-a)/w,S=a,k=r):y?(S=x?a:S,k=b?r:k,w=c-1,_=(k-S)/w):(w=(k-S)/_,gt(w,Math.round(w),_/1e3)?w=Math.round(w):w=Math.ceil(w));let P=Math.max(wa$1(_),wa$1(S));v=Math.pow(10,Je(l)?P:l),S=Math.round(S*v)/v,k=Math.round(k*v)/v;let D=0;for(x&&(u&&S!==a?(t.push({value:a}),S<a&&D++,gt(Math.round((S+D*_)*v)/v,a,en(a,M,n))&&D++):S<a&&D++);D<w;++D){let A=Math.round((S+D*_)*v)/v;if(b&&A>r)break;t.push({value:A})}return b&&u&&k!==r?t.length&&gt(t[t.length-1].value,r,en(r,M,n))?t[t.length-1].value=r:t.push({value:r}):(!b||k===r)&&t.push({value:k}),t}function en(n,i,{horizontal:t,minRotation:e}){let s=Ca$1(e),o=(t?Math.sin(s):Math.cos(s))||.001,a=.75*i*(``+n).length;return Math.min(i/o,a)}var Bt=class extends Pt{constructor(i){super(i),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(i,t){return Je(i)||(typeof i==`number`||i instanceof Number)&&!isFinite(+i)?null:+i}handleTickRangeOptions(){let{beginAtZero:i}=this.options,{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:s,max:o}=this,a=l=>s=t?s:l,r=l=>o=e?o:l;if(i){let l=dt(s),c=dt(o);l<0&&c<0?r(0):l>0&&c>0&&a(0)}if(s===o){let l=o===0?1:Math.abs(o*.05);r(o+l),i||a(s-l)}this.min=s,this.max=o}getTickLimit(){let{maxTicksLimit:t,stepSize:e}=this.options.ticks,s;return e?(s=Math.ceil(this.max/e)-Math.floor(this.min/e)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${e} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let i=this.options,t=i.ticks,e=this.getTickLimit();e=Math.max(2,e);let a=Ir({maxTicks:e,bounds:i.bounds,min:i.min,max:i.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},this._range||this);return i.bounds===`ticks`&&ka$1(a,this,`value`),i.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){let i=this.ticks,t=this.min,e=this.max;if(super.configure(),this.options.offset&&i.length){let s=(e-t)/Math.max(i.length-1,1)/2;t-=s,e+=s}this._startValue=t,this._endValue=e,this._valueRange=e-t}getLabelForValue(i){return Qs$1(i,this.chart.options.locale,this.options.ticks.format)}};var zr=(()=>{class n extends Bt{static id=`linear`;static defaults={ticks:{callback:$a$1.formatters.numeric}};determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=ln$1(t)?t:0,this.max=ln$1(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),e=t?this.width:this.height,s=Ca$1(this.options.ticks.minRotation),o=(t?Math.sin(s):Math.cos(s))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,a.lineHeight/o))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}return n})();var ne=n=>Math.floor(Ai$1(n));var Dt=(n,i)=>Math.pow(10,ne(n)+i);function sn(n){return n/Math.pow(10,ne(n))===1}function nn(n,i,t){let e=Math.pow(10,t),s=Math.floor(n/e);return Math.ceil(i/e)-s}function Fr(n,i){let e=ne(i-n);for(;nn(n,i,e)>10;)e++;for(;nn(n,i,e)<10;)e--;return Math.min(e,ne(n))}function Br(n,{min:i,max:t}){i=ua$1(n.min,i);let e=[],s=ne(i),o=Fr(i,t),a=o<0?Math.pow(10,Math.abs(o)):1,r=Math.pow(10,o),l=s>o?Math.pow(10,s):0,c=Math.round((i-l)*a)/a,h=Math.floor((i-l)/r/10)*r*10,d=Math.floor((c-h)/Math.pow(10,o)),u=ua$1(n.min,Math.round((l+h+d*Math.pow(10,o))*a)/a);for(;u<t;)e.push({value:u,major:sn(u),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,a=o>=0?1:a),u=Math.round((l+h+d*Math.pow(10,o))*a)/a;let f=ua$1(n.max,u);return e.push({value:f,major:sn(f),significand:d}),e}var Vr=(()=>{class n extends Pt{static id=`logarithmic`;static defaults={ticks:{callback:$a$1.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 s=Bt.prototype.parse.apply(this,[t,e]);if(s===0){this._zero=!0;return}return ln$1(s)&&s>0?s:null}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=ln$1(t)?Math.max(0,t):null,this.max=ln$1(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ln$1(this._userMin)&&(this.min=t===Dt(this.min,0)?Dt(this.min,-1):Dt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),s=this.min,o=this.max,a=l=>s=t?s:l,r=l=>o=e?o:l;s===o&&(s<=0?(a(1),r(10)):(a(Dt(s,-1)),r(Dt(o,1)))),s<=0&&a(Dt(o,-1)),o<=0&&r(Dt(s,1)),this.min=s,this.max=o}buildTicks(){let t=this.options,s=Br({min:this._userMin,max:this._userMax},this);return t.bounds===`ticks`&&ka$1(s,this,`value`),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(t){return t===void 0?`0`:Qs$1(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=Ai$1(t),this._valueRange=Ai$1(this.max)-Ai$1(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Ai$1(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}return n})();function Pi(n){let i=n.ticks;if(i.display&&n.display){let t=gc(i.backdropPadding);return se$1(i.font&&i.font.size,Ga$1.font.size)+t.height}return 0}function Nr(n,i,t){return t=he(t)?t:[t],{w:Qa$1(n,i.string,t),h:t.length*i.lineHeight}}function on(n,i,t,e,s){return n===e||n===s?{start:i-t/2,end:i+t/2}:n<e||n>s?{start:i-t,end:i}:{start:i,end:i+t}}function Wr(n){let i={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},t=Object.assign({},i),e=[],s=[],o=n._pointLabels.length,a=n.options.pointLabels,r=a.centerPointLabels?V/o:0;for(let l=0;l<o;l++){let c=a.setContext(n.getPointLabelContext(l));s[l]=c.padding;let h=n.getPointPosition(l,n.drawingArea+s[l],r),d=pc(c.font),u=Nr(n.ctx,d,n._pointLabels[l]);e[l]=u;let f=Pe$1(n.getIndexAngle(l)+r),g=Math.round(Ia$1(f));Hr(t,i,f,on(g,h.x,u.w,0,180),on(g,h.y,u.h,90,270))}n.setCenterPoint(i.l-t.l,t.r-i.r,i.t-t.t,t.b-i.b),n._pointLabelItems=Yr(n,e,s)}function Hr(n,i,t,e,s){let o=Math.abs(Math.sin(t)),a=Math.abs(Math.cos(t)),r=0,l=0;e.start<i.l?(r=(i.l-e.start)/o,n.l=Math.min(n.l,i.l-r)):e.end>i.r&&(r=(e.end-i.r)/o,n.r=Math.max(n.r,i.r+r)),s.start<i.t?(l=(i.t-s.start)/a,n.t=Math.min(n.t,i.t-l)):s.end>i.b&&(l=(s.end-i.b)/a,n.b=Math.max(n.b,i.b+l))}function jr(n,i,t){let e=n.drawingArea,{extra:s,additionalAngle:o,padding:a,size:r}=t,l=n.getPointPosition(i,e+s+a,o),c=Math.round(Ia$1(Pe$1(l.angle+ye$1))),h=Kr(l.y,r.h,c),d=Ur(c),u=Xr(l.x,r.w,d);return{visible:!0,x:l.x,y:h,textAlign:d,left:u,top:h,right:u+r.w,bottom:h+r.h}}function $r(n,i){if(!i)return!0;let{left:t,top:e,right:s,bottom:o}=n;return!(Rt({x:t,y:e},i)||Rt({x:t,y:o},i)||Rt({x:s,y:e},i)||Rt({x:s,y:o},i))}function Yr(n,i,t){let e=[],s=n._pointLabels.length,o=n.options,{centerPointLabels:a,display:r}=o.pointLabels,l={extra:Pi(o)/2,additionalAngle:a?V/s:0},c;for(let h=0;h<s;h++){l.padding=t[h],l.size=i[h];let d=jr(n,h,l);e.push(d),r===`auto`&&(d.visible=$r(d,c),d.visible&&(c=d))}return e}function Ur(n){return n===0||n===180?`center`:n<180?`left`:`right`}function Xr(n,i,t){return t===`right`?n-=i:t===`center`&&(n-=i/2),n}function Kr(n,i,t){return t===90||t===270?n-=i/2:(t>270||t<90)&&(n-=i),n}
vendor: 4,233 bytes, line 3
3function Gr(n,i,t){let{left:e,top:s,right:o,bottom:a}=t,{backdropColor:r}=i;if(!Je(r)){let l=mc(i.borderRadius),c=gc(i.backdropPadding);n.fillStyle=r;let h=e-c.left,d=s-c.top,u=o-e+c.width,f=a-s+c.height;Object.values(l).some(g=>g!==0)?(n.beginPath(),uc(n,{x:h,y:d,w:u,h:f,radius:l}),n.fill()):n.fillRect(h,d,u,f)}}function qr(n,i){let{ctx:t,options:{pointLabels:e}}=n;for(let s=i-1;s>=0;s--){let o=n._pointLabelItems[s];if(!o.visible)continue;let a=e.setContext(n.getPointLabelContext(s));Gr(t,a,o);let r=pc(a.font),{x:l,y:c,textAlign:h}=o;lc(t,n._pointLabels[s],l,c+r.lineHeight/2,r,{color:a.color,textAlign:h,textBaseline:`middle`})}}function Ln(n,i,t,e){let{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,i,0,de);else{let o=n.getPointPosition(0,i);s.moveTo(o.x,o.y);for(let a=1;a<e;a++)o=n.getPointPosition(a,i),s.lineTo(o.x,o.y)}}function Jr(n,i,t,e,s){let o=n.ctx,a=i.circular,{color:r,lineWidth:l}=i;!a&&!e||!r||!l||t<0||(o.save(),o.strokeStyle=r,o.lineWidth=l,o.setLineDash(s.dash||[]),o.lineDashOffset=s.dashOffset,o.beginPath(),Ln(n,t,a,e),o.closePath(),o.stroke(),o.restore())}function Zr(n,i,t){return sr$1(n,{label:t,index:i,type:`pointLabel`})}var Ci=class extends Bt{static id=`radialLinear`;static defaults={display:!0,animate:!0,position:`chartArea`,angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:$a$1.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(i){return i},padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":`borderColor`,"pointLabels.color":`color`,"ticks.color":`color`};static descriptors={angleLines:{_fallback:`grid`}};constructor(i){super(i),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let i=this._padding=gc(Pi(this.options)/2),t=this.width=this.maxWidth-i.width,e=this.height=this.maxHeight-i.height;this.xCenter=Math.floor(this.left+t/2+i.left),this.yCenter=Math.floor(this.top+e/2+i.top),this.drawingArea=Math.floor(Math.min(t,e)/2)}determineDataLimits(){let{min:i,max:t}=this.getMinMax(!1);this.min=ln$1(i)&&!isNaN(i)?i:0,this.max=ln$1(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Pi(this.options))}generateTickLabels(i){Bt.prototype.generateTickLabels.call(this,i),this._pointLabels=this.getLabels().map((t,e)=>{let s=_(this.options.pointLabels.callback,[t,e],this);return s||s===0?s:``}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){let i=this.options;i.display&&i.pointLabels.display?Wr(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(i,t,e,s){this.xCenter+=Math.floor((i-t)/2),this.yCenter+=Math.floor((e-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(i,t,e,s))}getIndexAngle(i){let t=de/(this._pointLabels.length||1),e=this.options.startAngle||0;return Pe$1(i*t+Ca$1(e))}getDistanceFromCenterForValue(i){if(Je(i))return NaN;let t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-i)*t:(i-this.min)*t}getValueForDistanceFromCenter(i){if(Je(i))return NaN;let t=i/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(i){let t=this._pointLabels||[];if(i>=0&&i<t.length){let e=t[i];return Zr(this.getContext(),i,e)}}getPointPosition(i,t,e=0){let s=this.getIndexAngle(i)-ye$1+e;return{x:Math.cos(s)*t+this.xCenter,y:Math.sin(s)*t+this.yCenter,angle:s}}getPointPositionForValue(i,t){return this.getPointPosition(i,this.getDistanceFromCenterForValue(t))}getBasePosition(i){return this.getPointPositionForValue(i||0,this.getBaseValue())}getPointLabelPosition(i){let{left:t,top:e,right:s,bottom:o}=this._pointLabelItems[i];return{left:t,top:e,right:s,bottom:o}}drawBackground(){let{backgroundColor:i,grid:{circular:t}}=this.options;if(i){let e=this.ctx;e.save(),e.beginPath(),Ln(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),e.closePath(),e.fillStyle=i,e.fill(),e.restore()}}drawGrid(){let i=this.ctx,t=this.options,{angleLines:e,grid:s,border:o}=t,a=this._pointLabels.length,r,l,c;if(t.pointLabels.display&&qr(this,a),s.display&&this.ticks.forEach((h,d)=>
vendor: 9,558 bytes, line 3
3{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(h.value);let u=this.getContext(d),f=s.setContext(u),g=o.setContext(u);Jr(this,f,l,a,g)}}),e.display){for(i.save(),r=a-1;r>=0;r--){let h=e.setContext(this.getPointLabelContext(r)),{color:d,lineWidth:u}=h;!u||!d||(i.lineWidth=u,i.strokeStyle=d,i.setLineDash(h.borderDash),i.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),c=this.getPointPosition(r,l),i.beginPath(),i.moveTo(this.xCenter,this.yCenter),i.lineTo(c.x,c.y),i.stroke())}i.restore()}}drawBorder(){}drawLabels(){let i=this.ctx,t=this.options,e=t.ticks;if(!e.display)return;let s=this.getIndexAngle(0),o,a;i.save(),i.translate(this.xCenter,this.yCenter),i.rotate(s),i.textAlign=`center`,i.textBaseline=`middle`,this.ticks.forEach((r,l)=>{if(l===0&&this.min>=0&&!t.reverse)return;let c=e.setContext(this.getContext(l)),h=pc(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){i.font=h.string,a=i.measureText(r.label).width,i.fillStyle=c.backdropColor;let d=gc(c.backdropPadding);i.fillRect(-a/2-d.left,-o-h.size/2-d.top,a+d.width,h.size+d.height)}lc(i,r.label,0,-o,h,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),i.restore()}drawTitle(){}};var Le={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}};var J=Object.keys(Le);function an(n,i){return n-i}function rn(n,i){if(Je(i))return null;let t=n._adapter,{parser:e,round:s,isoWeekday:o}=n._parseOpts,a=i;return typeof e==`function`&&(a=e(a)),ln$1(a)||(a=typeof e==`string`?t.parse(a,e):t.parse(a)),a===null?null:(s&&(a=s===`week`&&(ya$1(o)||o===!0)?t.startOf(a,`isoWeek`,o):t.startOf(a,s)),+a)}function ln(n,i,t,e){let s=J.length;for(let o=J.indexOf(n);o<s-1;++o){let a=Le[J[o]],r=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((t-i)/(r*a.size))<=e)return J[o]}return J[s-1]}function Qr(n,i,t,e,s){for(let o=J.length-1;o>=J.indexOf(t);o--){let a=J[o];if(Le[a].common&&n._adapter.diff(s,e,a)>=i-1)return a}return J[t?J.indexOf(t):0]}function tl(n){for(let i=J.indexOf(n)+1,t=J.length;i<t;++i)if(Le[J[i]].common)return J[i]}function cn(n,i,t){if(!t)n[i]=!0;else if(t.length){let{lo:e,hi:s}=fn$1(t,i),o=t[e]>=i?t[e]:t[s];n[o]=!0}}function el(n,i,t,e){let s=n._adapter,o=+s.startOf(i[0].value,e),a=i[i.length-1].value,r,l;for(r=o;r<=a;r=+s.add(r,1,e))l=t[r],l>=0&&(i[l].major=!0);return i}function hn(n,i,t){let e=[],s={},o=i.length,a,r;for(a=0;a<o;++a)r=i[a],s[r]=a,e.push({value:r,major:!1});return o===0||!t?e:el(n,e,s,t)}var Ai=(()=>{class n extends Pt{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 s=t.time||(t.time={}),o=this._adapter=new ro._date(t.adapters.date);o.init(e),Hs$1(s.displayFormats,o.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:rn(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,e=this._adapter,s=t.time.unit||`day`,{min:o,max:a,minDefined:r,maxDefined:l}=this.getUserBounds();function c(h){!r&&!isNaN(h.min)&&(o=Math.min(o,h.min)),!l&&!isNaN(h.max)&&(a=Math.max(a,h.max))}(!r||!l)&&(c(this._getLabelBounds()),(t.bounds!==`ticks`||t.ticks.source!==`labels`)&&c(this.getMinMax(!1))),o=ln$1(o)&&!isNaN(o)?o:+e.startOf(Date.now(),s),a=ln$1(a)&&!isNaN(a)?a:+e.endOf(Date.now(),s)+1,this.min=Math.min(o,a-1),this.max=Math.max(o+1,a)}_getLabelBounds(){let t=this.getLabelTimestamps(),e=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],s=t[t.length-1]),{min:e,max:s}}buildTicks(){let t=this.options,e=t.time,s=t.ticks,o=s.source===`labels`?this.getLabelTimestamps():this._generate();t.bounds===`ticks`&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);let a=this.min,r=this.max,l=Pa$1(o,a,r);return this._unit=e.unit||(s.autoSkip?ln(e.minUnit,this.min,this.max,this._getLabelCapacity(a)):Qr(this,l.length,e.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit===`year`?void 0:tl(this._unit),this.initOffsets(o),t.reverse&&l.reverse(),hn(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,s=0,o,a;this.options.offset&&t.length&&(o=this.getDecimalForValue(t[0]),t.length===1?e=1-o:e=(this.getDecimalForValue(t[1])-o)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?s=a:s=(a-this.getDecimalForValue(t[t.length-2]))/2);let r=t.length<3?.5:.25;e=xi$1(e,0,r),s=xi$1(s,0,r),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){let t=this._adapter,e=this.min,s=this.max,o=this.options,a=o.time,r=a.unit||ln(a.minUnit,e,s,this._getLabelCapacity(e)),l=se$1(o.ticks.stepSize,1),c=r===`week`?a.isoWeekday:!1,h=ya$1(c)||c===!0,d={},u=e,f,g;if(h&&(u=+t.startOf(u,`isoWeek`,c)),u=+t.startOf(u,h?`day`:r),t.diff(s,e,r)>1e5*l)throw new Error(e+` and `+s+` are too far apart with stepSize of `+l+` `+r);let p=o.ticks.source===`data`&&this.getDataTimestamps();for(f=u,g=0;f<s;f=+t.add(f,l,r),g++)cn(d,f,p);return(f===s||o.bounds===`ticks`||g===1)&&cn(d,f,p),Object.keys(d).sort(an).map(m=>+m)}getLabelForValue(t){let e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}format(t,e){let o=this.options.time.displayFormats,a=this._unit,r=e||o[a];return this._adapter.format(t,r)}_tickFormatFunction(t,e,s,o){let a=this.options,r=a.ticks.callback;if(r)return _(r,[t,e,s],this);let l=a.time.displayFormats,c=this._unit,h=this._majorUnit,d=c&&l[c],u=h&&l[h],f=s[e],g=h&&u&&f&&f.major;return this._adapter.format(t,o||(g?u:d))}generateTickLabels(t){let e,s,o;for(e=0,s=t.length;e<s;++e)o=t[e],o.label=this._tickFormatFunction(o.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){let e=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+s)*e.factor)}getValueForPixel(t){let e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+s*(this.max-this.min)}_getLabelSize(t){let e=this.options.ticks,s=this.ctx.measureText(t).width,o=Ca$1(this.isHorizontal()?e.maxRotation:e.minRotation),a=Math.cos(o),r=Math.sin(o),l=this._resolveTickFontOptions(0).size;return{w:s*a+l*r,h:s*r+l*a}}_getLabelCapacity(t){let e=this.options.time,s=e.displayFormats,o=s[e.unit]||s.millisecond,a=this._tickFormatFunction(t,0,hn(this,[t],this._majorUnit),o),r=this._getLabelSize(a),l=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return l>0?l:1}getDataTimestamps(){let t=this._cache.data||[],e,s;if(t.length)return t;let o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(e=0,s=o.length;e<s;++e)t=t.concat(o[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){let t=this._cache.labels||[],e,s;if(t.length)return t;let o=this.getLabels();for(e=0,s=o.length;e<s;++e)t.push(rn(this,o[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Na$1(t.sort(an))}}return n})();function _e(n,i,t){let e=0,s=n.length-1,o,a,r,l;t?(i>=n[e].pos&&i<=n[s].pos&&({lo:e,hi:s}=Et(n,`pos`,i)),{pos:o,time:r}=n[e],{pos:a,time:l}=n[s]):(i>=n[e].time&&i<=n[s].time&&({lo:e,hi:s}=Et(n,`time`,i)),{time:o,pos:r}=n[e],{time:a,pos:l}=n[s]);let c=a-o;return c?r+(l-r)*(i-o)/c:r}var il=(()=>{class n extends Ai{static id=`timeseries`;static defaults=Ai.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=_e(e,this.min),this._tableRange=_e(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let{min:e,max:s}=this,o=[],a=[],r,l,c,h,d;for(r=0,l=t.length;r<l;++r)h=t[r],h>=e&&h<=s&&o.push(h);if(o.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(r=0,l=o.length;r<l;++r)d=o[r+1],c=o[r-1],h=o[r],Math.round((d+c)/2)!==h&&a.push({time:h,pos:r/(l-1)});return a}_generate(){let t=this.min,e=this.max,s=super.getDataTimestamps();return(!s.includes(t)||!s.length)&&s.splice(0,0,t),(!s.includes(e)||s.length===1)&&s.push(e),s.sort((o,a)=>o-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;let e=this.getDataTimestamps(),s=this.getLabelTimestamps();return e.length&&s.length?t=this.normalize(e.concat(s)):t=e.length?e:s,t=this._cache.all=t,t}getDecimalForValue(t){return(_e(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){let e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return _e(this._table,s*this._tableRange+this._minPos,!0)}}return n})();var ol=[ao,Ia,Lr,Object.freeze({__proto__:null,CategoryScale:Rr,LinearScale:zr,LogarithmicScale:Vr,RadialLinearScale:Ci,TimeScale:Ai,TimeSeriesScale:il})];export{ro as a,ol as i,Ra as n,ua as o,ki as r,Ca as t};

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.