co2offset.io
Version:
Greenhouse Gas Accounting - ISO14064
13 lines • 188 kB
JavaScript
/*!
* Chart.js v3.5.1
* https://www.chartjs.org
* (c) 2021 Chart.js Contributors
* Released under the MIT License
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Chart=e()}(this,(function(){"use strict";const t="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function e(e,i,n){const o=n||(t=>Array.prototype.slice.call(t));let s=!1,a=[];return function(...n){a=o(n),s||(s=!0,t.call(window,()=>{s=!1,e.apply(i,a)}))}}function i(t,e){let i;return function(){return e?(clearTimeout(i),i=setTimeout(t,e)):t(),e}}const n=t=>"start"===t?"left":"end"===t?"right":"center",o=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,s=(t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e;var a=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const o=e.listeners[n],s=e.duration;o.forEach(n=>n({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)}))}_refresh(){const e=this;e._request||(e._running=!0,e._request=t.call(window,()=>{e._update(),e._request=null,e._running&&e._refresh()}))}_update(t=Date.now()){const e=this;let i=0;e._charts.forEach((n,o)=>{if(!n.running||!n.items.length)return;const s=n.items;let a,r=s.length-1,l=!1;for(;r>=0;--r)a=s[r],a._active?(a._total>n.duration&&(n.duration=a._total),a.tick(t),l=!0):(s[r]=s[s.length-1],s.pop());l&&(o.draw(),e._notify(o,n,t,"progress")),s.length||(n.running=!1,e._notify(o,n,t,"complete"),n.initial=!1),i+=s.length}),e._lastDate=t,0===i&&(e._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){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 i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};
/*!
* @kurkle/color v0.1.9
* https://github.com/kurkle/color#readme
* (c) 2020 Jukka Kurkela
* Released under the MIT License
*/const r={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},l="0123456789ABCDEF",c=t=>l[15&t],h=t=>l[(240&t)>>4]+l[15&t],d=t=>(240&t)>>4==(15&t);function u(t){return t+.5|0}const f=(t,e,i)=>Math.max(Math.min(t,i),e);function g(t){return f(u(2.55*t),0,255)}function p(t){return f(u(255*t),0,255)}function m(t){return f(u(t/2.55)/100,0,1)}function x(t){return f(u(100*t),0,100)}const b=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,_=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function y(t,e,i){const n=e*Math.min(i,1-i),o=(e,o=(e+t/30)%12)=>i-n*Math.max(Math.min(o-3,9-o,1),-1);return[o(0),o(8),o(4)]}function v(t,e,i){const n=(n,o=(n+t/60)%6)=>i-i*e*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function w(t,e,i){const n=y(t,1,.5);let o;for(e+i>1&&(o=1/(e+i),e*=o,i*=o),o=0;o<3;o++)n[o]*=1-e-i,n[o]+=e;return n}function M(t){const e=t.r/255,i=t.g/255,n=t.b/255,o=Math.max(e,i,n),s=Math.min(e,i,n),a=(o+s)/2;let r,l,c;return o!==s&&(c=o-s,l=a>.5?c/(2-o-s):c/(o+s),r=o===e?(i-n)/c+(i<n?6:0):o===i?(n-e)/c+2:(e-i)/c+4,r=60*r+.5),[0|r,l||0,a]}function k(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(p)}function S(t,e,i){return k(y,t,e,i)}function P(t){return(t%360+360)%360}const D={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"},C={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 O;function T(t,e,i){if(t){let n=M(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=S(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function A(t,e){return t?Object.assign(e||{},t):t}function L(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=p(t[3]))):(e=A(t,{r:0,g:0,b:0,a:1})).a=p(e.a),e}function R(t){return"r"===t.charAt(0)?function(t){const e=b.exec(t);let i,n,o,s=255;if(e){if(e[7]!==i){const t=+e[7];s=255&(e[8]?g(t):255*t)}return i=+e[1],n=+e[3],o=+e[5],i=255&(e[2]?g(i):i),n=255&(e[4]?g(n):n),o=255&(e[6]?g(o):o),{r:i,g:n,b:o,a:s}}}(t):function(t){const e=_.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?g(+e[5]):p(+e[5]));const o=P(+e[2]),s=+e[3]/100,a=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return k(w,t,e,i)}(o,s,a):"hsv"===e[1]?function(t,e,i){return k(v,t,e,i)}(o,s,a):S(o,s,a),{r:i[0],g:i[1],b:i[2],a:n}}(t)}class E{constructor(t){if(t instanceof E)return t;const e=typeof t;let i;var n,o,s;"object"===e?i=L(t):"string"===e&&(s=(n=t).length,"#"===n[0]&&(4===s||5===s?o={r:255&17*r[n[1]],g:255&17*r[n[2]],b:255&17*r[n[3]],a:5===s?17*r[n[4]]:255}:7!==s&&9!==s||(o={r:r[n[1]]<<4|r[n[2]],g:r[n[3]]<<4|r[n[4]],b:r[n[5]]<<4|r[n[6]],a:9===s?r[n[7]]<<4|r[n[8]]:255})),i=o||function(t){O||(O=function(){const t={},e=Object.keys(C),i=Object.keys(D);let n,o,s,a,r;for(n=0;n<e.length;n++){for(a=r=e[n],o=0;o<i.length;o++)s=i[o],r=r.replace(s,D[s]);s=parseInt(C[a],16),t[r]=[s>>16&255,s>>8&255,255&s]}return t}(),O.transparent=[0,0,0,0]);const e=O[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||R(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=A(this._rgb);return t&&(t.a=m(t.a)),t}set rgb(t){this._rgb=L(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${m(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?function(t){var e=function(t){return d(t.r)&&d(t.g)&&d(t.b)&&d(t.a)}(t)?c:h;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=M(t),i=e[0],n=x(e[1]),o=x(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${o}%, ${m(t.a)})`:`hsl(${i}, ${n}%, ${o}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,o=t.rgb;let s;const a=e===s?.5:e,r=2*a-1,l=n.a-o.a,c=((r*l==-1?r:(r+l)/(1+r*l))+1)/2;s=1-c,n.r=255&c*n.r+s*o.r+.5,n.g=255&c*n.g+s*o.g+.5,n.b=255&c*n.b+s*o.b+.5,n.a=a*n.a+(1-a)*o.a,i.rgb=n}return i}clone(){return new E(this.rgb)}alpha(t){return this._rgb.a=p(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=u(.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 T(this._rgb,2,t),this}darken(t){return T(this._rgb,2,-t),this}saturate(t){return T(this._rgb,1,t),this}desaturate(t){return T(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=M(t);i[0]=P(i[0]+e),i=S(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function I(t){return new E(t)}const z=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function F(t){return z(t)?t:I(t)}function B(t){return z(t)?t:I(t).saturate(.5).darken(.1).hexString()}function V(){}const W=function(){let t=0;return function(){return t++}}();function N(t){return null==t}function H(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 j(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const $=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function Y(t,e){return $(t)?t:e}function U(t,e){return void 0===t?e:t}const X=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:t/e,q=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function K(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function G(t,e,i,n){let o,s,a;if(H(t))if(s=t.length,n)for(o=s-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;o<s;o++)e.call(i,t[o],o);else if(j(t))for(a=Object.keys(t),s=a.length,o=0;o<s;o++)e.call(i,t[a[o]],a[o])}function Z(t,e){let i,n,o,s;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(o=t[i],s=e[i],o.datasetIndex!==s.datasetIndex||o.index!==s.index)return!1;return!0}function Q(t){if(H(t))return t.map(Q);if(j(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let o=0;for(;o<n;++o)e[i[o]]=Q(t[i[o]]);return e}return t}function J(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function tt(t,e,i,n){if(!J(t))return;const o=e[t],s=i[t];j(o)&&j(s)?et(o,s,n):e[t]=Q(s)}function et(t,e,i){const n=H(e)?e:[e],o=n.length;if(!j(t))return t;const s=(i=i||{}).merger||tt;for(let a=0;a<o;++a){if(!j(e=n[a]))continue;const o=Object.keys(e);for(let n=0,a=o.length;n<a;++n)s(o[n],t,e,i)}return t}function it(t,e){return et(t,e,{merger:nt})}function nt(t,e,i){if(!J(t))return;const n=e[t],o=i[t];j(n)&&j(o)?it(n,o):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Q(o))}function ot(t,e){const i=t.indexOf(".",e);return-1===i?t.length:i}function st(t,e){if(""===e)return t;let i=0,n=ot(e,i);for(;t&&n>i;)t=t[e.substr(i,n-i)],i=n+1,n=ot(e,i);return t}function at(t){return t.charAt(0).toUpperCase()+t.slice(1)}const rt=t=>void 0!==t,lt=t=>"function"==typeof t,ct=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},ht=Object.create(null),dt=Object.create(null);function ut(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;e<n;++e){const n=i[e];t=t[n]||(t[n]=Object.create(null))}return t}function ft(t,e,i){return"string"==typeof e?et(ut(t,e),i):et(ut(t,""),e)}var gt=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)=>B(e.backgroundColor),this.hoverBorderColor=(t,e)=>B(e.borderColor),this.hoverColor=(t,e)=>B(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 ft(this,t,e)}get(t){return ut(this,t)}describe(t,e){return ft(dt,t,e)}override(t,e){return ft(ht,t,e)}route(t,e,i,n){const o=ut(this,t),s=ut(this,i),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=s[n];return j(t)?Object.assign({},e,t):U(t,e)},set(t){this[a]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});const pt=Math.PI,mt=2*pt,xt=mt+pt,bt=Number.POSITIVE_INFINITY,_t=pt/180,yt=pt/2,vt=pt/4,wt=2*pt/3,Mt=Math.log10,kt=Math.sign;function St(t){const e=Math.round(t);t=Ct(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(Mt(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function Pt(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n==0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort((t,e)=>t-e).pop(),e}function Dt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function Ct(t,e,i){return Math.abs(t-e)<i}function Ot(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}function Tt(t,e,i){let n,o,s;for(n=0,o=t.length;n<o;n++)s=t[n][i],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function At(t){return t*(pt/180)}function Lt(t){return t*(180/pt)}function Rt(t){if(!$(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Et(t,e){const i=e.x-t.x,n=e.y-t.y,o=Math.sqrt(i*i+n*n);let s=Math.atan2(n,i);return s<-.5*pt&&(s+=mt),{angle:s,distance:o}}function It(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function zt(t,e){return(t-e+xt)%mt-pt}function Ft(t){return(t%mt+mt)%mt}function Bt(t,e,i,n){const o=Ft(t),s=Ft(e),a=Ft(i),r=Ft(s-o),l=Ft(a-o),c=Ft(o-s),h=Ft(o-a);return o===s||o===a||n&&s===a||r>l&&c<h}function Vt(t,e,i){return Math.max(e,Math.min(i,t))}function Wt(t){return Vt(t,-32768,32767)}function Nt(t){return!t||N(t.size)||N(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Ht(t,e,i,n,o){let s=e[o];return s||(s=e[o]=t.measureText(o).width,i.push(o)),s>n&&(n=s),n}function jt(t,e,i,n){let o=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(o=n.data={},s=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let a=0;const r=i.length;let l,c,h,d,u;for(l=0;l<r;l++)if(d=i[l],null!=d&&!0!==H(d))a=Ht(t,o,s,a,d);else if(H(d))for(c=0,h=d.length;c<h;c++)u=d[c],null==u||H(u)||(a=Ht(t,o,s,a,u));t.restore();const f=s.length/2;if(f>i.length){for(l=0;l<f;l++)delete o[s[l]];s.splice(0,f)}return a}function $t(t,e,i){const n=t.currentDevicePixelRatio,o=0!==i?Math.max(i/2,.5):0;return Math.round((e-o)*n)/n+o}function Yt(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Ut(t,e,i,n){let o,s,a,r,l;const c=e.pointStyle,h=e.rotation,d=e.radius;let u=(h||0)*_t;if(c&&"object"==typeof c&&(o=c.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,n),t.rotate(u),t.drawImage(c,-c.width/2,-c.height/2,c.width,c.height),void t.restore();if(!(isNaN(d)||d<=0)){switch(t.beginPath(),c){default:t.arc(i,n,d,0,mt),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(u)*d,n-Math.cos(u)*d),u+=wt,t.lineTo(i+Math.sin(u)*d,n-Math.cos(u)*d),u+=wt,t.lineTo(i+Math.sin(u)*d,n-Math.cos(u)*d),t.closePath();break;case"rectRounded":l=.516*d,r=d-l,s=Math.cos(u+vt)*r,a=Math.sin(u+vt)*r,t.arc(i-s,n-a,l,u-pt,u-yt),t.arc(i+a,n-s,l,u-yt,u),t.arc(i+s,n+a,l,u,u+yt),t.arc(i-a,n+s,l,u+yt,u+pt),t.closePath();break;case"rect":if(!h){r=Math.SQRT1_2*d,t.rect(i-r,n-r,2*r,2*r);break}u+=vt;case"rectRot":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+a,n-s),t.lineTo(i+s,n+a),t.lineTo(i-a,n+s),t.closePath();break;case"crossRot":u+=vt;case"cross":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"star":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s),u+=vt,s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"line":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(u)*d,n+Math.sin(u)*d)}t.fill(),e.borderWidth>0&&t.stroke()}}function Xt(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function qt(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Kt(t){t.restore()}function Gt(t,e,i,n,o){if(!e)return t.lineTo(i.x,i.y);if("middle"===o){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===o!=!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function Zt(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function Qt(t,e,i,n,o,s={}){const a=H(e)?e:[e],r=s.strokeWidth>0&&""!==s.strokeColor;let l,c;for(t.save(),t.font=o.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),N(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,s),l=0;l<a.length;++l)c=a[l],r&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),N(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(c,i,n,s.maxWidth)),t.fillText(c,i,n,s.maxWidth),Jt(t,i,n,c,s),n+=o.lineHeight;t.restore()}function Jt(t,e,i,n,o){if(o.strikethrough||o.underline){const s=t.measureText(n),a=e-s.actualBoundingBoxLeft,r=e+s.actualBoundingBoxRight,l=i-s.actualBoundingBoxAscent,c=i+s.actualBoundingBoxDescent,h=o.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=o.decorationWidth||2,t.moveTo(a,h),t.lineTo(r,h),t.stroke()}}function te(t,e){const{x:i,y:n,w:o,h:s,radius:a}=e;t.arc(i+a.topLeft,n+a.topLeft,a.topLeft,-yt,pt,!0),t.lineTo(i,n+s-a.bottomLeft),t.arc(i+a.bottomLeft,n+s-a.bottomLeft,a.bottomLeft,pt,yt,!0),t.lineTo(i+o-a.bottomRight,n+s),t.arc(i+o-a.bottomRight,n+s-a.bottomRight,a.bottomRight,yt,0,!0),t.lineTo(i+o,n+a.topRight),t.arc(i+o-a.topRight,n+a.topRight,a.topRight,0,-yt,!0),t.lineTo(i+a.topLeft,n)}function ee(t,e,i){i=i||(i=>t[i]<e);let n,o=t.length-1,s=0;for(;o-s>1;)n=s+o>>1,i(n)?s=n:o=n;return{lo:s,hi:o}}const ie=(t,e,i)=>ee(t,i,n=>t[n][e]<i),ne=(t,e,i)=>ee(t,i,n=>t[n][e]>=i);function oe(t,e,i){let n=0,o=t.length;for(;n<o&&t[n]<e;)n++;for(;o>n&&t[o-1]>i;)o--;return n>0||o<t.length?t.slice(n,o):t}const se=["push","pop","shift","splice","unshift"];function ae(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),se.forEach(e=>{const i="_onData"+at(e),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const o=n.apply(this,e);return t._chartjs.listeners.forEach(t=>{"function"==typeof t[i]&&t[i](...e)}),o}})}))}function re(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,o=n.indexOf(e);-1!==o&&n.splice(o,1),n.length>0||(se.forEach(e=>{delete t[e]}),delete t._chartjs)}function le(t){const e=new Set;let i,n;for(i=0,n=t.length;i<n;++i)e.add(t[i]);return e.size===n?t:Array.from(e)}function ce(){return"undefined"!=typeof window&&"undefined"!=typeof document}function he(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function de(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const ue=t=>window.getComputedStyle(t,null);function fe(t,e){return ue(t).getPropertyValue(e)}const ge=["top","right","bottom","left"];function pe(t,e,i){const n={};i=i?"-"+i:"";for(let o=0;o<4;o++){const s=ge[o];n[s]=parseFloat(t[e+"-"+s+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function me(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,o=ue(i),s="border-box"===o.boxSizing,a=pe(o,"padding"),r=pe(o,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,o=n&&n.length?n[0]:i,{offsetX:s,offsetY:a}=o;let r,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(s,a,i.target))r=s,l=a;else{const t=e.getBoundingClientRect();r=o.clientX-t.left,l=o.clientY-t.top,c=!0}return{x:r,y:l,box:c}}(t,i),d=a.left+(h&&r.left),u=a.top+(h&&r.top);let{width:f,height:g}=e;return s&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*i.width/n),y:Math.round((c-u)/g*i.height/n)}}const xe=t=>Math.round(10*t)/10;function be(t,e,i,n){const o=ue(t),s=pe(o,"margin"),a=de(o.maxWidth,t,"clientWidth")||bt,r=de(o.maxHeight,t,"clientHeight")||bt,l=function(t,e,i){let n,o;if(void 0===e||void 0===i){const s=he(t);if(s){const t=s.getBoundingClientRect(),a=ue(s),r=pe(a,"border","width"),l=pe(a,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,n=de(a.maxWidth,s,"clientWidth"),o=de(a.maxHeight,s,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||bt,maxHeight:o||bt}}(t,e,i);let{width:c,height:h}=l;if("content-box"===o.boxSizing){const t=pe(o,"border","width"),e=pe(o,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-s.width),h=Math.max(0,n?Math.floor(c/n):h-s.height),c=xe(Math.min(c,a,l.maxWidth)),h=xe(Math.min(h,r,l.maxHeight)),c&&!h&&(h=xe(c/2)),{width:c,height:h}}function _e(t,e,i){const n=e||1,o=Math.floor(t.height*n),s=Math.floor(t.width*n);t.height=o/n,t.width=s/n;const a=t.canvas;return a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height=t.height+"px",a.style.width=t.width+"px"),(t.currentDevicePixelRatio!==n||a.height!==o||a.width!==s)&&(t.currentDevicePixelRatio=n,a.height=o,a.width=s,t.ctx.setTransform(n,0,0,n,0,0),!0)}const ye=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 ve(t,e){const i=fe(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function we(t,e){return"native"in t?{x:t.x,y:t.y}:me(t,e)}function Me(t,e,i,n){const{controller:o,data:s,_sorted:a}=t,r=o._cachedMeta.iScale;if(r&&e===r.axis&&a&&s.length){const t=r._reversePixels?ne:ie;if(!n)return t(s,e,i);if(o._sharedOptions){const n=s[0],o="function"==typeof n.getRange&&n.getRange(e);if(o){const n=t(s,e,i-o),a=t(s,e,i+o);return{lo:n.lo,hi:a.hi}}}}return{lo:0,hi:s.length-1}}function ke(t,e,i,n,o){const s=t.getSortedVisibleDatasetMetas(),a=i[e];for(let t=0,i=s.length;t<i;++t){const{index:i,data:r}=s[t],{lo:l,hi:c}=Me(s[t],e,a,o);for(let t=l;t<=c;++t){const e=r[t];e.skip||n(e,i,t)}}}function Se(t,e,i,n){const o=[];return Xt(e,t.chartArea,t._minPadding)?(ke(t,i,e,(function(t,i,s){t.inRange(e.x,e.y,n)&&o.push({element:t,datasetIndex:i,index:s})}),!0),o):o}function Pe(t,e,i,n,o){const s=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const o=e?Math.abs(t.x-n.x):0,s=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}(i);let a=Number.POSITIVE_INFINITY,r=[];return Xt(e,t.chartArea,t._minPadding)?(ke(t,i,e,(function(i,l,c){if(n&&!i.inRange(e.x,e.y,o))return;const h=i.getCenterPoint(o);if(!Xt(h,t.chartArea,t._minPadding)&&!i.inRange(e.x,e.y,o))return;const d=s(e,h);d<a?(r=[{element:i,datasetIndex:l,index:c}],a=d):d===a&&r.push({element:i,datasetIndex:l,index:c})})),r):r}function De(t,e,i,n){const o=we(e,t),s=[],a=i.axis,r="x"===a?"inXRange":"inYRange";let l=!1;return function(t,e){const i=t.getSortedVisibleDatasetMetas();let n,o,s;for(let t=0,a=i.length;t<a;++t){({index:n,data:o}=i[t]);for(let t=0,i=o.length;t<i;++t)s=o[t],s.skip||e(s,n,t)}}(t,(t,e,i)=>{t[r](o[a],n)&&s.push({element:t,datasetIndex:e,index:i}),t.inRange(o.x,o.y,n)&&(l=!0)}),i.intersect&&!l?[]:s}var Ce={modes:{index(t,e,i,n){const o=we(e,t),s=i.axis||"x",a=i.intersect?Se(t,o,s,n):Pe(t,o,s,!1,n),r=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{const e=a[0].index,i=t.data[e];i&&!i.skip&&r.push({element:i,datasetIndex:t.index,index:e})}),r):[]},dataset(t,e,i,n){const o=we(e,t),s=i.axis||"xy";let a=i.intersect?Se(t,o,s,n):Pe(t,o,s,!1,n);if(a.length>0){const e=a[0].datasetIndex,i=t.getDatasetMeta(e).data;a=[];for(let t=0;t<i.length;++t)a.push({element:i[t],datasetIndex:e,index:t})}return a},point:(t,e,i,n)=>Se(t,we(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>Pe(t,we(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",De(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",De(t,e,i,n))}};const Oe=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),Te=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Ae(t,e){const i=(""+t).match(Oe);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function Le(t,e){const i={},n=j(e),o=n?Object.keys(e):e,s=j(t)?n?i=>U(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of o)i[t]=+s(t)||0;return i}function Re(t){return Le(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Ee(t){return Le(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Ie(t){const e=Re(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ze(t,e){t=t||{},e=e||gt.font;let i=U(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=U(t.style,e.style);n&&!(""+n).match(Te)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const o={family:U(t.family,e.family),lineHeight:Ae(U(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:U(t.weight,e.weight),string:""};return o.string=Nt(o),o}function Fe(t,e,i,n){let o,s,a,r=!0;for(o=0,s=t.length;o<s;++o)if(a=t[o],void 0!==a&&(void 0!==e&&"function"==typeof a&&(a=a(e),r=!1),void 0!==i&&H(a)&&(a=a[i%a.length],r=!1),void 0!==a))return n&&!r&&(n.cacheable=!1),a}function Be(t,e){const{min:i,max:n}=t;return{min:i-Math.abs(q(e,i)),max:n+q(e,n)}}const Ve=["left","top","right","bottom"];function We(t,e){return t.filter(t=>t.pos===e)}function Ne(t,e){return t.filter(t=>-1===Ve.indexOf(t.pos)&&t.box.axis===e)}function He(t,e){return t.sort((t,i)=>{const n=e?i:t,o=e?t:i;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function je(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function $e(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Ye(t,e,i,n){const{pos:o,box:s}=i,a=t.maxPadding;if(!j(o)){i.size&&(t[o]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?s.height:s.width),i.size=e.size/e.count,t[o]+=i.size}s.getPadding&&$e(a,s.getPadding());const r=Math.max(0,e.outerWidth-je(a,t,"left","right")),l=Math.max(0,e.outerHeight-je(a,t,"top","bottom")),c=r!==t.w,h=l!==t.h;return t.w=r,t.h=l,i.horizontal?{same:c,other:h}:{same:h,other:c}}function Ue(t,e){const i=e.maxPadding;return function(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{n[t]=Math.max(e[t],i[t])}),n}(t?["left","right"]:["top","bottom"])}function Xe(t,e,i,n){const o=[];let s,a,r,l,c,h;for(s=0,a=t.length,c=0;s<a;++s){r=t[s],l=r.box,l.update(r.width||e.w,r.height||e.h,Ue(r.horizontal,e));const{same:a,other:d}=Ye(e,i,r,n);c|=a&&o.length,h=h||d,l.fullSize||o.push(r)}return c&&Xe(o,e,i,n)||h}function qe(t,e,i,n,o){t.top=i,t.left=e,t.right=e+n,t.bottom=i+o,t.width=n,t.height=o}function Ke(t,e,i,n){const o=i.padding;let{x:s,y:a}=e;for(const r of t){const t=r.box,l=n[r.stack]||{count:1,placed:0,weight:1},c=r.stackWeight/l.weight||1;if(r.horizontal){const n=e.w*c,s=l.size||t.height;rt(l.start)&&(a=l.start),t.fullSize?qe(t,o.left,a,i.outerWidth-o.right-o.left,s):qe(t,e.left+l.placed,a,n,s),l.start=a,l.placed+=n,a=t.bottom}else{const n=e.h*c,a=l.size||t.width;rt(l.start)&&(s=l.start),t.fullSize?qe(t,s,o.top,a,i.outerHeight-o.bottom-o.top):qe(t,s,e.top+l.placed,a,n),l.start=s,l.placed+=n,s=t.right}}e.x=s,e.y=a}gt.set("layout",{padding:{top:0,right:0,bottom:0,left:0}});var Ge={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,n){if(!t)return;const o=Ie(t.options.layout.padding),s=Math.max(e-o.width,0),a=Math.max(i-o.height,0),r=function(t){const e=function(t){const e=[];let i,n,o,s,a,r;for(i=0,n=(t||[]).length;i<n;++i)o=t[i],({position:s,options:{stack:a,stackWeight:r=1}}=o),e.push({index:i,box:o,pos:s,horizontal:o.isHorizontal(),weight:o.weight,stack:a&&s+a,stackWeight:r});return e}(t),i=He(e.filter(t=>t.box.fullSize),!0),n=He(We(e,"left"),!0),o=He(We(e,"right")),s=He(We(e,"top"),!0),a=He(We(e,"bottom")),r=Ne(e,"x"),l=Ne(e,"y");return{fullSize:i,leftAndTop:n.concat(s),rightAndBottom:o.concat(l).concat(a).concat(r),chartArea:We(e,"chartArea"),vertical:n.concat(o).concat(l),horizontal:s.concat(a).concat(r)}}(t.boxes),l=r.vertical,c=r.horizontal;G(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});const h=l.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:o,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},o);$e(u,Ie(n));const f=Object.assign({maxPadding:u,w:s,h:a,x:o.left,y:o.top},o),g=function(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:o}=i;if(!t||!Ve.includes(n))continue;const s=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=o}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:o}=e;let s,a,r;for(s=0,a=t.length;s<a;++s){r=t[s];const{fullSize:a}=r.box,l=i[r.stack],c=l&&r.stackWeight/l.weight;r.horizontal?(r.width=c?c*n:a&&e.availableWidth,r.height=o):(r.width=n,r.height=c?c*o:a&&e.availableHeight)}return i}(l.concat(c),d);Xe(r.fullSize,f,d,g),Xe(l,f,d,g),Xe(c,f,d,g)&&Xe(l,f,d,g),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),Ke(r.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,Ke(r.rightAndBottom,f,d,g),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},G(r.chartArea,e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h)})}};function Ze(t,e=[""],i=t,n,o=(()=>t[0])){rt(n)||(n=li("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:o,override:o=>Ze([o,...t],e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>ii(i,n,()=>function(t,e,i,n){let o;for(const s of e)if(o=li(ti(s,t),i),rt(o))return ei(t,o)?ai(i,n,t,o):o}(n,e,t,i)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>ci(t).includes(e),ownKeys:t=>ci(t),set:(t,e,i)=>((t._storage||(t._storage=o()))[e]=i,delete t[e],delete t._keys,!0)})}function Qe(t,e,i,n){const o={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Je(t,n),setContext:e=>Qe(t,e,i,n),override:o=>Qe(t.override(o),e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>ii(t,e,()=>function(t,e,i){const{_proxy:n,_context:o,_subProxy:s,_descriptors:a}=t;let r=n[e];return lt(r)&&a.isScriptable(e)&&(r=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);return r.add(t),e=e(s,a||n),r.delete(t),j(e)&&(e=ai(o._scopes,o,t,e)),e}(e,r,t,i)),H(r)&&r.length&&(r=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_descriptors:r}=i;if(rt(s.index)&&n(t))e=e[s.index%e.length];else if(j(e[0])){const i=e,n=o._scopes.filter(t=>t!==i);e=[];for(const l of i){const i=ai(n,o,t,l);e.push(Qe(i,s,a&&a[t],r))}}return e}(e,r,t,a.isIndexable)),ei(e,r)&&(r=Qe(r,o,s&&s[e],a)),r}(t,e,i)),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function Je(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:i,indexable:n,isScriptable:lt(i)?i:()=>i,isIndexable:lt(n)?n:()=>n}}const ti=(t,e)=>t?t+at(e):e,ei=(t,e)=>j(e)&&"adapters"!==t;function ii(t,e,i){let n=t[e];return rt(n)||(n=i(),rt(n)&&(t[e]=n)),n}function ni(t,e,i){return lt(t)?t(e,i):t}const oi=(t,e)=>!0===t?e:"string"==typeof t?st(e,t):void 0;function si(t,e,i,n){for(const o of e){const e=oi(i,o);if(e){t.add(e);const o=ni(e._fallback,i,e);if(rt(o)&&o!==i&&o!==n)return o}else if(!1===e&&rt(n)&&i!==n)return null}return!1}function ai(t,e,i,n){const o=e._rootScopes,s=ni(e._fallback,i,n),a=[...t,...o],r=new Set;r.add(n);let l=ri(r,a,i,s||i);return null!==l&&(!rt(s)||s===i||(l=ri(r,a,s,l),null!==l))&&Ze(Array.from(r),[""],o,s,()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const o=n[e];return H(o)&&j(i)?i:o}(e,i,n))}function ri(t,e,i,n){for(;i;)i=si(t,e,i,n);return i}function li(t,e){for(const i of e){if(!i)continue;const e=i[t];if(rt(e))return e}}function ci(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}const hi=Number.EPSILON||1e-14,di=(t,e)=>e<t.length&&!t[e].skip&&t[e],ui=t=>"x"===t?"y":"x";function fi(t,e,i,n){const o=t.skip?e:t,s=e,a=i.skip?e:i,r=It(s,o),l=It(a,s);let c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=n*c,u=n*h;return{previous:{x:s.x-d*(a.x-o.x),y:s.y-d*(a.y-o.y)},next:{x:s.x+u*(a.x-o.x),y:s.y+u*(a.y-o.y)}}}function gi(t,e="x"){const i=ui(e),n=t.length,o=Array(n).fill(0),s=Array(n);let a,r,l,c=di(t,0);for(a=0;a<n;++a)if(r=l,l=c,c=di(t,a+1),l){if(c){const t=c[e]-l[e];o[a]=0!==t?(c[i]-l[i])/t:0}s[a]=r?c?kt(o[a-1])!==kt(o[a])?0:(o[a-1]+o[a])/2:o[a-1]:o[a]}!function(t,e,i){const n=t.length;let o,s,a,r,l,c=di(t,0);for(let h=0;h<n-1;++h)l=c,c=di(t,h+1),l&&c&&(Ct(e[h],0,hi)?i[h]=i[h+1]=0:(o=i[h]/e[h],s=i[h+1]/e[h],r=Math.pow(o,2)+Math.pow(s,2),r<=9||(a=3/Math.sqrt(r),i[h]=o*a*e[h],i[h+1]=s*a*e[h])))}(t,o,s),function(t,e,i="x"){const n=ui(i),o=t.length;let s,a,r,l=di(t,0);for(let c=0;c<o;++c){if(a=r,r=l,l=di(t,c+1),!r)continue;const o=r[i],h=r[n];a&&(s=(o-a[i])/3,r["cp1"+i]=o-s,r["cp1"+n]=h-s*e[c]),l&&(s=(l[i]-o)/3,r["cp2"+i]=o+s,r["cp2"+n]=h+s*e[c])}}(t,s,e)}function pi(t,e,i){return Math.max(Math.min(t,i),e)}function mi(t,e,i,n,o){let s,a,r,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)gi(t,o);else{let i=n?t[t.length-1]:t[0];for(s=0,a=t.length;s<a;++s)r=t[s],l=fi(i,r,t[Math.min(s+1,a-(n?0:1))%a],e.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,i=r}e.capBezierPoints&&function(t,e){let i,n,o,s,a,r=Xt(t[0],e);for(i=0,n=t.length;i<n;++i)a=s,s=r,r=i<n-1&&Xt(t[i+1],e),s&&(o=t[i],a&&(o.cp1x=pi(o.cp1x,e.left,e.right),o.cp1y=pi(o.cp1y,e.top,e.bottom)),r&&(o.cp2x=pi(o.cp2x,e.left,e.right),o.cp2y=pi(o.cp2y,e.top,e.bottom)))}(t,i)}const xi=t=>0===t||1===t,bi=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*mt/i),_i=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*mt/i)+1,yi={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*yt),easeOutSine:t=>Math.sin(t*yt),easeInOutSine:t=>-.5*(Math.cos(pt*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=>xi(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=>xi(t)?t:bi(t,.075,.3),easeOutElastic:t=>xi(t)?t:_i(t,.075,.3),easeInOutElastic(t){const e=.1125;return xi(t)?t:t<.5?.5*bi(2*t,e,.45):.5+.5*_i(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-yi.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*yi.easeInBounce(2*t):.5*yi.easeOutBounce(2*t-1)+.5};function vi(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function wi(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function Mi(t,e,i,n){const o={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},a=vi(t,o,i),r=vi(o,s,i),l=vi(s,e,i),c=vi(a,r,i),h=vi(r,l,i);return vi(c,h,i)}const ki=new Map;function Si(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=ki.get(i);return n||(n=new Intl.NumberFormat(t,e),ki.set(i,n)),n}(e,i).format(t)}function Pi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Di(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function Ci(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Oi(t){return"angle"===t?{between:Bt,compare:zt,normalize:Ft}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function Ti({start:t,end:e,count:i,loop:n,style:o}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:o}}function Ai(t,e,i){if(!i)return[t];const{property:n,start:o,end:s}=i,a=e.length,{compare:r,between:l,normalize:c}=Oi(n),{start:h,end:d,loop:u,style:f}=function(t,e,i){const{property:n,start:o,end:s}=i,{between:a,normalize:r}=Oi(n),l=e.length;let c,h,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,c=0,h=l;c<h&&a(r(e[d%l][n]),o,s);++c)d--,u--;d%=l,u%=l}return u<d&&(u+=l),{start:d,end:u,loop:f,style:t.style}}(t,e,i),g=[];let p,m,x,b=!1,_=null;for(let t=h,i=h;t<=d;++t)m=e[t%a],m.skip||(p=c(m[n]),p!==x&&(b=l(p,o,s),null===_&&(b||l(o,x,p)&&0!==r(o,x))&&(_=0===r(p,o)?t:i),null!==_&&(!b||0===r(s,p)||l(s,x,p))&&(g.push(Ti({start:_,end:t,loop:u,count:a,style:f})),_=null),i=t,x=p));return null!==_&&g.push(Ti({start:_,end:d,loop:u,count:a,style:f})),g}function Li(t,e){const i=[],n=t.segments;for(let o=0;o<n.length;o++){const s=Ai(n[o],t.points,e);s.length&&i.push(...s)}return i}function Ri(t,e){const i=t.points,n=t.options.spanGaps,o=i.length;if(!o)return[];const s=!!t._loop,{start:a,end:r}=function(t,e,i,n){let o=0,s=e-1;if(i&&!n)for(;o<e&&!t[o].skip;)o++;for(;o<e&&t[o].skip;)o++;for(o%=e,i&&(s+=o);s>o&&t[s%e].skip;)s--;return s%=e,{start:o,end:s}}(i,o,s,n);return Ei(t,!0===n?[{start:a,end:r,loop:s}]:function(t,e,i,n){const o=t.length,s=[];let a,r=e,l=t[e];for(a=e+1;a<=i;++a){const i=t[a%o];i.skip||i.stop?l.skip||(n=!1,s.push({start:e%o,end:(a-1)%o,loop:n}),e=r=i.stop?a:null):(r=a,l.skip&&(e=a)),l=i}return null!==r&&s.push({start:e%o,end:r%o,loop:n}),s}(i,a,r<a?r+o:r,!!t._fullLoop&&0===a&&r===o-1),i,e)}function Ei(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const o=Ii(t.options),s=i.length,a=[];let r=e[0].start,l=r;for(const c of e){let e,h=o,d=i[r%s];for(l=r+1;l<=c.end;l++){const o=i[l%s];e=Ii(n.setContext({type:"segment",p0:d,p1:o,p0DataIndex:(l-1)%s,p1DataIndex:l%s,datasetIndex:t._datasetIndex})),zi(e,h)&&(a.push({start:r,end:l-1,loop:c.loop,style:h}),h=e,r=l-1),d=o,h=e}r<l-1&&(a.push({start:r,end:l-1,loop:c.loop,style:e}),r=l-1)}return a}(t,e,i,n):e}function Ii(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function zi(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}var Fi=Object.freeze({__proto__:null,easingEffects:yi,color:F,getHoverColor:B,noop:V,uid:W,isNullOrUndef:N,isArray:H,isObject:j,isFinite:$,finiteOrDefault:Y,valueOrDefault:U,toPercentage:X,toDimension:q,callback:K,each:G,_elementsEqual:Z,clone:Q,_merger:tt,merge:et,mergeIf:it,_mergerIf:nt,_deprecated:function(t,e,i,n){void 0!==e&&console.warn(t+': "'+i+'" is deprecated. Please use "'+n+'" instead')},resolveObjectKey:st,_capitalize:at,defined:rt,isFunction:lt,setsEqual:ct,toFontString:Nt,_measureText:Ht,_longestText:jt,_alignPixel:$t,clearCanvas:Yt,drawPoint:Ut,_isPointInArea:Xt,clipArea:qt,unclipArea:Kt,_steppedLineTo:Gt,_bezierCurveTo:Zt,renderText:Qt,addRoundedRectPath:te,_lookup:ee,_lookupByKey:ie,_rlookupByKey:ne,_filterBetween:oe,listenArrayEvents:ae,unlistenArrayEvents:re,_arrayUnique:le,_createResolver:Ze,_attachContext:Qe,_descriptors:Je,splineCurve:fi,splineCurveMonotone:gi,_updateBezierControlPoints:mi,_isDomSupported:ce,_getParentNode:he,getStyle:fe,getRelativePosition:me,getMaximumSize:be,retinaScale:_e,supportsEventListenerOptions:ye,readUsedSize:ve,fontString:function(t,e,i){return e+" "+t+"px "+i},requestAnimFrame:t,throttled:e,debounce:i,_toLeftRightCenter:n,_alignStartEnd:o,_textX:s,_pointInLine:vi,_steppedInterpolation:wi,_bezierInterpolation:Mi,formatNumber:Si,toLineHeight:Ae,_readValueToProps:Le,toTRBL:Re,toTRBLCorners:Ee,toPadding:Ie,toFont:ze,resolve:Fe,_addGrace:Be,PI:pt,TAU:mt,PITAU:xt,INFINITY:bt,RAD_PER_DEG:_t,HALF_PI:yt,QUARTER_PI:vt,TWO_THIRDS_PI:wt,log10:Mt,sign:kt,niceNum:St,_factorize:Pt,isNumber:Dt,almostEquals:Ct,almostWhole:Ot,_setMinAndMaxByKey:Tt,toRadians:At,toDegrees:Lt,_decimalPlaces:Rt,getAngleFromPoint:Et,distanceBetweenPoints:It,_angleDiff:zt,_normalizeAngle:Ft,_angleBetween:Bt,_limitValue:Vt,_int16Range:Wt,getRtlAdapter:Pi,overrideTextDirection:Di,restoreTextDirection:Ci,_boundSegment:Ai,_boundSegments:Li,_computeSegments:Ri});class Bi{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}}class Vi extends Bi{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}}const Wi={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ni=t=>null===t||""===t,Hi=!!ye&&{passive:!0};function ji(t,e,i){t.canvas.removeEventListener(e,i,Hi)}function $i(t,e,i){const n=t.canvas,o=n&&he(n)||n,s=new MutationObserver(t=>{const e=he(o);t.forEach(t=>{for(let n=0;n<t.addedNodes.length;n++){const s=t.addedNodes[n];s!==o&&s!==e||i(t.target)}})});return s.observe(document,{childList:!0,subtree:!0}),s}function Yi(t,e,i){const n=t.canvas,o=n&&he(n);if(!o)return;const s=new MutationObserver(t=>{t.forEach(t=>{for(let e=0;e<t.removedNodes.length;e++)if(t.removedNodes[e]===n){i();break}})});return s.observe(o,{childList:!0}),s}const Ui=new Map;let Xi=0;function qi(){const t=window.devicePixelRatio;t!==Xi&&(Xi=t,Ui.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function Ki(t,i,n){const o=t.canvas,s=o&&he(o);if(!s)return;const a=e((t,e)=>{const i=s.clientWidth;n(t,e),i<s.clientWidth&&n()},window),r=new ResizeObserver(t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||a(i,n)});return r.observe(s),function(t,e){Ui.size||window.addEventListener("resize",qi),Ui.set(t,e)}(t,a),r}function Gi(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){Ui.delete(t),Ui.size||window.removeEventListener("resize",qi)}(t)}function Zi(t,i,n){const o=t.canvas,s=e(e=>{null!==t.ctx&&n(function(t,e){const i=Wi[t.type]||t.type,{x:n,y:o}=me(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==o?o:null}}(e,t))},t,t=>{const e=t[0];return[e,e.offsetX,e.offsetY]});return function(t,e,i){t.addEventListener(e,i,Hi)}(o,i,s),s}class Qi extends Bi{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),o=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Ni(o)){const e=ve(t,"width");void 0!==e&&(t.width=e)}if(Ni(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ve(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach(t=>{const n=i[t];N(n)?e.removeAttribute(t):e.setAttribute(t,n)});const n=i.style||{};return Object.keys(n).forEach(t=>{e.style[t]=n[t]}),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),o={attach:$i,detach:Yi,resize:Ki}[e]||Zi;n[e]=o(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];n&&(({attach:Gi,detach:Gi,resize:Gi}[e]||ji)(t,e,n),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return be(t,e,i,n)}isAttached(t){const e=he(t);return!(!e||!e.isConnected)}}function Ji(t){return!ce()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Vi:Qi}var tn=Object.freeze({__proto__:null,_detectPlatform:Ji,BasePlatform:Bi,BasicPlatform:Vi,DomPlatform:Qi});const en="transparent",nn={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=F(t||en),o=n.valid&&F(e||en);return o&&o.valid?o.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class on{constructor(t,e,i,n){const o=e[i];n=Fe([t.to,n,o,t.from]);const s=Fe([t.from,o,n]);this._active=!0,this._fn=t.fn||nn[t.type||typeof s],this._easing=yi[t.easing]||yi.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=s,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){const n=this;if(n._active){n._notify(!1);const o=n._target[n._prop],s=i-n._start,a=n._duration-s;n._start=i,n._duration=Math.floor(Math.max(a,t.duration)),n._total+=s,n._loop=!!t.loop,n._to=Fe([t.to,e,o,t.from]),n._from=Fe([t.from,o,e])}}cancel(){const t=this;t._active&&(t.tick(Date.now()),t._active=!1,t._notify(!1))}tick(t){const e=this,i=t-e._start,n=e._duration,o=e._prop,s=e._from,a=e._loop,r=e._to;let l;if(e._active=s!==r&&(a||i<n),!e._active)return e._target[o]=r,void e._notify(!0);i<0?e._target[o]=s:(l=i/n%2,l=a&&l>1?2-l:l,l=e._easing(Math.min(1,Math.max(0,l))),e._target[o]=e._fn(s,r,l))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}gt.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(gt.animation);gt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),gt.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),gt.describe("animations",{_fallback:"animation"}),gt.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 an{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!j(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const n=t[i];if(!j(n))return;const o={};for(const t of sn)o[t]=n[t];(H(n.properties)&&n.properties||[i]).forEach(t=>{t!==i&&e.has(t)||e.set(t,o)})})}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(i)return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;t.options=e}(t,i);if(!n)return[];const o=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e<n.length;e++){const o=t[n[e]];o&&o.active()&&i.push(o.wait())}return Promise.all(i)}(t.options.$animations,i).then(()=>{t.options=i},()=>{}),o}_createAnimations(t,e){const i=this._properties,n=[],o=t.$animations||(t.$animations={}),s=Object.keys(e),a=Date.now();let r;