UNPKG

@mxtommy/kip

Version:

An advanced and versatile marine instrumentation package to display Signal K data.

3 lines 275 kB
import{a as Us}from"./chunk-EQAHQINY.js";import{a as Li,g as Ys,n as Bs,o as qs}from"./chunk-EQ5CPWIU.js";import{a as Ai,b as Ii,m as zs,oa as Hs,ua as Je}from"./chunk-Y7X77HSW.js";var ir={200:"The request was successfully.",202:"Request accepted and pending completion.",400:"Something is wrong with the client's request.",401:"Login failed. Your User ID or Password is incorrect.",403:"DENIED: Authorization with R/W or Admin permission level is required to send commands. Configure Sign In credential.",405:"The server does not support the request.",500:"The request failed.",502:"Something went wrong carrying out the request on the server.",504:"Timeout on the server side trying to carry out the request."},qp=(()=>{class i{signalKDeltaService=Je(qs);appSettingsService=Je(Ys);appService=Je(Us);auth=Je(Bs);requestStatus$=new zs;requests=[];constructor(){let t=this.signalKDeltaService.subscribeRequestUpdates().subscribe(n=>{this.updateRequest(n)})}requestDeviceAccessToken(){let t=Li.create(),n={requestId:t,accessRequest:{clientId:this.appSettingsService.KipUUID,description:"KIP Instrument MDF",permissions:"admin"}};console.log("[Request Service] Requesting Device Authorization Token"),this.signalKDeltaService.publishDelta(n);let r={requestId:t,state:null,statusCode:null};return this.requests.push(r),t}requestUserLogin(t,n){let r=Li.create(),s={requestId:r,login:{username:t,password:n}};console.log("[Request Service] Requesting User Login"),this.signalKDeltaService.publishDelta(s);let o={requestId:r,state:null,statusCode:null};return this.requests.push(o),r}putRequest(t,n,r){let s=Li.create(),o=t.replace(/^(self\.)/,""),l={context:"vessels.self",requestId:s,put:{path:o,value:n}};this.signalKDeltaService.publishDelta(l);let c={requestId:s,state:null,statusCode:null,widgetUUID:r};return this.requests.push(c),s}updateRequest(t){let n=this.requests.findIndex(r=>r.requestId==t.requestId);if(n>-1){this.requests[n].state=t.state,this.requests[n].statusCode=t.statusCode,this.requests[n].message=t.message;let r=ir[t.statusCode];if(typeof r<"u"&&(this.requests[n].statusCode==200||this.requests[n].statusCode==202||this.requests[n].statusCode==400||this.requests[n].statusCode==401||this.requests[n].statusCode==403||this.requests[n].statusCode==405)){if(this.requests[n].statusCodeDescription=r,this.requests[n].statusCode==202){console.log("[Request Service] Async 202 response received");return}this.requests[n].statusCode==400&&(this.appService.sendSnackbarNotification(this.requests[n].message),console.log("[Request Service] "+this.requests[n].message)),this.requests[n].statusCode==403&&console.warn("[Request Service] Status Code: "+this.requests[n].statusCode+" - "+this.requests[n].statusCodeDescription),this.requests[n].statusCode==405&&console.error("[Request Service] Status Code: "+this.requests[n].statusCode+" - "+this.requests[n].message),t.accessRequest!==void 0&&t.accessRequest.token!==void 0?(this.appService.sendSnackbarNotification(t.accessRequest.permission+": Device Access Token received from server."),console.log(`[Request Service] ${t.accessRequest.permission}: Device Access Token received`),this.auth.setDeviceAccessToken(t.accessRequest.token)):t.login!==void 0&&t.login.token}else this.appService.sendSnackbarNotification("ERROR: Unknown Request Status Code received: "+this.requests[n].statusCode+" - "+ir[this.requests[n].statusCode]+" - "+this.requests[n].message),console.error("[Request Service] Unknown Request Status Code received: "+this.requests[n].statusCode+" - "+ir[this.requests[n].statusCode]+" - "+this.requests[n].message);try{this.requestStatus$.next(this.requests[n]),this.requests.splice(n,1)}catch(s){this.requestStatus$.error(s),console.error("[Request Service] "+s),this.requests=[]}}else this.appService.sendSnackbarNotification(`ERROR: A request message that contains an unknown Request ID was received. Request Delta: `+JSON.stringify(t)),console.error(`[Request Service] A Request message that contains an unknown Request ID was received. from delta: `+JSON.stringify(t))}subscribeRequest(){return this.requestStatus$.asObservable()}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Hs({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function ii(i){return i+.5|0}var te=(i,e,t)=>Math.max(Math.min(i,t),e);function ti(i){return te(ii(i*2.55),0,255)}function ee(i){return te(ii(i*255),0,255)}function Bt(i){return te(ii(i/2.55)/100,0,1)}function Vs(i){return te(ii(i*100),0,100)}var Dt={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},rr=[..."0123456789ABCDEF"],oc=i=>rr[i&15],ac=i=>rr[(i&240)>>4]+rr[i&15],Ri=i=>(i&240)>>4===(i&15),lc=i=>Ri(i.r)&&Ri(i.g)&&Ri(i.b)&&Ri(i.a);function cc(i){var e=i.length,t;return i[0]==="#"&&(e===4||e===5?t={r:255&Dt[i[1]]*17,g:255&Dt[i[2]]*17,b:255&Dt[i[3]]*17,a:e===5?Dt[i[4]]*17:255}:(e===7||e===9)&&(t={r:Dt[i[1]]<<4|Dt[i[2]],g:Dt[i[3]]<<4|Dt[i[4]],b:Dt[i[5]]<<4|Dt[i[6]],a:e===9?Dt[i[7]]<<4|Dt[i[8]]:255})),t}var uc=(i,e)=>i<255?e(i):"";function fc(i){var e=lc(i)?oc:ac;return i?"#"+e(i.r)+e(i.g)+e(i.b)+uc(i.a,e):void 0}var dc=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Qs(i,e,t){let n=e*Math.min(t,1-t),r=(s,o=(s+i/30)%12)=>t-n*Math.max(Math.min(o-3,9-o,1),-1);return[r(0),r(8),r(4)]}function hc(i,e,t){let n=(r,s=(r+i/60)%6)=>t-t*e*Math.max(Math.min(s,4-s,1),0);return[n(5),n(3),n(1)]}function mc(i,e,t){let n=Qs(i,1,.5),r;for(e+t>1&&(r=1/(e+t),e*=r,t*=r),r=0;r<3;r++)n[r]*=1-e-t,n[r]+=e;return n}function pc(i,e,t,n,r){return i===r?(e-t)/n+(e<t?6:0):e===r?(t-i)/n+2:(i-e)/n+4}function sr(i){let t=i.r/255,n=i.g/255,r=i.b/255,s=Math.max(t,n,r),o=Math.min(t,n,r),a=(s+o)/2,l,c,u;return s!==o&&(u=s-o,c=a>.5?u/(2-s-o):u/(s+o),l=pc(t,n,r,u,s),l=l*60+.5),[l|0,c||0,a]}function or(i,e,t,n){return(Array.isArray(e)?i(e[0],e[1],e[2]):i(e,t,n)).map(ee)}function ar(i,e,t){return or(Qs,i,e,t)}function gc(i,e,t){return or(mc,i,e,t)}function bc(i,e,t){return or(hc,i,e,t)}function Gs(i){return(i%360+360)%360}function xc(i){let e=dc.exec(i),t=255,n;if(!e)return;e[5]!==n&&(t=e[6]?ti(+e[5]):ee(+e[5]));let r=Gs(+e[2]),s=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?n=gc(r,s,o):e[1]==="hsv"?n=bc(r,s,o):n=ar(r,s,o),{r:n[0],g:n[1],b:n[2],a:t}}function vc(i,e){var t=sr(i);t[0]=Gs(t[0]+e),t=ar(t),i.r=t[0],i.g=t[1],i.b=t[2]}function yc(i){if(!i)return;let e=sr(i),t=e[0],n=Vs(e[1]),r=Vs(e[2]);return i.a<255?`hsla(${t}, ${n}%, ${r}%, ${Bt(i.a)})`:`hsl(${t}, ${n}%, ${r}%)`}var js={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"},$s={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"};function _c(){let i={},e=Object.keys($s),t=Object.keys(js),n,r,s,o,a;for(n=0;n<e.length;n++){for(o=a=e[n],r=0;r<t.length;r++)s=t[r],a=a.replace(s,js[s]);s=parseInt($s[o],16),i[a]=[s>>16&255,s>>8&255,s&255]}return i}var Ei;function wc(i){Ei||(Ei=_c(),Ei.transparent=[0,0,0,0]);let e=Ei[i.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}var Mc=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function kc(i){let e=Mc.exec(i),t=255,n,r,s;if(e){if(e[7]!==n){let o=+e[7];t=e[8]?ti(o):te(o*255,0,255)}return n=+e[1],r=+e[3],s=+e[5],n=255&(e[2]?ti(n):te(n,0,255)),r=255&(e[4]?ti(r):te(r,0,255)),s=255&(e[6]?ti(s):te(s,0,255)),{r:n,g:r,b:s,a:t}}}function Dc(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${Bt(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}var nr=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,Se=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function Tc(i,e,t){let n=Se(Bt(i.r)),r=Se(Bt(i.g)),s=Se(Bt(i.b));return{r:ee(nr(n+t*(Se(Bt(e.r))-n))),g:ee(nr(r+t*(Se(Bt(e.g))-r))),b:ee(nr(s+t*(Se(Bt(e.b))-s))),a:i.a+t*(e.a-i.a)}}function Fi(i,e,t){if(i){let n=sr(i);n[e]=Math.max(0,Math.min(n[e]+n[e]*t,e===0?360:1)),n=ar(n),i.r=n[0],i.g=n[1],i.b=n[2]}}function Ks(i,e){return i&&Object.assign(e||{},i)}function Xs(i){var e={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(e={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(e.a=ee(i[3]))):(e=Ks(i,{r:0,g:0,b:0,a:1}),e.a=ee(e.a)),e}function Cc(i){return i.charAt(0)==="r"?kc(i):xc(i)}var ei=class i{constructor(e){if(e instanceof i)return e;let t=typeof e,n;t==="object"?n=Xs(e):t==="string"&&(n=cc(e)||wc(e)||Cc(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=Ks(this._rgb);return e&&(e.a=Bt(e.a)),e}set rgb(e){this._rgb=Xs(e)}rgbString(){return this._valid?Dc(this._rgb):void 0}hexString(){return this._valid?fc(this._rgb):void 0}hslString(){return this._valid?yc(this._rgb):void 0}mix(e,t){if(e){let n=this.rgb,r=e.rgb,s,o=t===s?.5:t,a=2*o-1,l=n.a-r.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;s=1-c,n.r=255&c*n.r+s*r.r+.5,n.g=255&c*n.g+s*r.g+.5,n.b=255&c*n.b+s*r.b+.5,n.a=o*n.a+(1-o)*r.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=Tc(this._rgb,e._rgb,t)),this}clone(){return new i(this.rgb)}alpha(e){return this._rgb.a=ee(e),this}clearer(e){let t=this._rgb;return t.a*=1-e,this}greyscale(){let e=this._rgb,t=ii(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=t,this}opaquer(e){let t=this._rgb;return t.a*=1+e,this}negate(){let e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Fi(this._rgb,2,e),this}darken(e){return Fi(this._rgb,2,-e),this}saturate(e){return Fi(this._rgb,1,e),this}desaturate(e){return Fi(this._rgb,1,-e),this}rotate(e){return vc(this._rgb,e),this}};function Ft(){}var lo=(()=>{let i=0;return()=>i++})();function q(i){return i==null}function J(i){if(Array.isArray&&Array.isArray(i))return!0;let e=Object.prototype.toString.call(i);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function U(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function rt(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function bt(i,e){return rt(i)?i:e}function z(i,e){return typeof i>"u"?e:i}var co=(i,e)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/e,fr=(i,e)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*e:+i;function K(i,e,t){if(i&&typeof i.call=="function")return i.apply(t,e)}function X(i,e,t,n){let r,s,o;if(J(i))if(s=i.length,n)for(r=s-1;r>=0;r--)e.call(t,i[r],r);else for(r=0;r<s;r++)e.call(t,i[r],r);else if(U(i))for(o=Object.keys(i),s=o.length,r=0;r<s;r++)e.call(t,i[o[r]],o[r])}function si(i,e){let t,n,r,s;if(!i||!e||i.length!==e.length)return!1;for(t=0,n=i.length;t<n;++t)if(r=i[t],s=e[t],r.datasetIndex!==s.datasetIndex||r.index!==s.index)return!1;return!0}function Yi(i){if(J(i))return i.map(Yi);if(U(i)){let e=Object.create(null),t=Object.keys(i),n=t.length,r=0;for(;r<n;++r)e[t[r]]=Yi(i[t[r]]);return e}return i}function uo(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function Pc(i,e,t,n){if(!uo(i))return;let r=e[i],s=t[i];U(r)&&U(s)?Ae(r,s,n):e[i]=Yi(s)}function Ae(i,e,t){let n=J(e)?e:[e],r=n.length;if(!U(i))return i;t=t||{};let s=t.merger||Pc,o;for(let a=0;a<r;++a){if(o=n[a],!U(o))continue;let l=Object.keys(o);for(let c=0,u=l.length;c<u;++c)s(l[c],i,o,t)}return i}function Le(i,e){return Ae(i,e,{merger:Sc})}function Sc(i,e,t){if(!uo(i))return;let n=e[i],r=t[i];U(n)&&U(r)?Le(n,r):Object.prototype.hasOwnProperty.call(e,i)||(e[i]=Yi(r))}var Zs={"":i=>i,x:i=>i.x,y:i=>i.y};function Oc(i){let e=i.split("."),t=[],n="";for(let r of e)n+=r,n.endsWith("\\")?n=n.slice(0,-1)+".":(t.push(n),n="");return t}function Ac(i){let e=Oc(i);return t=>{for(let n of e){if(n==="")break;t=t&&t[n]}return t}}function Vt(i,e){return(Zs[e]||(Zs[e]=Ac(e)))(i)}function Vi(i){return i.charAt(0).toUpperCase()+i.slice(1)}var Re=i=>typeof i<"u",qt=i=>typeof i=="function",dr=(i,e)=>{if(i.size!==e.size)return!1;for(let t of i)if(!e.has(t))return!1;return!0};function fo(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}var tt=Math.PI,et=2*tt,Ic=et+tt,Bi=Number.POSITIVE_INFINITY,Lc=tt/180,st=tt/2,he=tt/4,Js=tt*2/3,Ut=Math.log10,At=Math.sign;function Ee(i,e,t){return Math.abs(i-e)<t}function hr(i){let e=Math.round(i);i=Ee(i,e,i/1e3)?e:i;let t=Math.pow(10,Math.floor(Ut(i))),n=i/t;return(n<=1?1:n<=2?2:n<=5?5:10)*t}function ho(i){let e=[],t=Math.sqrt(i),n;for(n=1;n<t;n++)i%n===0&&(e.push(n),e.push(i/n));return t===(t|0)&&e.push(t),e.sort((r,s)=>r-s).pop(),e}function Rc(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function ge(i){return!Rc(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function mo(i,e){let t=Math.round(i);return t-e<=i&&t+e>=i}function mr(i,e,t){let n,r,s;for(n=0,r=i.length;n<r;n++)s=i[n][t],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function Tt(i){return i*(tt/180)}function ji(i){return i*(180/tt)}function pr(i){if(!rt(i))return;let e=1,t=0;for(;Math.round(i*e)/e!==i;)e*=10,t++;return t}function gr(i,e){let t=e.x-i.x,n=e.y-i.y,r=Math.sqrt(t*t+n*n),s=Math.atan2(n,t);return s<-.5*tt&&(s+=et),{angle:s,distance:r}}function qi(i,e){return Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2))}function Ec(i,e){return(i-e+Ic)%et-tt}function gt(i){return(i%et+et)%et}function Fe(i,e,t,n){let r=gt(i),s=gt(e),o=gt(t),a=gt(s-r),l=gt(o-r),c=gt(r-s),u=gt(r-o);return r===s||r===o||n&&s===o||a>l&&c<u}function lt(i,e,t){return Math.max(e,Math.min(t,i))}function po(i){return lt(i,-32768,32767)}function Wt(i,e,t,n=1e-6){return i>=Math.min(e,t)-n&&i<=Math.max(e,t)+n}function $i(i,e,t){t=t||(o=>i[o]<e);let n=i.length-1,r=0,s;for(;n-r>1;)s=r+n>>1,t(s)?r=s:n=s;return{lo:r,hi:n}}var Rt=(i,e,t,n)=>$i(i,t,n?r=>{let s=i[r][e];return s<t||s===t&&i[r+1][e]===t}:r=>i[r][e]<t),go=(i,e,t)=>$i(i,t,n=>i[n][e]>=t);function bo(i,e,t){let n=0,r=i.length;for(;n<r&&i[n]<e;)n++;for(;r>n&&i[r-1]>t;)r--;return n>0||r<i.length?i.slice(n,r):i}var xo=["push","pop","shift","splice","unshift"];function vo(i,e){if(i._chartjs){i._chartjs.listeners.push(e);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),xo.forEach(t=>{let n="_onData"+Vi(t),r=i[t];Object.defineProperty(i,t,{configurable:!0,enumerable:!1,value(...s){let o=r.apply(this,s);return i._chartjs.listeners.forEach(a=>{typeof a[n]=="function"&&a[n](...s)}),o}})})}function br(i,e){let t=i._chartjs;if(!t)return;let n=t.listeners,r=n.indexOf(e);r!==-1&&n.splice(r,1),!(n.length>0)&&(xo.forEach(s=>{delete i[s]}),delete i._chartjs)}function xr(i){let e=new Set(i);return e.size===i.length?i:Array.from(e)}var vr=function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame}();function yr(i,e){let t=[],n=!1;return function(...r){t=r,n||(n=!0,vr.call(window,()=>{n=!1,i.apply(e,t)}))}}function yo(i,e){let t;return function(...n){return e?(clearTimeout(t),t=setTimeout(i,e,n)):i.apply(this,n),e}}var Xi=i=>i==="start"?"left":i==="end"?"right":"center",ft=(i,e,t)=>i==="start"?e:i==="end"?t:(e+t)/2,_o=(i,e,t,n)=>i===(n?"left":"right")?t:i==="center"?(e+t)/2:e;function _r(i,e,t){let n=e.length,r=0,s=n;if(i._sorted){let{iScale:o,vScale:a,_parsed:l}=i,c=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null,u=o.axis,{min:f,max:d,minDefined:h,maxDefined:m}=o.getUserBounds();if(h){if(r=Math.min(Rt(l,u,f).lo,t?n:Rt(e,u,o.getPixelForValue(f)).lo),c){let p=l.slice(0,r+1).reverse().findIndex(g=>!q(g[a.axis]));r-=Math.max(0,p)}r=lt(r,0,n-1)}if(m){let p=Math.max(Rt(l,o.axis,d,!0).hi+1,t?0:Rt(e,u,o.getPixelForValue(d),!0).hi+1);if(c){let g=l.slice(p-1).findIndex(b=>!q(b[a.axis]));p+=Math.max(0,g)}s=lt(p,r,n)-r}else s=n-r}return{start:r,count:s}}function wr(i){let{xScale:e,yScale:t,_scaleRanges:n}=i,r={xmin:e.min,xmax:e.max,ymin:t.min,ymax:t.max};if(!n)return i._scaleRanges=r,!0;let s=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==t.min||n.ymax!==t.max;return Object.assign(n,r),s}var Wi=i=>i===0||i===1,to=(i,e,t)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-e)*et/t)),eo=(i,e,t)=>Math.pow(2,-10*i)*Math.sin((i-e)*et/t)+1,Oe={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*st)+1,easeOutSine:i=>Math.sin(i*st),easeInOutSine:i=>-.5*(Math.cos(tt*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>Wi(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>Wi(i)?i:to(i,.075,.3),easeOutElastic:i=>Wi(i)?i:eo(i,.075,.3),easeInOutElastic(i){return Wi(i)?i:i<.5?.5*to(i*2,.1125,.45):.5+.5*eo(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let e=1.70158;return(i/=.5)<1?.5*(i*i*(((e*=1.525)+1)*i-e)):.5*((i-=2)*i*(((e*=1.525)+1)*i+e)+2)},easeInBounce:i=>1-Oe.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Oe.easeInBounce(i*2)*.5:Oe.easeOutBounce(i*2-1)*.5+.5};function Mr(i){if(i&&typeof i=="object"){let e=i.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function kr(i){return Mr(i)?i:new ei(i)}function lr(i){return Mr(i)?i:new ei(i).saturate(.5).darken(.1).hexString()}var Fc=["x","y","borderWidth","radius","tension"],Wc=["color","borderColor","backgroundColor"];function Nc(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),i.set("animations",{colors:{type:"color",properties:Wc},numbers:{type:"number",properties:Fc}}),i.describe("animations",{_fallback:"animation"}),i.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:e=>e|0}}}})}function zc(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var io=new Map;function Hc(i,e){e=e||{};let t=i+JSON.stringify(e),n=io.get(t);return n||(n=new Intl.NumberFormat(i,e),io.set(t,n)),n}function We(i,e,t){return Hc(e,t).format(i)}var wo={values(i){return J(i)?i:""+i},numeric(i,e,t){if(i===0)return"0";let n=this.chart.options.locale,r,s=i;if(t.length>1){let c=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(c<1e-4||c>1e15)&&(r="scientific"),s=Yc(i,t)}let o=Ut(Math.abs(s)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),We(i,n,l)},logarithmic(i,e,t){if(i===0)return"0";let n=t[e].significand||i/Math.pow(10,Math.floor(Ut(i)));return[1,2,3,5,10,15].includes(n)||e>.8*t.length?wo.numeric.call(this,i,e,t):""}};function Yc(i,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&i!==Math.floor(i)&&(t=i-Math.floor(i)),t}var oi={formatters:wo};function Bc(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:oi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}var ne=Object.create(null),Qi=Object.create(null);function ni(i,e){if(!e)return i;let t=e.split(".");for(let n=0,r=t.length;n<r;++n){let s=t[n];i=i[s]||(i[s]=Object.create(null))}return i}function cr(i,e,t){return typeof e=="string"?Ae(ni(i,e),t):Ae(ni(i,""),e)}var ur=class{constructor(e,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=n=>n.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=(n,r)=>lr(r.backgroundColor),this.hoverBorderColor=(n,r)=>lr(r.borderColor),this.hoverColor=(n,r)=>lr(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},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.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return cr(this,e,t)}get(e){return ni(this,e)}describe(e,t){return cr(Qi,e,t)}override(e,t){return cr(ne,e,t)}route(e,t,n,r){let s=ni(this,e),o=ni(this,n),a="_"+t;Object.defineProperties(s,{[a]:{value:s[t],writable:!0},[t]:{enumerable:!0,get(){let l=this[a],c=o[r];return U(l)?Object.assign({},c,l):z(l,c)},set(l){this[a]=l}}})}apply(e){e.forEach(t=>t(this))}},it=new ur({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Nc,zc,Bc]);function qc(i){return!i||q(i.size)||q(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function ri(i,e,t,n,r){let s=e[r];return s||(s=e[r]=i.measureText(r).width,t.push(r)),s>n&&(n=s),n}function Mo(i,e,t,n){n=n||{};let r=n.data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},s=n.garbageCollect=[],n.font=e),i.save(),i.font=e;let o=0,a=t.length,l,c,u,f,d;for(l=0;l<a;l++)if(f=t[l],f!=null&&!J(f))o=ri(i,r,s,o,f);else if(J(f))for(c=0,u=f.length;c<u;c++)d=f[c],d!=null&&!J(d)&&(o=ri(i,r,s,o,d));i.restore();let h=s.length/2;if(h>t.length){for(l=0;l<h;l++)delete r[s[l]];s.splice(0,h)}return o}function re(i,e,t){let n=i.currentDevicePixelRatio,r=t!==0?Math.max(t/2,.5):0;return Math.round((e-r)*n)/n+r}function Dr(i,e){!e&&!i||(e=e||i.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,i.width,i.height),e.restore())}function Gi(i,e,t,n){Tr(i,e,t,n,null)}function Tr(i,e,t,n,r){let s,o,a,l,c,u,f,d,h=e.pointStyle,m=e.rotation,p=e.radius,g=(m||0)*Lc;if(h&&typeof h=="object"&&(s=h.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){i.save(),i.translate(t,n),i.rotate(g),i.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),i.restore();return}if(!(isNaN(p)||p<=0)){switch(i.beginPath(),h){default:r?i.ellipse(t,n,r/2,p,0,0,et):i.arc(t,n,p,0,et),i.closePath();break;case"triangle":u=r?r/2:p,i.moveTo(t+Math.sin(g)*u,n-Math.cos(g)*p),g+=Js,i.lineTo(t+Math.sin(g)*u,n-Math.cos(g)*p),g+=Js,i.lineTo(t+Math.sin(g)*u,n-Math.cos(g)*p),i.closePath();break;case"rectRounded":c=p*.516,l=p-c,o=Math.cos(g+he)*l,f=Math.cos(g+he)*(r?r/2-c:l),a=Math.sin(g+he)*l,d=Math.sin(g+he)*(r?r/2-c:l),i.arc(t-f,n-a,c,g-tt,g-st),i.arc(t+d,n-o,c,g-st,g),i.arc(t+f,n+a,c,g,g+st),i.arc(t-d,n+o,c,g+st,g+tt),i.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*p,u=r?r/2:l,i.rect(t-u,n-l,2*u,2*l);break}g+=he;case"rectRot":f=Math.cos(g)*(r?r/2:p),o=Math.cos(g)*p,a=Math.sin(g)*p,d=Math.sin(g)*(r?r/2:p),i.moveTo(t-f,n-a),i.lineTo(t+d,n-o),i.lineTo(t+f,n+a),i.lineTo(t-d,n+o),i.closePath();break;case"crossRot":g+=he;case"cross":f=Math.cos(g)*(r?r/2:p),o=Math.cos(g)*p,a=Math.sin(g)*p,d=Math.sin(g)*(r?r/2:p),i.moveTo(t-f,n-a),i.lineTo(t+f,n+a),i.moveTo(t+d,n-o),i.lineTo(t-d,n+o);break;case"star":f=Math.cos(g)*(r?r/2:p),o=Math.cos(g)*p,a=Math.sin(g)*p,d=Math.sin(g)*(r?r/2:p),i.moveTo(t-f,n-a),i.lineTo(t+f,n+a),i.moveTo(t+d,n-o),i.lineTo(t-d,n+o),g+=he,f=Math.cos(g)*(r?r/2:p),o=Math.cos(g)*p,a=Math.sin(g)*p,d=Math.sin(g)*(r?r/2:p),i.moveTo(t-f,n-a),i.lineTo(t+f,n+a),i.moveTo(t+d,n-o),i.lineTo(t-d,n+o);break;case"line":o=r?r/2:Math.cos(g)*p,a=Math.sin(g)*p,i.moveTo(t-o,n-a),i.lineTo(t+o,n+a);break;case"dash":i.moveTo(t,n),i.lineTo(t+Math.cos(g)*(r?r/2:p),n+Math.sin(g)*p);break;case!1:i.closePath();break}i.fill(),e.borderWidth>0&&i.stroke()}}function Et(i,e,t){return t=t||.5,!e||i&&i.x>e.left-t&&i.x<e.right+t&&i.y>e.top-t&&i.y<e.bottom+t}function ai(i,e){i.save(),i.beginPath(),i.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),i.clip()}function li(i){i.restore()}function ko(i,e,t,n,r){if(!e)return i.lineTo(t.x,t.y);if(r==="middle"){let s=(e.x+t.x)/2;i.lineTo(s,e.y),i.lineTo(s,t.y)}else r==="after"!=!!n?i.lineTo(e.x,t.y):i.lineTo(t.x,e.y);i.lineTo(t.x,t.y)}function Do(i,e,t,n){if(!e)return i.lineTo(t.x,t.y);i.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?t.cp2x:t.cp1x,n?t.cp2y:t.cp1y,t.x,t.y)}function Uc(i,e){e.translation&&i.translate(e.translation[0],e.translation[1]),q(e.rotation)||i.rotate(e.rotation),e.color&&(i.fillStyle=e.color),e.textAlign&&(i.textAlign=e.textAlign),e.textBaseline&&(i.textBaseline=e.textBaseline)}function Vc(i,e,t,n,r){if(r.strikethrough||r.underline){let s=i.measureText(n),o=e-s.actualBoundingBoxLeft,a=e+s.actualBoundingBoxRight,l=t-s.actualBoundingBoxAscent,c=t+s.actualBoundingBoxDescent,u=r.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=r.decorationWidth||2,i.moveTo(o,u),i.lineTo(a,u),i.stroke()}}function jc(i,e){let t=i.fillStyle;i.fillStyle=e.color,i.fillRect(e.left,e.top,e.width,e.height),i.fillStyle=t}function se(i,e,t,n,r,s={}){let o=J(e)?e:[e],a=s.strokeWidth>0&&s.strokeColor!=="",l,c;for(i.save(),i.font=r.string,Uc(i,s),l=0;l<o.length;++l)c=o[l],s.backdrop&&jc(i,s.backdrop),a&&(s.strokeColor&&(i.strokeStyle=s.strokeColor),q(s.strokeWidth)||(i.lineWidth=s.strokeWidth),i.strokeText(c,t,n,s.maxWidth)),i.fillText(c,t,n,s.maxWidth),Vc(i,t,n,c,s),n+=Number(r.lineHeight);i.restore()}function Ne(i,e){let{x:t,y:n,w:r,h:s,radius:o}=e;i.arc(t+o.topLeft,n+o.topLeft,o.topLeft,1.5*tt,tt,!0),i.lineTo(t,n+s-o.bottomLeft),i.arc(t+o.bottomLeft,n+s-o.bottomLeft,o.bottomLeft,tt,st,!0),i.lineTo(t+r-o.bottomRight,n+s),i.arc(t+r-o.bottomRight,n+s-o.bottomRight,o.bottomRight,st,0,!0),i.lineTo(t+r,n+o.topRight),i.arc(t+r-o.topRight,n+o.topRight,o.topRight,0,-st,!0),i.lineTo(t+o.topLeft,n)}var $c=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Xc=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Qc(i,e){let t=(""+i).match($c);if(!t||t[1]==="normal")return e*1.2;switch(i=+t[2],t[3]){case"px":return i;case"%":i/=100;break}return e*i}var Gc=i=>+i||0;function Ki(i,e){let t={},n=U(e),r=n?Object.keys(e):e,s=U(i)?n?o=>z(i[o],i[e[o]]):o=>i[o]:()=>i;for(let o of r)t[o]=Gc(s(o));return t}function Cr(i){return Ki(i,{top:"y",right:"x",bottom:"y",left:"x"})}function oe(i){return Ki(i,["topLeft","topRight","bottomLeft","bottomRight"])}function dt(i){let e=Cr(i);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ot(i,e){i=i||{},e=e||it.font;let t=z(i.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let n=z(i.style,e.style);n&&!(""+n).match(Xc)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);let r={family:z(i.family,e.family),lineHeight:Qc(z(i.lineHeight,e.lineHeight),t),size:t,style:n,weight:z(i.weight,e.weight),string:""};return r.string=qc(r),r}function ze(i,e,t,n){let r=!0,s,o,a;for(s=0,o=i.length;s<o;++s)if(a=i[s],a!==void 0&&(e!==void 0&&typeof a=="function"&&(a=a(e),r=!1),t!==void 0&&J(a)&&(a=a[t%a.length],r=!1),a!==void 0))return n&&!r&&(n.cacheable=!1),a}function To(i,e,t){let{min:n,max:r}=i,s=fr(e,(r-n)/2),o=(a,l)=>t&&a===0?0:a+l;return{min:o(n,-Math.abs(s)),max:o(r,s)}}function jt(i,e){return Object.assign(Object.create(i),e)}function Zi(i,e=[""],t,n,r=()=>i[0]){let s=t||i;typeof n>"u"&&(n=So("_fallback",i));let o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:s,_fallback:n,_getTarget:r,override:a=>Zi([a,...i],e,s,n)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete i[0][l],!0},get(a,l){return Co(a,l,()=>ru(l,e,i,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,l){return ro(a).includes(l)},ownKeys(a){return ro(a)},set(a,l,c){let u=a._storage||(a._storage=r());return a[l]=u[l]=c,delete a._keys,!0}})}function pe(i,e,t,n){let r={_cacheable:!1,_proxy:i,_context:e,_subProxy:t,_stack:new Set,_descriptors:Pr(i,n),setContext:s=>pe(i,s,t,n),override:s=>pe(i.override(s),e,t,n)};return new Proxy(r,{deleteProperty(s,o){return delete s[o],delete i[o],!0},get(s,o,a){return Co(s,o,()=>Zc(s,o,a))},getOwnPropertyDescriptor(s,o){return s._descriptors.allKeys?Reflect.has(i,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,o)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(s,o){return Reflect.has(i,o)},ownKeys(){return Reflect.ownKeys(i)},set(s,o,a){return i[o]=a,delete s[o],!0}})}function Pr(i,e={scriptable:!0,indexable:!0}){let{_scriptable:t=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=i;return{allKeys:r,scriptable:t,indexable:n,isScriptable:qt(t)?t:()=>t,isIndexable:qt(n)?n:()=>n}}var Kc=(i,e)=>i?i+Vi(e):e,Sr=(i,e)=>U(e)&&i!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Co(i,e,t){if(Object.prototype.hasOwnProperty.call(i,e)||e==="constructor")return i[e];let n=t();return i[e]=n,n}function Zc(i,e,t){let{_proxy:n,_context:r,_subProxy:s,_descriptors:o}=i,a=n[e];return qt(a)&&o.isScriptable(e)&&(a=Jc(e,a,i,t)),J(a)&&a.length&&(a=tu(e,a,i,o.isIndexable)),Sr(e,a)&&(a=pe(a,r,s&&s[e],o)),a}function Jc(i,e,t,n){let{_proxy:r,_context:s,_subProxy:o,_stack:a}=t;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);a.add(i);let l=e(s,o||n);return a.delete(i),Sr(i,l)&&(l=Or(r._scopes,r,i,l)),l}function tu(i,e,t,n){let{_proxy:r,_context:s,_subProxy:o,_descriptors:a}=t;if(typeof s.index<"u"&&n(i))return e[s.index%e.length];if(U(e[0])){let l=e,c=r._scopes.filter(u=>u!==l);e=[];for(let u of l){let f=Or(c,r,i,u);e.push(pe(f,s,o&&o[i],a))}}return e}function Po(i,e,t){return qt(i)?i(e,t):i}var eu=(i,e)=>i===!0?e:typeof i=="string"?Vt(e,i):void 0;function iu(i,e,t,n,r){for(let s of e){let o=eu(t,s);if(o){i.add(o);let a=Po(o._fallback,t,r);if(typeof a<"u"&&a!==t&&a!==n)return a}else if(o===!1&&typeof n<"u"&&t!==n)return null}return!1}function Or(i,e,t,n){let r=e._rootScopes,s=Po(e._fallback,t,n),o=[...i,...r],a=new Set;a.add(n);let l=no(a,o,t,s||t,n);return l===null||typeof s<"u"&&s!==t&&(l=no(a,o,s,l,n),l===null)?!1:Zi(Array.from(a),[""],r,s,()=>nu(e,t,n))}function no(i,e,t,n,r){for(;t;)t=iu(i,e,t,n,r);return t}function nu(i,e,t){let n=i._getTarget();e in n||(n[e]={});let r=n[e];return J(r)&&U(t)?t:r||{}}function ru(i,e,t,n){let r;for(let s of e)if(r=So(Kc(s,i),t),typeof r<"u")return Sr(i,r)?Or(t,n,i,r):r}function So(i,e){for(let t of e){if(!t)continue;let n=t[i];if(typeof n<"u")return n}}function ro(i){let e=i._keys;return e||(e=i._keys=su(i._scopes)),e}function su(i){let e=new Set;for(let t of i)for(let n of Object.keys(t).filter(r=>!r.startsWith("_")))e.add(n);return Array.from(e)}function Ar(i,e,t,n){let{iScale:r}=i,{key:s="r"}=this._parsing,o=new Array(n),a,l,c,u;for(a=0,l=n;a<l;++a)c=a+t,u=e[c],o[a]={r:r.parse(Vt(u,s),c)};return o}var ou=Number.EPSILON||1e-14,Ie=(i,e)=>e<i.length&&!i[e].skip&&i[e],Oo=i=>i==="x"?"y":"x";function au(i,e,t,n){let r=i.skip?e:i,s=e,o=t.skip?e:t,a=qi(s,r),l=qi(o,s),c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;let f=n*c,d=n*u;return{previous:{x:s.x-f*(o.x-r.x),y:s.y-f*(o.y-r.y)},next:{x:s.x+d*(o.x-r.x),y:s.y+d*(o.y-r.y)}}}function lu(i,e,t){let n=i.length,r,s,o,a,l,c=Ie(i,0);for(let u=0;u<n-1;++u)if(l=c,c=Ie(i,u+1),!(!l||!c)){if(Ee(e[u],0,ou)){t[u]=t[u+1]=0;continue}r=t[u]/e[u],s=t[u+1]/e[u],a=Math.pow(r,2)+Math.pow(s,2),!(a<=9)&&(o=3/Math.sqrt(a),t[u]=r*o*e[u],t[u+1]=s*o*e[u])}}function cu(i,e,t="x"){let n=Oo(t),r=i.length,s,o,a,l=Ie(i,0);for(let c=0;c<r;++c){if(o=a,a=l,l=Ie(i,c+1),!a)continue;let u=a[t],f=a[n];o&&(s=(u-o[t])/3,a[`cp1${t}`]=u-s,a[`cp1${n}`]=f-s*e[c]),l&&(s=(l[t]-u)/3,a[`cp2${t}`]=u+s,a[`cp2${n}`]=f+s*e[c])}}function uu(i,e="x"){let t=Oo(e),n=i.length,r=Array(n).fill(0),s=Array(n),o,a,l,c=Ie(i,0);for(o=0;o<n;++o)if(a=l,l=c,c=Ie(i,o+1),!!l){if(c){let u=c[e]-l[e];r[o]=u!==0?(c[t]-l[t])/u:0}s[o]=a?c?At(r[o-1])!==At(r[o])?0:(r[o-1]+r[o])/2:r[o-1]:r[o]}lu(i,r,s),cu(i,s,e)}function Ni(i,e,t){return Math.max(Math.min(i,t),e)}function fu(i,e){let t,n,r,s,o,a=Et(i[0],e);for(t=0,n=i.length;t<n;++t)o=s,s=a,a=t<n-1&&Et(i[t+1],e),s&&(r=i[t],o&&(r.cp1x=Ni(r.cp1x,e.left,e.right),r.cp1y=Ni(r.cp1y,e.top,e.bottom)),a&&(r.cp2x=Ni(r.cp2x,e.left,e.right),r.cp2y=Ni(r.cp2y,e.top,e.bottom)))}function Ao(i,e,t,n,r){let s,o,a,l;if(e.spanGaps&&(i=i.filter(c=>!c.skip)),e.cubicInterpolationMode==="monotone")uu(i,r);else{let c=n?i[i.length-1]:i[0];for(s=0,o=i.length;s<o;++s)a=i[s],l=au(c,a,i[Math.min(s+1,o-(n?0:1))%o],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}e.capBezierPoints&&fu(i,t)}function Ji(){return typeof window<"u"&&typeof document<"u"}function tn(i){let e=i.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function Ui(i,e,t){let n;return typeof i=="string"?(n=parseInt(i,10),i.indexOf("%")!==-1&&(n=n/100*e.parentNode[t])):n=i,n}var en=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function du(i,e){return en(i).getPropertyValue(e)}var hu=["top","right","bottom","left"];function me(i,e,t){let n={};t=t?"-"+t:"";for(let r=0;r<4;r++){let s=hu[r];n[s]=parseFloat(i[e+"-"+s+t])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}var mu=(i,e,t)=>(i>0||e>0)&&(!t||!t.shadowRoot);function pu(i,e){let t=i.touches,n=t&&t.length?t[0]:i,{offsetX:r,offsetY:s}=n,o=!1,a,l;if(mu(r,s,i.target))a=r,l=s;else{let c=e.getBoundingClientRect();a=n.clientX-c.left,l=n.clientY-c.top,o=!0}return{x:a,y:l,box:o}}function ae(i,e){if("native"in i)return i;let{canvas:t,currentDevicePixelRatio:n}=e,r=en(t),s=r.boxSizing==="border-box",o=me(r,"padding"),a=me(r,"border","width"),{x:l,y:c,box:u}=pu(i,t),f=o.left+(u&&a.left),d=o.top+(u&&a.top),{width:h,height:m}=e;return s&&(h-=o.width+a.width,m-=o.height+a.height),{x:Math.round((l-f)/h*t.width/n),y:Math.round((c-d)/m*t.height/n)}}function gu(i,e,t){let n,r;if(e===void 0||t===void 0){let s=i&&tn(i);if(!s)e=i.clientWidth,t=i.clientHeight;else{let o=s.getBoundingClientRect(),a=en(s),l=me(a,"border","width"),c=me(a,"padding");e=o.width-c.width-l.width,t=o.height-c.height-l.height,n=Ui(a.maxWidth,s,"clientWidth"),r=Ui(a.maxHeight,s,"clientHeight")}}return{width:e,height:t,maxWidth:n||Bi,maxHeight:r||Bi}}var zi=i=>Math.round(i*10)/10;function Io(i,e,t,n){let r=en(i),s=me(r,"margin"),o=Ui(r.maxWidth,i,"clientWidth")||Bi,a=Ui(r.maxHeight,i,"clientHeight")||Bi,l=gu(i,e,t),{width:c,height:u}=l;if(r.boxSizing==="content-box"){let d=me(r,"border","width"),h=me(r,"padding");c-=h.width+d.width,u-=h.height+d.height}return c=Math.max(0,c-s.width),u=Math.max(0,n?c/n:u-s.height),c=zi(Math.min(c,o,l.maxWidth)),u=zi(Math.min(u,a,l.maxHeight)),c&&!u&&(u=zi(c/2)),(e!==void 0||t!==void 0)&&n&&l.height&&u>l.height&&(u=l.height,c=zi(Math.floor(u*n))),{width:c,height:u}}function Ir(i,e,t){let n=e||1,r=Math.floor(i.height*n),s=Math.floor(i.width*n);i.height=Math.floor(i.height),i.width=Math.floor(i.width);let o=i.canvas;return o.style&&(t||!o.style.height&&!o.style.width)&&(o.style.height=`${i.height}px`,o.style.width=`${i.width}px`),i.currentDevicePixelRatio!==n||o.height!==r||o.width!==s?(i.currentDevicePixelRatio=n,o.height=r,o.width=s,i.ctx.setTransform(n,0,0,n,0,0),!0):!1}var Lo=function(){let i=!1;try{let e={get passive(){return i=!0,!1}};Ji()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return i}();function Lr(i,e){let t=du(i,e),n=t&&t.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function ie(i,e,t,n){return{x:i.x+t*(e.x-i.x),y:i.y+t*(e.y-i.y)}}function Ro(i,e,t,n){return{x:i.x+t*(e.x-i.x),y:n==="middle"?t<.5?i.y:e.y:n==="after"?t<1?i.y:e.y:t>0?e.y:i.y}}function Eo(i,e,t,n){let r={x:i.cp2x,y:i.cp2y},s={x:e.cp1x,y:e.cp1y},o=ie(i,r,t),a=ie(r,s,t),l=ie(s,e,t),c=ie(o,a,t),u=ie(a,l,t);return ie(c,u,t)}var bu=function(i,e){return{x(t){return i+i+e-t},setWidth(t){e=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,n){return t-n},leftForLtr(t,n){return t-n}}},xu=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,e){return i+e},leftForLtr(i,e){return i}}};function be(i,e,t){return i?bu(e,t):xu()}function Rr(i,e){let t,n;(e==="ltr"||e==="rtl")&&(t=i.canvas.style,n=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),i.prevTextDirection=n)}function Er(i,e){e!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",e[0],e[1]))}function Fo(i){return i==="angle"?{between:Fe,compare:Ec,normalize:gt}:{between:Wt,compare:(e,t)=>e-t,normalize:e=>e}}function so({start:i,end:e,count:t,loop:n,style:r}){return{start:i%t,end:e%t,loop:n&&(e-i+1)%t===0,style:r}}function vu(i,e,t){let{property:n,start:r,end:s}=t,{between:o,normalize:a}=Fo(n),l=e.length,{start:c,end:u,loop:f}=i,d,h;if(f){for(c+=l,u+=l,d=0,h=l;d<h&&o(a(e[c%l][n]),r,s);++d)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:f,style:i.style}}function Fr(i,e,t){if(!t)return[i];let{property:n,start:r,end:s}=t,o=e.length,{compare:a,between:l,normalize:c}=Fo(n),{start:u,end:f,loop:d,style:h}=vu(i,e,t),m=[],p=!1,g=null,b,x,w,k=()=>l(r,w,b)&&a(r,w)!==0,v=()=>a(s,b)===0||l(s,w,b),_=()=>p||k(),P=()=>!p||v();for(let C=u,S=u;C<=f;++C)x=e[C%o],!x.skip&&(b=c(x[n]),b!==w&&(p=l(b,r,s),g===null&&_()&&(g=a(b,r)===0?C:S),g!==null&&P()&&(m.push(so({start:g,end:C,loop:d,count:o,style:h})),g=null),S=C,w=b));return g!==null&&m.push(so({start:g,end:f,loop:d,count:o,style:h})),m}function Wr(i,e){let t=[],n=i.segments;for(let r=0;r<n.length;r++){let s=Fr(n[r],i.points,e);s.length&&t.push(...s)}return t}function yu(i,e,t,n){let r=0,s=e-1;if(t&&!n)for(;r<e&&!i[r].skip;)r++;for(;r<e&&i[r].skip;)r++;for(r%=e,t&&(s+=r);s>r&&i[s%e].skip;)s--;return s%=e,{start:r,end:s}}function _u(i,e,t,n){let r=i.length,s=[],o=e,a=i[e],l;for(l=e+1;l<=t;++l){let c=i[l%r];c.skip||c.stop?a.skip||(n=!1,s.push({start:e%r,end:(l-1)%r,loop:n}),e=o=c.stop?l:null):(o=l,a.skip&&(e=l)),a=c}return o!==null&&s.push({start:e%r,end:o%r,loop:n}),s}function Wo(i,e){let t=i.points,n=i.options.spanGaps,r=t.length;if(!r)return[];let s=!!i._loop,{start:o,end:a}=yu(t,r,s,n);if(n===!0)return oo(i,[{start:o,end:a,loop:s}],t,e);let l=a<o?a+r:a,c=!!i._fullLoop&&o===0&&a===r-1;return oo(i,_u(t,o,l,c),t,e)}function oo(i,e,t,n){return!n||!n.setContext||!t?e:wu(i,e,t,n)}function wu(i,e,t,n){let r=i._chart.getContext(),s=ao(i.options),{_datasetIndex:o,options:{spanGaps:a}}=i,l=t.length,c=[],u=s,f=e[0].start,d=f;function h(m,p,g,b){let x=a?-1:1;if(m!==p){for(m+=l;t[m%l].skip;)m-=x;for(;t[p%l].skip;)p+=x;m%l!==p%l&&(c.push({start:m%l,end:p%l,loop:g,style:b}),u=b,f=p%l)}}for(let m of e){f=a?f:m.start;let p=t[f%l],g;for(d=f+1;d<=m.end;d++){let b=t[d%l];g=ao(n.setContext(jt(r,{type:"segment",p0:p,p1:b,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:o}))),Mu(g,u)&&h(f,d-1,m.loop,u),p=b,u=g}f<d-1&&h(f,d-1,m.loop,u)}return c}function ao(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function Mu(i,e){if(!e)return!1;let t=[],n=function(r,s){return Mr(s)?(t.includes(s)||t.push(s),t.indexOf(s)):s};return JSON.stringify(i,n)!==JSON.stringify(e,n)}function Hi(i,e,t){return i.options.clip?i[t]:e[t]}function ku(i,e){let{xScale:t,yScale:n}=i;return t&&n?{left:Hi(t,e,"left"),right:Hi(t,e,"right"),top:Hi(n,e,"top"),bottom:Hi(n,e,"bottom")}:e}function Nr(i,e){let t=e._clip;if(t.disabled)return!1;let n=ku(e,i.chartArea);return{left:t.left===!1?0:n.left-(t.left===!0?0:t.left),right:t.right===!1?i.width:n.right+(t.right===!0?0:t.right),top:t.top===!1?0:n.top-(t.top===!0?0:t.top),bottom:t.bottom===!1?i.height:n.bottom+(t.bottom===!0?0:t.bottom)}}var Qr=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,n,r){let s=t.listeners[r],o=t.duration;s.forEach(a=>a({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(n-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=vr.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((n,r)=>{if(!n.running||!n.items.length)return;let s=n.items,o=s.length-1,a=!1,l;for(;o>=0;--o)l=s[o],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(e),a=!0):(s[o]=s[s.length-1],s.pop());a&&(r.draw(),this._notify(r,n,e,"progress")),s.length||(n.running=!1,this._notify(r,n,e,"complete"),n.initial=!1),t+=s.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){let t=this._charts,n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){let t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((n,r)=>Math.max(n,r._duration),0),this._refresh())}running(e){if(!this._running)return!1;let t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){let t=this._charts.get(e);if(!t||!t.items.length)return;let n=t.items,r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}},$t=new Qr,No="transparent",Du={boolean(i,e,t){return t>.5?e:i},color(i,e,t){let n=kr(i||No),r=n.valid&&kr(e||No);return r&&r.valid?r.mix(n,t).hexString():e},number(i,e,t){return i+(e-i)*t}},Gr=class{constructor(e,t,n,r){let s=t[n];r=ze([e.to,r,s,e.from]);let o=ze([e.from,s,r]);this._active=!0,this._fn=e.fn||Du[e.type||typeof o],this._easing=Oe[e.easing]||Oe.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=o,this._to=r,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);let r=this._target[this._prop],s=n-this._start,o=this._duration-s;this._start=n,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=s,this._loop=!!e.loop,this._to=ze([e.to,t,r,e.from]),this._from=ze([e.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){let t=e-this._start,n=this._duration,r=this._prop,s=this._from,o=this._loop,a=this._to,l;if(this._active=s!==a&&(o||t<n),!this._active){this._target[r]=a,this._notify(!0);return}if(t<0){this._target[r]=s;return}l=t/n%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[r]=this._fn(s,a,l)}wait(){let e=this._promises||(this._promises=[]);return new Promise((t,n)=>{e.push({res:t,rej:n})})}_notify(e){let t=e?"res":"rej",n=this._promises||[];for(let r=0;r<n.length;r++)n[r][t]()}},fn=class{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!U(e))return;let t=Object.keys(it.animation),n=this._properties;Object.getOwnPropertyNames(e).forEach(r=>{let s=e[r];if(!U(s))return;let o={};for(let a of t)o[a]=s[a];(J(s.properties)&&s.properties||[r]).forEach(a=>{(a===r||!n.has(a))&&n.set(a,o)})})}_animateOptions(e,t){let n=t.options,r=Cu(e,n);if(!r)return[];let s=this._createAnimations(r,n);return n.$shared&&Tu(e.options.$animations,n).then(()=>{e.options=n},()=>{}),s}_createAnimations(e,t){let n=this._properties,r=[],s=e.$animations||(e.$animations={}),o=Object.keys(t),a=Date.now(),l;for(l=o.length-1;l>=0;--l){let c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){r.push(...this._animateOptions(e,t));continue}let u=t[c],f=s[c],d=n.get(c);if(f)if(d&&f.active()){f.update(d,u,a);continue}else f.cancel();if(!d||!d.duration){e[c]=u;continue}s[c]=f=new Gr(d,e,c,u),r.push(f)}return r}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}let n=this._createAnimations(e,t);if(n.length)return $t.add(this._chart,n),!0}};function Tu(i,e){let t=[],n=Object.keys(e);for(let r=0;r<n.length;r++){let s=i[n[r]];s&&s.active()&&t.push(s.wait())}return Promise.all(t)}function Cu(i,e){if(!e)return;let t=i.options;if(!t){i.options=e;return}return t.$shared&&(i.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t}function zo(i,e){let t=i&&i.options||{},n=t.reverse,r=t.min===void 0?e:0,s=t.max===void 0?e:0;return{start:n?s:r,end:n?r:s}}function Pu(i,e,t){if(t===!1)return!1;let n=zo(i,t),r=zo(e,t);return{top:r.end,right:n.end,bottom:r.start,left:n.start}}function Su(i){let e,t,n,r;return U(i)?(e=i.top,t=i.right,n=i.bottom,r=i.left):e=t=n=r=i,{top:e,right:t,bottom:n,left:r,disabled:i===!1}}function Na(i,e){let t=[],n=i._getSortedDatasetMetas(e),r,s;for(r=0,s=n.length;r<s;++r)t.push(n[r].index);return t}function Ho(i,e,t,n={}){let r=i.keys,s=n.mode==="single",o,a,l,c;if(e===null)return;let u=!1;for(o=0,a=r.length;o<a;++o){if(l=+r[o],l===t){if(u=!0,n.all)continue;break}c=i.values[l],rt(c)&&(s||e===0||At(e)===At(c))&&(e+=c)}return!u&&!n.all?0:e}function Ou(i,e){let{iScale:t,vScale:n}=e,r=t.axis==="x"?"x":"y",s=n.axis==="x"?"x":"y",o=Object.keys(i),a=new Array(o.length),l,c,u;for(l=0,c=o.length;l<c;++l)u=o[l],a[l]={[r]:u,[s]:i[u]};return a}function zr(i,e){let t=i&&i.options.stacked;return t||t===void 0&&e.stack!==void 0}function Au(i,e,t){return`${i.id}.${e.id}.${t.stack||t.type}`}function Iu(i){let{min:e,max:t,minDefined:n,maxDefined:r}=i.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?t:Number.POSITIVE_INFINITY}}function Lu(i,e,t){let n=i[e]||(i[e]={});return n[t]||(n[t]={})}function Yo(i,e,t,n){for(let r of e.getMatchingVisibleMetas(n).reverse()){let s=i[r.index];if(t&&s>0||!t&&s<0)return r.index}return null}function Bo(i,e){let{chart:t,_cachedMeta:n}=i,r=t._stacks||(t._stacks={}),{iScale:s,vScale:o,index:a}=n,l=s.axis,c=o.axis,u=Au(s,o,n),f=e.length,d;for(let h=0;h<f;++h){let m=e[h],{[l]:p,[c]:g}=m,b=m._stacks||(m._stacks={});d=b[c]=Lu(r,u,p),d[a]=g,d._top=Yo(d,o,!0,n.type),d._bottom=Yo(d,o,!1,n.type);let x=d._visualValues||(d._visualValues={});x[a]=g}}function Hr(i,e){let t=i.scales;return Object.keys(t).filter(n=>t[n].axis===e).shift()}function Ru(i,e){return jt(i,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Eu(i,e,t){return jt(i,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function ci