UNPKG

itowns

Version:

A JS/WebGL framework for 3D geospatial data visualization

2 lines 298 kB
/*! For license information please see debug.js.LICENSE.txt */ "use strict";!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("debug",[],e):"object"==typeof exports?exports.debug=e():t.debug=e()}(self,(function(){return(self.webpackChunk_name_=self.webpackChunk_name_||[]).push([[711],{85003:(t,e,n)=>{n.r(e),n.d(e,{Debug:()=>yo,GeometryDebug:()=>Eo,PotreeDebug:()=>Mo,create3dTilesDebugUI:()=>Bo,createTileDebugUI:()=>No});var i=n(2212),a=n(45622),o=n(21538),r=n(97661);const s="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function l(t,e,n){const i=n||(t=>Array.prototype.slice.call(t));let a=!1,o=[];return function(...n){o=i(n),a||(a=!0,s.call(window,(()=>{a=!1,t.apply(e,o)})))}}const q=(t,e,n)=>"start"===t?e:"end"===t?n:(e+n)/2,c=function(){let t=0;return function(){return t++}}();function h(t){return null==t}function d(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function u(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const m=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function f(t,e){return m(t)?t:e}function g(t,e){return void 0===t?e:t}const p=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function x(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)}function b(t,e,n,i){let a,o,r;if(d(t))if(o=t.length,i)for(a=o-1;a>=0;a--)e.call(n,t[a],a);else for(a=0;a<o;a++)e.call(n,t[a],a);else if(u(t))for(r=Object.keys(t),o=r.length,a=0;a<o;a++)e.call(n,t[r[a]],r[a])}function _(t,e){let n,i,a,o;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(a=t[n],o=e[n],a.datasetIndex!==o.datasetIndex||a.index!==o.index)return!1;return!0}function y(t){if(d(t))return t.map(y);if(u(t)){const e=Object.create(null),n=Object.keys(t),i=n.length;let a=0;for(;a<i;++a)e[n[a]]=y(t[n[a]]);return e}return t}function v(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function w(t,e,n,i){if(!v(t))return;const a=e[t],o=n[t];u(a)&&u(o)?M(a,o,i):e[t]=y(o)}function M(t,e,n){const i=d(e)?e:[e],a=i.length;if(!u(t))return t;const o=(n=n||{}).merger||w;for(let r=0;r<a;++r){if(!u(e=i[r]))continue;const a=Object.keys(e);for(let i=0,r=a.length;i<r;++i)o(a[i],t,e,n)}return t}function k(t,e){return M(t,e,{merger:S})}function S(t,e,n){if(!v(t))return;const i=e[t],a=n[t];u(i)&&u(a)?k(i,a):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=y(a))}function C(t,e){const n=t.indexOf(".",e);return-1===n?t.length:n}function D(t,e){if(""===e)return t;let n=0,i=C(e,n);for(;t&&i>n;)t=t[e.substr(n,i-n)],n=i+1,i=C(e,n);return t}function O(t){return t.charAt(0).toUpperCase()+t.slice(1)}const P=t=>void 0!==t,A=t=>"function"==typeof t,T=Math.PI,E=2*T,R=E+T,L=Number.POSITIVE_INFINITY,I=T/180,F=T/2,z=T/4,N=2*T/3,V=Math.log10,B=Math.sign;function j(t){const e=Math.round(t);t=H(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(V(t))),i=t/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function W(t){return!isNaN(parseFloat(t))&&isFinite(t)}function H(t,e,n){return Math.abs(t-e)<n}function $(t,e,n){let i,a,o;for(i=0,a=t.length;i<a;i++)o=t[i][n],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function U(t){return t*(T/180)}function Y(t){return t*(180/T)}function X(t){if(!m(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function G(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Z(t,e){return(t-e+R)%E-T}function K(t){return(t%E+E)%E}function Q(t,e,n,i){const a=K(t),o=K(e),r=K(n),s=K(o-a),l=K(r-a),q=K(a-o),c=K(a-r);return a===o||a===r||i&&o===r||s>l&&q<c}function J(t,e,n){return Math.max(e,Math.min(n,t))}const tt=t=>0===t||1===t,et=(t,e,n)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*E/n),nt=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*E/n)+1,it={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*F),easeOutSine:t=>Math.sin(t*F),easeInOutSine:t=>-.5*(Math.cos(T*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>tt(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>tt(t)?t:et(t,.075,.3),easeOutElastic:t=>tt(t)?t:nt(t,.075,.3),easeInOutElastic(t){const e=.1125;return tt(t)?t:t<.5?.5*et(2*t,e,.45):.5+.5*nt(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-it.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},easeInOutBounce:t=>t<.5?.5*it.easeInBounce(2*t):.5*it.easeOutBounce(2*t-1)+.5},at={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},ot="0123456789ABCDEF",rt=t=>ot[15&t],st=t=>ot[(240&t)>>4]+ot[15&t],lt=t=>(240&t)>>4==(15&t);function qt(t){return t+.5|0}const ct=(t,e,n)=>Math.max(Math.min(t,n),e);function ht(t){return ct(qt(2.55*t),0,255)}function dt(t){return ct(qt(255*t),0,255)}function ut(t){return ct(qt(t/2.55)/100,0,1)}function mt(t){return ct(qt(100*t),0,100)}const ft=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,gt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function pt(t,e,n){const i=e*Math.min(n,1-n),a=(e,a=(e+t/30)%12)=>n-i*Math.max(Math.min(a-3,9-a,1),-1);return[a(0),a(8),a(4)]}function xt(t,e,n){const i=(i,a=(i+t/60)%6)=>n-n*e*Math.max(Math.min(a,4-a,1),0);return[i(5),i(3),i(1)]}function bt(t,e,n){const i=pt(t,1,.5);let a;for(e+n>1&&(a=1/(e+n),e*=a,n*=a),a=0;a<3;a++)i[a]*=1-e-n,i[a]+=e;return i}function _t(t){const e=t.r/255,n=t.g/255,i=t.b/255,a=Math.max(e,n,i),o=Math.min(e,n,i),r=(a+o)/2;let s,l,q;return a!==o&&(q=a-o,l=r>.5?q/(2-a-o):q/(a+o),s=a===e?(n-i)/q+(n<i?6:0):a===n?(i-e)/q+2:(e-n)/q+4,s=60*s+.5),[0|s,l||0,r]}function yt(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(dt)}function vt(t,e,n){return yt(pt,t,e,n)}function wt(t){return(t%360+360)%360}const Mt={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},kt={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let St;function Ct(t,e,n){if(t){let i=_t(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,0===e?360:1)),i=vt(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function Dt(t,e){return t?Object.assign(e||{},t):t}function Ot(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=dt(t[3]))):(e=Dt(t,{r:0,g:0,b:0,a:1})).a=dt(e.a),e}function Pt(t){return"r"===t.charAt(0)?function(t){const e=ft.exec(t);let n,i,a,o=255;if(e){if(e[7]!==n){const t=+e[7];o=255&(e[8]?ht(t):255*t)}return n=+e[1],i=+e[3],a=+e[5],n=255&(e[2]?ht(n):n),i=255&(e[4]?ht(i):i),a=255&(e[6]?ht(a):a),{r:n,g:i,b:a,a:o}}}(t):function(t){const e=gt.exec(t);let n,i=255;if(!e)return;e[5]!==n&&(i=e[6]?ht(+e[5]):dt(+e[5]));const a=wt(+e[2]),o=+e[3]/100,r=+e[4]/100;return n="hwb"===e[1]?function(t,e,n){return yt(bt,t,e,n)}(a,o,r):"hsv"===e[1]?function(t,e,n){return yt(xt,t,e,n)}(a,o,r):vt(a,o,r),{r:n[0],g:n[1],b:n[2],a:i}}(t)}class At{constructor(t){if(t instanceof At)return t;const e=typeof t;let n;var i,a,o;"object"===e?n=Ot(t):"string"===e&&(o=(i=t).length,"#"===i[0]&&(4===o||5===o?a={r:255&17*at[i[1]],g:255&17*at[i[2]],b:255&17*at[i[3]],a:5===o?17*at[i[4]]:255}:7!==o&&9!==o||(a={r:at[i[1]]<<4|at[i[2]],g:at[i[3]]<<4|at[i[4]],b:at[i[5]]<<4|at[i[6]],a:9===o?at[i[7]]<<4|at[i[8]]:255})),n=a||function(t){St||(St=function(){const t={},e=Object.keys(kt),n=Object.keys(Mt);let i,a,o,r,s;for(i=0;i<e.length;i++){for(r=s=e[i],a=0;a<n.length;a++)o=n[a],s=s.replace(o,Mt[o]);o=parseInt(kt[r],16),t[s]=[o>>16&255,o>>8&255,255&o]}return t}(),St.transparent=[0,0,0,0]);const e=St[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||Pt(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=Dt(this._rgb);return t&&(t.a=ut(t.a)),t}set rgb(t){this._rgb=Ot(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${ut(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?(t=this._rgb,e=function(t){return lt(t.r)&&lt(t.g)&&lt(t.b)&&lt(t.a)}(t)?rt:st,t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t):this._rgb;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=_t(t),n=e[0],i=mt(e[1]),a=mt(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${a}%, ${ut(t.a)})`:`hsl(${n}, ${i}%, ${a}%)`}(this._rgb):this._rgb}mix(t,e){const n=this;if(t){const i=n.rgb,a=t.rgb;let o;const r=e===o?.5:e,s=2*r-1,l=i.a-a.a,q=((s*l==-1?s:(s+l)/(1+s*l))+1)/2;o=1-q,i.r=255&q*i.r+o*a.r+.5,i.g=255&q*i.g+o*a.g+.5,i.b=255&q*i.b+o*a.b+.5,i.a=r*i.a+(1-r)*a.a,n.rgb=i}return n}clone(){return new At(this.rgb)}alpha(t){return this._rgb.a=dt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=qt(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Ct(this._rgb,2,t),this}darken(t){return Ct(this._rgb,2,-t),this}saturate(t){return Ct(this._rgb,1,t),this}desaturate(t){return Ct(this._rgb,1,-t),this}rotate(t){return function(t,e){var n=_t(t);n[0]=wt(n[0]+e),n=vt(n),t.r=n[0],t.g=n[1],t.b=n[2]}(this._rgb,t),this}}function Tt(t){return new At(t)}const Et=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function Rt(t){return Et(t)?t:Tt(t)}function Lt(t){return Et(t)?t:Tt(t).saturate(.5).darken(.1).hexString()}const It=Object.create(null),Ft=Object.create(null);function zt(t,e){if(!e)return t;const n=e.split(".");for(let e=0,i=n.length;e<i;++e){const i=n[e];t=t[i]||(t[i]=Object.create(null))}return t}function Nt(t,e,n){return"string"==typeof e?M(zt(t,e),n):M(zt(t,""),e)}var Vt=new class{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Lt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Lt(e.borderColor),this.hoverColor=(t,e)=>Lt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return Nt(this,t,e)}get(t){return zt(this,t)}describe(t,e){return Nt(Ft,t,e)}override(t,e){return Nt(It,t,e)}route(t,e,n,i){const a=zt(this,t),o=zt(this,n),r="_"+e;Object.defineProperties(a,{[r]:{value:a[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[r],e=o[i];return u(t)?Object.assign({},e,t):g(t,e)},set(t){this[r]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function Bt(t,e,n,i,a){let o=e[a];return o||(o=e[a]=t.measureText(a).width,n.push(a)),o>i&&(i=o),i}function jt(t,e,n,i){let a=(i=i||{}).data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(a=i.data={},o=i.garbageCollect=[],i.font=e),t.save(),t.font=e;let r=0;const s=n.length;let l,q,c,h,u;for(l=0;l<s;l++)if(h=n[l],null!=h&&!0!==d(h))r=Bt(t,a,o,r,h);else if(d(h))for(q=0,c=h.length;q<c;q++)u=h[q],null==u||d(u)||(r=Bt(t,a,o,r,u));t.restore();const m=o.length/2;if(m>n.length){for(l=0;l<m;l++)delete a[o[l]];o.splice(0,m)}return r}function Wt(t,e,n){const i=t.currentDevicePixelRatio,a=0!==n?Math.max(n/2,.5):0;return Math.round((e-a)*i)/i+a}function Ht(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function $t(t,e,n,i){let a,o,r,s,l;const q=e.pointStyle,c=e.rotation,h=e.radius;let d=(c||0)*I;if(q&&"object"==typeof q&&(a=q.toString(),"[object HTMLImageElement]"===a||"[object HTMLCanvasElement]"===a))return t.save(),t.translate(n,i),t.rotate(d),t.drawImage(q,-q.width/2,-q.height/2,q.width,q.height),void t.restore();if(!(isNaN(h)||h<=0)){switch(t.beginPath(),q){default:t.arc(n,i,h,0,E),t.closePath();break;case"triangle":t.moveTo(n+Math.sin(d)*h,i-Math.cos(d)*h),d+=N,t.lineTo(n+Math.sin(d)*h,i-Math.cos(d)*h),d+=N,t.lineTo(n+Math.sin(d)*h,i-Math.cos(d)*h),t.closePath();break;case"rectRounded":l=.516*h,s=h-l,o=Math.cos(d+z)*s,r=Math.sin(d+z)*s,t.arc(n-o,i-r,l,d-T,d-F),t.arc(n+r,i-o,l,d-F,d),t.arc(n+o,i+r,l,d,d+F),t.arc(n-r,i+o,l,d+F,d+T),t.closePath();break;case"rect":if(!c){s=Math.SQRT1_2*h,t.rect(n-s,i-s,2*s,2*s);break}d+=z;case"rectRot":o=Math.cos(d)*h,r=Math.sin(d)*h,t.moveTo(n-o,i-r),t.lineTo(n+r,i-o),t.lineTo(n+o,i+r),t.lineTo(n-r,i+o),t.closePath();break;case"crossRot":d+=z;case"cross":o=Math.cos(d)*h,r=Math.sin(d)*h,t.moveTo(n-o,i-r),t.lineTo(n+o,i+r),t.moveTo(n+r,i-o),t.lineTo(n-r,i+o);break;case"star":o=Math.cos(d)*h,r=Math.sin(d)*h,t.moveTo(n-o,i-r),t.lineTo(n+o,i+r),t.moveTo(n+r,i-o),t.lineTo(n-r,i+o),d+=z,o=Math.cos(d)*h,r=Math.sin(d)*h,t.moveTo(n-o,i-r),t.lineTo(n+o,i+r),t.moveTo(n+r,i-o),t.lineTo(n-r,i+o);break;case"line":o=Math.cos(d)*h,r=Math.sin(d)*h,t.moveTo(n-o,i-r),t.lineTo(n+o,i+r);break;case"dash":t.moveTo(n,i),t.lineTo(n+Math.cos(d)*h,i+Math.sin(d)*h)}t.fill(),e.borderWidth>0&&t.stroke()}}function Ut(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function Yt(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Xt(t){t.restore()}function Gt(t,e,n,i,a){if(!e)return t.lineTo(n.x,n.y);if("middle"===a){const i=(e.x+n.x)/2;t.lineTo(i,e.y),t.lineTo(i,n.y)}else"after"===a!=!!i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function Zt(t,e,n,i){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function Kt(t,e,n,i,a,o={}){const r=d(e)?e:[e],s=o.strokeWidth>0&&""!==o.strokeColor;let l,q;for(t.save(),t.font=a.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),h(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;l<r.length;++l)q=r[l],s&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),h(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(q,n,i,o.maxWidth)),t.fillText(q,n,i,o.maxWidth),Qt(t,n,i,q,o),i+=a.lineHeight;t.restore()}function Qt(t,e,n,i,a){if(a.strikethrough||a.underline){const o=t.measureText(i),r=e-o.actualBoundingBoxLeft,s=e+o.actualBoundingBoxRight,l=n-o.actualBoundingBoxAscent,q=n+o.actualBoundingBoxDescent,c=a.strikethrough?(l+q)/2:q;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=a.decorationWidth||2,t.moveTo(r,c),t.lineTo(s,c),t.stroke()}}function Jt(t,e){const{x:n,y:i,w:a,h:o,radius:r}=e;t.arc(n+r.topLeft,i+r.topLeft,r.topLeft,-F,T,!0),t.lineTo(n,i+o-r.bottomLeft),t.arc(n+r.bottomLeft,i+o-r.bottomLeft,r.bottomLeft,T,F,!0),t.lineTo(n+a-r.bottomRight,i+o),t.arc(n+a-r.bottomRight,i+o-r.bottomRight,r.bottomRight,F,0,!0),t.lineTo(n+a,i+r.topRight),t.arc(n+a-r.topRight,i+r.topRight,r.topRight,0,-F,!0),t.lineTo(n+r.topLeft,i)}const te=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),ee=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function ne(t,e){const n=(""+t).match(te);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t}function ie(t,e){const n={},i=u(e),a=i?Object.keys(e):e,o=u(t)?i?n=>g(t[n],t[e[n]]):e=>t[e]:()=>t;for(const t of a)n[t]=+o(t)||0;return n}function ae(t){return ie(t,{top:"y",right:"x",bottom:"y",left:"x"})}function oe(t){return ie(t,["topLeft","topRight","bottomLeft","bottomRight"])}function re(t){const e=ae(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function se(t,e){t=t||{},e=e||Vt.font;let n=g(t.size,e.size);"string"==typeof n&&(n=parseInt(n,10));let i=g(t.style,e.style);i&&!(""+i).match(ee)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const a={family:g(t.family,e.family),lineHeight:ne(g(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:g(t.weight,e.weight),string:""};return a.string=function(t){return!t||h(t.size)||h(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(a),a}function le(t,e,n,i){let a,o,r,s=!0;for(a=0,o=t.length;a<o;++a)if(r=t[a],void 0!==r&&(void 0!==e&&"function"==typeof r&&(r=r(e),s=!1),void 0!==n&&d(r)&&(r=r[n%r.length],s=!1),void 0!==r))return i&&!s&&(i.cacheable=!1),r}function qe(t,e,n){n=n||(n=>t[n]<e);let i,a=t.length-1,o=0;for(;a-o>1;)i=o+a>>1,n(i)?o=i:a=i;return{lo:o,hi:a}}const ce=(t,e,n)=>qe(t,n,(i=>t[i][e]<n)),he=(t,e,n)=>qe(t,n,(i=>t[i][e]>=n)),de=["push","pop","shift","splice","unshift"];function ue(t,e){const n=t._chartjs;if(!n)return;const i=n.listeners,a=i.indexOf(e);-1!==a&&i.splice(a,1),i.length>0||(de.forEach((e=>{delete t[e]})),delete t._chartjs)}function me(t){const e=new Set;let n,i;for(n=0,i=t.length;n<i;++n)e.add(t[n]);return e.size===i?t:Array.from(e)}function fe(t,e=[""],n=t,i,a=(()=>t[0])){P(i)||(i=Se("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:n,_fallback:i,_getTarget:a,override:a=>fe([a,...t],e,n,i)};return new Proxy(o,{deleteProperty:(e,n)=>(delete e[n],delete e._keys,delete t[0][n],!0),get:(n,i)=>_e(n,i,(()=>function(t,e,n,i){let a;for(const o of e)if(a=Se(xe(o,t),n),P(a))return be(t,a)?Me(n,i,t,a):a}(i,e,t,n))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ce(t).includes(e),ownKeys:t=>Ce(t),set:(t,e,n)=>((t._storage||(t._storage=a()))[e]=n,delete t[e],delete t._keys,!0)})}function ge(t,e,n,i){const a={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:pe(t,i),setContext:e=>ge(t,e,n,i),override:a=>ge(t.override(a),e,n,i)};return new Proxy(a,{deleteProperty:(e,n)=>(delete e[n],delete t[n],!0),get:(t,e,n)=>_e(t,e,(()=>function(t,e,n){const{_proxy:i,_context:a,_subProxy:o,_descriptors:r}=t;let s=i[e];return A(s)&&r.isScriptable(e)&&(s=function(t,e,n,i){const{_proxy:a,_context:o,_subProxy:r,_stack:s}=n;if(s.has(t))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+t);return s.add(t),e=e(o,r||i),s.delete(t),u(e)&&(e=Me(a._scopes,a,t,e)),e}(e,s,t,n)),d(s)&&s.length&&(s=function(t,e,n,i){const{_proxy:a,_context:o,_subProxy:r,_descriptors:s}=n;if(P(o.index)&&i(t))e=e[o.index%e.length];else if(u(e[0])){const n=e,i=a._scopes.filter((t=>t!==n));e=[];for(const l of n){const n=Me(i,a,t,l);e.push(ge(n,o,r&&r[t],s))}}return e}(e,s,t,r.isIndexable)),be(e,s)&&(s=ge(s,a,o&&o[e],r)),s}(t,e,n))),getOwnPropertyDescriptor:(e,n)=>e._descriptors.allKeys?Reflect.has(t,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,n),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,n)=>Reflect.has(t,n),ownKeys:()=>Reflect.ownKeys(t),set:(e,n,i)=>(t[n]=i,delete e[n],!0)})}function pe(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:i=e.indexable,_allKeys:a=e.allKeys}=t;return{allKeys:a,scriptable:n,indexable:i,isScriptable:A(n)?n:()=>n,isIndexable:A(i)?i:()=>i}}const xe=(t,e)=>t?t+O(e):e,be=(t,e)=>u(e)&&"adapters"!==t;function _e(t,e,n){let i=t[e];return P(i)||(i=n(),P(i)&&(t[e]=i)),i}function ye(t,e,n){return A(t)?t(e,n):t}const ve=(t,e)=>!0===t?e:"string"==typeof t?D(e,t):void 0;function we(t,e,n,i){for(const a of e){const e=ve(n,a);if(e){t.add(e);const a=ye(e._fallback,n,e);if(P(a)&&a!==n&&a!==i)return a}else if(!1===e&&P(i)&&n!==i)return null}return!1}function Me(t,e,n,i){const a=e._rootScopes,o=ye(e._fallback,n,i),r=[...t,...a],s=new Set;s.add(i);let l=ke(s,r,n,o||n);return null!==l&&(!P(o)||o===n||(l=ke(s,r,o,l),null!==l))&&fe(Array.from(s),[""],a,o,(()=>function(t,e,n){const i=t._getTarget();e in i||(i[e]={});const a=i[e];return d(a)&&u(n)?n:a}(e,n,i)))}function ke(t,e,n,i){for(;n;)n=we(t,e,n,i);return n}function Se(t,e){for(const n of e){if(!n)continue;const e=n[t];if(P(e))return e}}function Ce(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const n of t)for(const t of Object.keys(n).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const De=Number.EPSILON||1e-14,Oe=(t,e)=>e<t.length&&!t[e].skip&&t[e],Pe=t=>"x"===t?"y":"x";function Ae(t,e,n,i){const a=t.skip?e:t,o=e,r=n.skip?e:n,s=G(o,a),l=G(r,o);let q=s/(s+l),c=l/(s+l);q=isNaN(q)?0:q,c=isNaN(c)?0:c;const h=i*q,d=i*c;return{previous:{x:o.x-h*(r.x-a.x),y:o.y-h*(r.y-a.y)},next:{x:o.x+d*(r.x-a.x),y:o.y+d*(r.y-a.y)}}}function Te(t,e,n){return Math.max(Math.min(t,n),e)}function Ee(t,e,n,i,a){let o,r,s,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){const n=Pe(e),i=t.length,a=Array(i).fill(0),o=Array(i);let r,s,l,q=Oe(t,0);for(r=0;r<i;++r)if(s=l,l=q,q=Oe(t,r+1),l){if(q){const t=q[e]-l[e];a[r]=0!==t?(q[n]-l[n])/t:0}o[r]=s?q?B(a[r-1])!==B(a[r])?0:(a[r-1]+a[r])/2:a[r-1]:a[r]}!function(t,e,n){const i=t.length;let a,o,r,s,l,q=Oe(t,0);for(let c=0;c<i-1;++c)l=q,q=Oe(t,c+1),l&&q&&(H(e[c],0,De)?n[c]=n[c+1]=0:(a=n[c]/e[c],o=n[c+1]/e[c],s=Math.pow(a,2)+Math.pow(o,2),s<=9||(r=3/Math.sqrt(s),n[c]=a*r*e[c],n[c+1]=o*r*e[c])))}(t,a,o),function(t,e,n="x"){const i=Pe(n),a=t.length;let o,r,s,l=Oe(t,0);for(let q=0;q<a;++q){if(r=s,s=l,l=Oe(t,q+1),!s)continue;const a=s[n],c=s[i];r&&(o=(a-r[n])/3,s[`cp1${n}`]=a-o,s[`cp1${i}`]=c-o*e[q]),l&&(o=(l[n]-a)/3,s[`cp2${n}`]=a+o,s[`cp2${i}`]=c+o*e[q])}}(t,o,e)}(t,a);else{let n=i?t[t.length-1]:t[0];for(o=0,r=t.length;o<r;++o)s=t[o],l=Ae(n,s,t[Math.min(o+1,r-(i?0:1))%r],e.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,n=s}e.capBezierPoints&&function(t,e){let n,i,a,o,r,s=Ut(t[0],e);for(n=0,i=t.length;n<i;++n)r=o,o=s,s=n<i-1&&Ut(t[n+1],e),o&&(a=t[n],r&&(a.cp1x=Te(a.cp1x,e.left,e.right),a.cp1y=Te(a.cp1y,e.top,e.bottom)),s&&(a.cp2x=Te(a.cp2x,e.left,e.right),a.cp2y=Te(a.cp2y,e.top,e.bottom)))}(t,n)}function Re(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Le(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function Ie(t,e,n){let i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}const Fe=t=>window.getComputedStyle(t,null),ze=["top","right","bottom","left"];function Ne(t,e,n){const i={};n=n?"-"+n:"";for(let a=0;a<4;a++){const o=ze[a];i[o]=parseFloat(t[e+"-"+o+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function Ve(t,e){const{canvas:n,currentDevicePixelRatio:i}=e,a=Fe(n),o="border-box"===a.boxSizing,r=Ne(a,"padding"),s=Ne(a,"border","width"),{x:l,y:q,box:c}=function(t,e){const n=t.native||t,i=n.touches,a=i&&i.length?i[0]:n,{offsetX:o,offsetY:r}=a;let s,l,q=!1;if(((t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot))(o,r,n.target))s=o,l=r;else{const t=e.getBoundingClientRect();s=a.clientX-t.left,l=a.clientY-t.top,q=!0}return{x:s,y:l,box:q}}(t,n),h=r.left+(c&&s.left),d=r.top+(c&&s.top);let{width:u,height:m}=e;return o&&(u-=r.width+s.width,m-=r.height+s.height),{x:Math.round((l-h)/u*n.width/i),y:Math.round((q-d)/m*n.height/i)}}const Be=t=>Math.round(10*t)/10;function je(t,e,n){const i=e||1,a=Math.floor(t.height*i),o=Math.floor(t.width*i);t.height=a/i,t.width=o/i;const r=t.canvas;return r.style&&(n||!r.style.height&&!r.style.width)&&(r.style.height=`${t.height}px`,r.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==i||r.height!==a||r.width!==o)&&(t.currentDevicePixelRatio=i,r.height=a,r.width=o,t.ctx.setTransform(i,0,0,i,0,0),!0)}const We=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function He(t,e){const n=function(t,e){return Fe(t).getPropertyValue(e)}(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function $e(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function Ue(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:"middle"===i?n<.5?t.y:e.y:"after"===i?n<1?t.y:e.y:n>0?e.y:t.y}}function Ye(t,e,n,i){const a={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},r=$e(t,a,n),s=$e(a,o,n),l=$e(o,e,n),q=$e(r,s,n),c=$e(s,l,n);return $e(q,c,n)}const Xe=new Map;function Ge(t,e,n){return function(t,e){e=e||{};const n=t+JSON.stringify(e);let i=Xe.get(n);return i||(i=new Intl.NumberFormat(t,e),Xe.set(n,i)),i}(e,n).format(t)}function Ze(t,e,n){return t?function(t,e){return{x:n=>t+t+e-n,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,n):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Ke(t){return"angle"===t?{between:Q,compare:Z,normalize:K}:{between:(t,e,n)=>t>=Math.min(e,n)&&t<=Math.max(n,e),compare:(t,e)=>t-e,normalize:t=>t}}function Qe({start:t,end:e,count:n,loop:i,style:a}){return{start:t%n,end:e%n,loop:i&&(e-t+1)%n==0,style:a}}function Je(t,e,n){if(!n)return[t];const{property:i,start:a,end:o}=n,r=e.length,{compare:s,between:l,normalize:q}=Ke(i),{start:c,end:h,loop:d,style:u}=function(t,e,n){const{property:i,start:a,end:o}=n,{between:r,normalize:s}=Ke(i),l=e.length;let q,c,{start:h,end:d,loop:u}=t;if(u){for(h+=l,d+=l,q=0,c=l;q<c&&r(s(e[h%l][i]),a,o);++q)h--,d--;h%=l,d%=l}return d<h&&(d+=l),{start:h,end:d,loop:u,style:t.style}}(t,e,n),m=[];let f,g,p,x=!1,b=null;for(let t=c,n=c;t<=h;++t)g=e[t%r],g.skip||(f=q(g[i]),f!==p&&(x=l(f,a,o),null===b&&(x||l(a,p,f)&&0!==s(a,p))&&(b=0===s(f,a)?t:n),null!==b&&(!x||0===s(o,f)||l(o,p,f))&&(m.push(Qe({start:b,end:t,loop:d,count:r,style:u})),b=null),n=t,p=f));return null!==b&&m.push(Qe({start:b,end:h,loop:d,count:r,style:u})),m}function tn(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function en(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}var nn=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,i){const a=e.listeners[i],o=e.duration;a.forEach((i=>i({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(n-e.start,o)})))}_refresh(){const t=this;t._request||(t._running=!0,t._request=s.call(window,(()=>{t._update(),t._request=null,t._running&&t._refresh()})))}_update(t=Date.now()){const e=this;let n=0;e._charts.forEach(((i,a)=>{if(!i.running||!i.items.length)return;const o=i.items;let r,s=o.length-1,l=!1;for(;s>=0;--s)r=o[s],r._active?(r._total>i.duration&&(i.duration=r._total),r.tick(t),l=!0):(o[s]=o[o.length-1],o.pop());l&&(a.draw(),e._notify(a,i,t,"progress")),o.length||(i.running=!1,e._notify(a,i,t,"complete"),i.initial=!1),n+=o.length})),e._lastDate=t,0===n&&(e._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const an="transparent",on={boolean:(t,e,n)=>n>.5?e:t,color(t,e,n){const i=Rt(t||an),a=i.valid&&Rt(e||an);return a&&a.valid?a.mix(i,n).hexString():e},number:(t,e,n)=>t+(e-t)*n};class rn{constructor(t,e,n,i){const a=e[n];i=le([t.to,i,a,t.from]);const o=le([t.from,a,i]);this._active=!0,this._fn=t.fn||on[t.type||typeof o],this._easing=it[t.easing]||it.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(t,e,n){const i=this;if(i._active){i._notify(!1);const a=i._target[i._prop],o=n-i._start,r=i._duration-o;i._start=n,i._duration=Math.floor(Math.max(r,t.duration)),i._total+=o,i._loop=!!t.loop,i._to=le([t.to,e,a,t.from]),i._from=le([t.from,a,e])}}cancel(){const t=this;t._active&&(t.tick(Date.now()),t._active=!1,t._notify(!1))}tick(t){const e=this,n=t-e._start,i=e._duration,a=e._prop,o=e._from,r=e._loop,s=e._to;let l;if(e._active=o!==s&&(r||n<i),!e._active)return e._target[a]=s,void e._notify(!0);n<0?e._target[a]=o:(l=n/i%2,l=r&&l>1?2-l:l,l=e._easing(Math.min(1,Math.max(0,l))),e._target[a]=e._fn(o,s,l))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,n)=>{t.push({res:e,rej:n})}))}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let t=0;t<n.length;t++)n[t][e]()}}Vt.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const sn=Object.keys(Vt.animation);Vt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),Vt.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),Vt.describe("animations",{_fallback:"animation"}),Vt.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class ln{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!u(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((n=>{const i=t[n];if(!u(i))return;const a={};for(const t of sn)a[t]=i[t];(d(i.properties)&&i.properties||[n]).forEach((t=>{t!==n&&e.has(t)||e.set(t,a)}))}))}_animateOptions(t,e){const n=e.options,i=function(t,e){if(!e)return;let n=t.options;if(n)return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n;t.options=e}(t,n);if(!i)return[];const a=this._createAnimations(i,n);return n.$shared&&function(t,e){const n=[],i=Object.keys(e);for(let e=0;e<i.length;e++){const a=t[i[e]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}(t.options.$animations,n).then((()=>{t.options=n}),(()=>{})),a}_createAnimations(t,e){const n=this._properties,i=[],a=t.$animations||(t.$animations={}),o=Object.keys(e),r=Date.now();let s;for(s=o.length-1;s>=0;--s){const l=o[s];if("$"===l.charAt(0))continue;if("options"===l){i.push(...this._animateOptions(t,e));continue}const q=e[l];let c=a[l];const h=n.get(l);if(c){if(h&&c.active()){c.update(h,q,r);continue}c.cancel()}h&&h.duration?(a[l]=c=new rn(h,t,l,q),i.push(c)):t[l]=q}return i}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const n=this._createAnimations(t,e);return n.length?(nn.add(this._chart,n),!0):void 0}}function qn(t,e){const n=t&&t.options||{},i=n.reverse,a=void 0===n.min?e:0,o=void 0===n.max?e:0;return{start:i?o:a,end:i?a:o}}function cn(t,e){const n=[],i=t._getSortedDatasetMetas(e);let a,o;for(a=0,o=i.length;a<o;++a)n.push(i[a].index);return n}function hn(t,e,n,i){const a=t.keys,o="single"===i.mode;let r,s,l,q;if(null!==e){for(r=0,s=a.length;r<s;++r){if(l=+a[r],l===n){if(i.all)continue;break}q=t.values[l],m(q)&&(o||0===e||B(e)===B(q))&&(e+=q)}return e}}function dn(t,e){const n=t&&t.options.stacked;return n||void 0===n&&void 0!==e.stack}function un(t,e,n){const i=t[e]||(t[e]={});return i[n]||(i[n]={})}function mn(t,e,n){for(const i of e.getMatchingVisibleMetas("bar").reverse()){const e=t[i.index];if(n&&e>0||!n&&e<0)return i.index}return null}function fn(t,e){const{chart:n,_cachedMeta:i}=t,a=n._stacks||(n._stacks={}),{iScale:o,vScale:r,index:s}=i,l=o.axis,q=r.axis,c=function(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}(o,r,i),h=e.length;let d;for(let t=0;t<h;++t){const n=e[t],{[l]:i,[q]:o}=n;d=(n._stacks||(n._stacks={}))[q]=un(a,c,i),d[s]=o,d._top=mn(d,r,!0),d._bottom=mn(d,r,!1)}}function gn(t,e){const n=t.scales;return Object.keys(n).filter((t=>n[t].axis===e)).shift()}function pn(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[i]||void 0===e[i][n])return;delete e[i][n]}}}const xn=t=>"reset"===t||"none"===t,bn=(t,e)=>e?t:Object.assign({},t);class _n{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.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this,e=t._cachedMeta;t.configure(),t.linkScales(),e._stacked=dn(e.vScale,e),t.addElements()}updateIndex(t){this.index!==t&&pn(this._cachedMeta),this.index=t}linkScales(){const t=this,e=t.chart,n=t._cachedMeta,i=t.getDataset(),a=(t,e,n,i)=>"x"===t?e:"r"===t?i:n,o=n.xAxisID=g(i.xAxisID,gn(e,"x")),r=n.yAxisID=g(i.yAxisID,gn(e,"y")),s=n.rAxisID=g(i.rAxisID,gn(e,"r")),l=n.indexAxis,q=n.iAxisID=a(l,o,r,s),c=n.vAxisID=a(l,r,o,s);n.xScale=t.getScaleForId(o),n.yScale=t.getScaleForId(r),n.rScale=t.getScaleForId(s),n.iScale=t.getScaleForId(q),n.vScale=t.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&ue(this._data,this),t._stacked&&pn(t)}_dataCheck(){const t=this,e=t.getDataset(),n=e.data||(e.data=[]),i=t._data;if(u(n))t._data=function(t){const e=Object.keys(t),n=new Array(e.length);let i,a,o;for(i=0,a=e.length;i<a;++i)o=e[i],n[i]={x:o,y:t[o]};return n}(n);else if(i!==n){if(i){ue(i,t);const e=t._cachedMeta;pn(e),e._parsed=[]}n&&Object.isExtensible(n)&&(o=t,(a=n)._chartjs?a._chartjs.listeners.push(o):(Object.defineProperty(a,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[o]}}),de.forEach((t=>{const e="_onData"+O(t),n=a[t];Object.defineProperty(a,t,{configurable:!0,enumerable:!1,value(...t){const i=n.apply(this,t);return a._chartjs.listeners.forEach((n=>{"function"==typeof n[e]&&n[e](...t)})),i}})})))),t._syncList=[],t._data=n}var a,o}addElements(){const t=this,e=t._cachedMeta;t._dataCheck(),t.datasetElementType&&(e.dataset=new t.datasetElementType)}buildOrUpdateElements(t){const e=this,n=e._cachedMeta,i=e.getDataset();let a=!1;e._dataCheck();const o=n._stacked;n._stacked=dn(n.vScale,n),n.stack!==i.stack&&(a=!0,pn(n),n.stack=i.stack),e._resyncElements(t),(a||o!==n._stacked)&&fn(e,n._parsed)}configure(){const t=this,e=t.chart.config,n=e.datasetScopeKeys(t._type),i=e.getOptionScopes(t.getDataset(),n,!0);t.options=e.createResolver(i,t.getContext()),t._parsing=t.options.parsing}parse(t,e){const n=this,{_cachedMeta:i,_data:a}=n,{iScale:o,_stacked:r}=i,s=o.axis;let l,q,c,h=0===t&&e===a.length||i._sorted,m=t>0&&i._parsed[t-1];if(!1===n._parsing)i._parsed=a,i._sorted=!0,c=a;else{c=d(a[t])?n.parseArrayData(i,a,t,e):u(a[t])?n.parseObjectData(i,a,t,e):n.parsePrimitiveData(i,a,t,e);const o=()=>null===q[s]||m&&q[s]<m[s];for(l=0;l<e;++l)i._parsed[l+t]=q=c[l],h&&(o()&&(h=!1),m=q);i._sorted=h}r&&fn(n,c)}parsePrimitiveData(t,e,n,i){const{iScale:a,vScale:o}=t,r=a.axis,s=o.axis,l=a.getLabels(),q=a===o,c=new Array(i);let h,d,u;for(h=0,d=i;h<d;++h)u=h+n,c[h]={[r]:q||a.parse(l[u],u),[s]:o.parse(e[u],u)};return c}parseArrayData(t,e,n,i){const{xScale:a,yScale:o}=t,r=new Array(i);let s,l,q,c;for(s=0,l=i;s<l;++s)q=s+n,c=e[q],r[s]={x:a.parse(c[0],q),y:o.parse(c[1],q)};return r}parseObjectData(t,e,n,i){const{xScale:a,yScale:o}=t,{xAxisKey:r="x",yAxisKey:s="y"}=this._parsing,l=new Array(i);let q,c,h,d;for(q=0,c=i;q<c;++q)h=q+n,d=e[h],l[q]={x:a.parse(D(d,r),h),y:o.parse(D(d,s),h)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){const i=this.chart,a=this._cachedMeta,o=e[t.axis];return hn({keys:cn(i,!0),values:e._stacks[t.axis]},o,a.index,{mode:n})}updateRangeFromParsed(t,e,n,i){const a=n[e.axis];let o=null===a?NaN:a;const r=i&&n._stacks[e.axis];i&&r&&(i.values=r,t.min=Math.min(t.min,o),t.max=Math.max(t.max,o),o=hn(i,a,this._cachedMeta.index,{all:!0})),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const n=this,i=n._cachedMeta,a=i._parsed,o=i._sorted&&t===i.iScale,r=a.length,s=n._getOtherScale(t),l=e&&i._stacked&&{keys:cn(n.chart,!0),values:null},q={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:n,minDefined:i,maxDefined:a}=t.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:a?n:Number.POSITIVE_INFINITY}}(s);let d,u,f,g;function p(){return f=a[d],u=f[t.axis],g=f[s.axis],!m(u)||c>g||h<g}for(d=0;d<r&&(p()||(n.updateRangeFromParsed(q,t,f,l),!o));++d);if(o)for(d=r-1;d>=0;--d)if(!p()){n.updateRangeFromParsed(q,t,f,l);break}return q}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let i,a,o;for(i=0,a=e.length;i<a;++i)o=e[i][t.axis],m(o)&&n.push(o);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,n=e.iScale,i=e.vScale,a=this.getParsed(t);return{label:n?""+n.getLabelForValue(a[n.axis]):"",value:i?""+i.getLabelForValue(a[i.axis]):""}}_update(t){const e=this,n=e._cachedMeta;e.configure(),e._cachedDataOpts={},e.update(t||"default"),n._clip=function(t){let e,n,i,a;return u(t)?(e=t.top,n=t.right,i=t.bottom,a=t.left):e=n=i=a=t,{top:e,right:n,bottom:i,left:a,disabled:!1===t}}(g(e.options.clip,function(t,e,n){if(!1===n)return!1;const i=qn(t,n),a=qn(e,n);return{top:a.end,right:i.end,bottom:a.start,left:i.start}}(n.xScale,n.yScale,e.getMaxOverflow())))}update(t){}draw(){const t=this,e=t._ctx,n=t.chart,i=t._cachedMeta,a=i.data||[],o=n.chartArea,r=[],s=t._drawStart||0,l=t._drawCount||a.length-s;let q;for(i.dataset&&i.dataset.draw(e,o,s,l),q=s;q<s+l;++q){const t=a[q];t.hidden||(t.active?r.push(t):t.draw(e,o))}for(q=0;q<r.length;++q)r[q].draw(e,o)}getStyle(t,e){const n=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){const i=this,a=i.getDataset();let o;if(t>=0&&t<i._cachedMeta.data.length){const e=i._cachedMeta.data[t];o=e.$context||(e.$context=function(t,e,n){return Object.assign(Object.create(t),{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}(i.getContext(),t,e)),o.parsed=i.getParsed(t),o.raw=a.data[t],o.index=o.dataIndex=t}else o=i.$context||(i.$context=function(t,e){return Object.assign(Object.create(t),{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(i.chart.getContext(),i.index)),o.dataset=a,o.index=o.datasetIndex=i.index;return o.active=!!e,o.mode=n,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",n){const i=this,a="active"===e,o=i._cachedDataOpts,r=t+"-"+e,s=o[r],l=i.enableOptionSharing&&P(n);if(s)return bn(s,l);const q=i.chart.config,c=q.datasetElementScopeKeys(i._type,t),h=a?[`${t}Hover`,"hover",t,""]:[t,""],d=q.getOptionScopes(i.getDataset(),c),u=Object.keys(Vt.elements[t]),m=q.resolveNamedOptions(d,u,(()=>i.getContext(n,a)),h);return m.$shared&&(m.$shared=l,o[r]=Object.freeze(bn(m,l))),m}_resolveAnimations(t,e,n){const i=this,a=i.chart,o=i._cachedDataOpts,r=`animation-${e}`,s=o[r];if(s)return s;let l;if(!1!==a.options.animation){const a=i.chart.config,o=a.datasetAnimationScopeKeys(i._type,e),r=a.getOptionScopes(i.getDataset(),o);l=a.createResolver(r,i.getContext(t,n,e))}const q=new ln(a,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(q)),q}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||xn(t)||this.chart._animationsDisabled}updateElement(t,e,n,i){xn(i)?Object.assign(t,n):this._resolveAnimations(e,i).update(t,n)}updateSharedOptions(t,e,n){t&&!xn(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,i){t.active=i;const a=this.getStyle(e,i);this._resolveAnimations(e,n,i).update(t,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this,n=e._data,i=e._cachedMeta.data;for(const[t,n,i]of e._syncList)e[t](n,i);e._syncList=[];const a=i.length,o=n.length,r=Math.min(o,a);r&&e.parse(0,r),o>a?e._insertElements(a,o-a,t):o<a&&e._removeElements(o,a-o)}_insertElements(t,e,n=!0){const i=this,a=i._cachedMeta,o=a.data,r=t+e;let s;const l=t=>{for(t.length+=e,s=t.length-1;s>=r;s--)t[s]=t[s-e]};for(l(o),s=t;s<r;++s)o[s]=new i.dataElementType;i._parsing&&l(a._parsed),i.parse(t,e),n&&i.updateElements(o,t,e,"reset")}updateElements(t,e,n,i){}_removeElements(t,e){const n=this._cachedMeta;if(this._parsing){const i=n._parsed.splice(t,e);n._stacked&&pn(n,i)}n.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,n,i]=t;this[e](n,i)}}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){this._sync(["_removeElements",t,e]),this._sync(["_insertElements",t,arguments.length-2])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function yn(t){const e=function(t){if(!t._cache.$bar){const e=t.getMatchingVisibleMetas("bar");let n=[];for(let i=0,a=e.length;i<a;i++)n=n.concat(e[i].controller.getAllParsedValues(t));t._cache.$bar=me(n.sort(((t,e)=>t-e)))}return t._cache.$bar}(t);let n,i,a,o,r=t._length;const s=()=>{32767!==a&&-32768!==a&&(P(o)&&(r=Math.min(r,Math.abs(a-o)||r)),o=a)};for(n=0,i=e.length;n<i;++n)a=t.getPixelForValue(e[n]),s();for(o=void 0,n=0,i=t.ticks.length;n<i;++n)a=t.getPixelForTick(n),s();return r}function vn(t,e,n,i){return d(t)?function(t,e,n,i){const a=n.parse(t[0],i),o=n.parse(t[1],i),r=Math.min(a,o),s=Math.max(a,o);let l=r,q=s;Math.abs(r)>Math.abs(s)&&(l=s,q=r),e[n.axis]=q,e._custom={barStart:l,barEnd:q,start:a,end:o,min:r,max:s}}(t,e,n,i):e[n.axis]=n.parse(t,i),e}function wn(t,e,n,i){const a=t.iScale,o=t.vScale,r=a.getLabels(),s=a===o,l=[];let q,c,h,d;for(q=n,c=n+i;q<c;++q)d=e[q],h={},h[a.axis]=s||a.parse(r[q],q),l.push(vn(d,h,o,q));return l}function Mn(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function kn(t,e,n,i){let a=e.borderSkipped;const o={};if(!a)return void(t.borderSkipped=o);const{start:r,end:s,reverse:l,top:q,bottom:c}=function(t){let e,n,i,a,o;return t.horizontal?(e=t.base>t.x,n="left",i="right"):(e=t.base<t.y,n="bottom",i="top"),e?(a="end",o="start"):(a="start",o="end"),{start:n,end:i,reverse:e,top:a,bottom:o}}(t);"middle"===a&&n&&(t.enableBorderRadius=!0,(n._top||0)===i?a=q:(n._bottom||0)===i?a=c:(o[Sn(c,r,s,l)]=!0,a=q)),o[Sn(a,r,s,l)]=!0,t.borderSkipped=o}function Sn(t,e,n,i){var a,o,r;return i?(r=n,t=Cn(t=(a=t)===(o=e)?r:a===r?o:a,n,e)):t=Cn(t,e,n),t}function Cn(t,e,n){return"start"===t?e:"end"===t?n:t}_n.defaults={},_n.prototype.datasetElementType=null,_n.prototype.dataElementType=null;class Dn extends _n{parsePrimitiveData(t,e,n,i){return wn(t,e,n,i)}parseArrayData(t,e,n,i){return wn(t,e,n,i)}parseObjectData(t,e,n,i){const{iScale:a,vScale:o}=t,{xAxisKey:r="x",yAxisKey:s="y"}=this._parsing,l="x"===a.axis?r:s,q="x"===o.axis?r:s,c=[];let h,d,u,m;for(h=n,d=n+i;h<d;++h)m=e[h],u={},u[a.axis]=a.parse(D(m,l),h),c.push(vn(D(m,q),u,o,h));return c}updateRangeFromParsed(t,e,n,i){super.updateRangeFromParsed(t,e,n,i);const a=n._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){const e=this._cachedMeta,{iScale:n,vScale:i}=e,a=this.getParsed(t),o=a._custom,r=Mn(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(a[i.axis]);return{label:""+n.getLabelForValue(a[n.axis]),value:r}}initialize(){const t=this;t.enableOptionSharing=!0,super.initialize(),t._cachedMeta.stack=t.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,n,i){const a=this,o="reset"===i,{index:r,_cachedMeta:{vScale:s}}=a,l=s.getBasePixel(),q=s.isHorizontal(),c=a._getRuler(),d=a.resolveDataElementOptions(e,i),u=a.getSharedOptions(d),m=a.includeOptions(i,u);a.updateSharedOptions(u,i,d);for(let d=e;d<e+n;d++){const e=a.getParsed(d),n=o||h(e[s.axis])?{base:l,head:l}:a._calculateBarValuePixels(d),f=a._calculateBarIndexPixels(d,c),g=(e._stacks||{})[s.axis],p={horizontal:q,base:n.base,enableBorderRadius:!g||Mn(e._custom)||r===g._top||r===g._bottom,x:q?n.head:f.center,y:q?f.center:n.head,height:q?f.size:Math.abs(n.size),width:q?Math.abs(n.size):f.size};m&&(p.options=u||a.resolveDataElementOptions(d,t[d].active?"active":i)),kn(p,p.options||t[d].options,g,r),a.updateElement(t[d],d,p,i)}}_getStacks(t,e){const n=this._cachedMeta.iScale,i=n.getMatchingVisibleMetas(this._type),a=n.options.stacked,o=i.length,r=[];let s,l;for(s=0;s<o;++s)if(l=i[s],l.controller.options.grouped){if(void 0!==e){const t=l.controller.getParsed(e)[l.controller._cachedMeta.vScale.axis];if(h(t)||isNaN(t))continue}if((!1===a||-1===r.indexOf(l.stack)||void 0===a&&void 0===l.stack)&&r.push(l.stack),l.index===t)break}return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,n){const i=this._getStacks(t,n),a=void 0!==e?i.indexOf(e):-1;return-1===a?i.length-1:a}_getRuler(){const t=this,e=t.options,n=t._cachedMeta,i=n.iScale,a=[];let o,r;for(o=0,r=n.data.length;o<r;++o)a.push(i.getPixelForValue(t.getParsed(o)[i.axis],o));const s=e.barThickness;return{min:s||yn(i),pixels:a,start:i._startPixel,end:i._endPixel,stackCount:t._getStackCount(),scale:i,grouped:e.grouped,ratio:s?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(t){const e=this,{_cachedMeta:{vScale:n,_stacked:i},options:{base:a,minBarLength:o}}=e,r=a||0,s=e.getParsed(t),l=s._custom,q=Mn(l);let c,d,u