UNPKG

homebridge-config-ui-x

Version:

A web based management, configuration and control platform for Homebridge.

2 lines • 161 kB
import{b as Xs,c as Ot,e as Ks,f as qs,h as hi,m as Gs,o as Zs,p as Js,r as Qs}from"./chunk-2QHNXSQY.js";import{a as Us}from"./chunk-BQZ376DP.js";import{Ac as $s,Ea as jt,Ga as Cs,Ib as Vs,J as bs,Jc as Ys,Kb as ri,Lb as ai,Mb as li,Nb as ci,Q as _s,Ra as ti,S as xs,Sa as Ps,Ta as me,W as ys,X as fe,Xa as ei,Y as vs,Zb as Ns,_ as ws,aa as N,ab as Ds,bc as Ws,cb as Os,d as fs,db as As,e as ue,eb as ii,fa as Je,ga as Qe,gb as si,gc as Hs,hb as ni,ib as be,j as ps,ja as Ms,jb as Ts,ka as ks,kb as Rs,lb as Es,mb as Ls,na as mt,nb as Is,oa as pe,p as gs,sa as Ht,sb as Fs,sc as js,tb as Bs,va as ge,vb as zs,w as ms,wb as oi,xa as Ss,xb as _e,zb as bt}from"./chunk-LTGI3NYM.js";function fr(e,i){if(e&1&&(Ls(0,"span"),li(1),Is()),e&2){let t=bt().$implicit,s=bt();ai(s.highlightClass),jt(),ci(t)}}function pr(e,i){if(e&1&&(Fs(0),li(1),Bs()),e&2){let t=bt().$implicit;jt(),ci(t)}}function gr(e,i){if(e&1&&Os(0,fr,2,3,"span",0)(1,pr,2,1,"ng-container"),e&2){let t=i.$index;As(t%2!==0?0:1)}}var mr=(e,i,t)=>({result:e,term:i,formatter:t});function br(e,i){if(e&1&&Es(0,"ngb-highlight",2),e&2){let t=i.result,s=i.term,n=i.formatter;be("result",n(t))("term",s)}}function _r(e,i){}function xr(e,i){if(e&1){let t=zs();Ts(0,"button",3),_e("mouseenter",function(){let n=Je(t).$index,o=bt();return Qe(o.markActive(n))})("click",function(){let n=Je(t).$implicit,o=bt();return Qe(o.select(n))}),ei(1,_r,0,0,"ng-template",4),Rs()}if(e&2){let t=i.$implicit,s=i.$index,n=bt(),o=Vs(1);ri("active",s===n.activeIdx),be("id",n.id+"-"+s),jt(),be("ngTemplateOutlet",n.resultTemplate||o)("ngTemplateOutletContext",Ws(5,mr,t,n.term,n.formatter))}}var yr=(()=>{class e{constructor(){this.highlightClass="ngb-highlight",this.accentSensitive=!0}ngOnChanges(t){!this.accentSensitive&&!String.prototype.normalize&&(console.warn("The `accentSensitive` input in `ngb-highlight` cannot be set to `false` in a browser that does not implement the `String.normalize` function. You will have to include a polyfill in your application to use this feature in the current browser."),this.accentSensitive=!0);let s=Ot(this.result),n=Array.isArray(this.term)?this.term:[this.term],o=c=>this.accentSensitive?c:hi(c),r=n.map(c=>qs(o(Ot(c)))).filter(c=>c),a=this.accentSensitive?s:hi(s),l=r.length?a.split(new RegExp(`(${r.join("|")})`,"gmi")):[s];if(this.accentSensitive)this.parts=l;else{let c=0;this.parts=l.map(h=>s.substring(c,c+=h.length))}}static{this.\u0275fac=function(s){return new(s||e)}}static{this.\u0275cmp=ti({type:e,selectors:[["ngb-highlight"]],inputs:{highlightClass:"highlightClass",result:"result",term:"term",accentSensitive:"accentSensitive"},features:[Ht],decls:2,vars:0,consts:[[3,"class"]],template:function(s,n){s&1&&si(0,gr,2,1,null,null,ii),s&2&&ni(n.parts)},styles:[`.ngb-highlight{font-weight:700} `],encapsulation:2,changeDetection:0})}}return e})(),vr=(()=>{class e{constructor(){this.editable=!0,this.focusFirst=!0,this.selectOnExact=!1,this.showHint=!1,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=t=>t}static{this.\u0275fac=function(s){return new(s||e)}}static{this.\u0275prov=fe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),wr=(()=>{class e{constructor(){this.activeIdx=0,this.focusFirst=!0,this.formatter=Ot,this.selectEvent=new mt,this.activeChangeEvent=new mt}hasActive(){return this.activeIdx>-1&&this.activeIdx<this.results.length}getActive(){return this.results[this.activeIdx]}markActive(t){this.activeIdx=t,this._activeChanged()}next(){this.activeIdx===this.results.length-1?this.activeIdx=this.focusFirst?(this.activeIdx+1)%this.results.length:-1:this.activeIdx++,this._activeChanged()}prev(){this.activeIdx<0?this.activeIdx=this.results.length-1:this.activeIdx===0?this.activeIdx=this.focusFirst?this.results.length-1:-1:this.activeIdx--,this._activeChanged()}resetActive(){this.activeIdx=this.focusFirst?0:-1,this._activeChanged()}select(t){this.selectEvent.emit(t)}ngOnInit(){this.resetActive()}_activeChanged(){this.activeChangeEvent.emit(this.activeIdx>=0?this.id+"-"+this.activeIdx:void 0)}static{this.\u0275fac=function(s){return new(s||e)}}static{this.\u0275cmp=ti({type:e,selectors:[["ngb-typeahead-window"]],hostAttrs:["role","listbox"],hostVars:3,hostBindings:function(s,n){s&1&&_e("mousedown",function(r){return r.preventDefault()}),s&2&&(oi("id",n.id),ai("dropdown-menu show"+(n.popupClass?" "+n.popupClass:"")))},inputs:{id:"id",focusFirst:"focusFirst",results:"results",term:"term",formatter:"formatter",resultTemplate:"resultTemplate",popupClass:"popupClass"},outputs:{selectEvent:"select",activeChangeEvent:"activeChange"},exportAs:["ngbTypeaheadWindow"],decls:4,vars:0,consts:[["rt",""],["type","button","role","option",1,"dropdown-item",3,"id","active"],[3,"result","term"],["type","button","role","option",1,"dropdown-item",3,"mouseenter","click","id"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(s,n){s&1&&(ei(0,br,1,2,"ng-template",null,0,Hs),si(2,xr,2,9,"button",1,ii)),s&2&&(jt(2),ni(n.results))},dependencies:[yr,$s],encapsulation:2})}}return e})(),Mr=0,ph=(()=>{class e{constructor(){this._nativeElement=N(ge).nativeElement,this._config=N(vr),this._live=N(Qs),this._document=N(ks),this._ngZone=N(pe),this._changeDetector=N(js),this._injector=N(Ms),this._popupService=new Js(wr),this._positioning=Xs(),this._subscription=null,this._closed$=new fs,this._inputValueBackup=null,this._inputValueForSelectOnExact=null,this._valueChanges$=ms(this._nativeElement,"input").pipe(gs(t=>t.target.value)),this._resubscribeTypeahead$=new ue(null),this._windowRef=null,this.autocomplete="off",this.container=this._config.container,this.editable=this._config.editable,this.focusFirst=this._config.focusFirst,this.selectOnExact=this._config.selectOnExact,this.showHint=this._config.showHint,this.placement=this._config.placement,this.popperOptions=this._config.popperOptions,this.selectItem=new mt,this.activeDescendant=null,this.popupId=`ngb-typeahead-${Mr++}`,this._onTouched=()=>{},this._onChange=t=>{}}ngOnInit(){this._subscribeToUserInput()}ngOnChanges({ngbTypeahead:t}){t&&!t.firstChange&&(this._unsubscribeFromUserInput(),this._subscribeToUserInput())}ngOnDestroy(){this._closePopup(),this._unsubscribeFromUserInput()}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}writeValue(t){this._writeInputValue(this._formatItemForInput(t)),this.showHint&&(this._inputValueBackup=t)}setDisabledState(t){this._nativeElement.disabled=t}dismissPopup(){this.isPopupOpen()&&(this._resubscribeTypeahead$.next(null),this._closePopup(),this.showHint&&this._inputValueBackup!==null&&this._writeInputValue(this._inputValueBackup),this._changeDetector.markForCheck())}isPopupOpen(){return this._windowRef!=null}handleBlur(){this._resubscribeTypeahead$.next(null),this._onTouched()}handleKeyDown(t){if(this.isPopupOpen())switch(t.key){case"ArrowDown":t.preventDefault(),this._windowRef.instance.next(),this._showHint();break;case"ArrowUp":t.preventDefault(),this._windowRef.instance.prev(),this._showHint();break;case"Enter":case"Tab":{let s=this._windowRef.instance.getActive();Ks(s)&&(t.preventDefault(),t.stopPropagation(),this._selectResult(s)),this._closePopup();break}}}_openPopup(){if(!this.isPopupOpen()){this._inputValueBackup=this._nativeElement.value;let{windowRef:t}=this._popupService.open();this._windowRef=t,this._windowRef.setInput("id",this.popupId),this._windowRef.setInput("popupClass",this.popupClass),this._windowRef.instance.selectEvent.subscribe(s=>this._selectResultClosePopup(s)),this._windowRef.instance.activeChangeEvent.subscribe(s=>this.activeDescendant=s),this.container==="body"&&(this._windowRef.location.nativeElement.style.zIndex="1055",this._document.body.appendChild(this._windowRef.location.nativeElement)),this._changeDetector.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._windowRef&&(this._positioning.createPopper({hostElement:this._nativeElement,targetElement:this._windowRef.location.nativeElement,placement:this.placement,updatePopperOptions:s=>this.popperOptions(Zs([0,2])(s))}),this._afterRenderRef=Cs({mixedReadWrite:()=>{this._positioning.update()}},{injector:this._injector}))}),Gs(this._ngZone,this._document,"outside",()=>this.dismissPopup(),this._closed$,[this._nativeElement,this._windowRef.location.nativeElement])}}_closePopup(){this._popupService.close().subscribe(()=>{this._positioning.destroy(),this._afterRenderRef?.destroy(),this._closed$.next(),this._windowRef=null,this.activeDescendant=null})}_selectResult(t){let s=!1;this.selectItem.emit({item:t,preventDefault:()=>{s=!0}}),this._resubscribeTypeahead$.next(null),s||(this.writeValue(t),this._onChange(t))}_selectResultClosePopup(t){this._selectResult(t),this._closePopup()}_showHint(){if(this.showHint&&this._windowRef?.instance.hasActive()&&this._inputValueBackup!=null){let t=this._inputValueBackup.toLowerCase(),s=this._formatItemForInput(this._windowRef.instance.getActive());t===s.substring(0,this._inputValueBackup.length).toLowerCase()?(this._writeInputValue(this._inputValueBackup+s.substring(this._inputValueBackup.length)),this._nativeElement.setSelectionRange.apply(this._nativeElement,[this._inputValueBackup.length,s.length])):this._writeInputValue(s)}}_formatItemForInput(t){return t!=null&&this.inputFormatter?this.inputFormatter(t):Ot(t)}_writeInputValue(t){this._nativeElement.value=Ot(t)}_subscribeToUserInput(){let t=this._valueChanges$.pipe(xs(s=>{this._inputValueBackup=this.showHint?s:null,this._inputValueForSelectOnExact=this.selectOnExact?s:null,this._onChange(this.editable?s:null)}),this.ngbTypeahead?this.ngbTypeahead:()=>ps([]));this._subscription=this._resubscribeTypeahead$.pipe(_s(()=>t)).subscribe(s=>{!s||s.length===0?this._closePopup():this.selectOnExact&&s.length===1&&this._formatItemForInput(s[0])===this._inputValueForSelectOnExact?(this._selectResult(s[0]),this._closePopup()):(this._openPopup(),this._windowRef.setInput("focusFirst",this.focusFirst),this._windowRef.setInput("results",s),this._windowRef.setInput("term",this._nativeElement.value),this.resultFormatter&&this._windowRef.setInput("formatter",this.resultFormatter),this.resultTemplate&&this._windowRef.setInput("resultTemplate",this.resultTemplate),this._windowRef.instance.resetActive(),this._windowRef.changeDetectorRef.detectChanges(),this._showHint());let n=s?s.length:0;this._live.say(n===0?"No results available":`${n} result${n===1?"":"s"} available`)})}_unsubscribeFromUserInput(){this._subscription&&this._subscription.unsubscribe(),this._subscription=null}static{this.\u0275fac=function(s){return new(s||e)}}static{this.\u0275dir=me({type:e,selectors:[["input","ngbTypeahead",""]],hostAttrs:["autocapitalize","off","autocorrect","off","role","combobox"],hostVars:7,hostBindings:function(s,n){s&1&&_e("blur",function(){return n.handleBlur()})("keydown",function(r){return n.handleKeyDown(r)}),s&2&&(oi("autocomplete",n.autocomplete),Ds("aria-autocomplete",n.showHint?"both":"list")("aria-activedescendant",n.activeDescendant)("aria-controls",n.isPopupOpen()?n.popupId:null)("aria-expanded",n.isPopupOpen()),ri("open",n.isPopupOpen()))},inputs:{autocomplete:"autocomplete",container:"container",editable:"editable",focusFirst:"focusFirst",inputFormatter:"inputFormatter",ngbTypeahead:"ngbTypeahead",resultFormatter:"resultFormatter",resultTemplate:"resultTemplate",selectOnExact:"selectOnExact",showHint:"showHint",placement:"placement",popperOptions:"popperOptions",popupClass:"popupClass"},outputs:{selectItem:"selectItem"},exportAs:["ngbTypeahead"],features:[Ns([{provide:Us,useExisting:ys(()=>e),multi:!0}]),Ht]})}}return e})(),gh=(()=>{class e{static{this.\u0275fac=function(s){return new(s||e)}}static{this.\u0275mod=Ps({type:e})}static{this.\u0275inj=vs({})}}return e})();function Ut(e){return e+.5|0}var ot=(e,i,t)=>Math.max(Math.min(e,t),i);function $t(e){return ot(Ut(e*2.55),0,255)}function rt(e){return ot(Ut(e*255),0,255)}function Q(e){return ot(Ut(e/2.55)/100,0,1)}function tn(e){return ot(Ut(e*100),0,100)}var X={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},ui=[..."0123456789ABCDEF"],kr=e=>ui[e&15],Sr=e=>ui[(e&240)>>4]+ui[e&15],xe=e=>(e&240)>>4===(e&15),Cr=e=>xe(e.r)&&xe(e.g)&&xe(e.b)&&xe(e.a);function Pr(e){var i=e.length,t;return e[0]==="#"&&(i===4||i===5?t={r:255&X[e[1]]*17,g:255&X[e[2]]*17,b:255&X[e[3]]*17,a:i===5?X[e[4]]*17:255}:(i===7||i===9)&&(t={r:X[e[1]]<<4|X[e[2]],g:X[e[3]]<<4|X[e[4]],b:X[e[5]]<<4|X[e[6]],a:i===9?X[e[7]]<<4|X[e[8]]:255})),t}var Dr=(e,i)=>e<255?i(e):"";function Or(e){var i=Cr(e)?kr:Sr;return e?"#"+i(e.r)+i(e.g)+i(e.b)+Dr(e.a,i):void 0}var Ar=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function on(e,i,t){let s=i*Math.min(t,1-t),n=(o,r=(o+e/30)%12)=>t-s*Math.max(Math.min(r-3,9-r,1),-1);return[n(0),n(8),n(4)]}function Tr(e,i,t){let s=(n,o=(n+e/60)%6)=>t-t*i*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function Rr(e,i,t){let s=on(e,1,.5),n;for(i+t>1&&(n=1/(i+t),i*=n,t*=n),n=0;n<3;n++)s[n]*=1-i-t,s[n]+=i;return s}function Er(e,i,t,s,n){return e===n?(i-t)/s+(i<t?6:0):i===n?(t-e)/s+2:(e-i)/s+4}function fi(e){let t=e.r/255,s=e.g/255,n=e.b/255,o=Math.max(t,s,n),r=Math.min(t,s,n),a=(o+r)/2,l,c,h;return o!==r&&(h=o-r,c=a>.5?h/(2-o-r):h/(o+r),l=Er(t,s,n,h,o),l=l*60+.5),[l|0,c||0,a]}function pi(e,i,t,s){return(Array.isArray(i)?e(i[0],i[1],i[2]):e(i,t,s)).map(rt)}function gi(e,i,t){return pi(on,e,i,t)}function Lr(e,i,t){return pi(Rr,e,i,t)}function Ir(e,i,t){return pi(Tr,e,i,t)}function rn(e){return(e%360+360)%360}function Fr(e){let i=Ar.exec(e),t=255,s;if(!i)return;i[5]!==s&&(t=i[6]?$t(+i[5]):rt(+i[5]));let n=rn(+i[2]),o=+i[3]/100,r=+i[4]/100;return i[1]==="hwb"?s=Lr(n,o,r):i[1]==="hsv"?s=Ir(n,o,r):s=gi(n,o,r),{r:s[0],g:s[1],b:s[2],a:t}}function Br(e,i){var t=fi(e);t[0]=rn(t[0]+i),t=gi(t),e.r=t[0],e.g=t[1],e.b=t[2]}function zr(e){if(!e)return;let i=fi(e),t=i[0],s=tn(i[1]),n=tn(i[2]);return e.a<255?`hsla(${t}, ${s}%, ${n}%, ${Q(e.a)})`:`hsl(${t}, ${s}%, ${n}%)`}var en={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"},sn={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 Vr(){let e={},i=Object.keys(sn),t=Object.keys(en),s,n,o,r,a;for(s=0;s<i.length;s++){for(r=a=i[s],n=0;n<t.length;n++)o=t[n],a=a.replace(o,en[o]);o=parseInt(sn[r],16),e[a]=[o>>16&255,o>>8&255,o&255]}return e}var ye;function Nr(e){ye||(ye=Vr(),ye.transparent=[0,0,0,0]);let i=ye[e.toLowerCase()];return i&&{r:i[0],g:i[1],b:i[2],a:i.length===4?i[3]:255}}var Wr=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Hr(e){let i=Wr.exec(e),t=255,s,n,o;if(i){if(i[7]!==s){let r=+i[7];t=i[8]?$t(r):ot(r*255,0,255)}return s=+i[1],n=+i[3],o=+i[5],s=255&(i[2]?$t(s):ot(s,0,255)),n=255&(i[4]?$t(n):ot(n,0,255)),o=255&(i[6]?$t(o):ot(o,0,255)),{r:s,g:n,b:o,a:t}}}function jr(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Q(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}var di=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,At=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function $r(e,i,t){let s=At(Q(e.r)),n=At(Q(e.g)),o=At(Q(e.b));return{r:rt(di(s+t*(At(Q(i.r))-s))),g:rt(di(n+t*(At(Q(i.g))-n))),b:rt(di(o+t*(At(Q(i.b))-o))),a:e.a+t*(i.a-e.a)}}function ve(e,i,t){if(e){let s=fi(e);s[i]=Math.max(0,Math.min(s[i]+s[i]*t,i===0?360:1)),s=gi(s),e.r=s[0],e.g=s[1],e.b=s[2]}}function an(e,i){return e&&Object.assign(i||{},e)}function nn(e){var i={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(i={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(i.a=rt(e[3]))):(i=an(e,{r:0,g:0,b:0,a:1}),i.a=rt(i.a)),i}function Yr(e){return e.charAt(0)==="r"?Hr(e):Fr(e)}var Yt=class e{constructor(i){if(i instanceof e)return i;let t=typeof i,s;t==="object"?s=nn(i):t==="string"&&(s=Pr(i)||Nr(i)||Yr(i)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var i=an(this._rgb);return i&&(i.a=Q(i.a)),i}set rgb(i){this._rgb=nn(i)}rgbString(){return this._valid?jr(this._rgb):void 0}hexString(){return this._valid?Or(this._rgb):void 0}hslString(){return this._valid?zr(this._rgb):void 0}mix(i,t){if(i){let s=this.rgb,n=i.rgb,o,r=t===o?.5:t,a=2*r-1,l=s.a-n.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,s.r=255&c*s.r+o*n.r+.5,s.g=255&c*s.g+o*n.g+.5,s.b=255&c*s.b+o*n.b+.5,s.a=r*s.a+(1-r)*n.a,this.rgb=s}return this}interpolate(i,t){return i&&(this._rgb=$r(this._rgb,i._rgb,t)),this}clone(){return new e(this.rgb)}alpha(i){return this._rgb.a=rt(i),this}clearer(i){let t=this._rgb;return t.a*=1-i,this}greyscale(){let i=this._rgb,t=Ut(i.r*.3+i.g*.59+i.b*.11);return i.r=i.g=i.b=t,this}opaquer(i){let t=this._rgb;return t.a*=1+i,this}negate(){let i=this._rgb;return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,this}lighten(i){return ve(this._rgb,2,i),this}darken(i){return ve(this._rgb,2,-i),this}saturate(i){return ve(this._rgb,1,i),this}desaturate(i){return ve(this._rgb,1,-i),this}rotate(i){return Br(this._rgb,i),this}};var _n=(()=>{let e=0;return()=>e++})();function P(e){return e==null}function A(e){if(Array.isArray&&Array.isArray(e))return!0;let i=Object.prototype.toString.call(e);return i.slice(0,7)==="[object"&&i.slice(-6)==="Array]"}function k(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function T(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function $(e,i){return T(e)?e:i}function S(e,i){return typeof e>"u"?i:e}var xn=(e,i)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*i:+e;function R(e,i,t){if(e&&typeof e.call=="function")return e.apply(t,i)}function V(e,i,t,s){let n,o,r;if(A(e))if(o=e.length,s)for(n=o-1;n>=0;n--)i.call(t,e[n],n);else for(n=0;n<o;n++)i.call(t,e[n],n);else if(k(e))for(r=Object.keys(e),o=r.length,n=0;n<o;n++)i.call(t,e[r[n]],r[n])}function yi(e,i){let t,s,n,o;if(!e||!i||e.length!==i.length)return!1;for(t=0,s=e.length;t<s;++t)if(n=e[t],o=i[t],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function Se(e){if(A(e))return e.map(Se);if(k(e)){let i=Object.create(null),t=Object.keys(e),s=t.length,n=0;for(;n<s;++n)i[t[n]]=Se(e[t[n]]);return i}return e}function yn(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function Ur(e,i,t,s){if(!yn(e))return;let n=i[e],o=t[e];k(n)&&k(o)?Rt(n,o,s):i[e]=Se(o)}function Rt(e,i,t){let s=A(i)?i:[i],n=s.length;if(!k(e))return e;t=t||{};let o=t.merger||Ur,r;for(let a=0;a<n;++a){if(r=s[a],!k(r))continue;let l=Object.keys(r);for(let c=0,h=l.length;c<h;++c)o(l[c],e,r,t)}return e}function Lt(e,i){return Rt(e,i,{merger:Xr})}function Xr(e,i,t){if(!yn(e))return;let s=i[e],n=t[e];k(s)&&k(n)?Lt(s,n):Object.prototype.hasOwnProperty.call(i,e)||(i[e]=Se(n))}var ln={"":e=>e,x:e=>e.x,y:e=>e.y};function Kr(e){let i=e.split("."),t=[],s="";for(let n of i)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(t.push(s),s="");return t}function qr(e){let i=Kr(e);return t=>{for(let s of i){if(s==="")break;t=t&&t[s]}return t}}function qt(e,i){return(ln[i]||(ln[i]=qr(i)))(e)}function De(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Gt=e=>typeof e<"u",tt=e=>typeof e=="function",vi=(e,i)=>{if(e.size!==i.size)return!1;for(let t of e)if(!i.has(t))return!1;return!0};function vn(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}var B=Math.PI,j=2*B,Gr=j+B,Ce=Number.POSITIVE_INFINITY,Zr=B/180,H=B/2,_t=B/4,cn=B*2/3,et=Math.log10,yt=Math.sign;function It(e,i,t){return Math.abs(e-i)<t}function wi(e){let i=Math.round(e);e=It(e,i,e/1e3)?i:e;let t=Math.pow(10,Math.floor(et(e))),s=e/t;return(s<=1?1:s<=2?2:s<=5?5:10)*t}function wn(e){let i=[],t=Math.sqrt(e),s;for(s=1;s<t;s++)e%s===0&&(i.push(s),i.push(e/s));return t===(t|0)&&i.push(t),i.sort((n,o)=>n-o).pop(),i}function Jr(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Ft(e){return!Jr(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function Mn(e,i){let t=Math.round(e);return t-i<=e&&t+i>=e}function Mi(e,i,t){let s,n,o;for(s=0,n=e.length;s<n;s++)o=e[s][t],isNaN(o)||(i.min=Math.min(i.min,o),i.max=Math.max(i.max,o))}function it(e){return e*(B/180)}function Oe(e){return e*(180/B)}function ki(e){if(!T(e))return;let i=1,t=0;for(;Math.round(e*i)/i!==e;)i*=10,t++;return t}function kn(e,i){let t=i.x-e.x,s=i.y-e.y,n=Math.sqrt(t*t+s*s),o=Math.atan2(s,t);return o<-.5*B&&(o+=j),{angle:o,distance:n}}function _i(e,i){return Math.sqrt(Math.pow(i.x-e.x,2)+Math.pow(i.y-e.y,2))}function Qr(e,i){return(e-i+Gr)%j-B}function W(e){return(e%j+j)%j}function Si(e,i,t,s){let n=W(e),o=W(i),r=W(t),a=W(o-n),l=W(r-n),c=W(n-o),h=W(n-r);return n===o||n===r||s&&o===r||a>l&&c<h}function K(e,i,t){return Math.max(i,Math.min(t,e))}function Sn(e){return K(e,-32768,32767)}function Ci(e,i,t,s=1e-6){return e>=Math.min(i,t)-s&&e<=Math.max(i,t)+s}function Ae(e,i,t){t=t||(r=>e[r]<i);let s=e.length-1,n=0,o;for(;s-n>1;)o=n+s>>1,t(o)?n=o:s=o;return{lo:n,hi:s}}var lt=(e,i,t,s)=>Ae(e,t,s?n=>{let o=e[n][i];return o<t||o===t&&e[n+1][i]===t}:n=>e[n][i]<t),Cn=(e,i,t)=>Ae(e,t,s=>e[s][i]>=t);function Pn(e,i,t){let s=0,n=e.length;for(;s<n&&e[s]<i;)s++;for(;n>s&&e[n-1]>t;)n--;return s>0||n<e.length?e.slice(s,n):e}var Dn=["push","pop","shift","splice","unshift"];function On(e,i){if(e._chartjs){e._chartjs.listeners.push(i);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[i]}}),Dn.forEach(t=>{let s="_onData"+De(t),n=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...o){let r=n.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[s]=="function"&&a[s](...o)}),r}})})}function Pi(e,i){let t=e._chartjs;if(!t)return;let s=t.listeners,n=s.indexOf(i);n!==-1&&s.splice(n,1),!(s.length>0)&&(Dn.forEach(o=>{delete e[o]}),delete e._chartjs)}function An(e){let i=new Set(e);return i.size===e.length?e:Array.from(i)}var Di=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function Oi(e,i){let t=[],s=!1;return function(...n){t=n,s||(s=!0,Di.call(window,()=>{s=!1,e.apply(i,t)}))}}function Tn(e,i){let t;return function(...s){return i?(clearTimeout(t),t=setTimeout(e,i,s)):e.apply(this,s),i}}var Rn=e=>e==="start"?"left":e==="end"?"right":"center",Ai=(e,i,t)=>e==="start"?i:e==="end"?t:(i+t)/2;function En(e,i,t){let s=i.length,n=0,o=s;if(e._sorted){let{iScale:r,vScale:a,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,h=r.axis,{min:d,max:u,minDefined:f,maxDefined:m}=r.getUserBounds();if(f){if(n=Math.min(lt(l,h,d).lo,t?s:lt(i,h,r.getPixelForValue(d)).lo),c){let p=l.slice(0,n+1).reverse().findIndex(g=>!P(g[a.axis]));n-=Math.max(0,p)}n=K(n,0,s-1)}if(m){let p=Math.max(lt(l,r.axis,u,!0).hi+1,t?0:lt(i,h,r.getPixelForValue(u),!0).hi+1);if(c){let g=l.slice(p-1).findIndex(b=>!P(b[a.axis]));p+=Math.max(0,g)}o=K(p,n,s)-n}else o=s-n}return{start:n,count:o}}function Ln(e){let{xScale:i,yScale:t,_scaleRanges:s}=e,n={xmin:i.min,xmax:i.max,ymin:t.min,ymax:t.max};if(!s)return e._scaleRanges=n,!0;let o=s.xmin!==i.min||s.xmax!==i.max||s.ymin!==t.min||s.ymax!==t.max;return Object.assign(s,n),o}var we=e=>e===0||e===1,hn=(e,i,t)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-i)*j/t)),dn=(e,i,t)=>Math.pow(2,-10*e)*Math.sin((e-i)*j/t)+1,Tt={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*H)+1,easeOutSine:e=>Math.sin(e*H),easeInOutSine:e=>-.5*(Math.cos(B*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>we(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>we(e)?e:hn(e,.075,.3),easeOutElastic:e=>we(e)?e:dn(e,.075,.3),easeInOutElastic(e){return we(e)?e:e<.5?.5*hn(e*2,.1125,.45):.5+.5*dn(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let i=1.70158;return(e/=.5)<1?.5*(e*e*(((i*=1.525)+1)*e-i)):.5*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)},easeInBounce:e=>1-Tt.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Tt.easeInBounce(e*2)*.5:Tt.easeOutBounce(e*2-1)*.5+.5};function Ti(e){if(e&&typeof e=="object"){let i=e.toString();return i==="[object CanvasPattern]"||i==="[object CanvasGradient]"}return!1}function Ri(e){return Ti(e)?e:new Yt(e)}function mi(e){return Ti(e)?e:new Yt(e).saturate(.5).darken(.1).hexString()}var ta=["x","y","borderWidth","radius","tension"],ea=["color","borderColor","backgroundColor"];function ia(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:i=>i!=="onProgress"&&i!=="onComplete"&&i!=="fn"}),e.set("animations",{colors:{type:"color",properties:ea},numbers:{type:"number",properties:ta}}),e.describe("animations",{_fallback:"animation"}),e.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:i=>i|0}}}})}function sa(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var un=new Map;function na(e,i){i=i||{};let t=e+JSON.stringify(i),s=un.get(t);return s||(s=new Intl.NumberFormat(e,i),un.set(t,s)),s}function Te(e,i,t){return na(i,t).format(e)}var In={values(e){return A(e)?e:""+e},numeric(e,i,t){if(e===0)return"0";let s=this.chart.options.locale,n,o=e;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)&&(n="scientific"),o=oa(e,t)}let r=et(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:n,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Te(e,s,l)},logarithmic(e,i,t){if(e===0)return"0";let s=t[i].significand||e/Math.pow(10,Math.floor(et(e)));return[1,2,3,5,10,15].includes(s)||i>.8*t.length?In.numeric.call(this,e,i,t):""}};function oa(e,i){let t=i.length>3?i[2].value-i[1].value:i[1].value-i[0].value;return Math.abs(t)>=1&&e!==Math.floor(e)&&(t=e-Math.floor(e)),t}var Zt={formatters:In};function ra(e){e.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:(i,t)=>t.lineWidth,tickColor:(i,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:Zt.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:i=>!i.startsWith("before")&&!i.startsWith("after")&&i!=="callback"&&i!=="parser",_indexable:i=>i!=="borderDash"&&i!=="tickBorderDash"&&i!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:i=>i!=="backdropPadding"&&i!=="callback",_indexable:i=>i!=="backdropPadding"})}var ht=Object.create(null),Re=Object.create(null);function Xt(e,i){if(!i)return e;let t=i.split(".");for(let s=0,n=t.length;s<n;++s){let o=t[s];e=e[o]||(e[o]=Object.create(null))}return e}function bi(e,i,t){return typeof i=="string"?Rt(Xt(e,i),t):Rt(Xt(e,""),i)}var xi=class{constructor(i,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=s=>s.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=(s,n)=>mi(n.backgroundColor),this.hoverBorderColor=(s,n)=>mi(n.borderColor),this.hoverColor=(s,n)=>mi(n.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(i),this.apply(t)}set(i,t){return bi(this,i,t)}get(i){return Xt(this,i)}describe(i,t){return bi(Re,i,t)}override(i,t){return bi(ht,i,t)}route(i,t,s,n){let o=Xt(this,i),r=Xt(this,s),a="_"+t;Object.defineProperties(o,{[a]:{value:o[t],writable:!0},[t]:{enumerable:!0,get(){let l=this[a],c=r[n];return k(l)?Object.assign({},c,l):S(l,c)},set(l){this[a]=l}}})}apply(i){i.forEach(t=>t(this))}},O=new xi({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[ia,sa,ra]);function aa(e){return!e||P(e.size)||P(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Kt(e,i,t,s,n){let o=i[n];return o||(o=i[n]=e.measureText(n).width,t.push(n)),o>s&&(s=o),s}function Fn(e,i,t,s){s=s||{};let n=s.data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==i&&(n=s.data={},o=s.garbageCollect=[],s.font=i),e.save(),e.font=i;let r=0,a=t.length,l,c,h,d,u;for(l=0;l<a;l++)if(d=t[l],d!=null&&!A(d))r=Kt(e,n,o,r,d);else if(A(d))for(c=0,h=d.length;c<h;c++)u=d[c],u!=null&&!A(u)&&(r=Kt(e,n,o,r,u));e.restore();let f=o.length/2;if(f>t.length){for(l=0;l<f;l++)delete n[o[l]];o.splice(0,f)}return r}function dt(e,i,t){let s=e.currentDevicePixelRatio,n=t!==0?Math.max(t/2,.5):0;return Math.round((i-n)*s)/s+n}function Ei(e,i){!i&&!e||(i=i||e.getContext("2d"),i.save(),i.resetTransform(),i.clearRect(0,0,e.width,e.height),i.restore())}function Bn(e,i,t,s){zn(e,i,t,s,null)}function zn(e,i,t,s,n){let o,r,a,l,c,h,d,u,f=i.pointStyle,m=i.rotation,p=i.radius,g=(m||0)*Zr;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){e.save(),e.translate(t,s),e.rotate(g),e.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),e.restore();return}if(!(isNaN(p)||p<=0)){switch(e.beginPath(),f){default:n?e.ellipse(t,s,n/2,p,0,0,j):e.arc(t,s,p,0,j),e.closePath();break;case"triangle":h=n?n/2:p,e.moveTo(t+Math.sin(g)*h,s-Math.cos(g)*p),g+=cn,e.lineTo(t+Math.sin(g)*h,s-Math.cos(g)*p),g+=cn,e.lineTo(t+Math.sin(g)*h,s-Math.cos(g)*p),e.closePath();break;case"rectRounded":c=p*.516,l=p-c,r=Math.cos(g+_t)*l,d=Math.cos(g+_t)*(n?n/2-c:l),a=Math.sin(g+_t)*l,u=Math.sin(g+_t)*(n?n/2-c:l),e.arc(t-d,s-a,c,g-B,g-H),e.arc(t+u,s-r,c,g-H,g),e.arc(t+d,s+a,c,g,g+H),e.arc(t-u,s+r,c,g+H,g+B),e.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*p,h=n?n/2:l,e.rect(t-h,s-l,2*h,2*l);break}g+=_t;case"rectRot":d=Math.cos(g)*(n?n/2:p),r=Math.cos(g)*p,a=Math.sin(g)*p,u=Math.sin(g)*(n?n/2:p),e.moveTo(t-d,s-a),e.lineTo(t+u,s-r),e.lineTo(t+d,s+a),e.lineTo(t-u,s+r),e.closePath();break;case"crossRot":g+=_t;case"cross":d=Math.cos(g)*(n?n/2:p),r=Math.cos(g)*p,a=Math.sin(g)*p,u=Math.sin(g)*(n?n/2:p),e.moveTo(t-d,s-a),e.lineTo(t+d,s+a),e.moveTo(t+u,s-r),e.lineTo(t-u,s+r);break;case"star":d=Math.cos(g)*(n?n/2:p),r=Math.cos(g)*p,a=Math.sin(g)*p,u=Math.sin(g)*(n?n/2:p),e.moveTo(t-d,s-a),e.lineTo(t+d,s+a),e.moveTo(t+u,s-r),e.lineTo(t-u,s+r),g+=_t,d=Math.cos(g)*(n?n/2:p),r=Math.cos(g)*p,a=Math.sin(g)*p,u=Math.sin(g)*(n?n/2:p),e.moveTo(t-d,s-a),e.lineTo(t+d,s+a),e.moveTo(t+u,s-r),e.lineTo(t-u,s+r);break;case"line":r=n?n/2:Math.cos(g)*p,a=Math.sin(g)*p,e.moveTo(t-r,s-a),e.lineTo(t+r,s+a);break;case"dash":e.moveTo(t,s),e.lineTo(t+Math.cos(g)*(n?n/2:p),s+Math.sin(g)*p);break;case!1:e.closePath();break}e.fill(),i.borderWidth>0&&e.stroke()}}function G(e,i,t){return t=t||.5,!i||e&&e.x>i.left-t&&e.x<i.right+t&&e.y>i.top-t&&e.y<i.bottom+t}function Ee(e,i){e.save(),e.beginPath(),e.rect(i.left,i.top,i.right-i.left,i.bottom-i.top),e.clip()}function Le(e){e.restore()}function Vn(e,i,t,s,n){if(!i)return e.lineTo(t.x,t.y);if(n==="middle"){let o=(i.x+t.x)/2;e.lineTo(o,i.y),e.lineTo(o,t.y)}else n==="after"!=!!s?e.lineTo(i.x,t.y):e.lineTo(t.x,i.y);e.lineTo(t.x,t.y)}function Nn(e,i,t,s){if(!i)return e.lineTo(t.x,t.y);e.bezierCurveTo(s?i.cp1x:i.cp2x,s?i.cp1y:i.cp2y,s?t.cp2x:t.cp1x,s?t.cp2y:t.cp1y,t.x,t.y)}function la(e,i){i.translation&&e.translate(i.translation[0],i.translation[1]),P(i.rotation)||e.rotate(i.rotation),i.color&&(e.fillStyle=i.color),i.textAlign&&(e.textAlign=i.textAlign),i.textBaseline&&(e.textBaseline=i.textBaseline)}function ca(e,i,t,s,n){if(n.strikethrough||n.underline){let o=e.measureText(s),r=i-o.actualBoundingBoxLeft,a=i+o.actualBoundingBoxRight,l=t-o.actualBoundingBoxAscent,c=t+o.actualBoundingBoxDescent,h=n.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=n.decorationWidth||2,e.moveTo(r,h),e.lineTo(a,h),e.stroke()}}function ha(e,i){let t=e.fillStyle;e.fillStyle=i.color,e.fillRect(i.left,i.top,i.width,i.height),e.fillStyle=t}function Jt(e,i,t,s,n,o={}){let r=A(i)?i:[i],a=o.strokeWidth>0&&o.strokeColor!=="",l,c;for(e.save(),e.font=n.string,la(e,o),l=0;l<r.length;++l)c=r[l],o.backdrop&&ha(e,o.backdrop),a&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),P(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,t,s,o.maxWidth)),e.fillText(c,t,s,o.maxWidth),ca(e,t,s,c,o),s+=Number(n.lineHeight);e.restore()}function Wn(e,i){let{x:t,y:s,w:n,h:o,radius:r}=i;e.arc(t+r.topLeft,s+r.topLeft,r.topLeft,1.5*B,B,!0),e.lineTo(t,s+o-r.bottomLeft),e.arc(t+r.bottomLeft,s+o-r.bottomLeft,r.bottomLeft,B,H,!0),e.lineTo(t+n-r.bottomRight,s+o),e.arc(t+n-r.bottomRight,s+o-r.bottomRight,r.bottomRight,H,0,!0),e.lineTo(t+n,s+r.topRight),e.arc(t+n-r.topRight,s+r.topRight,r.topRight,0,-H,!0),e.lineTo(t+r.topLeft,s)}var da=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,ua=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function fa(e,i){let t=(""+e).match(da);if(!t||t[1]==="normal")return i*1.2;switch(e=+t[2],t[3]){case"px":return e;case"%":e/=100;break}return i*e}var pa=e=>+e||0;function Li(e,i){let t={},s=k(i),n=s?Object.keys(i):i,o=k(e)?s?r=>S(e[r],e[i[r]]):r=>e[r]:()=>e;for(let r of n)t[r]=pa(o(r));return t}function Hn(e){return Li(e,{top:"y",right:"x",bottom:"y",left:"x"})}function jn(e){return Li(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Z(e){let i=Hn(e);return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function wt(e,i){e=e||{},i=i||O.font;let t=S(e.size,i.size);typeof t=="string"&&(t=parseInt(t,10));let s=S(e.style,i.style);s&&!(""+s).match(ua)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);let n={family:S(e.family,i.family),lineHeight:fa(S(e.lineHeight,i.lineHeight),t),size:t,style:s,weight:S(e.weight,i.weight),string:""};return n.string=aa(n),n}function Qt(e,i,t,s){let n=!0,o,r,a;for(o=0,r=e.length;o<r;++o)if(a=e[o],a!==void 0&&(i!==void 0&&typeof a=="function"&&(a=a(i),n=!1),t!==void 0&&A(a)&&(a=a[t%a.length],n=!1),a!==void 0))return s&&!n&&(s.cacheable=!1),a}function $n(e,i,t){let{min:s,max:n}=e,o=xn(i,(n-s)/2),r=(a,l)=>t&&a===0?0:a+l;return{min:r(s,-Math.abs(o)),max:r(n,o)}}function ut(e,i){return Object.assign(Object.create(e),i)}function Ie(e,i=[""],t,s,n=()=>e[0]){let o=t||e;typeof s>"u"&&(s=Xn("_fallback",e));let r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:s,_getTarget:n,override:a=>Ie([a,...e],i,o,s)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return Yn(a,l,()=>wa(l,i,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return pn(a).includes(l)},ownKeys(a){return pn(a)},set(a,l,c){let h=a._storage||(a._storage=n());return a[l]=h[l]=c,delete a._keys,!0}})}function vt(e,i,t,s){let n={_cacheable:!1,_proxy:e,_context:i,_subProxy:t,_stack:new Set,_descriptors:Ii(e,s),setContext:o=>vt(e,o,t,s),override:o=>vt(e.override(o),i,t,s)};return new Proxy(n,{deleteProperty(o,r){return delete o[r],delete e[r],!0},get(o,r,a){return Yn(o,r,()=>ma(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(e,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,r)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,r){return Reflect.has(e,r)},ownKeys(){return Reflect.ownKeys(e)},set(o,r,a){return e[r]=a,delete o[r],!0}})}function Ii(e,i={scriptable:!0,indexable:!0}){let{_scriptable:t=i.scriptable,_indexable:s=i.indexable,_allKeys:n=i.allKeys}=e;return{allKeys:n,scriptable:t,indexable:s,isScriptable:tt(t)?t:()=>t,isIndexable:tt(s)?s:()=>s}}var ga=(e,i)=>e?e+De(i):i,Fi=(e,i)=>k(i)&&e!=="adapters"&&(Object.getPrototypeOf(i)===null||i.constructor===Object);function Yn(e,i,t){if(Object.prototype.hasOwnProperty.call(e,i)||i==="constructor")return e[i];let s=t();return e[i]=s,s}function ma(e,i,t){let{_proxy:s,_context:n,_subProxy:o,_descriptors:r}=e,a=s[i];return tt(a)&&r.isScriptable(i)&&(a=ba(i,a,e,t)),A(a)&&a.length&&(a=_a(i,a,e,r.isIndexable)),Fi(i,a)&&(a=vt(a,n,o&&o[i],r)),a}function ba(e,i,t,s){let{_proxy:n,_context:o,_subProxy:r,_stack:a}=t;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=i(o,r||s);return a.delete(e),Fi(e,l)&&(l=Bi(n._scopes,n,e,l)),l}function _a(e,i,t,s){let{_proxy:n,_context:o,_subProxy:r,_descriptors:a}=t;if(typeof o.index<"u"&&s(e))return i[o.index%i.length];if(k(i[0])){let l=i,c=n._scopes.filter(h=>h!==l);i=[];for(let h of l){let d=Bi(c,n,e,h);i.push(vt(d,o,r&&r[e],a))}}return i}function Un(e,i,t){return tt(e)?e(i,t):e}var xa=(e,i)=>e===!0?i:typeof e=="string"?qt(i,e):void 0;function ya(e,i,t,s,n){for(let o of i){let r=xa(t,o);if(r){e.add(r);let a=Un(r._fallback,t,n);if(typeof a<"u"&&a!==t&&a!==s)return a}else if(r===!1&&typeof s<"u"&&t!==s)return null}return!1}function Bi(e,i,t,s){let n=i._rootScopes,o=Un(i._fallback,t,s),r=[...e,...n],a=new Set;a.add(s);let l=fn(a,r,t,o||t,s);return l===null||typeof o<"u"&&o!==t&&(l=fn(a,r,o,l,s),l===null)?!1:Ie(Array.from(a),[""],n,o,()=>va(i,t,s))}function fn(e,i,t,s,n){for(;t;)t=ya(e,i,t,s,n);return t}function va(e,i,t){let s=e._getTarget();i in s||(s[i]={});let n=s[i];return A(n)&&k(t)?t:n||{}}function wa(e,i,t,s){let n;for(let o of i)if(n=Xn(ga(o,e),t),typeof n<"u")return Fi(e,n)?Bi(t,s,e,n):n}function Xn(e,i){for(let t of i){if(!t)continue;let s=t[e];if(typeof s<"u")return s}}function pn(e){let i=e._keys;return i||(i=e._keys=Ma(e._scopes)),i}function Ma(e){let i=new Set;for(let t of e)for(let s of Object.keys(t).filter(n=>!n.startsWith("_")))i.add(s);return Array.from(i)}var ka=Number.EPSILON||1e-14,Et=(e,i)=>i<e.length&&!e[i].skip&&e[i],Kn=e=>e==="x"?"y":"x";function Sa(e,i,t,s){let n=e.skip?i:e,o=i,r=t.skip?i:t,a=_i(o,n),l=_i(r,o),c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;let d=s*c,u=s*h;return{previous:{x:o.x-d*(r.x-n.x),y:o.y-d*(r.y-n.y)},next:{x:o.x+u*(r.x-n.x),y:o.y+u*(r.y-n.y)}}}function Ca(e,i,t){let s=e.length,n,o,r,a,l,c=Et(e,0);for(let h=0;h<s-1;++h)if(l=c,c=Et(e,h+1),!(!l||!c)){if(It(i[h],0,ka)){t[h]=t[h+1]=0;continue}n=t[h]/i[h],o=t[h+1]/i[h],a=Math.pow(n,2)+Math.pow(o,2),!(a<=9)&&(r=3/Math.sqrt(a),t[h]=n*r*i[h],t[h+1]=o*r*i[h])}}function Pa(e,i,t="x"){let s=Kn(t),n=e.length,o,r,a,l=Et(e,0);for(let c=0;c<n;++c){if(r=a,a=l,l=Et(e,c+1),!a)continue;let h=a[t],d=a[s];r&&(o=(h-r[t])/3,a[`cp1${t}`]=h-o,a[`cp1${s}`]=d-o*i[c]),l&&(o=(l[t]-h)/3,a[`cp2${t}`]=h+o,a[`cp2${s}`]=d+o*i[c])}}function Da(e,i="x"){let t=Kn(i),s=e.length,n=Array(s).fill(0),o=Array(s),r,a,l,c=Et(e,0);for(r=0;r<s;++r)if(a=l,l=c,c=Et(e,r+1),!!l){if(c){let h=c[i]-l[i];n[r]=h!==0?(c[t]-l[t])/h:0}o[r]=a?c?yt(n[r-1])!==yt(n[r])?0:(n[r-1]+n[r])/2:n[r-1]:n[r]}Ca(e,n,o),Pa(e,o,i)}function Me(e,i,t){return Math.max(Math.min(e,t),i)}function Oa(e,i){let t,s,n,o,r,a=G(e[0],i);for(t=0,s=e.length;t<s;++t)r=o,o=a,a=t<s-1&&G(e[t+1],i),o&&(n=e[t],r&&(n.cp1x=Me(n.cp1x,i.left,i.right),n.cp1y=Me(n.cp1y,i.top,i.bottom)),a&&(n.cp2x=Me(n.cp2x,i.left,i.right),n.cp2y=Me(n.cp2y,i.top,i.bottom)))}function qn(e,i,t,s,n){let o,r,a,l;if(i.spanGaps&&(e=e.filter(c=>!c.skip)),i.cubicInterpolationMode==="monotone")Da(e,n);else{let c=s?e[e.length-1]:e[0];for(o=0,r=e.length;o<r;++o)a=e[o],l=Sa(c,a,e[Math.min(o+1,r-(s?0:1))%r],i.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}i.capBezierPoints&&Oa(e,t)}function Fe(){return typeof window<"u"&&typeof document<"u"}function Be(e){let i=e.parentNode;return i&&i.toString()==="[object ShadowRoot]"&&(i=i.host),i}function Pe(e,i,t){let s;return typeof e=="string"?(s=parseInt(e,10),e.indexOf("%")!==-1&&(s=s/100*i.parentNode[t])):s=e,s}var ze=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function Aa(e,i){return ze(e).getPropertyValue(i)}var Ta=["top","right","bottom","left"];function xt(e,i,t){let s={};t=t?"-"+t:"";for(let n=0;n<4;n++){let o=Ta[n];s[o]=parseFloat(e[i+"-"+o+t])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}var Ra=(e,i,t)=>(e>0||i>0)&&(!t||!t.shadowRoot);function Ea(e,i){let t=e.touches,s=t&&t.length?t[0]:e,{offsetX:n,offsetY:o}=s,r=!1,a,l;if(Ra(n,o,e.target))a=n,l=o;else{let c=i.getBoundingClientRect();a=s.clientX-c.left,l=s.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function ft(e,i){if("native"in e)return e;let{canvas:t,currentDevicePixelRatio:s}=i,n=ze(t),o=n.boxSizing==="border-box",r=xt(n,"padding"),a=xt(n,"border","width"),{x:l,y:c,box:h}=Ea(e,t),d=r.left+(h&&a.left),u=r.top+(h&&a.top),{width:f,height:m}=i;return o&&(f-=r.width+a.width,m-=r.height+a.height),{x:Math.round((l-d)/f*t.width/s),y:Math.round((c-u)/m*t.height/s)}}function La(e,i,t){let s,n;if(i===void 0||t===void 0){let o=e&&Be(e);if(!o)i=e.clientWidth,t=e.clientHeight;else{let r=o.getBoundingClientRect(),a=ze(o),l=xt(a,"border","width"),c=xt(a,"padding");i=r.width-c.width-l.width,t=r.height-c.height-l.height,s=Pe(a.maxWidth,o,"clientWidth"),n=Pe(a.maxHeight,o,"clientHeight")}}return{width:i,height:t,maxWidth:s||Ce,maxHeight:n||Ce}}var ct=e=>Math.round(e*10)/10;function Gn(e,i,t,s){let n=ze(e),o=xt(n,"margin"),r=Pe(n.maxWidth,e,"clientWidth")||Ce,a=Pe(n.maxHeight,e,"clientHeight")||Ce,l=La(e,i,t),{width:c,height:h}=l;if(n.boxSizing==="content-box"){let u=xt(n,"border","width"),f=xt(n,"padding");c-=f.width+u.width,h-=f.height+u.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?c/s:h-o.height),c=ct(Math.min(c,r,l.maxWidth)),h=ct(Math.min(h,a,l.maxHeight)),c&&!h&&(h=ct(c/2)),(i!==void 0||t!==void 0)&&s&&l.height&&h>l.height&&(h=l.height,c=ct(Math.floor(h*s))),{width:c,height:h}}function zi(e,i,t){let s=i||1,n=ct(e.height*s),o=ct(e.width*s);e.height=ct(e.height),e.width=ct(e.width);let r=e.canvas;return r.style&&(t||!r.style.height&&!r.style.width)&&(r.style.height=`${e.height}px`,r.style.width=`${e.width}px`),e.currentDevicePixelRatio!==s||r.height!==n||r.width!==o?(e.currentDevicePixelRatio=s,r.height=n,r.width=o,e.ctx.setTransform(s,0,0,s,0,0),!0):!1}var Zn=(function(){let e=!1;try{let i={get passive(){return e=!0,!1}};Fe()&&(window.addEventListener("test",null,i),window.removeEventListener("test",null,i))}catch(i){}return e})();function Vi(e,i){let t=Aa(e,i),s=t&&t.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function at(e,i,t,s){return{x:e.x+t*(i.x-e.x),y:e.y+t*(i.y-e.y)}}function Jn(e,i,t,s){return{x:e.x+t*(i.x-e.x),y:s==="middle"?t<.5?e.y:i.y:s==="after"?t<1?e.y:i.y:t>0?i.y:e.y}}function Qn(e,i,t,s){let n={x:e.cp2x,y:e.cp2y},o={x:i.cp1x,y:i.cp1y},r=at(e,n,t),a=at(n,o,t),l=at(o,i,t),c=at(r,a,t),h=at(a,l,t);return at(c,h,t)}function to(e){return e==="angle"?{between:Si,compare:Qr,normalize:W}:{between:Ci,compare:(i,t)=>i-t,normalize:i=>i}}function gn({start:e,end:i,count:t,loop:s,style:n}){return{start:e%t,end:i%t,loop:s&&(i-e+1)%t===0,style:n}}function Ia(e,i,t){let{property:s,start:n,end:o}=t,{between:r,normalize:a}=to(s),l=i.length,{start:c,end:h,loop:d}=e,u,f;if(d){for(c+=l,h+=l,u=0,f=l;u<f&&r(a(i[c%l][s]),n,o);++u)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:d,style:e.style}}function Ni(e,i,t){if(!t)return[e];let{property:s,start:n,end:o}=t,r=i.length,{compare:a,between:l,normalize:c}=to(s),{start:h,end:d,loop:u,style:f}=Ia(e,i,t),m=[],p=!1,g=null,b,_,C,D=()=>l(n,C,b)&&a(n,C)!==0,x=()=>a(o,b)===0||l(o,C,b),y=()=>p||D(),w=()=>!p||x();for(let v=h,M=h;v<=d;++v)_=i[v%r],!_.skip&&(b=c(_[s]),b!==C&&(p=l(b,n,o),g===null&&y()&&(g=a(b,n)===0?v:M),g!==null&&w()&&(m.push(gn({start:g,end:v,loop:u,count:r,style:f})),g=null),M=v,C=b));return g!==null&&m.push(gn({start:g,end:d,loop:u,count:r,style:f})),m}function Wi(e,i){let t=[],s=e.segments;for(let n=0;n<s.length;n++){let o=Ni(s[n],e.points,i);o.length&&t.push(...o)}return t}function Fa(e,i,t,s){let n=0,o=i-1;if(t&&!s)for(;n<i&&!e[n].skip;)n++;for(;n<i&&e[n].skip;)n++;for(n%=i,t&&(o+=n);o>n&&e[o%i].skip;)o--;return o%=i,{start:n,end:o}}function Ba(e,i,t,s){let n=e.length,o=[],r=i,a=e[i],l;for(l=i+1;l<=t;++l){let c=e[l%n];c.skip||c.stop?a.skip||(s=!1,o.push({start:i%n,end:(l-1)%n,loop:s}),i=r=c.stop?l:null):(r=l,a.skip&&(i=l)),a=c}return r!==null&&o.push({start:i%n,end:r%n,loop:s}),o}function eo(e,i){let t=e.points,s=e.options.spanGaps,n=t.length;if(!n)return[];let o=!!e._loop,{start:r,end:a}=Fa(t,n,o,s);if(s===!0)return mn(e,[{start:r,end:a,loop:o}],t,i);let l=a<r?a+n:a,c=!!e._fullLoop&&r===0&&a===n-1;return mn(e,Ba(t,r,l,c),t,i)}function mn(e,i,t,s){return!s||!s.setContext||!t?i:za(e,i,t,s)}function za(e,i,t,s){let n=e._chart.getContext(),o=bn(e.options),{_datasetIndex:r,options:{spanGaps:a}}=e,l=t.length,c=[],h=o,d=i[0].start,u=d;function f(m,p,g,b){let _=a?-1:1;if(m!==p){for(m+=l;t[m%l].skip;)m-=_;for(;t[p%l].skip;)p+=_;m%l!==p%l&&(c.push({start:m%l,end:p%l,loop:g,style:b}),h=b,d=p%l)}}for(let m of i){d=a?d:m.start;let p=t[d%l],g;for(u=d+1;u<=m.end;u++){let b=t[u%l];g=bn(s.setContext(ut(n,{type:"segment",p0:p,p1:b,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:r}))),Va(g,h)&&f(d,u-1,m.loop,h),p=b,h=g}d<u-1&&f(d,u-1,m.loop,h)}return c}function bn(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Va(e,i){if(!i)return!1;let t=[],s=function(n,o){return Ti(o)?(t.includes(o)||t.push(o),t.indexOf(o)):o};return JSON.stringify(e,s)!==JSON.stringify(i,s)}function ke(e,i,t){return e.options.clip?e[t]:i[t]}function Na(e,i){let{xScale:t,yScale:s}=e;return t&&s?{left:ke(t,i,"left"),right:ke(t,i,"right"),top:ke(s,i,"top"),bottom:ke(s,i,"bottom")}:i}function Hi(e,i){let t=i._clip;if(t.disabled)return!1;let s=Na(i,e.chartArea);return{left:t.left===!1?0:s.left-(t.left===!0?0:t.left),right:t.right===!1?e.width:s.right+(t.right===!0?0:t.right),top:t.top===!1?0:s.top-(t.top===!0?0:t.top),bottom:t.bottom===!1?e.height:s.bottom+(t.bottom===!0?0:t.bottom)}}var Zi=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(i,t,s,n